:root {
  --bg: #f6f6f9; --card: #fff; --text: #1b1b22; --muted: #62626f;
  --accent: #4f46e5; --accent-2: #7c3aed; --accent-text: #fff; --border: #dcdce6;
  --win: #16a34a; --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0f0f14; --card: #1a1a22; --text: #f1f1f6; --muted: #a0a0ae; --border: #33333f; --accent: #6d66f5; }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); }
.wrap { max-width: 1000px; margin: 0 auto; padding: 0 16px; }

/* header / footer */
.site-header { background: var(--card); border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; align-items: center; gap: 20px; padding-top: 12px; padding-bottom: 12px; }
.logo { font-weight: 800; font-size: 1.2rem; text-decoration: none; color: var(--text); white-space: nowrap; }
.logo span { color: var(--accent); }
.nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { padding: 6px 12px; border-radius: 999px; text-decoration: none; color: var(--muted); font-size: .92rem; white-space: nowrap; }
.nav a:hover, .nav a[aria-current] { background: var(--bg); color: var(--text); }
.site-footer { margin-top: 56px; padding: 32px 0 48px; border-top: 1px solid var(--border); color: var(--muted); font-size: .92rem; }
.site-footer .cols { display: flex; flex-wrap: wrap; gap: 32px; margin-bottom: 20px; }
.site-footer h2 { font-size: .95rem; color: var(--text); margin: 0 0 8px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 4px 0; }

/* page */
main { padding-top: 28px; }
h1 { font-size: clamp(1.7rem, 4.5vw, 2.4rem); line-height: 1.2; margin: 0 0 8px; }
.lead { color: var(--muted); font-size: 1.1rem; margin: 0 0 24px; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 12px; }
.crumbs a { color: var(--muted); }
.content h2 { font-size: 1.5rem; margin: 40px 0 12px; line-height: 1.3; }
.content h3 { font-size: 1.1rem; margin: 24px 0 4px; }
.content p, .content li { max-width: 70ch; }
.content ol, .content ul { padding-left: 1.3em; }
.content li { margin: 6px 0; }

/* tool */
.tool { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.tool label.lbl { display: block; font-weight: 600; margin-bottom: 6px; }
textarea, input[type=number], input[type=text], select {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font: inherit;
}
textarea { min-height: 150px; resize: vertical; }
textarea:focus, input:focus, select:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.row .field { display: flex; align-items: center; gap: 8px; }
.row .field input[type=number] { width: 90px; }
.row .field select { width: auto; }
.grow { flex: 1 1 200px; }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: .95rem; cursor: pointer; }
button { font: inherit; font-weight: 600; padding: 10px 18px; border-radius: 10px; cursor: pointer; border: 1px solid var(--border); background: var(--card); color: var(--text); }
button:hover:not(:disabled) { border-color: var(--accent); }
button.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-text); border: 0; }
button.big { font-size: 1.1rem; padding: 12px 28px; }
button:disabled { opacity: .5; cursor: default; }
.hint { color: var(--muted); font-size: .92rem; margin-top: 8px; }
.result { margin-top: 18px; padding: 18px; border-radius: 12px; background: var(--bg); text-align: center; min-height: 84px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 10px; }
.result .big { font-size: clamp(1.6rem, 6vw, 2.4rem); font-weight: 800; word-break: break-word; }
.result .big.win { color: var(--win); }
.result ol { text-align: left; margin: 0; padding-left: 1.4em; font-size: 1.2rem; font-weight: 600; }

