/* Full-viewport light and dark glass surfaces. Text always sits on a calm base. */
html[data-theme]{--page:#fafaf7;--surface:#fff;--surface-glass:rgba(255,255,255,.94);--ink:#17191c;--secondary:#45505a;--accent:#006b70;--line:#b9c5c3;--soft-line:#dce4e1;--glass:linear-gradient(145deg,rgba(255,255,255,.97),rgba(255,255,255,.91));--shadow:0 6px 24px #17202a10,inset 0 1px 0 #fff;--selected:#d5f3ee;--selected-ink:#12383e;--primary:#006b70;--primary-ink:#fff;--success-bg:#e8f6ed;--success-ink:#175c34;--success-line:#2a7c47;--error-bg:#fff0ed;--error-ink:#802921;--error-line:#ad3b31;--disabled:#e8eeeb;--switch-off:#657a7d;--switch-on:#007c7d;color-scheme:light;color:var(--ink);background:var(--page)}
html[data-theme=dark]{--page:#0b141a;--surface:#17262f;--surface-glass:rgba(23,38,47,.96);--ink:#f1f6f8;--secondary:#c1d0d8;--accent:#88eee4;--line:#718994;--soft-line:#3b535f;--glass:linear-gradient(145deg,rgba(30,48,59,.97),rgba(22,38,48,.96));--shadow:0 8px 26px #0004,inset 0 1px 0 #ffffff18;--selected:#214d50;--selected-ink:#e2fffb;--primary:#88eee4;--primary-ink:#082e30;--success-bg:#153c2c;--success-ink:#c0f5d2;--success-line:#74c693;--error-bg:#492a30;--error-ink:#ffdad5;--error-line:#e89b93;--disabled:#263b46;--switch-off:#738b96;--switch-on:#54bdb6;color-scheme:dark}
html[data-theme].high-contrast{--ink:#000;--secondary:#20252a;--line:#687672;--glass:#fff;--surface-glass:#fff}
html[data-theme=dark].high-contrast{--ink:#fff;--secondary:#e4eef2;--line:#b8c9d1;--glass:#14252f;--surface-glass:#14252f}
html[data-theme],html[data-theme] body{min-height:100%;min-height:100dvh;background:var(--page);color:var(--ink)}
html[data-theme] body{overscroll-behavior-y:none}
html[data-theme] .app-shell,html[data-theme] .app-shell:not(.call),html[data-theme] .app-shell.call{background:var(--page);background-image:none;color:var(--ink);min-height:100dvh}
html[data-theme] .screen.call{background:var(--page);color:var(--ink)}
html[data-theme] .app-shell.call::before{background:var(--page)}
html[data-theme] .glass,html[data-theme] .button,html[data-theme] .icon-button,html[data-theme] .chip,html[data-theme] .token,html[data-theme] .chat-bubble,html[data-theme] .boot-fallback,html[data-theme] .booking-done .hero{background:var(--glass);color:var(--ink);border-color:var(--soft-line);box-shadow:var(--shadow)}
html[data-theme] .glass,html[data-theme] .bottom-nav{backdrop-filter:blur(20px) saturate(125%);-webkit-backdrop-filter:blur(20px) saturate(125%)}
html[data-theme] .screen .primary,html[data-theme] .nav-item.plus{background:var(--primary);color:var(--primary-ink);border-color:var(--primary);box-shadow:inset 0 1px 0 #ffffff30,0 5px 18px #006b701a}
html[data-theme] .screen .input,html[data-theme] .screen select,html[data-theme] .screen textarea,html[data-theme] .screen input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]){background:var(--surface);color:var(--ink);border-color:var(--line)}
html[data-theme] input::placeholder,html[data-theme] textarea::placeholder{color:var(--secondary);opacity:1}
html[data-theme] .screen .notice,html[data-theme] .footer-note,html[data-theme] .message-reply-preview,html[data-theme] .message-reply-composer{background:var(--surface-glass);color:var(--secondary);border-color:var(--soft-line)}
html[data-theme] .screen small,html[data-theme] .screen .small,html[data-theme] .muted,html[data-theme] .demo-label,html[data-theme] .auth-divider,html[data-theme] .call small,html[data-theme] .call .muted{color:var(--secondary)}
html[data-theme] .screen .eyebrow,html[data-theme] .call .eyebrow{color:var(--accent)}
html[data-theme] .bottom-nav{background:var(--surface-glass);color:var(--ink);border-color:var(--line);box-shadow:var(--shadow)}
html[data-theme] .nav-item{color:var(--secondary)}
html[data-theme] .nav-item[aria-current=page]{color:var(--accent)}
html[data-theme] .nav-item[aria-current=page]::after{background:var(--accent)}
html[data-theme] .chip[aria-pressed=true],html[data-theme] .selected,html[data-theme] .token.start,html[data-theme] .chat-bubble.self{background:var(--selected);color:var(--selected-ink);border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}
html[data-theme] .screen .button:disabled,html[data-theme] .chip:disabled{background:var(--disabled);color:var(--secondary);border-color:var(--line);opacity:1;box-shadow:none}
html[data-theme] .screen .success-text,html[data-theme] .screen .answer-correct,html[data-theme] .answer-feedback.is-correct{background:var(--success-bg);color:var(--success-ink);border-color:var(--success-line)}
html[data-theme] .screen .error-text,html[data-theme] .screen .answer-wrong,html[data-theme] .answer-feedback.is-wrong{background:var(--error-bg);color:var(--error-ink);border-color:var(--error-line)}
html[data-theme] .screen .danger,html[data-theme] .call .button.danger{background:var(--error-bg);color:var(--error-ink);border-color:var(--error-line)}
html[data-theme] .communication-call{background:var(--page);color:var(--ink)}
html[data-theme] .speech-tag,html[data-theme] .scene-label{background:var(--surface-glass);color:var(--secondary);border-color:var(--line)}
html[data-theme] .avatar{background:var(--selected);color:var(--selected-ink);border-color:var(--line)}
html[data-theme] .skip,html[data-theme] .toast{background:var(--surface);color:var(--ink);border:1px solid var(--line);box-shadow:var(--shadow)}
html[data-theme] .switch-row input{background:var(--switch-off)}
html[data-theme] .switch-row input:checked{background:var(--switch-on)}
html[data-theme] input[type=checkbox],html[data-theme] input[type=radio],html[data-theme] input[type=range]{accent-color:var(--accent)}
html[data-theme] .google-signin{background:#fff;color:#1f1f1f;border-color:var(--line)}
html[data-theme] .google-signin span{color:#1f1f1f}
html[data-theme] .apple-signin{background:#000;outline:1px solid var(--line);outline-offset:-1px}
html[data-theme] .appearance-options{border:1px solid var(--line);border-radius:20px;padding:16px;min-width:0;display:grid;gap:12px;background:var(--glass)}
html[data-theme] .appearance-options legend{padding:0 6px;font-weight:700}
html[data-theme] .appearance-options .chips{gap:10px}
html[data-theme] .appearance-options .chip{flex:1 1 120px;min-height:54px;font-size:1rem}
html[data-theme] button:focus-visible,html[data-theme] a:focus-visible,html[data-theme] input:focus-visible,html[data-theme] select:focus-visible,html[data-theme] textarea:focus-visible{outline:3px solid var(--accent);outline-offset:4px}
html[data-theme] hr,html[data-theme] fieldset{border-color:var(--soft-line)}
html[data-theme] ::selection{background:var(--selected);color:var(--selected-ink)}
@media(prefers-reduced-transparency:reduce){html[data-theme] .glass,html[data-theme] .button,html[data-theme] .bottom-nav,html[data-theme] .chip,html[data-theme] .icon-button{background:var(--surface);backdrop-filter:none;-webkit-backdrop-filter:none}}
@media(forced-colors:active){html[data-theme] .glass,html[data-theme] .button,html[data-theme] .chip,html[data-theme] .bottom-nav{box-shadow:none;border:1px solid CanvasText}html[data-theme] .chip[aria-pressed=true]{outline:2px solid Highlight}}
html[data-theme] .screen.post-detail .two-title small{background:var(--surface);color:var(--secondary)}

/* Keep final cards and focused controls above the fixed navigation, including large text. */
.has-nav .screen{padding-bottom:calc(var(--navigation-clearance,160px) + env(safe-area-inset-bottom));scroll-padding-bottom:calc(var(--navigation-clearance,160px) + env(safe-area-inset-bottom))}
.has-nav .screen :is(input,button,a,textarea,summary){scroll-margin-bottom:calc(var(--navigation-clearance,160px) + env(safe-area-inset-bottom))}
.app-update{position:fixed;z-index:1000;top:calc(12px + env(safe-area-inset-top));left:50%;transform:translateX(-50%);max-width:calc(100% - 24px)}

.availability-badge{display:inline-block;font-size:.7em;font-weight:500;padding:3px 7px;border:1px solid var(--line);border-radius:12px;color:var(--secondary);vertical-align:middle}.learning-language{margin-top:0}.learning-language a{text-underline-offset:3px}
