:root {
  color-scheme: light;
  --paper:#f8f7ef; --white:#fffef8; --ink:#1e3029; --muted:#52675d;
  --accent:#18584d; --accent-hover:#104237; --line:#d7ded3; --deep:#153d31;
  --lime:#e1f0a0; --danger:#962f24; --shadow:0 10px 30px #16352c0b;
  font-family:Inter,system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
  font-size:16px; line-height:1.55; background:var(--paper); color:var(--ink);
}
*,*::before,*::after { box-sizing:border-box }
body { margin:0; min-width:0 }
button,input,select,textarea { font:inherit; color:inherit }
button { cursor:pointer }
button:disabled { cursor:default; opacity:.52 }
a { color:var(--accent); text-underline-offset:.2em }
img,svg { vertical-align:middle }
[hidden] { display:none !important }
:focus-visible { outline:3px solid #287b68; outline-offset:3px }
h1,h2,h3,p { margin:0 }
h1,h2,h3,strong { letter-spacing:-.025em }
h1 { font-size:clamp(2.25rem,4.4vw,4.25rem); line-height:1.04; overflow-wrap:anywhere }
h2 { font-size:clamp(1.5rem,2.6vw,2.35rem); line-height:1.14 }
h3 { font-size:1.16rem; line-height:1.23 }
.skip-link { position:fixed; z-index:20; top:8px; left:8px; transform:translateY(-160%); padding:10px 15px; background:var(--white); border-radius:8px }
.skip-link:focus { transform:none }
.shell { display:grid; grid-template-columns:242px minmax(0,1fr); min-height:100dvh }
.side { background:#eeefe4; border-right:1px solid #dce1d5; padding:29px 18px 20px; display:flex; flex-direction:column; height:100dvh; position:sticky; top:0; min-width:0 }
.logo { color:var(--ink); display:flex; text-decoration:none; align-items:center; gap:10px; font-weight:800; font-size:1.08rem; line-height:1.12; margin:0 0 38px 2px; white-space:nowrap; letter-spacing:-.03em }
.logo img { flex:none }
.logo small { display:block; color:var(--muted); font-size:.58rem; letter-spacing:.095em; margin-top:5px }
.nav { display:grid; gap:7px }
.nav a { color:var(--ink); text-decoration:none; display:flex; align-items:center; gap:11px; padding:11px 12px; border-radius:10px; font-weight:650; min-height:46px; line-height:1.25 }
.nav a:hover { background:#e0e7d9 }
.nav a[aria-current] { color:#16463a; background:#d9e8d7 }
.nav-symbol { font-family:system-ui,sans-serif; flex:none; text-align:center; color:var(--accent); font-size:1.28rem; width:22px; line-height:1 }
.side-footer { margin-top:auto; display:grid; gap:10px; padding:15px 4px 0 }
.connection,.brand-link { color:var(--muted); font-size:.82rem }
.connection:not(:empty)::before { content:""; display:inline-block; height:7px; width:7px; background:#367d63; border-radius:50%; vertical-align:2px; margin-right:6px }
.connection[data-state="offline"]::before { background:#a3681b }
.main { margin:0 auto; width:100%; max-width:1440px; padding:36px clamp(22px,4.2vw,67px) 42px; min-width:0; outline:none }
.hero { position:relative; isolation:isolate; border-radius:26px; background:#194b3d; color:#fffefa; min-height:386px; padding:46px clamp(24px,3.7vw,52px); display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr); align-items:center; gap:34px; overflow:hidden }
.hero-copy { position:relative; z-index:1 }
.eyebrow { font-size:.75rem; font-weight:780; letter-spacing:.1em; color:#256152; line-height:1.3 }
.hero .eyebrow { color:#cadfae }
.hero h1 { margin:14px 0 16px; font-size:clamp(3rem,5vw,5.15rem); max-width:460px; line-height:.98; letter-spacing:-.065em }
.hero-copy>p:not(.eyebrow) { color:#dbe8d9; font-size:1.12rem; line-height:1.52; max-width:425px }
.button-row { display:flex; align-items:center; flex-wrap:wrap; gap:9px }
.hero .button-row { margin-top:26px }
.btn { padding:10px 15px; min-height:44px; max-width:100%; display:inline-flex; gap:8px; align-items:center; justify-content:center; border:1px solid transparent; border-radius:10px; text-decoration:none; font-weight:710; line-height:1.25; text-align:center; overflow-wrap:anywhere }
.btn-primary { background:var(--accent); color:#fff; border-color:var(--accent) }
.btn-primary:not(:disabled):hover { background:var(--accent-hover); border-color:var(--accent-hover) }
.btn-secondary { background:var(--white); color:var(--ink); border-color:var(--line) }
.btn-secondary:not(:disabled):hover,.btn-ghost:not(:disabled):hover { background:#e8efe4; color:var(--ink) }
.btn-ghost { background:transparent; color:var(--accent) }
.btn-danger { background:#f7e5e0; color:var(--danger); border-color:#e9b9ad }
.hero .btn-primary { background:var(--lime); color:#20382d; border-color:var(--lime) }
.hero .btn-primary:hover { background:#f0fabf; border-color:#f0fabf }
.hero .btn-secondary { background:transparent; color:#fffcf4; border-color:#6d9588 }
.hero .btn-secondary:hover { background:#275b4b; color:#fff }
.hero :focus-visible,.projector-body :focus-visible { outline-color:var(--lime) }
.hero-note { margin-top:20px; color:#e0e8d4; font-size:.81rem }
.hero-note span { display:inline-block; background:var(--lime); height:7px; width:7px; border-radius:50%; margin-right:7px; vertical-align:.08em }
.hero-visual { position:relative; min-width:0; min-height:272px; display:flex; align-items:center; justify-content:center }
.hero-orbit { position:absolute; border:1px solid #81aa7d60; width:440px; height:440px; border-radius:50%; z-index:-1; pointer-events:none }
.orbit-two { width:520px;height:520px }
.board-frame { position:relative; width:100%; max-width:395px; transform:rotate(-5deg); border:1px solid #a8bf9f; border-radius:17px; padding:12px; background:#f0f2de; color:#2b5343; box-shadow:0 18px 45px #0f2c2185 }
.board-top { display:flex; gap:6px; justify-content:space-between; align-items:center; font-size:.62rem; letter-spacing:.05em; font-weight:800; padding:1px 1px 9px; white-space:nowrap }
.board-top svg { margin-right:3px }
.board-content { background:#204b3c; color:#fffef5; border-radius:9px; min-height:185px; padding:17px 11px 20px; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center }
.board-content>span { font-size:clamp(1rem,1.7vw,1.42rem); font-weight:750 }
.board-content>strong { font-size:clamp(2.6rem,5vw,5rem); font-weight:800; font-variant-numeric:tabular-nums; line-height:1.12 }
.board-content small { color:#ecf4dc; font-size:clamp(.75rem,1.18vw,.92rem); margin-top:8px }
.board-meter { width:65%; height:5px; border-radius:5px; background:#b3cf96; margin-top:4px }
.hero-stamp { position:absolute; bottom:-12px; right:-7px; transform:rotate(7deg); background:var(--lime); border:1px solid #effdbd; color:#2b4738; display:grid; grid-template-columns:18px minmax(0,1fr); align-items:center; column-gap:5px; padding:9px 12px; box-shadow:0 8px 16px #143c2f50; border-radius:10px; line-height:1.2 }
.hero-stamp span { font-size:.7rem; grid-column:2 }
.section { margin-top:34px }
.section-head { display:flex; align-items:end; justify-content:space-between; flex-wrap:wrap; gap:10px 15px; margin-bottom:17px }
.section-head h2 { margin-top:5px }
.text-link,.back { display:inline-flex; align-items:center; gap:6px; font-weight:690; min-height:34px }
.text-link:hover,.back:hover { color:#0f3428 }
.lesson-grid,.tool-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px }
.lesson-card,.tool-card { text-decoration:none; color:var(--ink); min-width:0 }
.lesson-card { padding:17px 17px 15px; border-radius:15px; border:1px solid #ccdaca; min-height:158px; display:flex; flex-direction:column; align-items:start }
.theme-green { background:#e4edda; border-color:#cadbc4 }
.theme-peach { background:#f5e7db; border-color:#e7d3c4 }
.theme-lilac { background:#eee8f5; border-color:#ddd1ec }
.theme-yellow { background:#f5efd7; border-color:#e8dfaf }
.theme-blue { background:#e3edf0; border-color:#c4d9de }
.lesson-card:hover,.tool-card:hover { box-shadow:var(--shadow); border-color:#789788 }
.card-meta { width:100%; display:flex; justify-content:space-between; align-items:center; gap:5px; color:#375449; font-size:.78rem; font-weight:700 }
.lesson-card>strong { margin-top:12px; font-size:1.24rem; line-height:1.18; overflow-wrap:anywhere }
.lesson-card p,.tool-description { margin-top:7px; font-size:.9rem; color:#40554b; line-height:1.36; overflow-wrap:anywhere }
.card-arrow { margin-top:auto; align-self:end; padding-top:6px; color:var(--accent) }
.tool-card { min-height:88px; padding:13px 12px; border:1px solid var(--line); background:var(--white); border-radius:13px; display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:10px }
.tool-card strong,.tool-description { display:block }
.tool-card strong { font-size:1.04rem; line-height:1.24 }
.tool-card>svg { color:var(--accent) }
.tool-description { font-size:.82rem; margin-top:4px }
.tile-icon { height:41px; width:41px; display:inline-flex; align-items:center; justify-content:center; flex:none; border-radius:11px; color:var(--accent); background:#e2eddf }
.sub-footer { border-top:1px solid var(--line); margin-top:36px; padding-top:15px; color:var(--muted); display:flex; flex-wrap:wrap; justify-content:space-between; gap:6px; font-size:.85rem }
.page-head { margin-bottom:23px; max-width:875px }
.page-head .back { margin-bottom:11px }
.page-head h1 { margin-top:5px }
.lead { color:var(--muted); font-size:1.09rem; margin-top:10px; max-width:670px }
.toolbar { display:flex; justify-content:space-between; flex-wrap:wrap; align-items:end; gap:12px; margin-bottom:16px }
.panel { background:var(--white); border:1px solid var(--line); border-radius:17px; padding:clamp(14px,2.6vw,25px); min-width:0 }
.panel h2:not(.game-question):not(#play-title) { font-size:1.36rem }
label { display:grid; font-weight:660; gap:5px; line-height:1.2; min-width:0 }
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),select,textarea { min-height:44px; padding:9px 11px; background:#fff; border:1px solid #bfcdbf; border-radius:9px; width:100%; max-width:100% }
input[type=checkbox],input[type=range] { accent-color:var(--accent) }
textarea { resize:vertical }
.wide { grid-column:1/-1 }
.notice { background:#e8efe4; color:#224c3a; border:1px solid #d0dfd0; border-radius:9px; padding:8px 11px; margin:0 0 12px; overflow-wrap:anywhere }
.notice.error { background:#f9e8e2; border-color:#edd0c1; color:#7e291e }
.empty { text-align:center; padding-block:40px }
.empty>*+* { margin-top:12px }
.empty p,.prose p { color:var(--muted) }
.prose h2:not(:first-child) { margin-top:22px }
.prose p { margin-top:6px }
.chip { color:#325448; background:#e8efe4; border-radius:99px; padding:4px 10px; font-size:.78rem; line-height:1.3; font-weight:760; white-space:nowrap }
.stage-plan { max-width:850px }
.stage-plan h2 { display:flex; flex-wrap:wrap; align-items:center; gap:9px }
.stage-list { list-style:none; margin:16px 0 0; padding:0 }
.stage-list li { border-top:1px solid var(--line); padding:12px 0; display:grid; grid-template-columns:34px minmax(0,1fr) auto; align-items:start; gap:9px }
.stage-list p { color:var(--muted); margin-top:4px; overflow-wrap:anywhere; white-space:pre-wrap }
.stage-number { height:28px; width:28px; display:inline-grid; place-items:center; border-radius:8px; background:#e9eee3; color:#325447; font-weight:750; font-size:.84rem; flex:none }
.stage-duration { color:var(--muted); font-weight:650; white-space:nowrap }
.delete-plan { margin-top:18px; color:var(--danger) }
.delete-plan summary { cursor:pointer; display:list-item; min-height:44px }
.delete-plan p { margin-bottom:8px }
.editor { max-width:850px }
.editor-basics { display:grid; grid-template-columns:minmax(0,3fr) minmax(135px,1fr); gap:12px }
.editor-stage { margin-top:13px }
.editor-stage-head { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px; margin-bottom:10px }
.action-mini .btn { padding-inline:11px; min-width:44px }
.editor>.button-row { margin-top:16px }
.editor>.notice { margin:12px 0 0 }
.player-grid { display:grid; grid-template-columns:minmax(0,1.65fr) minmax(235px,1fr); align-items:start; gap:15px }
.player-side { display:grid; gap:13px; align-content:start }
.player-head { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:8px; margin-bottom:12px }
.player #play-title { overflow-wrap:anywhere }
.player-copy { color:var(--muted); margin-top:9px; font-size:1.07rem; white-space:pre-wrap; overflow-wrap:anywhere }
.player-time { text-align:center; font-weight:800; font-variant-numeric:tabular-nums; font-size:clamp(3.6rem,9vw,6.6rem); line-height:1; margin:20px 0 7px; letter-spacing:-.065em; color:#225645 }
progress { display:block; border:0; border-radius:10px; overflow:hidden; height:8px; width:100%; appearance:none; background:#e8eee2; accent-color:var(--accent) }
progress::-webkit-progress-bar { background:#e8eee2; border-radius:10px }
progress::-webkit-progress-value { background:var(--accent); border-radius:10px }
progress::-moz-progress-bar { background:var(--accent); border-radius:10px }
.player-actions { margin-top:24px }
.player #timer-reset { margin-top:5px }
.controls-hint { color:var(--muted); font-size:.83rem; margin-top:5px }
.display-panel .tile-icon { margin-bottom:9px }
.player-side p:not(.notice) { margin:7px 0 12px; color:var(--muted); line-height:1.4 }
.plan-mini ol { padding:0; margin:10px 0 0; list-style:none }
.plan-mini li { display:flex; align-items:center; gap:8px; padding:6px; border-radius:8px; overflow-wrap:anywhere }
.plan-mini li[aria-current] { background:#e5efdf; font-weight:720 }
#remote-status { margin:10px 0 0; font-size:.88rem }
#pair-confirm { display:flex; flex-direction:column; align-items:start; gap:4px; margin-top:10px }
#pair-qr { width:196px; max-width:100%; height:auto; border-radius:5px }
.game-symbol { color:var(--accent); font-size:1.35rem }
.game-stage { display:grid; gap:14px; max-width:940px }
.game-stage:fullscreen { border:0; border-radius:0; max-width:none; width:100%; padding:clamp(24px,6vw,80px); align-content:center; overflow:auto }
.game-stage:fullscreen h2 { font-size:clamp(2rem,6vw,5rem) }
.game-stage .game-question { overflow-wrap:anywhere }
.game-copy { font-size:clamp(1.06rem,2.8vw,1.7rem); color:var(--muted) }
.answer-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px }
.btn-answer { background:#eff3e8; border-color:#d8e3d7; color:var(--ink); min-height:58px; font-size:clamp(1rem,2vw,1.25rem) }
.btn-answer:hover:not(:disabled) { background:#dfeedd }
.btn-answer:disabled { opacity:1 }
.btn-answer.is-correct { background:#d2ebc9; border-color:#74aa71 }
.btn-answer.is-wrong { background:#f8e4dc; border-color:#d9a69d }
.game-feedback { padding:9px 11px; background:#e6f0df; color:#255239; border-radius:9px }
.game-feedback.is-wrong { background:#f8ebe1; color:#733c25 }
.game-topic { max-width:270px }
.quiz-score { display:flex; flex-wrap:wrap; gap:7px }
.projector-body { background:#163f35; color:#fffef4; min-height:100dvh }
.projector-screen { min-height:100dvh; display:flex; justify-content:center; flex-direction:column; align-items:center; padding:clamp(22px,6vw,90px) clamp(17px,6vw,120px) 76px; text-align:center; gap:clamp(8px,2.5vh,24px); margin:auto; width:100% }
.projector-screen .eyebrow { color:#d6eab9; font-size:clamp(.73rem,1.5vw,1.35rem) }
.projector-screen h1 { font-size:clamp(2rem,5.1vw,6.4rem); line-height:1.05; max-width:100%; text-wrap:balance }
.screen-time { font-size:clamp(4rem,min(16vw,27vh),17rem); line-height:.95; font-weight:830; font-variant-numeric:tabular-nums; letter-spacing:-.065em }
#screen-clock-wrap { width:min(680px,74vw); margin:4px 0 }
#screen-progress { height:clamp(5px,1.4vh,11px); margin-top:13px; background:#4b6957 }
#screen-progress::-webkit-progress-bar { background:#4b6957 }
#screen-progress::-webkit-progress-value { background:var(--lime) }
#screen-progress::-moz-progress-bar { background:var(--lime) }
.screen-state { color:#e5f3bd; font-weight:700; line-height:1.1; margin-top:8px }
.screen-copy { font-size:clamp(1.1rem,3vw,3.25rem); line-height:1.22; max-width:1130px; overflow-wrap:anywhere; text-wrap:balance; white-space:pre-wrap }
.screen-copy.is-long { font-size:clamp(1rem,2.4vw,2.15rem); text-wrap:wrap; text-align:left }
.screen-list { list-style:none; display:grid; grid-template-columns:repeat(auto-fit,minmax(min(200px,100%),1fr)); width:min(100%,1190px); gap:8px; padding:0; margin:0 }
.screen-list li { padding:6px 11px; border-radius:9px; border:1px solid #648776; font-size:clamp(1.1rem,2.7vw,2.9rem); overflow-wrap:anywhere }
.projector-controls { position:fixed; bottom:8px; right:8px; display:flex; flex-wrap:wrap; justify-content:end; padding:3px; border-radius:12px; gap:5px; background:#163f35 }
.projector-controls .btn-ghost { color:#fffef3 }
:fullscreen .projector-controls:not(:hover):not(:focus-within) { opacity:0 }
@media (max-width:1100px) {
  .shell { grid-template-columns:210px minmax(0,1fr) }
  .side { padding-inline:14px }
  .main { padding-inline:24px }
  .tool-grid { grid-template-columns:repeat(2,minmax(0,1fr)) }
  .hero { gap:24px }
}
@media (max-width:830px) {
  .shell { display:block }
  .side { position:static; height:auto; padding:12px 17px 9px; border-right:0; border-bottom:1px solid var(--line) }
  .logo { margin:0 0 8px; font-size:1rem }
  .logo img { width:36px;height:36px }
  .nav { display:flex; flex-wrap:wrap; gap:3px }
  .nav a { padding:6px 8px; font-size:.84rem; min-height:37px; gap:4px }
  .nav-symbol { width:16px;font-size:1rem }
  .side-footer { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; padding:5px 0 0; gap:3px }
  .brand-link { margin-left:auto }
  .main { padding:24px 17px 34px }
}
@media (max-width:620px) {
  .hero { padding:23px 18px; min-height:unset; grid-template-columns:1fr; gap:14px; border-radius:18px }
  .hero h1 { margin:10px 0; font-size:clamp(2.6rem,10vw,3.85rem); max-width:none }
  .hero-copy>p:not(.eyebrow) { font-size:.98rem }
  .hero .button-row { margin-top:16px }
  .hero-note { margin-top:12px }
  .hero-visual { min-height:177px; margin:0 0 0 9px }
  .board-frame { max-width:275px; padding:8px; transform:rotate(-3deg) }
  .board-content { min-height:130px; padding:9px 10px 16px }
  .board-top { font-size:.55rem }
  .hero-stamp { display:none }
  .section { margin-top:24px }
  .lesson-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px }
  .lesson-card { padding:12px; min-height:136px }
  .lesson-card>strong { font-size:1.07rem; margin-top:8px }
  .lesson-card p { font-size:.82rem }
  .tool-grid { gap:8px; grid-template-columns:1fr }
  .tool-card { min-height:65px }
  .page-head h1 { font-size:2.25rem }
  .lead { font-size:1rem }
  .player-grid { grid-template-columns:1fr }
  .answer-grid { grid-template-columns:1fr }
  .controls-hint { display:none }
}
@media (max-width:370px) {
  .main { padding-inline:12px }
  .lesson-grid { grid-template-columns:1fr }
  .nav a { padding-inline:6px }
  .editor-basics { grid-template-columns:1fr }
  .screen-list { grid-template-columns:1fr }
}
@media print {
  :root { background:#fff; color:#000 }
  .shell { display:block }
  .side,.print-hide,.skip-link,.back,.sub-footer { display:none!important }
  .main { padding:0; max-width:none }
  .panel { background:#fff; border:0; padding:0 }
  .stage-list li { break-inside:avoid }
}
