/* C1 Prep games (games.js): Sentence scramble, Memory pairs, Odd one out, Word of the day.
   Colours come only from the theme tokens in style.css, so the games follow light/dark mode and every theme. */
.game { margin-top: var(--s5); }
.game button:disabled { cursor: default; }

/* status line, labels, feedback, actions */
.g-status { display: flex; justify-content: space-between; gap: var(--s3); font-size: 14px; color: var(--muted); margin-bottom: var(--s4); }
.g-score { font-weight: 600; color: var(--text); }
.g-label { font-size: 12px; line-height: 1.3; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: var(--s4) 0 var(--s2); }
.g-feedback { margin-top: var(--s4); }
.g-feedback p { margin: 0 0 var(--s2); }
.g-good { color: var(--ok); font-weight: 650; }
.g-wrong { color: var(--bad); font-weight: 650; }
.g-correct { font-size: 18px; font-weight: 600; }
.g-why { color: var(--muted); font-size: 15px; }
.g-actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s4); }
.g-end { text-align: center; }
.g-end h2 { margin-top: 0; }
.g-end-line { font-size: 18px; font-weight: 600; margin: var(--s2) 0; }
.g-best { color: var(--muted); font-size: 14px; margin: 0 0 var(--s4); }
.g-end button { margin-top: var(--s2); }
.g-shake { animation: g-shake .35s ease; }
@keyframes g-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* ---------- Sentence scramble ---------- */
.g-answer {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); min-height: 64px; padding: var(--s3);
  background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--r-md);
}
.g-answer.ok { border: 2px solid var(--ok); background: var(--ok-soft); }
.g-answer.bad { border: 2px solid var(--bad); background: var(--bad-soft); }
.g-placeholder { color: var(--muted); font-size: 15px; }
.g-end-mark { font-size: 20px; font-weight: 700; margin-left: -4px; }
.g-bank { display: flex; flex-wrap: wrap; gap: var(--s2); }
.g-chip {
  min-height: 44px; padding: 0 14px; font-size: 16px; font-weight: 500;
  background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
}
.g-chip:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }
.g-chip.placed { background: var(--primary-soft); color: var(--primary); border-color: var(--primary); box-shadow: none; }
.g-chip.placed:hover { background: var(--primary-soft); border-color: var(--primary-hover); }
.g-chip.used { visibility: hidden; }
.g-answer .g-chip:disabled { opacity: 1; }

