:root {
  --red: #c83f32;
  --red-bright: #ed5b45;
  --gold: #e8bc6a;
  --gold-pale: #f6dfab;
  --ink: #0b1110;
  --paper: #e9dcc0;
  --green: #809b6b;
  --line: rgba(255,255,255,.15);
  --sans: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --serif: "Noto Serif SC", "STSong", serif;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; background: #080d0c; }
body { color: #fff; font-family: var(--sans); -webkit-font-smoothing: antialiased; }
button, a { color: inherit; font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.is-hidden { display: none !important; }

.sky-backdrop { position: fixed; z-index: 0; inset: -3%; transform: scale(1.07); background-color:#17201f; background-image:url('../assets/images/mountain-sky-v3.png'); background-repeat:no-repeat; background-size:auto 148%; background-position:50% 100%; transition: filter 1.8s ease,transform 2.4s ease; animation: skyDrift 38s ease-in-out infinite alternate; }
#world { position: fixed; z-index: 1; inset: 0; width: 100%; height: 100%; display: block; background: transparent; filter:saturate(1.035) contrast(1.025); }
.weather-atmosphere { position: fixed; z-index: 2; inset: 0; overflow: hidden; pointer-events: none; box-shadow:inset 0 0 150px rgba(0,0,0,.29),inset 0 -80px 110px rgba(3,9,8,.24); transition: background 1.4s ease,opacity 1.4s ease,box-shadow 1.4s ease; }
.weather-atmosphere::before,.weather-atmosphere::after { content:""; position: absolute; inset: -20%; pointer-events:none; }
body[data-weather="dawn"] .sky-backdrop { filter: brightness(.68) saturate(.72) sepia(.10) hue-rotate(-8deg); }
body[data-weather="dawn"] .weather-atmosphere { background: radial-gradient(circle at 72% 24%,rgba(255,191,103,.18),transparent 25%),linear-gradient(rgba(87,112,99,.18),rgba(25,39,34,.25)); }
body[data-weather="mist"] .sky-backdrop { filter: brightness(.72) saturate(.45) contrast(.84) blur(.35px); transform:scale(1.085); }
body[data-weather="mist"] .weather-atmosphere { background: linear-gradient(rgba(178,190,180,.18),rgba(103,123,113,.24)); }
body[data-weather="mist"] .weather-atmosphere::before { background: radial-gradient(ellipse at 20% 54%,rgba(224,232,224,.22),transparent 34%),radial-gradient(ellipse at 78% 66%,rgba(218,227,220,.20),transparent 30%); animation:fogBank 12s ease-in-out infinite alternate; }
body[data-weather="rain"] .sky-backdrop { filter: brightness(.52) saturate(.48) contrast(1.08) hue-rotate(8deg); }
body[data-weather="rain"] .weather-atmosphere { background: linear-gradient(rgba(30,49,50,.28),rgba(13,28,30,.22)); }
body[data-weather="rain"] .weather-atmosphere::after,body[data-weather="storm"] .weather-atmosphere::after { background:repeating-linear-gradient(105deg,transparent 0 18px,rgba(190,218,220,.32) 19px 20px,transparent 21px 42px); background-size:140px 190px; animation:screenRain .42s linear infinite; }
body[data-weather="rain"] .weather-atmosphere::after { opacity:.22; }
body[data-weather="storm"] .weather-atmosphere::after { opacity:.29; }
body[data-weather="storm"] .sky-backdrop { filter: brightness(.35) saturate(.30) contrast(1.28) hue-rotate(12deg); transform:scale(1.095); }
body[data-weather="storm"] .weather-atmosphere { background:linear-gradient(rgba(8,20,24,.36),rgba(4,14,17,.32)); box-shadow:inset 0 0 190px rgba(0,0,0,.50),inset 0 -100px 130px rgba(0,8,12,.40); }
body[data-weather="storm"] .weather-atmosphere::before { background:#d9edeb; opacity:0; animation:lightning 8s linear infinite; }
body[data-weather="snow"] .sky-backdrop { filter:brightness(.84) saturate(.28) contrast(.88) hue-rotate(8deg); }
body[data-weather="snow"] .weather-atmosphere { background:linear-gradient(rgba(205,220,219,.12),rgba(128,151,151,.19)); }
body[data-weather="snow"] .weather-atmosphere::after { opacity:.65; background-image:radial-gradient(circle,rgba(255,255,255,.95) 0 1.5px,transparent 2px),radial-gradient(circle,rgba(238,247,247,.72) 0 1px,transparent 1.6px); background-size:74px 74px,47px 47px; background-position:0 0,18px 26px; animation:screenSnow 7s linear infinite; }
body[data-weather="golden"] .sky-backdrop { filter:brightness(.70) saturate(.82) sepia(.30) contrast(1.04); }
body[data-weather="golden"] .weather-atmosphere { background:radial-gradient(circle at 72% 23%,rgba(255,174,74,.27),transparent 28%),linear-gradient(rgba(117,70,31,.05),rgba(63,38,20,.21)); }
body[data-weather="golden"] .weather-atmosphere::after { opacity:.42; background-image:radial-gradient(circle,rgba(255,191,73,.9) 0 1px,transparent 1.7px); background-size:61px 79px; animation:dustRise 12s linear infinite; }
.grain { position: fixed; z-index: 90; inset: 0; pointer-events: none; opacity: .055; mix-blend-mode: screen; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E"); }
.noscript, .fatal { position: fixed; z-index: 200; inset: 0; display: grid; place-content: center; text-align: center; background: #101716; }

/* Cover */
.cover { position: fixed; z-index: 30; inset: 0; overflow: hidden; background: #0b1514; }
.cover-art { position: absolute; inset: 0; transform: scale(1.03); background: linear-gradient(90deg,rgba(7,13,12,.82) 0%,rgba(7,13,12,.52) 42%,rgba(7,13,12,.08) 74%), linear-gradient(0deg,rgba(7,13,12,.88),transparent 48%), url('../assets/images/long-march-hero.png') center 36%/cover; animation: coverDrift 15s ease-out both; }
.cover-vignette { position: absolute; inset: 0; background: radial-gradient(circle at 72% 34%,transparent 0 18%,rgba(2,6,5,.18) 70%), linear-gradient(90deg,rgba(0,0,0,.23) 1px,transparent 1px); background-size: auto, 22vw 100%; }
.cover-nav { position: relative; z-index: 2; height: 94px; padding: 0 clamp(24px,5vw,76px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,.11); }
.wordmark { display: flex; align-items: center; gap: 14px; color: #fff; text-decoration: none; }
.wordmark .star { width: 44px; height: 44px; display: grid; place-items: center; color: var(--gold); border: 1px solid rgba(232,188,106,.55); transform: rotate(45deg); font-size: 20px; }
.wordmark .star::first-letter { display: inline-block; transform: rotate(-45deg); }
.wordmark b, .wordmark small { display: block; }
.wordmark b { font-family: var(--serif); letter-spacing: .22em; font-size: 18px; }
.wordmark small { margin-top: 3px; color: rgba(255,255,255,.45); letter-spacing: .12em; font-size: 8px; }
.engine-label { display: flex; align-items: center; gap: 9px; padding: 8px 12px; border: 1px solid rgba(255,255,255,.12); color: rgba(255,255,255,.58); font-size: 10px; letter-spacing: .12em; }
.engine-label i { width: 6px; height: 6px; border-radius: 50%; background: #87bf70; box-shadow: 0 0 10px #87bf70; }
.cover-copy { position: relative; z-index: 2; width: min(720px,90vw); height: calc(100% - 94px); padding-left: clamp(28px,9vw,150px); display: flex; flex-direction: column; justify-content: center; }
.eyebrow { display: flex; align-items: center; gap: 13px; margin: 0 0 24px; color: var(--gold); font-size: 11px; font-weight: 700; letter-spacing: .28em; }
.eyebrow i { width: 46px; height: 1px; background: rgba(232,188,106,.7); }
.eyebrow b { color: rgba(255,255,255,.48); font-size: 9px; }
.cover h1 { margin: 0; line-height: .87; font-family: var(--serif); text-shadow: 0 12px 45px #000; }
.cover h1 small { display: block; margin-bottom: 16px; color: var(--gold-pale); font-size: clamp(32px,4vw,64px); font-weight: 600; letter-spacing: .16em; }
.cover h1 strong { display: block; font-size: clamp(70px,8vw,126px); letter-spacing: .055em; font-weight: 900; }
.cover-lead { margin: 34px 0 30px; color: rgba(255,255,255,.68); line-height: 2; letter-spacing: .07em; font-size: clamp(12px,1.1vw,16px); }
.cover-actions { display: flex; align-items: center; gap: 26px; }
.cta { min-width: 240px; min-height: 58px; display: inline-flex; justify-content: space-between; align-items: center; padding: 0 24px; border: 1px solid rgba(255,220,170,.25); color: #fff; background: linear-gradient(135deg,#c83f32,#a82e27); box-shadow: 0 15px 35px rgba(181,50,39,.27); font-weight: 800; letter-spacing: .14em; transition: transform .25s,background .25s,box-shadow .25s; }
.cta:hover { transform: translateY(-3px); background: linear-gradient(135deg,#e85241,#bf372c); box-shadow: 0 19px 42px rgba(181,50,39,.4); }
.cta kbd { padding-left: 17px; border-left: 1px solid rgba(255,255,255,.25); color: rgba(255,255,255,.56); font: 8px var(--sans); }
.cta.full { width: 100%; justify-content: center; gap: 18px; }
.text-btn { padding: 10px 0; border: 0; border-bottom: 1px solid rgba(255,255,255,.28); background: none; color: rgba(255,255,255,.74); font-size: 11px; letter-spacing: .12em; }
.text-btn span { color: var(--gold); margin-left: 8px; }
.text-btn:hover { color: #fff; border-color: var(--gold); }
.text-btn.light { display: block; margin: 14px auto 0; color: rgba(255,255,255,.56); border-bottom-color: rgba(255,255,255,.15); }
.cover-stats { display: flex; gap: 0; margin-top: 52px; }
.cover-stats div { min-width: 130px; padding: 0 24px; border-left: 1px solid rgba(255,255,255,.16); }
.cover-stats div:first-child { padding-left: 0; border-left: 0; }
.cover-stats strong,.cover-stats span { display: block; }
.cover-stats strong { color: var(--gold-pale); font-size: 24px; font-family: var(--serif); }
.cover-stats span { margin-top: 3px; color: rgba(255,255,255,.4); font-size: 8px; letter-spacing: .12em; }
.scroll-mark { position: absolute; right: 44px; bottom: 36px; z-index: 2; display: flex; align-items: center; gap: 14px; writing-mode: vertical-rl; color: rgba(255,255,255,.4); font-size: 8px; letter-spacing: .35em; }
.scroll-mark i { width: 1px; height: 60px; background: linear-gradient(var(--gold),transparent); }

/* In-game HUD */
.game-ui { position: fixed; z-index: 10; inset: 0; pointer-events: none; text-shadow: 0 2px 10px rgba(0,0,0,.8); }
.game-ui button { pointer-events: auto; }
.hud-top { height: 82px; padding: 0 28px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border-bottom: 1px solid rgba(255,255,255,.13); background: linear-gradient(rgba(5,10,9,.78),rgba(5,10,9,.06)); backdrop-filter:blur(3px); }
.brand-mini { display: flex; gap: 8px; align-items: center; }
.brand-mini span { color: var(--gold); font-size: 22px; }
.brand-mini b { font-family: var(--serif); letter-spacing: .14em; }
.brand-mini small { color: var(--red-bright); font-size: 8px; }
.chapter-head { min-width: 350px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; text-align: center; }
.chapter-head::before,.chapter-head::after { content:""; height: 1px; background: linear-gradient(90deg,transparent,rgba(255,255,255,.35)); }
.chapter-head::after { transform: scaleX(-1); }
.chapter-head span,.chapter-head small { grid-row: 1; color: var(--gold); font-size: 8px; letter-spacing: .22em; }
.chapter-head span { grid-column: 2; margin-bottom: 34px; }
.chapter-head strong { grid-column: 2; grid-row: 1; white-space: nowrap; font: 700 22px var(--serif); letter-spacing: .13em; }
.chapter-head small { grid-column: 2; margin-top: 37px; color: rgba(255,255,255,.48); }
.top-tools { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.weather-badge { min-width:116px; height:40px; margin-right:8px; padding:6px 10px; display:flex; align-items:center; gap:8px; border:1px solid rgba(255,255,255,.14); background:rgba(6,13,13,.28); backdrop-filter:blur(7px); }
.weather-badge>span { color:var(--gold-pale);font-size:19px;line-height:1 }.weather-badge small,.weather-badge b{display:block;white-space:nowrap}.weather-badge small{color:rgba(255,255,255,.4);font-size:6px;letter-spacing:.16em}.weather-badge b{margin-top:2px;font-size:8px;letter-spacing:.08em}
.score { padding-right: 16px; text-align: right; }
.score small,.score b { display: block; }
.score small { color: rgba(255,255,255,.43); font-size: 7px; letter-spacing: .18em; }
.score b { margin-top: 2px; color: var(--gold-pale); font-size: 18px; letter-spacing: .09em; }
.round-btn { width: 37px; height: 37px; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; color: #fff; background: rgba(10,15,14,.42); font-size: 13px; transition:transform .18s,border-color .18s,background .18s; }
.round-btn:hover { border-color: var(--gold); background: rgba(200,63,50,.8); }
.round-btn:active,.touch-controls button:active { transform:scale(.91); }
.mission-card { position: absolute; top: 112px; left: 28px; width: 280px; padding: 20px 21px; border-left: 2px solid var(--red-bright); border-block:1px solid rgba(255,255,255,.04); background: linear-gradient(110deg,rgba(7,12,11,.84),rgba(7,12,11,.38)); box-shadow:0 14px 35px rgba(0,0,0,.16); backdrop-filter: blur(9px); }
.card-label { color: var(--gold); font-size: 7px; letter-spacing: .2em; }
.mission-card h2 { margin: 9px 0 6px; font: 700 18px var(--serif); letter-spacing: .06em; }
.mission-card p { margin: 0; color: rgba(255,255,255,.52); font-size: 10px; line-height: 1.7; }
.mission-count { display: flex; justify-content: space-between; align-items: end; margin-top: 17px; }
.mission-count span { color: var(--gold-pale); }
.mission-count i,.mission-count em { font-style: normal; }
.mission-count b { font-size: 20px; }
.mission-count small { color: rgba(255,255,255,.4); font-size: 8px; }
.mini-progress { height: 2px; margin-top: 8px; background: rgba(255,255,255,.12); }
.mini-progress i { display: block; width: 0; height: 100%; background: linear-gradient(90deg,var(--red-bright),var(--gold)); transition: width .3s; }
.route-card { position: absolute; right: 28px; top: 114px; width: 145px; text-align: right; }
.route-caption { display: block; margin-top: 7px; color: rgba(255,255,255,.48); font-size: 7px; letter-spacing: .22em; }
.route-card b { color: var(--gold-pale); font-size: 22px; }
.route-card small { color: rgba(255,255,255,.45); font-size: 8px; }
.route-line { position: relative; height: 73px; border-right: 1px solid rgba(255,255,255,.25); }
.route-line::before { content:""; position: absolute; right: -3px; top: var(--route-progress,0%); width: 5px; height: 5px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 12px var(--gold); transition: top .3s; }
.supplies { position: absolute; left: 28px; bottom: 31px; display: flex; gap: 24px; }
.supply-item { min-width: 210px; display: grid; grid-template-columns: 36px 132px 28px; align-items: center; gap: 9px; }
.supply-icon { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; color: var(--gold); background: rgba(6,11,10,.5); }
.supply-icon.ration { color: #8fc698; }
.supply-item small { display: block; margin-bottom: 5px; color: rgba(255,255,255,.6); font-size: 8px; letter-spacing: .12em; }
.supply-item i { display: block; height: 4px; background: rgba(255,255,255,.13); }
.supply-item i b { display: block; height: 100%; width: 100%; background: linear-gradient(90deg,#b7352d,var(--gold)); transition: width .25s; }
.supply-item:nth-child(2) i b { background: linear-gradient(90deg,#5d8063,#9fbd77); }
.supply-item strong { font-size: 12px; }
.boss-hud { position: absolute; top: 94px; left: 50%; width: min(520px,46vw); padding: 13px 18px 14px; transform: translateX(-50%); border: 1px solid rgba(221,72,53,.55); background: linear-gradient(90deg,rgba(38,9,8,.78),rgba(9,14,12,.82),rgba(38,9,8,.78)); box-shadow: 0 10px 35px rgba(0,0,0,.35); backdrop-filter: blur(8px); }
.mini-boss-hud { width:min(500px,44vw); border-color:rgba(231,153,59,.58); background:linear-gradient(90deg,rgba(58,28,9,.88),rgba(9,16,14,.90),rgba(58,28,9,.88)); }
.mini-boss-hud .boss-health>i { background:linear-gradient(90deg,#cf6424,#f0b94f); box-shadow:0 0 17px rgba(231,135,44,.42); }
.mini-boss-hud .boss-heading>span,.mini-boss-hud .boss-heading>em { color:#efbc64; }
.boss-heading { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 10px; }
.boss-heading span,.boss-heading em { color: rgba(255,255,255,.48); font-size: 7px; font-style: normal; letter-spacing: .17em; }
.boss-heading strong { color: #fff1d0; font: 700 19px var(--serif); letter-spacing: .12em; }
.boss-heading em { text-align: right; color: var(--red-bright); }
.boss-health { position: relative; height: 8px; margin-top: 9px; overflow: hidden; background: rgba(255,255,255,.12); }
.boss-health i { display: block; width: 100%; height: 100%; background: linear-gradient(90deg,#8e1917,#e6503e,#f0b55a); box-shadow: 0 0 13px rgba(232,77,58,.6); transition: width .25s; }
.boss-health b { position: absolute; inset: 0 5px auto auto; color: rgba(255,255,255,.75); font-size: 6px; line-height: 8px; letter-spacing: .08em; }
.boss-hud p { margin: 7px 0 0; text-align: center; color: rgba(255,255,255,.48); font-size: 7px; letter-spacing: .12em; }
.boss-hud.is-hit { animation: bossHudHit .24s ease; }
.skill-dock { position: absolute; z-index: 4; right: 28px; bottom: 82px; width: 190px; display: grid; gap: 7px; pointer-events: auto; }
.boss-active .skill-dock { display: grid !important; }
.skill-dock button { min-height: 48px; display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 9px; padding: 6px 10px; border: 1px solid rgba(255,255,255,.16); text-align: left; color: #fff; background: rgba(7,12,11,.72); backdrop-filter: blur(7px); transition: .2s; }
.skill-dock button:hover:not(:disabled) { transform: translateX(-4px); border-color: var(--gold); background: rgba(45,31,18,.82); }
.skill-dock button:disabled { opacity: .46; cursor: not-allowed; }
.skill-dock button kbd { width: 28px; height: 28px; margin: 0; color: var(--gold-pale); border-color: rgba(232,188,106,.38); }
.skill-dock button span,.skill-dock button b,.skill-dock button small { display: block; }
.skill-dock button b { font-size: 9px; letter-spacing: .08em; }
.skill-dock button small { margin-top: 2px; color: rgba(255,255,255,.45); font-size: 7px; }
.skill-dock button.ultimate { border-color: rgba(206,66,50,.45); }
.skill-dock button.is-ready { border-color: var(--gold); box-shadow: 0 0 16px rgba(232,188,106,.18); }
.skill-energy { height: 3px; overflow: hidden; background: rgba(255,255,255,.12); }
.skill-energy i { display: block; width: 30%; height: 100%; background: linear-gradient(90deg,var(--red-bright),var(--gold)); box-shadow: 0 0 10px var(--gold); transition: width .2s; }
.aim-reticle { position:absolute; z-index:3; left:50%; top:50%; width:38px; height:38px; transform:translate(-50%,-50%); opacity:.68; filter:drop-shadow(0 1px 3px rgba(0,0,0,.8)); transition:opacity .2s,filter .2s; }
.aim-reticle::before,.aim-reticle::after { content:""; position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); }
.aim-reticle::before { width:38px; height:1px; background:linear-gradient(90deg,rgba(255,242,202,.88) 0 36%,transparent 36% 64%,rgba(255,242,202,.88) 64% 100%); }
.aim-reticle::after { width:1px; height:38px; background:linear-gradient(rgba(255,242,202,.88) 0 36%,transparent 36% 64%,rgba(255,242,202,.88) 64% 100%); }
.aim-reticle i { position:absolute; left:50%; top:50%; width:3px; height:3px; transform:translate(-50%,-50%); border-radius:50%; background:var(--gold); box-shadow:0 0 7px var(--gold); }
.boss-active .aim-reticle { opacity:.92; filter:drop-shadow(0 0 5px rgba(237,91,69,.75)); }
.aim-reticle.is-firing { animation:reticleFire .16s ease-out; }
.lane-radar { position:absolute; left:50%; bottom:25px; min-width:250px; transform:translateX(-50%); display:grid; grid-template-columns:auto 1fr auto auto; align-items:center; gap:10px; padding:7px 12px; color:rgba(255,255,255,.42); border:1px solid rgba(255,255,255,.10); background:linear-gradient(90deg,transparent,rgba(5,10,9,.46),transparent); font-size:7px; letter-spacing:.14em; }
.lane-radar>div { display:grid; grid-template-columns:repeat(5,1fr); align-items:center; gap:8px; width:104px; }
.lane-radar i { position:relative; width:11px; height:4px; display:block; border-radius:1px; background:rgba(255,255,255,.22); transition:transform .18s,background .18s,box-shadow .18s; }
.lane-radar i::after { content:""; position:absolute; left:50%; top:-7px; width:1px; height:18px; transform:translateX(-50%); background:linear-gradient(transparent,rgba(255,255,255,.12),transparent); }
.lane-radar i.is-active { transform:scale(1.35); background:var(--gold); box-shadow:0 0 12px rgba(232,188,106,.75); animation:lanePulse 1.1s ease-in-out infinite alternate; }
.lane-radar i.is-danger { background:var(--red-bright); box-shadow:0 0 14px rgba(237,91,69,.95); animation:laneDanger .38s ease-in-out infinite alternate; }
.lane-radar i.is-active.is-danger { background:#fff0b8; box-shadow:0 0 16px #ed5b45; }
.lane-radar b { min-width:38px; color:#fff3ce; font:700 9px var(--serif); letter-spacing:.08em; white-space:nowrap; }
.speed { position: absolute; right: 29px; bottom: 28px; display: flex; align-items: end; gap: 5px; }
.speed span { font: 700 29px var(--serif); }
.speed small { margin-bottom: 4px; color: rgba(255,255,255,.45); font-size: 7px; }
.control-hint { position: absolute; left: 50%; bottom: 70px; transform: translateX(-50%); margin: 0; color: rgba(255,255,255,.45); font-size: 8px; letter-spacing: .08em; }
kbd { display: inline-grid; min-width: 22px; height: 20px; place-items: center; margin: 0 2px; border: 1px solid rgba(255,255,255,.28); border-radius: 3px; background: rgba(0,0,0,.3); color: #fff; font: 9px var(--sans); box-shadow: inset 0 -2px rgba(255,255,255,.08); }
.touch-controls { display: none; }

/* Feedback and overlays */
.toast { position: fixed; z-index: 22; left: 50%; top: 112px; min-width: 250px; padding: 12px 20px; display: flex; align-items: center; gap: 12px; transform: translate(-50%,-20px); opacity: 0; pointer-events: none; border: 1px solid rgba(232,188,106,.35); background: rgba(8,15,13,.88); backdrop-filter: blur(9px); transition: .3s; }
.toast.show { opacity: 1; transform: translate(-50%,0); }
.boss-active .toast { top: 190px; }
.toast > span { color: var(--gold); font-size: 22px; }
.toast b,.toast small { display: block; }
.toast b { font-size: 11px; letter-spacing: .08em; }
.toast small { margin-top: 2px; color: rgba(255,255,255,.5); font-size: 8px; }
.damage-flash { position: fixed; z-index: 19; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(circle,transparent 30%,rgba(195,39,31,.65)); }
.damage-flash.flash { animation: damage .45s ease; }
.overlay { position: fixed; z-index: 60; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(4,8,7,.83); backdrop-filter: blur(12px); }
.brief-panel,.event-panel,.pause-panel,.result-panel { border: 1px solid rgba(232,188,106,.25); background: linear-gradient(145deg,#19221e,#0c1311); box-shadow: 0 35px 100px rgba(0,0,0,.55); }
.selection-overlay { background: radial-gradient(circle at 50% 30%,rgba(75,61,36,.18),transparent 38%),rgba(4,8,7,.94); }
.selection-panel { position: relative; width: min(1060px,96vw); max-height: calc(100vh - 32px); padding: 38px 44px 32px; overflow-y: auto; border: 1px solid rgba(232,188,106,.28); background: linear-gradient(145deg,#19211d,#0b1210 68%); box-shadow: 0 38px 110px rgba(0,0,0,.65); }
.selection-heading { display: flex; justify-content: space-between; align-items: end; padding-bottom: 22px; border-bottom: 1px solid rgba(255,255,255,.11); }
.selection-heading h2 { margin: 0; font: 700 clamp(32px,4vw,52px) var(--serif); letter-spacing: .08em; }
.selection-heading > p { max-width: 300px; margin: 0 48px 3px 0; color: rgba(255,255,255,.43); font-size: 9px; line-height: 1.8; letter-spacing: .08em; }
.selection-section { margin-top: 24px; }
.selection-label { display: flex; align-items: center; gap: 11px; margin-bottom: 13px; }
.selection-label > span { width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid rgba(232,188,106,.35); color: var(--gold); font-size: 8px; transform: rotate(45deg); }
.selection-label > span::first-letter { display: inline-block; transform: rotate(-45deg); }
.selection-label b,.selection-label small { display: block; }
.selection-label b { font-size: 11px; letter-spacing: .1em; }
.selection-label small { margin-top: 1px; color: rgba(255,255,255,.32); font-size: 6px; letter-spacing: .2em; }
.role-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.choice-card { position: relative; min-height: 172px; padding: 19px 20px; overflow: hidden; border: 1px solid rgba(255,255,255,.11); text-align: left; color: #fff; background: rgba(255,255,255,.025); transition: .22s; }
.choice-card::after { content:""; position:absolute; inset:auto -35px -55px auto; width:120px; height:120px; border:1px solid rgba(232,188,106,.09); border-radius:50%; }
.choice-card:hover { transform: translateY(-3px); border-color: rgba(232,188,106,.55); background: rgba(232,188,106,.05); }
.choice-card.is-selected { border-color: var(--gold); background: linear-gradient(135deg,rgba(174,62,42,.17),rgba(232,188,106,.06)); box-shadow: inset 0 0 0 1px rgba(232,188,106,.12),0 10px 28px rgba(0,0,0,.18); }
.choice-card.is-selected::before { content:"✓"; position:absolute; top:10px; right:11px; color:var(--gold); font-size:11px; }
.role-figure { float: left; width: 44px; height: 44px; margin-right: 13px; display: grid; place-items: center; border: 1px solid rgba(232,188,106,.24); border-radius: 50%; color: var(--gold); background: rgba(0,0,0,.18); font-size: 21px; }
.choice-card i,.choice-card b { display: block; font-style: normal; }
.choice-card i { color: var(--gold); font-size: 7px; letter-spacing: .14em; }
.choice-card b { margin-top: 4px; font: 700 17px var(--serif); letter-spacing: .08em; }
.choice-card p { clear: both; margin: 16px 0 10px; color: rgba(255,255,255,.43); font-size: 9px; line-height: 1.7; }
.choice-card em { color: #d8c28f; font-size: 8px; font-style: normal; }
.selection-lower { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.mode-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.select-row { min-height: 60px; display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 9px; padding: 8px 10px; border: 1px solid rgba(255,255,255,.1); text-align: left; color: #fff; background: rgba(255,255,255,.025); }
.select-row > span { color: var(--gold); font-size: 18px; }
.select-row b,.select-row small { display: block; }
.select-row b { font-size: 10px; }.select-row small{margin-top:2px;color:rgba(255,255,255,.38);font-size:7px}
.select-row > i { padding: 3px 5px; color: rgba(255,255,255,.35); border: 1px solid rgba(255,255,255,.1); font-size: 6px; font-style: normal; }
.select-row.is-selected { border-color: var(--gold); background: rgba(232,188,106,.07); }
.select-row.is-selected > i { color:var(--gold);border-color:rgba(232,188,106,.35) }
.difficulty-options { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.difficulty-options button { min-height: 60px; padding: 9px; border: 1px solid rgba(255,255,255,.1); color: #fff; background: rgba(255,255,255,.025); }
.difficulty-options b,.difficulty-options small { display:block; }.difficulty-options b{font-size:10px}.difficulty-options small{margin-top:5px;color:rgba(255,255,255,.38);font-size:7px}
.difficulty-options button.is-selected { border-color:var(--red-bright);background:rgba(185,50,40,.12); }
.selection-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 25px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.11); }
.selection-footer p { margin:0; }.selection-footer p span,.selection-footer p b{display:block}.selection-footer p span{color:rgba(255,255,255,.35);font-size:7px;letter-spacing:.17em}.selection-footer p b{margin-top:4px;color:var(--gold-pale);font-size:11px;letter-spacing:.07em}
.selection-footer .cta { min-width: 220px; min-height: 52px; }
.brief-panel { position: relative; width: min(850px,96vw); padding: 47px 52px 50px; }
.close-x { position: absolute; right: 18px; top: 16px; width: 37px; height: 37px; border: 1px solid rgba(255,255,255,.14); border-radius: 50%; color: rgba(255,255,255,.6); background: none; font-size: 20px; }
.panel-kicker { margin: 0 0 8px; color: var(--gold); font-size: 8px; font-weight: 800; letter-spacing: .3em; }
.brief-panel h2,.event-content h2,.pause-panel h2,.result-panel h2 { margin: 0; font: 700 clamp(32px,4vw,54px) var(--serif); letter-spacing: .08em; }
.how-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 33px 0; background: rgba(255,255,255,.1); }
.how-grid > div { min-height: 145px; padding: 24px; background: #111916; }
.how-grid b { display: block; margin: 15px 0 7px; font-size: 13px; }
.how-grid p { margin: 0; color: rgba(255,255,255,.45); font-size: 10px; line-height: 1.7; }
.how-symbol { width: 43px; height: 43px; display: grid; place-items: center; border: 1px solid rgba(232,188,106,.4); border-radius: 50%; color: var(--gold); font: 22px var(--serif); }
.event-panel { width: min(980px,96vw); display: grid; grid-template-columns: 36% 64%; overflow: hidden; }
.event-map { position: relative; min-height: 590px; display: grid; place-content: center; overflow: hidden; background: linear-gradient(rgba(94,37,28,.35),rgba(7,17,14,.9)), url('../assets/images/long-march-hero.png') center/cover; }
.event-map::after { content:""; position: absolute; inset: 8%; border: 1px solid rgba(232,188,106,.2); }
.event-map span { z-index: 1; color: var(--red-bright); font-size: 70px; filter: drop-shadow(0 0 22px rgba(225,76,55,.55)); }
.event-map i { z-index: 1; width: 1px; height: 80px; margin: 10px auto; background: linear-gradient(var(--gold),transparent); }
.event-map b { z-index: 1; text-align: center; color: var(--gold-pale); font: 18px var(--serif); letter-spacing: .2em; }
.event-content { padding: 48px 50px; }
.event-content > p:not(.panel-kicker) { color: rgba(255,255,255,.53); font-size: 11px; line-height: 1.85; }
.question-box { margin: 28px 0 22px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.12); }
.question-box > small { color: var(--red-bright); font-size: 8px; letter-spacing: .22em; }
.question-box h3 { margin: 10px 0 18px; font-size: 17px; line-height: 1.65; }
.answer-list { display: grid; gap: 8px; }
.answer-list button { min-height: 47px; padding: 10px 14px; border: 1px solid rgba(255,255,255,.13); text-align: left; color: rgba(255,255,255,.8); background: rgba(255,255,255,.035); font-size: 11px; transition: .2s; }
.answer-list button span { display: inline-grid; width: 25px; height: 25px; margin-right: 10px; place-items: center; border-radius: 50%; color: var(--gold); background: rgba(232,188,106,.1); }
.answer-list button:hover:not(:disabled) { transform: translateX(4px); border-color: var(--gold); }
.answer-list button.correct { border-color: #6b9b6c; color: #d5f1c9; background: rgba(83,132,81,.18); }
.answer-list button.wrong { border-color: var(--red); background: rgba(183,53,43,.17); }
.answer-note { margin: 12px 0 0 !important; padding: 11px 13px; border-left: 2px solid var(--gold); background: rgba(232,188,106,.07); color: rgba(255,255,255,.66) !important; }
.pause-panel,.result-panel { width: min(520px,94vw); padding: 47px 50px; text-align: center; }
.pause-star,.victory-star { display: block; margin-bottom: 12px; color: var(--gold); font-size: 46px; }
.pause-panel > p:not(.panel-kicker) { margin: 12px 0 30px; color: rgba(255,255,255,.5); font-size: 11px; }
.result-panel { position: relative; overflow: hidden; width: min(620px,94vw); }
.result-panel > * { position: relative; z-index: 1; }
.victory-rays { position: absolute; z-index: 0; inset: -100%; opacity: .09; background: repeating-conic-gradient(from 0deg,var(--gold) 0 7deg,transparent 7deg 15deg); animation: rotate 35s linear infinite; }
.victory-star { font-size: 58px; filter: drop-shadow(0 0 22px rgba(232,188,106,.45)); }
.result-quote { color: rgba(255,255,255,.56); font-family: var(--serif); }
.result-stats { display: grid; grid-template-columns: repeat(3,1fr); margin: 30px 0 22px; border-block: 1px solid rgba(255,255,255,.12); }
.result-stats div { padding: 18px 8px; border-left: 1px solid rgba(255,255,255,.12); }
.result-stats div:first-child { border: 0; }
.result-stats small,.result-stats strong { display: block; }
.result-stats small { color: rgba(255,255,255,.4); font-size: 8px; }
.result-stats strong { margin-top: 6px; color: var(--gold-pale); font-size: 23px; }
.result-rank { margin-bottom: 25px; color: rgba(255,255,255,.56); font-size: 11px; }
.result-rank b { color: var(--gold); font-family: var(--serif); font-size: 17px; }
.fatal { padding: 40px; }

@keyframes coverDrift { from { transform: scale(1.1); filter: saturate(.75); } to { transform: scale(1.03); filter: saturate(1); } }
@keyframes damage { 0%,100%{opacity:0} 30%{opacity:1} }
@keyframes bossHudHit { 0%,100%{transform:translateX(-50%)} 35%{transform:translateX(calc(-50% - 5px));filter:brightness(1.6)} 70%{transform:translateX(calc(-50% + 4px))} }
@keyframes rotate { to { transform: rotate(360deg); } }
@keyframes skyDrift { from{background-position:47% 100%} to{background-position:53% 97%} }
@keyframes fogBank { from{transform:translate3d(-5%,1%,0) scale(1)} to{transform:translate3d(6%,-2%,0) scale(1.08)} }
@keyframes screenRain { from{transform:translate3d(-2%,-13%,0)} to{transform:translate3d(3%,13%,0)} }
@keyframes screenSnow { from{transform:translate3d(-2%,-10%,0)} to{transform:translate3d(5%,11%,0)} }
@keyframes dustRise { from{transform:translate3d(0,10%,0)} to{transform:translate3d(3%,-10%,0)} }
@keyframes lightning { 0%,84%,87%,89%,100%{opacity:0} 85%{opacity:.19} 86%{opacity:.035} 88%{opacity:.11} }
@keyframes lanePulse { to{transform:scale(1.5);filter:brightness(1.2)} }
@keyframes laneDanger { from{transform:scaleX(.9);opacity:.62} to{transform:scaleX(1.35);opacity:1} }
@keyframes reticleFire { 0%{transform:translate(-50%,-50%) scale(1)} 45%{transform:translate(-50%,-50%) scale(1.55);filter:brightness(1.8)} 100%{transform:translate(-50%,-50%) scale(1)} }

@media (max-width: 820px) {
  .selection-panel { width: min(96vw,620px); padding: 30px 20px 24px; }
  .selection-heading > p { display: none; }
  .selection-heading { padding-bottom: 16px; }
  .role-grid { grid-template-columns: repeat(6,220px); overflow-x: auto; padding-bottom: 7px; scroll-snap-type: x mandatory; }
  .choice-card { min-height: 158px; scroll-snap-align: start; }
  .selection-lower { grid-template-columns: 1fr; gap: 0; }
  .selection-footer { position: sticky; bottom: -24px; margin-inline: -20px; padding: 15px 20px 0; background: linear-gradient(transparent,#0b1210 16%); }
  .cover-nav { height: 74px; }
  .cover-art { background-position: 60% center; }
  .engine-label,.scroll-mark { display: none; }
  .cover-copy { height: calc(100% - 74px); padding: 90px 25px 35px; justify-content: flex-end; }
  .cover h1 strong { font-size: clamp(58px,19vw,92px); }
  .cover h1 small { font-size: clamp(28px,9vw,44px); }
  .cover-lead br { display: none; }
  .cover-stats { width: 100%; margin-top: 32px; }
  .cover-stats div { flex: 1; min-width: 0; padding: 0 12px; }
  .cover-actions { gap: 16px; }
  .cta { min-width: 200px; }
  .hud-top { height: 66px; grid-template-columns: 1fr auto; padding: 0 14px; }
  .brand-mini small,.chapter-head span,.chapter-head small,.score small { display: none; }
  .chapter-head { position: absolute; top: 75px; left: 50%; min-width: 250px; transform: translateX(-50%); }
  .chapter-head strong { font-size: 18px; }
  .top-tools .score { display: none; }
  .weather-badge { display:none; }
  .mission-card { top: 111px; left: 12px; width: 210px; padding: 13px 14px; }
  .mission-card h2 { font-size: 14px; }
  .mission-card p { display: none; }
  .mission-count { margin-top: 8px; }
  .route-card { top: 113px; right: 12px; width: 80px; }
  .boss-hud { top: 73px; width: min(350px,calc(100vw - 24px)); padding: 10px 12px 11px; }
  .boss-heading strong { font-size: 16px; }
  .boss-heading span,.boss-heading em { font-size: 6px; }
  .game-ui:has(.boss-hud:not(.is-hidden)) .mission-card,
  .game-ui:has(.boss-hud:not(.is-hidden)) .chapter-head,
  .game-ui:has(.boss-hud:not(.is-hidden)) .route-card { display: none; }
  .boss-active .toast { top: 158px; }
  .skill-dock { right: 9px; bottom: 100px; width: 68px; gap: 5px; }
  .skill-dock button { min-height: 48px; grid-template-columns: 22px 1fr; gap: 4px; padding: 4px 5px; }
  .skill-dock button kbd { width: 22px; min-width: 22px; height: 24px; }
  .skill-dock button b { font-size: 7px; letter-spacing: 0; }
  .skill-dock button small { font-size: 6px; white-space: nowrap; }
  .route-line { height: 45px; }
  .route-card b { font-size: 17px; }
  .supplies { left: 12px; right: 12px; bottom: 92px; gap: 12px; }
  .supply-item { min-width: 0; flex: 1; grid-template-columns: 30px minmax(65px,95px) 25px; gap: 6px; }
  .supply-icon { width: 30px; height: 30px; }
  .speed,.control-hint { display: none; }
  .lane-radar { bottom:136px; min-width:154px; grid-template-columns:1fr auto; gap:7px; padding:5px 8px; border:0; background:rgba(5,10,9,.30); }
  .lane-radar>span { display:none; }
  .lane-radar>div { width:93px; gap:7px; }
  .lane-radar b { min-width:35px; font-size:8px; }
  .aim-reticle { width:32px;height:32px;opacity:.62; }
  .aim-reticle::before { width:32px; }.aim-reticle::after { height:32px; }
  .touch-controls { position: absolute; left: 0; right: 0; bottom: 18px; display: flex; justify-content: center; gap: 12px; }
  .touch-controls button { width: 56px; height: 56px; border: 1px solid rgba(255,255,255,.28); border-radius: 50%; color: #fff; background: rgba(5,10,9,.48); backdrop-filter: blur(6px); font-size: 21px; }
  .touch-controls .jump { width: 66px; height: 66px; margin-top: -10px; border-color: rgba(232,188,106,.45); color: var(--gold-pale); font: 700 15px var(--serif); }
  .touch-controls .attack { width: 66px; height: 66px; margin-top: -10px; border-color: rgba(233,75,56,.65); color: #ffd0b0; background: rgba(116,27,21,.58); font: 700 15px var(--serif); box-shadow: 0 0 20px rgba(213,55,42,.18); }
  .brief-panel { padding: 35px 22px 24px; }
  .how-grid { grid-template-columns: 1fr 1fr; margin: 22px 0; }
  .how-grid > div { min-height: 120px; padding: 15px; }
  .event-panel { display: block; max-height: calc(100vh - 30px); overflow-y: auto; }
  .event-map { min-height: 125px; display: flex; align-items: center; justify-content: center; gap: 18px; }
  .event-map i { width: 60px; height: 1px; margin: 0; }
  .event-map span { font-size: 38px; }
  .event-content { padding: 28px 22px; }
  .event-content h2 { font-size: 34px; }
  .pause-panel,.result-panel { padding: 36px 24px; }
}

@media (max-width: 600px) {
  .selection-overlay { padding: 8px; justify-items: start; }
  .selection-panel { width: min(calc(100vw - 16px),360px); padding: 26px 14px 18px; }
  .mode-options { grid-template-columns: 1fr; }
  .selection-footer { bottom: -18px; margin-inline: -14px; padding: 13px 14px 0; flex-direction: column; align-items: stretch; gap: 10px; }
  .selection-footer .cta { width: 100%; }
}

@media (max-width: 480px) {
  .selection-overlay { padding: 8px; }
  .selection-panel { width: 100%; max-height: calc(100vh - 16px); padding: 26px 14px 18px; }
  .selection-heading h2 { font-size: 31px; }
  .selection-section { margin-top: 19px; }
  .role-grid { grid-template-columns: repeat(6,205px); }
  .mode-options { grid-template-columns: 1fr; }
  .difficulty-options { gap: 5px; }
  .selection-footer { bottom: -18px; margin-inline: -14px; padding: 13px 14px 0; flex-direction: column; align-items: stretch; gap: 10px; }
  .selection-footer .cta { width: 100%; }
  .wordmark small { display: none; }
  .cover-copy { padding-bottom: 24px; }
  .eyebrow { margin-bottom: 15px; }
  .eyebrow i,.eyebrow b { display: none; }
  .cover-lead { margin: 24px 0 22px; line-height: 1.8; }
  .cover-actions { align-items: stretch; flex-direction: column; gap: 6px; }
  .cta { width: 100%; }
  .cover-actions .text-btn { align-self: center; }
  .cover-stats { margin-top: 22px; }
  .cover-stats strong { font-size: 19px; }
  .mission-card { width: 190px; }
  .route-card { display: none; }
  .supply-item { grid-template-columns: 27px minmax(55px,1fr) 22px; }
  .supply-item small { font-size: 7px; }
  .how-grid { grid-template-columns: 1fr; max-height: 48vh; overflow-y: auto; }
  .how-grid > div { min-height: 100px; }
  .result-stats strong { font-size: 18px; }
  .touch-controls button { width: 50px; height: 50px; }
  .touch-controls .jump,.touch-controls .attack { width: 58px; height: 58px; }
}

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