/* Part 146: a replay is for watching (replayview146.js). */

/* The full replay: the ride screen goes; only the replay's badge and buttons stay. */
.replaying :is(.hud-top-left,.hud-top-right,.ride-meter,.minimap-wrap,.line-guide,.lap-split,.jump-charge,.speed-lines,.chase-hud,.fps-readout){visibility:hidden}
.replaying :is(#landGrade,#airHud,#trick,#bankFly,#placeBanner,#zone,#touchControls,.lesson){visibility:hidden}
/* A soft shade under the buttons so they read over bright snow without a heavy box over the picture. */
.replaying #hud::after{content:"";position:absolute;left:0;right:0;bottom:0;height:min(260px,36vh);pointer-events:none;background:linear-gradient(180deg,transparent,rgba(4,14,26,.55));transition:opacity .4s ease}
.replay-badge,.replay-controls{transition:opacity .35s ease,transform .35s ease,visibility 0s linear 0s}
/* After a moment of nothing, the buttons step aside and the picture is the whole screen. */
body.replay-quiet .replay-controls{opacity:0;transform:translate(-50%,18px);pointer-events:none;visibility:hidden;transition:opacity .45s ease,transform .45s ease,visibility 0s linear .45s}
body.replay-quiet .replay-badge{opacity:0;transform:translate(-50%,-12px);transition:opacity .45s ease,transform .45s ease}
body.replay-quiet #hud::after{opacity:0}
body.replay-quiet{cursor:none}
.replay-hint{position:absolute;left:50%;bottom:max(18px,env(safe-area-inset-bottom));transform:translateX(-50%);padding:6px 12px;border-radius:999px;background:rgba(4,14,26,.5);color:rgba(242,247,251,.82);font:800 11px/1 var(--body,system-ui);letter-spacing:.12em;text-transform:uppercase;white-space:nowrap;pointer-events:none;opacity:0}
body.replay-quiet .replay-hint{animation:replayHint 3.2s ease .3s both}
@keyframes replayHint{0%{opacity:0}15%{opacity:1}75%{opacity:1}100%{opacity:0}}
body:not(.replaying) .replay-hint{display:none}
/* The buttons: one tidy bar, chapters first. */
.replay-controls{background:rgba(6,18,32,.78);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}
@media(min-width:720px){
  .replay-controls{width:min(760px,calc(100vw - 32px))}
  .replay-moments{flex:1 1 100%}
}

/* Results on a phone: while the best trick plays, its window takes most of the screen; the score slides in under it. */
.result-stage .result-ride-window{transition:min-height .55s cubic-bezier(.2,.8,.2,1)}
@media(max-width:580px){body.results-reel .result-stage .result-ride-window{min-height:clamp(280px,50dvh,500px)}}
@media(min-width:581px) and (max-width:900px){body.results-reel .result-stage .result-ride-window{min-height:clamp(240px,48dvh,480px)}}
/* FULL SCREEN opens the full replay on the best trick. Shown while the reel plays. */
.result-stage .result-watch{display:none;align-items:center;gap:6px;min-height:36px;padding:0 14px;border:1px solid var(--s26-line-strong,rgba(255,255,255,.3));border-radius:var(--s26-r-pill,999px);background:var(--s26-accent,#51b3ff);color:var(--s26-on-accent,#061322);font:900 var(--s26-t-micro,11px)/1 var(--s26-text,system-ui);letter-spacing:.1em;text-transform:uppercase;cursor:pointer;pointer-events:auto;transition:transform var(--s26-press,.12s) var(--s26-ease,ease)}
.result-stage .result-watch svg{width:12px;height:12px}
.result-stage .result-watch:active{transform:scale(.96)}
.result-stage .result-watch:focus-visible{outline:2px solid var(--s26-ice,#bfe6ff);outline-offset:2px}
body.results-reel .result-stage .result-watch{display:inline-flex}
@media(prefers-reduced-motion:reduce){.result-stage .result-ride-window,.replay-badge,.replay-controls{transition:none!important}body.replay-quiet .replay-hint{animation:none}}
body.reduced-motion :is(.result-stage .result-ride-window,.replay-badge,.replay-controls){transition:none!important}
body.reduced-motion.replay-quiet .replay-hint{animation:none}
