/* Oddball — styles */
:root {
  --paper: #F5F0E6;
  --card: #FFFDF8;
  --ink: #1A1712;
  --mute: #6B6355;
  --line: #1A1712;
  --shadow: #1A1712;
  --accent: #FF5A36;
  --on-accent: #1A1712;
  --dot: rgba(26, 23, 18, .07);
  --t0: #CFC8BA;
  --t1: #FFD23F;
  --t2: #FF9A3D;
  --t3: #8B6CFF;
  --t4: #1A1712;
  --font-d: 'Unbounded', ui-rounded, 'Arial Black', system-ui, sans-serif;
  --font-b: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
[data-theme="dark"] {
  --paper: #14120E;
  --card: #1F1C16;
  --ink: #F5F0E6;
  --mute: #A39B8B;
  --line: #F5F0E6;
  --shadow: #000;
  --dot: rgba(245, 240, 230, .05);
  --t0: #5A5448;
  --t4: #F5F0E6;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-color: var(--paper);
  background-image: radial-gradient(var(--dot) 1.3px, transparent 1.5px);
  background-size: 24px 24px;
  color: var(--ink);
  font: 400 17px/1.55 var(--font-b);
}
a { color: inherit; text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-d); line-height: 1.15; letter-spacing: -.01em; margin: 0; }
p { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- header ---------- */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; max-width: 1320px; margin: 0 auto; padding: 12px 16px;
}
.logo {
  display: inline-flex; align-items: center;
  font: 900 22px/1 var(--font-d); letter-spacing: -.02em;
  color: var(--ink); text-decoration: none;
}
.logo i {
  position: relative; display: inline-block; width: .9em; height: .9em; margin-right: .05em;
  border-radius: 50%; background: var(--accent); border: 2px solid var(--line);
  transform: translateY(.14em);
}
.logo i::after {
  content: ""; position: absolute; top: 16%; left: 20%; width: 28%; height: 28%;
  border-radius: 50%; background: #fff;
}
.nav { display: flex; align-items: center; gap: 6px; }
.nav a.txt {
  display: none; padding: 8px 12px; border-radius: 999px;
  font-weight: 600; font-size: 15px; text-decoration: none;
}
.nav a.txt:hover { background: var(--card); }
.ib {
  display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0;
  border: 2px solid var(--line); border-radius: 50%; background: var(--card);
  cursor: pointer; text-decoration: none;
}
.ib:hover { background: var(--t1); color: #1A1712; }
.ib svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ib .off { display: none; }
.ib[aria-pressed="false"] .on { display: none; }
.ib[aria-pressed="false"] .off { display: block; }
.nav .only-sm { display: inline-grid; }
@media (max-width: 759px) {
  .top { padding: 10px 14px; gap: 8px; }
  .logo { font-size: 19px; }
  .nav { gap: 4px; }
  .ib { width: 34px; height: 34px; }
  .ib svg { width: 16px; height: 16px; }
}
@media (max-width: 345px) { .nav .hide-xs { display: none; } }
@media (min-width: 760px) {
  .nav a.txt { display: inline-block; }
  .nav .only-sm { display: none; }
  .logo { font-size: 26px; }
}

/* ---------- layout ---------- */
.shell {
  flex: 1; width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 16px 56px;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; justify-content: center;
}
main { min-width: 0; width: 100%; max-width: 620px; margin: 0 auto; }
.rail { display: none; }
@media (min-width: 1180px) {
  .shell { grid-template-columns: 160px minmax(0, 620px) 160px; gap: 44px; }
  .rail { display: block; }
  .rail .ad { position: sticky; top: 20px; }
}
@media (min-width: 1440px) {
  .shell { grid-template-columns: 160px minmax(0, 620px) 300px; }
}

/* ---------- ads ---------- */
.ad { display: none; margin: 0 auto; width: fit-content; max-width: 100%; }
.ad.on { display: block; }
.ad-label {
  margin-bottom: 4px; text-align: center;
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--mute);
}
.ad-box { overflow: hidden; max-width: 100%; }
.ad[data-ad="top"] { margin-bottom: 18px; }
.ad[data-ad="top"] .ad-box { width: 320px; height: 50px; }
.ad[data-ad="left"] .ad-box, .ad[data-ad="right"] .ad-box { width: 160px; height: 600px; }
.ad[data-ad="result"] { margin: 40px auto; }
.ad[data-ad="result"] .ad-box { width: 300px; height: 250px; }
.ad[data-ad="content"] { width: 100%; margin: 36px auto; }
.ad[data-ad="content"] .ad-box { width: 100%; min-height: 250px; }
@media (min-width: 760px) { .ad[data-ad="top"] .ad-box { width: 728px; height: 90px; } }
@media (min-width: 1440px) { .ad[data-ad="right"] .ad-box { width: 300px; height: 600px; } }
.ad-box.ph {
  display: grid; place-items: center; padding: 8px; text-align: center;
  border: 2px dashed var(--mute); border-radius: 10px; color: var(--mute);
  font: 600 11px/1.3 var(--font-b);
  background: repeating-linear-gradient(45deg, transparent 0 10px, rgba(127, 127, 127, .09) 10px 20px);
}

