:root {
  --bg: #fbf8f3;
  --panel: #ffffff;
  --line: #ece6dc;
  --text: #141318;
  --muted: #6a6773;
  --accent: #6d3df2;
  --accent-2: #ff5a5f;
  --accent-soft: #efe9ff;
  --ok: #1a9a5a;
  --field: #ffffff;
  --soft: #faf8f4;
  --body: #3b3747;
  --faint: #b6b0c2;
  --err: #c02626;
  --wheel-empty: #eee9f8;
  --radius: 16px;
  color-scheme: light;
}
/* Dark theme: chosen in the menu, or "Auto" when the device is in dark mode */
html[data-theme="dark"] {
  --bg: #15121f; --panel: #1e1a2b; --line: #322c44; --text: #f2effa; --muted: #a39cb8;
  --accent: #8b66ff; --accent-soft: #2c2445; --field: #191526; --soft: #241f35; --body: #d6d1e3;
  --faint: #5d5672; --err: #ff7a7a; --wheel-empty: #2c2640; color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] {
    --bg: #15121f; --panel: #1e1a2b; --line: #322c44; --text: #f2effa; --muted: #a39cb8;
    --accent: #8b66ff; --accent-soft: #2c2445; --field: #191526; --soft: #241f35; --body: #d6d1e3;
    --faint: #5d5672; --err: #ff7a7a; --wheel-empty: #2c2640; color-scheme: dark;
  }
}
body { transition: background-color .2s, color .2s; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16.5px/1.6 "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; font-feature-settings: "ss01", "cv11"; }
h1, h2, h3, h4 { font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; }
p { text-wrap: pretty; }
a { color: var(--accent); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

header.site { background: var(--panel); border-bottom: 1px solid var(--line); position: relative; z-index: 2; }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.logo { font-weight: 650; font-size: 21px; color: var(--text); text-decoration: none; letter-spacing: -0.035em; white-space: nowrap; }
.logo b { color: inherit; }
.logo { display: inline-flex; align-items: center; gap: 8px; }
.logo img { display: block; flex: none; transition: transform .25s; }
.logo:hover img { transform: rotate(-12deg) scale(1.06); }
header.site nav { display: flex; gap: 16px; overflow-x: auto; }
header.site nav a { color: var(--text); text-decoration: none; font-size: 14.5px; font-weight: 500; white-space: nowrap; opacity: .78; }
header.site nav a:hover { opacity: 1; }

.hero { padding: clamp(28px, 5vw, 56px) 0 clamp(8px, 2vw, 18px); text-align: left; }
.hero h1 { font-size: clamp(40px, 7vw, 76px); line-height: 1; margin: 0 0 clamp(14px, 2vw, 22px); letter-spacing: -0.045em; font-weight: 600; max-width: 15ch; }
.hero p { color: var(--body); margin: 0; max-width: 620px; font-size: clamp(16.5px, 1.6vw, 19px); line-height: 1.5; letter-spacing: -0.005em; }

.ad-slot { margin: 18px 0; min-height: 90px; }
.ad-slot:empty { display: none; }   /* placeholder only; Auto ads place ads themselves */

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.tool { margin: 16px 0 28px; }
.two { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.center { text-align: center; }

label.lbl, .lbl { display: block; font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row + .row { margin-top: 10px; }
textarea, input[type=text], input[type=number], select {
  font: inherit; font-size: 16px; color: var(--text); background: var(--field); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; outline: none; }
textarea { width: 100%; min-height: 220px; resize: vertical; }
input[type=number] { width: 110px; }
textarea:focus, input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.hint { color: var(--muted); font-size: 13.5px; margin: 6px 0 0; }
.opts { display: flex; flex-wrap: wrap; gap: 14px; font-size: 14.5px; margin: 10px 0; }
.opts label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }

.btn { font: inherit; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; border: 1px solid var(--line); background: var(--field); color: var(--text);
  padding: 9px 16px; border-radius: 999px; cursor: pointer; transition: transform .08s; }
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); color: #fff; }
.btn.big { font-size: 20px; padding: 14px 34px; box-shadow: 0 6px 0 #4b23c2; }
.btn.big:active { transform: translateY(3px); box-shadow: 0 3px 0 #4b23c2; }
.btn:disabled { opacity: .5; cursor: default; }

/* wheel */
.wheel-box { position: relative; width: 100%; max-width: 560px; margin: 0 auto; aspect-ratio: 1; }
.wheel-box canvas { width: 100%; height: 100%; display: block; cursor: pointer; }
.wheel-pointer { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); width: 0; height: 0;
  border-left: 18px solid transparent; border-right: 18px solid transparent; border-top: 34px solid var(--text);
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.25)); z-index: 1; }
.wheel-hub { position: absolute; top: 50%; left: 50%; width: 16%; aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%; background: var(--field); border: 5px solid var(--text); display: grid; place-items: center;
  font-weight: 650; font-size: clamp(12px, 2.4vw, 17px); cursor: pointer; user-select: none; }
.history { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.history li { background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 2px 10px; font-size: 14px; font-weight: 600; }

dialog.result { background: var(--panel); color: var(--text); border: 0; border-radius: 20px; padding: 28px 26px 22px; max-width: 420px; width: calc(100% - 40px); text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
dialog.result::backdrop { background: rgba(20, 12, 40, .45); }
dialog.result .k { color: var(--muted); font-size: 14px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
dialog.result .v { font-size: clamp(28px, 7vw, 44px); font-weight: 600; letter-spacing: -0.04em; margin: 6px 0 18px; word-break: break-word; line-height: 1.15; }
dialog.result .row { justify-content: center; }

/* big result display */
.big-result { font-size: clamp(40px, 10vw, 84px); font-weight: 600; letter-spacing: -0.045em; line-height: 1.05; margin: 12px 0; min-height: 1.1em; word-break: break-word; }
.big-result.small { font-size: clamp(26px, 6vw, 44px); }
.stats { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.stat { background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 8px 16px; min-width: 96px; }
.stat .v { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat .k { color: var(--muted); font-size: 12.5px; }

/* coin */
.coin-stage { perspective: 900px; height: 230px; display: grid; place-items: center; }
.coin { width: 190px; height: 190px; position: relative; transform-style: preserve-3d; transition: transform 1.6s cubic-bezier(.2,.75,.25,1); cursor: pointer; }
.coin .face { position: absolute; inset: 0; border-radius: 50%; backface-visibility: hidden; display: grid; place-items: center;
  font-weight: 650; font-size: 30px; color: #6b4b00; letter-spacing: .04em;
  background: radial-gradient(circle at 35% 30%, #fff4c2, #f3c94a 45%, #c99413 100%); border: 8px solid #d8a724; box-shadow: inset 0 0 0 4px #f7dc7a; }
.coin .tails { transform: rotateY(180deg); background: radial-gradient(circle at 35% 30%, #f4f4f4, #c9c9cf 45%, #8d8d96 100%); border-color: #a3a3ab; box-shadow: inset 0 0 0 4px #e1e1e6; color: #45454d; }
.coin-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 10px; }
.mini { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 13px; }
.mini.h { background: #f3c94a; color: #6b4b00; }
.mini.t { background: #c9c9cf; color: #45454d; }

/* dice */
.dice { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin: 18px 0; min-height: 90px; }
.die { width: 84px; height: 84px; border-radius: 16px; background: #fffdf8; color: #1f1b2e; border: 2px solid #1f1b2e; box-shadow: 0 5px 0 #1f1b2e;
  display: grid; place-items: center; font-weight: 650; font-size: 32px; position: relative; }
.die.roll { animation: shake .5s; }
.die .sides { position: absolute; bottom: 3px; right: 7px; font-size: 11px; color: var(--muted); font-weight: 700; }
.pips { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); width: 64%; height: 64%; }
.pips i { width: 13px; height: 13px; background: #1f1b2e; border-radius: 50%; place-self: center; visibility: hidden; }
.pips i.on { visibility: visible; }
@keyframes shake { 0% { transform: rotate(0) } 20% { transform: rotate(-18deg) translateY(-8px) } 40% { transform: rotate(14deg) } 60% { transform: rotate(-10deg) translateY(-4px) } 80% { transform: rotate(6deg) } 100% { transform: rotate(0) } }
@keyframes pop { 0% { transform: scale(.6); opacity: 0 } 100% { transform: scale(1); opacity: 1 } }
.pop { animation: pop .35s cubic-bezier(.2,1.6,.4,1); }

/* teams */
.teams { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 14px; }
.team { border-radius: 14px; padding: 12px 14px; border: 2px solid; background: var(--field); }
.team h3 { margin: 0 0 6px; font-size: 17px; }
.team ol { margin: 0; padding-left: 20px; }

/* chips list of numbers */
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 14px 0; }
.chips span { background: var(--accent-soft); color: var(--accent); font-weight: 600; border-radius: 12px; padding: 6px 12px; font-size: 20px; font-variant-numeric: tabular-nums; }

/* bracket */
.bracket { display: flex; gap: 22px; overflow-x: auto; padding: 8px 2px 14px; margin-top: 14px; }
.round { display: flex; flex-direction: column; justify-content: space-around; gap: 14px; min-width: 170px; }
.round h4 { margin: 0 0 4px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; text-align: center; }
.match { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--field); }
.slot { padding: 7px 10px; font-size: 14.5px; cursor: pointer; border-bottom: 1px solid var(--line); min-height: 36px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot:last-child { border-bottom: 0; }
.slot:hover:not(.empty):not(.bye) { background: var(--accent-soft); }
.slot.win { background: var(--accent); color: #fff; font-weight: 700; }
.slot.lose { color: var(--muted); text-decoration: line-through; }
.slot.empty, .slot.bye { color: var(--faint); cursor: default; font-style: italic; }
.champ { text-align: center; font-size: 22px; font-weight: 650; margin-top: 10px; }

/* santa */
.pairs { margin-top: 14px; display: grid; gap: 8px; }
.pair { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--field); }
.pair code { font-size: 12.5px; color: var(--muted); word-break: break-all; }
.reveal-card { max-width: 460px; margin: 0 auto; text-align: center; padding: 30px 22px; }
.gift { width: 104px; height: 104px; margin: 6px auto; color: var(--accent); cursor: pointer; user-select: none; display: block; transition: transform .2s; }
.gift:hover { transform: rotate(-6deg) scale(1.05); }
.err { color: var(--err); font-weight: 600; font-size: 14.5px; margin-top: 8px; }

.content { max-width: 760px; margin: 0 auto; }
.content h2 { font-size: clamp(26px, 3.2vw, 34px); line-height: 1.12; margin: 56px 0 12px; letter-spacing: -0.035em; }
.content h3 { font-size: 19px; margin: 26px 0 6px; letter-spacing: -0.015em; }
.content p, .content li { color: var(--body); font-size: 17px; line-height: 1.65; }
details { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin-bottom: 8px; }
summary { cursor: pointer; font-weight: 600; letter-spacing: -0.01em; }
details p { margin: 8px 0 0; }

.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin: 12px 0; }
.tool-grid a { display: flex; gap: 10px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; text-decoration: none; color: var(--text); }
.tool-grid a:hover { border-color: var(--accent); transform: translateY(-1px); }
.tool-grid .ico { width: 32px; height: 32px; flex: none; color: var(--accent); vertical-align: middle; }
.tool-grid b { display: block; font-size: 15.5px; font-weight: 600; line-height: 1.25; letter-spacing: -0.015em; }
.tool-grid span.s { color: var(--muted); font-size: 13px; line-height: 1.3; display: block; }

footer.site { border-top: 1px solid var(--line); margin-top: 48px; padding: 24px 0 40px; color: var(--muted); font-size: 14px; background: var(--panel); }
footer.site .cols { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
footer.site a { color: var(--muted); }
footer.site ul { list-style: none; padding: 0; margin: 6px 0 0; columns: 2; }
footer.site li { margin-bottom: 4px; }
.page { padding: 28px 0; }
.page h1 { font-size: clamp(38px, 6vw, 64px); line-height: 1.02; letter-spacing: -0.045em; margin: 12px 0 18px; }

#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 50; }

@media (max-width: 860px) {
  .two { grid-template-columns: minmax(0, 1fr); }
  footer.site .cols { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  header.site nav a.hide-sm { display: none; }
  .die { width: 66px; height: 66px; font-size: 26px; }
  .pips i { width: 10px; height: 10px; }
  footer.site ul { columns: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .coin { transition-duration: .3s; }
  .die.roll, .pop { animation: none; }
}
table.data { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.data th, table.data td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
table.data th { color: var(--muted); font-size: 13px; }

/* ---------- header menu (3-line "hamburger") ---------- */
.hdr-right { display: flex; align-items: center; gap: 14px; min-width: 0; }
.menu-btn { width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--field); color: var(--text);
  display: grid; place-content: center; gap: 4.5px; cursor: pointer; flex: none; }
.menu-btn:hover { border-color: var(--accent); }
.menu-btn span { display: block; width: 20px; height: 2.5px; border-radius: 2px; background: currentColor; transition: transform .2s, opacity .2s; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.menu { position: absolute; right: 20px; top: 62px; width: min(340px, calc(100vw - 24px)); max-height: calc(100vh - 80px); overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 12px 32px rgba(10, 6, 25, .16), 0 2px 6px rgba(10, 6, 25, .06); padding: 16px; z-index: 40; }
.menu[hidden] { display: none; }
.menu h4 { margin: 0 0 10px; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.menu section + section { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--soft); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { font: inherit; font-size: 13.5px; font-weight: 600; border: 0; background: transparent; color: var(--muted); padding: 7px 6px; border-radius: 7px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: background .15s, color .15s; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--field); color: var(--text); box-shadow: 0 1px 2px rgba(15, 10, 30, .12), 0 0 0 1px var(--line); }
.seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.seg svg { flex: none; }
.switch-row { display: flex; justify-content: space-between; align-items: center; font-weight: 500; font-size: 14.5px; cursor: pointer; }
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: var(--line); transition: background .2s; pointer-events: none; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
.menu-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; }
.menu-tools a { display: block; padding: 6px 8px; border-radius: 7px; color: var(--body); text-decoration: none; font-size: 14px; line-height: 1.3; }
.menu-tools a:hover { background: var(--soft); color: var(--text); }
.menu-tools a[aria-current="page"] { color: var(--accent); font-weight: 600; }

/* ---------- rotating headline text ---------- */
.rotator { font-size: clamp(19px, 2.4vw, 26px); font-weight: 500; margin: 0 0 12px; color: var(--muted) !important; min-height: 1.4em; letter-spacing: -0.02em; line-height: 1.3; }
.rotator .rot { color: var(--text); }
.rot { color: var(--accent); }
.rot::after { content: ""; display: inline-block; width: 3px; height: 1.05em; margin-left: 3px; vertical-align: -0.15em; background: var(--accent); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.rot.fade { transition: opacity .3s; }
@media (prefers-reduced-motion: reduce) { .rot::after { display: none; } }
@media (max-width: 640px) { header.site nav { display: none; } }

/* ---------- rock paper scissors ---------- */
.rps-modes { max-width: 380px; margin: 0 auto 18px; }
.arena { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 14px; max-width: 620px; margin: 0 auto; }
.fighter { background: var(--soft); border: 2px solid var(--line); border-radius: 18px; padding: 12px 10px 14px; display: grid; justify-items: center; gap: 2px;
  transition: border-color .2s, box-shadow .2s, transform .2s; }
.fighter .who { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.hand-svg, .icon-svg { --hand-fill: var(--field); display: block; width: 100%; height: 100%; overflow: visible; }
.hand-svg { color: var(--text); }
.ico { display: inline-block; vertical-align: -0.3em; width: 1.35em; height: 1.35em; }
.fighter .hand { width: clamp(88px, 20vw, 136px); aspect-ratio: 1; margin: 4px 0; transition: opacity .2s; }
.fighter.cpu .hand { transform: scaleX(-1); }
.fighter .pick { font-weight: 600; font-size: 16px; min-height: 1.4em; }
.fighter .pts { font-size: 30px; font-weight: 650; line-height: 1; font-variant-numeric: tabular-nums; }
.fighter .pips { display: flex; gap: 6px; min-height: 12px; margin-top: 6px; }
.fighter .pips i { width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.fighter.me .pips i.on { background: var(--ok); }
.fighter.cpu .pips i.on { background: var(--err); }
.fighter.win { border-color: var(--ok); box-shadow: 0 0 0 4px rgba(26, 154, 90, .15); transform: translateY(-3px); }
.fighter.lose .hand { opacity: .35; }
.fighter.win .hand-svg { color: var(--ok); }
.vs { align-self: center; font-weight: 650; font-size: 20px; color: var(--muted); }
.hand.pump { animation: pump .33s ease-in-out infinite; }
@keyframes pump { 0%, 100% { translate: 0 0; } 50% { translate: 0 -16px; } }
.banner { max-width: 560px; margin: 16px auto; padding: 12px 16px; border-radius: 14px; background: var(--soft); border: 1px solid var(--line);
  font-weight: 600; font-size: clamp(18px, 3.4vw, 23px); line-height: 1.3; min-height: 74px; display: grid; align-content: center; }
.banner small { display: block; font-weight: 500; font-size: 14.5px; color: var(--body); margin-top: 2px; }
.banner.count { font-size: clamp(24px, 5vw, 34px); letter-spacing: -0.01em; }
.banner.win { background: rgba(26, 154, 90, .12); border-color: rgba(26, 154, 90, .35); color: var(--ok); }
.banner.lose { background: rgba(209, 44, 44, .09); border-color: rgba(209, 44, 44, .3); color: var(--err); }
.banner.draw { color: var(--text); }
html[data-theme="dark"] .banner.win { color: #4fd18b; }
@media (prefers-color-scheme: dark) { html[data-theme="auto"] .banner.win { color: #4fd18b; } }
.moves { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 520px; margin: 0 auto; }
.move { font: inherit; color: var(--text); background: var(--field); border: 2px solid var(--line); border-radius: 18px; padding: 12px 6px 10px;
  display: grid; justify-items: center; gap: 2px; cursor: pointer; transition: transform .1s, border-color .15s, background .15s; }
.move .ico.e { width: clamp(44px, 10vw, 58px); height: clamp(44px, 10vw, 58px); margin-bottom: 2px; }
.move.picked .hand-svg, .move:hover:not(:disabled) .hand-svg { color: var(--accent); }
.move b { font-size: 16px; }
.move kbd { font: inherit; font-size: 11.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 0 6px; }
.move:hover:not(:disabled) { border-color: var(--accent); transform: translateY(-2px); }
.move:active:not(:disabled) { transform: translateY(1px); }
.move.picked { border-color: var(--accent); background: var(--accent-soft); }
.move:disabled { cursor: default; opacity: .75; }
.rules { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.rule { font-size: 13.5px; padding: 5px 11px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); background: var(--field); transition: all .2s; }
.rule.hit { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); font-weight: 700; transform: scale(1.05); }
.hist { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; min-height: 30px; }
.hist span { font-size: 15px; padding: 3px 9px; border-radius: 9px; border: 1px solid var(--line); background: var(--field); }
.hist span.w { border-color: var(--ok); }
.hist span.l { border-color: var(--err); }
.hist span.none { border: 0; background: none; color: var(--muted); font-size: 14px; }
@media (max-width: 480px) { .arena { gap: 8px; } .vs { font-size: 15px; } .moves { gap: 8px; } }
@media (prefers-reduced-motion: reduce) { .hand.pump { animation: none; } .fighter.win { transform: none; } }
.rule .ico, .hist .ico { margin-right: 3px; }
.rule.hit .hand-svg { color: var(--accent); }
.hist span { display: inline-flex; align-items: center; gap: 2px; }
.hist .ico { border: 0; padding: 0; background: none; border-radius: 0; font-size: 15px; }
.rule .ico { width: 1.6em; height: 1.6em; vertical-align: -0.45em; }
.ico .hand-svg { stroke-width: 3.6; }
.champ .ico { color: var(--accent); width: 1.3em; height: 1.3em; vertical-align: -0.25em; }
.reveal-card h2 .ico { color: var(--ok); }
dialog.result .dlg-ico { display: block; width: 64px; height: 64px; margin: 0 auto 8px; color: var(--accent); }
.content h1 .ico { width: 1em; height: 1em; vertical-align: -0.12em; color: var(--accent); }
.content table .ico { width: 1.5em; height: 1.5em; vertical-align: -0.45em; margin-right: 2px; }
.hero .rotator { margin: 0 0 14px; }
.tool-grid .hand-svg { color: inherit; stroke-width: 5.2; }

/* ---------- roast pop-ups (you lost) ---------- */
dialog.roast { background: var(--panel); color: var(--text); border: 0; border-radius: 24px; padding: 26px 24px 22px; max-width: 440px; width: calc(100% - 36px);
  text-align: center; box-shadow: 0 24px 70px rgba(0,0,0,.35); }
dialog.roast::backdrop { background: rgba(20, 12, 40, .55); backdrop-filter: blur(2px); }
dialog.roast.shake[open] { animation: roast-in .55s cubic-bezier(.2,1.4,.4,1) both, roast-shake .5s .5s ease-in-out; }
.roast-emoji { font-size: clamp(40px, 11vw, 58px); line-height: 1.1; letter-spacing: .02em; animation: roast-bob 1.2s ease-in-out infinite; }
dialog.roast h2 { font-size: clamp(28px, 7vw, 40px); line-height: 1.02; letter-spacing: -0.045em; margin: 12px 0 8px; text-transform: lowercase; }
dialog.roast p { color: var(--body); margin: 0 auto 14px; max-width: 30ch; font-size: 16.5px; line-height: 1.4; }
.roast-score { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--err);
  background: rgba(209, 44, 44, .09); border-radius: 99px; padding: 4px 12px; margin-bottom: 18px; }
dialog.roast .row { justify-content: center; }
.roast-toast { position: fixed; left: 50%; top: 22%; z-index: 60; pointer-events: none; background: var(--text); color: var(--bg);
  font-weight: 600; font-size: clamp(18px, 4.6vw, 24px); letter-spacing: -0.02em; padding: 12px 20px; border-radius: 16px; width: max-content; max-width: calc(100vw - 40px);
  text-align: center; box-shadow: 0 14px 40px rgba(0,0,0,.25); opacity: 0; transform: translate(-50%, 10px) scale(.8); transition: opacity .25s, transform .25s; }
.roast-toast.show { opacity: 1; transform: translate(-50%, 0) scale(1) rotate(-2deg); animation: roast-wiggle .45s .1s ease-in-out; }
.emoji-rain { position: fixed; inset: 0; width: 100vw; height: 100vh; margin: 0; padding: 0; border: 0; background: transparent; pointer-events: none; z-index: 2147483000; overflow: hidden; }
.emoji-rain span { position: absolute; top: -60px; animation: emoji-fall linear forwards; }
@keyframes emoji-fall { to { transform: translateY(calc(100vh + 120px)) rotate(var(--spin)); } }
@keyframes roast-in { from { transform: scale(.5) rotate(-6deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes roast-shake { 0%, 100% { translate: 0; } 20% { translate: -10px; } 40% { translate: 9px; } 60% { translate: -6px; } 80% { translate: 4px; } }
@keyframes roast-bob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-6px) rotate(3deg); } }
@keyframes roast-wiggle { 0%, 100% { rotate: 0deg; } 30% { rotate: 4deg; } 60% { rotate: -4deg; } }
@media (prefers-reduced-motion: reduce) {
  dialog.roast.shake[open], .roast-emoji, .roast-toast.show { animation: none; }
}
.seg.coin-call { max-width: 360px; margin: 0 auto; }
.call-hint { margin: 8px 0 4px; }
.big-result.win { color: var(--ok); }
.big-result.lose { color: var(--err); }
html[data-theme="dark"] .big-result.win { color: #4fd18b; }
@media (prefers-color-scheme: dark) { html[data-theme="auto"] .big-result.win { color: #4fd18b; } }
.seg button:disabled { opacity: .4; cursor: default; }

/* ---------- home page ---------- */
.home-hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr); gap: clamp(24px, 5vw, 64px); align-items: center; padding: clamp(32px, 6vw, 72px) 0 clamp(20px, 4vw, 40px); }
.eyebrow { display: inline-block; margin: 0 0 16px; font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--accent); background: var(--accent-soft); border-radius: 99px; padding: 5px 12px; }
.home-copy h1 { font-size: clamp(40px, 6.4vw, 78px); line-height: .98; letter-spacing: -0.05em; margin: 0 0 18px; max-width: 13ch; }
.home-copy .rotator { margin: 0 0 14px; }
.home-lead { color: var(--body); font-size: clamp(17px, 1.7vw, 20px); line-height: 1.5; max-width: 540px; margin: 0 0 26px; }
.home-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.home-cta .btn { text-decoration: none; }
.btn.ghost { background: transparent; }
.roast-demo { position: relative; min-height: 330px; }
.demo-card { position: absolute; background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 22px 20px; text-align: center; box-shadow: 0 24px 60px rgba(20, 12, 40, .16); width: min(330px, 92%); }
.demo-card b { display: block; font-size: clamp(22px, 2.6vw, 28px); line-height: 1.05; letter-spacing: -0.045em; font-weight: 600; margin-top: 10px; }
.demo-card span { display: block; color: var(--body); font-size: 15px; margin-top: 8px; }
.demo-card em { display: inline-block; font-style: normal; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--err); background: rgba(209, 44, 44, .09); border-radius: 99px; padding: 4px 11px; margin-top: 14px; }
.demo-card .roast-emoji { font-size: 40px; }
.demo-card.back { right: 0; top: 0; transform: rotate(5deg); opacity: .75; }
.demo-card.back b { font-size: 20px; }
.demo-card.front { left: 0; top: 70px; transform: rotate(-3deg); animation: demo-float 5s ease-in-out infinite; }
.demo-toast { position: absolute; right: 4%; bottom: 0; background: var(--text); color: var(--bg); font-weight: 600; font-size: 19px; letter-spacing: -0.02em; padding: 10px 16px; border-radius: 14px; transform: rotate(4deg); box-shadow: 0 14px 34px rgba(0,0,0,.2); }
@keyframes demo-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
.home-play { scroll-margin-top: 16px; }
.home-play .tool { margin-top: 0; }
.feats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 36px 0 20px; }
.feat { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.feat .ico { width: 38px; height: 38px; color: var(--accent); display: block; }
.feat .hand-svg { color: inherit; stroke-width: 5; }
.feat h3 { font-size: 18px; letter-spacing: -0.025em; margin: 12px 0 4px; line-height: 1.2; }
.feat p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.45; }
.promo { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--text); background: var(--accent-soft); border: 1px solid transparent; border-radius: 18px; padding: 16px 20px; margin: 14px 0 8px; transition: border-color .15s, transform .15s; }
.promo:hover { border-color: var(--accent); transform: translateY(-1px); }
.promo .ico { width: 40px; height: 40px; color: var(--accent); flex: none; }
.promo b { display: block; font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.promo .s { display: block; color: var(--body); font-size: 14.5px; }
.promo .arrow { margin-left: auto; font-size: 22px; color: var(--accent); }
.home-h2 { font-size: clamp(26px, 3.2vw, 34px); letter-spacing: -0.035em; margin: 44px 0 12px; }
.home-about { margin: 40px 0 0; max-width: 760px; }
@media (max-width: 860px) {
  .home-hero { grid-template-columns: 1fr; }
  .roast-demo { min-height: 270px; max-width: 420px; }
  .feats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .roast-demo { min-height: 250px; }
  .demo-card.front { top: 56px; }
  .feats { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .demo-card.front { animation: none; } }
@media (max-width: 440px) { header.site nav { display: none; } }
