/* QR workspace only: input, output, optional design settings. */
.qr-page .qr-main { max-width: 1280px; overflow: visible; }
.qr-page .qr-main::before { right: 0; max-width: 100%; }
.qr-page .qr-hero { gap: 18px; }
.qr-page .qr-hero h1 { font-size: clamp(28px, 3vw, 42px); line-height: 1.2; }
.qr-page .qr-tabs { justify-content: flex-start; }
.qr-page .qr-tab.is-active, .qr-page .qr-tab:hover { color: #256fd9; border-color: #256fd9; box-shadow: none; }
.qr-page .qr-workspace { width: 100%; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); grid-template-rows: max-content 1fr; grid-template-areas: "input output" "options output"; gap: 18px; margin-top: 24px; }
.qr-page .qr-form-card { grid-area: input; padding: 24px; gap: 18px; }
.qr-page .qr-form-card, .qr-page .qr-options, .qr-page .qr-output-card { min-width: 0; border-radius: 8px; background: #fff; border: 1px solid #dae3ee; box-shadow: 0 3px 12px rgba(31,41,55,.06); }
.qr-page .qr-options { grid-area: options; padding: 20px; margin: 0; }
.qr-page .qr-options-title { gap: 12px; }
.qr-page .qr-options-toggle { min-height: 44px; background: #eef5ff; color: #1d5cb8; box-shadow: none; border: 1px solid #bed5f7; }
.qr-page .qr-options-toggle span { color: inherit; font-size: 13px; }
.qr-page .qr-options-body { padding-top: 18px; }
.qr-page .qr-options-body[hidden], .qr-page [hidden] { display: none !important; }
.qr-page .qr-options-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.qr-page .qr-caption-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.qr-page .qr-caption-grid > label:first-child { grid-column: 1 / -1; }
.qr-page .qr-caption-grid label, .qr-page .font-picker, .qr-page .font-picker-current { min-width: 0; }
.qr-page .font-picker-button { width: 100%; min-width: 0; }
.qr-page .font-picker-current strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qr-page .font-picker-current em { font-size: 20px; white-space: nowrap; }
.qr-page .qr-template-option input:checked + span, .qr-page .qr-frame-option input:checked + span { color: #256fd9; border-color: #256fd9; }
.qr-page .qr-create-actions { display: grid; justify-items: center; gap: 10px; }
.qr-page .qr-create-actions > .qr-error { justify-self: stretch; }
.qr-page .qr-create-actions > span { text-align: center; }
.qr-page .qr-create-actions > span, .qr-page .qr-save-note, .qr-page .qr-dimensions { font-size: 13px; line-height: 1.5; color: #59677a; }
.qr-page .qr-submit { width: auto; min-width: 190px; max-width: 100%; min-height: 46px; padding: 10px 26px; margin: 0; background: #256fd9; border-radius: 999px; }
.qr-page .qr-submit:hover { background: #1d5cb8; }
.qr-page button:disabled { cursor: not-allowed; opacity: .6; }
.qr-page .qr-output-card { grid-area: output; position: sticky; top: 102px; padding: 20px; gap: 12px; }
.qr-page .qr-output-card h2 { font-size: 20px; margin: 0; font-family: var(--font-heading); }
.qr-page .qr-status { color: #4b5e75; font-size: 14px; line-height: 1.5; margin: 0; }
.qr-page .qr-summary { overflow-wrap: anywhere; margin: 0; font-weight: 600; line-height: 1.5; }
.qr-page .qr-summary, .qr-page .qr-dimensions, .qr-page .qr-content-details { display: none; }
.qr-page .is-ready .qr-summary, .qr-page .is-ready .qr-dimensions, .qr-page .is-ready .qr-content-details { display: block; }
.qr-page .qr-canvas-wrap { min-height: 220px; padding: 8px; background: #f7f9fc; border-radius: 8px; }
.qr-page .qr-placeholder { min-height: 210px; border-radius: 8px; padding: 16px; }
.qr-page .qr-placeholder svg { width: 48px; height: 48px; }
.qr-page .qr-output-actions { grid-template-columns: 1fr; }
.qr-page .qr-output-actions a, .qr-page .qr-output-actions button { min-height: 44px; border-radius: 8px; }
.qr-page .qr-output-actions a[aria-disabled="true"] { pointer-events: none; opacity: .5; }
.qr-page .qr-output-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.qr-page .qr-output-actions > * { min-width: 0; font-size: 14px; }
.qr-page .qr-output-actions [hidden] { display: none; }
.qr-page .qr-print-options { display: none; gap: 8px; }
.qr-page .is-ready .qr-print-options { display: grid; }
.qr-page .qr-print-options label { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; }
.qr-page #qrPrintWidth { width: 90px; min-height: 44px; }
.qr-page .qr-share-choice { font-size: 13px; line-height: 1.5; align-items: flex-start; }
.qr-page .qr-save-note, .qr-page .qr-dimensions { margin: 0; }
.qr-page .qr-content-details summary { cursor: pointer; color: #256fd9; font-size: 13px; }
.qr-page #qrPayloadPreview { margin-top: 10px; width: 100%; min-height: 100px; font-size: 12px; overflow-wrap: anywhere; }
.qr-page :is(button, a, input, select, textarea):focus-visible { outline: 3px solid rgba(37,111,217,.5); outline-offset: 3px; }
.qr-page .qr-panel input, .qr-page .qr-panel textarea, .qr-page .qr-panel select { min-width: 0; max-width: 100%; }
@media (max-width: 850px) {
    .qr-page .qr-workspace { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; grid-template-areas: "input" "output" "options"; gap: 14px; margin-top: 18px; }
    .qr-page .qr-output-card { position: static; }
    .qr-page .qr-main { padding: 18px 14px 28px; }
    .qr-page .qr-form-card, .qr-page .qr-options, .qr-page .qr-output-card { padding: 16px; }
    .qr-page .qr-tabs { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; scroll-padding: 10px; }
    .qr-page .qr-hero { min-width: 0; }
    .qr-page .qr-tabs { max-width: 100%; }
    .qr-page .qr-tab { flex: 0 0 auto; }
    .qr-page .qr-template-grid, .qr-page .qr-frame-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .qr-page .qr-template-option span, .qr-page .qr-frame-option span { padding: 10px 4px; font-size: 12px; }
    .qr-page .qr-logo-grid, .qr-page .qr-bg-grid, .qr-page .qr-caption-grid { grid-template-columns: minmax(0, 1fr); }
    .qr-page .qr-two-col { grid-template-columns: minmax(0, 1fr); }
    .qr-page .qr-output-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .qr-page .qr-options-title strong { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) { .qr-page * { scroll-behavior: auto !important; transition: none !important; } }
.qr-page .qr-tool-tabs { display: flex; flex-wrap: wrap; gap: 6px; width: fit-content; max-width: 100%; padding: 5px; margin: 0 auto 24px; border: 1px solid #d7e2ef; border-radius: 12px; background: #eef3f8; }
.qr-page .qr-tool-tabs button { min-height: 44px; padding: 10px 20px; border: 0; border-radius: 8px; background: transparent; color: #46566d; font: inherit; font-weight: 600; cursor: pointer; }
.qr-page .qr-tool-tabs [aria-selected="true"] { background: #256fd9; color: #fff; }
.qr-page .qr-tool-panel { width: 100%; min-width: 0; }
.qr-page .shortlink-workspace { display: grid; gap: 24px; max-width: 900px; margin: 0 auto; }
.qr-page .shortlink-intro h1 { margin: 0 0 10px; font-family: var(--font-heading); font-size: clamp(28px, 3vw, 38px); color: #256fd9; }
.qr-page .shortlink-intro p { margin: 0; color: #59677a; line-height: 1.6; }
.qr-page .shortlink-panel { display: flex; flex-direction: column; gap: 12px; min-width: 0; margin: 0; padding: 24px; border: 1px solid #dae3ee; border-radius: 8px; background: #fff; box-shadow: 0 3px 12px #1f29370f; }
.qr-page .shortlink-panel label { font-weight: 600; color: #36455b; }
.qr-page .shortlink-panel :is(input, textarea) { width: 100%; min-width: 0; max-width: 100%; min-height: 46px; padding: 12px; font: inherit; border: 1px solid #cbd8e8; border-radius: 8px; background: #fff; color: #253449; }
.qr-page .shortlink-panel textarea { resize: vertical; overflow-wrap: anywhere; }
.qr-page .shortlink-name { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.qr-page .shortlink-name span { color: #59677a; overflow-wrap: anywhere; }
.qr-page .shortlink-name input { flex: 1 1 180px; width: auto; }
.qr-page .shortlink-note { margin: 0; color: #59677a; font-size: 14px; line-height: 1.6; }
.qr-page .shortlink-create { text-align: center; margin-top: 6px; }
.qr-page #shortlinkStatus { text-align: center; }
.qr-page #shortlinkStatus:empty { display: none; }
.qr-page .shortlink-error { padding: 12px; margin: 0; border-radius: 8px; background: #fff0f0; color: #a52a26; overflow-wrap: anywhere; }
.qr-page .shortlink-result { display: grid; gap: 12px; border-top: 1px solid #dae3ee; padding-top: 18px; }
.qr-page .shortlink-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.qr-page .shortlink-actions > :is(button, a) { width: auto; }
.qr-page .shortlink-manage-actions { display: inline-flex; flex-wrap: nowrap; gap: 8px; }
.qr-page .shortlink-manage-actions > button { width: auto; flex: 0 0 auto; white-space: nowrap; }
.qr-page .shortlink-actions :is(button, a), .qr-page .shortlink-login { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 14px; border: 1px solid #bed5f7; border-radius: 8px; background: #eef5ff; color: #1d5cb8; text-decoration: none; font: inherit; font-size: 14px; cursor: pointer; }
.qr-page .shortlink-actions .shortlink-delete { border-color: #f5c2bc; background: #fff3f2; color: #b42318; }
.qr-page .shortlink-actions .shortlink-delete:hover { border-color: #ef8e83; background: #fee2e2; }
.qr-page .shortlink-editor { display: grid; gap: 10px; margin-top: 16px; padding-top: 16px; border-top: 1px solid #dae3ee; min-width: 0; }
.qr-page .shortlink-editor[hidden] { display: none; }
.qr-page .shortlink-editor .shortlink-save { background: #256fd9; border-color: #256fd9; color: #fff; }
.qr-page .shortlink-editor :disabled { cursor: wait; }
.qr-page .shortlink-editor textarea[aria-invalid="true"] { border-color: #b42318; }
.qr-page .shortlink-panel h2 { margin: 0; font-family: var(--font-heading); font-size: 23px; }
.qr-page .shortlink-row { min-width: 0; padding: 18px 0; border-top: 1px solid #dae3ee; }
.qr-page .shortlink-row h3 { margin: 0 0 6px; font: inherit; font-weight: 600; color: #1d5cb8; overflow-wrap: anywhere; }
.qr-page .shortlink-target { margin: 0 0 8px; color: #59677a; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.qr-page .shortlink-state { display: block; margin-bottom: 10px; color: #46566d; font-size: 13px; }
@media (max-width: 850px) {
    .qr-page .qr-tool-tabs { width: 100%; gap: 4px; margin-bottom: 18px; }
    .qr-page .qr-tool-tabs button { flex: 1 1 0; padding: 10px 8px; font-size: 14px; }
    .qr-page .shortlink-panel { padding: 16px; }
    .qr-page .shortlink-workspace { gap: 18px; }
    .qr-page .shortlink-name { align-items: stretch; flex-direction: column; }
    .qr-page .shortlink-name input { flex: none; width: 100%; }
}
