/* Daily streak moment: the rolling 7 day row, the chain, the sequence, the milestone variant. New classes start with rk-stk-; the existing stk* and moment
   classes keep their look. Motion is transform and opacity only, and reduced motion shows the end state (the script skips the sequence). */
#stkMoment{min-height:100vh;min-height:100svh;background:#fff}
#stkMoment .mbox{gap:10px;width:100%;max-width:360px;position:relative;z-index:1}
/* the back plane: the number huge and faint (rkDepth), and a soft coral glow behind the flame. Full screen on every size, never a card. */
.rk-stk-back{position:fixed;inset:0;z-index:0;pointer-events:none;overflow:hidden}
.rk-stk-glow{position:absolute;left:50%;top:30%;width:min(120vw,900px);height:min(120vw,900px);transform:translate(-50%,-50%);background:radial-gradient(closest-side,rgba(238,124,91,.2),rgba(238,124,91,.08) 55%,rgba(238,124,91,0))}
.rk-stk-back .rk-depth b{margin:0}
/* the middle plane: a coral flame with Rokka standing in front of its lower half */
.rk-stk-stage{position:relative;width:260px;height:300px;display:flex;align-items:flex-end;justify-content:center}
.rk-stk-flame{position:absolute;left:50%;bottom:34px;width:200px;height:260px;margin-left:-100px;transform-origin:50% 100%;overflow:visible}
.rk-stk-flame .fl-a{fill:var(--coral)}.rk-stk-flame .fl-b{fill:#F6A98F}
.rk-stk-shadow{position:absolute;left:50%;bottom:6px;width:150px;height:22px;margin-left:-75px;border-radius:50%;background:radial-gradient(closest-side,rgba(21,23,28,.22),rgba(21,23,28,0))}
.rk-stk-stage .mpiece{width:210px;height:210px;object-fit:contain;filter:none}
.rk-stk-masc{position:relative;z-index:1;filter:none;display:grid;place-items:center;margin-bottom:8px}
#stkMoment .rk-stk-masc{animation:none!important}
#stkMoment .stkn b{font-size:120px;font-weight:700;color:var(--coral);letter-spacing:-.04em}
#stkMoment .stkn small{margin-top:0;font-family:"Sora";font-size:20px;font-weight:600;color:var(--coral)}
/* the number turns over in place (a flip around its middle), so it never slides onto the line under it */
#stkMoment .stkn{perspective:400px}
#stkMoment.on .stkn b{animation-name:rk-stk-in}
@keyframes rk-stk-in{0%{opacity:0;transform:scale(.92)}100%{opacity:1;transform:none}}
#stkMoment.on .rk-stk-flame{animation:rk-stk-grow .5s cubic-bezier(.2,.8,.2,1) both,rk-stk-flick 2.4s ease-in-out .5s infinite}
@keyframes rk-stk-grow{0%{transform:scale(.6);opacity:0}100%{transform:scale(1);opacity:1}}
@keyframes rk-stk-flick{0%,100%{transform:scale(1)}50%{transform:scale(1.03)}}
#stkMoment:not(.rk-stk-p1) .mpiece{opacity:.8}
#stkMoment.rk-stk-p1:not(.rk-stk-final) .mpiece{animation:rk-stk-hop .6s cubic-bezier(.2,.8,.2,1) both}
@keyframes rk-stk-hop{0%{transform:translateY(0)}35%{transform:translateY(-16px)}70%{transform:translateY(0) scale(1.04,.96)}100%{transform:none}}
/* the week card */
.rk-stk-card{width:100%;box-sizing:border-box;padding:16px;border-radius:20px;background:#fff;border:1px solid var(--hair);box-shadow:0 10px 24px -16px rgba(21,23,28,.28)}
.rk-stk-week{gap:6px;margin:0;justify-content:space-between}
@keyframes rk-stk-ring{0%,100%{transform:scale(.92);opacity:.95}50%{transform:scale(1.1);opacity:.45}}
.rk-wk-d.on .rk-wk-ck{animation:none}
#stkMoment .rk-wk-d.on .rk-wk-ck{transform:scale(1)}
.rk-stk-bank{display:flex;align-items:center;justify-content:center;gap:6px;font-size:14px;color:var(--mute);margin:2px 0 0}
.rk-stk-bank svg{width:16px;height:16px;flex:none;fill:#9DC3EE;stroke:#4F7FC4;stroke-width:1.8;stroke-linejoin:round}
#stkMoment #stkLine{margin:0 0 6px;font-size:14px;line-height:1.4;color:var(--mute);font-weight:500}
#stkMoment #stkLine:empty{display:none}
/* one main button; on an ordinary day Share is a quiet text button under Continue, on a milestone Share is the dark one above it */
#stkMoment .mbox .btn{width:100%;box-sizing:border-box}
#stkMoment .btn[data-go]{order:1}
#stkMoment #stkShare{order:2}
#stkMoment.rk-stk-ms #stkShare{order:1}
#stkMoment.rk-stk-ms .btn[data-go]{order:2}
#stkMoment:not(.rk-stk-ms) #stkShare{background:none;box-shadow:none;border:0;height:40px;min-height:0;color:var(--mute);font-weight:600}
#stkMoment:not(.rk-stk-ms) #stkShare::after{display:none}
@media (max-height:780px){.rk-stk-stage .mpiece{width:170px;height:170px}.rk-stk-stage{width:220px;height:250px}.rk-stk-flame{width:160px;height:208px;margin-left:-80px;bottom:28px}.rk-stk-shadow{width:120px}#stkMoment .stkn b{font-size:96px}#stkMoment .mbox{gap:8px}.rk-stk-card{padding:12px 16px}}
#stkMoment .btn{position:relative;overflow:hidden}
#stkMoment .btn::after{content:"";position:absolute;top:0;bottom:0;left:-60%;width:40%;background:linear-gradient(100deg,transparent,rgba(255,255,255,.55),transparent);transform:skewX(-20deg);opacity:0;pointer-events:none}
#stkMoment.rk-stk-p4:not(.rk-stk-final) .btn.dark::after{animation:rk-stk-shim 1.1s ease-in-out both}
@keyframes rk-stk-shim{0%{left:-60%;opacity:0}20%{opacity:1}100%{left:130%;opacity:0}}
/* milestone days */
.rk-stk-badge{padding:6px 16px;border-radius:999px;background:linear-gradient(160deg,#FFFFFF 0%,#E3E7EC 40%,#F7F8FA 55%,#C9CFD8 100%);box-shadow:inset 0 0 0 1px rgba(255,255,255,.9),0 10px 20px -12px rgba(21,23,28,.5);font-family:"Sora";font-size:12px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--ink)}
.rk-stk-badge:empty{display:none}
#stkMoment.rk-stk-ms:not(.rk-stk-p1) .rk-stk-badge{opacity:0;transform:scale(.7)}
#stkMoment.rk-stk-ms.rk-stk-p1:not(.rk-stk-final) .rk-stk-badge{animation:rk-stk-badge .55s cubic-bezier(.2,.8,.2,1) .5s both}
@keyframes rk-stk-badge{0%{opacity:0;transform:translateY(8px) scale(.7)}100%{opacity:1;transform:none}}
#stkMoment.rk-stk-ms .stkn small{font-size:20px;letter-spacing:-.02em}
.rk-stk-clip{position:fixed;inset:0;overflow:hidden;pointer-events:none}
.rk-stk-burst{position:absolute;width:0;height:0}
.rk-stk-conf{position:absolute;left:0;top:0;display:block;opacity:0;will-change:transform,opacity}
@media (max-width:359px){.rk-stk-week{gap:3px}.rk-stk-card{padding:12px}}
@media (prefers-reduced-motion:reduce){#stkMoment.on .rk-stk-flame,#stkMoment.rk-stk-p1:not(.rk-stk-final) .mpiece{animation:none}.rk-wk-d.today::after{animation:none}.rk-wk-d.on .rk-wk-fill{transition:none}.rk-wk-ck{transition:none}}

/* the one week row (weekRow in streak.js): Train 32px, moments 36px */
.rk-wk-d{position:relative;display:flex;flex-direction:column;align-items:center;gap:6px;--wk:32px}
.rk-wk-d.stkd{--wk:36px}
.rk-wk-d small{font-size:11px;font-weight:600;color:#6F7885}
.rk-wk-d i{position:relative;overflow:hidden;display:grid;place-items:center;width:var(--wk);height:var(--wk);border-radius:50%;background:transparent;box-shadow:inset 0 0 0 1.5px #CDD3DB}
.rk-wk-fill{position:absolute;inset:0;border-radius:50%;background:var(--coral);transform:scale(0)}
.rk-wk-d.on i,.rk-wk-d.fz i{box-shadow:none}
.rk-wk-d.on .rk-wk-fill{transform:scale(1);transition:transform .32s cubic-bezier(.34,1.56,.64,1)}
.rk-wk-ck{position:relative;z-index:1;width:16px;height:16px;color:#fff;opacity:0;transition:opacity .2s .12s}
.rk-wk-d.on .rk-wk-ck{opacity:1}
.rk-wk-d.pre .rk-wk-fill{background:#DDE2E8}.rk-wk-d.pre .rk-wk-ck{color:var(--ink)}
.rk-wk-d.fz i{background:#DCEBFA}.rk-wk-d.fz .rk-wk-fill{display:none}
.rk-wk-sh{position:relative;z-index:1;width:18px;height:18px;fill:#9DC3EE;stroke:#4F7FC4;stroke-width:1.8;stroke-linejoin:round}
.rk-wk-d.today:not(.on)::after{content:"";position:absolute;left:50%;bottom:-4px;width:calc(var(--wk) + 8px);height:calc(var(--wk) + 8px);margin-left:calc((var(--wk) + 8px) / -2);border-radius:50%;box-shadow:inset 0 0 0 2px var(--coral);animation:rk-stk-ring 1.3s ease-in-out infinite;pointer-events:none}
@media (max-width:359px){.rk-wk-d.stkd{--wk:30px}}

/* the freeze sheet: a bottom sheet on phones; the full screen page rules are in desktop.css */
#fzSheet{z-index:96}
.rk-fz-back{display:none}
.rk-fz-body{display:grid;justify-items:center;gap:10px;text-align:center;padding:22px 20px calc(22px + env(safe-area-inset-bottom))}
.rk-fz-masc{display:grid;place-items:center;min-height:160px}
#fzTitle{font-family:"Sora";font-size:20px;font-weight:600;letter-spacing:-.02em;line-height:1.25;margin:2px 0 0;max-width:320px}
#fzSub{font-size:15px;color:var(--mute);margin:0 0 8px;line-height:1.4}
#fzSheet .btn{width:100%;box-sizing:border-box}

/* the at-risk nudge (from 6 PM, streak of 2 or more, today not done): the pill pulses gently, and the Up next card carries Rokka with the line */
.spill[data-risk="1"]{animation:rk-risk 4s ease-in-out infinite}
@keyframes rk-risk{0%,100%{opacity:1}50%{opacity:.55}}
.trnext.risk{flex-wrap:wrap;row-gap:10px}
.rk-risk{flex:1 0 100%;display:flex;align-items:flex-end;gap:10px;padding-top:2px}
.rk-risk-m{flex:0 0 auto;display:block}
.rk-risk-say{position:relative;flex:1;min-width:0;margin-bottom:14px;padding:9px 13px;border-radius:16px;background:#fff;border:1px solid #DDE2E8;box-shadow:0 12px 26px -16px rgba(21,23,28,.45);font-size:15px;line-height:1.3;color:var(--ink)}
.rk-risk-say::after{content:"";position:absolute;left:-7px;bottom:14px;width:12px;height:12px;background:#fff;border-left:1px solid #DDE2E8;border-bottom:1px solid #DDE2E8;transform:rotate(45deg)}
/* one Rokka on screen: when another one is showing (the docked practice coach on desktop) the line stands alone */
.rk-risk:has(.rk-solo-off) .rk-risk-m{display:none}
.rk-risk:has(.rk-solo-off) .rk-risk-say{margin-bottom:0}.rk-risk:has(.rk-solo-off) .rk-risk-say::after{display:none}
@media (prefers-reduced-motion:reduce){.spill[data-risk="1"]{animation:none}}
