/* 白地・黒字・大きなボタン・装飾なし */
* { box-sizing: border-box; }
html, body { margin: 0; background: #fff; color: #000; }
body { font-family: "Hiragino Sans", "Noto Sans JP", "Yu Gothic", sans-serif; line-height: 1.5; }
[hidden] { display: none !important; }
button { font: inherit; color: #000; background: #fff; border: 2px solid #000; border-radius: 0; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button:disabled { opacity: .25; cursor: default; }
.sub { color: #555; font-size: 15px; }

/* 学生（スマホ） */
.stu main { max-width: 560px; margin: 0 auto; padding: 14px 14px 40px; }
.stu h1 { font-size: 22px; margin: 6px 0 10px; }
.hangrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.hangrid button { font-size: 22px; font-weight: 700; padding: 18px 4px; line-height: 1.25; overflow-wrap: anywhere; }
.top { display: flex; align-items: center; gap: 4px; }
.top .han { flex: 1; overflow-wrap: anywhere; }
.han { font-size: 20px; font-weight: 700; }
.link { border: none; text-decoration: underline; font-size: 14px; padding: 6px; color: #555; }
.msg { font-size: 20px; font-weight: 700; margin: 20px 0; }
.picked { min-height: 64px; border: 2px solid #000; padding: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 8px 0 14px; }
.chip { font-size: 26px; font-weight: 700; min-width: 34px; text-align: center; }
.arrow { font-size: 18px; color: #555; }
.labels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.labels button { font-size: 34px; font-weight: 700; padding: 18px 0; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.row button { font-size: 18px; padding: 14px 0; }
.send { display: block; width: 100%; margin-top: 18px; font-size: 26px; font-weight: 700; padding: 18px 0; border-width: 3px; }
.big { font-size: 26px; font-weight: 700; margin: 20px 0 8px; }
.mark { font-size: 40px; font-weight: 700; margin: 16px 0 6px; }

/* 先生（プロジェクター） */
.tch main { padding: 16px 28px; }
.err { font-size: 22px; font-weight: 700; border: 3px solid #000; padding: 8px 12px; }
.bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.probs { display: flex; gap: 8px; flex-wrap: wrap; }
.probs button { font-size: 18px; padding: 8px 14px; }
.probs button.on { background: #000; color: #fff; }
.opt { font-size: 16px; color: #555; }
.head { display: flex; align-items: baseline; gap: 24px; flex-wrap: wrap; margin: 14px 0; }
.tch h1 { font-size: 40px; margin: 0; }
.status { font-size: 30px; font-weight: 700; border: 3px solid #000; padding: 0 14px; }
.status.open { background: #000; color: #fff; }
.clock { font-size: 72px; font-weight: 700; font-variant-numeric: tabular-nums; margin-left: auto; }
.ctrl { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.ctrl button { font-size: 28px; font-weight: 700; padding: 12px 28px; border-width: 3px; }
.subs { width: 100%; border-collapse: collapse; font-size: 34px; }
.subs th { font-size: 22px; text-align: left; border-bottom: 3px solid #000; padding: 4px 10px; }
.subs td { border-bottom: 1px solid #000; padding: 6px 10px; font-variant-numeric: tabular-nums; }
.subs td.seq { letter-spacing: .1em; }
.subs td.ok, .subs td.ng { font-weight: 700; font-size: 40px; }
#revealBox { border: 3px solid #000; padding: 12px 20px; margin-bottom: 18px; }
.ans { font-size: 52px; font-weight: 700; }
.ans .lab { font-size: 28px; margin-right: 20px; }
.ranking { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 6px 24px; }
.ranking li { font-size: 44px; font-weight: 700; display: flex; gap: 18px; font-variant-numeric: tabular-nums; }
.ranking .rk { min-width: 90px; }
.ranking .rs { font-weight: 400; }

/* 先生の画面：送信数とまだの班はうしろの席から読める大きさ */
.tch #count, .tch #waiting { font-size: 30px; color: #000; margin: 10px 0 0; }
.ctrl button.minor { font-size: 16px; font-weight: 400; padding: 8px 14px; border-width: 2px; margin-left: auto; align-self: center; }

/* 選ぶ形（学生）：1問1行 */
.pickbox { display: grid; gap: 8px; margin: 8px 0 4px; }
.prow { display: grid; grid-template-columns: minmax(64px, auto) 1fr; align-items: center; gap: 8px; border: 2px solid #000; padding: 6px 8px; }
.prow.filled { border-width: 3px; }
.plab { font-size: 18px; font-weight: 700; }
.prow select { font: inherit; font-size: 18px; padding: 10px 6px; border: 2px solid #000; border-radius: 0; background: #fff; color: #000; width: 100%; min-width: 0; }
.donelist { list-style: none; padding: 0; margin: 10px 0; }
.donelist li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; border-bottom: 1px solid #000; padding: 6px 2px; font-size: 18px; }
.donelist .dm { min-width: 24px; font-weight: 700; font-size: 22px; }
.donelist .dl { font-weight: 700; }
.donelist .dc { flex-basis: 100%; padding-left: 34px; font-weight: 700; }

/* 選ぶ形（先生）：答えは小さめ・×の問に印 */
.subs td.seq.pk { font-size: 26px; font-weight: 700; letter-spacing: 0; line-height: 1.5; }  /* 前に映して読める大きさ */
.subs td.seq.pk span { display: inline-block; white-space: nowrap; margin-right: .6em; }
.subs td.seq.pk .x { text-decoration: line-through; }
.subs td.seq.pk .x::before { content: "×"; font-weight: 700; margin-right: 2px; }
.subs td.pt { font-weight: 700; white-space: nowrap; }
.anslist { column-gap: 24px; font-size: 26px; font-weight: 700; margin: 6px 0; }
.anslist > div { break-inside: avoid; margin-bottom: 2px; }
.subs td:nth-child(2) { white-space: nowrap; }
.anslist .lab { font-size: 20px; margin-right: 10px; font-weight: 400; }
#totalBox { border: 3px solid #000; padding: 12px 20px; margin-bottom: 18px; }
#totalBox h2 { font-size: 32px; margin: 0 0 8px; }
.totals { font-size: 30px; }
.totals td, .totals th { text-align: center; }
.totals td.tn { text-align: left; }
.totals td.tt { font-weight: 700; font-size: 40px; }
.ctrl button.on { background: #000; color: #fff; }
