/* X-NOVA · Stellar Assault — HUD and menus. Violet / cyan / gold on deep space. */
:root {
  --vio: #a877ff; --vio2: #7b4dff; --cyan: #5ce1ff; --gold: #ffc94d; --orange: #ff8a2a; --red: #ff3d5e;
  --ink: #f2eeff; --dim: rgba(220, 210, 255, 0.62); --panel: rgba(10, 6, 26, 0.8); --line: rgba(168, 119, 255, 0.45);
  --mono: "Consolas", "DejaVu Sans Mono", "Menlo", monospace;
  --ui: "Segoe UI", "Noto Sans Thai", "Leelawadee UI", "Tahoma", system-ui, sans-serif;
  --sl: max(14px, env(safe-area-inset-left)); --sr: max(14px, env(safe-area-inset-right));
  --st: max(10px, env(safe-area-inset-top)); --sb: max(10px, env(safe-area-inset-bottom));
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #05030c; color: var(--ink); font-family: var(--ui); overflow: hidden; user-select: none; -webkit-user-select: none; touch-action: none; -webkit-tap-highlight-color: transparent; }
#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.off { display: none !important; }
button { font-family: var(--ui); }

/* ------------------------------------------------------------------ HUD */
.hud { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
.hud-top { position: absolute; left: var(--sl); right: var(--sr); top: var(--st); display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.tag { display: inline-block; font: 700 11px/1 var(--mono); letter-spacing: .18em; color: #1a0b33; background: linear-gradient(90deg, var(--vio), var(--cyan)); padding: 3px 6px 2px; margin-right: 8px; clip-path: polygon(0 0, 100% 0, calc(100% - 5px) 100%, 0 100%); vertical-align: middle; }
.num { font: 700 clamp(17px, 2.3vw, 28px)/1 var(--mono); letter-spacing: .12em; color: #fff; text-shadow: 0 0 10px rgba(168, 119, 255, .9), 0 0 2px #000; vertical-align: middle; }
.hud-mid { text-align: center; }
.hud-mid .num { color: var(--gold); text-shadow: 0 0 10px rgba(255, 190, 60, .7), 0 0 2px #000; font-size: clamp(14px, 1.8vw, 22px); }
.chain { margin-top: 6px; font: 700 clamp(12px, 1.4vw, 16px)/1 var(--mono); letter-spacing: .14em; color: var(--dim); min-height: 18px; }
.chain b { color: #fff; font-size: 1.25em; }
.chain i { font-style: normal; color: var(--gold); font-size: 1.3em; text-shadow: 0 0 10px rgba(255, 190, 60, .8); }
.chain.pop { animation: pop .35s ease-out; }
@keyframes pop { 0% { transform: scale(1.35); } 100% { transform: scale(1); } }
.hud-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.lives { display: flex; gap: 5px; min-height: 16px; }
.lives i { width: 22px; height: 12px; background: linear-gradient(90deg, #5a3fb0, var(--vio) 60%, #fff); clip-path: polygon(0 20%, 55% 20%, 100% 50%, 55% 80%, 0 80%, 12% 50%); filter: drop-shadow(0 0 4px var(--vio)); }
.burst { display: flex; align-items: center; gap: 6px; }
.burst .tag { background: linear-gradient(90deg, #c46cff, #6ad8ff); }
.burst .bar { width: clamp(90px, 13vw, 170px); height: 10px; background: rgba(20, 10, 40, .7); border: 1px solid var(--line); transform: skewX(-20deg); overflow: hidden; }
.burst .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #7b4dff, #c46cff, #6ad8ff, #fff4c0); box-shadow: 0 0 10px #c46cff; }
.burst .key { font: 700 11px/1 var(--mono); color: var(--dim); border: 1px solid var(--line); padding: 2px 5px; }
body.touch .burst .key { display: none; }
.burst.ready .bar { border-color: #fff; animation: ready 0.6s ease-in-out infinite alternate; }
.burst.ready .key { color: #fff; border-color: #fff; background: #7b4dff; }
@keyframes ready { from { box-shadow: 0 0 4px #c46cff; } to { box-shadow: 0 0 18px #fff, 0 0 30px #c46cff; } }

.boss { position: absolute; top: calc(var(--st) + 44px); left: 50%; transform: translateX(-50%); width: min(560px, 58vw); }
.boss-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.boss-head b { font: 800 clamp(13px, 1.6vw, 18px)/1 var(--mono); letter-spacing: .3em; color: #ff8aa0; text-shadow: 0 0 10px rgba(255, 60, 100, .8); }
.boss-head span { font-size: 12px; color: var(--dim); }
.boss .bar { height: 8px; background: rgba(40, 5, 15, .75); border: 1px solid rgba(255, 90, 120, .6); transform: skewX(-20deg); overflow: hidden; }
.boss .bar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #ff3d5e, #ff8a2a, #ffd060); box-shadow: 0 0 12px #ff3d5e; transition: width .15s linear; }

/* power meter (Gradius) */
.meter { position: absolute; bottom: var(--sb); left: 50%; transform: translateX(-50%); display: flex; gap: clamp(3px, .6vw, 7px); }
.slot { position: relative; width: clamp(52px, 8.4vw, 104px); height: clamp(20px, 3vw, 30px); transform: skewX(-18deg); border: 2px solid rgba(255, 150, 60, .55); background: rgba(40, 14, 0, .45); display: flex; align-items: center; justify-content: center; box-shadow: inset 0 0 8px rgba(255, 120, 40, .2); }
.slot span { transform: skewX(18deg); font: 800 clamp(9px, 1.15vw, 14px)/1 var(--mono); letter-spacing: .06em; color: #ffc98a; text-shadow: 0 0 2px #000; white-space: nowrap; }
body.touch .meter { left: calc(50% - 64px); }
.slot.max { border-style: dashed; border-color: rgba(255, 150, 60, .25); }
.slot.max span { opacity: .3; }
.slot.sel { background: linear-gradient(180deg, #ffe07a, #ff8a1a); border-color: #fff4d0; box-shadow: 0 0 16px rgba(255, 170, 60, .9), inset 0 0 6px #fff; animation: selp .45s ease-in-out infinite alternate; }
.slot.sel span { color: #2a0d00; text-shadow: none; }
.slot.sel.max { background: linear-gradient(180deg, #7a6a5a, #4a3a2a); box-shadow: none; animation: none; }
.slot.fire { animation: fire .5s ease-out; }
@keyframes selp { from { filter: brightness(1); } to { filter: brightness(1.35); } }
@keyframes fire { 0% { background: #fff; box-shadow: 0 0 30px #fff; } 100% { } }

/* Nova's radio */
.comm { position: absolute; left: var(--sl); bottom: calc(var(--sb) + clamp(28px, 4.2vw, 42px)); display: flex; align-items: center; gap: 10px; max-width: min(460px, 46vw); padding: 8px 14px 8px 8px; background: linear-gradient(90deg, rgba(20, 10, 48, .9), rgba(10, 6, 26, .72)); border: 1px solid var(--line); border-left: 3px solid var(--cyan); clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%); animation: commin .25s ease-out; }
@keyframes commin { from { transform: translateX(-30px); opacity: 0; } to { transform: none; opacity: 1; } }
.comm .face { position: relative; width: clamp(46px, 6vw, 68px); height: clamp(46px, 6vw, 68px); flex: none; border: 1px solid var(--cyan); overflow: hidden; background: #140a2e; }
.comm .face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.comm .face::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .18) 0 1px, transparent 1px 3px), linear-gradient(180deg, rgba(92, 225, 255, .12), transparent 60%); animation: scan 3s linear infinite; }
@keyframes scan { from { background-position: 0 0, 0 0; } to { background-position: 0 30px, 0 0; } }
.comm-body b { display: block; font: 800 11px/1 var(--mono); letter-spacing: .3em; color: var(--cyan); margin-bottom: 5px; }
.comm-body p { margin: 0; font-size: clamp(12px, 1.35vw, 16px); line-height: 1.45; color: #fff; text-shadow: 0 1px 2px #000; min-height: 1.45em; }
.comm.alert { border-left-color: var(--red); }
.comm.alert .face { border-color: var(--red); }
.comm.alert .comm-body b { color: #ff8aa0; }
.comm.happy { border-left-color: var(--gold); }
.comm.happy .face { border-color: var(--gold); }
.comm.happy .comm-body b { color: var(--gold); }

/* centre banners */
.banner { position: absolute; left: 0; right: 0; top: 34%; text-align: center; animation: bannerin .5s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes bannerin { from { transform: scale(1.6); opacity: 0; letter-spacing: .6em; } to { transform: none; opacity: 1; } }
.banner small { display: block; font: 700 clamp(12px, 1.4vw, 16px)/1 var(--mono); letter-spacing: .5em; color: var(--cyan); margin-bottom: 8px; }
.banner b { display: block; font: 900 italic clamp(34px, 6.5vw, 84px)/1 var(--ui); letter-spacing: .08em; background: linear-gradient(180deg, #fff, #d6c4ff 45%, #8f6bff); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 16px rgba(168, 119, 255, .8)); }
.banner em { display: block; font-style: normal; margin-top: 8px; font-size: clamp(13px, 1.6vw, 20px); color: var(--dim); letter-spacing: .08em; }
.banner.warning b { background: linear-gradient(180deg, #fff, #ff9aaa 50%, #ff2a4a); -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 0 18px rgba(255, 40, 70, .9)); animation: blink .5s steps(2) infinite; }
.banner.warning em { color: #ffb0bc; }
.banner .stripe { height: 16px; margin: 10px auto; width: min(760px, 80vw); background: repeating-linear-gradient(-45deg, #ff2a4a 0 14px, rgba(20, 0, 5, .8) 14px 28px); animation: stripes .6s linear infinite; opacity: .85; }
@keyframes stripes { from { background-position: 0 0; } to { background-position: 40px 0; } }
@keyframes blink { 50% { opacity: .35; } }
.banner.clear b { background: linear-gradient(180deg, #fff, #ffe7a0 50%, #ffb030); -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 0 18px rgba(255, 190, 60, .9)); }

/* ------------------------------------------------------------------ touch */
.touch-ui { display: none; }
body.touch.playing .touch-ui { display: block; }

.tbtn { position: fixed; z-index: 6; border: 2px solid rgba(255, 255, 255, .35); color: #fff; font: 800 13px/1 var(--mono); letter-spacing: .08em; background: rgba(40, 20, 90, .38); border-radius: 50%; backdrop-filter: blur(2px); }
.tbtn.on { background: rgba(168, 119, 255, .7); border-color: #fff; }
.tpower { right: calc(var(--sr) + 18px); bottom: calc(var(--sb) + 48px); width: 84px; height: 84px; border-color: rgba(255, 170, 70, .7); background: rgba(90, 40, 0, .38); }
.tburst { right: calc(var(--sr) + 112px); bottom: calc(var(--sb) + 24px); width: 66px; height: 66px; font-size: 11px; border-color: rgba(200, 140, 255, .7); }
.tpause { right: calc(var(--sr) + 4px); top: calc(var(--st) + 56px); width: 40px; height: 40px; border-radius: 8px; font-size: 14px; }

/* ------------------------------------------------------------------ screens */
.screen { position: fixed; inset: 0; z-index: 10; display: flex; align-items: center; justify-content: center; }
.panel { background: rgba(4, 2, 12, .55); backdrop-filter: blur(5px); }
.panel-box { width: min(560px, 92vw); max-height: 92vh; overflow-y: auto; padding: 26px 30px; background: var(--panel); border: 1px solid var(--line); clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px)); box-shadow: inset 0 0 40px rgba(123, 77, 255, .15); display: flex; flex-direction: column; gap: 10px; }
.panel-box.wide { width: min(820px, 94vw); }
.panel-box.small { width: min(360px, 90vw); align-items: stretch; }
.panel-box h3 { margin: 0 0 6px; font: 900 italic 28px/1 var(--ui); letter-spacing: .12em; color: #fff; text-shadow: 0 0 14px rgba(168, 119, 255, .8); }
.panel-box h4 { margin: 10px 0 2px; color: var(--gold); font-size: 16px; letter-spacing: .06em; }
.panel-box p { margin: 2px 0; color: var(--dim); line-height: 1.6; }
.panel-box::-webkit-scrollbar { width: 6px; } .panel-box::-webkit-scrollbar-thumb { background: var(--line); }
.btn { position: relative; min-width: 220px; padding: 12px 26px; font-size: 17px; font-weight: 700; letter-spacing: .06em; color: #fff; text-align: left; cursor: pointer; border: 1px solid rgba(168, 119, 255, .5); background: linear-gradient(90deg, rgba(123, 77, 255, .28), rgba(92, 225, 255, .08)); clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px)); transition: transform .12s, background .12s, box-shadow .12s; outline: none; }
.btn::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--cyan); opacity: 0; transition: opacity .12s; }
.btn:hover, .btn:focus-visible, .btn:focus { transform: translateX(6px); background: linear-gradient(90deg, rgba(123, 77, 255, .6), rgba(92, 225, 255, .2)); box-shadow: 0 0 24px rgba(123, 77, 255, .5); }
.btn:hover::before, .btn:focus::before { opacity: 1; }
.btn.primary { border-color: rgba(255, 201, 77, .7); background: linear-gradient(90deg, rgba(255, 170, 60, .35), rgba(255, 90, 160, .12)); }
.btn.primary:hover, .btn.primary:focus { background: linear-gradient(90deg, rgba(255, 170, 60, .7), rgba(255, 90, 160, .25)); box-shadow: 0 0 26px rgba(255, 170, 60, .5); }
kbd { display: inline-block; font: 700 12px/1 var(--mono); padding: 4px 7px; border: 1px solid var(--line); background: rgba(123, 77, 255, .18); color: #fff; margin: 0 2px; }
.howto-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 16px; }
.howto-grid div { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.howto-grid span { color: var(--dim); margin-left: 4px; }
.pw { margin: 4px 0; padding-left: 0; list-style: none; display: grid; gap: 5px; }
.pw li { color: var(--dim); line-height: 1.5; }
.pw b { display: inline-block; min-width: 118px; margin-right: 8px; color: var(--gold); font-family: var(--mono); letter-spacing: .04em; }
.cap { color: var(--orange); }
.touch-only { display: none !important; }
body.touch .touch-only { display: flex !important; }
body.touch p.touch-only { display: block !important; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 6px 0; border-bottom: 1px solid rgba(168, 119, 255, .15); color: var(--ink); }
.row input[type=range] { width: 46%; accent-color: var(--vio); }
.row input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--vio); }
.row select { background: #140a2e; color: #fff; border: 1px solid var(--line); padding: 5px 8px; font-family: var(--ui); }

/* title */
.title { background: radial-gradient(ellipse at 22% 50%, rgba(8, 4, 20, .72), rgba(8, 4, 20, .15) 55%, transparent 75%); }
.title-art { position: absolute; right: -2vw; bottom: -3vh; pointer-events: none; animation: float 6s ease-in-out infinite; filter: drop-shadow(0 0 30px rgba(123, 77, 255, .45)); }
.title-art img { display: block; width: min(60vw, 80vh * 1.563); height: auto; }
@keyframes float { 50% { transform: translateY(-14px); } }
.title-box { position: absolute; left: max(6vw, var(--sl)); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 10px; }
.logo { font: 900 italic clamp(64px, 11vw, 150px)/.9 var(--ui); letter-spacing: .02em; white-space: nowrap; filter: drop-shadow(0 0 24px rgba(123, 77, 255, .8)); }
.logo .lx, .load-logo .lx { background: linear-gradient(180deg, #fff 10%, #ffd36a 55%, #ff8a2a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo .ld { color: #b89aff; margin: 0 .04em; }
.logo .ln, .load-logo .ln { background: linear-gradient(180deg, #fff 5%, #cbb6ff 40%, #7b4dff 75%, #3fd8ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sub { font: 700 clamp(13px, 1.7vw, 22px)/1 var(--mono); letter-spacing: .62em; color: var(--gold); text-shadow: 0 0 12px rgba(255, 190, 60, .6); margin: 4px 0 18px 6px; }
.menu { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.title-hi { margin-top: 14px; font: 700 14px/1 var(--mono); letter-spacing: .24em; color: var(--dim); }
.title-hi span { color: var(--gold); }
.mute-note { display: none; font-size: 13px; color: var(--dim); }
body.muted .mute-note { display: block; }
.press { position: absolute; bottom: calc(var(--sb) + 18px); left: 50%; transform: translateX(-50%); font: 700 14px/1 var(--mono); letter-spacing: .5em; color: #fff; animation: blink 1.2s steps(2) infinite; text-shadow: 0 0 10px var(--vio); }
body.touch .press { display: none; }
.credit { position: absolute; right: var(--sr); bottom: var(--sb); font: 11px/1 var(--mono); letter-spacing: .3em; color: rgba(220, 210, 255, .4); }

/* continue / game over */
.over { background: rgba(10, 0, 4, .6); backdrop-filter: blur(3px); }
.over-box { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.over-box h2 { margin: 0; font: 900 italic clamp(40px, 7vw, 88px)/1 var(--ui); color: #ff8aa0; text-shadow: 0 0 24px rgba(255, 40, 70, .8); letter-spacing: .06em; }
.over-box .count { font: 900 clamp(70px, 12vw, 150px)/1 var(--mono); color: #fff; text-shadow: 0 0 30px rgba(255, 60, 100, .9); min-height: 1em; }
.over-box p { color: var(--dim); margin: 0 0 10px; }
.over-box nav { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* results */
.results { background: radial-gradient(ellipse at 65% 50%, rgba(10, 6, 26, .85), rgba(10, 6, 26, .5)); }
.res-art { position: absolute; left: 2vw; bottom: 0; height: 92vh; pointer-events: none; filter: drop-shadow(0 0 30px rgba(255, 190, 60, .35)); animation: float 5s ease-in-out infinite; }
.res-art img { height: 100%; width: auto; }
.res-box { position: absolute; right: max(6vw, var(--sr)); top: 50%; transform: translateY(-50%); width: min(520px, 54vw); padding: 24px 28px; background: var(--panel); border: 1px solid rgba(255, 201, 77, .45); clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px)); }
.res-box small { font: 700 12px/1 var(--mono); letter-spacing: .5em; color: var(--cyan); }
.res-box h2 { margin: 6px 0 10px; font: 900 italic clamp(30px, 4.5vw, 54px)/1 var(--ui); background: linear-gradient(180deg, #fff, #ffe7a0 50%, #ffb030); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rank { position: absolute; right: 26px; top: 18px; text-align: center; }
.rank span { display: block; font: 700 11px/1 var(--mono); letter-spacing: .4em; color: var(--dim); }
.rank b { font: 900 italic 66px/1 var(--ui); }
.rank-s { color: #ffe27a; text-shadow: 0 0 22px #ffb030; } .rank-a { color: #b89aff; text-shadow: 0 0 18px #7b4dff; } .rank-b { color: #6ad8ff; } .rank-c { color: #aaa; }
#res-table { width: 100%; border-collapse: collapse; margin: 8px 0; }
#res-table td { padding: 6px 0; border-bottom: 1px solid rgba(168, 119, 255, .15); font-size: 15px; }
#res-table td:last-child { text-align: right; font-family: var(--mono); color: #fff; }
#res-table td:first-child { color: var(--dim); }
.res-total { margin-top: 10px; font: 700 16px/1 var(--mono); letter-spacing: .2em; color: var(--dim); display: flex; justify-content: space-between; align-items: baseline; }
.res-total b { font-size: 34px; color: #fff; text-shadow: 0 0 14px rgba(168, 119, 255, .9); letter-spacing: .06em; }
.res-hi { min-height: 22px; margin: 6px 0; font: 800 16px/1 var(--mono); letter-spacing: .3em; color: var(--gold); animation: blink .8s steps(2) infinite; }
.res-box nav { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.res-box nav .btn { min-width: 170px; }

/* rotate / loading / fatal */
.rotate { display: none; position: fixed; inset: 0; z-index: 50; background: #07040f; color: #fff; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; padding: 20px; }
body.portrait .rotate { display: flex; }
.rotate .phone { width: 46px; height: 78px; border: 3px solid var(--vio); border-radius: 9px; animation: rot 1.8s ease-in-out infinite; box-shadow: 0 0 20px rgba(168, 119, 255, .6); }
@keyframes rot { 0%, 25% { transform: rotate(0); } 60%, 100% { transform: rotate(-90deg); } }
.loading { position: fixed; inset: 0; z-index: 60; background: radial-gradient(ellipse at center, #140a2e, #05030c 70%); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; transition: opacity .6s; }
.loading.gone { opacity: 0; pointer-events: none; }
.load-logo { font: 900 italic clamp(48px, 8vw, 96px)/1 var(--ui); color: #b89aff; filter: drop-shadow(0 0 20px rgba(123, 77, 255, .8)); }
.load-bar { width: min(420px, 70vw); height: 4px; background: rgba(168, 119, 255, .2); overflow: hidden; }
.load-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--vio), var(--cyan), #fff); box-shadow: 0 0 10px var(--cyan); transition: width .2s; }
.load-text { font: 13px/1 var(--mono); letter-spacing: .2em; color: var(--dim); }
.fatal { position: fixed; inset: 0; z-index: 70; background: #07040f; display: flex; align-items: center; justify-content: center; padding: 30px; text-align: center; color: #ffb0bc; font-size: 18px; }

/* small landscape phones */
@media (max-height: 500px) {
  .logo { font-size: clamp(44px, 9vw, 90px); }
  .sub { margin-bottom: 8px; }
  .btn { padding: 8px 20px; font-size: 15px; min-width: 190px; }
  .menu { gap: 6px; }
  .title-art { right: -6vw; }
  .panel-box { padding: 16px 20px; gap: 6px; }
  .boss { top: calc(var(--st) + 36px); }
  .res-box { padding: 16px 20px; }
  #res-table td { padding: 3px 0; font-size: 13px; }
}

/* ------------------------------------------------------------------ story (visual novel) */
.story { position: fixed; inset: 0; z-index: 12; background: linear-gradient(180deg, rgba(6, 3, 16, .15), rgba(6, 3, 16, .35) 55%, rgba(6, 3, 16, .85)); }
.st-art { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); pointer-events: none; filter: drop-shadow(0 0 30px rgba(123, 77, 255, .45)); }
.st-art img { display: block; }
.st-art.fly img { height: min(82vh, 60vw * .64); width: auto; }
.st-art.cheer img { height: 94vh; width: auto; }
.st-art.pilot { bottom: auto; top: 5vh; }
.st-art.pilot img { width: min(40vh, 32vw); height: auto; border: 2px solid rgba(92, 225, 255, .7); box-shadow: 0 0 40px rgba(92, 225, 255, .35), inset 0 0 20px #000; clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% 100%, 26px 100%, 0 calc(100% - 26px)); }
.st-art.pilot::after { content: "LIVE · NOVA WING"; position: absolute; left: 10px; top: 8px; font: 700 11px/1 var(--mono); letter-spacing: .25em; color: #fff; background: rgba(255, 40, 80, .8); padding: 3px 6px; }
.st-art.enter { animation: stIn .45s cubic-bezier(.2, 1.3, .4, 1); }
@keyframes stIn { from { opacity: 0; transform: translate(-50%, 24px) scale(.97); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }
.st-box { position: absolute; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(940px, 94vw); min-height: 138px; padding: 46px 30px 18px; cursor: pointer; background: linear-gradient(180deg, rgba(24, 12, 54, .92), rgba(10, 6, 26, .95)); border: 1px solid rgba(255, 150, 210, .45); box-shadow: 0 0 30px rgba(123, 77, 255, .35); clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px)); }
.st-box.narr { border-color: rgba(92, 225, 255, .35); padding-top: 30px; }
.st-name { position: absolute; left: 22px; top: 10px; padding: 6px 18px; font: 800 16px/1 var(--ui); letter-spacing: .12em; color: #2a0a2e; background: linear-gradient(90deg, #ffc1e3, #ff8ad1); clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%); }
.st-text { margin: 4px 0 0; font-size: clamp(16px, 2vw, 22px); line-height: 1.6; color: #fff; text-shadow: 0 1px 3px #000; min-height: 2.2em; }
.st-box.narr .st-text { color: #bfe9ff; font-style: italic; text-align: center; }
.st-next { position: absolute; right: 22px; bottom: 12px; font-style: normal; color: #ff8ad1; animation: bob .8s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(4px); } }
.st-hearts { position: absolute; right: var(--sr); top: var(--st); font-size: 24px; letter-spacing: 3px; color: #ff5fa8; text-shadow: 0 0 10px rgba(255, 60, 150, .8); }
.st-hearts i { font-style: normal; color: rgba(255, 255, 255, .18); text-shadow: none; }
.st-hearts.pop { animation: hpop .6s ease-out; }
@keyframes hpop { 0% { transform: scale(1.5); filter: brightness(2); } 100% { transform: none; } }
.st-tools { position: absolute; right: max(3vw, var(--sr)); bottom: calc(max(14px, env(safe-area-inset-bottom)) + 146px); display: flex; gap: 8px; z-index: 2; }
.st-tool { font: 700 12px/1 var(--mono); letter-spacing: .12em; color: #fff; padding: 8px 12px; background: rgba(20, 10, 40, .7); border: 1px solid var(--line); cursor: pointer; }
.st-tool.on { background: rgba(255, 90, 170, .6); border-color: #fff; }
.st-choices { position: absolute; left: 50%; top: 61%; transform: translate(-50%, -50%); display: flex; flex-direction: column; gap: 12px; width: min(620px, 90vw); }
.st-choice { font: 700 clamp(15px, 1.8vw, 19px)/1.4 var(--ui); color: #fff; padding: 14px 22px; text-align: left; cursor: pointer; background: linear-gradient(90deg, rgba(255, 90, 170, .35), rgba(123, 77, 255, .25)); border: 1px solid rgba(255, 170, 220, .6); clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px)); transition: transform .12s, background .12s; outline: none; }
.st-choice::before { content: "♥ "; color: #ff8ad1; }
.st-choice:hover, .st-choice:focus { transform: translateX(8px); background: linear-gradient(90deg, rgba(255, 90, 170, .7), rgba(123, 77, 255, .45)); box-shadow: 0 0 24px rgba(255, 90, 170, .5); }
.st-end { position: absolute; left: 0; right: 0; top: 38%; text-align: center; font: 900 italic clamp(26px, 4vw, 50px)/1.2 var(--ui); background: linear-gradient(180deg, #fff, #ffd1ec 50%, #ff7ac4); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 18px rgba(255, 90, 170, .8)); animation: bannerin .8s ease-out; }
@media (max-height: 500px) {
  .st-box { min-height: 100px; padding: 38px 22px 10px; }
  .st-tools { bottom: calc(max(14px, env(safe-area-inset-bottom)) + 106px); }
  .st-art.pilot { top: 4vh; } .st-art.pilot img { width: min(40vh, 30vw); }
  .st-choices { top: 55%; gap: 6px; } .st-choice { padding: 10px 16px; }
}
body.story-on .hud, body.story-on .touch-ui { visibility: hidden; }
