/* ──────────────────────────────────────────────────────────────────────────
   game-shell.css — shared chrome for the 4-screen game suite.
   Every game page (solitaire, mancala, chess, checkers, bubble) loads this
   plus game-shell.js and a window.GAME_CONFIG. The four screens — Game,
   Analog, Instructions, Facilitator — are persistent panels switched by a
   pill toggle; an in-progress game keeps its state because hidden panels are
   only display:none, never torn down.
   Aesthetic matches decks.html (green terminal on near-black).
   ────────────────────────────────────────────────────────────────────────── */
@font-face {
  font-family: 'Chicago';
  src: url('https://cdn.jsdelivr.net/gh/pbitutsky/Chicago-Bitmap-Font@master/Chicago.woff2') format('woff2'),
       url('https://cdn.jsdelivr.net/gh/pbitutsky/Chicago-Bitmap-Font@master/Chicago.woff') format('woff');
  font-weight: normal; font-style: normal;
}

:root {
  --bg-a: #0a0a0f;
  --bg-b: #050808;
  --green-line: rgba(34,197,94,0.55);
  --green-soft: rgba(34,197,94,0.20);
  --green-bright: rgba(34,197,94,0.95);
  --green-dim: rgba(34,197,94,0.35);
  --panel-bg: rgba(8,12,10,0.92);
  --panel-border: rgba(34,197,94,0.30);
  --warn: rgba(250, 200, 80, 0.85);
  --text: rgba(34,197,94,0.92);
  --text-dim: rgba(34,197,94,0.55);
  --text-muted: rgba(34,197,94,0.35);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: linear-gradient(150deg, var(--bg-a) 0%, var(--bg-b) 100%);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
}

/* ── Top bar ──────────────────────────────────────────── */
.gs-topbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: 52px; z-index: 100;
  display: flex; align-items: center; gap: 16px;
  padding: 0 16px;
  background: rgba(5,8,8,0.92);
  border-bottom: 1px solid var(--panel-border);
  backdrop-filter: blur(12px);
}
.gs-back {
  color: var(--text-dim); text-decoration: none;
  font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  border: 1px solid var(--panel-border); border-radius: 4px;
  padding: 6px 12px; white-space: nowrap;
}
.gs-back:hover { color: var(--text); border-color: var(--green-line); }
.gs-title {
  font-family: 'Chicago', monospace;
  font-size: 15px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--green-bright); white-space: nowrap;
}
.gs-seedbadge {
  font-size: 10px; letter-spacing: 0.05em;
  color: var(--warn); border: 1px solid rgba(250,200,80,0.4);
  border-radius: 999px; padding: 3px 9px; white-space: nowrap;
}

/* ── Pill toggle ──────────────────────────────────────── */
.gs-pills {
  margin-left: auto;
  display: flex; align-items: center; gap: 4px;
  padding: 4px; border-radius: 999px;
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--panel-border);
}
.gs-pill {
  appearance: none; border: none; background: none;
  font-family: inherit; cursor: pointer;
  font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-dim);
  padding: 7px 16px; border-radius: 999px;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}
.gs-pill:hover { color: var(--text); }
.gs-pill.active {
  color: #04140b;
  background: var(--green-bright);
  font-weight: 600;
}
.gs-pill.gs-pill-facilitator.active { background: var(--warn); }
.gs-pill[hidden] { display: none; }

/* ── Panels (persistent — hidden ones keep their state) ── */
.gs-stage {
  position: absolute;
  top: 52px; left: 0; right: 0; bottom: 0;
}
.gs-panel {
  position: absolute; inset: 0;
  display: none;
}
.gs-panel.active { display: block; }
.gs-panel iframe {
  width: 100%; height: 100%; border: 0; display: block;
  background: #050808;
}

/* ── Placeholder (game/analog not built yet) ──────────── */
.gs-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 40px; gap: 14px;
}
.gs-placeholder .gs-ph-glyph { font-size: 56px; opacity: 0.5; }
.gs-placeholder .gs-ph-title {
  font-family: 'Chicago', monospace;
  font-size: 18px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--green-bright);
}
.gs-placeholder .gs-ph-sub {
  font-size: 13px; color: var(--text-dim); max-width: 440px; line-height: 1.6;
}

/* ── Instructions ─────────────────────────────────────── */
.gs-instructions {
  position: absolute; inset: 0; overflow-y: auto;
  display: flex; justify-content: center;
  padding: 48px 24px;
}
.gs-instructions-inner {
  max-width: 640px; width: 100%;
}
.gs-instructions h1 {
  font-family: 'Chicago', monospace;
  font-size: 22px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--green-bright); margin-bottom: 8px;
}
.gs-instructions h2 {
  font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-dim); margin: 28px 0 10px;
  border-bottom: 1px solid var(--panel-border); padding-bottom: 6px;
}
.gs-instructions p, .gs-instructions li { font-size: 14px; line-height: 1.7; color: var(--text); }
.gs-instructions ul, .gs-instructions ol { padding-left: 22px; margin: 8px 0; }
.gs-instructions li { margin: 5px 0; }
.gs-instructions .gs-lede { font-size: 15px; color: var(--text-dim); line-height: 1.7; }
.gs-instructions b, .gs-instructions strong { color: var(--green-bright); }

/* ── Facilitator live tracker ─────────────────────────── */
.gs-facilitator {
  position: absolute; inset: 0; overflow-y: auto;
  padding: 32px 24px;
  display: flex; justify-content: center;
}
.gs-fac-inner { max-width: 720px; width: 100%; }
.gs-fac-head {
  display: flex; align-items: center; gap: 12px; margin-bottom: 20px;
}
.gs-fac-head h1 {
  font-family: 'Chicago', monospace;
  font-size: 18px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--warn);
}
.gs-fac-live {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-dim);
}
.gs-fac-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #22c55e; box-shadow: 0 0 8px #22c55e;
  animation: gs-pulse 1.6s ease-in-out infinite;
}
@keyframes gs-pulse { 0%,100%{opacity:1} 50%{opacity:0.3} }
.gs-fac-count {
  font-size: 13px; color: var(--text-dim); margin-bottom: 14px;
}
.gs-fac-count b { color: var(--green-bright); font-size: 15px; }
.gs-fac-list { display: flex; flex-direction: column; gap: 8px; }
.gs-fac-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 8px;
  background: var(--panel-bg); border: 1px solid var(--panel-border);
}
.gs-fac-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--green-soft); color: var(--green-bright);
  font-size: 13px; font-weight: 600; text-transform: uppercase;
  flex-shrink: 0;
}
.gs-fac-name { font-size: 13px; color: var(--text); flex: 1; }
.gs-fac-screen {
  font-size: 10px; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--text-dim);
  border: 1px solid var(--panel-border); border-radius: 999px; padding: 3px 9px;
}
.gs-fac-empty {
  text-align: center; padding: 48px 20px;
  color: var(--text-muted); font-size: 13px;
}
