/* JAMB: The Journey - styles. Everything is scoped to .jr so it cannot clash with site.css. */
.jr [hidden] { display: none !important; }
.jr kbd { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); border-radius: 5px; padding: 0 .4rem; font-size: .8em; color: inherit; }
.jr__frame { max-width: 980px; margin-inline: auto; }
.jr__stage {
    position: relative; overflow: hidden; border-radius: var(--radius-lg, 24px); background: #08140f; color: #fff;
    height: clamp(340px, 52vw, 520px); box-shadow: var(--shadow-lg); border: 1px solid rgba(255,255,255,.08); user-select: none; -webkit-user-select: none;
}
.jr__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: manipulation; }
.jr--playing .jr__canvas { touch-action: none; cursor: pointer; }

/* HUD */
.jr__hud { position: absolute; left: 0; right: 0; top: 0; padding: .6rem .7rem 0; pointer-events: none; z-index: 2; }
.jr__hud-top { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; }
.jr__spacer { flex: 1; }
.jr__chip { display: inline-flex; align-items: center; gap: .35rem; padding: .22rem .65rem; border-radius: 99px; font-size: .78rem; font-weight: 700; background: rgba(5,14,10,.72); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(4px); white-space: nowrap; }
.jr__lbl { font-weight: 500; opacity: .7; }
.jr__lives { color: #ff7a8a; letter-spacing: .05em; }
.jr__combo { color: #FFC107; }
.jr__pow { display: none; color: var(--primary-light, #26d07c); }
.jr__pow--slow { color: #0dcaf0; }
.jr__pow.is-on { display: inline-flex; }
.jr__btn { pointer-events: auto; width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); background: rgba(5,14,10,.72); color: #fff; display: grid; place-items: center; font-size: 1.05rem; cursor: pointer; }
.jr__btn:hover, .jr__btn:focus-visible { background: rgba(255,255,255,.18); outline: 2px solid var(--primary-light, #26d07c); outline-offset: 2px; }
.jr__track { height: 5px; margin-top: .5rem; border-radius: 4px; background: rgba(255,255,255,.14); overflow: hidden; }
.jr__track i { display: block; height: 100%; width: 100%; transform: scaleX(0); transform-origin: 0 50%; background: linear-gradient(90deg, var(--primary-light, #26d07c), #FFC107); transition: transform .25s linear; }
.jr__miles { display: flex; justify-content: space-between; margin-top: .3rem; font-size: .66rem; font-weight: 600; color: rgba(255,255,255,.5); }
.jr__miles span.is-done { color: var(--primary-light, #26d07c); }
.jr__miles span.is-done::before { content: "\2713 "; }
@media (max-width: 575px) {
    .jr__stage { height: 480px; }
    .jr__miles { display: none; } .jr__score .jr__lbl { display: none; }
    .jr__stat { min-width: 76px; padding: .35rem .5rem; } .jr__stat b { font-size: 1.15rem; }
    .jr__text { margin-bottom: .7rem; font-size: .92rem; } .jr__board { margin-bottom: .7rem; }
    .jr__stats:not([hidden]) ~ .jr__hint { display: none; }
}

/* Quiz */
.jr__quiz { position: absolute; inset: 0; z-index: 3; display: flex; padding: 3.2rem .7rem .7rem; background: rgba(4,10,7,.82); overflow-y: auto; }
.jr__quiz-card { margin: auto; width: min(640px, 100%); }
.jr__quiz-meta { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--primary-light, #26d07c); margin-bottom: .4rem; }
.jr__timer { height: 6px; border-radius: 4px; background: rgba(255,255,255,.14); overflow: hidden; margin-bottom: .8rem; }
.jr__timer i { display: block; height: 100%; transform-origin: 0 50%; background: var(--primary-light, #26d07c); }
.jr__timer i.is-low { background: #ff4757; }
.jr__q { font-size: clamp(1rem, 2.4vw, 1.3rem); font-weight: 700; line-height: 1.35; margin: 0 0 .8rem; color: #fff; }
.jr__opts { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.jr__opt { text-align: left; padding: .65rem .85rem; border-radius: 12px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.07); color: #fff; font-size: .95rem; cursor: pointer; transition: background .2s, border-color .2s; }
.jr__opt:hover:not(:disabled), .jr__opt:focus-visible { background: rgba(255,255,255,.16); border-color: var(--primary-light, #26d07c); outline: none; }
.jr__opt:disabled { cursor: default; }
.jr__opt.is-correct { background: rgba(38,208,124,.25); border-color: var(--primary-light, #26d07c); }
.jr__opt.is-wrong { background: rgba(255,71,87,.25); border-color: #ff4757; }
.jr__feed { min-height: 1.4em; margin: .7rem 0 0; font-size: .9rem; color: #d6ffe5; }

/* Overlay (intro / pause / stage clear / game over) */
.jr__overlay { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; padding: 3.4rem 1rem 1rem; background: rgba(4,10,7,.78); backdrop-filter: blur(3px); overflow-y: auto; }
.jr__overlay[hidden] { display: none; }
.jr__card { width: min(460px, 100%); text-align: center; margin: auto; }
.jr__title { color: #fff; font-size: clamp(1.4rem, 3.5vw, 2rem); font-weight: 900; margin: 0 0 .4rem; }
.jr__text { color: rgba(255,255,255,.85); margin: 0 0 1rem; }
.jr__stats { display: flex; justify-content: center; gap: .6rem; margin-bottom: 1rem; flex-wrap: wrap; }
.jr__stat { min-width: 90px; padding: .5rem .8rem; border-radius: 12px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); }
.jr__stat b { display: block; font-size: 1.4rem; line-height: 1.1; color: #FFC107; }
.jr__stat span { font-size: .72rem; opacity: .75; }
.jr__board { text-align: left; margin: 0 auto 1rem; max-width: 300px; padding: .6rem .9rem; border-radius: 12px; background: rgba(255,255,255,.06); }
.jr__board h4 { font-size: .85rem; margin: 0 0 .4rem; color: #FFC107; }
.jr__board ol { margin: 0; padding-left: 1.2rem; font-size: .85rem; }
.jr__board li span { opacity: .75; }
.jr__board li b { float: right; }
.jr__actions { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; }
.jr__hint { margin: .9rem 0 0; font-size: .8rem; color: rgba(255,255,255,.65); }
.jr__help { margin: .8rem 0 0; text-align: center; font-size: .85rem; color: var(--text-secondary); }
.jr__help kbd { background: var(--bg-card); border-color: var(--border-color); color: var(--text-primary); }
.jr__yellow { color: #d9a400; } .jr__red { color: #e0354a; }

/* Share modal */
.jr__modal { position: fixed; inset: 0; z-index: 4000; display: grid; place-items: center; padding: 1rem; background: rgba(0,0,0,.75); }
.jr__modal-card { background: var(--bg-card); color: var(--text-primary); border-radius: var(--radius); padding: 1rem; width: min(380px, 100%); text-align: center; }
.jr__modal-card img { width: 100%; height: auto; border-radius: 12px; margin-bottom: .8rem; }

/* Data saver + reduced motion */
html[data-saver="on"] .jr { display: none; }
@media (prefers-reduced-motion: reduce) { .jr__track i, .jr__opt { transition: none; } }

/* ===== Game entry points: top strip + floating avatar ===== */
.jr { scroll-margin-top: 90px; }
.jr__stage.jr--spot { box-shadow: 0 0 0 4px var(--primary-light, #26d07c), 0 0 48px rgba(38,208,124,.55); transition: box-shadow .4s; }

.jr-av { display: block; width: 100%; height: 100%; overflow: visible; }
.jr-av__bg { fill: #08140f; stroke: var(--primary-light, #26d07c); stroke-width: 2; }
.jr-av__ground { stroke: rgba(255,255,255,.22); stroke-width: 2; stroke-linecap: round; fill: none; }
.jr-av__line { stroke: #FFC107; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.jr-av__pack { fill: var(--primary-light, #26d07c); }
.jr-av__arm, .jr-av__leg { transform-box: view-box; animation: jr-swing .5s ease-in-out infinite alternate; }
.jr-av__arm { transform-origin: 33px 27px; }
.jr-av__leg { transform-origin: 32px 38px; }
.jr-av__arm--b, .jr-av__leg--a { animation-direction: alternate-reverse; }
.jr-av__fig { animation: jr-hop 2.6s ease-in-out infinite; }
@keyframes jr-swing { from { transform: rotate(-38deg); } to { transform: rotate(38deg); } }
@keyframes jr-hop { 0%, 72%, 100% { transform: translateY(0); } 84% { transform: translateY(-7px); } }

.jr-strip-wrap { padding: .75rem 0 0; }
.jr-strip {
    position: relative; display: flex; align-items: center; gap: 1rem; overflow: hidden; text-decoration: none; color: #fff;
    padding: .65rem 1rem .8rem .7rem; border-radius: 20px; border: 1px solid rgba(255,255,255,.1);
    background: linear-gradient(120deg, #08140f 0%, #10291d 60%, #0d3a22 100%); box-shadow: var(--shadow-md);
    transition: transform .25s, box-shadow .25s;
}
.jr-strip:hover, .jr-strip:focus-visible { color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.jr-strip:focus-visible { outline: 3px solid var(--secondary, #F6BA66); outline-offset: 3px; }
.jr-strip::after { /* moving track */
    content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 3px; opacity: .5;
    background: repeating-linear-gradient(90deg, rgba(255,255,255,.35) 0 16px, transparent 16px 38px); background-size: 38px 3px;
    animation: jr-track .9s linear infinite;
}
@keyframes jr-track { to { background-position: -38px 0; } }
.jr-strip__av { flex: none; width: 62px; height: 62px; }
.jr-strip__text { min-width: 0; line-height: 1.25; }
.jr-strip__tag { display: inline-block; font-size: .64rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; padding: .1rem .5rem; border-radius: 99px; background: var(--secondary, #F6BA66); color: #3a2500; margin-bottom: .2rem; }
.jr-strip__title { display: block; font-size: 1.1rem; font-weight: 800; }
.jr-strip__sub { display: block; font-size: .85rem; color: rgba(255,255,255,.75); }
.jr-strip__cta {
    margin-left: auto; flex: none; display: inline-flex; align-items: center; gap: .4rem; padding: .55rem 1.2rem; border-radius: 99px;
    background: #FFC107; color: #3a2500; font-weight: 800; font-size: .92rem; white-space: nowrap; animation: jr-glow 2.4s ease-in-out infinite;
}
@keyframes jr-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,193,7,.55); } 50% { box-shadow: 0 0 0 9px rgba(255,193,7,0); } }
@media (max-width: 575px) {
    .jr-strip { gap: .6rem; padding-right: .7rem; } .jr-strip__av { width: 50px; height: 50px; }
    .jr-strip__title { font-size: .95rem; } .jr-strip__sub { display: none; } .jr-strip__cta { padding: .45rem .9rem; font-size: .85rem; }
}

.jr-fab { position: fixed; left: 1rem; bottom: 1rem; z-index: 1400; display: flex; align-items: center; gap: .4rem; opacity: 0; transform: translateY(18px); pointer-events: none; transition: opacity .35s, transform .35s; }
.jr-fab.is-on { opacity: 1; transform: none; pointer-events: auto; }
.jr-fab__btn { display: flex; align-items: center; gap: .55rem; text-decoration: none; color: #073b1d; }
.jr-fab__av { position: relative; flex: none; width: 58px; height: 58px; border-radius: 50%; background: #08140f; box-shadow: 0 8px 24px rgba(0,0,0,.35); transition: transform .25s; }
.jr-fab__av::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--primary-light, #26d07c); opacity: 0; animation: jr-ring 2.6s ease-out infinite; }
@keyframes jr-ring { 0% { transform: scale(.9); opacity: .8; } 100% { transform: scale(1.35); opacity: 0; } }
.jr-fab__btn:hover .jr-fab__av, .jr-fab__btn:focus-visible .jr-fab__av { transform: scale(1.08); }
.jr-fab__btn:focus-visible { outline: 3px solid var(--secondary, #F6BA66); outline-offset: 4px; border-radius: 99px; }
.jr-fab__bubble { background: #fff; color: #073b1d; font-size: .82rem; font-weight: 700; line-height: 1.25; padding: .5rem .8rem; max-width: 170px; border-radius: 14px 14px 14px 4px; box-shadow: 0 6px 20px rgba(0,0,0,.25); opacity: 0; transform: translateX(-8px) scale(.95); pointer-events: none; transition: opacity .3s, transform .3s; }
.jr-fab.has-bubble .jr-fab__bubble { opacity: 1; transform: none; }
.jr-fab__x { width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; font-size: .8rem; line-height: 1; display: grid; place-items: center; cursor: pointer; align-self: flex-start; opacity: 0; transition: opacity .2s; }
.jr-fab:hover .jr-fab__x, .jr-fab:focus-within .jr-fab__x, .jr-fab.has-bubble .jr-fab__x { opacity: 1; }
@media (hover: none) { .jr-fab__x { opacity: 1; } }

html[data-saver="on"] .jr-strip-wrap, html[data-saver="on"] .jr-fab { display: none; }
@media (prefers-reduced-motion: reduce) {
    .jr-av__arm, .jr-av__leg, .jr-av__fig, .jr-strip::after, .jr-strip__cta, .jr-fab__av::after { animation: none; }
    .jr-fab, .jr-strip, .jr-fab__bubble { transition: none; }
}
