/* 授業パックの画面だけの見た目。土台は QuizStation の qs.css（駅の発車標の見た目）の写し。qs.css を直したら写し直す */
.hint{ color:var(--on-board); opacity:.75; font-size:.82rem; max-width:22em; line-height:1.5 }
code{ font-family:var(--dotf); background:var(--card); padding:0 4px }

/* 図解の場所（16:9） */
.stage{ width:100%; aspect-ratio:16 / 9; background:#fbfaf6; border:4px solid var(--board); position:relative; overflow:hidden }
.stage svg.slide{ display:block; width:100%; height:100% }
.stage:fullscreen{ border:none; background:#000; display:flex; align-items:center; justify-content:center; cursor:pointer }
.stage:fullscreen svg.slide{ max-width:100vw; max-height:100vh; width:auto; height:100%; aspect-ratio:16 / 9 }
svg .bodyf{ font-family:"M PLUS Rounded 1c", "BIZ UDPGothic", sans-serif }   /* ことばの雲など、書体を選ばない図の字 */
svg .dotf{ font-family:"DotGothic16", "BIZ UDPGothic", monospace }   /* 先生が図解の文字に「ドット」を選んだときだけ */

/* 先生：上の帯 */
body.teacher #live{ max-width:1400px; margin:0 auto; padding:0 16px 48px }
.livebar{ display:flex; gap:16px; align-items:center; flex-wrap:wrap; margin:12px 0 }
.livebar .codeboard{ margin:0 }
.ctl{ flex:1; justify-content:flex-end }
.seg{ display:flex }
.seg .ghost + .ghost{ border-left:none }
.ghost[aria-pressed="true"]{ background:var(--ink); color:var(--bg) }
.nav{ margin:10px 0 4px; justify-content:space-between }
.nav .nextbtn{ width:auto; margin:0; min-width:14em }
.pos{ font-family:var(--dotf); letter-spacing:.06em; color:var(--soft) }

.livegrid{ display:grid; grid-template-columns:minmax(0, 1fr) 340px; gap:20px; align-items:start }
@media (max-width:1000px){ .livegrid{ grid-template-columns:1fr } }
body.noseats .side{ display:none }
body.noseats .livegrid{ grid-template-columns:1fr }

/* 発表者ビュー（先生だけ）。画面を半分にしても読めるよう、細いときは図解の下に並ぶ */
.side{ display:flex; flex-direction:column; gap:14px }
.presenter{ border-top:3px solid var(--rule); padding-top:8px }
.pv-head{ display:flex; gap:12px; flex-wrap:wrap; align-items:baseline; font-family:var(--dotf); letter-spacing:.04em }
.pv-head b{ font-weight:400; color:var(--dot); font-size:1.1rem }
.pv-head span{ color:var(--soft); font-size:.86rem }
.pv-h{ font-size:.86rem; margin:10px 0 4px; color:var(--soft) }
.stage.small{ border-width:2px }
.stage.small.dim{ opacity:.35 }
.pv-list{ margin:4px 0 0; padding-left:1.2em }
.pv-notes{ white-space:pre-wrap; font-size:.95rem; line-height:1.7; max-height:30vh; overflow:auto; background:var(--card); padding:8px 10px; border-left:4px solid var(--amber) }
.pv-notes.empty{ color:var(--soft) }
/* 画面が細いとき（半分にしたときなど）：次の見本とノートを横に並べ、図解のすぐ下に置く */
@media (max-width:1000px){
  .presenter{ display:grid; grid-template-columns:minmax(0, 2fr) minmax(0, 3fr); gap:0 14px }
  .pv-head{ grid-column:1 / -1 }
  .pv-notes{ max-height:22vh }
}

/* 映す用の画面：図解だけ */
body.screen header.board, body.screen .livebar, body.screen .side, body.screen .nav, body.screen #live .note{ display:none !important }
body.screen #live{ max-width:none; padding:0 }
body.screen .livegrid{ display:block }
body.screen{ background:#000 }
body.screen #live, body.screen .livegrid, body.screen .livegrid > section{ height:100vh; display:flex; align-items:center; justify-content:center }
body.screen .stage{ border:none; width:min(100vw, calc(100vh * 16 / 9)); height:auto; cursor:pointer }

/* 先生：生徒の状態（発車標の行） */
.seatsh{ border-top:3px solid var(--rule); padding-top:10px; display:flex; flex-direction:column; gap:2px }
.legend{ list-style:none; padding:0; margin:4px 0 8px; display:flex; flex-wrap:wrap; gap:4px 12px }
.legend li:before{ content:""; display:inline-block; width:.8em; height:.8em; margin-right:4px; vertical-align:-1px; background:var(--c) }
.seats{ list-style:none; margin:0; padding:0; max-height:70vh; overflow:auto; border-top:1px solid var(--line) }
.seats li{ display:grid; grid-template-columns:2.4em 1fr auto auto auto; gap:8px; align-items:center; padding:5px 6px; border-bottom:1px solid var(--line);
  border-left:8px solid var(--c); font-size:.92rem }
.seats .no{ font-family:var(--dotf); font-weight:400; font-size:1.05rem; text-align:right }
.seats .nm{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
.seats .st{ font-size:.78rem; color:var(--soft) }
.seats .at{ font-family:var(--dotf); font-size:.78rem; color:var(--accent) }
.seats .rel{ padding:0 6px }
.s-in{ --c:var(--go) } .s-away{ --c:var(--amber) } .s-gone{ --c:var(--warn) } .s-none{ --c:var(--line) }
.seats li.s-none{ color:var(--soft) }
.seats li.s-away{ background:rgba(232,164,0,.12) }
.seats li.s-gone{ background:var(--warn-bg) }

/* 名簿のダイアログ */
.dlg{ border:4px solid var(--board); padding:18px 20px; max-width:560px; width:calc(100% - 32px); background:var(--bg); color:var(--ink) }
.dlg::backdrop{ background:rgba(0,0,0,.45) }
.dlg h2{ margin-top:0 }
.dlg-btns{ justify-content:flex-end; margin-top:14px }

/* 生徒 */
body.student #lesson{ max-width:1200px; margin:0 auto; padding:12px 16px 40px }
body.student .nav{ justify-content:center; gap:12px }
.modeNote{ text-align:center }

/* PowerPoint から読み込んだ文字の枠（player.js の drawParas）。書体は端末にあればその書体、無ければ似た無料の書体 */
.tb{ width:100%; height:100%; box-sizing:border-box; display:flex; flex-direction:column; overflow:visible; word-break:break-word; overflow-wrap:anywhere; color:#000 }
.tb.vert{ writing-mode:vertical-rl }
.tb .pp{ margin:0; white-space:pre-wrap }
.tb .po, .tb .pm{ width:100% }
/* スライドの字（2026-11-23 かずきさん「スライドの文字は選べるように」「パワポなどの文字は反映できるように」）
   --ff は、その書体が端末に無いときの代わり。PowerPoint から読み込んだ字は、元の書体の名前を先に置き、その次に --ff（player.js） */
/* スライドの英字（A〜Z・a〜z）は、どの字を選んでも a・g が手書きと同じ形（1階建て）の Klee One で出す（2026-11-24 かずきさん：
   学習障害の生徒は a の形のちがいでかなり苦戦する）。数字・記号・日本語は、選んだ字のまま */
/* Klee One は日本語の丸ゴシックより細く小さく見えるので、どの太さでも SemiBold（Klee One のいちばん太い字）を使い、少し大きくする（size-adjust）。
   太字の英字は SemiBold のまま（日本語の太字より少し細い。もっと太い Klee One は無い） */
@font-face{ font-family:"Jugyo Latin"; font-weight:100 900; font-display:swap; size-adjust:108%; src:url(/assets/fonts/797f8ce41dace9cb.woff2) format("woff2"); unicode-range:U+0041-005A, U+0061-007A, U+00C0-00D6, U+00D8-00F6, U+00F8-00FF }
@font-face{ font-family:"Jugyo Latin"; font-weight:100 900; font-display:swap; size-adjust:108%; src:url(/assets/fonts/8d1674326168c4a5.woff2) format("woff2"); unicode-range:U+0100-017F }
.f-maru{ --ff:"Jugyo Latin", "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "BIZ UDPGothic", sans-serif; font-family:var(--ff) }
.f-goth{ --ff:"Jugyo Latin", "BIZ UDPGothic", "Hiragino Sans", "Yu Gothic", sans-serif; font-family:var(--ff) }
.f-kyo{ --ff:"Jugyo Latin", "UD Digi Kyokasho NK-R", "UDデジタル教科書体 NK-R", "UD Digi Kyokasho NK", "Klee One", "Hiragino Mincho ProN", serif; font-family:var(--ff) }
.f-min{ --ff:"Jugyo Latin", "BIZ UDPMincho", "Hiragino Mincho ProN", "Yu Mincho", serif; font-family:var(--ff) }
.f-pop{ --ff:"HGP創英角ﾎﾟｯﾌﾟ体", "BIZ UDPGothic", sans-serif; font-family:var(--ff); font-weight:700 }
.f-mono{ --ff:ui-monospace, Menlo, Consolas, monospace; font-family:var(--ff) }
.f-dot{ --ff:var(--dotf); font-family:var(--ff) }
/* 太字：代わりの書体（Klee One）には太字が無いので、線を少し太らせる。影は PowerPoint の文字の影 */
.f-kyo.bb, .f-pop.bb{ -webkit-text-stroke:.03em currentColor }
.tb .sh{ text-shadow:0 .03em .06em rgba(0,0,0,.35) }
.vid{ width:100%; height:100%; background:#000; object-fit:contain }

/* PowerPoint の読み込み */
.imp{ margin:10px 0 0 }
.imp .bar{ height:8px; background:var(--line); margin:6px 0 }
.imp .bar i{ display:block; height:100%; background:var(--amber); width:0 }
.imp details{ margin:8px 0 }
.imp details ul{ max-height:40vh; overflow:auto; margin:6px 0; padding-left:1.4em; font-size:.88rem }

.jump{ display:inline-flex; gap:4px; align-items:center }
.jump input{ width:4.5em; padding:4px 2px; font-family:var(--dotf) }

/* 図解をつくる画面 */
body.editor{ overflow-x:hidden }
.ed-title{ max-width:22em; background:transparent; color:var(--on-board); border-bottom:1px solid rgba(255,255,255,.4) !important; padding:4px 2px !important; font-size:.95rem !important }
#editView{ padding:10px 12px 30px }
.ed-grid{ display:grid; grid-template-columns:220px minmax(0, 1fr) 340px; gap:14px; align-items:start }
@media (max-width:1100px){ .ed-grid{ grid-template-columns:180px minmax(0, 1fr) } .ed-panel{ grid-column:1 / -1 } }
.ed-slides{ position:sticky; top:8px }
.ed-sbtn{ gap:4px; margin-bottom:6px }
.ed-slist{ list-style:none; margin:0; padding:0; max-height:80vh; overflow:auto; border-top:1px solid var(--line) }
.ed-slist li{ display:grid; grid-template-columns:2.2em 1fr auto auto; gap:6px; align-items:center; padding:6px 4px; border-bottom:1px solid var(--line); cursor:pointer; font-size:.86rem }
.ed-slist li.on{ background:var(--accent-bg); border-left:6px solid var(--amber) }
.ed-slist .no{ font-family:var(--dotf); font-weight:400; text-align:right; color:var(--soft) }
.ed-slist .t{ overflow:hidden; white-space:nowrap; text-overflow:ellipsis }
.ed-slist .n{ font-size:.72rem; color:var(--soft) }
.ed-slist .w{ color:var(--warn); font-weight:700 }
.ed-tools{ gap:4px; margin-bottom:8px }
.ed-sep{ width:10px }
.ed-stage{ position:relative }
.ed-stage #edStage{ position:absolute; inset:0 }
.ed-stage #edStage svg{ width:100%; height:100%; display:block }
.ed-over{ position:absolute; inset:0; width:100%; height:100%; cursor:default; touch-action:none }
.ed-sel{ fill:none; stroke:#1f5fbf; stroke-width:3; stroke-dasharray:10 6; vector-effect:non-scaling-stroke }
.ed-handle{ fill:#fff; stroke:#1f5fbf; stroke-width:3; cursor:nwse-resize }
.ed-path{ fill:none; stroke:#e8a400; stroke-width:5; stroke-dasharray:12 8 }
.ed-pt{ fill:#e8a400 }
.ed-pstart{ fill:#ffcf5c; stroke:#16181d; stroke-width:3 }
.ed-panel{ border-top:3px solid var(--rule); padding-top:8px }
.ed-tabs{ flex-wrap:wrap; margin-bottom:10px }
.ed-xy{ gap:8px }
.ed-xy > div{ flex:1 1 70px }
.ed-xy input[type=number]{ padding:6px 2px }
.ed-steps{ list-style:none; padding:0; margin:8px 0; max-height:40vh; overflow:auto }
.ed-step{ border-top:2px solid var(--ink); padding:6px 0 }
.ed-shead{ justify-content:space-between }
.ed-fx{ list-style:none; padding:0; margin:4px 0 0 }
.ed-fx li{ display:grid; grid-template-columns:1fr auto auto auto; gap:4px; align-items:center; padding:4px; border-bottom:1px dotted var(--line); font-size:.86rem; cursor:pointer }
.ed-fx li.on{ background:var(--accent-bg) }
.ed-fx .ghost.small{ padding:0 6px }
.ed-add{ border-top:3px solid var(--rule); margin-top:10px; padding-top:6px }
.ed-opts{ gap:10px; margin:8px 0 }
.ed-opts label{ font-size:.82rem; color:var(--soft) }
.ed-opts input[type=number]{ width:6em; padding:4px 2px }
.ed-rep{ padding-left:1.2em; font-size:.88rem }
.ed-rep li{ cursor:pointer; margin:4px 0 }
.ed-rep li:hover{ text-decoration:underline }
.ed-field > span{ display:block; margin-bottom:4px }
.ed-field > input, .ed-field > select, .ed-field > textarea{ font-weight:400; color:var(--ink) }

/* 問題のスライド（player.js の drawQuiz）。スライドの中なので、色は固定（暗い画面でも同じ） */
.qz{ width:100%; height:100%; box-sizing:border-box; display:flex; flex-direction:column; gap:.5em; color:#16181d; line-height:1.45; overflow:hidden }
.qz-figs{ display:flex; flex-direction:column; gap:.4em; font-size:.72em }
.qz-fig{ border:2px solid #c9c8c0; padding:.4em .6em; background:#fff }
.qz-ft{ font-weight:700; margin-bottom:.2em }
.qz-fb{ white-space:pre-wrap }
.qz-code{ margin:0; font-family:ui-monospace, Menlo, Consolas, monospace; font-size:.9em; white-space:pre-wrap }
.qz-tbl{ border-collapse:collapse }
.qz-tbl th, .qz-tbl td{ border:1px solid #9a9a92; padding:.15em .5em; text-align:left }
.qz-tbl th{ background:#f1f0eb }
.qz-fn{ font-size:.85em; color:#5d6168 }
.qz-q{ font-weight:700; white-space:pre-wrap; font-size:1.05em }
.qz-u{ text-decoration:underline; text-underline-offset:.2em }
.qz-opts{ display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:.35em .8em }
.qz-opts.tf{ grid-template-columns:repeat(2, minmax(0, 1fr)) }
.qz-t{ white-space:nowrap; overflow:hidden; min-width:0 }
.qz-opts.wrap .qz-t{ white-space:normal; overflow:visible }
.qz-opt{ display:grid; grid-template-columns:1.8em minmax(0, 1fr) auto auto; min-width:0; align-items:center; gap:.4em; border:3px solid #16181d; padding:.25em .5em; background:#fff; position:relative }
.qz-opts.tf .qz-opt{ grid-template-columns:1fr auto auto; justify-items:center; font-size:1.6em; padding:.1em }
.qz-opts.tf .qz-k{ display:none }
.qz-k{ font-family:var(--dotf); background:#14213d; color:#e8a400; text-align:center }
.qz-opt.ok{ border-color:#1f7a45; background:#e2f1e8 }
.qz-opt.ok .qz-k{ background:#1f7a45; color:#fff }
.qz-opt.dim{ opacity:.55 }
.qz-bar{ width:3.5em; height:.5em; background:#e4e2da; display:inline-block }
.qz-bar i{ display:block; height:100%; background:#e8a400 }
.qz-opt.ok .qz-bar i{ background:#1f7a45 }
.qz-c{ font-family:var(--dotf); font-size:.85em }
.qz-write{ border:3px dashed #9a9a92; padding:.3em .6em; color:#5d6168 }
.qz-write.ok{ border-style:solid; border-color:#1f7a45; background:#e2f1e8; color:#16181d; font-weight:700 }
.qz-n{ font-family:var(--dotf); color:#5d6168; font-size:.8em }
.qz-exp{ border-left:.3em solid #1f7a45; background:#f1f0eb; padding:.3em .6em; white-space:pre-wrap; font-size:.85em }

/* 生徒：答える欄 */
.qbox{ max-width:900px; margin:12px auto 0; border-top:3px solid var(--rule); padding-top:10px }
.qbox .opts{ border-top:none }
.qbox .qstat{ font-weight:700; margin:8px 0 }
.qbox .qstat.ok{ color:var(--ok) } .qbox .qstat.ng{ color:var(--ng) }
.qbox .qexp{ white-space:pre-wrap; border-left:6px solid var(--line); padding:6px 10px; margin:6px 0 }
.qbox .opt.sel{ background:var(--accent-bg); outline:3px solid var(--accent) }
.qbox .row input{ flex:1 1 12em }

/* 先生：問題の集計 */
.qpanel{ border-top:3px solid var(--rule); padding-top:8px }
.qpanel .big{ font-family:var(--dotf); font-size:1.4rem }
.qpanel .bars{ list-style:none; padding:0; margin:6px 0 }
.qpanel .bars li{ display:grid; grid-template-columns:2em 1fr 3em; gap:6px; align-items:center; font-size:.86rem; margin:3px 0 }
.qpanel .bars .b{ height:10px; background:var(--line) }
.qpanel .bars .b i{ display:block; height:100%; background:var(--amber) }
.qpanel .bars li.ok .b i{ background:var(--ok) }
.qpanel .tops{ font-size:.86rem; padding-left:1.2em }
.qpanel .tops .ok{ color:var(--ok); font-weight:700 }
.seats .mk{ font-weight:700 } .seats .mk.ok{ color:var(--ok) } .seats .mk.ng{ color:var(--ng) }
.results{ width:100%; border-collapse:collapse; font-size:.86rem; margin-top:6px }
.results th, .results td{ border-bottom:1px solid var(--line); padding:3px 4px; text-align:center }
.results td.nm{ text-align:left }

/* グループワーク：スライドの課題（player.js の drawGroupSlide） */
.gz{ width:100%; height:100%; box-sizing:border-box; display:flex; flex-direction:column; justify-content:center; gap:.4em; color:#16181d; line-height:1.4 }
.gz-tag{ align-self:flex-start; font-family:var(--dotf); font-size:.45em; background:#14213d; color:#e8a400; padding:.1em .6em; letter-spacing:.1em }
.gz-p{ font-weight:700; white-space:pre-wrap }
.gz-n{ font-size:.42em; color:#5d6168 }
/* 付箋のボード（board.js） */
.gboard{ position:relative; width:100%; aspect-ratio:16 / 10; background:#fbfaf6 repeating-linear-gradient(0deg, transparent 0 39px, #ecebe4 39px 40px); border:3px solid var(--board); overflow:hidden; touch-action:none }
.gnote{ position:absolute; width:18%; min-height:14%; box-sizing:border-box; padding:6px 8px 14px; font-size:clamp(11px, 1.4vw, 18px); line-height:1.35; color:#16181d; box-shadow:0 2px 4px rgba(0,0,0,.25); cursor:grab; user-select:none; word-break:break-word }
.gnote.drag{ cursor:grabbing; box-shadow:0 6px 14px rgba(0,0,0,.35); z-index:2 }
.gnote .gt{ white-space:pre-wrap }
.gnote .gl{ position:absolute; left:6px; bottom:2px; font-size:.7em; color:#5d6168 }
.gnote .gx{ position:absolute; right:2px; top:0; border:none; background:transparent; font-size:1em; cursor:pointer; color:#5d6168 }
.c-y{ background:#ffe680 } .c-p{ background:#ffc2d6 } .c-b{ background:#bfe0ff } .c-g{ background:#c8f0c0 }
.gbox{ max-width:1000px; margin:12px auto 0; border-top:3px solid var(--rule); padding-top:10px }
.gwho{ font-weight:700 }
.gcolors{ display:flex; gap:6px }
.gcolors label{ padding:4px 8px; color:#16181d; font-size:.86rem; cursor:pointer }
.gadd .row{ justify-content:space-between }
.gadd .go{ width:auto; margin:0 }
/* 先生：グループの一覧 */
.gboards{ display:grid; grid-template-columns:repeat(auto-fill, minmax(320px, 1fr)); gap:12px; margin:12px 0 }
.gcard{ border-top:3px solid var(--rule); padding-top:6px }
.gcard.on{ outline:4px solid var(--amber) }
.gch{ gap:8px; margin-bottom:4px }
.gch .note{ flex:1; min-width:0 }
.gcard .gnote{ font-size:clamp(9px, .9vw, 13px) }
#gSize{ width:4em; padding:4px 2px }
/* 映す用の画面：選んだグループのボード */
.stage{ position:relative }
.gproj{ position:absolute; inset:0; z-index:3; background:#fbfaf6; padding:2% 3%; box-sizing:border-box }
.gproj .gph{ font-weight:700; font-size:2vw; margin-bottom:.5%; color:#16181d }
.gproj .gboard{ height:88%; width:auto; aspect-ratio:auto }
.gproj .gnote{ font-size:1.6vw }

/* 振り返り：ことばの雲（cloud.js）・読む画面 */
.cloudov{ position:absolute; inset:0; z-index:4; background:#fbfaf6 }
.cloudov svg.cloud{ width:100%; height:100%; display:block }
.dlg.wide{ max-width:900px }
#reflWords{ list-style:none; padding:0 }
#reflTexts{ max-height:40vh; overflow:auto }
#reflTexts .t{ white-space:pre-wrap }
.chip.off .ghost{ opacity:.5; text-decoration:line-through }

/* 職員室デスクのアプリの中に入れたとき（半分の幅）：上の帯を細く、ボタンを減らす */
body.embed header.board .in{ padding:4px 10px }
body.embed .logo{ font-size:1rem }
body.embed #live{ padding:0 8px 20px }
body.embed .livebar{ margin:6px 0; gap:8px }
body.embed .livebar .codeboard{ padding:6px 10px }
body.embed .livebar .codeboard .v{ font-size:1.6rem }
body.embed .livebar .hint, body.embed #screenWin, body.embed #full, body.embed #toPptx, body.embed #toDocx, body.embed #hideSeats{ display:none }
body.embed .livegrid{ grid-template-columns:1fr }
body.embed .presenter{ display:grid; grid-template-columns:minmax(0, 2fr) minmax(0, 3fr); gap:0 12px }
body.embed .pv-head{ grid-column:1 / -1 }
.scrEnd{ color:#16181d; font-size:2vw; padding:10%; text-align:center }

/* 入室を待っている生徒 */
.knock { border: 2px solid var(--amber, #c8a200); border-radius: 8px; padding: 8px 10px; margin: 6px 0; }
.knock ul { list-style: none; margin: 6px 0; padding: 0; }
.knock li { display: flex; gap: 8px; align-items: center; padding: 3px 0; }
.knock li.warn b { color: #b3261e; }
#waitMsg { margin: 8px 0; }
body.noseats .knock .nm{ display:none }
.knock .row{ display:flex; gap:12px; align-items:center; justify-content:space-between }
.knock .row .go{ width:auto; flex:none; padding:6px 16px; min-height:0; font-size:.95rem }
.knock .row .go::after{ content:none }

/* ---- 定期試験の案（段9。/x/）---- */
body.exam #editView{ max-width:1240px; margin:0 auto; padding:0 16px 64px }
.ex-grid{ display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.15fr); gap:28px; align-items:start }
@media (max-width:900px){ .ex-grid{ grid-template-columns:minmax(0,1fr) } }
.ex-h{ font-size:1.05rem; margin:22px 0 6px; padding-left:10px; border-left:6px solid var(--amber) }
.ex-range{ list-style:none; padding:0; margin:6px 0 }
.ex-range .check{ margin:6px 0 }
.ex-list li{ padding:8px 4px }
.ex-list li .t b{ white-space:normal; font-weight:500 }
.ex-row{ display:flex; flex-wrap:wrap; gap:10px; align-items:center }
.ex-row input[type=text]{ flex:1; min-width:10em }
.ex-total{ font-weight:700 }
.ex-total.warn{ color:var(--warn) }
.ex-sec{ border:2px solid var(--line); padding:10px 12px; margin:12px 0 }
.ex-sec.on{ border-color:var(--amber) }
.ex-sec > input{ width:100%; margin:6px 0 }
.ex-qs{ list-style:none; padding:0; margin:6px 0 }
.ex-qs li{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; padding:8px 0; border-top:1px solid var(--line) }
.ex-qs li .t{ flex:1 1 16em; min-width:0 }
.ex-qs li .t b{ display:block; font-weight:500 }
.ex-qs li .t span{ color:var(--soft); font-size:.8rem }
.ex-ctl{ display:flex; flex-wrap:wrap; gap:6px; align-items:center }
.ex-edit{ flex:1 1 100%; border:1px dashed var(--line); padding:8px 10px; margin-top:4px }
.ex-edit textarea, .ex-edit .ex-opts input[type=text]{ width:100% }
.ex-edit .ex-opts .row{ flex-wrap:nowrap; align-items:center; gap:6px; margin:4px 0 }
.ex-edit .note.warn{ color:var(--warn) }
.ex-ptl{ display:flex; gap:4px; align-items:center; font-size:.88rem }
.ex-pts{ width:4.2em }
#spreadTo{ width:5em }
.ex-res{ border-collapse:collapse; width:100%; margin:8px 0; font-size:.88rem }
.ex-res th, .ex-res td{ border:1px solid var(--line); padding:4px 6px; text-align:left }
.ex-miss{ padding-left:1.4em }
#mSubj, #mLv{ max-width:100% }
.ex-plan{ margin:4px 0 2px; font-size:.86rem }
.ex-plan select{ max-width:9em }
.ex-st{ font-weight:700; font-size:.84rem }
.ex-st.warn, .ex-qs li.off .t span{ color:var(--warn) }
.ex-st.ok, .ex-total.ok{ color:var(--ok) }
.ex-qs li.off{ border-left:4px solid var(--warn); padding-left:6px }
.ex-plan .ex-ptl{ white-space:nowrap }
.ex-total{ flex:1 1 100%; overflow-wrap:anywhere }
/* 日本語をことばの途中で折り返さない（phrase.js。2026-11-23 かずきさん「微妙な改行になるのはなし」）。
   最後の行が1〜2文字だけにならないよう text-wrap:pretty。入りきらない長いことばだけ、はみ出す前に折り返す */
html.ph-js, html.ph-js *{ word-break:keep-all; overflow-wrap:break-word }
body{ text-wrap:pretty }
html.ph-js :is(textarea, input, select, code, pre, [contenteditable], [contenteditable] *, .f-mono, .qz-code, .nophrase){ word-break:normal; overflow-wrap:anywhere }
/* 見出し・大きく出す問いは、行の長さをそろえる（「…ことを／書こう」のように最後の行だけ短くしない） */
h1, h2, h3, .gz-p, .qz-q, .q{ text-wrap:balance }

/* 見出しは Klee One（Klee One は 400 と 600 だけ） */
h1, h2, h3, .logo{ font-family:var(--dotf); font-weight:600 }
/* 番号・時計・コードは、けたの幅をそろえる（ドットの字をやめたので） */
.pos, .seats .no, .ed-slist .no, .qpanel .big, .clock, .codeboard .v, .lpin, .dep .no, .rank li .s, .pts, .lopt .cnt, .qz-n{ font-variant-numeric:tabular-nums }
/* Klee One は字の形がゆったりしているので、ドットの字に付けていた字の間を詰める（コードの大きな字はそのまま） */
.logo, .board .who, .clock, .plan, .step, .dep .st, .codeboard .k, .hud, .adtag, .pos, .pv-head, .gz-tag, .rank li .s, .lopt .cnt{ letter-spacing:.02em }
/* 授業のコードは、教室の後ろからも読めるよう太く */
.codeboard .v, .lpin{ font-weight:600 }
/* いまの図解が生徒の画面にも出ているか（先生の画面だけ） */
.livetag{ margin:0 0 6px; padding:6px 12px; font-size:.9rem; color:var(--soft); background:rgba(255,255,255,.04); border-left:4px solid var(--soft) }
.livetag.on{ color:#fff; background:#b3261e; border-left-color:#ffd54a; font-weight:700 }
.livetag.free{ color:var(--ink); border-left-color:var(--amber) }
.livetag:empty{ display:none }
/* 先生の画面の「そのほか」：授業中にいつも使うもののほかのボタン（2026-11-23 かずきさん「ボタンが多すぎる」） */
.more{ position:relative }
.more > summary{ list-style:none; display:inline-block; user-select:none }
.more > summary::-webkit-details-marker{ display:none }
.more > summary::after{ content:" ▾" }
.more[open] > summary{ background:var(--ink); color:var(--bg) }
.more:has(#hideSeats[aria-pressed="true"]) > summary::before{ content:"名前・ノートを隠し中　" }
.more .menu{ position:absolute; right:0; top:calc(100% + 6px); z-index:30; min-width:16em; display:flex; flex-direction:column; gap:6px; padding:10px 12px 12px; background:var(--card); border:2px solid var(--ink); box-shadow:0 6px 18px rgba(0,0,0,.35) }
.more .menu .ghost{ text-align:left; width:100% }
.more .mh{ margin:6px 0 0; font-size:.75rem; color:var(--soft); font-family:var(--dotf); letter-spacing:.04em }
.more .mh:first-child{ margin-top:0 }
/* 先生の画面の上のボタンは、すべて同じ大きさ（2026-11-23 かずきさん「ボタンの大きさが違うのはやめて」） */
.ctl > .ghost, .ctl > .seg > .ghost, .ctl > .more > summary{ box-sizing:border-box; height:38px; padding:0 12px; font-size:.84rem; line-height:34px; border-width:2px; white-space:nowrap }
.ctl{ align-items:center }
/* ボタンが1行に収まるよう、コードの横の説明は細く */
.livebar .codeboard .hint{ max-width:13em }
/* 先生の画面の3つの大きさを変える（2026-11-23 かずきさん「この3つの画面のサイズを自由に大きさ変えられるように」）
   ・大きなスライドと右の欄のあいだの線をドラッグ（--sideW）・次のクリックの見本は右下の角（--pvW）・ノートは右下の角（高さ） */
.livegrid{ grid-template-columns:minmax(0, 1fr) 12px var(--sideW, 340px); gap:0 4px }
.split{ align-self:stretch; min-height:200px; cursor:col-resize; position:relative; touch-action:none }
.split::after{ content:""; position:absolute; left:4px; top:0; bottom:0; width:4px; background:var(--line); border-radius:2px }
.split:hover::after, .split:focus-visible::after, .split.drag::after{ background:var(--amber) }
.pvwrap{ position:relative; width:var(--pvW, 100%); max-width:100% }
.grip{ position:absolute; right:-6px; bottom:-6px; width:18px; height:18px; cursor:nwse-resize; touch-action:none; background:linear-gradient(135deg, transparent 50%, var(--amber) 50%); border-radius:0 0 3px 0 }
.pv-notes{ resize:vertical; min-height:3.5em }
.pv-notes.sized{ max-height:none }
body.noseats .split, body.embed .split{ display:none }
body.embed .livegrid, body.noseats .livegrid{ grid-template-columns:1fr }
@media (max-width:1000px){ .livegrid{ grid-template-columns:1fr } .split{ display:none } }
body.screen .split{ display:none !important }

/* 最初の画面：先生か生徒かを選ぶ（2026-11-23 かずきさん） */
.who-cards{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; max-width:760px; margin:6px 0 10px }
.who-card{ display:flex; flex-direction:column; align-items:center; gap:4px; padding:18px 14px 20px; background:var(--card); color:var(--ink);
  border:3px solid var(--line); border-radius:16px; text-decoration:none; text-align:center; transition:border-color .15s, transform .15s }
.who-card:hover, .who-card:focus-visible{ border-color:var(--amber); transform:translateY(-2px); outline:none }
.who-card img{ width:100%; max-width:240px; height:auto; background:#f4f1e6; border-radius:12px }
.who-card b{ font-size:1.6rem; font-weight:800; margin-top:8px; letter-spacing:.1em }
.who-card span{ font-size:.86rem; color:var(--soft) }
.who-menu{ display:none }
.who-menu:target{ display:block }
.who-pick:has(~ .who-menu:target){ display:none }
.who-back{ margin:14px 0 0 }
.who-back a{ color:var(--accent) }
@media (max-width:520px){ .who-cards{ gap:10px } .who-card b{ font-size:1.35rem } .who-card span{ font-size:.76rem } }

/* 授業中に準備の画面へ戻ったとき・前回の続き（2026-11-23 かずきさん） */
.livenow{ border:3px solid var(--go); background:var(--ok-bg); padding:16px 18px; border-radius:10px; margin-bottom:22px }
.livenow p{ margin:0 0 10px }
.livenow .code{ font-family:var(--dotf); font-size:1.15rem; letter-spacing:.12em; color:var(--ink) }
.livenow .row{ gap:10px; flex-wrap:wrap }
.livenow .go{ margin:0; width:auto; padding:0 22px }
.resume{ margin:12px 0 4px; padding:12px 14px; border:2px solid var(--amber); border-radius:10px; background:var(--card) }
.resume p{ margin:0 0 8px; font-weight:700 }
.resume .rad{ display:flex; align-items:center; gap:8px; margin:4px 0; cursor:pointer }
.resume .rad input{ width:auto; margin:0 }
/* トップの「授業を再開する」（続いている授業があるときだけ出る） */
.resume-dep{ background:#17352a }
.resume-dep .no{ color:#5fd08f }
.resume-dep.hide + .dep{ border-top:none }
/* 授業を再開する：クラスのボタン */
.rs-list{ display:grid; gap:10px; margin:14px 0 }
.rs-item{ display:grid; grid-template-columns:1fr auto; align-items:center; gap:4px 14px; width:100%; text-align:left; padding:14px 18px; border:2px solid var(--line, #2a3550); border-radius:10px; background:var(--card); color:inherit; font:inherit; cursor:pointer }
.rs-item:hover, .rs-item:focus-visible{ border-color:var(--amber); outline:none }
.rs-item b{ font-size:1.2rem }
.rs-item .d{ grid-column:1; font-size:.88rem; opacity:.8 }
.rs-item .ar{ grid-row:1 / span 2; grid-column:2; color:var(--amber); font-size:1.3rem }
#tcodeBox .rad{ display:flex; align-items:center; gap:8px; margin:10px 0 4px; cursor:pointer }
#tcodeBox .rad input{ width:auto; margin:0 }
/* クラスの一覧（直す・消す） */
.cls-list{ display:grid; gap:6px; margin:10px 0 8px }
.cls-row{ display:grid; grid-template-columns:1fr auto auto auto; align-items:center; gap:10px; padding:8px 12px; border:1px solid var(--line, #2a3550); border-radius:8px }
.cls-row b{ overflow-wrap:anywhere }
.cls-row .d{ font-size:.85rem; opacity:.75 }
.cls-row button{ margin:0 }
.cls-list .note{ margin:0 }
.who-classes{ margin-top:22px }
.who-classes h2{ font-size:1.05rem; margin:0 0 8px }
.btnlink{ text-decoration:none; display:inline-block; text-align:center }
/* クラスの窓の名簿：1人ずつ足す */
.ro-add{ display:grid; grid-template-columns:72px 1fr auto; gap:8px; align-items:center }
.ro-add input, .ro-row input{ margin:0 }
.ro-add .go{ margin:0; width:auto; padding:0 16px; white-space:nowrap }
.ro-rows{ display:grid; gap:4px; max-height:38vh; overflow:auto; margin:6px 0 8px }
.ro-row{ display:grid; grid-template-columns:72px 1fr auto; gap:8px; align-items:center }
.ro-row .ro-no, .ro-add #rAddNo{ text-align:center }
.ro-paste{ margin:8px 0 0 }
.ro-paste summary{ cursor:pointer; font-size:.9rem }
.ro-paste textarea{ margin:6px 0 }
.dlg-btns{ align-items:center; gap:10px }
.dlg-btns .go, .ro-add .go{ width:auto; margin:0; padding:9px 22px; gap:8px; justify-content:center }
.dlg-btns .go::after, .ro-add .go::after{ content:none }
/* クラスを押して選ぶ（2026-11-24 かずきさん：プルダウンをやめた） */
.cls-row.pick{ grid-template-columns:auto 1fr auto auto auto auto; cursor:pointer }
.cls-row.pick:hover{ border-color:var(--accent) }
.cls-row.pick:focus-visible{ outline:2px solid var(--accent); outline-offset:2px }
.cls-row .dot{ width:14px; height:14px; border-radius:50%; border:2px solid currentColor; opacity:.6 }
.cls-row.on{ border:2px solid var(--accent); background:var(--accent-bg) }
.cls-row.on .dot{ background:var(--accent); border-color:var(--accent); opacity:1 }
.cls-row.on b{ color:var(--accent) }
/* 今日の欠席（番号を押す） */
.absbox{ margin:12px 0 0 }
.absbox summary{ cursor:pointer; font-size:.92rem }
.nogrid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(42px, 1fr)); gap:6px; margin:8px 0 }
.nob{ margin:0; padding:6px 0; min-height:0; border:1px solid var(--line, #2a3550); background:transparent; color:inherit; border-radius:6px; font-variant-numeric:tabular-nums; cursor:pointer }
.nob.on{ background:var(--ng, #c0392b); border-color:var(--ng, #c0392b); color:#fff }
.nob.vac{ opacity:.3; cursor:not-allowed; text-decoration:line-through }
/* クラスの窓：何番まで・空き番 */
.ro-meta{ display:grid; grid-template-columns:1fr 2fr; gap:12px }
.ro-meta input{ margin:0 }
/* 授業中の出欠 */
.seats li{ grid-template-columns:2.4em 1fr; grid-auto-flow:column; grid-auto-columns:auto }
.seats li.s-vac{ color:var(--soft); opacity:.55; --c:transparent }
.seats .attb{ padding:0 6px; margin:0; white-space:nowrap; font-size:.75rem }
.seats .attb.a-abs, .att-tbl tr.a-abs td{ color:var(--ng, #c0392b) }
.seats .attb.a-late, .seats .attb.a-early, .seats .attb.a-le{ color:var(--accent) }
.seats .attb.a-out{ color:#fff; background:#2e6fbf; border-color:#2e6fbf }
.seg.wrap{ flex-wrap:wrap; gap:6px }
.seg.wrap .ghost + .ghost{ border-left:2px solid currentColor }
.seg.wrap .ghost{ margin:0; padding:6px 12px }
.seg.wrap [aria-pressed="true"]{ background:var(--accent); color:var(--bg); border-color:var(--accent) }
#aOutBtns .ghost, #aOutBtns .go{ margin:0 }
.att-outs{ margin:6px 0 0; padding-left:1.2em }
.att-tbl{ max-height:55vh; overflow:auto; margin:8px 0 }
.att-tbl table{ border-collapse:collapse; width:100% }
.att-tbl th, .att-tbl td{ border-bottom:1px solid var(--line, #2a3550); padding:4px 8px; text-align:left; font-size:.88rem }
.att-tbl th{ position:sticky; top:0; background:var(--bg) }
.att-tbl .btnlink{ margin:0; padding:2px 8px; min-height:0 }
@media (max-width:600px){ .ro-meta{ grid-template-columns:1fr } .cls-row.pick{ grid-template-columns:auto 1fr; } .cls-row.pick .d{ grid-column:2 } }
#aOutBtns .go{ width:auto; padding:6px 16px; min-height:0; font-size:.9rem }
#aOutBtns .go::after{ content:none }
/* 授業を始めたら出欠をとる帯 */
.rollbar{ border:3px solid var(--accent); background:var(--accent-bg); padding:10px 14px; margin:0 0 10px }
.rollbar p{ margin:0 0 4px }
.rollbar .row{ gap:8px; margin:6px 0 0 }
.rollbar .ghost, .rollbar .go{ margin:0; width:auto }
.rollbar .go{ padding:6px 16px; min-height:0 }
.rollbar .go::after{ content:none }
/* スライドの選び方：種類 → 科目・学校・単元 */
.srcseg{ margin:6px 0 4px }
.libpick{ display:grid; grid-template-columns:1fr 1fr; gap:0 12px }
.libpick .wide{ grid-column:1 / -1 }
.libpick select{ width:100% }
/* 上付き・下付きの記号（⁻・₄ など）を、ふつうの字を小さくずらして出す（player.js の putText） */
.scr-sup, .scr-sub{ font-size:.68em; line-height:0; position:relative; vertical-align:baseline }
.scr-sup{ top:-.5em }
.scr-sub{ top:.22em }

/* つまみ（数値を変えると図が変わる。player.js の drawParams）。スライドの中に置くので、スライドと一緒に縮む */
.pzfo{ overflow:visible }
.pz{ display:flex; align-items:center; gap:8px; height:64px; box-sizing:border-box; padding:0 12px; border-radius:32px;
  background:#eef3fb; border:2px solid #1f5fbf; color:#14213d; font-size:26px; font-weight:700 }
.pz-l{ white-space:nowrap; flex:0 1 auto; line-height:1.2 }
.pz-r{ flex:1; min-width:80px; height:28px; accent-color:#1f5fbf; cursor:pointer; margin:0 }
.pz-v{ flex:none; white-space:nowrap; min-width:2.4em; text-align:right; font-variant-numeric:tabular-nums; color:#b3261e }
/* 生徒の画面：行の中の説明の文は、せまい画面（iPhone）では折り返す（横にスクロールしないように。2026-11-25 かずきさん） */
body.student .row > .note{ flex:1 1 12em; min-width:0; overflow-wrap:anywhere }
body.student{ overflow-x:hidden }
/* 「この端末から退出」は、説明をボタンの下に置く（改行がきれいになるように。2026-11-25 かずきさん） */
body.student .row.leave{ flex-direction:column; align-items:flex-start; gap:4px }
body.student .row.leave > .note{ flex:none }
/* 授業に入る QR コード */
.qrbtn{ margin:0; padding:4px; background:#fff; border:0; border-radius:6px; cursor:zoom-in; line-height:0; min-height:0 }
.qrbtn svg{ display:block }
.qrdlg{ max-width:620px }
.qrbig{ display:flex; justify-content:center; margin:6px 0 }
.qrbig svg{ width:min(70vh, 100%); height:auto; max-width:520px }
.qrcode-txt{ text-align:center; font-size:1.4rem; margin:4px 0 }
.qrcode-txt b{ font-family:var(--dotf); letter-spacing:.14em }
/* 生徒の画面：全画面（スライドだけ） */
.so-bar, .so-rot{ display:none }
body.student .fullrow{ justify-content:flex-end; margin:6px 0 0 }
body.stageonly{ background:#000; overflow:hidden }
body.stageonly > header, body.stageonly #lesson > *:not(#stage):not(#soBar):not(#soRot){ display:none !important }
body.stageonly #lesson{ max-width:none; margin:0; padding:0; height:100vh; height:100dvh; display:flex; align-items:center; justify-content:center }
body.stageonly #rLost{ display:none !important }
/* 振り返りの控え：授業の欄の外（授業が終わったあとも、入室の画面の上に出す） */
body.student #rLost{ padding:10px 16px 0; box-sizing:border-box }
body.stageonly #stage{ border:0; width:min(100vw, calc(100vh * 16 / 9)); width:min(100vw, calc(100dvh * 16 / 9)) }
body.stageonly .so-bar{ display:flex; position:fixed; top:8px; right:8px; gap:8px; z-index:30 }
body.stageonly .so-bar button{ margin:0; opacity:.9; white-space:nowrap }
body.stageonly .so-bar .ghost{ background:rgba(0,0,0,.55); color:#fff; border-color:rgba(255,255,255,.6) }
@media (orientation:portrait){ body.stageonly .so-rot{ display:block; position:fixed; left:0; right:0; bottom:16px; margin:0; text-align:center; color:#fff; font-size:.9rem; opacity:.8 } }
