/* /coreball/ — Coreball: board, HUD and game controls only. Page frame,
   headline, mode tabs, stat tiles, panels, rank rows and the more-games
   row come from games.css. Board art keeps its own colours; UI chrome
   reads tokens. Shared by all locales. */

/* ── Coreball game box (palette paints only inside the canvas) ───────── */
.cb-play > h1 { font-size: var(--step-4); }
.cb-card { padding: 0; overflow: hidden; }
/* 5:6 board: the card narrows on short screens so the whole board fits
   under the stuck header. */
.cb-card { inline-size: 100%; max-inline-size: max(300px, calc((100svh - var(--header-stuck) - var(--space-6)) * 5 / 6)); margin-inline: auto; }
/* rectangular game card; canvas fills it — no dark frame */
.cb-box { position: relative; width: 100%; aspect-ratio: 5 / 6; overflow: hidden; touch-action: manipulation; -webkit-user-select: none; user-select: none; cursor: pointer; }
.cb-box:fullscreen, .cb-box:-webkit-full-screen { aspect-ratio: auto; width: 100vw; height: 100vh; }
.cb-box canvas { display: block; width: 100%; height: 100%; }
.cb-fs { position: absolute; top: 10px; right: 10px; z-index: 3; width: 38px; height: 38px; border-radius: 10px; border: 1px solid rgba(255,255,255,.18); background: rgba(0,0,0,.38); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: .95rem; transition: background .15s, transform .15s; }
.cb-fs:hover { background: rgba(0,0,0,.6); transform: translateY(-1px); }
.cb-overlay { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; text-align: center; padding: 1rem; background: radial-gradient(ellipse at center, rgba(5,3,13,.30), rgba(5,3,13,.80)); transition: opacity .25s ease; }
.cb-overlay.hidden { opacity: 0; pointer-events: none; }
.cb-overlay h2 { font-family: var(--font-display); font-size: var(--step-3); text-transform: uppercase; margin: 0; line-height: 0.95; color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.6); }
.cb-overlay p { margin: 0; color: rgba(255,255,255,.85); font-size: .98rem; max-width: 30ch; }
.cb-overlay .cb-hint { margin-top: .45rem; font-size: .8rem; color: rgba(255,255,255,.62); }
.cb-controls { display: flex; gap: .6rem; justify-content: center; align-items: center; margin-top: 0; flex-wrap: wrap; }
.cb-reset { display: inline-flex; align-items: center; gap: var(--space-2); min-block-size: var(--tap); padding-inline: var(--space-4); border-radius: var(--radius-md); cursor: pointer; font-family: var(--font-body); font-weight: 600; font-size: var(--step--1); color: var(--text); background: color-mix(in srgb, var(--amber) 12%, var(--surface-1)); border: 1px solid color-mix(in srgb, var(--amber) 50%, transparent); transition: background-color var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease); }
.cb-reset > i { color: var(--amber); }
.cb-reset:hover:not([disabled]) { background: color-mix(in srgb, var(--amber) 22%, var(--surface-1)); }
.cb-reset[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.cb-skip { display: inline-flex; align-items: center; gap: var(--space-2); min-block-size: var(--tap); padding-inline: var(--space-4); border-radius: var(--radius-md); cursor: pointer; font-family: var(--font-body); font-weight: 600; font-size: var(--step--1); color: var(--text); background: color-mix(in srgb, var(--cyan) 12%, var(--surface-1)); border: 1px solid color-mix(in srgb, var(--cyan) 50%, transparent); transition: background-color var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease); }
.cb-skip > i { color: var(--cyan); }
.cb-skip:hover:not([disabled]) { background: color-mix(in srgb, var(--cyan) 22%, var(--surface-1)); }
.cb-skip[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.cb-mods { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin-top: 0; min-height: 1.4rem; }
.cb-chip { font-size: var(--step--1); font-weight: 600; letter-spacing: .3px; text-transform: uppercase; padding: .2rem .55rem; border-radius: 999px; border: 1px solid var(--border); color: var(--text-muted); background: var(--surface-1); }
/* collapsible Top Players */
.cb-collapse-head { display: flex; align-items: center; justify-content: space-between; cursor: pointer; -webkit-user-select: none; user-select: none; gap: .5rem; }
.cb-collapse-head .cb-chev { transition: transform .2s ease; }
.cb-collapse-head.open .cb-chev { transform: rotate(180deg); }
.cb-collapse-body { display: none; margin-top: .85rem; }
.cb-collapse-body.open { display: block; }
.cb-top-extension { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
/* reset confirm modal reuses .modal-overlay / .modal-box / .glass-panel from style.css */
.cb-modal-actions { display: flex; gap: .6rem; justify-content: flex-end; margin-top: 1.1rem; }

/* ── Play layer (assets/play/play.mjs): the board and its level chips, sized to the slot ── */
html.play-open .cb-play { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); }
html.play-open .cb-play > :not(.cb-card, .cb-mods) { display: none; }
html.play-open #cb-fullscreen { display: none; }
html.play-open .cb-play .cb-card.section-box {
  padding: 0; margin: 0;
  inline-size: min(calc(100vw - 2 * var(--gutter)), calc((100dvh - 160px) * 5 / 6), 720px);
  max-inline-size: none;
}
html.play-open .cb-mods { min-height: 0; }
html.play-open .cb-play .cps-announce { display: none; }   /* the site promo panel stays on the page, not inside the game layer */
