/* See the Stars – deep-space HUD theme */
:root {
  --bg: #04050d;
  --bg2: #0a0d22;
  --panel: rgba(14, 20, 46, 0.55);
  --panel-strong: rgba(16, 22, 52, 0.85);
  --line: rgba(127, 220, 255, 0.16);
  --line-strong: rgba(127, 220, 255, 0.4);
  --text: #e9eefc;
  --dim: #95a0c4;
  --cyan: #7fdcff;
  --gold: #ffd36b;
  --pink: #ff6fb1;
  --violet: #9a7bff;
  --green: #5cf2b0;
  --red: #ff6b8b;
  --radius: 18px;
  --display: 'Orbitron', 'Space Grotesk', system-ui, sans-serif;
  --body: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --tabbar-h: 68px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: radial-gradient(1200px 800px at 80% -10%, #1a1446 0%, transparent 60%), radial-gradient(900px 700px at -10% 30%, #0b2a4a 0%, transparent 55%), var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--body);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--cyan); text-decoration: none; }
button { font: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; }

#starfield { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.nebula {
  position: fixed; inset: -20%; z-index: 0; pointer-events: none; opacity: 0.55;
  background:
    radial-gradient(40% 30% at 75% 20%, rgba(154, 123, 255, 0.18), transparent 70%),
    radial-gradient(35% 28% at 15% 70%, rgba(255, 111, 177, 0.12), transparent 70%),
    radial-gradient(30% 25% at 60% 85%, rgba(127, 220, 255, 0.10), transparent 70%);
  animation: drift 60s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translate3d(-3%, 2%, 0) scale(1.05); } }

