/* solar_system.css — home page (solar-system portfolio).
 * Shares its visual vocabulary (tokens, type, glass) with globe_portfolio.css
 * so the two views read as one site.
 */
:root {
  --bg: #02030a;
  --ink: #f2f4ff;
  --ink-2: rgba(242, 244, 255, 0.74);
  --ink-3: rgba(242, 244, 255, 0.5);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --glass: linear-gradient(180deg, rgba(14, 20, 42, 0.86), rgba(6, 10, 24, 0.9));
  --sun: #ffcf8a;
  --accent: #b8c8ff;
  --panel-w: 460px;

  --sans: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --ease-out: cubic-bezier(0.2, 0.9, 0.2, 1);
}

* { box-sizing: border-box; }
html, body.solar {
  margin: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
:where(.solar) button { font-family: inherit; color: inherit; }
:where(.solar) a { color: inherit; }
.solar :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Nebula wash behind the transparent WebGL canvas */
.solar::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 78% 18%, rgba(70, 60, 160, 0.28), transparent 70%),
    radial-gradient(ellipse 55% 45% at 12% 85%, rgba(140, 50, 120, 0.18), transparent 70%),
    radial-gradient(ellipse 40% 35% at 55% 55%, rgba(255, 170, 90, 0.07), transparent 70%),
    radial-gradient(ellipse at 50% 50%, #070b1c 0%, #01020a 75%);
}

#scene {
  position: fixed;
  inset: 0;
  z-index: 1;
  touch-action: none;
}
#scene canvas { display: block; cursor: grab; }
#scene.dragging canvas { cursor: grabbing; }
#scene.hovering canvas { cursor: pointer; }

/* ─── Loading ──────────────────────────────────────────────── */
.loader {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity 0.9s ease, visibility 0.9s;
}
.loader.done { opacity: 0; visibility: hidden; }
.loader-ring {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-top-color: var(--sun);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Top bar ──────────────────────────────────────────────── */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  padding-top: max(18px, env(safe-area-inset-top));
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: left;
}
.brand-mark {
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  font-size: 13px;
  font-weight: 600;
}
.brand-text { line-height: 1.15; }
.brand-name, .brand-role { display: block; }
.brand-name { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.brand-role { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

.top-actions { display: flex; align-items: center; gap: 8px; }

/* View switch (shared look with the globe page) */
.view-switch {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.view-switch a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}
.view-switch a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.06); }
.view-switch a[aria-current="page"] { background: rgba(255, 255, 255, 0.92); color: #02030a; }
.view-switch svg { width: 14px; height: 14px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink-2);
  font: 500 12px/1 var(--sans);
  padding: 9px 14px;
  cursor: pointer;
  text-decoration: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.btn:hover { background: rgba(255, 255, 255, 0.1); color: var(--ink); }
.btn svg { width: 15px; height: 15px; flex: 0 0 auto; }
.btn-icon { width: 36px; height: 36px; padding: 0; }
.btn-icon[aria-expanded="true"] { background: rgba(255, 255, 255, 0.14); color: var(--ink); }

.btn-primary {
  background: var(--ink);
  color: #02030a;
  border-color: transparent;
  padding: 14px 22px;
  font-size: 15px;
}
.btn-primary:hover { background: #fff; color: #02030a; }
.btn-lg { padding: 14px 20px; font-size: 15px; }

/* ─── Hero ─────────────────────────────────────────────────── */
.hero {
  position: fixed;
  z-index: 20;
  left: clamp(24px, 5vw, 72px);
  top: 50%;
  transform: translateY(-50%);
  max-width: 540px;
  transition: opacity 0.6s ease, transform 0.6s var(--ease-out), visibility 0.6s;
}
.hero.is-hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-50%) translateX(-24px);
  pointer-events: none;
}
.hero-scrim {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(1, 2, 10, 0.9) 0%, rgba(1, 2, 10, 0.7) 30%, rgba(1, 2, 10, 0.2) 45%, transparent 55%);
  transition: opacity 0.6s ease;
}
.hero-scrim.is-hidden { opacity: 0; }

