@font-face{font-family:Rubik;src:url(/fonts/rubik.woff2) format("woff2");font-weight:300 900;font-display:swap}
:root{--felt:#0F4D3F;--deep:#0A3A2F;--lit:#17604F;--ivory:#F4F0E6;--mute:#BFE3D0;--ink:#1E1E1E;--gold:#E8B931;--red:#D7263D;--paper:#F4F0E6;--r:22px;color-scheme:dark}
*,*::before,*::after{box-sizing:border-box}
[hidden]{display:none!important}
html{-webkit-text-size-adjust:100%;scroll-padding-top:12px}
body{margin:0;font-family:Rubik,system-ui,sans-serif;font-size:17px;line-height:1.5;color:var(--ivory);background:linear-gradient(180deg,#125747 0,var(--felt) 420px) var(--felt);font-variant-numeric:tabular-nums;-webkit-tap-highlight-color:transparent;text-wrap:pretty}
body.playing{padding-bottom:110px}
a{color:var(--ivory);text-underline-offset:3px}
h1,h2,h3{line-height:1.1;text-wrap:balance;margin:0}
button,input{font:inherit;color:inherit}
button{cursor:pointer}
:focus-visible{outline:3px solid var(--gold);outline-offset:3px}
.vh{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.top{display:flex;align-items:center;justify-content:space-between;padding:14px 16px 6px;max-width:1240px;margin:0 auto}
.mark{display:inline-flex;align-items:center;gap:10px;text-decoration:none;font-weight:800;font-size:1.3rem;letter-spacing:-.01em}
.mark svg{width:36px;height:36px}
.btn{display:inline-flex;align-items:center;justify-content:center;min-height:48px;padding:0 22px;border:0;border-radius:999px;font-weight:600;text-decoration:none;transition:transform .12s,background .15s}
.btn:active{transform:scale(.97)}
.btn:disabled{opacity:.45;cursor:default}
.btn.gold{background:var(--gold);color:var(--ink)}
.btn.gold:hover{background:#f2c84f}
.btn.felt{background:var(--deep);color:var(--ivory)}
.btn.felt:hover{background:#08302a}
.btn.felt[aria-pressed=true]{background:var(--ivory);color:var(--felt)}
.btn.ghost{background:transparent;color:inherit;text-decoration:underline;text-underline-offset:4px;padding:0 12px}
.btn.big{min-height:60px;font-size:1.15rem;width:100%;margin-top:26px}
main{max-width:1240px;margin:0 auto;padding:0 16px}
/* setup */
.photo{margin:8px 0 0}
.photo img{display:block;width:100%;height:auto;aspect-ratio:16/9;object-fit:cover;border-radius:var(--r)}
.setup .photo img{aspect-ratio:16/8}
.sbody{padding:22px 0 8px}
.setup h1{font-size:clamp(2.4rem,9vw,3.6rem);font-weight:850;letter-spacing:-.025em}
.lede{font-size:1.12rem;color:var(--mute);margin:12px 0 26px;max-width:34ch}
.lbl{font-size:1.05rem;font-weight:700;margin:24px 0 12px}
.pres{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.pre{display:flex;flex-direction:column;align-items:flex-start;gap:2px;text-align:left;padding:14px 16px;min-height:72px;border:0;border-radius:18px;background:var(--deep);transition:background .15s,color .15s}
.pre b{font-weight:700;font-size:1.05rem}.pre span{font-size:.86rem;color:var(--mute)}
.pre:hover{background:#08302a}
.pre.on{background:var(--ivory);color:var(--felt)}.pre.on span{color:#3f5c52}
.custom{margin-top:14px;display:flex;flex-direction:column;gap:10px;padding:14px;border-radius:18px;background:var(--deep)}
.seg{display:flex;gap:6px;padding:4px;border-radius:999px;background:#072a22}
.seg button{flex:1;min-height:44px;border:0;border-radius:999px;background:transparent;font-weight:600;font-size:.93rem;padding:0 8px}
.seg button[aria-checked=true]{background:var(--ivory);color:var(--felt)}
.num{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 4px;font-weight:600}
.num input{width:7.5rem;min-height:48px;border:0;border-radius:14px;background:#072a22;text-align:right;padding:0 14px;font-weight:800;font-size:1.2rem}
.plist{list-style:none;margin:0 0 12px;padding:0;display:flex;flex-direction:column;gap:8px}
.pl{display:flex;align-items:center;gap:10px;padding:6px 6px 6px 12px;border-radius:18px;background:var(--deep)}
.dot{flex:none;position:relative;display:inline-block;width:26px;height:26px;border-radius:50%;background:conic-gradient(var(--c) 0 30deg,#F4F0E6 30deg 60deg,var(--c) 60deg 120deg,#F4F0E6 120deg 150deg,var(--c) 150deg 210deg,#F4F0E6 210deg 240deg,var(--c) 240deg 300deg,#F4F0E6 300deg 330deg,var(--c) 330deg);box-shadow:0 0 0 2px rgba(0,0,0,.25)}
.pn{flex:1;min-width:0;min-height:48px;border:0;background:transparent;font-size:1.08rem;font-weight:500;padding:0 6px}
.pn::placeholder{color:#8FCDB2}
.pn:focus-visible{outline-offset:0;border-radius:10px}
.rm{flex:none;width:44px;height:44px;border:0;border-radius:50%;background:transparent;font-size:1.5rem;color:var(--mute)}
.rm:hover{background:#08302a;color:var(--ivory)}
/* game */
.game{padding-top:8px}
.gbar{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 14px;margin:6px 2px 14px}
.gbar h2{font-size:1.9rem;font-weight:850;letter-spacing:-.02em}
.gbar p{margin:0;color:var(--mute)}
.stage{--sh:clamp(320px,54vh,560px);--max:calc(var(--sh) - 176px);height:var(--sh);display:grid;grid-template-columns:repeat(var(--n),minmax(0,1fr));align-items:end;gap:6px;padding:40px 10px 14px;border-radius:28px;background:radial-gradient(90% 70% at 50% 85%,#1b6a58 0%,var(--deep) 75%);box-shadow:inset 0 -18px 40px rgba(0,0,0,.25)}
.tw{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;min-width:0;height:100%}
.crown{height:26px;color:var(--gold);display:flex;align-items:flex-end}
.crown svg{width:30px;height:22px}
.tot{margin:2px 0 8px;font-weight:850;font-size:clamp(1.6rem,8vw,2.8rem);line-height:1;letter-spacing:-.03em}
.many .tot{font-size:clamp(1rem,4.6vw,1.9rem)}
.lead .tot{color:var(--gold)}
.col{position:relative;width:min(78%,96px);height:max(12px,calc(var(--h) * var(--max)));border-radius:12px 12px 8px 8px;background:repeating-linear-gradient(to top,transparent 0 11px,rgba(0,0,0,.3) 11px 12px),linear-gradient(90deg,rgba(255,255,255,.18),transparent 30%,transparent 70%,rgba(0,0,0,.22)),var(--c);box-shadow:0 8px 0 -2px rgba(0,0,0,.28);transition:height .32s cubic-bezier(.2,.8,.2,1)}
.col::after{content:"";position:absolute;inset:0;border-radius:inherit;background:rgba(244,240,230,.88);-webkit-mask:repeating-linear-gradient(to top,#000 0 11px,transparent 11px 24px),linear-gradient(90deg,transparent 16%,#000 16% 28%,transparent 28% 72%,#000 72% 84%,transparent 84%);-webkit-mask-composite:source-in;mask:repeating-linear-gradient(to top,#000 0 11px,transparent 11px 24px),linear-gradient(90deg,transparent 16%,#000 16% 28%,transparent 28% 72%,#000 72% 84%,transparent 84%);mask-composite:intersect}
.lt .col::after{background:rgba(30,30,30,.75)}
.nm{margin:14px 0 0;font-weight:600;font-size:.98rem;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.many .nm{font-size:.8rem}
.tg{margin:2px 0 0;min-height:24px;display:flex;align-items:center;gap:6px;font-size:.8rem;color:var(--mute);white-space:nowrap}
.many .tg span:not(.dbtn){display:none}
.dbtn{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:50%;background:var(--ivory);color:var(--ink);font-weight:850;font-size:.7rem;box-shadow:0 0 0 2px var(--ink) inset,0 0 0 4px var(--ivory) inset}
.padw{margin-top:18px}
.pad{overflow-x:auto;display:flex;flex-direction:column;gap:3px;padding-bottom:4px}
.pr{display:grid;gap:10px;align-items:center;width:100%;min-height:46px;padding:0 10px;border:0;border-radius:14px;background:transparent;text-align:right}
.pr span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pr .rn{text-align:left;color:var(--mute);font-size:.9rem}
button.pr:nth-child(odd){background:rgba(0,0,0,.14)}
button.pr:hover{background:var(--lit)}
.ph{font-size:.84rem;font-weight:600;min-height:38px}
.ph span:not(.rn){display:flex;align-items:center;justify-content:flex-end;gap:6px;min-width:0}.ph em{font-style:normal;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.dot::before{content:"";position:absolute;inset:26%;border-radius:50%;background:var(--c)}
.ph .dot{width:14px;height:14px;box-shadow:none;flex:none}
.pt{background:var(--deep);font-weight:850;font-size:1.1rem;min-height:52px}
.pt .ld{color:var(--gold)}
.empty{color:var(--mute);margin:12px 4px}
.gtools{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}
/* dock */
.dock{position:fixed;left:12px;right:12px;bottom:calc(12px + env(safe-area-inset-bottom));z-index:20;display:flex;align-items:center;gap:12px;max-width:620px;margin:0 auto;padding:8px 8px 8px 20px;border-radius:999px;background:var(--ivory);color:var(--ink);box-shadow:0 14px 36px rgba(0,0,0,.4)}
.dl{flex:1;margin:0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dl b{font-weight:800}
.dock .btn{min-height:54px;padding:0 26px;font-size:1.05rem;background:var(--felt);color:var(--ivory)}
/* sheets */
.scrim{position:fixed;inset:0;z-index:30;background:rgba(4,20,16,.6);opacity:0;transition:opacity .2s}
.scrim.open{opacity:1}
.sheet{position:fixed;left:0;right:0;bottom:0;z-index:31;max-height:92vh;overflow:auto;max-width:560px;margin:0 auto;padding:10px 20px calc(20px + env(safe-area-inset-bottom));border-radius:28px 28px 0 0;background:var(--paper);color:var(--ink);transform:translateY(100%);transition:transform .22s cubic-bezier(.2,.8,.2,1);color-scheme:light}
.sheet.open{transform:none}
.grab{width:44px;height:5px;border-radius:9px;background:#cfc8b8;margin:0 auto 14px}
.sheet h2{font-size:1.7rem;font-weight:850}
.hint{margin:4px 0 14px;color:#55564f;font-size:.92rem}
.rows{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.rr{display:grid;grid-template-columns:1fr 48px 7.2rem;align-items:center;gap:8px}
.rr label{display:flex;align-items:center;gap:10px;font-weight:600;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pm{width:48px;height:48px;border:0;border-radius:50%;background:#E6E0D1;font-weight:800;font-size:1.2rem}
.pm.neg{background:var(--red);color:#fff}
.sv{min-height:56px;width:100%;border:0;border-radius:16px;background:#fff;text-align:right;padding:0 16px;font-weight:850;font-size:1.5rem;box-shadow:inset 0 0 0 1px rgba(0,0,0,.06)}
.sv::placeholder{color:#9a9a92;font-weight:500}
.pm.neg+.sv{color:var(--red)}
.sheet .err{color:#b3121f;font-weight:600;min-height:1.4em;margin:10px 0 0}
.acts{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.acts .btn.gold{flex:1 1 100%;min-height:58px;font-size:1.1rem}
.sheet .btn.felt{background:var(--felt)}
.win{text-align:center}
.crownb{color:#c99a12;margin:4px auto 6px;width:64px}
.crownb svg{width:64px;height:48px}
.win h2{font-size:2.1rem}
.win #winS{color:#55564f;margin:6px 0 14px}
.stand{list-style:none;margin:0 0 6px;padding:0;display:flex;flex-direction:column;gap:6px;text-align:left}
.stand li{display:flex;align-items:center;gap:12px;padding:10px 16px;border-radius:16px;background:#ECE6D8}
.stand li:first-child{background:var(--felt);color:var(--ivory)}
.stand .pos{width:1.2rem;font-weight:800;color:#6b6b63}.stand li:first-child .pos{color:var(--gold)}
.stand .nmw{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600}
.stand b{font-weight:850;font-size:1.3rem}
.win .acts{justify-content:center}
.toast{position:fixed;left:50%;bottom:calc(92px + env(safe-area-inset-bottom));z-index:40;transform:translate(-50%,24px);opacity:0;pointer-events:none;display:flex;align-items:center;gap:14px;max-width:calc(100% - 32px);padding:12px 14px 12px 20px;border-radius:16px;background:var(--ink);color:var(--ivory);box-shadow:0 10px 30px rgba(0,0,0,.4);transition:.2s}
.toast.open{transform:translate(-50%,0);opacity:1;pointer-events:auto}
.toast button{border:0;background:var(--gold);color:var(--ink);font-weight:700;border-radius:999px;min-height:40px;padding:0 16px}
/* news, guide, foot */
.news{margin:40px 0 0;padding:26px 22px;border-radius:28px;background:var(--gold);color:var(--ink)}
.news h2{font-size:1.6rem;font-weight:850}
.news p{margin:8px 0 16px;max-width:52ch}
.sub{display:flex;flex-wrap:wrap;gap:8px}
.news .sub{display:flex}
.in{flex:1 1 220px;min-height:52px;border:0;border-radius:999px;padding:0 20px;background:#fff;color:var(--ink);font-size:1rem}
.in::placeholder{color:#62625C}
.news .btn{background:var(--ink);color:var(--ivory);min-height:52px}
.news .err{flex-basis:100%;margin:2px 4px 0;font-weight:600;color:#7a0b14}
.ok{font-weight:700;margin:0}
.hp{position:absolute;left:-9999px;width:1px;height:1px;opacity:0}
.guide{max-width:720px;margin:0 auto;padding:44px 16px 10px}
.guide h2{font-size:1.75rem;font-weight:850;margin:34px 0 12px;letter-spacing:-.015em}
.guide h3{font-size:1.1rem;font-weight:700;margin:22px 0 6px}
.guide p,.guide li{color:#DCE6DF}
.guide ul{padding-left:1.2rem}
.guide .photo{margin:26px 0}
.guide.solo h1{font-size:2.4rem;font-weight:850;margin:20px 0 12px}
.others{display:flex;flex-wrap:wrap;gap:8px}
.chipl{display:inline-flex;align-items:center;min-height:44px;padding:0 18px;border-radius:999px;background:var(--deep);text-decoration:none;font-weight:600}
.chipl:hover{background:var(--lit)}
.foot{max-width:720px;margin:40px auto 0;padding:26px 16px 40px;color:var(--mute);font-size:.92rem}
.foot nav{display:flex;flex-wrap:wrap;gap:6px 16px;margin:16px 0}
.foot a{color:var(--mute)}
.foot .mark{color:var(--ivory)}
@media (min-width:960px){
  body{font-size:18px}
  .setup{display:grid;grid-template-columns:1.15fr 1fr;gap:48px;align-items:start;padding-top:10px}
  .setup .photo{position:sticky;top:20px}
  .setup .photo img{aspect-ratio:16/11}
  .sbody{padding-top:4px}
  .game{display:grid;grid-template-columns:1.45fr 1fr;gap:28px;align-items:start}
  .gbar{grid-column:1/-1}
  .stage{--sh:min(66vh,620px)}
  .padw{margin-top:0}
  .news{display:grid;grid-template-columns:1fr 1.1fr;gap:10px 40px;align-items:center;padding:34px 40px}
  .news h2{grid-column:1}.news p{grid-column:1;margin-bottom:0}.news .sub{grid-column:2;grid-row:1/3}
  .dock{max-width:560px}
}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
.stage{position:relative}.goal{position:absolute;left:18px;top:14px;margin:0;font-size:.85rem;color:var(--mute);font-weight:500}