/* ---------- building blocks ---------- */
.card {
  background: var(--card); border: 2px solid var(--line); border-radius: 22px;
  box-shadow: 5px 5px 0 var(--shadow); padding: 24px 20px; margin-bottom: 24px;
}
@media (min-width: 560px) { .card { padding: 32px; } }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 20px;
  font: 700 13px/1 var(--font-d); letter-spacing: .02em; text-decoration: none; white-space: nowrap;
  color: var(--ink); background: var(--card);
  border: 2px solid var(--line); border-radius: 999px; box-shadow: 0 4px 0 var(--shadow);
  cursor: pointer; transition: transform .08s, box-shadow .08s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 5px 0 var(--shadow); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--shadow); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-xl { width: 100%; min-height: 60px; font-size: 16px; }
.btn[disabled] { opacity: .5; cursor: default; transform: none; box-shadow: 0 4px 0 var(--shadow); }
.row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.kick { font: 700 11px/1 var(--font-d); letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.chip {
  display: inline-block; padding: 5px 10px; border: 2px solid var(--line); border-radius: 999px;
  font: 600 12px/1 var(--font-b); background: var(--paper);
}
.ball {
  display: inline-block; flex: none; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--line); background: transparent; vertical-align: middle;
}
.ball.t0 { background: var(--t0); }
.ball.t1 { background: var(--t1); }
.ball.t2 { background: var(--t2); }
.ball.t3 { background: var(--t3); }
.ball.t4 { background: var(--t4); box-shadow: inset 3px -3px 0 var(--accent); }
.ball.tx { border-style: dashed; opacity: .6; }
.ball.now { animation: pulse 1s ease-in-out infinite; border-color: var(--accent); }
.balls { display: flex; gap: 8px; justify-content: center; }
.balls.big .ball { width: 34px; height: 34px; }
.balls.big .ball.t4 { box-shadow: inset 6px -6px 0 var(--accent); }
@keyframes pulse { 50% { transform: scale(1.25); } }

