/* Tokens match the Spicy Dice itch build and app/globals.css. */
@font-face {
  font-family: Fraunces;
  font-style: italic;
  font-weight: 560;
  font-display: swap;
  src: url("fonts/fraunces-latin-italic.woff2") format("woff2");
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/inter-latin-400.woff2") format("woff2");
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/inter-latin-600.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --night: #120a10;
  --velvet: #1e1019;
  --velvet-2: #2a1622;
  --line: #3a2230;
  --ink: #f6e9ef;
  --muted: #b49aa7;
  --hot: #ff3d7f;
  --hot-deep: #d81b60;
  --ember: #f6a96b;
  font-family: Inter, system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 80% -10%, #3b0f2a55, transparent 60%),
    radial-gradient(900px 500px at -10% 110%, #4a0d2433, transparent 60%),
    var(--night);
  -webkit-font-smoothing: antialiased;
}

img { display: block; }
button, a, input { font: inherit; touch-action: manipulation; }
button { cursor: pointer; }
p { margin: 0; }

:focus-visible {
  outline: 2px solid var(--hot);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
}

.brand img { width: 1.15em; height: 1.15em; }

.word {
  font-family: Fraunces, Georgia, serif;
  font-style: italic;
  font-weight: 560;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.dot { color: var(--hot); }

.eyebrow, .chip {
  margin: 0;
  color: var(--hot);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  color: var(--ember);
}

h1, h2, .instruction {
  font-family: Fraunces, Georgia, serif;
  font-style: italic;
  font-weight: 560;
}

h1 {
  margin: 0.15rem 0 0;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

h2 { margin: 0; font-size: 1.05rem; line-height: 1.2; }

.lead, .blurb, .fine, .howto, #age-body, #age-declined {
  color: var(--muted);
  line-height: 1.45;
}

.lead { margin-top: 0.4rem; font-size: 0.98rem; text-wrap: balance; }
.blurb, .fine, .howto { font-size: 0.86rem; }
.blurb { margin-top: 0.25rem; }

.card {
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background: rgb(30 16 25 / 88%);
  box-shadow: 0 24px 60px rgb(0 0 0 / 28%);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  line-height: 1.25;
  text-wrap: balance;
  transition: background 160ms ease, border-color 160ms ease, transform 80ms ease;
}

.btn:active { transform: scale(0.98); }

.btn-hot, .btn-hot:visited {
  background: var(--hot);
  color: white;
  box-shadow: 0 10px 24px rgb(255 61 127 / 22%);
}

.btn-hot:hover { background: var(--hot-deep); }

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.btn-ghost:hover { border-color: rgb(255 61 127 / 60%); background: var(--velvet-2); }

.stack { display: grid; gap: 0.6rem; }
.stack .btn { width: 100%; }

.gate {
  position: fixed;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgb(18 10 16 / 94%);
}

.gate-card, .end-card {
  width: min(100%, 28rem);
  padding: 1.6rem 1.3rem 1.3rem;
  text-align: center;
}

.gate-card h1 { font-size: 2.4rem; }
#age-body, #age-declined { margin-top: 0.8rem; }
#age-actions { margin-top: 1.1rem; }

main {
  width: min(920px, 100%);
  height: 100dvh;
  margin: 0 auto;
  padding: 0.7rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  overflow: auto;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
  flex: none;
}

.title-block { margin-bottom: 0.7rem; }

.setup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  align-items: start;
}

.setup-card { padding: 0.9rem 0.95rem 1rem; display: grid; gap: 0.55rem; align-content: start; }
.setup-card h2 { font-family: Inter, system-ui, sans-serif; font-style: normal; font-weight: 600; font-size: 0.95rem; }

.picks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.4rem; }
.picks.two { grid-template-columns: 1fr 1fr; }
.foreskin { margin-top: -0.15rem; }

.voices { display: grid; gap: 0.4rem; }