/* ---------- Memory pairs ---------- */
.g-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
@media (min-width: 600px) { .g-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s3); } }
.g-card {
  position: relative; display: flex; align-items: center; justify-content: center; min-height: 104px; padding: var(--s2);
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm); font-size: 14px; line-height: 1.3; font-weight: 500; text-align: center;
  overflow-wrap: break-word; white-space: normal;
}
.g-card:hover { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.g-back {
  position: absolute; inset: 6px; border-radius: calc(var(--r-lg) - 4px); background-color: var(--primary-soft);
  background-image: repeating-linear-gradient(45deg, transparent 0 8px, color-mix(in srgb, var(--primary) 14%, transparent) 8px 16px);
}
.g-face { display: none; min-width: 0; max-width: 100%; }
.g-card.up .g-back { display: none; }
.g-card.up .g-face { display: block; }
.g-card.up { animation: g-flip .22s ease; cursor: default; }
.g-card.verb .g-face { font-size: 16px; font-weight: 700; color: var(--primary); }
.g-card.matched { border: 2px solid var(--ok); background: var(--ok-soft); box-shadow: none; }
.g-card.matched::after { content: "✓"; position: absolute; top: 4px; right: 8px; font-size: 13px; font-weight: 700; color: var(--ok); }
.g-card.miss { border: 2px solid var(--bad); }
.g-card.miss::after { content: "✗"; position: absolute; top: 4px; right: 8px; font-size: 13px; font-weight: 700; color: var(--bad); }
@media (max-width: 379px) { .g-card { padding: var(--s1); font-size: 13px; } .g-card.verb .g-face { font-size: 15px; } }
@media (min-width: 600px) { .g-card { min-height: 118px; font-size: 15px; } .g-card.verb .g-face { font-size: 17px; } }
@keyframes g-flip { from { transform: scaleX(.2); } to { transform: scaleX(1); } }
.g-pairlist { display: grid; grid-template-columns: max-content 1fr; gap: var(--s2) var(--s4); text-align: left; margin: 0 auto var(--s4); max-width: 520px; font-size: 15px; }
.g-pairlist dt { font-weight: 700; color: var(--primary); }
.g-pairlist dd { margin: 0; color: var(--text); }

/* ---------- Odd one out ---------- */
.g-question { font-size: 18px; font-weight: 600; margin: 0 0 var(--s4); }
.g-question b { color: var(--primary); }
.g-options { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.g-option {
  min-height: 60px; padding: var(--s2) var(--s3); font-size: 17px; font-weight: 500; line-height: 1.3;
  background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); border-radius: var(--r-md);
  box-shadow: var(--shadow-sm); overflow-wrap: anywhere; white-space: normal;
}
.g-option:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }
.g-option:disabled { opacity: 1; }
.g-option:disabled:hover { background: var(--surface); }
.g-option.ok, .g-option.ok:disabled:hover { border: 2px solid var(--ok); background: var(--ok-soft); color: var(--text); font-weight: 650; }
.g-option.bad, .g-option.bad:disabled:hover { border: 2px solid var(--bad); background: var(--bad-soft); color: var(--text); }
.g-option.ok .g-mark { color: var(--ok); }
.g-option.bad .g-mark { color: var(--bad); }
@media (max-width: 379px) { .g-option { font-size: 15px; } }

/* ---------- Word of the day ---------- */
.g-board { display: grid; gap: 6px; width: min(270px, 100%); margin: 0 auto; }
@media (min-width: 600px) { .g-board { width: 310px; } }
.g-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.g-tile {
  position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 1;
  font-size: 26px; font-weight: 700; text-transform: uppercase; line-height: 1;
  background: var(--surface); color: var(--text); border: 2px solid var(--border); border-radius: var(--r-sm);
}
.g-tile.typed { border-color: var(--border-strong); }
.g-tile.right { background: var(--ok); border-color: var(--ok); color: var(--surface); }
.g-tile.near { background: var(--warn); border-color: var(--warn); color: var(--surface); }
.g-tile.none { background: var(--surface-2); border-color: var(--surface-2); color: var(--muted); }
.g-tile.filled.right::after, .g-tile.filled.near::after { position: absolute; right: 4px; bottom: 2px; font-size: 11px; font-weight: 700; }
.g-tile.filled.right::after { content: "✓"; }
.g-tile.filled.near::after { content: "↔"; }
.g-tile.reveal { animation: g-reveal .35s ease both; }
@keyframes g-reveal { 0% { transform: scaleY(1); } 50% { transform: scaleY(.1); } 100% { transform: scaleY(1); } }
.g-msg { min-height: 1.6em; text-align: center; font-weight: 600; margin: var(--s3) 0; font-size: 15px; }
.g-keys { display: flex; flex-direction: column; gap: 6px; max-width: 500px; margin: 0 auto; }
.g-krow { display: flex; justify-content: center; gap: 5px; }
.g-key {
  flex: 1 1 0; min-width: 0; max-width: 44px; height: 54px; padding: 0; font-size: 16px; font-weight: 650; text-transform: uppercase;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border); border-radius: var(--r-sm);
}
.g-key:hover { background: var(--border); color: var(--text); border-color: var(--border); }
.g-key.wide { flex: 1.6 1 0; max-width: 70px; font-size: 12px; text-transform: none; }
.g-key svg { width: 22px; height: 22px; }
.g-key[data-state="right"] { background: var(--ok); border-color: var(--ok); color: var(--surface); }
.g-key[data-state="near"] { background: var(--warn); border-color: var(--warn); color: var(--surface); }
.g-key[data-state="none"] { background: var(--surface); border-color: var(--border); color: var(--muted); opacity: .6; }
@media (max-width: 379px) { .g-krow { gap: 3px; } .g-key { height: 50px; font-size: 14px; } .g-tile { font-size: 22px; } }
.g-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin: var(--s4) 0 0; font-size: 13px; color: var(--muted); }
.g-li { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.g-tile.mini { display: inline-flex; width: 22px; height: 22px; aspect-ratio: auto; font-size: 12px; border-width: 1px; }
.g-after { margin-top: var(--s5); }
.g-after .g-why { margin: 0; }

/* ---------- Error hunt ---------- */
.g-sentence { display: flex; flex-wrap: wrap; gap: var(--s2); margin: 0 0 var(--s4); font-size: 18px; }
.g-word {
  min-height: 44px; padding: 0 12px; font-size: 18px; font-weight: 500;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--r-md);
}
.g-word:hover { background: var(--primary-soft); color: var(--text); border-color: var(--primary); }
.g-word:disabled { opacity: 1; }
.g-word:disabled:hover { background: var(--surface); border-color: var(--border); }
.g-word.err, .g-word.err:disabled:hover { border: 2px solid var(--bad); background: var(--bad-soft); text-decoration: line-through; text-decoration-thickness: 2px; }
.g-word.fine, .g-word.fine:disabled:hover { border: 2px dashed var(--border-strong); }
.g-word.fixed, .g-word.fixed:disabled:hover { border: 2px solid var(--ok); background: var(--ok-soft); font-weight: 650; }
.g-word.err .g-mark { color: var(--bad); }
.g-word.fixed .g-mark { color: var(--ok); }
.g-step2 .g-question { margin-top: var(--s3); }
.g-step2 > p:first-child { margin: 0; }