.eyebrow {
  font-size: 13px;
  color: var(--ink-3);
}
.hero-title {
  font-weight: 600;
  font-size: clamp(44px, 5.6vw, 76px);
  line-height: 1;
  letter-spacing: -0.035em;
  margin: 0 0 18px;
}
.hero-tagline a { color: var(--ink); text-underline-offset: 3px; }
.hero-tagline {
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0 0 28px;
  max-width: 420px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.hero-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 13px;
  color: var(--ink-3);
}
.hero-hints span { display: inline-flex; align-items: center; gap: 7px; }
.hero-hints kbd {
  font-family: inherit;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink-2);
}

/* Staggered entrance */
.hero > * { animation: rise 0.9s var(--ease-out) both; }
.hero > *:nth-child(2) { animation-delay: 0.08s; }
.hero > *:nth-child(3) { animation-delay: 0.16s; }
.hero > *:nth-child(4) { animation-delay: 0.24s; }
.hero > *:nth-child(5) { animation-delay: 0.32s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ─── Planet labels (projected from 3D) ────────────────────── */
.labels {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  overflow: hidden;
}
.labels.is-off { display: none; }
.planet-label {
  position: absolute;
  left: 0; top: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px 5px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--ink);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
  cursor: pointer;
  pointer-events: auto;
  will-change: transform;
  transition: background 0.2s ease, border-color 0.2s ease, opacity 0.3s ease;
}
.planet-label .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 8px var(--c);
}
.planet-label:hover,
.planet-label.is-hover,
.planet-label.is-active {
  background: rgba(6, 10, 24, 0.78);
  border-color: var(--line-strong);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.planet-label.is-dim { opacity: 0.35; }
.planet-label.is-hidden { visibility: hidden; }

/* ─── Dock ─────────────────────────────────────────────────── */
.dock {
  position: fixed;
  z-index: 25;
  left: 50%;
  bottom: max(22px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: calc(100vw - 32px);
  padding: 5px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8);
  transition: transform 0.5s var(--ease-out), opacity 0.4s ease;
  animation: dock-in 0.9s var(--ease-out) 0.5s backwards;
}
@keyframes dock-in { from { opacity: 0; transform: translate(-50%, 16px); } to { opacity: 1; transform: translate(-50%, 0); } }
.dock-play {
  flex: 0 0 auto;
  width: 36px; height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: background 0.2s ease;
}
.dock-play:hover { background: rgba(255, 255, 255, 0.14); }
.dock-play svg { width: 14px; height: 14px; }
.dock-play .i-play { display: none; }
.dock-play[aria-pressed="true"] .i-play { display: block; }
.dock-play[aria-pressed="true"] .i-pause { display: none; }
.dock-sep { width: 1px; height: 20px; background: var(--line-strong); margin: 0 4px; flex: 0 0 auto; }
.dock-list {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-behavior: smooth;
}
.dock-list::-webkit-scrollbar { display: none; }
.dock-item {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px 9px 11px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.dock-item .dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 10px var(--c);
}
.dock-item:hover { background: rgba(255, 255, 255, 0.07); color: var(--ink); }
.dock-item[aria-current="true"] { background: rgba(255, 255, 255, 0.92); color: #02030a; }
.dock-item[aria-current="true"] .dot { box-shadow: none; }

body.panel-open .dock { transform: translateX(calc(-50% - var(--panel-w) / 2 - 8px)); }

/* ─── Side panel ───────────────────────────────────────────── */
.panel {
  position: fixed;
  z-index: 40;
  top: 16px;
  right: 16px;
  bottom: 16px;
  width: var(--panel-w);
  max-width: calc(100vw - 32px);
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  background: var(--glass);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03), 0 50px 100px -30px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: translateX(calc(100% + 32px));
  visibility: hidden;
  transition: transform 0.55s var(--ease-out), visibility 0.55s;
  overflow: hidden;
}
.panel.is-open { transform: none; visibility: visible; }
.panel::before {
  /* Planet-coloured glow along the top edge */
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 180px;
  background: radial-gradient(ellipse 70% 100% at 20% 0%, color-mix(in srgb, var(--c, var(--sun)) 28%, transparent), transparent 70%);
  pointer-events: none;
}
.panel-grip { display: none; }
.panel-head {
  position: relative;
  padding: 22px 22px 0 26px;
  flex: 0 0 auto;
}
.panel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.panel-eyebrow { display: inline-flex; align-items: center; gap: 9px; }
.panel-eyebrow .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--c, var(--sun));
}
.panel-nav { display: flex; gap: 6px; }
.panel-nav .btn-icon { width: 34px; height: 34px; }
.panel-title {
  font-weight: 600;
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0 0 18px;
}
.panel-tabs {
  display: flex;
  gap: 22px;
  border-bottom: 1px solid var(--line);
}
.panel-tabs:empty { display: none; }
.panel-tab {
  position: relative;
  padding: 10px 0 12px;
  border: 0;
  background: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-3);
  cursor: pointer;
  transition: color 0.2s ease;
}
.panel-tab:hover { color: var(--ink); }
.panel-tab[aria-selected="true"] { color: var(--ink); }
.panel-tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--c, var(--sun));
}
.panel-body {
  position: relative;
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 22px 26px 26px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}
.panel-pane { animation: fade-in 0.35s ease both; }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.panel-empty { color: var(--ink-3); font-size: 14px; }
.panel-foot {
  flex: 0 0 auto;
  padding: 14px 26px 18px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--ink-3);
}
.panel-foot .btn { color: var(--ink); }

