/* restandquest.com home: the living map and the journey over it. Shared type and colours are in style.css. */
html { scroll-behavior: smooth; }
body.page-home { overflow-x: hidden; }

/* the top bar sits over the map on the first screen and goes solid once you set off */
.page-home .top { background: linear-gradient(180deg, rgba(6, 10, 24, .78), rgba(6, 10, 24, 0)); box-shadow: none; pointer-events: none; }
.page-home .top > * { pointer-events: auto; }
.page-home .top__name { opacity: 0; transform: translateX(-6px); }
body.past-hero .top__name { opacity: 1; transform: none; }
body.past-hero .top { background: linear-gradient(180deg, rgba(7, 11, 26, .96), rgba(7, 11, 26, .88)); box-shadow: 0 1px 0 rgba(255, 207, 90, .3); }
body.exploring .top { opacity: 0; pointer-events: none; }
body.exploring .top > * { pointer-events: none; }

/* ---------- The stage (sticky living map) ---------- */
.journey { position: relative; }
.stage { position: sticky; top: 0; height: var(--vh); overflow: hidden; z-index: 1; background: #0b1230; contain: strict; }
.stage__still, .stage__still img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 30% 62%; }
.map { position: absolute; inset: 0; overflow: hidden; touch-action: pan-y; cursor: grab; outline: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.map:focus-visible { box-shadow: inset 0 0 0 4px var(--gold); }
.map.dragging { cursor: grabbing; }
.map__skirt { position: absolute; left: 0; top: 0; width: 525px; height: 792px; transform-origin: 0 0; background: url("/img/skirt.webp") 0 0 / 100% 100%; pointer-events: none; }
.map__tiles, .map__fx, .map__pins { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 0; }
.map__fx { z-index: 1; }
.map__pins { z-index: 2; transition: opacity .4s; }
.map__tiles img { position: absolute; left: 0; top: 0; transform-origin: 0 0; max-width: none; opacity: 0; transition: opacity .35s; -webkit-user-drag: none; backface-visibility: hidden; }
.map__tiles img.on { opacity: 1; }
.map__tiles img.base { opacity: 1; transition: none; }
.map__fx > *, .map__pins > * { position: absolute; left: 0; top: 0; will-change: transform; }
.js .stage__still { display: none; }
html:not(.js) .mapui, html:not(.js) #explore, html:not(.js) .card, html:not(.js) .hud, html:not(.js) .rank, html:not(.js) .map, html:not(.js) .phone video { display: none; }

/* world clouds over the fog */
.fog-cloud { transform-origin: 0 0; pointer-events: none; }
.fog-cloud img { width: 512px; height: 256px; max-width: none; animation: bob 14s ease-in-out infinite alternate; opacity: .92; }
@keyframes bob { from { transform: translateX(-22px); } to { transform: translateX(22px); } }

/* chimney smoke */
.smoke { pointer-events: none; }
.smoke i { position: absolute; left: -8px; top: -8px; width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .85), rgba(230, 236, 240, 0) 70%); animation: puff 3.6s linear infinite; opacity: 0; }
.smoke i:nth-child(2) { animation-delay: -1.2s; }
.smoke i:nth-child(3) { animation-delay: -2.4s; }
.smoke.dark i { background: radial-gradient(circle, rgba(90, 86, 84, .8), rgba(90, 86, 84, 0) 70%); }
@keyframes puff { 0% { transform: translate(0, 0) scale(.5); opacity: 0; } 15% { opacity: .9; } 100% { transform: translate(14px, -46px) scale(2.2); opacity: 0; } }

