:root {
    color-scheme: dark;
    --bg: #06100f;
    --page-background: radial-gradient(circle at 50% -20%, #153b33 0, var(--bg) 42%);
    --card-background: linear-gradient(145deg, rgba(19, 42, 38, .94), rgba(9, 24, 22, .93));
    --surface: rgba(15, 31, 29, .86);
    --surface-strong: #102522;
    --line: rgba(187, 237, 222, .12);
    --text: #f3faf7;
    --muted: #9db2ac;
    --mint: #52e3b4;
    --mint-bright: #82f2cb;
    --mint-dark: #0f6f58;
    --danger: #ff7f78;
    --amber: #f6c76e;
    --radius: 24px;
    --shadow: 0 24px 70px rgba(0, 0, 0, .28);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="light"] {
    color-scheme: light;
    --bg: #f3f8f5;
    --page-background: radial-gradient(circle at 50% -18%, #d9f3e9 0, #f3f8f5 39%, #f8faf9 100%);
    --card-background: linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(247, 252, 249, .96));
    --surface: rgba(255, 255, 255, .88);
    --surface-strong: #ffffff;
    --line: rgba(31, 92, 72, .14);
    --text: #10251f;
    --muted: #60766f;
    --mint: #0e9f78;
    --mint-bright: #2bc99b;
    --mint-dark: #087055;
    --danger: #d6524c;
    --amber: #b67710;
    --shadow: 0 22px 62px rgba(32, 83, 66, .12), 0 3px 12px rgba(32, 83, 66, .05);
}

* { box-sizing: border-box; }
html { background: var(--bg); min-height: 100%; }
body { margin: 0; min-height: 100vh; color: var(--text); background: var(--page-background); }
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

.ambient { position: fixed; width: 420px; height: 420px; border-radius: 50%; filter: blur(100px); opacity: .12; pointer-events: none; transition: opacity .25s ease; }
.ambient-one { background: #3effc3; top: -230px; left: -180px; }
.ambient-two { background: #28a5ff; right: -290px; top: 38%; }

.shell { width: min(100% - 28px, 840px); margin: 0 auto; padding: max(22px, env(safe-area-inset-top)) 0 max(34px, env(safe-area-inset-bottom)); position: relative; }
.brand-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 4px 24px; }
.header-controls { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none; font-size: 17px; letter-spacing: -.02em; }
.brand strong { color: var(--mint-bright); font-weight: 750; }
.brand-mark { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; gap: 3px; border: 1px solid rgba(82, 227, 180, .26); background: rgba(82, 227, 180, .1); border-radius: 11px; }
.brand-mark i { width: 3px; border-radius: 4px; background: var(--mint); display: block; }
.brand-mark i:nth-child(1), .brand-mark i:nth-child(4) { height: 8px; opacity: .65; }
.brand-mark i:nth-child(2) { height: 18px; }
.brand-mark i:nth-child(3) { height: 13px; }

.connection-badge { display: inline-flex; align-items: center; gap: 7px; height: 31px; padding: 0 11px; border-radius: 999px; background: rgba(82, 227, 180, .08); color: #a8c8be; font-size: 12px; font-weight: 650; border: 1px solid var(--line); }
.connection-badge > span:first-child { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(82, 227, 180, .09); }
.connection-badge.is-offline > span:first-child { background: var(--danger); box-shadow: 0 0 0 4px rgba(255, 127, 120, .09); }
.connection-badge.is-connecting > span:first-child { background: var(--amber); animation: blink 1.2s infinite; }

.theme-toggle { width: 58px; height: 34px; flex: 0 0 58px; padding: 0; border: 0; border-radius: 999px; background: transparent; cursor: pointer; }
.theme-toggle-track { width: 58px; height: 34px; display: block; position: relative; overflow: hidden; border-radius: inherit; border: 1px solid rgba(187, 237, 222, .14); background: rgba(255, 255, 255, .055); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .12); transition: background .25s ease, border-color .25s ease, box-shadow .25s ease; }
.theme-toggle-thumb { position: absolute; z-index: 1; width: 26px; height: 26px; left: 3px; top: 3px; border-radius: 50%; background: #dffaf0; box-shadow: 0 3px 10px rgba(0, 0, 0, .28); transition: transform .28s cubic-bezier(.2, .8, .2, 1), background .25s ease, box-shadow .25s ease; }
.theme-icon { position: absolute; z-index: 2; top: 9px; width: 14px; height: 14px; transition: fill .25s ease, opacity .25s ease; }
.theme-icon-moon { left: 9px; fill: #0b5e49; }
.theme-icon-sun { right: 8px; fill: #788e87; opacity: .55; }
:root[data-theme="light"] .theme-toggle-thumb { transform: translateX(26px); background: #fff8dc; box-shadow: 0 3px 11px rgba(71, 82, 49, .2); }
:root[data-theme="light"] .theme-icon-moon { fill: #71847e; opacity: .55; }
:root[data-theme="light"] .theme-icon-sun { fill: #9a6809; opacity: 1; }
.theme-toggle:hover .theme-toggle-track { border-color: rgba(82, 227, 180, .32); }
.theme-toggle:active .theme-toggle-thumb { transform: scale(.9); }
:root[data-theme="light"] .theme-toggle:active .theme-toggle-thumb { transform: translateX(26px) scale(.9); }
.theme-toggle:focus-visible { outline: 3px solid rgba(130, 242, 203, .38); outline-offset: 3px; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

.status-card, .speaker-card { border: 1px solid var(--line); background: var(--card-background); box-shadow: var(--shadow); border-radius: var(--radius); }
.status-card { padding: 24px; display: flex; align-items: center; gap: 18px; overflow: hidden; position: relative; }
.status-card::after { content: ""; position: absolute; width: 170px; height: 170px; right: -80px; top: -100px; border-radius: 50%; background: var(--mint); filter: blur(55px); opacity: .08; }
.status-icon { flex: 0 0 auto; width: 60px; height: 60px; display: grid; place-items: center; position: relative; border-radius: 19px; background: rgba(82, 227, 180, .1); color: var(--mint); }
.status-icon svg { width: 27px; height: 27px; fill: currentColor; position: relative; }
.status-icon.active { background: rgba(82, 227, 180, .15); }
.status-icon.active .status-pulse { position: absolute; inset: 0; border: 1px solid rgba(82, 227, 180, .48); border-radius: inherit; animation: status-pulse 2s infinite; }
.eyebrow { color: var(--mint); font-size: 10px; line-height: 1; letter-spacing: .15em; font-weight: 800; margin: 0 0 9px; }
h1, h2, p { margin-top: 0; }
h1 { font-size: clamp(22px, 6vw, 30px); line-height: 1.1; letter-spacing: -.035em; margin-bottom: 7px; }
h2 { font-size: clamp(21px, 5.5vw, 27px); line-height: 1.15; letter-spacing: -.03em; margin-bottom: 0; }
.status-card p:last-child { color: var(--muted); font-size: 14px; line-height: 1.5; margin-bottom: 0; }

.speaker-card { margin-top: 16px; padding: 24px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.section-heading.compact { align-items: center; }
.supporting { color: var(--muted); font-size: 14px; line-height: 1.55; margin: 10px 0 19px; }
.supporting.centered { text-align: center; min-height: 22px; margin-bottom: 22px; }
.primary-button, .secondary-button { width: 100%; min-height: 56px; border: 0; border-radius: 16px; font-weight: 760; cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, opacity .2s ease; }
.primary-button { display: flex; align-items: center; justify-content: center; gap: 10px; background: linear-gradient(135deg, var(--mint-bright), var(--mint)); color: #06221a; box-shadow: 0 12px 28px rgba(82, 227, 180, .17); }
.primary-button svg { width: 21px; height: 21px; fill: currentColor; }
.primary-button:active, .secondary-button:active, .language-button:active { transform: scale(.985); }
button:focus-visible, input:focus-visible { outline: 3px solid rgba(130, 242, 203, .35); outline-offset: 2px; }
button:disabled { cursor: not-allowed; opacity: .45; }
.secondary-button { background: rgba(255, 255, 255, .045); border: 1px solid var(--line); color: var(--text); }
.secondary-button.danger { color: #ffc1bd; border-color: rgba(255, 127, 120, .18); margin-top: 23px; }

.speaker-active { text-align: center; }
.speaker-live-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 21px; }
.live-label { display: inline-flex; align-items: center; gap: 7px; color: var(--mint-bright); font-size: 11px; font-weight: 850; letter-spacing: .13em; }
.live-label span { width: 8px; height: 8px; background: var(--mint); border-radius: 50%; animation: blink 1.25s infinite; }
.session-timer { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12px; }
.microphone-visual { width: 76px; height: 76px; display: grid; place-items: center; margin: 0 auto 18px; border-radius: 50%; background: linear-gradient(145deg, rgba(82, 227, 180, .22), rgba(82, 227, 180, .08)); color: var(--mint); position: relative; }
.microphone-visual > svg { width: 33px; height: 33px; fill: currentColor; position: relative; z-index: 2; }
.mic-rings span { position: absolute; inset: -8px; border-radius: 50%; border: 1px solid rgba(82, 227, 180, .2); animation: mic-ring 2.4s infinite; }
.mic-rings span:last-child { animation-delay: 1.2s; }
.meter-wrap { text-align: left; padding: 15px 16px; border: 1px solid var(--line); background: rgba(0, 0, 0, .13); border-radius: 15px; }
.meter-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; margin-bottom: 10px; }
.meter-labels span:last-child { color: var(--mint); font-weight: 700; }
.meter-track { height: 9px; border-radius: 99px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.meter-fill { width: 100%; height: 100%; background: linear-gradient(90deg, #45d9ac 0 65%, var(--amber) 86%, var(--danger)); transform: scaleX(0); transform-origin: left; transition: transform .12s linear; border-radius: inherit; }

.languages-section { padding: 37px 3px 0; }
.listener-total { flex: 0 0 auto; padding: 7px 10px; border-radius: 10px; background: rgba(82, 227, 180, .08); color: #aed1c6; font-size: 11px; border: 1px solid var(--line); }
.inline-notice { display: flex; gap: 10px; align-items: flex-start; padding: 13px 14px; border-radius: 14px; color: #d5c18e; background: rgba(246, 199, 110, .08); border: 1px solid rgba(246, 199, 110, .15); font-size: 12px; line-height: 1.45; margin-bottom: 14px; }
.inline-notice svg { flex: 0 0 18px; width: 18px; height: 18px; fill: var(--amber); margin-top: 1px; }
.now-listening { display: flex; align-items: center; gap: 13px; padding: 14px; background: linear-gradient(110deg, rgba(82, 227, 180, .13), rgba(82, 227, 180, .05)); border: 1px solid rgba(82, 227, 180, .2); border-radius: 16px; margin-bottom: 12px; }
.now-listening > div:nth-child(2) { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.now-listening > div:nth-child(2) span { font-size: 9px; color: var(--mint); font-weight: 800; letter-spacing: .13em; }
.now-listening strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 15px; }
.audio-playback-status { color: var(--muted); font-size: 10px; line-height: 1.3; }
.now-listening-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; }
.now-listening button { border: 0; background: rgba(255, 255, 255, .08); color: #d9e7e2; border-radius: 10px; height: 34px; padding: 0 11px; font-size: 11px; cursor: pointer; }
.now-listening .enable-audio-button { color: var(--mint-bright); background: rgba(82, 227, 180, .12); font-weight: 750; }
.now-listening.audio-paused .now-playing-icon span { animation-play-state: paused; opacity: .35; }
.now-playing-icon { width: 38px; height: 38px; flex: 0 0 auto; border-radius: 12px; background: rgba(82, 227, 180, .13); display: flex; align-items: center; justify-content: center; gap: 3px; }
.now-playing-icon span { width: 3px; background: var(--mint); border-radius: 4px; animation: equalizer .75s ease-in-out infinite alternate; }
.now-playing-icon span:nth-child(1) { height: 9px; }
.now-playing-icon span:nth-child(2) { height: 18px; animation-delay: -.25s; }
.now-playing-icon span:nth-child(3) { height: 13px; animation-delay: -.5s; }
.transcript-panel { margin: 0 0 12px; padding: 14px 16px; min-height: 78px; border-radius: 15px; border: 1px solid var(--line); background: rgba(4, 13, 12, .4); }
.transcript-panel > span { display: block; color: var(--muted); text-transform: uppercase; font-size: 9px; letter-spacing: .13em; font-weight: 800; margin-bottom: 8px; }
.transcript-panel p { margin: 0; color: #dcece7; font-size: 14px; line-height: 1.55; }
.search-box { height: 50px; display: flex; align-items: center; gap: 10px; padding: 0 15px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255, 255, 255, .035); margin: 16px 0 12px; }
.search-box:focus-within { border-color: rgba(82, 227, 180, .38); background: rgba(82, 227, 180, .045); }
.search-box svg { width: 19px; height: 19px; fill: #718b83; }
.search-box input { width: 100%; height: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 14px; }
.search-box input::placeholder { color: #6f837d; }
.search-box input::-webkit-search-cancel-button { filter: invert(1); opacity: .45; }
.language-group { margin-top: 22px; }
.language-group-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 0 3px 11px; }
.language-group-heading h3 { margin: 0 0 4px; font-size: 15px; line-height: 1.2; letter-spacing: -.015em; }
.language-group-heading p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.language-group-heading > span { flex: 0 0 auto; padding: 5px 8px; border-radius: 8px; border: 1px solid rgba(82, 227, 180, .16); background: rgba(82, 227, 180, .07); color: var(--mint); font-size: 9px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.experimental-group { margin-top: 30px; padding-top: 23px; border-top: 1px solid rgba(187, 237, 222, .08); }
.experimental-group .language-group-heading > span { border-color: rgba(246, 199, 110, .15); background: rgba(246, 199, 110, .065); color: var(--amber); }
.experimental-group .language-button { border-color: rgba(187, 237, 222, .085); background: rgba(255, 255, 255, .025); }
.language-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.language-button { min-width: 0; min-height: 67px; display: grid; grid-template-columns: 39px minmax(0, 1fr) auto; align-items: center; gap: 10px; text-align: left; padding: 9px 11px; border-radius: 15px; border: 1px solid var(--line); background: rgba(255, 255, 255, .035); color: var(--text); cursor: pointer; transition: background .18s ease, border-color .18s ease, transform .15s ease; }
.language-button:hover { background: rgba(255, 255, 255, .06); }
.language-button.selected { border-color: rgba(82, 227, 180, .48); background: rgba(82, 227, 180, .1); box-shadow: inset 0 0 0 1px rgba(82, 227, 180, .06); }
.language-code { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 11px; background: rgba(255, 255, 255, .055); color: #b9cec7; font-size: 10px; font-weight: 850; text-transform: uppercase; }
.selected .language-code { color: #09261e; background: var(--mint); }
.language-name { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.language-name strong, .language-name span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.language-name strong { font-size: 12px; font-weight: 720; }
.language-name span { color: var(--muted); font-size: 10px; }
.language-count { min-width: 25px; height: 25px; padding: 0 6px; border-radius: 9px; display: grid; place-items: center; background: rgba(255, 255, 255, .055); color: #9eb5ae; font-size: 10px; font-weight: 750; }
.language-count.stream-active { color: var(--mint); background: rgba(82, 227, 180, .09); }
.empty-search { color: var(--muted); text-align: center; font-size: 13px; padding: 28px 0; }

footer { display: flex; justify-content: center; flex-wrap: wrap; gap: 9px 22px; margin-top: 34px; padding: 20px 4px 0; border-top: 1px solid rgba(187, 237, 222, .08); color: #667d76; font-size: 10px; }
footer span { display: inline-flex; align-items: center; gap: 7px; }
footer i { width: 6px; height: 6px; border-radius: 50%; background: var(--mint-dark); }

.password-dialog { width: min(100% - 28px, 430px); max-height: calc(100vh - 30px); padding: 0; border: 1px solid rgba(187, 237, 222, .17); border-radius: 24px; color: var(--text); background: #10201e; box-shadow: 0 35px 100px rgba(0, 0, 0, .6); }
.password-dialog::backdrop { background: rgba(1, 8, 7, .78); backdrop-filter: blur(8px); }
.password-dialog form { padding: 27px; position: relative; }
.dialog-close { position: absolute; right: 15px; top: 13px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 27px; cursor: pointer; }
.dialog-icon { width: 51px; height: 51px; display: grid; place-items: center; border-radius: 15px; color: var(--mint); background: rgba(82, 227, 180, .1); margin-bottom: 20px; }
.dialog-icon svg { width: 25px; height: 25px; fill: currentColor; }
.password-dialog h2 { margin-bottom: 8px; }
.password-dialog form > p:not(.eyebrow):not(.form-error) { color: var(--muted); font-size: 13px; line-height: 1.5; margin-bottom: 19px; }
.password-dialog label { display: block; color: #c9dad5; font-size: 12px; font-weight: 700; margin-bottom: 7px; }
.password-dialog input { width: 100%; height: 53px; border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; background: rgba(0, 0, 0, .18); color: var(--text); outline: none; margin-bottom: 13px; }
.password-dialog input:focus { border-color: rgba(82, 227, 180, .5); }
.form-error { color: #ffaaa5; font-size: 12px; margin: -2px 0 13px; }
.password-dialog .primary-button { margin-top: 4px; }

.toast-region { position: fixed; z-index: 20; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); width: min(calc(100% - 28px), 470px); transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { padding: 13px 16px; border-radius: 14px; border: 1px solid rgba(187, 237, 222, .17); background: rgba(17, 37, 34, .96); color: #e6f3ef; box-shadow: 0 16px 45px rgba(0, 0, 0, .35); font-size: 12px; line-height: 1.45; animation: toast-in .25s ease both; }
.toast.error { border-color: rgba(255, 127, 120, .27); color: #ffd0cd; }

:root[data-theme="light"] .ambient { opacity: .2; }
:root[data-theme="light"] .ambient-one { background: #8fe6c7; }
:root[data-theme="light"] .ambient-two { background: #9ed8ff; }
:root[data-theme="light"] .brand-mark { border-color: rgba(14, 159, 120, .22); background: rgba(14, 159, 120, .09); }
:root[data-theme="light"] .connection-badge { background: rgba(255, 255, 255, .7); color: #42685d; box-shadow: 0 4px 14px rgba(32, 83, 66, .06); }
:root[data-theme="light"] .connection-badge > span:first-child { box-shadow: 0 0 0 4px rgba(14, 159, 120, .1); }
:root[data-theme="light"] .theme-toggle-track { border-color: rgba(35, 98, 77, .16); background: rgba(255, 255, 255, .82); box-shadow: inset 0 1px 2px rgba(36, 74, 62, .08), 0 4px 14px rgba(32, 83, 66, .07); }
:root[data-theme="light"] .status-card::after { opacity: .12; }
:root[data-theme="light"] .status-icon { background: rgba(14, 159, 120, .1); }
:root[data-theme="light"] .primary-button { color: #05271d; box-shadow: 0 12px 28px rgba(14, 159, 120, .18); }
:root[data-theme="light"] .secondary-button { background: rgba(238, 246, 242, .9); }
:root[data-theme="light"] .secondary-button.danger { color: #b8423d; border-color: rgba(214, 82, 76, .24); }
:root[data-theme="light"] .live-label { color: #08785b; }
:root[data-theme="light"] .meter-wrap { background: rgba(230, 241, 236, .72); }
:root[data-theme="light"] .meter-track { background: rgba(39, 90, 73, .1); }
:root[data-theme="light"] .listener-total { background: rgba(14, 159, 120, .08); color: #326f5d; }
:root[data-theme="light"] .inline-notice { color: #805b11; background: rgba(246, 199, 110, .18); border-color: rgba(182, 119, 16, .2); }
:root[data-theme="light"] .now-listening { background: linear-gradient(110deg, rgba(43, 201, 155, .15), rgba(255, 255, 255, .8)); border-color: rgba(14, 159, 120, .2); }
:root[data-theme="light"] .now-listening button { background: rgba(27, 99, 76, .08); color: #315f51; }
:root[data-theme="light"] .now-listening .enable-audio-button { color: #08785b; background: rgba(14, 159, 120, .12); }
:root[data-theme="light"] .transcript-panel { background: rgba(255, 255, 255, .72); }
:root[data-theme="light"] .transcript-panel p { color: #294b41; }
:root[data-theme="light"] .search-box { background: rgba(255, 255, 255, .78); box-shadow: 0 5px 18px rgba(32, 83, 66, .05); }
:root[data-theme="light"] .search-box:focus-within { border-color: rgba(14, 159, 120, .42); background: #fff; box-shadow: 0 0 0 3px rgba(14, 159, 120, .07); }
:root[data-theme="light"] .search-box svg { fill: #678179; }
:root[data-theme="light"] .search-box input::placeholder { color: #82938e; }
:root[data-theme="light"] .search-box input::-webkit-search-cancel-button { filter: none; }
:root[data-theme="light"] .language-group-heading > span { border-color: rgba(14, 159, 120, .17); background: rgba(14, 159, 120, .075); }
:root[data-theme="light"] .experimental-group { border-top-color: rgba(31, 92, 72, .1); }
:root[data-theme="light"] .experimental-group .language-group-heading > span { border-color: rgba(182, 119, 16, .2); background: rgba(246, 199, 110, .18); }
:root[data-theme="light"] .language-button,
:root[data-theme="light"] .experimental-group .language-button { border-color: rgba(31, 92, 72, .12); background: rgba(255, 255, 255, .75); box-shadow: 0 5px 18px rgba(32, 83, 66, .045); }
:root[data-theme="light"] .language-button:hover { border-color: rgba(14, 159, 120, .24); background: #fff; box-shadow: 0 7px 22px rgba(32, 83, 66, .08); }
:root[data-theme="light"] .language-button.selected { border-color: rgba(14, 159, 120, .5); background: rgba(43, 201, 155, .12); box-shadow: inset 0 0 0 1px rgba(14, 159, 120, .05), 0 7px 22px rgba(32, 83, 66, .07); }
:root[data-theme="light"] .language-code { background: rgba(31, 92, 72, .07); color: #486c61; }
:root[data-theme="light"] .selected .language-code { color: #fff; background: var(--mint); }
:root[data-theme="light"] .language-count { background: rgba(31, 92, 72, .07); color: #5b746d; }
:root[data-theme="light"] .language-count.stream-active { color: #08785b; background: rgba(14, 159, 120, .1); }
:root[data-theme="light"] footer { border-top-color: rgba(31, 92, 72, .1); color: #73847f; }
:root[data-theme="light"] .password-dialog { border-color: rgba(31, 92, 72, .16); background: #fff; box-shadow: 0 35px 100px rgba(25, 64, 51, .24); }
:root[data-theme="light"] .password-dialog::backdrop { background: rgba(22, 48, 40, .42); }
:root[data-theme="light"] .password-dialog label { color: #375a50; }
:root[data-theme="light"] .password-dialog input { background: #f5f9f7; }
:root[data-theme="light"] .form-error { color: #c23f39; }
:root[data-theme="light"] .toast { border-color: rgba(31, 92, 72, .16); background: rgba(255, 255, 255, .97); color: #173a30; box-shadow: 0 16px 45px rgba(25, 64, 51, .16); }
:root[data-theme="light"] .toast.error { border-color: rgba(214, 82, 76, .25); color: #a73631; }

.status-card, .speaker-card, .connection-badge, .search-box, .language-button,
.listener-total, .password-dialog, .toast, footer { transition: color .25s ease, background-color .25s ease, border-color .25s ease, box-shadow .25s ease; }

@media (min-width: 640px) {
    .shell { padding-top: 34px; }
    .status-card, .speaker-card { padding: 29px 31px; }
    .language-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
    .language-button { padding: 10px 12px; }
}

@media (max-width: 380px) {
    .shell { width: min(100% - 20px, 840px); }
    .status-card, .speaker-card { padding: 20px; border-radius: 21px; }
    .status-icon { width: 52px; height: 52px; border-radius: 16px; }
    .language-grid { gap: 7px; }
    .language-button { grid-template-columns: 34px minmax(0, 1fr) auto; gap: 7px; padding: 8px; }
    .language-code { width: 34px; height: 36px; }
    .language-name strong { font-size: 11px; }
}

@media (max-width: 460px) {
    .brand-row { gap: 10px; }
    .header-controls { gap: 7px; }
    .connection-badge { width: 31px; padding: 0; justify-content: center; }
    .connection-badge #connectionText { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes status-pulse { 0% { transform: scale(.9); opacity: .7; } 70%, 100% { transform: scale(1.35); opacity: 0; } }
@keyframes mic-ring { 0% { transform: scale(.8); opacity: .55; } 80%, 100% { transform: scale(1.35); opacity: 0; } }
@keyframes equalizer { from { transform: scaleY(.45); } to { transform: scaleY(1); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
