/* =====================================================================
   Stellar Drift HUD — design language
   - the universe is the picture: HUD text floats, only grouped data sits in panels
   - panels: translucent, chamfered (top-left / bottom-right), 1px bevelled frame,
     faint inner glow line, a short accent tick on the top edge
   - colour roles: teal-cyan = system / navigation, gold = rewards & achievements,
     violet = quantum, magenta = fictional places, amber / red = warnings
   - type: Rajdhani for numbers & English kickers, Noto Sans KR for everything read
   - motion: 0.16 s for controls, 0.35 s for messages, 0.75 s for reveals
   ===================================================================== */
@property --bl { syntax: '<color>'; inherits: true; initial-value: transparent; }
@property --bb { syntax: '<color>'; inherits: true; initial-value: transparent; }

/* --ui: text scale from settings (0.92 / 1 / 1.12 / 1.25) — every px font size in this file is multiplied by it */
:root {
  --ui: 1;
  --hud: #b8efff;
  --hud2: rgba(184, 239, 255, 0.66);
  --hud3: rgba(184, 239, 255, 0.2);
  --ink: #eef9fd;
  --line: rgba(130, 215, 240, 0.32);
  --acc: #5ad8f5;
  --acc-rgb: 90, 216, 245;
  --gold: #f3c875;
  --gold-rgb: 243, 200, 117;
  --warn: #ffc66e;
  --bad: #ff6a6a;
  --good: #8dffc8;
  --q: #9fd8ff;
  --violet: #c7a6ff;
  --fic: #f59ad8;
  --panel: rgba(5, 11, 20, 0.76);
  --panel-solid: rgba(6, 12, 22, 0.95);
  --bg: #02040a;
  --lat: 'Rajdhani', 'Noto Sans KR', system-ui, sans-serif;
  --kr: 'Noto Sans KR', 'Rajdhani', system-ui, sans-serif;
  --ch: 10px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --t-msg: 0.35s;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; background: var(--bg); color: var(--hud); font-family: var(--kr); user-select: none; -webkit-user-select: none; }
#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; cursor: crosshair; }
.off { display: none !important; }
* { scrollbar-width: thin; scrollbar-color: rgba(var(--acc-rgb), 0.38) rgba(184, 239, 255, 0.05); }

/* ------------------------------------------------ primitives */
kbd {
  display: inline-block; min-width: 1.75em; padding: 0.04em 0.5em 0.08em; margin-right: 0.35em;
  font-family: var(--lat); font-weight: 700; font-size: 0.88em; line-height: 1.35; text-align: center; color: #eafcff;
  background: rgba(14, 30, 44, 0.85); border: 1px solid rgba(140, 220, 245, 0.5); border-bottom-color: rgba(140, 220, 245, 0.24); border-radius: 3px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 2px 0 rgba(60, 130, 160, 0.55);
  vertical-align: 0.06em;
}
.kicker { font-family: var(--lat); font-weight: 600; letter-spacing: 0.3em; font-size: calc(12.5px * var(--ui)); color: rgba(var(--acc-rgb), 0.86); text-transform: uppercase; }

/* panel frame: add class "fr" (or one of the ids below). The frame lives in ::before so the
   element itself is never clipped and can still be wiped in by .ui-reveal */
.fr, #map-info { position: relative; isolation: isolate; --fl: var(--line); --pb: var(--panel); --fa: var(--acc); }
.fr::before, #map-info::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  border: 1px solid var(--fl);
  border-top-color: color-mix(in srgb, var(--fl), #fff 22%);
  background:
    linear-gradient(to bottom right, transparent 50%, var(--fl) 50%, var(--fl) calc(50% + 1.4px), transparent calc(50% + 1.4px)) left top / var(--ch) var(--ch) no-repeat border-box,
    linear-gradient(to bottom right, transparent calc(50% - 1.4px), var(--fl) calc(50% - 1.4px), var(--fl) 50%, transparent 50%) right bottom / var(--ch) var(--ch) no-repeat border-box,
    repeating-linear-gradient(180deg, rgba(160, 230, 255, 0.022) 0 1px, transparent 1px 3px) border-box,
    var(--pb);
  box-shadow: inset 0 1px 0 rgba(200, 245, 255, 0.1), inset 0 0 22px rgba(var(--acc-rgb), 0.05);
  clip-path: polygon(var(--ch) 0, 100% 0, 100% calc(100% - var(--ch)), calc(100% - var(--ch)) 100%, 0 100%, 0 var(--ch));
}
.fr::after, #map-info::after { content: ''; position: absolute; left: calc(var(--ch) + 8px); top: 0; width: 30px; height: 2px; background: var(--fa); pointer-events: none; }
.fr.gold { --fl: rgba(var(--gold-rgb), 0.55); --fa: var(--gold); }

/* onboarding reveal: a slanted wipe + fade (main.js adds/removes the class) */
.ui-reveal { animation: uiReveal 0.75s var(--ease) both; }
@keyframes uiReveal {
  from { opacity: 0; clip-path: polygon(-30px -12px, -30px -12px, -60px calc(100% + 12px), -60px calc(100% + 12px)); }
  to { opacity: 1; clip-path: polygon(-30px -12px, calc(100% + 60px) -12px, calc(100% + 30px) calc(100% + 12px), -60px calc(100% + 12px)); }
}

