.screen { display: none; }
.screen.on { display: block; }
#sLive.on { display: block; position: fixed; inset: 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.lcard { background: #fbf6e8; border: 3px solid var(--stone3); border-radius: 16px; padding: 12px 14px; text-align: left; display: block; width: 100%; }
button.lcard { cursor: pointer; }
button.lcard:hover { border-color: var(--forest); }
.lcard .nm { font-size: 22px; font-weight: 700; }
.lcard .meta { color: var(--ink-soft); font-size: 15px; margin-top: 2px; }
.lcard.sel { border-color: var(--forest); background: #dff0d6; }
.tabs .btn { min-width: 150px; }

/* curriculum map */
.unit { margin-bottom: 10px; }
.unit-head { width: 100%; text-align: left; display: flex; gap: 12px; align-items: center; background: var(--stone); border: 3px solid var(--stone3); border-radius: 16px; padding: 12px 16px; font-size: 19px; font-weight: 700; }
.unit-head .num { width: 42px; height: 42px; border-radius: 50%; background: var(--forest2); color: var(--bone); display: grid; place-items: center; flex: none; }
.unit-body { display: none; padding: 10px 6px 4px; }
.unit.open .unit-body { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.unit.open .unit-head { background: #fbf6e8; }
.lrow { background: var(--bone); border: 3px solid var(--stone3); border-radius: 14px; padding: 10px 12px; text-align: left; display: flex; gap: 10px; align-items: center; min-height: 52px; }
.lrow:hover { border-color: var(--forest); }
.lrow .ln { font-weight: 700; min-width: 38px; }
.lrow.rec { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(232,163,23,.4); }
.lrow.done .ln::after { content: " ✓"; color: var(--good); }
.lrow.disabled { opacity: .55; cursor: not-allowed; }
div.lrow { cursor: pointer; }
.lrow.skipped { background: #efe9d8; border-style: dashed; }
.lrow.skipped .ln::after { content: " ⤼"; color: var(--ink-soft); }
.lrow .lskip { flex: none; min-height: 34px; padding: 2px 10px; font-size: 14px; }
.unit-tools { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 2px 4px 4px; font-size: 15px; color: var(--bone); }
.unit-tools .muted { color: inherit; opacity: .85; }
.muted-dark { opacity: .85; }

/* progress: class table + one student's record */
.progwrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.progtable { border-collapse: collapse; width: 100%; font-size: 16px; }
.progtable th, .progtable td { padding: 7px 8px; border-bottom: 2px solid var(--stone2); text-align: center; white-space: nowrap; }
.progtable th { font-size: 14px; color: var(--ink-soft); }
.progtable td.nm, .progtable th:first-child { text-align: left; font-weight: 700; font-size: 18px; }
.progtable tbody tr { cursor: pointer; }
.progtable tbody tr:hover td { background: #fbf6e8; }
.uchip { display: inline-block; min-width: 46px; padding: 3px 6px; border-radius: 9px; border: 2px solid var(--stone3); background: var(--bone); font-weight: 700; font-size: 14px; }
.uchip.none { color: var(--ink-soft); background: transparent; border-color: transparent; }
.uchip.going { background: #fff0cf; border-color: var(--amber); }
.uchip.ready { background: #e6f3dc; border-color: var(--good); }
.uchip.skipped { background: #efe9d8; border-style: dashed; color: var(--ink-soft); }
.uchip.mastered { background: var(--good); border-color: #0f4a22; color: #fff; }
.unit.open .unit-body.prog { display: block; background: var(--bone); border: 3px solid var(--stone3); border-radius: 16px; padding: 10px 12px; margin: 6px 0 4px; }
.unit-body.prog .unit-tools { color: var(--ink); } .unit-body.prog .unit-tools .muted { color: var(--ink-soft); opacity: 1; }
.progless td { font-size: 16px; }
.progless td.ln { font-weight: 700; white-space: nowrap; }
.progless td.act { text-align: right; white-space: nowrap; }
.progless tr.arow td { background: #f3ecd9; }
.badge.skipped { background: #efe9d8; border-color: var(--stone3); color: var(--ink-soft); }
.statrow .bigstat small { font-size: 14px; color: var(--ink-soft); display: block; }

/* lobby */
.lobby-top { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.bigcode { font-size: clamp(54px, 10vw, 92px); letter-spacing: 12px; font-weight: 700; color: var(--forest); line-height: 1.1; }
.qr { background: #fff; padding: 10px; border-radius: 12px; border: 3px solid var(--stone3); width: 190px; height: 190px; display: grid; place-items: center; }
.seatcard .state { font-weight: 700; margin-top: 6px; }
.dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; margin-right: 6px; background: #b9b2a0; vertical-align: -1px; }
.dot.on { background: #2fb04f; }
.dot.off { background: #d0462e; }

/* ---------- live lesson: private teacher panel + the work area ---------- */
.live { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(310px, 400px) 1fr; gap: 12px; padding: 10px; padding-top: 10px; }
.pri { background: var(--stone); border: 3px solid var(--stone3); border-radius: 22px; display: flex; flex-direction: column; min-height: 0; overflow: hidden; margin-top: var(--zb-home-top); box-shadow: 0 8px 0 rgba(0,0,0,.22); }
.pri-head { display: flex; gap: 8px; align-items: center; padding: 10px 12px; background: #dfd0aa; border-bottom: 3px solid var(--stone3); }
.pri-title { font-weight: 700; font-size: 18px; line-height: 1.15; }
.pri-sub { font-size: 14px; color: var(--ink-soft); }
.banner { background: var(--amber); color: #2b1a00; font-weight: 700; padding: 8px 14px; text-align: center; letter-spacing: .5px; }
.banner.notice { background: #fff0cf; border-bottom: 2px solid var(--warn); font-weight: 400; text-align: left; font-size: 14px; }
.pri-body { flex: 1 1 auto; overflow-y: auto; padding: 14px; -webkit-overflow-scrolling: touch; }
.pri-foot { padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); border-top: 3px solid var(--stone3); background: #e8dcbc; display: grid; gap: 8px; }
.prompt { font-size: 26px; font-weight: 700; line-height: 1.25; }
.prompt .wd { display: block; font-size: 54px; color: var(--forest); margin: 4px 0 2px; }
.stepno { font-size: 15px; color: var(--ink-soft); margin-bottom: 6px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; }
.script { margin: 10px 0 0; padding-left: 20px; font-size: 17px; }
.script li { margin-bottom: 7px; }
.rulebox { background: #fbf6e8; border: 2px solid var(--stone3); border-radius: 12px; padding: 8px 12px; margin-bottom: 10px; font-size: 17px; }
.demo-word { font-size: 56px; font-weight: 700; color: var(--forest); }
.foot-row { display: flex; gap: 8px; }
.foot-row .btn { flex: 1 1 0; }
.mark-btn { min-height: 52px; }
.mark-btn.sel { box-shadow: 0 0 0 4px var(--forest); }
.work { display: flex; flex-direction: column; min-height: 0; margin-top: var(--zb-home-top); padding-right: 0; }
.seat-strip { display: flex; gap: 8px; flex-wrap: wrap; color: var(--bone); padding: 0 4px 6px; min-height: 32px; align-items: center; }
.seat-strip .chip { background: rgba(0,0,0,.28); border-radius: 999px; padding: 3px 12px; font-weight: 700; font-size: 15px; }
.work-main { flex: 1 1 auto; min-height: 0; position: relative; }
.work > .tools { padding: 8px 0 2px; }
.grid4 { display: grid; gap: 12px; height: 100%; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; }
.grid4.one { grid-template-columns: 1fr; }
.grid4.two { grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; }
.minicard { background: rgba(251,246,232,.12); border: 3px solid rgba(251,246,232,.35); border-radius: 18px; display: flex; flex-direction: column; min-height: 0; padding: 6px; position: relative; }
.minicard .mc-head { display: flex; align-items: center; gap: 6px; color: var(--bone); font-weight: 700; padding: 0 4px 4px; flex-wrap: wrap; }
.minicard .mc-board { flex: 1 1 auto; min-height: 0; cursor: pointer; }
.minicard.ovr { border-color: #a99cff; }
.minicard.absent { opacity: .5; }
.big-one { height: 100%; display: flex; flex-direction: column; }
.big-one .bo-board { flex: 1 1 auto; min-height: 0; }
.demo-area { height: 100%; display: flex; flex-direction: column; gap: 6px; }
.demo-area .da-board { flex: 1 1 auto; min-height: 0; }
.bigtile-demo { margin: auto; text-align: center; color: var(--bone); }
.bigtile-demo .tile { display: inline-grid; place-items: center; width: min(40vh, 300px); height: min(40vh, 300px); border-radius: 40px; background: linear-gradient(#fbf4de, #e7d9b2); border: 8px solid #8a7650; box-shadow: 0 12px 0 #6f5d3a; font-size: min(26vh, 200px); font-weight: 700; color: #1b2b1d; cursor: pointer; }

/* modal */
.modal { position: fixed; inset: 0; background: rgba(5,20,12,.7); z-index: 80; display: grid; place-items: center; padding: 14px; }
.modal-box { background: var(--stone); border: 4px solid var(--stone3); border-radius: 22px; padding: 18px 20px; width: min(760px, 96vw); max-height: 92vh; overflow: auto; }
.modal-box.wide { width: min(1000px, 98vw); }
.modal .mbtn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.sumtable { width: 100%; border-collapse: collapse; }
.sumtable td, .sumtable th { padding: 6px 8px; border-bottom: 2px solid var(--stone2); text-align: left; vertical-align: top; }
#toastHost { position: fixed; left: 0; right: 0; bottom: 22px; z-index: 99; display: flex; justify-content: center; pointer-events: none; }
#toastHost .toast { position: static; transform: none; }

@media (max-width: 900px) {
  .live { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); overflow-y: auto; }
  .pri { max-height: 46vh; }
  .prompt { font-size: 22px; } .prompt .wd { font-size: 42px; }
}
@media (max-height: 640px) and (min-width: 901px) {
  .prompt .wd { font-size: 40px; } .prompt { font-size: 21px; }
}

/* ---------- unit assessments ---------- */
.assess-bar { display: flex; gap: 14px; align-items: center; margin: 4px 0 10px; color: var(--bone); flex-wrap: wrap; }
.assess-bar .pri-title, .assess-bar .pri-sub { color: var(--bone); }
.timer { font-size: 44px; font-weight: 700; font-variant-numeric: tabular-nums; background: rgba(0,0,0,.35); border-radius: 16px; padding: 2px 18px; color: #fff; min-width: 3.3em; text-align: center; }
.assess-foot { display: flex; align-items: center; gap: 14px; margin: 12px 0 30px; justify-content: space-between; position: sticky; bottom: 8px; }
.wordgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.wbtn { min-height: 76px; border-radius: 16px; border: 4px solid var(--stone3); background: #fbf6e8; font-size: 34px; font-weight: 700; display: flex; align-items: center; gap: 10px; padding: 6px 14px; text-align: left; position: relative; }
.wbtn .no { font-size: 14px; color: var(--ink-soft); font-weight: 400; min-width: 1.6em; }
.wbtn.wrong { background: #fde1e4; border-color: var(--bad); color: #7d1625; text-decoration: line-through; }
.wbtn.wrong::after { content: "✗"; position: absolute; right: 12px; font-size: 30px; text-decoration: none; }
.itemcard { text-align: center; padding: 8px; }
.itemcard .big { font-size: 34px; font-weight: 700; margin: 8px 0; }
.itemcard .tilebig { display: inline-grid; place-items: center; width: 150px; height: 150px; border-radius: 28px; background: linear-gradient(#fbf4de, #e7d9b2); border: 6px solid #8a7650; font-size: 100px; font-weight: 700; color: #1b2b1d; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chips .chip { min-width: 44px; min-height: 44px; border-radius: 10px; border: 3px solid var(--stone3); background: #fbf6e8; font-weight: 700; }
.chips .chip.cur { border-color: var(--forest); box-shadow: 0 0 0 3px var(--amber); }
.chips .chip.wrong { background: #fde1e4; border-color: var(--bad); }
.chips .chip.seen { background: #e6f3dc; }
.bigstat { font-size: 48px; font-weight: 700; color: var(--forest); }
.statrow { display: flex; gap: 26px; flex-wrap: wrap; margin: 8px 0; }
.statrow div small { display: block; color: var(--ink-soft); font-size: 14px; }
.assess-bar { padding-right: 190px; }   /* keep clear of the sound switch in the top-right corner */
@media (max-width: 700px) { .assess-bar { padding-right: 0; padding-top: 44px; } }

.menu-list { display: grid; gap: 10px; margin-top: 8px; }
.menu-list .btn { justify-content: flex-start; text-align: left; font-size: 18px; flex-wrap: wrap; }
.menu-list .btn small { font-weight: 400; opacity: .75; font-size: 14px; }
.work > .tools { padding-bottom: 46px; }   /* keep the tools clear of the Feedback button in the bottom-right corner */

.chk { display: flex; align-items: center; gap: 10px; padding: 8px 4px; font-size: 18px; cursor: pointer; }
.chk input { width: 26px; height: 26px; }
#pickClass { width: 100%; font-size: 20px; min-height: 54px; }
.page { padding-top: 64px; }   /* room for the Jungle / Sound switches in the top-right corner */
#joinStatus.good-note { color: #0f4a22; font-weight: 700; }
#joinStatus.err { color: #8a1c28; font-weight: 700; }

/* ---------- curriculum guide (reference; Tim, 12 Oct 2026) ---------- */
.guide .card { margin-bottom: 14px; }
.g-units { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.gnav { width: 44px; height: 44px; border-radius: 50%; background: var(--forest2); color: var(--bone); display: grid; place-items: center; font-weight: 700; text-decoration: none; font-size: 18px; }
.g-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.g-how ol, .g-routine ol { margin: 4px 0 0; padding-left: 22px; line-height: 1.5; }
.g-routine { background: #fff6df; border-color: var(--amber); }
.g-sub { font-weight: 700; margin: 10px 0 4px; color: var(--forest2); }
.g-unit { margin: 22px 0 8px; scroll-margin-top: 12px; }
.g-unit-head { display: flex; gap: 12px; align-items: center; color: var(--bone); }
.g-unit-head .num { width: 52px; height: 52px; border-radius: 50%; background: var(--amber); color: #2b1a00; display: grid; place-items: center; font-weight: 700; font-size: 24px; flex: none; }
.g-unit-head h2 { margin: 0; }
.g-unit-head .muted { color: rgba(251,246,232,.75); }
.g-purpose { color: var(--bone); margin: 8px 0 10px; font-size: 17px; }
.gl, .g-assess { background: var(--stone); border: 3px solid var(--stone3); border-radius: 16px; margin-bottom: 8px; }
.gl > summary, .g-assess > summary { cursor: pointer; padding: 10px 14px; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; list-style: none; min-height: 48px; }
.gl > summary::-webkit-details-marker, .g-assess > summary::-webkit-details-marker { display: none; }
.gl > summary::before, .g-assess > summary::before { content: "▸"; font-size: 18px; color: var(--forest2); }
.gl[open] > summary::before, .g-assess[open] > summary::before { content: "▾"; }
.gl-id { font-weight: 700; font-size: 19px; color: var(--forest2); min-width: 44px; }
.gl-title { font-weight: 700; font-size: 19px; }
.p-sound { background: #d8f0d8; border-color: var(--good); }
.p-word { background: #fff0cf; border-color: var(--warn); }
.gl-glance { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; color: var(--ink-soft); }
.gl-body { padding: 4px 16px 14px; border-top: 2px solid var(--stone3); }
.g-row { display: flex; gap: 12px; margin: 8px 0; align-items: baseline; }
.g-label { flex: 0 0 150px; font-weight: 700; color: var(--forest2); }
.g-val { flex: 1 1 auto; min-width: 0; }
.g-round { background: #fbf6e8; border: 2px solid var(--stone3); border-radius: 12px; padding: 4px 12px 6px; margin: 6px 0; }
.g-round-head { margin-top: 4px; }
.g-alt { margin-top: 4px; }
.g-teach { margin: 4px 0 0; padding-left: 22px; line-height: 1.5; }
.g-teach li { margin-bottom: 4px; }
.g-routine-note { margin-top: 10px; background: #fff6df; border: 2px solid var(--amber); border-radius: 12px; padding: 8px 12px; font-weight: 700; }
.gchip { display: inline-block; min-width: 30px; text-align: center; padding: 1px 8px; border-radius: 8px; border: 2px solid #8a7650; background: linear-gradient(#fbf4de, #e7d9b2); color: #1b2b1d; font-weight: 700; font-size: 18px; }
.gchip[data-kind="vowel"] { background: linear-gradient(#86bd66, #6aa84f); border-color: #3f7a2c; }
.gchip[data-kind="sometimes"] { background: linear-gradient(#e3f1d4, #c3dfa6); border-color: #86a96a; }
.gchip[data-kind="multi"] { background: linear-gradient(#dcc59c, #c4a574); border-color: #8a6a3e; }
.gword { display: inline-block; padding: 0 6px; font-weight: 700; }
.g-table { border-collapse: collapse; width: calc(100% - 28px); margin: 0 14px 14px; }
.g-table th, .g-table td { text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--stone3); vertical-align: top; }
@media (max-width: 640px) { .g-row { flex-direction: column; gap: 2px; } .g-label { flex-basis: auto; } .gl-glance { margin-left: 0; } }
@media print {
  body { background: #fff !important; }
  .guide .btn, .guide input, .g-units, .row { display: none !important; }
  .page { padding: 0 !important; }
  .g-unit-head, .g-purpose { color: #000; }
  .gl, .g-assess, .card { break-inside: avoid; box-shadow: none; }
  .g-unit { break-before: page; }
}
