/* /assets/css/kit.css */
/* =====================================================================================================
   GAME KIT: shared size tokens (layout system step 2, 1.203.70).  Loaded before game.css on every game and tool.

   Two things pick the sizes, both set on <html> by assets/js/gic-layout.js:
     data-layout = phone | tablet | desktop | board      (what kind of screen: GICLayout)
     data-size   = normal | medium | large | xlarge      (Display size: GICSize; teachers choose it in the game menu,
                                                          Auto = normal, a little larger for a desktop in full screen)
   Components read the --k-* tokens below instead of writing their own px numbers for each layout, so a size is
   changed ONCE here. Anything not yet moved onto the Kit keeps its own CSS and is not affected.

   Defaults equal the sizes the shared chrome had before (so desktop, tablet and phone look the same as before);
   only a board (a little larger touch targets) and the Display size setting change them.
   A board reports about 1280x720 CSS px at 3x on a 4K panel, so its CSS pixels are already physically large:
   board tokens are only modestly bigger.
   ===================================================================================================== */
:root{
  --k-scale:1;                              /* Display size multiplier (set by data-size) */
  --k-pop-title:calc(26px * var(--k-eff));   /* smallest size for the big word in an in-game popup (Correct!, Game over...) */
  --k-pop-text:calc(17px * var(--k-eff));    /* smallest size for the line under it and for popup buttons */
  --k-eff:var(--k-scale);                   /* the multiplier actually used (forced to 1 in short landscape windows, below) */
  --k-hud-m:12px;                          /* gap between the full-screen chips / menu / exit buttons and the screen edge */
  --k-hud-btn-base:44px;                    /* floating menu and exit buttons in full screen */
  --k-hud-font-base:16px;                 /* score / round chips in the full-screen bar */
  --k-panel-w-base:300px;                   /* the floating game menu panel */
  /* ---- Game Kit size settings (1.203.140): the ONLY place these numbers live. gic-layout.js reads them; games never hard-code them. ----
     After the board test, a bigger board is one change here (for example --k-ks-max:2.2). */
  --k-ref-w:960;            /* the reference window (landscape; upright it is turned): a game is designed for 960x640, where the window unit is 1 (an iPad is about 1.2, a 1080p board about 1.7) */
  --k-ref-h:640;
  --k-ku-min:0.75;          /* smallest window unit (a small phone) */
  --k-ku-max:1.6;           /* largest window unit (a very big window) */
  --k-ks-gain:1.25;         /* a whole card / pop-up is this much bigger than the window unit on a tablet, computer or board */
  --k-ks-max:1.9;           /* largest one-piece scale of a card / pop-up / bar (--ks) */
  --k-root-max:2;           /* largest full-screen text scale: in full screen 1rem = 16px x the window unit x Display size, at least 1 (phones and iPads: 1), at most this */
  --k-auto-wide:1600;       /* Display size Auto: a desktop in full screen this wide (CSS px) or wider counts as Large (narrower: Medium); a board is always Large */
  --k-ms:min(var(--k-hs), 1.25);                /* 1.203.148 the menu panel scales with Display size only up to 125%, so Extra large never makes it take over the screen (the bar and its buttons still follow --k-hs) */
  --k-hs:max(var(--k-eff), var(--k-root, 1));    /* scale of the shared full-screen bar and menu: Display size, or the full-screen root scale --k-root (kit.css) when that is bigger */
  --k-hp-font:calc(14.08px * var(--k-ms));     /* 1.203.139 ONE size for every button and segmented choice in the full-screen menu (they used to differ: 13.6px and 14.08px, and .btn.sm won over the first) */
  --k-hp-h:calc(44px * var(--k-ms));
  --k-hud-btn:calc(var(--k-hud-btn-base) * var(--k-hs));
  --k-hud-font:calc(var(--k-hud-font-base) * var(--k-hs));
  --k-panel-w:calc(var(--k-panel-w-base) * var(--k-ms));
  --k-hud-h:calc(var(--k-hud-btn) + 8px);   /* height of the full-screen top bar (was 44px) */
}
/* ---- Game Kit contract, step 2 (1.203.133): foundations only, nothing reads these yet ----
   --ku          one design pixel (--ku-base is set by GICFrame in gic-layout.js; this adds Display size). Write sizes as calc(N * var(--ku)).
   --k-text-min / --k-text-label  smallest reading text (14px) and smallest secondary label (12px); important labels may shrink to 10px, never "..."
   --k-safe-*    the safe frame: device cut-outs (env safe-area) plus the shared edge margin. The full-screen HUD zone (--hud-t / --hud-r) comes from stage.js. */
:root{
  --ku:calc(var(--ku-base,1px) * var(--k-eff,1));
  --k-text-min:14px;                      /* smallest text a student must read (questions, clues, answers, buttons) */
  --k-text-label:12px;                    /* smallest secondary text (badges, captions, small labels) */
  --k-safe-t:calc(env(safe-area-inset-top,0px) + var(--k-edge,4px));
  --k-safe-r:calc(env(safe-area-inset-right,0px) + var(--k-edge,4px));
  --k-safe-b:calc(env(safe-area-inset-bottom,0px) + var(--k-edge,4px));
  --k-safe-l:calc(env(safe-area-inset-left,0px) + var(--k-edge,4px));
}
/* standard loading / error card: .gic-state (data-kind=loading|error) with .gic-state-icon, .gic-state-title, .gic-state-text */
.gic-state{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;text-align:center;max-width:min(92vw,520px);margin:auto;padding:20px;box-sizing:border-box}
.gic-state-icon{font-size:calc(40px * var(--k-eff,1));line-height:1}
.gic-state-title{font-weight:800;font-size:max(var(--k-text-min),calc(22px * var(--k-eff,1)));overflow-wrap:anywhere}
.gic-state-text{font-size:max(var(--k-text-min),calc(16px * var(--k-eff,1)));opacity:.85;overflow-wrap:anywhere}
.gic-state[data-kind=loading] .gic-state-icon{animation:gic-state-pulse 1.2s ease-in-out infinite}
@keyframes gic-state-pulse{0%,100%{opacity:.4}50%{opacity:1}}
@media (prefers-reduced-motion:reduce){.gic-state[data-kind=loading] .gic-state-icon{animation:none}}
html[data-layout=board]{--k-hud-btn-base:52px;--k-hud-font-base:17.6px;--k-hud-m:16px}
html[data-size=medium]{--k-scale:1.12}
html[data-size=large]{--k-scale:1.25}
html[data-size=xlarge]{--k-scale:1.5}
/* short landscape windows (a phone on its side) have no room: Display size is ignored there */
@media (orientation:landscape) and (max-height:560px){:root{--k-eff:1}}

/* Display size choice in the full-screen game menu (assets/js/stage.js) */
.gic-hp-size{display:flex;flex-direction:column;gap:6px;border-top:2px solid var(--line);padding-top:10px}
.gic-hp-size .field-label{font-size:max(var(--k-text-label,12px),calc(12.48px * var(--k-ms,1)));font-weight:800;letter-spacing:.04em;text-transform:uppercase;opacity:.8}
.gic-hp-size .segmented{width:100%;flex-wrap:wrap}
.gic-hp-size .segmented button{flex:1 1 auto;min-height:var(--k-hp-h);font-size:var(--k-hp-font)}

/* Sound row in the full-screen menu (GIC.sound, assets/js/sound.js) */
.gic-hp-snd{display:flex;flex-direction:column;gap:6px;border-top:2px solid var(--line);padding-top:10px}
.gic-hp-snd .field-label{font-size:max(var(--k-text-label,12px),calc(12.48px * var(--k-ms,1)));font-weight:800;letter-spacing:.04em;text-transform:uppercase;opacity:.8}
.gic-hp-snd-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.gic-hud-panel .gic-hp-snd-row .btn{min-height:var(--k-hp-h);font-size:var(--k-hp-font)}   /* .gic-hud-panel in front: game.css .btn.sm would otherwise win */
.gic-hp-snd-row .btn[aria-pressed="false"]{opacity:.65}
.gic-hp-snd-row .btn[aria-pressed="true"]{background:var(--sky);color:var(--hard)}
.gic-hp-snd-row input[type=range]{flex:1 1 120px;min-width:100px;height:calc(32px * var(--k-ms,1))}
/* the shared Sound row replaces a game's own mute button inside the full-screen menu */
html.gic-stage.gic-fs .gic-hud-panel .gic-hp-actions #muteBtn,html.gic-stage.gic-fs .gic-hud-panel .gic-hp-actions .gic-snd{display:none}

