
:root {
  --bg: #f7f5ff; --bg2: #efeaff; --card: #ffffff; --ink: #1b1530; --muted: #5f587a; --line: #e4def5; --soft: #f1edff;
  --brand: #6d4aff; --brand-2: #ff5d73; --brand-ink: #ffffff; --ok: #138a5b; --warn: #b45309; --err: #c81e45;
  --c1: #ff5d73; --c2: #ffb238; --c3: #3fc380; --c4: #2fa7ff; --c5: #8b6cff;
  --round: ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --r: 22px; --shadow: 0 1px 2px rgba(27,21,48,.06), 0 12px 32px rgba(76,52,170,.12);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) { --bg: #120f1f; --bg2: #191430; --card: #1d1833; --ink: #f1eeff; --muted: #b3acd3; --line: #2f2850; --soft: #241e40; --brand: #9b85ff; --brand-ink: #120f1f; --ok: #45d39a; --err: #ff7d95; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 32px rgba(0,0,0,.35); color-scheme: dark; } }
:root[data-theme=dark] { --bg: #120f1f; --bg2: #191430; --card: #1d1833; --ink: #f1eeff; --muted: #b3acd3; --line: #2f2850; --soft: #241e40; --brand: #9b85ff; --brand-ink: #120f1f; --ok: #45d39a; --err: #ff7d95; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 32px rgba(0,0,0,.35); color-scheme: dark; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--sans); overflow-x: clip; }
a { color: var(--brand); text-underline-offset: 2px; }
img, svg, canvas { max-width: 100%; }
h1, h2, h3 { font-family: var(--round); line-height: 1.15; letter-spacing: -.01em; }
h1 { font-size: clamp(28px, 4.2vw, 44px); margin: 0 0 6px; font-weight: 850; }
h2 { font-size: clamp(22px, 2.6vw, 30px); margin: 40px 0 12px; font-weight: 800; }
h3 { font-size: 19px; margin: 22px 0 8px; font-weight: 800; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -9999px; } .skip:focus { left: 8px; top: 8px; z-index: 99; background: var(--card); padding: 8px 12px; border-radius: 10px; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }


header.top { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; gap: 14px; height: 62px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font: 850 21px var(--round); white-space: nowrap; }
.brand svg { width: 34px; height: 34px; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.brand:hover svg { transform: rotate(180deg); }
.brand b { color: var(--brand); }
.modes { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: 0 auto 0 8px; padding: 4px; background: var(--soft); border-radius: 999px; }
.modes::-webkit-scrollbar { display: none; }
.modes a { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; padding: 7px 13px; border-radius: 999px; text-decoration: none; color: var(--muted); font: 700 14px var(--round); }
.modes a .ic { width: 17px; height: 17px; }
.modes a:hover { color: var(--ink); background: var(--card); }
.modes a[aria-current] { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(27,21,48,.12); }
.hbtn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 40px; height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; font: 700 14px var(--round); cursor: pointer; }
.hbtn:hover { border-color: var(--brand); }
@media (max-width: 899px) { .modes { display: none; } .hbtn span { display: none; } }
.mnav { display: none; }
@media (max-width: 899px) {
  .mnav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 8px 16px; border-bottom: 1px solid var(--line); background: var(--bg); }
  .mnav::-webkit-scrollbar { display: none; }
  .mnav a { white-space: nowrap; padding: 8px 12px; border-radius: 999px; text-decoration: none; color: var(--muted); background: var(--soft); font: 700 14px var(--round); min-height: 38px; display: inline-flex; align-items: center; }
  .mnav a[aria-current] { background: var(--ink); color: var(--bg); }
}


.head { padding: 22px 0 6px; }
.crumbs { font-size: 13px; color: var(--muted); margin: 0 0 6px; } .crumbs a { color: var(--muted); } .crumbs i { font-style: normal; padding: 0 6px; }
.lede { font-size: 18px; color: var(--muted); max-width: 44em; margin: 0 0 6px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.badges li { display: inline-flex; align-items: center; gap: 6px; font: 700 13px var(--round); color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; }
.badges .ic { width: 16px; height: 16px; color: var(--brand); }


.stagecard { background: var(--card); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow); padding: 18px; margin: 16px 0 10px; }
#app { display: grid; gap: 18px; min-height: 560px; }
@media (min-width: 900px) { #app.mode-wheel, #app.mode-yesno, #app.mode-number, #app.mode-letter, #app.mode-picker, #app.mode-giveaway { grid-template-columns: minmax(0, 1.25fr) minmax(320px, .9fr); align-items: start; } }
.stage { display: grid; justify-items: center; gap: 12px; position: relative; }
.wheelbox { position: relative; width: min(100%, 560px); aspect-ratio: 1; }
.wheelbox.hidden-wheel { display: none; }
.wheel { width: 100%; height: 100%; display: block; cursor: pointer; filter: drop-shadow(0 18px 30px rgba(76,52,170,.22)); }
.pin { position: absolute; right: -6px; top: 50%; width: 0; height: 0; transform: translateY(-50%); border-top: 18px solid transparent; border-bottom: 18px solid transparent; border-right: 34px solid var(--ink); filter: drop-shadow(0 3px 4px rgba(0,0,0,.25)); }
.pin::after { content: ""; position: absolute; right: -30px; top: -9px; width: 10px; height: 18px; border-radius: 5px; }
.spin { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 22%; aspect-ratio: 1; border-radius: 50%; border: 5px solid #fff; background: var(--ink); color: #fff; font: 900 clamp(14px, 2.2vw, 20px) var(--round); letter-spacing: .06em; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,.25); transition: transform .12s; }
.spin:hover { transform: translate(-50%, -50%) scale(1.05); } .spin:active { transform: translate(-50%, -50%) scale(.96); }
.spinning .spin { opacity: .7; cursor: progress; }
.reveal { text-align: center; min-height: 104px; display: grid; align-content: center; justify-items: center; padding: 8px 12px; width: 100%; }
.reveal small { font: 800 12px var(--round); letter-spacing: .14em; text-transform: uppercase; color: var(--brand); }
.reveal b { font: 900 clamp(26px, 4.6vw, 52px) var(--round); line-height: 1.1; word-break: break-word; }
.reveal span { font-size: 14px; color: var(--muted); }
.reveal.pop b { animation: pop .45s cubic-bezier(.2,1.6,.4,1); }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 100% { transform: none; opacity: 1; } }
.mode-picker .reveal, .mode-giveaway .reveal { min-height: 300px; background: radial-gradient(circle at 50% 40%, var(--soft), transparent 70%); border-radius: 24px; }
.mode-picker .reveal b, .mode-giveaway .reveal b { font-size: clamp(36px, 7vw, 84px); }
.mode-picker .stage::after, .mode-giveaway .stage::after { content: ""; }
.mode-picker .spinhelp, .mode-giveaway .spinhelp { order: 3; }
.spinhelp { font-size: 13px; color: var(--muted); margin: 0; text-align: center; }
kbd { font: 700 12px var(--mono); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; background: var(--soft); }
.mode-picker .stage .b-draw, .mode-giveaway .stage .b-draw { display: inline-flex; }
.panel { display: grid; gap: 12px; align-content: start; min-width: 0; }
.ptabs { display: flex; gap: 4px; background: var(--soft); padding: 4px; border-radius: 14px; }
.ptabs button { flex: 1; border: 0; background: none; color: var(--muted); padding: 9px 8px; border-radius: 10px; font: 800 14px var(--round); cursor: pointer; min-height: 40px; }
.ptabs button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(27,21,48,.12); }
.ptabs span { font: 700 12px var(--mono); color: var(--muted); }
.pane { display: grid; gap: 10px; }
.ttl { display: grid; gap: 4px; font: 700 13px var(--round); color: var(--muted); }
input[type=text], input[type=number], input[type=url], select, textarea { font: 16px var(--sans); color: var(--ink); background: var(--bg); border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; width: 100%; min-height: 44px; }
textarea { resize: vertical; line-height: 1.5; min-height: 220px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.numrow, .letrow, .row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.numrow label, .letrow label, .row label { display: grid; gap: 4px; font: 700 13px var(--round); color: var(--muted); flex: 1 1 120px; }
.tools, .share { display: flex; flex-wrap: wrap; gap: 8px; }
.b { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 16px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font: 800 14px var(--round); cursor: pointer; text-decoration: none; }
.b:hover { border-color: var(--brand); } .b:disabled { opacity: .5; cursor: default; }
.b.sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
.b.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 35%, transparent); }
.b.primary:hover { filter: brightness(1.06); }
.file { position: relative; }
.hint { font-size: 13px; color: var(--muted); margin: 0; }
code { font: 13px var(--mono); background: var(--soft); padding: 1px 5px; border-radius: 5px; }
.opt { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; font: 700 14px var(--round); }
.opt input[type=range] { grid-column: 1 / -1; accent-color: var(--brand); }
.opt.chk, .chk { display: flex; gap: 10px; align-items: center; font: 600 15px var(--sans); }
.chk input, .opt.chk input { width: 20px; height: 20px; accent-color: var(--brand); }
.opt output { font: 800 14px var(--mono); color: var(--brand); }
.hist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 330px; overflow: auto; counter-reset: h; }
.hist li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; background: var(--soft); border-radius: 10px; }
.hist li b { font: 800 15px var(--round); } .hist li small { color: var(--muted); white-space: nowrap; }
.mine summary { cursor: pointer; font: 800 14px var(--round); padding: 6px 0; }
.mylist { list-style: none; margin: 6px 0; padding: 0; display: grid; gap: 6px; }
.mylist li { display: flex; align-items: center; gap: 8px; } .mylist li .b { flex: 1; justify-content: flex-start; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mylist .x { border: 0; background: none; color: var(--muted); font-size: 20px; cursor: pointer; width: 36px; height: 36px; }
.status { font: 600 14px var(--sans); color: var(--ok); min-height: 1.2em; margin: 0; }
.proof { grid-column: 1 / -1; border: 1.5px dashed color-mix(in srgb, var(--brand) 50%, var(--line)); border-radius: 18px; padding: 12px 16px; background: color-mix(in srgb, var(--brand) 6%, var(--card)); }
.proof h3 { margin: 0 0 6px; }
.proof code { word-break: break-all; }
canvas.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; }


