/* Standalone portal: local assets; light first, explicit persisted theme. */
:root {
  color-scheme: light;
  --bg: #f5f8fb;
  --surface: #ffffff;
  --surface-raised: #edf4f8;
  --input: #f8fbfd;
  --line: #d6e2eb;
  --line-soft: rgba(70, 104, 131, .14);
  --text: #20364b;
  --muted: #50667c;
  --quiet: #61778c;
  --accent: #087f69;
  --accent-hover: #096b59;
  --accent-dark: #ffffff;
  --error: #a93638;
  --success: #1c7052;
  --qr-bg: #ffffff;
  --qr-image-bg: #ffffff;
  --confirm-bg: #f5faf8;
  --confirm-line: #b6d9cc;
  --danger-bg: #ad3939;
  --danger-ink: #ffffff;
  --detail-01: rgba(38, 99, 105, .10);
  --detail-02: rgba(35, 63, 108, .14);
  --detail-03: #c7e9df;
  --detail-04: #e2fff6;
  --detail-05: #24917c;
  --detail-06: #18595e;
  --detail-07: rgba(151, 240, 215, .2);
  --detail-08: rgba(0, 0, 0, .1);
  --detail-09: #465b71;
  --detail-10: rgba(255, 255, 255, .72);
  --detail-11: #427d7b;
  --detail-12: rgba(102, 193, 188, .17);
  --detail-13: rgba(102, 193, 188, .11);
  --detail-14: rgba(102, 193, 188, .08);
  --detail-15: rgba(96, 221, 188, .25);
  --detail-16: #60858d;
  --detail-17: rgba(119, 224, 207, .15);
  --detail-18: #237d6b;
  --detail-19: rgba(63, 137, 126, .25);
  --detail-20: rgba(18, 37, 51, .35);
  --detail-21: rgba(0, 0, 0, .08);
  --detail-22: #486176;
  --detail-23: #80afa3;
  --detail-24: rgba(255, 255, 255, .018);
  --detail-25: rgba(63, 110, 141, .14);
  --detail-26: #edf3f7;
  --detail-27: #12644f;
  --detail-28: #d9eee8;
  --detail-29: rgba(0, 0, 0, .16);
  --detail-30: rgba(205, 255, 239, .04);
  --detail-31: #384e62;
  --detail-32: #cbdbe7;
  --detail-33: #6b7f91;
  --detail-34: #93adbf;
  --detail-35: #ffffff;
  --detail-36: rgba(39, 148, 121, .09);
  --detail-37: rgba(44, 174, 140, .16);
  --detail-38: #c8d9e5;
  --detail-39: #f0f6fa;
  --detail-40: #3d566e;
  --detail-41: #e6f0f6;
  --detail-42: #91acbf;
  --detail-43: #658e89;
  --detail-44: rgba(58, 169, 129, .085);
  --detail-45: rgba(107, 214, 173, .20);
  --detail-46: rgba(178, 78, 77, .10);
  --detail-47: rgba(255, 139, 139, .22);
  --detail-48: rgba(82, 145, 177, .08);
  --detail-49: #2d6383;
  --detail-50: rgba(118, 180, 216, .18);
  --detail-51: #64778c;
  --detail-52: #237969;
  --detail-53: #36867e;
  --detail-54: #344d63;
  --detail-55: #47748b;
  --detail-56: #eaf2f6;
  --detail-57: rgba(142, 172, 205, .1);
  --detail-58: #40596e;
  --detail-59: #1b7256;
  --detail-60: #cadddf;
  --detail-61: #f1f8f6;
  --detail-62: #4d6579;
  --detail-63: #edf4f8;
  --detail-64: #4b9e8c;
  --detail-65: #ffffff;
  --detail-66: rgba(0, 0, 0, .09);
  --detail-67: #627c88;
  --detail-68: #6a9291;
  --detail-69: #c6d8e3;
  --detail-70: #4f687e;
  --detail-71: rgba(143, 164, 193, .06);
  --detail-72: #1c745e;
  --detail-73: rgba(84, 190, 153, .07);
  --detail-74: #aed0c1;
  --detail-75: #1e7054;
  --detail-76: rgba(84, 190, 153, .12);
  --detail-77: #9ccdb8;
  --detail-78: #a33b33;
  --detail-79: #e0b8b6;
  --detail-80: rgba(177, 95, 81, .07);
  --detail-81: #22775e;
  --detail-82: #86a4b0;
  --detail-83: #b4d9ca;
  --detail-84: rgba(71, 155, 125, .07);
  --detail-85: #9fc9b9;
  --detail-86: #1e7256;
  --detail-87: #537e75;
  --detail-88: #d2e1e8;
  --detail-89: #f9fcfd;
  --detail-90: #dfefe9;
  --detail-91: #1c7259;
  --detail-92: #c6d6e1;
  --detail-93: #526c81;
  --detail-94: #256b4f;
  --detail-95: #b7d8c7;
  --detail-96: rgba(65, 156, 119, .05);
  --detail-97: #455c70;
  --detail-98: #7e6a35;
  --detail-99: rgba(244, 161, 146, .1);
  --detail-100: #ac4546;
  --detail-101: #eaf3f7;
  --detail-102: #557a91;
  --detail-103: #cddde6;
  --detail-104: #3f566b;
  --detail-105: #e7f0f5;
  --detail-106: #adc4d4;
  --radius: 22px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a1422;
  --surface: #111e2e;
  --surface-raised: #162538;
  --input: #0c1827;
  --line: #25354a;
  --line-soft: rgba(148, 169, 195, .12);
  --text: #ecf2f9;
  --muted: #a0aec1;
  --quiet: #7e91aa;
  --accent: #60ddbc;
  --accent-hover: #8beacf;
  --accent-dark: #102d28;
  --error: #ffb1ad;
  --success: #89e4c0;
  --qr-bg: #182b3c;
  --qr-image-bg: #ffffff;
  --confirm-bg: #102b28;
  --confirm-line: #355e52;
  --danger-bg: #e59b95;
  --danger-ink: #321b19;
  --detail-01: rgba(38, 99, 105, .10);
  --detail-02: rgba(35, 63, 108, .14);
  --detail-03: #24635c;
  --detail-04: #d4fff1;
  --detail-05: #328b7a;
  --detail-06: #1c4b50;
  --detail-07: rgba(151, 240, 215, .2);
  --detail-08: rgba(0, 0, 0, .1);
  --detail-09: #bccbdb;
  --detail-10: rgba(18, 33, 49, .48);
  --detail-11: #a2c4c7;
  --detail-12: rgba(102, 193, 188, .17);
  --detail-13: rgba(102, 193, 188, .11);
  --detail-14: rgba(102, 193, 188, .08);
  --detail-15: rgba(96, 221, 188, .25);
  --detail-16: #658d94;
  --detail-17: rgba(119, 224, 207, .15);
  --detail-18: #8ce0ca;
  --detail-19: rgba(63, 137, 126, .25);
  --detail-20: rgba(18, 37, 51, .35);
  --detail-21: rgba(0, 0, 0, .08);
  --detail-22: #bdcbd9;
  --detail-23: #3e736e;
  --detail-24: rgba(255, 255, 255, .018);
  --detail-25: rgba(153, 178, 210, .08);
  --detail-26: #0b1726;
  --detail-27: #c5f5e6;
  --detail-28: #213747;
  --detail-29: rgba(0, 0, 0, .16);
  --detail-30: rgba(205, 255, 239, .04);
  --detail-31: #ccd7e4;
  --detail-32: #2a3a4e;
  --detail-33: #71839a;
  --detail-34: #40526a;
  --detail-35: #0e2d29;
  --detail-36: rgba(39, 148, 121, .09);
  --detail-37: rgba(44, 174, 140, .16);
  --detail-38: #35475f;
  --detail-39: #192a3e;
  --detail-40: #c7d4e4;
  --detail-41: #22374d;
  --detail-42: #4b617b;
  --detail-43: #7b9a9b;
  --detail-44: rgba(58, 169, 129, .085);
  --detail-45: rgba(107, 214, 173, .20);
  --detail-46: rgba(178, 78, 77, .10);
  --detail-47: rgba(255, 139, 139, .22);
  --detail-48: rgba(82, 145, 177, .08);
  --detail-49: #b1d7ee;
  --detail-50: rgba(118, 180, 216, .18);
  --detail-51: #7e91aa;
  --detail-52: #9dd5cc;
  --detail-53: #71acaa;
  --detail-54: #d2dde9;
  --detail-55: #8ca6c1;
  --detail-56: #1a2c40;
  --detail-57: rgba(142, 172, 205, .1);
  --detail-58: #c4d3e4;
  --detail-59: #99e2ca;
  --detail-60: #2c4053;
  --detail-61: #0c1826;
  --detail-62: #a8bbcf;
  --detail-63: #152539;
  --detail-64: #406961;
  --detail-65: #fff;
  --detail-66: rgba(0, 0, 0, .09);
  --detail-67: #708493;
  --detail-68: #9eb6bc;
  --detail-69: #36495c;
  --detail-70: #b5c5d6;
  --detail-71: rgba(143, 164, 193, .06);
  --detail-72: #8ce8ca;
  --detail-73: rgba(84, 190, 153, .07);
  --detail-74: #33594f;
  --detail-75: #b3f1d6;
  --detail-76: rgba(84, 190, 153, .12);
  --detail-77: #3a6d5a;
  --detail-78: #f0b7ae;
  --detail-79: #64494c;
  --detail-80: rgba(177, 95, 81, .07);
  --detail-81: #8cd7c2;
  --detail-82: #587481;
  --detail-83: #2f554c;
  --detail-84: rgba(71, 155, 125, .07);
  --detail-85: #3e6b5f;
  --detail-86: #b9e9d8;
  --detail-87: #95b2b0;
  --detail-88: #293b4f;
  --detail-89: #0f1b2a;
  --detail-90: #1c343b;
  --detail-91: #8fd7c1;
  --detail-92: #3d4d62;
  --detail-93: #b5c3d5;
  --detail-94: #99d7bb;
  --detail-95: #31554a;
  --detail-96: rgba(65, 156, 119, .05);
  --detail-97: #c0cede;
  --detail-98: #c5baa0;
  --detail-99: rgba(244, 161, 146, .1);
  --detail-100: #d9a4a3;
  --detail-101: #1a2d40;
  --detail-102: #829cb3;
  --detail-103: #2e4157;
  --detail-104: #c7d2df;
  --detail-105: #293a4d;
  --detail-106: #5d728d;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; color: var(--text); font-size: 14px; line-height: 1.6; min-height: 100vh; min-height: 100svh; background: radial-gradient(ellipse at 8% 10%, var(--detail-01), transparent 40%), radial-gradient(ellipse at 92% 85%, var(--detail-02), transparent 46%), var(--bg); }
button, input, select, textarea { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:disabled { cursor: default; opacity: .48; }
input, select, button, a { outline: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }
::selection { color: var(--text); background: var(--detail-03); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.3; }
svg { display: block; flex: 0 0 auto; }
.page-shell { max-width: 1264px; margin-inline: auto; padding-inline: 32px; }
.skip-link { position: absolute; left: 24px; top: 12px; z-index: 20; background: var(--accent); color: var(--accent-dark); border-radius: 8px; padding: 10px 18px; transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }
.site-header { min-height: 108px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.brand-mark { width: 43px; height: 43px; border-radius: 13px; color: var(--detail-04); display: grid; place-items: center; background: linear-gradient(145deg, var(--detail-05), var(--detail-06)); box-shadow: inset 0 0 0 1px var(--detail-07), 0 4px 16px var(--detail-08); }
.brand-mark svg { width: 29px; height: 29px; }
.brand-type { font-size: 20px; font-weight: 700; letter-spacing: .4px; line-height: 1.1; }
.brand-type > span { font-size: 17px; font-weight: 500; color: var(--detail-09); margin-left: 2px; }
.brand-type small { display: block; margin-top: 7px; font-size: 10px; color: var(--muted); font-weight: 400; letter-spacing: 3px; }
.header-tag, .session-indicator { display: flex; align-items: center; gap: 9px; font-size: 12px; color: var(--muted); border: 1px solid var(--line-soft); background: var(--detail-10); border-radius: 99px; padding: 7px 13px; }
.tiny-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.header-actions { display: flex; align-items: center; gap: 22px; }
.quiet-link { color: var(--muted); font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.quiet-link:hover { color: var(--text); }
.quiet-link svg { width: 14px; height: 14px; }
.public-layout { display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr); align-items: center; gap: clamp(40px, 6.2vw, 86px); min-height: calc(100vh - 213px); min-height: calc(100svh - 213px); padding-block: 30px 56px; }
.welcome { position: relative; padding-block: 12px; }
.eyebrow, .section-overline { color: var(--quiet); font-size: 10px; letter-spacing: 2.2px; font-weight: 600; }
.eyebrow { display: flex; align-items: center; gap: 10px; color: var(--detail-11); }
.eyebrow > span { width: 20px; height: 1px; background: var(--accent); display: inline-block; }
.welcome h1 { font-size: clamp(42px, 4.5vw, 64px); line-height: 1.22; font-weight: 650; letter-spacing: -1.7px; margin-top: 28px; }
.welcome h1 > span { color: var(--accent); }
.hero-copy { margin-top: 23px; color: var(--muted); line-height: 1.95; font-size: 15px; }
.welcome-art { position: relative; width: 100%; height: 142px; margin-block: 21px 17px; overflow: hidden; }
.aurora-orbit { position: absolute; height: 180px; width: 400px; border: 1px solid var(--detail-12); border-radius: 50%; transform: rotate(-23deg); top: -28px; left: -15px; }
.orbit-two { width: 340px; height: 132px; left: 17px; top: -3px; border-color: var(--detail-13); }
.orbit-three { width: 270px; height: 86px; top: 20px; left: 53px; border-color: var(--detail-14); }
.art-dot { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 14px var(--detail-15); }
.dot-one { top: 23px; left: 47px; }.dot-two { top: 96px; left: 324px; width: 4px; height: 4px; opacity: .5; }
.art-caption { position: absolute; left: 3px; bottom: 7px; font-size: 8px; color: var(--detail-16); letter-spacing: 2.4px; }
.play-mark { position: absolute; left: 144px; top: 36px; width: 58px; height: 58px; border: 1px solid var(--detail-17); border-radius: 19px; color: var(--detail-18); background: linear-gradient(140deg, var(--detail-19), var(--detail-20)); transform: rotate(-8deg); display: grid; place-items: center; box-shadow: 0 15px 40px var(--detail-21); }
.play-mark svg { width: 32px; height: 32px; transform: rotate(8deg); }
.welcome-note { display: flex; align-items: center; gap: 15px; font-size: 12px; color: var(--detail-22); line-height: 1.9; }
.welcome-note p > span { color: var(--quiet); }
.note-rule { width: 2px; height: 35px; border-radius: 2px; background: var(--detail-23); }
.surface { border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(125deg, var(--detail-24), transparent 60%), var(--surface); box-shadow: 0 12px 42px var(--detail-21); min-width: 0; }
.access-card { padding: 33px 34px 0; }
.surface h2 { font-size: 22px; letter-spacing: -.45px; font-weight: 600; margin-top: 10px; }
.section-description { font-size: 13px; color: var(--muted); margin-top: 10px; line-height: 1.75; }
.tab-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; border: 1px solid var(--detail-25); background: var(--detail-26); border-radius: 11px; padding: 4px; margin-block: 24px; }
.tab-button { min-height: 39px; border: 0; border-radius: 7px; color: var(--muted); background: transparent; font-size: 13px; white-space: nowrap; padding: 6px; transition: background .18s, color .18s; }
.tab-button[aria-selected="true"] { color: var(--detail-27); background: var(--detail-28); box-shadow: 0 2px 6px var(--detail-29), inset 0 1px var(--detail-30); font-weight: 600; }
.tab-button:hover { color: var(--text); }
.portal-form { margin: 0; }
.field + .field { margin-top: 18px; }
.field label { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; color: var(--detail-31); font-size: 12px; margin-bottom: 8px; font-weight: 500; }
.field-meta { color: var(--quiet); font-size: 10px; font-weight: 400; }
.field input, .field select { display: block; width: 100%; min-width: 0; min-height: 46px; padding: 11px 13px; border: 1px solid var(--detail-32); border-radius: 9px; background: var(--input); color: var(--text); line-height: 1.45; transition: border-color .18s; }
.field input::placeholder { color: var(--detail-33); opacity: 1; }
.field input:hover, .field select:hover { border-color: var(--detail-34); }
.field input:disabled, .field select:disabled { opacity: .6; }
.field select { appearance: auto; padding-right: 8px; }
.field-hint, .form-note { color: var(--quiet); line-height: 1.8; font-size: 11px; margin-top: 8px; }
.form-note { margin-top: 20px; }
.code-input { font-family: ui-monospace, SFMono-Regular, Consolas, "Microsoft YaHei", monospace; font-size: 13px; letter-spacing: .5px; }
.form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 18px; margin-top: 23px; }
.button { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 12px; min-height: 44px; max-width: 100%; padding: 11px 21px; border: 1px solid transparent; border-radius: 9px; font-weight: 600; font-size: 13px; line-height: 1.5; text-align: center; transition: background .18s, border-color .18s, box-shadow .18s; }
.button svg { width: 17px; height: 17px; }
.button-primary { color: var(--detail-35); background: var(--accent); box-shadow: 0 3px 12px var(--detail-36); }
.button-primary:hover:not(:disabled) { background: var(--accent-hover); box-shadow: 0 4px 18px var(--detail-37); }
.button-secondary { border-color: var(--detail-38); background: var(--detail-39); color: var(--detail-40); }
.button-secondary:hover:not(:disabled) { background: var(--detail-41); border-color: var(--detail-42); }
.button-small { min-height: 35px; padding: 7px 12px; font-size: 11px; gap: 6px; font-weight: 500; border-radius: 8px; }
.button[aria-busy="true"] { cursor: progress; }
.text-button { color: var(--muted); border: 0; background: none; padding: 9px 0; font-size: 11px; }
.text-button:hover { color: var(--accent); }
.card-bottom-note { display: flex; align-items: center; gap: 8px; padding: 18px 0; border-top: 1px solid var(--line-soft); margin-top: 25px; color: var(--quiet); font-size: 10px; line-height: 1.7; }
.card-bottom-note svg { width: 16px; height: 16px; color: var(--detail-43); }
.message { border: 1px solid transparent; border-radius: 9px; padding: 11px 13px; margin-top: 16px; font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; }
.message[data-tone="success"] { background: var(--detail-44); color: var(--success); border-color: var(--detail-45); }
.message[data-tone="error"] { background: var(--detail-46); color: var(--error); border-color: var(--detail-47); }
.message[data-tone="info"] { background: var(--detail-48); color: var(--detail-49); border-color: var(--detail-50); }
.site-footer { display: flex; justify-content: space-between; gap: 14px; padding-block: 21px 26px; border-top: 1px solid var(--line-soft); color: var(--detail-51); font-size: 10px; letter-spacing: .3px; }
.workspace-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 27px 30px; border-top: 1px solid var(--line-soft); }
.workspace-heading h1 { font-size: 34px; font-weight: 600; letter-spacing: -.8px; margin-top: 15px; }
.workspace-description { color: var(--muted); font-size: 13px; margin-top: 12px; }
.session-indicator { max-width: 280px; flex-shrink: 0; }
.session-indicator > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.session-indicator .tiny-dot { background: var(--detail-51); }
.session-indicator[data-state="authenticated"] .tiny-dot { background: var(--accent); }
.global-message { margin: 0 0 24px; }
.login-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .95fr); gap: 90px; align-items: center; padding-block: 28px 72px; }
.login-editorial { padding-left: 24px; }
.login-editorial h2 { margin-top: 20px; font-size: 40px; line-height: 1.35; font-weight: 600; letter-spacing: -1px; }
.login-editorial h2 > span { color: var(--detail-52); }
.login-editorial > p { max-width: 360px; font-size: 13px; line-height: 1.9; margin-top: 20px; color: var(--muted); }
.editorial-lines { display: grid; gap: 22px; margin-top: 34px; }
.editorial-lines > div { display: flex; gap: 17px; align-items: flex-start; }
.editorial-lines > div > span { color: var(--detail-53); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; padding-top: 3px; }
.editorial-lines p { font-size: 13px; color: var(--detail-54); }
.editorial-lines small { display: block; color: var(--quiet); font-size: 11px; margin-top: 4px; }
.login-card { padding: 31px; }
.login-card .portal-form { margin-top: 27px; }
.admin-workspace { padding-bottom: 40px; }
.workspace-grid { display: grid; grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr); gap: 24px; align-items: start; }
.license-card, .tv-card, .accounts-card { padding: 27px; }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.card-heading .section-description { margin-bottom: 0; }
.card-heading h2 { font-size: 20px; }
.section-symbol { display: grid; place-items: center; width: 39px; height: 39px; color: var(--detail-55); background: var(--detail-56); border-radius: 11px; border: 1px solid var(--detail-57); }
.section-symbol svg { width: 22px; height: 22px; }
.license-card .portal-form { margin-top: 25px; }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .8fr); gap: 17px; }
.form-grid .field + .field { margin-top: 0; }
.panel-footnote { margin-top: 24px; padding-top: 17px; border-top: 1px solid var(--line-soft); color: var(--quiet); font-size: 10px; line-height: 1.9; }
.panel-footnote .tiny-dot { margin-right: 6px; width: 4px; height: 4px; vertical-align: 2px; opacity: .7; }
.license-result { margin-top: 25px; border-top: 1px solid var(--line-soft); padding-top: 21px; }
.result-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.result-heading h3 { font-size: 12px; font-weight: 500; color: var(--detail-58); }
.code-output { margin: 13px 0 0; padding: 16px; max-height: 296px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--detail-59); line-height: 2; border: 1px solid var(--detail-60); background: var(--detail-61); border-radius: 10px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; scrollbar-width: thin; }
.icon-button { display: grid; place-items: center; flex-shrink: 0; width: 35px; height: 35px; padding: 0; border: 1px solid var(--line); border-radius: 9px; color: var(--detail-62); background: var(--detail-63); }
.icon-button svg { width: 19px; height: 19px; }
.icon-button:hover:not(:disabled) { color: var(--accent); border-color: var(--detail-64); }
.qr-grid { display: grid; grid-template-columns: minmax(168px, 220px) minmax(0, 1fr); gap: 22px; align-items: center; margin-top: 24px; }
.qr-stage { position: relative; aspect-ratio: 1; width: 100%; padding: 13px; border-radius: 15px; background: var(--detail-65); color-scheme: light; box-shadow: 0 6px 22px var(--detail-66); display: grid; place-items: center; }
.qr-stage img { width: 100%; height: auto; display: block; aspect-ratio: 1; object-fit: contain; }
.qr-placeholder { display: flex; align-items: center; flex-direction: column; justify-content: center; gap: 16px; color: var(--detail-67); font-size: 11px; text-align: center; padding: 8px; }
.qr-placeholder svg { width: 49px; height: 49px; color: var(--detail-68); }
.qr-status { min-width: 0; }
.status-badge { display: inline-flex; padding: 3px 9px; border: 1px solid var(--detail-69); border-radius: 99px; color: var(--detail-70); background: var(--detail-71); font-size: 10px; }
.status-badge[data-phase="qr_ready"], .status-badge[data-phase="scanned"] { color: var(--detail-72); background: var(--detail-73); border-color: var(--detail-74); }
.status-badge[data-phase="logged_in"] { color: var(--detail-75); background: var(--detail-76); border-color: var(--detail-77); }
.status-badge[data-phase="failed"], .status-badge[data-phase="expired"] { color: var(--detail-78); border-color: var(--detail-79); background: var(--detail-80); }
.tv-state { font-size: 15px; line-height: 1.65; font-weight: 500; margin-top: 13px; overflow-wrap: anywhere; }
.qr-status .field-hint { font-size: 11px; margin-top: 8px; }
.tv-countdown { min-height: 20px; font-size: 11px; color: var(--detail-81); margin-top: 10px; font-variant-numeric: tabular-nums; }
.scan-steps { display: flex; flex-direction: column; gap: 5px; margin-top: 12px; color: var(--detail-51); font-size: 9px; }
.scan-steps span { display: flex; align-items: center; gap: 7px; }
.scan-steps span::before { content: ""; width: 3px; height: 3px; background: var(--detail-82); border-radius: 50%; }
.tv-note-form { margin-top: 24px; border-top: 1px solid var(--line-soft); padding-top: 18px; }
.tv-actions { gap: 10px; margin-top: 16px; }
.tv-actions .button { font-size: 12px; min-height: 40px; padding: 10px 17px; }
.qr-source { margin-top: 15px; font-size: 9px; overflow-wrap: anywhere; }
.saved-notice { display: flex; align-items: flex-start; gap: 10px; padding: 13px; margin-top: 17px; border: 1px solid var(--detail-83); border-radius: 10px; background: var(--detail-84); overflow-wrap: anywhere; }
.saved-icon { color: var(--accent); width: 20px; height: 20px; border: 1px solid var(--detail-85); border-radius: 50%; display: grid; place-items: center; font-size: 11px; flex-shrink: 0; }
.saved-notice strong { font-size: 12px; font-weight: 500; color: var(--detail-86); }
.saved-notice p { font-size: 10px; color: var(--muted); margin-top: 4px; line-height: 1.8; }
.saved-notice .membership-note { color: var(--detail-87); }
.accounts-card { margin-top: 24px; }
.accounts-list { display: grid; gap: 12px; margin-top: 22px; }
.accounts-list:empty { margin-top: 0; }
.account-entry { border: 1px solid var(--detail-88); border-radius: 12px; padding: 17px 19px; background: var(--detail-89); min-width: 0; }
.account-entry-header { display: flex; align-items: flex-start; gap: 14px; justify-content: space-between; }
.account-identity { display: flex; gap: 11px; align-items: center; min-width: 0; }
.account-avatar { display: grid; place-items: center; width: 33px; height: 33px; border-radius: 10px; background: var(--detail-90); color: var(--detail-91); font-size: 12px; flex-shrink: 0; }
.account-name { font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
.account-subtitle { font-size: 9px; margin-top: 3px; color: var(--quiet); }
.account-status { border-radius: 6px; border: 1px solid var(--detail-92); padding: 2px 8px; color: var(--detail-93); font-size: 10px; flex-shrink: 0; max-width: 45%; overflow-wrap: anywhere; }
.account-status[data-active="true"] { color: var(--detail-94); border-color: var(--detail-95); background: var(--detail-96); }
.account-details { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 17px 0 0; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.account-details div { min-width: 0; }
.account-details dt { font-size: 9px; color: var(--quiet); }
.account-details dd { margin: 5px 0 0; font-size: 11px; color: var(--detail-97); line-height: 1.65; overflow-wrap: anywhere; }
.account-details dd.pending { color: var(--detail-98); }
.account-error { margin-top: 13px; border-top: 1px solid var(--detail-99); padding-top: 10px; font-size: 11px; color: var(--detail-100); overflow-wrap: anywhere; }
.empty-state { padding: 32px 16px 8px; text-align: center; }
.empty-state-mark { display: inline-grid; place-items: center; width: 38px; height: 38px; background: var(--detail-101); color: var(--detail-102); border: 1px solid var(--detail-103); border-radius: 12px; font-size: 20px; margin-bottom: 14px; }
.empty-state h3 { font-size: 13px; font-weight: 500; color: var(--detail-104); }.empty-state p { font-size: 11px; color: var(--quiet); margin-top: 7px; }
.noscript-note { position: fixed; left: 12px; right: 12px; bottom: 12px; max-width: 600px; margin-inline: auto; background: var(--detail-105); border: 1px solid var(--detail-106); color: var(--text); border-radius: 10px; padding: 14px; font-size: 13px; text-align: center; }
.copy-fallback { position: fixed; top: 0; left: -9999px; width: 1px; height: 1px; opacity: 0; }
@media (min-width: 1500px) { .public-layout { padding-block: 55px 85px; } }
@media (max-width: 1050px) {
  .page-shell { padding-inline: 26px; }
  .public-layout { gap: 36px; }
  .access-card { padding-inline: 25px; }
  .welcome h1 { font-size: 47px; }
  .workspace-grid { gap: 18px; }
  .license-card, .tv-card, .accounts-card { padding: 23px; }
  .qr-grid { grid-template-columns: minmax(145px, 190px) minmax(0, 1fr); gap: 17px; }
  .login-layout { gap: 50px; }.login-editorial { padding-left: 10px; }
}
@media (max-width: 860px) {
  .public-layout { grid-template-columns: 1fr; gap: 28px; padding: 22px 0 40px; max-width: 590px; margin-inline: auto; min-height: auto; }
  .welcome { padding-block: 0; }.welcome h1 { margin-top: 19px; font-size: 45px; line-height: 1.23; }.welcome h1 br { display: none; }.hero-copy { font-size: 13px; margin-top: 16px; }.hero-copy br { display: none; }.welcome-art { display: none; }.welcome-note { margin-top: 20px; font-size: 10px; }.welcome-note br { display: none; }.welcome-note p > span { margin-left: 7px; }.note-rule { height: 17px; }
  .access-card { padding: 27px 28px 0; }
  .workspace-grid { grid-template-columns: 1fr; gap: 22px; }
  .qr-grid { grid-template-columns: 220px minmax(0, 1fr); gap: 28px; }
  .login-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 30px; padding-bottom: 50px; }
  .login-editorial h2 { font-size: 30px; }.editorial-lines { gap: 19px; }.login-card { padding: 25px; }
  .workspace-heading { padding-block: 22px 27px; }
}
@media (max-width: 600px) {
  .page-shell { padding-inline: 20px; }
  .site-header { min-height: 86px; gap: 12px; }
  .brand { gap: 10px; }.brand-mark { width: 36px; height: 36px; border-radius: 11px; }.brand-mark svg { width: 25px; height: 25px; }.brand-type { font-size: 17px; }.brand-type > span { font-size: 14px; }.brand-type small { margin-top: 5px; font-size: 9px; letter-spacing: 2px; }
  .header-tag { font-size: 10px; padding: 5px 9px; gap: 6px; }
  .eyebrow, .section-overline { font-size: 9px; letter-spacing: 1.8px; }
  .public-layout { padding-top: 19px; gap: 26px; }
  .welcome h1 { font-size: clamp(31px, 8.1vw, 44px); margin-top: 17px; letter-spacing: -1px; }
  .welcome h1 br { display: block; }
  .hero-copy { font-size: 12px; margin-top: 14px; max-width: 330px; }
  .welcome-note { margin-top: 16px; font-size: 9px; gap: 9px; }.welcome-note br { display: block; }.welcome-note p > span { margin-left: 0; }.note-rule { height: 27px; }
  .access-card { padding: 24px 21px 0; border-radius: 18px; }
  .surface h2 { font-size: 21px; }.section-description { font-size: 12px; margin-top: 8px; }
  .tab-list { margin-block: 22px; }.tab-button { font-size: 12px; }
  .field label { font-size: 12px; }.field input, .field select { font-size: 16px; min-height: 47px; padding-block: 11px; }.field input::placeholder { font-size: 13px; }.field .code-input { font-size: 13px; }.field-meta { font-size: 10px; }
  .form-actions { margin-top: 21px; gap: 10px 16px; }.button { min-height: 43px; padding: 11px 18px; font-size: 12px; }.text-button { font-size: 10px; }.card-bottom-note { font-size: 9px; margin-top: 23px; padding-block: 17px; }
  .site-footer { flex-wrap: wrap; padding-block: 18px 23px; font-size: 9px; gap: 5px 14px; }
  .workspace-heading { display: block; padding-block: 19px 24px; }.workspace-heading h1 { font-size: 28px; margin-top: 12px; }.workspace-description { font-size: 11px; margin-top: 9px; }.session-indicator { display: inline-flex; font-size: 10px; padding: 5px 10px; margin-top: 18px; max-width: 100%; }
  .header-actions { gap: 12px; }.quiet-link { font-size: 10px; gap: 4px; }.quiet-link svg { width: 11px; height: 11px; }.header-actions .button-small { min-height: 31px; padding: 5px 8px; font-size: 9px; }
  .login-layout { grid-template-columns: 1fr; gap: 25px; padding-block: 3px 34px; }.login-editorial { padding-left: 0; }.login-editorial .section-overline { display: none; }.login-editorial h2 { font-size: 26px; margin-top: 0; }.login-editorial h2 br { display: none; }.login-editorial > p { margin-top: 12px; font-size: 12px; max-width: none; }.editorial-lines { display: none; }.login-card { padding: 24px; border-radius: 18px; }
  .license-card, .tv-card, .accounts-card { padding: 22px 20px; border-radius: 18px; }.workspace-grid { gap: 18px; }.accounts-card { margin-top: 18px; }.card-heading { gap: 13px; }.card-heading h2 { font-size: 19px; }.section-symbol { width: 34px; height: 34px; border-radius: 10px; }.section-symbol svg { width: 19px; height: 19px; }
  .form-grid { gap: 14px; }.form-grid .field select { font-size: 14px; }.button-small { min-height: 33px; padding: 7px 10px; font-size: 10px; }.icon-button { width: 32px; height: 32px; }
  .qr-grid { grid-template-columns: minmax(130px, 180px) minmax(0, 1fr); gap: 18px; margin-top: 22px; }.qr-stage { padding: 9px; border-radius: 12px; }.qr-placeholder { font-size: 9px; gap: 12px; }.qr-placeholder svg { width: 42px; height: 42px; }.status-badge { padding: 2px 7px; font-size: 9px; }.tv-state { font-size: 13px; margin-top: 10px; }.qr-status .field-hint { font-size: 10px; line-height: 1.7; }.tv-countdown { font-size: 10px; margin-top: 7px; }.scan-steps { display: none; }.tv-note-form { margin-top: 21px; }.tv-actions .button { min-height: 40px; font-size: 11px; padding: 10px 15px; }.qr-source { font-size: 9px; }
  .accounts-card > .card-heading { align-items: flex-start; }.accounts-card > .card-heading .button { margin-top: 4px; }.accounts-card .section-description { font-size: 10px; }.account-entry { padding: 15px; }.account-details { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 12px; }.account-name { font-size: 12px; }.account-avatar { width: 30px; height: 30px; border-radius: 9px; }.account-status { font-size: 9px; }.account-details dd { font-size: 10px; }.account-error { font-size: 10px; }.panel-footnote { font-size: 9px; }
  .message { padding: 10px 11px; font-size: 11px; }.admin-workspace { padding-bottom: 30px; }
}
@media (max-width: 380px) {
  .page-shell { padding-inline: 14px; }.access-card { padding-inline: 18px; }.header-tag { font-size: 9px; padding-inline: 7px; }.header-actions { gap: 7px; }.brand-type { font-size: 16px; }.brand { gap: 8px; }
  .qr-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }.qr-stage { width: 198px; max-width: 100%; justify-self: center; }.qr-status { text-align: center; }.tv-countdown { min-height: 18px; }.license-card, .tv-card, .accounts-card { padding-inline: 18px; }
  .form-actions { gap: 9px 13px; }.text-button { font-size: 9px; }.form-grid .field-meta { font-size: 9px; }.form-grid { gap: 11px; }.accounts-card > .card-heading { gap: 9px; }.accounts-card > .card-heading .button { font-size: 9px; padding-inline: 8px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

/* Theme controls and signed-in account cards reuse the original layout. */
.theme-toggle { min-height: 37px; gap: 7px; white-space: nowrap; }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-icon-sun, :root[data-theme="dark"] .theme-icon-moon { display: none; }
:root[data-theme="dark"] .theme-icon-sun { display: block; }
.qr-stage { background: var(--qr-bg); color-scheme: inherit; border: 1px solid var(--line); }
.qr-stage img { background: var(--qr-image-bg); border-radius: 4px; }
.auth-back { margin-bottom: 12px; }
.user-center { padding-bottom: 0; }
.user-center h3 { font-size: 17px; font-weight: 600; margin-top: 6px; }
.profile-summary { display: flex; align-items: center; gap: 12px; margin-top: 24px; min-width: 0; }
.profile-summary > div { flex: 1; min-width: 0; }
.profile-summary strong { display: block; font-size: 17px; overflow-wrap: anywhere; font-weight: 600; }
.profile-caption { color: var(--quiet); font-size: 10px; margin-bottom: 3px; }
.profile-avatar { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line); background: var(--surface-raised); color: var(--accent); border-radius: 13px; font-weight: 700; flex-shrink: 0; }
.profile-summary .status-badge { flex-shrink: 0; }
.profile-details { margin: 20px 0 0; padding: 16px 0; border-block: 1px solid var(--line-soft); }
.profile-details dt, .client-details dt { color: var(--quiet); font-size: 10px; }
.profile-details dd { margin: 5px 0 0; font-size: 15px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.profile-actions { margin-top: 14px; }
.user-card { margin-top: 24px; padding: 21px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface-raised); }
.user-card .card-heading { gap: 12px; }
.user-card .form-actions { margin-top: 18px; }
.client-details { display: grid; gap: 12px; margin: 18px 0 0; }
.client-details > div { min-width: 0; }
.client-details dd { margin: 4px 0 0; font-size: 12px; color: var(--text); overflow-wrap: anywhere; }
.checksum-label { color: var(--quiet); font-size: 10px; margin-top: 16px; }
.checksum { display: block; margin-top: 5px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--input); color: var(--muted); overflow-wrap: anywhere; word-break: break-all; font-size: 10px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.device-bind-form { margin-top: 19px; }
.device-code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--text); font-size: 12px; overflow-wrap: anywhere; }
.inline-confirm { margin-top: 18px; border: 1px solid var(--confirm-line); border-radius: 12px; padding: 16px; background: var(--confirm-bg); }
.inline-confirm h4 { margin: 0 0 11px; color: var(--text); font-size: 13px; }
.inline-confirm > p { color: var(--muted); font-size: 11px; margin-top: 7px; overflow-wrap: anywhere; }
.inline-confirm .form-actions { gap: 9px; }
.button-danger { background: var(--danger-bg); color: var(--danger-ink); }
.button-danger:hover:not(:disabled) { filter: brightness(.93); }
.user-card[aria-busy="true"] .section-overline { color: var(--accent); }
.field input[readonly] { background: var(--surface-raised); color: var(--muted); }
@media (max-width: 600px) {
  .public-page .header-tag { display: none; }
  .site-header { flex-wrap: wrap; padding-block: 14px; }
  .header-actions { flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
  .header-actions .theme-toggle { min-height: 36px; padding: 7px 10px; font-size: 11px; }
  .admin-page .header-actions { margin-left: auto; }
  .user-card { padding: 17px; margin-top: 20px; border-radius: 12px; }
  .profile-summary { flex-wrap: wrap; gap: 10px; }
  .profile-summary .status-badge { margin-left: 52px; }
  .profile-summary strong { font-size: 16px; }
  .user-center h3 { font-size: 16px; }
  .inline-confirm { padding: 13px; }
  .inline-confirm .button { padding-inline: 12px; font-size: 11px; }
}
