/* ============================================================
   Shell chrome — one control cluster (home · volume · fullscreen)
   that floats above the hub and every game, plus the iframe the
   games boot into. Warm desk palette (cream on walnut, no neon).
   ============================================================ */
:root { color-scheme: dark; }

.chrome { position: fixed; top: 14px; right: 14px; z-index: 90; display: flex; align-items: center; gap: 8px; }

.chip {
  height: 42px; min-width: 42px; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 0 11px;
  background: rgba(36, 20, 10, 0.72); border: 2px solid rgba(243, 228, 196, 0.35); border-radius: 12px; color: #f3e4c4;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.chip svg { width: 22px; height: 22px; }
.chip:hover { border-color: #e9b44c; box-shadow: 0 0 14px rgba(233, 180, 76, 0.4); }
.chip:active { transform: scale(0.92); }

/* Home chip — only meaningful inside a game; hidden on the hub. */
.chip-home { font: 10px "Press Start 2P", monospace; letter-spacing: 0.06em; display: none; }
body.in-game .chip-home { display: flex; }
.chip-mute.muted { color: #ff8a7a; border-color: rgba(255, 138, 122, 0.6); }

.vol { display: flex; align-items: center; gap: 8px; }
.vol-slider {
  --fill: 85%; -webkit-appearance: none; appearance: none; width: 96px; height: 8px; border-radius: 999px; outline: none; cursor: pointer;
  background: linear-gradient(90deg, #e9b44c, #e07b39) 0 / var(--fill) 100% no-repeat, rgba(243, 228, 196, 0.2);
  box-shadow: inset 0 0 0 1px rgba(243, 228, 196, 0.3);
}
.vol-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #fff6e6; border: 2px solid #e07b39; cursor: pointer; }
.vol-slider::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff6e6; border: 2px solid #e07b39; cursor: pointer; }
@media (max-width: 560px) { .vol-slider { width: 56px; } }

/* The game screen — a game boots INTO this iframe, so the shell
   (chrome, fullscreen state) is never torn down. */
.screen {
  position: fixed; inset: 0; width: 100%; height: 100%; border: 0; z-index: 80; background: #05030c;
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}
body.in-game .screen { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 0.35s ease, visibility 0s; }

.flash { position: fixed; inset: 0; z-index: 200; background: #0f380f; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
.flash.on { opacity: 1; }

/* Discreet stats link (for the grown-ups) */
.stats-link {
  position: fixed; left: 12px; bottom: 12px; z-index: 40; font: 9px "Press Start 2P", monospace; letter-spacing: 2px;
  color: #f3e4c4; opacity: 0.3; text-decoration: none; padding: 6px 8px; border: 1px solid rgba(243, 228, 196, 0.3); border-radius: 6px;
}
.stats-link:hover { opacity: 0.95; }
body.in-game .stats-link { display: none; }