/* ---------- home ---------- */
.hero { text-align: center; }
.lineup { display: flex; justify-content: center; gap: 7px; margin-bottom: 20px; }
.lineup i { width: 18px; height: 18px; border-radius: 50%; background: var(--t0); border: 2px solid var(--line); }
.lineup i.odd { background: var(--accent); animation: hop 2.4s cubic-bezier(.3, 1.6, .5, 1) infinite; }
@keyframes hop { 0%, 60%, 100% { transform: translateY(0); } 75% { transform: translateY(-14px); } 88% { transform: translateY(0); } 94% { transform: translateY(-4px); } }
.hero h1 { font-size: clamp(30px, 8.4vw, 50px); font-weight: 900; letter-spacing: -.03em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.tag { margin: 14px auto 22px; max-width: 26em; font-size: 18px; color: var(--mute); }
.facts { list-style: none; display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 0 0 26px; padding: 0; }
.facts li { padding: 8px 14px; border: 2px solid var(--line); border-radius: 14px; background: var(--paper); font-size: 14px; }
.facts b { font-family: var(--font-d); font-size: 16px; margin-right: 4px; }
.meta { margin-top: 14px; font-size: 14px; color: var(--mute); }
.done .score-sm { margin: 10px 0 12px; font-family: var(--font-d); }
.done .score-sm b { font-size: 54px; font-weight: 900; letter-spacing: -.03em; }
.done .score-sm span { color: var(--mute); font-weight: 700; }
.next { margin: 18px 0; color: var(--mute); }
.next b { color: var(--ink); font-variant-numeric: tabular-nums; }
.practice h2 { font-size: 18px; }
.practice p { margin: 6px 0 16px; color: var(--mute); font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chips button {
  padding: 8px 13px; border: 2px solid var(--line); border-radius: 999px;
  background: var(--paper); font-weight: 600; font-size: 14px; cursor: pointer;
}
.chips button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.linkrow {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px; margin-bottom: 24px; text-decoration: none;
  background: var(--card); border: 2px solid var(--line); border-radius: 18px; font-weight: 600;
}
.linkrow:hover { background: var(--t1); color: #1A1712; }
.linkrow small { display: block; font-weight: 400; color: var(--mute); }
.linkrow:hover small { color: #1A1712; }

/* ---------- round ---------- */
.round-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.prog { display: flex; gap: 6px; }
.prompt { margin: 10px 0 22px; font-size: clamp(24px, 6.6vw, 38px); font-weight: 900; letter-spacing: -.02em; text-wrap: balance; }
.timer { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.timer-bar { flex: 1; height: 14px; border: 2px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--paper); }
.timer-bar i { display: block; height: 100%; background: var(--ink); transform-origin: left center; }
.timer b { width: 2ch; text-align: right; font: 900 22px/1 var(--font-d); font-variant-numeric: tabular-nums; }
.timer.hot .timer-bar i { background: var(--accent); }
.timer.hot b { color: var(--accent); }
#f { display: flex; gap: 10px; }
#ans {
  flex: 1; min-width: 0; height: 54px; padding: 0 18px;
  font: 600 18px var(--font-b); color: var(--ink); background: var(--paper);
  border: 2px solid var(--line); border-radius: 999px;
}
#ans::placeholder { color: var(--mute); font-weight: 400; }
#f .btn { min-height: 54px; }
.fb { min-height: 1.6em; margin: 10px 4px 6px; font-size: 15px; font-weight: 600; color: var(--accent); }
.shake { animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.x2 {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 14px; text-align: left;
  background: transparent; border: 2px dashed var(--mute); border-radius: 14px; cursor: pointer; font-size: 14px; color: var(--mute);
}
.x2 b { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 2px solid currentColor; font: 900 12px var(--font-d); }
.x2.on { border-style: solid; border-color: var(--line); background: var(--t1); color: #1A1712; }
.x2[disabled] { cursor: default; opacity: .55; }

/* ---------- reveal ---------- */
.reveal .q { margin: 8px 0 20px; font-weight: 600; color: var(--mute); }
.ans-line { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ans-line h1 { font-size: clamp(26px, 7vw, 40px); font-weight: 900; letter-spacing: -.02em; overflow-wrap: anywhere; }
.pts { font: 900 clamp(30px, 8vw, 46px)/1 var(--font-d); font-variant-numeric: tabular-nums; }
.badges { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 22px; }
.tierchip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px 5px 7px; border: 2px solid var(--line); border-radius: 999px; font: 700 11px/1 var(--font-d); letter-spacing: .06em; text-transform: uppercase; }
.crowd { display: flex; align-items: center; gap: 20px; padding: 18px; border: 2px solid var(--line); border-radius: 16px; background: var(--paper); }
.grid100 { flex: none; display: grid; grid-template-columns: repeat(10, 9px); gap: 4px; }
.grid100 i { width: 9px; height: 9px; border-radius: 50%; background: var(--t0); opacity: .45; }
.grid100 i.lit { background: var(--ink); opacity: 1; animation: pop .35s backwards; }
.grid100 i.me { background: var(--accent); opacity: 1; animation: pop .35s backwards; transform: scale(1.25); }
@keyframes pop { from { transform: scale(0); } 70% { transform: scale(1.5); } }
.crowd p { font-size: 16px; font-weight: 600; }
.crowd small { display: block; margin-top: 4px; font-weight: 400; color: var(--mute); }
.board-peek { margin: 18px 0 24px; font-size: 15px; color: var(--mute); }
.board-peek b { color: var(--ink); }
.note { margin-top: 6px; font-size: 14px; color: var(--mute); }

/* ---------- results ---------- */
.results { text-align: center; }
.total { margin: 12px 0 4px; font-family: var(--font-d); }
.total b { font-size: clamp(64px, 20vw, 104px); font-weight: 900; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.total span { font-weight: 700; color: var(--mute); }
.verdict { margin-bottom: 20px; font: 700 16px var(--font-d); color: var(--accent); }
.results .row { margin-top: 24px; }
.rounds h2, .seo h2 { font-size: 20px; margin-bottom: 14px; }
.rr { border-top: 2px solid var(--line); }
.rr:last-of-type { border-bottom: 2px solid var(--line); }
.rr summary { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 12px; padding: 14px 2px; cursor: pointer; list-style: none; }
.rr summary::-webkit-details-marker { display: none; }
.rr-q { font-size: 13px; color: var(--mute); grid-column: 2; }
.rr-a { font-weight: 800; grid-column: 2; overflow-wrap: anywhere; }
.rr summary .ball { grid-row: span 2; width: 22px; height: 22px; }
.rr summary b { grid-row: 1 / span 2; grid-column: 3; font: 900 18px var(--font-d); font-variant-numeric: tabular-nums; }
.rr-hint { padding: 0 2px 10px; font-size: 13px; color: var(--mute); }
.board { margin: 0 0 18px; padding: 0; list-style: none; columns: 2; column-gap: 20px; font-size: 14px; }
@media (min-width: 560px) { .board { columns: 3; } }
.board li { display: flex; justify-content: space-between; gap: 8px; padding: 3px 6px; border-radius: 6px; break-inside: avoid; }
.board li em { font-style: normal; color: var(--mute); font-variant-numeric: tabular-nums; }
.board li.mine { background: var(--t1); color: #1A1712; font-weight: 800; }
.board li.mine em { color: #1A1712; }
.after { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: 32px; }

/* ---------- stats dialog + toast ---------- */
dialog {
  width: min(92vw, 440px); padding: 26px; color: var(--ink); background: var(--card);
  border: 2px solid var(--line); border-radius: 22px; box-shadow: 6px 6px 0 var(--shadow);
}
dialog::backdrop { background: rgba(20, 18, 14, .55); }
dialog h2 { font-size: 20px; margin-bottom: 18px; }
.statgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; margin-bottom: 22px; }
.statgrid b { display: block; font: 900 24px var(--font-d); }
.statgrid span { font-size: 12px; color: var(--mute); }
.dist { display: grid; gap: 6px; margin-bottom: 22px; font-size: 13px; }
.dist div { display: grid; grid-template-columns: 62px 1fr; align-items: center; gap: 8px; }
.dist i { display: block; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 6px; background: var(--ink); color: var(--paper); font-style: normal; font-weight: 700; line-height: 20px; text-align: right; }
#toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 50; transform: translate(-50%, 20px);
  padding: 10px 18px; border-radius: 999px; background: var(--ink); color: var(--paper);
  font-weight: 700; font-size: 14px; opacity: 0; pointer-events: none; transition: .2s;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- content sections & pages ---------- */
.seo { margin-top: 12px; }
body.playing .seo { display: none; }
.steps { display: grid; gap: 14px; margin: 0 0 30px; padding: 0; list-style: none; counter-reset: s; }
.steps li { position: relative; padding: 16px 16px 16px 62px; background: var(--card); border: 2px solid var(--line); border-radius: 16px; counter-increment: s; }
.steps li::before {
  content: counter(s); position: absolute; left: 16px; top: 16px; display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 50%; background: var(--t1); color: #1A1712; border: 2px solid var(--line); font: 900 13px var(--font-d);
}
.steps b { display: block; }
.faq details { border-top: 2px solid var(--line); padding: 14px 2px; }
.faq details:last-child { border-bottom: 2px solid var(--line); }
.faq summary { font-weight: 800; cursor: pointer; }
.faq p { margin-top: 8px; color: var(--mute); }
.prose h1 { font-size: clamp(28px, 7vw, 40px); font-weight: 900; margin-bottom: 14px; }
.prose h2 { font-size: 20px; margin: 32px 0 10px; }
.prose p, .prose ul, .prose ol { margin: 0 0 14px; }
.prose li { margin-bottom: 6px; }
.prose .lede { font-size: 19px; color: var(--mute); }
.tiers { display: grid; gap: 8px; margin: 0 0 14px; padding: 0; list-style: none; }
.tiers li { display: flex; align-items: center; gap: 12px; margin: 0; }
.tiers .ball { width: 22px; height: 22px; }
.tiers em { margin-left: auto; font-style: normal; color: var(--mute); font-variant-numeric: tabular-nums; }
.days { display: grid; gap: 10px; margin: 20px 0 0; padding: 0; list-style: none; }
.days a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px;
  background: var(--card); border: 2px solid var(--line); border-radius: 16px; text-decoration: none;
}
.days a:hover { background: var(--t1); color: #1A1712; }
.days b { font-family: var(--font-d); font-size: 15px; }
.days span { color: var(--mute); font-size: 14px; }
.days a:hover span { color: #1A1712; }
.days .st { font-weight: 800; color: var(--ink); }

/* ---------- footer ---------- */
.foot { border-top: 2px solid var(--line); background: var(--card); }
.foot div { display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: center; justify-content: center; max-width: 1320px; margin: 0 auto; padding: 20px 16px; font-size: 14px; color: var(--mute); }
.foot a { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
