/* Forge Audio — shared interface foundation. Dark by default, explicit light override. */
:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  --bg: #111214;
  --ambient: #23252b;
  --nav: #17191d;
  --panel: #1b1d21;
  --toolbar: #1e2025;
  --raised: #36393f;
  --field: #16181c;
  --line: #37393f;
  --line-soft: #2c2e34;
  --ink: #f2f2f5;
  --muted: #a2a5ae;
  --accent: #86b5ff;
  --accent-fill: #397feb;
  --accent-ink: #ffffff;
  --selected: #23364f;
  --danger: #ffb2a9;
  --danger-bg: #362328;
  --shadow: 0 18px 50px #00000030;
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f2f2f5;
  --ambient: #ffffff;
  --nav: #f5f5f7;
  --panel: #ffffff;
  --toolbar: #fafafc;
  --raised: #ffffff;
  --field: #eeeff2;
  --line: #dcdde2;
  --line-soft: #e8e8ed;
  --ink: #1d1d20;
  --muted: #696b74;
  --accent: #2b61ae;
  --accent-fill: #336dcc;
  --accent-ink: #ffffff;
  --selected: #e2ecfb;
  --danger: #a93937;
  --danger-bg: #fff0ee;
  --shadow: 0 18px 50px #263c5810;
}
* { box-sizing: border-box; }
.sr-only { position: absolute!important; width: 1px!important; height: 1px!important; padding: 0!important; margin: -1px!important; overflow: hidden!important; clip-path: inset(50%); white-space: nowrap!important; border: 0!important; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); }
button, input, select { font: inherit; }
button, a { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled, input:disabled, select:disabled { opacity: .48; cursor: default; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 600; line-height: 1.2; letter-spacing: -.035em; }
h1 { font-size: 32px; } h2 { font-size: 24px; } h3 { font-size: 16px; }
::selection { background: var(--selected); color: var(--ink); }
label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 8px; }
input, select { width: 100%; min-width: 0; min-height: 44px; border: 1px solid var(--line); border-radius: 9px; background: var(--field); color: var(--ink); padding: 11px 12px; }
input::placeholder { color: var(--muted); }
input[readonly] { color: var(--muted); }
input:invalid:not(:placeholder-shown) { box-shadow: none; }
.topbar { height: 68px; padding: 0 28px; display: flex; align-items: center; gap: 24px; border-bottom: 1px solid var(--line-soft); background: var(--nav); }
.brand { display: inline-flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand-mark { width: 32px; height: 34px; display: grid; place-items: center; color: var(--ink); }
.brand-mark svg { width: 29px; height: 29px; }
.brand-word { font-size: 22px; font-weight: 650; letter-spacing: -.85px; }
.brand-light { color: var(--muted); font-weight: 400; margin-left: 5px; }
.product-label { padding-left: 24px; border-left: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.theme-control { margin: 0 0 0 auto; display: flex; align-items: center; gap: 5px; flex-shrink: 0; color: var(--muted); }
.theme-control>span { font-size: 18px; }
.theme-control select { width: 96px; padding: 8px 7px; border-color: transparent; background: transparent; font-size: 12px; }
.theme-control select:hover { background: var(--raised); }
.theme-control option { background: var(--panel); color: var(--ink); }
.account { display: flex; align-items: center; gap: 11px; font-size: 12px; }
.account-avatar { height: 29px; width: 29px; border-radius: 50%; }
#account-name { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#role-label { font-size: 9px; padding: 3px 6px; }
.logout-icon { width: 19px; height: 19px; display: none; }
.button, .add-device { display: inline-flex; justify-content: center; align-items: center; gap: 9px; border: 1px solid transparent; border-radius: 9px; min-height: 44px; padding: 10px 15px; font-size: 13px; font-weight: 550; transition: background .15s, border-color .15s; }
.button svg { width: 18px; height: 18px; flex-shrink: 0; }
.button.primary { background: var(--accent-fill); color: var(--accent-ink); }
.button.primary:hover:not(:disabled) { background: color-mix(in srgb, var(--accent-fill) 85%, white); }
.button.secondary, .add-device { background: var(--panel); color: var(--ink); border-color: var(--line); }
.button.secondary:hover:not(:disabled), .add-device:hover { background: var(--raised); border-color: var(--muted); }
.button.quiet { background: transparent; color: var(--muted); }
.button.quiet:hover:not(:disabled) { color: var(--ink); background: var(--raised); }
.button.small { padding: 8px 10px; font-size: 12px; }
.button.wide { width: 100%; }
.button.wide>span:last-child:not(:first-child) { margin-left: auto; }
.badge, .count { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 5px; padding: 3px 7px; font-size: 10px; font-weight: 550; color: var(--muted); letter-spacing: .6px; background: var(--raised); }
.caption, .muted { color: var(--muted); font-size: 12px; line-height: 1.7; }
.mini-label, .eyebrow { font-size: 11px; font-weight: 500; letter-spacing: 1.4px; color: var(--muted); }
.surface { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; }
.boot-state { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 100px 24px; color: var(--muted); }
.spinner { width: 17px; height: 17px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.global-message { margin: 12px 28px; }
.status-message { color: var(--ink); background: var(--selected); border: 1px solid var(--line); border-radius: 9px; padding: 12px 14px; font-size: 13px; line-height: 1.65; }
.status-message[data-kind=error] { background: var(--danger-bg); color: var(--danger); border-color: color-mix(in srgb,var(--danger) 40%,var(--line)); }
.status-message[data-kind=success] { background: var(--selected); color: var(--accent); }
.inline-note { color: var(--muted); background: var(--field); border-left: 2px solid var(--accent); border-radius: 0 7px 7px 0; padding: 13px 15px; font-size: 12px; line-height: 1.7; }
.skip-link { position: absolute; top: -90px; left: 16px; z-index: 10; padding: 12px; background: var(--accent-fill); color: var(--accent-ink); border-radius: 8px; }
.skip-link:focus { top: 12px; }
.login-layout { max-width: 1100px; margin: auto; padding: 70px 44px; min-height: calc(100dvh - 112px); display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 90px; }
.login-intro .eyebrow { margin-bottom: 22px; }
.login-intro h1 { font-size: clamp(38px,4.1vw,56px); letter-spacing: -2.4px; line-height: 1.06; }
.login-intro h1>span { color: var(--muted); }
.intro-copy { margin-top: 24px; color: var(--muted); font-size: 15px; line-height: 1.7; }
.login-console { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; padding: 15px; margin-top: 34px; max-width: 405px; border: 1px solid var(--line-soft); border-radius: 19px; background: var(--nav); box-shadow: 0 20px 45px #00000022; }
.login-console dp-fader { width: 100%; height: 290px; --dp-fader-min-track: 45px; }
.login-card { padding: 34px; box-shadow: var(--shadow); }
.login-symbol { display: inline-flex; align-items: center; justify-content: center; height: 52px; width: 52px; border: 1px solid var(--line); background: var(--raised); border-radius: 13px; margin-bottom: 28px; }
.login-card h2 { font-size: 28px; margin-bottom: 12px; }
.login-card>p:not(.caption) { margin-bottom: 26px; color: var(--muted); line-height: 1.7; }
.login-card .button { min-height: 48px; }
.google-g { font-size: 18px; font-weight: 700; }
.login-card .inline-note, .login-card .status-message { margin-top: 16px; }
.demo-login { margin-top: 26px; }.demo-login .button+.button { margin-top: 6px; }
.demo-login .caption { text-align: center; margin-top: 13px; }
.divider-label { display: flex; align-items: center; gap: 12px; font-size: 10px; letter-spacing: 1.3px; color: var(--muted); margin-bottom: 17px; }
.divider-label:before, .divider-label:after { content: ""; height: 1px; background: var(--line); flex: 1; }
.login-foot { border-top: 1px solid var(--line-soft); padding-top: 20px; margin-top: 26px; }
.app-layout { display: grid; grid-template-columns: 216px minmax(0,1fr); min-height: calc(100dvh - 108px); }
.sidebar { border-right: 1px solid var(--line-soft); background: var(--nav); padding: 30px 16px 24px; display: flex; flex-direction: column; gap: 12px; }
.sidebar-heading { display: flex; align-items: center; justify-content: space-between; padding: 0 10px; margin-bottom: 8px; }
.sidebar-heading .mini-label { font-size: 10px; letter-spacing: 1px; }
#device-list { display: grid; gap: 8px; }
.device-item { width: 100%; padding: 13px 12px; background: transparent; border: 1px solid transparent; border-radius: 10px; color: var(--muted); text-align: left; }
.device-item.active { background: var(--selected); border-color: color-mix(in srgb,var(--accent) 22%,var(--line)); color: var(--ink); }
.device-item:hover { background: var(--raised); }
.device-item-title { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 550; }
.device-item-title>span { overflow: hidden; text-overflow: ellipsis; }
.device-item-info { display: block; margin: 5px 0 0 16px; color: var(--muted); font-size: 11px; }
.add-device { font-size: 12px; padding: 8px; margin-top: 3px; }.add-device>span:first-child { font-size: 20px; font-weight: 350; }
.sidebar-bottom { margin-top: auto; padding: 30px 10px 0; display: flex; flex-direction: column; gap: 25px; }
.text-link { color: var(--muted); font-size: 12px; }.text-link:hover { color: var(--ink); }
.sidebar-edition { font-size: 9px; letter-spacing: 1.5px; color: var(--muted); }
#mobile-device-select { display: none; }
.status-dot, .small-dot { width: 6px; height: 6px; background: var(--muted); display: inline-block; border-radius: 50%; flex-shrink: 0; }
.status-dot.online, .live-status.online .status-dot, .small-dot { background: var(--accent); }
.live-status { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.live-status.offline { color: #d9b989; }.live-status.offline .status-dot { background: #d9b989; }
.demo-notice { display: flex; align-items: center; gap: 9px; margin-bottom: 18px; font-size: 12px; color: var(--muted); }
.demo-notice .badge { background: transparent; font-size: 9px; padding: 2px 6px; }
.empty-state { max-width: 490px; min-height: 500px; margin: auto; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.empty-state h1 { font-size: 28px; margin-top: 14px; }.empty-state>p:not(.eyebrow) { margin: 18px 0 26px; color: var(--muted); }
.hairline-figure { --hairline-plate: #101722; --hairline-hi: #edf2f8; --hairline-edge: #c4cfde; --hairline-mid: #a5b2c5; --hairline-lo: #50617a; --hairline-stroke: 1; }
[data-theme="light"] .hairline-figure { --hairline-plate: #e8edf4; --hairline-hi: #536178; --hairline-edge: #293c55; --hairline-mid: #536884; --hairline-lo: #a3b0c4; }
.hairline-figure svg { width: 100%; height: auto; display: block; }
.empty-figure { width: 170px; margin-bottom: 16px; }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 22px; }
.icon-button { background: transparent; color: var(--muted); border: 0; border-radius: 8px; font-size: 26px; width: 44px; height: 44px; }
.icon-button:hover { background: var(--raised); color: var(--ink); }
dialog { background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 30px 100px #00000055; padding: 28px; max-height: 90dvh; overflow-y: auto; }
dialog::backdrop { background: #050911aa; backdrop-filter: blur(7px); }
.pair-dialog { max-width: 480px; width: calc(100% - 32px); }
.pair-dialog>p { color: var(--muted); font-size: 13px; line-height: 1.7; margin: 15px 0 23px; }
.pair-symbol { display: none; }.code-entry { display: flex; gap: 9px; }.code-entry input { min-width: 0; text-transform: uppercase; }
.pair-confirm { border: 1px solid var(--line); border-radius: 12px; background: var(--field); padding: 20px; margin-top: 20px; }.pair-confirm h3 { font-size: 20px; margin: 12px 0; }.pair-confirm p { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }.pair-confirm .button { margin-top: 18px; }.pair-dialog .status-message { margin-top: 15px; }
.visual-credit { display: flex; justify-content: space-between; gap: 16px; padding: 13px 28px; border-top: 1px solid var(--line-soft); font-size: 10px; color: var(--muted); }
/* Setup shares the same controls, colors and rhythm. */
.setup-body .topbar>.badge { margin-left: auto; }.setup-body .theme-control { margin-left: 0; }
.setup-main { max-width: 1060px; padding: 38px 30px 0; margin: auto; }
.setup-heading { display: flex; align-items: center; justify-content: space-between; gap: 25px; margin-bottom: 24px; }.setup-heading .eyebrow { margin-bottom: 16px; }.setup-heading h1 { font-size: 34px; }.setup-heading p:last-child { margin-top: 14px; color: var(--muted); }.setup-figure { width: 195px; }
.step-indicator { list-style: none; display: flex; gap: 30px; padding: 0 0 23px; margin: 24px 0; border-bottom: 1px solid var(--line-soft); }.step-indicator li { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 13px; }.step-indicator li>span { display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid var(--line); border-radius: 50%; font-size: 10px; }.step-indicator .active { color: var(--ink); }.step-indicator .active>span { color: var(--accent); background: var(--selected); border-color: var(--accent); }
.setup-grid { display: grid; grid-template-columns: minmax(0,1.9fr) minmax(245px,1fr); gap: 24px; align-items: start; }
.setup-card { padding: 26px; margin-bottom: 20px; }.card-title { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 24px; }.step-number { font-size: 12px; color: var(--accent); padding-top: 4px; }.card-title h2 { font-size: 21px; }.card-title p { color: var(--muted); font-size: 13px; margin-top: 7px; }
.setup-card label { margin-top: 20px; }.field-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 7px; }.field-heading label { margin: 0; }.setup-card .caption { margin-top: 8px; }.setup-card .primary.wide { margin-top: 24px; }.setup-card .inline-note, .setup-card .status-message { margin-top: 17px; }
.password-field { position: relative; }.password-field input { padding-right: 77px; }.password-field button { position: absolute; right: 1px; top: 0; }
.setup-status { position: sticky; top: 24px; padding: 24px; }.connection-chain { margin-top: 25px; }.chain-node { display: flex; align-items: center; gap: 12px; }.chain-icon { display: grid; place-items: center; height: 34px; width: 34px; flex-shrink: 0; background: var(--raised); border: 1px solid var(--line); color: var(--muted); border-radius: 8px; font-size: 10px; }.chain-node>div { min-width: 0; }.chain-node h3 { font-size: 13px; margin-bottom: 4px; }.chain-node>div>span { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }.chain-node>.status-dot { margin-left: auto; }.chain-line { height: 24px; width: 1px; background: var(--line); margin: 5px 0 5px 17px; }.status-divider { border-top: 1px solid var(--line); margin: 24px 0 18px; }.setup-status .caption+.caption { margin-top: 14px; }.setup-status>.button { margin-top: 18px; }
.setup-footer { display: flex; justify-content: space-between; gap: 20px; padding: 20px 0; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 12px; margin-top: 20px; }
.pairing-methods { display: flex; gap: 22px; align-items: center; margin-top: 24px; }.qr-wrap { width: 160px; flex-shrink: 0; text-align: center; }.qr-wrap img { width: 160px; height: 160px; display: block; background: #fff; padding: 8px; border-radius: 10px; }.pairing-code { min-width: 0; }.pairing-code label { margin-top: 0; }.pairing-code input { font-size: 16px; letter-spacing: 1px; }.copy-row { display: flex; gap: 8px; }.copy-row input { font-size: 12px; }.setup-card>#pair-availability { margin-bottom: 18px; }
@media(max-width:1050px) {
  .topbar { padding: 0 22px; gap: 16px; }.product-label { display: none; }#account-name { max-width: 110px; }
  .login-layout { gap: 40px; padding: 50px 30px; }.login-card { padding: 27px; }.login-intro h1 { font-size: 44px; }
  .app-layout { grid-template-columns: 190px minmax(0,1fr); }.sidebar { padding-left: 12px; padding-right: 12px; }
}
@media(max-width:740px) {
  .topbar { height: 60px; padding: 0 14px; gap: 10px; }.brand { gap: 6px; }.brand-word { font-size: 20px; }.brand-mark { width: 26px; }.brand-mark svg { width: 25px; }.theme-control { gap: 1px; }.theme-control select { width: 81px; padding: 7px 3px; font-size: 12px; }.theme-control>span { display: none; }
  .account { gap: 3px; }#account-name,#role-label { display: none; }.account-avatar { width: 25px; height: 25px; }.logout-label { display: none; }.logout-icon { display: block; }#logout { width: 38px; padding: 6px; }
  .login-layout { display: flex; flex-direction: column; align-items: stretch; gap: 30px; padding: 34px 24px 38px; max-width: 460px; min-height: calc(100dvh - 106px); }.login-intro .eyebrow { margin-bottom: 15px; }.login-intro h1 { font-size: 38px; letter-spacing: -1.6px; }.intro-copy { margin-top: 18px; font-size: 14px; }.login-console { display: none; }.login-card { padding: 26px; }.login-symbol { display: none; }.login-card h2 { font-size: 26px; }.login-card>p:not(.caption) { font-size: 14px; }
  .app-layout { display: block; }.sidebar { display: flex; flex-direction: row; align-items: center; padding: 8px 12px; gap: 8px; border: 0; border-bottom: 1px solid var(--line-soft); }.sidebar-heading,#device-list,.sidebar-bottom { display: none; }#mobile-device-select { display: block; flex: 1; width: 0; background: transparent; border-color: transparent; font-weight: 500; padding-left: 4px; }.sidebar .add-device { width: 44px; height: 44px; flex-shrink: 0; padding: 0; margin: 0; }.add-device-label { display: none; }
  .global-message { margin: 10px 12px; }.demo-notice { font-size: 11px; margin-bottom: 18px; gap: 7px; }.demo-notice .badge { font-size: 8px; }.visual-credit { padding: 12px 16px; font-size: 10px; }.live-status { font-size: 11px; }
  .empty-state { min-height: 450px; padding: 30px 15px; }.empty-state h1 { font-size: 26px; }.empty-figure { width: 130px; }
  dialog { padding: 22px; }.pair-dialog h2 { font-size: 25px; }
  .setup-main { padding: 28px 16px 0; }.setup-body .topbar>.badge { display: none; }.setup-body .theme-control { margin-left: auto; }.setup-heading { gap: 14px; }.setup-heading h1 { font-size: 28px; }.setup-heading p:last-child { font-size: 13px; }.setup-figure { width: 110px; flex-shrink: 0; }.setup-grid { display: flex; flex-direction: column; gap: 0; }.setup-grid>div,.setup-status { width: 100%; }.setup-status { position: static; margin-bottom: 22px; }.setup-card { padding: 22px; }.card-title h2 { font-size: 20px; }.step-indicator { gap: 12px; justify-content: space-between; }.step-indicator li { font-size: 11px; gap: 6px; }.step-indicator li>span { height: 23px; width: 23px; }.setup-footer { flex-direction: column; gap: 8px; font-size: 11px; }.pairing-methods { gap: 15px; }.qr-wrap,.qr-wrap img { width: 130px; }.qr-wrap img { height: 130px; }
}
@media(max-width:360px) { .brand-word { font-size: 18px; }.theme-control select { width: 75px; }.account-avatar { display: none; }.setup-figure { width: 80px; }.step-indicator { gap: 7px; }.step-indicator li { font-size: 10px; } }
@media(prefers-reduced-motion:reduce) { *,*:before,*:after { animation-duration: .01ms!important; transition-duration: .01ms!important; scroll-behavior: auto!important; } }

.checkbox-row { display: flex; align-items: center; gap: 10px; margin-top: 18px; }
.checkbox-row input { width: 18px; min-height: 18px; flex: 0 0 18px; }
.operator-login { margin-bottom: 20px; }
.operator-login label, .admin-section label { margin-top: 14px; }
.operator-login .button { margin-top: 18px; }
.operator-login .caption { margin-top: 10px; }
.admin-dialog { max-width: 620px; }
.admin-section { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 24px; }
.admin-section h3 { font-size: 16px; }
.admin-row { display: flex; align-items: center; gap: 8px; }
.admin-row input { min-width: 0; flex: 1; }
.admin-row .button { flex-shrink: 0; }
.admin-buttons { margin-top: 20px; flex-wrap: wrap; }
#admin-maintenance { margin-top: 24px; }
#admin-maintenance summary { cursor: pointer; font-size: 13px; }
#admin-maintenance p { margin: 12px 0; }
#admin-maintenance pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 11px; line-height: 1.7; padding: 14px; border: 1px solid var(--line); border-radius: 10px; }
@media(max-width:480px){.admin-row{flex-wrap:wrap}.admin-row input{flex-basis:100%}.admin-row .button{width:100%}}
#dsp-results { display: grid; gap: 8px; margin: 14px 0; }
#dsp-form .button { margin-top: 14px; }
