:root {
  --bg: #fefaf2;
  --panel: #fffefb;
  --panel-strong: #ffffff;
  --text: #1f2937;
  --muted: #637487;
  --line: #eadbc3;
  --brand: #ff6b2c;
  --brand-2: #ff9b3d;
  --primary: #0ea5a0;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow-soft: 0 18px 34px rgba(20, 30, 42, 0.1);
  --shadow-card: 0 12px 24px rgba(20, 20, 20, 0.08);
  --border: #d7c8b1;
  --card-strong: #f7efe4;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: "Bricolage Grotesque", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1000px 500px at 8% -12%, #ffe4c1 0%, rgba(255, 228, 193, 0) 52%),
    radial-gradient(900px 520px at 100% 0%, #d3f8f1 0%, rgba(211, 248, 241, 0) 45%),
    linear-gradient(180deg, #fffaf0 0%, #fff7ee 42%, #fffefb 100%);
  line-height: 1.35;
}

.arcade-shell {
  width: min(1100px, 95vw);
  margin: 0 auto;
  padding: 20px 0 42px;
}

.arcade-topbar {
  border: 1px solid rgba(255, 255, 255, 0.88);
  background: rgba(255, 252, 247, 0.9);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 18px rgba(31, 41, 55, 0.08);
  border-radius: 999px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  position: sticky;
  top: 10px;
  z-index: 10;
}

.arcade-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  color: #2a3342;
  text-decoration: none;
}

.arcade-brand i {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: white;
  display: inline-grid;
  place-items: center;
  box-shadow: 0 10px 14px rgba(255, 107, 44, 0.34);
}

.arcade-top-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.chip-btn,
.pill-btn {
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: #304050;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 12px;
  cursor: pointer;
}

.pill-btn.primary {
  border-color: #ffbd95;
  color: #fff;
  background: linear-gradient(120deg, var(--brand), #ff8e35);
  box-shadow: 0 10px 18px rgba(255, 107, 44, 0.32);
}

.pill-btn.ghost {
  background: #fff;
}

.pill-btn:hover,
.chip-btn:hover {
  transform: translateY(-1px);
}

.arcade-hero {
  margin-top: 14px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: linear-gradient(130deg, #fffdf9 0%, #fff5e8 100%);
  box-shadow: var(--shadow-soft);
  padding: 24px;
  display: grid;
  gap: 10px;
}

.arcade-kicker {
  width: fit-content;
  border-radius: 999px;
  border: 1px solid #ebdcc8;
  background: #ffffffd8;
  padding: 6px 10px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #526273;
}

.arcade-hero h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 0.94;
  letter-spacing: -0.03em;
}

.arcade-hero p {
  margin: 0;
  color: #4e5d6f;
  max-width: 70ch;
}

.arcade-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.arcade-badge {
  border-radius: 999px;
  border: 1px solid #e7d7c0;
  background: #fff;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #445468;
  padding: 6px 10px;
}

.arcade-layout {
  margin-top: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.8fr);
  gap: 14px;
}

.arcade-surface,
.arcade-side {
  border-radius: var(--radius-xl);
  border: 1px solid #f2e6d4;
  background: var(--panel-strong);
  box-shadow: var(--shadow-card);
}

.arcade-surface {
  padding: 16px;
}

.arcade-side {
  padding: 16px;
  display: grid;
  gap: 12px;
  align-content: start;
}

.side-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fffaf4;
  padding: 12px;
}

.side-card h2 {
  margin: 0 0 8px;
  font-size: 15px;
}

.side-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

#scoreboard-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 7px;
  color: #3e4c5e;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
}

#scoreboard-list li.placeholder {
  color: #7a8698;
  font-style: italic;
  list-style: none;
  margin-left: -18px;
}

.arcade-footer {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  border-top: 1px solid #eadfcf;
  padding-top: 14px;
}

.footer-note {
  color: #647588;
  font-size: 13px;
}

.footer-links {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-link {
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: #304050;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 9px 12px;
}

.footer-link.primary {
  border-color: #ffcdac;
  background: #fff4e8;
  color: #8d3a0f;
}

.footer-link.buy {
  border-color: #ffbd95;
  color: #fff;
  background: linear-gradient(120deg, var(--brand), #ff8e35);
}

.is-hidden {
  display: none !important;
}

#game-root button {
  font: inherit;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff8ef;
  color: #1d2a38;
  padding: 0.5rem 0.7rem;
}

#game-root button:hover {
  filter: brightness(0.98);
}

#game-root .btn-primary {
  border-color: #ffbc95;
  color: #fff;
  background: linear-gradient(120deg, var(--brand), #ff8e35);
}

#game-root input,
#game-root select {
  font: inherit;
}

@media (max-width: 980px) {
  .arcade-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .arcade-shell {
    width: min(1080px, 94vw);
    padding: 14px 0 32px;
  }

  .arcade-topbar {
    border-radius: 20px;
    padding: 12px;
  }

  .arcade-hero {
    padding: 18px;
  }
}
