/* Shared page chrome for Arcade Bites game pages */
:root {
  --bg1: #16123a;
  --bg2: #0b1024;
  --panel: rgba(255, 255, 255, 0.06);
  --panel-hover: rgba(255, 255, 255, 0.11);
  --line: rgba(255, 255, 255, 0.14);
  --text: #eef0ff;
  --muted: #a9abd0;
  --accent: #a78bfa;
  --accent2: #22d3ee;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  background-color: var(--bg2);
  background-image:
    radial-gradient(1100px 560px at 50% -12%, #2d2470 0%, transparent 62%),
    linear-gradient(180deg, var(--bg1), var(--bg2));
  background-attachment: fixed;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 8px; max-width: 820px; margin: 0 auto; padding: 12px 16px; }
.brand { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 18px; letter-spacing: -0.01em; color: var(--text); text-decoration: none; white-space: nowrap; }
.brand .back { color: var(--muted); margin-left: -4px; }
.brand:hover .back { color: var(--text); }
.brand .logo { display: block; border-radius: 8px; }
.hud { display: flex; gap: 6px; }
.pill { background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.pill b { color: var(--text); font-variant-numeric: tabular-nums; }
.icons { display: flex; gap: 6px; }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; transition: opacity 0.2s, background 0.2s; }
.icon-btn:hover { background: var(--panel-hover); }
.icon-btn[aria-pressed="false"] { opacity: 0.45; }
@media (max-width: 420px) { .brand-name { display: none; } }

/* Stage */
.game { max-width: 820px; margin: 0 auto; padding: 0 16px; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.controls { display: flex; justify-content: center; gap: 8px; padding: 4px 0 16px; }
.ctrl { min-width: 96px; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font-family: inherit; font-size: 12px; font-weight: 600; cursor: pointer; transition: transform 0.1s, background 0.2s; }
.ctrl:hover { background: var(--panel-hover); }
.ctrl:active { transform: scale(0.96); }

/* Ads */
.ad-slot { max-width: 728px; margin: 8px auto; padding: 0 16px; min-height: 90px; }
.ad-slot:empty { display: none; }

/* Article */
.info { max-width: 720px; margin: 28px auto 0; padding: 0 16px; color: var(--muted); line-height: 1.65; font-size: 15px; }
.info h1 { color: var(--text); font-size: 24px; line-height: 1.25; margin: 0 0 10px; }
.info h2 { color: var(--text); font-size: 19px; margin: 28px 0 8px; }
.info h3 { color: var(--text); font-size: 16px; margin: 18px 0 4px; }
.info strong { color: var(--text); }
.info kbd, .tip kbd { font-family: ui-monospace, monospace; font-size: 12px; padding: 1px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; color: var(--text); }
.more { max-width: 720px; margin: 28px auto 0; padding: 0 16px; }
.more h2 { font-size: 17px; margin: 0 0 10px; }
.more-list { display: flex; flex-wrap: wrap; gap: 8px; }
.more-list a { color: var(--text); text-decoration: none; font-size: 14px; font-weight: 600; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.more-list a:hover { background: var(--panel-hover); }

/* Footer */
.foot { max-width: 720px; margin: 36px auto 0; padding: 16px 16px 28px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }
.foot p { margin: 0 0 8px; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--text); }
.foot-links { display: flex; flex-wrap: wrap; gap: 14px; }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(5, 6, 20, 0.55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.modal[hidden] { display: none; }
.card { width: min(320px, calc(100vw - 32px)); padding: 26px 22px 22px; text-align: center; background: #1d1946; border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6); animation: rise 0.32s cubic-bezier(0.2, 0.8, 0.2, 1); }
.card h2 { margin: 6px 0 4px; font-size: 22px; }
.card p { margin: 0 0 18px; color: var(--muted); white-space: pre-line; }
.trophy { font-size: 40px; color: #fde047; line-height: 1; text-shadow: 0 4px 18px rgba(253, 224, 71, 0.5); }
.kit-actions { display: grid; gap: 8px; }
.primary, .secondary { width: 100%; padding: 13px 20px; border-radius: 12px; font-family: inherit; font-size: 16px; font-weight: 800; cursor: pointer; }
.primary { border: 0; background: linear-gradient(135deg, #a78bfa, #22d3ee); color: #0b1024; }
.secondary { border: 1px solid var(--line); background: var(--panel); color: var(--text); font-weight: 700; font-size: 15px; }
.primary:active, .secondary:active { transform: scale(0.98); }
@keyframes rise { from { transform: translateY(16px) scale(0.96); opacity: 0; } }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 70; max-width: calc(100vw - 32px); padding: 10px 16px; border-radius: 12px; background: #262058; border: 1px solid var(--line); color: var(--text); font-size: 14px; opacity: 0; transform: translate(-50%, 10px); transition: opacity 0.2s, transform 0.2s; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  .toast, .icon-btn { transition: none; }
  .card { animation: none; }
}