/* travellers on the roads */
.walker { width: 0; height: 0; pointer-events: none; }
.walker i { position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff 0 18%, var(--gold) 30%, #d9771a 70%); box-shadow: 0 0 0 2px rgba(10, 16, 34, .6), 0 0 14px 4px rgba(255, 207, 90, .65); }

/* region names, shown when the camera pulls back over the world */
.region { pointer-events: none; }
.region span { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%) rotate(var(--turn, 0deg)); white-space: nowrap; font-family: var(--display); font-size: 22px; letter-spacing: .02em; color: #fff7dc; text-shadow: 0 2px 0 rgba(20, 24, 10, .9), 0 0 12px rgba(0, 0, 0, .6); opacity: 0; transition: opacity .6s; }
.region--big span { font-size: 28px; }
.region--fog span { color: #e6eef8; text-shadow: 0 2px 0 rgba(20, 28, 50, .9), 0 0 12px rgba(10, 20, 40, .6); }
body.show-regions .region span { opacity: .95; }
body.show-regions .region.hush span { opacity: 0; }

/* XP drops, hit splats and level-ups (screen space, anchored to map spots) */
.drop { pointer-events: none; z-index: 3; }
.drop > span { position: absolute; left: 0; top: 0; width: max-content; display: flex; align-items: center; gap: 6px; white-space: nowrap; transform: translate(-50%, -50%); font-family: var(--display); font-size: 20px; color: #fff; text-shadow: 0 2px 0 #10220a, 0 0 2px #10220a, 1px 1px 0 #10220a, -1px -1px 0 #10220a, 1px -1px 0 #10220a, -1px 1px 0 #10220a; animation: rise 2.2s ease-out forwards; }
.drop img { width: 26px; height: 26px; }
.drop--lv > span { font-size: 22px; padding: 6px 14px 6px 8px; border-radius: 14px; background: linear-gradient(180deg, #2b3a74, #141c3d); box-shadow: 0 0 0 2px var(--gold), 0 8px 18px rgba(0, 0, 0, .45); color: var(--gold-l); text-shadow: 0 2px 0 #0a1022; animation: pop 3s cubic-bezier(.2, 1.4, .4, 1) forwards; }
.drop--lv img { width: 34px; height: 34px; }
.drop--hit > span { width: 54px; height: 54px; justify-content: center; font-size: 28px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #ff8a6e, #d81f12 60%, #8d0c06); box-shadow: 0 0 0 3px #3a0602, 0 6px 14px rgba(0, 0, 0, .4); text-shadow: 0 2px 0 #3a0602; animation: splat 1.1s cubic-bezier(.2, 1.6, .4, 1) forwards; }
.drop--hit.blue > span { background: radial-gradient(circle at 40% 35%, #8ec2ff, #1d63e0 60%, #0b2f7a); box-shadow: 0 0 0 3px #061a44, 0 6px 14px rgba(0, 0, 0, .4); }
.drop--crit > span { width: 70px; height: 70px; font-size: 34px; }
@keyframes rise { 0% { transform: translate(-50%, -30%) scale(.6); opacity: 0; } 12% { transform: translate(-50%, -60%) scale(1.05); opacity: 1; } 75% { opacity: 1; } 100% { transform: translate(-50%, -200%) scale(1); opacity: 0; } }
@keyframes pop { 0% { transform: translate(-50%, -50%) scale(.3); opacity: 0; } 14% { transform: translate(-50%, -80%) scale(1); opacity: 1; } 82% { transform: translate(-50%, -95%) scale(1); opacity: 1; } 100% { transform: translate(-50%, -120%) scale(.9); opacity: 0; } }
@keyframes splat { 0% { transform: translate(-50%, -50%) scale(.2); opacity: 0; } 25% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; } 70% { transform: translate(-50%, -50%) scale(1); opacity: 1; } 100% { transform: translate(-50%, -80%) scale(.95); opacity: 0; } }

/* ---------- Pins ---------- */
.pin { width: 0; height: 0; z-index: 2; transition: opacity .3s; }
.pin.off { visibility: hidden; }
.pin.hush { opacity: 0; pointer-events: none; }
.pin.hush .pin__b { pointer-events: none; }
.pin__b { position: absolute; left: 0; top: 0; width: 58px; height: 58px; margin: -29px 0 0 -29px; padding: 0; border: 0; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #2c3d78, #0f1736 70%); box-shadow: 0 0 0 3px var(--gold), 0 0 0 5px #3a2306, 0 8px 16px rgba(0, 0, 0, .45); cursor: pointer; display: grid; place-items: center; transition: transform .18s; animation: pinIn .55s cubic-bezier(.2, 1.5, .4, 1) both; animation-delay: var(--d, 0s); }
.pin__b:hover { transform: scale(1.1); }
.pin__b img { width: 44px; height: 44px; pointer-events: none; }
.pin__b::before { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 3px solid var(--ring, var(--gold)); animation: ring 2.4s ease-out infinite; animation-delay: var(--d, 0s); pointer-events: none; }
.pin__l { position: absolute; left: 0; top: 34px; transform: translateX(-50%); white-space: nowrap; font-family: var(--display); font-size: 17px; line-height: 1; color: #fff; text-shadow: 0 2px 0 #0a1022, 1px 1px 0 #0a1022, -1px -1px 0 #0a1022, 1px -1px 0 #0a1022, -1px 1px 0 #0a1022, 0 0 10px rgba(0, 0, 0, .6); pointer-events: none; animation: fadeIn .4s both; animation-delay: calc(var(--d, 0s) + .2s); }
.pin__lv { position: absolute; left: 14px; top: -36px; font-family: var(--display); font-size: 14px; line-height: 1; padding: 4px 7px; border-radius: 8px; background: #c81e13; color: #fff; box-shadow: 0 0 0 2px #3a0602; pointer-events: none; white-space: nowrap; }
.pin--arena .pin__b { --ring: #ff5a44; box-shadow: 0 0 0 3px #ff6b4a, 0 0 0 5px #3a0602, 0 8px 16px rgba(0, 0, 0, .45); background: radial-gradient(circle at 50% 35%, #7a1f19, #2a0705 70%); }
.pin--champ .pin__b { width: 50px; height: 50px; margin: -25px 0 0 -25px; --ring: #ff8a3c; background: radial-gradient(circle at 50% 40%, #77b452, #2f5c24 72%); box-shadow: 0 0 0 3px #ffb347, 0 0 0 5px #3a1a02, 0 8px 16px rgba(0, 0, 0, .45); }
.pin--champ .pin__b img { width: 46px; height: 46px; }
.pin--fog .pin__b { --ring: #cfe3ff; background: radial-gradient(circle at 50% 35%, #8a9bb8, #3d4a66 72%); box-shadow: 0 0 0 3px #e8f0ff, 0 0 0 5px #1b2440, 0 8px 16px rgba(0, 0, 0, .4); }
.pin--fog .pin__b .ico { width: 26px; height: 26px; background: #fff; }
.pin--fog .pin__l { color: #eef4ff; }
.pin--event .pin__b { width: 42px; height: 42px; margin: -21px 0 0 -21px; --ring: #c28bff; background: radial-gradient(circle at 50% 35%, #5b3f8f, #24163f 72%); box-shadow: 0 0 0 3px #c9a0ff, 0 0 0 5px #1c0d33, 0 6px 12px rgba(0, 0, 0, .4); }
.pin--event .pin__b img { width: 38px; height: 38px; }
.pin--event .pin__l, .pin--champ .pin__l { font-size: 14px; top: 30px; }
.pin.sel .pin__b { transform: scale(1.18); }
@keyframes ring { 0% { transform: scale(1); opacity: .9; } 80%, 100% { transform: scale(1.9); opacity: 0; } }
@keyframes pinIn { from { transform: translateY(-40px) scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
body:not(.at-hero):not(.exploring) .map { pointer-events: none; }
body.at-end .map__pins, body.at-world .pin--champ, body.at-world .pin--event { opacity: 0; }
.js body:not(.ready) .pin { visibility: hidden; }

/* drifting sky clouds */
.sky { position: absolute; inset: 0; pointer-events: none; z-index: 4; overflow: hidden; }
.sky__cloud { position: absolute; max-width: none; width: 30vmax; height: auto; opacity: .42; animation: drift linear infinite; }
.sky__cloud--a { top: 6%; animation-duration: 110s; animation-delay: -70s; }
.sky__cloud--b { top: 58%; width: 24vmax; animation-duration: 150s; animation-delay: -20s; opacity: .32; }
@keyframes drift { from { transform: translateX(-60vmax); } to { transform: translateX(160vw); } }

/* opening: the clouds part */
.curtain { position: absolute; inset: 0; z-index: 9; pointer-events: none; }
.curtain img { position: absolute; max-width: none; width: 150vmax; height: auto; top: 50%; left: 50%; opacity: 0; }
.js .curtain img { opacity: 1; }
.curtain__l { transform: translate(-95%, -60%); animation: partL 1.4s cubic-bezier(.6, 0, .2, 1) .05s forwards; }
.curtain__r { transform: translate(-5%, -40%); animation: partR 1.4s cubic-bezier(.6, 0, .2, 1) .05s forwards; }
.curtain__m { width: 120vmax !important; transform: translate(-50%, -50%) scale(1.2); animation: partM 1.1s ease-in .05s forwards; }
@keyframes partL { to { transform: translate(-190%, -60%); opacity: 0; } }
@keyframes partR { to { transform: translate(90%, -40%); opacity: 0; } }
@keyframes partM { to { transform: translate(-50%, -50%) scale(2.2); opacity: 0; } }

.vignette { position: absolute; inset: 0; z-index: 5; pointer-events: none; background: radial-gradient(ellipse 80% 70% at 60% 45%, rgba(0, 0, 0, 0) 55%, rgba(4, 8, 22, .45) 100%); }

/* zone title, MMO style: it shows once the camera has landed and the sharp tiles are in */
.zone { position: absolute; z-index: 6; left: 50%; top: 21%; transform: translate(-50%, -50%) scale(1.15); display: flex; flex-direction: column; align-items: center; text-align: center; pointer-events: none; opacity: 0; transition: opacity .5s, transform .9s cubic-bezier(.2, 1, .3, 1); width: max-content; max-width: 92vw; }
.zone.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.zone.show.under { opacity: 0; }
.zone__region { font-weight: 800; font-size: 15px; color: #fff; padding: 4px 12px; border-radius: 999px; background: rgba(8, 12, 28, .75); }
.zone__name { margin-top: 6px; white-space: nowrap; font-family: var(--display); font-size: clamp(40px, 6.4vw, 92px); line-height: 1; color: var(--gold-l); text-shadow: 0 4px 0 #3a2306, 2px 2px 0 #3a2306, -2px -2px 0 #3a2306, 2px -2px 0 #3a2306, -2px 2px 0 #3a2306, 0 0 30px rgba(0, 0, 0, .5); display: flex; align-items: center; gap: .3em; }
.zone__name::before, .zone__name::after { content: ""; width: .9em; height: 4px; border-radius: 4px; background: linear-gradient(90deg, rgba(255, 207, 90, 0), var(--gold)); box-shadow: 0 2px 0 #3a2306; }
.zone__name::after { transform: scaleX(-1); }

/* the rank-up over Waymere Arena */
.rank { position: absolute; left: 0; top: 0; z-index: 6; display: flex; flex-direction: column; align-items: center; pointer-events: none; opacity: 0; transform: translate3d(-9999px, 0, 0); transition: opacity .4s; }
.rank.show { opacity: 1; }
.rank.show.under { opacity: 0; }
.rank__crest { width: 132px; height: 132px; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .55)); }
.rank__crest.pop { animation: crestUp .6s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes crestUp { 0% { transform: scale(.5) translateY(14px); opacity: .2; } 60% { transform: scale(1.18); opacity: 1; } 100% { transform: none; } }
.rank__league { margin-top: -4px; font-family: var(--display); font-size: 24px; line-height: 1; color: var(--gold-l); text-shadow: 0 2px 0 #3a2306, 1px 1px 0 #3a2306, -1px -1px 0 #3a2306, 1px -1px 0 #3a2306, -1px 1px 0 #3a2306; white-space: nowrap; }
.rank__rating { margin-top: 6px; padding: 4px 12px; border-radius: 999px; background: rgba(8, 12, 28, .85); box-shadow: inset 0 0 0 1.5px rgba(255, 207, 90, .6); font-weight: 700; font-size: 14px; white-space: nowrap; }
.rank__rating b { font-weight: 900; font-size: 17px; color: #fff; font-variant-numeric: tabular-nums; }

/* ---------- Map UI (hero and explore only) ---------- */
.mapui { position: fixed; z-index: 57; right: var(--pad); bottom: calc(max(14px, env(safe-area-inset-bottom)) + 84px); display: flex; align-items: center; gap: 12px; transition: opacity .3s, transform .3s; }
body:not(.at-hero):not(.exploring) .mapui { opacity: 0; transform: translateY(20px); pointer-events: none; visibility: hidden; transition: opacity .3s, transform .3s, visibility 0s .3s; }
.mapui__hint { margin: 0; display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; padding: 8px 14px 8px 10px; border-radius: 999px; background: rgba(8, 12, 28, .82); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15); transition: opacity .5s; }
.mapui__hint.gone { opacity: 0; }
.mapui__hand { width: 22px; height: 22px; background: var(--gold); -webkit-mask: url("/img/i/ui-footprint.svg") center / contain no-repeat; mask: url("/img/i/ui-footprint.svg") center / contain no-repeat; }
.hint-touch { display: none; }
@media (hover: none) and (pointer: coarse) { .hint-desk { display: none; } .hint-touch { display: inline; } }
.mapui__zoom { display: flex; flex-direction: column; gap: 8px; }
.knob { width: 48px; height: 48px; border: 0; border-radius: 14px; font-family: var(--display); font-size: 30px; line-height: 1; color: #fff; cursor: pointer; background: linear-gradient(180deg, #33437e, #18224a); box-shadow: 0 0 0 2px var(--gold), 0 4px 0 #0a1022, 0 8px 16px rgba(0, 0, 0, .4); text-shadow: 0 2px 0 #0a1022; }
.knob:active { transform: translateY(2px); box-shadow: 0 0 0 2px var(--gold), 0 2px 0 #0a1022; }
.knob--wide { width: auto; padding: 0 20px; font-size: 22px; }
#exploreClose { position: fixed; top: max(14px, env(safe-area-inset-top)); right: var(--pad); }
#exploreClose[hidden] { display: none; }
body.exploring .mapui { bottom: max(22px, env(safe-area-inset-bottom)); }

/* ---------- Pin card ---------- */
.card { position: fixed; z-index: 55; right: var(--pad); top: 50%; transform: translateY(-50%); width: min(380px, calc(100vw - 32px)); max-height: calc(var(--vh) - 180px); overflow: auto; border-radius: 22px; background: linear-gradient(180deg, #1c2853, #0d1430 60%); box-shadow: var(--rim); animation: cardIn .35s cubic-bezier(.2, 1.3, .4, 1); overscroll-behavior: contain; }
.card[hidden] { display: none; }
@keyframes cardIn { from { opacity: 0; transform: translateY(-46%) scale(.94); } to { opacity: 1; transform: translateY(-50%); } }
.card__x { position: absolute; right: 10px; top: 10px; z-index: 2; width: 40px; height: 40px; border: 0; border-radius: 12px; font-size: 26px; line-height: 1; cursor: pointer; background: rgba(8, 12, 28, .75); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .3); }
.card__art { position: relative; height: 150px; overflow: hidden; border-radius: 22px 22px 0 0; background: radial-gradient(circle at 50% 70%, #4f8f3c, #22451b 70%); display: grid; place-items: center; }
.card__art img.full { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card__art img.icon { width: 120px; height: 120px; filter: drop-shadow(0 10px 12px rgba(0, 0, 0, .45)); }
.card__art.fog::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 60%, rgba(230, 238, 245, .15), rgba(230, 238, 245, .8) 85%); }
.card__art .crests { display: flex; gap: 2px; padding: 0 14px; }
.card__art .crests img { width: 54px; height: 54px; }
.card__body { padding: 16px 20px 20px; }
.card__kind { margin: 0; font-weight: 800; font-size: 13px; color: var(--gold); }
.card__title { margin: 2px 0 0; font-family: var(--display); font-weight: 400; font-size: 34px; line-height: 1.05; }
.card__where { margin: 2px 0 0; color: var(--muted); font-size: 15px; }
.card__lv { margin: 12px 0 0; }
.lvbar { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 14px; }
.lvbar b { font-family: var(--display); font-weight: 400; font-size: 20px; color: #fff; padding: 2px 10px; border-radius: 9px; background: #c81e13; box-shadow: 0 0 0 2px #3a0602; white-space: nowrap; }
.lvbar i { position: relative; flex: 1; height: 10px; border-radius: 6px; background: #070b1a; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.lvbar i::after { content: ""; position: absolute; top: 1px; bottom: 1px; left: var(--a); width: var(--w); border-radius: 5px; background: linear-gradient(90deg, #ff9b3c, #ff5340); }
.lvbar.fog b { background: #53627f; box-shadow: 0 0 0 2px #1b2440; }
.lvbar.fog i::after { background: linear-gradient(90deg, #a9bad6, #e7eefb); }
.card__text { margin: 12px 0 0; font-size: 16px; }
.card__do { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.card__do li { display: flex; align-items: center; gap: 10px; font-size: 15px; line-height: 1.3; padding: 6px 10px 6px 6px; border-radius: 12px; background: rgba(255, 255, 255, .06); }
.card__do img, .card__do .ico { flex: none; width: 34px; height: 34px; }
.card__do .ico { width: 28px; height: 28px; margin: 3px; }

/* ---------- Icons (mask) ---------- */
.ico { display: inline-block; flex: none; width: 24px; height: 24px; background: var(--gold); -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; }

/* ---------- The first screen ---------- */
.stop { position: relative; z-index: 2; pointer-events: none; }
.stop > * { pointer-events: auto; }
.stop--hero { margin-top: calc(-1 * var(--vh)); min-height: var(--vh); display: flex; align-items: center; padding: 76px var(--pad) calc(max(14px, env(safe-area-inset-bottom)) + 104px); }
.stop--hero > .hero { pointer-events: none; }
/* the dark plate behind the words: it fades out at its foot and as you scroll away, so it never ends in a hard edge */
.stop--hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: var(--fade, 1); background: linear-gradient(90deg, #060a1a 0%, rgba(6, 10, 26, .9) 12%, rgba(6, 10, 26, .78) 28%, rgba(6, 10, 26, .32) 44%, rgba(6, 10, 26, 0) 56%); -webkit-mask: linear-gradient(180deg, #000 calc(100% - 180px), transparent); mask: linear-gradient(180deg, #000 calc(100% - 180px), transparent); }
.hero { position: relative; max-width: max(560px, 38vw); }
.hero > *, .hero__line, .hero__sub, .hero__free { width: fit-content; max-width: 100%; }
.hero__logo { margin: 0; width: min(84vw, clamp(500px, 35.4vw, 680px)); filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .45)); animation: logoIn .8s cubic-bezier(.2, 1.3, .4, 1) .12s both; }
.hero__line { margin: 12px 0 0; font-family: var(--display); font-size: clamp(30px, 3.34vw, 64px); line-height: 1.04; color: #fff; text-shadow: 0 3px 0 #0a1022, 2px 2px 0 #0a1022, -2px -2px 0 #0a1022, 2px -2px 0 #0a1022, -2px 2px 0 #0a1022, 0 0 24px rgba(0, 0, 0, .5); animation: up .55s ease-out .3s both; }
.hero__sub { margin: 12px 0 0; max-width: 30em; font-size: clamp(18px, 1.1vw, 21px); font-weight: 500; color: #eef0f7; text-shadow: 0 1px 3px rgba(0, 0, 0, .9); animation: up .55s ease-out .4s both; }
.hero__cta { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; animation: up .5s ease-out .48s both; }
.hero__cta > * { pointer-events: auto; }
.hero__leagues { margin-top: 20px; animation: up .5s ease-out .55s both; }
.crestrow { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.crestrow li { width: 58px; }
.crestrow img { width: 58px; height: 58px; filter: drop-shadow(0 5px 6px rgba(0, 0, 0, .5)); }
.js .crestrow li { animation: crestIn .45s cubic-bezier(.2, 1.6, .4, 1) both; animation-delay: calc(.62s + var(--n, 0) * .06s); }
.crestrow li:nth-child(2) { --n: 1; } .crestrow li:nth-child(3) { --n: 2; } .crestrow li:nth-child(4) { --n: 3; } .crestrow li:nth-child(5) { --n: 4; } .crestrow li:nth-child(6) { --n: 5; }
@keyframes crestIn { from { transform: translateY(16px) scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.hero__free { margin: 6px 0 0; font-weight: 800; font-size: 15px; color: var(--gold-l); text-shadow: 0 1px 3px rgba(0, 0, 0, .9); }

/* a slim fight strip under the line (phones and small laptops): the two small cut-outs at their natural scale */
.hero__vs { position: relative; display: grid; grid-template-columns: 40px 1fr auto 1fr 40px; grid-template-rows: 100%; align-items: end; width: min(330px, 88vw); height: 50px; margin-top: 30px; padding: 0 10px; border-radius: 14px; background: linear-gradient(104deg, #3f8dff, #1648b8 49.4%, #fff4c8 49.4% 50.6%, #d62a1c 50.6%, #ff6a3d); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .35), inset 0 -3px 0 rgba(0, 0, 0, .25), 0 0 0 2px #0a1022, 0 8px 16px rgba(0, 0, 0, .4); animation: up .5s ease-out .36s both; }
.hero__vs img { width: auto; height: 72px; max-width: none; margin-bottom: 2px; justify-self: center; filter: drop-shadow(0 4px 5px rgba(0, 0, 0, .5)); }
.hero__vsr { transform: scaleX(-1); }
.hero__vsn { align-self: center; font-family: var(--display); font-size: 21px; line-height: 1; color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .45); }
.hero__vsn:first-of-type { justify-self: end; padding-right: 8px; }
.hero__vsn:last-of-type { justify-self: start; padding-left: 8px; }
.hero__vsw { align-self: center; font-family: var(--display); font-size: 40px; line-height: 1; color: #fff3c4; transform: skewX(-8deg); text-shadow: 0 3px 0 #8a1308, 2px 2px 0 #8a1308, -2px -2px 0 #8a1308, 2px -2px 0 #8a1308, -2px 2px 0 #8a1308, 0 0 18px rgba(255, 80, 40, .7); }

/* laptops: a real ranked duel plays on the right of the first screen */
.hero__duel { display: none; }
@media (min-width: 961px) {
  .hero__vs { display: none; }
  .hero__line { max-width: 11em; }
  .hero__duel { --pw: clamp(190px, calc((var(--vh) - 342px) * .46), 310px); position: absolute; z-index: 1; right: calc(var(--pad) + 4vw); top: calc(50% - 73px); margin: 0; display: flex; flex-direction: column; align-items: center; transform: translateY(-50%); animation: duelIn .7s cubic-bezier(.2, 1.2, .4, 1) .35s both; }
  .hero__duel .phone { --pw: inherit; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .22), inset 0 0 0 4px #05070f, 0 0 0 2px rgba(255, 207, 90, .6), -18px 0 50px rgba(63, 141, 255, .35), 18px 0 50px rgba(255, 90, 60, .35), 0 30px 60px rgba(0, 0, 0, .6); }
  .duelcap { position: relative; z-index: 2; margin-top: -26px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; width: calc(var(--pw) + 56px); border-radius: 14px; overflow: hidden; background: linear-gradient(104deg, #3f8dff, #1648b8 49.4%, #fff4c8 49.4% 50.6%, #d62a1c 50.6%, #ff6a3d); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .35), inset 0 -3px 0 rgba(0, 0, 0, .25), 0 0 0 2px #0a1022, 0 10px 22px rgba(0, 0, 0, .5); }
  .duelcap__you, .duelcap__them { padding: 10px 12px 9px; font-family: var(--display); font-size: 22px; line-height: 1; color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .45); }
  .duelcap__you { text-align: right; }
  .duelcap__vs { font-family: var(--display); font-size: 40px; line-height: 1; color: #fff3c4; transform: skewX(-8deg); text-shadow: 0 3px 0 #8a1308, 2px 2px 0 #8a1308, -2px -2px 0 #8a1308, 2px -2px 0 #8a1308, -2px 2px 0 #8a1308, 0 0 18px rgba(255, 80, 40, .7); }
  .duelcap small { grid-column: 1 / -1; padding: 5px 10px 6px; font-weight: 800; font-size: 12.5px; line-height: 1.2; text-align: center; color: #fff; background: rgba(6, 10, 26, .82); }
}
@keyframes duelIn { from { transform: translateY(-46%) scale(.92); opacity: 0; } to { transform: translateY(-50%); opacity: 1; } }
.hero__down { position: absolute; left: 50%; bottom: calc(max(14px, env(safe-area-inset-bottom)) + 80px); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; font-weight: 800; font-size: 14px; text-shadow: 0 1px 3px rgba(0, 0, 0, .9); pointer-events: auto; }
.hero__down::after { content: ""; width: 14px; height: 14px; border-right: 3px solid var(--gold); border-bottom: 3px solid var(--gold); transform: rotate(45deg); animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(6px) rotate(45deg); } }
@keyframes logoIn { from { transform: scale(.6) translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes up { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Stops: beats over the map ---------- */
.stop:not(.stop--hero):not(.stop--end) { padding: calc(var(--vh) * .62) var(--pad) calc(var(--vh) * .3); }
.beat { position: relative; width: min(640px, 100%); }
.beat + .beat { margin-top: calc(var(--vh) * .34); }
.panel { position: relative; padding: 28px clamp(20px, 3vw, 34px) 30px; border-radius: 26px; background: linear-gradient(180deg, rgba(27, 39, 82, .97), rgba(11, 17, 38, .98) 40%); box-shadow: var(--rim); }
.beat.panel::before { content: ""; position: absolute; left: 50%; top: -11px; width: 22px; height: 22px; margin-left: -11px; transform: rotate(45deg); border-radius: 4px; background: linear-gradient(135deg, var(--gold-l), var(--gold) 50%, var(--gold-d)); box-shadow: 0 0 0 3px #0a1022; }
.h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(34px, 4vw, 52px); line-height: 1.02; color: var(--gold-l); text-shadow: 0 3px 0 #3a2306, 0 0 22px rgba(255, 190, 60, .2); }
.h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 30px; line-height: 1.08; color: #fff; }
.lede { margin: 10px 0 0; font-size: 18px; color: #e9ecf5; }
.body { margin: 10px 0 0; color: var(--muted); font-size: 16px; }
.note { margin: 12px 0 0; font-size: 14px; font-weight: 700; color: var(--gold); }

.chips { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px 7px 9px; border-radius: 12px; font-weight: 800; font-size: 14px; line-height: 1.1; background: linear-gradient(180deg, #24326a, #141d40); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), 0 3px 0 #070b1a; }
.chips .ico { width: 20px; height: 20px; }
.chips--quiet li { padding: 6px 12px; font-weight: 700; color: var(--muted); }

/* a phone and a panel side by side */
.duo { display: flex; align-items: center; gap: 26px; }
.duo--flip { flex-direction: row-reverse; }
.panel--side { flex: 1; min-width: 0; padding: 22px 22px 24px; }

/* ---------- The iPhone frame: captures at their full portrait shape ---------- */
.phone { --pw: 250px; position: relative; flex: none; margin: 0; width: var(--pw); aspect-ratio: 1206 / 2622; padding: calc(var(--pw) * .032); border-radius: calc(var(--pw) * .165); background: linear-gradient(150deg, #4b5470, #171c33 30%, #0c1024 60%, #2d3550); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .22), inset 0 0 0 4px #05070f, 0 0 0 2px rgba(255, 207, 90, .45), 0 28px 56px rgba(0, 0, 0, .55); }
.phone::before { content: ""; position: absolute; right: -3px; top: 26%; width: 3px; height: 12%; border-radius: 0 3px 3px 0; background: #3b4360; }
.phone__screen { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: calc(var(--pw) * .135); background: #05070f; container-type: inline-size; }
.phone__screen img, .phone__screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.phone__screen::after { content: ""; position: absolute; z-index: 3; left: 50%; top: 3.48cqw; width: 31.2cqw; height: 9.12cqw; transform: translateX(-50%); border-radius: 99px; background: #000; }
.phone--small { --pw: 190px; }
.phone__play { position: absolute; z-index: 4; right: 12%; bottom: 7%; padding: 6px 12px; border: 0; border-radius: 999px; font-weight: 800; font-size: 13px; cursor: pointer; background: rgba(8, 12, 28, .8); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .35); }
.phone__play[hidden] { display: none; }

/* it keeps going while you rest: the panel, then a clip and a report side by side */
.rest { display: grid; gap: 22px; }
.rest__phones { display: flex; justify-content: center; gap: 24px; }
.panel--ladder { width: min(460px, 100%); }

/* ---------- PvP ---------- */
.vs { position: relative; height: 150px; display: flex; align-items: flex-end; justify-content: space-between; margin: -6px -8px 20px; padding: 0 30px; border-radius: 18px; overflow: hidden; background: linear-gradient(104deg, #3f8dff, #1648b8 49.6%, #fff4c8 49.6% 50.4%, #d62a1c 50.4%, #ff6a3d); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .35), inset 0 -4px 0 rgba(0, 0, 0, .25), 0 0 0 2px #0a1022; }
.vs::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(104deg, rgba(255, 255, 255, .07) 0 2px, transparent 2px 14px); pointer-events: none; }
.vs__hero { position: relative; z-index: 1; height: 142px; width: auto; margin-bottom: -4px; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .5)); }
.vs__hero--r { transform: scaleX(-1); }
.vs__word { position: absolute; z-index: 2; left: 50%; top: 50%; font-family: var(--display); font-size: 88px; line-height: .9; color: #fff3c4; transform: translate(-50%, -50%) skewX(-8deg); text-shadow: 0 5px 0 #8a1308, 3px 3px 0 #8a1308, -3px -3px 0 #8a1308, 3px -3px 0 #8a1308, -3px 3px 0 #8a1308, 0 0 30px rgba(255, 80, 40, .7); }
.vs__hero, .vs__word { transition: transform .6s cubic-bezier(.2, 1.5, .4, 1), opacity .3s; }
.js .panel--pvp:not(.lit) .vs__hero--l { transform: translateX(-70px); opacity: 0; }
.js .panel--pvp:not(.lit) .vs__hero--r { transform: translateX(70px) scaleX(-1); opacity: 0; }
.js .panel--pvp:not(.lit) .vs__word { opacity: 0; transform: translate(-50%, -50%) skewX(-8deg) scale(2.4); }
.panel--pvp.lit .vs__word { transition-delay: .25s; }

.meter { margin-top: 16px; }
.meter__head { display: flex; justify-content: space-between; align-items: baseline; font-weight: 800; font-size: 14px; color: var(--muted); }
.meter__head b { font-weight: 900; font-size: 18px; color: #fff; font-variant-numeric: tabular-nums; }
.meter__track { position: relative; height: 18px; margin-top: 6px; border-radius: 9px; overflow: hidden; background: #070b1a; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .14), inset 0 3px 6px rgba(0, 0, 0, .5); }
.meter__track i { position: absolute; inset: 3px; border-radius: 6px; transform-origin: 0 50%; transform: scaleX(var(--m, 0)); background: linear-gradient(180deg, #fff3a8, #ffcf3a 45%, #f08c00); }
.meter.full .meter__track { box-shadow: inset 0 0 0 2px var(--gold), 0 0 18px rgba(255, 207, 90, .8); }
.meter.full .meter__head b { color: var(--gold); }

.podium { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); align-items: end; gap: 6px; }
.podium li { --h: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px; padding: 8px 2px 10px; min-height: calc(92px + var(--h) * 16px); border-radius: 12px 12px 6px 6px; text-align: center; background: linear-gradient(180deg, var(--c1), var(--c2)); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .45), 0 4px 0 rgba(0, 0, 0, .45); color: #12141b; transition: transform .45s cubic-bezier(.2, 1.5, .4, 1), filter .3s; }
.podium img { width: 46px; height: 46px; margin-top: -30px; filter: drop-shadow(0 4px 5px rgba(0, 0, 0, .5)); }
.podium b { font-family: var(--display); font-weight: 400; font-size: 17px; line-height: 1; }
.podium span { font-weight: 900; font-size: 13px; font-variant-numeric: tabular-nums; }
.p-bronze { --h: 0; --c1: #f0b07a; --c2: #b86a35; }
.p-iron { --h: 1; --c1: #d4d6da; --c2: #8b8f97; }
.p-steel { --h: 2; --c1: #f1f5fa; --c2: #a9b5c6; }
.p-mithril { --h: 3; --c1: #b4c0ff; --c2: #6276e6; }
.p-adamant { --h: 4; --c1: #a6edbf; --c2: #3fa96a; }
.p-rune { --h: 5; --c1: #9df1f0; --c2: #2fb7c4; }
.js .podium li { filter: saturate(.25) brightness(.7); }
.js .podium li.on { filter: none; }
.js .podium li.now { transform: translateY(-6px); }

.stakes { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stakes li { display: flex; flex-direction: column; align-items: center; padding: 8px 4px; border-radius: 12px; font-weight: 700; font-size: 13px; color: var(--muted); background: rgba(4, 8, 20, .55); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.stakes b { font-weight: 900; font-size: 24px; line-height: 1.1; color: #fff; font-variant-numeric: tabular-nums; }
.stakes--win b { color: var(--green); }
.stakes--lose b { color: #ff7b6a; }
.ladder { margin-top: 14px; }
.ladder__title { margin: 0 0 6px; font-weight: 800; font-size: 14px; color: #fff; }
.ladder__title span { font-weight: 600; color: var(--muted); }
.ladder ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; counter-reset: pos; }
.ladder li { counter-increment: pos; display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 8px; border-radius: 10px; font-size: 15px; background: rgba(255, 255, 255, .05); }
.ladder li::before { content: counter(pos); width: 18px; font-weight: 900; font-size: 13px; color: var(--muted); text-align: center; }
.ladder img { width: 28px; height: 28px; }
.ladder b { font-weight: 800; }
.ladder span { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--muted); }
.ladder li.you { background: linear-gradient(90deg, rgba(255, 207, 90, .28), rgba(255, 207, 90, .08)); box-shadow: inset 0 0 0 1.5px var(--gold); }
.ladder li.you b { color: var(--gold-l); }

.tri { display: grid; grid-template-columns: 250px 1fr; gap: 18px; align-items: center; margin-top: 12px; }
.tri__fig { position: relative; margin: 0; width: 250px; aspect-ratio: 300 / 260; }
.tri__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.tri__e { fill: none; stroke-width: 6; stroke-linecap: round; stroke-dasharray: 10 9; }
.tri__e--melee { stroke: #ff6a3d; }
.tri__e--ranged { stroke: #43d36e; }
.tri__e--magic { stroke: #a07bff; }
.js .tri__e { animation: march 1.2s linear infinite; }
@keyframes march { to { stroke-dashoffset: -19; } }
.tri__n { position: absolute; display: flex; flex-direction: column; align-items: center; transform: translate(-50%, -50%); font-family: var(--display); font-size: 18px; line-height: 1; }
.tri__n img { width: 66px; height: 66px; padding: 6px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #2c3d78, #0f1736 72%); box-shadow: 0 0 0 3px var(--c), 0 0 0 5px #0a1022, 0 6px 12px rgba(0, 0, 0, .45); margin-bottom: 4px; }
.tri__n--melee { --c: #ff6a3d; left: 50%; top: 16%; }
.tri__n--ranged { --c: #43d36e; left: 84%; top: 80%; }
.tri__n--magic { --c: #a07bff; left: 16%; top: 80%; }

/* ---------- Levelling ---------- */
.curve { position: relative; margin-top: 18px; padding: 16px 16px 14px; border-radius: 18px; background: rgba(4, 8, 20, .55); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.curve__head { display: flex; align-items: center; gap: 12px; }
.curve__head img { width: 52px; height: 52px; }
.curve__skill { font-family: var(--display); font-size: 28px; }
.curve__lv { margin-left: auto; font-weight: 900; font-size: 44px; line-height: 1; color: var(--green); text-shadow: 0 3px 0 #10360a; font-variant-numeric: tabular-nums; }
.curve__lv small { font-size: 22px; color: var(--muted); text-shadow: none; }
.curve__bar { position: relative; height: 26px; margin: 34px 4px 30px; border-radius: 13px; background: #070b1a; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .14), inset 0 4px 8px rgba(0, 0, 0, .5); }
.curve__bar > i { position: absolute; inset: 3px; border-radius: 10px; background: linear-gradient(180deg, #b6ff8c, #5fd43a 45%, #2f9a1b); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .5); transform-origin: 0 50%; transform: scaleX(.5); }
.js .curve__bar > i { transform: scaleX(0); }
.mark { position: absolute; left: var(--x); top: -5px; bottom: -5px; width: 2px; margin-left: -1px; border-radius: 1px; background: rgba(255, 255, 255, .6); }
.mark em { position: absolute; left: 50%; transform: translateX(-50%); font-style: normal; font-weight: 800; font-size: 14px; line-height: 1; color: #fff; white-space: nowrap; }
.mark em.up { bottom: calc(100% + 5px); }
.mark em.down { top: calc(100% + 5px); }
.mark--half { width: 4px; margin-left: -2px; background: var(--gold); box-shadow: 0 0 10px rgba(255, 207, 90, .8); }
.mark--half em { color: var(--gold); font-family: var(--display); font-weight: 400; font-size: 20px; }
.mark--end { margin-left: -3px; }
.mark--end em { transform: translateX(-80%); }
.curve__xp { margin: 0; font-size: 15px; font-weight: 700; color: var(--muted); }
.curve__xp b { font-weight: 900; font-size: 22px; color: var(--gold-l); font-variant-numeric: tabular-nums; }
.levelup { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.3); opacity: 0; pointer-events: none; font-family: var(--display); font-size: 48px; color: var(--gold-l); text-shadow: 0 4px 0 #3a2306, 2px 2px 0 #3a2306, -2px -2px 0 #3a2306, 2px -2px 0 #3a2306, -2px 2px 0 #3a2306; white-space: nowrap; }
.levelup::before { content: ""; position: absolute; left: 50%; top: 50%; width: 260px; height: 260px; margin: -130px 0 0 -130px; z-index: -1; background: repeating-conic-gradient(from 0deg, rgba(255, 220, 120, .5) 0 8deg, rgba(255, 220, 120, 0) 8deg 22deg); -webkit-mask: radial-gradient(circle, #000 20%, transparent 68%); mask: radial-gradient(circle, #000 20%, transparent 68%); animation: spin 8s linear infinite; }
.levelup.go { animation: lvl 2.4s cubic-bezier(.2, 1.4, .4, 1) forwards; }
@keyframes lvl { 0% { transform: translate(-50%, -50%) scale(.3); opacity: 0; } 15% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; } 25% { transform: translate(-50%, -50%) scale(1); } 80% { opacity: 1; } 100% { transform: translate(-50%, -70%) scale(1); opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }

.tiles { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.tiles li { position: relative; display: grid; grid-template-columns: 30px 1fr auto; grid-template-rows: auto 5px; align-items: center; column-gap: 8px; row-gap: 3px; padding: 6px 10px 7px 6px; border-radius: 11px; background: linear-gradient(180deg, #24326a, #141d40); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), 0 2px 0 #070b1a; }
.tiles img { grid-row: 1 / 3; width: 30px; height: 30px; }
.tiles b { font-weight: 700; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tiles .t-lv { font-weight: 900; font-size: 16px; line-height: 1; font-variant-numeric: tabular-nums; }
.tiles .t-bar { grid-column: 2 / 4; height: 5px; border-radius: 3px; overflow: hidden; background: #070b1a; }
.tiles .t-bar i { display: block; height: 100%; transform-origin: 0 50%; transform: scaleX(var(--p, 1)); background: linear-gradient(90deg, #ffcf3a, #f08c00); }
.tiles .t-up { position: absolute; right: -6px; top: -16px; padding: 2px 8px; border-radius: 8px; font-style: normal; font-family: var(--display); font-size: 15px; color: var(--ink); background: linear-gradient(180deg, var(--gold-l), var(--gold)); box-shadow: 0 0 0 2px #3a2306; opacity: 0; transform: scale(.4); transition: opacity .2s, transform .4s cubic-bezier(.2, 1.6, .4, 1); pointer-events: none; }
.tiles li.t-max.done { box-shadow: inset 0 0 0 2px var(--gold), 0 0 16px rgba(255, 207, 90, .55), 0 2px 0 #070b1a; }
.tiles li.t-max.done .t-lv { color: var(--gold); }
.tiles li.t-max.done .t-up { opacity: 1; transform: none; }
html:not(.js) .tiles li.t-max .t-up { opacity: 1; transform: none; }

/* the forge: a sticky phone steps from ore to loot */
.forge { width: min(640px, 100%); }
.forge__stick { display: flex; align-items: center; gap: 26px; }
.js .forge { height: calc(var(--vh) * 3.2); }
.js .forge__stick { position: sticky; top: calc(var(--vh) * .5 - 290px); }
.forge__phone .phone__screen img { opacity: 0; transition: opacity .45s; }
.forge__phone .phone__screen img.on { opacity: 1; }
html:not(.js) .forge__phone .phone__screen img:not(.on) { display: none; }
.forge__card { flex: 1; min-width: 0; padding: 22px 22px 24px; }
.chain { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.chain li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; font-weight: 800; font-size: 12px; color: var(--muted); transition: color .3s; }
.chain .ico { width: 46px; height: 46px; -webkit-mask-size: 60%; mask-size: 60%; border-radius: 13px; background: #3a4570; transition: background .3s, transform .4s cubic-bezier(.2, 1.6, .4, 1); }
.chain li:not(:last-child)::after { content: ""; position: absolute; right: -7px; top: 17px; border: 6px solid transparent; border-left: 7px solid rgba(255, 207, 90, .55); border-right: 0; }
.chain li.on, .chain li.done { color: #fff; }
.chain li.done .ico { background: linear-gradient(180deg, var(--gold-l), var(--gold) 50%, var(--gold-d)); }
.chain li.on .ico { background: linear-gradient(180deg, var(--gold-l), var(--gold) 50%, var(--gold-d)); transform: scale(1.12); box-shadow: 0 0 0 2px #fff; }
html:not(.js) .chain .ico { background: linear-gradient(180deg, var(--gold-l), var(--gold) 50%, var(--gold-d)); }
.steps { list-style: none; margin: 14px 0 0; padding: 0; display: grid; }
.steps li { grid-area: 1 / 1; font-size: 16px; line-height: 1.45; color: var(--muted); opacity: 0; transform: translateY(8px); transition: opacity .35s, transform .35s; }
.steps li.on { opacity: 1; transform: none; }
.steps b { color: #fff; }
html:not(.js) .steps li { grid-area: auto; opacity: 1; transform: none; margin-top: 6px; }
.metals { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.metals li { font-family: var(--display); font-size: 17px; padding: 5px 12px 4px; border-radius: 10px; color: #13151c; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .5), 0 3px 0 rgba(0, 0, 0, .5); transition: transform .3s, filter .3s; }
.m-bronze { background: linear-gradient(180deg, #f0b07a, #b86a35); }
.m-iron { background: linear-gradient(180deg, #d4d6da, #8b8f97); }
.m-steel { background: linear-gradient(180deg, #f1f5fa, #a9b5c6); }
.m-mithril { background: linear-gradient(180deg, #a8b6ff, #5b6fe0); }
.m-adamant { background: linear-gradient(180deg, #9ee8b7, #3fa96a); }

/* ---------- The world ---------- */
.hubs { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.hub { width: 100%; display: flex; align-items: center; gap: 12px; padding: 6px 12px 6px 6px; border: 0; border-radius: 16px; text-align: left; cursor: pointer; background: linear-gradient(180deg, #24326a, #141d40); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), 0 3px 0 #070b1a; transition: transform .15s; }
.hub:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 2px var(--gold), 0 5px 0 #070b1a; }
.hub img { width: 52px; height: 52px; }
.hub span { display: flex; flex-direction: column; }
.hub b { font-family: var(--display); font-weight: 400; font-size: 22px; line-height: 1.1; }
.hub small { font-size: 14px; color: var(--muted); }
.hub em { margin-left: auto; font-style: normal; font-family: var(--display); font-size: 18px; padding: 3px 10px; border-radius: 9px; background: #c81e13; box-shadow: 0 0 0 2px #3a0602; white-space: nowrap; }

.fogcard { margin: 0; width: min(520px, 100%); border-radius: 22px; overflow: hidden; background: linear-gradient(180deg, #1f2b55, #111934); box-shadow: 0 0 0 2px rgba(220, 232, 255, .7), 0 0 0 5px #0a1022, 0 20px 40px rgba(0, 0, 0, .5); outline-offset: 4px; }
.fogcard__art { position: relative; overflow: hidden; }
.fogcard__art img { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; transform: scale(1.06); transition: transform 2.4s cubic-bezier(.2, .8, .2, 1); }
.fogcard__art::before { content: ""; position: absolute; inset: -10%; z-index: 1; background: url("/img/cloud-1.webp") -10% 20% / 70% auto no-repeat, url("/img/cloud-0.webp") 110% 80% / 80% auto no-repeat, url("/img/cloud-2.webp") 50% 50% / 90% auto no-repeat, linear-gradient(180deg, rgba(222, 232, 240, .78), rgba(222, 232, 240, .55)); transition: opacity 1.4s, transform 2.4s cubic-bezier(.2, .8, .2, 1); pointer-events: none; }
.fogcard.clear .fogcard__art::before, .fogcard:hover .fogcard__art::before, .fogcard:focus-visible .fogcard__art::before { opacity: .12; transform: scale(1.35); }
.fogcard.clear .fogcard__art img { transform: none; }
html:not(.js) .fogcard__art::before { opacity: .15; }
.fogcard__tag { position: absolute; z-index: 2; left: 14px; top: 14px; padding: 5px 12px; border-radius: 999px; font-weight: 800; font-size: 13px; color: #fff; background: rgba(27, 36, 64, .88); box-shadow: inset 0 0 0 1.5px rgba(232, 240, 255, .7); }
.fogcard figcaption { display: flex; flex-direction: column; padding: 14px 18px 18px; }
.fogcard b { font-family: var(--display); font-weight: 400; font-size: 30px; line-height: 1.05; }
.fogcard figcaption > span { margin-top: 4px; font-size: 16px; color: var(--muted); line-height: 1.4; }
.chips--fog { margin-top: 12px; }
.chips--fog li { background: linear-gradient(180deg, #5d6c8c, #3d4a66); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2), 0 3px 0 #1b2440; padding: 6px 12px; }
.chips--fog li:first-child { font-family: var(--display); font-weight: 400; font-size: 17px; }

.events { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.events li { display: flex; align-items: center; gap: 12px; }
.events img { flex: none; width: 46px; height: 46px; object-fit: contain; padding: 4px; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #82bf5a, #355f26 72%); box-shadow: 0 0 0 2.5px #ffb347, 0 0 0 4.5px #3a1a02; }
.events span { display: flex; flex-direction: column; }
.events b { font-family: var(--display); font-weight: 400; font-size: 19px; line-height: 1.1; }
.events small { font-size: 13px; color: var(--muted); }

/* ---------- The end: level 99 over the sea ---------- */
.stop--end { min-height: calc(var(--vh) * 1.15); display: grid; place-items: center; padding: 90px var(--pad) calc(max(14px, env(safe-area-inset-bottom)) + 96px); }
.stop--end::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 64% 48% at 50% 50%, rgba(6, 10, 26, .9), rgba(6, 10, 26, .6) 60%, rgba(6, 10, 26, 0) 100%); pointer-events: none; }
.finale { position: relative; max-width: 720px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.max { position: relative; width: 300px; height: 300px; display: grid; place-items: center; }
.max::before { content: ""; position: absolute; inset: -60px; border-radius: 50%; background: repeating-conic-gradient(from 0deg, rgba(255, 220, 120, .45) 0 7deg, rgba(255, 220, 120, 0) 7deg 20deg); -webkit-mask: radial-gradient(circle, #000 18%, transparent 66%); mask: radial-gradient(circle, #000 18%, transparent 66%); opacity: 0; transform: scale(.6); transition: opacity .6s, transform 1s cubic-bezier(.2, 1.4, .4, 1); }
.max__ring { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; }
.max__ring li { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; transform: rotate(calc(var(--n) * 32.727deg)) translateY(-124px) rotate(calc(var(--n) * -32.727deg)); }
.max__ring img { width: 52px; height: 52px; padding: 5px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #2c3d78, #0f1736 72%); box-shadow: 0 0 0 2.5px rgba(255, 207, 90, .55), 0 0 0 4.5px #0a1022; filter: saturate(.5) brightness(.8); transition: filter .4s, box-shadow .4s; }
.max__ring .max__lit img { filter: none; box-shadow: 0 0 0 3px var(--gold), 0 0 0 5px #3a2306, 0 0 18px rgba(255, 207, 90, .9); }
.max__badge { position: relative; width: 150px; height: 150px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 50% 30%, #fff6c9, var(--gold) 38%, #c98a22 70%, #7a4a0e); box-shadow: 0 0 0 5px #3a2306, 0 0 0 9px rgba(255, 207, 90, .5), 0 18px 40px rgba(0, 0, 0, .6); }
.max__badge span { font-weight: 900; font-size: 78px; line-height: 1; color: #3a2306; text-shadow: 0 2px 0 rgba(255, 255, 255, .55); font-variant-numeric: tabular-nums; }
.finale.go .max::before { opacity: 1; transform: scale(1); animation: spin 18s linear infinite; }
.js .finale:not(.go) .max__badge { transform: scale(.82); filter: saturate(.6); }
.max__badge { transition: transform .6s cubic-bezier(.2, 1.6, .4, 1), filter .4s; }
.finale__title { margin: 18px 0 0; font-family: var(--display); font-weight: 400; font-size: clamp(40px, 5.6vw, 72px); line-height: 1; color: var(--gold-l); text-shadow: 0 4px 0 #3a2306, 2px 2px 0 #3a2306, -2px -2px 0 #3a2306, 2px -2px 0 #3a2306, -2px 2px 0 #3a2306, 0 0 30px rgba(0, 0, 0, .6); }
.finale__story { margin: 16px 0 0; max-width: 36em; font-size: 19px; color: #eef0f7; text-shadow: 0 1px 3px rgba(0, 0, 0, .9); }
.finale__story b { color: var(--gold-l); }
.finale .store { margin-top: 26px; }
.finale__free { margin: 14px 0 0; font-weight: 800; color: var(--gold-l); text-shadow: 0 1px 3px rgba(0, 0, 0, .9); }

/* ---------- The XP bar: one HUD for the whole page ---------- */
.hud { position: fixed; z-index: 45; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); width: min(720px, calc(100% - 20px)); height: 64px; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; padding: 6px 18px 6px 6px; border-radius: 999px; background: linear-gradient(180deg, rgba(27, 39, 82, .96), rgba(9, 14, 32, .97)); box-shadow: 0 0 0 2px rgba(255, 207, 90, .7), 0 0 0 4px rgba(10, 16, 34, .9), 0 14px 30px rgba(0, 0, 0, .5); transition: opacity .3s; }
body.exploring .hud { opacity: 0; pointer-events: none; }
.hud__badge { position: relative; flex: none; width: 52px; height: 52px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 30%, #fff6c9, var(--gold) 40%, #c98a22 75%, #7a4a0e); box-shadow: 0 0 0 3px #3a2306, inset 0 -3px 0 rgba(0, 0, 0, .2); color: #2a1803; }
.hud__badge small { font-weight: 800; font-size: 10px; line-height: 1; margin-top: 2px; }
.hud__badge span { font-weight: 900; font-size: 22px; line-height: 1; font-variant-numeric: tabular-nums; }
.hud__badge.pop { animation: badgePop .38s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes badgePop { 40% { transform: scale(1.22); } }
.hud__main { flex: 1; min-width: 0; display: grid; gap: 5px; }
.hud__row { display: flex; align-items: baseline; gap: 12px; font-weight: 700; font-size: 13px; line-height: 1; color: var(--muted); white-space: nowrap; }
.hud__xp { font-weight: 900; font-size: 16px; color: var(--gold-l); font-variant-numeric: tabular-nums; }
.hud__where { color: #fff; font-weight: 800; overflow: hidden; text-overflow: ellipsis; }
.hud__next { margin-left: auto; font-variant-numeric: tabular-nums; }
.hud__bar { position: relative; height: 14px; border-radius: 7px; overflow: hidden; background: #070b1f; box-shadow: inset 0 2px 4px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .12); transition: box-shadow .25s; }
.hud__bar i { position: absolute; inset: 0; transform-origin: 0 50%; transform: scaleX(0); border-radius: 7px; background: linear-gradient(180deg, #fff3a8 0%, #ffcf3a 45%, #f08c00 100%); }
.hud.ding .hud__bar { box-shadow: inset 0 2px 4px rgba(0, 0, 0, .6), 0 0 0 2px var(--gold), 0 0 18px rgba(255, 210, 80, .8); }
.hud__total { height: 4px; border-radius: 2px; overflow: hidden; background: rgba(255, 255, 255, .12); }
.hud__total i { display: block; height: 100%; transform-origin: 0 50%; transform: scaleX(0); background: #7fb2ff; }
.hud.maxed .hud__bar i { background: linear-gradient(180deg, #d9fff0, #59e3b2 45%, #1d9c76); }
.hud.maxed .hud__next { color: var(--green); font-weight: 900; }

/* toasts: one at a time, above the bar. On a laptop they sit on the map's side of the screen, away from the text cards */
.hud__toasts { position: absolute; left: 50%; bottom: calc(100% + 14px); width: max-content; max-width: calc(100vw - 24px); transform: translateX(-50%); display: flex; flex-direction: column-reverse; align-items: center; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 8px 18px 8px 10px; border-radius: 16px; font-weight: 800; font-size: 15px; line-height: 1.2; background: linear-gradient(180deg, #2b3a74, #141c3d); box-shadow: 0 0 0 2px var(--gold), 0 0 0 4px #0a1022, 0 10px 20px rgba(0, 0, 0, .45); animation: toastIn .45s cubic-bezier(.2, 1.5, .4, 1); }
.toast img { width: 40px; height: 40px; }
.toast b { display: block; font-family: var(--display); font-weight: 400; font-size: 22px; line-height: 1; color: var(--gold-l); }
.toast small { display: block; margin-top: 2px; font-weight: 700; font-size: 13px; color: var(--muted); }
.toast.out { opacity: 0; transform: translateY(8px) scale(.96); transition: opacity .3s, transform .3s; }
.toast--fog { box-shadow: 0 0 0 2px #e8f0ff, 0 0 0 4px #0a1022, 0 10px 20px rgba(0, 0, 0, .45); }
.toast--fog b { color: #eef4ff; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.85); } to { opacity: 1; transform: none; } }

/* explore mode */
body.exploring { overflow: hidden; }
body.exploring .stage { position: fixed; inset: 0; z-index: 50; height: auto; }
body.exploring .map { touch-action: none; }
body.exploring .stop--hero { visibility: hidden; }

/* ---------- Laptop and up ---------- */
@media (min-width: 761px) {
  .zone { left: calc(50% + 320px + var(--pad) / 2); max-width: calc(100vw - 640px - var(--pad) * 2 - 24px); top: 19%; }
  .zone__name { font-size: clamp(36px, 4.2vw, 70px); }
}
@media (min-width: 761px) and (max-width: 1100px) {
  .duo, .forge__stick { gap: 18px; }
  .phone { --pw: 220px; }
  .phone--small { --pw: 170px; }
  .tri { grid-template-columns: 1fr; }
  .tri__fig { margin: 0 auto; }
}
@media (min-width: 761px) {
  /* beats zig-zag: the content sits on the side away from the place the camera shows */
  .stop[data-side="r"] .beat, .beat[data-side="r"] { margin-left: auto; }
  body.side-r .zone { left: calc(50% - 320px - var(--pad) / 2); }
  .hud__toasts { left: auto; right: calc((100% - 100vw) / 2 + var(--pad)); transform: none; align-items: flex-end; }
  body.side-r .hud__toasts { right: auto; left: calc((100% - 100vw) / 2 + var(--pad)); align-items: flex-start; }
}

/* ---------- Phone ---------- */
@media (max-width: 760px) {
  .stop--hero { align-items: stretch; padding: 0 16px calc(max(10px, env(safe-area-inset-bottom)) + 70px); }
  .hero__vs { margin-top: 26px; }
  .stop--hero::before { background: linear-gradient(180deg, rgba(6, 10, 26, .72) 0%, rgba(6, 10, 26, .2) 24%, rgba(6, 10, 26, 0) 36%, rgba(6, 10, 26, 0) 46%, rgba(6, 10, 26, .6) 60%, rgba(6, 10, 26, .9) 82%); -webkit-mask: linear-gradient(180deg, #000 calc(100% - 90px), transparent); mask: linear-gradient(180deg, #000 calc(100% - 90px), transparent); }
  .hero { max-width: none; width: 100%; padding: 62px 0 0; display: flex; flex-direction: column; align-items: center; text-align: center; min-height: calc(var(--vh) - 80px); }
  .hero__logo { width: min(320px, 84vw); }
  .hero__line { margin-top: 6px; font-size: clamp(25px, 7.2vw, 32px); max-width: 12em; }
  .hero__sub { margin-top: auto; font-size: 15px; max-width: 24em; }
  .hero__cta { justify-content: center; margin-top: 14px; gap: 10px; }
  .hero__leagues { margin-top: 12px; display: flex; flex-direction: column; align-items: center; }
  .crestrow li { width: 46px; }
  .crestrow img { width: 46px; height: 46px; }
  .hero__free { font-size: 13px; }
  .store__txt { font-size: 22px; }
  .store { padding: 8px 16px 8px 12px; }
  .btn { font-size: 19px; padding: 13px 16px 12px; }
  .hero__down { display: none; }
  .mapui { right: 12px; }
  body:not(.exploring) .mapui { display: none; }
  .mapui__hint { display: none; }
  .knob:not(.knob--wide) { width: 44px; height: 44px; font-size: 27px; }
  .pin__b { width: 44px; height: 44px; margin: -22px 0 0 -22px; box-shadow: 0 0 0 2.5px var(--gold), 0 0 0 4px #3a2306, 0 6px 12px rgba(0, 0, 0, .45); }
  .pin__b img { width: 34px; height: 34px; }
  .pin--champ .pin__b { width: 38px; height: 38px; margin: -19px 0 0 -19px; }
  .pin--champ .pin__b img { width: 34px; height: 34px; }
  .pin--event .pin__b { width: 34px; height: 34px; margin: -17px 0 0 -17px; }
  .pin--event .pin__b img { width: 30px; height: 30px; }
  .pin--fog .pin__b .ico { width: 20px; height: 20px; }
  .pin__l { top: 26px; font-size: 14px; }
  .pin--champ .pin__l, .pin--event .pin__l { display: none; }
  body.at-hero:not(.exploring) #pin-waymere .pin__l { display: none; }
  .pin__lv { left: 8px; top: -30px; font-size: 12px; padding: 3px 5px; }
  .region span { font-size: 16px; }
  .region--fog:not(.region--sea) span { display: none; }
  .region--big span { font-size: 19px; }
  .card { left: 10px; right: 10px; width: auto; top: auto; bottom: calc(max(10px, env(safe-area-inset-bottom)) + 76px); transform: none; max-height: 58vh; animation-name: sheetIn; }
  body.exploring .card { bottom: max(10px, env(safe-area-inset-bottom)); max-height: 66vh; }
  body.exploring.card-open .mapui__zoom { display: none; }
  @keyframes sheetIn { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
  .card__art { height: 110px; }
  .stop--hero .hero { transition: opacity .3s; }
  body.card-open .stop--hero .hero { opacity: 0; }
  .zone { top: calc(var(--vh) * .14); }
  .zone__name { font-size: clamp(36px, 10.5vw, 50px); }
  .zone__region { font-size: 13px; }
  .rank__crest { width: 92px; height: 92px; }
  .rank__league { font-size: 19px; }

  /* compact cards with the map showing between them */
  .stop:not(.stop--hero):not(.stop--end) { padding: calc(var(--vh) * .58) 12px calc(var(--vh) * .3); }
  .beat + .beat { margin-top: calc(var(--vh) * .42); }
  .panel { padding: 20px 16px 20px; border-radius: 22px; }
  .h2 { font-size: clamp(30px, 8.6vw, 38px); }
  .h3 { font-size: 26px; }
  .lede { font-size: 16px; }
  .body { font-size: 15px; }
  .chips { margin-top: 12px; gap: 6px; }
  .chips li { font-size: 13px; padding: 6px 10px 6px 8px; }
  .vs { height: 112px; padding: 0 18px; margin: -4px -4px 14px; }
  .vs__hero { height: 106px; }
  .vs__word { font-size: 64px; }
  .duo, .duo--flip { flex-direction: column; align-items: stretch; gap: calc(var(--vh) * .26); }
  .duo > .phone { align-self: center; }
  .phone { --pw: min(54vw, 230px); }
  .phone--small { --pw: min(46vw, 190px); }
  .rest { gap: calc(var(--vh) * .2); }
  .rest__phones { gap: 12px; }
  .rest__phones .phone { --pw: min(44vw, 200px); }
  .drop--hit > span { width: 40px; height: 40px; font-size: 22px; }
  .drop--crit > span { width: 52px; height: 52px; font-size: 27px; }
  .drop--lv > span { font-size: 19px; padding: 5px 12px 5px 7px; }
  .drop--lv img { width: 28px; height: 28px; }
  .panel--side { padding: 18px 16px 18px; }
  .podium { gap: 4px; }
  .podium li { min-height: calc(76px + var(--h) * 12px); padding: 6px 1px 8px; }
  .podium img { width: 38px; height: 38px; margin-top: -24px; }
  .podium b { font-size: 14px; }
  .podium span { font-size: 11px; }
  .tri { grid-template-columns: 1fr; gap: 6px; }
  .tri__fig { width: 220px; margin: 0 auto; }
  .tri__n img { width: 58px; height: 58px; }
  .tiles b { font-size: 12px; }
  .forge { width: 100%; }
  .js .forge { height: calc(var(--vh) * 3.4); }
  .forge__stick { flex-direction: column; gap: 12px; }
  .js .forge__stick { top: 62px; }
  .forge__phone { --pw: min(42vw, 30vh, 200px); }
  .forge__card { width: 100%; padding: 14px 14px 16px; }
  .forge__card .h3 { font-size: 22px; }
  .chain { margin-top: 8px; }
  .chain .ico { width: 40px; height: 40px; }
  .chain li:not(:last-child)::after { top: 14px; }
  .steps { margin-top: 8px; }
  .steps li { font-size: 15px; }
  .metals { margin-top: 10px; }
  .metals li { font-size: 15px; padding: 4px 10px 3px; }
  .hub b { font-size: 20px; }
  .hub img { width: 44px; height: 44px; }
  .fogcard b { font-size: 26px; }
  .fogcard figcaption > span { font-size: 15px; }
  .max { width: 250px; height: 250px; }
  .max__ring li { width: 44px; height: 44px; margin: -22px 0 0 -22px; transform: rotate(calc(var(--n) * 32.727deg)) translateY(-104px) rotate(calc(var(--n) * -32.727deg)); }
  .max__ring img { width: 44px; height: 44px; }
  .max__badge { width: 124px; height: 124px; }
  .max__badge span { font-size: 64px; }
  .finale__story { font-size: 17px; }
  .store--big .store__txt { font-size: 28px; }

  .hud { height: 58px; gap: 10px; padding: 5px 14px 5px 5px; width: calc(100% - 16px); bottom: max(8px, env(safe-area-inset-bottom)); }
  .hud__badge { width: 48px; height: 48px; }
  .hud__badge span { font-size: 20px; }
  .hud__row { font-size: 12px; gap: 8px; }
  .hud__xp { font-size: 14px; }
  .hud__next { display: none; }
  .hud__where { margin-left: auto; }
  /* on a phone the toast takes over the XP bar for a moment instead of covering the cards above it */
  .hud__toasts { z-index: 2; inset: 4px 4px 4px 56px; width: auto; max-width: none; transform: none; display: block; }
  .toast { height: 100%; gap: 8px; padding: 2px 14px 2px 6px; border-radius: 999px; font-size: 13px; box-shadow: 0 0 0 2px var(--gold); animation-name: toastInHud; }
  .toast--fog { box-shadow: 0 0 0 2px #e8f0ff; }
  .toast b { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .toast small { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .toast > span { min-width: 0; }
  .toast img { width: 32px; height: 32px; }
  @keyframes toastInHud { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}
@media (max-width: 380px) {
  .hero__cta { flex-direction: column; }
  .crestrow li, .crestrow img { width: 42px; height: 42px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .curtain { display: none; }
  .sky__cloud { animation: none !important; transform: translateX(10vw); }
  .sky__cloud--b { transform: translateX(60vw); }
  .pin__b::before, .smoke, .walker, .tri__e { animation: none !important; }
  .pin__b::before { opacity: 0; }
  .fog-cloud img { animation: none !important; }
  .levelup::before, .finale.go .max::before { animation: none !important; }
  .hero__logo, .hero__line, .hero__sub, .hero__cta, .hero__leagues, .hero__vs, .hero__duel, .crestrow li, .toast, .pin__b { animation-name: fadeIn !important; }
  .zone, .zone.show { transform: translate(-50%, -50%); }
  .toast.out { transform: none; }
}

/* the footer clears the XP bar */
.page-home .foot__in { padding-bottom: calc(max(30px, env(safe-area-inset-bottom)) + 84px); }
