/* Shared surfaces and colors for the complete application. */
:root{color-scheme:light;--bg:#f3f7f6;--panel:#fff;--surface:#fff;--input:#f6f8f8;--line:#dce5e2;--text:#223b35;--muted:#61736d;--accent:#24745e;--accent2:#8173b5;--soft-accent:#e7f1ec;--overlay:rgba(30,50,42,.3);--on-accent:#fff;--shadow:0 16px 48px rgba(44,77,64,.06);--error:#b33042}
html[data-theme="white"]{--bg:#fafcfb;--input:#f7f9f8}
html[data-theme="dark"]{color-scheme:dark;--bg:#101916;--panel:#18241f;--surface:#18241f;--input:#121d18;--line:#30443a;--text:#edf5ef;--muted:#a3b7aa;--accent:#99d5b7;--accent2:#b4a7dc;--soft-accent:#223b2e;--overlay:rgba(4,12,8,.7);--on-accent:#10251a;--shadow:0 16px 48px rgba(0,0,0,.15);--error:#ff9da9}
body{background:radial-gradient(ellipse at 12% 0,var(--soft-accent),transparent 55%),var(--bg)}
.ambient{opacity:.035}
.shell{padding-top:44px}
.hero{margin-bottom:28px}.hero h1{font-size:clamp(2.2rem,4vw,3.6rem);line-height:1.08}.intro{font-size:.96rem;line-height:1.6}
.controls,.day,.day-nav,.live,.account-card,.admin-head,.admin-panel,.admin-stats article,.status.visible{background:var(--surface);border-color:var(--line);box-shadow:var(--shadow)}
.controls{border-radius:18px;backdrop-filter:none}.day{border-radius:18px}.live{border-radius:12px}.live>span{width:7px;height:7px;box-shadow:none}
.account-card{border-radius:20px}.account-dialog-backdrop,.menu-backdrop{background:var(--overlay)}
.auth-card input,.auth-card select,.account-card input,.account-card select,.segmented,select{background-color:var(--input);color:var(--text)}
.account-button,.account-card .notify-option,.day>header span{background:var(--soft-accent);border-color:var(--line)}
.primary-button,.segmented button.active,.admin-list button{color:var(--on-accent)}
.logout-button,.menu-button,.day-nav button,.menu-title>button,.account-card-head>button{background:var(--input);color:var(--text);border-color:var(--line)}
.control-block label,.account-card label{font-size:.78rem;text-transform:none;letter-spacing:0}
.account-card input:focus,.account-card select:focus{box-shadow:0 0 0 3px var(--soft-accent);transform:none}
button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.lesson{padding:13px 10px;border-radius:10px}.lesson strong{line-height:1.4}.lesson small{color:var(--muted);line-height:1.4}.lesson .number{background:var(--surface);color:var(--text)}
.lesson.empty{color:var(--muted);background:var(--input)}
html:not([data-theme="dark"]) .tone-0{background:#e6f2eb;border-color:#d0e5d8}
html:not([data-theme="dark"]) .tone-1{background:#efecf7;border-color:#ded8ed}
html:not([data-theme="dark"]) .tone-2{background:#f7eee5;border-color:#ebdccb}
html:not([data-theme="dark"]) .tone-3{background:#e8f1f7;border-color:#d2e2ed}
html:not([data-theme="dark"]) .tone-4{background:#f5eaf2;border-color:#e8d6e3}
html:not([data-theme="dark"]) .tone-5{background:#f0f3e5;border-color:#dfe5ca}
html:not([data-theme="dark"]) .lesson.cancelled{background:#fae8eb;border-color:#cc6476;opacity:1}
html:not([data-theme="dark"]) .lesson.changed{background:#fff5df;border-color:#be8d31}
.auth-error,.status.error{color:var(--error)}.auth-error.success{color:var(--accent)}
.day-nav i{background:var(--line)}.day-nav i.active{background:var(--accent)}
.setup-complete{background:radial-gradient(ellipse at 50% 30%,var(--soft-accent),transparent 60%),var(--bg)}.setup-logo{color:var(--accent)}.setup-complete p{color:var(--muted)}.setup-progress{background:var(--line)}.setup-logo i{animation:setupPulse 3s ease-in-out infinite}.setup-complete.visible:before,.setup-complete.visible:after{opacity:.2;animation-duration:18s}
html,body,.account-card,.controls,.day,.day-nav,input,select,button{transition:background-color .25s ease,color .25s ease,border-color .25s ease,box-shadow .25s ease}
.account-card{transition:transform .22s ease}.controls{transition:transform .28s ease}.lesson,footer,.live{animation:none}
body>.auth-particles i{animation-play-state:running}body.auth-open>.auth-particles{display:none}.shell{z-index:1}
@media(max-width:820px){body{background:var(--bg)}.shell{width:min(100% - 32px,680px);padding-top:calc(24px + env(safe-area-inset-top, 0px))}.hero{margin-bottom:20px}.hero h1{font-size:2rem}.controls{padding:22px 20px;border-radius:20px 0 0 20px}.controls .menu-title,.account-card-head{background:var(--surface)!important}.day-nav{padding:8px;border-radius:14px;box-shadow:none}.day{border-radius:14px;box-shadow:none}.lessons{padding:8px}.lesson{padding:13px 10px;margin-bottom:8px}.live{padding:11px 14px;box-shadow:none}.account-card{box-shadow:var(--shadow)}.account-card-head{padding-bottom:14px}.account-card form{gap:14px}.account-card input,.account-card select{min-height:48px}.account-card .notify-option input{min-height:20px}.status.visible{background:var(--surface);box-shadow:var(--shadow)}footer{line-height:1.6}.admin-head,.admin-panel{padding:20px;border-radius:16px}}
@media(prefers-reduced-motion:reduce){html,body,body *,body *:before,body *:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

.setup-logo img{display:block;width:112px;height:112px;border-radius:26px}

.lesson:has(>.lesson-time){padding-right:82px}.lesson>.lesson-time{position:absolute;right:10px;top:50%;transform:translateY(-50%);margin:0;font-size:.64rem;font-weight:400;line-height:1.2;letter-spacing:0;font-variant-numeric:tabular-nums;color:var(--muted);white-space:nowrap;pointer-events:none}.current-pause{margin:3px 0 8px;padding:7px 10px;border-radius:8px;background:var(--soft-accent);color:var(--accent);font-size:.68rem;line-height:1.3;text-align:center;font-variant-numeric:tabular-nums}

html:not([data-theme="dark"]) .lesson.tone-0.is-current{background:#c8e4d3;border-color:#37835d;box-shadow:inset 0 0 0 1px #37835d}
html:not([data-theme="dark"]) .lesson.tone-1.is-current{background:#dbd3ee;border-color:#8160ad;box-shadow:inset 0 0 0 1px #8160ad}
html:not([data-theme="dark"]) .lesson.tone-2.is-current{background:#edd5bd;border-color:#ad763f;box-shadow:inset 0 0 0 1px #ad763f}
html:not([data-theme="dark"]) .lesson.tone-3.is-current{background:#cbdfea;border-color:#477f9e;box-shadow:inset 0 0 0 1px #477f9e}
html:not([data-theme="dark"]) .lesson.tone-4.is-current{background:#e8cce0;border-color:#a46291;box-shadow:inset 0 0 0 1px #a46291}
html:not([data-theme="dark"]) .lesson.tone-5.is-current{background:#dce5be;border-color:#7d913b;box-shadow:inset 0 0 0 1px #7d913b}
html[data-theme="dark"] .lesson.tone-0.is-current{background:#245047;border-color:#70bf98;box-shadow:inset 0 0 0 1px #70bf98}
html[data-theme="dark"] .lesson.tone-1.is-current{background:#3c365c;border-color:#b29adc;box-shadow:inset 0 0 0 1px #b29adc}
html[data-theme="dark"] .lesson.tone-2.is-current{background:#563d2d;border-color:#d5a06a;box-shadow:inset 0 0 0 1px #d5a06a}
html[data-theme="dark"] .lesson.tone-3.is-current{background:#26475e;border-color:#7db5d4;box-shadow:inset 0 0 0 1px #7db5d4}
html[data-theme="dark"] .lesson.tone-4.is-current{background:#503350;border-color:#ce91bb;box-shadow:inset 0 0 0 1px #ce91bb}
html[data-theme="dark"] .lesson.tone-5.is-current{background:#45502c;border-color:#b0c573;box-shadow:inset 0 0 0 1px #b0c573}

.plan-footer{align-items:center;gap:14px}.plan-footer #syncText{font-size:.68rem;color:var(--muted);line-height:1.5}.plan-footer .footer-links{flex-direction:row;align-items:center;gap:16px;flex-wrap:wrap;font-size:.72rem}#inviteFriendButton{border:1px solid var(--line);border-radius:9px;padding:8px 12px;background:var(--surface);color:var(--accent);font:inherit;cursor:pointer}#inviteDialog{width:min(420px,calc(100% - 32px));max-height:calc(100dvh - 32px);overflow:auto;padding:24px;border:1px solid var(--line);border-radius:20px;background:var(--surface);color:var(--text);box-shadow:var(--shadow)}#inviteDialog::backdrop{background:var(--overlay)}#inviteDialog h2{font-size:1.4rem}#inviteDialog p{font-size:.82rem;line-height:1.6;color:var(--muted)}#inviteDialog label{display:flex;flex-direction:column;gap:8px;font-size:.8rem}#inviteEmail{width:100%;margin-bottom:16px;padding:12px;border:1px solid var(--line);border-radius:10px;background:var(--input);color:var(--text);font:inherit;font-size:1rem}#inviteStatus:empty{display:none}@media(max-width:820px){.plan-footer{align-items:flex-start}}

.test-notice-copy{font-size:.78rem;line-height:1.65;color:var(--muted)}.test-notice-copy p{margin:0 0 14px}.test-notice-copy strong{color:var(--text)}.test-source{font-size:.76rem;line-height:1.5;color:var(--accent)}.auth-card label.test-ack{display:flex;flex-direction:row;align-items:flex-start;gap:10px;font-size:.78rem;line-height:1.6;text-transform:none;letter-spacing:0}.auth-card .test-ack input{flex:0 0 20px;width:20px;height:20px;min-height:20px;margin-top:3px;padding:0;accent-color:var(--accent)}

.auth-gate:has([data-register-step="6"].active){align-items:flex-start}
.test-notice-details{margin:4px 0 14px;border:1px solid var(--line);border-radius:12px;background:var(--input);overflow:hidden}.test-notice-details summary{padding:12px 14px;color:var(--accent);font-size:.78rem;font-weight:700;cursor:pointer;list-style:none}.test-notice-details summary::-webkit-details-marker{display:none}.test-notice-details summary::after{content:'＋';float:right;font-size:1rem}.test-notice-details[open] summary::after{content:'−'}.test-notice-details .test-notice-copy{padding:0 14px 2px}
