/* NEBULA 3.0 — neon cockpit UI */
:root {
  --bg: #05040f;
  --cyan: #00f2ff;
  --mag: #ff2bd6;
  --gold: #ffc53d;
  --red: #ff2a5f;
  --green: #3dff93;
  --ink: #e9f4ff;
  --mute: #8a95b8;
  --panel: linear-gradient(180deg, rgba(22, 26, 60, .82), rgba(8, 8, 26, .9));
  --line: rgba(0, 242, 255, .22);
  --cut: 12px;
  --head: 'Orbitron', 'Outfit', sans-serif;
  --body: 'Outfit', system-ui, sans-serif;
  --st: env(safe-area-inset-top, 0px);
  --sb: env(safe-area-inset-bottom, 0px);
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
html, body { width: 100%; height: 100%; overflow: hidden; background: var(--bg); color: var(--ink); font-family: var(--body); touch-action: none; overscroll-behavior: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
button:disabled { cursor: default; }
.hidden { display: none !important; }

#app { position: fixed; inset: 0; overflow: hidden; }
#game { position: absolute; inset: 0; display: block; touch-action: none; }
#vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, .55) 100%); z-index: 2; }

/* ---------- generic panel / buttons ---------- */
.chamfer { clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut)); }
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 20px; font-family: var(--head); font-weight: 800; letter-spacing: .08em; font-size: 14px;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  transition: transform .08s, filter .2s;
}
.btn:active:not(:disabled) { transform: scale(.96); }
.btn-primary { background: linear-gradient(135deg, #00f2ff, #2a7bff); color: #021018; box-shadow: 0 0 24px rgba(0, 242, 255, .35); }
.btn-hot { background: linear-gradient(135deg, #ff2bd6, #ff6a3d); color: #1a0010; }
.btn-gold { background: linear-gradient(135deg, #ffe066, #ff9d1a); color: #2a1400; }
.btn-ghost { background: rgba(255, 255, 255, .06); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.btn-dim { background: rgba(255, 255, 255, .05); color: var(--mute); }
.btn-danger { background: rgba(255, 42, 95, .15); color: #ff7a9a; box-shadow: inset 0 0 0 1px rgba(255, 42, 95, .5); }
.btn-sm { padding: 10px 14px; font-size: 12px; min-width: 96px; }
.btn-xl { width: 100%; justify-content: flex-start; padding: 16px 18px; text-align: left; }
.btn-xl .btn-ico { font-size: 28px; width: 40px; text-align: center; line-height: 1; }
.btn-xl .btn-txt { display: flex; flex-direction: column; flex: 1; }
.btn-xl .btn-txt b { font-size: 18px; letter-spacing: .1em; }
.btn-xl .btn-txt small { font-family: var(--body); font-weight: 600; letter-spacing: .02em; font-size: 12px; opacity: .75; margin-top: 2px; }
.btn-xl .btn-arrow { font-size: 28px; opacity: .6; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; font-size: 22px; font-weight: 800; color: var(--cyan); background: rgba(0, 242, 255, .08); box-shadow: inset 0 0 0 1px var(--line); clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); flex-shrink: 0; }

/* ---------- screens ---------- */
.screen {
  position: absolute; inset: 0; z-index: 10; display: flex; flex-direction: column;
  padding: calc(var(--st) + 12px) 16px calc(var(--sb) + 12px);
  max-width: 560px; margin: 0 auto;
  opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity .25s, transform .25s;
}
.screen.active { opacity: 1; pointer-events: auto; transform: none; }
.screen::before { content: ''; position: fixed; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(5, 4, 15, .55), rgba(5, 4, 15, .25) 40%, rgba(5, 4, 15, .7)); pointer-events: none; }
.scroll { flex: 1; overflow-y: auto; touch-action: pan-y; -webkit-overflow-scrolling: touch; padding: 4px 2px 20px; margin: 0 -2px; scrollbar-width: none; }
.scroll::-webkit-scrollbar { display: none; }

.scr-head { display: flex; align-items: center; gap: 12px; margin: 6px 0 14px; }
.scr-head h2 { flex: 1; font-family: var(--head); font-size: 20px; letter-spacing: .14em; text-shadow: 0 0 18px rgba(0, 242, 255, .5); }
.head-chip { font-family: var(--head); font-size: 13px; color: var(--gold); padding: 6px 10px; background: rgba(255, 197, 61, .1); box-shadow: inset 0 0 0 1px rgba(255, 197, 61, .35); }

/* loading */
.loading { margin: auto; text-align: center; width: 100%; }
.load-track { width: 60%; max-width: 260px; height: 4px; margin: 30px auto 0; background: rgba(255, 255, 255, .1); overflow: hidden; }
.load-track i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--cyan), var(--mag)); transition: width .2s; box-shadow: 0 0 12px var(--cyan); }

/* logo */
.logo { display: flex; flex-direction: column; align-items: center; }
.logo-main {
  position: relative; font-family: var(--head); font-weight: 900; font-size: clamp(46px, 14vw, 72px); letter-spacing: .12em; line-height: 1;
  background: linear-gradient(180deg, #fff 10%, #7ff9ff 45%, #00a8ff 60%, #ff2bd6 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 18px rgba(0, 242, 255, .55));
}
.logo-main::after { content: attr(data-text); position: absolute; inset: 0; color: transparent; -webkit-text-stroke: 1px rgba(255, 43, 214, .6); transform: translate(3px, 2px); animation: glitch 4s infinite steps(1); }
@keyframes glitch { 0%, 92%, 100% { transform: translate(3px, 2px); opacity: .7; } 93% { transform: translate(-4px, 1px); opacity: 1; } 95% { transform: translate(5px, -2px); } 97% { transform: translate(-2px, 3px); } }
.logo-sub { font-family: var(--head); font-size: 12px; letter-spacing: .5em; color: var(--cyan); margin-top: 8px; opacity: .85; padding-left: .5em; }

/* topbar */
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pilot { display: flex; align-items: center; gap: 10px; }
.pilot-lv { width: 40px; height: 40px; display: grid; place-items: center; font-family: var(--head); font-weight: 900; font-size: 16px; color: #021018; background: linear-gradient(135deg, var(--cyan), #2a7bff); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.pilot-info span { font-family: var(--head); font-size: 10px; letter-spacing: .15em; color: var(--mute); }
.xpbar { width: 110px; height: 5px; background: rgba(255, 255, 255, .1); margin-top: 4px; overflow: hidden; }
.xpbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--mag)); }
.credits { font-family: var(--head); font-size: 15px; padding: 8px 14px; background: rgba(0, 242, 255, .08); box-shadow: inset 0 0 0 1px var(--line); clip-path: polygon(8px 0, 100% 0, 100% 100%, 0 100%, 0 8px); }
.credits b { color: #7ff9ff; }

/* ---------- main menu ---------- */
#scr-menu { justify-content: space-between; }
.menu-hero { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 0; }
.hero-ship { position: relative; width: 190px; height: 190px; display: grid; place-items: center; margin-top: 8px; }
.hero-ship img { width: 150px; height: 150px; object-fit: contain; animation: float 3.4s ease-in-out infinite; position: relative; z-index: 1; }
.hero-ring { position: absolute; inset: 10px; border-radius: 50%; border: 1px dashed color-mix(in srgb, var(--c) 60%, transparent); animation: spin 18s linear infinite; box-shadow: 0 0 40px color-mix(in srgb, var(--c) 25%, transparent), inset 0 0 40px color-mix(in srgb, var(--c) 18%, transparent); }
.hero-ring::after { content: ''; position: absolute; inset: 18px; border-radius: 50%; border: 2px solid transparent; border-top-color: var(--c); border-bottom-color: var(--c); animation: spin 5s linear infinite reverse; opacity: .6; }
.hero-name { position: absolute; bottom: -6px; font-family: var(--head); font-size: 11px; letter-spacing: .35em; color: var(--c); }
@keyframes float { 50% { transform: translateY(-10px); } }
@keyframes spin { to { transform: rotate(360deg); } }
.menu-actions { display: flex; flex-direction: column; gap: 10px; }
.menu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.btn-tile { flex-direction: column; gap: 6px; padding: 14px 6px; font-size: 11px; letter-spacing: .1em; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.btn-tile span { font-size: 22px; }
.badge { position: absolute; top: 6px; right: 10px; min-width: 20px; height: 20px; border-radius: 10px; background: var(--red); color: #fff; font-style: normal; font-family: var(--body); font-size: 12px; display: grid; place-items: center; box-shadow: 0 0 12px var(--red); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { transform: scale(1.15); } }
.menu-foot { text-align: center; font-size: 11px; color: var(--mute); opacity: .6; margin-top: 10px; letter-spacing: .1em; }

/* ---------- campaign map ---------- */
.sector { margin-bottom: 22px; padding: 14px 12px 18px; background: linear-gradient(180deg, hsla(var(--h), 90%, 50%, .12), rgba(8, 8, 26, .7)); box-shadow: inset 0 0 0 1px hsla(var(--h), 90%, 60%, .25); clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px); }
.sector-title { font-family: var(--head); font-size: 16px; letter-spacing: .12em; display: flex; flex-direction: column; color: hsl(var(--h), 100%, 75%); margin-bottom: 8px; }
.sector-title span { font-size: 10px; letter-spacing: .3em; color: var(--mute); }
.path { position: relative; display: flex; flex-direction: column; gap: 4px; }
.path::before { content: ''; position: absolute; left: 50%; top: 30px; bottom: 30px; width: 2px; background: repeating-linear-gradient(180deg, hsla(var(--h), 90%, 65%, .5) 0 6px, transparent 6px 12px); }
.node { position: relative; display: flex; flex-direction: column; align-items: center; align-self: center; transform: translateX(calc((var(--i) - 2) * 0px)); }
.node:nth-child(odd) { transform: translateX(-62px); }
.node:nth-child(even) { transform: translateX(62px); }
.node-hex { width: 62px; height: 62px; display: grid; place-items: center; font-family: var(--head); font-weight: 900; font-size: 20px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: linear-gradient(135deg, hsl(var(--h), 90%, 55%), hsl(calc(var(--h) + 40), 90%, 35%)); color: #fff; text-shadow: 0 0 8px rgba(0, 0, 0, .6); }
.node.boss .node-hex { width: 80px; height: 80px; font-size: 30px; background: linear-gradient(135deg, #ff2a5f, #8a0030); }
.node.done .node-hex { filter: saturate(.8) brightness(.95); }
.node.current .node-hex { animation: nodeGlow 1.4s infinite; }
@keyframes nodeGlow { 50% { filter: brightness(1.5) drop-shadow(0 0 10px #fff); } }
.node.locked .node-hex { background: #1a1c30; color: #555b7a; font-size: 18px; }
.node-stars { font-size: 13px; margin-top: 2px; letter-spacing: 1px; }
.node-stars i { font-style: normal; color: #2b2f4a; }
.node-stars i.on { color: var(--gold); text-shadow: 0 0 8px var(--gold); }
.node-obj { position: absolute; top: 0; right: -16px; width: 24px; height: 24px; display: grid; place-items: center; font-size: 12px; background: rgba(5, 4, 15, .85); border-radius: 50%; box-shadow: inset 0 0 0 1px hsla(var(--h), 90%, 65%, .6); }
.node.locked .node-obj { display: none; }

/* ---------- modals ---------- */
.modal { position: absolute; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px; background: rgba(2, 1, 8, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; pointer-events: none; transition: opacity .2s; }
.modal.active { opacity: 1; pointer-events: auto; }
.modal-box { width: 100%; max-width: 400px; max-height: calc(100% - var(--st) - var(--sb)); overflow-y: auto; touch-action: pan-y; padding: 20px 18px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line), 0 0 60px rgba(0, 242, 255, .12); clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px); transform: scale(.94); transition: transform .25s cubic-bezier(.2, 1.4, .4, 1); }
.modal.active .modal-box { transform: none; }
.modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.modal-actions > .btn { flex: 1; }
.modal-actions.col { flex-direction: column; }
.row2 { display: flex; gap: 10px; }
.row2 .btn { flex: 1; }
.glow-title { font-family: var(--head); text-align: center; font-size: 24px; letter-spacing: .2em; text-shadow: 0 0 18px var(--cyan); margin-bottom: 12px; }

.brief-head { padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.brief-head small { font-family: var(--head); font-size: 10px; letter-spacing: .25em; color: hsl(var(--h), 100%, 75%); }
.brief-head h3 { font-family: var(--head); font-size: 26px; letter-spacing: .1em; margin-top: 4px; }
.tag-boss { font-size: 12px; padding: 3px 8px; background: var(--red); color: #fff; vertical-align: middle; letter-spacing: .15em; }
.brief-sec { margin-bottom: 14px; }
.brief-sec label, .brief-meta label, .res-grid label, .res-score label { display: block; font-family: var(--head); font-size: 10px; letter-spacing: .22em; color: var(--mute); margin-bottom: 6px; }
.obj-main { display: flex; align-items: center; gap: 12px; font-size: 17px; font-weight: 800; padding: 12px; background: rgba(0, 242, 255, .08); box-shadow: inset 3px 0 0 var(--cyan); }
.obj-main span { font-size: 22px; color: var(--cyan); }
.star-row { display: flex; align-items: center; gap: 10px; padding: 6px 2px; font-size: 14px; color: #c4cbe5; }
.star-row i { font-style: normal; color: #2e3352; font-size: 18px; }
.star-row.got i { color: var(--gold); text-shadow: 0 0 8px var(--gold); }
.brief-meta { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; padding: 12px; background: rgba(255, 255, 255, .04); }
.brief-meta b { font-family: var(--head); font-size: 14px; }
.dots { display: flex; flex-wrap: wrap; gap: 4px; }
.dot { width: 12px; height: 12px; transform: rotate(45deg); background: var(--c); box-shadow: 0 0 8px var(--c); display: inline-block; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 6px; margin-bottom: 12px; padding: 4px; background: rgba(255, 255, 255, .04); }
.tabs button { flex: 1; padding: 11px; font-family: var(--head); font-size: 12px; letter-spacing: .14em; color: var(--mute); }
.tabs button.on { color: #021018; background: linear-gradient(135deg, var(--cyan), #2a7bff); }

/* ---------- hangar ---------- */
.ship-list { display: flex; flex-direction: column; gap: 12px; }
.ship-card { display: flex; gap: 12px; padding: 12px; background: var(--panel); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px); }
.ship-card.sel { box-shadow: inset 0 0 0 2px var(--c), inset 0 0 40px color-mix(in srgb, var(--c) 18%, transparent); }
.ship-pic { width: 96px; flex-shrink: 0; display: grid; place-items: center; background: radial-gradient(circle, color-mix(in srgb, var(--c) 22%, transparent), transparent 70%); }
.ship-pic img { width: 96px; height: 96px; object-fit: contain; }
.ship-body { flex: 1; min-width: 0; }
.ship-body h4 { font-family: var(--head); letter-spacing: .14em; color: var(--c); font-size: 15px; margin-bottom: 6px; }
.stats { display: grid; grid-template-columns: auto 1fr; gap: 3px 8px; align-items: center; font-size: 11px; color: var(--mute); }
.stat-bar { height: 5px; background: rgba(255, 255, 255, .08); }
.stat-bar i { display: block; height: 100%; background: var(--c); box-shadow: 0 0 6px var(--c); }
.sp-line { margin: 8px 0; font-size: 12px; display: flex; flex-direction: column; }
.sp-line b { color: var(--ink); }
.sp-line small { color: var(--mute); }
.upg-list { display: flex; flex-direction: column; gap: 10px; }
.upg { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--panel); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07); }
.upg-ico { width: 44px; height: 44px; display: grid; place-items: center; font-size: 22px; color: var(--cyan); background: rgba(0, 242, 255, .1); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); flex-shrink: 0; }
.upg-body { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.upg-body b { font-size: 15px; }
.upg-body small { font-size: 12px; color: var(--mute); }
.pips { display: flex; gap: 4px; margin-top: 6px; }
.pips i { width: 18px; height: 5px; background: rgba(255, 255, 255, .1); }
.pips i.on { background: var(--cyan); box-shadow: 0 0 6px var(--cyan); }

/* ---------- missions ---------- */
.refresh { font-size: 12px; color: var(--mute); margin-bottom: 10px; text-align: right; }
.mission { display: flex; align-items: center; gap: 12px; padding: 12px; margin-bottom: 10px; background: var(--panel); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07); }
.mission.ready { box-shadow: inset 0 0 0 1px var(--gold), 0 0 20px rgba(255, 197, 61, .15); }
.mission.claimed { opacity: .5; }
.mission.chest { background: linear-gradient(135deg, rgba(255, 43, 214, .15), rgba(0, 242, 255, .1)); }
.m-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.m-body b { font-size: 14px; }
.m-body small { font-size: 12px; color: var(--mute); }
.tier { color: var(--gold); font-size: 11px; letter-spacing: 2px; margin-left: 4px; }
.m-prog { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 11px; color: var(--mute); }
.pbar { flex: 1; height: 6px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.pbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--green)); }

/* ---------- settings ---------- */
.settings { display: flex; flex-direction: column; gap: 4px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 4px; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.set-row label { font-family: var(--head); font-size: 11px; letter-spacing: .16em; color: var(--mute); }
.seg { display: flex; background: rgba(255, 255, 255, .05); padding: 3px; gap: 3px; }
.seg button { padding: 9px 12px; font-family: var(--head); font-size: 11px; letter-spacing: .08em; color: var(--mute); min-width: 62px; }
.seg button.on { background: linear-gradient(135deg, var(--cyan), #2a7bff); color: #021018; }
.range { display: flex; align-items: center; gap: 10px; }
.range input { width: 140px; accent-color: var(--cyan); touch-action: pan-x; }
.range span { font-family: var(--head); font-size: 12px; width: 40px; }
.reset { margin-top: 24px; align-self: center; }
.quick-set { margin: 8px 0; }
.pause-obj { text-align: center; font-size: 14px; padding: 10px; background: rgba(0, 242, 255, .06); margin-bottom: 6px; }
.pause-obj span { color: var(--cyan); margin-right: 6px; }
.pause-obj small { color: var(--mute); }

/* ---------- HUD ---------- */
#hud { position: absolute; top: 0; bottom: 0; left: 0; right: 0; margin: 0 auto; width: min(100%, 72vh); z-index: 20; pointer-events: none; }
.hud-top { position: absolute; top: calc(var(--st) + 10px); left: 12px; right: 12px; display: flex; align-items: flex-start; gap: 10px; }
.hud-top .icon-btn { pointer-events: auto; }
.hud-left { width: 34%; max-width: 170px; }
.hull { position: relative; height: 18px; background: rgba(0, 0, 0, .5); box-shadow: inset 0 0 0 1px rgba(61, 255, 147, .4); clip-path: polygon(6px 0, 100% 0, 100% 100%, 0 100%, 0 6px); }
.hull-track { position: absolute; inset: 2px; overflow: hidden; background: repeating-linear-gradient(90deg, transparent 0 9px, rgba(0, 0, 0, .5) 9px 11px); }
#hull-fill { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #12c96a, var(--green)); box-shadow: 0 0 10px var(--green); transition: width .25s; }
#hull-fill.low { background: linear-gradient(90deg, #b3002c, var(--red)); box-shadow: 0 0 10px var(--red); animation: blink .5s infinite; }
@keyframes blink { 50% { opacity: .55; } }
#hull-val { position: absolute; right: 6px; top: 0; line-height: 18px; font-family: var(--head); font-size: 11px; font-weight: 800; text-shadow: 0 0 4px #000; }
.hud-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.power { display: flex; gap: 3px; }
.power i { width: 14px; height: 6px; background: rgba(255, 255, 255, .15); transform: skewX(-20deg); }
.power i.on { background: var(--gold); box-shadow: 0 0 6px var(--gold); }
.buffs { font-size: 14px; letter-spacing: 2px; }
.hud-center { flex: 1; text-align: center; }
.score { font-family: var(--head); font-weight: 900; font-size: 24px; letter-spacing: .06em; text-shadow: 0 0 14px rgba(0, 242, 255, .7); }
.combo { display: inline-flex; align-items: baseline; gap: 6px; margin-top: 2px; opacity: 0; transition: opacity .2s; }
.combo.show { opacity: 1; }
.combo b { font-family: var(--head); font-size: 18px; color: var(--gold); text-shadow: 0 0 12px var(--gold); }
.combo span { font-family: var(--head); font-size: 10px; letter-spacing: .15em; color: #ffe9a8; }
.combo.bump b { animation: bump .25s; display: inline-block; }
@keyframes bump { 40% { transform: scale(1.4); } }
.objective { position: absolute; top: calc(var(--st) + 66px); left: 12px; font-family: var(--head); font-size: 12px; letter-spacing: .06em; padding: 6px 10px; background: rgba(5, 4, 15, .55); box-shadow: inset 2px 0 0 var(--cyan); }
.objective .o-main { color: var(--ink); }
.objective .o-sec { color: var(--gold); font-size: 10px; margin-top: 2px; opacity: .85; }
.special { position: absolute; right: 18px; bottom: calc(var(--sb) + 26px); width: 78px; height: 78px; pointer-events: auto; border-radius: 50%; background: rgba(5, 4, 15, .6); display: grid; place-items: center; touch-action: none; }
.special svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.special .sp-bg { fill: none; stroke: rgba(255, 255, 255, .12); stroke-width: 6; }
.special .sp-fill { fill: none; stroke: var(--c, var(--cyan)); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 213.6; stroke-dashoffset: 213.6; transition: stroke-dashoffset .2s; filter: drop-shadow(0 0 4px var(--c)); }
.special span { font-size: 28px; color: var(--c); opacity: .5; position: relative; }
.special.ready { animation: ready 1s infinite; background: color-mix(in srgb, var(--c) 25%, rgba(5, 4, 15, .6)); }
.special.ready span { opacity: 1; text-shadow: 0 0 14px var(--c); }
@keyframes ready { 50% { box-shadow: 0 0 30px var(--c); transform: scale(1.06); } }

.boss-bar { position: absolute; z-index: 21; top: calc(var(--st) + 104px); left: 50%; transform: translateX(-50%); width: min(86vw, 60vh, 420px); pointer-events: none; animation: dropIn .5s; }
@keyframes dropIn { from { transform: translate(-50%, -30px); opacity: 0; } }
.boss-name { font-family: var(--head); font-size: 12px; letter-spacing: .3em; color: var(--c); text-align: center; text-shadow: 0 0 10px var(--c); margin-bottom: 4px; }
.boss-track { position: relative; height: 10px; background: rgba(0, 0, 0, .6); box-shadow: inset 0 0 0 1px var(--c); }
.boss-track i { position: absolute; left: 2px; top: 2px; bottom: 2px; width: 100%; max-width: calc(100% - 4px); background: linear-gradient(90deg, var(--c), #fff); box-shadow: 0 0 10px var(--c); transition: width .15s; }
.boss-track .seg { position: absolute; top: 0; bottom: 0; width: 2px; background: rgba(0, 0, 0, .8); }
.boss-track .s1 { left: 33%; } .boss-track .s2 { left: 66%; }

/* banner + toasts */
.banner { position: absolute; z-index: 30; left: 0; right: 0; top: 38%; text-align: center; pointer-events: none; opacity: 0; transform: scale(1.3); transition: opacity .25s, transform .35s cubic-bezier(.2, 1.4, .4, 1); }
.banner.show { opacity: 1; transform: none; }
.b-title { font-family: var(--head); font-weight: 900; font-size: clamp(26px, 8vw, 40px); letter-spacing: .14em; color: #fff; text-shadow: 0 0 20px var(--cyan), 0 0 40px var(--cyan); padding: 10px 0; background: linear-gradient(90deg, transparent, rgba(0, 242, 255, .15), transparent); }
.b-sub { font-family: var(--head); font-size: 13px; letter-spacing: .25em; color: var(--cyan); margin-top: 6px; }
.banner.bn-boss .b-title, .banner.bn-warn .b-title { color: #ffd6df; text-shadow: 0 0 20px var(--red), 0 0 40px var(--red); background: repeating-linear-gradient(-45deg, rgba(255, 42, 95, .25) 0 14px, rgba(0, 0, 0, .2) 14px 28px); animation: blink .4s infinite; }
.banner.bn-boss .b-sub { color: #ff8aa5; font-size: 22px; font-weight: 900; }
.banner.bn-win .b-title { text-shadow: 0 0 20px var(--gold), 0 0 40px var(--gold); background: linear-gradient(90deg, transparent, rgba(255, 197, 61, .2), transparent); }
.banner.bn-special .b-title { font-size: 26px; text-shadow: 0 0 20px var(--mag); background: none; }
.toasts { position: absolute; z-index: 50; top: calc(var(--st) + 140px); left: 50%; transform: translateX(-50%); width: min(92vw, 380px); display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 10px 14px; font-size: 13px; font-weight: 600; background: linear-gradient(90deg, rgba(30, 20, 70, .95), rgba(10, 10, 30, .95)); box-shadow: inset 0 0 0 1px rgba(255, 197, 61, .5), 0 6px 20px rgba(0, 0, 0, .5); animation: toastIn .35s cubic-bezier(.2, 1.4, .4, 1); transition: opacity .4s, transform .4s; }
.toast span { font-size: 18px; color: var(--gold); }
.toast.out { opacity: 0; transform: translateY(-10px); }
@keyframes toastIn { from { transform: translateY(-20px); opacity: 0; } }

/* ---------- results ---------- */
.res-head { text-align: center; }
.res-head small { font-family: var(--head); font-size: 11px; letter-spacing: .25em; color: var(--mute); }
.res-head h3 { font-family: var(--head); font-weight: 900; font-size: 26px; letter-spacing: .1em; margin-top: 4px; }
.res-head.win h3 { color: #fff3c4; text-shadow: 0 0 20px var(--gold); }
.res-head.lose h3 { color: #ffc2cf; text-shadow: 0 0 20px var(--red); }
.res-stars { display: flex; justify-content: center; gap: 8px; margin: 12px 0 4px; }
.res-stars i { font-style: normal; font-size: 46px; color: #232744; transform: scale(0); animation: starPop .45s var(--d) forwards cubic-bezier(.2, 1.6, .4, 1); }
.res-stars i:nth-child(2) { font-size: 56px; margin-top: -10px; }
.res-stars i.on { color: var(--gold); text-shadow: 0 0 20px var(--gold); }
@keyframes starPop { to { transform: scale(1); } }
.res-score { text-align: center; margin: 12px 0; }
.res-score b { display: block; font-family: var(--head); font-weight: 900; font-size: 38px; text-shadow: 0 0 18px rgba(0, 242, 255, .6); }
.res-score small { color: var(--mute); font-size: 12px; }
.res-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.res-grid div { padding: 10px; background: rgba(255, 255, 255, .04); }
.res-grid b { font-family: var(--head); font-size: 18px; }
.res-earn { display: flex; justify-content: space-around; margin: 14px 0 8px; font-family: var(--head); font-size: 16px; }
.res-earn b { color: #7ff9ff; }
.res-xp { display: flex; align-items: center; justify-content: center; gap: 10px; font-family: var(--head); font-size: 11px; color: var(--mute); letter-spacing: .1em; }
.lvup { text-align: center; margin-top: 10px; font-family: var(--head); color: var(--gold); text-shadow: 0 0 12px var(--gold); animation: pulse 1s infinite; }

@media (min-height: 760px) { .hero-ship { width: 230px; height: 230px; } .hero-ship img { width: 180px; height: 180px; } }
@media (max-height: 620px) { .hero-ship { width: 140px; height: 140px; } .hero-ship img { width: 110px; height: 110px; } .logo-main { font-size: 40px; } .btn-xl { padding: 12px 16px; } }