/* Portfolio entries inside a planet panel */
.panel-intro { font-size: 15px; line-height: 1.55; color: var(--ink-2); margin: 0 0 20px; }
.entry {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.entry:first-of-type { border-top: 0; padding-top: 4px; }
.entry-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  margin-bottom: 6px;
}
.entry-current {
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--c, var(--sun));
  color: var(--c, var(--sun));
  font-size: 11.5px;
  font-weight: 500;
}
.entry-title { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; margin: 0; color: var(--ink); }
.entry-sub { font-size: 14px; color: var(--ink-2); margin-top: 2px; }
.entry-summary { font-size: 14.5px; line-height: 1.6; color: var(--ink-2); margin: 10px 0 0; }
.entry-highlights { margin: 10px 0 0; padding-left: 18px; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.entry-highlights li { margin: 0 0 5px; }
.entry-highlights li::marker { color: var(--c, var(--sun)); }
.entry-link { display: inline-block; margin-top: 10px; font-size: 14px; font-weight: 500; color: var(--accent); text-decoration: none; }
.entry-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.entry-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.entry-tag {
  font-size: 12px;
  padding: 3px 9px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink-2);
}

/* Rich content coming from the CMS (planet content JSON) */
.prose { font-size: 14.5px; line-height: 1.65; color: var(--ink-2); }
.prose > :first-child { margin-top: 0; }
.prose h1, .prose h2, .prose h3, .prose h4 { color: var(--ink); font-weight: 600; line-height: 1.25; margin: 1.6em 0 0.5em; }
.prose h1, .prose h2 { font-size: 20px; letter-spacing: -0.02em; }
.prose h3 { font-size: 16px; }
.prose h4 { font-size: 14px; }
.prose p { margin: 0 0 1em; }
.prose a { color: var(--accent); text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin: 0.3em 0; }
.prose li::marker { color: var(--c, var(--sun)); }
.prose img, .prose video { max-width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); }
.prose strong { color: var(--ink); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 1.5em 0; }
.prose blockquote { margin: 1em 0; padding-left: 14px; border-left: 2px solid var(--c, var(--sun)); color: var(--ink); }

/* ─── Contact form ─────────────────────────────────────────── */
.contact-intro { font-size: 14.5px; line-height: 1.6; color: var(--ink-2); margin: 0 0 22px; }
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
}
.field input, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font: 400 15px/1.4 var(--sans);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 0 4px rgba(184, 200, 255, 0.12);
}
.field-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-form .btn-primary { width: 100%; margin-top: 4px; }
.contact-form .btn-primary[disabled] { opacity: 0.6; cursor: progress; transform: none; }
.form-message:empty { display: none; }
.form-message .alert {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
}
.form-message .alert-success { border-color: rgba(52, 211, 153, 0.5); background: rgba(52, 211, 153, 0.1); }
.form-message .alert-danger { border-color: rgba(248, 113, 113, 0.5); background: rgba(248, 113, 113, 0.1); }