.choice {
  display: grid;
  gap: 0.12rem;
  min-height: 44px;
  padding: 0.45rem 0.6rem;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.choice.pick { place-items: center; text-align: center; font-weight: 600; font-size: 0.92rem; }

.choice[aria-pressed='true'] {
  border-color: var(--hot);
  background: rgb(255 61 127 / 12%);
}

.choice-title { font-weight: 600; }
.choice-blurb { color: var(--muted); font-size: 0.75rem; font-weight: 400; line-height: 1.3; }

.length { display: flex; align-items: baseline; gap: 0.55rem; color: var(--ink); font-weight: 600; }

.check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  color: var(--ink);
  font-weight: 600;
}

.check input { width: 1.05rem; height: 1.05rem; accent-color: var(--hot); }

.play-check { justify-content: center; margin-top: 0.35rem; }

#begin { width: 100%; }

.howto { display: grid; gap: 0.25rem; margin-top: 0.75rem; }

.pitch {
  margin-top: 0.7rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
  text-wrap: balance;
}

.pitch a, .pitch a:visited {
  color: var(--ember);
  font-weight: 600;
  text-underline-offset: 0.16em;
}

.pitch a:hover { color: var(--hot); }

.credit { margin-top: 0.65rem; }

#screen-play, #screen-end { flex: 1; min-height: 0; }

#screen-end {
  display: grid;
  align-content: center;
  justify-items: center;
}

.end-card { display: grid; gap: 0.75rem; }
.end-card h2 { font-size: clamp(1.7rem, 4vw, 2.3rem); text-wrap: balance; }

.bar {
  height: 0.35rem;
  overflow: hidden;
  border-radius: 999px;
  background: var(--velvet-2);
  flex: none;
}

#progress { height: 100%; width: 0; background: var(--hot); }

.stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 0;
  margin-top: 0.85rem;
  padding: 1rem 0.8rem 0.4rem;
  text-align: center;
}

.orb {
  width: 7.5rem;
  height: 7.5rem;
  border-radius: 999px;
  border: 2px solid var(--hot);
  background: var(--velvet-2);
}

.orb.is-live { background: rgb(255 61 127 / 30%); }

@keyframes beat {
  0% { transform: scale(1); box-shadow: 0 0 0 0 #ff3d7f66; }
  15% { transform: scale(1.12); box-shadow: 0 0 0 24px #ff3d7f00; }
  100% { transform: scale(1); box-shadow: 0 0 0 0 #ff3d7f00; }
}

.instruction {
  margin: 0;
  min-height: 4.6rem;
  max-width: 36rem;
  font-size: clamp(1.25rem, 2.6vw, 1.7rem);
  line-height: 1.25;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.clock {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

.transport {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  width: min(100%, 36rem);
  margin: 0.4rem auto 0;
}

@media (max-width: 760px) {
  .setup-grid { grid-template-columns: 1fr; }
  h1 { font-size: 2rem; }
}

@media (max-width: 420px) {
  .transport { grid-template-columns: 1fr; }
  .picks.two { grid-template-columns: 1fr; }
}

@media (max-height: 640px) {
  main { padding-top: 0.4rem; padding-bottom: 0.45rem; }
  .top, .title-block { margin-bottom: 0.35rem; }
  .gate-card h1 { font-size: 2rem; }
  .howto { display: none; }
  .lead { margin-top: 0.2rem; font-size: 0.92rem; }
  .setup-grid { gap: 0.55rem; }
  .setup-card { padding: 0.65rem 0.8rem 0.7rem; gap: 0.4rem; }
  .pitch { margin-top: 0.45rem; }
  .credit { margin-top: 0.35rem; }
  .stage { margin-top: 0.45rem; padding-top: 0.4rem; gap: 0.45rem; }
  .orb { width: 5.5rem; height: 5.5rem; }
  .instruction { min-height: 0; font-size: 1.2rem; }
  .gate-card, .end-card { padding: 1rem 0.95rem 0.9rem; }
}

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .orb { animation: none !important; }
}
