/* Teach-Off answer key (game version 7): the coach panel (coach.js), shared by index.html and 2d.html. The pages define the palette
   (--ink, --paper, --star, --yes, --no, --head, --body ...). Cozy classroom stickers; 16 px text minimum, 44 px targets. */
.cm { display: grid; gap: 8px; min-width: 0; font-size: 16px; }
.cm[hidden] { display: none !important; }
.cm-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 14px; border-radius: 999px;
  border: 2.5px solid var(--ink); background: var(--paper-2); color: var(--ink); font: 600 16px/1 var(--head); cursor: pointer;
  box-shadow: 0 3px 0 var(--ink); text-decoration: none; white-space: nowrap; flex: none; }
.cm-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.cm-btn.cm-go { background: var(--star); }
.cm-btn:disabled { opacity: .6; cursor: default; }
.cm-btn:focus-visible, .cm-card:focus-visible, .cm-k:focus-visible, .cm-tabs button:focus-visible { outline: 3px solid var(--pop); outline-offset: 2px; }

/* the ask card (game version 7): my student's question at the top of the panel; one thumb, YES left, NO right */
.cm-ask { display: grid; gap: 6px; padding: 8px 10px 10px; background: #fff8dc; border: 3px solid var(--ink); border-radius: 18px;
  box-shadow: 0 4px 0 var(--ink); }
