/* Onboarding polish pass. Loaded last: one header, one Back, the approved wordmark everywhere,
   press feedback, staggered options, the merged tour and the results screen under the shell header. */

/* One header on every screen: same height, same wordmark. */
header,.is-game header{min-height:76px!important;padding-top:calc(14px + var(--onboarding-safe-top,env(safe-area-inset-top)))!important;padding-bottom:12px!important}
header .brand{justify-self:center;display:block;font-size:23px!important;width:3.05246em;height:1.1em;overflow:hidden;background:url("/demos/jplay/app/assets/brand/jplay-approved.svg") center/100% auto no-repeat;color:transparent!important;-webkit-text-stroke:0!important;text-indent:200%;white-space:nowrap}

/* One Back: chevron + text, the same weight as Close. No pill. */
.back{background:transparent!important;box-shadow:none!important;border-radius:12px!important;padding:8px 0!important;color:var(--ink)!important;font-weight:650!important}

/* Progress: present on every step except welcome, games and the last screen; it eases between steps. */
body:not(.is-welcome):not(.is-game):not(.is-finish) .progress{display:flex!important;visibility:visible!important}
.is-welcome .progress,.is-game .progress,.is-finish .progress{display:none!important}
.track i{transition:width .45s cubic-bezier(.2,.8,.2,1)}

/* Press feedback. */
.primary,.secondary,.experience-option,.tour-row{transition:transform .16s cubic-bezier(.2,.8,.2,1)}
.primary:active,.secondary:active,.experience-option:active,.tour-row:active{transform:scale(.97)}

/* Option cards rise in, one after another. */
.experience-option{animation:jp-rise .44s cubic-bezier(.2,.8,.2,1) both}
.experience-option:nth-child(2){animation-delay:.05s}
.experience-option:nth-child(3){animation-delay:.1s}
@keyframes jp-rise{from{opacity:0;transform:translateY(14px)}}

/* Welcome: Get Started arrives after the orb has had a moment. */
.is-welcome #actions>*{transition:opacity .5s ease,transform .6s cubic-bezier(.2,.8,.2,1)}
#actions.is-waiting>*{opacity:0;visibility:hidden;transform:translateY(14px)}

/* Results screen is full-bleed: the celebration floods the whole display and the shell header
   floats transparently on top (its own top bar is hidden inside the frame). */
.is-results header{position:fixed;top:0;left:0;right:0;z-index:10;background:transparent!important}
.is-results .progress{position:fixed;left:0;right:0;top:calc(76px + var(--onboarding-safe-top,env(safe-area-inset-top)));z-index:10;background:transparent}
.is-results main{position:fixed;inset:0;padding:0;overflow:hidden;z-index:1}
.is-results main>iframe{display:block;width:100%;height:100%;border:0}
.is-results footer{display:none!important}