/* ─── Settings popover ─────────────────────────────────────── */
.settings {
  position: fixed;
  z-index: 35;
  top: calc(max(18px, env(safe-area-inset-top)) + 48px);
  right: 24px;
  width: 290px;
  padding: 18px;
  border-radius: 18px;
  background: var(--glass);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.8);
  transform-origin: top right;
  transition: opacity 0.2s ease, transform 0.25s var(--ease-out), visibility 0.25s;
}
.settings:not(.is-open) { opacity: 0; visibility: hidden; transform: scale(0.96) translateY(-6px); pointer-events: none; }
.settings .eyebrow { margin-bottom: 16px; }
.set-row { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.set-row.inline { flex-direction: row; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.set-row label { font-size: 13px; color: var(--ink-2); display: flex; justify-content: space-between; }
.set-row output { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.set-row input[type="range"] { width: 100%; accent-color: var(--sun); }
.switch {
  position: relative;
  width: 38px; height: 22px;
  flex: 0 0 auto;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  cursor: pointer;
  transition: background 0.2s ease;
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s var(--ease-out);
}
.switch:checked { background: var(--sun); }
.switch:checked::after { transform: translateX(16px); }
.set-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.set-actions .btn { width: 100%; }
.set-login { grid-column: 1 / -1; }

/* ─── No-WebGL fallback note ───────────────────────────────── */
.nogl {
  position: fixed;
  z-index: 4;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  max-width: 320px;
  text-align: center;
  color: var(--ink-3);
  font-size: 14px;
}

/* ─── Responsive ───────────────────────────────────────────── */
@media (max-width: 1100px) {
  :root { --panel-w: 400px; }
  .panel-title { font-size: 30px; }
}

@media (max-width: 860px) {
  .topbar { padding: 12px 14px; padding-top: max(12px, env(safe-area-inset-top)); }
  .brand-mark { width: 34px; height: 34px; font-size: 14px; }
  .brand-text { display: none; }
  .view-switch a { padding: 7px 11px; }
  .view-switch .vs-label { display: none; }
  .btn-contact .btn-label { display: none; }
  .btn-contact { width: 36px; height: 36px; padding: 0; }

  .hero {
    left: 20px; right: 20px;
    top: calc(max(12px, env(safe-area-inset-top)) + 64px);
    transform: none;
    max-width: none;
  }
  .hero.is-hidden { transform: translateY(-16px); }
  .hero-title { font-size: clamp(38px, 11vw, 52px); margin-bottom: 12px; }
  .hero-tagline { font-size: 15px; margin-bottom: 20px; }
  .hero-actions { margin-bottom: 0; }
  .hero-actions .btn-primary, .hero-actions .btn-lg { padding: 12px 18px; font-size: 14px; }
  .hero-hints { display: none; }
  .hero-scrim { background: linear-gradient(180deg, rgba(1, 2, 10, 0.85) 0%, rgba(1, 2, 10, 0.4) 40%, transparent 60%); }

  .dock { left: 12px; right: 12px; transform: none; max-width: none; animation-name: dock-in-m; }
  @keyframes dock-in-m { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
  .dock-list { flex: 1 1 auto; mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); }
  body.panel-open .dock { transform: translateY(140%); opacity: 0; }

  .panel {
    top: auto;
    left: 0; right: 0; bottom: 0;
    width: auto;
    max-width: none;
    height: min(62dvh, 620px);
    border-radius: 22px 22px 0 0;
    border-bottom: 0;
    transform: translateY(105%);
  }
  .panel-grip {
    display: block;
    width: 40px; height: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.22);
    margin: 10px auto 0;
    flex: 0 0 auto;
  }
  .panel-head { padding: 12px 16px 0 20px; }
  .panel-title { font-size: 26px; margin-bottom: 12px; }
  .panel-body { padding: 18px 20px calc(22px + env(safe-area-inset-bottom)); }
  .panel-foot { padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); }

  .settings { right: 12px; left: 12px; width: auto; }
  .planet-label { font-size: 11px; padding: 4px 8px 4px 7px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