/* Score display (stage.js): Bar | Overlay | Hidden. Overlay = see-through chips in the top-left corner of the board, wide landscape screens only (stage.js adds html.gic-hud-ov) */
.gic-hp-act{display:flex;flex-wrap:wrap;align-items:center;gap:8px;border-top:2px solid var(--line);padding-top:10px}
.gic-hp-act[hidden]{display:none}
.gic-hp-act .field-label{flex:0 0 100%;font-size:max(var(--k-text-label,12px),calc(12.48px * var(--k-ms,1)));font-weight:800;letter-spacing:.04em;text-transform:uppercase;opacity:.8}
.gic-hud-panel .gic-hp-act .btn{min-height:var(--k-hp-h);font-size:var(--k-hp-font)}
.gic-hp-status{display:flex;flex-direction:column;gap:6px;border-top:2px solid var(--line);padding-top:10px}
.gic-hp-status .field-label{font-size:max(var(--k-text-label,12px),calc(12.48px * var(--k-ms,1)));font-weight:800;letter-spacing:.04em;text-transform:uppercase;opacity:.8}
.gic-hp-status .segmented{width:100%}
.gic-hp-status .segmented button{flex:1 1 auto;min-height:var(--k-hp-h);font-size:var(--k-hp-font)}
html.gic-stage.gic-fs.gic-hud-ov{--hud-t:0px;--hud-r:0px}
html.gic-stage.gic-fs.gic-hud-ov .gic-hud{right:auto;width:auto;min-height:calc(var(--k-hud-btn,36px) + var(--k-hud-m,12px));max-width:calc(100vw - var(--k-hud-btn,36px) * 2 - 40px);padding:var(--k-hud-m,12px) 0 0 var(--k-hud-m,12px);align-items:center;background:none;box-shadow:none;border:0;z-index:120}
html.gic-stage.gic-fs.gic-hud-ov .gic-hud-stats{pointer-events:none}
html.gic-stage.gic-fs.gic-hud-ov .gic-hud-stats>*{background:rgba(15,23,42,.6);color:#fff;box-shadow:none;padding:3px 12px;opacity:.92}      /* the chip height comes from the one shared rule in game.css */
html.gic-stage.gic-fs.gic-hud-ov .gic-hud-stats>.status.ok{background:rgba(6,78,59,.75);color:#a7f3d0}
html.gic-stage.gic-fs.gic-hud-ov .gic-hud-stats>.status.warn{background:rgba(66,32,6,.78);color:#fde68a}

/* shared menu popover (bridge.js GIC.menu.toggle): the small-screen menu button (.gic-more) opens this under itself */
.gic-mpop{position:fixed;z-index:300;width:min(380px,calc(100vw - 16px));overflow:auto;display:flex;flex-direction:column;gap:10px;padding:12px;background:var(--panel);color:var(--text);border:3px solid var(--hard);border-radius:var(--r,14px);box-shadow:var(--shadow);animation:gicpop .15s ease-out}
.gic-mpop-sec{display:flex;flex-wrap:wrap;align-items:center;gap:8px;position:relative}
.gic-mpop-sec+.gic-mpop-sec{border-top:2px solid var(--line);padding-top:10px}
.gic-mpop-sec .field-label{flex:0 0 100%;font-size:12.48px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;opacity:.8}
.gic-mpop-sec .btn{flex:1 1 calc(50% - 8px);min-height:46px;height:auto;font-size:16px;justify-content:flex-start}   /* fixed size on purpose: Display size must not make this menu overflow the screen */
.gic-mpop-sec .segmented{width:100%;flex-wrap:wrap}.gic-mpop-sec .segmented button{flex:1 1 auto;min-height:40px;font-size:14.4px}
@media (max-height:520px){.gic-mpop{gap:6px;padding:8px}.gic-mpop-sec{gap:6px}.gic-mpop-sec+.gic-mpop-sec{padding-top:6px}.gic-mpop-sec .btn{flex:1 1 calc(33% - 6px);min-height:38px;font-size:14.4px}.gic-mpop-sec .segmented button{min-height:34px}}
@media (max-height:520px){.gic-mpop{width:min(520px,calc(100vw - 16px))}}      /* 1.203.103: a phone held sideways: wide enough that the three buttons per row keep their words on one line, so the menu is shorter and fits */
.gic-mpop-note{font-weight:700;font-size:14.4px;opacity:.85}
.gic-mpop [hidden]{display:none!important}

/* ===== 1.203.102  Game Kit board components (moved out of Balloon Hangman, no visual change): the board frame, the panel, the clue bar (picture + clue + word boxes + missed letters) and the on-screen keyboard, per board shape (data-lay tall|box|wide, data-side).
   A game opts in by putting the k- classes on its markup (k-board, k-panel, k-prompt, k-hint, k-hintpic, k-clue, k-slots, k-word, k-slot, k-punct, k-missed, k-keys, k-krow, k-key) and calling GICShape(board) from gic-layout.js. Colours are still the Balloon Hangman ones. ===== */
.k-board{position:relative;container-type:size;width:min(100%,calc(var(--gic-maxh) * 1.25),1100px);aspect-ratio:5/4;margin:4px auto 0;display:flex;flex-direction:column;border-radius:20px;overflow:hidden;border:4px solid var(--hard);box-shadow:var(--shadow);background:#cfeeff;--kh:clamp(40px,9.6cqw,64px);--kw:min(clamp(24px,8.4cqw,58px),calc((100cqw - 9.1cqw - 1px) / 10));user-select:none;-webkit-user-select:none}
@media (min-width:700px){.k-board{aspect-ratio:16/9;width:min(100%,calc(var(--gic-maxh) * 1.78),1500px)}}
@media (max-width:699px) and (orientation:portrait){.k-board{aspect-ratio:3/4;width:min(100%,calc(var(--gic-maxh) * .75),1100px)}}
@media (max-width:699px) and (orientation:landscape){.k-board{aspect-ratio:16/9;width:min(100%,calc(var(--gic-maxh) * 1.78))}}
.k-panel{position:relative;flex:none;display:flex;flex-direction:column;container-type:inline-size;min-width:0;--m:1;--mr:1;--ms:1}
.k-prompt{flex:1 1 auto;min-height:0;background:#f8fbff;border-top:.4cqw solid #0f172a;padding:calc(var(--m) * 1.3cqw) calc(var(--m) * 2cqw) calc(var(--m) * 1.2cqw);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:calc(var(--m) * .8cqw);color:#0f172a}
.k-hint{display:flex;align-items:center;justify-content:center;gap:calc(var(--m) * 1.6cqw);max-width:100%}
.k-hint[hidden]{display:none}
.k-hintpic{width:calc(var(--m) * 8cqw);height:calc(var(--m) * 8cqw);flex:none;border-radius:1.6cqw;background:#fffdf5;border:.35cqw solid #0f172a;display:grid;place-items:center;overflow:hidden;position:relative;container-type:size}
.k-hintpic[hidden]{display:none}
.k-hintpic img{position:absolute;inset:6%;width:88%;height:88%;object-fit:contain}
.k-hintpic .e{font-size:62cqh;line-height:1;font-family:"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif}
.k-clue{font:700 calc(var(--m) * 2.3cqw)/1.25 'Inter',sans-serif;color:#334155;max-width:70cqw;text-align:center}
.k-clue[hidden]{display:none}
.k-clue::before{content:'Clue: ';color:#7c3aed;font-weight:800}
.k-slots{display:flex;flex-wrap:wrap;justify-content:center;align-items:flex-end;gap:calc(var(--m) * 1.1cqw) calc(var(--m) * 2.4cqw);--sl:5.6cqw}
.k-word{display:inline-flex;gap:calc(var(--m) * .5cqw);flex-wrap:nowrap}
.k-slot{--s:calc(var(--sl) * var(--ms));width:var(--s);height:calc(var(--s) * 1.25);display:grid;place-items:center;background:#fff;border:.3cqw solid #0f172a;border-radius:calc(var(--s) * .2);font:800 calc(var(--s) * .74)/1 'Baloo 2',sans-serif;color:#0f172a;box-shadow:0 .3cqw 0 rgba(15,23,42,.85)}
.k-punct{--s:calc(var(--sl) * var(--ms));display:grid;place-items:end center;width:calc(var(--s) * .5);height:calc(var(--s) * 1.25);font:800 calc(var(--s) * .74)/1 'Baloo 2',sans-serif;color:#0f172a;padding-bottom:calc(var(--s) * .08)}
.k-missed{min-height:calc(var(--m) * 2.6cqw);font:700 calc(var(--m) * 1.9cqw)/1.2 'Inter',sans-serif;color:#be123c;letter-spacing:.12em}
.k-missed span{color:#64748b;letter-spacing:0;margin-right:.8cqw;font-weight:600}
.k-keys{flex:none;background:#e0efff;border-top:.4cqw solid #0f172a;padding:1.1cqw 1.4cqw 1.3cqw;display:flex;flex-direction:column;gap:.7cqw}
.k-krow{display:flex;justify-content:center;gap:.7cqw;flex-wrap:nowrap}
.k-key{width:var(--kw);height:var(--kh);display:grid;place-items:center;border-radius:1.2cqw;border:.3cqw solid #0f172a;background:#fff;color:#0f172a;font:800 calc(var(--kh) * .5)/1 'Baloo 2',sans-serif;cursor:pointer;box-shadow:0 .35cqw 0 rgba(15,23,42,.85);padding:0;touch-action:manipulation;-webkit-tap-highlight-color:transparent;transition:transform .08s,box-shadow .08s}
.k-key:hover:not(:disabled){background:#fef3c7}
.k-key:active:not(:disabled){transform:translateY(.3cqw);box-shadow:0 .05cqw 0 rgba(15,23,42,.85)}
.k-key:disabled{cursor:default;opacity:.85}
.k-key:disabled:not(.hit):not(.bad){opacity:.45}
.k-board[data-lay=wide] .k-slots{--sl:max(30px,3.4cqw)}
.k-board[data-lay=wide] .k-hintpic{width:calc(var(--m) * 5.6cqw);height:calc(var(--m) * 5.6cqw)}
.k-board[data-lay=wide] .k-prompt{padding:.8cqw 1.6cqw;gap:.5cqw}
.k-board[data-lay=wide] .k-missed{min-height:0}
.k-board[data-lay=wide] .k-panel{flex-direction:row;align-items:stretch;border-top:.4cqw solid #0f172a}
.k-board[data-lay=wide] .k-prompt{flex:1 1 0;min-width:0;border-top:0;border-right:.4cqw solid #0f172a}
.k-board[data-lay=wide] .k-keys{flex:0 0 50%;--kh:clamp(40px,4.8cqw,72px);--kw:clamp(34px,4.1cqw,64px);justify-content:center;border-top:0;padding:.8cqw 1cqw;gap:.45cqw}
.k-board[data-lay=wide] .k-krow{gap:.4cqw;flex-wrap:nowrap}
.k-board[data-lay=wide] .k-hint{max-width:100%}
.k-board[data-lay=wide] .k-clue{max-width:26cqw}
.k-board[data-side]{flex-direction:row}
.k-board[data-side] .k-panel{order:1;flex:0 0 56%;min-width:0;flex-direction:column;border-top:0;border-right:1.5px solid rgba(15,23,42,.45)}
.k-board[data-side] .k-prompt{flex:1 1 0;min-height:0;border:0;padding:42px 10px 8px;gap:8px;justify-content:center;overflow:hidden}
.k-board[data-side] .k-hint{flex-direction:row;align-items:center;justify-content:center;gap:10px;max-width:100%}
.k-board[data-side] .k-hintpic{width:68px;height:68px;border-width:1.5px;border-radius:8px}
.k-board[data-side] .k-clue{font:700 17px/1.25 'Inter',sans-serif;max-width:none;min-width:0;text-align:left;overflow-wrap:anywhere}
.k-board[data-side] .k-slots{--sl:40px;gap:6px 14px}
.k-board[data-side] .k-missed{font-size:12px;min-height:0}
.k-board[data-side] .k-keys{flex:none;border-top:1.5px solid rgba(15,23,42,.45);padding:6px 8px;gap:4px;--kh:clamp(36px,10.5cqw,72px);--kw:min(clamp(34px,8cqw,70px),calc((100cqw - 16px - 36px) / 10))}   /* 1.203.82: grows with the panel (an iPad held sideways), same as before on a phone */
.k-board[data-side] .k-krow{gap:4px;flex-wrap:nowrap}
.k-board[data-side] .k-key{border-width:1.5px;border-radius:6px;box-shadow:0 1px 0 rgba(15,23,42,.7)}
.k-board[data-side] :is(.k-slot,.k-punct){--s:calc(48px * var(--ms))}
.k-board[data-lay=box] .k-prompt{flex:0 0 auto;display:grid;grid-template-columns:auto minmax(0,auto);justify-content:center;align-items:center;column-gap:calc(var(--m) * 2.4cqw);row-gap:.6cqw;padding:1.2cqw 2cqw}
.k-board[data-lay=box] .k-hint{display:contents}
.k-board[data-lay=box] .k-hint[hidden]{display:none}
.k-board[data-lay=box] .k-hintpic{grid-column:1;grid-row:1 / span 3;width:min(9cqw,92px);height:min(9cqw,92px)}
.k-board[data-lay=box] .k-clue{grid-column:2;grid-row:1;font-size:clamp(16px,2.1cqw,26px);max-width:60cqw;text-align:left}
.k-board[data-lay=box] .k-slots{grid-column:2;grid-row:2;justify-content:flex-start;--sl:clamp(32px,4.6cqw,54px)}
.k-board[data-lay=box] .k-missed{grid-column:2;grid-row:3;min-height:0;font-size:clamp(12px,1.6cqw,18px)}
.k-board[data-lay=box]{--kh:clamp(40px,7cqw,60px);--kw:clamp(32px,6.4cqw,56px)}
.k-board[data-lay=box] .k-keys{padding:.9cqw 1.4cqw 1cqw;gap:.6cqw}

/* 1.203.112: a game can put a real button among the full-screen chips (data-stage="stat": Hint, topic shuffle); it must stay tappable in Overlay mode */
html.gic-stage.gic-fs.gic-hud-ov .gic-hud-stats>button,html.gic-stage.gic-fs.gic-hud-ov .gic-hud-stats button{pointer-events:auto}

/* ---- Game Kit rule 6 (1.203.140): in full screen (the play view) everything a game writes in rem grows with the window and Display size.
   --k-root is set by GICFrame (gic-layout.js): the window unit (1 at 1280x800) x Display size, never under 1, at most --k-root-max.
   Kit parts that scale as one piece (Start card, dialogs, question card) and the full-screen bar / menu are written in px, so they do not grow twice. */
html.gic-fs{font-size:calc(16px * var(--k-root,1))}

/* 1.203.152 popup scale (docs/popup-rules.md): the shared cards grow on a big full-screen window (--k-pop is set by gic-layout.js, 1 elsewhere) */
.kq-card:not(.watch),.gs-card{zoom:var(--k-pop,1)}
.hp-banner,.lb-banner,.oo-banner,.sb-banner,.ws-banner,.ww-banner{zoom:var(--k-pop,1)}   /* result toasts grow the same way */
.gic-box,.gdet-dlg{zoom:var(--k-pop,1)}

/* /assets/css/game.css */
/* Games In Class — shared styles for every game (loaded inside the play.php iframe) */
:root{--head:var(--sky);--input-bg:var(--bg);--dots:none;--chip-bg:var(--hard);--bg:#0f172a;--panel:#1e293b;--panel2:#273449;--line:#334155;--hard:#020617;--sky:#38bdf8;--purple:#c084fc;--gold:#fbbf24;--green:#10b981;--rose:#f43f5e;--text:#f8fafc;--soft:#cbd5e1;--muted:#94a3b8;--shadow:4px 4px 0 var(--hard);--shadow-sm:2px 3px 0 var(--hard);--r:0.875rem;color-scheme:dark}
*,*::before,*::after{box-sizing:border-box}
[hidden]{display:none!important}
html{background:var(--bg);-webkit-text-size-adjust:100%;text-size-adjust:100%}   /* 1.203.415: iPhones held sideways inflate each block of text by a different amount; keep every game's text the size it was designed at */
html.gic-fith:not(.gic-fs):not(.gic-phone){overflow-y:hidden}   /* 1.203.201: framed in a page that grows the frame to fit (bridge.js notify) - no inner scrollbar flash */
body.embed{margin:0;background:var(--bg);background-image:var(--dots);background-size:1.375rem 1.375rem;color:var(--text);font:400 0.9375rem/1.5 'Inter',system-ui,sans-serif;-webkit-font-smoothing:antialiased}
h1,h2,h3{font-family:'Baloo 2',system-ui,sans-serif;margin:0;line-height:1.15}
h1{font-size:1.6rem;color:var(--head)}h2{font-size:1.25rem;color:var(--head)}h3{font-size:1.1rem}
.app{max-width:80rem;margin:0 auto;padding:1.125rem 1.125rem 1.75rem}
.mark{width:2.875rem;height:2.875rem;flex:none;border-radius:0.75rem;background:var(--green);color:var(--hard);border:3px solid var(--hard);box-shadow:var(--shadow-sm);display:grid;place-items:center;font-size:1.25rem}
.layout{display:grid;grid-template-columns:minmax(18.75rem,23.125rem) minmax(0,1fr);gap:1.25rem;align-items:start}
.col{display:flex;flex-direction:column;gap:1rem;min-width:0}
.panel{background:var(--panel);border:3px solid var(--hard);border-radius:var(--r);box-shadow:var(--shadow);padding:1.125rem;min-width:0}
.center{text-align:center}.muted{color:var(--muted)}
.stack{display:flex;flex-direction:column;gap:1rem}
.row{display:flex;gap:0.625rem;flex-wrap:wrap;align-items:center}.row.between{justify-content:space-between}

.field{display:flex;flex-direction:column;gap:0.375rem}
.field-label{font-weight:700;font-size:.82rem;color:var(--soft);text-transform:uppercase;letter-spacing:.04em;display:flex;justify-content:space-between;align-items:center}
.hint{font-size:.8rem;color:var(--muted);margin:0}
input[type=text],input[type=number],select,textarea{width:100%;padding:0.625rem 0.75rem;font:500 .95rem 'Inter',sans-serif;color:var(--text);background:var(--input-bg);border:3px solid var(--hard);border-radius:0.625rem}
input:focus,select:focus,textarea:focus{outline:none;border-color:var(--sky)}
textarea{resize:vertical;min-height:6rem}
input[type=range]{width:100%;accent-color:var(--sky)}
input[type=checkbox]{width:1.125rem;height:1.125rem;accent-color:var(--sky);flex:none}
.check-row{display:flex;align-items:center;gap:0.625rem;font-weight:600;color:var(--soft);cursor:pointer}
:focus-visible{outline:3px solid var(--gold);outline-offset:2px}
/* 1.203.238: no grey/blue box flashing over whatever a finger taps (phones, tablets, touch boards), and no ring left on a tapped button or tile; keyboard users still get the gold ring above. Typing boxes keep their own outline. */
html{-webkit-tap-highlight-color:transparent}
:where(button,a,summary,[tabindex],[role=button],svg *):focus:not(:focus-visible){outline:none}

.btn{text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:0.5rem;padding:0.625rem 1rem;font:700 .9rem 'Inter',sans-serif;color:var(--text);background:var(--panel2);border:3px solid var(--hard);border-radius:0.625rem;box-shadow:var(--shadow-sm);cursor:pointer;transition:transform .1s,box-shadow .1s,background .15s;touch-action:manipulation}
.btn:hover:not(:disabled){transform:translateY(-1px);box-shadow:3px 4px 0 var(--hard)}
.btn:active:not(:disabled){transform:translateY(2px);box-shadow:1px 1px 0 var(--hard)}
.btn:disabled{opacity:.5;cursor:not-allowed}
.btn.primary{background:var(--sky);color:var(--hard)}.btn.accent{background:var(--green);color:var(--hard)}
.btn.gold{background:var(--gold);color:var(--hard)}.btn.danger{background:var(--rose);color:var(--on-rose)}
.btn.sm{padding:0.375rem 0.6875rem;font-size:.8rem;border-width:2px}.btn.block{width:100%}
.btn-file{position:relative;overflow:hidden}.btn-file input{position:absolute;inset:0;opacity:0;cursor:pointer;font-size:0}
.link-danger{background:none;border:0;color:#fda4af;font-weight:700;cursor:pointer;font-size:.8rem;padding:0}

.segmented{display:flex;border:3px solid var(--hard);border-radius:0.625rem;overflow:hidden;background:var(--bg)}
.segmented button{flex:1;padding:0.5rem 0.375rem;background:transparent;border:0;border-right:2px solid var(--hard);color:var(--soft);font:700 .85rem 'Inter',sans-serif;cursor:pointer}
.segmented button:last-child{border-right:0}
.segmented button[aria-pressed=true]{background:var(--sky);color:var(--hard)}
.segmented button:disabled{opacity:.4;cursor:not-allowed}

.chips{display:flex;flex-wrap:wrap;gap:0.5rem;max-height:12.5rem;overflow:auto}
.chip{display:inline-flex;align-items:center;gap:0.5rem;padding:5px 0.375rem 5px 0.75rem;background:var(--bg);border:2px solid var(--line);border-radius:6.1875rem;font-weight:600;font-size:.85rem;max-width:100%}
.chip span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chip img{width:1.5rem;height:1.5rem;border-radius:0.375rem;object-fit:cover}
.chip button{background:var(--line);border:0;color:var(--text);width:1.375rem;height:1.375rem;border-radius:50%;cursor:pointer;font-size:0.875rem;line-height:1;flex:none}
.chip button:hover{background:var(--rose)}
.chip.found{background:#064e3b;border-color:var(--green);text-decoration:line-through;text-decoration-color:var(--green)}
.chip.warn{border-color:var(--gold);color:var(--gold)}

.status{display:inline-block;font-variant-numeric:tabular-nums;padding:0.375rem 0.75rem;border-radius:0.5rem;font-size:.82rem;font-weight:700}
.status.ok{background:#064e3b;color:#a7f3d0}.status.warn{background:#422006;color:#fde68a}

.stage-head{display:flex;justify-content:space-between;align-items:center;gap:0.75rem;flex-wrap:wrap;margin-bottom:0.875rem}
.stage-foot{margin-top:0.75rem;color:var(--muted);font-size:.85rem;display:flex;justify-content:space-between;gap:0.625rem;flex-wrap:wrap}
.theme-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(5.75rem,1fr));gap:0.5rem}
.theme-btn{padding:0.5rem;border:3px solid var(--hard);border-radius:0.625rem;background:var(--bg);color:var(--soft);font:700 .8rem 'Inter',sans-serif;cursor:pointer}
.theme-btn.active{background:var(--sky);color:var(--hard)}

/* dialogs & toasts (bridge.js). Game Kit 1.203.140: designed ONCE in rem; in full screen the kit's root size (kit.css html.gic-fs) makes them grow with the window
   and Display size, like everything else in the play view. Toasts follow --k-hs (the same scale as the full-screen bar). */
.gic-modal{position:fixed;inset:0;z-index:100;background:rgba(2,6,23,.8);display:flex;align-items:center;justify-content:center;padding:1rem}
.gic-box{background:var(--panel);border:3px solid var(--hard);border-radius:var(--r);box-shadow:var(--shadow);width:100%;max-width:min(35rem,100%);max-height:100%;overflow:auto;padding:1.5rem;text-align:center;animation:gicpop .18s ease-out}
.gic-box h3{color:var(--sky);margin-bottom:0.625rem;font-size:1.7rem}
.gic-body{color:var(--soft);font-size:1.2rem;line-height:1.4;margin-bottom:1.125rem;white-space:pre-line}
.gic-body .big{display:block;font:800 2rem 'Baloo 2',sans-serif;color:var(--gold);line-height:1.2;margin:0.375rem 0}
.gic-actions{display:flex;gap:0.625rem;justify-content:center;flex-wrap:wrap}
.gic-actions .btn{min-height:3rem;font-size:1.1rem;padding:.6em 1.3em}
.gic-box:has(.gic-howto){max-width:min(40rem,100%)}
.gic-howto{text-align:left;white-space:normal;max-height:60vh;overflow:auto}
.gic-howto h2{font-size:1.25rem;color:var(--sky);margin:0.875rem 0 0.375rem}
.gic-howto h2:first-child{margin-top:0}
.gic-howto p{margin:0 0 0.625rem;line-height:1.5;font-size:1.1rem}
.gic-howto ul{margin:0 0 0.625rem;padding-left:1.375rem;text-align:left}
.gic-howto li{margin-bottom:4px;line-height:1.4;font-size:1.1rem}
.gic-howto strong{color:var(--text)}
.gic-toasts{position:fixed;bottom:1rem;left:50%;transform:translateX(-50%);z-index:120;display:flex;flex-direction:column;gap:0.5rem;align-items:center;pointer-events:none;width:calc(100% - 1.5rem);max-width:calc(28.75rem * var(--k-hs,1))}
.gic-toast{background:var(--panel2);border:3px solid var(--hard);box-shadow:var(--shadow-sm);padding:.7em 1.1em;border-radius:0.625rem;font-weight:700;font-size:calc(1.05rem * var(--k-hs,1));text-align:center}
.gic-toast.error{background:var(--rose)}.gic-toast.success{background:var(--green);color:var(--hard)}
@keyframes gicpop{from{transform:scale(.94);opacity:0}}

:fullscreen,::backdrop{background:var(--bg)}
:fullscreen{overflow:auto;padding:1rem}

.print-only{display:none}
@media(max-width:900px){.layout{grid-template-columns:1fr}.app{padding:0.75rem}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
/* Motion: Reduced (the Motion setting, assets/js/gic-layout.js): animations and transitions finish at once but still END, so code that waits for animationend / transitionend keeps working */
html[data-motion=reduced] *:not(.fa-spin):not(.gic-busy):not([data-gfx-keep]),html[data-motion=reduced] *:not(.fa-spin):not(.gic-busy)::before,html[data-motion=reduced] *:not(.fa-spin):not(.gic-busy)::after{animation-duration:.001ms!important;animation-delay:0s!important;animation-iteration-count:1!important;transition-duration:.001ms!important;transition-delay:0s!important;scroll-behavior:auto!important}
@media print{
  html,body.embed{background:#fff!important;color:#000}
  .no-print,.gic-modal,.gic-toasts{display:none!important}
  .print-only{display:block!important}
  .app{padding:0;max-width:none}
}

/* ================= LIGHT THEME (matches the site) ================= */
html[data-theme=light]{
  --bg:#e2e8f0;--panel:#ffffff;--panel2:#f1f5f9;--line:#cbd5e1;--hard:#1e293b;
  --sky:#0ea5e9;--purple:#7c3aed;--gold:#f59e0b;--green:#10b981;--rose:#e11d48;
  --text:#1e293b;--soft:#475569;--muted:#64748b;--head:#0369a1;--input-bg:#ffffff;--chip-bg:#e2e8f0;
  --dots:radial-gradient(#cbd5e1 1.5px,transparent 1.5px);color-scheme:light}
html[data-theme=light] .status.ok{background:#d1fae5;color:#065f46}
html[data-theme=light] .status.warn{background:#fef3c7;color:#92400e}
html[data-theme=light] .chip.found{background:#d1fae5}
html[data-theme=light] .link-danger{color:#be123c}
html[data-theme=light] .btn.danger{color:#fff}
html[data-theme=light] .gic-modal{background:rgba(30,41,59,.55)}
html[data-theme=light] .gic-box h3{color:#0369a1}
html[data-theme=light] .gic-body .big{color:#d97706}
html[data-theme=light] .gic-howto h2{color:#0369a1}
/* per-game surfaces */
html[data-theme=light] .ws-board[data-th=slate] .ws-cell{background:#e2e8f0;color:#1e293b;box-shadow:inset 0 0 0 2px #cbd5e1}      /* 1.203.369: only the default Slate look turns light on the light site; the other themes keep their own colours */
html[data-theme=light] .ws-board[data-th=slate] .ws-cell:hover{background:#cbd5e1}
html[data-theme=light] .cell{background:#eaf0f8;box-shadow:inset 0 0 0 1px #cbd5e1}
html[data-theme=light] .cell.wall{background:repeating-linear-gradient(45deg,#94a3b8 0 0.375rem,#8697ad 0.375rem 0.75rem);box-shadow:inset 0 0 0 2px #64748b}
html[data-theme=light] .cell.exitc{background:#bbf7d0}
html[data-theme=light] .msg.ok{color:#047857}html[data-theme=light] .msg.bad{color:#be123c}html[data-theme=light] .msg.hint{color:#b45309}
html[data-theme=light] .bchip.cur{color:#b45309}
html[data-theme=light] .target{color:var(--text)}
html[data-theme=light] .sp-help h3{color:#7c3aed}html[data-theme=light] .sp-card h2{color:#d97706}
html[data-theme=light] .btn.danger,html[data-theme=light] .sp-entry .mini.del:hover{color:#fff}
html[data-theme=light] .sp-modal{background:rgba(30,41,59,.55)}
html[data-theme=light] .wheel-ring::before{border-color:#fff}
html[data-theme=light] .pic-stage{background:#fff}

/* ================= FULL SCREEN (driven by the parent page; works on touchscreens & phones) ================= */
.fs-only{display:none!important}
html.gic-fs .fs-only{display:flex!important}
html.gic-fs .no-fs{display:none!important}
html.gic-fs,html.gic-fs body.embed{height:100%}
html.gic-fs body.embed{overflow:auto;-webkit-overflow-scrolling:touch}
html.gic-fs .app{max-width:none;padding:0.5rem 0.625rem}
.gic-fs-exit{position:fixed;top:0.5rem;right:0.5rem;z-index:200;width:2.875rem;height:2.875rem;border-radius:0.75rem;border:3px solid var(--hard);background:var(--panel);color:var(--text);box-shadow:var(--shadow-sm);font-size:1.15rem;cursor:pointer;display:none;place-items:center;padding:0;opacity:.9}
html.gic-fs .gic-fs-exit{display:grid}

/* ================= DIALOG SHELL (.gic-pk, used by the PDF export dialog in pdfexport.js) ================= */
.gic-pk{position:fixed;inset:0;z-index:150;background:rgba(2,6,23,.8);display:flex;align-items:center;justify-content:center;padding:0.75rem}
html[data-theme=light] .gic-pk{background:rgba(30,41,59,.55)}
.gic-pk-box{background:var(--panel);border:3px solid var(--hard);border-radius:var(--r);box-shadow:var(--shadow);width:min(100%,51.25rem);max-height:calc(92 * var(--vh,1vh));display:flex;flex-direction:column;animation:gicpop .18s ease-out}
.gic-pk-head{display:flex;align-items:center;gap:0.625rem;padding:0.875rem 1rem;border-bottom:2px solid var(--line)}
.gic-pk-head h3{flex:1;margin:0;color:var(--head)}
.gic-x{border:0;background:none;color:var(--muted);font-size:1.8rem;line-height:1;cursor:pointer;padding:0 4px}
.gic-x:hover{color:var(--text)}
.gic-crumbs{display:flex;gap:4px;flex-wrap:wrap;align-items:center;font-weight:700;font-size:.85rem;flex:1;min-width:0}
.gic-crumbs button{background:none;border:0;color:var(--sky);font:inherit;cursor:pointer;padding:2px 4px}
.gic-crumbs span{color:var(--muted)}
.gic-pk-body{padding:0.75rem 1rem;overflow:auto;flex:1;min-height:13.75rem}
.gic-pk-foot{display:flex;gap:0.625rem;justify-content:space-between;align-items:center;padding:0.75rem 1rem;border-top:2px solid var(--line);flex-wrap:wrap}
.gic-note{font-size:.8rem;color:var(--muted)}

/* ---------- PDF export dialog ---------- */
.gic-pdf-box{max-width:28.75rem}
.gic-pdf-body{display:flex;flex-direction:column;gap:0.875rem;padding:1rem 1.125rem}
.gic-pdf-body .segmented{width:100%}
.gic-pdf-body .segmented button{flex:1}
/* PDF dialog with a live preview (pdfexport.js). pdfexport.js measures the dialog and sets data-mode="split" (wide: options left, preview right) or "tabs" (narrow: a Preview | Options switch), and adds .short on short screens (a phone held sideways: compact, and the preview fits the width and scrolls). */
.gic-pk.gic-pv-ov{padding:0;z-index:400}
.gic-pdf-box.gic-pv{width:100%;max-width:none;height:100%;max-height:none;border-width:0;border-radius:0;overflow:hidden;margin:0}
html.gic-vp .gic-pdf-box.gic-pv{height:var(--vp-h,100%)}
.gic-pv .gic-pk-head{padding:0.5rem 0.75rem;flex:none;flex-wrap:wrap}.gic-pv .gic-pk-head h3{font-size:1.05rem}
.gic-pv-tabs{order:3;flex:0 0 100%}
.gic-pv-tabs .segmented{width:100%}.gic-pv-tabs .segmented button{flex:1;padding:0.625rem 0.375rem}
.gic-pv-wrap{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}
.gic-pv-side{flex:1;min-height:0;display:flex;flex-direction:column;gap:0.375rem;padding:0.5rem 0.75rem;background:var(--bg)}
.gic-pv-bar{display:flex;align-items:center;justify-content:center;gap:0.625rem;font:700 .82rem 'Inter',sans-serif;color:var(--soft);min-height:2rem;flex:none;flex-wrap:wrap}
.gic-pv-nav{padding:2px 0.75rem;min-height:1.875rem;font-size:1.1rem;line-height:1}
.gic-pv-nav[hidden],.gic-pv-upd[hidden]{display:none}
.gic-pv-stage{flex:1;min-height:0;position:relative;display:flex;align-items:center;justify-content:center;overflow:hidden}
.gic-pv-page{background:#fff;box-shadow:0 2px 10px rgba(0,0,0,.4);border-radius:2px;transition:opacity .15s;flex:none}
.gic-pv-page[hidden],.gic-pv-msg[hidden]{display:none}
.gic-pv-msg{color:var(--soft);font-weight:600;text-align:center;padding:1rem}
.gic-pv-busy{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:none;padding:0.375rem 0.875rem;border-radius:6.1875rem;background:rgba(15,23,42,.85);color:#fff;font:700 .8rem 'Inter',sans-serif;white-space:nowrap;z-index:2}
.gic-pv.busy .gic-pv-busy{display:block}
.gic-pv.busy .gic-pv-page,.gic-pv.stale .gic-pv-page{opacity:.45}
.gic-pdf-box.gic-pv .gic-pdf-body{flex:1;min-height:0;overflow:auto;padding:0.875rem 0.875rem 1.25rem;-webkit-overflow-scrolling:touch}
.gic-pv .gic-pk-foot{flex:none;padding:0.5rem 0.75rem;flex-wrap:nowrap}
.gic-pv .gic-pk-foot .gic-note{display:none}
.gic-pv .gic-pk-foot .row{width:100%;display:flex;gap:0.5rem}.gic-pv .gic-pk-foot .row .btn{flex:1}
/* tabs mode: only one of the two panes at a time */
.gic-pv[data-mode=tabs] .gic-pv-wrap[data-tab=pv] .gic-pdf-body{display:none}
.gic-pv[data-mode=tabs] .gic-pv-wrap[data-tab=opt] .gic-pv-side{display:none}
/* split mode: tablet / desktop window */
.gic-pv[data-mode=split] .gic-pv-tabs{display:none}
.gic-pv[data-mode=split] .gic-pv-wrap{flex-direction:row}
.gic-pv[data-mode=split] .gic-pdf-body{order:2;width:21.25rem;flex:none;display:flex;flex-direction:column;gap:0.875rem;border-left:2px solid var(--line)}
.gic-pv[data-mode=split] .gic-pv-side{order:1;flex:1;min-width:0;padding:0.75rem}
.gic-pv[data-mode=split] .gic-pk-foot{flex-wrap:wrap;padding:0.75rem 1rem}.gic-pv[data-mode=split] .gic-pk-foot .gic-note{display:block}.gic-pv[data-mode=split] .gic-pk-foot .row{width:auto}.gic-pv[data-mode=split] .gic-pk-foot .row .btn{flex:none}
.gic-pv[data-mode=split] .gic-pk-head{padding:0.875rem 1rem}.gic-pv[data-mode=split] .gic-pk-head h3{font-size:inherit}
.gic-pk.gic-pv-ov.is-split{padding:0.75rem}
.gic-pv-ov,.gic-pv-wrap,.gic-pv-stage,.gic-pdf-body{overscroll-behavior:contain}
.gic-pv-ov{touch-action:pan-y}
.gic-pdf-box.gic-pv[data-mode=split]{max-width:62.5rem;width:min(100%,62.5rem);height:min(calc(92 * var(--vh,1vh)),860px);border-width:3px;border-radius:var(--r);margin:auto}
html.gic-vp .gic-pdf-box.gic-pv[data-mode=split]{height:min(var(--vp-h,92vh),860px)}
/* short screens (phone held sideways): title and switch share one row, the page fits the width and scrolls */
.gic-pv.short .gic-pk-head{padding:4px 0.625rem;flex-wrap:nowrap;gap:0.5rem}.gic-pv.short .gic-pk-head h3{font-size:.95rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1 1 0;min-width:0}
.gic-pv.short .gic-pv-tabs{order:0;flex:0 0 auto;width:min(20rem,52%)}.gic-pv.short .gic-pv-tabs .segmented button{padding:0.375rem 0.375rem}
.gic-pv.short .gic-pv-side{padding:4px 0.625rem}.gic-pv.short .gic-pv-bar{min-height:1.75rem}
.gic-pv.short .gic-pv-stage{overflow:auto;align-items:flex-start;-webkit-overflow-scrolling:touch}
.gic-pv.short .gic-pv-page{margin:0 auto}
/* short + wide (phone held sideways): the whole screen, preview left, options right, slim title and buttons */
.gic-pk.gic-pv-ov.is-split.is-short{padding:0}
.gic-pdf-box.gic-pv.short[data-mode=split]{width:100%;max-width:none;height:100%;border-width:0;border-radius:0;margin:0}
html.gic-vp .gic-pdf-box.gic-pv.short[data-mode=split]{height:var(--vp-h,100%)}
.gic-pv.short[data-mode=split] .gic-pk-foot{padding:5px 0.625rem;flex-wrap:nowrap}
.gic-pv.short[data-mode=split] .gic-pk-foot .gic-note{display:none}
.gic-pv.short[data-mode=split] .gic-pk-foot .row{width:100%}.gic-pv.short[data-mode=split] .gic-pk-foot .row .btn{flex:1}
.gic-pv.short[data-mode=split] .gic-pk-head h3{font-size:.95rem}
.gic-pv.short[data-mode=split] .gic-pdf-body{width:min(18.75rem,42%);padding:0.625rem 0.75rem;gap:0.625rem}
.gic-pv.short[data-mode=split] .gic-pk-head{padding:4px 0.75rem}
.gic-pv.short .gic-pk-foot{padding:5px 0.625rem}.gic-pv.short .gic-pk-foot .btn{padding-top:0.375rem;padding-bottom:0.375rem}

/* ---------- shared game header (game_head() in includes/game_shell.php) ---------- */
.gic-head{display:flex;justify-content:space-between;align-items:center;gap:0.875rem 1.125rem;flex-wrap:wrap;margin-bottom:1.125rem;background:var(--panel);border:3px solid var(--hard);border-radius:var(--r);box-shadow:var(--shadow);padding:0.875rem 1.125rem}
.gic-head-id{display:flex;align-items:center;gap:0.875rem;min-width:0;flex:1 1 100%}      /* 1.203.36: the name and description always get their own row; the buttons always sit on the row below (before, a long description was squeezed into a narrow column beside the buttons) */
.gic-head-text{min-width:0}
.gic-head-text h1{font-size:1.5rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.gic-head-text p{margin:2px 0 0;color:var(--muted);font-size:.9rem;line-height:1.35;max-width:100ch;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;cursor:pointer}.gic-head-text p.open{-webkit-line-clamp:unset;display:block}
.gic-head-right{display:flex;align-items:center;gap:0.625rem 0.75rem;flex-wrap:wrap;justify-content:flex-start;flex:1 1 100%}
.gic-head-actions{display:flex;gap:0.5rem;flex-wrap:wrap;justify-content:flex-start}
.gic-pill{display:inline-block;padding:1px 0.5rem;border-radius:6.1875rem;background:var(--panel2);border:2px solid var(--hard);font-size:.7rem;font-weight:800;color:var(--soft);vertical-align:middle}
.rank-badge{display:inline-flex;align-items:center;gap:0.5rem;font-weight:800;font-size:.82rem;padding:0.4375rem 0.875rem;border-radius:6.1875rem;border:3px solid var(--hard);background:var(--panel2);color:var(--soft)}
.rank-badge.on,.rank-badge.ok{background:var(--green);color:var(--hard)}.rank-badge.guest{background:var(--gold);color:var(--hard)}
.rank-badge:empty{display:none}
.btn.liked{background:var(--rose);color:var(--on-rose)}
.hide-xs{display:inline}
@media(max-width:560px){.hide-xs{display:none}.gic-head{padding:0.75rem}.gic-head-text h1{font-size:1.25rem}}

/* ---------- standard "content source" row used by every game: Upload pictures / From my library / Import from… / Download PDF… ---------- */
.gic-source-row{display:flex;flex-wrap:wrap;gap:0.5rem}
.gic-source-row .btn{flex:0 1 auto}
.gic-source-row .btn i{font-size:.9em}

/* ---------- inline help tooltips: <button type="button" class="gic-tip" data-tip="…">?</button> next to a label or control ---------- */
.gic-tip{display:inline-flex;align-items:center;justify-content:center;width:1.125rem;height:1.125rem;flex:none;border-radius:50%;border:none;background:var(--chip-bg);color:var(--muted);font-size:.72rem;font-weight:800;line-height:1;cursor:help;position:relative;vertical-align:middle;margin-left:5px;padding:0}
.gic-tip:hover,.gic-tip:focus-visible,.gic-tip.open{background:var(--sky);color:var(--hard);outline:none}
.gic-tip::after{content:attr(data-tip);position:absolute;left:50%;bottom:calc(100% + 0.5625rem);transform:translateX(-50%);background:var(--hard);color:#fff;padding:0.5rem 0.6875rem;border-radius:0.5625rem;font-size:.78rem;font-weight:600;line-height:1.35;white-space:normal;width:max-content;max-width:14.375rem;box-shadow:0 4px 14px rgba(0,0,0,.3);opacity:0;visibility:hidden;pointer-events:none;transition:opacity .12s;z-index:60;text-align:left}
.gic-tip::before{content:'';position:absolute;left:50%;bottom:calc(100% + 3px);transform:translateX(-50%);border:6px solid transparent;border-top-color:var(--hard);opacity:0;visibility:hidden;transition:opacity .12s;z-index:60}
.gic-tip:hover::after,.gic-tip:focus-visible::after,.gic-tip.open::after,.gic-tip:hover::before,.gic-tip:focus-visible::before,.gic-tip.open::before{opacity:1;visibility:visible}

/* ---- full screen: the board fills the space that is left, centred (sizes set by GIC.fit in bridge.js) ---- */
.gic-fitting,.gic-fitting *:not([data-fit-keep]),.gic-fitting *:not([data-fit-keep])::before,.gic-fitting *:not([data-fit-keep])::after{transition:none!important}   /* 1.203.242: on the fitted box only (was on html) */
/* data-fit-keep: a spinning die / coin / card keeps its transition through a re-fit, otherwise a roll started a moment before the re-fit would jump to its end (1.95.0) */
html.gic-fs .gic-fit-box{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start}
html.gic-fs .gic-fit-box .stage-head{flex:none}
html.gic-fs .app{padding:0.5rem 0.625rem}
html.gic-fs body.embed{overscroll-behavior:none}

/* ================= LOCKED CREATIONS =================
   The server puts data-lock on <html> for visitors who may not edit:  1 = gameplay options only · 2 = play & print only.
   Games mark their markup:  .gic-editor = the whole editing column · .gic-edit = content editing (hidden at 1 and 2)
                             .gic-opts   = gameplay options        (hidden only at 2) */
html[data-lock] .gic-edit{display:none!important}
html[data-lock="2"] .gic-opts,html[data-lock="2"] .gic-editor{display:none!important}
html[data-lock="2"] .layout{grid-template-columns:minmax(0,1fr)}
.gic-pill-lock{background:#422006;border-color:#f59e0b;color:#fde68a}
html[data-theme=light] .gic-pill-lock{background:#fef3c7;color:#92400e}

/* full screen on small screens: use nearly all of the width */
html.gic-fs:fullscreen{padding:0}
@media(max-width:700px){html.gic-fs .app{padding:0.375rem}}

/* ===== Import / picture dialogs: tab strip and the built-in "Site pictures" browser ===== */


/* ===== Import dialog: compact "My lists" and creation lists ===== */
.gic-set-toggle{display:flex;align-items:center;gap:0.5rem;width:100%;margin:0.5rem 0 0.375rem;padding:0.5rem 4px;border:0;border-bottom:2px solid var(--line);background:transparent;color:var(--text);font:600 .92rem 'Inter',sans-serif;cursor:pointer;text-align:left}
.gic-set-toggle:first-child{margin-top:0}
.gic-set-toggle i{font-size:.72rem;color:var(--muted);transition:transform .15s}
.gic-set-toggle.open i{transform:rotate(90deg)}

/* ===== Live games (student side): top bar, waiting room, countdown, results ===== */
html.gic-live .gic-fs-exit{display:none!important}
html.gic-live body.embed{padding-top:2.875rem}
html.gic-live #restartBtn{display:none!important}
html.gic-live .gic-editor,html.gic-live .gic-set{display:none!important}
.gl-hud{position:fixed;top:0;left:0;right:0;height:2.875rem;z-index:250;display:flex;align-items:center;justify-content:space-between;gap:0.625rem;padding:0 0.875rem;background:var(--panel);border-bottom:3px solid var(--hard);font-weight:800;font-size:1rem}
.gl-nick{display:flex;align-items:center;gap:0.5rem;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.gl-nick small{font-weight:700;color:var(--soft)}
.gl-mid{font:800 1.3rem 'Baloo 2','Inter',sans-serif;font-variant-numeric:tabular-nums}
.gl-right{color:var(--soft);font-size:.9rem;white-space:nowrap}
.gl-fsb{border:2px solid var(--hard);background:var(--panel);color:var(--text);border-radius:0.5rem;width:2.125rem;height:1.875rem;cursor:pointer;margin-left:-2px;display:grid;place-items:center;font-size:.9rem;pointer-events:auto}
@media(max-width:700px){.gl-fsb{display:none}}
.gl-dot{display:inline-block;width:0.875rem;height:0.875rem;border-radius:50%;border:2px solid var(--hard);flex:none;vertical-align:middle}
.gl-ov{position:fixed;inset:2.875rem 0 0 0;z-index:240;display:flex;align-items:flex-start;justify-content:center;overflow:auto;padding:1.125rem 0.875rem;background:var(--bg,#0f172a)}
.gl-ov.gl-dark{background:rgba(2,6,23,.96);align-items:center}
.gl-card{width:min(35rem,100%);text-align:center;margin:auto 0}
.gl-card h2{font-size:clamp(1.5rem,5vw,2.2rem);margin:0.375rem 0 0.625rem}
.gl-card h3{margin:1rem 0 0.375rem;font-size:1rem;color:var(--soft)}
.gl-card p{font-size:1.1rem;margin:0.5rem 0}
.gl-emoji{font-size:clamp(3rem,12vw,5rem);line-height:1}
.gl-sub{color:var(--soft);font-weight:700;font-size:1rem!important}
.gl-teamline{font-weight:700}
.gl-count .gl-num{font:800 min(46vw,16rem)/1 'Baloo 2','Inter',sans-serif;color:var(--sky);animation:glbeat 1s ease infinite}
@keyframes glbeat{0%{transform:scale(.6);opacity:0}25%{transform:scale(1.08);opacity:1}100%{transform:scale(1)}}
.gl-me{display:flex;justify-content:center;gap:0.75rem;margin:0.75rem 0}
.gl-me>div{background:var(--panel2);border:3px solid var(--hard);border-radius:0.75rem;padding:0.5rem 1.125rem;min-width:5.25rem}
.gl-me b{display:block;font:800 1.8rem/1.1 'Baloo 2','Inter',sans-serif;font-variant-numeric:tabular-nums}
.gl-me small{color:var(--soft);font-weight:700}
.gl-board{list-style:none;margin:0.625rem 0;padding:0;display:flex;flex-direction:column;gap:0.375rem;text-align:left}
.gl-board li{display:grid;grid-template-columns:2em 1fr auto;gap:0.5rem;align-items:center;padding:0.4375rem 0.75rem;border:2px solid var(--line);border-radius:0.625rem;background:var(--panel2);font-weight:700}
.gl-board li.me{border-color:var(--gold);box-shadow:3px 3px 0 var(--gold)}
.gl-board .rk{color:var(--soft);text-align:center}.gl-board .nm{display:flex;align-items:center;gap:0.5rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.gl-board .sc{font-variant-numeric:tabular-nums}
.gl-teams{display:flex;flex-wrap:wrap;gap:0.5rem;justify-content:center;margin:0.625rem 0}
.gl-team{display:flex;align-items:center;gap:0.5rem;padding:0.375rem 0.875rem;border:3px solid var(--hard);border-radius:0.625rem;background:var(--panel2);font-weight:700}
.gl-team.first{border-color:var(--gold)}
.gl-btn{display:inline-block;padding:0.75rem 1.5rem;border:3px solid var(--hard);border-radius:0.625rem;background:var(--green);color:var(--hard);font-weight:800;text-decoration:none;box-shadow:var(--shadow-sm)}
.gl-host{display:grid;gap:0.75rem}
html.gic-live .mm-board{margin-left:auto;margin-right:auto}

/* ---- Collapsible option groups (any game: <details class="gic-grp"><summary>…</summary>…</details>) ---- */
.gic-grp{border-top:2px dashed var(--line);padding-top:0.625rem;display:flex;flex-direction:column;gap:0.625rem}
.gic-grp>summary{cursor:pointer;font:700 1rem 'Baloo 2','Inter',sans-serif;color:var(--sky);list-style:none;display:flex;align-items:center;gap:0.5rem;user-select:none;padding:2px 0}
.gic-grp>summary::-webkit-details-marker{display:none}
.gic-grp>summary i{width:1.1em;text-align:center;font-size:.85em;opacity:.9}
.gic-grp>summary::after{content:'\f078';font-family:'Font Awesome 6 Free';font-weight:900;font-size:.7rem;margin-left:auto;transition:transform .15s}
.gic-grp[open]>summary::after{transform:rotate(180deg)}
.gic-grp:not([open]){padding-bottom:0}

/* Options docked under the game screen (see game_end() in includes/game_shell.php) */
html[data-lock] .layout.gic-docked:not(.gic-kept){grid-template-columns:minmax(0,1fr)}
html[data-lock] .layout.gic-docked:not(.gic-kept)>.gic-editor{display:none}
html.gic-live .gic-docked-opts{display:none!important}
.gic-docked-opts{gap:0.75rem}
.gic-docked-opts .grid2{grid-template-columns:repeat(auto-fit,minmax(12.5rem,1fr))}

/* Collapsible panels (details.gic-pan) */
.gic-pan>summary{cursor:pointer;list-style:none;display:flex;align-items:center;gap:0.5rem;font-weight:800;font-size:1.05rem;margin:0;user-select:none}
.gic-pan>summary::-webkit-details-marker{display:none}
.gic-pan>summary i{width:1.1em;text-align:center;opacity:.9}
.gic-pan>summary::after{content:'\f078';font-family:'Font Awesome 6 Free';font-weight:900;font-size:.75rem;margin-left:auto;transition:transform .15s}
.gic-pan[open]>summary::after{transform:rotate(180deg)}
.gic-pan[open]>summary{margin-bottom:0.75rem}
.gic-pan>.gic-pan-body{display:flex;flex-direction:column;gap:0.75rem}

/* ======================================================================================================
   SMALL SCREENS (phones & small tablets).  Desktop layout above is untouched.
   1) the game screen comes first (right after the game header); editing panels follow it
   2) a compact, tidy game header   3) popups centre on the part of the page the player can see
   ====================================================================================================== */

/* -- popups/toasts: the iframe is as tall as the whole page, so the parent tells us which slice is visible (--vp-top / --vp-h, bridge.js) -- */
html.gic-vp .gic-modal,html.gic-vp .gic-pk,html.gic-vp .pp-ov,html.gic-vp .pres,html.gic-vp .sp-modal,html.gic-vp .wb-modal,html.gic-vp .gicr-ov{inset:auto;left:0;right:0;top:var(--vp-top,0px);height:var(--vp-h,100%);bottom:auto}
html.gic-vp .gic-toasts{bottom:auto;top:calc(var(--vp-top,0px) + var(--vp-h,100vh) - 14px);transform:translate(-50%,-100%)}
html.gic-vp .reopen-tab{top:calc(var(--vp-top,0px) + var(--vp-h,100vh) / 2)}
/* any dialog taller than the screen scrolls instead of being cut off */
.gic-modal,.pp-ov,.sp-modal,.wb-modal{overflow:auto}
.gic-box,.gic-pdf-box,.pp-box,.sp-card{max-height:100%;overflow:auto;margin:auto}
.gic-pk-box{max-height:100%}
html.gic-vp .gic-pk-box{max-height:var(--vp-h,92vh)}

@media(max-width:900px){
  /* the game screen first, then the editing / options panels */
  .layout>.gic-editor{order:2}
  .layout>*{min-width:0}
}

@media(max-width:700px){
  .app{padding:0.5rem 0.5rem 1.375rem}
  .layout,.col{gap:0.75rem}
  .panel{padding:0.75rem;box-shadow:3px 3px 0 var(--hard)}
  html:not(.gic-fs) #stage.panel{padding:0.5rem}
  .stage-head{gap:0.5rem;margin-bottom:0.5rem}
  .stage-foot{margin-top:0.5rem;font-size:.8rem}
  h2{font-size:1.15rem}
  .gic-box{padding:1.125rem}
  .gic-box h3{font-size:1.5rem}
  .gic-body{font-size:1.15rem;margin-bottom:0.875rem}
  .gic-modal,.gic-pk,.pp-ov{padding:0.5rem}
  .gic-pk-head{padding:0.625rem 0.75rem}.gic-pk-body{padding:0.625rem 0.75rem;min-height:10rem}.gic-pk-foot{padding:0.625rem 0.75rem}
  .btn{padding:0.5625rem 0.8125rem}

  /* ---- compact game header ---- */
  .gic-head{padding:0.625rem;gap:0.5rem;margin-bottom:0.625rem;box-shadow:3px 3px 0 var(--hard)}
  .gic-head-id{flex:1 1 100%;gap:0.625rem;align-items:flex-start}
  .gic-head .mark{width:2.5rem;height:2.5rem;border-radius:0.625rem;font-size:1.0625rem;border-width:2px;margin-top:1px}
  .gic-head-text{flex:1;min-width:0}
  .gic-head-text h1{font-size:1.2rem;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:break-word}
  .gic-head-text p{font-size:.8rem;margin-top:3px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;cursor:pointer}
  .gic-head-text p.open{-webkit-line-clamp:unset;display:block}
  .gic-head-right{flex:1 1 100%;justify-content:flex-start;gap:0.5rem;width:100%}
  .gic-head-actions{width:100%;justify-content:flex-start;gap:0.375rem;flex-wrap:wrap}
  .gic-head-actions .btn.sm{min-height:2.375rem;padding:0.375rem 0.625rem;font-size:.82rem}
  /* the main action (Save) stretches; icon buttons stay square */
  .gic-head-actions .btn.accent{flex:1 1 auto}
  .gic-head-actions .btn.sm:not(.accent){flex:0 0 auto;min-width:2.5rem}
  .rank-badge{font-size:.75rem;padding:4px 0.625rem;border-width:2px}
  .rank-badge:not(:empty){flex:1 1 100%;justify-content:center}
}
@media(max-width:380px){
  .gic-head-text h1{font-size:1.1rem}
  .gic-head-actions .btn.sm:not(.accent){min-width:2.25rem;padding:0.375rem 0.5rem}
}
html.gic-vp .wb-dlg,html.gic-vp .sp-card,html.gic-vp .gic-box{max-height:calc(var(--vp-h,100vh) - 16px)}
html.gic-vp .pp-box{height:min(calc(var(--vp-h,100vh) - 16px),720px)}

/* short landscape screens (phones turned sideways): a slim one-row header so the game keeps the height */
@media(max-height:520px) and (orientation:landscape){
  .app{padding:0.5rem 0.625rem 1rem}
  .gic-head{flex-wrap:nowrap;align-items:center;padding:0.375rem 0.625rem;margin-bottom:0.5rem;gap:0.625rem}
  .gic-head-id{flex:1 1 auto;min-width:0;align-items:center}
  .gic-head .mark{width:2rem;height:2rem;font-size:0.9375rem;border-width:2px}
  .gic-head-text h1{font-size:1.05rem;white-space:nowrap;display:block;overflow:hidden;text-overflow:ellipsis}
  .gic-head-text p{display:none}
  .gic-head-right{flex:0 0 auto;width:auto}
  .gic-head-actions{width:auto;flex-wrap:nowrap}
  .gic-head .hide-xs{display:none}
  .gic-head-actions .btn.sm{min-height:2.125rem;padding:5px 0.625rem}
  .gic-head-actions .btn.accent{flex:0 0 auto}
  .rank-badge:not(:empty){flex:0 0 auto}
}

/* the "Use" menu in the game header */
.gic-menu{position:absolute;z-index:60;min-width:16.875rem;max-width:min(340px,92vw);background:var(--panel);border:3px solid var(--hard);border-radius:0.875rem;box-shadow:var(--shadow);padding:0.375rem;display:flex;flex-direction:column;gap:2px}
.gic-mi{display:flex;gap:0.75rem;align-items:flex-start;text-align:left;border:0;background:transparent;color:var(--text);padding:0.5625rem 0.625rem;border-radius:0.625rem;cursor:pointer;font:inherit}
.gic-mi:hover:not(:disabled),.gic-mi:focus-visible{background:var(--panel2)}
.gic-mi:disabled{opacity:.5;cursor:default}
.gic-mi>i{width:1.25rem;text-align:center;color:var(--sky);margin-top:3px}
.gic-mi span{display:flex;flex-direction:column;line-height:1.25}.gic-mi b{font-size:.92rem}.gic-mi small{color:var(--muted);font-size:.78rem}

/* ================= FULL-SCREEN STAGE LAYOUT (assets/js/stage.js) =================
   In full screen the game's top bar moves into a floating HUD so the board gets nearly the whole screen.
   Everything here is under html.gic-stage, which only stage.js adds (rollback: /admin/stage.php or ?stage=0 leaves it off). */
.gic-hud,.gic-menu-btn,.gic-hud-panel{display:none}
html.gic-stage.gic-fs{--hud-t:calc(var(--k-hud-h,44px) + var(--k-hud-m,12px) - 4px);--hud-r:0px}
@media (orientation:landscape) and (max-height:560px){html.gic-stage.gic-fs{--hud-t:0px;--hud-r:58px}}
html.gic-stage.gic-fs:is(.gic-hud-off,.gic-hud-empty){--hud-t:0px;--hud-r:0px}      /* score display Hidden: no strip is kept free (it showed as an empty bar); the small menu button floats over the corner */
@media (orientation:landscape) and (max-height:560px){html.gic-stage.gic-fs:is(.gic-hud-off,.gic-hud-empty){--hud-t:0px;--hud-r:44px}}
html.gic-stage.gic-fs .app{max-width:none;padding:0}
@media(max-width:700px){html.gic-stage.gic-fs .app{padding:0}}
.gic-hud-gone,.stage-head.gic-hud-gone{display:none!important}

/* the board area: the game's own box, with room kept only for the strip / rail */
html.gic-stage.gic-fs #stage,html.gic-stage.gic-fs .gic-fit-box{padding:calc(var(--hud-t) + var(--k-edge,4px)) calc(var(--hud-r) + var(--k-edge,4px)) var(--k-edge,4px) var(--k-edge,4px)!important;border-radius:0}   /* --k-edge: the standard screen-edge margin; a game opts in with html.gic-fs{--k-edge:12px} (1.203.127), default stays 4px */

/* the strip (portrait, tablets, desktop): chips along the top; ☰ and exit at the right */
html.gic-stage.gic-fs .gic-hud{display:flex;position:fixed;z-index:210;top:0;left:0;right:0;min-height:calc(var(--k-hud-btn,36px) + var(--k-hud-m,12px) + 4px);height:auto;padding:var(--k-hud-m,12px) calc(var(--k-hud-btn,36px) + var(--k-hud-m,12px) * 3) 4px var(--k-hud-m,12px);align-items:center;pointer-events:none}
html.gic-stage.gic-fs:is(.gic-hud-off,.gic-hud-empty) .gic-hud{display:none}
.gic-hud-stats{display:flex;align-items:center;flex-wrap:wrap;gap:4px 6px;min-width:0;max-width:100%;overflow:hidden;pointer-events:auto}
.gic-hud-stats>*{flex:none;font-size:var(--k-hud-font,12.48px);line-height:1.25;padding:5px 9px;border-radius:9px;white-space:nowrap;box-shadow:0 1px 4px rgba(0,0,0,.35);background:var(--panel2);color:var(--text);margin:0}
.gic-hud-stats>.status.ok{background:#064e3b;color:#a7f3d0}.gic-hud-stats>.status.warn{background:#422006;color:#fde68a}
.gic-hud-stats .status i{font-size:.85em}
.gic-hud-stats .status>i:first-child{margin-right:.3em}   /* 1.203.127: space between a chip's icon and its number */
/* 1.203.93: in the bar the chips are as tall as the menu button and centred on it (the rail below goes back to its small chips) */
html.gic-stage.gic-fs .gic-hud>.gic-hud-stats>*{display:inline-flex;align-items:center;min-height:calc(var(--k-hud-btn,36px) * .72)}      /* 1.203.96: ONE chip-height rule for Bar and Overlay, slimmer than the menu button and centred on its line (the sideways-phone rail below overrides it) */
.gic-hud-stats .hide-xs{display:none}
html.gic-stage.gic-fs .gic-fs-exit,html.gic-stage.gic-fs .gic-menu-btn{position:fixed;top:var(--k-hud-m,12px);width:var(--k-hud-btn,36px);height:var(--k-hud-btn,36px);border-radius:10px;border:2px solid var(--hard);background:var(--panel);color:var(--text);box-shadow:var(--shadow-sm);font-size:16px;cursor:pointer;place-items:center;padding:0;opacity:.9;z-index:220}
html.gic-stage.gic-fs .gic-fs-exit{display:none}      /* 1.203.92: no second corner button; Exit full screen is in the menu (and Esc / swipe still work) */
html.gic-stage.gic-fs .gic-menu-btn{right:var(--k-hud-m,12px);display:grid}
html.gic-stage.gic-fs:is(.gic-hud-off,.gic-hud-empty) .gic-fs-exit{display:none}
html.gic-stage.gic-fs:is(.gic-hud-off,.gic-hud-empty) .gic-menu-btn{right:6px;top:6px;width:34px;height:34px;opacity:.5;background:rgba(15,23,42,.7)}
html.gic-stage.gic-fs:is(.gic-hud-off,.gic-hud-empty) .gic-menu-btn:hover,html.gic-stage.gic-fs:is(.gic-hud-off,.gic-hud-empty) .gic-menu-btn[aria-expanded=true]{opacity:.95}
html[data-theme=light].gic-stage.gic-fs:is(.gic-hud-off,.gic-hud-empty) .gic-menu-btn{background:rgba(255,255,255,.75)}
html.gic-stage.gic-fs .gic-menu-btn i,html.gic-stage.gic-fs .gic-menu-btn svg{font-size:calc(var(--k-hud-btn,36px) * .555);filter:drop-shadow(0 0 2px var(--more-halo,rgba(255,255,255,.9)))}

/* the rail (a phone turned sideways: height is scarce, width is not) */
@media (orientation:landscape) and (max-height:560px){
  html.gic-stage.gic-fs .gic-hud{top:0;bottom:0;left:auto;right:0;width:var(--hud-r);height:auto;padding:54px 4px 6px;flex-direction:column;align-items:stretch}
  html.gic-stage.gic-fs .gic-fs-exit,html.gic-stage.gic-fs .gic-menu-btn{width:34px;height:34px;right:12px}
  html.gic-stage.gic-fs .gic-fs-exit{top:4px}
  html.gic-stage.gic-fs .gic-menu-btn{top:8px}
  html.gic-stage.gic-fs:is(.gic-hud-off,.gic-hud-empty) .gic-menu-btn{top:5px;right:5px}
  .gic-hud .gic-hud-stats{flex-direction:column;align-items:stretch;gap:5px;overflow:auto;max-height:100%;scrollbar-width:none}
  .gic-hud .gic-hud-stats>*{font-size:10.88px;padding:4px 2px;text-align:center;white-space:normal;line-height:1.2;border-radius:10px}
  .gic-hud .gic-hud-stats .status i{display:block;margin:0 auto 1px}
  html.gic-stage.gic-fs:not(.gic-hud-ov) .gic-hud>.gic-hud-stats>*{display:block;min-height:0}
}

/* the menu */
html.gic-stage.gic-fs .gic-hud-panel{position:fixed;z-index:260;top:calc(max(var(--hud-t),var(--k-hud-h,44px)) + 6px);right:calc(var(--hud-r) + var(--k-hud-m,12px));width:min(var(--k-panel-w,300px),calc(100vw - 2 * var(--k-hud-m,12px)),max(300px,42vw));max-height:calc(100vh - max(var(--hud-t),var(--k-hud-h,44px)) - 6px - var(--k-hud-m,12px));max-height:calc(100dvh - max(var(--hud-t),var(--k-hud-h,44px)) - 6px - var(--k-hud-m,12px));overflow:auto;background:var(--panel);border:3px solid var(--hard);border-radius:16px;box-shadow:var(--shadow);padding:12px;flex-direction:column;gap:10px}
html.gic-stage.gic-fs .gic-hud-panel.open{display:flex}
/* 1.203.99/100: the floating menu is three groups (.gic-hp-col): one column on a narrow screen, two on 640px+ (the first group left, the other two stacked right), three on a short sideways screen. Grid, not CSS columns (columns split the Save my version button across the break on an iPad). */
.gic-hp-col{display:contents}
@media (min-width:640px){
  html.gic-stage.gic-fs .gic-hud-panel{width:min(calc(var(--k-panel-w,300px) * 1.95),52vw,calc(100vw - 2 * var(--k-hud-m,12px)))}
  html.gic-stage.gic-fs .gic-hud-panel.open{display:grid;grid-template-columns:1fr 1fr;grid-template-areas:"a b" "a c";gap:10px 14px;align-content:start}
  html.gic-stage.gic-fs .gic-hud-panel .gic-hp-col{display:flex;flex-direction:column;gap:10px;min-width:0}
  .gic-hp-col-a{grid-area:a}.gic-hp-col-b{grid-area:b}.gic-hp-col-c{grid-area:c}
}
@media (min-width:640px) and (max-height:560px){
  html.gic-stage.gic-fs .gic-hud-panel{width:min(calc(var(--k-panel-w,300px) * 2.9),60vw,calc(100vw - 2 * var(--k-hud-m,12px)))}
  html.gic-stage.gic-fs .gic-hud-panel.open{grid-template-columns:1fr 1fr 1fr;grid-template-areas:"a b c"}
}
@media (orientation:landscape) and (max-height:560px){html.gic-stage.gic-fs .gic-hud-panel{top:6px;right:calc(max(var(--hud-r),44px) + 6px);max-height:calc(100vh - 16px);max-height:calc(100dvh - 16px)}}
.gic-hud-panel [hidden]{display:none!important}
.gic-hp-info .gic-hud-stats{flex-wrap:wrap;overflow:visible;flex-direction:row}
.gic-hud-panel .gic-hud-stats>*{font-size:calc(12.8px * var(--k-ms,1));padding:5px 10px;text-align:left;white-space:nowrap;box-shadow:none}
.gic-hud-panel .gic-hud-stats .status i{display:inline;margin:0}
.gic-hp-notes{font-size:max(var(--k-text-label,12px),calc(12.8px * var(--k-hs,1)));color:var(--soft);display:flex;flex-wrap:wrap;gap:6px}
.gic-hp-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.gic-hp-actions>.btn,.gic-hp-actions>button,.gic-hp-actions>a{width:100%;justify-content:flex-start;min-height:var(--k-hp-h);padding:8px 12px;font-size:var(--k-hp-font)}
.gic-hp-actions>.segmented,.gic-hp-actions>label,.gic-hp-actions>select,.gic-hp-actions>.row,.gic-hp-actions>div{grid-column:1/-1}
.gic-hp-actions .segmented{width:100%;flex-wrap:wrap}.gic-hp-actions .segmented button{flex:1 1 auto}
.gic-hp-actions .hide-xs{display:inline!important}
.gic-hp-actions [data-iconly]::after{content:attr(title)}
.gic-hp-foot{display:grid;grid-template-columns:1fr;gap:8px;border-top:2px solid var(--line);padding-top:10px}
.gic-hp-foot .btn{width:100%;justify-content:flex-start;min-height:var(--k-hp-h);font-size:var(--k-hp-font);font-weight:700;gap:10px}
.gic-hp-foot .btn i:first-child{width:1.1em;text-align:center;flex:none}
@media (orientation:landscape) and (max-height:560px){.gic-hp-actions{grid-template-columns:1fr 1fr}}

/* Settings: the game's own settings box, shown over the board */
html.gic-stage.gic-fs.gic-sheet .gic-sheet-box{display:block!important;position:fixed;inset:0;z-index:300;overflow:auto;-webkit-overflow-scrolling:touch;margin:0;max-width:none;width:auto;border-radius:0;border:0;background:var(--bg);padding:3.5rem 0.75rem 1.75rem;box-shadow:none}
.gic-sheet-bar{display:none}
html.gic-stage.gic-fs.gic-sheet .gic-sheet-bar{position:fixed;top:0;left:0;right:0;z-index:310;height:2.875rem;display:flex;align-items:center;justify-content:space-between;gap:0.625rem;padding:0 0.625rem;background:var(--panel);border-bottom:3px solid var(--hard)}
html.gic-stage.gic-fs.gic-sheet .gic-sheet-box .gic-set-toggle{display:none}

/* intro / result cards must never be cut off on a short screen: they shrink a little and scroll as a last resort */
html.gic-stage.gic-fs [class*="-overlay"]{overflow:auto;-webkit-overflow-scrolling:touch}
html.gic-stage.gic-fs [class*="-overlay"]>[class*="card"]{margin-top:auto;margin-bottom:auto}
@media (orientation:landscape) and (max-height:560px){
  html.gic-stage.gic-fs [class*="-overlay"] :is([class*="card-icon"],[class*="ovicon"],[class*="ready-icon"]){display:none}
  html.gic-stage.gic-fs [class*="-overlay"]>[class*="card"]{padding:0.625rem 1rem;gap:0.375rem}
  html.gic-stage.gic-fs [class*="-overlay"]>[class*="card"] h2{margin:0;font-size:1.25rem}
  html.gic-stage.gic-fs [class*="-overlay"]>[class*="card"] p{margin:4px 0;font-size:.82rem}
}

/* STAGE dock: a few primary buttons (data-stage="dock") that stay on screen */
.gic-dock{position:fixed;left:50%;transform:translateX(-50%);bottom:4px;z-index:60;display:flex;gap:0.375rem;padding:4px;background:rgba(15,23,42,.82);border-radius:0.875rem;box-shadow:0 2px 8px rgba(0,0,0,.4)}
.gic-dock[hidden]{display:none}
.gic-dock .btn{min-width:2.625rem;height:2.375rem;padding:0 0.625rem;white-space:nowrap}
html.gic-stage.gic-fs.gic-has-dock #stage.gic-fit-box,html.gic-stage.gic-fs.gic-has-dock .gic-fit-box{padding-bottom:calc(var(--dock-h,2.875rem) + var(--k-edge,4px))!important}
@media (orientation:landscape) and (max-height:560px){.gic-dock{left:4px;top:50%;bottom:auto;transform:translateY(-50%);flex-direction:column}
 html.gic-stage.gic-fs.gic-has-dock #stage.gic-fit-box,html.gic-stage.gic-fs.gic-has-dock .gic-fit-box{padding-bottom:var(--k-edge,4px)!important;padding-left:calc(var(--dock-w,3.5rem) + var(--k-edge,4px))!important}}

/* STAGE: in full screen an intro / result card covers the whole play area (not just the board under it), so it has the
   most room; bridge.js (fitOverlays) then shrinks the card a little if it still does not fit. */
html.gic-stage.gic-fs :is(.sl-end,.qr-end,.pq-overlay):not([hidden]){position:fixed;top:var(--hud-t);right:var(--hud-r);bottom:0;left:0;z-index:150;border-radius:0;display:flex;align-items:center;justify-content:center;overflow:auto}
html.gic-stage.gic-fs :is(.sl-end,.qr-end,.pq-overlay)>*{margin:auto;flex:none}

/* STAGE: "turn your phone sideways" hint for wide games */
.gic-turn{position:fixed;left:50%;bottom:calc(0.875rem + env(safe-area-inset-bottom,0px));top:auto;transform:translateX(-50%);z-index:400;display:flex;flex-direction:row;align-items:center;gap:0.75rem;max-width:min(340px,92vw);padding:0.625rem 1rem;border-radius:62.4375rem;background:rgba(15,23,42,.94);color:#fff;border:2px solid var(--hard);box-shadow:var(--shadow);text-align:left;font-weight:700;font-size:.9rem;line-height:1.25;cursor:pointer;transition:opacity .35s}
.gic-turn i{font-size:1.5rem;flex:none;color:var(--sky);animation:gicTurn 1.6s ease-in-out infinite}
.gic-turn.out{opacity:0}
@keyframes gicTurn{0%,25%{transform:rotate(0)}55%,100%{transform:rotate(-90deg)}}
@media(prefers-reduced-motion:reduce){.gic-turn i{animation:none}}


/* ===== PHONES, normal (not full-screen) view: give the game most of the width =====
   Every extra frame (page margin, game panel, stage panel, intro card …) used to cost ~14px a side, so on a phone
   the board, team names and settings sat in a narrow strip. Frames are slimmer here; bigger screens are unchanged. */
@media (max-width:640px){
  html:not(.gic-fs) .app{padding:4px 4px 1rem}
  html:not(.gic-fs) .layout{gap:0.5rem}
  html:not(.gic-fs) .panel{padding:0.625rem;border-width:2px;border-radius:0.875rem;box-shadow:2px 2px 0 var(--hard)}
  html:not(.gic-fs) .panel .panel{padding:0.5rem;border-width:2px;box-shadow:none}
  html:not(.gic-fs) .gic-head{padding:0.5rem 0.625rem;margin-bottom:0.375rem;border-width:2px;box-shadow:2px 2px 0 var(--hard)}
  html:not(.gic-fs) .gic-pan>summary,html:not(.gic-fs) .gic-pan-body{padding-left:0.625rem;padding-right:0.625rem}
}

/* the floating sound button keeps its page-corner position when it moves into the full-screen menu: it sits in the menu like the other items */
html.gic-stage.gic-fs .gic-hud-panel .gic-snd-float{position:static;top:auto;right:auto;z-index:auto}
html.gic-stage.gic-fs .gic-hud-panel .gic-hp-actions .gic-snd{width:100%;justify-content:flex-start}
html.gic-stage.gic-fs .gic-hud-panel :is(button,.btn){font-family:'Inter',system-ui,sans-serif;max-width:100%;box-sizing:border-box;white-space:normal;text-align:left}

/* ===== PHONES & TABLETS, normal view: a slim game header with a clear Full screen button at the top right =====
   The header used to stack the title, a long description and a wrapping row of buttons (about 190px on a phone, most of the
   screen when it is turned sideways) and the Full screen button was just one more small button in that row. Here the title
   row stays one line (the description is one line; tap it to read more), Full screen is a big labelled button in the
   top-right corner and the other buttons sit in one row underneath that scrolls sideways when it is too long. */
@media (max-width:900px), (max-height:520px) and (orientation:landscape){
  html:not(.gic-fs) .gic-head{position:relative;flex-wrap:wrap;gap:4px 0.5rem;padding:0.5rem 0.625rem;margin-bottom:0.375rem}
  html:not(.gic-fs) .gic-head-id{flex:1 1 100%;min-width:0;padding-right:8rem;min-height:2.875rem;gap:0.625rem}
  html:not(.gic-fs) .gic-head-id .mark{flex:none}
  html:not(.gic-fs) .gic-head-text h1{font-size:1.2rem}
  html:not(.gic-fs) .gic-head-text p{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;font-size:.82rem}
  html:not(.gic-fs) .gic-head-text p.open{-webkit-line-clamp:unset;display:block}
  html:not(.gic-fs) .gic-head-right{flex:1 1 100%;min-width:0;justify-content:flex-start;gap:0.375rem}
  html:not(.gic-fs) .gic-head-right .rank-badge{padding:4px 0.625rem;font-size:.76rem}
  html:not(.gic-fs) .gic-head-actions{flex-wrap:nowrap;overflow-x:auto;justify-content:flex-start;max-width:100%;scrollbar-width:none;padding:1px 1px 3px}
  html:not(.gic-fs) .gic-head-actions::-webkit-scrollbar{display:none}
  html:not(.gic-fs) .gic-head-actions>*,html:not(.gic-fs) .gic-head-actions>.btn.sm,html:not(.gic-fs) .gic-head-actions>.btn.accent{flex:0 0 auto;white-space:nowrap}   /* buttons never shrink (the older .btn.accent{flex:1 1 auto} rule made Save squash and overlap its neighbours) */
  html:not(.gic-fs) .gic-head-actions .btn{min-height:2.5rem;min-width:2.5rem}
  html:not(.gic-fs) .gic-head [data-gic=fs]{position:absolute;top:0.5rem;right:0.625rem;min-height:2.875rem;padding:0 1rem;font-size:1rem;background:var(--sky);color:var(--hard);border-color:var(--hard)}
  html:not(.gic-fs) .gic-head [data-gic=fs] .hide-xs{display:inline}
}
/* a phone held upright: Full screen is a small square icon button (no label), so the title keeps its room and is never cut in the middle of a word */
@media (max-width:560px){
  html:not(.gic-fs) .gic-head-id{padding-right:3.375rem;min-height:2.75rem}
  html:not(.gic-fs) .gic-head [data-gic=fs]{top:0.5rem;right:0.5rem;width:2.75rem;min-width:2.75rem;min-height:2.75rem;padding:0;justify-content:center;font-size:1.05rem}
  html:not(.gic-fs) .gic-head [data-gic=fs] .hide-xs{display:none}
  html:not(.gic-fs) .gic-head-text h1{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:break-word;word-break:normal;line-height:1.15}
}
/* a phone turned sideways (html.gic-ls is set by bridge.js from the REAL window size): one slim row, so the board is not pushed off the bottom of the screen */
html.gic-ls:not(.gic-fs) .gic-head{flex-wrap:nowrap;align-items:center;padding:4px 0.5rem;margin-bottom:4px}
html.gic-ls:not(.gic-fs) .gic-head-id{flex:1 1 auto;padding-right:0;min-height:0}
html.gic-ls:not(.gic-fs) .gic-head-text p{display:none}
html.gic-ls:not(.gic-fs) .gic-head-text h1{font-size:1.05rem}
html.gic-ls:not(.gic-fs) .gic-head .mark{width:1.875rem;height:1.875rem;font-size:.9rem}
html.gic-ls:not(.gic-fs) .gic-head-right{flex:0 1 auto;max-width:62%;flex-wrap:nowrap}
html.gic-ls:not(.gic-fs) .gic-head [data-gic=fs]{position:static;order:-1;min-height:2.5rem}
html.gic-ls:not(.gic-fs) .app{padding-top:2px}
html.gic-ls:not(.gic-fs) .gic-head .rank-badge{white-space:nowrap}

/* LIVE (student): the same full-area intro / result cards as full screen, below the thin live bar, so a card is never squeezed into a short board */
html.gic-live.gic-fs :is(.sl-end,.qr-end,.pq-overlay):not([hidden]){position:fixed;top:2.875rem;right:0;bottom:0;left:0;z-index:150;border-radius:0;display:flex;align-items:center;justify-content:center;overflow:auto}
html.gic-live.gic-fs :is(.sl-end,.qr-end,.pq-overlay)>*{margin:auto;flex:none}

/* TOP SCORES: one look for every game (name left, score right, never touching; the number is part of the text, so no list marker) */
ol.top-list{margin:0.625rem 0 0;padding:0;list-style:none;display:flex;flex-direction:column;gap:4px;font-weight:700;font-size:.88rem}
ol.top-list>li{display:flex;justify-content:space-between;align-items:baseline;gap:1rem;list-style:none;color:var(--soft)}
ol.top-list>li::marker{content:''}
ol.top-list>li>span{min-width:0;overflow-wrap:anywhere}
ol.top-list>li>b{flex:none;font-variant-numeric:tabular-nums;color:var(--text)}
ol.top-list>li:nth-child(1)>b{color:var(--gold)}

/* NO LONG-PRESS MENU (assets/js/nomenu.js adds html.gic-nomenu): no copy / save-image callout or text-selection handles on the playing surface */
html.gic-nomenu{-webkit-touch-callout:none}
html.gic-nomenu :is(img,canvas,svg,button,label,summary,[role=button],[class*=board],[class*=tile],[class*=bub],[class*=card],[class*=cell],[class*=slot],[class*=stage]):not(input):not(textarea){-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
html.gic-nomenu img{-webkit-user-drag:none}

/* Admin > Games > Capture from the game: the game is shown full screen at 1280x800 with every control hidden, so the picture holds only the game */
html.gic-cap .gic-fs-exit,html.gic-cap #gicFsExit,html.gic-cap .gic-menu-btn,html.gic-cap .gic-more,html.gic-cap .gic-head-right,html.gic-cap .gic-hud,html.gic-cap .gic-toast,html.gic-cap .gic-toasts,html.gic-cap .reopen-tab{display:none!important}
html.gic-cap,html.gic-cap body{overflow:hidden}
/* ======================================================================================================================
   SHARED PHONE LAYOUT (1.42.0) — html.gic-phone is set by bridge.js when play.php says the game fills a phone-sized screen.
   One look for every converted game:
     - the page fills the screen; the game header is a slim sticky bar (icon, title, "…" menu);
     - panels sit edge to edge with small gaps;
     - start / question / result windows are .ph-sheet (the layer) + .ph-card (the card): they cover everything under the header,
       full width, and never grow past the screen (the question sheet hugs the bottom: .ph-sheet.dim).
   Rollback per game or for all games: Admin > Phone and full-screen layout. Nothing here applies unless html.gic-phone is on.
   ====================================================================================================================== */
:root{--ph-top:0px;--ph-btn:2.25rem}
.gic-more,.gic-ph-only,.gic-sm-only{display:none}
/* 1.203.75: one menu icon everywhere (three lines); the "•••" glyph is retired */
.gic-more.btn span{display:block;width:1.125rem;height:0.8125rem;background:linear-gradient(currentColor,currentColor) 0 0/100% 2.5px no-repeat,linear-gradient(currentColor,currentColor) 0 50%/100% 2.5px no-repeat,linear-gradient(currentColor,currentColor) 0 100%/100% 2.5px no-repeat;border-radius:2px}
html.gic-phone,html.gic-phone body.embed{height:100%}
html.gic-phone body.embed{overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overscroll-behavior:none;font-size:0.875rem}
html.gic-phone body .app{max-width:none;padding:0 4px}
html.gic-phone body .layout{display:flex;flex-direction:column;gap:0.375rem}
html.gic-phone body .panel{border-width:2px;border-radius:0.75rem;box-shadow:none;padding:0.5rem}
html.gic-phone body .stage-head{margin-bottom:0.375rem;gap:0.375rem}
html.gic-phone .gic-fit-box{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start}
html.gic-phone .gic-fit-box .stage-head{flex:none}
html.gic-phone body input[type=text],html.gic-phone body input[type=number],html.gic-phone body select,html.gic-phone body textarea{font-size:1rem}   /* 16px stops iPhone Safari zooming the page when a box is tapped */
/* NO header bar (1.42.1): the screen belongs to the game. The game's title and picture are dropped; the "..." button floats in the top right
   corner (over the game's own top row, which keeps a gap for it) and opens the same list of actions as before. */
html.gic-phone:not(.gic-fs):not(.gic-x) body header.gic-head{position:static;height:0;min-height:0;margin:0;padding:0;border:0;border-radius:0;box-shadow:none;background:none;overflow:visible;display:block}
html.gic-phone body .gic-head-id{display:none}
html.gic-phone body .gic-head-right{position:fixed;top:0.5rem;right:0.5rem;z-index:90;width:auto;gap:0}
html.gic-phone body .gic-more{display:inline-flex;width:var(--ph-btn);height:var(--ph-btn);min-width:var(--ph-btn);min-height:0;padding:0;justify-content:center;align-items:center;font-size:1rem}
html.gic-phone body .gic-ph-only{display:inline-flex}
html.gic-phone body .gic-head .rank-badge,html.gic-phone body .gic-head [data-gic=fs]{display:none}
html.gic-phone body .gic-head-actions{display:none;position:fixed;left:0.375rem;right:0.375rem;top:calc(var(--ph-btn) + 0.5rem);width:auto;max-width:none;max-height:calc(100% - var(--ph-btn) - 1rem);flex-wrap:wrap;justify-content:flex-start;gap:0.375rem;padding:0.5rem;overflow-y:auto;background:var(--panel);border:3px solid var(--hard);border-radius:0.75rem;box-shadow:var(--shadow);z-index:91}
html.gic-phone body .gic-head.more-open .gic-head-actions{display:flex}
html.gic-phone body .gic-head-actions .btn{flex:0 0 auto;min-height:2.5rem}
html.gic-phone body .gic-head-actions .hide-xs{display:inline}
/* the game's own top row: stats on the left, a few small icon buttons, and a gap on the right for the "..." button */
html.gic-phone body .stage-head{flex-wrap:nowrap;align-items:center;min-height:var(--ph-btn);padding-right:calc(var(--ph-btn) + 0.375rem)}
html.gic-phone body .stage-head>.row{flex-wrap:nowrap;gap:0.375rem;min-width:0}
html.gic-phone body .stage-head>.row:first-child{flex:1 1 auto;flex-wrap:wrap;row-gap:4px}
html.gic-phone body .stage-head>.row:last-child{flex:none}
html.gic-phone body .stage-head .status{padding:3px 0.5625rem;font-size:.8rem;white-space:nowrap}
html.gic-phone body .stage-head .btn{width:var(--ph-btn);height:var(--ph-btn);min-width:0;min-height:0;padding:0;justify-content:center;gap:0}
html.gic-phone body .stage-head .btn>span,html.gic-phone body .stage-head .btn .hide-xs{display:none}
/* the shared window: .ph-sheet is the layer, .ph-card the card on it */
html.gic-phone body .ph-sheet{position:fixed;left:0;right:0;bottom:0;top:var(--ph-top);inset-inline:0;z-index:55;display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;margin:0;padding:0;border:0;border-radius:0;background:var(--bg);overflow:hidden;backdrop-filter:none;-webkit-backdrop-filter:none}
html.gic-phone body .ph-sheet[hidden]{display:none}
html.gic-phone body .ph-sheet.dim{background:rgba(2,6,23,.62);justify-content:flex-end}
html.gic-phone body .ph-card{position:relative;display:flex;flex-direction:column;align-items:stretch;gap:0.625rem;width:100%;max-width:none;min-height:0;margin:0;padding:0.75rem 0.75rem 0.875rem;flex:1 1 auto;border:0;border-radius:0;box-shadow:none;background:var(--panel);overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;animation:none}
html.gic-phone body .ph-sheet.dim .ph-card{flex:0 1 auto;max-height:100%;border-top:3px solid var(--sky);border-radius:1rem 1rem 0 0;animation:phup .2s ease-out}
@keyframes phup{from{transform:translateY(1rem);opacity:0}to{transform:none;opacity:1}}
html.gic-phone body .ph-card h2{font-size:1.25rem;padding:0 calc(var(--ph-btn) + 4px)}
@media(prefers-reduced-motion:reduce){html.gic-phone body .ph-sheet.dim .ph-card{animation:none}}
/* start / result cards of the older games (1.43.0): on a phone they are a window over the whole screen, not a card squeezed inside the board
   (which used to make the board grow and its game shrink). bridge.js scales the card to fill the window. */
html.gic-phone body :is(.sl-end,.qr-end,.pq-overlay,.bgm-end){position:fixed;left:0;right:0;bottom:0;top:var(--ph-top);inset-inline:0;z-index:55;border-radius:0;margin:0;display:grid;place-items:center;padding:0.625rem;overflow:auto;background:rgba(8,12,24,.8)}
html.gic-phone body :is(.sl-end,.qr-end,.pq-overlay,.bgm-end)[hidden]{display:none}
/* a phone held sideways: the screen is short, so bars and gaps get slimmer still */
@media (orientation:landscape) and (max-height:520px){
  :root{--ph-btn:2rem}
  html.gic-phone body .app{padding-bottom:4px}
  html.gic-phone body .stage-head{margin-bottom:4px}
  html.gic-phone body .stage-head .status{padding:2px 0.5rem}
  html.gic-phone body .panel{padding:4px}
}
/* a wide screen (a tablet held sideways, a phone sideways, a big monitor): windows are a centred card, not a stretched strip */
@media (min-width:700px){
  html.gic-phone body .ph-sheet:not(.dim){align-items:center;justify-content:center}
  html.gic-phone body .ph-sheet:not(.dim) .ph-card{flex:0 1 auto;width:min(38.75rem,92%);max-height:calc(100% - 1rem);border:3px solid var(--hard);border-radius:1.125rem;box-shadow:var(--shadow)}
  html.gic-phone body .ph-sheet.dim .ph-card{width:min(47.5rem,100%);align-self:center}
}

/* ======================================================================================================================
   EDIT ON A PHONE (1.43.28): there is no special edit layout. "..." > Edit leaves the phone layout (play.php, PHONE_OFF) and the normal scrolling page
   comes back: the game window at the top, the options below, the browser handles the keyboard. "Play full screen" (play.php) brings the phone layout back.
   ====================================================================================================================== */
html.gic-noedit [data-gic=mode-edit],html[data-lock] [data-gic=mode-edit]{display:none!important}
html:not(.gic-noedit):not([data-lock]) [data-gic=sitemenu]{display:none!important}   /* Edit already is the way to the website page */

/* ======================================================================================================================
   ONE THIN LOOK FOR EVERY PHONE GAME (1.43.17)
   Same control height everywhere (--ph-btn), hairline outlines (--ph-bw), a tiny shadow, small corners. The "•••" button is the same
   size and style as the game's own top-row buttons so it reads as part of the same bar. Safari rounds odd border widths per device pixel,
   so the outline is 1.5px and always the same colour, never a thick dark line.
   ====================================================================================================================== */
:root{--ph-btn:2.125rem;--ph-bw:1.5px;--ph-rad:0.5625rem;--ph-line:rgba(148,163,184,.45);--ph-shadow:0 1px 0 rgba(0,0,0,.28)}
@media (orientation:landscape) and (max-height:520px){:root{--ph-btn:1.875rem}}
html.gic-phone body :is(.btn,.status,.segmented,.panel,.gic-more,input[type=text],input[type=number],input[type=search],select,textarea,.gic-head-actions)
  {border-width:var(--ph-bw)!important;border-color:var(--hard)!important;border-color:var(--ph-line)!important;box-shadow:var(--ph-shadow)!important}
html.gic-phone body :is(.btn,.status,.segmented,.gic-more){border-radius:var(--ph-rad)!important}
html.gic-phone body .panel{border-radius:0.75rem!important;box-shadow:none!important}
html.gic-phone body .btn:active:not(:disabled){transform:none;filter:brightness(1.12)}
html.gic-phone body .btn.accent,html.gic-phone body .btn.gold,html.gic-phone body .btn.danger{border-color:transparent!important}
html.gic-phone body .segmented{overflow:hidden}
html.gic-phone body .segmented button{border-right-width:var(--ph-bw)!important;border-right-color:var(--ph-line)!important}
html.gic-phone body .segmented button:last-child{border-right-width:0!important}
/* chips (points, level, timer…) and buttons in a game's top row: one height, one baseline */
html.gic-phone body .stage-head{align-items:center}
html.gic-phone body .stage-head .status,html.gic-phone body .stage-head .btn,html.gic-phone body .gic-more{box-sizing:border-box;height:var(--ph-btn);min-height:var(--ph-btn);display:inline-flex;align-items:center;justify-content:center;line-height:1;padding-top:0;padding-bottom:0}
html.gic-phone body .stage-head .status{padding-left:0.5625rem;padding-right:0.5625rem;font-size:.8rem;gap:4px;white-space:nowrap}
html.gic-phone body .stage-head .btn{width:var(--ph-btn);min-width:var(--ph-btn);padding:0}
html.gic-phone body .gic-more{width:var(--ph-btn);min-width:var(--ph-btn);padding:0;font-size:.9rem}
html.gic-phone body .gic-more span{font-weight:800;letter-spacing:0;line-height:1}
/* THE MENU BUTTON (1.67.0): just three lines, no box. Dark lines with a soft white glow read on light and mid backgrounds, and the glow
   keeps them visible on dark ones; a game on a dark scene sets --more-fg:#f8fafc and --more-halo:rgba(0,0,0,.75) on <html>. */
html.gic-phone:not([data-theme=light]),html.gic-stage.gic-fs:not([data-theme=light]){--more-fg:#f8fafc;--more-halo:rgba(0,0,0,.75)}
html.gic-phone body .gic-more.btn,html.gic-stage.gic-fs .gic-menu-btn{background:none!important;border:0!important;box-shadow:none!important;color:var(--more-fg,#0f172a)!important;opacity:1!important;text-shadow:none}
html.gic-phone body .gic-more.btn span{display:block;font-size:0!important;width:1.25rem;height:0.875rem;background:linear-gradient(currentColor,currentColor) 0 0/100% 2.5px no-repeat,linear-gradient(currentColor,currentColor) 0 50%/100% 2.5px no-repeat,linear-gradient(currentColor,currentColor) 0 100%/100% 2.5px no-repeat;border-radius:2px;filter:drop-shadow(0 0 2px var(--more-halo,rgba(255,255,255,.9))) drop-shadow(0 0 1px var(--more-halo,rgba(255,255,255,.9)))}
html.gic-stage.gic-fs .gic-menu-btn:active,html.gic-phone body .gic-more.btn:active{transform:scale(.92)}
/* the "•••" list: a small tidy grid hanging from the button, not a tall bar of fat buttons */
html.gic-phone body .gic-head-actions{display:none;position:fixed;left:auto;right:0.375rem;top:calc(var(--ph-btn) + 0.75rem);width:min(20rem,calc(100% - 0.75rem));max-width:none;max-height:calc(100% - var(--ph-btn) - 1.125rem);
  grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;padding:0.375rem;overflow-y:auto;overscroll-behavior:contain;background:var(--panel);border-radius:0.75rem!important;box-shadow:0 6px 18px rgba(0,0,0,.5)!important}
html.gic-phone body .gic-head.more-open .gic-head-actions{display:grid}
html.gic-phone body .gic-head-actions .btn{grid-column:auto;width:100%;min-width:0;min-height:0;height:2rem;padding:0 0.5rem;gap:0.375rem;font-size:.78rem;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;justify-content:flex-start;box-shadow:none!important}
html.gic-phone body .gic-head-actions .btn i{width:1.1em;text-align:center;flex:none;font-size:.85rem}
@media (orientation:landscape) and (max-height:520px){
  html.gic-phone body .gic-head-actions{top:0.375rem;right:calc(var(--ph-btn) + 0.875rem);width:min(18.75rem,calc(100% - var(--ph-btn) - 1.5rem));max-height:calc(100% - 0.75rem)}
  html.gic-phone body .gic-head-actions .btn{height:1.875rem}
}
/* the game's own boards, cards, tiles and list items: the same hairline outline and tiny shadow (their own styles use 2-7px borders) */
html.gic-phone body :is(#board,.cq-turn,.cq-pl,.fc-item,.fc-thumb,.link-btn,.fc-card,.fc-word,.gic-wide,.dd-board,.dd-clue,.dd-avatar,.dd-bub,.dd-pick,.dd-tab,.dd-chip,.mm-face,.ww-view,.ww-score,.ww-prompt,.ww-hintpic,.lb-board,.lb-bub,.bh-board,.bh-panel,.bh-hintpic,.bh-slot,.bh-key,.qr-turn,.qr-turn-pc,.qr-pl,.qr-pc,.sb-board,.sb-line,.sb-bank,.sb-tile)
  {border-width:var(--ph-bw)!important;box-shadow:var(--ph-shadow)!important}
html.gic-phone body :is(.cq-turn,.cq-pl,.fc-item,.fc-thumb,.fc-card,.dd-board,.dd-clue,.dd-avatar,.dd-bub,.dd-pick,.dd-tab,.dd-chip,.ww-view,.ww-score,.ww-prompt,.ww-hintpic,.lb-board,.bh-board,.bh-panel,.bh-hintpic,.qr-turn,.qr-turn-pc,.qr-pl,.qr-pc,.sb-board,.sb-line,.sb-bank,.sb-tile,.gic-wide)
  {border-color:var(--hard)!important;border-color:var(--ph-line)!important}
html.gic-phone body :is(.hint){border-left-width:3px!important}
html.gic-phone body .segmented>button{border-top-width:0!important;border-bottom-width:0!important;border-left-width:0!important;box-shadow:none!important}
/* Sound and Restart are in the "..." menu on a phone (1.43.18), not in the game's top row or side column */
html.gic-phone body .gic-ph-only[hidden]{display:none}
html.gic-phone body .stage-head :is(#restartBtn,#muteBtn,#gicSnd,.gic-snd,#camBtn){display:none!important}

/* 1.43.42: ONE menu look for every game and tool, on a phone's full-screen layout and on the normal small-screen page.
   Two equal columns of the same-height buttons (icon column aligned, text left); a lone button in a row stretches to the full width, so it never looks half empty.
   Order: Edit / How to play, Sound, Restart / Like, Copy link, Report / Save (full width) / Use or Host live / All games, Website version.
   There is no Timer in this menu on a small screen. */
html.gic-phone body .gic-head.more-open .gic-head-actions{display:flex}
html.gic-phone body .gic-head-actions{flex-wrap:wrap;align-content:flex-start;gap:0.375rem;padding:0.5rem}
html.gic-phone body .gic-head-actions .btn.btn.btn{flex:1 1 calc(50% - 3px);width:auto;order:6}
html.gic-phone body .gic-head-actions .btn.btn[data-gic=mode-edit]{flex:1 1 100%;order:1}
html.gic-phone body .gic-head-actions [data-gic=howto]{order:2}
html.gic-phone body .gic-head-actions [data-gic=proxy]{order:3}
html.gic-phone body .gic-head-actions [data-gic=proxy][hidden]{display:none}
html.gic-phone body .gic-head-actions [data-gic=like],html.gic-phone body .gic-head-actions [data-gic=copy],html.gic-phone body .gic-head-actions [data-gic=report]{order:5}
html.gic-phone body .gic-head-actions [data-gic=use],html.gic-phone body .gic-head-actions [data-gic=live]{order:7}
html.gic-phone body .gic-head-actions .btn.btn.accent{order:8;flex:1 1 100%}
html.gic-phone body .gic-head-actions a.gic-sm-only,html.gic-phone body .gic-head-actions [data-gic=sitemenu]{order:9}
html.gic-phone body .gic-sm-only{display:inline-flex}

/* 1.43.24: nothing sits under a phone game to scroll to (the options panel and the top-scores box are on the normal page: "..." > Edit) */
html.gic-phone body .gic-set,html.gic-phone body #topBox{display:none!important}

/* ==========================================================================
   SLIMMER ON SMALL SCREENS (1.43.28): the normal (editing) page on a phone.
   Thinner lines, small shadows, tighter spacing. The full-screen phone layout (html.gic-phone) has its own thin look above, and desktop is untouched. */
@media (max-width:600px),(max-height:520px) and (max-width:932px){
  html:not(.gic-phone):not(.gic-fs){--shadow:0 2px 0 var(--hard);--shadow-sm:0 1px 0 var(--hard);--r:0.625rem;--radius:0.625rem}
  html:not(.gic-phone):not(.gic-fs) :is(.panel,.gic-box,.gic-set,.gic-pk-box,.gic-head,.segmented,.gic-toast,.gic-tab,.gic-tabs,.card,.stage-head,.gic-editor){border-width:1.5px}
  html:not(.gic-phone):not(.gic-fs) :is(.btn,input[type=text],input[type=number],input[type=search],input[type=email],select,textarea,.chip,.seg,.segmented button){border-width:1.5px;border-radius:0.5625rem}
  html:not(.gic-phone):not(.gic-fs) :is(.panel,.gic-box){padding:0.75rem;margin-bottom:0.75rem}
  html:not(.gic-phone):not(.gic-fs) .btn{padding:0.5rem 0.75rem;min-height:2.375rem}
  html:not(.gic-phone):not(.gic-fs) .btn.sm{padding:5px 0.625rem;min-height:2rem}
  html:not(.gic-phone):not(.gic-fs) :is(input[type=text],input[type=number],input[type=search],input[type=email],select,textarea){padding:0.5rem 0.625rem;font-size:1rem}
  html:not(.gic-phone):not(.gic-fs) .gic-set{padding:0.625rem}
  html:not(.gic-phone):not(.gic-fs) .gic-set :is(.row,.field,.grp){margin-bottom:0.5rem}
}

/* ---- 1.43.29: the normal (editing) page on a phone / small tablet: the whole page scrolls as ONE piece ----
   The long lists inside the options box (items, cards, questions...) are not their own little scroll areas: they grow, and the page scrolls. */
@media (max-width:900px),(max-height:520px) and (max-width:932px){
  html:not(.gic-phone):not(.gic-fs) :is(.fc-list,.cq-items,.ed-items,.pk-list,.sp-list,.sp-scroll,.sp-hist,.chips,.rq-readtext,.rs-tapview){max-height:none;overflow:visible}
}
/* One slim row instead of the big game header (Word Wings so far, phone_slim_head()): icon and name, "..." on the right, then "Play full screen" */
.gic-slim-play{display:none}
@media (max-width:1160px),(max-height:520px) and (max-width:932px){      /* 1.203.98: compact header up to 1160px of game width (= a window of about 1200px) so an iPad is the same upright and sideways; keep in step with bridge.js */
  html:not(.gic-phone):not(.gic-fs) .gic-head-slim{position:relative;display:flex;flex-wrap:wrap;align-items:center;gap:0.375rem 0.5rem;padding:0;margin:0 0 0.5rem;background:none;border:0;box-shadow:none}
  html:not(.gic-phone):not(.gic-fs) .gic-head-slim .gic-head-id{flex:1 1 0;min-width:0;padding:0;min-height:0;gap:0.5rem;align-items:center}
  html:not(.gic-phone):not(.gic-fs) .gic-head-slim .mark{width:1.875rem;height:1.875rem;font-size:0.875rem;border-width:1.5px;border-radius:0.5rem;margin:0}
  html:not(.gic-phone):not(.gic-fs) .gic-head-slim .gic-head-text h1{font-size:1.05rem;white-space:nowrap;display:block;overflow:hidden;text-overflow:ellipsis}
  html:not(.gic-phone):not(.gic-fs) .gic-head-slim .gic-head-text p{display:none}
  /* "Ranked run" / "Practice" becomes a small icon next to the name (its words are in the tooltip) */
  html:not(.gic-phone):not(.gic-fs) .gic-head-slim .gic-head-id{flex:0 1 auto;min-width:0}
  html:not(.gic-phone):not(.gic-fs) .gic-head-slim .gic-head-text{min-width:0}
  html:not(.gic-phone):not(.gic-fs) .gic-head-slim .gic-head-right{flex:1 0 auto;min-width:0;flex-wrap:nowrap;justify-content:flex-end}   /* 1.43.35: Fullscreen and "..." always sit side by side; a long name is cut with ... instead of wrapping the buttons */
  html:not(.gic-phone):not(.gic-fs) .gic-head-slim .rank-badge{order:-1;margin-right:auto;flex:0 0 auto;width:1.625rem;height:1.625rem;padding:0;gap:0;justify-content:center;border-width:1.5px;font-size:0;overflow:hidden}
  html:not(.gic-phone):not(.gic-fs) .gic-head-slim .rank-badge:not(:empty){flex:0 0 1.625rem}
  html:not(.gic-phone):not(.gic-fs) .gic-head-slim .rank-badge i{font-size:.8rem;margin:0}
  html:not(.gic-phone):not(.gic-fs) .gic-head-slim .gic-head-right{gap:0.375rem}
  html:not(.gic-phone):not(.gic-fs) .gic-head-slim .gic-head-right{width:auto;position:static}
  html:not(.gic-phone):not(.gic-fs) .gic-head-slim .gic-more{display:inline-flex;width:2.125rem;height:2.125rem;min-width:2.125rem;min-height:0;padding:0;justify-content:center;align-items:center;font-size:.9rem}
  html:not(.gic-phone):not(.gic-fs) .gic-head-slim .gic-head-actions{display:none;position:absolute;right:0;top:2.375rem;z-index:90;width:min(21.25rem,100%);flex-wrap:wrap;gap:5px;padding:0.375rem;background:var(--panel);border:1.5px solid var(--hard);border-radius:0.75rem;box-shadow:0 6px 18px rgba(0,0,0,.5)}
  html:not(.gic-phone):not(.gic-fs) .gic-head-slim.more-open .gic-head-actions{display:flex}
  html:not(.gic-phone):not(.gic-fs) .gic-head-slim .gic-head-actions .btn{flex:1 1 calc(50% - 3px);width:auto;min-width:0;min-height:0;height:2.125rem;padding:0 0.5rem;gap:0.375rem;font-size:.8rem;justify-content:flex-start;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-shadow:none}
  html:not(.gic-phone):not(.gic-fs) .gic-head-slim .gic-head-actions .hide-xs{display:inline}
  /* 1.43.42: same order and look as the phone layout's menu; no Timer here; "All games" is always present */
  html:not(.gic-phone):not(.gic-fs) .gic-head-slim .gic-head-actions .gic-sm-only{display:inline-flex}
  html:not(.gic-phone):not(.gic-fs) .gic-head-slim .gic-head-actions .btn.btn.btn{flex:1 1 calc(50% - 3px);order:6;font-weight:700}
  html:not(.gic-phone):not(.gic-fs) .gic-head-slim .gic-head-actions .btn i:first-child{width:1.1em;text-align:center;flex:none}
  html:not(.gic-phone):not(.gic-fs) .gic-head-slim .gic-head-actions [data-gic=howto]{order:2}
  html:not(.gic-phone):not(.gic-fs) .gic-head-slim .gic-head-actions :is([data-gic=like],[data-gic=copy],[data-gic=report]){order:5}
  html:not(.gic-phone):not(.gic-fs) .gic-head-slim .gic-head-actions .btn.btn.accent{order:8;flex:1 1 100%}
  html:not(.gic-phone):not(.gic-fs) .gic-head-slim .gic-head-actions :is([data-gic=use],[data-gic=live]){order:7}
  html:not(.gic-phone):not(.gic-fs) .gic-head-slim .gic-head-actions a.gic-sm-only{order:9}
  html:not(.gic-phone):not(.gic-fs) .gic-head-slim [data-gic=fs]{position:static;order:-1;background:var(--panel2);color:var(--text);display:inline-flex;width:2.125rem;height:2.125rem;min-width:2.125rem;min-height:0;padding:0;justify-content:center;align-items:center}
  html:not(.gic-phone):not(.gic-fs) .gic-head-slim [data-gic=fs] .hide-xs{display:none}
  /* 1.43.35: "Practice" / "Presenter mode" is a line at the top of the "..." menu (bridge.js moves the badge there); a ranked run keeps its little icon by the name */
  html:not(.gic-phone):not(.gic-fs) .gic-head-slim .gic-head-actions .rank-badge.in-menu{order:-1;flex:1 1 100%;width:auto;height:auto;min-height:1.875rem;padding:4px 0.625rem;gap:0.5rem;justify-content:flex-start;border-radius:0.5625rem;border-width:1.5px;font-size:.78rem;white-space:normal;overflow:visible;box-shadow:none;margin:0}
  html:not(.gic-phone):not(.gic-fs) .gic-head-slim .gic-head-actions .rank-badge.in-menu i{font-size:.85rem}
}
/* 1.203.175: the same slim header on any SHORT window (under about 820px of visible height, set by bridge.js from the real window size), whatever the width: a 4K classroom board is only ~650px tall, and the big title card took a third of it */      /* 1.203.98: compact header up to 1160px of game width (= a window of about 1200px) so an iPad is the same upright and sideways; keep in step with bridge.js */
  html.gic-short:not(.gic-phone):not(.gic-fs) .gic-head-slim{position:relative;display:flex;flex-wrap:wrap;align-items:center;gap:0.375rem 0.5rem;padding:0;margin:0 0 0.5rem;background:none;border:0;box-shadow:none}
  html.gic-short:not(.gic-phone):not(.gic-fs) .gic-head-slim .gic-head-id{flex:1 1 0;min-width:0;padding:0;min-height:0;gap:0.5rem;align-items:center}
  html.gic-short:not(.gic-phone):not(.gic-fs) .gic-head-slim .mark{width:1.875rem;height:1.875rem;font-size:0.875rem;border-width:1.5px;border-radius:0.5rem;margin:0}
  html.gic-short:not(.gic-phone):not(.gic-fs) .gic-head-slim .gic-head-text h1{font-size:1.05rem;white-space:nowrap;display:block;overflow:hidden;text-overflow:ellipsis}
  html.gic-short:not(.gic-phone):not(.gic-fs) .gic-head-slim .gic-head-text p{display:none}
  /* "Ranked run" / "Practice" becomes a small icon next to the name (its words are in the tooltip) */
  html.gic-short:not(.gic-phone):not(.gic-fs) .gic-head-slim .gic-head-id{flex:0 1 auto;min-width:0}
  html.gic-short:not(.gic-phone):not(.gic-fs) .gic-head-slim .gic-head-text{min-width:0}
  html.gic-short:not(.gic-phone):not(.gic-fs) .gic-head-slim .gic-head-right{flex:1 0 auto;min-width:0;flex-wrap:nowrap;justify-content:flex-end}   /* 1.43.35: Fullscreen and "..." always sit side by side; a long name is cut with ... instead of wrapping the buttons */
  html.gic-short:not(.gic-phone):not(.gic-fs) .gic-head-slim .rank-badge{order:-1;margin-right:auto;flex:0 0 auto;width:1.625rem;height:1.625rem;padding:0;gap:0;justify-content:center;border-width:1.5px;font-size:0;overflow:hidden}
  html.gic-short:not(.gic-phone):not(.gic-fs) .gic-head-slim .rank-badge:not(:empty){flex:0 0 1.625rem}
  html.gic-short:not(.gic-phone):not(.gic-fs) .gic-head-slim .rank-badge i{font-size:.8rem;margin:0}
  html.gic-short:not(.gic-phone):not(.gic-fs) .gic-head-slim .gic-head-right{gap:0.375rem}
  html.gic-short:not(.gic-phone):not(.gic-fs) .gic-head-slim .gic-head-right{width:auto;position:static}
  html.gic-short:not(.gic-phone):not(.gic-fs) .gic-head-slim .gic-more{display:inline-flex;width:2.125rem;height:2.125rem;min-width:2.125rem;min-height:0;padding:0;justify-content:center;align-items:center;font-size:.9rem}
  html.gic-short:not(.gic-phone):not(.gic-fs) .gic-head-slim .gic-head-actions{display:none;position:absolute;right:0;top:2.375rem;z-index:90;width:min(21.25rem,100%);flex-wrap:wrap;gap:5px;padding:0.375rem;background:var(--panel);border:1.5px solid var(--hard);border-radius:0.75rem;box-shadow:0 6px 18px rgba(0,0,0,.5)}
  html.gic-short:not(.gic-phone):not(.gic-fs) .gic-head-slim.more-open .gic-head-actions{display:flex}
  html.gic-short:not(.gic-phone):not(.gic-fs) .gic-head-slim .gic-head-actions .btn{flex:1 1 calc(50% - 3px);width:auto;min-width:0;min-height:0;height:2.125rem;padding:0 0.5rem;gap:0.375rem;font-size:.8rem;justify-content:flex-start;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-shadow:none}
  html.gic-short:not(.gic-phone):not(.gic-fs) .gic-head-slim .gic-head-actions .hide-xs{display:inline}
  /* 1.43.42: same order and look as the phone layout's menu; no Timer here; "All games" is always present */
  html.gic-short:not(.gic-phone):not(.gic-fs) .gic-head-slim .gic-head-actions .gic-sm-only{display:inline-flex}
  html.gic-short:not(.gic-phone):not(.gic-fs) .gic-head-slim .gic-head-actions .btn.btn.btn{flex:1 1 calc(50% - 3px);order:6;font-weight:700}
  html.gic-short:not(.gic-phone):not(.gic-fs) .gic-head-slim .gic-head-actions .btn i:first-child{width:1.1em;text-align:center;flex:none}
  html.gic-short:not(.gic-phone):not(.gic-fs) .gic-head-slim .gic-head-actions [data-gic=howto]{order:2}
  html.gic-short:not(.gic-phone):not(.gic-fs) .gic-head-slim .gic-head-actions :is([data-gic=like],[data-gic=copy],[data-gic=report]){order:5}
  html.gic-short:not(.gic-phone):not(.gic-fs) .gic-head-slim .gic-head-actions .btn.btn.accent{order:8;flex:1 1 100%}
  html.gic-short:not(.gic-phone):not(.gic-fs) .gic-head-slim .gic-head-actions :is([data-gic=use],[data-gic=live]){order:7}
  html.gic-short:not(.gic-phone):not(.gic-fs) .gic-head-slim .gic-head-actions a.gic-sm-only{order:9}
  html.gic-short:not(.gic-phone):not(.gic-fs) .gic-head-slim [data-gic=fs]{position:static;order:-1;background:var(--panel2);color:var(--text);display:inline-flex;width:2.125rem;height:2.125rem;min-width:2.125rem;min-height:0;padding:0;justify-content:center;align-items:center}
  html.gic-short:not(.gic-phone):not(.gic-fs) .gic-head-slim [data-gic=fs] .hide-xs{display:none}
  /* 1.43.35: "Practice" / "Presenter mode" is a line at the top of the "..." menu (bridge.js moves the badge there); a ranked run keeps its little icon by the name */
  html.gic-short:not(.gic-phone):not(.gic-fs) .gic-head-slim .gic-head-actions .rank-badge.in-menu{order:-1;flex:1 1 100%;width:auto;height:auto;min-height:1.875rem;padding:4px 0.625rem;gap:0.5rem;justify-content:flex-start;border-radius:0.5625rem;border-width:1.5px;font-size:.78rem;white-space:normal;overflow:visible;box-shadow:none;margin:0}
  html.gic-short:not(.gic-phone):not(.gic-fs) .gic-head-slim .gic-head-actions .rank-badge.in-menu i{font-size:.85rem}

/* 1.203.97: the big Play full screen bar is only for a phone-sized window; a tablet (upright or sideways) shows the small full-screen icon beside the menu, the same at every size */
@media (max-width:600px),(max-height:520px){
  html:not(.gic-phone):not(.gic-fs) .gic-head-slim:has(.gic-slim-play) [data-gic=fs]{display:none}
  html:not(.gic-phone):not(.gic-fs) .gic-head-slim .gic-slim-play{display:flex;flex:1 1 100%;min-height:2.625rem;justify-content:center;align-items:center;gap:0.5rem;font-size:.95rem}
}
/* Start / setup / result card on the normal page: the board and the card share one grid cell, so the cell is as tall as the taller of the two and the card is never cut off (Quiz Race, Snakes & Ladders, Connect Quiz) */
@media (max-width:900px),(max-height:520px) and (max-width:932px){
  html:not(.gic-phone):not(.gic-fs) :is(.qr-boardcol,.sl-boardcol,.cq-boardcol).has-ov{display:grid;min-height:0}
  html:not(.gic-phone):not(.gic-fs) :is(.qr-boardcol,.sl-boardcol,.cq-boardcol).has-ov>:is([class$=-boardwrap],#overlay){grid-area:1/1;min-width:0}
  html:not(.gic-phone):not(.gic-fs) :is(.qr-boardcol,.sl-boardcol,.cq-boardcol).has-ov>#overlay{position:relative;inset:auto;overflow:visible}
}


/* Share window (bridge.js sharePanel): a link and social buttons, nothing about classes */
.gic-share{display:flex;flex-direction:column;gap:0.75rem;text-align:left}
.gic-share-note{margin:0;color:var(--soft)}.gic-share-sub{margin:0;color:var(--muted);font-size:.875rem}
.gic-share-link{display:flex;gap:0.5rem}.gic-share-link input{flex:1;min-width:0;background:var(--panel2);color:var(--text);border:2px solid var(--hard);border-radius:0.625rem;padding:0.5rem 0.625rem;font:inherit;font-size:.875rem}
.gic-share-soc{display:grid;grid-template-columns:repeat(auto-fit,minmax(9.375rem,1fr));gap:0.5rem}.gic-share-soc .btn,.gic-share>.btn{justify-content:center}
@media(max-width:380px){.gic-share-link{flex-direction:column}}

/* 1.203.89/90: an iPad in REAL full screen draws its clock/battery bar over the top of the page and Safari adds its own X at the top left.
   Only there (iOS + the browser's real full screen): everything starts lower (--ios-t: 14px upright, 6px sideways; 1.203.93) and the chips start to the right of Safari's X.
   The offsets are fixed guesses (the browser does not report that bar). Desktop, board and TV are not touched. */
@supports (-webkit-touch-callout:none){
  html.gic-realfs.gic-stage.gic-fs{--ios-t:0.875rem;--hud-t:calc(var(--k-hud-h,3.25rem) + var(--k-hud-m,0.75rem) - 4px + var(--ios-t))}
  @media (orientation:landscape){html.gic-realfs.gic-stage.gic-fs{--ios-t:0.375rem}}      /* 1.203.93: sideways the clock bar sits above the chips, not over them: the game starts higher */
  html.gic-realfs.gic-stage.gic-fs .gic-hud{top:var(--ios-t);padding-left:5rem}
  html.gic-realfs.gic-stage.gic-fs .gic-fs-exit,html.gic-realfs.gic-stage.gic-fs .gic-menu-btn{top:calc(var(--ios-t) + var(--k-hud-m,0.75rem))}
  html.gic-realfs.gic-stage.gic-fs .gic-hud-panel{margin-top:var(--ios-t)}
}

/* 1.203.150: Graphics Low: no confetti layers in any game (they slowed big classroom boards) */
html[data-gfx=low] #confetti,html[data-gfx=low] .confetti,html[data-gfx=low] .gic-fx{display:none!important}

/* 1.203.156: Fullscreen lives in the game bar (bridge.js addBarFs); the header text button steps aside. Hidden on phones (they have Play full screen). */
html.gic-barfs .gic-head [data-gic=fs]{display:none!important}
html.gic-fswait .gic-head [data-gic=fs]{visibility:hidden}
.gic-barfs-btn{margin-left:auto}
html.gic-phone .gic-barfs-btn,html.gic-fs .gic-barfs-btn{display:none!important}

/* /assets/css/light-styles.css */
/* Light-mode style: Sky (cool and clean), the only light style since 1.139.1. light_style() always returns 'sky', so <html> always carries
   data-lstyle=sky in light mode (Cream and Classic were removed in 1.139.16). Dark mode is never touched.
   Loaded after style.css / game.css, so these tokens win. The frame thickness and shadow scale with the screen (--bw, --sh) so cards stay chunky on a
   desktop and calm on a phone. */
html[data-theme=light][data-lstyle=sky]{
  --bg:#dff1ff;--bg2:#eef8ff;--panel:#ffffff;--panel2:#eaf5ff;--line:#a9d3f5;--hard:#14284b;
  --sky:#0369d6;--purple:#6d28d9;--gold:#f59e0b;--green:#047857;--rose:#be123c;--on-rose:#ffffff;--text:#14284b;--soft:#2f4468;--muted:#4b6082;
  --header-bg:#ffffff;--head:#0b4fa8;--chip-bg:#cfe6fb;--code-bg:#cfe6fb;--th-bg:#eaf5ff;--th-ink:#2f4468;--link-hover:#083b80;--stage-bg:#f3faff;
  --band:linear-gradient(180deg,#7cc4ff 0,#bfe3ff 55%,rgba(223,241,255,0) 100%);--band-edge:#38bdf8;--accent-text:#b45309;--btn-main:#0369d6}

/* no dotted background in any light style (1.81.1) */
html[data-theme=light]{--dots:none}

/* Sky rules */
html[data-theme=light][data-lstyle=sky]{--bw:var(--ds-bw);--sh:var(--ds-sh);--rad:var(--ds-r-panel)}
html[data-theme=light][data-lstyle=sky] a{color:var(--head)}
html[data-theme=light][data-lstyle=sky] .main-header{border-bottom:clamp(3px,.4vw + 1.6px,5px) solid var(--hard);box-shadow:0 3px 0 var(--band-edge)}
html[data-theme=light][data-lstyle=sky] .hero{background:var(--band);border-radius:0 0 28px 28px}
html[data-theme=light][data-lstyle=sky] .hero .gradient-text,html[data-theme=light][data-lstyle=sky] .hero h1 span{color:var(--accent-text)}
html[data-theme=light][data-lstyle=sky] :is(.card,.howto li,.chip){border-width:var(--bw)}
html[data-theme=light][data-lstyle=sky] .card{border-radius:var(--rad);box-shadow:var(--sh) calc(var(--sh) + 1px) 0 var(--hard)}
html[data-theme=light][data-lstyle=sky] .card:hover{box-shadow:calc(var(--sh) + 2px) calc(var(--sh) + 4px) 0 var(--hard)}
html[data-theme=light][data-lstyle=sky] .card-bar{border-bottom-width:var(--bw);filter:saturate(1.35) brightness(.97)}
html[data-theme=light][data-lstyle=sky] .card-thumb{border-bottom-width:var(--bw)}
html[data-theme=light][data-lstyle=sky] .card .badge{background:#fff;color:var(--hard);border:max(1.5px,calc(var(--bw) - 1px)) solid var(--hard);padding:2px 9px}
html[data-theme=light][data-lstyle=sky] .card-title{color:var(--head)}
html[data-theme=light][data-lstyle=sky] :is(.card-desc,.card-meta){color:var(--soft)}
html[data-theme=light][data-lstyle=sky] .howto li{border-radius:var(--rad);box-shadow:var(--sh) var(--sh) 0 var(--hard)}
html[data-theme=light][data-lstyle=sky] .howto li b{background:var(--gold);color:var(--hard);border:var(--bw) solid var(--hard)}
html[data-theme=light][data-lstyle=sky] :is(.chip.active,.chip:hover){background:var(--btn-main);color:#fff}
html[data-theme=light][data-lstyle=sky] .btn-primary{background:var(--btn-main);color:#fff}
html[data-theme=light][data-lstyle=sky] .btn-primary:hover{background:var(--head)}

/* ---- 1.84.0: light-mode leftovers found by the contrast audit ---- */
/* Blue "selected" / primary controls: the blue is dark in the new styles, so the label is white (it was dark-on-blue, 2.8:1). */
html[data-theme=light][data-lstyle=sky] :is(.btn.primary,.segmented button[aria-pressed=true]:not(.on),.cls-views .btn[aria-pressed=true],[data-min][aria-pressed=true],.cls-vbtn[aria-pressed=true],.dd-pc[aria-pressed=true],.theme-btn.active,.gic-tabs button[aria-pressed=true]:not(.on),.lv-tabs a.on,.pp-tabs button[aria-pressed=true],.rd-modes button[aria-pressed=true],.rd-qopt[aria-pressed=true],.rd-chip:hover,.rd-qnum,.imp-step,.tier-starter,.fb-filter-btn.on,.fb-search.open .fb-search-btn,.gic-tip:hover,.gic-tip.open){color:#fff}
/* Game panels that were see-through dark over the page (fine on the dark page, grey with white text on the light one) get a solid dark colour. Dark mode is untouched. */
html[data-theme=light] :is(.sl-turn,.sl-dicebox,.sl-pl,.qr-turn,.qr-dicebox,.qr-pl,.qr-hand,.cq-turn,.cq-pl,.wt-plate){background:#1e293b}
html[data-theme=light] :is(.sl-pl.cur,.qr-pl.cur,.cq-pl.cur,.wt-col.cur .wt-plate,.wt-col.win .wt-plate){background:#0f172a}
html[data-theme=light] :is(.sl-pop,.qr-pop){background:#16202f}
html[data-theme=light] .wt-msg{background:#1e293b}
html[data-theme=light] :is(.dc-k,#resK,#cntLbl){color:#cbd5e1}
/* Trivia Night editor: the gold round number on a pale panel */
html[data-theme=light] .tn-rd-h .n{color:#b45309}
html[data-theme=light] .gs-card .link-btn{color:#7dd3fc}
html[data-theme=light][data-lstyle=sky] .gs-card :is(.segmented button,.btn)[aria-pressed=true]{color:#04263a}
html[data-theme=light][data-lstyle=sky] :is(.segmented button,.gic-tabs button)[aria-pressed=true]{background:var(--btn-main);color:#fff}
html[data-theme=light][data-lstyle=sky] .gs-card .segmented button[aria-pressed=true]{background:#38bdf8;color:#04263a}

/* 1.136.3 - light mode: white text on the green and blue fills. The link colour rule above was winning over the buttons' own text colour (dull blue on green, dark ink on mid blue). */
html[data-theme=light][data-lstyle=sky] :is(.btn-accent,.badge.green,.type-tab[aria-pressed=true],.type-tab:hover){color:#fff}
html[data-theme=light][data-lstyle=sky] .btn-accent:hover{background:#047857;color:#fff}

/* ---- 1.139.1: contrast fixes (DESIGN-RULES.md rule 14). Sky is the single light style; green is #047857 and rose #be123c, so white ink is 5.5:1 / 6.3:1. ---- */
html[data-theme=light] :is(.mark,.btn.accent,.gic-toast.success,.rank-badge.on,.gl-btn,.btn-accent,.badge.green,.toast.success,.toast.error){color:#fff}
html[data-theme=light] .logo-highlight{color:var(--head)}
html[data-theme=light] .skip-link{color:var(--hard)}
html[data-theme=light] a.pg-pill.on{color:#14284b}
html[data-theme=light][data-lstyle=sky] :is(.tab.active,.chip.active){color:#fff}
html[data-theme=light][data-lstyle=sky] .tab.active *{color:inherit}
/* My library tabs: the open tab is a white card on tablets and desktops (dark label) and a blue block on phones (white label). 1.136.3 made it white on white. */
html[data-theme=light][data-lstyle=sky] .lib-tab.active{color:var(--text)}
@media(max-width:600px){html[data-theme=light][data-lstyle=sky] .lib-tab.active{color:#fff}html[data-theme=light][data-lstyle=sky] .lib-tab.active .n{color:var(--hard)}}
html[data-theme=light][data-lstyle=sky] a.skip-link{color:var(--hard)}

/* /assets/css/tokens.css */
/* Games In Class design tokens (1.139.0). Read DESIGN-RULES.md in the project root before writing any CSS.
   This file is ADDITIVE: it defines the --ds-* names the rest of the site will move onto, one page at a time.
   Nothing here restyles a page, except the lighter hard shadows (--shadow, --shadow-sm, --sh) the owner asked for.
   Rules in short: tokens only, the page sets the scale, three breakpoints (600, 900, and a 380 safety), one primary button per screen. */

/* ---- 1. Scale that never changes: type, spacing, corners, lines, touch ---- */
:root{
  /* type: seven sizes. Baloo 2 = titles, buttons, labels. Inter = reading. Nothing under 12px. */
  --ds-fs-display:clamp(2rem,5vw,3rem);
  --ds-fs-h1:clamp(24px,2.2vw + 15px,36px);   /* px not rem: phones shrink the root font, titles must not */
  --ds-fs-h2:clamp(1.375rem,2.6vw,1.75rem);
  --ds-fs-h3:1.125rem;
  --ds-fs-body:1rem;
  --ds-fs-small:.875rem;
  --ds-fs-caption:.75rem;
  --ds-lh-text:1.55;--ds-lh-head:1.15;
  --ds-font-head:'Baloo 2',system-ui,sans-serif;
  --ds-font-body:'Inter',system-ui,-apple-system,sans-serif;
  /* spacing: every gap, margin and padding is one of these */
  --ds-s1:4px;--ds-s2:8px;--ds-s3:12px;--ds-s4:16px;--ds-s5:24px;--ds-s6:32px;--ds-s7:48px;
  /* corners: three shapes, plus pill and circle */
  --ds-r-sm:8px;      /* inputs, thumbnails */
  --ds-r-pill:999px;  /* chips, badges */
  /* lines */
  --ds-line-hair:1px; --ds-line-ctl:2px;
  /* touch */
  --ds-tap:44px;--ds-tap-sm:36px;
  --ds-focus:3px solid var(--sky);
}

/* ---- 2. Scale the PAGE sets: phone first, two steps up. Components only read these, they never redefine them. ---- */
:root{
  --ds-bw:2px;                /* frame line (cards, buttons, panels) */
  --ds-sh:2px;                /* hard shadow offset */
  --ds-sh-sm:1px;
  --ds-r-ctl:10px;            /* buttons, tabs, inputs */
  --ds-r-panel:12px;          /* cards, modals */
  --ds-gutter:16px;           /* page side margin */
  --ds-pad:14px;              /* card padding */
  --ds-gap:12px;              /* gap between cards */
  --ds-section:24px;          /* gap between page sections */
  --ds-cols:2;                /* card grid columns */
}
@media (min-width:600px){:root{
  --ds-bw:2px;--ds-sh:2px;--ds-sh-sm:1px;--ds-r-ctl:10px;--ds-r-panel:14px;
  --ds-gutter:24px;--ds-pad:18px;--ds-gap:16px;--ds-section:32px;--ds-cols:3}}
@media (min-width:900px){:root{
  --ds-bw:3px;--ds-sh:3px;--ds-sh-sm:1px;--ds-r-ctl:12px;--ds-r-panel:16px;
  --ds-gutter:32px;--ds-pad:24px;--ds-gap:20px;--ds-section:40px;--ds-cols:4}}
@media (min-width:1100px){:root{--ds-cols:5}}
@media (max-width:379px){:root{--ds-cols:1;--ds-gutter:12px;--ds-pad:12px}}

/* ---- 3. Colour roles, named by job. Night = the dark theme, Sky = the one light theme. Every fill/ink pair is 4.5:1 or better. ---- */
:root{
  --ds-page:#0b1120;--ds-section-bg:#111a2e;--ds-card:#1e293b;--ds-raised:#273449;--ds-outline:#020617;--ds-rule:#334155;
  --ds-text:#f8fafc;--ds-text-soft:#cbd5e1;--ds-text-muted:#94a3b8;
  --ds-brand:#38bdf8;--ds-brand-ink:#04202e;     /* navigation, links, selected, the primary button */
  --ds-action:#10b981;--ds-action-ink:#052e16;   /* create / save / positive status (secondary green) */
  --ds-play:#c084fc;--ds-play-ink:#2a0f4a;       /* games and play entry points */
  --ds-danger:#fb7185;--ds-danger-ink:#3b0a14;   /* delete, remove, errors */
  --ds-pink:#f472b6;--ds-pink-ink:#3a0a24;       /* kind colour for question lists (tiles only, never a button) */
  --ds-gold:#fbbf24;--ds-gold-ink:#241a00;       /* special: Pro, new, trophies. Fills only, never body text on light. */
}
html[data-theme=light]{
  --ds-page:#dff1ff;--ds-section-bg:#eef8ff;--ds-card:#ffffff;--ds-raised:#eaf5ff;--ds-outline:#14284b;--ds-rule:#a9d3f5;
  --ds-text:#14284b;--ds-text-soft:#2f4468;--ds-text-muted:#4b6082;
  --ds-brand:#0369d6;--ds-brand-ink:#ffffff;
  --ds-action:#047857;--ds-action-ink:#ffffff;
  --ds-play:#6d28d9;--ds-play-ink:#ffffff;
  --ds-danger:#be123c;--ds-danger-ink:#ffffff;
  --ds-pink:#be185d;--ds-pink-ink:#ffffff;
  --ds-gold:#f59e0b;--ds-gold-ink:#14284b;
}

/* ---- 4. Lighter hard shadows (owner request, 1.139.0; 1.139.5 fixes light mode and phones). The selectors are html[data-theme] so they
   beat style.css's light-mode shadow values. Phones: a flat 2px / 1px line under the part, no sideways offset. Tablet and desktop: 2-3px offset. ---- */
html,html[data-theme=light],html[data-theme=dark]{--shadow:0 2px 0 var(--hard);--shadow-sm:0 1px 0 var(--hard)}
@media (min-width:601px){
  html,html[data-theme=light],html[data-theme=dark]{--shadow:var(--ds-sh) var(--ds-sh) 0 var(--hard);--shadow-sm:var(--ds-sh-sm) calc(var(--ds-sh-sm) + 1px) 0 var(--hard)}
  html[data-theme=light][data-lstyle=sky]{--sh:var(--ds-sh)}
}

/* /assets/css/start.css */
/* ======================================================================================================================
   Games In Class — the shared START CARD (1.65.0)
   One look for every game's start window:  icon, title, ONE line, a big Start button, and "How to play" one tap away
   (three icon steps, never a wall of text).  Phones get the same card docked to the bottom as a sheet; a phone held
   sideways gets it as two columns so nothing is ever cut off.

   Markup (see games/balloonhangman/index.php):
     <div class="gs-over" id="overlay">                      the layer (dims the game)
       <div class="gs-card" data-gs="instant|quick|full">     the card
         <div class="gs-ihead">  back + "How to play"          (only shown while the steps are open)
         <div class="gs-body">   icon, .gs-head (title + .gs-line), .gs-meta, .gs-setup, .gs-steps, .gs-extra
         <div class="gs-foot">   .gs-start, .gs-how
   The ids the games already use (overlay, ovTitle, ovText, ovPlayers, startBtn) stay on the same pieces.
   ====================================================================================================================== */
@keyframes gsup{from{opacity:.4;transform:translateY(1.125rem)}to{opacity:1;transform:none}}
.gs-over{position:absolute;inset:0;z-index:12;display:flex;align-items:center;justify-content:center;padding:0.75rem;background:rgba(15,23,42,.5);overflow:hidden;-webkit-tap-highlight-color:transparent}
.gs-over[hidden]{display:none!important}
.gs-over{container-type:size}   /* lets the card shrink itself when the game's board is small (see the @container rules at the end) */
html[data-gfx=low] .gs-over{background:rgba(15,23,42,.62)}
.gs-card{
  /* the card is always dark, in every site theme: pin the colours the older setup pieces read */
  --panel:#17202f;--panel2:rgba(255,255,255,.07);--hard:rgba(255,255,255,.16);--input-bg:#0f172a;--text:#f1f5f9;--soft:#cbd5e1;--muted:#94a3b8;--head:#f1f5f9;--shadow:none;--shadow-sm:none;color-scheme:dark;
  box-sizing:border-box;width:min(23.75rem,100%);max-height:100%;display:flex;flex-direction:column;gap:0.875rem;padding:1.625rem 1.625rem 1.25rem;background:#17202f;color:#f1f5f9;
  border:2px solid rgba(255,255,255,.14);border-radius:1.375rem;box-shadow:0 18px 50px rgba(0,0,0,.5);text-align:center}
.gs-card[data-gs=full]{width:min(28.75rem,100%);padding:1rem 1.375rem 0.875rem;gap:0.625rem}
.gs-card[data-gs=full] .gs-body{gap:0.5rem}
.gs-card[data-gs=full] .gs-foot{gap:0.5rem}
.gs-card[data-gs=full] .gs-start{min-height:3.125rem}
.gs-card[data-gs=full] .gs-ghost{min-height:2.25rem}
.gs-body{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;display:flex;flex-direction:column;align-items:center;gap:0.75rem;padding:2px;margin:-2px;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.gs-body>*{flex:none;max-width:100%}
.gs-foot{flex:none;display:flex;flex-direction:column;align-items:center;gap:0.625rem;width:100%}
.gs-icon{width:3.5rem;height:3.5rem;border-radius:1rem;display:grid;place-items:center;font-size:1.6rem;color:#fff;background:linear-gradient(135deg,var(--gs-a,#f472b6),var(--gs-b,#fb923c))}
.gs-head{text-align:center}
.gs-title{margin:0;font-size:1.9rem;line-height:1.1;font-weight:800;color:#f1f5f9;overflow-wrap:anywhere}
.gs-line{margin:0.375rem 0 0;color:#aab6c8;font-size:.95rem;line-height:1.35}
.gs-meta{margin:0;padding:0.375rem 0.875rem;border-radius:62.4375rem;background:rgba(255,255,255,.07);color:#cbd5e1;font-size:.85rem;font-weight:600;line-height:1.3}
.gs-meta:empty{display:none}
.gs-setup{width:100%;text-align:left}

/* the "full" card (Castle Siege, Word Tower): icon beside the title, then the players/teams choices from the game */
.gs-top{display:flex;flex-direction:column;align-items:center;gap:0.75rem}
.gs-card[data-gs=full] .gs-top{flex-direction:row;align-self:flex-start;text-align:left;gap:0.75rem}
.gs-card[data-gs=full] .gs-icon{width:2.875rem;height:2.875rem;font-size:1.35rem;border-radius:0.8125rem}
.gs-card[data-gs=full] .gs-head{text-align:left}
.gs-card[data-gs=full] .gs-title{font-size:1.6rem}
.gs-card[data-gs=full] .gs-line{margin-top:2px;font-size:.88rem}
.gs-card[data-gs=full] .gs-meta{border-radius:0.75rem;padding:0.375rem 0.75rem}
.gs-setup{display:flex;flex-direction:column;gap:0.5rem}
.gs-setup:empty{display:none}
.gs-card :is(.cs-presets,.wt-presets,.cq-presets,.qr-presets,.sl-presets){display:flex;gap:0.375rem}
.gs-card :is(.cs-preset,.wt-preset,.cq-preset,.qr-preset,.sl-preset){flex:1 1 0;min-width:0;flex-direction:column;justify-content:center;gap:3px;padding:0.4375rem 3px 0.375rem;font-size:.74rem;line-height:1.1;overflow:hidden}   /* icon above its words: five choices side by side must never spill out of their buttons */
.gs-card :is(.cs-preset,.wt-preset,.cq-preset,.qr-preset,.sl-preset) i{font-size:1.15rem;flex:none}
.gs-card :is(.cs-preset,.wt-preset,.cq-preset,.qr-preset,.sl-preset) span{display:block;max-width:100%;text-align:center}
.gs-card :is(.cs-preset,.wt-preset,.cq-preset,.qr-preset,.sl-preset,.cs-ptype,.wt-ptype,.cq-ptype,.qr-ptype,.sl-ptype){border-width:1.5px;border-radius:0.75rem}
.gs-card :is(.cs-skill,.wt-skill,.cq-skill,.qr-skill,.sl-skill){white-space:nowrap}
.gs-card :is(.cs-prow,.wt-prow,.cq-prow,.qr-prow,.sl-prow) input{border-width:1.5px;min-height:2.625rem;border-radius:0.75rem}
.gs-card :is(.cs-skill,.wt-skill,.cq-skill,.qr-skill,.sl-skill) select{border-width:1.5px}
.gs-card :is(.cs-setup-h,.wt-setup-h,.cq-setup-h,.qr-setup-h,.sl-setup-h){margin-top:0}
.gs-card :is(.cs-setup-h,.wt-setup-h,.cq-setup-h,.qr-setup-h,.sl-setup-h) b{font-size:.8rem;letter-spacing:.04em;text-transform:uppercase;color:#aab6c8}

@media (max-width:380px),(max-height:400px){.gs-card :is(.cs-preset,.wt-preset,.cq-preset,.qr-preset,.sl-preset){font-size:.62rem;padding:0.5rem 0 0.4375rem;letter-spacing:-.01em}.gs-card :is(.cs-presets,.wt-presets,.cq-presets,.qr-presets,.sl-presets){gap:4px}}

/* games that reuse the same window for the start AND for between-round / result screens (Odd One Out, Maze Escape, Word Scramble, Letter Bubbles, Fill the Gap):
   .gs-text holds the game's own HTML (paragraphs, ranking lists); .gs-mid on the card hides the start-only pieces (tagline, steps, How to play) */
.gs-text{width:100%;text-align:center;color:#cbd5e1;font-size:.92rem;line-height:1.4;overflow-wrap:anywhere}
.gs-text:empty{display:none}
.gs-text p{margin:0 0 0.375rem}.gs-text p:last-child{margin-bottom:0}
.gs-text .muted{color:#94a3b8}
.gs-pill{display:inline-block;padding:0.375rem 0.875rem;border-radius:62.4375rem;background:rgba(255,255,255,.07);color:#cbd5e1;font-size:.85rem;font-weight:600;line-height:1.3}
.gs-card.gs-mid :is(.gs-line,.gs-row2,.gs-how,.gs-steps,.gs-extra){display:none!important}
.gs-icon.art{background:none;width:4.5rem;height:4.5rem}
.gs-icon canvas{width:100%;height:100%;display:block}
/* the Solo/Teams switch and the team-name boxes that some games keep inside the card */
.gs-card .segmented{border:1.5px solid rgba(255,255,255,.16);border-radius:0.75rem;background:rgba(255,255,255,.05);padding:3px;gap:3px;width:100%}
.gs-card .segmented button{border:0;border-radius:0.5625rem;min-height:2.5rem;color:#cbd5e1;font:600 .88rem 'Inter',system-ui,sans-serif;display:inline-flex;align-items:center;justify-content:center;gap:0.375rem}
.gs-card .segmented button[aria-pressed=true]{background:#38bdf8;color:#082f49}
.gs-card .segmented button:disabled{opacity:.4}
.gs-card .bgm-setup{text-align:left}
.gs-card .bgm-prow{background:rgba(255,255,255,.05);border-color:var(--pc,rgba(255,255,255,.2))}
.gs-card .bgm-prow input[type=text]{color:#f1f5f9;font-size:1rem}
.gs-card .bgm-bot{color:#cbd5e1}
.gs-card .ctm-ovmap{width:100%}.gs-card .ctm-ovmap .field-label{font-size:.8rem;letter-spacing:.04em;text-transform:uppercase;color:#aab6c8}
.gs-card .ctm-ovmap select{min-height:2.625rem;border-radius:0.75rem}
.gs-card :is(.ws-pn,.lb-tn,.fg-tn,.ed-tn,.gh-tn,.sb-tn){background:rgba(255,255,255,.05);border-width:2px;border-radius:0.75rem;color:#f1f5f9;text-align:left}
.gs-card :is(.ws-pn,.lb-tn,.fg-tn,.ed-tn,.gh-tn,.sb-tn) input{color:#f1f5f9;background:transparent;border:0;font-size:1rem}
.gs-card :is(.ws-names,.lb-names,.fg-names,.ed-names,.gh-names,.sb-names){gap:0.5rem}
.gs-card :is(.ti-names,.dd-names){display:flex;gap:0.5rem;width:100%}
.gs-card :is(.ti-names,.dd-names)[hidden]{display:none}
.gs-card :is(.ti-names,.dd-names) input{flex:1;min-width:0;height:2.75rem;border-radius:0.75rem;border:2px solid rgba(255,255,255,.16);background:rgba(255,255,255,.05);color:#f1f5f9;padding:0 0.625rem;font-size:1rem}
.gs-card :is(.lb-teams,.fg-teams){width:100%}

/* the two buttons */
.gs-card .gs-start{width:100%;min-height:3.375rem;padding:0 1rem;border:0;border-radius:0.875rem;background:#10b981;color:#052e22;font:800 1.25rem 'Baloo 2',system-ui,sans-serif;box-shadow:0 4px 0 #047857;
  display:inline-flex;align-items:center;justify-content:center;gap:0.625rem;cursor:pointer;touch-action:manipulation;text-shadow:none}
.gs-card .gs-start:active{transform:translateY(2px);box-shadow:0 2px 0 #047857}
.gs-card .gs-start:disabled{opacity:.45;box-shadow:none;cursor:default;transform:none}
.gs-card .gs-start[hidden]{display:none}
.gs-card .gs-ghost{min-height:2.5rem;padding:0 0.875rem;border-radius:0.75rem;border:1.5px solid rgba(255,255,255,.22);background:transparent;color:#e2e8f0;font:600 .9rem 'Inter',system-ui,sans-serif;
  display:inline-flex;align-items:center;justify-content:center;gap:0.5rem;cursor:pointer;box-shadow:none;touch-action:manipulation}
.gs-card .gs-ghost:hover{background:rgba(255,255,255,.08)}
.gs-card.gs-wait :is(.gs-how,.gs-row2){display:none}

/* How to play: three icon steps */
.gs-ihead{display:none;align-items:center;gap:0.625rem;width:100%;text-align:left}
.gs-ihead h3{margin:0;font-size:1.5rem;font-weight:800;color:#f1f5f9}
.gs-ihead .gs-ghost{width:2.5rem;padding:0}
.gs-steps{list-style:none;margin:0;padding:4px 2px;display:none;flex-direction:column;gap:0.875rem;width:100%;text-align:left}
.gs-steps li{display:flex;align-items:center;gap:0.875rem;font-size:1rem;line-height:1.3;color:#e2e8f0}
.gs-dot{flex:none;width:2.625rem;height:2.625rem;border-radius:50%;display:grid;place-items:center;color:#fff;font-size:1.05rem;background:var(--c,#3b82f6)}
.gs-extra{display:none;margin:0;font-size:.85rem;color:#94a3b8;line-height:1.35}
.gs-card.gs-info .gs-steps{display:flex}
.gs-card.gs-info .gs-extra{display:block}
.gs-card.gs-info .gs-ihead{display:flex}
.gs-card.gs-info :is(.gs-top,.gs-icon,.gs-head,.gs-meta,.gs-text,.gs-setup,.gs-how,.gs-row2){display:none}

/* PHONE (upright): the same card docked to the bottom as a sheet */
html.gic-phone .gs-over{position:fixed;inset:0;z-index:60;align-items:flex-end;padding:0;background:rgba(15,23,42,.55)}   /* above the game's own score row; the "..." button (z 90) stays on top */
html.gic-phone .gs-card{width:100%;max-height:100%;border-width:2px 0 0;border-radius:1.625rem 1.625rem 0 0;padding:0.625rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom));gap:0.875rem;animation:gsup .22s ease-out}
html.gic-phone .gs-card::before{content:"";flex:none;align-self:center;width:2.75rem;height:5px;border-radius:3px;background:rgba(255,255,255,.25)}
html.gic-phone .gs-title{font-size:1.75rem}
html.gic-phone .gs-card .gs-start{min-height:3.5rem}
html.gic-phone .gs-card .gs-ghost{min-height:2.75rem;width:100%}
html.gic-phone .gs-ihead .gs-ghost{width:2.75rem}
@media (prefers-reduced-motion:reduce){html.gic-phone .gs-card{animation:none}}

/* a tablet (touch, so it gets the phone layout, but wide and tall): a centred card, not a full-width strip */
@media (min-width:700px) and (min-height:521px){
  html.gic-phone .gs-over{align-items:center;justify-content:center;padding:0.75rem;background:rgba(15,23,42,.5)}
  html.gic-phone .gs-card{width:min(25rem,100%);border-width:2px;border-radius:1.375rem;padding:1.625rem 1.625rem 1.25rem;animation:none}
  html.gic-phone .gs-card[data-gs=full]{width:min(30rem,100%);padding-top:1.375rem}
  html.gic-phone .gs-card::before{display:none}
  html.gic-phone .gs-card .gs-ghost{width:auto}
  html.gic-phone .gs-ihead .gs-ghost{width:2.5rem}
}

/* SHORT and WIDE (a phone held sideways, a small window): two columns, text on the left, buttons on the right.
   The card never grows past the screen; only the left column scrolls, and Start is always in view. */
@media (orientation:landscape) and (max-height:520px){
  .gs-over,html.gic-phone .gs-over{align-items:center;justify-content:center;padding:0.5rem calc(0.5rem + env(safe-area-inset-right)) 0.5rem calc(0.5rem + env(safe-area-inset-left))}
  html.gic-phone .gs-over{padding-left:max(64px,12vw,calc(env(safe-area-inset-left) + 8px));padding-right:max(64px,12vw,calc(env(safe-area-inset-right) + 8px))}   /* equal gaps left and right: keeps the card centred, leaves the "..." button free and clears a side column of scores (Memory Match) */
  html.gic-phone .gs-over:has(.gs-card[data-gs=full]){padding-left:max(3rem,calc(env(safe-area-inset-left) + 0.5rem));padding-right:max(3rem,calc(env(safe-area-inset-right) + 0.5rem))}   /* the full card needs every pixel of width (five player choices side by side); the scores column of Memory Match is not on these games */
  .gs-card[data-gs=full] .gs-body{gap:0.375rem}
  .gs-setup{gap:0.375rem}
  .gs-card :is(.cs-setup-h,.wt-setup-h,.cq-setup-h,.qr-setup-h,.sl-setup-h){display:none}
  .gs-card :is(.cs-prow input,.wt-prow input,.cq-prow input,.qr-prow input,.sl-prow input,.cs-ptype,.wt-ptype,.cq-ptype,.qr-ptype,.sl-ptype){min-height:2.375rem;height:2.375rem}
  .gs-card :is(.cs-skill,.wt-skill,.cq-skill,.qr-skill,.sl-skill) select{padding:4px 0.5rem}
  .gs-card,html.gic-phone .gs-card{display:grid;grid-template-columns:minmax(0,1fr) minmax(11.875rem,40%);column-gap:1.125rem;row-gap:0.5rem;align-items:center;
    width:min(42.5rem,100%);max-height:calc(100vh - 68px);padding:0.875rem 1.125rem;border:2px solid rgba(255,255,255,.14);border-radius:1.25rem;animation:none}
  .gs-card[data-gs=full],html.gic-phone .gs-card[data-gs=full]{width:min(48.75rem,100%);grid-template-columns:minmax(0,1fr) minmax(11.25rem,34%)}
  html.gic-phone .gs-card::before{display:none}
  .gs-ihead{grid-column:1}
  .gs-body{grid-column:1;max-height:calc(100vh - 100px);gap:0.5rem}
  .gs-foot{grid-column:2;grid-row:1;align-self:center}
  .gs-card.gs-info .gs-foot{grid-row:1 / span 2}
  .gs-card.gs-info .gs-ihead{display:flex}
  .gs-card.gs-info .gs-body{grid-row:2}
  .gs-card.gs-info .gs-ihead{grid-row:1}
  .gs-card.gs-info .gs-ihead+.gs-body{max-height:calc(100vh - 152px)}
  .gs-icon{width:2.75rem;height:2.75rem;font-size:1.3rem;border-radius:0.8125rem}
  .gs-card[data-gs=quick]:has(.gs-setup) .gs-icon{display:none}   /* Solo / Teams cards: with four teams the left column is taller than the screen, so the icon gives its room away */
  .gs-card[data-gs=quick] .gs-setup .segmented button{min-height:2.125rem;padding-top:5px;padding-bottom:5px}
  .gs-title,html.gic-phone .gs-title{font-size:1.5rem}
  .gs-line{margin-top:2px;font-size:.88rem}
  .gs-steps{gap:0.5rem}
  .gs-dot{width:2.25rem;height:2.25rem;font-size:.95rem}
  html.gic-phone .gs-card .gs-ghost{width:100%;min-height:2.5rem}
}
/* the very shortest screens (an iPhone SE held sideways): trim the full card a little so its left column does not need to scroll */
@media (orientation:landscape) and (max-height:400px){
  .gs-card[data-gs=full] .gs-line{display:none}
  .gs-card[data-gs=full] .gs-meta{padding:4px 0.75rem;font-size:.8rem}
  .gs-card :is(.cs-prow input,.wt-prow input,.cq-prow input,.qr-prow input,.sl-prow input,.cs-ptype,.wt-ptype,.cq-ptype,.qr-ptype,.sl-ptype){min-height:2.125rem;height:2.125rem}
  .gs-card :is(.cs-preset,.wt-preset,.cq-preset,.qr-preset,.sl-preset){padding:0.4375rem 4px}
  .gs-card{padding:0.625rem 1rem}
}

/* a small host: the card sits inside the game's board, and on a phone that board can be only ~200px tall (Maze Escape, Word Scramble...).
   Drop the icon, tighten everything; and if it STILL does not fit, the whole card scrolls (Start stays reachable) instead of squeezing the text out of view. */
@container (max-height:470px){
  .gs-card[data-gs=full] .gs-line{display:none}   /* a shortish board: the full card gives up its tagline first, so the players list rarely needs to scroll */
  .gs-card[data-gs=full] .gs-meta{padding:3px 0.75rem}
}
/* 1.203.368: a board 341-470px tall (a 1280x650 classroom board in the normal page): the quick / instant cards (Trace It, Word Scramble...) drop their big icon and tighten, so their tabs and settings are not hidden behind Start */
@container (max-height:470px) and (min-height:341px){
  .gs-card:not([data-gs=full]) .gs-icon{display:none}
  .gs-card:not([data-gs=full]){padding-top:0.875rem;padding-bottom:0.875rem;gap:0.5rem}
  .gs-card:not([data-gs=full]) .gs-body{gap:0.5rem}
}
@container (max-height:340px){
  .gs-card{padding:0.75rem 1rem;gap:0.5rem}
  .gs-card .gs-icon{display:none}
  .gs-card .gs-title{font-size:1.4rem}
  .gs-card .gs-line{margin-top:2px;font-size:.85rem}
  .gs-card .gs-start{min-height:2.875rem;font-size:1.1rem}
  .gs-card .gs-ghost{min-height:2.25rem}
  .gs-card .gs-body{gap:0.375rem}
  .gs-card .gs-text{font-size:.85rem}
}
@container (max-height:250px){
  .gs-card{overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
  .gs-card .gs-body{overflow:visible;flex:0 0 auto;max-height:none}
  .gs-card .gs-foot{position:sticky;bottom:-0.75rem;margin-bottom:-0.75rem;padding:0.375rem 0 0.75rem;background:inherit;z-index:1}   /* 1.203.239: Start stays in view; only the choices above it move */
}
/* 1.203.239: a board that is only a little short (a 1280×768 board in full screen): a slightly tighter full card, so its settings do not need a small scroll */
@container (max-height:720px) and (min-height:471px){
  .gs-card[data-gs=full]{padding-top:1.125rem;padding-bottom:1rem;gap:0.625rem}
  .gs-card[data-gs=full] .gs-body{gap:0.375rem}
}

.gs-wait-note{margin:0;text-align:center;color:#94a3b8;font-weight:600;font-size:.95rem}
.gs-card .pq-chips{gap:0.375rem}
.gs-card .pq-chip{background:rgba(255,255,255,.08);border:0;color:#e2e8f0;font-size:.78rem;padding:3px 0.625rem}

/* 1.203.360: How to play and Options share one row under Start (bridge.js addStartOptions); real full screen has no Options box, so no button there; on the phone layout the button leaves it, like the menu's Options */
.gs-row2{display:flex;flex-wrap:wrap;justify-content:center;gap:0.5rem;width:100%}
html.gic-fs .gs-opts{display:none}
html.gic-phone .gs-card .gs-row2 .gs-ghost{flex:1 1 auto;width:auto;min-width:max-content;white-space:nowrap;padding:0 0.625rem}   /* the phone sheet: How to play and Options side by side, one row high */

/* 1.203.417 start card buttons keep their label on one line (How to play was wrapping to 2-3 lines on a phone held sideways) */
.gs-card .gs-ghost{white-space:nowrap}

/* /assets/css/picpick.css */
/* PicPick — picture chooser popup for the site's pages */
.pp-ov{position:fixed;inset:0;z-index:2500;background:rgba(2,6,23,.8);display:flex;align-items:center;justify-content:center;padding:12px}
html[data-theme=light] .pp-ov{background:rgba(30,41,59,.55)}
.pp-box{background:var(--panel);border:3px solid var(--hard);border-radius:var(--radius,14px);box-shadow:var(--shadow);width:min(100%,880px);height:min(calc(92 * var(--vh,1vh)),720px);display:flex;flex-direction:column;overflow:hidden}
.pp-head{display:flex;align-items:center;gap:10px;padding:12px 16px;border-bottom:2px solid var(--line)}
.pp-head h3{flex:1;margin:0;color:var(--head,var(--sky));font-size:1.15rem}
.pp-x{border:0;background:transparent;color:var(--muted);font-size:1.8rem;line-height:1;cursor:pointer;padding:0 6px}
.pp-x:hover{color:var(--rose)}
.pp-tabs{display:flex;gap:6px;padding:10px 16px 0;flex-wrap:wrap}
.pp-tabs button{display:inline-flex;align-items:center;gap:6px;padding:7px 12px;border:3px solid var(--hard);border-radius:10px;background:var(--bg);color:var(--soft);font:700 .85rem 'Inter',sans-serif;cursor:pointer;white-space:nowrap}
.pp-tabs button[aria-pressed=true]{background:var(--sky);color:var(--hard)}
.pp-tabs button:hover:not([aria-pressed=true]){border-color:var(--sky)}
@media(max-width:560px){.pp-tabs button span{display:none}.pp-tabs button{flex:1;justify-content:center}.pp-tabs button[aria-pressed=true] span{display:inline}.pp-tabs button[aria-pressed=true]{flex:2}}
.pp-tools{display:flex;gap:8px;flex-wrap:wrap;align-items:center;padding:10px 16px 0}
.pp-tools:empty{display:none}
.pp-tools input,.pp-tools select{padding:7px 10px;min-width:0;flex:1}
.pp-tools select{flex:0 1 180px}
.pp-body{flex:1;overflow:auto;padding:12px 16px;min-height:0}
.pp-foot{display:flex;gap:10px;justify-content:space-between;align-items:center;padding:10px 16px;border-top:2px solid var(--line);flex-wrap:wrap}
.pp-act{display:flex;gap:8px}.pp-note{color:var(--muted);font-size:.85rem}
.pp-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(104px,1fr));gap:10px}
.pp-item{position:relative;border:3px solid var(--hard);border-radius:10px;overflow:hidden;background:var(--bg);cursor:pointer;padding:0;text-align:left;color:var(--text)}
.pp-item img{width:100%;aspect-ratio:1;object-fit:cover;display:block}
.pp-site .pp-item img,.pp-cat img{object-fit:contain;background:#fff;padding:4px}
.pp-item .cap{display:block;padding:3px 6px;font-size:.7rem;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pp-item:hover{border-color:var(--sky)}
.pp-item.sel{outline:4px solid var(--gold)}
.pp-item .ck{position:absolute;top:5px;right:5px;width:22px;height:22px;border-radius:50%;background:var(--gold);color:var(--hard);display:none;place-items:center;font-size:.7rem;border:2px solid var(--hard)}
.pp-item.sel .ck{display:grid}
.pp-folder{display:flex;align-items:center;gap:8px;padding:12px 10px;font-weight:700;font-size:.85rem}
.pp-folder i{color:var(--gold);font-size:1.3rem}
.pp-cat{display:flex;flex-direction:column}
.pp-cat>i{aspect-ratio:1;display:grid;place-items:center;font-size:2rem;color:var(--gold)}
.pp-crumbs{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin-bottom:10px;font-size:.9rem}
.pp-crumbs button{border:0;background:transparent;color:var(--sky);font:700 .9rem 'Inter',sans-serif;cursor:pointer;padding:2px 4px}
.pp-crumbs button:hover{text-decoration:underline}
.pp-bar{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}
.pp-empty{text-align:center;color:var(--muted);padding:34px 10px;font-weight:600}
.pp-set{display:flex;align-items:center;gap:8px;width:100%;border:0;border-bottom:2px solid var(--line);background:transparent;color:var(--text);font:600 .95rem 'Inter',sans-serif;padding:9px 4px;cursor:pointer;text-align:left;margin-top:6px}
.pp-set:first-child{margin-top:0}
.pp-set i{font-size:.75rem;color:var(--muted);transition:transform .15s}
.pp-set.open i{transform:rotate(90deg)}
.pp-set small{color:var(--muted);font-weight:600}
.pp-set .pp-n{margin-left:auto;color:var(--muted);font-size:.8rem;font-weight:700}
.pp-rows{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:6px;padding:8px 0 4px}
.pp-row{display:flex;align-items:center;gap:8px;border:2px solid var(--line);border-radius:9px;background:var(--bg);color:var(--text);padding:7px 10px;cursor:pointer;font:600 .85rem 'Inter',sans-serif;text-align:left;min-width:0}
.pp-row:hover{border-color:var(--sky)}
.pp-row i{color:var(--muted);font-size:.8rem;flex:none}
.pp-row .nm{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pp-row small{color:var(--muted);white-space:nowrap;max-width:45%;overflow:hidden;text-overflow:ellipsis}
.pp-drop{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;border:3px dashed var(--line);border-radius:14px;padding:44px 16px;min-height:min(340px,52vh);text-align:center;cursor:pointer;background:var(--bg)}
.pp-drop:hover,.pp-drop.over{border-color:var(--sky);background:var(--panel2)}
.pp-drop>i{font-size:2.4rem;color:var(--sky)}
.pp-drop input{display:none}
.pp-log{margin-top:12px}.pp-err{color:#fecdd3;background:#3b0a14;border:2px solid var(--rose);border-radius:8px;padding:6px 10px;margin-bottom:6px;font-size:.85rem;font-weight:600}
/* list editor bits */
.pp-staged{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.pp-chip{display:flex;align-items:center;gap:6px;border:2px solid var(--line);border-radius:10px;background:var(--bg);padding:3px 6px 3px 3px;max-width:200px;font-size:.8rem;font-weight:600}
.pp-chip img{width:34px;height:34px;object-fit:cover;border-radius:6px}
.pp-chip span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0}
.pp-chip button{border:0;background:transparent;color:var(--muted);font-size:1.1rem;cursor:pointer;padding:0 3px}
.pp-chip button:hover{color:var(--rose)}
.pp-thumb{width:64px;height:64px;object-fit:cover;border-radius:8px;border:2px solid var(--line);display:block}
.pp-tools input,.pp-tools select{background:var(--bg);color:var(--text);border:3px solid var(--hard);border-radius:10px;font:600 .9rem 'Inter',sans-serif}
.pp-tools input::placeholder{color:var(--muted)}
.pp-hint{color:var(--muted);font-size:.85rem;margin:10px 0 0}
.pp-opt{display:flex;align-items:center;gap:10px;padding:10px 12px;border:3px solid var(--hard);border-radius:10px;background:var(--bg);margin-bottom:6px;font-weight:700;cursor:pointer}
.pp-opt small{margin-left:auto;color:var(--muted);font-weight:600}
.pp-sample{font-size:.8rem;color:var(--muted);margin:0 0 10px;word-break:break-word}
.pp-row input[type=checkbox]{flex:none}

.pp-item.busy{opacity:.45;pointer-events:none}.pp-web .pp-item .cap{font-weight:600;color:var(--muted)}
.pp-tools select{width:auto;max-width:170px;padding:6px 8px;border-radius:8px}
.pp-item.bad{border-color:#f43f5e;opacity:.6}.pp-item.bad .cap::after{content:' · failed';color:#f43f5e}
.pp-teamctl{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:10px}
.pp-teamctl select{flex:1 1 150px;min-width:0}
.pp-away{flex:1 1 100%;font-size:.82rem;font-weight:600;color:var(--muted);cursor:pointer}
.pp-gone span{opacity:.6}
.pp-dot{flex:none;width:12px;height:12px;border-radius:50%;border:2px solid rgba(0,0,0,.4)}

/* the four picture sources inside the "Pictures" tab */
.pp-sub{display:flex;gap:6px;flex:1 1 100%;flex-wrap:wrap}
.pp-sub button{display:inline-flex;align-items:center;gap:6px;padding:7px 12px;border:3px solid var(--hard);border-radius:10px;background:var(--bg);color:var(--soft);font:700 .85rem 'Inter',sans-serif;cursor:pointer;white-space:nowrap}
.pp-sub button[aria-pressed=true]{background:var(--gold,#fbbf24);color:var(--hard)}
.pp-sub button:hover:not([aria-pressed=true]){border-color:var(--sky)}
@media(max-width:560px){.pp-sub button span{display:none}.pp-sub button{flex:1;justify-content:center}.pp-sub button[aria-pressed=true] span{display:inline}.pp-sub button[aria-pressed=true]{flex:2}}

.pp-guest{margin:0 0 10px;padding:8px 12px;border-radius:10px;background:var(--bg);border:2px dashed var(--hard);color:var(--soft);font-size:.85rem;line-height:1.4}.pp-guest a{font-weight:800;color:var(--accent,#38bdf8)}

/* ---- built-in dictionary: "Suggest meaning" ---- */
.dict-bar{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:10px 0 12px;padding:10px 12px;border:1px dashed var(--line);border-radius:12px}
.dict-bar select{max-width:230px}
.dict-sug{margin-top:4px}
.dict-filled{outline:2px solid #f5c542;outline-offset:-2px}
.dict-pop{position:absolute;z-index:60;min-width:240px;max-width:min(420px,92vw);background:var(--panel,#1c2540);color:var(--text,inherit);border:2px solid var(--line);border-radius:12px;box-shadow:0 10px 30px rgba(0,0,0,.18);padding:6px}
.dict-pop button{display:block;width:100%;text-align:left;background:none;border:0;border-radius:8px;padding:8px 10px;cursor:pointer;color:inherit;font:inherit}
.dict-pop button:hover,.dict-pop button:focus{background:rgba(120,120,160,.14);outline:none}
.dict-pop small{opacity:.7}
.dict-pop .dict-none{padding:8px 10px;opacity:.7}

/* ---- 1.49.0 redesign: search box with a Go button, drop box under the picture tabs, tidier phone layout ---- */
.pp-tools .pp-sbox{position:relative;display:flex;flex:1 1 100%;width:100%;min-width:0}
.pp-tools .pp-sbox input{flex:1 1 auto;min-width:0;width:100%;height:44px;box-sizing:border-box;padding-right:48px}
.pp-go{position:absolute;right:4px;top:4px;bottom:4px;width:40px;display:inline-flex;align-items:center;justify-content:center;padding:0;border:0;border-radius:8px;background:transparent;color:var(--sky);font-size:1.1rem;cursor:pointer}
.pp-go span{display:none}
.pp-go:hover{color:var(--text,#fff)}.pp-go:active{transform:translateY(1px)}
.pp-crumbs .pp-allb{margin-left:auto}
.pp-dz{display:flex;align-items:center;justify-content:center;gap:4px 10px;flex-wrap:wrap;margin:0 16px 10px;padding:9px 14px;border:2px dashed var(--line);border-radius:12px;background:var(--bg);color:var(--text);cursor:pointer;text-align:center;font-size:.85rem}
.pp-dz[hidden],.pp-dzlog[hidden]{display:none}
.pp-dz>i{color:var(--sky);font-size:1.2rem}
.pp-dz strong{font-weight:800}
.pp-dz:hover,.pp-dz.over{border-color:var(--sky);background:var(--panel2)}
.pp-dz input{display:none}
.pp-dzlog{padding:0 16px}.pp-dzlog:empty{display:none}
.pp-site .pp-item .cap{text-align:center}
.pp-cat .cap{text-align:center}
@media(max-width:560px){
  .pp-ov{padding:0;align-items:flex-end}
  .pp-box{width:100%;height:calc(96 * var(--vh,1vh));border-radius:16px 16px 0 0;border-width:2px;border-bottom:0}
  .pp-head{padding:10px 12px}.pp-head h3{font-size:1.02rem}
  .pp-tabs{padding:8px 12px 0}.pp-tools{padding:8px 12px 0}.pp-body{padding:10px 12px}
  .pp-foot{padding:8px 12px calc(8px + env(safe-area-inset-bottom,0px))}
  .pp-note{flex:1 1 100%;font-size:.78rem}.pp-act{flex:1 1 100%}.pp-act .btn{flex:1}
  .pp-grid{grid-template-columns:repeat(auto-fill,minmax(88px,1fr));gap:8px}
  .pp-dz{margin:0 12px 8px;padding:8px 10px}.pp-dz .muted{display:none}
  .pp-dzlog{padding:0 12px}
  
  .pp-crumbs{font-size:.85rem}
}

.pp-cat .cap{white-space:normal;line-height:1.15;min-height:2.3em;display:flex;align-items:center;justify-content:center}
.pp-tools .pp-sbox input::-webkit-search-cancel-button{-webkit-appearance:none;appearance:none}

/* Suggested view: where each picture comes from, and the buttons under the grid */
.pp-src{position:absolute;left:5px;top:5px;width:20px;height:20px;border-radius:50%;background:#475569;color:#fff;display:grid;place-items:center;font-size:.6rem;border:2px solid rgba(255,255,255,.85);pointer-events:auto}
.pp-src-site{background:#7c3aed}.pp-src-shelf{background:#0f766e}.pp-src-online{background:#1d4ed8}
.pp-sugrow{display:flex;gap:8px;flex-wrap:wrap;justify-content:center;margin:14px 0 4px}

/* Upload: the drop area fills the popup; dropping a file anywhere on the popup uploads it */
.pp-drop>i{font-size:3rem}
.pp-box{position:relative}
.pp-box.pp-dropping::after{content:'Drop to upload';position:absolute;inset:0;z-index:20;display:flex;align-items:center;justify-content:center;border:4px dashed var(--sky);border-radius:inherit;background:rgba(14,165,233,.22);color:var(--text,#fff);text-shadow:0 1px 6px var(--bg,#000);font:800 1.4rem 'Inter',sans-serif;pointer-events:none}
.pp-sub .pp-from{flex:1 1 100%;justify-content:flex-start;border:0;background:none;padding:2px 4px;font-weight:600;font-size:.78rem;color:var(--soft);text-decoration:underline;border-radius:6px}
.pp-sub .pp-from:hover{color:var(--sky)}

/* 1.203.209: the Ready-made tab (picpick.js readyTab) */
.pp-tools.pp-rmtools{display:flex;flex-wrap:wrap;gap:8px 10px;align-items:center}
.pp-tools.pp-rmtools .pp-sbox{flex:1 1 240px}
.pp-rmlv{display:flex;flex-wrap:wrap;gap:6px}
.pp-rmlv button{font:inherit;font-size:.82rem;font-weight:700;padding:5px 11px;border-radius:99px;border:2px solid var(--border,#cbd5e1);background:transparent;color:inherit;cursor:pointer}
.pp-rmlv button[aria-pressed="true"]{background:var(--sky,#0ea5e9);border-color:var(--sky,#0ea5e9);color:#fff}
.pp-rmsur{font:inherit;font-weight:700;font-size:.88rem;padding:6px 12px;border-radius:10px;border:2px dashed var(--sky,#0ea5e9);background:transparent;color:var(--sky,#0ea5e9);cursor:pointer;white-space:nowrap}
.pp-rm{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:14px;align-items:start}
.pp-rmgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:8px}
.pp-rmt{display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:9px 11px;border-radius:12px;border:2px solid var(--border,#cbd5e1);background:var(--card,transparent);color:inherit;font:inherit;cursor:pointer;text-align:left;min-width:0}
.pp-rmt img{width:34px;height:34px;object-fit:contain}
.pp-rmt b{font-size:.95rem;line-height:1.2}
.pp-rmt small{opacity:.7;font-size:.74rem}
.pp-rmt.on{border-color:var(--sky,#0ea5e9);box-shadow:0 0 0 3px color-mix(in srgb,var(--sky,#0ea5e9) 25%,transparent)}
.pp-rmt:focus-visible,.pp-rmlv button:focus-visible,.pp-rmsur:focus-visible{outline:3px solid var(--sky,#0ea5e9);outline-offset:2px}
.pp-rmside{border:2px solid var(--border,#cbd5e1);border-radius:14px;padding:12px 14px;display:flex;flex-direction:column;gap:10px;position:sticky;top:0}
.pp-rmside h4{margin:0;font-size:1.15rem;display:flex;gap:8px;align-items:center}
.pp-rmside h4 img{width:32px;height:32px;object-fit:contain}
.pp-rml{display:flex;gap:10px;align-items:flex-start;padding:9px 10px;border-radius:10px;border:2px solid var(--border,#cbd5e1);cursor:pointer}
.pp-rml.on{border-color:var(--sky,#0ea5e9);background:color-mix(in srgb,var(--sky,#0ea5e9) 8%,transparent)}
.pp-rml.off{opacity:.55;cursor:default}
.pp-rml input{margin-top:4px;width:18px;height:18px;flex:none}
.pp-rml b{display:block}
.pp-rml small{opacity:.75;display:block}
.pp-rmchips{display:flex;flex-wrap:wrap;gap:5px;margin-top:6px}
.pp-rmchips span{display:inline-flex;align-items:center;gap:4px;font-size:.8rem;padding:2px 8px;border-radius:99px;background:color-mix(in srgb,currentColor 10%,transparent)}
.pp-rmchips img{width:18px;height:18px;object-fit:contain}
@media (max-width:640px){.pp-rm{grid-template-columns:1fr}.pp-rmside{position:static;order:-1}.pp-rmgrid{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* the "Today's words" line a fresh activity shows after a random ready-made list (bridge.js) */
.gic-rmnote{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;margin:8px 0;padding:7px 12px;border-radius:10px;font-size:.88rem;background:color-mix(in srgb,var(--sky,#0ea5e9) 10%,transparent);border:1px solid color-mix(in srgb,var(--sky,#0ea5e9) 35%,transparent)}
.gic-rmnote b{font-weight:800}
.gic-rmnote button{font:inherit;font-weight:700;font-size:.85rem;background:none;border:0;padding:2px 4px;color:var(--sky,#0ea5e9);text-decoration:underline;cursor:pointer}
/* 1.203.229: Copy to My lists, under each ready-made list */
.pp-rmcopy{align-self:flex-end;margin:-4px 2px 6px auto;display:inline-flex;align-items:center;gap:6px;background:none;border:0;padding:4px 6px;color:var(--sky,#0ea5e9);font:700 .82rem/1.2 inherit;font-family:inherit;cursor:pointer;text-decoration:none;border-radius:8px}
.pp-rmcopy:hover,.pp-rmcopy:focus-visible{background:color-mix(in srgb,var(--sky,#0ea5e9) 12%,transparent);outline:none}
.pp-rmcopy:disabled{opacity:.5;cursor:default}.pp-rmcopy.done{color:var(--green,#10b981)}

/* /assets/css/layout.css */
/* =====================================================================================================
   STANDARD GAME LAYOUT  (shared by every game and tool)

     ┌──────────────────────────────────────────┐
     │  game header (title · Save · Fullscreen) │
     ├──────────────────────────────────────────┤
     │                                          │
     │         the game window (large)          │
     │                                          │
     ├──────────────────────────────────────────┤
     │  [ Tab ] [ Tab ] [ Tab ] [ Tab ]         │   ← .gic-set : one tabbed settings box
     │  options for the chosen tab              │
     ├──────────────────────────────────────────┤
     │  ▸ Top scores (collapsible)              │   ← optional  details.gic-pan
     └──────────────────────────────────────────┘

   How a game uses it (see games/_template):
     <div class="layout gic-tabbed">
       <div class="col no-fs gic-editor">                 ← the old editing column; assets/js/gic-layout.js turns each panel into a tab
         <div class="panel stack gic-edit" data-tab="Words" data-icon="fa-list">…</div>
         <div class="panel stack gic-opts" data-tab="Play"  data-icon="fa-gamepad">…</div>
       </div>
       <div class="col"> <div class="panel" id="stage">…game window…</div> </div>
     </div>
   Panels that share a data-tab are merged into one tab. gic-edit = hidden when the creator locks the set
   (levels 1 and 2); gic-opts = hidden at level 2 only.  Nothing else is needed.
   ===================================================================================================== */

/* the stage on top, the settings box under it – one column at every screen size */
.layout.gic-tabbed{display:flex;flex-direction:column;gap:0.875rem;align-items:stretch}
.layout.gic-tabbed>*{min-width:0}
.layout.gic-tabbed>.gic-editor{display:none}                 /* its panels have been moved into the settings box */
.layout.gic-tabbed .col{width:100%}

/* ---- the settings box ---- */
.gic-set{padding:0.875rem 1rem 1rem}
.gic-tabs{margin-bottom:1rem;max-width:42.5rem}
.gic-tabs button{display:flex;align-items:center;justify-content:center;gap:0.4375rem;white-space:nowrap;flex:1 1 0;min-width:0;padding:0.5625rem 0.75rem}
.gic-tabs button i{font-size:.9em}
.gic-set.gic-single>.gic-tabs{display:none}
.gic-pane[hidden]{display:none!important}

/* a pane built automatically: its items flow into balanced columns; long things (lists, chips, text areas) span the full width */
.gic-flow{column-count:2;column-width:20rem;column-gap:2.5rem;column-fill:balance}
.gic-flow>*{break-inside:avoid;margin:0 0 1rem!important}
.gic-flow>.gic-wide{column-span:all}
.gic-flow>:last-child{margin-bottom:0!important}
.gic-flow>h2,.gic-flow>h3{margin:0 0 0.625rem!important;font-size:1.05rem}
.gic-checks{display:flex;flex-direction:column;gap:0.5625rem}
.gic-flow .btn.block{width:100%}
.gic-flow .segmented{max-width:100%}

/* the standard scrolling item list (words / cards / questions): 2-3 columns when there is room */
.fc-list{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,20.625rem),1fr));gap:0.375rem 0.875rem;max-height:25rem;overflow:auto;align-content:start}

/* a hand-built pane with explicit columns (use when you want to choose exactly what goes where) */
.gic-cols{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.25rem 2.25rem;align-items:start}
.gic-cols>*{min-width:0}
.gic-col{display:flex;flex-direction:column;gap:1rem;min-width:0}
.gic-wide{min-width:0}

/* a titled band inside a pane */
.gic-band{border-top:2px solid var(--line);padding-top:0.75rem;margin-top:0.75rem}

/* locks: a tab is hidden when its panel would be (the engine also picks the first tab that is still showing) */
html[data-lock] .gic-tabs button.gic-edit,html[data-lock="2"] .gic-tabs button.gic-opts{display:none!important}
html[data-lock="2"] .gic-set{display:none!important}
html.gic-live .gic-set{display:none!important}
html.gic-fs .layout.gic-tabbed:not(.gic-side){display:block}
html.gic-fs .layout.gic-tabbed:not(.gic-side) .gic-set{display:none!important}

/* collapsible scores panel under the settings box */
.gic-set~.gic-pan .top-list,.layout.gic-tabbed .gic-pan .top-list{max-width:35rem}

/* ---- the game window: as big as the screen allows.  --gic-maxh is set by gic-layout.js from the SCREEN height
        (the iframe is as tall as its content, so vh cannot be used). Games size their board with it, e.g.
        .board{width:min(100%, calc(var(--gic-maxh) * var(--r,1)))}  ---- */
:root{--gic-maxh:40rem}

@media(max-width:900px){
  .layout.gic-tabbed>.gic-editor{order:0}
  .gic-flow{column-width:16.25rem;column-gap:1.75rem}
  .gic-flow>.gic-source-row{column-span:all}   /* 1.203.201: narrow two columns (iPad upright): the Import / Paste toolbar runs under both columns instead of jumping to the top of the right one */
}
@media(max-width:760px){
  .gic-set{padding:0.75rem}
  .gic-cols{grid-template-columns:minmax(0,1fr);gap:1rem}
  .gic-tabs{margin-bottom:0.75rem}
  .gic-tabs button{padding:0.5rem 0.625rem;font-size:.78rem;gap:5px}
  .gic-tabs button i{display:none}
  .fc-list{grid-template-columns:minmax(0,1fr)}
  .gic-flow{column-width:auto;columns:1}
}
@media(max-width:380px){.gic-tabs button{padding:0.5rem 0.4375rem;font-size:.74rem}}

/* a second panel merged into a tab: its own full-width band */
.gic-band{display:flex;flex-direction:column;gap:0.625rem}
.gic-flow>.gic-band{margin-top:0.375rem!important;padding-top:0.875rem}

/* help tooltips stay out of the page's scroll width until they are shown */
.gic-tip:not(:hover):not(:focus-visible):not(.open)::after,.gic-tip:not(:hover):not(:focus-visible):not(.open)::before{display:none}

/* small screens: the tab menu never scrolls – 5+ tabs wrap into two even rows (a grid), 4 tabs stay in one row until the very smallest phones */
@media(max-width:760px){
  .gic-tabs[data-n="5"],.gic-tabs[data-n="6"],.gic-tabs[data-n="7"],.gic-tabs[data-n="8"]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:2px;background:var(--hard)}
  .gic-tabs[data-n="7"],.gic-tabs[data-n="8"]{grid-template-columns:repeat(4,minmax(0,1fr))}
  .gic-tabs[data-n="5"] button,.gic-tabs[data-n="6"] button,.gic-tabs[data-n="7"] button,.gic-tabs[data-n="8"] button{background:var(--bg);border-right:0}
  .gic-tabs[data-n="5"] button[aria-pressed=true],.gic-tabs[data-n="6"] button[aria-pressed=true],.gic-tabs[data-n="7"] button[aria-pressed=true],.gic-tabs[data-n="8"] button[aria-pressed=true]{background:var(--sky)}
  .gic-tabs button{padding:0.5625rem 4px;font-size:.8rem}
}
@media(max-width:360px){
  .gic-tabs[data-n="4"]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2px;background:var(--hard)}
  .gic-tabs[data-n="4"] button{background:var(--bg);border-right:0}
  .gic-tabs[data-n="4"] button[aria-pressed=true]{background:var(--sky)}
}
@media(max-width:760px){
  /* no empty cell: a short last row stretches to fill the width */
  .gic-tabs[data-n="5"]{grid-template-columns:repeat(6,minmax(0,1fr))}
  .gic-tabs[data-n="5"] button{grid-column:span 2}
  .gic-tabs[data-n="5"] button:nth-child(n+4){grid-column:span 3}
  .gic-tabs[data-n="7"]{grid-template-columns:repeat(12,minmax(0,1fr))}
  .gic-tabs[data-n="7"] button{grid-column:span 3}
  .gic-tabs[data-n="7"] button:nth-child(n+5){grid-column:span 4}
}

/* ---- the standard Print tab: two big buttons (Print, Save to PDF) + the odd extra option ---- */
.gic-printbtns{display:flex;flex-wrap:wrap;gap:0.625rem;align-items:center}
.gic-printbtns .btn{min-width:9.375rem;justify-content:center}

/* ---- the standard sound button (top corner of the game window) ---- */
.gic-snd{min-width:2.375rem}
.gic-snd-float{position:absolute;top:0.5rem;right:0.5rem;z-index:20}
html.gic-fs .gic-snd-float{right:3.75rem}

/* ---- Graphics: Low (html[data-gfx=low], set by gic-layout.js) — the same look, lighter to draw ---- */
html[data-gfx=low] *,html[data-gfx=low] *::before,html[data-gfx=low] *::after{backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
html[data-gfx=low] .gic-gfx .segmented button[data-v=low][aria-pressed=true]{background:var(--gold);color:var(--hard)}
.gic-gfx{margin-top:4px}
.gic-gfx .segmented{max-width:22.5rem}
.gic-gfx .hint{max-width:35rem}

/* collapsible settings box (toggle button added by gic-layout.js) — same look as the Top scores header */
.gic-set-toggle{display:flex;align-items:center;gap:0.5rem;width:100%;margin:0 0 0.75rem;padding:0;background:none;border:0;color:inherit;font:inherit;font-weight:800;font-size:1.05rem;cursor:pointer;text-align:left;user-select:none}
.gic-set-toggle i{width:1.1em;text-align:center;opacity:.9}
.gic-set-toggle::after{content:'\f078';font-family:'Font Awesome 6 Free';font-weight:900;font-size:.75rem;margin-left:auto;transition:transform .15s;transform:rotate(180deg)}
.gic-set.gic-folded>.gic-set-toggle{margin-bottom:0}
.gic-set.gic-folded>.gic-set-toggle::after{transform:none}
.gic-set.gic-folded>.gic-tabs,.gic-set.gic-folded>.gic-pane{display:none!important}

/* =====================================================================================================
   TIDY CONTROLS  (same look in every game's settings box)
   - .link-btn  : a text-style control inside the settings box is drawn as a small outlined button
   - .gic-source-row : one toolbar - main action first (Import), helpers next, the destructive one last on the right
   - .gic-status: the "10 sentences ready" line - a full-width bar with an icon, not loose small print
   ===================================================================================================== */
.gic-set .link-btn{display:inline-flex;align-items:center;justify-content:center;gap:0.4375rem;padding:0.375rem 0.6875rem;background:var(--panel2);border:2px solid var(--line);border-radius:0.5625rem;color:var(--text);font:700 .8rem 'Inter',sans-serif;line-height:1.2;cursor:pointer;text-align:center;text-decoration:none;transition:border-color .12s,background .12s}
.gic-set .link-btn i{color:var(--sky);font-size:.9em}
.gic-set .link-btn:hover{border-color:var(--sky);text-decoration:none;background:var(--chip-bg)}
.gic-set .link-btn:focus-visible{outline:2px solid var(--sky);outline-offset:2px}
.gic-set .link-btn:disabled{opacity:.5;cursor:not-allowed}
.gic-set .link-btn.gic-danger,.gic-set .link-btn.danger{color:var(--rose)}
.gic-set .link-btn.gic-danger i,.gic-set .link-btn.danger i{color:var(--rose)}
.gic-set .link-btn.gic-danger:hover,.gic-set .link-btn.danger:hover{border-color:var(--rose)}

.gic-source-row{align-items:center}
.gic-source-row .btn,.gic-set .gic-source-row .link-btn{min-height:2.25rem}
.gic-source-row .gic-danger{margin-left:auto}

.gic-status{display:flex;align-items:flex-start;gap:0.625rem;width:100%;margin:0;padding:0.625rem 0.875rem;background:var(--panel2);border:2px solid var(--line);border-left:5px solid var(--sky);border-radius:0.625rem;color:var(--soft);font-size:.86rem;font-weight:600;line-height:1.4}
.gic-status::before{content:'\f05a';font-family:'Font Awesome 6 Free';font-weight:900;color:var(--sky);flex:none;margin-top:1px}
.gic-status:empty{display:none}

@media(max-width:560px){
  .gic-source-row .btn,.gic-set .gic-source-row .link-btn{flex:1 1 calc(50% - 4px);min-height:2.5rem}
  .gic-source-row .btn.primary:first-child{flex-basis:100%}
  .gic-source-row .gic-danger{margin-left:0}
  .gic-status{padding:0.5625rem 0.75rem;font-size:.82rem}
}
.gic-flow>.gic-status{margin:0.875rem 0 0.875rem!important}
.gic-set .field-label #itemCount{white-space:nowrap;flex:none;margin-left:0.625rem}
/* small tips under a control (picture formats etc.): a quiet note with an icon, never bare text */
.gic-set #picHint,.gic-set #imgHint{display:flex;align-items:flex-start;gap:0.5rem;line-height:1.4}
.gic-set #picHint::before,.gic-set #imgHint::before{content:'\f03e';font-family:'Font Awesome 6 Free';font-weight:900;font-size:.85em;margin-top:2px;flex:none;opacity:.8}
.gic-set #picHint:empty,.gic-set #imgHint:empty{display:none}

/* 1.203.201: item lists in the options grow with the page at every size, as they already did on phones and small tablets (game.css 1.43.29) - no small scrolling box inside the options */
.gic-set :is(.fc-list,.cq-items,.ed-items){max-height:none!important;overflow:visible!important}
/* the Paste a list box (gic-layout.js tidy): a full-width band under the add / import row, with a normal-size Add all button (not a full-width bar) */
.gic-set .gic-paste:not([hidden]){display:flex;flex-direction:column;align-items:flex-start;gap:0.5rem}
.gic-set .gic-paste textarea{width:100%;box-sizing:border-box}
.gic-set .gic-paste>.btn,.gic-set .gic-paste>div>.btn,.gic-set .gic-paste>.row>.btn{width:auto;flex:none}

/* ---- 1.203.420 / 1.203.423: OPTIONAL LEFT SIDEBAR (class gic-side beside gic-tabbed; Greeting Card Maker) ----
   A tool whose stage is ONE tall picture (a card, a poster) wastes a lot of width on a desktop, and pushing the
   options under the stage makes the picture small. Such a tool may ask for the settings box to sit BESIDE the stage
   instead, in normal view AND in full screen (the options are where the work happens, so they never disappear).
   Nothing new is built: gic-layout.js makes the same tabbed box, the stage column carries data-gic-wrap so the box
   lands as a sibling of it, and these rules put the two in one grid. The box and the stage share ONE frame (the
   layout itself); each tool says how tall that frame is. Under 900px the box goes back under the stage. */
@media(min-width:900px){
  .layout.gic-tabbed.gic-side{display:grid;grid-template-columns:var(--gic-side-w,19rem) minmax(0,1fr);gap:0;align-items:stretch}
  .layout.gic-tabbed.gic-side>.gic-set{grid-column:1;grid-row:1;margin:0;contain:size;min-height:0;display:flex;flex-direction:column;overflow:hidden;padding:0}
  .layout.gic-tabbed.gic-side>.gic-set>.gic-tabs{flex:none;margin:0.75rem 0.75rem 0.5rem}
  .layout.gic-tabbed.gic-side>.gic-set>.gic-pane{flex:1 1 0;min-height:0;overflow-y:auto;overflow-x:hidden;padding:0.25rem 0.75rem 0.875rem}
  .layout.gic-tabbed.gic-side>.col{grid-column:2;grid-row:1;min-height:0}
  html.gic-live .layout.gic-tabbed.gic-side,html[data-lock="2"] .layout.gic-tabbed.gic-side{grid-template-columns:minmax(0,1fr)}
  html.gic-live .layout.gic-tabbed.gic-side>.col,html[data-lock="2"] .layout.gic-tabbed.gic-side>.col{grid-column:1}
  .layout.gic-tabbed.gic-side .gic-flow{columns:auto;column-gap:0}   /* one narrow column: NOT a multi-column box at all (a fixed-height multi-column box grows extra columns sideways) */
  .layout.gic-tabbed.gic-side .gic-cols{grid-template-columns:minmax(0,1fr)}
  .layout.gic-tabbed.gic-side .gic-tabs{max-width:none;margin-bottom:0.75rem}
  .layout.gic-tabbed.gic-side .gic-tabs button{flex-direction:column;gap:3px;padding:0.5rem 0.25rem;font-size:.72rem;line-height:1.15}
  .layout.gic-tabbed.gic-side .gic-tabs button i{display:block;font-size:.95rem}
  .layout.gic-tabbed.gic-side .fc-list{grid-template-columns:minmax(0,1fr)}
  /* 1.203.478: the side-bar may sit on the RIGHT (class gic-side-r, set by the divider's swap button) */
  .layout.gic-tabbed.gic-side.gic-side-r{grid-template-columns:minmax(0,1fr) var(--gic-side-w,19rem)}
  .layout.gic-tabbed.gic-side.gic-side-r>.gic-set{grid-column:2}
  .layout.gic-tabbed.gic-side.gic-side-r>.col{grid-column:1}
  html.gic-live .layout.gic-tabbed.gic-side.gic-side-r,html[data-lock="2"] .layout.gic-tabbed.gic-side.gic-side-r{grid-template-columns:minmax(0,1fr)}
  html.gic-live .layout.gic-tabbed.gic-side.gic-side-r>.col,html[data-lock="2"] .layout.gic-tabbed.gic-side.gic-side-r>.col{grid-column:1}
}
/* a side-bar is always open: no fold-away button */
.layout.gic-tabbed.gic-side .gic-set-toggle{display:none}
/* narrower than 900px in full screen: the box sits under the stage and the page scrolls (it must not vanish) */
@media(max-width:899.98px){html.gic-fs .layout.gic-tabbed.gic-side>.gic-set{display:block!important}}

/* ---- 1.203.479: SPLIT BAR, the shared side-bar divider (assets/js/split.js mounts it on every .layout.gic-side) ----
   Drag the line to resize, the grip folds the panel, the round button moves it to the other side (.gic-side-r).
   Shown at 900px+ only; under that the panel sits under the stage. Bigger targets on touch screens. */
.gic-split{display:none}
@media(min-width:900px){
  .layout.gic-side{position:relative}
  .layout.gic-side>.gic-split{display:block;position:absolute;top:0;bottom:0;left:calc(var(--gic-side-w,19rem) - 7px);width:14px;z-index:6;cursor:col-resize;touch-action:none}
  .layout.gic-side.gic-side-r>.gic-split{left:auto;right:calc(var(--gic-side-w,19rem) - 7px)}
  .gic-split::before{content:"";position:absolute;left:50%;top:0;bottom:0;width:2px;margin-left:-1px;background:var(--sky);opacity:0;transition:opacity .12s}
  .gic-split:hover::before,.gic-split:focus-visible::before,.gic-split-drag>.gic-split::before{opacity:.9}
  .gic-split:focus-visible{outline:0}
  .gic-split-grip,.gic-split-swap{position:absolute;left:50%;margin:0;padding:0;display:grid;place-items:center;border:2px solid var(--line);background:var(--panel);color:var(--muted);line-height:1;cursor:pointer;box-shadow:none}
  .gic-split-grip{top:50%;width:1.625rem;height:3.25rem;transform:translate(-50%,-50%);border-radius:99px;font-size:.8rem}
  .gic-split-swap{top:calc(50% + 2.25rem);width:1.625rem;height:1.625rem;transform:translateX(-50%);border-radius:50%;font-size:.7rem}   /* just under the grip: the two tools stay together and never cover the stage's or the panel's top row */
  .gic-split-grip:hover,.gic-split-grip:focus-visible,.gic-split-drag .gic-split-grip,.gic-split-swap:hover,.gic-split-swap:focus-visible{border-color:var(--sky);color:var(--sky)}
  /* folded: the panel column is 0 wide; the browser skips drawing it; the grip becomes a tab on the edge */
  .gic-split-off.layout.gic-side>.gic-set{visibility:hidden;content-visibility:hidden}
  .gic-split-off.layout.gic-side>.gic-split{left:0;width:1.75rem}
  .gic-split-off.layout.gic-side>.gic-split .gic-split-grip{left:0;transform:translate(0,-50%);border-left:0;border-radius:0 99px 99px 0;width:1.5rem}
  .gic-split-off.layout.gic-side>.gic-split .gic-split-swap{left:.875rem}
  .gic-split-off.layout.gic-side.gic-side-r>.gic-split{left:auto;right:0}
  .gic-split-off.layout.gic-side.gic-side-r>.gic-split .gic-split-grip{left:auto;right:0;border-left:2px solid var(--line);border-right:0;border-radius:99px 0 0 99px}
  .gic-split-off.layout.gic-side.gic-side-r>.gic-split .gic-split-swap{left:auto;right:.875rem;transform:translateX(50%)}
  /* while dragging: one cursor everywhere, no text selection, frames and canvases do not steal the pointer */
  .gic-split-drag,.gic-split-drag *{cursor:col-resize;user-select:none;-webkit-user-select:none}
  .gic-split-drag iframe,.gic-split-drag canvas{pointer-events:none}
  .gic-split-ghost>.gic-split::before{opacity:.9;width:3px}
  /* full screen with the panel on the right: keep the tab row clear of the menu button in the top right corner */
  html.gic-fs .layout.gic-tabbed.gic-side.gic-side-r>.gic-set>.gic-tabs{margin-right:3.5rem}
}
@media(min-width:900px) and (pointer:coarse){
  .layout.gic-side>.gic-split{width:24px;left:calc(var(--gic-side-w,19rem) - 12px)}
  .layout.gic-side.gic-side-r>.gic-split{left:auto;right:calc(var(--gic-side-w,19rem) - 12px)}
  .gic-split-grip{width:2.25rem;height:4rem}
  .gic-split-swap{width:2.25rem;height:2.25rem;top:calc(50% + 2.75rem)}
}

/* /assets/css/kit-quiz.css */
/* =====================================================================================================================
   Games In Class — Game Kit: the shared QUESTION CARD (assets/js/kit-quiz.js, GICQuiz), 1.203.140
   Designed ONCE in rem, one column on every screen. In full screen the kit's root size grows with the window and Display size
   (kit.css html.gic-fs), so the card grows with everything else; there are no per-screen size rules here. The only sizes that change
   inside the card are set by GICQuiz fit() when the card would not fit its room (--kq-key, the picture, the letter boxes).
   A game themes it with --kq-accent (border and highlights); everything else is shared.

   The LAYER (where the card sits) belongs to the game. .kq-layer is a ready one: covers its parent, centres the card, dims the
   game behind it, keeps --kq-pad-b free at the bottom (a game's control strip). fit() adds .kq-roomy when the card needs that room.
   ===================================================================================================================== */
.kq-layer{position:absolute;inset:0;z-index:9;display:flex;align-items:center;justify-content:center;padding:var(--kq-pad-t,0.625rem) 0.875rem var(--kq-pad-b,0.625rem);background:rgba(2,6,23,.3);overflow:hidden}
.kq-layer[hidden]{display:none}
.kq-layer.kq-roomy{padding-bottom:0.5rem}
.kq-layer.kq-watch{background:none;pointer-events:none;align-items:flex-start}

.kq-card{
  --panel:#17202f;--panel2:rgba(255,255,255,.08);--hard:rgba(255,255,255,.18);--input-bg:#0f172a;--text:#f1f5f9;--soft:#cbd5e1;--muted:#94a3b8;color-scheme:dark;
  --kq-a:var(--kq-accent,var(--accent,#f59e0b));
  position:relative;box-sizing:border-box;width:min(35rem,100%);max-height:100%;margin:auto;display:flex;flex-direction:column;gap:0.5rem;padding:0.625rem 0.875rem 0.5rem;
  background:var(--panel);color:var(--text);border:3px solid var(--kq-a);border-radius:1.125rem;box-shadow:0 10px 30px rgba(0,0,0,.55);overflow:hidden;animation:kqup .22s ease-out;text-align:left}
@keyframes kqup{from{opacity:.4;transform:translateY(0.875rem)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.kq-card{animation:none}}
.kq-card.good{border-color:#34d399}.kq-card.bad{border-color:#fb7185}

/* head: who answers, what kind of question */
.kq-head{display:flex;flex-wrap:wrap;align-items:center;gap:4px 0.625rem;min-height:1.75rem}
.kq-head .kq-badge{flex:none;width:1.7em;height:1.7em;border-radius:0.4375rem}
.kq-who{font:800 1.05rem/1.2 'Baloo 2',system-ui,sans-serif;flex:1 1 8em;min-width:0;overflow-wrap:break-word}
.kq-sub{flex:none;color:var(--muted);font-weight:700;font-size:.8rem}
.kq-type{flex:none;margin-left:auto;font-size:.78rem;font-weight:800;color:var(--soft);background:var(--panel2);border-radius:6.1875rem;padding:3px 0.625rem;white-space:nowrap}
.kq-type i{color:var(--kq-a);margin-right:3px}

/* the question */
.kq-main{display:flex;flex-direction:column;align-items:center;gap:0.5rem;text-align:center}
.kq-pic{width:7rem;max-width:40%;aspect-ratio:1;flex:none;border-radius:0.875rem;background:linear-gradient(160deg,#fffef8,#f1e9d2);display:grid;place-items:center;overflow:hidden;box-shadow:inset 0 0 0 2px rgba(15,23,42,.15)}
.kq-pic img{width:92%;height:92%;object-fit:contain}
.kq-pic .e{font-size:4.2rem;line-height:1;font-family:"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif}
.kq-prompt{font:800 1.2rem/1.25 'Baloo 2',system-ui,sans-serif;overflow-wrap:anywhere}
.kq-stmt{font:800 1.2rem/1.25 'Baloo 2',system-ui,sans-serif;overflow-wrap:anywhere}
.kq-stmt b{color:var(--kq-a)}.kq-stmt i{font-style:normal;color:#fff}
.kq-say{display:inline-flex;align-items:center;gap:0.625rem;padding:0.625rem 1.125rem;border-radius:6.1875rem;border:3px solid var(--kq-a);background:var(--panel2);color:var(--text);font:800 1.05rem 'Baloo 2',sans-serif;cursor:pointer}
.kq-say i{font-size:1.5rem;color:var(--kq-a)}.kq-say:hover:not(:disabled){filter:brightness(1.15)}.kq-say:disabled{opacity:.7;cursor:default}

/* answers */
.kq-ctl{display:flex;flex-direction:column;gap:0.5rem;width:100%}
.kq-choices{display:flex;flex-direction:column;gap:0.375rem}
.kq-choices.tf{flex-direction:row}
.kq-choice{display:flex;align-items:center;gap:0.625rem;text-align:left;min-height:2.75rem;padding:0.4375rem 0.75rem;border-radius:0.75rem;border:3px solid var(--hard);background:var(--panel2);color:var(--text);cursor:pointer;font:800 1rem 'Baloo 2',system-ui,sans-serif;touch-action:manipulation}
.kq-choices.tf .kq-choice{flex:1;justify-content:center;font-size:1.2rem}
.kq-choice.true i{color:#34d399}.kq-choice.false i{color:#fb7185}
.kq-choice .k{width:1.5rem;height:1.5rem;border-radius:50%;background:#0f172a;display:grid;place-items:center;font:800 .8rem 'Inter',sans-serif;flex:none;color:var(--soft)}
.kq-choice .t{overflow-wrap:anywhere;min-width:0}
.kq-choice:hover:not(:disabled){border-color:#38bdf8;filter:brightness(1.1)}
.kq-choice.ok{background:#064e3b;border-color:#34d399;color:#ecfdf5}
.kq-choice.no{background:#4c0519;border-color:#fb7185;color:#ffe4e6}
.kq-choice:disabled{cursor:default}
.kq-choice.gone{opacity:.35;text-decoration:line-through}
.kq-hint{font:700 1.1rem 'Courier New',monospace;letter-spacing:.06em;color:#fbbf24;overflow-wrap:anywhere;text-align:center}
.kq-form{display:flex;gap:0.5rem}
.kq-form input{flex:1;min-width:0;font:700 1.05rem 'Inter',sans-serif;padding:0.5625rem 0.75rem;border-radius:0.625rem;border:3px solid var(--hard);background:var(--input-bg);color:var(--text)}
.kq-form input:focus{outline:3px solid #38bdf8;outline-offset:0}

/* typed answers: letter boxes, letter tiles (unscramble), keyboard, Check */
.kq-tw{display:flex;flex-wrap:wrap;gap:.5em .9em;justify-content:center;font-size:var(--tf,1.8em);margin:.1em 0}
.kq-tword{display:inline-flex;gap:.18em;flex-wrap:nowrap}
.kq-tfix{display:grid;place-items:center;width:.6em;height:1.55em;font:800 1em 'Baloo 2',sans-serif;color:var(--muted)}
.kq-tbox{width:1.3em;height:1.55em;display:grid;place-items:center;border-radius:.3em;border:.09em solid var(--hard);background:var(--panel2);color:#fff;font:800 1em 'Baloo 2',system-ui,sans-serif;cursor:pointer;user-select:none;box-shadow:inset 0 -.12em 0 rgba(0,0,0,.25)}
.kq-tbox.cur{border-color:#38bdf8;box-shadow:0 0 0 .1em rgba(56,189,248,.5),inset 0 -.12em 0 rgba(0,0,0,.25)}
.kq-tbox.lock{background:#fde68a;color:#1c1917;border-color:#f59e0b;cursor:default}
.kq-tbox.ok{background:#064e3b;border-color:#34d399;color:#ecfdf5}
.kq-tbox.no{background:#4c0519;border-color:#fb7185;color:#ffe4e6}
.kq-tiles{display:flex;flex-wrap:wrap;gap:0.375rem;justify-content:center;align-items:center}
.kq-tile{min-width:2.3rem;height:2.5rem;padding:0 0.375rem;border-radius:0.5625rem;border:3px solid #f59e0b;background:linear-gradient(#fde68a,#fbbf24);color:#1c1917;font:800 1.3rem 'Baloo 2',sans-serif;cursor:pointer;box-shadow:0 3px 0 rgba(0,0,0,.35);touch-action:manipulation}
.kq-tile.used{opacity:.25;box-shadow:none}.kq-tile:active:not(:disabled){transform:translateY(2px);box-shadow:none}
.kq-clear{margin-left:0.375rem}
.kq-kb{display:flex;flex-direction:column;gap:.3em;align-items:center}
.kq-kb-row{display:flex;gap:.3em;justify-content:center;width:100%}
.kq-key{flex:1 1 0;max-width:3.1em;min-width:0;height:var(--kq-key,2.875rem);padding:0;border-radius:.45em;border:.1em solid var(--hard);background:var(--panel2);color:#fff;font:800 1.05rem 'Baloo 2',system-ui,sans-serif;cursor:pointer;touch-action:manipulation;box-shadow:0 .14em 0 rgba(0,0,0,.4)}
.kq-key.wide{flex:1.7 1 0;max-width:5em}
.kq-key:hover:not(:disabled){border-color:#38bdf8}
.kq-key:active:not(:disabled){transform:translateY(.12em);box-shadow:none}
.kq-key:disabled{opacity:.5;cursor:default}
.kq-go{width:100%;min-height:2.75rem;padding:.35em;border-radius:.6em;border:0;background:#10b981;color:#fff;font:800 1.15rem 'Baloo 2',system-ui,sans-serif;cursor:pointer;box-shadow:0 .14em 0 rgba(0,0,0,.35);touch-action:manipulation}
.kq-go:disabled{background:#475569;color:#cbd5e1;cursor:default}

/* say it */
.kq-judge{display:flex;gap:0.5rem}.kq-judge .btn{flex:1;justify-content:center;min-height:3rem;font-size:1.05rem}
.kq-judge .kq-yes{background:#10b981;color:#052e1b}.kq-judge .kq-no{background:#f43f5e;color:#fff}
.kq-sayans{font:800 1.5rem/1.2 'Baloo 2',system-ui,sans-serif;color:#fbbf24;text-align:center;padding:0.375rem;overflow-wrap:anywhere}
.kq-show{width:100%;justify-content:center;min-height:3rem}

/* foot: I don't know, and "?" (the instruction slides in) */
.kq-foot{display:flex;align-items:center;justify-content:center;gap:0.75rem;min-height:1.875rem;padding:0 2.375rem;position:relative;flex-wrap:wrap}
.kq-idk{font-size:1rem}
.kq-qm{position:absolute;right:0;top:50%;margin-top:-15px;width:1.875rem;height:1.875rem;padding:0;border-radius:50%;border:2px solid var(--kq-a);background:var(--panel2);color:var(--kq-a);font:800 1rem/1 'Baloo 2',system-ui,sans-serif;cursor:pointer;touch-action:manipulation}
.kq-qm.on{background:var(--kq-a);color:#0f172a}
.kq-help{position:absolute;right:0.5rem;bottom:2.875rem;max-width:min(16.25rem,82%);box-sizing:border-box;padding:0.5rem 0.75rem;border-radius:0.75rem;background:#0f172a;color:#fff;border:2px solid var(--kq-a);font-weight:700;font-size:.92rem;line-height:1.3;z-index:3;transform:translateX(calc(100% + 1.5rem));opacity:0;pointer-events:none;transition:transform .22s ease,opacity .2s}
.kq-help.open{transform:none;opacity:1;pointer-events:auto}

/* result, waiting, timer */
.kq-wait{margin:0;color:var(--muted);font-weight:700;font-style:italic}
.kq-res{padding:0.5rem 0.75rem;border-radius:0.75rem;font-weight:700;text-align:center}
.kq-res b{font:800 1.15rem 'Baloo 2',system-ui,sans-serif}
.kq-card.good .kq-res{background:#064e3b;color:#a7f3d0}
.kq-card.bad .kq-res{background:#4c0519;color:#fecdd3}
.kq-timer{position:absolute;left:0;right:0;bottom:0;height:0.375rem;background:rgba(255,255,255,.1)}
.kq-timer i{display:block;height:100%;background:linear-gradient(90deg,#34d399,#facc15 60%,#ef4444);transform-origin:left;animation:kqtime linear forwards}
.kq-timer.stop i{animation-play-state:paused}
@keyframes kqtime{from{transform:scaleX(1)}to{transform:scaleX(0)}}

/* WATCH: someone else is answering. A slim pill (who + waiting / result), not a card */
.kq-card.watch{width:auto;max-width:92%;flex-direction:row;align-items:center;gap:0.5rem;padding:3px 0.875rem;border-radius:6.1875rem;border:0;background:rgba(255,255,255,.78);color:#0f172a;box-shadow:0 2px 10px rgba(0,0,0,.2);animation:none;
  font-size:calc(1rem * var(--k-hs,1))}
.kq-card.watch .kq-main,.kq-card.watch .kq-type,.kq-card.watch .kq-timer,.kq-card.watch .kq-who,.kq-card.watch .kq-sub{display:none}
.kq-card.watch .kq-head{min-height:0}
.kq-card.watch .kq-badge{width:1.05em;height:1.05em}
.kq-card.watch .kq-ctl{width:auto}
.kq-card.watch .kq-wait,.kq-card.watch .kq-res{font-size:max(var(--k-text-min,0.875rem),.9em);font-weight:800;padding:0;background:none;color:#0f172a;font-style:normal}
.kq-card.watch .kq-res b{font-size:1em}

/* SHORT and WIDE room (a phone on its side, a short laptop window): the one layout that changes shape. The question (picture, prompt) goes on the
   left and the answers on the right, so the card needs little height. Chosen by the room's shape only (a container query on the layer). */
.kq-layer{container-type:size}
@container (max-height:430px) and (min-width:480px){
  .kq-card:not(.watch){display:grid;width:min(51.25rem,100%);grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);grid-template-areas:"head head" "main ctl";column-gap:0.875rem;row-gap:0.375rem;align-items:center}
  .kq-card:not(.watch) .kq-head{grid-area:head}
  .kq-card:not(.watch) .kq-main{grid-area:main}
  .kq-card:not(.watch) .kq-ctl{grid-area:ctl}
  .kq-card:not(.watch):not(:has(.kq-main)){grid-template-columns:1fr;grid-template-areas:"head" "ctl";width:min(35rem,100%)}
}

/* a game whose layer is the shared phone sheet (.ph-sheet, game.css) in full screen: keep clear of the full-screen bar's column on the right (a phone on its side) */
html.gic-stage.gic-fs body .ph-sheet.kq-layer{right:var(--hud-r,0px)}

/* /assets/css/slate.css */
/* Slate light skin (1.203.337). Switch: Admin > Fonts & app icon > "Light theme look" (light_skin(), data-lskin on <html>). Loaded after every other
   stylesheet; everything is scoped to html[data-lskin=slate], so choosing Sky in Admin brings the old look back unchanged.
   What it does: slate-blue palette with darker text (text >= 5.9:1), ONE 2px line weight for cards, panels, buttons, inputs and chips in BOTH themes,
   flat shadows in both themes, slate header and footer, no glow behind Welcome back. Games load this file too, so their option panels follow. */
/* ===== PROTOTYPE halfway v3 (light only): Sky colours kept, slate header/footer, flatter cards, 2px flat buttons ===== */
html[data-lskin=slate][data-theme=light][data-lstyle=sky]{
  --bg:#e7f0f9;--bg2:#eef4fa;--line:#aebfd6;--hard:#1f3358;--text:#1b2c48;--soft:#38496a;--muted:#52627f;
  --ds-page:#e7f0f9;--ds-section-bg:#eef4fa;--ds-rule:#aebfd6;--ds-outline:#1f3358;--ds-text:#1b2c48;--ds-text-soft:#38496a;--ds-text-muted:#52627f;
  --soft-shadow:0 1px 2px rgba(30,45,69,.10),0 3px 10px rgba(30,45,69,.06);
  --ds-sh:0px;--ds-sh-sm:0px;--shadow:0 1px 0 rgba(30,45,69,.18);--shadow-sm:none;--sh:0px;
}
html[data-lskin=slate][data-theme=light][data-lstyle=sky] body{background:var(--bg)}
html[data-lskin=slate][data-theme=light][data-lstyle=sky] .main-header{background:#3d5170;border-bottom:0;box-shadow:none}
html[data-lskin=slate][data-theme=light][data-lstyle=sky] .main-header :is(.logo-text,a.logo){color:#fff}
html[data-lskin=slate][data-theme=light][data-lstyle=sky] .main-header .logo-highlight{color:#8fd0ff}
html[data-lskin=slate][data-theme=light][data-lstyle=sky] .main-header nav a:not(.menu-panel a),html[data-lskin=slate][data-theme=light][data-lstyle=sky] .main-header :is(.hdr-join,.nav-more>summary){color:#e8eef8}
html[data-lskin=slate][data-theme=light][data-lstyle=sky] .main-header :is(.nav-btn,.hdr-icon){background:#fff;color:#1b2c48}
html[data-lskin=slate][data-theme=light][data-lstyle=sky] .main-footer{background:#3d5170;color:#dbe4f0;border-top:0}
html[data-lskin=slate][data-theme=light][data-lstyle=sky] .main-footer a{color:#f5c451}
html[data-lskin=slate][data-theme=light][data-lstyle=sky] :is(.card,.panel,.stat,.modal-box,.menu-panel,.howto li,.lrows,.empty-hero,.ml-card,.hub-tools-menu,.lmore-menu,.qs-tile,.qs-classes,.next,.glance,.table-wrap,.cw-shelf,.si-list,.si-sec,.lib-tile,.lib-new-menu,.alert){border:2px solid var(--line);box-shadow:var(--soft-shadow)}
html[data-lskin=slate][data-theme=light][data-lstyle=sky] .card:hover{box-shadow:0 2px 4px rgba(30,45,69,.12),0 8px 22px rgba(30,45,69,.10)}
html[data-lskin=slate][data-theme=light][data-lstyle=sky] :is(.card-bar,.card-thumb){border-bottom-width:2px}
html[data-lskin=slate][data-theme=light][data-lstyle=sky] .si-sec .si-body,html[data-lskin=slate][data-theme=light][data-lstyle=sky] .si-list{box-shadow:none}
html[data-lskin=slate][data-theme=light][data-lstyle=sky] nav.tabs.hub-tabs{border-bottom:2px solid var(--line)}
html[data-lskin=slate][data-theme=light][data-lstyle=sky] :is(.btn,.nav-btn,.chip,.pg-pill){border-width:2px;box-shadow:none}
html[data-lskin=slate][data-theme=light][data-lstyle=sky] .main-header :is(.nav-more,.nav-dd,details)>summary:not(.nav-btn){color:#e8eef8}
html[data-lskin=slate][data-theme=light][data-lstyle=sky] .main-header .hdr-join{border-color:#e8eef8;background:transparent;color:#fff}

/* ===== v4: toned-down blue, more slate ===== */
html[data-lskin=slate][data-theme=light][data-lstyle=sky]{
  --bg:#e9edf3;--bg2:#f0f3f8;--panel2:#f1f4f9;--line:#b6c1d2;--hard:#2c3b57;--text:#1d2b44;--soft:#3b4a66;--muted:#55637d;
  --sky:#3b5b8c;--head:#2f4d7d;--btn-main:#3b5b8c;--chip-bg:#dde3ec;--code-bg:#dde3ec;--th-bg:#e3e8f0;--stage-bg:#f1f4f9;--link-hover:#22406c;
  --ds-page:#e9edf3;--ds-section-bg:#f0f3f8;--ds-raised:#f1f4f9;--ds-rule:#b6c1d2;--ds-outline:#2c3b57;--ds-brand:#3b5b8c;--ds-text:#1d2b44;--ds-text-soft:#3b4a66;--ds-text-muted:#55637d;
}
html[data-lskin=slate][data-theme=light][data-lstyle=sky] .alert-info{background:#e1e8f2;border-color:#a9b8cf;color:#2c3b57}
html[data-lskin=slate][data-theme=light][data-lstyle=sky] :is(.btn-primary,.btn.primary,.chip.active,.pg-pill.on,.jb-tab[aria-selected=true],.tab.active.type-tab){background:#3b5b8c;color:#fff;border-color:#2c3b57}
html[data-lskin=slate][data-theme=light][data-lstyle=sky] :is(.card-title,.qs-tile b,.lrow a){color:#2f4d7d}
html[data-lskin=slate][data-theme=light][data-lstyle=sky] nav.tabs.hub-tabs .tab.active{color:#2f4d7d;border-color:#3b5b8c}
html[data-lskin=slate][data-theme=light][data-lstyle=sky] :is(.lrows .lrow:hover,.cw-new summary:hover){background:#f1f4f9}
html[data-lskin=slate][data-theme=light][data-lstyle=sky] .main-header :is(.hdr-join){border-color:#c9d3e3}

/* ===== v5: contrast up, ONE line weight (2px) everywhere, light and dark share shape/shadow/line rules ===== */
html[data-lskin=slate][data-theme=light][data-lstyle=sky]{
  --line:#7f8faa;--hard:#26354f;--text:#18253c;--soft:#33425d;--muted:#46546e;
  --ds-rule:#7f8faa;--ds-outline:#26354f;--ds-text:#18253c;--ds-text-soft:#33425d;--ds-text-muted:#46546e;
}
html[data-lskin=slate]:is([data-theme=light],[data-theme=dark]):root{--ds-bw:2px;--ds-sh:0px;--ds-sh-sm:0px;--sh:0px}
html[data-lskin=slate]:is([data-theme=light],[data-theme=dark]){--shadow:0 1px 0 rgba(2,6,23,.22);--shadow-sm:none}
html[data-lskin=slate][data-theme=dark] :is(.card,.panel,.stat,.modal-box,.menu-panel,.lrows,.empty-hero,.ml-card,.table-wrap,.lib-tile,.qs-tile){box-shadow:none}
/* 1.203.438: buttons in the dark theme are flat like the light theme: no hard offset shadow on hover or press, just a gentle brightness change */
html[data-lskin=slate][data-theme=dark] .btn{transition:filter .12s,transform .1s,background .15s}
html[data-lskin=slate][data-theme=dark] .btn:not(:disabled):hover{transform:none;box-shadow:none;filter:brightness(1.14)}
html[data-lskin=slate][data-theme=dark] .btn:not(:disabled):active{transform:translateY(1px);box-shadow:none;filter:brightness(.92)}
html[data-lskin=slate][data-theme=light][data-lstyle=sky] :is(.card,.panel,.stat,.modal-box,.menu-panel,.howto li,.lrows,.empty-hero,.ml-card,.hub-tools-menu,.lmore-menu,.qs-tile,.qs-classes,.next,.glance,.table-wrap,.cw-shelf,.si-list,.si-sec,.lib-tile,.lib-new-menu,.alert){border-width:2px;border-color:var(--line)}
html[data-lskin=slate][data-theme=light][data-lstyle=sky] :is(.btn,.nav-btn,.chip,.pg-pill,input:not([type=checkbox],[type=radio]),select,textarea){border-width:2px}
html[data-lskin=slate][data-theme=light][data-lstyle=sky] .main-header .hdr-join{border-color:#e8eef8;border-width:2px}
html[data-lskin=slate][data-theme=light][data-lstyle=sky] .main-footer a{color:#f8d27a}
html[data-lskin=slate][data-theme=light][data-lstyle=sky] :is(.muted,.small,.hint,.help,.lead){color:var(--muted)}
/* v5 fixes: phone tab block keeps white text; welcome glow is slate, not sky */
@media(max-width:599px){html[data-lskin=slate][data-theme=light][data-lstyle=sky] nav.tabs.hub-tabs .tab.active,html[data-lskin=slate][data-theme=light][data-lstyle=sky] nav.tabs.hub-tabs .tab.active *{color:#fff}}
html[data-lskin=slate][data-theme=light][data-lstyle=sky] .hero-me{background-image:radial-gradient(at 50% 0%,rgba(59,91,140,.16),rgba(0,0,0,0) 60%)}
/* v5b: no glow behind Welcome back; every remaining 3px or 1px frame becomes the one 2px line */
html[data-lskin=slate][data-theme=light][data-lstyle=sky] .hero-me{background-image:none;background-color:transparent}
html[data-lskin=slate]:is([data-theme=light],[data-theme=dark]) :is(.qs-ic,.sh-ic,.jb.foldable,.card-img,.price-card,.plan-strip){border-width:2px}

/* footer on the slate band: tagline, copyright and the second half of the logo need light colours (contrast audit, 1.203.337) */
html[data-lskin=slate][data-theme=light][data-lstyle=sky] .main-footer :is(p,.footer-tagline,.muted,small,span){color:#dbe4f0}
html[data-lskin=slate][data-theme=light][data-lstyle=sky] .main-footer .logo-highlight{color:#8fd0ff}

/* phone menu (three lines): the open card is white, so its links must be dark; the slate header link colour above made them 1.17:1 (audit A1, 1.203.347) */
html[data-lskin=slate][data-theme=light][data-lstyle=sky] .main-header .nav-toggle:checked~.main-nav :is(a,.nav-link,.nav-more>summary){color:var(--text)}
html[data-lskin=slate][data-theme=light][data-lstyle=sky] .main-header .nav-toggle:checked~.main-nav :is(a,.nav-link):is(:hover,.active){color:#0369a1}

/* class Results sub-pill: white ink on the selected blue pill (audit A2); dark theme "Never" in the table uses the rose token (audit A3), 1.203.347 */
html[data-lskin=slate][data-theme=light][data-lstyle=sky] .hub-sub a.active{color:#fff}
html[data-theme=dark] .pg-low{color:var(--ds-danger,#fb7185)}

/* contrast: --sky is a dark blue in the slate look but several older rules put dark ink (--hard) on it, and gold buttons got blue ink (audit A1, A4 to A6, 1.203.347) */
html[data-lskin=slate][data-theme=light][data-lstyle=sky] :is(.badge.new,.gm-chip[aria-pressed=true],.admin-menu summary,.admin-menu summary span:not(.badge),.admin-menu .am-list a.active,.admin-menu .am-list a.active *){color:#fff}
html[data-lskin=slate][data-theme=light][data-lstyle=sky] .badge.rose{color:#fff}
html[data-lskin=slate][data-theme=light][data-lstyle=sky] :is(.btn-gold,.btn.gold,a.btn-gold){color:#2a1a02}
html[data-lskin=slate][data-theme=light][data-lstyle=sky] .tier-pill.tier-free{background:#566784;color:#fff}
html[data-lskin=slate][data-theme=light] .hif-flow li em{color:var(--text)}   /* A7: gold text is never allowed on light (2.15:1) */
@media(max-width:600px){html[data-lskin=slate][data-theme=light][data-lstyle=sky] .lib-tab.active .n{color:#fff;background:rgba(255,255,255,.18)}}   /* library tab count on the selected blue tab, 1.80:1 before */
/* 1.203.355: green and blue buttons inside rows keep white text (the slate row-link blue was winning on a.btn-accent) */
html[data-lskin=slate][data-theme=light][data-lstyle=sky] .lrow a.btn:is(.btn-accent,.btn-primary,.btn-danger){color:#fff}