/* Merged tour: phone preview above three dense rows that double as tabs. */
.tour{display:flex;flex-direction:column;align-items:center;height:100%;gap:10px;text-align:center}
.tour h1{margin:2px 0 0}
.tour .feature-visual{flex:1;min-height:0;width:100%}
.tour-list{display:grid;gap:6px;width:100%;max-width:420px;padding-bottom:4px}
.tour-row{position:relative;overflow:hidden;display:grid;grid-template-columns:auto 1fr;align-items:baseline;column-gap:10px;text-align:left;border:0;border-radius:14px;padding:10px 14px;background:transparent;color:var(--ink);font:inherit;cursor:pointer}
.tour-row b{font-size:15px;font-weight:800;white-space:nowrap}
.tour-row span{font-size:13px;line-height:1.35;opacity:.72}
.tour-row[aria-selected=true]{background:#ffffff;box-shadow:0 0 0 1px #183e4914,0 6px 16px #183e4910}
.tour-row[aria-selected=true] span{opacity:.9}
.tour-timer{position:absolute;left:14px;right:14px;bottom:5px;height:2px;border-radius:2px;background:#183e49;opacity:0;transform-origin:left;transform:scaleX(0)}
.tour-row.is-auto .tour-timer{opacity:.35;animation:jp-tour-timer var(--tour-ms,5s) linear both}
@keyframes jp-tour-timer{to{transform:scaleX(1)}}

/* Placement result: stages tick off, the rank orb lands and bursts, then a fast near-term forecast. */
.rank-result{display:flex;flex-direction:column;align-items:center;text-align:center;gap:6px;padding-top:2px}
.rank-eyebrow{margin:0;font-size:13px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:var(--ink);opacity:.6}
.rank-stages{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;margin:4px 0 0;padding:0;list-style:none}
.rank-stages li{display:flex;align-items:center;gap:5px;padding:5px 10px 5px 6px;border-radius:999px;font-size:12.5px;font-weight:750;color:var(--ink);background:#183e490a}
.rank-stages i{display:grid;place-items:center;width:18px;height:18px;border-radius:50%;font-size:11px;font-style:normal;font-weight:900;color:#fff}
.rank-stages li[data-state=done] i{background:#3fae78}.rank-stages li[data-state=here]{background:color-mix(in srgb,var(--rank) 22%,#fff)}.rank-stages li[data-state=here] i{background:var(--rank);font-size:8px}
.rank-stages li[data-state=next]{opacity:.45}.rank-stages li[data-state=next] i{border:1.5px solid #183e4955}
.rank-stage-area{position:relative;display:grid;place-items:center;width:100%;margin:8px 0 4px}
.rank-burst{position:absolute;left:-16px;right:-16px;top:-120px;bottom:-160px;width:calc(100% + 32px);height:calc(100% + 280px);pointer-events:none;z-index:3}
.rank-badge{position:relative;display:grid;place-items:center;width:132px;height:132px;border-radius:50%;
 background:radial-gradient(circle at 32% 26%,#ffffffb0 0 8%,transparent 32%),radial-gradient(circle at 50% 60%,var(--rank),color-mix(in srgb,var(--rank) 62%,#183e49));
 box-shadow:inset 0 -10px 18px #00000024,0 14px 26px color-mix(in srgb,var(--rank) 40%,transparent);transform-origin:50% 90%}
.rank-badge span{font-size:46px;font-weight:950;color:#fff4d8;letter-spacing:-.02em;text-shadow:0 2px 0 color-mix(in srgb,var(--rank-ink) 50%,transparent)}
.rank-ring{position:absolute;inset:-2px;border-radius:50%;border:4px solid var(--rank);opacity:0;pointer-events:none}
.rank-result h1{margin:2px 0 0;font-size:36px}
.rank-start{margin:2px 0 0;font-size:17px;color:var(--ink)}
.rank-skip{margin:0;font-size:15px;color:var(--ink);opacity:.8}.rank-skip b{font-size:17px}
.rank-predict{width:100%;max-width:380px;margin-top:12px;padding:14px 14px 10px;border-radius:20px;background:#ffffff;box-shadow:0 0 0 1px #183e4912,0 8px 20px #183e490d}
.rank-eta{display:grid;gap:3px;margin:0 0 12px;font-size:16px;line-height:1.35;color:var(--ink)}.rank-next:empty{display:none}
.goal-chips{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}
.goal-chip{min-height:44px;border:0;border-radius:14px;background:#183e490d;color:var(--ink);font:inherit;font-size:13.5px;font-weight:750;cursor:pointer;transition:transform .16s cubic-bezier(.2,.8,.2,1),background .2s}
.goal-chip[aria-checked=true]{background:var(--ink);color:#fff}
.goal-chip:active{transform:scale(.96)}
.rank-note{margin:9px 0 0;font-size:11.5px;line-height:1.4;color:var(--ink);opacity:.55}
@media(max-height:720px){.rank-badge{width:96px;height:96px}.rank-badge span{font-size:34px}.rank-result h1{font-size:28px}.rank-predict{margin-top:6px;padding:10px}.rank-stages li{font-size:11px;padding:3px 8px 3px 4px}.rank-eyebrow{display:none}}

/* Short screens: only the active row keeps its description, so the preview stays readable. */
@media(max-height:720px){
 .tour{gap:6px}.tour h1{font-size:26px}
 .tour-row{padding:7px 12px}
 .tour-row:not([aria-selected=true]) span{display:none}
}
@media(prefers-reduced-motion:reduce){
 .experience-option{animation:none}
 .tour-row.is-auto .tour-timer{animation:none;opacity:0}
}
