:root {
  --ink: #111817;
  --ink-soft: #25302e;
  --paper: #f7f2df;
  --white: #fffdf5;
  --lime: #c7f451;
  --lime-dark: #88b82e;
  --coral: #ff6259;
  --cyan: #63dcde;
  --yellow: #ffd34f;
  --shadow: 0 8px 0 rgba(17, 24, 23, .22);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; overscroll-behavior: none; background: var(--ink); }
body { font-family: "Arial Rounded MT Bold", "Trebuchet MS", Arial, sans-serif; color: var(--ink); user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
button { font: inherit; color: inherit; border: 0; cursor: pointer; touch-action: manipulation; }
button:focus-visible { outline: 4px solid var(--cyan); outline-offset: 3px; }
#game-canvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; background: #a2d785; }
.screen { position: fixed; inset: 0; z-index: 2; }
.hidden { display: none !important; }

.menu-screen { background: linear-gradient(90deg, rgba(17,24,23,.97) 0 28%, rgba(17,24,23,.08) 48% 70%, rgba(17,24,23,.9) 100%); color: var(--white); }
.topbar { height: 74px; display: flex; align-items: center; gap: 24px; padding: max(10px, env(safe-area-inset-top)) max(28px, env(safe-area-inset-right)) 10px max(28px, env(safe-area-inset-left)); border-bottom: 2px solid rgba(255,255,255,.1); background: rgba(10,16,15,.74); backdrop-filter: blur(12px); }
.brand-mini { min-width: 260px; display: grid; grid-template-columns: 14px auto; gap: 2px 8px; letter-spacing: 1.5px; font-size: 10px; }
.brand-mini strong { grid-column: 2; color: var(--lime); font-size: 12px; }
.ink-dot { width: 12px; height: 12px; border-radius: 58% 42% 66% 34%; background: var(--lime); grid-row: 1 / span 2; align-self: center; box-shadow: 0 0 18px rgba(199,244,81,.7); }
.creator-logo { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 5px; border: 1px solid rgba(255,255,255,.18); border-radius: 24px 10px 24px 10px; background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 1px rgba(199,244,81,.08); transform: rotate(-1deg); }
.creator-seal { width: 36px; height: 36px; display: grid; place-items: center; border: 2px solid var(--ink); outline: 2px solid var(--lime); border-radius: 52% 48% 44% 56%; background: var(--lime); color: var(--ink); font-size: 12px; font-weight: 1000; letter-spacing: -.5px; box-shadow: 2px 3px 0 rgba(0,0,0,.3); }
.creator-name { display: flex; flex-direction: column; line-height: 1.05; }
.creator-name small { color: rgba(255,255,255,.48); font-size: 6px; letter-spacing: 1.3px; }
.creator-name strong { color: white; font-size: 10px; letter-spacing: .8px; white-space: nowrap; }
.player-chip { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.player-chip > span:last-child { display: flex; flex-direction: column; font-size: 11px; letter-spacing: .7px; }
.player-chip small { color: var(--lime); }
.avatar-mini { width: 42px; height: 42px; display: grid; place-items: center; color: var(--ink); background: var(--white); border: 3px solid var(--ink); outline: 2px solid var(--lime); border-radius: 48% 52% 45% 55%; transform: rotate(-3deg); font-weight: 900; }
.currency-row { display: flex; align-items: center; gap: 8px; }
.currency { padding: 11px 15px; border-radius: 10px; background: rgba(255,255,255,.09); color: white; letter-spacing: .6px; }
.currency span { color: var(--yellow); }
.round-button { width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.12); color: var(--white); }
.round-button.dark { background: rgba(17,24,23,.72); border: 2px solid rgba(255,255,255,.3); }
.audio-button { position: relative; border: 2px solid rgba(255,255,255,.16); font-size: 19px; transition: transform .18s, background .18s, color .18s, box-shadow .18s; }
.audio-button.active { background: var(--lime); color: var(--ink); border-color: var(--ink); box-shadow: 0 0 0 2px rgba(199,244,81,.24), 0 0 18px rgba(199,244,81,.42); animation: audio-beat 1.1s ease-in-out infinite; }
.audio-button.muted { color: rgba(255,255,255,.42); }
.audio-button:active { transform: translateY(2px) scale(.95); }
@keyframes audio-beat { 50% { box-shadow: 0 0 0 4px rgba(199,244,81,.1), 0 0 24px rgba(199,244,81,.58); } }
.view-pill { height: 38px; min-width: 45px; padding: 0 10px; border-radius: 20px; background: var(--cyan); border: 3px solid var(--ink); color: var(--ink); font-size: 10px; font-weight: 1000; box-shadow: 0 3px 0 rgba(17,24,23,.4); }

.menu-content { position: absolute; inset: 74px 0 46px; display: grid; grid-template-columns: minmax(190px, 22vw) 1fr minmax(270px, 23vw); align-items: center; padding: 3vh 3vw; }
.side-nav { display: flex; flex-direction: column; align-items: stretch; gap: 7px; align-self: center; }
.nav-item { position: relative; max-width: 235px; padding: 14px 18px; text-align: left; border-radius: 8px; background: transparent; color: rgba(255,255,255,.63); font-size: clamp(12px, 1.05vw, 16px); font-weight: 900; letter-spacing: 1px; transition: .2s ease; }
.nav-item span { display: inline-grid; width: 26px; color: rgba(255,255,255,.45); }
.nav-item:hover { color: white; transform: translateX(5px); background: rgba(255,255,255,.06); }
.nav-item.active { color: var(--ink); background: var(--lime); box-shadow: -6px 6px 0 rgba(0,0,0,.3); transform: rotate(-1deg); }
.nav-item.active::after { content: ""; position: absolute; right: -12px; top: 14px; border: 9px solid transparent; border-left-color: var(--lime); }
.nav-item.active span { color: var(--ink); }

.hero-copy { align-self: end; justify-self: center; text-align: center; padding-bottom: 1vh; filter: drop-shadow(0 5px 12px rgba(0,0,0,.25)); }
.sticker { display: inline-block; padding: 6px 12px; background: var(--lime); color: var(--ink); font-size: 10px; font-weight: 1000; letter-spacing: 1.5px; transform: rotate(-2deg); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.coral-bg { background: var(--coral); color: white; }
.hero-copy h1 { margin: 6px 0 -4px; line-height: .77; transform: rotate(-2deg); text-shadow: -3px 3px 0 var(--ink), -5px 5px 0 rgba(255,255,255,.8); }
.hero-copy h1 span { display: block; color: var(--white); font-size: clamp(39px, 5.8vw, 86px); letter-spacing: -4px; -webkit-text-stroke: 3px var(--ink); }
.hero-copy h1 strong { color: var(--lime); font-size: clamp(45px, 6.9vw, 103px); letter-spacing: -5px; -webkit-text-stroke: 3px var(--ink); }
.tagline { margin: 15px 0 18px; font-size: clamp(12px, 1.35vw, 19px); font-weight: 900; letter-spacing: 3px; text-transform: uppercase; }
.mode-select { display: flex; align-items: center; justify-content: center; gap: 8px; margin: auto; }
.mode-arrow { width: 34px; height: 64px; background: rgba(17,24,23,.72); color: white; border: 1px solid rgba(255,255,255,.2); border-radius: 8px; font-size: 28px; }
.mode-card { min-width: min(360px, 33vw); text-align: left; border-radius: 11px; overflow: hidden; background: rgba(17,24,23,.88); border: 2px solid rgba(255,255,255,.18); }
.mode-kicker { display: block; padding: 5px 12px; background: rgba(255,255,255,.08); color: var(--lime); font-size: 8px; letter-spacing: 1.2px; }
.mode-card > div { display: flex; align-items: center; gap: 11px; padding: 10px 14px; }
.mode-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--coral); font-style: normal; }
.mode-card > div span { display: flex; flex-direction: column; }
.mode-card b { font-size: clamp(11px, 1.2vw, 16px); letter-spacing: 1px; }
.mode-card small { color: rgba(255,255,255,.56); font-size: 9px; margin-top: 3px; }
.play-button { position: relative; min-width: min(315px, 32vw); margin-top: 11px; padding: 13px 32px 12px; background: var(--lime); border: 3px solid var(--ink); color: var(--ink); box-shadow: 0 6px 0 var(--ink), 0 10px 24px rgba(0,0,0,.3); border-radius: 10px 14px 8px 12px; transform: rotate(-.5deg); transition: transform .12s, filter .12s; }
.play-button:hover { filter: brightness(1.08); transform: translateY(-2px) rotate(.3deg); }
.play-button:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); }
.play-button span { display: block; font-size: clamp(15px, 1.5vw, 21px); font-weight: 1000; letter-spacing: 1.5px; }
.play-button small { display: block; margin-top: 2px; font-size: 8px; letter-spacing: 2px; opacity: .65; }
.level-badge { width: min(315px, 32vw); margin: 9px auto 0; padding: 6px 10px; display: grid; grid-template-columns: 27px 1fr auto; align-items: center; gap: 7px; border: 1px solid rgba(255,255,255,.2); border-radius: 8px; background: rgba(17,24,23,.72); text-align: left; }
.level-badge > span { font-size: 18px; }
.level-badge b { font-size: 8px; letter-spacing: .8px; }
.level-badge small { color: var(--cyan); font-size: 7px; letter-spacing: .7px; }
.control-hint { margin-top: 14px; color: rgba(255,255,255,.66); font-size: 9px; letter-spacing: .6px; }
kbd { padding: 3px 5px; border: 1px solid rgba(255,255,255,.35); border-radius: 4px; background: rgba(0,0,0,.3); font: inherit; color: white; }

