:root {
  --ink: #f3f0e7; --muted: #9fa9a5; --paper: #dfe6d7; --dark: #0b1b22; --deep: #07141b;
  --teal: #4fd2bf; --gold: #f4bb67; --orange: #e88652; --line: rgba(220, 239, 225, .16);
  --shadow: 0 24px 80px rgba(0, 0, 0, .33); --sans: 'Manrope', sans-serif; --mono: 'DM Mono', monospace; --display: 'Rye', serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--dark); color: var(--ink); font-family: var(--sans); }
body { overflow-x: hidden; }
button { border: 0; color: inherit; font: inherit; cursor: pointer; }
button:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.app-shell { min-height: 100vh; background: var(--deep); }
.screen { display: none; min-height: 100vh; position: relative; overflow: hidden; }
.screen.active { display: block; }
.page-width { width: min(1260px, calc(100% - 96px)); margin-inline: auto; }
.home-screen { background: radial-gradient(circle at 82% 30%, rgba(81, 136, 125, .22), transparent 30%), linear-gradient(115deg, #0a2028 0%, #102f34 48%, #1c4d47 100%); }
.home-screen:after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .07; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.4'/%3E%3C/svg%3E"); }
.site-nav { position: relative; z-index: 5; height: 100px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(220, 239, 225, .1); }
.brand-lockup, .game-brand { display: flex; align-items: center; gap: 11px; background: none; text-align: left; color: var(--ink); }
.brand-mark { color: var(--gold); font-size: 24px; line-height: 1; }
.brand-lockup strong { display: block; font-size: 13px; letter-spacing: .18em; font-weight: 800; }
.brand-lockup small { display: block; color: var(--muted); font: 10px var(--mono); letter-spacing: .36em; margin-top: 4px; }
.main-nav { display: flex; gap: 38px; height: 100%; align-items: center; margin-left: 110px; }
.nav-link { position: relative; background: none; color: #a9b6b1; font: 11px var(--mono); letter-spacing: .12em; height: 100%; padding: 4px 0 0; }
.nav-link:after { content: ''; position: absolute; bottom: -1px; left: 0; right: 0; height: 2px; background: var(--teal); opacity: 0; transform: scaleX(.5); transition: .25s; }
.nav-link:hover, .nav-link.active { color: var(--ink); }.nav-link.active:after { opacity: 1; transform: scaleX(1); }
.nav-actions { display: flex; align-items: center; gap: 17px; }.coin-chip { display: flex; align-items: center; gap: 8px; color: var(--gold); font: 12px var(--mono); }
.coin-icon { color: var(--gold); font-size: 17px; text-shadow: 0 0 10px rgba(244, 187, 103, .45); }.icon-button { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; background: rgba(255,255,255,.03); color: #aebdb6; font-size: 16px; transition: .2s; }.icon-button:hover { border-color: var(--teal); color: var(--teal); transform: rotate(20deg); }
.home-layout { position: relative; z-index: 1; min-height: calc(100vh - 170px); display: grid; grid-template-columns: .83fr 1.17fr; align-items: center; gap: 30px; padding-top: 24px; }
.home-intro { padding-bottom: 60px; position: relative; z-index: 2; }.eyebrow { display: flex; align-items: center; gap: 12px; color: var(--teal); font: 10px var(--mono); letter-spacing: .13em; }.eyebrow-line { height: 1px; width: 34px; background: currentColor; }
h1, h2 { font-family: var(--display); font-weight: 400; letter-spacing: .06em; line-height: .98; margin: 24px 0 24px; color: #eeeadd; } h1 { font-size: clamp(48px, 6vw, 86px); } h2 { font-size: clamp(50px, 6.5vw, 85px); } h1 em, h2 em { color: var(--gold); font-style: normal; text-shadow: 2px 3px 0 rgba(0,0,0,.16); }
.intro-copy, .loadout-heading p, .simple-heading p { max-width: 390px; color: #b3c1ba; font-size: 14px; line-height: 1.75; }.intro-actions { display: flex; align-items: center; gap: 20px; margin-top: 34px; }
.button { min-height: 46px; padding: 0 21px; display: inline-flex; align-items: center; justify-content: center; gap: 14px; font: 11px var(--mono); letter-spacing: .12em; transition: .2s; }.button span { font-size: 17px; line-height: 0; }.button-primary { background: var(--gold); color: #192425; box-shadow: 0 10px 25px rgba(244, 187, 103, .14); }.button-primary:hover { background: #ffd28e; transform: translateY(-2px); box-shadow: 0 15px 30px rgba(244, 187, 103, .22); }.button-ghost { color: #c4cec6; border: 1px solid rgba(196, 206, 198, .28); background: transparent; }.button-ghost:hover { border-color: var(--teal); color: var(--teal); }.button-large { min-height: 55px; padding-inline: 28px; }
.player-rank { display: flex; align-items: center; gap: 13px; margin-top: 86px; color: var(--gold); }.rank-sigil { height: 36px; width: 36px; display: grid; place-items: center; border: 1px solid rgba(244,187,103,.5); border-radius: 50%; font-size: 19px; }.player-rank small, .loadout-summary small { display: block; color: #83938c; font: 9px var(--mono); letter-spacing: .12em; margin-bottom: 4px; }.player-rank strong, .loadout-summary strong { display: block; font: 11px var(--mono); letter-spacing: .12em; }.rank-arrow { color: var(--teal); font-size: 21px; margin-left: 8px; }
.home-visual { height: min(670px, calc(100vh - 150px)); min-height: 450px; position: relative; overflow: hidden; background: linear-gradient(180deg, rgba(25,81,76,.12), rgba(3,17,22,.38)), linear-gradient(150deg, rgba(87, 149, 128, .23), transparent 60%); border-left: 1px solid rgba(255,255,255,.11); border-right: 1px solid rgba(255,255,255,.04); }
.home-visual:before { content: ''; position: absolute; inset: 0; opacity: .42; background: repeating-linear-gradient(120deg, transparent 0 23px, rgba(201,234,191,.045) 24px 25px); transform: skewX(-17deg) translateX(20%); }
.sun-glow { position: absolute; width: 390px; height: 390px; border-radius: 50%; background: radial-gradient(circle, rgba(244,187,103,.22), transparent 68%); top: 4%; left: 15%; }.moon-orb { position: absolute; width: 70px; height: 70px; background: #f1dfb6; border-radius: 50%; top: 18%; right: 19%; box-shadow: 0 0 42px rgba(241,223,182,.32); }.moon-orb:after { content: ''; position: absolute; inset: 10px -4px 0 12px; background: #54867c; border-radius: 50%; }
.mountain { position: absolute; width: 110%; left: -5%; bottom: 16%; clip-path: polygon(0 100%, 24% 35%, 41% 65%, 61% 12%, 80% 57%, 100% 28%, 100% 100%); }.mountain-back { height: 55%; background: rgba(43, 91, 84, .7); }.mountain-front { height: 42%; bottom: 8%; background: #143c40; clip-path: polygon(0 100%, 16% 52%, 28% 76%, 49% 30%, 61% 64%, 80% 42%, 100% 69%, 100% 100%); }.ruin { position: absolute; bottom: 21%; border: 4px solid #102c32; border-bottom: 0; opacity: .8; }.ruin-left { left: 12%; width: 90px; height: 160px; transform: skewY(-5deg); }.ruin-right { right: 7%; width: 58px; height: 120px; transform: skewY(8deg); }.ruin span { position: absolute; top: 34px; width: 5px; height: calc(100% - 34px); background: #102c32; }.ruin-left span:nth-child(1) { left: 12px; }.ruin-left span:nth-child(2) { left: 42px; }.ruin-left span:nth-child(3) { right: 10px; }.ruin-right span:nth-child(1) { left: 14px; }.ruin-right span:nth-child(2) { right: 12px; }.gate { position: absolute; z-index: 2; left: 50%; bottom: 18%; transform: translateX(-50%); width: 190px; height: 200px; border: 13px solid #091f28; border-bottom: 0; border-radius: 110px 110px 0 0; box-shadow: 0 0 0 4px rgba(244,187,103,.2), 0 0 50px rgba(0,0,0,.32); }.gate-shadow { position: absolute; left: 23px; right: 23px; top: 30px; bottom: 0; background: #020a0e; border-radius: 80px 80px 0 0; }.gate-arch { position: absolute; z-index: 2; color: var(--gold); font-size: 20px; left: 50%; top: 17px; transform: translateX(-50%); text-shadow: 0 0 18px rgba(244,187,103,.8); }.path-path { position: absolute; z-index: 1; bottom: -12%; left: 25%; width: 50%; height: 45%; background: linear-gradient(90deg, transparent, rgba(228,198,144,.17), transparent); clip-path: polygon(40% 0, 60% 0, 100% 100%, 0 100%); }.firefly { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 14px 4px rgba(244,187,103,.5); animation: float 3.5s ease-in-out infinite; }.firefly-one { left: 30%; top: 34%; }.firefly-two { right: 28%; top: 45%; animation-delay: .8s; }.firefly-three { left: 63%; top: 57%; animation-delay: 1.8s; }.visual-caption { position: absolute; z-index: 2; bottom: 32px; right: 30px; display: flex; gap: 13px; color: #8ea79c; font: 9px var(--mono); letter-spacing: .12em; }.visual-caption span:first-child { color: var(--gold); }.home-footer { position: absolute; z-index: 3; bottom: 31px; left: 0; right: 0; display: flex; justify-content: space-between; color: #82948c; font: 9px var(--mono); letter-spacing: .1em; }.status-dot { display: inline-block; width: 5px; height: 5px; background: var(--teal); border-radius: 50%; margin-right: 6px; box-shadow: 0 0 8px var(--teal); }.footer-fact strong { color: var(--gold); font-weight: 400; }

/* Loadout and content pages */
.loadout-screen, .simple-screen { background: radial-gradient(circle at 75% 30%, rgba(47,103,91,.22), transparent 30%), #0d252b; }.loadout-screen:before, .simple-screen:before { content: ''; position: absolute; inset: 0; opacity: .05; background-image: linear-gradient(120deg, transparent 0 49%, rgba(255,255,255,.6) 50%, transparent 51%); background-size: 110px 110px; }.sub-nav { position: relative; z-index: 1; height: 86px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }.back-button { background: none; color: #a4b2ab; font: 10px var(--mono); letter-spacing: .12em; }.back-button:hover { color: var(--teal); }.stepper { display: flex; align-items: center; gap: 12px; margin-left: 90px; }.stepper i { width: 50px; height: 1px; background: rgba(255,255,255,.18); }.step { display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; color: #81928b; font: 9px var(--mono); }.step.active { background: var(--gold); border-color: var(--gold); color: #17262b; }.step-label { color: #80948a; font: 10px var(--mono); letter-spacing: .14em; }.loadout-content { position: relative; z-index: 1; padding: 58px 0 40px; }.loadout-heading { display: flex; align-items: flex-end; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 38px; }.loadout-heading h2, .simple-heading h2 { margin: 19px 0 0; }.loadout-heading p { margin: 0 90px 7px 0; }.selection-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 75px; padding: 36px 0 28px; }.selection-label { display: flex; gap: 10px; align-items: center; color: #e7e3d5; font: 11px var(--mono); letter-spacing: .13em; }.selection-label > span { color: var(--gold); }.selection-label small { color: #71847d; margin-left: 4px; font-size: 9px; }.option-stack { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 19px; }.option-card { position: relative; padding: 17px; border: 1px solid rgba(255,255,255,.13); background: rgba(255,255,255,.035); text-align: left; min-height: 104px; transition: .2s; }.option-card:hover { background: rgba(255,255,255,.08); border-color: rgba(79,210,191,.65); }.option-card.selected { border-color: var(--gold); background: rgba(244,187,103,.1); box-shadow: inset 3px 0 var(--gold); }.option-glyph { color: var(--teal); font-size: 25px; float: right; }.option-card.selected .option-glyph { color: var(--gold); }.option-card strong { display: block; font: 12px var(--mono); letter-spacing: .08em; margin: 22px 0 6px; }.option-card small { color: #83968d; font-size: 11px; line-height: 1.45; display: block; }.option-card .select-check { position: absolute; right: 12px; bottom: 10px; color: var(--gold); font-size: 12px; opacity: 0; }.option-card.selected .select-check { opacity: 1; }.map-selection { border-top: 1px solid var(--line); padding-top: 29px; }.map-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 19px; }.map-card { min-height: 126px; padding: 17px; text-align: left; border: 1px solid rgba(255,255,255,.13); position: relative; overflow: hidden; background: #1c4a45; transition: .2s; }.map-card:before { content: ''; position: absolute; inset: 0; opacity: .5; background: repeating-linear-gradient(130deg, transparent 0 19px, rgba(255,255,255,.08) 20px 21px); }.map-card:after { content: ''; position: absolute; bottom: -35px; right: -17px; width: 115px; height: 115px; border-radius: 50%; background: rgba(244,187,103,.18); }.map-card[data-map="moon"] { background: #1b2b48; }.map-card[data-map="snow"] { background: #537683; }.map-card.selected { border: 1px solid var(--gold); box-shadow: inset 0 0 0 2px rgba(244,187,103,.25); }.map-card-content { position: relative; z-index: 1; }.map-card strong { display: block; font: 14px var(--mono); letter-spacing: .05em; margin-bottom: 7px; }.map-card small { color: #cfdbd1; font-size: 11px; }.map-card .map-no { position: absolute; right: 14px; top: 14px; color: var(--gold); font: 10px var(--mono); }.loadout-footer { margin-top: 34px; border-top: 1px solid var(--line); padding-top: 23px; display: flex; align-items: center; justify-content: space-between; }.loadout-summary { display: flex; gap: 13px; align-items: center; }.summary-icon { color: var(--gold); font-size: 26px; }.simple-content { position: relative; z-index: 1; padding: 72px 0; }.simple-heading { border-bottom: 1px solid var(--line); padding-bottom: 38px; display: flex; align-items: flex-end; justify-content: space-between; }.simple-heading p { margin: 0 84px 9px 0; }.history-list { padding-top: 22px; }.history-empty { color: #83958c; padding: 45px 0; font: 12px var(--mono); letter-spacing: .06em; }.history-row { display: grid; grid-template-columns: 78px 1fr 160px 120px 24px; align-items: center; gap: 18px; min-height: 84px; border-bottom: 1px solid var(--line); }.history-row > span:first-child { color: var(--gold); font: 12px var(--mono); }.history-row strong { display: block; font: 13px var(--mono); letter-spacing: .07em; }.history-row small { display: block; color: #85958e; font-size: 11px; margin-top: 5px; }.history-result { font: 10px var(--mono); letter-spacing: .1em; }.history-result.won { color: var(--teal); }.history-result.lost { color: var(--orange); }.history-arrow { color: #72847c; }.shop-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; padding-top: 25px; }.shop-card { background: rgba(255,255,255,.045); border: 1px solid var(--line); min-height: 213px; padding: 23px; display: flex; flex-direction: column; }.shop-card .shop-glyph { color: var(--teal); font-size: 31px; margin-bottom: 24px; }.shop-card strong { font: 13px var(--mono); letter-spacing: .08em; }.shop-card p { color: #87978f; font-size: 12px; line-height: 1.5; margin: 9px 0 auto; }.shop-card button { width: 100%; margin-top: 22px; min-height: 41px; background: transparent; border: 1px solid rgba(255,255,255,.2); color: var(--gold); font: 10px var(--mono); letter-spacing: .1em; }.shop-card button:hover { background: var(--gold); color: var(--dark); }.shop-card button:disabled { cursor: default; color: #77867f; border-color: rgba(255,255,255,.1); }

/* Game */
.game-screen { min-height: 100svh; background: #07181e; }.game-topbar { position: absolute; z-index: 5; top: 0; left: 0; right: 0; min-height: 78px; background: rgba(5,18,24,.9); border-bottom: 1px solid rgba(255,255,255,.1); display: grid; grid-template-columns: 190px 170px 1fr 310px; align-items: center; padding: 0 28px; gap: 25px; }.game-brand { font: 10px var(--mono); letter-spacing: .15em; line-height: 1.5; }.game-brand .brand-mark { font-size: 20px; }.game-brand small { color: #7d9188; font-size: 8px; letter-spacing: .3em; }.level-readout { display: flex; align-items: center; gap: 9px; }.level-readout small, .objective-readout small { color: #789087; font: 8px var(--mono); letter-spacing: .12em; }.level-readout strong { color: var(--gold); font: 24px var(--mono); }.level-readout span { color: #b2c4b9; font: 10px var(--mono); letter-spacing: .06em; max-width: 86px; }.objective-readout { padding-left: 25px; border-left: 1px solid rgba(255,255,255,.12); }.objective-readout strong { display: block; font: 11px var(--mono); letter-spacing: .08em; margin: 6px 0 7px; }.objective-progress { width: min(300px, 75%); height: 3px; background: rgba(255,255,255,.13); }.objective-progress span { display: block; background: var(--teal); height: 100%; width: 0; transition: width .3s; }.game-meta { justify-self: end; display: flex; align-items: center; gap: 19px; }.game-coins { color: var(--gold); font: 11px var(--mono); }.icon-button.light { color: #bfd0c7; }.quit-button { color: #7d9289; background: none; font: 9px var(--mono); letter-spacing: .12em; }.quit-button:hover { color: var(--orange); }.arena-wrap { position: absolute; inset: 78px 0 0; overflow: hidden; background: #325e4f; }.arena-wrap.theme-meadow { background: #417060; }.arena-wrap.theme-moon { background: #263d5c; }.arena-wrap.theme-snow { background: #70929a; }.arena-wrap canvas { display: block; width: 100%; height: 100%; touch-action: none; }.arena-vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, transparent 45%, rgba(1,9,13,.39) 100%); }.game-hud-left { position: absolute; top: 24px; left: 25px; display: flex; gap: 9px; pointer-events: none; }.hud-card { min-width: 108px; padding: 10px 13px; border: 1px solid rgba(255,255,255,.18); background: rgba(4,16,20,.52); backdrop-filter: blur(6px); }.hud-card small { color: #a8bcb0; display: block; font: 8px var(--mono); letter-spacing: .12em; margin-bottom: 5px; }.hearts { color: #ff9b6f; font-size: 15px; letter-spacing: 2px; text-shadow: 0 0 12px rgba(255,155,111,.5); white-space: nowrap; }.weapon-hud strong { font: 10px var(--mono); color: var(--gold); letter-spacing: .06em; }.boss-bar-wrap { position: absolute; top: 25px; left: 50%; transform: translateX(-50%); width: min(300px, 36vw); pointer-events: none; }.boss-label { display: flex; align-items: baseline; gap: 7px; justify-content: center; margin-bottom: 7px; }.boss-label span { color: var(--orange); }.boss-label strong { font: 10px var(--mono); letter-spacing: .09em; }.boss-label small { color: #a0aea4; font: 8px var(--mono); }.boss-bar { height: 5px; background: rgba(3,10,14,.65); border: 1px solid rgba(255,255,255,.12); }.boss-bar span { display: block; width: 100%; height: 100%; background: linear-gradient(90deg, var(--orange), #f5b962); transition: width .2s; }.level-toast { position: absolute; pointer-events: none; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(.94); opacity: 0; text-align: center; transition: opacity .4s, transform .4s; }.level-toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }.level-toast small { display: block; color: var(--teal); font: 9px var(--mono); letter-spacing: .18em; margin-bottom: 12px; }.level-toast strong { display: block; color: #eeeadd; font: 34px var(--display); letter-spacing: .08em; white-space: nowrap; }.level-toast span { display: block; color: var(--gold); font: 11px var(--mono); letter-spacing: .12em; margin-top: 12px; }.pickup-toast { position: absolute; top: 125px; left: 50%; transform: translateX(-50%); color: var(--gold); font: 10px var(--mono); letter-spacing: .1em; opacity: 0; transition: .2s; }.pickup-toast.show { opacity: 1; transform: translate(-50%, -8px); }.game-hint { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); color: rgba(232,242,229,.55); font: 9px var(--mono); letter-spacing: .08em; white-space: nowrap; pointer-events: none; }.game-hint strong { color: var(--gold); font-weight: 400; }.game-hint span { padding: 0 8px; color: var(--teal); }.touch-controls { display: none; }.direction-badge { position: absolute; right: 25px; top: 25px; color: rgba(235,243,231,.56); font: 9px var(--mono); letter-spacing: .11em; }.direction-badge span { color: var(--gold); font-size: 16px; margin-left: 4px; }

/* Modals */
.modal-layer { display: none; position: fixed; z-index: 30; inset: 0; background: rgba(1,7,11,.78); backdrop-filter: blur(7px); align-items: center; justify-content: center; padding: 24px; }.modal-layer.open { display: flex; }.modal-card { display: none; position: relative; width: min(580px, 100%); padding: 45px; border: 1px solid rgba(244,187,103,.34); background: #102b30; box-shadow: var(--shadow); animation: modal-in .26s ease-out; }.modal-card.open { display: block; }.modal-close { position: absolute; top: 17px; right: 19px; background: none; color: #90a29a; font-size: 26px; }.modal-close:hover { color: var(--gold); }.modal-kicker { color: var(--teal); font: 10px var(--mono); letter-spacing: .15em; }.modal-card h2 { font-size: 44px; margin: 18px 0 30px; }.tutorial-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 30px; }.tutorial-steps div { border-top: 1px solid var(--line); padding-top: 12px; }.tutorial-steps span { color: var(--gold); font: 10px var(--mono); }.tutorial-steps strong { display: block; font: 11px var(--mono); letter-spacing: .1em; margin-top: 20px; }.tutorial-steps p { color: #91a29b; font-size: 11px; line-height: 1.6; }.setting-row { display: flex; justify-content: space-between; align-items: center; padding: 17px 0; border-bottom: 1px solid var(--line); }.setting-row strong { display: block; font: 12px var(--mono); letter-spacing: .06em; }.setting-row small { display: block; color: #84968d; font-size: 11px; margin-top: 4px; }.toggle { width: 38px; height: 21px; border-radius: 20px; background: #2a494a; padding: 3px; }.toggle i { display: block; width: 15px; height: 15px; border-radius: 50%; background: #879890; transition: .2s; }.toggle.active { background: var(--teal); }.toggle.active i { transform: translateX(17px); background: #e8ebd9; }.settings-modal .button { margin-top: 28px; }.end-modal { text-align: center; width: min(440px, 100%); padding: 39px 45px 35px; }.end-modal .modal-kicker { color: var(--orange); }.end-sigil { width: 55px; height: 55px; margin: 19px auto 12px; display: grid; place-items: center; border: 1px solid rgba(244,187,103,.7); border-radius: 50%; color: var(--gold); font-size: 25px; }.end-modal h2 { font-size: 38px; margin: 0 0 14px; }.end-modal p { color: #9aa9a1; font-size: 12px; line-height: 1.6; max-width: 300px; margin: auto; }.end-stats { display: flex; justify-content: center; gap: 45px; border-block: 1px solid var(--line); margin: 24px 0; padding: 16px; }.end-stats small { display: block; color: #7e9288; font: 8px var(--mono); letter-spacing: .1em; margin-bottom: 5px; }.end-stats strong { color: var(--gold); font: 17px var(--mono); }.end-modal .button { width: 100%; }.end-modal .button-ghost { margin-top: 9px; }
@keyframes float { 0%, 100% { transform: translateY(0); opacity: .5; } 50% { transform: translateY(-12px); opacity: 1; } } @keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }

@media (max-width: 900px) { .page-width { width: min(100% - 42px, 680px); }.main-nav { margin-left: 0; gap: 20px; }.home-layout { grid-template-columns: 1fr; padding-top: 55px; }.home-intro { padding-bottom: 0; }.home-visual { height: 380px; min-height: 0; margin-top: 10px; }.home-footer { position: relative; bottom: auto; margin-top: 28px; padding-bottom: 26px; }.player-rank { margin-top: 42px; }.loadout-heading, .simple-heading { display: block; }.loadout-heading p, .simple-heading p { margin: 23px 0 0; }.selection-grid { gap: 20px; }.game-topbar { grid-template-columns: 130px 125px 1fr; padding: 0 16px; gap: 12px; }.game-meta { grid-column: 3; }.game-meta .quit-button { display: none; }.objective-readout { display: none; } }
@media (max-width: 600px) { .page-width { width: calc(100% - 32px); }.site-nav { height: 75px; }.brand-lockup strong { font-size: 11px; }.brand-lockup small { font-size: 8px; }.main-nav { gap: 13px; }.nav-link { font-size: 9px; }.nav-actions .coin-chip { display: none; }.home-layout { padding-top: 38px; min-height: auto; }.home-intro h1 { font-size: 51px; }.intro-copy { font-size: 13px; }.intro-actions { gap: 8px; }.button { padding-inline: 14px; }.button-large { min-height: 50px; font-size: 10px; }.home-visual { height: 300px; margin-inline: -16px; }.home-footer { font-size: 8px; gap: 12px; }.footer-fact { text-align: right; }.sub-nav { height: 68px; }.stepper { margin-left: 0; gap: 6px; }.stepper i { width: 20px; }.step-label { display: none; }.loadout-content { padding-top: 38px; }.loadout-heading h2 { font-size: 52px; }.selection-grid { grid-template-columns: 1fr; gap: 28px; }.option-card { min-height: 90px; }.map-options { grid-template-columns: 1fr; }.map-card { min-height: 85px; }.loadout-footer { display: block; }.loadout-footer .button { width: 100%; margin-top: 20px; }.simple-content { padding-top: 42px; }.simple-heading h2 { font-size: 58px; }.shop-list { grid-template-columns: 1fr; }.shop-card { min-height: 170px; }.history-row { grid-template-columns: 48px 1fr 82px 20px; gap: 8px; }.history-row > div:nth-child(3) { display: none; }.history-row strong { font-size: 11px; }.history-row small { font-size: 9px; }.game-topbar { min-height: 63px; grid-template-columns: 1fr auto; }.game-brand { display: none; }.level-readout { gap: 6px; }.level-readout strong { font-size: 21px; }.level-readout span { max-width: 75px; font-size: 8px; }.game-meta { grid-column: auto; gap: 9px; }.game-meta .icon-button { width: 28px; height: 28px; }.arena-wrap { inset: 63px 0 0; }.game-hud-left { top: 14px; left: 14px; }.hud-card { min-width: 91px; padding: 8px 10px; }.weapon-hud { display: none; }.boss-bar-wrap { top: 15px; width: 42vw; left: auto; right: 15px; transform: none; }.boss-label { justify-content: flex-end; }.boss-label small { display: none; }.boss-label strong { font-size: 8px; }.direction-badge { display: none; }.game-hint { display: none; }.touch-controls { display: flex; position: absolute; inset: auto 20px 22px; justify-content: space-between; align-items: flex-end; pointer-events: none; }.joystick { pointer-events: auto; position: relative; width: 126px; height: 126px; border-radius: 50%; background: rgba(5,18,21,.28); border: 1px solid rgba(255,255,255,.2); touch-action: none; }.joystick-ring { position: absolute; inset: 14px; border: 1px dashed rgba(207,229,210,.25); border-radius: 50%; }.joystick-knob { position: absolute; top: 37px; left: 37px; width: 50px; height: 50px; border-radius: 50%; background: rgba(244,187,103,.85); box-shadow: 0 0 0 7px rgba(244,187,103,.15), 0 5px 15px rgba(0,0,0,.25); }.joy-arrow { position: absolute; color: rgba(235,241,225,.48); font-size: 17px; }.joy-up { left: 57px; top: 5px; }.joy-down { left: 57px; bottom: 3px; }.joy-left { left: 7px; top: 51px; }.joy-right { right: 7px; top: 51px; }.action-controls { display: flex; gap: 10px; align-items: flex-end; pointer-events: auto; }.action-button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 67px; height: 67px; border-radius: 50%; border: 1px solid rgba(255,255,255,.35); color: #092026; }.action-button span { font-size: 23px; }.action-button small { font: 8px var(--mono); letter-spacing: .1em; }.fire-button { background: var(--teal); box-shadow: 0 7px 18px rgba(79,210,191,.23); }.ability-button { background: var(--gold); }.ability-button:disabled { filter: grayscale(.5); opacity: .48; }.ability-button b { position: absolute; right: 1px; top: 1px; display: grid; place-items: center; background: var(--orange); color: #fff; width: 18px; height: 18px; border-radius: 50%; font: 10px var(--mono); }.level-toast strong { font-size: 26px; }.modal-card { padding: 34px 24px 27px; }.modal-card h2 { font-size: 38px; }.tutorial-steps { grid-template-columns: 1fr; gap: 6px; }.tutorial-steps div { display: grid; grid-template-columns: 32px 1fr; gap: 4px; padding: 11px 0; }.tutorial-steps strong { margin: 0; }.tutorial-steps p { grid-column: 2; margin: 2px 0 0; }.end-modal h2 { font-size: 32px; } }

/* Touch controls stay available in landscape too; the viewport UI keeps the same composition. */
@media (pointer: coarse) and (min-width: 601px) { .touch-controls { display: flex; position: absolute; inset: auto 28px 24px; justify-content: space-between; align-items: flex-end; pointer-events: none; }.joystick { pointer-events: auto; position: relative; width: 126px; height: 126px; border-radius: 50%; background: rgba(5,18,21,.28); border: 1px solid rgba(255,255,255,.2); touch-action: none; }.joystick-ring { position: absolute; inset: 14px; border: 1px dashed rgba(207,229,210,.25); border-radius: 50%; }.joystick-knob { position: absolute; top: 37px; left: 37px; width: 50px; height: 50px; border-radius: 50%; background: rgba(244,187,103,.85); box-shadow: 0 0 0 7px rgba(244,187,103,.15), 0 5px 15px rgba(0,0,0,.25); }.joy-arrow { position: absolute; color: rgba(235,241,225,.48); font-size: 17px; }.joy-up { left: 57px; top: 5px; }.joy-down { left: 57px; bottom: 3px; }.joy-left { left: 7px; top: 51px; }.joy-right { right: 7px; top: 51px; }.action-controls { display: flex; gap: 10px; align-items: flex-end; pointer-events: auto; }.action-button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 67px; height: 67px; border-radius: 50%; border: 1px solid rgba(255,255,255,.35); color: #092026; }.action-button span { font-size: 23px; }.action-button small { font: 8px var(--mono); letter-spacing: .1em; }.fire-button { background: var(--teal); box-shadow: 0 7px 18px rgba(79,210,191,.23); }.ability-button { background: var(--gold); }.ability-button:disabled { filter: grayscale(.5); opacity: .48; }.ability-button b { position: absolute; right: 1px; top: 1px; display: grid; place-items: center; background: var(--orange); color: #fff; width: 18px; height: 18px; border-radius: 50%; font: 10px var(--mono); } }

/* Touch controls are enabled by input capability, not viewport width. */
html:not(.touch-capable) .touch-controls { display: none !important; }
html.touch-capable .touch-controls { display: flex; position: absolute; inset: auto 20px 22px; justify-content: space-between; align-items: flex-end; pointer-events: none; }
html.touch-capable .joystick { pointer-events: auto; position: relative; width: 126px; height: 126px; border-radius: 50%; background: rgba(5,18,21,.28); border: 1px solid rgba(255,255,255,.2); touch-action: none; }
html.touch-capable .joystick-ring { position: absolute; inset: 14px; border: 1px dashed rgba(207,229,210,.25); border-radius: 50%; }
html.touch-capable .joystick-knob { position: absolute; top: 37px; left: 37px; width: 50px; height: 50px; border-radius: 50%; background: rgba(244,187,103,.85); box-shadow: 0 0 0 7px rgba(244,187,103,.15), 0 5px 15px rgba(0,0,0,.25); }
html.touch-capable .joy-arrow { position: absolute; color: rgba(235,241,225,.48); font-size: 17px; }.joy-up { left: 57px; top: 5px; }.joy-down { left: 57px; bottom: 3px; }.joy-left { left: 7px; top: 51px; }.joy-right { right: 7px; top: 51px; }
html.touch-capable .action-controls { display: flex; gap: 10px; align-items: flex-end; pointer-events: auto; }
html.touch-capable .action-button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 67px; height: 67px; border-radius: 50%; border: 1px solid rgba(255,255,255,.35); color: #092026; }.action-button span { font-size: 23px; }.action-button small { font: 8px var(--mono); letter-spacing: .1em; }.fire-button { background: var(--teal); box-shadow: 0 7px 18px rgba(79,210,191,.23); }.ability-button { background: var(--gold); }.ability-button:disabled { filter: grayscale(.5); opacity: .48; }.ability-button b { position: absolute; right: 1px; top: 1px; display: grid; place-items: center; background: var(--orange); color: #fff; width: 18px; height: 18px; border-radius: 50%; font: 10px var(--mono); }

/* History rows are records, not links. */
.history-row { grid-template-columns: 78px 1fr 160px 120px 42px; }
.history-arrow { display: none; }
.history-details-button { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid rgba(79,210,191,.6); border-radius: 50%; background: rgba(79,210,191,.1); color: var(--teal); font-size: 15px; line-height: 1; transition: .2s; }
.history-details-button:hover, .history-details-button:focus-visible { background: var(--teal); color: var(--dark); transform: translateY(-1px); }
.history-details-date { color: #85958e; font: 9px var(--mono); letter-spacing: .1em; }
.history-details-result { margin: 16px 0 0; font: 10px var(--mono); letter-spacing: .1em; }.history-details-result.won { color: var(--teal); }.history-details-result.lost { color: var(--orange); }
@media (max-width: 600px) { .history-row { grid-template-columns: 48px 1fr 54px 38px; gap: 6px; }.history-details-button { width: 32px; height: 32px; font-size: 13px; } }

/* Exit guidance stays readable without covering the arena or scaling control icons. */
.exit-objective { display: none; }
.arena-wrap.exit-searching .exit-objective { position: absolute; z-index: 4; top: 74px; left: 25px; display: grid; gap: 3px; width: fit-content; max-width: calc(100% - 50px); padding: 8px 11px; border-left: 2px solid var(--gold); background: rgba(4,16,20,.86); box-shadow: 0 7px 18px rgba(0,0,0,.18); pointer-events: none; }
.exit-objective small { color: var(--teal); font: 9px var(--mono); letter-spacing: .1em; }
.exit-objective strong { color: #f3f0e7; font: clamp(13px, 1.2vw, 18px) var(--mono); letter-spacing: .07em; line-height: 1.1; }
#game-screen button:active { transform: none !important; }
#game-objective { font-size: clamp(11px, 1vw, 15px); }
.pickup-toast { font-size: clamp(10px, 1.1vw, 13px); }
@media (max-width: 900px) {
  .arena-wrap.exit-searching .exit-objective { position: absolute; z-index: 4; top: 74px; left: 14px; display: grid; gap: 3px; width: fit-content; max-width: calc(100% - 28px); padding: 8px 11px; border-left: 2px solid var(--gold); background: rgba(4,16,20,.86); box-shadow: 0 7px 18px rgba(0,0,0,.18); pointer-events: none; }
  .exit-objective small { color: var(--teal); font: 9px var(--mono); letter-spacing: .1em; }
  .exit-objective strong { color: #f3f0e7; font: clamp(13px, 3.7vw, 18px) var(--mono); letter-spacing: .07em; line-height: 1.1; }
}

/* Keep long tutorials and dialogs usable on short screens. */
.modal-layer { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; }
.modal-card { max-height: calc(100svh - 48px); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; }
@media (max-width: 600px) {
  .modal-layer { padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); }
  .modal-card { max-height: calc(100svh - 28px); }
}

/* Run recap */
.end-run-tag { margin: 22px auto 0; padding: 10px 14px; border: 1px solid rgba(244,187,103,.3); background: rgba(244,187,103,.07); }
.end-run-tag small, .end-summary-grid small { display: block; color: #7e9288; font: 8px var(--mono); letter-spacing: .1em; margin-bottom: 5px; }
.end-run-tag .status-achievement { display: block; color: var(--teal); font: 9px var(--mono); letter-spacing: .08em; margin-bottom: 6px; }
.end-run-tag strong { color: var(--gold); font: 12px var(--mono); letter-spacing: .08em; }
.end-summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-block: 1px solid var(--line); margin: 18px 0 24px; }
.end-summary-grid span { min-width: 0; padding: 13px 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.end-summary-grid span:nth-child(2n) { border-right: 0; }
.end-summary-grid span:nth-last-child(-n + 2) { border-bottom: 0; }
.end-summary-grid strong { display: block; color: var(--gold); font: 11px var(--mono); letter-spacing: .05em; overflow-wrap: anywhere; }
.end-summary-grid .summary-best { color: var(--teal); font-size: 7px; margin: 7px 0 0; letter-spacing: .06em; }
@media (max-width: 600px) { .end-run-tag { margin-top: 18px; }.end-summary-grid { margin-top: 15px; }.end-summary-grid span { padding: 11px 6px; } }

/* End-of-run celebration */
.end-modal > :not(.run-confetti) { position: relative; z-index: 1; }
.end-congrats { color: var(--teal); font: 9px var(--mono); letter-spacing: .1em; margin: 12px 0 2px; }
.run-confetti { display: none; position: absolute; z-index: 0; inset: 0; overflow: hidden; pointer-events: none; border-radius: inherit; }
.run-confetti.active { display: block; }
.run-confetti i { position: absolute; top: -16px; display: block; border-radius: 2px; opacity: 0; animation: confetti-fall var(--duration) linear infinite; }
.end-modal.celebrating .end-sigil { animation: sigil-celebrate .78s cubic-bezier(.16,.84,.34,1.3); }
.end-modal.celebrating .end-congrats { animation: congrats-pop .62s .08s both; }
@keyframes confetti-fall { 0% { opacity: 0; transform: translate3d(0, -18px, 0) rotate(0deg); } 8% { opacity: 1; } 92% { opacity: 1; } 100% { opacity: 0; transform: translate3d(var(--drift), 460px, 0) rotate(var(--turn)); } }
@keyframes sigil-celebrate { 0%, 100% { transform: scale(1) rotate(0); } 35% { transform: scale(1.28) rotate(-10deg); box-shadow: 0 0 0 12px rgba(244,187,103,.12), 0 0 36px rgba(244,187,103,.52); } 65% { transform: scale(1.08) rotate(8deg); } }
@keyframes congrats-pop { from { opacity: 0; transform: translateY(-8px) scale(.92); } to { opacity: 1; transform: none; } }