/* ---------- Hangman ---------- */
.g-clue { display: flex; flex-direction: column; gap: 2px; margin: 0 0 var(--s3); font-size: 18px; font-weight: 600; }
.g-clue .g-label { margin: 0; }
.g-hang { display: flex; justify-content: center; }
.g-hang svg { width: 200px; max-width: 70%; height: auto; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.g-gallows { stroke: var(--border-strong); stroke-width: 4; }
.g-man { stroke: var(--text); stroke-width: 4; }
.g-left { text-align: center; font-size: 14px; color: var(--muted); margin: var(--s2) 0 var(--s3); }
.g-slots { display: flex; justify-content: center; gap: 6px; margin-bottom: var(--s2); }
.g-slot {
  display: inline-flex; align-items: flex-end; justify-content: center; flex: 0 1 26px; min-width: 0; height: 36px; padding-bottom: 2px;
  border-bottom: 3px solid var(--border-strong); font-size: 24px; font-weight: 700; text-transform: uppercase; line-height: 1;
}
.g-slot.on { border-bottom-color: var(--primary); color: var(--primary); }
.g-slots.won .g-slot { border-bottom-color: var(--ok); color: var(--ok); }
.g-slot.missed { color: var(--bad); border-bottom-color: var(--bad); }
@media (max-width: 479px) { .g-slots { gap: 4px; } .g-slot { font-size: 19px; height: 30px; } }

/* ---------- Crosswords ---------- */
.g-chips { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s4); }
.g-chip-btn {
  min-height: 40px; padding: 0 14px; font-size: 14px; font-weight: 600; border-radius: 999px;
  background: var(--surface); color: var(--text); border: 1px solid var(--border-strong);
}
.g-chip-btn:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }
.g-chip-btn[aria-pressed="true"], .g-chip-btn[aria-pressed="true"]:hover { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.g-chip-n { font-variant-numeric: tabular-nums; opacity: .75; }
.g-tick { color: var(--ok); font-weight: 700; }
.g-chip-btn[aria-pressed="true"] .g-tick { color: inherit; }
.g-cw-layout { display: grid; gap: var(--s5); }
@media (min-width: 960px) {
  .wrap:has(.g-cw-layout) { max-width: 1100px; }
  .g-cw-layout { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
  .g-cluelists { position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow: auto; }
}
.g-cluebar {
  display: flex; align-items: center; gap: var(--s2); min-height: 56px; padding: var(--s1); margin-bottom: var(--s3);
  background: var(--primary-soft); border-radius: var(--r-md);
}
.g-cluetext { flex: 1; min-width: 0; margin: 0; font-size: 15px; line-height: 1.35; text-align: center; }
.g-cluetext b { color: var(--primary); margin-right: 4px; }
.g-iconbtn { flex: none; width: 44px; min-height: 44px; padding: 0; background: transparent; color: var(--primary); border-color: transparent; }
.g-iconbtn:hover { background: var(--surface); color: var(--primary-hover); border-color: transparent; }
.g-iconbtn svg { width: 22px; height: 22px; }
.g-cw { display: grid; gap: 2px; margin: 0 auto; user-select: none; -webkit-user-select: none; }
.g-void { aspect-ratio: 1; }
.g-sq {
  position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 1; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 3px;
}
.g-sq.inword { background: var(--primary-soft); }
.g-sq.here { background: var(--primary-soft); box-shadow: inset 0 0 0 2px var(--primary); }
.g-num { position: absolute; top: 1px; left: 2px; font-size: 9px; line-height: 1; font-weight: 600; color: var(--muted); }
.g-let { font-size: clamp(13px, 4.2vw, 21px); font-weight: 700; text-transform: uppercase; line-height: 1; color: var(--text); }
.g-sq.wrong .g-let { color: var(--bad); text-decoration: line-through; text-decoration-thickness: 2px; }
.g-sq.wrong { background: var(--bad-soft); }
.g-sq.shown .g-let { color: var(--primary); }
@media (min-width: 600px) { .g-num { font-size: 10px; } }
.g-cw-main .g-msg { min-height: 1.6em; }
.g-cw-main .g-msg.g-good { color: var(--ok); }
.g-cw-main .g-msg.g-wrong { color: var(--bad); }
.g-cw-actions { justify-content: center; }
.g-cluelists { display: grid; gap: var(--s4); }
@media (min-width: 600px) and (max-width: 959px) { .g-cluelists { grid-template-columns: 1fr 1fr; } }
.g-cluelist h3 { margin: 0 0 var(--s2); font-size: 16px; }
.g-cluelist ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.g-cl {
  display: block; width: 100%; min-height: 40px; padding: 6px 10px; text-align: left; white-space: normal;
  font-size: 15px; font-weight: 400; line-height: 1.4; background: transparent; color: var(--text); border: 1px solid transparent; border-radius: var(--r-sm);
}
.g-cl b { color: var(--primary); margin-right: 4px; }
.g-cl:hover { background: var(--surface-2); color: var(--text); border-color: transparent; }
.g-cl.on, .g-cl.on:hover { background: var(--primary-soft); border-color: var(--primary); }
.g-cl.done { color: var(--muted); }

/* ---------- Escape room ---------- */
.g-story { font-family: var(--serif, "Source Serif 4", Georgia, serif); font-size: 17px; line-height: 1.65; }
.g-esc-start { text-align: center; }
.g-esc-start .g-story { text-align: left; max-width: 560px; margin-left: auto; margin-right: auto; }
.g-esc-start .g-label { margin-top: 0; }
.g-esc-start h2 { margin-top: 0; }
.g-esc-start .g-actions { justify-content: center; }
.g-esc-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s4); }
.g-doors { display: flex; gap: 6px; }
.g-door {
  position: relative; width: 48px; min-height: 52px; padding: 0; flex-direction: column; gap: 0;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); border-radius: var(--r-md);
}
.g-door svg { width: 24px; height: 24px; }
.g-door-n { font-size: 11px; font-weight: 700; line-height: 1; }
.g-door:disabled { opacity: .55; }
.g-door:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }
.g-door.open { background: var(--ok-soft); color: var(--ok); border-color: var(--ok); }
.g-door.now { background: var(--surface); color: var(--primary); border-color: var(--primary); }
.g-door.viewing { box-shadow: 0 0 0 2px var(--primary); }
.g-esc-meta { display: flex; align-items: baseline; gap: var(--s3); font-size: 14px; color: var(--muted); }
.g-clock { font-size: 22px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.g-room .g-label { margin-top: 0; }
.g-room h2 { margin-top: 0; }
.g-puzzle { margin-top: var(--s4); }
.g-esc-q { margin-bottom: var(--s4); }
.g-esc-s { display: block; margin: 0 0 var(--s2); font-weight: 600; }
.g-esc-opts { display: flex; flex-wrap: wrap; gap: var(--s2); }
.g-esc-opt {
  min-height: 44px; padding: 0 14px; font-size: 15px; font-weight: 500; white-space: normal; text-align: left;
  background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); border-radius: 999px;
}
.g-esc-opt:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }
.g-esc-opt[aria-pressed="true"], .g-esc-opt[aria-pressed="true"]:hover { background: var(--primary-soft); color: var(--primary); border-color: var(--primary); font-weight: 650; }
.g-esc-opt:disabled { opacity: 1; }
.g-dig {
  display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin-left: -6px; margin-right: 8px;
  border-radius: 50%; background: var(--surface-2); color: var(--text); font-size: 12px; font-weight: 700; border: 1px solid var(--border);
}
.g-lock { margin-top: var(--s5); padding: var(--s4); background: var(--surface-2); border-radius: var(--r-lg); text-align: center; }
.g-lock .g-label { margin-top: 0; }
.g-lock > button { margin-top: var(--s3); }
.g-codeslots { display: flex; justify-content: center; gap: var(--s2); margin-bottom: var(--s3); }
.g-codeslot {
  display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 56px;
  background: var(--surface); border: 2px solid var(--border-strong); border-radius: var(--r-md); font-size: 28px; font-weight: 700;
}
.g-codeslot.on { border-color: var(--primary); }
.g-codeslots.open .g-codeslot, .g-wheels.open .g-wheel-l { border-color: var(--ok); background: var(--ok-soft); color: var(--ok); }
.g-keypad { display: grid; grid-template-columns: repeat(4, 60px); justify-content: center; gap: 6px; }
.g-padkey { min-height: 48px; padding: 0; font-size: 20px; background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); }
.g-padkey:hover { background: var(--primary-soft); color: var(--text); border-color: var(--primary); }
.g-padkey svg { width: 22px; height: 22px; }
@media (max-width: 379px) { .g-keypad { grid-template-columns: repeat(4, 54px); } .g-codeslot { width: 42px; } }
.g-match { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.g-match-col { display: flex; flex-direction: column; gap: var(--s2); }
.g-match-item {
  position: relative; min-height: 52px; padding: var(--s2) var(--s3); font-size: 15px; font-weight: 500; line-height: 1.3; white-space: normal; text-align: left;
  justify-content: flex-start; background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); border-radius: var(--r-md);
}
.g-match-item:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }
.g-match-item.picked, .g-match-item.picked:hover { background: var(--primary-soft); border: 2px solid var(--primary); }
.g-match-item.matched, .g-match-item.matched:disabled { opacity: 1; background: var(--ok-soft); border-color: var(--ok); color: var(--text); }
.g-pairno {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-right: 4px;
  border-radius: 50%; background: var(--ok); color: var(--surface); font-size: 11px; font-weight: 700;
}
@media (max-width: 379px) { .g-match-item { font-size: 14px; padding: var(--s2); } }
.g-wheels { display: flex; justify-content: center; gap: var(--s2); }
.g-wheel { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.g-wheel-btn { width: 48px; min-height: 36px; padding: 0; background: var(--surface); color: var(--primary); border: 1px solid var(--border-strong); }
.g-wheel-btn:hover { background: var(--primary-soft); color: var(--primary); border-color: var(--primary); }
.g-wheel-btn svg { width: 20px; height: 20px; }
.g-wheel-l {
  display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 56px; cursor: pointer;
  background: var(--surface); border: 2px solid var(--border-strong); border-radius: var(--r-md); font-size: 28px; font-weight: 700;
}
.g-wheel-l.focus { border-color: var(--primary); }
@media (max-width: 379px) { .g-wheel-btn, .g-wheel-l { width: 44px; } }
.g-small { font-size: 13px; color: var(--muted); margin: var(--s2) 0 0; }
.g-order { list-style: none; counter-reset: line; margin: 0 0 var(--s3); padding: var(--s3); display: grid; gap: var(--s2);
  background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--r-md); min-height: 64px; }