.cm-ask[hidden] { display: none !important; }
.cm-ask-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font: 700 16px/1.2 var(--head); color: var(--ink); }
.cm-ask-score { font: 800 16px/1.2 var(--body); color: #1f6b30; text-align: right; }
.cm-ask-bar { height: 6px; border-radius: 3px; background: rgba(43,33,64,.12); overflow: hidden; }
.cm-ask-bar i { display: block; height: 100%; background: var(--star); transform-origin: left center; transition: transform .1s linear; }
.cm-ask-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.cm-ask-q { display: grid; gap: 3px; min-width: 0; }
.cm-ask-t { font: 700 18px/1.2 var(--head); }
.cm-ask-d { display: flex; align-items: center; gap: 6px; font: 700 16px/1.2 var(--head); min-height: 24px; }
.cm-ask-d .cm-dw { overflow-wrap: anywhere; }
.cm-ask-g { font: 600 16px/1.25 var(--body); color: var(--ink-soft); min-height: 1.25em; }
.cm-clue { width: 112px; height: 112px; border: 2.5px solid var(--ink); border-radius: 10px; background: #fffaf0; display: block; }
.cm-clue.big { width: min(100%, 280px); height: auto; aspect-ratio: 1; justify-self: center; }
.cm-clues { display: grid; gap: 6px; }
.cm-clues-t { margin: 0; font: 600 16px/1.4 var(--body); }
.cm-ask-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cm-ask-btns button { min-height: 64px; border-radius: 18px; border: 3px solid var(--ink); font: 700 26px/1 var(--head); color: #fff; cursor: pointer;
  box-shadow: 0 4px 0 var(--ink); touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.cm-ybtn { background: var(--yes); }
.cm-nbtn { background: var(--no); }
.cm-ask-btns button:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.cm-ask-btns button:disabled { opacity: .45; cursor: default; transform: none; box-shadow: 0 4px 0 var(--ink); }
.cm-ask-btns button.picked { opacity: 1; outline: 4px solid var(--star); outline-offset: 2px; }
.cm-ask-skip { justify-self: center; min-height: 36px; padding: 0 14px; border: 0; background: transparent; color: var(--ink-soft);
  font: 600 16px/1 var(--body); text-decoration: underline; cursor: pointer; touch-action: manipulation; }
.cm-ask-skip:disabled { opacity: .4; }
.cm-ask button:focus-visible { outline: 3px solid var(--pop); outline-offset: 2px; }

/* plan chip (game version 7: "Your answers: 9/10 right so far") */
.cm-plan { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 2px 4px 2px 12px; background: var(--paper-2);
  border: 2.5px solid var(--ink); border-radius: 16px; }
.cm-plan-txt { flex: 1; min-width: 0; font: 700 16px/1.2 var(--body); }
.cm-plan-name { font: 700 16px/1.15 var(--head); white-space: nowrap; }
.cm-news { min-height: calc(2 * 1.3em); font: 700 16px/1.3 var(--body); color: var(--ink); }

/* tabs */
.cm-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.cm-tabs button { min-height: 44px; border-radius: 999px; border: 2.5px solid var(--ink); background: var(--paper-2); color: var(--ink);
  font: 600 16px/1 var(--head); cursor: pointer; white-space: nowrap; }
.cm-tabs button[aria-selected=true] { background: var(--board, #2f5d46); color: var(--chalk, #f7f3e6); }
.cm-pct { font-size: 16px; opacity: .9; }
.cm-pane { display: grid; gap: 8px; min-width: 0; }
.cm-pane[hidden] { display: none !important; }

/* the NOW card: fixed height (a lesson coming or going never moves anything) */
.cm-now { position: relative; display: grid; gap: 6px; min-height: 208px; padding: 10px 12px; background: #fffdf6; border: 3px solid var(--ink);
  border-radius: 16px; box-shadow: 0 3px 0 var(--shadow); align-content: start;
  background-image: repeating-linear-gradient(180deg, transparent 0 29px, rgba(80,130,200,.14) 29px 30px); }
.cm-now.wasted { background-color: #f3efe6; }
.cm-now-h { display: flex; align-items: center; gap: 8px; min-height: 26px; font: 700 16px/1.2 var(--head); color: var(--ink-soft); }
.cm-now-n { flex: 1; min-width: 0; }
.cm-tag { font: 800 16px/1.15 var(--body); color: #1f6b30; text-align: right; }
.cm-tag.waste { color: #7a5a2a; }
.cm-tag.wrong { color: #b02a3a; }
.cm-thing { display: grid; gap: 2px; }
.cm-d { display: flex; align-items: center; gap: 8px; font: 700 18px/1.25 var(--head); min-height: 28px; }
.cm-ic { width: 26px; text-align: center; font-size: 20px; flex: none; }
.cm-m { display: inline-flex; gap: 3px; flex: none; }
.cm-m i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--ink); background: transparent; }
.cm-m[data-l="0"] i:nth-child(-n+1), .cm-m[data-l="1"] i:nth-child(-n+2), .cm-m[data-l="2"] i:nth-child(-n+3),
.cm-m[data-l="3"] i:nth-child(-n+4), .cm-m[data-l="4"] i { background: var(--star); }
.cm-m[data-l="0"] i:nth-child(1) { background: var(--paper-2); }
.cm-yn { display: inline-block; padding: 1px 8px; border-radius: 999px; border: 2px solid var(--ink); font: 700 16px/1.25 var(--head); color: #fff; }
.cm-yn.y { background: #1f6b30; } .cm-yn.n { background: #b3261e; } /* white on these is >= 6:1 */
.cm-think { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 8px; align-items: center; }
.cm-face { font-size: 28px; line-height: 1; grid-row: span 2; }
.cm-bub { position: relative; display: grid; padding: 6px 10px; background: #fff; border: 2.5px solid var(--ink); border-radius: 14px;
  font: 700 16px/1.3 var(--body); min-height: calc(2 * 1.3em + 12px); }
.cm-bub::before { content: ""; position: absolute; left: -8px; top: 14px; width: 10px; height: 10px; background: #fff; border: solid var(--ink);
  border-width: 0 0 2.5px 2.5px; transform: rotate(45deg); }
.cm-who { font: 700 16px/1.2 var(--head); color: var(--ink-soft); }
.cm-q { color: var(--ink-soft); }
.cm-think.two .cm-q { text-decoration: none; }
.cm-a { color: var(--ink); font-family: var(--head); font-weight: 700; }
.cm-ans { grid-column: 2; font: 700 16px/1.3 var(--body); min-height: 1.3em; } /* reserved: the answer line arriving never moves the kinds grid */
.cm-key { margin: 0; padding: 6px 10px; border: 2px dashed rgba(43,33,64,.4); border-radius: 12px; font: 600 16px/1.5 var(--body); color: var(--ink-soft); }
.cm-key i { font-style: normal; opacity: .5; }
.cm-key .cm-yn { padding: 0 6px; }
.cm-key b { color: var(--ink); }
.cm-idle { position: absolute; inset: 0; display: none; place-items: center; padding: 14px; text-align: center; font: 600 18px/1.3 var(--head);
  color: var(--ink); background: #fffdf6; border-radius: 13px; }
.cm-now.idle .cm-idle { display: grid; }

/* kinds of things: 3 x 3 cards with word headers */
.cm-kinds { display: grid; gap: 6px; min-width: 0; }
.cm-kh { font: 700 18px/1.2 var(--head); }
.cm-ksub { font: 700 16px/1.2 var(--body); color: var(--ink-soft); }
.cm-grid { display: grid; grid-template-columns: 60px repeat(3, minmax(0, 1fr)); gap: 5px; align-items: stretch; }
.cm-corner { font-size: 16px; align-self: end; text-align: center; line-height: 1.1; }
.cm-colh, .cm-rowh { font: 700 16px/1.1 var(--body); color: var(--ink-soft); display: flex; align-items: center; justify-content: center; text-align: center; overflow-wrap: anywhere; }
.cm-rowh { justify-content: flex-start; }
.cm-k { display: grid; justify-items: center; align-content: center; gap: 1px; min-height: 64px; padding: 4px 2px; border: 2.5px solid var(--ink);
  border-radius: 12px; background: var(--paper-2); color: var(--ink); cursor: pointer; font: inherit; min-width: 0; }
.cm-k .cm-ki { font-size: 18px; line-height: 1.1; }
.cm-k .cm-kw { font: 700 16px/1.1 var(--head); white-space: nowrap; }
.cm-k .cm-kn { font: 700 16px/1.1 var(--body); color: var(--ink-soft); min-height: 1.1em; }
.cm-k.none { background: #f6f1e7; border-style: dashed; color: var(--ink-soft); }
.cm-k.knows { background: #d9f2d6; }
.cm-k.shaky { background: #fff0c2; }
.cm-k.wrong { background: #ffd9dc; }
.cm-k.now { box-shadow: 0 0 0 3px var(--star), 0 0 10px 2px rgba(255,201,60,.8); }
.cm-k.open { outline: 3px solid var(--ink); outline-offset: 1px; }
.cm-wrongs ul, .cm-detail ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.cm-wrongs li { font: 700 16px/1.3 var(--body); padding: 6px 10px; background: #fff3f4; border: 2px solid #e5a1a8; border-radius: 12px; }
.cm-detail { padding: 8px 10px; background: var(--paper-2); border: 2.5px solid var(--ink); border-radius: 14px; font-size: 16px; }
.cm-detail[hidden] { display: none !important; }
.cm-dh { display: flex; align-items: center; gap: 8px; justify-content: space-between; margin-bottom: 4px; font: 700 17px/1.2 var(--head); }
.cm-dx { min-width: 44px; padding: 0; }
.cm-detail li { display: flex; flex-wrap: wrap; gap: 2px 8px; justify-content: space-between; font-weight: 700; line-height: 1.3; padding: 4px 0; border-top: 1px dashed rgba(43,33,64,.2); }
.cm-detail p { margin: 4px 0 0; font-weight: 700; color: var(--ink-soft); }

/* the test paper: 20 real questions */
.cm-ph p { margin: 0; font: 700 16px/1.35 var(--body); }
.cm-paper { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; }
.cm-pq { position: relative; display: grid; justify-items: start; gap: 2px; padding: 4px 6px 6px; background: #fff; border: 2px solid rgba(43,33,64,.45);
  border-radius: 10px; background-image: repeating-linear-gradient(180deg, transparent 0 21px, rgba(80,130,200,.14) 21px 22px); }
.cm-pq[hidden] { display: none; }
.cm-pn { font: 700 16px/1 var(--head); color: var(--ink-soft); }
.cm-pd { display: flex; align-items: center; gap: 3px; font-size: 16px; line-height: 1.2; }
.cm-pd .cm-m i { width: 8px; height: 8px; border-width: 1.5px; }
.cm-pd .cm-m { gap: 2px; }
.cm-pa .cm-yn { font-size: 16px; padding: 0 6px; }
.cm-pm { position: absolute; right: 5px; top: 1px; font: 700 22px/1 var(--head); color: rgba(43,33,64,.3); }
.cm-pq.ok { border-color: var(--yes); } .cm-pq.ok .cm-pm { color: #2d8a3c; }
.cm-pq.x { border-color: var(--no); background-color: #fff5f6; } .cm-pq.x .cm-pm { color: #c8303f; }

/* plan cards (lobby picker, decision sheet, change sheet) */
.cm-card { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 8px; width: 100%; min-height: 56px; padding: 6px 10px;
  text-align: left; border: 2.5px solid var(--ink); border-radius: 14px; background: var(--paper-2); color: var(--ink); cursor: pointer; font: inherit;
  box-shadow: 0 3px 0 var(--ink); }
.cm-card:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.cm-card.cur { background: #fff1c4; border-color: var(--ink); box-shadow: 0 3px 0 var(--ink), inset 0 0 0 2px var(--star); }
.cm-ce { font-size: 26px; text-align: center; line-height: 1; }
.cm-cb { display: grid; gap: 1px; min-width: 0; }
.cm-cb b { font: 700 17px/1.2 var(--head); }
.cm-cb span { font: 600 16px/1.25 var(--body); color: var(--ink-soft); }
.cm-curtag { display: inline-block; font: 800 16px/1 var(--body); padding: 1px 6px; border-radius: 999px; background: var(--star); color: var(--ink) !important; border: 2px solid var(--ink); vertical-align: 1px; }
.cm-tick { font: 700 22px/1 var(--head); color: #2d8a3c; min-width: 18px; }
.cm-pkh { margin: 4px 0 0; font: 700 19px/1.2 var(--head); }
.cm-pkl { margin: 0 0 6px; font: 600 16px/1.3 var(--body); color: var(--ink-soft); }
.cm-pk { display: grid; gap: 7px; }

/* the overlay sheet (decisions, Change plan): over the panel area, never over the header */
.cm-sheet { position: fixed; z-index: 12; left: calc(env(safe-area-inset-left, 0px) + 8px); right: calc(env(safe-area-inset-right, 0px) + 8px);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 8px); max-height: calc(100% - 96px); overflow-y: auto; overscroll-behavior: contain;
  display: grid; gap: 8px; padding: 12px 12px 14px; background: var(--paper); border: 3px solid var(--ink); border-radius: 20px;
  box-shadow: 0 -2px 0 rgba(0,0,0,.05), 6px 6px 0 var(--shadow); animation: cmup .28s cubic-bezier(.2,.9,.3,1.1); }
.cm-sheet[hidden] { display: none !important; }
@keyframes cmup { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 900px), (orientation: landscape) and (max-height: 560px) {
  .cm-sheet { left: auto; width: min(430px, 47vw); top: auto; }
}
.cm-sbar { height: 12px; border: 2.5px solid var(--ink); border-radius: 999px; background: var(--paper-2); overflow: hidden; }
.cm-sbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--s2, #22C3A6), var(--star)); transform-origin: left center; }
.cm-sheet:not(.timed) .cm-sbar { display: none; }
.cm-sh { display: flex; align-items: flex-start; gap: 8px; }
.cm-sh h2 { flex: 1; margin: 0; font: 700 21px/1.2 var(--head); }
.cm-secs { font: 700 18px/1.2 var(--head); color: #7a4a00; min-width: 40px; text-align: right; font-variant-numeric: tabular-nums; }
.cm-why { margin: 0; font: 600 16px/1.35 var(--body); color: var(--ink-soft); }
.cm-cards { display: grid; gap: 8px; }
.cm-sheet .cm-card { min-height: 64px; }
.cm-keep { min-height: 48px; border-radius: 999px; border: 2.5px dashed var(--ink); background: transparent; color: var(--ink); font: 600 17px/1.1 var(--head); cursor: pointer; padding: 0 14px; }

/* the results box links */
.cm-save-box { display: grid; gap: 8px; padding: 12px 14px; background: var(--paper-2); border: 3px solid var(--ink); border-radius: 16px; box-shadow: 0 3px 0 var(--shadow); text-align: left; }
.cm-save-box[hidden] { display: none !important; }
.cm-save-box h3 { margin: 0; font: 700 19px/1.2 var(--head); }
.cm-save-box p { margin: 0; font: 600 16px/1.35 var(--body); }
.cm-save-box .cm-soft { color: var(--ink-soft); }
.cm-runs { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; font: 700 16px/1.3 var(--body); }
.cm-runs li { display: flex; justify-content: space-between; gap: 8px; padding: 3px 8px; border-radius: 10px; background: rgba(255,201,60,.18); }
.cm-runs b { font: 700 16px/1.3 var(--head); }
.cm-save-box .cm-btn { justify-self: start; min-height: 48px; }
/* a short phone (375x667): the five plan cards and Keep fit in the sheet without scrolling */
@media (max-height: 700px) and (orientation: portrait) {
  .cm-sheet { gap: 6px; padding: 10px 10px 12px; max-height: calc(100% - 72px); }
  .cm-sheet .cm-card { min-height: 56px; padding: 4px 10px; }
  .cm-sheet .cm-cards { gap: 6px; }
  .cm-sheet .cm-keep { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) { .cm-sheet { animation: none; } .cm-sbar i { transition: none !important; } }

/* Your AI (docs/YOUR-AI.md): the seat switch, its brain in words, its record, the in-match strip, the results */
.ya-sw { display: grid; gap: 6px; }
.ya-sw .cm-pkh { margin: 0; }
.ya-swb { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ya-opt { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 52px; padding: 4px 8px; border: 2.5px solid var(--ink); border-radius: 14px;
  background: var(--paper-2); color: var(--ink); font: 700 17px/1.15 var(--head); cursor: pointer; box-shadow: 0 3px 0 var(--ink); text-align: left; }
.ya-opt:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.ya-opt.on { background: #fff1c4; box-shadow: 0 3px 0 var(--ink), inset 0 0 0 2px var(--star); }
.ya-opt .ya-oi { font-size: 24px; line-height: 1; flex: none; }
.ya-opt:focus-visible, .ya-watch:focus-visible { outline: 3px solid var(--pop); outline-offset: 2px; }
.ya-box { display: grid; gap: 4px; margin-top: 10px; }
.ya-box .cm-pkl { margin: 0 0 2px; }
.ya-brain, .ya-rec, .ya-learn { margin: 0; padding: 0; list-style: none; display: grid; gap: 5px; }
.ya-row { display: grid; gap: 2px; padding: 6px 10px; background: var(--paper-2); border: 2px solid rgba(43,33,64,.35); border-radius: 12px; font: 600 16px/1.3 var(--body); }
.ya-row.lean { border-color: #d9a520; background: #fff8e0; }
.ya-when { color: var(--ink-soft); font-weight: 700; }
.ya-it { font-weight: 700; }
.ya-c { font: 700 16px/1.3 var(--head); white-space: nowrap; }
.ya-like { display: inline-block; padding: 0 7px; border-radius: 999px; background: #d9f2d6; border: 2px solid #5aa860; font: 800 16px/1.25 var(--body); }
.ya-lean { font: 600 16px/1.3 var(--body); color: #6b4a00; }
.ya-rec li { display: flex; gap: 8px; align-items: baseline; padding: 4px 10px; border-radius: 10px; background: rgba(255,201,60,.16); font: 700 16px/1.3 var(--body); }
.ya-who { flex: none; }

/* in a match: the strip (when my AI sits in it) */
.ya-strip { display: grid; gap: 4px; padding: 6px 8px 8px 10px; background: #eef4ff; border: 2.5px solid var(--ink); border-radius: 14px; }
.ya-strip[hidden] { display: none !important; }
.cm.ya-ai .ya-strip { order: -1; background: #fff1c4; }
.ya-sh { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.ya-st { flex: 1; min-width: 0; font: 600 16px/1.25 var(--body); }
.ya-st b { font: 700 17px/1.2 var(--head); }
.ya-plays { display: block; }
.ya-watch { min-height: 44px; padding: 0 12px; }
.ya-watch[hidden] { display: none !important; }
.ya-grid { display: grid; grid-template-columns: auto repeat(var(--n, 1), minmax(0, 48px)); justify-content: start; gap: 1px 4px; align-items: center; font: 700 16px/1.25 var(--body);
  font-variant-numeric: tabular-nums; }
.ya-grid > span { text-align: center; }
.ya-grid .ya-l { text-align: left; white-space: nowrap; padding-right: 4px; }
.ya-grid .ya-r { color: var(--ink-soft); }
.ya-grid .hi { background: #d9f2d6; border-radius: 8px; }
.ya-wait { margin: 0; font: 600 16px/1.3 var(--body); color: var(--ink-soft); }
.ya-why { font: 700 16px/1.3 var(--body); color: var(--ink); }
.ya-why:empty { display: none; }

/* results */
.ya-vs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ya-t { display: grid; justify-items: center; gap: 0; padding: 6px 8px; background: #fff; border: 2.5px solid var(--ink); border-radius: 14px; font: 700 16px/1.2 var(--body); }
.ya-t b { font: 700 34px/1.1 var(--head); }
.ya-t .ya-tu { color: var(--ink-soft); font-weight: 600; }
.ya-t.win { background: #d9f2d6; }
.cm-save-box h4 { margin: 2px 0 0; font: 700 17px/1.2 var(--head); }
.ya-learn li { padding: 5px 10px; border-radius: 10px; background: #fff; border: 2px solid rgba(43,33,64,.25); font: 600 16px/1.3 var(--body); }
.ya-learn li.new { border-color: #5aa860; background: #eefaec; }
.ya-learn li.lean { border-color: #d9a520; background: #fff8e0; }
.cm-save-box .ya-sw { margin-top: 4px; }

/* phones, portrait: the lobby's five plan cards sit in a 2-column grid (names only; the sheet shows the full lines), so all five clear the sticky dock */
@media (orientation: portrait) and (max-width: 899px) {
  #planpick .cm-cards, #planpick .cm-pk { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  #planpick .cm-card { grid-template-columns: 28px minmax(0, 1fr); min-height: 48px; padding: 4px 8px; }
  #planpick .cm-card .cm-cb span:not(.cm-curtag), #planpick .cm-card .cm-tick { display: none; }
  #planpick .cm-cb b { overflow-wrap: break-word; }
}
/* a short phone (375x667): the plan blurb steps aside so the five cards clear the dock */
@media (max-height: 700px) and (orientation: portrait) and (max-width: 899px) {
  #planpick .cm-pkl { display: none; }
  #planpick .cm-pkh { margin: 0; }
}
@media (max-height: 700px) and (orientation: portrait) and (max-width: 899px) {
  #planpick .cm-card { min-height: 44px; padding: 2px 6px; gap: 6px; grid-template-columns: 24px minmax(0, 1fr); box-shadow: 0 2px 0 var(--ink); }
  #planpick .cm-ce { font-size: 22px; }
  #planpick .cm-cb b { font-size: 16px; line-height: 1.1; }
  #planpick .cm-pk { gap: 5px; }
}

/* proof 7: results verdict + the per-round comparison, the program links */
.ya-verdict { margin: 4px 0 0; font: 700 17px/1.3 var(--head); }
.ya-cmp { margin-top: 2px; }
.cm-prog, .cm-progres { justify-self: start; text-decoration: none; }
.cm-prog { font-size: 16px; }

/* proof 7 (R2/R3): the decision sheet sits under Change and the grip */
.cm-sheet.anch { top: var(--cm-top); bottom: auto; max-height: calc(100% - var(--cm-top) - 8px); }
.cm-sheet.tight { gap: 6px; padding-top: 8px; }
.cm-sheet.tight .cm-why { display: none; }
.cm-sheet.tight .cm-card { min-height: 48px; padding-top: 3px; padding-bottom: 3px; }
.cm-sheet.tight .cm-card .cm-cb span:not(.cm-curtag) { display: none; }
.cm-sheet.tight .cm-sh h2 { font-size: 18px; }
.cm-sheet.tight .cm-keep { min-height: 44px; }

/* proof 7 (C10): a plan list that runs below the dock says so: the panel's scroll edge shows a shadow, the heading says "5 plans, scroll" (phones only) */
.cm-more { display: none; font: 600 16px/1 var(--body); color: var(--ink-soft); }
@media (orientation: portrait) and (max-width: 899px) { #planpick .cm-more { display: inline; } }
.cm-sheet.peeked { visibility: hidden; pointer-events: none; }
.cm-news.late { padding: 0 8px; border-radius: 12px; background: #fff6d6; box-shadow: inset 0 0 0 2.5px var(--ink); display: flex; align-items: center; } /* D10: the joined-late card lives in the reserved news slot */
.cm-lp { min-height: 1.3em; font: 700 16px/1.3 var(--body); color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* S2: each lesson says which plan taught it */

/* ---------- proof 8 ---------- */
/* the plan row: label over the plan's name, the program icon (44 px, always above the fold) and Change */
.cm-plan-txt { display: grid; line-height: 1.15; }
.cm-plan-who { font: 700 16px/1.1 var(--body); color: var(--ink-soft); }
.cm-plan-name { font: 700 16px/1.15 var(--head); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-plan .cm-prog { width: 44px; padding: 0; font: 700 16px/1 var(--head); letter-spacing: -.05em; }
.cm-plan .cm-change { padding: 0 11px; }
.cm-plan { gap: 6px; }
/* the tab row: Lessons | Test paper | "?" (the key opens in place over the lesson card) */
.cm-tabs { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px; }
.cm-tabs .cm-qbtn { width: 44px; padding: 0; font: 700 21px/1 var(--head); background: var(--star); }
.cm-tabs .cm-qbtn[aria-expanded=true] { background: var(--board, #2f5d46); color: var(--chalk, #f7f3e6); }
@media (max-width: 420px) { .cm-te { display: none; } }
.cm-pane[data-pane=now] { position: relative; }
.cm-key { position: absolute; z-index: 4; left: 0; right: 0; top: 0; padding: 10px 12px; background: var(--paper); border: 3px solid var(--ink); border-radius: 14px;
  box-shadow: 4px 4px 0 var(--shadow); color: var(--ink); cursor: pointer; line-height: 1.7; }
.cm-key em { display: block; font-style: normal; font-size: 16px; color: var(--ink-soft); }
/* proof 8 (R8): a landscape phone: the decision takes the whole panel column; nothing is clipped, cards scroll if they must */
.cm-sheet.full { top: calc(env(safe-area-inset-top, 0px) + 8px); bottom: calc(env(safe-area-inset-bottom, 0px) + 8px); max-height: none; overflow-y: auto; }
@media (orientation: landscape) and (max-height: 560px) { .cm-sheet { padding: 8px 10px 10px; } .cm-sheet .cm-card { min-height: 48px; } }
/* proof 8 (D7): a taller phone's plan cards carry a short one-line blurb under the title */
.cm-sl { display: none !important; }
@media (orientation: portrait) and (max-width: 899px) and (min-height: 701px) {
  #planpick .cm-card .cm-cb span.cm-sl { display: block !important; font: 600 16px/1.15 var(--body); color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #planpick .cm-card { min-height: 56px; }
}