.mission-panel { width: 100%; max-width: 330px; justify-self: end; align-self: center; }
.panel-title { display: flex; justify-content: space-between; padding: 0 2px 8px; font-size: 10px; letter-spacing: 1.4px; }
.panel-title small { color: var(--lime); }
.mission { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 9px; padding: 11px; margin-bottom: 7px; border-radius: 10px; background: rgba(17,24,23,.82); border: 1px solid rgba(255,255,255,.12); box-shadow: 0 5px 14px rgba(0,0,0,.13); }
.mission-icon { width: 33px; height: 33px; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 44% 56% 48% 52%; color: var(--ink); font-size: 18px; font-weight: 1000; }
.mission-icon.coral { background: var(--coral); }
.mission-icon.lime { background: var(--lime); }
.mission > div { display: flex; flex-direction: column; gap: 2px; }
.mission b { font-size: 10px; }
.mission small { font-size: 8px; color: rgba(255,255,255,.48); }
.mission > strong { color: var(--yellow); font-size: 10px; }
.mission i { height: 4px; overflow: hidden; margin-top: 4px; border-radius: 4px; background: rgba(255,255,255,.13); }
.mission i span { display: block; height: 100%; background: var(--lime); }
.news-card { min-height: 126px; margin-top: 16px; padding: 17px; display: flex; flex-direction: column; justify-content: flex-end; border: 2px solid rgba(255,255,255,.18); border-radius: 12px; background: linear-gradient(135deg, rgba(99,220,222,.87), rgba(38,97,99,.82)), repeating-linear-gradient(45deg, transparent 0 12px, rgba(255,255,255,.1) 12px 14px); color: white; box-shadow: var(--shadow); transform: rotate(1deg); }
.news-card span { font-size: 8px; letter-spacing: 1.2px; }
.news-card b { font-size: 19px; color: var(--yellow); -webkit-text-stroke: 1px var(--ink); text-shadow: 2px 2px 0 var(--ink); }
.news-card small { max-width: 250px; margin-top: 5px; font-size: 9px; line-height: 1.3; }
.menu-footer { position: absolute; left: 0; right: 0; bottom: 0; height: 46px; padding: 0 3vw; display: flex; align-items: center; justify-content: space-between; background: rgba(10,16,15,.85); border-top: 1px solid rgba(255,255,255,.1); font-size: 8px; letter-spacing: 1.2px; color: rgba(255,255,255,.5); }
.status-dot { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 9px var(--lime); }