.g-order li { counter-increment: line; display: flex; align-items: center; gap: var(--s2); }
.g-order li::before { content: counter(line); flex: none; width: 22px; text-align: right; font-size: 13px; font-weight: 700; color: var(--muted); }
.g-order li.g-noline::before { content: none; }
.g-order.open { border: 2px solid var(--ok); background: var(--ok-soft); }
.g-order-bank { display: grid; gap: var(--s2); margin-bottom: var(--s3); }
.g-line {
  width: 100%; min-height: 44px; padding: var(--s2) var(--s3); justify-content: flex-start; text-align: left; white-space: normal;
  font-family: var(--serif, "Source Serif 4", Georgia, serif); font-size: 16px; font-weight: 400; line-height: 1.45;
  background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); border-radius: var(--r-md); box-shadow: var(--shadow-sm);
}
.g-line:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }
.g-line.placed { box-shadow: none; background: var(--primary-soft); border-color: var(--primary); }
.g-line.placed:disabled { opacity: 1; }
.g-note {
  margin: 0 0 var(--s4); padding: var(--s4) var(--s5); background: #fff8ee; color: #2b2620; border-radius: var(--r-sm);
  box-shadow: var(--shadow-sm); transform: rotate(-.6deg); font-family: var(--serif, "Source Serif 4", Georgia, serif); font-size: 17px; line-height: 1.6;
}
.g-note p { margin: 0 0 var(--s2); }
.g-note p:last-child { margin-bottom: 0; }
.g-final-row { display: flex; flex-wrap: wrap; gap: var(--s2); }
.g-final input { flex: 1 1 200px; min-width: 0; min-height: 44px; padding: 0 12px; font: inherit; font-size: 17px;
  background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); border-radius: var(--r-md); }
