:root {
  font-family: Arial, Helvetica, sans-serif;
  color: #f5f7fa;
  background: #0b1118;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 0%, #293d5a 0, transparent 32%),
    radial-gradient(circle at 90% 10%, #273c45 0, transparent 30%),
    #0b1118;
}
a { color: inherit; }

.arc-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
  padding: 18px min(5vw, 72px);
  border-bottom: 1px solid #344155;
  background: rgba(8, 13, 20, .94);
  backdrop-filter: blur(12px);
  flex-wrap: wrap;
}
.arc-brand { color: #f2b544; text-decoration: none; font-size: 1.15rem; font-weight: 900; }
.arc-topbar nav { display: flex; gap: 18px; flex-wrap: wrap; }
.arc-topbar nav a { color: #d2dae5; text-decoration: none; font-weight: 700; font-size: .95rem; }
.arc-topbar nav a:hover { color: #f2b544; }

.arc-wrap { width: min(1200px, calc(100% - 36px)); margin: 0 auto; padding: 40px 0 70px; }
.arc-hero { text-align: center; padding: 20px 0 36px; }
.arc-hero h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); margin: 0 0 10px; color: #f2b544; }
.arc-hero p { color: #b7c2d0; max-width: 640px; margin: 0 auto; }

.arc-card {
  background: rgba(255,255,255,.04);
  border: 1px solid #344155;
  border-radius: 18px;
  padding: 22px;
  margin-bottom: 22px;
}
.arc-card h2 { margin-top: 0; color: #f2b544; font-size: 1.2rem; }

.arc-game-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.arc-game-tile {
  border: 1px solid #344155;
  border-radius: 16px;
  padding: 18px;
  background: rgba(255,255,255,.03);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.arc-game-tile h3 { margin: 0; font-size: 1.15rem; }
.arc-game-tile .arc-tag { font-size: .75rem; text-transform: uppercase; font-weight: 800; color: #7ee0a8; }
.arc-game-tile .arc-tag.locked { color: #e0a87e; }
.arc-game-tile.disabled { opacity: .45; }
.arc-game-tile p { margin: 0; color: #b7c2d0; font-size: .9rem; flex: 1; }

.arc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: none;
  background: #f2b544;
  color: #1a1206;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  font-size: .95rem;
}
.arc-btn.secondary { background: transparent; color: #f2b544; border: 2px solid #f2b544; }
.arc-btn:disabled, .arc-btn.disabled { opacity: .4; cursor: default; pointer-events: none; }

.arc-opponent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; max-height: 360px; overflow-y: auto; padding-right: 4px; }
.arc-opponent {
  border: 2px solid #344155;
  border-radius: 14px;
  padding: 12px;
  text-align: center;
  cursor: pointer;
  background: rgba(255,255,255,.03);
}
.arc-opponent:hover { border-color: #f2b544; }
.arc-opponent.selected { border-color: #f2b544; background: rgba(242,181,68,.12); }
.arc-opponent .emoji { font-size: 2rem; display: block; margin-bottom: 6px; }
.arc-opponent .name { font-weight: 800; font-size: .9rem; }
.arc-opponent .sub { font-size: .72rem; color: #8b98ab; }
.arc-pool-label { font-size: .75rem; text-transform: uppercase; font-weight: 800; color: #8b98ab; margin: 14px 0 8px; }

.arc-form label { display: block; font-weight: 800; margin: 10px 0 4px; font-size: .9rem; }
.arc-form select, .arc-form input {
  width: 100%; box-sizing: border-box; border: 1px solid #344155; border-radius: 10px;
  background: #0f1620; color: #f5f7fa; padding: 10px; font-size: .95rem;
}
.arc-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.arc-status { color: #b7c2d0; font-size: .9rem; }
.arc-status strong { color: #f2b544; }

.arc-board { display: grid; grid-template-columns: repeat(8,56px); grid-template-rows: repeat(8,56px); border: 2px solid #344155; width: max-content; max-width: 100%; touch-action: manipulation; margin: 0 auto; }
.arc-sq { width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; font-size: 34px; cursor: pointer; user-select: none; line-height: 1; }
.arc-light { background: #d7c3a3; } .arc-dark { background: #7a5a3a; }
.arc-sq.piece-white { color: #fff7df; text-shadow: -1px -1px 0 #111827,1px -1px 0 #111827,-1px 1px 0 #111827,1px 1px 0 #111827; }
.arc-sq.piece-black { color: #020617; text-shadow: -1px -1px 0 #f8fafc,1px -1px 0 #f8fafc,-1px 1px 0 #f8fafc,1px 1px 0 #f8fafc; }
.arc-sq.sel { outline: 4px solid #f2b544; z-index: 2; }
.arc-sq.legal { box-shadow: inset 0 0 0 4px rgba(52,211,153,.7); }

.arc-two { display: grid; grid-template-columns: minmax(320px, 520px) minmax(260px, 1fr); gap: 18px; align-items: start; }
@media (max-width: 880px) { .arc-two { grid-template-columns: 1fr; } .arc-board, .bg-board { max-width: 100%; overflow-x: auto; } }

.bg-board { display: grid; grid-template-columns: repeat(12, minmax(28px,1fr)); gap: 4px; max-width: 640px; margin: 0 auto; }
.bg-point { min-height: 120px; border: 1px solid #344155; border-radius: 10px; padding: 5px; background: rgba(255,255,255,.03); display: flex; flex-direction: column; align-items: center; justify-content: flex-start; cursor: pointer; }
.bg-point.top { justify-content: flex-end; }
.bg-point.selected { outline: 3px solid #f2b544; }
.bg-point.legal { box-shadow: inset 0 0 0 3px rgba(52,211,153,.5); }
.bg-point-num { font-size: 10px; color: #8b98ab; font-weight: 800; }
.bg-stack { display: flex; flex-direction: column; gap: 2px; align-items: center; }
.bg-chip { width: 20px; height: 20px; border-radius: 999px; border: 2px solid rgba(255,255,255,.7); }
.bg-chip.white { background: #f8fafc; } .bg-chip.black { background: #111827; }
.bg-chip.more { font-size: 9px; display: flex; align-items: center; justify-content: center; background: #f2b544; color: #1a1206; font-weight: 900; }
.bg-rail { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px,1fr)); gap: 8px; margin: 10px 0; }
.bg-box { border: 1px solid #344155; border-radius: 10px; padding: 8px; background: rgba(255,255,255,.03); cursor: pointer; text-align: center; }
.bg-dice { display: flex; gap: 8px; flex-wrap: wrap; }
.bg-die { min-width: 34px; height: 34px; border-radius: 8px; border: 1px solid #344155; display: flex; align-items: center; justify-content: center; font-weight: 900; background: rgba(255,255,255,.06); }
.bg-die.used { opacity: .35; text-decoration: line-through; }

.arc-snake-canvas { width: 100%; max-width: 480px; aspect-ratio: 1; border: 2px solid #344155; border-radius: 16px; background: #020617; display: block; margin: 0 auto; touch-action: none; }
.arc-pad { display: grid; grid-template-columns: repeat(3,56px); gap: 8px; justify-content: center; margin: 14px auto; }
.arc-pad button { min-height: 48px; }

.arc-table { width: 100%; border-collapse: collapse; }
.arc-table th, .arc-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #344155; font-size: .9rem; }
.arc-table th { color: #f2b544; font-size: .75rem; text-transform: uppercase; }

.arc-empty { color: #8b98ab; font-size: .9rem; }
