/* archer.css – Iris Colorcart */

/* --- tokens --- */
:root {
  --bg:      #0d0a15;
  --surface: #15102a;
  --card:    #1d1640;
  --gold:    #e040fb;
  --amber:   #ff9100;
  --bolt:    #f3d9ff;
  --danger:  #ff6b6b;
  --muted:   rgba(243,217,255,.50);
  --radius:  10px;
  --font:    system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* --- reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--bolt);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  -webkit-tap-highlight-color: transparent;
}

/* --- skip link --- */
.skip-link {
  position: absolute; left: -999px; top: auto;
  padding: 4px 8px; background: var(--gold); color: var(--bg);
  z-index: 100; font-size: 14px; border-radius: 4px;
}
.skip-link:focus { left: 8px; top: 8px; }

/* --- header (left brand + right nav) --- */
#site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
}
.brand {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: .03em;
}
.main-nav {
  display: flex;
  gap: 6px;
}
.main-nav a {
  padding: 5px 14px;
  border-radius: 18px;
  font-size: .82rem;
  color: var(--muted);
  text-decoration: none;
  transition: background .2s, color .2s;
}
.main-nav a:hover, .main-nav a.active {
  background: var(--surface);
  color: var(--gold);
}

/* --- layout --- */
main { flex: 1; display: flex; flex-direction: column; }
.wrap { max-width: 680px; margin: 0 auto; padding: 0 16px; width: 100%; }

/* --- game stage --- */
.stage { display: flex; flex-direction: column; align-items: center; flex: 1; }
.hud {
  display: flex; justify-content: center; gap: 18px;
  padding: 6px 12px; font-size: .82rem;
}
.hud-item { text-align: center; }
.hud-label { display: block; font-size: .68rem; text-transform: uppercase; color: var(--muted); letter-spacing: .06em; }

.board {
  position: relative;
  width: 100%; max-width: 420px;
  aspect-ratio: 600/900;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
}
#game { display: block; width: 100%; height: 100%; }

/* --- overlays --- */
.overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(13,10,21,.88);
  z-index: 10;
}
.panel {
  text-align: center;
  padding: 28px 22px;
  max-width: 340px; width: 90%;
  max-height: 90%; overflow-y: auto;
}
.panel h1 { font-size: 1.5rem; margin-bottom: 4px; color: var(--gold); }
.panel h2 { font-size: 1.2rem; margin-bottom: 6px; }
.kicker { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--amber); margin-bottom: 4px; }
.lead { font-size: .88rem; color: var(--muted); margin-bottom: 16px; line-height: 1.4; }

/* --- buttons --- */
.btn {
  display: inline-block;
  font-family: inherit;
  font-size: .88rem;
  cursor: pointer;
  border: none;
  border-radius: 22px;
  padding: 10px 26px;
  text-decoration: none;
  transition: background .2s, color .2s, opacity .2s;
}
.btn-primary { background: var(--gold); color: var(--bg); font-weight: 600; }
.btn-primary:hover { background: var(--bolt); }
.btn-big { font-size: 1rem; padding: 13px 36px; }
.btn-ghost {
  background: transparent; color: var(--gold);
  border: 1px solid rgba(224,64,251,.25);
}
.btn-ghost:hover { border-color: var(--gold); }
.btn-chip {
  font-size: .78rem; padding: 6px 14px;
  background: var(--surface); color: var(--muted);
}
.btn-chip:hover { color: var(--gold); }
.row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 10px; }

/* --- scores --- */
.best-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid rgba(224,64,251,.1); margin: 10px 0 4px; font-size: .9rem; }
.mini-title { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 10px 0 4px; }
.scores { list-style: none; font-size: .85rem; }
.scores li { display: flex; justify-content: space-between; padding: 3px 0; }
.scores .rank { color: var(--muted); min-width: 24px; text-align: right; margin-right: 6px; }
.scores .name { flex: 1; text-align: left; }
.scores .empty { color: var(--muted); font-style: italic; text-align: center; }
.big-score { font-size: 2rem; margin: 10px 0; }
.big-score .hud-label { font-size: .72rem; }
.record { color: var(--gold); font-size: .9rem; min-height: 1.2em; }
.profile-text { font-size: .82rem; color: var(--muted); margin: 8px 0 2px; }