.match-ui { pointer-events: none; color: var(--white); }
.match-ui button, .joystick { pointer-events: auto; touch-action: none; -webkit-user-drag: none; }
.match-topbar { position: absolute; top: max(15px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; }
.match-stat { min-width: 72px; height: 52px; padding: 7px 13px; display: flex; align-items: center; gap: 9px; background: rgba(17,24,23,.79); border: 2px solid rgba(255,255,255,.22); border-radius: 10px; backdrop-filter: blur(7px); }
.match-stat small { width: 36px; font-size: 7px; line-height: 1.1; letter-spacing: .6px; color: rgba(255,255,255,.58); }
.match-stat b { font-size: 21px; color: var(--lime); }
.zone-card { height: 52px; min-width: 190px; padding: 7px 17px; display: flex; align-items: center; justify-content: center; gap: 10px; background: rgba(17,24,23,.87); border: 2px solid var(--coral); border-radius: 12px; box-shadow: 0 4px 0 rgba(17,24,23,.4); }
.zone-card > span:last-child { display: flex; flex-direction: column; }
.zone-card small { color: rgba(255,255,255,.58); font-size: 7px; letter-spacing: .8px; }
.zone-card b { color: white; font-size: 18px; letter-spacing: 1px; }
.zone-pulse { width: 16px; height: 16px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 0 rgba(255,98,89,.7); animation: pulse 1.4s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(255,98,89,0); } 100% { box-shadow: 0 0 0 0 rgba(255,98,89,0); } }
#minimap { position: absolute; top: max(20px, env(safe-area-inset-top)); right: max(22px, env(safe-area-inset-right)); width: clamp(112px, 13vw, 170px); height: clamp(112px, 13vw, 170px); border: 4px solid rgba(17,24,23,.8); border-radius: 50%; background: rgba(17,24,23,.62); box-shadow: 0 7px 0 rgba(17,24,23,.25); }
.status-bars { position: absolute; left: max(24px, env(safe-area-inset-left)); bottom: max(24px, env(safe-area-inset-bottom)); width: min(290px, 32vw); }
.bar { height: 27px; margin-top: 5px; display: grid; grid-template-columns: 25px 1fr 31px; align-items: center; gap: 5px; filter: drop-shadow(0 3px 0 rgba(0,0,0,.25)); }
.bar > span { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); font-weight: 1000; }
.bar i { height: 16px; padding: 3px; border-radius: 10px 7px 11px 8px; background: rgba(17,24,23,.82); transform: skewX(-5deg); }
.bar i b { display: block; width: 100%; height: 100%; border-radius: inherit; transition: width .2s; }
.bar strong { font-size: 11px; text-shadow: 2px 2px 0 var(--ink); }
.bar.health i b { background: var(--lime); }
.bar.shield i b { background: var(--cyan); }
.weapon-chip { width: 125px; margin-top: 11px; padding: 6px 10px; display: flex; gap: 8px; align-items: center; border-radius: 9px; background: rgba(17,24,23,.83); border: 2px solid rgba(255,255,255,.2); }
.weapon-chip > span { color: var(--yellow); font-size: 21px; }
.weapon-chip div { display: flex; flex-direction: column; }
.weapon-chip small { color: rgba(255,255,255,.58); font-size: 7px; }
.weapon-chip b { font-size: 13px; }
.kill-feed { position: absolute; top: 92px; left: max(22px, env(safe-area-inset-left)); width: 235px; display: flex; flex-direction: column; gap: 5px; }
.feed-item { padding: 7px 9px; background: rgba(17,24,23,.68); border-left: 3px solid var(--coral); border-radius: 4px; font-size: 9px; animation: feed-in .25s ease, feed-out .5s 3.8s forwards; }
.feed-item b { color: var(--lime); }
@keyframes feed-in { from { transform: translateX(-30px); opacity: 0; } }
@keyframes feed-out { to { opacity: 0; transform: translateX(-15px); } }
.announcement { position: absolute; top: 23%; left: 50%; transform: translateX(-50%) rotate(-1deg); padding: 9px 24px; background: var(--paper); color: var(--ink); border: 3px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); font-size: clamp(16px, 2.4vw, 31px); font-weight: 1000; letter-spacing: 1px; text-align: center; }
.announcement small { display: block; font-size: 9px; color: #5b6563; letter-spacing: 2px; }
.damage-flash { position: absolute; inset: 0; opacity: 0; box-shadow: inset 0 0 120px 50px var(--coral); transition: opacity .12s; }
.damage-flash.on { opacity: .55; }
.music-chip { position: absolute; left: 50%; bottom: max(10px, env(safe-area-inset-bottom)); transform: translateX(-50%) rotate(-1deg); display: flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid rgba(255,255,255,.18); border-radius: 14px 7px 14px 7px; background: rgba(17,24,23,.62); color: rgba(255,255,255,.72); backdrop-filter: blur(6px); font-size: 7px; letter-spacing: 1px; pointer-events: none; }
.music-chip span { color: var(--lime); font-size: 12px; animation: music-pulse .9s ease-in-out infinite; }
@keyframes music-pulse { 50% { transform: translateY(-2px) scale(1.12); } }

.joystick { position: absolute; left: max(34px, env(safe-area-inset-left)); bottom: max(40px, env(safe-area-inset-bottom)); width: 126px; height: 126px; display: none; place-items: center; border: 3px solid rgba(255,255,255,.28); border-radius: 48% 52% 46% 54%; background: rgba(17,24,23,.26); touch-action: none; contain: layout paint; }
.joystick::before, .joystick::after { content: ""; position: absolute; background: rgba(255,255,255,.17); }
.joystick::before { width: 2px; height: 80%; }
.joystick::after { width: 80%; height: 2px; }
.joystick-knob { position: relative; z-index: 1; width: 56px; height: 56px; border-radius: 50%; background: rgba(247,242,223,.92); border: 4px solid var(--ink); box-shadow: 0 4px 0 rgba(17,24,23,.35); will-change: transform; }
.joystick.control-active { border-color: rgba(199,244,81,.9); background: rgba(17,24,23,.42); box-shadow: 0 0 0 5px rgba(199,244,81,.12); }
.action-cluster { position: absolute; right: max(28px, env(safe-area-inset-right)); bottom: max(28px, env(safe-area-inset-bottom)); width: 205px; height: 155px; pointer-events: none; }
.action-button { position: absolute; display: grid; place-items: center; border-radius: 50%; border: 4px solid var(--ink); color: var(--ink); box-shadow: 0 6px 0 rgba(17,24,23,.6); pointer-events: auto; touch-action: none; isolation: isolate; }
.action-button span { font-size: 26px; font-weight: 1000; line-height: 1; }
.action-button small { font-size: 7px; font-weight: 1000; }
.action-button.fire { right: 0; bottom: 0; width: 90px; height: 90px; background: var(--coral); color: white; }
.action-button.ability { left: 22px; top: 0; width: 72px; height: 72px; background: var(--lime); overflow: hidden; }
.action-button.ability i { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: rgba(17,24,23,.35); pointer-events: none; }
.action-button.defense { left: 103px; top: -4px; width: 64px; height: 64px; background: var(--cyan); overflow: hidden; }
.action-button.defense i { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: rgba(17,24,23,.35); pointer-events: none; }
.action-button.defense span { font-size: 25px; }
.action-button.utility { left: 0; bottom: 2px; width: 57px; height: 57px; background: var(--white); }
.action-button.utility span { color: var(--coral); }
.action-button:active, .action-button.control-active { transform: translateY(4px) scale(.97); box-shadow: 0 2px 0 rgba(17,24,23,.6), 0 0 0 5px rgba(255,255,255,.16); filter: brightness(1.12); }

.result-screen, .pause-screen { display: grid; place-items: center; background: rgba(17,24,23,.78); color: white; backdrop-filter: blur(10px); }
.result-card, .pause-card { width: min(440px, 88vw); padding: clamp(24px, 5vh, 46px); text-align: center; border: 3px solid var(--ink); border-radius: 20px 13px 22px 16px; background: var(--paper); color: var(--ink); box-shadow: 12px 12px 0 rgba(0,0,0,.35); transform: rotate(-.5deg); }
.result-card h2, .pause-card h2 { margin: 13px 0 2px; font-size: clamp(29px, 5vw, 52px); letter-spacing: -2px; }
.placement { color: var(--coral); font-size: 44px; font-weight: 1000; line-height: 1; }
.placement b { font-size: 82px; }
.result-card p, .pause-card p { margin: 8px 0 20px; color: #66706d; font-size: 12px; }
.result-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 14px 0 6px; border-block: 2px solid rgba(17,24,23,.12); }
.result-stats div { padding: 13px; display: flex; flex-direction: column; }
.result-stats div + div { border-left: 2px solid rgba(17,24,23,.12); }
.result-stats small { font-size: 7px; letter-spacing: 1px; }
.result-stats b { font-size: 22px; }
.result-card .play-button, .pause-card .play-button { width: 100%; min-width: 0; }
.text-button { margin-top: 19px; background: transparent; font-size: 9px; font-weight: 1000; letter-spacing: 1.4px; text-decoration: underline; }
.pause-card { max-width: 390px; }
.hub-panel { z-index: 8; display: grid; place-items: center; 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)); background: rgba(8,14,13,.88); color: var(--white); backdrop-filter: blur(12px); }
.hub-shell { width: min(1060px, 96vw); height: min(650px, 93vh); display: grid; grid-template-rows: 72px 1fr; overflow: hidden; border: 3px solid rgba(255,255,255,.18); border-radius: 22px 13px 25px 16px; background: linear-gradient(145deg, #1b2725, #0e1615); box-shadow: 14px 14px 0 rgba(0,0,0,.35); }
.hub-header { display: grid; grid-template-columns: 58px 1fr auto; align-items: center; gap: 14px; padding: 10px 19px; border-bottom: 2px solid rgba(255,255,255,.1); background: rgba(255,255,255,.04); }
.hub-header > div:nth-child(2) { display: flex; flex-direction: column; }
.hub-header small { color: var(--lime); font-size: 7px; letter-spacing: 1.8px; }
.hub-header h2 { margin: 1px 0 0; font-size: clamp(18px, 2.3vw, 28px); letter-spacing: -1px; }
.hub-back { width: 44px; height: 44px; border-radius: 50%; background: var(--paper); border: 3px solid var(--ink); font-size: 23px; font-weight: 1000; box-shadow: 0 4px 0 rgba(0,0,0,.35); }
.hub-wallet { display: flex; align-items: center; gap: 7px; padding: 10px 14px; border-radius: 20px; background: rgba(255,255,255,.08); }
.hub-wallet span { color: var(--yellow); }
.hub-content { overflow: auto; padding: clamp(18px, 3vw, 32px); scrollbar-color: var(--lime) rgba(255,255,255,.08); }
.hub-hero { display: grid; grid-template-columns: 1.3fr .7fr; gap: 22px; margin-bottom: 22px; padding: 20px 22px; border-radius: 15px; background: linear-gradient(135deg, rgba(99,220,222,.24), rgba(199,244,81,.1)); border: 1px solid rgba(255,255,255,.12); }
.hub-hero h3 { margin: 0 0 5px; font-size: clamp(22px, 3vw, 38px); line-height: .95; }
.hub-hero p { margin: 7px 0 0; max-width: 550px; color: rgba(255,255,255,.58); font-size: 11px; line-height: 1.5; }
.xp-box { align-self: center; }
.xp-box > div { display: flex; justify-content: space-between; font-size: 9px; }
.xp-track { height: 12px; margin-top: 7px; overflow: hidden; border-radius: 8px; background: rgba(0,0,0,.35); }
.xp-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--lime-dark), var(--lime)); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 14px; }
.hub-card { position: relative; min-height: 165px; padding: 16px; display: flex; flex-direction: column; overflow: hidden; border-radius: 14px 10px 17px 12px; background: rgba(255,255,255,.07); border: 2px solid rgba(255,255,255,.12); transition: transform .15s, border-color .15s; }
.hub-card:hover { transform: translateY(-3px); border-color: rgba(199,244,81,.65); }
.hub-card.selected { border-color: var(--lime); box-shadow: inset 0 0 0 2px rgba(199,244,81,.16); }
.hub-card.locked { filter: grayscale(.75); opacity: .58; }
.hub-card .card-icon { min-height: 50px; display: grid; place-items: center; font-size: 41px; }
.hub-card h4 { margin: 8px 0 2px; font-size: 13px; }
.hub-card p { flex: 1; margin: 3px 0 12px; color: rgba(255,255,255,.5); font-size: 9px; line-height: 1.35; }
.hub-card .tag { position: absolute; top: 9px; right: 9px; padding: 4px 7px; border-radius: 9px; background: var(--coral); color: white; font-size: 7px; font-weight: 1000; }
.hub-card .tag.unlocked { background: var(--lime); color: var(--ink); }
.card-action { width: 100%; padding: 9px 10px; border-radius: 8px; background: var(--lime); color: var(--ink); font-size: 9px; font-weight: 1000; letter-spacing: .5px; }
.card-action.secondary { background: var(--cyan); }
.card-action.dark { background: rgba(255,255,255,.12); color: white; }
.card-action:disabled { opacity: .38; cursor: not-allowed; }
.character-preview { width: 72px; height: 72px; margin: 0 auto; display: grid; place-items: center; border: 3px solid var(--ink); border-radius: 50% 46% 52% 48%; background: var(--paper); color: var(--ink); font-size: 28px; box-shadow: 0 5px 0 rgba(0,0,0,.28); }
.diamond-pack { background: linear-gradient(145deg, rgba(99,220,222,.18), rgba(183,137,230,.14)); }
.diamond-pack .card-icon { color: var(--cyan); text-shadow: 0 0 18px rgba(99,220,222,.7); }
.price-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 9px; font-size: 10px; }
.price-row b { color: var(--yellow); font-size: 14px; }
.settings-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.setting-card { padding: 18px; border-radius: 13px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); }
.setting-card h4 { margin: 0 0 5px; }
.setting-card p { margin: 0 0 13px; color: rgba(255,255,255,.5); font-size: 9px; line-height: 1.4; }
.segmented { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.segmented.audio-controls { grid-template-columns: repeat(3, 1fr); }
.segmented button { padding: 10px; border-radius: 8px; background: rgba(255,255,255,.09); color: white; font-size: 9px; font-weight: 1000; }
.segmented button.active { background: var(--cyan); color: var(--ink); }
.owner-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; }
.owner-form input { min-width: 0; padding: 11px; border: 2px solid rgba(255,255,255,.14); border-radius: 8px; background: rgba(0,0,0,.25); color: white; font: inherit; font-size: 10px; }
.owner-form button { padding: 10px 16px; border-radius: 8px; background: var(--yellow); font-size: 9px; font-weight: 1000; }
.owner-form .owner-unlock { grid-column: 1 / -1; background: var(--lime); color: var(--ink); }
.admin-log { margin-top: 10px; max-height: 100px; overflow: auto; font-size: 8px; color: rgba(255,255,255,.48); }
.rank-row { display: grid; grid-template-columns: 44px 1fr 90px; align-items: center; padding: 11px 14px; border-bottom: 1px solid rgba(255,255,255,.08); }
.rank-row strong { color: var(--lime); font-size: 18px; }
.rank-row b { font-size: 11px; }
.rank-row span:last-child { text-align: right; color: var(--yellow); font-size: 9px; }
.rank-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: -10px 0 14px; }
.rank-summary span { padding: 10px; display: flex; flex-direction: column; align-items: center; border-radius: 9px; background: rgba(255,255,255,.06); }
.rank-summary small { color: rgba(255,255,255,.45); font-size: 7px; letter-spacing: .7px; }
.rank-summary b { color: var(--lime); font-size: 18px; }
.claim-banner { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 14px; padding: 17px; border-radius: 13px; background: linear-gradient(90deg, rgba(255,98,89,.26), rgba(255,211,79,.16)); border: 1px solid rgba(255,255,255,.13); }
.claim-banner h4 { margin: 0 0 3px; }
.claim-banner p { margin: 0; color: rgba(255,255,255,.52); font-size: 9px; }
.claim-banner button { min-width: 135px; padding: 10px; border-radius: 8px; background: var(--yellow); font-size: 9px; font-weight: 1000; }
.legal-note { margin-top: 18px; padding: 11px; border-left: 3px solid var(--cyan); background: rgba(99,220,222,.06); color: rgba(255,255,255,.5); font-size: 8px; line-height: 1.5; }
.adventure-nav { color: var(--yellow); }
.install-nav { color: var(--lime); }
.install-shell { display: grid; grid-template-columns: minmax(240px, .85fr) 1.4fr; gap: 16px; }
.install-hero-card, .install-guide { padding: 22px; border: 2px solid rgba(255,255,255,.13); border-radius: 18px 11px 20px 13px; background: rgba(255,255,255,.055); }
.install-hero-card { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: linear-gradient(145deg, rgba(199,244,81,.18), rgba(99,220,222,.08)); }
.install-app-icon { width: 104px; height: 104px; padding: 8px; border: 4px solid var(--ink); border-radius: 25% 19% 28% 20%; background: var(--lime); box-shadow: 8px 8px 0 rgba(0,0,0,.32); transform: rotate(-2deg); }
.install-hero-card h4 { margin: 18px 0 4px; font-size: 22px; }
.install-hero-card p, .install-guide p { color: rgba(255,255,255,.57); font-size: 9px; line-height: 1.55; }
.install-primary { width: 100%; margin-top: 12px; padding: 13px; border-radius: 10px; background: var(--lime); color: var(--ink); font-size: 11px; font-weight: 1000; letter-spacing: 1px; box-shadow: 0 5px 0 var(--ink); }
.install-primary:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }
.install-status { min-height: 30px; margin-top: 12px; color: var(--cyan); font-size: 8px; line-height: 1.4; }
.install-guide h4 { margin: 0 0 13px; font-size: 17px; }
.install-steps { display: grid; gap: 9px; }
.install-step { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: center; padding: 11px; border-radius: 10px; background: rgba(255,255,255,.055); }
.install-step > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--cyan); color: var(--ink); font-size: 16px; font-weight: 1000; }
.install-step b { display: block; font-size: 10px; }
.install-step small { color: rgba(255,255,255,.48); font-size: 8px; }
.offline-badge { margin-top: 13px; padding: 10px; border-left: 3px solid var(--lime); background: rgba(199,244,81,.07); color: rgba(255,255,255,.65); font-size: 8px; }
.world-section { position: relative; margin-bottom: 24px; padding: 18px; overflow: hidden; border: 2px solid rgba(255,255,255,.12); border-radius: 18px 11px 20px 13px; background: linear-gradient(135deg, var(--world-color, rgba(199,244,81,.16)), rgba(255,255,255,.04)); }
.world-section.locked { opacity: .52; filter: grayscale(.75); }
.world-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.world-heading > span { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: var(--paper); border: 3px solid var(--ink); font-size: 26px; box-shadow: 0 4px 0 rgba(0,0,0,.3); }
.world-heading h3 { margin: 0; font-size: 19px; }
.world-heading small { color: rgba(255,255,255,.52); font-size: 8px; }
.world-route { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); align-items: center; gap: 10px; }
.world-route::before { content: ""; position: absolute; left: 9%; right: 9%; top: 31px; height: 6px; border-radius: 6px; background: repeating-linear-gradient(90deg, rgba(255,255,255,.23) 0 15px, transparent 15px 22px); }
.route-node { position: relative; z-index: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; color: white; background: transparent; }
.route-node .node-orb { width: 62px; height: 62px; display: grid; place-items: center; border-radius: 48% 52% 45% 55%; background: var(--paper); border: 4px solid var(--ink); color: var(--ink); font-size: 22px; font-weight: 1000; box-shadow: 0 6px 0 rgba(0,0,0,.32); transition: .15s; }
.route-node:not(:disabled):hover .node-orb { transform: translateY(-4px) rotate(-3deg); background: var(--lime); }
.route-node.current .node-orb { background: var(--lime); box-shadow: 0 0 0 5px rgba(199,244,81,.2), 0 6px 0 rgba(0,0,0,.32); animation: node-pop 1.2s ease-in-out infinite; }
.route-node.completed .node-orb { background: var(--cyan); }
.route-node.boss .node-orb { background: var(--coral); color: white; }
.route-node:disabled .node-orb { background: #626b68; color: rgba(255,255,255,.35); }
.route-node b { max-width: 120px; margin-top: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
.route-node em { margin-top: 3px; color: var(--cyan); font-size: 6px; font-style: normal; font-weight: 1000; letter-spacing: .7px; }
.route-node small { min-height: 13px; color: var(--yellow); font-size: 10px; letter-spacing: 1px; }
@keyframes node-pop { 50% { transform: translateY(-4px) scale(1.04); } }
.adventure-ui { z-index: 3; pointer-events: none; color: white; }
.adventure-ui button { pointer-events: auto; touch-action: none; }
.adventure-topbar { position: absolute; top: max(13px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; }
.adventure-level-chip { height: 52px; min-width: 205px; padding: 7px 13px; display: flex; align-items: center; gap: 9px; border: 2px solid rgba(255,255,255,.2); border-radius: 11px; background: rgba(17,24,23,.84); box-shadow: 0 4px 0 rgba(0,0,0,.25); }
.adventure-level-chip > span { font-size: 25px; }
.adventure-level-chip div { display: flex; flex-direction: column; }
.adventure-level-chip small { color: var(--lime); font-size: 7px; letter-spacing: 1px; }
.adventure-level-chip b { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.adventure-progress { width: min(220px, 25vw); height: 44px; padding: 8px 11px; display: flex; align-items: center; gap: 7px; border-radius: 10px; background: rgba(17,24,23,.78); }
.adventure-progress i { flex: 1; height: 10px; overflow: hidden; border-radius: 8px; background: rgba(255,255,255,.14); }
.adventure-progress i b { display: block; width: 0; height: 100%; background: var(--lime); transition: width .2s; }
.adventure-progress small { min-width: 27px; font-size: 8px; }
.adventure-stat { height: 44px; min-width: 54px; padding: 6px 10px; display: flex; align-items: center; gap: 5px; border-radius: 10px; border: 2px solid rgba(255,255,255,.17); background: rgba(17,24,23,.82); }
.adventure-stat span { color: var(--coral); font-size: 19px; }
.adventure-stat.orb span { color: var(--yellow); }
.adventure-controls { position: absolute; bottom: max(25px, env(safe-area-inset-bottom)); display: flex; align-items: flex-end; gap: 12px; pointer-events: none; }
.adventure-controls.left-controls { left: max(25px, env(safe-area-inset-left)); }
.adventure-controls.right-controls { right: max(25px, env(safe-area-inset-right)); }
.adventure-move, .adventure-action { display: grid; place-items: center; border-radius: 50%; border: 4px solid var(--ink); box-shadow: 0 6px 0 rgba(17,24,23,.55); pointer-events: auto; }
.adventure-move { width: 68px; height: 68px; background: rgba(255,253,245,.88); color: var(--ink); font-size: 23px; }
.adventure-action { width: 78px; height: 78px; color: var(--ink); }
.adventure-action.jump { width: 92px; height: 92px; background: var(--lime); font-size: 31px; }
.adventure-action.ink { background: var(--cyan); font-size: 24px; }
.adventure-action small { display: block; margin-top: -13px; font-size: 7px; }
.adventure-move:active, .adventure-action:active, .adventure-move.control-active, .adventure-action.control-active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(17,24,23,.55), 0 0 0 5px rgba(255,255,255,.16); filter: brightness(1.12); }
.adventure-stars { margin: 8px 0; color: var(--yellow); font-size: 48px; letter-spacing: 7px; text-shadow: 3px 3px 0 var(--ink); }
.adventure-result-card .text-button + .text-button { margin-left: 16px; }
.toast { position: fixed; z-index: 10; left: 50%; bottom: 58px; transform: translate(-50%, 25px); padding: 11px 17px; border: 2px solid var(--ink); border-radius: 8px; background: var(--paper); color: var(--ink); box-shadow: 4px 4px 0 var(--ink); font-size: 11px; font-weight: 900; opacity: 0; pointer-events: none; transition: .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0) rotate(-1deg); }
.rotate-device { display: none; }

@media (hover: none), (pointer: coarse) {
  .control-hint { display: none; }
  .joystick { display: grid; }
  .status-bars { left: max(180px, env(safe-area-inset-left)); width: min(260px, 32vw); }
}

@media (max-width: 900px) {
  .topbar { height: 58px; padding-block: 7px; }
  .brand-mini { min-width: 155px; }
  .brand-mini span:not(.ink-dot) { display: none; }
  .creator-logo { padding-right: 6px; }
  .creator-name { display: none; }
  .creator-seal { width: 34px; height: 34px; }
  .match-ui .music-chip { display: none; }
  .player-chip { margin-left: 0; }
  .currency-row { margin-left: auto; }
  .menu-content { top: 58px; grid-template-columns: 170px 1fr 205px; padding: 2vh 2vw; }
  .mission-panel { max-width: 205px; }
  .mission { grid-template-columns: 31px 1fr; padding: 8px; }
  .mission > strong, .mission small { display: none; }
  .news-card { min-height: 94px; }
  .news-card small { display: none; }
  .hero-copy h1 span { font-size: 42px; }
  .hero-copy h1 strong { font-size: 51px; }
  .tagline { margin: 11px 0; }
  .play-button { padding-block: 9px; }
  #minimap { width: 104px; height: 104px; }
  .match-topbar { left: 42%; }
  .joystick { display: grid; width: 108px; height: 108px; left: max(22px, env(safe-area-inset-left)); bottom: max(28px, env(safe-area-inset-bottom)); }
  .status-bars { left: max(145px, env(safe-area-inset-left)); width: min(245px, 31vw); }
  .hub-shell { height: 94vh; grid-template-rows: 56px 1fr; }
  .hub-header { padding: 6px 12px; }
  .hub-back { width: 37px; height: 37px; }
  .hub-content { padding: 13px; }
  .hub-hero { grid-template-columns: 1fr 1fr; margin-bottom: 12px; padding: 12px; }
  .hub-hero p { display: none; }
  .card-grid { grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 9px; }
  .hub-card { min-height: 143px; padding: 11px; }
  .hub-card .card-icon { min-height: 36px; font-size: 31px; }
  .hub-card p { margin-bottom: 7px; }
  .settings-grid { gap: 9px; }
  .setting-card { padding: 12px; }
  .adventure-topbar { left: 46%; }
  .adventure-level-chip { min-width: 165px; height: 45px; }
  .adventure-level-chip b { max-width: 120px; font-size: 9px; }
  .adventure-progress { height: 40px; }
  .adventure-stat { height: 40px; min-width: 46px; }
  .adventure-move { width: 59px; height: 59px; }
  .adventure-action { width: 65px; height: 65px; }
  .adventure-action.jump { width: 77px; height: 77px; }
  .install-shell { grid-template-columns: .8fr 1.2fr; gap: 9px; }
  .install-hero-card, .install-guide { padding: 12px; }
  .install-app-icon { width: 66px; height: 66px; }
  .install-hero-card h4 { margin-top: 9px; font-size: 16px; }
  .install-step { padding: 7px; }
}

@media (max-width: 720px) {
  .player-chip > span:last-child { display: none; }
  .player-chip { gap: 0; }
  .currency { padding-inline: 10px; }
  .round-button { width: 38px; height: 38px; }
}

@media (orientation: portrait) and (max-width: 700px) {
  .rotate-device { position: fixed; z-index: 99; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--ink); color: var(--white); text-align: center; }
  .rotate-device span { color: var(--lime); font-size: 65px; animation: rotate-hint 1.8s ease-in-out infinite; }
  .rotate-device b { margin-top: 12px; font-size: 22px; }
  .rotate-device small { max-width: 250px; margin-top: 8px; color: rgba(255,255,255,.55); }
  @keyframes rotate-hint { 50% { transform: rotate(90deg); } }
}

@media (max-height: 620px) {
  .menu-content { padding-block: 1vh; }
  .hero-copy h1 { margin-top: 3px; }
  .hero-copy h1 span { font-size: clamp(31px, 5vw, 60px); }
  .hero-copy h1 strong { font-size: clamp(36px, 6vw, 72px); }
  .tagline { margin-block: 7px; }
  .mode-card > div { padding-block: 7px; }
  .play-button { margin-top: 7px; padding-block: 8px; }
  .news-card { min-height: 88px; }
  .nav-item { padding-block: 10px; }
  .level-badge { margin-top: 5px; padding-block: 4px; }
  .adventure-controls { bottom: max(14px, env(safe-area-inset-bottom)); }
}

@media (max-height: 480px) {
  .hub-content[data-panel="install"] > .hub-hero { display: none; }
  .hub-content[data-panel="install"] { padding-block: 8px; }
}

@media (max-width: 700px), (max-height: 480px) {
  .hub-wallet { padding: 7px 10px; }
  .owner-form { grid-template-columns: 1fr 1fr; }
  .owner-form button { grid-column: 1 / -1; }
  .claim-banner { padding: 11px; }
  .settings-grid { grid-template-columns: 1fr; }
  .result-card, .pause-card { max-height: 94vh; padding: 14px 22px; }
  .result-card h2, .pause-card h2 { margin: 6px 0 0; font-size: 29px; }
  .placement { font-size: 26px; }
  .placement b { font-size: 51px; }
  .result-card p, .pause-card p { margin: 3px 0 7px; }
  .result-stats { margin: 5px 0 2px; }
  .result-stats div { padding: 7px; }
  .result-stats b { font-size: 17px; }
  .result-card .play-button, .pause-card .play-button { margin-top: 5px; padding-block: 7px; }
  .text-button { margin-top: 9px; }
  .world-section { padding: 11px; margin-bottom: 13px; }
  .world-heading { margin-bottom: 9px; }
  .world-heading > span { width: 38px; height: 38px; font-size: 20px; }
  .route-node .node-orb { width: 50px; height: 50px; font-size: 18px; }
  .world-route::before { top: 25px; }
  .route-node b { font-size: 8px; }
  .menu-footer { display: none; }
  .menu-content { bottom: 0; padding-block: 0; }
  .hero-copy { align-self: center; padding-bottom: 0; transform: translateY(-3px) scale(.84); transform-origin: center center; }
  .hero-copy .tagline, .control-hint { display: none; }
  .hero-copy h1 { margin-top: 2px; }
  .level-badge { margin-top: 3px; }
  .hero-copy .play-button { margin-top: 4px; }
  .side-nav { gap: 3px; }
  .nav-item { padding-block: 7px; }
  .mission-panel { transform: scale(.92); transform-origin: right center; }
}
