:root{
  color-scheme:dark;
  --bg:#0a1230; --bg2:#152056; --ink:#f3f6ff; --dim:#9aa7d6; --glass:rgba(22,32,78,.62); --line:rgba(140,165,255,.22);
  --rodA:#2f86ec; --rodB:#a9dcff; --base1:#5fb2ff; --base2:#2a78e4;
  --yellow:#ffc81f; --green:#3ccf4e; --blue:#1e8cff; --pink:#ff3fa4; --purple:#9a4dff; --teal:#14c2b5; --orange:#ff8a1f;
  --warn:#ffcc33; --good:#38e07c;
  --font:"Fredoka",ui-rounded,"SF Pro Rounded",system-ui,sans-serif;
  --rw:56px; --rh:calc(var(--rw)*.5); --cap:6;
}
*{box-sizing:border-box}
html,body{height:100%;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent;touch-action:manipulation}
input{-webkit-user-select:text;user-select:text;-webkit-touch-callout:default}
body{margin:0;font-family:var(--font);color:var(--ink);background:radial-gradient(1100px 700px at 50% 30%,var(--bg2),var(--bg) 70%) fixed,var(--bg);
  padding:max(12px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(18px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));
  overflow-x:hidden;-webkit-font-smoothing:antialiased}
[hidden]{display:none!important}
button{font-family:inherit;color:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent;background:none;border:0;padding:0}
button:focus-visible,input:focus-visible,a:focus-visible{outline:3px solid #fff;outline-offset:3px}
svg{display:block}
#fx{position:fixed;inset:0;width:100%;height:100%;pointer-events:none;z-index:80}
.app{max-width:1120px;margin:0 auto;display:flex;flex-direction:column;gap:16px}

/* header */
.top{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:10px}
.logo{display:flex;align-items:center;gap:10px;min-width:0;text-align:left}
.wordmark{font-weight:700;font-size:clamp(24px,3.4vw,34px);line-height:1;letter-spacing:-.01em}
.wordmark em{font-style:normal;color:var(--yellow)}
.icons{display:flex;justify-content:flex-end;gap:10px}
.iconbtn{width:44px;height:44px;border-radius:50%;border:1px solid var(--line);background:var(--glass);display:grid;place-items:center;backdrop-filter:blur(10px)}
.iconbtn svg{width:22px;height:22px;fill:var(--ink)}
.timer{--p:1;padding:3px;border-radius:999px;background:conic-gradient(var(--warn) calc(var(--p)*1turn),rgba(255,255,255,.08) 0);transition:--p .9s linear}
.timer.low{--warn:#ff4d6d;animation:pulse 1s infinite}
@keyframes pulse{50%{filter:brightness(1.3)}}
.timer>div{background:#0d1638;border-radius:999px;padding:5px clamp(16px,3vw,30px);text-align:center}
.timer small{display:block;color:var(--dim);font-size:clamp(11px,1.4vw,14px);font-weight:500}
.timer small em{font-style:normal;color:var(--warn)}
.timer strong{display:block;font-size:clamp(22px,4vw,40px);font-weight:700;line-height:1;font-variant-numeric:tabular-nums}

/* shared */
.panel-card{border:1px solid var(--line);border-radius:24px;padding:18px;background:linear-gradient(180deg,rgba(255,255,255,.06),rgba(255,255,255,.01)),var(--glass);display:flex;flex-direction:column;gap:12px}
.mini{color:var(--dim);font-size:14px;margin:0}
.center{text-align:center;align-items:center}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;border-radius:999px;padding:14px 26px;font-size:clamp(16px,2vw,20px);font-weight:600;text-decoration:none;color:#fff;transition:transform .12s,filter .12s;user-select:none}
.btn:active{transform:scale(.96)}
.btn svg{width:22px;height:22px;fill:currentColor}
.btn.blue{background:linear-gradient(180deg,#3aa0ff,#1460e6);box-shadow:0 0 0 2px rgba(120,190,255,.45),0 0 22px rgba(40,140,255,.5),inset 0 2px 0 rgba(255,255,255,.35)}
.btn.green{background:linear-gradient(180deg,#38e07c,#109c4e);box-shadow:0 0 0 2px rgba(120,255,180,.4),0 0 22px rgba(40,220,120,.4),inset 0 2px 0 rgba(255,255,255,.35)}
.btn.ghost{background:rgba(70,82,130,.4);border:2px solid rgba(160,175,230,.3)}
.btn.big{font-size:22px;padding:16px 26px}
.btn:disabled{opacity:.4;cursor:default;transform:none}
input{font:inherit;font-size:18px;color:var(--ink);background:rgba(0,0,0,.28);border:2px solid var(--line);border-radius:16px;padding:12px 14px;width:100%;min-width:0}
input::placeholder{color:#6f7bab}
.row2{display:grid;grid-template-columns:1fr 1fr;gap:10px;width:100%}
.err{color:#ff8fa3;margin:0;min-height:1em;font-size:14px}
.chips{display:flex;flex-wrap:wrap;gap:8px}
.chip{border:2px solid var(--line);background:rgba(255,255,255,.04);border-radius:14px;padding:9px 16px;font-size:16px;font-weight:600}
.chip[aria-pressed="true"]{border-color:#22b8ff;background:rgba(34,184,255,.15);box-shadow:0 0 14px rgba(34,184,255,.35)}
.chip:disabled{cursor:default}
.blurb{margin:0;color:var(--dim);font-size:15px;line-height:1.4}
.bigcode{font-size:clamp(44px,12vw,72px);font-weight:700;letter-spacing:.12em;line-height:1;background:linear-gradient(90deg,#5fd0ff,#c08bff);-webkit-background-clip:text;background-clip:text;color:transparent}

/* home */
.home{display:grid;gap:16px;max-width:480px;width:100%;margin:0 auto}
.hero{text-align:center;display:flex;flex-direction:column;align-items:center;gap:10px;padding-top:6px}
.hero h1{margin:0;font-size:clamp(28px,7vw,44px);line-height:1.08;text-wrap:balance}
.hero p{margin:0;color:var(--dim);font-size:16px;line-height:1.45;max-width:36ch}
.hero-rods{display:flex;gap:18px;align-items:flex-end;height:110px}
.hero-rods i{position:relative;width:46px;height:110px;display:flex;flex-direction:column-reverse;align-items:center;padding-bottom:4px}
.hero-rods i::before{content:"";position:absolute;inset:0 auto 0 50%;width:12px;margin-left:-6px;border-radius:9px 9px 0 0;background:linear-gradient(90deg,var(--rodA),var(--rodB) 40%,var(--rodA))}
.hero-rods b{position:relative;width:46px;height:22px;border-radius:10px;margin-top:-1px;background:linear-gradient(180deg,rgba(255,255,255,.55),rgba(255,255,255,0) 45%,rgba(0,0,0,.15)),var(--c);box-shadow:inset 0 -3px 0 rgba(0,0,0,.2);animation:bob 3s ease-in-out infinite}
.hero-rods i:nth-child(2) b{animation-delay:.3s}.hero-rods i:nth-child(3) b{animation-delay:.6s}
@keyframes bob{50%{transform:translateY(-3px)}}
.form{gap:12px}
.code-row{display:grid;grid-template-columns:1fr auto;gap:10px}
.code-row input{text-transform:uppercase;letter-spacing:.15em}

/* lobby */
.lobby{display:grid;gap:14px;max-width:520px;width:100%;margin:0 auto}
.plist{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.plist li{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:16px;background:rgba(255,255,255,.04);animation:slide .3s ease-out}
@keyframes slide{from{opacity:0;transform:translateY(6px)}}
.dot{flex:none;width:30px;height:30px;border-radius:50%;background:var(--pc);display:grid;place-items:center;box-shadow:0 0 12px var(--pc)}
.dot svg{width:16px;height:16px;fill:#fff}
.plist .nm{flex:1;min-width:0;font-weight:600;font-size:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tag{font-size:12px;color:var(--dim);display:flex;align-items:center;gap:4px}
.tag svg{width:16px;height:16px;fill:var(--yellow)}

/* play */
.play{display:grid;gap:14px;grid-template-columns:1fr}
@media (min-width:900px){.play{grid-template-columns:1fr 260px}.play .opps{grid-column:2;grid-row:1;flex-direction:column;overflow:visible}.play .stage{grid-column:1;grid-row:1}}
.opps{display:flex;gap:10px;overflow-x:auto;padding:4px 2px 8px;scrollbar-width:none;scroll-snap-type:x proximity}
.opps::-webkit-scrollbar{display:none}
.opp{--pc:#22b8ff;flex:none;width:clamp(140px,40vw,260px);border-radius:20px;border:2px solid var(--pc);padding:10px 12px;background:linear-gradient(180deg,rgba(255,255,255,.06),rgba(255,255,255,.01)),var(--glass);display:flex;flex-direction:column;gap:8px;scroll-snap-align:start;
  box-shadow:0 0 18px color-mix(in srgb,var(--pc) 40%,transparent),inset 0 0 14px color-mix(in srgb,var(--pc) 15%,transparent);transition:transform .25s}
@media (min-width:900px){.opp{width:100%}}
.opp.me{transform:none}
.opp .h{display:flex;align-items:center;gap:8px;min-width:0}
.opp .dot{width:24px;height:24px}
.opp .dot svg{width:13px;height:13px}
.opp .nm{flex:1;min-width:0;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.opp .pts{font-weight:700;font-size:20px;font-variant-numeric:tabular-nums}
.bar{height:8px;border-radius:99px;background:rgba(255,255,255,.08);overflow:hidden}
.bar i{display:block;height:100%;width:0;border-radius:99px;background:linear-gradient(90deg,var(--pc),#fff);transition:width .35s ease}
.opp .st{display:flex;justify-content:space-between;font-size:13px;color:var(--dim)}
.opp .st b{color:var(--good);font-weight:600}
.wins{display:flex;gap:5px}
.wins i{width:10px;height:10px;border-radius:50%;border:1.5px solid rgba(255,255,255,.35)}
.wins i.on{background:var(--pc);border-color:var(--pc);box-shadow:0 0 6px var(--pc)}

.stage{display:flex;flex-direction:column;align-items:center;gap:14px;min-width:0}
.hint{width:min(100%,560px);text-align:center;border:1px solid var(--line);border-radius:999px;padding:10px 18px;background:rgba(10,18,48,.6);font-weight:500;font-size:clamp(13px,1.8vw,17px)}
.target{display:flex;align-items:center;gap:12px;border:1px solid var(--line);border-radius:22px;padding:8px 10px 8px 16px;background:rgba(10,18,48,.6);max-width:100%}
.target>span{font-weight:600;font-size:clamp(14px,1.8vw,18px)}
.slots{display:flex;gap:7px;padding:6px 9px;border-radius:16px;border:2px solid transparent;flex-wrap:wrap;
  background:linear-gradient(#101a44,#101a44) padding-box,linear-gradient(90deg,#22b8ff,#b04dff) border-box}
.slot{width:clamp(24px,4vw,44px);height:clamp(24px,4vw,44px);border-radius:11px;background:linear-gradient(180deg,rgba(255,255,255,.45),rgba(255,255,255,0) 50%),var(--c);
  box-shadow:inset 0 -4px 0 rgba(0,0,0,.25);opacity:.45;transform:scale(.88);transition:all .3s cubic-bezier(.2,.9,.3,1.4)}
.slot.hit{opacity:1;transform:scale(1);box-shadow:inset 0 -4px 0 rgba(0,0,0,.25),0 0 14px var(--c)}

/* overlays */
.overlay{position:fixed;inset:0;z-index:60;display:grid;place-items:center;padding:16px;background:rgba(5,9,26,.7);backdrop-filter:blur(8px);overflow-y:auto}
.card{width:min(100%,440px);border-radius:28px;padding:24px 20px;background:linear-gradient(180deg,rgba(255,255,255,.07),rgba(255,255,255,.01)),#121c48;border:1.5px solid var(--line);
  box-shadow:0 30px 80px rgba(0,0,0,.55),0 0 40px rgba(60,120,255,.18);display:flex;flex-direction:column;gap:16px;text-align:center;animation:pop .35s cubic-bezier(.2,.9,.3,1.2)}
@keyframes pop{from{transform:scale(.9);opacity:0}}
.card h2{margin:0;font-size:clamp(24px,5vw,32px);font-weight:700;text-wrap:balance}
.card p{margin:0;color:var(--dim);font-size:16px;line-height:1.45}
.card .btn{width:100%}
.rank{display:flex;flex-direction:column;gap:8px;text-align:left}
.rank div{display:flex;align-items:center;gap:10px;padding:10px 14px;border-radius:14px;background:rgba(255,255,255,.05);font-size:17px;font-weight:600}
.rank div .nm{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rank div .pl{width:22px;color:var(--dim)}
.rank div.win{background:linear-gradient(90deg,rgba(255,200,31,.25),rgba(255,200,31,.05));box-shadow:inset 0 0 0 2px rgba(255,200,31,.5)}
.rank small{color:var(--dim);font-weight:500;font-size:13px}
.rank .v{font-variant-numeric:tabular-nums}
.how{display:flex;flex-direction:column;gap:10px;text-align:left;margin:0;padding:0;list-style:none}
.how li{display:flex;gap:12px;align-items:flex-start;font-size:16px;line-height:1.4}
.how li b{flex:none;width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:var(--blue);font-size:14px}
.preview{display:flex;justify-content:center;gap:8px;flex-wrap:wrap}
.preview .slot{opacity:1;transform:none}
.countdown{position:fixed;inset:0;z-index:70;display:grid;place-items:center;background:rgba(5,9,26,.55);backdrop-filter:blur(4px);pointer-events:none}
.countdown span{font-size:min(40vw,220px);font-weight:700;color:#fff;text-shadow:0 0 40px rgba(60,160,255,.8);animation:cd .9s cubic-bezier(.2,.9,.3,1.2)}
@keyframes cd{from{transform:scale(1.8);opacity:0}60%{opacity:1}to{transform:scale(1)}}
.toast{position:fixed;left:50%;bottom:max(24px,env(safe-area-inset-bottom));transform:translate(-50%,40px);opacity:0;z-index:90;background:#1c2a66;border:1px solid var(--line);padding:10px 18px;border-radius:999px;font-weight:600;transition:all .25s;pointer-events:none;white-space:nowrap}
.toast.show{transform:translate(-50%,0);opacity:1}
@media (max-width:520px){.iconbtn{width:38px;height:38px}.iconbtn svg{width:18px;height:18px}.btn{padding:12px 20px}.logo svg{width:32px;height:32px}}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* 3D stage */
.stage3d{position:relative;width:100%;height:min(54vh,500px,98vw);min-height:280px;border-radius:28px;overflow:hidden;
  background:radial-gradient(80% 70% at 50% 40%,rgba(70,120,255,.22),rgba(10,18,48,0) 70%)}
.stage3d canvas{display:block;width:100%;height:100%;touch-action:none;cursor:grab}
.stage3d canvas:active{cursor:grabbing}
.watching{position:absolute;top:10px;left:50%;transform:translateX(-50%);z-index:3;background:rgba(10,18,48,.75);border:1px solid var(--line);padding:6px 14px;border-radius:999px;font-weight:600;font-size:14px;white-space:nowrap}
.frost{position:absolute;inset:0;z-index:4;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;pointer-events:none;
  background:radial-gradient(circle,rgba(190,235,255,.18),rgba(120,200,255,.35));animation:frostIn .3s ease-out}
.frost svg{width:64px;height:64px;fill:#e8f8ff;filter:drop-shadow(0 0 12px #7fd8ff);animation:spinS 2.6s linear infinite}
.frost span{font-size:22px;font-weight:700;text-shadow:0 0 14px #59c8ff}
@keyframes frostIn{from{opacity:0;transform:scale(1.1)}}
@keyframes spinS{to{transform:rotate(360deg)}}
.announce{position:absolute;left:0;right:0;top:34%;z-index:5;text-align:center;pointer-events:none}
.announce b{display:inline-block;font-size:clamp(30px,8vw,64px);font-weight:700;line-height:1;color:#fff;letter-spacing:.01em;
  text-shadow:0 4px 0 rgba(0,0,0,.25),0 0 30px var(--ac,#3aa0ff);animation:ann 1.5s cubic-bezier(.2,.9,.3,1.2) forwards}
.announce small{display:block;margin-top:6px;font-size:15px;font-weight:600;color:#dfe7ff;animation:ann 1.5s cubic-bezier(.2,.9,.3,1.2) forwards}
@keyframes ann{0%{opacity:0;transform:scale(2.2) rotate(-6deg)}18%{opacity:1;transform:scale(.95) rotate(2deg)}28%{transform:scale(1) rotate(0)}80%{opacity:1}100%{opacity:0;transform:translateY(-30px)}}
.flyzone{position:absolute;inset:0;z-index:6;pointer-events:none;overflow:hidden}
.fly{position:absolute;bottom:-60px;display:flex;flex-direction:column;align-items:center;animation:fly 2.6s cubic-bezier(.25,.7,.4,1) forwards}
.fly .e{font-size:46px;line-height:1;animation:wob .5s ease-in-out infinite alternate}
.fly .n{font-size:11px;font-weight:600;background:rgba(10,18,48,.7);padding:2px 8px;border-radius:99px;margin-top:2px;white-space:nowrap}
.fly.txt .e{font-size:20px;font-weight:700;background:#fff;color:#14205a;padding:8px 14px;border-radius:18px 18px 18px 4px;box-shadow:0 6px 18px rgba(0,0,0,.3)}
@keyframes fly{0%{transform:translateY(0) scale(.6);opacity:0}12%{opacity:1;transform:translateY(-60px) scale(1.1)}100%{transform:translateY(calc(-1 * var(--h,420px))) scale(1);opacity:0}}
@keyframes wob{from{transform:rotate(-10deg)}to{transform:rotate(10deg)}}

.controls{position:relative;display:grid;grid-template-columns:repeat(5,1fr);gap:8px;width:min(100%,560px)}
.cbtn{display:flex;flex-direction:column;align-items:center;gap:5px;font-size:13px;font-weight:600;color:var(--dim);transition:transform .12s}
.cbtn i{width:54px;height:54px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(180deg,#3aa0ff,#1460e6);box-shadow:0 0 0 2px rgba(120,190,255,.4),0 0 18px rgba(40,140,255,.45),inset 0 2px 0 rgba(255,255,255,.35)}
.cbtn i svg{width:24px;height:24px;fill:#fff}
.cbtn:active{transform:scale(.92)}
.cbtn:disabled{opacity:.35}
.cbtn#reset i,.cbtn#react i{background:rgba(70,82,130,.55);box-shadow:0 0 0 2px rgba(160,175,230,.3)}
.cbtn.power i{background:linear-gradient(180deg,#b06bff,#6a2bd8);box-shadow:0 0 0 2px rgba(200,160,255,.45),0 0 18px rgba(150,80,255,.5),inset 0 2px 0 rgba(255,255,255,.35)}
.cbtn.power.ready i{animation:ready 1s ease-in-out infinite}
.cbtn.power.ready span{color:#e6d4ff}
@keyframes ready{50%{box-shadow:0 0 0 3px rgba(220,190,255,.8),0 0 34px rgba(170,100,255,.9),inset 0 2px 0 rgba(255,255,255,.35);transform:scale(1.06)}}
.reactpop{position:absolute;bottom:calc(100% + 10px);left:50%;transform:translateX(-50%);z-index:20;width:min(92vw,380px);background:#121c48;border:1.5px solid var(--line);border-radius:22px;padding:12px;
  box-shadow:0 20px 50px rgba(0,0,0,.5);display:flex;flex-direction:column;gap:10px;animation:pop .2s ease-out}
.reactpop .emo{display:grid;grid-template-columns:repeat(8,1fr);gap:4px}
.reactpop .emo button{font-size:28px;line-height:1;padding:6px 0;border-radius:12px;transition:transform .1s}
.reactpop .emo button:active{transform:scale(1.3)}
.reactpop .phr{display:flex;flex-wrap:wrap;gap:6px}
.reactpop .phr button{font-size:14px;font-weight:600;padding:7px 12px;border-radius:999px;background:rgba(255,255,255,.07);border:1px solid var(--line)}

/* player status */
.sd{width:8px;height:8px;border-radius:50%;flex:none;background:#6b7499}
.sd.playing,.sd.moving{background:#38e07c;box-shadow:0 0 0 0 rgba(56,224,124,.7);animation:beat 1.4s infinite}
.sd.moving{background:#5fd0ff}
.sd.idle{background:#ffcc33}
.sd.away{background:#9aa3c7}
.sd.offline,.sd.left{background:#ff4d6d}
.sd.done{background:#ffc81f;box-shadow:0 0 8px #ffc81f}
@keyframes beat{70%{box-shadow:0 0 0 6px rgba(56,224,124,0)}100%{box-shadow:0 0 0 0 rgba(56,224,124,0)}}
.opp .stl{display:flex;align-items:center;gap:6px;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.opp{position:relative;cursor:pointer}
.opp.watched{outline:2px solid #fff;outline-offset:2px}
.mb{display:flex;gap:3px;align-items:flex-end;height:30px}
.mb i{display:flex;flex-direction:column-reverse;gap:1px;width:9px;height:100%;padding-bottom:1px;border-radius:2px 2px 0 0;background:linear-gradient(90deg,transparent 38%,rgba(150,200,255,.35) 38%,rgba(150,200,255,.35) 62%,transparent 62%)}
.mb b{display:block;height:4px;border-radius:2px;background:var(--c)}
.bubble{position:absolute;top:-12px;right:8px;z-index:4;background:#fff;color:#14205a;font-weight:700;font-size:14px;padding:5px 10px;border-radius:14px 14px 4px 14px;box-shadow:0 6px 16px rgba(0,0,0,.35);max-width:80%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.plist .stl{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--dim)}
.combo{color:#ffc81f}
@media (max-width:520px){.cbtn i{width:48px;height:48px}.cbtn i svg{width:21px;height:21px}.cbtn{font-size:12px}.stage3d{height:min(50vh,440px,100vw);border-radius:22px}}

/* big rooms: compact live leaderboard */
.opps.many .opp{width:clamp(128px,34vw,200px);padding:8px 10px;gap:6px}
.opps.many .opp .pts{font-size:16px}
.opps.many .opp .mb{height:22px}
.opps.many .opp .mb i{width:7px}
.opps.many .opp .mb b{height:3px}
.opps.many .opp .st + .st{display:none}
@media (min-width:900px){.opps.many{max-height:calc(54vh + 220px);overflow-y:auto;padding-right:4px}.opps.many .opp{width:100%}}
@media (max-width:899px){.opps.many .opp .mb{display:none}}
.rk{font-size:12px;font-weight:700;color:#fff;font-style:normal}
.opp.ko-out{opacity:.5;filter:grayscale(.6)}
.outtag{font-style:normal;font-size:12px;font-weight:700;color:#fff;background:#ff4d6d;padding:2px 7px;border-radius:6px;margin-right:8px;vertical-align:middle}
.chip.ko[aria-pressed="true"]{border-color:#ff4d6d;background:rgba(255,77,109,.15);box-shadow:0 0 14px rgba(255,77,109,.35)}

.row1{display:grid;width:100%}

/* profile strip: type and hairlines, no boxes */
.profile{display:flex;flex-direction:column;gap:6px;padding:2px 4px}
.pf-top{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}
.pf-lv{font-weight:700;font-size:20px;color:var(--yellow)}
.pf-title{font-weight:600;font-size:17px}
.pf-streak{margin-left:auto;display:inline-flex;align-items:center;gap:4px;font-weight:600;color:#ff9a3d}
.pf-streak svg,.flame svg{width:16px;height:16px;fill:#ff9a3d;vertical-align:-2px}
.pf-bar{height:4px;border-radius:2px;background:rgba(255,255,255,.1);overflow:hidden}
.pf-bar i{display:block;height:100%;background:linear-gradient(90deg,#ffc81f,#ff8a3d);border-radius:2px}
.pf-sub{font-size:12px;color:var(--dim)}
.lvtag{font-style:normal;font-size:12px;font-weight:600;color:var(--yellow);margin-left:4px}

/* solo modes: their own look */
.solo-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.solo-tile{display:flex;flex-direction:column;align-items:flex-start;gap:4px;padding:16px;border-radius:22px;text-align:left;color:#fff}
.solo-tile svg{width:26px;height:26px;fill:currentColor;margin-bottom:6px}
.solo-tile b{font-size:22px;font-weight:700}
.solo-tile span{font-size:13px;opacity:.85}
.climb-tile{background:linear-gradient(160deg,#ffb347,#ff6a3d 55%,#c2306b)}
.daily-tile{background:linear-gradient(160deg,#5fd0ff,#2f6fe4 60%,#5b3cc4)}
.solo-tile:active{transform:scale(.97)}
body.climb{--bg2:#5a2440;--warn:#ffb347}
body.climb{background:radial-gradient(1100px 700px at 50% 30%,#6b2a45,#1a0f2e 70%) fixed,#1a0f2e}
body.climb .stage3d{background:radial-gradient(80% 70% at 50% 40%,rgba(255,140,60,.22),rgba(26,15,46,0) 70%)}
body.climb .cbtn i{background:linear-gradient(180deg,#ffb347,#e85d2f);box-shadow:0 0 0 2px rgba(255,190,120,.4),0 0 18px rgba(255,120,50,.4),inset 0 2px 0 rgba(255,255,255,.35)}
body.climb .slots{background:linear-gradient(#24132f,#24132f) padding-box,linear-gradient(90deg,#ffb347,#c2306b) border-box}
.btn.amber{background:linear-gradient(180deg,#ffb347,#e85d2f);box-shadow:0 0 0 2px rgba(255,190,120,.45),0 0 22px rgba(255,120,50,.45),inset 0 2px 0 rgba(255,255,255,.35)}
.stars{display:flex;justify-content:center;gap:8px}
.star{width:44px;height:44px;fill:rgba(255,255,255,.15)}
.star.on{fill:#ffc81f;filter:drop-shadow(0 0 8px rgba(255,200,31,.6))}
.lv .star{width:12px;height:12px}
.nearmiss{color:#ffb347!important;font-weight:600}
.lvgrid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.lv{display:flex;flex-direction:column;align-items:center;gap:2px;padding:10px 4px;border-radius:14px;border:1.5px solid var(--line)}
.lv b{font-size:20px}
.lv span{display:flex;gap:1px;font-size:11px;color:var(--dim)}
.lv.cur{border-color:#ffb347;background:rgba(255,179,71,.12)}
.lv.wild b{color:#ff7a2f}
.chip.feat[aria-pressed="false"]{opacity:.55;text-decoration:line-through}

/* missions: plain rows with hairlines */
.missions{display:flex;flex-direction:column;padding:0 4px}
.missions .mini{margin-bottom:4px}
.mrow{display:flex;align-items:center;gap:10px;padding:9px 0;border-top:1px solid var(--line);font-size:15px}
.mrow .mc{width:18px;height:18px;border-radius:50%;border:1.5px solid rgba(255,255,255,.35);display:grid;place-items:center;flex:none}
.mrow.done .mc{background:var(--good);border-color:var(--good)}
.mrow .mc svg{width:12px;height:12px;fill:#0a1230}
.mrow .mn{margin-left:auto;color:var(--dim);font-size:13px;font-variant-numeric:tabular-nums}
.mrow.done span:nth-child(2){color:var(--dim);text-decoration:line-through}
.mrow.done .mn{color:var(--good)}
.textlink{color:#5fd0ff;font-weight:600;font-size:15px;justify-self:center;padding:8px}
/* shop */
.tabs{display:flex;gap:18px;justify-content:center;border-bottom:1px solid var(--line)}
.tabs button{padding:8px 2px;font-weight:600;color:var(--dim);border-bottom:2px solid transparent;margin-bottom:-1px}
.tabs button[aria-pressed="true"]{color:#fff;border-bottom-color:#fff}
.slist{display:flex;flex-direction:column;text-align:left;max-height:52vh;overflow-y:auto}
.srow{display:flex;align-items:center;gap:12px;padding:12px 2px;border-bottom:1px solid var(--line)}
.srow>span:first-child{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.srow b{font-size:16px}
.srow small{color:var(--dim);font-size:13px}
.mini-btn{flex:none;padding:8px 14px;border-radius:999px;font-weight:700;font-size:14px;border:1.5px solid var(--line)}
.mini-btn.buy{background:#fff;color:#14205a;border-color:#fff}
.eqd{flex:none;font-size:13px;font-weight:600;color:var(--good)}
.lock{flex:none;font-size:13px;font-weight:600;color:var(--dim)}
.rank div.me{box-shadow:inset 0 0 0 2px #5fd0ff}
#drank b{color:#fff}

.logo svg{flex:none;width:34px;height:34px}
@media (max-width:520px){.logo svg{width:28px;height:28px}.wordmark{font-size:24px}.icons{gap:6px}}

/* the rule, always visible during play */
.rule{display:flex;align-items:flex-start;gap:8px;width:min(100%,560px);font-size:15px;line-height:1.4;color:var(--dim);padding:0 2px}
.rule svg{flex:none;width:18px;height:18px;fill:#ffc81f;margin-top:1px}
.rule b{color:#fff;font-weight:600}
.cd-wrap{display:flex;flex-direction:column;align-items:center;gap:6px}
.cd-rule{margin:0;font-size:clamp(18px,4.6vw,28px);font-weight:700;color:#ffc81f;text-align:center;padding:0 24px;text-shadow:0 2px 12px rgba(0,0,0,.5)}

/* Daily stats: type and hairlines, Wordle style */
.statrow{display:grid;grid-template-columns:repeat(4,1fr);border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:10px 0}
.statrow div{display:flex;flex-direction:column;align-items:center;gap:2px}
.statrow b{font-size:28px;font-weight:700;font-variant-numeric:tabular-nums}
.statrow span{font-size:12px;color:var(--dim)}
.mini.left{text-align:left}
.dist{display:flex;align-items:center;gap:8px;font-size:14px;font-weight:600}
.dist span{width:26px;text-align:left;color:var(--dim)}
.dist i{display:flex;justify-content:flex-end;height:22px;background:rgba(255,255,255,.14);border-radius:4px;padding:0 8px;align-items:center;font-style:normal}
.dist i.today{background:#38e07c;color:#0a1230}
.dist b{font-size:13px}
.sqgrid{display:flex;flex-direction:column;align-items:center;gap:4px}
.sqgrid div{display:flex;gap:4px}
.sqgrid i{width:22px;height:22px;border-radius:5px;background:var(--c)}
.nextin{display:flex;justify-content:space-between;align-items:baseline;border-top:1px solid var(--line);padding-top:12px}
.nextin span{color:var(--dim);font-size:14px}
.nextin b{font-size:24px;font-weight:700;font-variant-numeric:tabular-nums;letter-spacing:.02em}

/* ===== mobile fit pass ===== */
/* header never collides: wordmark shrinks, icons tighten */
.top{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)}
.logo{overflow:hidden}
.wordmark{white-space:nowrap}
@media (max-width:380px){
  .iconbtn{width:34px;height:34px}.iconbtn svg{width:17px;height:17px}.icons{gap:4px}
  .wordmark{font-size:21px}.logo{gap:6px}.logo svg{width:24px;height:24px}
  .hero-rods{height:88px}.hero-rods i{height:88px}
  .hero p{font-size:15px}
  .panel-card{padding:14px;border-radius:20px}
  .solo-tile{padding:14px}.solo-tile b{font-size:20px}
}
.err:empty{display:none}

/* play: one screen, no scrolling, board takes whatever space is left */
body:has(#play:not([hidden])){height:100dvh;overflow:hidden;overscroll-behavior:none}
body:has(#play:not([hidden])) .app{height:100%;gap:10px}
body:has(#play:not([hidden])) .top{flex:none}
.play:not([hidden]){display:flex;flex-direction:column;gap:10px;flex:1;min-height:0}
.play .opps{flex:none}
.play .stage{flex:1;min-height:0;gap:10px;width:100%}
.play .stage>*{flex:none}
.play .stage3d{flex:1 1 auto;height:auto;min-height:160px}
/* in a match the timer owns the middle of the header, so only the mark shows */
body:has(#play:not([hidden])) .wordmark{display:none}
@media (min-width:900px){
  .play:not([hidden]){display:grid;grid-template-columns:1fr 260px;grid-template-rows:minmax(0,1fr)}
  .play .opps{max-height:100%;overflow-y:auto}
}
@media (max-width:520px){
  .rule{font-size:13px}.rule svg{width:15px;height:15px}
  .hint{font-size:13px;padding:8px 14px;border-radius:16px}
  .target{padding:6px 8px 6px 12px;gap:8px}
  .slot{width:28px;height:28px;border-radius:8px}
  .opp{width:clamp(128px,38vw,200px);padding:8px 10px;gap:6px}
  .opp .pts{font-size:17px}
}
/* short phones: tighten the vertical stack around the board */
@media (max-height:700px) and (orientation:portrait){
  body:has(#play:not([hidden])) .app,.play:not([hidden]),.play .stage{gap:7px}
  .rule{font-size:12px;line-height:1.3}
  .hint{font-size:12px;padding:6px 12px}
  .cbtn i{width:42px;height:42px}.cbtn i svg{width:19px;height:19px}.cbtn{font-size:11px;gap:3px}
  .slot{width:24px;height:24px}
  .timer>div{padding:3px 14px}.timer strong{font-size:20px}.timer small{font-size:10px}
  .opp .mb{display:none}
}
/* landscape phones: board on the left, everything else in a column on the right */
@media (orientation:landscape) and (max-height:520px){
  body{padding-top:max(6px,env(safe-area-inset-top));padding-bottom:max(6px,env(safe-area-inset-bottom))}
  body:has(#play:not([hidden])) .app{gap:6px}
  .iconbtn{width:32px;height:32px}.iconbtn svg{width:16px;height:16px}.logo svg{width:24px;height:24px}
  .timer>div{padding:2px 14px}.timer strong{font-size:18px}.timer small{font-size:10px}
  body:has(#play:not([hidden])) .app{max-width:none}
  .play .stage{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(220px,1fr);grid-template-rows:auto auto 1fr auto;column-gap:16px;row-gap:8px;align-items:center;justify-items:center}
  .play .stage3d{grid-column:1;grid-row:1/5;height:100%;min-height:0;align-self:stretch}
  .play .rule{grid-column:2;grid-row:1;font-size:13px}
  .play .hint{grid-column:2;grid-row:2;font-size:13px;padding:6px 12px;border-radius:14px}
  .play .target{grid-column:2;grid-row:3}
  .play .controls{grid-column:2;grid-row:4;width:100%}
  .cbtn i{width:44px;height:44px}.cbtn{font-size:11px}
  .slot{width:26px;height:26px}
  .play .opps{padding-bottom:2px}
  .overlay{align-items:start}
  .countdown span{font-size:min(30vh,160px)}
}
/* overlays stay inside short screens */
.card{max-height:calc(100dvh - 32px);overflow-y:auto}
/* no timer showing: logo gets all the room it needs */
.top:has(.timer[hidden]){display:flex;justify-content:space-between}
.top:has(.timer[hidden]) .logo{overflow:visible}
/* game feel lines */
.hotline{color:#ffc81f!important;font-weight:600}
.cbtn.nudge i{animation:nudge 1s ease-in-out 4}
.cbtn.nudge span{color:#fff}
@keyframes nudge{50%{transform:translateY(-4px) scale(1.06)}}

/* ===== tablet and desktop ===== */
/* solo play has no opponents column, so the board stays centred */
@media (min-width:900px){ .play:not([hidden]):has(.opps:empty){grid-template-columns:1fr} .play:has(.opps:empty) .opps{display:none} }

/* home: hero on the left, everything you act on in a column on the right */
@media (min-width:900px){
  .app{max-width:1080px}
  .top{padding:0 8px}
  .home{max-width:1080px;grid-template-columns:minmax(0,1fr) 420px;column-gap:clamp(40px,6vw,96px);row-gap:16px;align-items:start;padding-top:clamp(8px,4vh,48px)}
  .home .hero{grid-column:1;grid-row:1/span 7;align-items:flex-start;text-align:left;position:sticky;top:clamp(24px,8vh,96px);gap:18px;padding-top:0}
  .home>:not(.hero){grid-column:2}
  .home .hero h1{font-size:clamp(44px,4.8vw,68px);line-height:1.02;text-wrap:balance}
  .home .hero p{font-size:18px;max-width:30ch}
  .home .hero-rods{height:150px;gap:24px;margin-bottom:6px}
  .home .hero-rods i{height:150px;width:60px}
  .home .hero-rods b{width:60px;height:28px;border-radius:13px}
  .home .textlink{justify-self:start;padding-left:4px}
}
/* lobby: invite and players on the left, match setup on the right */
@media (min-width:900px){
  .lobby{max-width:980px;grid-template-columns:1fr 1fr;column-gap:24px;align-items:start}
  .lobby>section:nth-of-type(1){grid-column:1;grid-row:1}
  .lobby>section:nth-of-type(2){grid-column:1;grid-row:2}
  .lobby>section:nth-of-type(3){grid-column:2;grid-row:1/span 3;position:sticky;top:24px}
  .lobby>#leave{grid-column:1;grid-row:3;justify-self:start}
}
/* iPad portrait: one column, but wider and roomier than a phone */
@media (min-width:700px) and (max-width:899px){
  .home,.lobby{max-width:560px}
  .home .hero h1{font-size:48px}
  .home .hero p{font-size:17px}
}

/* ===== polish pass: flatter, calmer, type and hairlines ===== */
.btn.blue{background:#2f7dff;box-shadow:inset 0 -3px 0 rgba(0,0,0,.18)}
.btn.green{background:#25c26a;box-shadow:inset 0 -3px 0 rgba(0,0,0,.18)}
.btn.amber{background:#ff8f3d;box-shadow:inset 0 -3px 0 rgba(0,0,0,.18)}
.btn.ghost{background:transparent;border:1.5px solid var(--line)}
.btn{letter-spacing:.005em}
.cbtn i{background:#2f7dff;box-shadow:inset 0 -3px 0 rgba(0,0,0,.2)}
.cbtn#reset i,.cbtn#react i{background:rgba(255,255,255,.08);box-shadow:inset 0 0 0 1.5px var(--line)}
.cbtn.power i{background:#8a4dff;box-shadow:inset 0 -3px 0 rgba(0,0,0,.2)}
body.climb .cbtn i{background:#ff8f3d;box-shadow:inset 0 -3px 0 rgba(0,0,0,.2)}
body.climb .cbtn#reset i{background:rgba(255,255,255,.08);box-shadow:inset 0 0 0 1.5px var(--line)}
@keyframes ready{50%{transform:scale(1.07)}}
.chip[aria-pressed="true"]{box-shadow:none;background:rgba(34,184,255,.12)}
.chip.ko[aria-pressed="true"]{box-shadow:none}
.dot{box-shadow:none}
.opp{box-shadow:none;border-width:1.5px;background:rgba(255,255,255,.03)}
.panel-card{background:rgba(255,255,255,.035);border-color:var(--line)}
.iconbtn{background:transparent;backdrop-filter:none}
.hint,.target{background:transparent}
.slot.hit{box-shadow:inset 0 -4px 0 rgba(0,0,0,.25)}
.card{background:#111a42;box-shadow:0 24px 60px rgba(0,0,0,.5)}
.card h2{letter-spacing:-.01em}
.wins i.on{box-shadow:none}
.solo-tile{box-shadow:inset 0 -3px 0 rgba(0,0,0,.15)}

/* more ways to play: plain rows with hairlines */
.modes{display:flex;flex-direction:column;padding:0 4px}
.modes .mini{margin-bottom:4px}
.mrow-btn{display:flex;align-items:center;gap:14px;padding:13px 0;border-top:1px solid var(--line);text-align:left;width:100%}
.mrow-btn:last-child{border-bottom:1px solid var(--line)}
.mrow-btn svg{flex:none;width:22px;height:22px;fill:var(--dim)}
.mrow-btn span{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.mrow-btn b{font-size:17px;font-weight:600}
.mrow-btn small{font-size:13px;color:var(--dim)}
.mrow-btn em{flex:none;font-style:normal;font-size:13px;color:var(--dim);font-variant-numeric:tabular-nums}
.mrow-btn:active{opacity:.6}
.mrow-btn[data-mode="zen"] svg{fill:#5fd0b0}.mrow-btn[data-mode="blitz"] svg{fill:#ffc81f}
.mrow-btn[data-mode="mystery"] svg{fill:#b08bff}.mrow-btn[data-mode="bot"] svg{fill:#ff6b8a}
@media (min-width:900px){.home .modes{grid-column:2}}

/* mode moods */
body.m-zen{background:radial-gradient(1100px 700px at 50% 30%,#123a46,#081a24 70%) fixed,#081a24}
body.m-zen .timer small em{color:#5fd0b0}
body.m-blitz .timer{--warn:#ffc81f}
body.m-mystery{background:radial-gradient(1100px 700px at 50% 30%,#2a1b55,#0d0a24 70%) fixed,#0d0a24}
body.m-bot .opps{justify-content:center}

/* account sheet */
.acct-links{display:flex;justify-content:space-between;align-items:center;padding-top:10px;border-top:1px solid var(--line);margin-top:6px}
.textlink.danger,.danger-btn{color:#ff8fa3}
.danger-btn{border-color:rgba(255,143,163,.5)}
.pickbot{width:100%;text-align:left}
.pickbot .mini-btn{background:#fff;color:#14205a;border-color:#fff}
body.m-bot .opps{gap:10px}
body.m-bot .opp{flex:1 1 0;width:auto;min-width:0}
body.m-bot .opp .mb{height:26px}
@media (min-width:900px){body.m-bot .opp{flex:none;width:100%}}

/* ===== fun pass ===== */
/* name with a reroll die */
.name-row{display:grid;grid-template-columns:1fr auto;gap:10px}
.reroll{width:52px;border-radius:16px;border:2px solid var(--line);display:grid;place-items:center}
.reroll svg{width:24px;height:24px;fill:var(--yellow)}
.reroll:active{transform:scale(.94)}
.reroll.spin svg{animation:roll .45s cubic-bezier(.2,.9,.3,1.3)}
@keyframes roll{from{transform:rotate(-200deg) scale(.6)}to{transform:none}}

/* praise word per finished colour: smaller and quicker than the big moments */
.announce b.word{font-size:clamp(26px,6vw,46px);animation:word .9s cubic-bezier(.2,.9,.3,1.3) forwards;color:#fff;text-shadow:0 3px 0 rgba(0,0,0,.25),0 0 18px var(--ac)}
@keyframes word{0%{opacity:0;transform:scale(1.8)}22%{opacity:1;transform:scale(.95)}35%{transform:scale(1)}75%{opacity:1}100%{opacity:0;transform:translateY(-22px)}}

/* Daily reveal */
#dtime{font-size:clamp(44px,12vw,64px);font-variant-numeric:tabular-nums;line-height:1}
.stars .star.pre{opacity:0;transform:scale(.3)}
.stars .star.pop{animation:starpop .45s cubic-bezier(.2,.9,.3,1.5)}
@keyframes starpop{from{opacity:0;transform:scale(.3) rotate(-40deg)}to{opacity:1;transform:none}}
#drank{transition:opacity .4s,transform .4s;line-height:1.5}
#drank.pre{opacity:0;transform:translateY(8px)}
#drank b{color:#fff;font-size:1.25em}
.beat{color:var(--good);font-weight:600}
.gapline{color:var(--yellow);font-weight:600}
.lbme{margin:0;line-height:1.5;color:var(--dim)}
.lbme b{color:#fff}

/* leaderboard and rankings: hairline rows, flat medals */
.rank{gap:0}
.rank div{background:none;border-radius:0;border-top:1px solid var(--line);padding:12px 2px}
.rank div:last-of-type{border-bottom:1px solid var(--line)}
.rank div.win,.rank div.me{background:none;box-shadow:none}
.rank div.me .nm{color:#5fd0ff}
.rank div.gap{margin-top:10px}
.rank .pl{display:grid;place-items:center;width:26px}
.medal{width:22px;height:22px}
.medal.m0{fill:#ffc81f}.medal.m1{fill:#c9d3e8}.medal.m2{fill:#e0884a}
.board{max-height:46vh;overflow-y:auto}

/* Ring Word bonus round */
.wb-sub{font-size:14px!important}
.wb-top{display:flex;justify-content:space-between;align-items:baseline;border-bottom:1px solid var(--line);padding-bottom:8px}
.wb-top b{font-size:30px;font-variant-numeric:tabular-nums}
.wb-top b.low{color:#ff6b8a}
.wb-top span{color:var(--yellow);font-weight:700;font-size:18px}
.wb-word{min-height:46px;font-size:30px;font-weight:700;letter-spacing:.14em;color:#fff;display:grid;place-items:center}
.wb-word.ok{color:var(--good);animation:wbok .5s ease-out}
.wb-word.no{color:#ff8fa3;font-size:18px;letter-spacing:.02em;animation:wbno .4s}
@keyframes wbok{from{transform:scale(1.25)}}
@keyframes wbno{20%,60%{transform:translateX(-6px)}40%,80%{transform:translateX(6px)}}
.wb-rings{display:flex;flex-wrap:wrap;justify-content:center;gap:10px}
.wb-ring{width:54px;height:54px;border-radius:50%;background:var(--c);color:#fff;font-size:24px;font-weight:700;box-shadow:inset 0 -5px 0 rgba(0,0,0,.22);display:grid;place-items:center;transition:transform .1s,opacity .15s}
.wb-ring:active{transform:scale(.9)}
.wb-ring:disabled{opacity:.25;transform:scale(.88)}
.wb-ctrl{display:grid;grid-template-columns:auto 1fr 1fr;gap:10px;align-items:center}
.wb-btn{width:50px;height:50px;border-radius:50%;border:1.5px solid var(--line);display:grid;place-items:center}
.wb-btn svg{width:22px;height:22px;fill:var(--ink)}
.wb-ctrl .btn{padding:12px 10px}
.wb-found{min-height:1.4em;font-size:15px!important;line-height:1.6!important;text-transform:uppercase;letter-spacing:.04em}
.wb-found .big{color:var(--yellow);font-weight:700}
@media (max-width:360px){.wb-ring{width:46px;height:46px;font-size:20px}.wb-rings{gap:8px}}
.wb-msg{margin:-8px 0 0;min-height:1.3em;font-size:14px;font-weight:600;color:var(--dim)}
.wb-msg.ok{color:var(--good);animation:wbok .45s ease-out}
.wb-msg.no{color:#ff8fa3;animation:wbno .4s}
.mrow-btn[data-mode="word"] svg{fill:#5fd0ff}
/* daily gift row */
.gift{display:flex;align-items:center;gap:14px;padding:12px 4px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);text-align:left;width:100%}
.gift svg{flex:none;width:28px;height:28px;fill:var(--yellow);animation:giftw 2.4s ease-in-out infinite}
.gift span{display:flex;flex-direction:column;gap:2px}.gift b{font-size:17px}.gift small{font-size:13px;color:var(--dim)}
@keyframes giftw{0%,70%,100%{transform:none}75%{transform:rotate(-12deg)}85%{transform:rotate(10deg)}92%{transform:rotate(-5deg)}}
.giftdays{display:grid;grid-template-columns:repeat(7,1fr);gap:6px}
.giftdays i{font-style:normal;font-weight:700;padding:8px 0;border-bottom:2px solid var(--line);color:var(--dim)}
.giftdays i.got{color:var(--good);border-color:var(--good)}
.giftdays i.now{color:var(--yellow);border-color:var(--yellow)}
@media (min-width:900px){.home .gift{grid-column:2}}

/* Daily result: fits one phone screen, no scrolling */
.dsum{display:flex;flex-direction:column;gap:12px}
.dsum .dhead{display:flex;align-items:center;justify-content:center;gap:22px}
.dsum .dhead > div:first-child{display:flex;flex-direction:column;align-items:center;gap:6px}
.dsum #dtime{font-size:clamp(40px,11vw,54px)}
.dsum .star{width:28px;height:28px}
.dsum .sqgrid{gap:3px}
.dsum .sqgrid div{gap:3px}
.dsum .sqgrid i{width:13px;height:13px;border-radius:3px}
.dsum .dmeta{font-size:14px}
.dsum #drank{font-size:15px;line-height:1.4}
.dsum .statrow{padding:8px 0}
.dsum .statrow b{font-size:22px}
.dsum .statrow span{font-size:11px}
.dline{display:flex;justify-content:space-between;align-items:baseline;gap:12px}
.ddist{display:flex;gap:12px;font-size:13px;font-weight:600;color:var(--dim)}
.ddist .today{color:#38e07c}
.dline .nextin{border:0;padding:0;gap:8px}
.dline .nextin span{font-size:13px}
.dline .nextin b{font-size:18px}
.row3{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;width:100%}
.row3.two{grid-template-columns:1fr}
.row3 .btn{padding-left:6px;padding-right:6px;font-size:15px}
.dlinks{display:flex;justify-content:center;gap:6px;margin-top:-4px}
.dlinks .textlink{font-size:14px;padding:4px 8px}
@media (max-height:700px){.dsum{gap:9px}.dsum #dtime{font-size:40px}.dsum .star{width:24px;height:24px}}

/* coins and move limits */
.coin{display:inline-block !important;width:1em;height:1em;fill:#ffc81f;vertical-align:-.14em;margin:0 .25em 0 0;flex:none}
.pf-coins{margin-left:auto;display:inline-flex;align-items:center;gap:2px;font:inherit;font-weight:700;color:#fff;background:none;border:0;padding:2px 0;cursor:pointer;font-variant-numeric:tabular-nums}
.coinline{color:#ffc81f !important;font-weight:600}
.ctag{font-style:normal;font-size:11px;font-weight:600;color:#ffc81f;margin-left:6px;letter-spacing:.02em}
.movesleft{font-weight:700;font-variant-numeric:tabular-nums}
.movesleft.low{color:#ff7a2f}
.slist{display:flex;flex-direction:column;text-align:left}

/* climb twists: small labels pinned above rods */
#twists{position:absolute;inset:0;pointer-events:none;z-index:3}
.twb{position:absolute;transform:translate(-50%,-100%);display:inline-flex;align-items:center;gap:4px;font-weight:700;font-size:13px;color:#fff;font-variant-numeric:tabular-nums;text-shadow:0 1px 2px rgba(0,0,0,.6)}
.twb svg{width:18px;height:18px;fill:currentColor}
.twb i{display:inline-block;width:10px;height:10px;border-radius:50%}
.tw-ice{color:#8fd8ff}
.tw-lock{color:#d7dbea}
.tw-fog{color:#aab3d6}
.bombl{display:inline-flex;align-items:center;gap:3px;color:#ff7a2f}
.bombl svg{width:13px;height:13px;fill:currentColor}
.bombl i{display:inline-block;width:8px;height:8px;border-radius:50%}

/* level clear: earned rewards, plain rows and hairlines */
.rmeta{font-size:14px}
.rw{display:flex;flex-direction:column;gap:6px;text-align:left;border-top:1px solid var(--line);padding-top:12px}
.rw-row{display:flex;justify-content:space-between;align-items:baseline;font-size:15px;color:var(--dim)}
.rw-row b{color:#fff;font-size:20px;font-variant-numeric:tabular-nums}
.rw-row.coinrow b,.rw-row.chestrow b{color:#ffc81f}
.rw-row.coinrow{margin-top:8px}
.rw-sub{font-size:12px;color:var(--dim)}
.rw-sub.up{color:#38e07c;font-weight:700}
.xpbar{height:4px;border-radius:2px;background:rgba(255,255,255,.12);overflow:hidden}
.xpbar i{display:block;height:100%;background:#5fd0ff;transition:width .7s cubic-bezier(.2,.8,.2,1)}
.chesttrack{display:flex;justify-content:space-between;align-items:center;font-size:12px;color:var(--dim);margin-top:8px;border-top:1px solid var(--line);padding-top:10px}
.chesttrack .ticks{display:flex;gap:4px}
.chesttrack .ticks i{width:14px;height:4px;border-radius:2px;background:rgba(255,255,255,.14)}
.chesttrack .ticks i.on{background:#ffc81f}
.chestrow{margin-top:8px;border-top:1px solid var(--line);padding-top:10px}
.chestrow.pop b{animation:starpop .45s cubic-bezier(.2,.9,.3,1.5)}