/* soft offer */
.soft { margin: 12px 0; padding: 10px; border: 1px solid rgba(224,64,251,.15); border-radius: var(--radius); font-size: .85rem; }

/* toast */
.toast {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  background: var(--card); color: var(--gold);
  padding: 8px 20px; border-radius: 20px; font-size: .82rem;
  z-index: 20; white-space: nowrap;
}

/* --- dialog --- */
dialog { max-height: 92dvh; overflow-y: auto; background: var(--card); color: var(--bolt); border: 1px solid rgba(224,64,251,.12); border-radius: var(--radius); padding: 0; max-width: 380px; width: 92%; }
dialog::backdrop { background: rgba(0,0,0,.6); }
dialog form { padding: 24px; }
.dlg-close { position: absolute; top: 10px; right: 14px; background: none; border: none; color: var(--muted); font-size: 1.5rem; cursor: pointer; }
dialog h2 { font-size: 1.1rem; margin-bottom: 10px; }
.reg-hero { width: 100%; height: auto; border-radius: 12px; margin: 10px 0 14px; box-shadow: 0 4px 20px rgba(0,0,0,0.5); }
.perks { list-style: none; margin-bottom: 14px; font-size: .88rem; }
.perks li::before { content: '\25C6 '; }
dialog label { display: block; font-size: .82rem; margin-bottom: 4px; color: var(--muted); }
dialog input[type="text"] {
  width: 100%; padding: 10px 12px; font-size: 1rem;
  background: var(--surface); border: 1px solid rgba(224,64,251,.15);
  border-radius: 6px; color: var(--bolt); margin-bottom: 4px;
}
dialog input[type="text"]:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.check { display: flex; align-items: flex-start; gap: 8px; font-size: .8rem; margin: 10px 0; cursor: pointer; }
.check input { margin-top: 2px; }
.err { color: var(--danger); font-size: .78rem; min-height: 1em; }
.fine { font-size: .72rem; color: var(--muted); margin-top: 12px; line-height: 1.4; }

/* --- prose (rules, privacy, terms) --- */
.prose { padding: 24px 16px 48px; line-height: 1.65; }
.prose h1 { font-size: 1.5rem; margin-bottom: 8px; }
.prose h2 { font-size: 1.1rem; margin-top: 24px; margin-bottom: 6px; color: var(--gold); }
.prose p, .prose ul, .prose ol { margin-bottom: 12px; font-size: .92rem; }
.prose ul, .prose ol { padding-left: 22px; }
.prose a { color: var(--gold); }
.prose table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: .88rem; }
.prose th, .prose td { padding: 6px 10px; border: 1px solid rgba(224,64,251,.12); text-align: left; }
.prose th { background: var(--surface); }
.meta { font-size: .8rem; color: var(--muted); margin-bottom: 16px; }
.cta { text-align: center; margin-top: 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* --- about section --- */
.about { background: var(--surface); padding: 32px 0; }
.about h2 { font-size: 1.2rem; margin-bottom: 12px; }
.about p { font-size: .9rem; color: var(--muted); line-height: 1.5; margin-bottom: 12px; }
.about a { color: var(--gold); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 16px 0; }
.card { background: var(--card); border-radius: var(--radius); padding: 16px; }
.card h3 { font-size: .92rem; margin-bottom: 4px; color: var(--gold); }
.card p { font-size: .82rem; margin: 0; }

/* --- footer --- */
#site-footer { padding: 18px 16px; text-align: center; font-size: .72rem; color: var(--muted); }
#site-footer a { color: var(--muted); }

/* --- hidden utility --- */
.hidden { display: none !important; }

/* --- responsive --- */
@media (max-width: 480px) {
  .board { max-width: 100%; border-radius: 0; }
  .panel { padding: 20px 14px; }
  #site-header { flex-wrap: wrap; gap: 6px; justify-content: center; }
}