/* coin */
.coin-wrap { perspective: 800px; display: flex; justify-content: center; margin: 8px 0; }
.coin { width: 150px; height: 150px; position: relative; transform-style: preserve-3d; }
.coin .face { position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 1.5rem; backface-visibility: hidden; border: 6px solid #b8860b; box-shadow: inset 0 0 20px rgba(0,0,0,.25); }
.coin .heads { background: radial-gradient(circle at 30% 30%, #ffe27a, #e0a912); color: #5b4300; }
.coin .tails { background: radial-gradient(circle at 30% 30%, #e9e9ef, #a9a9b6); color: #3b3b46; transform: rotateY(180deg); }
.tally { display: flex; gap: 24px; justify-content: center; color: var(--muted); }

/* dice + teams + chips */
.dice { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.die { min-width: 56px; padding: 10px 14px; border-radius: 12px; background: var(--card); border: 2px solid var(--accent); font-weight: 800; font-size: 1.5rem; }
.teams { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); width: 100%; text-align: left; }
.team { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px; }
.team h3 { margin: 0 0 6px; font-size: 1rem; color: var(--accent); }
.team ul { margin: 0; padding-left: 1.1em; }
.nums { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.num { background: var(--card); border: 2px solid var(--accent); border-radius: 12px; padding: 6px 16px; font-weight: 800; font-size: 1.6rem; }
.spin-txt { color: var(--muted); }

/* tool grid on home / related */
.cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin: 12px 0 0; padding: 0; list-style: none; }
.cards a { display: block; height: 100%; padding: 14px 16px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; text-decoration: none; color: var(--text); }
.cards a:hover { border-color: var(--accent); }
.cards strong { display: block; }
.cards span { color: var(--muted); font-size: .92rem; line-height: 1.4; display: block; }

/* ads: always labelled, always separated from controls, space reserved so nothing shifts */
.ad { display: none; margin: 40px auto; text-align: center; max-width: 100%; clear: both; overflow: hidden; }
.ad.on { display: block; min-height: 120px; }
@media (max-width: 700px) { .ad.on { min-height: 280px; margin: 32px auto; } }
.ad small { display: block; color: var(--muted); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 6px; opacity: .8; }
.ad.preview .ad-box { border: 2px dashed var(--accent); border-radius: 12px; min-height: 250px; text-align: center; line-height: 1.5; padding: 12px; display: grid; place-items: center; color: var(--muted); font-size: .85rem; background: repeating-linear-gradient(45deg, transparent 0 10px, color-mix(in srgb, var(--border) 30%, transparent) 10px 20px); }
.ad.preview { min-height: 0; }
.ad.preview .ad-box span { font-size: .78rem; opacity: .8; }

/* consent */
.consent { position: fixed; left: 12px; right: 12px; bottom: 12px; max-width: 560px; margin: 0 auto; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 16px; box-shadow: 0 8px 30px rgba(0,0,0,.2); z-index: 50; font-size: .93rem; }
.consent p { margin: 0 0 12px; }
.consent .row { margin: 0; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* page grid: content column capped at 1000px, a side rail on each side on wide screens */
.page { display: grid; grid-template-columns: minmax(0, 1fr); }
.page > main { width: 100%; max-width: 1000px; margin: 0 auto; }
.rail { display: none; }
@media (min-width: 1400px) {
  .page { grid-template-columns: minmax(0, 1fr) minmax(0, 1000px) minmax(0, 1fr); }
  .rail { display: block; padding-top: 28px; }
  .rail-l { justify-self: end; padding-right: 16px; }
  .rail-r { justify-self: start; padding-left: 16px; }
  .rail .ad { position: sticky; top: 16px; width: 160px; margin: 0; }
  .rail .ad.on { min-height: 600px; }
  .rail .ad.preview .ad-box { min-height: 600px; }
}
.ad-top { margin: 16px auto 4px; }
.ad-top.on { min-height: 90px; }
@media (max-width: 700px) { .ad-top.on { min-height: 100px; margin: 12px auto 0; } }
.ad-top.preview .ad-box { min-height: 90px; }

/* ---------- fun options + reveal on the pickers ---------- */
.pk-fun { margin-top: 14px; border: 1px solid var(--border); border-radius: 12px; padding: 0 14px; background: var(--bg); }
.pk-fun summary { cursor: pointer; padding: 11px 0; font-weight: 600; }
.pk-grid { display: grid; gap: 10px; padding: 2px 0 14px; }
.pk-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: .95rem; }
.pk-row select { width: auto; min-width: 170px; }
.pk-switch { position: relative; width: 44px; height: 26px; flex: none; }
.pk-switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.pk-switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--border); transition: background .2s; }
.pk-switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.pk-switch input:checked + span { background: var(--accent); }
.pk-switch input:checked + span::after { transform: translateX(18px); }
.pk-switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.pk-lead { color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .16em; font-weight: 700; min-height: 1.2em; }
.pk-claim { width: 100%; max-width: 420px; font-size: .92rem; color: var(--muted); }
.pk-claim[hidden] { display: none; }
.pk-claim-bar { height: 7px; border-radius: 99px; background: var(--card); overflow: hidden; margin-bottom: 6px; }
.pk-claim-bar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .25s linear; }
.pk-claim.urgent { color: #dc2626; } .pk-claim.urgent .pk-claim-bar i { background: #dc2626; }
#confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 100; display: none; }

/* ---------- draw games ---------- */
.sc-tool { padding: 14px; }
.sc-stage { position: relative; border-radius: 16px; overflow: hidden; background: #0d1030; aspect-ratio: 960 / 600; }
.sc-stage canvas { width: 100%; height: 100%; display: block; }
body[data-scene="scratch"] .sc-stage canvas { touch-action: none; cursor: crosshair; }
.sc-cover { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(8, 8, 30, .28); }
.sc-cover[hidden] { display: none; }
.sc-play { width: 96px; height: 96px; border-radius: 50%; padding: 0 0 0 8px; font-size: 2.4rem; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border: 0; box-shadow: 0 10px 40px rgba(0, 0, 0, .45); }
.sc-play:hover { transform: scale(1.06); }
.sc-cols { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); margin-top: 16px; }
@media (min-width: 760px) { .sc-cols { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); } }
.sc-cols textarea { min-height: 210px; }

/* home page: the six boxes fill the first screen, text and pictures follow below */
html { scroll-behavior: smooth; } @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.home-screen { min-height: calc(100svh - 64px); display: flex; flex-direction: column; gap: 14px; padding: 12px 0 8px; }
.wrap:has(> .ad-top.on) .home-screen, .wrap:has(> .ad-top.preview) .home-screen { min-height: calc(100svh - 64px - 150px); }
.home-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.home-head h1 { font-size: clamp(1.6rem, 3.4vw, 2.5rem); line-height: 1.1; margin: 4px 0; letter-spacing: -.02em; }
.home-tag { margin: 0; color: var(--muted); font-size: .95rem; padding: 6px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); }
.acc { flex: 1; display: flex; gap: 12px; min-height: 360px; }
.acc-p { position: relative; flex: 1 1 0; min-width: 0; display: block; border-radius: 26px; overflow: hidden; color: #fff; text-decoration: none; background: linear-gradient(160deg, var(--c), var(--c2)); transition: flex .55s cubic-bezier(.2, .8, .2, 1), box-shadow .3s ease; isolation: isolate; }
.acc-p.is-open { flex: 5.4 1 0; box-shadow: 0 18px 44px color-mix(in srgb, var(--c) 35%, transparent); }
.acc-p:focus-visible { outline: 3px solid #fff; outline-offset: -5px; }
.acc-num { position: absolute; top: 16px; left: 16px; z-index: 3; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.92); color: #1b1b22; font-weight: 700; transition: background .3s, color .3s; }
.acc-p.is-open .acc-num { background: #3b6cff; color: #fff; }
.acc-art { --s: clamp(230px, 28vw, 380px); position: absolute; z-index: 0; right: -9%; top: 46%; margin-top: calc(var(--s) / -2 - 30px); width: var(--s); height: var(--s); opacity: .3; filter: saturate(.7); transition: opacity .5s ease, transform .6s cubic-bezier(.2, .8, .2, 1), right .6s cubic-bezier(.2, .8, .2, 1); transform: scale(.92); }
.acc-art svg { width: 100%; height: 100%; display: block; }
.acc-p.is-open .acc-art { opacity: 1; filter: none; transform: scale(1); right: 5%; }
.acc-p.is-open:nth-child(1) .acc-art svg { animation: accspin 36s linear infinite; }
@keyframes accspin { to { transform: rotate(360deg); } }
.acc-p::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, rgba(0,0,0,.5), rgba(0,0,0,0) 55%); pointer-events: none; }
.acc-chips { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.acc-chip { position: absolute; display: flex; flex-direction: column; gap: 2px; padding: 10px 16px; border-radius: 16px; background: #fff; color: #1b1b22; box-shadow: 0 10px 26px rgba(0,0,0,.22); opacity: 0; transform: translateY(10px); transition: opacity .4s ease .25s, transform .4s ease .25s; }
.acc-chip small { color: #6b6b78; font-size: .72rem; } .acc-chip b { font-size: 1rem; }
.acc-chip + .acc-chip { transition-delay: .38s; }
.acc-p.is-open .acc-chip { opacity: 1; transform: none; }
.acc-vert { position: absolute; z-index: 3; left: 50%; bottom: 74px; writing-mode: vertical-rl; transform: translateX(-50%) rotate(180deg); white-space: nowrap; font-weight: 650; font-size: 1.05rem; letter-spacing: .01em; transition: opacity .25s ease; }
.acc-p.is-open .acc-vert { opacity: 0; }
.acc-body { position: absolute; z-index: 3; left: 28px; bottom: 26px; width: min(360px, calc(100% - 100px)); display: flex; flex-direction: column; gap: 8px; opacity: 0; transform: translateY(12px); transition: opacity .35s ease, transform .45s ease; pointer-events: none; }
.acc-body strong { font-size: clamp(1.4rem, 2.4vw, 2rem); line-height: 1.1; }
.acc-body span { font-size: .98rem; line-height: 1.45; opacity: .95; }
.acc-p.is-open .acc-body { opacity: 1; transform: none; transition-delay: .2s; }
.acc-arrow { position: absolute; z-index: 3; bottom: 18px; left: 50%; transform: translateX(-50%); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 1.3rem; background: rgba(255,255,255,.18); backdrop-filter: blur(4px); transition: left .5s ease, right .5s ease, transform .3s ease, background .3s; }
.acc-p.is-open .acc-arrow { left: calc(100% - 58px); background: #fff; color: #1b1b22; }
.acc-p:hover .acc-arrow { transform: translateX(-50%) scale(1.08); } .acc-p.is-open:hover .acc-arrow { transform: scale(1.08); }
.home-more { align-self: center; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .85rem; text-decoration: none; }
.home-more i { font-style: normal; font-size: 1.2rem; animation: homebob 1.8s ease-in-out infinite; } @keyframes homebob { 50% { transform: translateY(4px); } }
.home-more-wrap { padding-top: 24px; }
.feat { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 44px; align-items: center; margin: 54px 0; }
.feat.rev { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); } .feat.rev .feat-img { order: -1; }
.feat-txt h2 { margin-top: 0; } .feat-txt ul { padding-left: 1.2em; }
.feat-img { margin: 0; } .feat-img svg { display: block; width: 100%; height: auto; max-width: 380px; margin: 0 auto; }
@media (max-width: 900px) { .feat, .feat.rev { grid-template-columns: 1fr; gap: 22px; margin: 40px 0; } .feat.rev .feat-img { order: 0; } .feat-img svg { max-width: 300px; } }
@media (max-width: 700px) {
  .home-screen { min-height: calc(100svh - 64px); }
  .acc { flex-direction: column; min-height: 480px; gap: 8px; }
  .acc-p { flex: 0 0 64px; border-radius: 20px; } .acc-p.is-open { flex: 1 1 auto; min-height: 240px; }
  .acc-num { top: 11px; left: 12px; width: 40px; height: 40px; }
  .acc-vert { writing-mode: horizontal-tb; transform: none; left: 66px; bottom: auto; top: 20px; }
  .acc-arrow { left: auto; right: 12px; bottom: auto; top: 12px; transform: none; } .acc-p.is-open .acc-arrow { left: auto; top: auto; bottom: 14px; right: 14px; }
  .acc-p:hover .acc-arrow { transform: none; }
  .acc-art { --s: 170px; right: -18px; top: 14px; margin-top: 0; } .acc-p.is-open .acc-art { right: 6px; }
  .acc-body { left: 18px; bottom: 16px; width: calc(100% - 90px); }
  .acc-chip { padding: 8px 12px; } .acc-chip:nth-child(2) { display: none; }
}
@media (min-width: 701px) and (max-height: 700px) { .home-head h1 { font-size: 1.5rem; } .acc { min-height: 300px; } }
@media (prefers-reduced-motion: reduce) { .acc-p, .acc-art, .acc-chip, .acc-body, .acc-arrow, .home-more i { transition: none; animation: none; } .acc-p.is-open .acc-art svg { animation: none; } }

/* home page: the tool panels use the whole window, edge to edge (the text below stays in a readable column) */
.home-main { max-width: none; padding-left: clamp(12px, 2vw, 28px); padding-right: clamp(12px, 2vw, 28px); }
.home-main .home-screen { min-height: 100svh; padding: 14px 0 10px; }
.home-main .home-more-wrap { max-width: 1000px; margin-left: auto; margin-right: auto; }
.home-main .acc-art { --s: clamp(240px, 27vw, 540px); }
.home-main .acc-p.is-open { flex: 5.6 1 0; }
.home-main .acc-chip { padding: 12px 18px; } .home-main .acc-chip b { font-size: 1.1rem; }
@media (min-width: 1200px) { .home-main .acc-chip small { font-size: .78rem; } .home-main .acc-vert { font-size: 1.15rem; } .home-main .acc-body strong { font-size: clamp(1.8rem, 2.6vw, 2.6rem); } .home-main .acc-body { width: min(460px, calc(100% - 110px)); } .home-main .acc-body span { font-size: 1.08rem; } }

/* home page: nothing but the tool panels on the first screen; the menu slides in once you scroll down */
.hh .site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 60; transform: translateY(-101%); transition: transform .3s ease; box-shadow: 0 6px 24px rgba(0,0,0,.18); }
.hh.hs .site-header { transform: none; }
.hh .home-more-wrap { scroll-margin-top: 0; padding-top: 90px; }
.hh html, html.hh { scroll-padding-top: 70px; }
@media (prefers-reduced-motion: reduce) { .hh .site-header { transition: none; } }

/* desktop: the panels fill the whole window; the heading floats over them */
@media (min-width: 701px) {
  .home-main { padding-left: 0; padding-right: 0; }
  .home-main .home-screen { position: relative; display: block; height: 100svh; min-height: 520px; padding: 0; }
  .home-main .acc { position: absolute; inset: 12px; min-height: 0; }
  .home-main .home-head { position: absolute; z-index: 6; top: 24px; left: 40px; right: 40px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; pointer-events: none; }
  .home-main .home-head h1 { margin: 0; color: #fff; font-size: clamp(1.6rem, 3vw, 2.7rem); text-shadow: 0 2px 20px rgba(0,0,0,.35); }
  .home-main .home-tag { pointer-events: auto; color: #fff; background: rgba(0,0,0,.28); border-color: rgba(255,255,255,.3); backdrop-filter: blur(8px); text-decoration: none; white-space: nowrap; }
  .home-main .home-tag:hover { background: rgba(0,0,0,.42); }
  .home-main .home-tag i { font-style: normal; }
  .home-main .acc-p::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 170px; z-index: 1; background: linear-gradient(rgba(0,0,0,.32), rgba(0,0,0,0)); pointer-events: none; }
  .home-main .acc-num { top: 92px; }
  .home-main .home-more { display: none; }
  .home-main .home-more-wrap { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 700px) { .home-tag-more { display: none; } }
@media (min-width: 701px) and (max-height: 680px) { .home-main .acc-num { top: 78px; } .home-main .home-head h1 { font-size: 1.5rem; } }

/* the home panels are small live games */
.acc-art .st { position: relative; width: 100%; height: 100%; }
.acc-art svg { overflow: visible; }
.acc-p:first-child { background: radial-gradient(55% 48% at 64% 50%, rgba(255,190,60,.30), transparent 72%), radial-gradient(rgba(255,255,255,.07) 1px, transparent 1.6px) 0 0 / 22px 22px, linear-gradient(160deg, var(--c), var(--c2)); }
.st-glow { position: absolute; inset: -22%; background: radial-gradient(circle, rgba(255,190,60,.5), transparent 62%); filter: blur(18px); opacity: 0; transition: opacity .6s ease; }
.acc-p.is-open .st-glow { opacity: 1; }
.st-wheel svg { position: relative; width: 100%; height: 100%; filter: drop-shadow(0 18px 30px rgba(0,0,0,.5)); }
.wh-rot { transform-origin: 200px 200px; transform-box: view-box; }
.wh-l { opacity: .55; animation: whtw 1.4s ease-in-out infinite alternate; } @keyframes whtw { to { opacity: 1; } }
.acc-p:not(.is-open) .wh-l { animation: none; }
.confetti { position: absolute; z-index: 4; left: 0; top: 0; width: 0; height: 0; pointer-events: none; }
.confetti span { position: absolute; width: 9px; height: 14px; border-radius: 2px; background: var(--k); animation: cfly 1.25s cubic-bezier(.15,.7,.3,1) forwards; }
@keyframes cfly { 0% { transform: translate(0,0) rotate(0); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); opacity: 0; } }
.acc-chip.pop { animation: chippop .6s cubic-bezier(.2,1.6,.4,1); } @keyframes chippop { 0% { transform: scale(.7); } 60% { transform: scale(1.14); } 100% { transform: scale(1); } }
/* name picker: a reel of names that lands on one */
.st-names { display: grid; place-items: center; --rh: calc(var(--s) * .15); }
.nm { position: relative; width: 84%; height: calc(var(--rh) * 5); overflow: hidden; border-radius: 22px; background: rgba(255,255,255,.14); box-shadow: inset 0 0 0 2px rgba(255,255,255,.25); }
.nm::before { content: ""; position: absolute; left: 0; right: 0; top: calc(var(--rh) * 2); height: var(--rh); background: rgba(255,255,255,.28); box-shadow: 0 0 0 2px #fff inset; z-index: 1; }
.nm ul { margin: 0; padding: 0; list-style: none; animation: reel 5.2s cubic-bezier(.2,.7,.2,1) infinite; animation-play-state: paused; }
.acc-p.is-open .nm ul, .acc-p.is-open .coin, .acc-p.is-open .av { animation-play-state: running; }
.nm li { height: var(--rh); line-height: var(--rh); text-align: center; font-weight: 750; font-size: calc(var(--rh) * .5); color: #fff; }
@keyframes reel { 0% { transform: translateY(0); opacity: 1; } 62%, 93% { transform: translateY(calc(var(--rh) * -6)); opacity: 1; } 98% { opacity: 0; } 100% { transform: translateY(0); opacity: 0; } }
/* teams: people get shuffled into two teams */
.av { position: absolute; left: 50%; top: 50%; width: calc(var(--s) * .15); height: calc(var(--s) * .15); margin: calc(var(--s) * -.075) 0 0 calc(var(--s) * -.075); border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: calc(var(--s) * .065); background: var(--bg); color: var(--fg); box-shadow: 0 6px 14px rgba(0,0,0,.3); transform: translate(var(--px), var(--py)); animation: avgo 4.6s cubic-bezier(.6,0,.2,1) var(--d) infinite alternate; animation-play-state: paused; }
@keyframes avgo { 0%, 22% { transform: translate(var(--px), var(--py)) scale(.9); } 62%, 100% { transform: translate(var(--fx), var(--fy)) scale(1); } }
/* coin flip in 3D */
.st-coin { display: grid; place-items: center; perspective: 900px; }
.coin { position: relative; width: 64%; aspect-ratio: 1; transform-style: preserve-3d; animation: coinflip 4.2s cubic-bezier(.3,.5,.3,1) infinite; animation-play-state: paused; }
.cf { position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center; backface-visibility: hidden; font: 800 calc(var(--s) * .34) system-ui, sans-serif; color: #8a5a00; text-shadow: 0 2px 0 rgba(255,255,255,.4); background: radial-gradient(circle at 35% 28%, #fff6b0, #f7c91c 52%, #c98a00); box-shadow: inset 0 0 0 calc(var(--s) * .018) rgba(150,95,0,.5), inset 0 0 0 calc(var(--s) * .045) rgba(255,255,255,.18), 0 14px 30px rgba(0,0,0,.35); }
.cf-t { transform: rotateX(180deg); }
.coin-shadow { position: absolute; left: 24%; right: 24%; bottom: 8%; height: 5%; border-radius: 50%; background: rgba(0,0,0,.28); filter: blur(8px); }
@keyframes coinflip { 0% { transform: translateY(0) rotateX(0); } 34% { transform: translateY(-24%) rotateX(720deg); } 62%, 100% { transform: translateY(0) rotateX(1440deg); } }
/* dice */
.dice { position: absolute; width: 42%; aspect-ratio: 1; border-radius: 20%; background: #fff; display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); padding: 11%; box-shadow: 0 16px 28px rgba(0,0,0,.35), inset 0 -6px 0 rgba(0,0,0,.08); }
.dice i { border-radius: 50%; margin: 12%; } .dice i.on { background: #b91c1c; }
.d1 { left: 8%; top: 36%; transform: rotate(-12deg); } .d2 { right: 6%; top: 22%; transform: rotate(14deg); }
.dice.roll { animation: diceroll .95s cubic-bezier(.3,.7,.3,1); } .d2.roll { animation-delay: .08s; }
@keyframes diceroll { 0% { translate: 0 0; rotate: 0deg; } 35% { translate: 0 -34%; rotate: 220deg; } 70% { translate: 0 0; rotate: 380deg; } 85% { translate: 0 -8%; rotate: 350deg; } 100% { translate: 0 0; rotate: 360deg; } }
/* number generator: a slot counter */
.st-num { display: grid; place-items: center; }
.odo { display: flex; gap: calc(var(--s) * .03); padding: calc(var(--s) * .05) calc(var(--s) * .07); border-radius: 22px; background: rgba(0,0,0,.28); box-shadow: inset 0 0 0 2px rgba(255,255,255,.35), 0 18px 30px rgba(0,0,0,.3); }
.odo span { display: block; min-width: .62em; text-align: center; font: 800 calc(var(--s) * .42) system-ui, sans-serif; line-height: 1; color: #fff; text-shadow: 0 4px 0 rgba(0,0,0,.25); font-variant-numeric: tabular-nums; }
.odo.spin span { filter: blur(1.2px); }
@media (prefers-reduced-motion: reduce) { .nm ul, .coin, .av, .wh-l, .dice.roll { animation: none; } .confetti { display: none; } }
