:root {
  --bg: #f6f5f1;
  --panel: #fbfaf7;
  --panel-head: #f0eee8;
  --ink: #171716;
  --muted: #67645e;
  --faint: #a09c93;
  --rule: #e1ded6;
  --rule-strong: #c7c3b9;
  --dot: rgba(23, 23, 22, .07);
  --shadow: rgba(40, 32, 20, .35);
  --accent: #b4552d;
  --win: #2f8a5a;
  --tie: #0a7fb0;
  --lose: #d0103f;
  --rgb: linear-gradient(90deg, #ff004c, #ff9900, #ffee00, #00ff88, #00c8ff, #8a2bff, #ff004c);
  --mono: 'Geist Mono', 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e0d;
    --panel: #141413;
    --panel-head: #191917;
    --ink: #e9e7e1;
    --muted: #97948c;
    --faint: #5f5c56;
    --rule: #252420;
    --rule-strong: #3a3833;
    --dot: rgba(233, 231, 225, .05);
    --shadow: rgba(0, 0, 0, .8);
    --accent: #e0895d;
    --win: #5fcf8f;
    --tie: #4fc3f0;
    --lose: #ff5a7e;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background-color: var(--bg);
  background-image: radial-gradient(var(--dot) 1px, transparent 1px);
  background-size: 22px 22px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
b { font-weight: 600; }
::selection { background: var(--accent); color: var(--panel); }

@keyframes rgb-slide { to { background-position: 300% 0; } }

.page { max-width: 720px; margin: 0 auto; padding: 28px 20px 40px; }

/* ---------- top bar ---------- */
.bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.view {
  display: inline-flex;
  padding: 2px;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  font-size: 11.5px;
  line-height: 1;
}
.view a {
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s;
}
.view a:hover { color: var(--ink); }
.view a[aria-current] { background: linear-gradient(120deg, #ff004c, #8a2bff 55%, #00c8ff); color: #fff; }
.links { display: flex; gap: 18px; font-size: 13px; }
.links a { text-decoration: none; color: var(--muted); }
.links a span { color: var(--faint); }
.links a:hover { color: var(--accent); }

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1fr 228px;
  gap: 40px;
  align-items: center;
  padding: 100px 0 70px;
}
.prompt { margin: 0 0 18px; font-size: 13px; color: var(--muted); }
.prompt .host { color: var(--accent); }
h1 { margin: 0; font-size: clamp(34px, 7vw, 52px); font-weight: 500; line-height: 1.1; letter-spacing: -.03em; }
.role { margin: 14px 0 28px; font-size: 20px; color: var(--muted); }
.cursor {
  display: inline-block;
  width: .55em; height: 1.05em;
  margin-left: 3px;
  vertical-align: -.15em;
  background: var(--rgb);
  background-size: 300% 100%;
  animation: rgb-slide 4s linear infinite, blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.lede { margin: 0; color: var(--muted); max-width: 46ch; }
.lede b { color: var(--ink); }

/* ---------- window chrome ---------- */
.win {
  display: block;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 30px 60px -48px var(--shadow);
}
.win-head, .win-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 14px;
  font-size: 11.5px;
  color: var(--muted);
  background: var(--panel-head);
}
.win-head { border-bottom: 1px solid var(--rule); }
.win-foot { border-top: 1px solid var(--rule); color: var(--faint); }
.win .tag { color: var(--accent); }

.portrait { margin: 0; }
.portrait img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.portrait figcaption { padding: 7px 14px; border-top: 1px solid var(--rule); font-size: 11.5px; color: var(--faint); }

/* the one big RGB stripe */
.rgb-line {
  height: 3px;
  border-radius: 3px;
  background: var(--rgb);
  background-size: 300% 100%;
  animation: rgb-slide 6s linear infinite;
  opacity: .85;
}

/* ---------- sections ---------- */
section { padding: 50px 0 10px; scroll-margin-top: 20px; }
.hero { padding-top: 100px; }
.h {
  display: flex; align-items: center; gap: 14px;
  margin: 0 0 26px;
  font-size: 13px; font-weight: 400; color: var(--muted); letter-spacing: .04em;
}
.h::before { content: "#"; color: var(--accent); }
.h::after { content: ""; flex: 1; border-top: 1px dashed var(--rule-strong); }
section > p { margin: 0 0 14px; max-width: 62ch; }

/* ---------- game ---------- */
.game-body { padding: 24px 18px 26px; text-align: center; }
.rules { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.rules span {
  font-size: 12px;
  padding: 3px 11px;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  color: var(--muted);
}
.choices { display: flex; justify-content: center; gap: 12px; }
.choices button {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  width: 104px;
  padding: 16px 0 12px;
  font: inherit;
  font-size: 38px;
  line-height: 1;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--rule-strong);
  border-radius: 10px;
  cursor: pointer;
  transition: transform .15s, border-color .2s, box-shadow .2s;
}
.choices button span { font-size: 12px; color: var(--muted); }
.choices button:nth-child(1):hover { border-color: #ff004c; box-shadow: 0 0 0 3px rgba(255, 0, 76, .15); }
.choices button:nth-child(2):hover { border-color: #00c08a; box-shadow: 0 0 0 3px rgba(0, 192, 138, .18); }
.choices button:nth-child(3):hover { border-color: #00a8e0; box-shadow: 0 0 0 3px rgba(0, 168, 224, .18); }
.choices button:hover { transform: translateY(-3px); }
.choices button:active { transform: scale(.96); }

.arena { display: flex; justify-content: center; align-items: center; gap: 30px; margin: 28px 0 6px; }
.label { font-size: 12px; color: var(--faint); }
.pick { font-size: 52px; line-height: 1.3; }
.pick.shake { animation: shake .4s; }
@keyframes shake { 25% { transform: rotate(-15deg); } 75% { transform: rotate(15deg); } }
.vs { font-size: 13px; color: var(--accent); }

.result { margin: 8px 0 22px; min-height: 1.8em; font-size: 17px; font-weight: 600; }
.result.win { color: var(--win); }
.result.lose { color: var(--lose); }
.result.tie { color: var(--tie); }

.score { display: flex; justify-content: center; gap: 10px; }
.score div {
  min-width: 84px;
  padding: 8px 12px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  font-size: 11.5px;
  color: var(--faint);
}
.score span { display: block; font-size: 22px; font-weight: 500; line-height: 1.4; }
.score div:nth-child(1) span { color: var(--win); }
.score div:nth-child(2) span { color: var(--tie); }
.score div:nth-child(3) span { color: var(--lose); }

.reset {
  font: inherit; font-size: 11.5px;
  padding: 3px 12px;
  background: none;
  color: var(--muted);
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  cursor: pointer;
}
.reset:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.card { text-decoration: none; transition: border-color .2s, transform .2s; }
.card:hover { border-color: var(--rule-strong); transform: translateY(-2px); }
.card-body { padding: 16px 18px 14px; }
.card .t { font-size: 15px; font-weight: 500; }
.card p { margin: 8px 0 18px; font-size: 13px; line-height: 1.65; color: var(--muted); }
.card .u { font-size: 11.5px; color: var(--faint); }

/* big subscribe button, with an RGB edge */
.subscribe {
  position: relative;
  display: flex; align-items: center; justify-content: center; gap: 16px;
  margin: 34px auto 0;
  max-width: 420px;
  padding: 18px 26px;
  border-radius: 14px;
  background: var(--panel);
  text-decoration: none;
  isolation: isolate;
  transition: transform .15s;
}
.subscribe::before {
  content: "";
  position: absolute; inset: -2px;
  border-radius: 16px;
  background: var(--rgb);
  background-size: 300% 100%;
  animation: rgb-slide 4s linear infinite;
  z-index: -2;
}
.subscribe::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: 14px;
  background: var(--panel);
  z-index: -1;
}
.subscribe:hover { transform: translateY(-2px) scale(1.02); }
.subscribe .play {
  display: grid; place-items: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: #ff0033; color: #fff;
  font-size: 18px; padding-left: 3px;
  flex: none;
}
.subscribe b { display: block; font-size: 24px; font-weight: 600; line-height: 1.2; letter-spacing: .02em; }
.subscribe small { display: block; font-size: 12.5px; color: var(--muted); }

.mail { color: var(--accent); text-underline-offset: 3px; }

/* ---------- footer ---------- */
footer {
  display: flex; justify-content: space-between;
  margin-top: 60px; padding-top: 18px;
  border-top: 1px dashed var(--rule-strong);
  font-size: 12px; color: var(--faint);
}

/* ---------- small screens ---------- */
@media (max-width: 620px) {
  .hero { grid-template-columns: 1fr; gap: 28px; padding: 60px 0 46px; }
  .portrait { max-width: 240px; }
  .cards { grid-template-columns: 1fr; }
  .links { gap: 12px; font-size: 12px; }
  .links a span { display: none; }
  .choices button { width: 30%; max-width: 104px; font-size: 32px; }
  .arena { gap: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
  html { scroll-behavior: auto; }
}
.est { font-size: 12px; color: var(--faint); }
