@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  --ink: #07131d;
  --navy: #0a1c29;
  --cream: #f4eddf;
  --paper: #fbf6ea;
  --coral: #ff6b55;
  --coral-dark: #d74736;
  --teal: #25c9b7;
  --yellow: #ffd85a;
  --muted: #6d7c7f;
  --line: rgba(7, 19, 29, .17);
  --shadow: 8px 8px 0 #07131d;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--cream); }
body { min-height: 100vh; margin: 0; color: var(--ink); background: var(--cream); font-family: 'Space Grotesk', Arial, sans-serif; }
button { color: inherit; font: inherit; }
button:focus-visible, canvas:focus-visible, input[type='range']:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
[hidden] { display: none !important; }

.app-shell { min-height: 100vh; overflow: hidden; }
.landscape-prompt { position: fixed; z-index: 100; inset: 0; display: grid; place-content: center; justify-items: center; padding: 28px; color: var(--paper); background: radial-gradient(circle at 50% 30%, #153b4c, var(--ink) 68%); text-align: center; }
.landscape-prompt h2 { margin: 8px 0; color: var(--yellow); font-size: clamp(30px, 9vw, 52px); letter-spacing: -.06em; }
.landscape-prompt > p:not(.micro-label) { max-width: 390px; margin-bottom: 20px; color: #c7d9dc; font-size: 13px; line-height: 1.45; }
.landscape-prompt .text-button { color: var(--paper); border-color: var(--paper); }
.rotate-phone { position: relative; width: 48px; height: 82px; margin-bottom: 16px; transform: rotate(90deg); border: 3px solid var(--paper); border-radius: 8px; animation: phone-turn 1.5s ease-in-out infinite alternate; }
.rotate-phone::before { content: ''; position: absolute; top: 5px; left: 50%; width: 16px; height: 3px; transform: translateX(-50%); border-radius: 2px; background: var(--paper); }
.rotate-phone i { position: absolute; inset: 13px 5px 7px; background: linear-gradient(145deg, var(--teal), var(--yellow)); }
@keyframes phone-turn { from { transform: rotate(15deg); } to { transform: rotate(90deg); } }
.topbar { display: flex; justify-content: space-between; align-items: center; min-height: 82px; padding: 12px clamp(20px, 4vw, 66px); border-bottom: 2px solid var(--ink); background: rgba(251,246,234,.94); }
.brand { display: flex; align-items: center; gap: 13px; padding: 0; border: 0; background: transparent; cursor: pointer; text-align: left; }
.brand > span:last-child { display: grid; }
.brand small, .micro-label, .eyebrow { font: 500 10px/1.2 'DM Mono', monospace; letter-spacing: .16em; }
.brand strong { margin-top: 2px; font-size: 20px; letter-spacing: -.04em; }
.brand-mark { position: relative; display: block; width: 44px; height: 44px; transform: rotate(-24deg); border: 2px solid var(--ink); border-radius: 48% 48% 43% 43% / 65% 65% 35% 35%; background: var(--coral); box-shadow: 3px 3px 0 var(--ink); }
.brand-mark i, .brand-mark b { position: absolute; top: 9px; width: 18px; height: 6px; border-radius: 7px; background: var(--yellow); }
.brand-mark i { left: 4px; transform: rotate(35deg); }
.brand-mark b { right: 4px; transform: rotate(-35deg); }
.top-actions { display: flex; align-items: stretch; gap: 9px; }
.wallet { display: flex; align-items: center; gap: 8px; min-width: 92px; justify-content: center; padding: 0 14px; border: 2px solid var(--ink); background: var(--yellow); box-shadow: 3px 3px 0 var(--ink); font-family: 'DM Mono', monospace; }
.coin-mini { display: inline-grid; place-items: center; width: 19px; height: 19px; color: var(--ink); border: 2px solid var(--ink); border-radius: 50%; background: #ffe781; font: 700 11px 'DM Mono', monospace; }
.nav-button { display: grid; padding: 8px 16px; border: 2px solid var(--ink); background: var(--teal); box-shadow: 3px 3px 0 var(--ink); cursor: pointer; text-align: left; }
.nav-button span { font-size: 12px; font-weight: 700; }
.profile-button { max-width: 160px; background: var(--paper); }
.profile-button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leaderboard-button { background: #ff9bd5; }
.settings-button { background: var(--yellow); }
.nav-button small, .sound-button { font: 500 8px 'DM Mono', monospace; letter-spacing: .08em; }
.sound-button { padding: 0 14px; border: 2px solid var(--ink); background: transparent; cursor: pointer; }
.wallet:active, .nav-button:active, .play-button:active, .secondary-play:active { transform: translate(3px, 3px); box-shadow: none; }

.hero-grid { display: grid; grid-template-columns: minmax(290px, .72fr) minmax(580px, 1.55fr); min-height: calc(100vh - 82px); }
.intro-panel { position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: center; padding: clamp(36px, 5vw, 78px) clamp(26px, 5vw, 82px); border-right: 2px solid var(--ink); background: var(--paper); }
.eyebrow { display: flex; align-items: center; gap: 8px; margin: 0 0 16px; color: var(--coral-dark); }
.eyebrow > span { width: 20px; height: 3px; background: currentColor; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 22px; font-size: clamp(58px, 7.2vw, 112px); line-height: .77; letter-spacing: -.085em; }
h1 em { color: var(--coral); font-style: normal; -webkit-text-stroke: 2px var(--ink); text-shadow: 4px 4px 0 var(--ink); }
.lede { max-width: 460px; margin-bottom: 26px; color: #526167; font-size: clamp(14px, 1.25vw, 18px); line-height: 1.55; }
.play-button { display: flex; justify-content: space-between; align-items: center; width: min(100%, 390px); padding: 16px 18px 16px 22px; border: 2px solid var(--ink); background: var(--coral); box-shadow: 6px 6px 0 var(--ink); cursor: pointer; font-size: 17px; font-weight: 700; }
.play-button i { display: grid; place-items: center; width: 36px; height: 36px; border: 2px solid var(--ink); border-radius: 50%; background: var(--yellow); font-style: normal; font-size: 13px; }
.best-card { position: absolute; top: 34px; right: 28px; display: grid; width: 102px; padding: 9px; transform: rotate(3deg); border: 2px solid var(--ink); background: var(--yellow); box-shadow: 4px 4px 0 var(--ink); text-align: center; }
.best-card span, .best-card small { font: 500 7px 'DM Mono', monospace; letter-spacing: .08em; }
.best-card strong { font-size: 27px; line-height: 1; }
.control-cheatsheet { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; max-width: 440px; margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); }
.control-cheatsheet > div { display: flex; align-items: center; gap: 12px; }
.control-cheatsheet p { display: grid; gap: 2px; margin: 0; }
.control-cheatsheet strong { font: 500 10px 'DM Mono', monospace; letter-spacing: .12em; }
.control-cheatsheet small { color: var(--muted); font-size: 10px; }
.mission-board { max-width: 440px; margin-top: 22px; padding: 12px; border: 2px solid var(--ink); background: #fffdf6; box-shadow: 4px 4px 0 var(--ink); }
.mission-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 9px; }
.mission-heading h2 { margin: 2px 0 0; font-size: 14px; letter-spacing: -.03em; }
.mission-heading > span { padding: 5px 7px; border: 1px solid var(--ink); background: var(--yellow); font: 700 7px 'DM Mono', monospace; }
.mission-list { display: grid; gap: 6px; }
.mission-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; padding-top: 6px; border-top: 1px solid var(--line); }
.mission-row p { display: grid; gap: 2px; margin: 0; font-size: 9px; }
.mission-row p span { color: var(--muted); font: 500 7px 'DM Mono', monospace; }
.mission-row b { padding: 4px 6px; color: var(--ink); border: 1px solid var(--ink); background: var(--teal); font: 700 8px 'DM Mono', monospace; }
.mission-row.complete b { background: var(--yellow); }
.achievement-summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; max-width: 440px; margin-top: 12px; padding: 11px 12px; border: 2px solid var(--ink); background: #ff9bd5; box-shadow: 4px 4px 0 var(--ink); }
.achievement-summary h2 { display: flex; align-items: center; gap: 8px; margin: 2px 0 3px; font-size: 14px; letter-spacing: -.03em; }
.achievement-summary h2 strong { padding: 3px 5px; border: 1px solid var(--ink); background: var(--paper); font: 700 7px 'DM Mono', monospace; }
.achievement-summary p { margin-bottom: 0; }
.achievement-summary > div > p:last-child { color: #704a65; font: 700 7px 'DM Mono', monospace; }
.achievement-summary button { flex: 0 0 auto; padding: 9px 10px; border: 2px solid var(--ink); background: var(--yellow); box-shadow: 2px 2px 0 var(--ink); cursor: pointer; font: 700 8px 'DM Mono', monospace; }
.achievement-summary button span { margin-left: 4px; }
.career-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-width: 440px; margin-top: 10px; }
.career-actions button { display: flex; justify-content: space-between; padding: 9px 10px; border: 2px solid var(--ink); background: var(--paper); box-shadow: 3px 3px 0 var(--ink); cursor: pointer; font: 700 8px 'DM Mono', monospace; }
.career-actions button:last-child { background: var(--teal); }
.key-cluster { display: grid; grid-template-rows: 15px 15px; justify-items: center; gap: 2px; }
.key-cluster span { display: flex; gap: 2px; }
kbd { display: grid; place-items: center; width: 15px; height: 15px; border: 1px solid var(--ink); border-radius: 2px; background: #fff; box-shadow: 1px 1px 0 var(--ink); font: 500 7px 'DM Mono', monospace; }

.game-card { position: relative; min-width: 0; overflow: hidden; background: var(--navy); }
#gameCanvas { display: block; width: 100%; height: 100%; min-height: 650px; background: #71d8e3; }
.game-card::after { content: ''; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 70px rgba(5,31,40,.18); }
.start-overlay, .pause-overlay, .game-over { position: absolute; z-index: 5; top: 50%; left: 50%; display: flex; flex-direction: column; align-items: center; width: min(390px, calc(100% - 32px)); padding: 26px; transform: translate(-50%, -50%) rotate(-1deg); border: 2px solid var(--ink); background: rgba(251,246,234,.96); box-shadow: var(--shadow); text-align: center; }
.start-overlay::before, .pause-overlay::before, .game-over::before { content: ''; position: absolute; inset: 6px; border: 1px solid rgba(7,19,29,.17); pointer-events: none; }
.start-overlay h2, .pause-overlay h2, .game-over h2 { position: relative; margin: 8px 0 4px; font-size: 28px; letter-spacing: -.05em; }
.start-overlay p, .pause-overlay p, .game-over > p { position: relative; margin-bottom: 15px; color: var(--muted); }
.slipper-showcase { position: relative; width: 120px; height: 185px; margin: -20px 0 -23px; transform: rotate(62deg) scale(.7); border: 3px solid var(--ink); border-radius: 47% 47% 42% 42% / 67% 67% 35% 35%; background: var(--skin-sole-background, var(--skin-sole, #ff6b55)); box-shadow: inset -12px -8px 0 rgba(7,19,29,.13), 7px 8px 0 rgba(7,19,29,.84); }
.slipper-showcase::before, .slipper-showcase::after { content: ''; position: absolute; top: 37px; width: 69px; height: 24px; border: 3px solid var(--ink); border-radius: 15px; background: var(--skin-strap, #ffd85a); }
.slipper-showcase::before { left: -1px; transform: rotate(43deg); }
.slipper-showcase::after { right: -1px; transform: rotate(-43deg); }
.secondary-play, .outline-button { position: relative; min-width: 190px; padding: 13px 18px; border: 2px solid var(--ink); background: var(--coral); box-shadow: 4px 4px 0 var(--ink); cursor: pointer; font-size: 12px; font-weight: 700; }
.secondary-play span { padding-left: 12px; }
.outline-button { background: var(--paper); }
.text-button { position: relative; margin-top: 16px; border: 0; border-bottom: 1px solid var(--ink); background: transparent; cursor: pointer; font: 500 9px 'DM Mono', monospace; letter-spacing: .1em; }
.countdown { position: absolute; z-index: 8; top: 50%; left: 50%; transform: translate(-50%, -50%); color: var(--paper); text-shadow: 6px 6px 0 var(--ink); font-size: 150px; font-weight: 700; }
.event-flash { position: absolute; z-index: 7; top: 19%; left: 50%; display: grid; min-width: 260px; padding: 10px 18px; transform: translateX(-50%) rotate(-1deg); border: 2px solid var(--ink); background: var(--yellow); box-shadow: 5px 5px 0 var(--ink); text-align: center; animation: event-pop .28s ease-out; }
.event-flash small { font: 700 8px 'DM Mono', monospace; letter-spacing: .16em; }
.event-flash strong { font-size: 25px; line-height: 1; }
.event-flash span { color: #665b36; font-size: 9px; }
.victory-slipper { position: relative; width: 110px; height: 75px; margin: -8px 0 -2px; overflow: hidden; }
.victory-slipper .slipper-showcase { position: absolute; left: 50%; top: 50%; margin: 0; transform: translate(-50%, -50%) rotate(60deg) scale(.38); }
.victory-slipper.pose-spin .slipper-showcase { animation: victory-spin 1.5s ease-in-out infinite; }
.victory-slipper.pose-bounce .slipper-showcase { animation: victory-bounce 1s ease-in-out infinite; }
.victory-slipper.pose-crown::after { content: '★'; position: absolute; top: 0; left: 50%; color: var(--yellow); -webkit-text-stroke: 1px var(--ink); font-size: 24px; animation: crown-float 1s ease-in-out infinite alternate; }
.game-hud { position: absolute; z-index: 4; inset: 18px 18px auto; display: flex; align-items: stretch; gap: 9px; pointer-events: none; }
.run-stat { display: grid; min-width: 86px; padding: 8px 13px; border: 2px solid var(--ink); background: var(--paper); box-shadow: 3px 3px 0 var(--ink); }
.run-stat small { font: 500 8px 'DM Mono', monospace; letter-spacing: .12em; }
.run-stat strong { font-size: 24px; line-height: 1; }
.coin-stat { background: var(--yellow); }
.coin-stat strong { display: flex; align-items: center; gap: 6px; }
.combo-stat { background: #ff9bd5; }
.combo-stat strong { display: flex; align-items: end; gap: 6px; }
.combo-stat i { padding-bottom: 2px; font: 700 9px 'DM Mono', monospace; font-style: normal; }
.mode-stat { min-width: 112px; background: var(--teal); }
.mode-stat small { overflow: hidden; max-width: 112px; text-overflow: ellipsis; white-space: nowrap; }
.mode-stat strong { font-size: 18px; }
.active-effects { display: flex; gap: 6px; align-items: center; flex: 1; }
.effect-pill { padding: 7px 10px; border: 2px solid var(--ink); background: var(--teal); box-shadow: 2px 2px 0 var(--ink); font: 700 8px 'DM Mono', monospace; }
.boss-pill { background: #ff9bd5; }
.pause-button { width: 48px; margin-left: auto; border: 2px solid var(--ink); background: var(--paper); box-shadow: 3px 3px 0 var(--ink); cursor: pointer; pointer-events: auto; font: 700 13px 'DM Mono', monospace; }
.quick-slots { position: absolute; z-index: 4; right: 18px; bottom: 18px; display: flex; gap: 7px; }
.quick-slot { position: relative; display: grid; place-items: center; width: 52px; height: 52px; padding: 0; border: 2px solid var(--ink); background: var(--paper); box-shadow: 3px 3px 0 var(--ink); cursor: pointer; }
.quick-slot:disabled { opacity: .45; cursor: not-allowed; }
.quick-slot .power-glyph { font-size: 22px; }
.quick-slot kbd { position: absolute; top: -7px; left: -7px; width: 18px; height: 18px; background: var(--yellow); }
.quick-slot b { position: absolute; right: -6px; bottom: -7px; display: grid; place-items: center; min-width: 19px; height: 19px; padding: 0 3px; border: 2px solid var(--ink); border-radius: 50%; background: var(--coral); font: 700 8px 'DM Mono', monospace; }
.result-grid { position: relative; display: grid; grid-template-columns: 1fr 1fr; width: 100%; margin: 12px 0 16px; border: 2px solid var(--ink); }
.result-grid > div { display: grid; padding: 12px; background: var(--yellow); }
.result-grid > div + div { border-left: 2px solid var(--ink); background: var(--teal); }
.result-grid strong { font-size: 34px; line-height: 1; }
.result-grid small { font: 500 8px 'DM Mono', monospace; }
.result-actions { position: relative; display: flex; gap: 9px; }
.result-actions button { min-width: 0; }
.game-over .leaderboard-submit-status { min-height: 16px; margin: -7px 0 12px; color: #3d6f72; font: 700 8px 'DM Mono', monospace; letter-spacing: .04em; }
.game-over { width: min(520px, calc(100% - 24px)); max-height: calc(100% - 24px); overflow: auto; padding: 18px 22px; transform: translate(-50%, -50%); }
.game-over h2 { margin-top: 3px; }
.game-over .result-grid { margin: 6px 0 9px; }
.game-over .result-grid > div { padding: 8px; }
.game-over .result-grid strong { font-size: 28px; }
.run-recap { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); width: 100%; margin-bottom: 10px; border: 2px solid var(--ink); }
.run-recap > div { display: grid; min-width: 0; padding: 7px 5px; background: var(--paper); }
.run-recap > div + div { border-left: 1px solid var(--ink); }
.run-recap small { font: 700 6px 'DM Mono', monospace; }
.run-recap strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; }
.game-over .run-progress-note { margin: 0 0 9px; padding: 7px 9px; border: 1px dashed var(--ink); background: var(--yellow); color: var(--ink); font: 700 7px 'DM Mono', monospace; }
.game-over .result-actions { width: 100%; }
.game-over .result-actions button { flex: 1; padding: 9px 7px; font-size: 9px; }

.power-strip { display: grid; grid-template-columns: 1fr .8fr 1.5fr; align-items: center; gap: 32px; padding: 42px clamp(22px, 5vw, 80px); border-top: 2px solid var(--ink); background: var(--yellow); }
.power-strip .eyebrow { margin-bottom: 9px; color: var(--ink); }
.power-strip h2 { margin: 0; font-size: 27px; letter-spacing: -.05em; }
.power-strip > p { margin: 0; color: #655d3a; font-size: 13px; line-height: 1.5; }
.power-orbit { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.power-chip { display: grid; place-items: center; aspect-ratio: 1; transform: rotate(var(--tilt)); border: 2px solid var(--ink); background: var(--chip, var(--paper)); box-shadow: 3px 3px 0 var(--ink); cursor: help; }
.power-chip span { font-size: 22px; }

.shop-dialog { width: 100vw; max-width: none; height: 100vh; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(7,19,29,.78); }
.shop-dialog[open] { display: grid; place-items: center; }
.shop-dialog::backdrop { background: rgba(7,19,29,.78); }
.shop-shell { width: min(1120px, calc(100% - 32px)); max-height: calc(100vh - 32px); overflow: auto; border: 2px solid var(--ink); background: var(--paper); box-shadow: 10px 10px 0 var(--coral); }
.shop-header { display: flex; justify-content: space-between; gap: 20px; padding: 25px 28px 20px; border-bottom: 2px solid var(--ink); background: #93e6e7; }
.shop-header .eyebrow { margin-bottom: 5px; color: var(--ink); }
.shop-header h2 { margin-bottom: 4px; font-size: 38px; letter-spacing: -.06em; }
.shop-header p { margin-bottom: 0; color: #3c6569; font-size: 12px; }
.shop-header-actions { display: flex; align-items: flex-start; gap: 10px; }
.wallet.large { min-height: 48px; }
.close-button { width: 48px; height: 48px; border: 2px solid var(--ink); background: var(--paper); box-shadow: 3px 3px 0 var(--ink); cursor: pointer; font-size: 27px; }
.shop-tabs { display: flex; border-bottom: 2px solid var(--ink); background: var(--cream); }
.shop-tabs button { padding: 14px 22px; border: 0; border-right: 2px solid var(--ink); background: transparent; cursor: pointer; font: 700 10px 'DM Mono', monospace; letter-spacing: .09em; }
.shop-tabs button.active { background: var(--coral); }
.shop-tabs span { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 7px; border: 1px solid var(--ink); border-radius: 50%; background: var(--paper); font-size: 8px; }
.shop-content { padding: 25px 28px 31px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 18px; }
.section-heading h3, .customize-content h3 { margin: 3px 0 0; font-size: 21px; letter-spacing: -.04em; }
.section-heading > p { max-width: 320px; margin: 0; color: var(--muted); font-size: 11px; text-align: right; }
.shop-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.shop-item { position: relative; min-height: 190px; padding: 13px; border: 2px solid var(--ink); background: #fffdf6; box-shadow: 4px 4px 0 rgba(7,19,29,.8); }
.shop-item-head { display: flex; justify-content: space-between; align-items: flex-start; }
.power-icon { display: grid; place-items: center; width: 48px; height: 48px; transform: rotate(-3deg); border: 2px solid var(--ink); background: var(--power-color); box-shadow: 3px 3px 0 var(--ink); font-size: 23px; }
.owned-count { padding: 4px 6px; border: 1px solid var(--ink); background: var(--cream); font: 500 8px 'DM Mono', monospace; }
.power-role { display: inline-block; margin-top: 11px; padding: 3px 5px; border: 1px solid var(--ink); background: color-mix(in srgb, var(--yellow) 45%, white); font: 700 7px 'DM Mono', monospace; letter-spacing: .08em; }
.shop-item h4 { margin: 6px 0 4px; font-size: 13px; }
.shop-item p { min-height: 40px; margin-bottom: 13px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.buy-button { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 8px 9px; border: 2px solid var(--ink); background: var(--yellow); cursor: pointer; font: 700 9px 'DM Mono', monospace; }
.buy-button:disabled { color: #8c8a7d; background: #e9e4d8; cursor: not-allowed; }
.buy-button .coin-mini { width: 15px; height: 15px; border-width: 1px; font-size: 8px; }
.skin-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.skin-card { position: relative; overflow: hidden; min-height: 245px; padding: 12px; border: 2px solid var(--ink); background: var(--sky, #82dde4); box-shadow: 4px 4px 0 var(--ink); }
.skin-card.equipped::after { content: 'EQUIPPED'; position: absolute; top: 13px; right: -31px; width: 110px; padding: 4px; transform: rotate(42deg); border-block: 1px solid var(--ink); background: var(--yellow); font: 700 7px 'DM Mono', monospace; text-align: center; }
.skin-card.exclusive { background: linear-gradient(135deg, var(--sky), #ff9bd5); }
.skin-card.exclusive::before { content: '★ TROPHY ONLY'; position: absolute; z-index: 2; top: 8px; left: 8px; padding: 5px 7px; border: 1px solid var(--ink); background: var(--yellow); font: 700 7px 'DM Mono', monospace; letter-spacing: .05em; }
.skin-card.exclusive.locked .skin-preview { filter: grayscale(.72); opacity: .72; }
.skin-preview { display: grid; place-items: center; height: 145px; }
.skin-preview .slipper-showcase { margin: 0; transform: rotate(58deg) scale(.52); }
.skin-info { display: flex; justify-content: space-between; align-items: end; gap: 8px; padding: 11px; border: 2px solid var(--ink); background: var(--paper); }
.skin-info h4 { margin: 0 0 2px; font-size: 12px; }
.skin-info small { color: var(--muted); font: 500 7px 'DM Mono', monospace; }
.skin-info button { padding: 7px 9px; border: 2px solid var(--ink); background: var(--coral); cursor: pointer; font: 700 8px 'DM Mono', monospace; }
.skin-info button.equip { background: var(--teal); }
.customize-content { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.custom-preview, .custom-options { padding: 20px; border: 2px solid var(--ink); }
.preview-sky { display: grid; place-items: center; height: 250px; margin-bottom: 19px; overflow: hidden; background: linear-gradient(#80dfe6 0 62%, #f8db8c 62%); }
.preview-sky .slipper-showcase.large { margin: 0; transform: rotate(58deg) scale(.8); }
.custom-options > p:not(.micro-label) { color: var(--muted); font-size: 12px; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0; }
.swatch { width: 44px; height: 44px; border: 2px solid var(--ink); background: var(--swatch); box-shadow: 3px 3px 0 var(--ink); cursor: pointer; }
.swatch.active { outline: 4px solid var(--teal); outline-offset: 2px; }
.custom-note { display: flex; gap: 12px; padding: 12px; border: 1px dashed var(--ink); background: var(--cream); }
.custom-note strong { font: 700 9px 'DM Mono', monospace; }
.custom-note span { color: var(--muted); font-size: 10px; }
.cosmetic-group { margin: 18px 0; padding-top: 14px; border-top: 1px solid var(--line); }
.cosmetic-group .micro-label { margin-bottom: 8px; }
.cosmetic-options { display: flex; flex-wrap: wrap; gap: 7px; }
.cosmetic-option { padding: 8px 10px; border: 2px solid var(--ink); background: var(--cream); cursor: pointer; font: 700 8px 'DM Mono', monospace; }
.cosmetic-option.active { background: var(--teal); box-shadow: 2px 2px 0 var(--ink); }
.cosmetic-option:disabled { color: #999487; border-style: dashed; cursor: not-allowed; }

.social-dialog { width: 100vw; max-width: none; height: 100vh; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(7,19,29,.78); }
.social-dialog[open] { display: grid; place-items: center; }
.social-dialog::backdrop { background: rgba(7,19,29,.78); }
.social-shell { width: min(620px, calc(100% - 28px)); overflow: hidden; border: 2px solid var(--ink); background: var(--paper); box-shadow: 10px 10px 0 var(--teal); }
.social-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; padding: 22px 24px 18px; border-bottom: 2px solid var(--ink); background: var(--yellow); }
.social-header .eyebrow { margin-bottom: 5px; color: var(--ink); }
.social-header h2 { margin: 0; font-size: 31px; letter-spacing: -.055em; }
.social-header > div > p:last-child { max-width: 440px; margin: 5px 0 0; color: #695f38; font-size: 11px; }
.social-content { display: grid; justify-items: stretch; padding: 25px; }
.name-badge { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto 20px; transform: rotate(-4deg); border: 2px solid var(--ink); border-radius: 50%; background: var(--coral); box-shadow: 5px 5px 0 var(--ink); font: 700 17px 'DM Mono', monospace; }
.social-content label { margin-bottom: 7px; font: 700 9px 'DM Mono', monospace; letter-spacing: .14em; }
.social-content input { width: 100%; padding: 13px 14px; color: var(--ink); border: 2px solid var(--ink); border-radius: 0; background: #fffdf6; box-shadow: 4px 4px 0 var(--ink); font: 700 18px 'Space Grotesk', sans-serif; }
.social-content input[aria-invalid="true"] { background: #ffe2dc; }
.username-hint, .privacy-note { color: var(--muted); font-size: 10px; line-height: 1.45; }
.username-hint { margin: 11px 0 0; }
.form-status { min-height: 18px; margin: 10px 0 4px; color: var(--coral-dark); font: 700 9px 'DM Mono', monospace; }
.save-name-button { justify-self: stretch; width: 100%; }
.guest-button { justify-self: center; margin-top: 14px; }
.privacy-note { margin-top: 16px; text-align: center; }
.leaderboard-shell { width: min(720px, calc(100% - 28px)); box-shadow-color: #ff9bd5; }
.leaderboard-header { background: #ff9bd5; }
.leaderboard-content { padding: 20px 22px 24px; }
.leaderboard-columns { display: flex; justify-content: space-between; padding: 0 12px 8px; color: var(--muted); font: 700 8px 'DM Mono', monospace; letter-spacing: .12em; }
.leaderboard-list { display: grid; gap: 7px; min-height: 260px; }
.leaderboard-row { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; min-height: 47px; border: 2px solid var(--ink); background: #fffdf6; box-shadow: 3px 3px 0 rgba(7,19,29,.85); }
.leaderboard-row.is-you { background: var(--yellow); }
.leaderboard-rank { display: grid; place-items: center; align-self: stretch; border-right: 2px solid var(--ink); background: var(--teal); font: 700 12px 'DM Mono', monospace; }
.leaderboard-row:nth-child(1) .leaderboard-rank { background: var(--yellow); }
.leaderboard-row:nth-child(2) .leaderboard-rank { background: #dce8ef; }
.leaderboard-row:nth-child(3) .leaderboard-rank { background: #ffb273; }
.leaderboard-name { overflow: hidden; padding: 0 12px; font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.leaderboard-score { padding: 0 14px; font: 700 18px 'DM Mono', monospace; }
.leaderboard-message { align-self: center; margin: auto; color: var(--muted); font: 500 10px 'DM Mono', monospace; text-align: center; }
.leaderboard-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 17px; padding-top: 15px; border-top: 1px solid var(--line); }
.leaderboard-footer p { margin: 0; color: var(--muted); font-size: 10px; }
.leaderboard-footer .outline-button { min-width: 112px; padding: 9px 13px; }
.achievement-shell { width: min(1040px, calc(100% - 28px)); max-height: calc(100vh - 28px); box-shadow-color: #ff9bd5; }
.achievement-header { background: #ff9bd5; }
.achievement-content { overflow: auto; max-height: calc(100vh - 150px); padding: 20px 22px 26px; }
.achievement-overview { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 16px; border: 2px solid var(--ink); }
.achievement-overview > div { display: grid; padding: 11px 14px; background: var(--yellow); }
.achievement-overview > div:nth-child(2) { background: var(--teal); }
.achievement-overview > div:nth-child(3) { background: var(--paper); }
.achievement-overview > div + div { border-left: 2px solid var(--ink); }
.achievement-overview small { font: 700 7px 'DM Mono', monospace; letter-spacing: .11em; }
.achievement-overview strong { font-size: 22px; line-height: 1.1; }
.achievement-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.achievement-track { padding: 13px; border: 2px solid var(--ink); background: #fffdf6; box-shadow: 4px 4px 0 var(--ink); }
.achievement-track header { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 10px; }
.achievement-track header h3 { margin: 0 0 2px; font-size: 13px; }
.achievement-track header p { margin: 0; color: var(--muted); font-size: 9px; }
.achievement-track header > strong { font: 700 20px 'DM Mono', monospace; }
.achievement-glyph { display: grid; place-items: center; width: 42px; height: 42px; transform: rotate(-3deg); border: 2px solid var(--ink); background: var(--teal); box-shadow: 2px 2px 0 var(--ink); font: 700 11px 'DM Mono', monospace; }
.achievement-progress { height: 9px; margin: 12px 0 10px; overflow: hidden; border: 2px solid var(--ink); background: var(--cream); }
.achievement-progress i { display: block; height: 100%; background: var(--coral); transition: width .3s ease; }
.achievement-tiers { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.achievement-tier { display: grid; min-width: 0; padding: 6px 4px; border: 1px solid var(--ink); background: #ebe6dc; text-align: center; }
.achievement-tier.claimed { background: var(--yellow); }
.achievement-tier span { overflow: hidden; font: 700 6px 'DM Mono', monospace; text-overflow: ellipsis; }
.achievement-tier strong { font-size: 13px; }
.achievement-tier small { display: grid; color: var(--muted); font: 700 6px 'DM Mono', monospace; }
.achievement-tier small b { overflow: hidden; margin-top: 3px; color: var(--coral-dark); text-overflow: ellipsis; white-space: nowrap; }

.mode-shell { width: min(1120px, calc(100% - 28px)); max-height: calc(100vh - 28px); box-shadow-color: var(--coral); }
.mode-header { background: var(--yellow); }
.mode-content { overflow: auto; max-height: calc(100vh - 145px); padding: 19px 21px 22px; }
.mode-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; }
.mode-card { display: grid; grid-template-columns: 48px 1fr; grid-template-rows: auto auto; gap: 2px 10px; align-items: center; padding: 11px; border: 2px solid var(--ink); background: #fffdf6; box-shadow: 3px 3px 0 var(--ink); cursor: pointer; text-align: left; }
.mode-card > span { display: grid; grid-row: 1 / 3; place-items: center; width: 46px; height: 46px; border: 2px solid var(--ink); background: var(--teal); font: 700 15px 'DM Mono', monospace; }
.mode-card:nth-child(2) > span { background: var(--coral); }
.mode-card:nth-child(3) > span { background: #ff9bd5; }
.mode-card strong { font-size: 13px; }
.mode-card small { color: var(--muted); font: 500 8px 'DM Mono', monospace; }
.mode-card.active { transform: translate(-2px, -2px); background: var(--yellow); box-shadow: 6px 6px 0 var(--ink); }
.tour-selector, .daily-panel, .loadout-panel { margin-top: 16px; padding-top: 15px; border-top: 2px solid var(--ink); }
.world-map { display: grid; grid-template-columns: repeat(5, 1fr); gap: 9px; }
.world-stop { min-height: 148px; padding: 10px; border: 2px solid var(--ink); background: linear-gradient(160deg, var(--world-sky), #fff7df); box-shadow: 3px 3px 0 var(--ink); cursor: pointer; text-align: left; }
.world-stop small { display: block; font: 700 7px 'DM Mono', monospace; }
.world-stop strong { display: block; margin: 8px 0 4px; font-size: 12px; }
.world-stop span { display: inline-block; padding: 3px 5px; border: 1px solid var(--ink); background: var(--yellow); font: 700 6px 'DM Mono', monospace; }
.world-stop p { margin: 8px 0 0; color: #2e4650; font-size: 8px; line-height: 1.3; }
.world-stop.active { transform: translateY(-3px); outline: 4px solid var(--coral); outline-offset: 1px; }
.world-stop.complete { background: linear-gradient(160deg, var(--world-sky), #dff7c7); }
.world-stop:disabled { filter: grayscale(1); opacity: .48; cursor: not-allowed; }
.tour-submap-header { display: flex; align-items: end; justify-content: space-between; gap: 15px; margin-top: 15px; padding: 12px 13px 9px; border: 2px solid var(--ink); background: var(--ink); color: var(--cream); }
.tour-submap-header h3, .tour-submap-header p { margin: 0; }
.tour-submap-header > p { max-width: 360px; color: #c7d5d6; font-size: 9px; text-align: right; }
.tour-submap-map { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; padding: 11px; border: 2px solid var(--ink); border-top: 0; background: #d8e9df; }
.tour-submap { position: relative; display: grid; grid-template-columns: 31px 1fr; grid-template-rows: auto auto auto; align-items: center; min-width: 0; min-height: 78px; padding: 8px; border: 2px solid var(--ink); background: #fffdf6; box-shadow: 2px 2px 0 var(--ink); cursor: pointer; text-align: left; }
.tour-submap > span { display: grid; grid-row: 1 / 4; place-items: center; width: 27px; height: 34px; margin-right: 7px; border: 2px solid var(--ink); background: var(--teal); font: 700 12px 'DM Mono', monospace; }
.tour-submap strong { overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.tour-submap small { color: var(--muted); font: 700 6px 'DM Mono', monospace; }
.tour-submap b { margin-top: 3px; color: var(--coral-dark); font: 700 6px 'DM Mono', monospace; }
.tour-submap.active { transform: translate(-2px, -2px); background: var(--yellow); box-shadow: 5px 5px 0 var(--ink); }
.tour-submap.cleared { background: #dff7c7; }
.tour-submap.cleared > span { background: #8de374; }
.tour-submap:disabled { filter: grayscale(1); opacity: .42; cursor: not-allowed; }
.loadout-grid { display: grid; grid-template-columns: repeat(9, 1fr); gap: 7px; }
.loadout-power { display: grid; justify-items: center; min-width: 0; padding: 8px 4px; border: 2px solid var(--ink); background: #fffdf6; cursor: pointer; }
.loadout-power > span { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 6px; border: 2px solid var(--ink); background: var(--power-color); font-weight: 700; }
.loadout-power strong { overflow: hidden; width: 100%; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.loadout-power small { color: var(--muted); font: 700 6px 'DM Mono', monospace; }
.loadout-power.active { background: var(--yellow); box-shadow: 3px 3px 0 var(--ink); }
.loadout-power:disabled { opacity: .38; cursor: not-allowed; }
.daily-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.daily-panel h3 { margin-bottom: 5px; }
.daily-panel p { color: var(--muted); font-size: 10px; }
.daily-mini-board { display: grid; gap: 4px; }
.daily-mini-board > div { display: grid; grid-template-columns: 34px 1fr auto; padding: 6px 8px; border: 1px solid var(--ink); background: #fffdf6; }
.daily-mini-board span, .daily-mini-board strong { font: 700 9px 'DM Mono', monospace; }
.daily-mini-board b { font-size: 10px; }
.mode-footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 17px; padding: 12px 14px; border: 2px solid var(--ink); background: var(--teal); }
.mode-footer > div { display: grid; }
.mode-footer small { font: 700 7px 'DM Mono', monospace; }
.mode-footer strong { font-size: 17px; }
.mode-footer span { color: #31575c; font-size: 9px; }
.mode-footer button { min-width: 180px; }

.career-shell { width: min(1040px, calc(100% - 28px)); max-height: calc(100vh - 28px); box-shadow-color: #ff9bd5; }
.career-header { background: #ff9bd5; }
.career-content { overflow: auto; max-height: calc(100vh - 145px); padding: 19px 21px 24px; }
.career-grid { display: grid; grid-template-columns: repeat(6, 1fr); border: 2px solid var(--ink); }
.career-grid > div { display: grid; min-width: 0; padding: 9px; background: #fffdf6; }
.career-grid > div:nth-child(3n+2) { background: var(--yellow); }
.career-grid > div:nth-child(3n) { background: var(--teal); }
.career-grid > div + div { border-left: 1px solid var(--ink); }
.career-grid > div:nth-child(n+7) { border-top: 1px solid var(--ink); }
.career-grid small { font: 700 6px 'DM Mono', monospace; }
.career-grid strong { font-size: 20px; }
.career-section { margin-top: 15px; padding: 14px; border: 2px solid var(--ink); background: #fffdf6; box-shadow: 3px 3px 0 var(--ink); }
.career-section h3 { margin-bottom: 5px; }
.career-trend { display: flex; align-items: end; gap: 4px; height: 92px; padding: 8px; border: 1px solid var(--ink); background: repeating-linear-gradient(0deg, transparent 0 21px, rgba(7,19,29,.12) 22px 23px); }
.career-trend i { position: relative; flex: 1; min-width: 3px; border: 1px solid var(--ink); background: linear-gradient(var(--coral), #ff9bd5); }
.career-trend i:nth-child(3n) { background: var(--teal); }
.career-trend i span { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); font: 700 7px 'DM Mono', monospace; }
.career-trend p { align-self: center; width: 100%; margin: 0; color: var(--muted); font-size: 10px; text-align: center; }
.crash-bars { display: grid; gap: 7px; }
.crash-bars > div { display: grid; grid-template-columns: 80px 1fr 70px; align-items: center; gap: 8px; }
.crash-bars span, .crash-bars strong { font: 700 8px 'DM Mono', monospace; }
.crash-bars i { height: 12px; overflow: hidden; border: 1px solid var(--ink); background: var(--cream); }
.crash-bars i b { display: block; height: 100%; background: var(--coral); }
.medal-cabinet { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.medal { display: grid; justify-items: center; padding: 9px 5px; border: 1px solid var(--ink); background: var(--cream); text-align: center; }
.medal > span { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 5px; border: 2px solid var(--ink); border-radius: 50%; background: #d8d4ca; font: 700 11px 'DM Mono', monospace; }
.medal-1 > span { background: #ce8651; }.medal-2 > span { background: #dce8ef; }.medal-3 > span { background: var(--yellow); }
.medal strong { font-size: 8px; }.medal small { font: 700 6px 'DM Mono', monospace; }
.settings-shell { width: min(900px, calc(100% - 28px)); box-shadow-color: var(--yellow); }
.settings-header { background: var(--teal); }
.settings-content { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; padding: 22px; }
.sensitivity-card { padding: 17px; border: 2px solid var(--ink); background: #fffdf6; box-shadow: 4px 4px 0 var(--ink); }
.sensitivity-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.sensitivity-heading .micro-label { margin-bottom: 4px; color: var(--coral-dark); }
.sensitivity-heading h3 { margin-bottom: 0; font-size: 16px; }
.sensitivity-heading output { flex: none; padding: 5px 7px; border: 1px solid var(--ink); background: var(--yellow); font: 700 8px 'DM Mono', monospace; }
.sensitivity-card > p { margin: 10px 0 14px; color: var(--muted); font-size: 10px; }
.sensitivity-card input[type='range'] { width: 100%; height: 24px; margin: 0 0 14px; border: 0; background: transparent; accent-color: var(--coral); cursor: ew-resize; appearance: none; -webkit-appearance: none; }
.sensitivity-card input[type='range']::-webkit-slider-runnable-track { height: 8px; border: 2px solid var(--ink); background: linear-gradient(90deg, var(--teal), var(--yellow), var(--coral)); }
.sensitivity-card input[type='range']::-webkit-slider-thumb { width: 20px; height: 20px; margin-top: -8px; border: 2px solid var(--ink); border-radius: 0; background: var(--paper); box-shadow: 2px 2px 0 var(--ink); -webkit-appearance: none; }
.sensitivity-card input[type='range']::-moz-range-track { height: 5px; border: 2px solid var(--ink); background: linear-gradient(90deg, var(--teal), var(--yellow), var(--coral)); }
.sensitivity-card input[type='range']::-moz-range-thumb { width: 18px; height: 18px; border: 2px solid var(--ink); border-radius: 0; background: var(--paper); box-shadow: 2px 2px 0 var(--ink); }
.sensitivity-preview { overflow: hidden; height: 116px; border: 2px solid var(--ink); background: #8bdfe4; }
.sensitivity-preview > span { display: block; padding: 5px 7px; border-bottom: 1px solid var(--ink); background: rgba(251,246,234,.8); font: 700 7px 'DM Mono', monospace; letter-spacing: .12em; }
.preview-lane { position: relative; height: 86px; background: repeating-linear-gradient(90deg, transparent 0 38px, rgba(255,255,255,.32) 39px 41px); }
.preview-lane .control-slipper { position: absolute; top: 28px; left: 20px; animation: settings-glide var(--preview-duration, 2.2s) ease-in-out infinite alternate; }
.preview-turntable { position: relative; display: grid; height: 86px; place-items: center; background: radial-gradient(circle, rgba(255,255,255,.65) 0 3px, transparent 4px), repeating-conic-gradient(from 0deg, rgba(255,255,255,.22) 0 8deg, transparent 8deg 22deg); }
.preview-turntable .control-slipper { animation: settings-spin var(--preview-duration, 2.4s) linear infinite; }
.preview-turntable b { position: absolute; bottom: 4px; font: 700 8px 'DM Mono', monospace; }
.control-slipper { position: relative; display: block; width: 52px; height: 25px; transform: rotate(-10deg); border: 2px solid var(--ink); border-radius: 48% 45% 45% 48%; background: var(--coral); box-shadow: 3px 3px 0 var(--ink); }
.control-slipper::before, .control-slipper::after { content: ''; position: absolute; top: 3px; width: 22px; height: 6px; border: 1px solid var(--ink); border-radius: 6px; background: var(--yellow); }
.control-slipper::before { left: 5px; transform: rotate(25deg); }
.control-slipper::after { right: 5px; transform: rotate(-25deg); }
.settings-footer { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 13px 15px; border: 1px dashed var(--ink); background: var(--cream); }
.settings-footer p { margin: 0; color: var(--muted); font-size: 10px; }
.settings-footer button { min-width: 150px; padding: 9px 12px; cursor: pointer; font: 700 8px 'DM Mono', monospace; }

.toast-region { position: fixed; z-index: 30; left: 50%; bottom: 24px; display: grid; gap: 8px; transform: translateX(-50%); pointer-events: none; }
.toast { min-width: 230px; padding: 11px 16px; border: 2px solid var(--ink); background: var(--paper); box-shadow: 4px 4px 0 var(--ink); animation: toast-in .2s ease-out; font: 700 10px 'DM Mono', monospace; text-align: center; }
.mobile-controls { display: none; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes event-pop { from { opacity: 0; transform: translate(-50%, -14px) scale(.8); } }
@keyframes victory-spin { from { transform: translate(-50%, -50%) rotate(45deg) scale(.38); } to { transform: translate(-50%, -50%) rotate(405deg) scale(.38); } }
@keyframes victory-bounce { 0%,100% { transform: translate(-50%, -45%) rotate(50deg) scale(.38); } 50% { transform: translate(-50%, -65%) rotate(75deg) scale(.42); } }
@keyframes crown-float { to { transform: translateY(-5px) rotate(8deg); } }
@keyframes settings-glide { from { left: 20px; transform: rotate(-10deg); } to { left: calc(100% - 72px); transform: rotate(10deg); } }
@keyframes settings-spin { to { transform: rotate(360deg); } }

@media (max-width: 1050px) {
  .hero-grid { grid-template-columns: 360px minmax(500px, 1fr); }
  .intro-panel { padding-inline: 34px; }
  h1 { font-size: 67px; }
  .best-card { display: none; }
  .shop-grid { grid-template-columns: repeat(3, 1fr); }
  .power-strip { grid-template-columns: 1fr 1fr; }
  .power-orbit { grid-column: 1 / -1; }
}

@media (max-width: 800px) {
  .topbar { min-height: 68px; padding: 10px 14px; }
  .brand strong { font-size: 15px; }
  .brand-mark { width: 36px; height: 36px; }
  .sound-button, .nav-button small { display: none; }
  .wallet { min-width: 70px; }
  .nav-button { padding: 8px 11px; }
  .profile-button { max-width: 94px; }
  .leaderboard-button span { font-size: 0; }
  .leaderboard-button span::after { content: 'RANKS'; font-size: 12px; }
  .settings-button { width: 44px; padding-inline: 8px; }
  .settings-button span { font-size: 0; }
  .settings-button span::after { content: '\2699'; font-size: 16px; }
  .hero-grid { display: flex; min-height: auto; flex-direction: column; }
  .intro-panel { padding: 34px 22px 31px; border-right: 0; border-bottom: 2px solid var(--ink); }
  .intro-panel h1 { font-size: 68px; }
  .lede { font-size: 14px; }
  .game-card { height: min(740px, calc(100vh - 68px)); min-height: 610px; }
  #gameCanvas { min-height: 610px; }
  .power-strip { grid-template-columns: 1fr; gap: 18px; }
  .power-orbit { grid-column: auto; }
  .shop-grid { grid-template-columns: repeat(2, 1fr); }
  .skin-grid { grid-template-columns: repeat(2, 1fr); }
  .customize-content { grid-template-columns: 1fr; }
  .achievement-list { grid-template-columns: 1fr; }
  .settings-content { grid-template-columns: 1fr; }
  .settings-footer { grid-column: auto; }
  .mode-cards { grid-template-columns: 1fr 1fr 1fr; }
  .mode-card { grid-template-columns: 36px 1fr; padding: 8px; }
  .mode-card > span { width: 34px; height: 34px; font-size: 10px; }
  .world-map { grid-template-columns: repeat(3, 1fr); }
  .tour-submap-map { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .loadout-grid { grid-template-columns: repeat(5, 1fr); }
  .career-grid { grid-template-columns: repeat(4, 1fr); }
  .career-grid > div:nth-child(n+5) { border-top: 1px solid var(--ink); }
  .mobile-controls { position: absolute; z-index: 4; inset: auto 13px 14px; display: flex; justify-content: space-between; pointer-events: none; }
  .touch-pad { position: relative; width: 116px; height: 116px; pointer-events: auto; }
  .touch-pad button { position: absolute; width: 38px; height: 38px; border: 2px solid var(--ink); background: rgba(251,246,234,.82); font: 700 10px 'DM Mono', monospace; touch-action: none; }
  .touch-pad button:nth-child(1) { top: 0; left: 39px; }
  .touch-pad button:nth-child(2) { top: 39px; left: 0; }
  .touch-pad button:nth-child(3) { top: 78px; left: 39px; }
  .touch-pad button:nth-child(4) { top: 39px; left: 78px; }
  .quick-slots { right: 50%; bottom: 22px; transform: translateX(50%); }
  .game-hud { inset: 10px 10px auto; }
  .active-effects { display: none; }
}

@media (max-width: 540px) {
  .brand small { display: none; }
  .brand > span:last-child { display: none; }
  .top-actions { gap: 6px; }
  .wallet { padding: 0 7px; }
  .intro-panel h1 { font-size: 58px; }
  .control-cheatsheet { grid-template-columns: 1fr; }
  .mission-board { display: none; }
  .achievement-summary { margin-top: 20px; }
  .start-overlay { padding: 19px; }
  .slipper-showcase { margin-block: -30px; transform: rotate(62deg) scale(.54); }
  .result-actions { width: 100%; flex-direction: column; }
  .power-orbit { grid-template-columns: repeat(5, 1fr); }
  .power-chip span { font-size: 17px; }
  .shop-shell { width: calc(100% - 12px); max-height: calc(100vh - 12px); }
  .shop-header { padding: 18px 16px; }
  .shop-header h2 { font-size: 28px; }
  .shop-header p { display: none; }
  .shop-header .wallet { display: none; }
  .shop-tabs button { flex: 1; padding: 11px 7px; font-size: 8px; }
  .shop-tabs span { display: none; }
  .shop-content { padding: 18px 14px 24px; }
  .section-heading > p { display: none; }
  .shop-grid { grid-template-columns: 1fr 1fr; }
  .shop-item { min-height: 182px; }
  .skin-grid { grid-template-columns: 1fr; }
  .top-actions { flex: 1; justify-content: flex-end; }
  .profile-button { max-width: 72px; }
  .social-header { padding: 18px 16px 15px; }
  .social-header h2 { font-size: 25px; }
  .social-content, .leaderboard-content { padding: 18px 14px 21px; }
  .leaderboard-list { min-height: 230px; }
  .leaderboard-row { grid-template-columns: 42px minmax(0, 1fr) auto; }
  .leaderboard-name { padding-inline: 9px; }
  .leaderboard-score { padding-inline: 10px; font-size: 15px; }
  .leaderboard-footer { align-items: stretch; flex-direction: column; }
  .achievement-content { padding: 14px 10px 18px; }
  .achievement-overview { grid-template-columns: 1fr 1fr; }
  .achievement-overview > div:nth-child(3) { display: none; }
  .achievement-overview > div:nth-child(2) { border-left: 2px solid var(--ink); }
  .achievement-tier span { font-size: 5px; }
  .settings-content { max-height: calc(100vh - 120px); overflow: auto; padding: 14px 10px 18px; }
  .settings-footer { align-items: stretch; flex-direction: column; }
  .settings-footer button { width: 100%; }
  .game-hud { gap: 5px; }
  .game-hud .run-stat { min-width: 58px; padding: 6px; }
  .game-hud .run-stat strong { font-size: 17px; }
  .game-hud .combo-stat { display: none; }
  .game-hud .mode-stat { min-width: 74px; }
  .pause-button { width: 40px; }
  .mode-content, .career-content { max-height: calc(100vh - 116px); padding: 13px 10px 17px; }
  .mode-cards { grid-template-columns: 1fr; }
  .mode-card { grid-template-columns: 42px 1fr; }
  .mode-card > span { width: 40px; height: 40px; }
  .world-map { grid-template-columns: 1fr 1fr; }
  .tour-submap-header { align-items: start; flex-direction: column; }
  .tour-submap-header > p { text-align: left; }
  .tour-submap-map { grid-template-columns: 1fr 1fr; }
  .world-stop { min-height: 125px; }
  .loadout-grid { grid-template-columns: repeat(3, 1fr); }
  .daily-panel { grid-template-columns: 1fr; }
  .mode-footer { align-items: stretch; flex-direction: column; }
  .mode-footer button { width: 100%; }
  .career-grid { grid-template-columns: repeat(3, 1fr); }
  .career-grid > div:nth-child(n+4) { border-top: 1px solid var(--ink); }
  .medal-cabinet { grid-template-columns: repeat(3, 1fr); }
  .crash-bars > div { grid-template-columns: 62px 1fr 58px; }
  .game-over .result-actions { flex-direction: column; }
  .run-recap { grid-template-columns: 1fr 1fr; }
  .run-recap > div:nth-child(2n+3) { border-left: 0; }
  .run-recap > div:nth-child(n+3) { border-top: 1px solid var(--ink); }
}

@media (max-width: 380px) {
  .profile-button { display: none; }
  .wallet { min-width: 56px; }
}

@media (pointer: coarse) and (orientation: landscape) and (max-height: 600px) {
  html, body, .app-shell { width: 100%; height: 100%; min-height: 0; overflow: hidden; }
  .topbar, .intro-panel, .power-strip { display: none; }
  .hero-grid { display: block; min-height: 100dvh; }
  .game-card { width: 100vw; height: 100dvh; min-height: 0; border: 0; }
  #gameCanvas { height: 100dvh; min-height: 0; }
  .game-hud { inset: 7px 8px auto; gap: 6px; }
  .run-stat { min-width: 64px; padding: 5px 8px; }
  .run-stat small { font-size: 6px; }
  .run-stat strong { font-size: 17px; }
  .mode-stat { min-width: 88px; }
  .mode-stat strong { font-size: 14px; }
  .pause-button { width: 40px; }
  .start-overlay, .pause-overlay { width: min(390px, calc(100% - 260px)); max-height: calc(100dvh - 18px); padding: 12px 20px; overflow: auto; }
  .start-overlay .slipper-showcase { display: none; }
  .start-overlay h2, .pause-overlay h2 { margin-top: 2px; font-size: 21px; }
  .start-overlay p, .pause-overlay p { margin-bottom: 9px; }
  .start-overlay .secondary-play, .pause-overlay .secondary-play { padding-block: 9px; }
  .game-over { width: min(560px, calc(100% - 245px)); max-height: calc(100dvh - 12px); }
  .mobile-controls { inset: auto 9px 8px; }
  .touch-pad { width: 104px; height: 104px; }
  .touch-pad button { width: 34px; height: 34px; }
  .touch-pad button:nth-child(1) { left: 35px; }
  .touch-pad button:nth-child(2) { top: 35px; }
  .touch-pad button:nth-child(3) { top: 70px; left: 35px; }
  .touch-pad button:nth-child(4) { top: 35px; left: 70px; }
  .quick-slots { right: 50%; bottom: 8px; transform: translateX(50%); }
  .quick-slot { width: 44px; height: 44px; }
  .social-shell, .shop-shell { max-height: calc(100dvh - 10px); }
  .social-header { padding: 10px 15px 9px; }
  .social-header p { display: none; }
  .social-header h2 { font-size: 22px; }
  .social-header .close-button { width: 38px; height: 38px; }
  .mode-content, .career-content { max-height: calc(100dvh - 68px); padding: 10px 12px 14px; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; } }
