:root {
  --left: #3a75b5; --right: #168aa5; --fg: #ffffff; --soft: rgba(255, 255, 255, .86);
  --card: rgba(255, 255, 255, .14); --card-line: rgba(255, 255, 255, .3); --track: rgba(255, 255, 255, .25);
  --hit: #ffb4a3; --good: #bff5d2; --accent: #ffd27a; --btn-bg: #ffffff; --btn-fg: #24558a;
  --body: "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --left: #1d3a63; --right: #0b5266; --card: rgba(255, 255, 255, .1); --card-line: rgba(255, 255, 255, .22); --btn-fg: #1d3a63; color-scheme: dark;
  }
}
:root[data-theme="dark"] { --left: #1d3a63; --right: #0b5266; --card: rgba(255, 255, 255, .1); --card-line: rgba(255, 255, 255, .22); --btn-fg: #1d3a63; color-scheme: dark; }
* { box-sizing: border-box; }
body {
  background: var(--left); background: linear-gradient(90deg, var(--left) 38%, var(--right) 100%); background-attachment: fixed;
  color: var(--fg); font-family: var(--body); font-size: 16px; font-weight: 400; line-height: 1.45;
  padding-block: 18px 48px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.wrap { max-width: 1040px; margin: 0 auto; display: grid; gap: 22px; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid #fff; outline-offset: 3px; border-radius: 8px; }
.num { font-variant-numeric: tabular-nums; }
.top { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: space-between; }
.brand { font-size: 18px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.controls { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.modes { display: flex; border: 2px solid #fff; border-radius: 999px; overflow: hidden; }
.modes button { background: transparent; border: 0; padding: 8px 16px; cursor: pointer; font-weight: 700; font-size: 14px; min-height: 40px; }
.modes button[aria-checked="true"] { background: #fff; color: var(--btn-fg); }
.chk { display: inline-flex; gap: 8px; align-items: center; min-height: 40px; font-size: 14px; font-weight: 600; cursor: pointer; }
.chk input { width: 18px; height: 18px; accent-color: #fff; }
.modeinfo { color: var(--soft); font-size: 15px; font-weight: 600; max-width: 72ch; }
.round { text-align: center; font-weight: 800; font-size: clamp(36px, 7vw, 64px); line-height: 1.05; text-transform: uppercase; letter-spacing: .01em; }
.outcome { text-align: center; font-size: clamp(18px, 2.6vw, 24px); font-weight: 600; min-height: 1.6em; }
.outcome .neg { color: var(--hit); } .outcome .pos { color: var(--good); }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.col { display: grid; justify-items: center; align-content: start; gap: 14px; text-align: center; min-width: 0; }
.col h2 { font-size: clamp(18px, 2.4vw, 26px); font-weight: 700; text-transform: uppercase; letter-spacing: .01em; line-height: 1.1; }
.stars { display: flex; gap: 10px; position: relative; }
.star { width: 36px; height: 36px; fill: #fff; stroke: #fff; stroke-width: 1.6; stroke-linejoin: round; transition: fill .25s; }
.star.lost { fill: transparent; }
.star.pop { animation: starlose calc(750ms * var(--spd, 1)) ease-out; }
@keyframes starlose { 0% { transform: scale(1.7); fill: #ff8a73; stroke: #ff8a73; } 25% { transform: scale(1.7) rotate(-14deg); } 45% { transform: scale(1.5) rotate(12deg); } 70% { transform: scale(1.2) rotate(-6deg); fill: #ff8a73; stroke: #ff8a73; } 100% { transform: scale(1); } }
@keyframes pop { 0% { transform: scale(1.7) rotate(-14deg); } 100% { transform: scale(1); } }
.float { position: absolute; left: 50%; top: -6px; font-weight: 800; font-size: 26px; color: var(--hit); animation: rise calc(1000ms * var(--spd, 1)) ease-out forwards; pointer-events: none; }
@keyframes rise { 0% { transform: translate(-50%, 6px); opacity: 0; } 20% { opacity: 1; } 100% { transform: translate(-50%, -34px); opacity: 0; } }
.meters { display: flex; flex-wrap: wrap; gap: 6px 22px; justify-content: center; align-items: center; }
.meter { display: flex; gap: 4px; align-items: center; }
.meter .lab { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin-right: 6px; opacity: .95; }
.mi { width: 20px; height: 20px; fill: #fff; transition: opacity .2s; }
.mi.off { opacity: .28; }
.mi.pop { animation: pop calc(450ms * var(--spd, 1)) ease-out; }
.stage { min-height: 214px; width: 100%; display: grid; align-content: start; justify-items: center; }
.picks { width: 100%; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pick { background: transparent; border: 0; cursor: pointer; display: grid; justify-items: center; align-content: start; gap: 2px; padding: 4px 2px; min-width: 0; }
.pick .ic { width: min(112px, 100%); aspect-ratio: 1; transition: transform .15s; }
.pick:hover:not(:disabled) .ic { transform: translateY(-7px) scale(1.07); }
.pick:active:not(:disabled) .ic { transform: scale(.97); }
.pick .lb { font-weight: 700; font-size: 15px; text-transform: uppercase; letter-spacing: .05em; display: flex; gap: 6px; align-items: baseline; }
.pick kbd { font: 600 11px var(--body); border: 1.5px solid rgba(255, 255, 255, .7); border-radius: 5px; padding: 0 5px; opacity: .9; }
.pick .ds { font-size: 12.5px; font-weight: 600; color: var(--soft); min-height: 1.3em; line-height: 1.3; }
.pick .pct { font-size: 13px; font-weight: 800; color: var(--accent); min-height: 1.2em; }
.pick:disabled { cursor: not-allowed; }
.pick:disabled .ic { opacity: .32; filter: grayscale(.7); }
.pick:disabled .lb { opacity: .6; }
.big { display: grid; justify-items: center; gap: 6px; position: relative; padding: 6px; }
.big .ic { width: 150px; height: 150px; animation: popin calc(500ms * var(--spd, 1)) cubic-bezier(.3, 1.5, .5, 1) both; }
.big .lb { font-weight: 700; font-size: 16px; text-transform: uppercase; letter-spacing: .06em; }
.big.hit .ic { animation: hitshake calc(550ms * var(--spd, 1)) both; filter: drop-shadow(0 0 14px var(--hit)); }
.big.blk::before { content: ""; position: absolute; top: 0; left: 50%; width: 164px; height: 164px; margin-left: -82px; border-radius: 50%; border: 6px solid #9ef0ff; animation: ring calc(700ms * var(--spd, 1)) ease-out both; }
@keyframes popin { 0% { transform: scale(.3) rotate(-12deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes hitshake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-14px) rotate(-5deg); } 40% { transform: translateX(12px) rotate(4deg); } 60% { transform: translateX(-8px); } 80% { transform: translateX(5px); } }
@keyframes ring { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(1.25); opacity: 0; } }
.wait { display: grid; justify-items: center; align-content: center; min-height: 150px; }
.wait svg { width: 96px; height: 96px; stroke: #fff; fill: none; stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; animation: popin .4s cubic-bezier(.3, 1.5, .5, 1) both; }
.status { font-size: clamp(18px, 2.2vw, 22px); font-weight: 400; }
.belief { font-size: 14px; font-weight: 700; color: var(--accent); min-height: 1.4em; }
.again { background: var(--btn-bg); color: var(--btn-fg); border: 0; border-radius: 999px; padding: 12px 30px; font-weight: 800; font-size: 18px; cursor: pointer; min-height: 48px; justify-self: center; box-shadow: 0 4px 0 rgba(0, 0, 0, .25); }
.again:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0, 0, 0, .25); }
.info { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.card { background: var(--card); border: 1px solid var(--card-line); border-radius: 14px; padding: 14px; display: grid; gap: 10px; min-width: 0; }
.card h3 { font-size: 15px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.tog { display: flex; gap: 10px; align-items: center; font-size: 14px; font-weight: 600; min-height: 32px; }
.tog input { width: 18px; height: 18px; accent-color: #fff; }
.hb { display: grid; gap: 6px; }
.hb .r { display: grid; grid-template-columns: 92px 1fr 38px; gap: 8px; align-items: center; font-size: 13px; font-weight: 600; }
.hb .track { height: 10px; background: var(--track); border-radius: 5px; overflow: hidden; }
.hb .fill { height: 100%; background: #fff; border-radius: 5px; transition: width .3s; }
.hb .pc { font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }
.tally { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.tally div { background: var(--card); border-radius: 10px; padding: 8px 4px; }
.tally b { display: block; font-size: 30px; line-height: 1.1; font-weight: 800; }
.tally span { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--soft); }
.log { list-style: none; margin: 0; padding: 0; max-height: 240px; overflow-y: auto; font-size: 13px; font-weight: 600; }
.log li { display: grid; grid-template-columns: 28px 1fr; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--card-line); }
.log li:last-child { border-bottom: 0; }
.log .n { color: var(--soft); font-variant-numeric: tabular-nums; }
.muted { color: var(--soft); font-size: 13px; font-weight: 600; }
details.rules { background: var(--card); border: 1px solid var(--card-line); border-radius: 14px; padding: 12px 16px; }
details.rules summary { cursor: pointer; font-weight: 700; min-height: 28px; }
details.rules ul { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 4px; max-width: 70ch; font-weight: 600; }
.cols { position: relative; }
.cols.shake { animation: cshake calc(320ms * var(--spd, 1)) linear; }
@keyframes cshake { 0%, 100% { transform: translate(0); } 20% { transform: translate(-6px, 2px); } 40% { transform: translate(5px, -3px); } 60% { transform: translate(-4px, 2px); } 80% { transform: translate(3px, -1px); } }
#fx { position: absolute; inset: 0; pointer-events: none; z-index: 6; overflow: visible; }
#fx .proj { position: absolute; left: 0; top: 0; width: 30px; height: 56px; margin: -28px 0 0 -15px; will-change: transform; opacity: 0; }
#fx .proj svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 0 6px rgba(255, 255, 255, .95)); }
#fx .spark { position: absolute; left: 0; top: 0; width: 6px; height: 20px; margin: -10px 0 0 -3px; border-radius: 3px; opacity: 0; }
#fx .shock { position: absolute; left: 0; top: 0; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; border: 6px solid #fff; opacity: 0; }
#fx .delta { position: absolute; font-weight: 800; font-size: 26px; text-shadow: 0 2px 0 rgba(0, 0, 0, .4); white-space: nowrap; opacity: 0; }
#fx .tag { position: absolute; font-weight: 800; font-size: 17px; letter-spacing: .08em; text-transform: uppercase; background: #fff; color: #24558a; padding: 2px 12px; border-radius: 999px; white-space: nowrap; box-shadow: 0 3px 0 rgba(0, 0, 0, .25); opacity: 0; }
.outcome .story { font-weight: 700; }
@media (max-width: 760px) {
  body { background: linear-gradient(180deg, var(--right) 0%, var(--left) 55%); background-attachment: fixed; }
  .cols { grid-template-columns: 1fr; gap: 22px; }
  .col.opp { order: -1; }
  .col.opp .stage { min-height: 150px; }
  .big .ic { width: 112px; height: 112px; }
  .big.blk::before { width: 126px; height: 126px; margin-left: -63px; }
  .wait { min-height: 112px; } .wait svg { width: 72px; height: 72px; }
  .stage { min-height: 170px; }
  .pick .lb { font-size: 13px; } .pick kbd { display: none; } .pick .ds { font-size: 11.5px; }
  .star { width: 32px; height: 32px; }
  .info { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01s !important; transition-duration: .01s !important; } }
[hidden]{display:none!important}body{margin:0}