/* buttons: one shape, every state. Colours live in --bl (line) / --bb (fill) so states just swap them */
button {
  position: relative; isolation: isolate; font-family: var(--kr); font-size: calc(13.5px * var(--ui)); cursor: pointer;
  color: var(--hud); background: none; border: 0; padding: 8px 16px;
  --bl: var(--line); --bb: rgba(10, 20, 34, 0.55); --bc: 7px;
  transition: --bl 0.16s, --bb 0.16s, color 0.16s, transform 0.12s var(--ease);
}
button::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  border: 1px solid var(--bl);
  background: linear-gradient(to bottom right, transparent calc(50% - 1.4px), var(--bl) calc(50% - 1.4px), var(--bl) 50%, transparent 50%) right bottom / var(--bc) var(--bc) no-repeat border-box, var(--bb);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--bc)), calc(100% - var(--bc)) 100%, 0 100%);
}
button:hover:not(:disabled) { --bl: rgba(170, 235, 255, 0.62); --bb: rgba(var(--acc-rgb), 0.13); color: #fff; }
button:active:not(:disabled) { --bb: rgba(var(--acc-rgb), 0.26); transform: translateY(1px); transition-duration: 0.04s; }
button:focus-visible { outline: 1px solid var(--acc); outline-offset: 3px; }
button:focus:not(:focus-visible) { outline: none; }
button:disabled { color: rgba(184, 239, 255, 0.34); cursor: not-allowed; --bl: rgba(184, 239, 255, 0.12); --bb: transparent; }
button.on { --bl: rgba(var(--acc-rgb), 0.7); --bb: rgba(var(--acc-rgb), 0.16); color: #fff; }
button.on::after { content: ''; position: absolute; left: 8px; right: calc(var(--bc) + 4px); bottom: 0; height: 2px; background: var(--acc); }
button.primary { --bl: rgba(var(--acc-rgb), 0.8); --bb: rgba(60, 180, 230, 0.22); color: #fff; font-weight: 500; }
button.primary:hover:not(:disabled) { --bl: #9bebff; --bb: rgba(60, 180, 230, 0.36); }
button.primary:active:not(:disabled) { --bb: rgba(60, 180, 230, 0.48); }
button.big { padding: 13px 44px; font-size: calc(17px * var(--ui)); letter-spacing: 0.2em; }

/* checkboxes & sliders */
input[type=checkbox] {
  appearance: none; -webkit-appearance: none; flex: none; width: 17px; height: 17px; margin: 0; cursor: pointer; position: relative;
  border: 1px solid rgba(140, 220, 245, 0.55); background: rgba(10, 22, 34, 0.7); transition: background 0.16s, border-color 0.16s;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 4px), calc(100% - 4px) 100%, 0 100%);
}
input[type=checkbox]::after { content: ''; position: absolute; inset: 3px; background: #04121c; clip-path: polygon(14% 52%, 0 66%, 38% 100%, 100% 22%, 86% 8%, 38% 72%); opacity: 0; transition: opacity 0.12s; }
input[type=checkbox]:checked { background: var(--acc); border-color: var(--acc); }
input[type=checkbox]:checked::after { opacity: 1; }
input[type=checkbox]:hover { border-color: #b8efff; }
input[type=checkbox]:focus-visible { outline: 1px solid var(--acc); outline-offset: 3px; }
input[type=checkbox]:disabled { opacity: 0.4; cursor: not-allowed; }
input[type=range] { width: 100%; accent-color: var(--acc); cursor: pointer; }
input[type=range]:focus-visible { outline: 1px solid var(--acc); outline-offset: 4px; }
.fic { color: var(--fic) !important; }
.fic-chip, b.fic::after {
  display: inline-block; margin-left: 8px; padding: 0 6px; font-family: var(--kr); font-size: calc(12.5px * var(--ui)); font-weight: 500; letter-spacing: 0.04em; line-height: 1.5;
  color: var(--fic); border: 1px solid rgba(245, 154, 216, 0.55); background: rgba(245, 154, 216, 0.1); vertical-align: 0.15em;
}
b.fic::after { content: '가상'; }

/* ------------------------------------------------ HUD */
#hud { position: fixed; inset: 0; pointer-events: none; font-family: var(--lat); z-index: 5; }
#hud.hidden-hud > * { visibility: hidden; }
#hud-top { position: fixed; inset: 0; pointer-events: none; z-index: 9; }
#markers { position: absolute; inset: 0; }
.mk { position: absolute; left: 0; top: 0; will-change: transform; display: flex; align-items: center; gap: 6px; white-space: nowrap; font-size: calc(13px * var(--ui)); color: var(--hud2); text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9); }
.mk i { width: 7px; height: 7px; border: 1px solid currentColor; transform: rotate(45deg); flex: none; margin-left: -3.5px; }
.mk.major { color: var(--hud); }
.mk.scanned i { background: currentColor; }
.mk.sys { color: #ffe2a8; }
.mk span b { font-family: var(--kr); font-weight: 500; }
.mk span em { font-style: normal; opacity: 0.62; margin-left: 6px; font-family: var(--lat); font-weight: 500; }
.mk.q i { border-color: var(--violet); background: rgba(199, 166, 255, 0.35); width: 9px; height: 9px; }
.mk.q.minor i { border-color: #8fe3ff; background: rgba(143, 227, 255, 0.3); }
.mk.q { color: #fff; }
.mk.fic { color: var(--fic); }
.mk kbd { font-size: calc(11.5px * var(--ui)); min-width: 1.4em; padding: 0 3px; }
.mk.nolabel span { display: none; }
.mk.undercap { visibility: hidden; }

#tbox { position: absolute; left: 0; top: 0; width: 60px; height: 60px; will-change: transform, width, height; }
#tbox i { position: absolute; width: 12px; height: 12px; border-color: var(--acc); border-style: solid; filter: drop-shadow(0 0 3px rgba(var(--acc-rgb), 0.6)); }
#tbox .c1 { left: 0; top: 0; border-width: 2px 0 0 2px; }
#tbox .c2 { right: 0; top: 0; border-width: 2px 2px 0 0; }
#tbox .c3 { left: 0; bottom: 0; border-width: 0 0 2px 2px; }
#tbox .c4 { right: 0; bottom: 0; border-width: 0 2px 2px 0; }
#tbox.qt i { border-color: var(--violet); filter: drop-shadow(0 0 4px rgba(199, 166, 255, 0.7)); }
#tbox .tlabel { position: absolute; left: calc(100% + 12px); top: -2px; display: flex; flex-direction: column; gap: 2px; padding-left: 10px; border-left: 1px solid rgba(var(--acc-rgb), 0.55); white-space: nowrap; text-shadow: 0 0 6px rgba(0, 0, 0, 0.9); }
#tbox .tlabel b { font-family: var(--kr); font-size: calc(15px * var(--ui)); font-weight: 500; color: #fff; }
#tbox .tlabel span { font-size: calc(13px * var(--ui)); color: var(--hud2); font-family: var(--kr); }
#tbox .tlabel #t-dist { font-family: var(--lat); font-weight: 600; font-size: calc(14px * var(--ui)); color: var(--hud); }
#tbox.scanned .tlabel #t-type::after { content: '스캔 완료'; margin-left: 8px; padding: 0 5px; font-size: calc(12.5px * var(--ui)); color: var(--good); border: 1px solid rgba(141, 255, 200, 0.45); }
#tarrow { position: absolute; left: 0; top: 0; will-change: transform; }
#tarrow .tri { width: 0; height: 0; border-left: 9px solid transparent; border-right: 9px solid transparent; border-bottom: 16px solid var(--acc); transform-origin: 50% 50%; filter: drop-shadow(0 0 4px rgba(var(--acc-rgb), 0.6)); }
#tarrow span { position: absolute; top: 22px; left: 50%; transform: translateX(-50%); font-size: calc(13px * var(--ui)); white-space: nowrap; color: var(--hud); font-family: var(--kr); text-shadow: 0 1px 4px #000; }

#reticle { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; }
#reticle .r-ring { position: absolute; inset: 0; border: 1px solid var(--hud3); border-radius: 50%; }
#reticle .r-ring::before, #reticle .r-ring::after { content: ''; position: absolute; background: var(--hud2); }
#reticle .r-ring::before { left: -10px; right: -10px; top: 50%; height: 1px; background: linear-gradient(90deg, var(--hud2) 0 8px, transparent 8px calc(100% - 8px), var(--hud2) calc(100% - 8px)); }
#reticle .r-ring::after { top: -10px; bottom: -10px; left: 50%; width: 1px; background: linear-gradient(180deg, var(--hud2) 0 8px, transparent 8px calc(100% - 8px), var(--hud2) calc(100% - 8px)); }
#reticle .r-dot { position: absolute; left: 50%; top: 50%; width: 3px; height: 3px; margin: -1.5px; background: var(--hud); border-radius: 50%; }
#stick { position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px; border: 1.5px solid #fff; border-radius: 50%; box-shadow: 0 0 6px rgba(160, 230, 255, 0.8); will-change: transform; }
#stickline { position: absolute; left: 50%; top: 50%; height: 1px; background: linear-gradient(90deg, rgba(184, 239, 255, 0.5), transparent); transform-origin: 0 50%; will-change: transform, width; }
#prograde, #retro { position: absolute; left: 0; top: 0; width: 22px; height: 22px; margin: -11px; border: 1.5px solid var(--good); border-radius: 50%; will-change: transform; }
#prograde::before, #prograde::after { content: ''; position: absolute; background: var(--good); }
#prograde::before { left: 50%; top: -7px; width: 1.5px; height: 6px; margin-left: -0.75px; }
#prograde::after { left: 50%; top: 50%; width: 3px; height: 3px; margin: -1.5px; border-radius: 50%; }
#retro { border-color: var(--warn); border-style: dashed; }

.ringp { position: absolute; left: 50%; top: 50%; width: 120px; height: 120px; margin: -60px; }
.ringp svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ringp circle { fill: none; stroke-width: 2.5; }
.ringp circle.bg { stroke: var(--hud3); stroke-dasharray: 2 4.9; }
.ringp circle.p { stroke: var(--acc); stroke-dasharray: 276.46; stroke-dashoffset: 276.46; filter: drop-shadow(0 0 4px var(--acc)); }
.ringp span { position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: calc(13.5px * var(--ui)); letter-spacing: 0.08em; font-family: var(--kr); color: var(--hud); text-shadow: 0 1px 4px #000; }
.ringp.q { width: 170px; height: 170px; margin: -85px; }
.ringp.q circle.p { stroke: var(--violet); filter: drop-shadow(0 0 6px var(--violet)); }
.ringp.q span { color: var(--violet); }

/* location (top-left) and log (top-right): floating type on a thin bracket, no panel */
#tl-panel { position: absolute; left: 28px; top: 24px; padding-left: 14px; }
#tl-panel::before, #tr-panel::before { content: ''; position: absolute; top: 2px; bottom: 2px; width: 1px; background: rgba(var(--acc-rgb), 0.45); }
#tl-panel::before { left: 0; }
#tl-panel::after, #tr-panel::after { content: ''; position: absolute; top: 2px; width: 3px; height: 14px; background: var(--acc); }
#tl-panel::after { left: -1px; }
#sys-kind { letter-spacing: 0.14em; }
#sys-name { font-family: var(--kr); font-size: calc(25px * var(--ui)); font-weight: 500; color: #fff; margin-top: 2px; text-shadow: 0 0 12px rgba(0, 0, 0, 0.8); }
#sys-sub { font-size: calc(13.5px * var(--ui)); color: var(--hud2); margin-top: 3px; font-family: var(--kr); text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8); }
#frame-lock { display: flex; align-items: center; gap: 7px; margin-top: 8px; font-size: calc(13px * var(--ui)); color: var(--good); font-family: var(--kr); }
#frame-lock::before { content: ''; width: 7px; height: 7px; border: 1px solid var(--good); transform: rotate(45deg); background: rgba(141, 255, 200, 0.35); }
#tr-panel { position: absolute; right: 28px; top: 24px; padding-right: 14px; text-align: right; font-size: calc(13.5px * var(--ui)); color: var(--hud2); display: flex; flex-direction: column; gap: 4px; font-family: var(--kr); text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8); }
#tr-panel::before { right: 0; }
#tr-panel::after { right: -1px; }
#disc b { color: #fff; font-family: var(--lat); font-size: calc(19px * var(--ui)); font-weight: 600; }
#twarp { color: var(--warn); }
#fps { font-family: var(--lat); opacity: 0.7; }
#fps:empty { display: none; }

/* flight console (bottom-left) */
#flight { position: absolute; left: 24px; bottom: 24px; width: 272px; padding: 11px 16px 14px; --pb: rgba(5, 11, 20, 0.62); }
#mode { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding-bottom: 7px; margin-bottom: 6px; border-bottom: 1px solid rgba(var(--acc-rgb), 0.16); color: var(--hud); }
#mode b { font-family: var(--kr); font-weight: 500; font-size: calc(14px * var(--ui)); letter-spacing: 0.04em; color: #e9f8fd; }
#mode span { font-family: var(--lat); font-weight: 600; font-size: calc(12.5px * var(--ui)); letter-spacing: 0.24em; color: var(--hud2); }
#mode.boost b, #mode.boost span { color: var(--warn); }
#mode.cruise b, #mode.cruise span { color: var(--q); }
#mode.quantum b, #mode.quantum span { color: var(--violet); }
#mode.danger b, #mode.danger span { color: var(--bad); }
#flight:has(#mode.boost) { --fa: var(--warn); }
#flight:has(#mode.quantum) { --fa: var(--violet); }
#flight:has(#mode.danger) { --fa: var(--bad); }
#speed { display: flex; align-items: baseline; gap: 6px; margin: 2px 0 9px; }
#speed b { font-size: calc(46px * var(--ui)); font-weight: 600; color: #fff; line-height: 1; font-variant-numeric: tabular-nums; text-shadow: 0 0 18px rgba(120, 210, 255, 0.35); }
#speed small { font-size: calc(15px * var(--ui)); color: var(--hud2); font-weight: 600; }
.bars { display: grid; grid-template-columns: minmax(56px, max-content) 1fr; align-items: center; gap: 7px 12px; font-size: calc(13px * var(--ui)); color: var(--hud2); font-family: var(--kr); }
.bar { display: contents; }
.bar label { white-space: nowrap; }
.track { position: relative; height: 5px; background: rgba(184, 239, 255, 0.12); }
.track::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 2px), rgba(4, 9, 16, 0.95) calc(10% - 2px) 10%); pointer-events: none; }
.track > div { position: absolute; left: 0; top: 0; bottom: 0; background: var(--acc); }
#b-thr-set { width: 2px !important; background: #fff !important; top: -3px !important; bottom: -3px !important; z-index: 1; }
#b-boost { background: var(--gold) !important; }
#flags { display: flex; gap: 6px; margin-top: 11px; }
#flags span { flex: 1; text-align: center; font-family: var(--kr); font-size: calc(12.5px * var(--ui)); font-weight: 500; padding: 2px 4px; border: 1px solid rgba(184, 239, 255, 0.14); color: rgba(184, 239, 255, 0.38); transition: color 0.16s, border-color 0.16s, background 0.16s; }
#flags span.on { border-color: rgba(var(--acc-rgb), 0.6); color: #fff; background: rgba(var(--acc-rgb), 0.12); }
#flags #f-boost.on { border-color: rgba(255, 198, 110, 0.7); color: var(--warn); background: rgba(255, 198, 110, 0.12); }

/* status lines (bottom-centre) */
#status { position: absolute; left: 50%; bottom: 120px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 5px; font-family: var(--kr); font-size: calc(13.5px * var(--ui)); transition: bottom 0.35s ease; z-index: 3; zoom: var(--capk, 1); }
#status div { display: flex; align-items: center; gap: 8px; padding: 3px 12px 3px 10px; background: rgba(2, 6, 14, 0.66); border-left: 2px solid currentColor; }
#status div::before { content: ''; flex: none; width: 6px; height: 6px; background: currentColor; transform: rotate(45deg); }
#status .w { color: var(--warn); }
#status .b { color: var(--bad); animation: blink 1.2s ease-in-out infinite; }
#status .b::before { width: 9px; height: 8px; transform: none; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
#status .g { color: var(--good); }
#status .q { color: var(--q); }
@keyframes blink { 50% { opacity: 0.55; } }
#hud.cap-on #status { bottom: 210px; }

/* radar (bottom-right) */
#radar-wrap { position: absolute; right: 24px; bottom: 24px; width: 232px; height: 258px; padding: 30px 11px 11px; --pb: rgba(4, 10, 18, 0.46); }
#radar-wrap .rd-h { position: absolute; left: 14px; right: 14px; top: 8px; display: flex; justify-content: space-between; align-items: baseline; font-family: var(--kr); font-size: calc(13px * var(--ui)); color: var(--hud2); }
#radar-wrap .rd-h .kicker { font-size: calc(12.5px * var(--ui)); }
#radar { display: block; width: 210px; height: 210px; }

/* warning band + centre message: fade in/out, never pop */
#warn { position: absolute; left: 50%; top: max(26%, 186px); transform: translate(-50%, -6px); font-family: var(--kr); font-size: calc(15px * var(--ui)); letter-spacing: 0.04em; padding: 7px 22px; color: var(--warn); white-space: nowrap;
  background: linear-gradient(90deg, transparent, rgba(30, 18, 0, 0.62) 14%, rgba(30, 18, 0, 0.62) 86%, transparent);
  opacity: 0; transition: opacity var(--t-msg) ease, transform var(--t-msg) var(--ease); zoom: var(--capk, 1); }
#warn::before, #warn::after { content: ''; position: absolute; left: 10%; right: 10%; height: 1px; background: rgba(255, 198, 110, 0.6); }
#warn::before { top: 0; } #warn::after { bottom: 0; }
#warn.show { opacity: 1; transform: translate(-50%, 0); }
#center-msg { position: absolute; left: 50%; top: 38%; transform: translate(-50%, calc(-50% + 8px)); text-align: center; font-family: var(--kr); opacity: 0; transition: opacity var(--t-msg) ease, transform var(--t-msg) var(--ease); text-shadow: 0 2px 14px rgba(0, 0, 0, 0.85); }
#center-msg.show { opacity: 1; transform: translate(-50%, -50%); }
#center-msg h3 { display: inline-flex; align-items: center; gap: 18px; font-size: calc(30px * var(--ui)); font-weight: 300; color: #fff; letter-spacing: 0.08em; white-space: nowrap; }
#center-msg h3::before, #center-msg h3::after { content: ''; width: 46px; height: 1px; background: rgba(var(--acc-rgb), 0.7); }
#center-msg p { margin-top: 8px; color: #cfe8f2; font-size: calc(15px * var(--ui)); }
#center-msg.alert h3 { color: #ffd9a0; }
#center-msg.alert h3::before, #center-msg.alert h3::after { background: rgba(255, 106, 106, 0.85); }
#keyhint { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; gap: 16px; font-size: calc(13px * var(--ui)); color: var(--hud2); font-family: var(--kr); white-space: nowrap; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9); }
#keyhint kbd { margin-right: 0.4em; }
#lock-hint { position: absolute; left: 50%; top: 60%; transform: translateX(-50%); padding: 9px 20px; font-family: var(--kr); font-size: calc(14.5px * var(--ui)); color: #fff; }

/* NOVA transmission (left, above the console) */
#nova { position: absolute; left: 24px; bottom: 222px; width: min(440px, 38vw); display: grid; grid-template-columns: 62px 1fr; gap: 14px; align-items: center; padding: 11px 16px 11px 11px; font-family: var(--kr); opacity: 0; transition: opacity 0.5s; pointer-events: none; zoom: var(--capk, 1); --pb: rgba(5, 12, 22, 0.74); }
#nova.on { opacity: 1; }
.nv-port { position: relative; width: 62px; height: 62px; overflow: hidden; border: 1px solid rgba(var(--acc-rgb), 0.5); background: radial-gradient(circle at 50% 46%, rgba(var(--acc-rgb), 0.28), rgba(3, 12, 22, 0.95) 68%); clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px); }
.nv-port i { position: absolute; display: block; }
.nv-port .ring { left: 50%; top: 45%; width: 34px; height: 34px; margin: -17px; border: 1px solid rgba(var(--acc-rgb), 0.7); border-radius: 50%; border-top-color: transparent; animation: nvSpin 7s linear infinite; }
.nv-port .core { left: 50%; top: 45%; width: 12px; height: 12px; margin: -6px; border-radius: 50%; background: #c9f5ff; box-shadow: 0 0 12px rgba(var(--acc-rgb), 0.95); animation: nvCore 1.6s ease-in-out infinite; }
.nv-port .scan { inset: 0; background: repeating-linear-gradient(180deg, rgba(0, 0, 0, 0.32) 0 1px, transparent 1px 3px); }
.nv-port .wave { left: 14px; right: 14px; bottom: 6px; height: 9px; display: flex; align-items: flex-end; justify-content: space-between; }
.nv-port .wave s { width: 3px; height: 100%; background: var(--acc); transform-origin: bottom; animation: nvWave 0.9s ease-in-out infinite; }
.nv-port .wave s:nth-child(2) { animation-delay: -0.3s; } .nv-port .wave s:nth-child(3) { animation-delay: -0.6s; }
.nv-port .wave s:nth-child(4) { animation-delay: -0.15s; } .nv-port .wave s:nth-child(5) { animation-delay: -0.45s; }
#nova:not(.on) .nv-port i, #nova:not(.on) .nv-port s { animation-play-state: paused; }
@keyframes nvSpin { to { transform: rotate(360deg); } }
@keyframes nvCore { 50% { transform: scale(0.75); opacity: 0.7; } }
@keyframes nvWave { 0%, 100% { transform: scaleY(0.25); } 50% { transform: scaleY(1); } }
#nova .nv-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
#nova .nv-h b { font-size: calc(14px * var(--ui)); font-weight: 500; color: var(--acc); letter-spacing: 0.08em; }
#nova .nv-h span { font-size: calc(12.5px * var(--ui)); color: var(--hud2); }
#nova p { margin: 0; font-size: calc(15px * var(--ui)); line-height: 1.6; color: #e4f2fa; min-height: 1.6em; }

/* tracked contract (top-right) */
#mtrack { position: absolute; right: 24px; top: 128px; width: 304px; padding: 11px 15px 12px; font-family: var(--kr); zoom: var(--capk, 1); --fl: rgba(var(--gold-rgb), 0.4); --fa: var(--gold); --pb: rgba(6, 12, 22, 0.66); }
#mtrack .k { font-size: calc(12.5px * var(--ui)); letter-spacing: 0.06em; color: var(--gold); margin-bottom: 4px; }
#mtrack b { display: block; font-size: calc(15px * var(--ui)); font-weight: 500; color: #eef6fb; }
#mtrack p { margin: 3px 0 0; font-size: calc(13px * var(--ui)); line-height: 1.55; color: #b9cdd8; }
#mtrack small { display: block; margin-top: 7px; padding-top: 6px; border-top: 1px solid rgba(var(--gold-rgb), 0.18); font-size: calc(13px * var(--ui)); color: #ffd48a; }

/* ------------------------------------------------ scan card */
#scan-card { position: fixed; right: 24px; top: 120px; width: 340px; z-index: 6; padding: 16px 20px 18px; animation: slidein 0.35s var(--ease); pointer-events: none; --pb: var(--panel-solid); }
@keyframes slidein { from { opacity: 0; transform: translateX(20px); } }
#scan-card h3 { font-size: calc(22px * var(--ui)); font-weight: 500; color: #fff; margin: 4px 0 3px; }
#scan-card h3 b { font-weight: inherit; }
#scan-card .t { font-size: calc(13.5px * var(--ui)); color: var(--hud2); }
#scan-card .rar { float: right; font-family: var(--lat); font-weight: 700; font-size: calc(12.5px * var(--ui)); letter-spacing: 0.15em; color: var(--gold); padding: 0 6px; border: 1px solid rgba(var(--gold-rgb), 0.5); }
#scan-card .rar:empty { display: none; }
#scan-card dl { display: grid; grid-template-columns: auto 1fr; margin: 14px 0; font-size: calc(13.5px * var(--ui)); }
#scan-card dt, #scan-card dd { padding: 4px 0; border-bottom: 1px solid rgba(184, 239, 255, 0.07); }
#scan-card dt { color: var(--hud2); padding-right: 14px; }
#scan-card dd { color: #eafaff; text-align: right; font-family: var(--lat); font-weight: 600; font-size: calc(14.5px * var(--ui)); }
#scan-card p { font-size: calc(13.5px * var(--ui)); line-height: 1.68; color: #cfe9f2; }
/* never taller than the screen: the data rows give way first, so the "더 알아보기" row always stays visible */
#scan-card { max-height: calc(100vh - 140px); display: flex; flex-direction: column; }
#scan-card > * { flex: none; }
#scan-card > dl { flex: 0 1 auto; min-height: 0; overflow: hidden; }
#scan-card > .rar { position: absolute; right: 20px; top: 16px; }
#scan-card.open .sc-more { flex: 0 1 auto; min-height: 0; display: flex; flex-direction: column; }
#scan-card.open .sc-x { min-height: 0; overflow: hidden; }
#scan-card.wide { width: 420px; }
#scan-card.open dl { display: none; }   /* expanded: the long text takes the place of the data rows */
#scan-card.open > p { margin-top: 12px; }
#scan-card .sc-more { margin-top: 12px; border-top: 1px solid rgba(184, 239, 255, 0.1); padding-top: 9px; }
#scan-card .sc-tog { pointer-events: auto; display: flex; align-items: center; gap: 8px; width: 100%; padding: 4px 0; font-size: calc(14px * var(--ui)); color: var(--hud); --bl: transparent; --bb: transparent; }
#scan-card .sc-tog::before { display: none; }
#scan-card .sc-tog::after { content: ''; order: -1; width: 6px; height: 6px; border-right: 1.5px solid var(--acc); border-bottom: 1.5px solid var(--acc); transform: rotate(-45deg); transition: transform 0.16s; }
#scan-card .sc-tog:hover { color: #fff; }
#scan-card .sc-tog kbd { margin: 0 0 0 auto; }
#scan-card .sc-tog em { font-style: normal; font-size: calc(13px * var(--ui)); color: var(--hud2); }
#scan-card.open .sc-tog::after { transform: rotate(45deg); }
#scan-card .sc-x { display: none; }
#scan-card.open .sc-x { display: block; animation: scMore 0.3s var(--ease); }
@keyframes scMore { from { opacity: 0; transform: translateY(-4px); } }
#scan-card .sc-x p { margin-top: 8px; color: #dcf0f6; }
#scan-card .sc-link { pointer-events: auto; display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 7px 14px; font-size: calc(13.5px * var(--ui)); color: #fff; text-decoration: none;
  border: 1px solid rgba(var(--acc-rgb), 0.7); background: rgba(var(--acc-rgb), 0.12); clip-path: polygon(0 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%); }
#scan-card .sc-link:hover { background: rgba(var(--acc-rgb), 0.26); }
#scan-card .sc-link::after { content: '↗'; font-family: var(--lat); font-weight: 700; color: var(--acc); }
#scan-card .sc-hint { display: block; margin-top: 6px; font-size: calc(12.5px * var(--ui)); color: var(--hud2); }

/* ------------------------------------------------ toasts: the left "log" column between location and NOVA, two at most (screens.js) */
#toasts { position: fixed; left: 24px; top: 150px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; z-index: 8; pointer-events: none; }
.toast { min-width: 280px; max-width: min(420px, 36vw); padding: 10px 18px 11px 18px; text-align: left; font-size: calc(14.5px * var(--ui)); line-height: 1.5; font-family: var(--kr); color: #dff3fa; zoom: var(--capk, 1); --pb: var(--panel-solid); --ch: 8px;
  animation: toastin var(--t-msg) var(--ease); transition: opacity var(--t-msg) ease, transform var(--t-msg) var(--ease); }
.toast.ach { --fl: rgba(var(--gold-rgb), 0.6); --fa: var(--gold); --pb: rgba(14, 12, 8, 0.94); }
.toast .k { display: block; font-family: var(--lat); font-weight: 600; font-size: calc(12.5px * var(--ui)); letter-spacing: 0.28em; color: rgba(var(--acc-rgb), 0.9); margin-bottom: 2px; }
.toast.ach .k { color: var(--gold); }
.toast b { color: #fff; font-weight: 500; }
.toast.ach b { color: #fff3dc; font-size: calc(15.5px * var(--ui)); }
.toast small { display: block; color: var(--hud2); margin-top: 3px; font-size: calc(13px * var(--ui)); line-height: 1.5; }
.toast small.rw { color: #ffd48a; margin-top: 6px; padding-top: 5px; border-top: 1px solid rgba(var(--gold-rgb), 0.2); }
.toast.out { opacity: 0; transform: translateX(-14px); }
@keyframes toastin { from { opacity: 0; transform: translateX(-16px); } }

/* ------------------------------------------------ unlock banner (screens.showUnlock) */
#unlock { position: fixed; left: 50%; top: 22px; z-index: 9; transform: translateX(-50%); min-width: 440px; max-width: 620px; padding: 14px 34px 16px; text-align: center; font-family: var(--kr); pointer-events: none;
  --fl: rgba(var(--gold-rgb), 0.62); --fa: var(--gold); --pb: rgba(10, 10, 8, 0.86); --ch: 12px; }
#unlock::after { left: 50%; width: 64px; margin-left: -32px; }
#unlock .ul-k { display: flex; align-items: center; justify-content: center; gap: 12px; font-family: var(--lat); font-weight: 600; font-size: calc(12.5px * var(--ui)); letter-spacing: 0.3em; color: var(--gold); }
#unlock .ul-k::before, #unlock .ul-k::after { content: ''; width: 34px; height: 1px; background: rgba(var(--gold-rgb), 0.6); }
#unlock .ul-k em { font-style: normal; font-family: var(--kr); letter-spacing: 0.08em; font-weight: 500; }
#unlock h3 { margin: 6px 0 4px; font-size: calc(26px * var(--ui)); font-weight: 500; letter-spacing: 0.04em; color: #fff7e6; }
#unlock p { font-size: calc(14.5px * var(--ui)); line-height: 1.6; color: #e6dcc6; }
#unlock .ul-keys { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
#unlock .ul-keys:empty { display: none; }
#unlock .ul-keys kbd { margin: 0; font-size: calc(15px * var(--ui)); padding: 2px 10px; color: #fff3d6; border-color: rgba(var(--gold-rgb), 0.7); border-bottom-color: rgba(var(--gold-rgb), 0.35); background: rgba(40, 30, 10, 0.85); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 2px 0 rgba(150, 110, 40, 0.7); }
#unlock.in { animation: ulIn 0.65s var(--ease) both; }
#unlock.out { animation: ulOut 0.45s ease both; }
@keyframes ulIn { from { opacity: 0; clip-path: inset(0 50% 0 50%); } 35% { opacity: 1; } to { opacity: 1; clip-path: inset(-4px -4px -4px -4px); } }
@keyframes ulOut { to { opacity: 0; transform: translate(-50%, -10px); } }

/* ------------------------------------------------ map */
#map { position: fixed; inset: 0; z-index: 10; background: rgba(1, 3, 8, 0.92); }
#map-canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; }
#map-canvas:active { cursor: grabbing; }
.map-head { position: absolute; left: 32px; top: 26px; pointer-events: none; }
.map-head h2 { font-size: calc(30px * var(--ui)); font-weight: 300; color: #fff; margin: 4px 0; }
.map-head p { font-size: calc(13.5px * var(--ui)); color: var(--hud2); }
.map-tabs { margin-top: 12px; pointer-events: auto; }
#map-info { position: absolute; right: 32px; top: 26px; width: 340px; padding: 20px; --pb: var(--panel-solid); }
#map-info h3 { font-size: calc(22px * var(--ui)); font-weight: 500; color: #fff; margin: 4px 0 6px; }
#map-info p { font-size: calc(13.5px * var(--ui)); color: #cfe9f2; line-height: 1.6; }
#map-info dl { display: grid; grid-template-columns: auto 1fr; gap: 5px 12px; margin: 14px 0; font-size: calc(13.5px * var(--ui)); }
#map-info dt { color: var(--hud2); }
#map-info dd { text-align: right; color: #fff; }
#map-info button { width: 100%; margin-top: 8px; }
#map-info button + button { margin-top: 6px; }
#map-legend { position: absolute; left: 32px; bottom: 26px; display: flex; gap: 18px; font-size: calc(13px * var(--ui)); color: var(--hud2); }
#map-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
#map-legend i.ring { background: none; border: 1.5px solid var(--good); }
#map-legend i.civ { background: none; border: 1.5px solid #8dffc8; }

/* ------------------------------------------------ windows (codex, help, achievements, guide, pause, hangar) */
#codex, #help, #achwin, #guide, #pause, #hangar { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(1, 3, 8, 0.8); animation: winIn 0.3s ease; }
#codex, #help { z-index: 11; }
#achwin, #guide, #pause { z-index: 12; }
#hangar { z-index: 40; font-family: var(--kr); background: rgba(2, 5, 10, 0.6); }
@keyframes winIn { from { opacity: 0; } }
.panel-in, .pause-in, .guide-in, .aw-in, .hg-in { --pb: var(--panel-solid); --ch: 14px; animation: winPanel 0.35s var(--ease); }
.panel-in::after, .pause-in::after, .guide-in::after, .aw-in::after, .hg-in::after { width: 56px; }
@keyframes winPanel { from { transform: translateY(10px); } }
.panel-in { width: min(1000px, 92vw); max-height: 86vh; display: flex; flex-direction: column; padding: 26px 30px; }
.panel-in > :last-child { overflow: auto; min-height: 0; padding-right: 6px; }
.p-head { display: flex; align-items: flex-end; gap: 24px; margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid rgba(184, 239, 255, 0.1); }
.p-head h2 { font-size: calc(28px * var(--ui)); font-weight: 300; color: #fff; margin-top: 4px; }
.p-head .close { margin-left: auto; }
.p-head > div:last-child:not(:first-child) { margin-left: auto; display: flex; gap: 8px; }
.tabs { display: flex; gap: 6px; }
/* help (H): tabs + search, one row per control — keycaps on the left, what it does on the right */
#help .panel-in { height: min(760px, 86vh); }
#help .p-head { align-items: center; }
.hk-search { position: relative; flex: 1; max-width: 360px; margin-left: auto; display: flex; align-items: center; }
.hk-search i { position: absolute; left: 11px; top: 50%; width: 11px; height: 11px; margin-top: -7px; border: 1.5px solid var(--hud2); border-radius: 50%; pointer-events: none; }
.hk-search i::after { content: ''; position: absolute; right: -5px; bottom: -4px; width: 6px; height: 1.5px; background: var(--hud2); transform: rotate(45deg); }
.hk-search input { width: 100%; padding: 8px 36px 8px 32px; font: inherit; font-family: var(--kr); font-size: calc(14px * var(--ui)); color: #fff; background: rgba(10, 22, 34, 0.7); border: 1px solid var(--line); outline: none; user-select: text; -webkit-user-select: text;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%); }
.hk-search input::placeholder { color: rgba(184, 239, 255, 0.42); }
.hk-search input:focus { border-color: rgba(var(--acc-rgb), 0.8); background: rgba(14, 30, 46, 0.85); }
.hk-search input::-webkit-search-cancel-button { filter: invert(0.8); cursor: pointer; }
.hk-search kbd { position: absolute; right: 6px; margin: 0; pointer-events: none; opacity: 0.7; }
.hk-search input:focus ~ kbd, .hk-search input:not(:placeholder-shown) ~ kbd { display: none; }
#help .p-head > div:last-child:not(:first-child) { margin-left: 0; }
.hk-tabs { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; margin: -4px 0 16px; }
.hk-tabs button { padding: 7px 14px 7px 10px; font-size: calc(14px * var(--ui)); }
.hk-tabs button kbd { margin-right: 0.5em; opacity: 0.75; }
.hk-tabs.searching button { opacity: 0.45; }
.hk-tabs.searching button.on::after { display: none; }
.hk-qe { margin-left: auto; font-size: calc(13px * var(--ui)); color: var(--hud2); }
.hk-body { flex: 1; }
.hk-pane { display: none; }
.hk-pane.on, .hk-body.searching .hk-pane.hit { display: block; }
.hk-body.searching .hk-pane:not(.hit) { display: none; }
.hk-body.searching .hk-pane + .hk-pane.hit { margin-top: 18px; }
.hk-pane h3 { font-size: calc(15px * var(--ui)); font-weight: 500; letter-spacing: 0.06em; color: var(--acc); margin-bottom: 4px; border-bottom: 1px solid rgba(var(--acc-rgb), 0.2); padding-bottom: 7px; }
.hk-pane h4 { margin: 18px 0 2px; font-size: calc(13.5px * var(--ui)); font-weight: 500; letter-spacing: 0.08em; color: var(--gold); }
.hk { display: grid; grid-template-columns: 172px 1fr; gap: 18px; align-items: baseline; padding: 9px 4px; border-bottom: 1px solid rgba(184, 239, 255, 0.07); }
.hk:hover { background: rgba(var(--acc-rgb), 0.05); }
.hk-k { display: flex; flex-wrap: wrap; gap: 5px 0; justify-content: flex-end; text-align: right; font-size: calc(14px * var(--ui)); color: var(--hud2); }
.hk p { font-size: calc(14.5px * var(--ui)); color: #dff5fc; line-height: 1.6; }
.hk p b { color: #fff; font-weight: 500; }
.hk p kbd { font-size: 0.84em; }
.hk.tip { grid-template-columns: 1fr; padding-left: 194px; }
.hk.tip p { color: #b9d8e2; font-size: calc(14px * var(--ui)); }
.hk.dev { display: none; }
#help.dev .hk.dev { display: grid; }
.hk.dev .hk-k kbd { border-color: rgba(var(--gold-rgb), 0.55); }
.hk-body.searching .miss, .hk-body.searching .hk-pane h4 { display: none; }
.hk-empty { padding: 40px 0; text-align: center; font-size: calc(14.5px * var(--ui)); color: var(--hud2); }
.hk-pane.credits p { font-size: calc(14px * var(--ui)); color: #c6dde6; margin: 10px 0; line-height: 1.6; max-width: 820px; }
.codex-sys { margin-bottom: 22px; }
.codex-sys h4 { font-size: calc(16px * var(--ui)); font-weight: 500; color: #fff; margin-bottom: 8px; display: flex; gap: 10px; align-items: baseline; }
.codex-sys h4 small { font-size: calc(13px * var(--ui)); color: var(--hud2); font-weight: 400; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.card { padding: 10px 12px; border: 1px solid rgba(184, 239, 255, 0.14); background: rgba(12, 20, 34, 0.5); font-size: calc(13px * var(--ui)); color: var(--hud2); clip-path: polygon(0 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%); }
.card b { display: block; color: #fff; font-size: calc(14.5px * var(--ui)); font-weight: 500; margin-bottom: 2px; }
.card.locked { opacity: 0.45; }
.card.locked b { color: var(--hud2); }
.card.ach-on { border-color: rgba(var(--gold-rgb), 0.55); }
.card.ach-on b { color: var(--gold); }
.card.hidden-ach.locked { border-style: dashed; }
.card .hint { color: var(--violet); font-style: normal; opacity: 0.85; }
.empty { color: var(--hud2); font-size: calc(14px * var(--ui)); padding: 30px 0; text-align: center; }
.ach-sum { margin-bottom: 12px; color: var(--hud2); font-size: calc(13.5px * var(--ui)); }
.ach-sum b { color: #fff; font-size: calc(18px * var(--ui)); }
.ach-bar { height: 4px; margin-top: 6px; background: rgba(184, 239, 255, 0.1); }
.ach-bar i { display: block; height: 100%; background: var(--gold); }
.ach-h { margin: 16px 0 8px; font-weight: 500; letter-spacing: 0.06em; color: var(--hud); font-size: calc(14px * var(--ui)); }
.ach-h em { font-style: normal; color: var(--hud2); margin-left: 6px; font-size: calc(13px * var(--ui)); }

/* pause / settings */
.pause-in { width: min(540px, 92vw); height: min(720px, 92vh); display: flex; flex-direction: column; gap: 14px; padding: 26px 28px 22px; }
.pause-in > * { flex: none; }
.pause-in h2 { font-size: calc(30px * var(--ui)); font-weight: 300; color: #fff; margin: 2px 0 0; }
.pause-in > button.primary { padding: 11px 16px; font-size: calc(15px * var(--ui)); }
.ps-tabs { display: flex; border-bottom: 1px solid rgba(184, 239, 255, 0.12); }
/* SF places switch: the one setting shown before the tabs */
.ps-feature { padding: 14px 16px 15px; --pb: rgba(26, 20, 8, 0.6); --ch: 10px; }
.ps-feature .pf-h { display: flex; align-items: baseline; gap: 10px; }
.ps-feature .kicker { color: var(--gold); }
.ps-feature b { font-size: calc(17px * var(--ui)); font-weight: 600; color: #fff1d8; }
.ps-feature p { margin: 6px 0 11px; font-size: calc(13.5px * var(--ui)); line-height: 1.55; color: #e2d6bf; }
.ps-feature .seg button { padding: 9px 10px; font-size: calc(14px * var(--ui)); }
.ps-feature .seg button.on { color: #1a1206; --bb: var(--gold); --bl: var(--gold); font-weight: 600; }
.ps-feature .seg button.on::after { display: none; }
.ps-tabs button { flex: 1; padding: 8px 4px; font-size: calc(14px * var(--ui)); color: var(--hud2); --bl: transparent; --bb: transparent; }
.ps-tabs button::before { clip-path: none; }
.ps-tabs button.on { color: #fff; --bl: transparent; --bb: rgba(var(--acc-rgb), 0.1); }
.ps-tabs button.on::after { left: 0; right: 0; }
.pause-body { flex: 1; display: block; overflow-y: auto; min-height: 0; padding-right: 6px; margin-right: -6px; }
.ps-pane { display: none; flex-direction: column; gap: 16px; padding: 4px 0 6px; }
.ps-pane.on { display: flex; }
.ps-foot { padding-top: 14px; border-top: 1px solid rgba(184, 239, 255, 0.1); }
.setting .sub0 { font-size: calc(13px * var(--ui)); line-height: 1.5; color: var(--hud2); }
.setting.danger { margin-top: 6px; padding-top: 14px; border-top: 1px dashed rgba(255, 106, 106, 0.3); }
button.warn { --bl: rgba(255, 106, 106, 0.55); color: #ffb3b3; }
button.warn:hover:not(:disabled) { --bl: #ff8a8a; --bb: rgba(255, 106, 106, 0.16); color: #fff; }
textarea.code { width: 100%; resize: vertical; min-height: 64px; padding: 8px 10px; font-family: ui-monospace, Consolas, monospace; font-size: calc(13px * var(--ui)); line-height: 1.45; word-break: break-all;
  color: #dff5fc; background: rgba(10, 22, 34, 0.7); border: 1px solid var(--line); outline: none; user-select: text; -webkit-user-select: text; }
textarea.code:focus { border-color: rgba(var(--acc-rgb), 0.8); }
textarea.code::placeholder { color: rgba(184, 239, 255, 0.4); font-family: var(--kr); }
.ps-confirm { padding: 14px 16px; border: 1px solid rgba(var(--gold-rgb), 0.55); background: rgba(var(--gold-rgb), 0.07); font-size: calc(14px * var(--ui)); line-height: 1.6; color: #f4e6c6; }
.ps-confirm b { color: var(--gold); font-weight: 600; }
.ps-confirm.bad { border-color: rgba(255, 106, 106, 0.55); background: rgba(255, 106, 106, 0.07); color: #ffd7d7; }
.ps-confirm.bad b { color: #ff9a9a; }
.ps-confirm ul { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 14px; margin: 8px 0 12px; }
.ps-confirm ul b { font-family: var(--lat); font-size: calc(16px * var(--ui)); margin-left: 4px; }
.ps-confirm .row { margin-top: 10px; }
#prog-msg:empty { display: none; }
#prog-msg.ok { color: var(--good); }
#prog-msg.err { color: #ff9a9a; }
.setting { display: flex; flex-direction: column; gap: 7px; font-size: calc(14px * var(--ui)); color: #cfe6ef; }
.setting > label span { color: #fff; font-family: var(--lat); font-weight: 600; margin-left: 4px; }
.setting.inline { flex-direction: row; align-items: center; gap: 14px; justify-content: center; }
.setting.check { gap: 3px; }
.setting.check label { display: flex; gap: 10px; align-items: center; cursor: pointer; }
.setting.check label:hover { color: #fff; }
.setting .sub { padding-left: 27px; font-size: calc(13px * var(--ui)); line-height: 1.5; color: var(--hud2); }
.seg { display: flex; }
.seg button { flex: 1; padding: 7px 10px; }
.seg button + button { margin-left: -1px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.row button { flex: 1; }
.note { font-size: calc(13px * var(--ui)); color: var(--hud2); line-height: 1.5; }
#keys { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; }
#keys button { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; font-size: calc(13.5px * var(--ui)); }
#keys button kbd { min-width: 34px; margin: 0; text-align: center; }
#keys button.wait { --bl: var(--gold); color: var(--gold); }

#photo-ui { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 7; padding: 9px 20px; font-size: calc(13.5px * var(--ui)); color: var(--hud2); text-align: center; pointer-events: none; background: rgba(2, 6, 12, 0.7); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
#photo-ui b { color: #fff; }
#photo-vals { margin-top: 4px; font-family: var(--lat); font-size: calc(13.5px * var(--ui)); }

#fader { position: fixed; inset: 0; background: #000; opacity: 0; pointer-events: none; z-index: 20; transition: opacity 0.9s; }

/* ------------------------------------------------ loading */
#loading { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; background: var(--bg); transition: opacity 0.8s; }
#loading.fade { opacity: 0; pointer-events: none; }
.load-in { width: min(380px, 80vw); text-align: center; }
.load-bar { position: relative; height: 4px; background: rgba(184, 239, 255, 0.1); margin: 18px 0 12px; overflow: hidden; }
.load-bar::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 calc(5% - 2px), var(--bg) calc(5% - 2px) 5%); }
#load-fill { height: 100%; width: 0; background: var(--acc); transition: width 0.3s; box-shadow: 0 0 10px var(--acc); }
#load-text { font-size: calc(13.5px * var(--ui)); color: var(--hud2); }

/* ------------------------------------------------ lock-on */
#lock { position: absolute; left: 0; top: 0; width: 60px; height: 60px; will-change: transform; }
#lock::before { content: ''; position: absolute; inset: 0; border: 1.5px dashed rgba(255, 214, 138, 0.85); border-radius: 50%; animation: lockspin 6s linear infinite; }
#lock span { position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); white-space: nowrap; font-family: var(--kr); font-size: calc(13px * var(--ui)); color: #ffe2a8; text-shadow: 0 0 6px #000; }
#lock.same::before { border-style: solid; border-color: rgba(var(--acc-rgb), 0.9); }
#lock.same span { color: var(--acc); }
#lock.flash::before { border-color: #fff; box-shadow: 0 0 18px rgba(255, 255, 255, 0.7); }
@keyframes lockspin { to { transform: rotate(360deg); } }

/* ------------------------------------------------ approach caption */
#caption { position: absolute; left: 50%; bottom: 52px; transform: translateX(-50%); width: min(760px, 86vw); padding: 16px 28px 14px; text-align: center; font-family: var(--kr); transition: opacity 0.9s; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9); z-index: 3; zoom: var(--capk, 1);
  background: radial-gradient(ellipse at center, rgba(2, 6, 14, 0.72) 0%, rgba(2, 6, 14, 0.5) 55%, rgba(2, 6, 14, 0) 100%); }
#caption.out { opacity: 0; }
#cap-tag { display: inline-block; font-family: var(--kr); font-weight: 500; font-size: calc(13px * var(--ui)); letter-spacing: 0.12em; color: var(--gold); border: 1px solid rgba(var(--gold-rgb), 0.55); background: rgba(40, 28, 6, 0.35); padding: 1px 10px; margin-bottom: 7px; text-shadow: none; }
#cap-tag.fic { border-color: rgba(245, 154, 216, 0.6); background: rgba(60, 10, 46, 0.4); }
#cap-name { font-size: calc(36px * var(--ui)); font-weight: 300; letter-spacing: 0.12em; color: #fff; }
#cap-name.fic b, #cap-name b { font-weight: 300; }
#cap-text { margin-top: 8px; font-size: calc(16.5px * var(--ui)); line-height: 1.7; color: #d6eef7; min-height: 1.7em; }

/* ------------------------------------------------ quantum destinations */
#qpanel { position: absolute; right: 24px; top: 96px; width: 384px; padding: 13px 15px 13px; font-family: var(--kr); --fl: rgba(199, 166, 255, 0.5); --fa: var(--violet); --pb: rgba(8, 9, 24, 0.86); }
.qp-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.qp-head b { color: #ece2ff; font-size: calc(16px * var(--ui)); font-weight: 500; letter-spacing: 0.06em; }
.qp-head em { font-style: normal; font-family: var(--lat); font-weight: 600; font-size: calc(14px * var(--ui)); color: var(--hud2); }
#qpanel .qp-tabs { display: flex; gap: 4px; margin-bottom: 8px; }
#qpanel .qp-tabs span { flex: 1; text-align: center; padding: 4px 2px; font-size: calc(12.5px * var(--ui)); white-space: nowrap; border: 1px solid rgba(184, 239, 255, 0.14); color: var(--hud2); }
#qpanel .qp-tabs span.on { border-color: var(--violet); color: #fff; background: rgba(199, 166, 255, 0.18); box-shadow: inset 0 -2px 0 var(--violet); }
.qp-body { position: relative; display: flex; gap: 6px; }
#qp-list { flex: 1; min-height: 60px; }
#qp-list div { display: grid; grid-template-columns: 28px 1fr auto; grid-template-rows: auto auto; column-gap: 8px; padding: 4px 6px 4px 4px; border-bottom: 1px solid rgba(184, 239, 255, 0.07); font-size: calc(13.5px * var(--ui)); line-height: 1.32; }
#qp-list div kbd { grid-row: span 2; align-self: center; margin: 0; }
#qp-list div b { font-weight: 500; color: #eaf6ff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#qp-list div span { grid-column: 2; font-size: calc(12.5px * var(--ui)); color: var(--hud2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#qp-list div em { grid-row: 1; grid-column: 3; font-style: normal; font-size: calc(13.5px * var(--ui)); font-weight: 600; color: var(--q); font-family: var(--lat); }
#qp-list div.hv { background: rgba(199, 166, 255, 0.2); box-shadow: inset 2px 0 0 var(--violet); }
#qp-list div.tg b { color: var(--q); }
#qp-list div.fic b, #qp-list div.tg.fic b { color: var(--fic); }
#qp-list div.empty { display: block; border: 0; }
#qp-bar { position: relative; width: 4px; background: rgba(184, 239, 255, 0.08); }
#qp-bar i { position: absolute; left: 0; right: 0; background: var(--violet); opacity: 0.75; }
.qp-foot { margin-top: 10px; font-size: calc(12.5px * var(--ui)); color: var(--hud2); line-height: 1.55; }

/* ------------------------------------------------ quick-start guide */
.guide-in { width: min(880px, 92vw); padding: 28px 32px 22px; }
.guide-in h2 { margin: 4px 0 6px; font-weight: 300; font-size: calc(28px * var(--ui)); letter-spacing: 0.04em; color: #fff; }
.g-sub { color: var(--hud2); margin: 0 0 18px; font-size: calc(14px * var(--ui)); }
.g-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.g-card { padding: 14px 16px; border: 1px solid rgba(184, 239, 255, 0.14); background: rgba(10, 18, 32, 0.6); clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%); }
.g-card .kicker { margin-bottom: 2px; }
.g-card h3 { margin: 0 0 8px; font-size: calc(16px * var(--ui)); font-weight: 500; color: #fff; letter-spacing: 0.04em; }
.g-card p { margin: 6px 0; font-size: calc(13.5px * var(--ui)); line-height: 1.6; color: #d6eef7; }
.g-card kbd { margin-right: 3px; }
.g-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; color: var(--hud2); font-size: calc(13.5px * var(--ui)); }
.g-foot label { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.g-foot label:hover { color: #fff; }
#guide-go { padding: 10px 28px; font-size: calc(15px * var(--ui)); letter-spacing: 0.08em; }

/* STAY letters */
#bigletter { position: fixed; left: 50%; top: 42%; transform: translate(-50%, -50%); z-index: 9; pointer-events: none; font-family: var(--lat), serif; font-weight: 300;
  font-size: min(22vw, 260px); letter-spacing: 0.25em; color: #fff4e0; text-shadow: 0 0 40px rgba(255, 210, 150, 0.8), 0 0 120px rgba(255, 170, 90, 0.5); opacity: 0; white-space: nowrap; }
#bigletter.pop { animation: bigPop 1.6s ease-out forwards; }
@keyframes bigPop { 0% { opacity: 0; transform: translate(-50%, -50%) scale(1.35); filter: blur(8px); } 12% { opacity: 1; transform: translate(-50%, -50%) scale(1); filter: blur(0); } 70% { opacity: 0.9; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(0.96); } }

/* harmless hit: red screen edge only */
#hitflash { position: fixed; inset: 0; pointer-events: none; z-index: 8; opacity: 0; --hc: rgba(255,40,30,0.75);
  background: radial-gradient(ellipse at center, rgba(0,0,0,0) 55%, var(--hc) 100%); }
#hitflash.on { animation: hitA 0.7s ease-out; }
@keyframes hitA { 0% { opacity: 1; } 100% { opacity: 0; } }

/* ------------------------------------------------ service record window (O) — tabs: overview · collection · achievements · contracts · titles · journal
   teal = progress / navigation, gold = completed & rewards, violet = systems & hidden, magenta = fictional places.
   motion: fills ease out over 1.2 s, numbers count up, anything new since the last visit shimmers */
#mtrack { display: none !important; }   /* contracts live in the record window now */
.aw-in { --vio-rgb: 199, 166, 255; --fic-rgb: 245, 154, 216; width: min(1240px, 95vw); height: min(820px, 90vh); display: grid; grid-template-rows: auto 1fr; font-family: var(--kr); }
.aw-head { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 10px 20px; padding: 20px 26px 0; }
.aw-id { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.aw-id .kicker { width: 100%; }
.aw-id h2 { margin: 0; font-weight: 300; font-size: calc(28px * var(--ui)); color: #fff; letter-spacing: 0.06em; }
.aw-head > .close { grid-row: 1; grid-column: 2; align-self: center; }
.aw-tt { display: inline-flex; align-items: center; gap: 10px; padding: 4px 14px 5px 12px; border: 1px solid rgba(184, 239, 255, 0.16); background: rgba(12, 20, 34, 0.6);
  clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px); }
.aw-tt span { font-size: calc(12.5px * var(--ui)); letter-spacing: 0.08em; color: var(--hud2); }
.aw-tt em { font-style: normal; font-size: calc(14px * var(--ui)); color: #8fb3c6; }
.aw-tt.has { border-color: rgba(var(--gold-rgb), 0.6); background: linear-gradient(100deg, rgba(var(--gold-rgb), 0.16), rgba(40, 30, 12, 0.5)); }
.aw-tt.has b { font-size: calc(17px * var(--ui)); font-weight: 500; color: var(--gold); letter-spacing: 0.04em; text-shadow: 0 0 14px rgba(var(--gold-rgb), 0.45); }
.aw-tt.has b::before { content: '「'; } .aw-tt.has b::after { content: '」'; }
.aw-tt.flash { animation: ttFlash 0.9s var(--ease); }
@keyframes ttFlash { 0% { box-shadow: 0 0 0 0 rgba(var(--gold-rgb), 0.8); filter: brightness(1.8); } 100% { box-shadow: 0 0 0 14px rgba(var(--gold-rgb), 0); filter: none; } }

/* tabs */
.aw-tabs { grid-column: 1 / -1; display: flex; align-items: stretch; gap: 4px; border-bottom: 1px solid rgba(184, 239, 255, 0.12); }
.aw-tabs button { display: flex; align-items: center; gap: 8px; padding: 11px 16px 12px; font-size: calc(15px * var(--ui)); color: #a9c4d2; --bl: transparent; --bb: transparent; }
.aw-tabs button kbd { margin: 0; font-size: calc(12.5px * var(--ui)); min-width: 1.6em; opacity: 0.75; }
.aw-tabs button em { font-style: normal; font-family: var(--lat); font-weight: 600; font-size: calc(14px * var(--ui)); color: var(--hud2); }
.aw-tabs button:hover:not(:disabled) { --bl: transparent; --bb: rgba(var(--acc-rgb), 0.08); color: #fff; }
.aw-tabs button.on { --bl: transparent; --bb: rgba(var(--acc-rgb), 0.1); color: #fff; }
.aw-tabs button.on::after { left: 0; right: 0; height: 2px; bottom: -1px; box-shadow: 0 0 10px rgba(var(--acc-rgb), 0.8); }
.aw-tabs button.on em { color: var(--acc); }
.aw-tabs button.on kbd { opacity: 1; border-color: var(--acc); }
.aw-qe { margin-left: auto; align-self: center; font-size: calc(13px * var(--ui)); color: #8fb3c6; white-space: nowrap; }
.aw-qe kbd { font-size: calc(12.5px * var(--ui)); }

/* body + tab entry */
.aw-body { min-height: 0; padding: 18px 26px 22px; display: grid; gap: 20px; overflow: hidden; }
.aw-body.anim > * { animation: awIn 0.42s var(--ease) both; }
.aw-body.anim > :nth-child(2) { animation-delay: 0.05s; }
.aw-body.anim > :nth-child(3) { animation-delay: 0.1s; }
@keyframes awIn { from { opacity: 0; transform: translateY(8px); } }
.aw-body.t-galaxy, .aw-body.t-ach { grid-template-columns: 236px 1fr; }
.aw-body.t-missions, .aw-body.t-titles, .aw-body.t-journal { overflow-y: auto; align-content: start; }
.aw-body h4 { margin: 0 0 10px; font-size: calc(14.5px * var(--ui)); font-weight: 500; letter-spacing: 0.06em; color: #cfe6f2; }
.aw-body h4 small { margin-left: 8px; font-size: calc(13px * var(--ui)); font-weight: 400; letter-spacing: 0; color: #8fb3c6; }
.cu { font-family: var(--lat); font-variant-numeric: tabular-nums; }
.aw-empty { color: var(--hud2); padding: 30px; font-size: calc(14px * var(--ui)); }
.aw-sec { margin: 18px 0 10px; font-size: calc(14px * var(--ui)); font-weight: 500; letter-spacing: 0.08em; color: #8fb3c6; }

/* progress bar: teal fill, gold when full, magenta for fictional places */
.aw-pb { position: relative; display: block; height: 6px; background: rgba(184, 239, 255, 0.09); overflow: hidden;
  clip-path: polygon(0 0, 100% 0, calc(100% - 4px) 100%, 0 100%); }
.aw-pb > i { position: relative; display: block; height: 100%; background: linear-gradient(90deg, rgba(var(--acc-rgb), 0.55), var(--acc));
  transition: width 1.25s cubic-bezier(0.16, 1, 0.3, 1); }
.aw-pb > i::after { content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 3px; background: #eaffff; box-shadow: 0 0 8px #bff4ff; opacity: 0.9; }
.aw-pb > i[style*="width:0.00%"]::after { display: none; }
.aw-pb.fic > i { background: linear-gradient(90deg, rgba(var(--fic-rgb), 0.5), var(--fic)); }
.aw-pb.fic > i::after { background: #ffe6f6; box-shadow: 0 0 8px #ffbfe8; }
.aw-pb.full > i { background: linear-gradient(90deg, #c89b45, var(--gold) 60%, #fff0c8); }
.aw-pb.full > i::after { display: none; }
.aw-pb.full > i::before { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.65) 50%, transparent 70%) -100% 0 / 50% 100% no-repeat; animation: pbSheen 3.2s 1.2s ease-in-out infinite; }
@keyframes pbSheen { 0% { background-position: -60% 0; } 45%, 100% { background-position: 260% 0; } }
.aw-pb.big { height: 10px; margin: 0 0 16px; }

/* shimmer for anything new since the last visit */
#achwin .new, .ov-recent li, .ms-d, .chip { position: relative; }
.aw-card.new::after, .chip.new::after, .tc.new::after, .ov-recent li.new::after, .ms-d.new::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 236, 190, 0.32) 50%, transparent 65%) 0 0 / 250% 100% no-repeat;
  animation: awShim 2.4s 0.4s ease-in-out 3 both; }
@keyframes awShim { from { background-position: 160% 0; } to { background-position: -60% 0; } }
.nw, .ov-recent em { font-style: normal; font-family: var(--lat); font-weight: 700; font-size: calc(12.5px * var(--ui)); letter-spacing: 0.1em; color: #1a1206; background: var(--gold); padding: 0 6px; margin-left: 4px; }
.stamp { font-style: normal; font-size: calc(12.5px * var(--ui)); font-weight: 700; letter-spacing: 0.1em; color: #1a1206; background: var(--gold); padding: 1px 7px; margin-right: 10px;
  clip-path: polygon(4px 0, 100% 0, calc(100% - 4px) 100%, 0 100%); }

/* left navigation (collection & achievements) */
.aw-nav { min-height: 0; overflow-y: auto; padding-right: 6px; display: flex; flex-direction: column; gap: 3px; }
.aw-nav button { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 8px; width: 100%; padding: 9px 11px 10px; font-size: calc(14.5px * var(--ui)); color: #cfe6f2; text-align: left; --bl: transparent; --bb: transparent; }
.aw-nav button:hover:not(:disabled) { --bl: rgba(184, 239, 255, 0.22); --bb: rgba(184, 239, 255, 0.06); }
.aw-nav button.on { --bl: rgba(var(--acc-rgb), 0.55); --bb: rgba(var(--acc-rgb), 0.12); color: #fff; }
.aw-nav button.on::after { display: none; }
.aw-nav button em { font-style: normal; font-family: var(--lat); font-weight: 600; font-size: calc(14px * var(--ui)); color: var(--hud2); }
.aw-nav button .aw-pb { grid-column: 1 / -1; height: 3px; margin-top: 5px; }
.aw-nav button.fic span { color: var(--fic); }
.aw-nav button.done em { color: var(--gold); }
.aw-nav button.done span::after { content: ' ✓'; color: var(--gold); }

/* ---- overview */
.aw-body.t-overview { grid-template-columns: 290px 1fr 300px; }
.ov { display: contents; }
.ov > section { min-height: 0; overflow-y: auto; }
.ov-ring { display: flex; flex-direction: column; align-items: center; padding: 4px 6px 0 0; }
.ov-ring > .kicker { align-self: flex-start; }
.ring { position: relative; width: 236px; height: 236px; margin: 10px 0 14px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.ring circle { fill: none; stroke-width: 11; }
.ring circle.trk { stroke: rgba(184, 239, 255, 0.07); }
.ring circle.val.zero { opacity: 0; }
.ring circle.val { transition: stroke-dashoffset 1.6s cubic-bezier(0.16, 1, 0.3, 1); }
.ring circle.gold { stroke: var(--gold); filter: drop-shadow(0 0 5px rgba(var(--gold-rgb), 0.6)); }
.ring circle.acc { stroke: var(--acc); filter: drop-shadow(0 0 5px rgba(var(--acc-rgb), 0.6)); }
.ring circle.vio { stroke: var(--violet); filter: drop-shadow(0 0 5px rgba(var(--vio-rgb), 0.6)); }
.ring-c { position: absolute; inset: 0; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; text-align: center; }
.ring-c .cu { font-size: calc(46px * var(--ui)); font-weight: 600; line-height: 1; color: #fff; }
.ring-c span { font-family: var(--lat); font-size: calc(20px * var(--ui)); font-weight: 600; color: var(--hud2); margin: 14px 0 0 2px; }
.ring-c.full .cu { color: var(--gold); text-shadow: 0 0 22px rgba(var(--gold-rgb), 0.6); }
.ring-c small { width: 100%; margin-top: 6px; font-size: calc(13px * var(--ui)); color: #8fb3c6; letter-spacing: 0.06em; }
.ov-leg { list-style: none; width: 100%; display: flex; flex-direction: column; gap: 8px; }
.ov-leg li { display: flex; align-items: baseline; gap: 8px; font-size: calc(14px * var(--ui)); color: #cfe6f2; }
.ov-leg li i { width: 10px; height: 10px; align-self: center; transform: rotate(45deg); }
.ov-leg li.gold i { background: var(--gold); } .ov-leg li.acc i { background: var(--acc); } .ov-leg li.vio i { background: var(--violet); }
.ov-leg li span { flex: 1; }
.ov-leg li .cu { font-size: calc(19px * var(--ui)); font-weight: 600; color: #fff; }
.ov-leg li small { font-family: var(--lat); font-weight: 600; font-size: calc(14px * var(--ui)); color: var(--hud2); }
.ov-leg li u, .ov-g u { text-decoration: none; font-family: var(--lat); font-weight: 700; font-size: calc(13.5px * var(--ui)); color: var(--good); animation: upPop 0.6s 1s var(--ease) both; }
@keyframes upPop { from { opacity: 0; transform: translateY(6px); } }
.ov-meta { width: 100%; display: flex; flex-direction: column; gap: 4px; margin-top: 16px; padding-top: 12px; border-top: 1px solid rgba(184, 239, 255, 0.1); font-size: calc(13.5px * var(--ui)); color: #8fb3c6; }
.ov-meta b { color: #e6f4ff; font-weight: 500; }
.ov-glist { display: flex; flex-direction: column; gap: 6px; padding-right: 4px; }
.ov-g { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px; width: 100%; padding: 10px 14px 11px; text-align: left; --bl: rgba(184, 239, 255, 0.14); --bb: rgba(12, 20, 34, 0.55); }
.ov-g:hover:not(:disabled) { --bl: rgba(var(--acc-rgb), 0.55); --bb: rgba(var(--acc-rgb), 0.1); transform: translateX(2px); }
.ov-g .nm b { font-size: calc(15.5px * var(--ui)); font-weight: 500; color: #eef6fb; }
.ov-g .nm small { margin-left: 8px; font-family: var(--lat); font-size: calc(13.5px * var(--ui)); font-weight: 500; color: #7f9fb0; letter-spacing: 0.04em; }
.ov-g .ct { display: flex; align-items: baseline; gap: 4px; }
.ov-g .ct .cu { font-size: calc(19px * var(--ui)); font-weight: 600; color: #fff; }
.ov-g .ct small { font-family: var(--lat); font-size: calc(14px * var(--ui)); font-weight: 600; color: var(--hud2); }
.ov-g .ct u { margin-right: 8px; }
.ov-g .aw-pb { grid-column: 1 / -1; }
.ov-g .sub { grid-column: 1 / -1; font-size: calc(13px * var(--ui)); color: #7f9fb0; }
.ov-g.fic .nm b { color: var(--fic); }
.ov-g.unv { opacity: 0.62; }
.ov-g.unv:hover { opacity: 1; }
.ov-g.up { --bl: rgba(141, 255, 200, 0.4); }
.ov-g.done { --bl: rgba(var(--gold-rgb), 0.6); --bb: rgba(56, 42, 14, 0.55); }
.ov-g.done .nm b { color: #ffe2a8; }
.ov-g.done.fic .nm b, .gs.done.fic .gs-h .nm b, .gx-h.done.fic h3 { color: var(--fic); }
.ov-side { display: flex; flex-direction: column; }
.ov-side h4 { margin-top: 18px; }
.aw-perk { padding: 12px 14px; border: 1px solid rgba(var(--acc-rgb), 0.28); background: rgba(30, 80, 120, 0.12); }
.aw-perk .kicker { display: block; margin-bottom: 8px; letter-spacing: 0.12em; }
.aw-perk p { margin: 8px 0 0; font-size: calc(14px * var(--ui)); line-height: 1.7; color: #b9cfdc; }
.aw-perk p b { color: #e6f4ff; font-weight: 500; }
.aw-pips { display: flex; gap: 5px; margin: 6px 0 0; width: 100%; }
.aw-pips i { flex: 1; height: 6px; background: rgba(184, 239, 255, 0.14); clip-path: polygon(3px 0, 100% 0, calc(100% - 3px) 100%, 0 100%); }
.aw-pips i.on { background: var(--acc); box-shadow: 0 0 8px rgba(var(--acc-rgb), 0.6); }
.ov-recent { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.ov-recent li { display: grid; grid-template-columns: 14px 1fr; gap: 0 8px; padding: 7px 10px; background: rgba(12, 20, 34, 0.5); border-left: 2px solid rgba(var(--gold-rgb), 0.5); overflow: hidden; }
.ov-recent li i { width: 8px; height: 8px; margin-top: 7px; background: var(--gold); transform: rotate(45deg); }
.ov-recent li b { font-size: calc(14.5px * var(--ui)); font-weight: 500; color: #ffe2a8; }
.ov-recent li small { grid-column: 2; font-size: calc(13px * var(--ui)); color: #8fb3c6; }
.ov-recent li small em { margin: 0 6px 0 0; }
.ov-recent li.none { display: block; color: #8fb3c6; font-size: calc(13.5px * var(--ui)); border-left-color: rgba(184, 239, 255, 0.2); }
.ov-recent li.new { border-left-color: var(--gold); background: rgba(60, 44, 14, 0.5); }
.ov-mis { display: block; width: 100%; padding: 11px 14px; text-align: left; --bl: rgba(var(--gold-rgb), 0.45); --bb: rgba(40, 30, 12, 0.4); }
.ov-mis b { display: block; font-size: calc(15px * var(--ui)); font-weight: 500; color: #eef6fb; }
.ov-mis small { display: block; margin-top: 3px; font-size: calc(13px * var(--ui)); color: #ffd48a; }

/* ---- galaxy collection */
.gx { display: flex; flex-direction: column; min-height: 0; }
.gx-h { display: flex; align-items: flex-end; gap: 20px; margin-bottom: 12px; }
.gx-h > div:first-child { flex: 1; }
.gx-h h3 { margin: 2px 0 4px; font-size: calc(26px * var(--ui)); font-weight: 400; color: #fff; letter-spacing: 0.04em; }
.gx-h.fic h3 { color: var(--fic); }
.gx-h.done h3 { color: #ffe2a8; }
.gx-h small { font-size: calc(13.5px * var(--ui)); color: #8fb3c6; }
.gx-n { text-align: right; }
.gx-n .cu { font-size: calc(44px * var(--ui)); font-weight: 600; line-height: 1; color: #fff; }
.gx-n span { margin-left: 6px; font-family: var(--lat); font-size: calc(20px * var(--ui)); font-weight: 600; color: var(--hud2); }
.gx-n small { display: block; font-size: calc(13.5px * var(--ui)); color: var(--acc); }
.gx-h.done .gx-n small { color: var(--gold); }
.gs-list { flex: 1; min-height: 0; overflow-y: auto; padding-right: 6px; display: flex; flex-direction: column; gap: 5px; }
.gs { border: 1px solid rgba(184, 239, 255, 0.12); background: rgba(12, 18, 34, 0.5); flex: none; }
.gs.open { border-color: rgba(var(--acc-rgb), 0.4); }
.gs.done { border-color: rgba(var(--gold-rgb), 0.45); }
.gs-h { display: grid; grid-template-columns: 16px 1fr auto; align-items: center; gap: 4px 12px; width: 100%; padding: 10px 14px 11px; text-align: left; --bl: transparent; --bb: transparent; --bc: 0px; }
.gs-h:hover:not(:disabled) { --bl: transparent; --bb: rgba(var(--acc-rgb), 0.08); }
.gs-h .car { width: 8px; height: 8px; border-right: 1.5px solid var(--acc); border-bottom: 1.5px solid var(--acc); transform: rotate(-45deg); transition: transform 0.2s var(--ease); }
.gs.open .gs-h .car { transform: rotate(45deg); }
.gs-h .nm b { font-size: calc(15px * var(--ui)); font-weight: 500; color: #eef6fb; }
.gs-h .nm small { margin-left: 10px; font-size: calc(13px * var(--ui)); color: #7f9fb0; }
.gs.fic .gs-h .nm b { color: var(--fic); }
.gs.done .gs-h .nm b { color: #ffe2a8; }
.gs.unv .gs-h .nm b { color: #9ab3c0; }
.gs-h .ct { display: flex; align-items: baseline; gap: 4px; }
.gs-h .ct .cu { font-size: calc(17px * var(--ui)); font-weight: 600; color: #fff; }
.gs-h .ct small { font-family: var(--lat); font-size: calc(14px * var(--ui)); font-weight: 600; color: var(--hud2); }
.gs-h .aw-pb { grid-column: 2 / -1; height: 4px; }
.gs-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; padding: 4px 14px 14px 42px; animation: awIn 0.3s var(--ease) both; }
.chip { display: grid; grid-template-columns: 22px 1fr; gap: 0 8px; align-items: center; padding: 7px 10px; border: 1px dashed rgba(184, 239, 255, 0.18); background: rgba(6, 10, 20, 0.5); overflow: hidden; }
.chip i { grid-row: span 2; font-style: normal; font-size: calc(16px * var(--ui)); text-align: center; color: rgba(184, 239, 255, 0.35); }
.chip b { font-size: calc(14px * var(--ui)); font-weight: 500; color: rgba(184, 239, 255, 0.4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip small { font-size: calc(12.5px * var(--ui)); color: rgba(184, 239, 255, 0.35); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip.on { border: 1px solid rgba(var(--acc-rgb), 0.35); background: rgba(14, 34, 50, 0.55); }
.chip.on i { color: var(--acc); }
.chip.on b { color: #eef6fb; }
.chip.on small { color: #8fb3c6; }
.chip.on.fic { border-color: rgba(var(--fic-rgb), 0.4); }
.chip.on.fic i, .chip.on.fic b { color: var(--fic); }

/* ---- achievements */
.ac { display: flex; flex-direction: column; min-height: 0; }
.ac-h { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.ac-h h3 { flex: 1; margin: 0; font-size: calc(21px * var(--ui)); font-weight: 500; color: #fff; letter-spacing: 0.04em; }
.ac-h h3 span { margin-left: 10px; font-family: var(--lat); font-size: calc(18px * var(--ui)); font-weight: 600; color: var(--hud2); }
.ac-h h3 span .cu { color: var(--gold); font-size: calc(22px * var(--ui)); }
.aw-flt { display: flex; gap: 4px; }
.aw-flt button { padding: 6px 14px; font-size: calc(13.5px * var(--ui)); }
.ac > .aw-pb { margin-bottom: 14px; }
.ac-list { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 10px; align-content: start; grid-auto-rows: max-content; padding-right: 6px; }
.aw-card { position: relative; display: flex; gap: 14px; padding: 14px 16px; border: 1px solid rgba(184, 239, 255, 0.14); background: rgba(12, 18, 34, 0.6);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%); transition: border-color 0.16s, background 0.16s, transform 0.16s var(--ease); }
.aw-card:hover { border-color: rgba(184, 239, 255, 0.36); background: rgba(18, 28, 46, 0.7); transform: translateY(-1px); }
.aw-card .aw-ico { position: relative; flex: none; width: 42px; height: 42px; display: grid; place-items: center; font-family: var(--lat); font-weight: 700; font-size: calc(20px * var(--ui)); color: rgba(184, 239, 255, 0.55); border: 1px solid rgba(184, 239, 255, 0.25); clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); }
.aw-card .aw-ico:empty::before { content: ''; width: 12px; height: 12px; border: 1.5px solid currentColor; transform: rotate(45deg); }
.aw-card .aw-txt { flex: 1; min-width: 0; }
.aw-card b { display: block; font-size: calc(15.5px * var(--ui)); font-weight: 500; color: #e3eef5; margin-bottom: 4px; }
.aw-card p { margin: 0; font-size: calc(13.5px * var(--ui)); line-height: 1.55; color: #a9bfcc; }
.aw-card small { display: block; margin-top: 6px; font-size: calc(13px * var(--ui)); color: #ffd48a; opacity: 0.9; }
.aw-card.on { border-color: rgba(var(--gold-rgb), 0.55); background: linear-gradient(120deg, rgba(60, 44, 14, 0.55), rgba(24, 20, 14, 0.5)); }
.aw-card.on:hover { border-color: rgba(var(--gold-rgb), 0.85); }
.aw-card.on .aw-ico { color: var(--gold); border-color: rgba(var(--gold-rgb), 0.8); background: rgba(var(--gold-rgb), 0.12); box-shadow: inset 0 0 12px rgba(var(--gold-rgb), 0.25); }
.aw-card.on .aw-ico:empty::before { background: var(--gold); }
.aw-card.on b { color: #ffe2a8; }
.aw-card.hid:not(.on) { border-style: dashed; }
.aw-card.hid:not(.on) .aw-ico { color: var(--violet); border-color: rgba(var(--vio-rgb), 0.5); }
.aw-card.hid:not(.on) p { color: var(--violet); opacity: 0.9; }
.aw-card.ms { border-color: rgba(var(--acc-rgb), 0.4); }
.aw-card.ms.on { border-color: rgba(var(--gold-rgb), 0.7); }
.aw-card .aw-rw { display: block; font-style: normal; font-size: calc(13px * var(--ui)); color: var(--acc); margin: 0 0 4px; }
.aw-card .aw-rw.tt { color: var(--gold); }
.aw-cp { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; margin-top: 8px; }
.aw-cp span { font-family: var(--lat); font-weight: 600; font-size: calc(13.5px * var(--ui)); color: var(--acc); }
.aw-card.mc .mtrack { margin-top: 10px; padding: 5px 14px; font-size: calc(13.5px * var(--ui)); }
.aw-card.tr { border-color: rgba(var(--acc-rgb), 0.75); box-shadow: inset 0 0 0 1px rgba(var(--acc-rgb), 0.25); }

/* ---- contracts */
.ms-wrap { padding-right: 6px; }
.ms-top { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.ms-top > div { padding: 12px 16px; border: 1px solid rgba(184, 239, 255, 0.14); background: rgba(12, 18, 34, 0.55); }
.ms-top > div > div:not(.kicker) { margin: 4px 0 6px; }
.ms-top .cu { font-size: calc(36px * var(--ui)); font-weight: 600; color: #fff; line-height: 1; }
.ms-ep .cu { color: var(--gold); }
.ms-top span { margin-left: 6px; font-family: var(--lat); font-size: calc(18px * var(--ui)); font-weight: 600; color: var(--hud2); }
.ms-top small { font-size: calc(13px * var(--ui)); color: #8fb3c6; }
.ms-cur { padding: 18px 22px; --pb: linear-gradient(110deg, rgba(60, 44, 14, 0.55), rgba(10, 14, 24, 0.7)); }
.ms-cur .kicker { color: var(--gold); }
.ms-cur h3 { margin: 6px 0 6px; font-size: calc(22px * var(--ui)); font-weight: 500; color: #fff; }
.ms-cur p { font-size: calc(15px * var(--ui)); line-height: 1.6; color: #c9dbe5; }
.ms-where { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 8px 12px; font-size: calc(14px * var(--ui)); color: #ffd48a; background: rgba(var(--gold-rgb), 0.08); border-left: 2px solid var(--gold); }
.ms-where i { width: 8px; height: 8px; background: var(--gold); transform: rotate(45deg); animation: wherePulse 1.6s ease-in-out infinite; }
@keyframes wherePulse { 50% { opacity: 0.3; } }
.ms-rw { margin-top: 10px; font-size: calc(13.5px * var(--ui)); color: #a9bfcc; }
.ms-rw b { color: var(--gold); font-weight: 500; }
.ms-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.ms-done { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px; }
.ms-d { display: grid; grid-template-columns: 12px 1fr; gap: 0 10px; padding: 8px 12px; background: rgba(40, 30, 12, 0.35); border: 1px solid rgba(var(--gold-rgb), 0.3); overflow: hidden; }
.ms-d i { width: 8px; height: 8px; margin-top: 7px; background: var(--gold); transform: rotate(45deg); }
.ms-d b { font-size: calc(14.5px * var(--ui)); font-weight: 500; color: #ffe2a8; }
.ms-d small { grid-column: 2; font-size: calc(13px * var(--ui)); color: #b9a882; }

/* ---- titles */
.tt-wrap { padding-right: 6px; }
.tt-top { display: flex; align-items: flex-end; gap: 20px; margin-bottom: 18px; padding: 18px 22px; border: 1px solid rgba(var(--gold-rgb), 0.3);
  background: radial-gradient(ellipse at 20% 0%, rgba(var(--gold-rgb), 0.16), transparent 60%), rgba(12, 16, 26, 0.6); }
.tt-top > div { flex: 1; }
.tt-top .kicker { color: var(--gold); }
.tt-top h3 { margin: 6px 0 6px; font-size: calc(32px * var(--ui)); font-weight: 500; color: var(--gold); letter-spacing: 0.04em; text-shadow: 0 0 22px rgba(var(--gold-rgb), 0.45); }
.tt-top h3.none { font-size: calc(22px * var(--ui)); color: #8fb3c6; text-shadow: none; }
.tt-top small { font-size: calc(13.5px * var(--ui)); color: #a9bfcc; }
.tt-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 12px; }
.tc { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px 18px 14px; text-align: left; overflow: hidden; --bl: rgba(184, 239, 255, 0.22); --bb: rgba(12, 18, 34, 0.65); --bc: 10px; }
.tc:hover:not(.lock) { --bl: rgba(var(--gold-rgb), 0.7); --bb: rgba(50, 38, 14, 0.6); transform: translateY(-2px); }
.tc .tc-k { font-family: var(--lat); font-weight: 600; font-size: calc(12.5px * var(--ui)); letter-spacing: 0.24em; color: rgba(var(--acc-rgb), 0.86); }
.tc b { font-size: calc(21px * var(--ui)); font-weight: 500; color: #fff; letter-spacing: 0.03em; }
.tc p { margin: 2px 0 6px; font-size: calc(13.5px * var(--ui)); line-height: 1.5; color: #a9bfcc; }
.tc small { margin-top: auto; font-size: calc(13px * var(--ui)); color: var(--acc); }
.tc.rare { --bl: rgba(var(--gold-rgb), 0.55); }
.tc.rare .tc-k { color: var(--gold); }
.tc.rare:not(.lock) { --bb: rgba(56, 42, 14, 0.72); }
.tc.rare:not(.lock) b { color: var(--gold); text-shadow: 0 0 16px rgba(var(--gold-rgb), 0.5); }
.tc.rare:not(.lock)::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(110deg, transparent 40%, rgba(255, 240, 200, 0.18) 50%, transparent 60%) 0 0 / 300% 100% no-repeat; animation: foil 4.5s ease-in-out infinite; }
@keyframes foil { 0% { background-position: 150% 0; } 60%, 100% { background-position: -50% 0; } }
.tc.wear { --bl: var(--gold); box-shadow: 0 0 0 1px rgba(var(--gold-rgb), 0.35), 0 0 24px rgba(var(--gold-rgb), 0.18); }
.tc.wear small { color: var(--gold); font-weight: 500; }
.tc.wear small::before { content: '◆ '; }
.tc.lock { cursor: default; --bl: rgba(184, 239, 255, 0.2); --bb: rgba(8, 12, 22, 0.5); }
.tc.lock.rare { --bl: rgba(var(--gold-rgb), 0.3); }
.tc.lock:hover { --bl: rgba(184, 239, 255, 0.3); }
.tc.lock b { color: rgba(184, 239, 255, 0.4); }
.tc.lock p, .tc.lock small { color: #7f9fb0; }
.tc.lock:active { transform: none; }

/* ---- journal */
.jr-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; padding-right: 6px; }

@media (prefers-reduced-motion: reduce) {
  .aw-pb > i, .ring circle.val.zero { opacity: 0; }
.ring circle.val { transition: none; }
  .aw-body.anim > *, .aw-pb.full > i::before, .tc.rare::after, .new::after { animation: none !important; }
}
@media (min-width: 1800px) {
  .aw-in { width: min(1480px, 86vw); height: min(940px, 86vh); }
  .aw-body.t-overview { grid-template-columns: 330px 1fr 340px; }
  .ring { width: 270px; height: 270px; }
}
figure.jr { margin: 0; border: 1px solid rgba(184, 239, 255, 0.16); background: rgba(12, 18, 34, 0.6); }
figure.jr img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
figure.jr figcaption { padding: 8px 12px 10px; }
figure.jr b { display: block; font-size: calc(14.5px * var(--ui)); font-weight: 500; color: #e3eef5; }
figure.jr span { display: block; font-size: calc(13px * var(--ui)); color: #a9bfcc; }
figure.jr small { display: block; font-size: calc(12.5px * var(--ui)); color: #ffd48a; opacity: 0.85; margin-top: 3px; }

/* ------------------------------------------------ hangar */
#hangar.off { display: none; }
#hangar .hg-in { width: min(1040px, 92vw); max-height: 86vh; display: flex; flex-direction: column; padding: 22px 26px; }
#hangar .hg-top { display: flex; align-items: flex-end; gap: 24px; padding-bottom: 14px; border-bottom: 1px solid rgba(184, 239, 255, 0.1); }
#hangar h2 { margin: 2px 0 0; font-size: calc(30px * var(--ui)); font-weight: 300; color: #fff; }
#hangar .hg-ep { margin-left: auto; font-size: calc(15px * var(--ui)); color: #cfe3ee; text-align: right; font-family: var(--lat); font-weight: 600; }
#hangar .hg-ep b { font-size: calc(28px * var(--ui)); color: var(--gold); font-weight: 600; }
#hangar .hg-ep small { display: block; font-family: var(--kr); font-weight: 400; font-size: calc(13px * var(--ui)); color: #8fb3c6; }
#hangar .hg-tabs { display: flex; gap: 6px; margin: 14px 0 12px; }
#hg-list { overflow: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; padding-right: 4px; }
.hg-card { padding: 14px 16px; border: 1px solid rgba(184, 239, 255, 0.16); background: rgba(12, 18, 34, 0.7); cursor: pointer; transition: border-color 0.16s, background 0.16s, transform 0.12s; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%); }
.hg-card:hover { border-color: rgba(184, 239, 255, 0.5); background: rgba(20, 32, 52, 0.75); }
.hg-card:active { transform: translateY(1px); }
.hg-card.cur { border-color: var(--acc); box-shadow: inset 0 0 0 1px rgba(var(--acc-rgb), 0.3); }
.hg-card.lock { opacity: 0.55; cursor: not-allowed; }
.hg-card.lock:hover { border-color: rgba(184, 239, 255, 0.16); background: rgba(12, 18, 34, 0.7); }
.hg-card b { display: block; font-size: calc(16px * var(--ui)); font-weight: 500; color: #eef6fb; }
.hg-card p { margin: 4px 0 8px; font-size: calc(13.5px * var(--ui)); line-height: 1.5; color: #a9bfcc; }
.hg-card small { display: block; font-size: calc(13px * var(--ui)); color: #ffd48a; }
.hg-card.cur small { color: var(--acc); }
.hg-card .sw { display: flex; gap: 6px; margin: 6px 0 8px; }
.hg-card .sw i { width: 28px; height: 18px; border: 1px solid rgba(255, 255, 255, 0.25); }
.hg-stats { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; font-size: calc(13px * var(--ui)); color: #b9cfdc; margin: 4px 0 8px; align-items: center; }
.hg-stats u { display: block; height: 5px; background: rgba(184, 239, 255, 0.12); text-decoration: none; }
.hg-stats u i { display: block; height: 100%; background: var(--acc); }

/* ------------------------------------------------ title: the panorama is the picture */
#title { position: fixed; inset: 0; z-index: 15; pointer-events: none; transition: opacity 1.2s; font-family: var(--kr); }
#title.fade { opacity: 0; }
#title .t-block { position: absolute; left: 7vw; bottom: 11vh; max-width: 540px; pointer-events: auto; opacity: 0; transform: translateY(8px); animation: tIn 1.6s 0.5s ease-out forwards; }
#title .t-scene { position: absolute; right: 7vw; bottom: 11vh; text-align: right; opacity: 0; animation: tIn 1.6s 1.2s ease-out forwards; padding-right: 14px; border-right: 1px solid rgba(var(--acc-rgb), 0.45); }
@keyframes tIn { to { opacity: 1; transform: none; } }
#title .t-kick { margin-bottom: 12px; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.7); }
#title h1 { margin: 0; font-family: var(--lat); font-weight: 300; font-size: clamp(44px, 6.2vw, 88px); letter-spacing: 0.06em; line-height: 1; color: #f4f7fa; text-shadow: 0 1px 18px rgba(0, 0, 0, 0.55); }
#title .t-line { margin: 18px 0 30px; font-size: calc(16px * var(--ui)); line-height: 1.7; color: #c9d6de; font-weight: 300; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.7); }
#title .t-actions { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
#title .t-go { padding: 12px 24px; font-size: calc(16px * var(--ui)); font-weight: 500; letter-spacing: 0.04em; color: #0a0f18; display: inline-flex; align-items: center; gap: 12px; --bl: transparent; --bb: #e9f1f5; --bc: 9px; }
#title .t-go:hover:not(:disabled) { --bl: transparent; --bb: #ffffff; color: #0a0f18; }
#title .t-go:active:not(:disabled) { --bb: #cfe9f2; }
#title .t-go kbd { margin: 0; font-size: calc(12.5px * var(--ui)); padding: 1px 7px; background: rgba(10, 15, 24, 0.08); border: 1px solid rgba(10, 15, 24, 0.3); color: #0a0f18; box-shadow: 0 1px 0 rgba(10, 15, 24, 0.3); }
#title .t-q { display: flex; align-items: center; gap: 10px; font-size: calc(13.5px * var(--ui)); color: #9fb1bd; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7); }
#title .t-q .seg { gap: 2px; }
#title .t-q .seg button { flex: none; padding: 4px 9px; font-size: calc(13.5px * var(--ui)); color: #9fb1bd; --bl: transparent; --bb: transparent; }
#title .t-q .seg button::after { display: none; }
#title .t-q .seg button.on { color: #f4f7fa; box-shadow: inset 0 -1px 0 #f4f7fa; }
#title .t-q .seg button:hover:not(:disabled) { color: #fff; --bb: rgba(255, 255, 255, 0.08); }
#title .t-note { margin: 22px 0 0; font-size: calc(13px * var(--ui)); color: #8a9ba6; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7); }
#title .t-scene b { display: block; font-size: calc(15px * var(--ui)); font-weight: 500; color: #eef3f6; letter-spacing: 0.04em; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.7); }
#title .t-scene span { display: block; margin-top: 4px; font-size: calc(13.5px * var(--ui)); color: #9fb1bd; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.7); }

/* large screens: same layout, a touch more air */
@media (min-width: 1800px) {
  #tl-panel { left: 36px; top: 30px; } #tr-panel { right: 36px; top: 30px; }
  #flight { left: 32px; bottom: 30px; } #radar-wrap { right: 32px; bottom: 30px; }
  #nova { left: 32px; bottom: 232px; } #mtrack, #qpanel { right: 32px; } #toasts { left: 32px; top: 168px; }
}
@media (max-width: 760px) {
  #keyhint, #radar-wrap { display: none; }
  .g-cards { grid-template-columns: 1fr; }
  .hk { grid-template-columns: 1fr; gap: 4px; }
  .hk-k { justify-content: flex-start; }
  .hk.tip { padding-left: 4px; }
}

/* quantum list: gathering point / traveller count badge */
#qpanel .qb, .qb { color: #ffcf6e; font-style: normal; font-size: calc(11px * var(--ui, 1)); margin-left: 6px; opacity: .9; }