.glass {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.hud-label {
  font: 600 12px/1.4 var(--mono);
  letter-spacing: 0.1em;
  color: var(--cyan);
  text-transform: uppercase;
  opacity: 0.9;
}
.mono { font-family: var(--mono); font-size: 13px; color: var(--dim); }
.dim { opacity: 0.7; }
.fine { font-size: 12px; color: var(--dim); }

.title {
  font: 800 clamp(30px, 8vw, 54px)/1.05 var(--display);
  letter-spacing: 0.02em;
  margin: 8px 0 6px;
  background: linear-gradient(180deg, #fff 30%, #a9c6ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.title span { background: linear-gradient(90deg, var(--cyan), var(--violet) 60%, var(--pink)); -webkit-background-clip: text; background-clip: text; }
h2 { font: 700 22px/1.2 var(--display); margin: 4px 0 12px; letter-spacing: 0.03em; }
h3 { font: 600 19px/1.3 var(--body); margin: 0 0 10px; display: flex; gap: 10px; align-items: baseline; }
.sub { color: var(--dim); margin: 0 0 16px; }
.lead { color: #c4cdea; max-width: 60ch; }

/* ── layout ── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 10px;
  background: linear-gradient(180deg, rgba(4, 5, 13, 0.96) 65%, rgba(4, 5, 13, 0));
}
.logo { display: flex; align-items: center; gap: 8px; color: var(--text); font: 700 13px var(--display); letter-spacing: 0.18em; }
.logo svg { width: 28px; height: 28px; }
.xp-chip { margin-left: auto; text-align: right; line-height: 1.15; }
.xp-chip .hud-label { display: block; font-size: 9px; }
.xp-chip b { font: 600 14px var(--mono); color: var(--gold); }
.offline-pill { display: none; font: 600 10px var(--mono); letter-spacing: 0.14em; color: var(--gold); border: 1px solid rgba(255, 211, 107, 0.5); border-radius: 99px; padding: 2px 8px; }
body.offline .offline-pill { display: inline-block; }

main { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; padding: 8px 16px calc(var(--tabbar-h) + 40px + env(safe-area-inset-bottom)); outline: none; }
section { margin-bottom: 28px; }

.tabbar {
  position: fixed; z-index: 30; left: 50%; transform: translateX(-50%);
  bottom: calc(10px + env(safe-area-inset-bottom));
  width: min(520px, calc(100% - 20px)); height: var(--tabbar-h);
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-radius: 22px; background: var(--panel-strong);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--dim); font-size: 11px; font-weight: 500; position: relative; }
.tabbar svg { width: 24px; height: 24px; }
.tabbar a.on { color: var(--cyan); }
.tabbar a.on::before { content: ''; position: absolute; top: 6px; width: 28px; height: 2px; border-radius: 2px; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }

/* ── buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 18px; border-radius: 14px; border: 1px solid var(--line-strong);
  background: rgba(127, 220, 255, 0.06); color: var(--text); font-weight: 600; cursor: pointer;
  transition: transform 0.15s, background 0.2s, box-shadow 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn.primary { border: 0; color: #061024; background: linear-gradient(90deg, var(--cyan), #a9b8ff); box-shadow: 0 6px 24px rgba(127, 220, 255, 0.35); }
.btn.done { border-color: rgba(92, 242, 176, 0.5); color: var(--green); background: rgba(92, 242, 176, 0.08); }
.btn.glow { box-shadow: 0 0 0 1px var(--cyan), 0 0 22px rgba(127, 220, 255, 0.5); animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 50% { box-shadow: 0 0 0 1px var(--cyan), 0 0 6px rgba(127, 220, 255, 0.2); } }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--panel-strong); cursor: pointer; font-size: 18px; }
body:not(.scientist) .sci-only { display: none !important; }
.kicker { display: block; font-size: 14px; font-weight: 600; color: var(--cyan); }
.back { display: inline-block; margin: 4px 0 14px; color: var(--dim); font-size: 14px; }

.bar { flex: 1; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--cyan), var(--violet)); box-shadow: 0 0 10px var(--cyan); transition: width 0.6s; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 10px 0; }

/* ── home ── */
.hero { padding-top: 10px; }
.rank-card { display: flex; gap: 18px; align-items: center; padding: 18px; margin: 20px 0 14px; }
.rank-ring {
  --p: 0; flex: none; width: 92px; height: 92px; border-radius: 50%; display: grid; place-content: center; text-align: center;
  background: radial-gradient(closest-side, var(--bg2) 80%, transparent 81%), conic-gradient(var(--gold) calc(var(--p) * 360deg), rgba(255, 255, 255, 0.08) 0);
  box-shadow: 0 0 30px rgba(255, 211, 107, 0.15);
}
.rank-ring span { font: 700 24px/1 var(--display); color: var(--gold); }
.rank-ring small { font: 600 10px var(--mono); color: var(--dim); letter-spacing: 0.2em; }
.rank-info > b { display: block; font: 700 20px/1.2 var(--display); margin: 2px 0; }
.rank-info small { color: var(--dim); }
.stats { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; font-size: 13px; color: var(--dim); }
.stats b { color: var(--text); font-family: var(--mono); }
.continue { display: flex; gap: 14px; align-items: center; padding: 12px 16px 12px 12px; color: var(--text); border-color: rgba(255, 211, 107, 0.35); }
.continue b { display: block; font-size: 19px; }
.continue small { color: var(--dim); }
.continue .go { margin-left: auto; font-size: 26px; color: var(--gold); }

.section-head { margin-bottom: 10px; }
.journey { list-style: none; padding: 0 0 0 26px; margin: 0; position: relative; }
.journey::before { content: ''; position: absolute; left: 9px; top: 20px; bottom: 20px; width: 2px; background: linear-gradient(180deg, var(--cyan), var(--violet), var(--pink)); opacity: 0.35; }
.node { position: relative; margin-bottom: 12px; }
.node .dot { position: absolute; left: -23px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%; background: var(--bg2); border: 2px solid hsl(var(--hue) 80% 70% / 0.5); }
.node.started .dot { border-color: hsl(var(--hue) 90% 70%); }
.node.current .dot { background: hsl(var(--hue) 90% 70%); box-shadow: 0 0 0 5px hsl(var(--hue) 90% 70% / 0.18), 0 0 18px hsl(var(--hue) 90% 70%); }
.node.complete .dot { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 12px var(--gold); }
.sector-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; color: var(--text); transition: border-color 0.2s, transform 0.2s; }
.sector-card:hover { border-color: hsl(var(--hue) 90% 70% / 0.6); transform: translateX(2px); }
.node.current .sector-card { border-color: hsl(var(--hue) 90% 70% / 0.55); box-shadow: 0 0 30px hsl(var(--hue) 90% 60% / 0.15); }
.sector-card .code { font: 800 22px var(--display); color: hsl(var(--hue) 90% 72%); min-width: 34px; }
.sector-body { flex: 1; min-width: 0; }
.sector-body b { display: block; }
.sector-body small { display: block; color: var(--dim); font-size: 13px; margin-bottom: 8px; }
.sector-body .bar span { background: hsl(var(--hue) 90% 68%); box-shadow: 0 0 8px hsl(var(--hue) 90% 60%); }
.sector-state { font: 600 13px var(--mono); color: var(--dim); }
.badge-mini { color: var(--gold); font-size: 20px; text-shadow: 0 0 10px var(--gold); }
.pulse { animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.35; } }

/* ── cards ── */
.obj-list { display: grid; gap: 10px; }
.obj-card { display: flex; align-items: center; gap: 14px; padding: 10px 14px 10px 10px; color: var(--text); transition: border-color 0.2s, transform 0.2s; }
.obj-card:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.obj-card.learned { border-color: rgba(92, 242, 176, 0.25); }
.obj-art { flex: none; width: 64px; height: 64px; border-radius: 14px; overflow: hidden; background: radial-gradient(circle at 50% 50%, #0d1430, #05060f); border: 1px solid var(--line); }
.obj-art.big { width: 76px; height: 76px; }
.obj-art .art { width: 100%; height: 100%; }
.obj-meta { flex: 1; min-width: 0; }
.obj-meta b { display: block; line-height: 1.25; }
.obj-meta small { color: var(--dim); font-size: 13px; }
.obj-status { display: flex; gap: 6px; font-size: 15px; }
.tick { color: var(--green); }
.spot { color: var(--gold); }
.dl { color: var(--cyan); }

/* ── sector ── */
.sector-hero .title { background: linear-gradient(180deg, #fff 20%, hsl(var(--hue) 90% 78%)); -webkit-background-clip: text; background-clip: text; }
.sector-hero .hud-label { color: hsl(var(--hue) 90% 75%); }
.briefing { padding: 16px 18px; border-left: 3px solid hsl(var(--hue) 90% 70%); }
.briefing p { margin: 0; color: #cfd7f3; font-size: 17px; }
body.scientist .briefing p { margin-top: 6px; }
.quiz-card { display: flex; gap: 14px; align-items: center; justify-content: space-between; padding: 18px; margin-top: 16px; border-color: rgba(255, 211, 107, 0.35); }
.quiz-card b { display: block; font-size: 17px; margin: 2px 0; }
.quiz-card small { color: var(--dim); }
.quiz-card.locked { opacity: 0.7; border-color: var(--line); }
.lock { font-size: 22px; }
.pager { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.pager .btn { font-size: 14px; }

/* ── object ── */
.obj-hero { position: relative; aspect-ratio: 16 / 10; margin: 0 -16px 8px; overflow: hidden; background: radial-gradient(circle at 50% 45%, hsl(var(--hue) 60% 14%), #03040b 70%); mask-image: linear-gradient(180deg, #000 75%, transparent); -webkit-mask-image: linear-gradient(180deg, #000 75%, transparent); }
.obj-hero-art { position: absolute; inset: 0; display: grid; place-items: center; }
.hero-art { width: min(78%, 360px); height: auto; filter: drop-shadow(0 0 30px hsl(var(--hue) 90% 60% / 0.35)); animation: float 8s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px) rotate(1deg); } }
.obj-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s; }
.obj-photo.in { opacity: 1; }
.photo-credit { position: absolute; right: 12px; bottom: 34px; font: 10px var(--mono); color: rgba(255, 255, 255, 0.6); }
.obj-head .hud-label { color: hsl(var(--hue) 90% 75%); }
.data-panel > div { padding: 12px 14px; background: rgba(8, 12, 30, 0.88); }
.data-panel .hud-label { display: block; font-size: 10px; color: var(--dim); }
.data-panel b { font-weight: 600; font-size: 15px; }
.data-panel .live .hud-label { color: var(--green); }
.data-panel .live .hud-label::before { content: '● '; animation: blink 1.6s infinite; }
.data-panel .live b { font-family: var(--mono); font-size: 13px; }
.locate { width: 100%; margin: 4px 0 18px; font-size: 17px; min-height: 54px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 99px; background: hsl(var(--hue, 200) 80% 60% / 0.14); color: hsl(var(--hue, 200) 90% 80%); font-size: 14px; font-weight: 600; }
.nutshell { font-size: 18px; line-height: 1.6; color: #e3e9fb; margin: 4px 0 18px; }

/* fact bubbles */
.bubbles { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; }
.bubble { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: var(--radius); background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); }
.bubble-icon { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; background: hsl(var(--hue, 200) 80% 60% / 0.14); }
.bubble b { display: block; font-size: 18px; line-height: 1.3; }
.bubble small { display: block; color: var(--dim); font-size: 15px; line-height: 1.4; margin-top: 2px; }

/* tap-to-open cards */
.folds { display: grid; gap: 10px; margin-bottom: 22px; }
.fold { border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); overflow: hidden; }
.fold summary { list-style: none; display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 10px 16px; cursor: pointer; font-weight: 600; font-size: 17px; }
.fold summary::-webkit-details-marker { display: none; }
.fold summary::after { content: ''; margin-left: auto; width: 9px; height: 9px; border-right: 2.5px solid var(--dim); border-bottom: 2.5px solid var(--dim); transform: rotate(-45deg); transition: transform 0.2s; }
.fold[open] summary::after { transform: rotate(45deg); }
.fold-icon { font-size: 22px; }
.fold-body { padding: 0 16px 16px; }
.fold-body p { margin: 0; color: #d7def6; font-size: 16px; }
.fold.wow[open] { border-color: rgba(255, 211, 107, 0.45); }
.fold.wow .fold-body p { font-size: 18px; color: #fff; }
.fold.wonder .q { font-size: 17px; font-weight: 600; color: #fff; margin-bottom: 12px; }
.fold.wonder .a { margin-top: 12px; }
.fold .extract { color: var(--dim); }
.fold .more { display: inline-block; margin-top: 8px; font-size: 14px; }
.story-cards { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
.story-cards::-webkit-scrollbar { display: none; }
.story-card { flex: 0 0 82%; scroll-snap-align: center; display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 14px; background: hsl(var(--hue) 60% 50% / 0.1); border: 1px solid hsl(var(--hue) 80% 70% / 0.25); }
.story-card .year { font: 700 20px var(--display); color: hsl(var(--hue) 90% 78%); }
.story-n { margin-top: auto; font-size: 13px; color: var(--dim); }
.data-panel { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1px; overflow: hidden; border-radius: 12px; background: var(--line); }
.passes { padding: 14px 18px; margin-bottom: 14px; border-color: rgba(255, 255, 255, 0.25); }
.passes h3 { margin: 0; }
.passes p { margin: 8px 0 0; color: #cfd7f3; }
.pass-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.pass-list li { display: grid; padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.05); }
.pass-list b { font-family: var(--mono); font-size: 14px; color: var(--gold); }
.pass-list span { font-size: 13px; color: var(--dim); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.actions .btn { flex: 1 1 200px; }

/* ── quiz ── */
.quiz .q { font: 600 22px/1.35 var(--body); margin: 20px 0; }
.options { display: grid; gap: 10px; }
.opt { display: flex; gap: 14px; align-items: center; text-align: left; padding: 14px 16px; cursor: pointer; font-size: 16px; color: var(--text); }
.opt .mono { color: var(--cyan); }
.opt.right { border-color: var(--green); background: rgba(92, 242, 176, 0.12); }
.opt.wrong { border-color: var(--red); background: rgba(255, 107, 139, 0.12); }
.why { padding: 14px 16px; margin: 14px 0; }
.nextq { width: 100%; }
.quiz-result { text-align: center; padding-top: 40px; }
.score { font: 800 88px/1 var(--display); color: var(--gold); text-shadow: 0 0 40px rgba(255, 211, 107, 0.4); margin: 16px 0; }
.score small { font-size: 36px; color: var(--dim); }
.badge { display: inline-flex; gap: 14px; align-items: center; padding: 14px 22px; margin: 10px 0 20px; border-color: rgba(255, 211, 107, 0.5); text-align: left; }
.badge-icon { font-size: 40px; color: var(--gold); text-shadow: 0 0 20px var(--gold); }

/* ── library / saved ── */
.search { width: 100%; padding: 14px 16px; font-size: 16px; color: var(--text); outline: none; margin: 10px 0 12px; }
.search:focus { border-color: var(--line-strong); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chip { flex: none; padding: 7px 14px; border-radius: 99px; border: 1px solid var(--line); background: transparent; color: var(--dim); cursor: pointer; font-size: 14px; }
.chip.on { color: #061024; background: var(--cyan); border-color: var(--cyan); }
.empty { color: var(--dim); text-align: center; padding: 30px 0; }
.info { padding: 16px 18px; }
.info p { margin: 0 0 8px; color: #cfd7f3; }
.saved-row { display: flex; align-items: center; gap: 8px; }
.saved-row .obj-card { flex: 1; }
.danger { padding: 16px 18px; margin-top: 16px; }
.settings-card { padding: 16px 18px; margin: 14px 0; }
.settings-card h3 { margin-bottom: 12px; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.segmented button { display: grid; justify-items: center; gap: 2px; padding: 12px 8px; border-radius: 14px; border: 1px solid var(--line); background: transparent; cursor: pointer; }
.segmented button span { font-size: 26px; }
.segmented button small { color: var(--dim); font-size: 13px; }
.segmented button.on { border-color: var(--cyan); background: rgba(127, 220, 255, 0.12); box-shadow: 0 0 18px rgba(127, 220, 255, 0.2); }
.gear { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--dim); font-size: 20px; }
.danger p { color: var(--dim); margin: 6px 0 12px; }

/* ── toasts & fx ── */
#toasts { position: fixed; z-index: 50; left: 50%; transform: translateX(-50%); top: calc(env(safe-area-inset-top) + 64px); display: grid; gap: 8px; width: min(420px, calc(100% - 32px)); pointer-events: none; }
.toast { pointer-events: auto; padding: 12px 16px; border-radius: 14px; background: var(--panel-strong); border: 1px solid var(--line-strong); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); animation: tin 0.35s cubic-bezier(.2, 1.4, .4, 1); transition: opacity 0.5s, transform 0.5s; }
.toast.xp b { color: var(--gold); font-family: var(--mono); margin-right: 6px; }
.toast.rank { border-color: rgba(255, 211, 107, 0.6); box-shadow: 0 0 30px rgba(255, 211, 107, 0.25); }
.toast.rank .hud-label { display: block; color: var(--gold); }
.toast.out { opacity: 0; transform: translateY(-10px); }
@keyframes tin { from { opacity: 0; transform: translateY(-14px) scale(0.96); } }
#fx { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
#fx i { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: hsl(var(--h) 95% 72%); box-shadow: 0 0 10px hsl(var(--h) 95% 65%); animation: pop 0.95s cubic-bezier(.1, .8, .3, 1) forwards; }
@keyframes pop { to { transform: translate(var(--dx), var(--dy)) scale(0.2); opacity: 0; } }

/* ── sky finder ── */
body[data-view='sky'] main { max-width: none; padding: 0; }
body[data-view='sky'] .topbar { position: fixed; left: 0; right: 0; background: linear-gradient(180deg, rgba(4, 5, 13, 0.7), transparent); }
.sky-host, .sky { position: fixed; inset: 0; }
.sky { z-index: 5; background: #02030a; overflow: hidden; touch-action: none; }
.sky-video, .sky-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.sky-video { object-fit: cover; filter: saturate(0.8) brightness(0.85); }
.sky-canvas { cursor: grab; }
.sky-top { position: absolute; z-index: 3; top: calc(env(safe-area-inset-top) + 62px); left: 12px; right: 12px; display: flex; gap: 8px; }
.sky-select { flex: 1; min-width: 0; height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--panel-strong); color: var(--text); font: 500 15px var(--body); }
.sky-alert { position: absolute; z-index: 3; top: calc(env(safe-area-inset-top) + 116px); left: 12px; right: 12px; padding: 10px 14px; border-radius: 12px; background: rgba(60, 20, 10, 0.85); border: 1px solid rgba(255, 160, 90, 0.6); color: #ffd9b8; font-weight: 600; text-align: center; }
.sky-hud { position: absolute; z-index: 3; left: 12px; right: 12px; bottom: calc(var(--tabbar-h) + 20px + env(safe-area-inset-bottom)); padding: 12px 16px; max-width: 560px; margin: 0 auto; background: rgba(8, 12, 30, 0.72); }
.hud-row { display: flex; justify-content: space-between; }
.sky-spotted { font: 600 11px var(--mono); color: var(--gold); letter-spacing: 0.14em; }
.sky-name { font: 700 19px/1.2 var(--display); margin: 2px 0; }
.sky-name small { display: block; font: 400 13px var(--body); color: var(--dim); margin-top: 2px; }
.sky-guide { font-size: 16px; margin: 6px 0; color: #dfe7ff; min-height: 1.6em; }
.sky-guide b { color: var(--gold); }
.sky-guide .dir { display: inline-flex; align-items: center; gap: 8px; margin: 2px 8px 2px 0; padding: 6px 12px; border-radius: 12px; background: rgba(255, 211, 107, 0.12); font-size: 18px; font-weight: 600; }
.sky-guide .dir b { font-size: 22px; }
.closeness { display: flex; align-items: center; gap: 10px; margin: 4px 0 6px; }
.closeness-bar { flex: 1; height: 8px; border-radius: 8px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.closeness-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #5ad7ff, #ffd36b, #ff7a59); transition: width 0.2s; }
.closeness-text { flex: none; min-width: 120px; text-align: right; font-size: 14px; color: var(--gold); font-weight: 600; }
.sky-guide .locked { color: var(--green); letter-spacing: 0.08em; text-shadow: 0 0 12px var(--green); }
.hud-grid { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 8px; }
.hud-grid .hud-label { display: block; font-size: 9px; color: var(--dim); }
.hud-grid b { font: 600 13px var(--mono); }
.sky-extra { font-size: 13px; color: var(--dim); margin-top: 6px; }
.sky-extra:empty { display: none; }
.sky-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.sky-actions .btn { min-height: 38px; padding: 6px 12px; font-size: 13px; flex: 1; }
.sky-start { position: absolute; z-index: 4; inset: 0; display: grid; place-items: center; padding: 16px; background: radial-gradient(circle at 50% 40%, rgba(20, 30, 80, 0.6), rgba(2, 3, 10, 0.92)); }
.sky-start[hidden] { display: none; }
.sky-start-card { max-width: 420px; padding: 24px; text-align: center; }
.sky-start-card p { color: #cfd7f3; }
.sky-start-card .btn { width: 100%; margin-top: 10px; }
.sky-settings { position: absolute; z-index: 5; top: calc(env(safe-area-inset-top) + 114px); right: 12px; width: min(340px, calc(100% - 24px)); padding: 16px; background: var(--panel-strong); display: grid; gap: 10px; }
.sky-settings[hidden] { display: none; }
.sky-settings label { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-size: 14px; }
.sky-settings input[type='range'] { grid-column: 1 / -1; accent-color: var(--cyan); }
.sky-settings span { font: 13px var(--mono); color: var(--cyan); }
.loc-row { display: flex; gap: 8px; }
.loc-row input { flex: 1; min-width: 0; height: 40px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line-strong); background: rgba(0, 0, 0, 0.3); color: var(--text); font: 14px var(--mono); }
.loc-row .btn { flex: 1; min-height: 40px; }
[hidden] { display: none !important; }

/* pulsar beam spin inside artwork */
.art .spin { animation: spin 2.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (min-width: 720px) {
  .obj-hero { margin: 0 0 8px; border-radius: var(--radius); }
}
.continue .kicker, .rank-info .kicker { color: var(--cyan); }
body[data-view='sky'] .gear { display: none; }