.g-final input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.g-final input.ok { border-color: var(--ok); background: var(--ok-soft); }
.g-hintbox { margin-top: var(--s4); }
.g-hint { margin: 0; padding: var(--s3); background: var(--warn-soft); color: var(--text); border-radius: var(--r-md); font-size: 15px; }
.g-opened { font-size: 18px; }
.g-esc-end .g-story { text-align: left; }
.g-esc-list { display: grid; gap: var(--s3); }
@media (min-width: 700px) { .g-esc-list { grid-template-columns: 1fr 1fr; } }
.g-esc-card {
  display: flex; align-items: flex-start; justify-content: flex-start; gap: var(--s3); min-height: 0; padding: var(--s4);
  text-align: left; white-space: normal; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); font-weight: 400;
}
.g-esc-card:hover { background: var(--surface); color: var(--text); border-color: var(--primary); }
.g-esc-card-n {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: 15px;
}
.g-esc-card-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.g-esc-card-title { font-size: 17px; font-weight: 650; }
.g-esc-card-intro { font-size: 14px; line-height: 1.5; color: var(--muted); }
.g-esc-card-status { font-size: 13px; font-weight: 600; color: var(--muted); }
.g-esc-card-status.done { color: var(--ok); }
.g-esc-back { margin-top: var(--s4); }
.g-esc-titlebtn {
  flex-basis: 100%; justify-content: flex-start; min-height: 36px; padding: 0; gap: 6px;
  background: none; border: none; color: var(--primary); font-size: 15px; font-weight: 600;
}
.g-esc-titlebtn:hover { background: none; color: var(--primary-hover); border: none; text-decoration: underline; }
