.gb-controls { font: 18px var(--ts-font); color: var(--ts-ink); width:100%; }
.gb-controls label { display:block; margin:12px 0; font-size:16px; }
.gb-controls select,.gb-controls input { box-sizing:border-box; width:100%; min-height:44px; margin-top:5px; border:1px solid var(--ts-line); border-radius:8px; padding:8px; background:var(--ts-panel); color:var(--ts-ink); font:16px var(--ts-font); }
.gb-controls button { width:100%; margin:5px 0; min-height:44px; }
.gb-controls p { font-size:16px; line-height:1.5; overflow-wrap:anywhere; }
.gb-controls .gb-eyebrow { color:var(--ts-accent); letter-spacing:.12em; font-weight:800; }
.gb-controls details { border-top:1px solid var(--ts-line); padding:12px 0; }
.gb-controls summary { cursor:pointer; min-height:44px; font-size:18px; }
.gb-controls table { width:100%; font-size:16px; border-collapse:collapse; table-layout:fixed; }
.gb-controls td,.gb-controls th { padding:4px; border:1px solid var(--ts-line); overflow-wrap:anywhere; }
.gb-controls [aria-invalid=true] { border:2px solid var(--ts-bad); }
.gb-controls :focus-visible { outline:3px solid var(--ts-focus); outline-offset:3px; }
.gb-controls #gb-feedback { padding:10px; border-left:3px solid var(--ts-accent); background:var(--ts-panel); }
.gb-controls #gb-goal { font-weight:700; font-size:18px; }
#gb-square { overflow-x:auto; }
#gb-square table { min-width:420px; }
#gb-candidates button { white-space:normal; text-align:left; line-height:1.4; }
#gb-candidates [aria-pressed=true] { outline:2px solid var(--ts-focus); }
@media (max-width:900px) { .gb-controls { max-width:640px; margin:auto; } }
.gb-controls #gb-feedback:empty { display:none; }
.gb-controls .gb-keys, .gb-controls .gb-model { color:var(--ts-muted); }
.gb-controls .gb-model strong { color:var(--ts-ink); }
.gb-controls .gb-kid { display:flex; align-items:center; gap:10px; }
.gb-controls .gb-thumb { flex:none; width:72px; height:64px; }
.gb-phone { display:none; }
.gb-phone figure { display:flex; align-items:center; gap:10px; margin:6px 0; font-size:16px; }
@media (min-width: 901px) { #topic-game .ts-panel { width: 300px; } }
@media (max-width: 900px) {
  /* The page scrolls instead of the shell's fixed-height frame, so the board keeps its full width. */
  #topic-game { height: auto !important; min-height: 0 !important; }
  #topic-game .ts-play { min-height: 100dvh; }
  #topic-game .ts-play > * { flex-shrink: 0; }
  #topic-game .ts-body { flex: none; flex-direction: column; }
  #topic-game .ts-stage { flex: none; height: calc(62.5vw + 8px); min-height: 0; }
  #topic-game .ts-panel { overflow: visible; }
  .gb-phone { display:block; }
}
/* Phones: canvas text would fall under 16 px, so the panel's thumbnails, odds and offspring buttons carry the game. */
@media (max-width: 700px) { #topic-game .ts-stage { display: none; } }