.tg { display: grid; gap: 18px; } @media (min-width: 900px) { .tg { grid-template-columns: minmax(300px, .8fr) 1.2fr; } }
.tgin { display: grid; gap: 12px; align-content: start; }
.tgout { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; align-content: start; }
.team { border-radius: 18px; padding: 12px 14px; background: var(--soft); border-top: 6px solid var(--tc, var(--brand)); }
.team h3 { margin: 0 0 6px; display: flex; justify-content: space-between; } .team h3 small { font: 800 13px var(--mono); color: var(--muted); }
.team ol { margin: 0; padding-left: 20px; } .team li { padding: 2px 0; font-weight: 600; } .team li.cap::after { content: " ★"; color: #e0a100; }
.team.t0 { --tc: #ff5d73; } .team.t1 { --tc: #2fa7ff; } .team.t2 { --tc: #3fc380; } .team.t3 { --tc: #ffb238; } .team.t4 { --tc: #8b6cff; } .team.t5 { --tc: #ff8a3d; }
.team.t6 { --tc: #00c2b8; } .team.t7 { --tc: #ff7ac6; } .team.t8 { --tc: #94a3b8; } .team.t9 { --tc: #1b1530; } .team.t10 { --tc: #e2e8f0; } .team.t11 { --tc: #84cc16; }
.cd { display: grid; gap: 14px; justify-items: center; text-align: center; }
.cdstage { display: grid; gap: 10px; justify-items: center; min-height: 260px; align-content: center; }
.tok { width: 180px; height: 180px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffe08a, #e0a100); color: #5a3d00; box-shadow: inset 0 -8px 0 rgba(0,0,0,.12), 0 14px 30px rgba(0,0,0,.18); }
.tok.dice { border-radius: 34px; background: linear-gradient(145deg, #ffffff, #e9e4ff); color: var(--ink); }
.tok b { font: 900 64px var(--round); }
.tok.roll { animation: roll .6s cubic-bezier(.2,.8,.2,1); }
@keyframes roll { 0% { transform: rotateY(0) scale(.8); } 60% { transform: rotateY(540deg) scale(1.08); } 100% { transform: rotateY(720deg) scale(1); } }
.cdres { font: 800 20px var(--round); margin: 0; }
.tally p { margin: 0; }
.vf { display: grid; gap: 12px; } .vfout dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; } .vfout dt { font-weight: 800; } .vfout dd { margin: 0; word-break: break-word; }
.good { color: var(--ok); font: 800 20px var(--round); } .bad { color: var(--err); font-weight: 700; }


body.presenting header.top, body.presenting .mnav, body.presenting .head, body.presenting .below, body.presenting footer, body.presenting .ad { display: none; }
body.presenting .stagecard { border: 0; box-shadow: none; margin: 0; border-radius: 0; min-height: 100vh; display: grid; align-content: center; background: var(--bg); }
body.presenting #app { grid-template-columns: 1fr; }
body.presenting .tgin, body.presenting .share .copyt { display: none; }
body.presenting .tg { grid-template-columns: 1fr; } body.presenting .team li { font-size: 22px; }
body.presenting .panel .ptabs, body.presenting .panel .pane, body.presenting .panel .mine, body.presenting .panel .share .savelocal, body.presenting .panel .share .savelink { display: none; }
body.presenting .wheelbox { width: min(92vmin, 900px); }
body.presenting .reveal b { font-size: clamp(40px, 7vw, 110px); }
body.presenting .share { justify-content: center; }


.below { display: grid; gap: 18px; margin: 26px 0 40px; }
.below { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .below { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; } }
.guide { min-width: 0; overflow-wrap: anywhere; }
.guide { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 6px 28px 26px; }
.guide p { max-width: 68ch; line-height: 1.72; }
.guide h2 { display: flex; align-items: center; gap: 10px; }
.guide h2::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: conic-gradient(var(--c1) 0 25%, var(--c2) 0 50%, var(--c3) 0 75%, var(--c4) 0); flex: none; }
.guide .howto { list-style: none; counter-reset: s; display: grid; gap: 10px; padding: 0; margin: 18px 0 0; }
@media (min-width: 700px) { .guide .howto { grid-template-columns: repeat(3, 1fr); } }
.guide .howto li { counter-increment: s; background: var(--soft); border-radius: 16px; padding: 14px 14px 14px 52px; position: relative; font-size: 15px; }
.guide .howto li::before { content: counter(s); position: absolute; left: 14px; top: 14px; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font: 900 14px/28px var(--round); text-align: center; }
.guide .howto b { display: block; font-family: var(--round); }
.guide .does { max-width: 68ch; line-height: 1.6; padding-left: 22px; margin: 14px 0 0; }
.guide .does li { margin: 6px 0; }
.faq details { border: 1px solid var(--line); border-radius: 14px; padding: 2px 16px; margin: 8px 0; background: var(--bg); }
.faq summary { cursor: pointer; font: 800 16px var(--round); padding: 12px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--brand); } .faq details[open] summary::after { content: "–"; }
.faq summary::-webkit-details-marker { display: none; }
.side { display: grid; gap: 14px; position: sticky; top: 80px; }
.sidebox { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.sidebox h3 { margin: 4px 0 8px; font-size: 16px; }
.sidebox ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.sidebox a { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 600; }
.sidebox a:hover { background: var(--soft); }
.sidebox .ic { color: var(--brand); }
.facts { display: grid; gap: 8px; } .facts div { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; } .facts .ic { color: var(--ok); margin-top: 2px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; } .tbl th, .tbl td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); } .tbl th { font-family: var(--round); background: var(--soft); }
.tbl caption { caption-side: bottom; text-align: left; font-size: 13px; color: var(--muted); padding-top: 6px; }
.scroll { overflow-x: auto; }


.ideas { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.ideas a { display: grid; grid-template-columns: 56px 1fr; gap: 2px 12px; align-items: center; text-decoration: none; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 12px; transition: transform .15s, box-shadow .15s, border-color .15s; }
.ideas a:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.ideas a svg.mini { grid-row: span 2; width: 56px; height: 56px; }
.ideas a b { font: 800 16px var(--round); } .ideas a span { font-size: 13px; color: var(--muted); }
.grouph { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; } .grouph a { font-weight: 700; font-size: 14px; }


footer { border-top: 1px solid var(--line); background: var(--bg2); padding: 30px 0 24px; margin-top: 30px; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 18px; }
.fgrid h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 0 0 8px; }
.fgrid a { display: block; color: var(--ink); text-decoration: none; padding: 4px 0; font-size: 15px; } .fgrid a:hover { color: var(--brand); }
.fbase { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; color: var(--muted); font-size: 14px; }


.search { position: fixed; inset: 0; z-index: 80; background: rgba(18,15,31,.5); display: none; align-items: flex-start; justify-content: center; padding: 70px 16px; }
.search.open { display: flex; }
.search-box { width: min(640px, 100%); background: var(--card); border-radius: 20px; box-shadow: var(--shadow); padding: 12px; }
.search-box input { font-size: 18px; }
.search-res { max-height: 60vh; overflow: auto; margin-top: 8px; display: grid; gap: 4px; }
.search-res a { display: block; padding: 10px 12px; border-radius: 12px; text-decoration: none; color: var(--ink); } .search-res a:hover, .search-res a.on { background: var(--soft); }
.search-res small { color: var(--muted); display: block; font-size: 13px; }
.ad { margin: 18px auto; text-align: center; } .ad-l { display: block; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; } .ad ins { display: block; min-height: 280px; }
@media (min-width: 760px) { .ad-wide ins { min-height: 100px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print { header.top, .mnav, .stagecard, footer, .side, .ad { display: none; } .guide { border: 0; } }


.roster .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip { border: 1.5px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 6px 12px; font: 700 14px var(--round); cursor: pointer; min-height: 36px; }
.chip.off { opacity: .45; text-decoration: line-through; }
.links li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0; }
.cdstage .big { font: 900 clamp(32px, 6vw, 64px) var(--round); margin: 6px 0; color: var(--brand); }
.round { grid-column: 1 / -1; } .round > h3 { margin: 6px 0; } .gr { display: grid; gap: 10px; }
.orderlist { margin: 0; padding-left: 28px; font: 800 18px var(--round); display: grid; gap: 6px; }
.orderlist li::marker { color: var(--brand); }
.cm .team small { color: var(--muted); font-weight: 500; }
.ft { display: grid; gap: 14px; }
.bars { display: grid; gap: 6px; }
.bar { display: grid; grid-template-columns: 28px 1fr 150px; gap: 10px; align-items: center; font: 700 14px var(--round); }
.bar i { display: block; height: 22px; border-radius: 8px; background: linear-gradient(90deg, var(--c4), var(--c5)); width: calc(var(--v, 0) * 100%); min-width: 4px; transition: width .4s; }
.bar b { font: 700 13px var(--mono); color: var(--muted); }
.verdict { font-size: 16px; }
.mode-yesno .qrow input { font-size: 18px; }


[hidden] { display: none !important; }
.spin { background: #1b1530; color: #ffffff; }


.proofbar, .cardbar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.reveal { gap: 4px; } .reveal b { margin: 2px 0 6px; line-height: 1.05; } .reveal span { display: block; max-width: 36em; }
.b.demo { border-style: dashed; }

body.embed { background: var(--bg); } body.embed main { padding: 12px; } body.embed.transparent { background: transparent; }
body.embed .stage { min-height: 0; } body.embed.minui .panel, body.embed.minui .proof, body.embed.minui .spinhelp { display: none; }
body.embed.minui #app { grid-template-columns: 1fr !important; min-height: 0; }
.embedbox { display: grid; gap: 8px; margin-top: 10px; } .embedcode { font: 12px/1.45 ui-monospace, Consolas, monospace; word-break: break-all; }
body.presenting .embedbox, body.presenting .share .embedb { display: none; }
body.embed .wheelbox { width: min(96vmin, 900px, max(200px, calc(100vh - 190px))); } .embed-credit { position: fixed; right: 8px; bottom: 6px; font: 700 12px var(--round); color: var(--muted); text-decoration: none; opacity: .8; }

.tg.one { grid-template-columns: 1fr !important; max-width: 760px; }
.tg.one .tgout { grid-template-columns: 1fr; }


#app[data-mode=teams], #app[data-mode=groups], #app[data-mode=comments], #app[data-mode=santa], #app[data-mode=order] { min-height: 620px; }
#app[data-mode=coin], #app[data-mode=dice] { min-height: 460px; } #app[data-mode=fairtest], #app[data-mode=verify] { min-height: 320px; }
@media (max-width: 899px) { #app { min-height: 900px; } #app[data-mode=coin], #app[data-mode=dice] { min-height: 480px; } #app[data-mode=fairtest], #app[data-mode=verify] { min-height: 360px; } }



@media (min-width: 900px) { #app.mode-decision, #app.mode-prize, #app.mode-student, #app.mode-raffle { grid-template-columns: minmax(0, 1.25fr) minmax(320px, .9fr); align-items: start; } }

body.presenting .wheelbox { width: min(calc(100vh - 300px), 92vw, 900px); }
body.presenting .reveal { min-height: 0; }
body.presenting .stagecard { align-content: start; padding-top: 24px; }
body.presenting .share { position: fixed; right: 16px; bottom: 16px; z-index: 30; background: var(--card); padding: 8px; border-radius: 16px; box-shadow: var(--shadow); }

.status.err { color: var(--err); }
.b:disabled { opacity: .5; cursor: not-allowed; }

#app, .vf, .tg { align-content: start; }

.search-box input[type=search] { width: 100%; box-sizing: border-box; height: 52px; padding: 0 16px; border: 2px solid var(--line); border-radius: 14px; background: var(--bg); color: var(--ink); font: 600 18px var(--sans); outline: none; }
.search-box input[type=search]:focus { border-color: var(--brand); }

.hbtn { height: 44px; min-width: 44px; }
@media (max-width: 899px) { .mnav a { min-height: 44px; } .mnav { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 24px), transparent); } }
.themebtn .sun { display: none; }
:root[data-theme=dark] .themebtn .sun { display: inline; } :root[data-theme=dark] .themebtn .moon { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .themebtn .sun { display: inline; } :root:not([data-theme=light]) .themebtn .moon { display: none; } }

.vf > .b, .vf .row .b { justify-self: start; }
#app.mode-verify, #app[data-mode=verify] { min-height: 0; }


.tok.dice { color: #1b1530; }
.pin { border-right-color: #1b1530; filter: drop-shadow(0 0 1.5px #fff) drop-shadow(0 3px 4px rgba(0,0,0,.25)); }
.spin:disabled { opacity: .45; cursor: not-allowed; }
.guide table, .guide th, .guide td { overflow-wrap: normal; word-break: normal; hyphens: manual; }
.guide .tablewrap, .guide table { max-width: 100%; }
@media (max-width: 600px) { .guide table { display: block; overflow-x: auto; } }
.chk > span { flex: 1; min-width: 0; } .chk code { white-space: nowrap; }
body.presenting .tg { max-width: none; } body.presenting .tgout { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; width: 100%; }
body.presenting .team h3 { font-size: 30px; } body.presenting .team li { font-size: clamp(22px, 2.6vw, 40px); }
body.presenting #app[data-mode=teams] { min-height: 0; padding: 24px; }
@media (hover: none) { #spinhelp kbd, .spinhelp kbd, .spinhelp .kbdhint { display: none; } }

.view-wheel .reveal { min-height: 104px; background: none; }
.view-wheel .reveal b { font-size: clamp(26px, 4.6vw, 52px); }

.bgo { display: grid; gap: 14px; justify-items: center; text-align: center; }
.bgo-now { display: grid; gap: 4px; justify-items: center; min-height: 190px; align-content: center; width: 100%; border-radius: 24px; background: radial-gradient(circle at 50% 40%, var(--soft), transparent 70%); }
.bgo-now small { font: 800 12px var(--round); letter-spacing: .14em; text-transform: uppercase; color: var(--brand); }
.bgo-now b { font: 900 clamp(48px, 9vw, 112px) var(--round); line-height: 1; }
.bgo-now span { font-size: 14px; color: var(--muted); }
.bgo-now.pop b { animation: pop .45s cubic-bezier(.2,1.6,.4,1); }
.bgo-board { display: grid; gap: 4px; width: 100%; max-width: 760px; }
.bgo-row { display: grid; grid-template-columns: 28px repeat(15, minmax(0, 1fr)); gap: 3px; align-items: center; }
.bgo-row.n90 { grid-template-columns: repeat(10, minmax(0, 1fr)); }
.bgo-row b { font: 900 16px var(--round); color: var(--brand); }
.bgo-row span { font: 700 12px var(--sans); padding: 5px 0; border-radius: 6px; background: var(--soft); color: var(--muted); min-width: 0; }
.bgo-row span.on { background: var(--brand); color: #fff; }
.bgo .row label.chk, .drc .row label.chk { display: flex; align-items: center; gap: 8px; font: 600 15px var(--sans); color: var(--ink); }
.bgo-calls li { list-style-position: inside; }
.bgo-calls { display: flex; flex-wrap: wrap; gap: 4px 10px; justify-content: center; margin: 0; padding: 0 0 0 18px; max-width: 760px; font-size: 14px; }
body.presenting .bgo-now b { font-size: clamp(80px, 18vw, 240px); }

.drc { display: grid; gap: 12px; }
.drc-track { width: 100%; height: 240px; display: block; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.drc-res ol { columns: 2; margin: 0; } .drc-res p { margin: 6px 0; }
body.presenting .drc .ttl { display: none; }
