@font-face {
  font-family: "Space Grotesk";
  src: url("../public/assets/fonts/space-grotesk.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans SC";
  src: url("../public/assets/fonts/noto-sans-sc.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --void: #02070c;
  --void-deep: #010407;
  --ink: #e9fbff;
  --ink-strong: #ffffff;
  --muted: #7e929b;
  --muted-dim: #53666f;
  --cyan: #64e7ff;
  --cyan-bright: #a4f4ff;
  --blue: #1687c9;
  --amber: #f2c989;
  --panel: rgba(4, 16, 23, 0.58);
  --panel-strong: rgba(4, 13, 20, 0.88);
  --line: rgba(134, 226, 247, 0.2);
  --line-strong: rgba(134, 226, 247, 0.46);
  --cyan-wash: rgba(69, 213, 247, 0.12);
  --cyan-glow: rgba(75, 218, 255, 0.3);
  --deep-wash: rgba(13, 69, 95, 0.12);
  --panel-faint: rgba(5, 17, 24, 0.42);
  --panel-raised: rgba(6, 19, 27, 0.96);
  --photo-shade: rgba(0, 7, 11, 0.7);
  --photo-shade-soft: rgba(0, 7, 11, 0.16);
  --white-soft: rgba(255, 255, 255, 0.72);
  --white-faint: rgba(255, 255, 255, 0.08);
  --warm: #f4d39b;
  --visited: #76edc5;
  --wishlist: #f2c989;
  --danger: #ff907f;
  --shadow: rgba(0, 0, 0, 0.42);
  --transparent: transparent;
  --display: "Space Grotesk", sans-serif;
  --body: "Noto Sans SC", sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --motion-x: 0;
  --motion-y: 0;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--void);
}

body {
  color: var(--ink);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

button,
a {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
}

a {
  text-decoration: none;
}

button:focus-visible,
a:focus-visible {
  outline: 1px solid var(--cyan);
  outline-offset: 4px;
}

noscript {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--void);
  color: var(--ink);
}

.app-shell {
  position: relative;
  width: 100%;
  height: 100%;
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 48%, var(--cyan-wash) 0, var(--transparent) 36%),
    linear-gradient(145deg, var(--void-deep), var(--void) 45%, var(--void-deep));
}

.app-shell::after {
  content: "";
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, var(--shadow), var(--transparent) 18%, var(--transparent) 82%, var(--shadow)),
    linear-gradient(0deg, var(--shadow), var(--transparent) 18%, var(--transparent) 88%, var(--shadow));
  opacity: 0.46;
}

.starfield,
.space-haze,
.scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.starfield {
  z-index: 0;
  opacity: 0;
  transition: opacity 1.8s var(--ease-out);
}

.space-haze {
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 51% 46%, var(--cyan-wash) 0, var(--transparent) 33%),
    radial-gradient(ellipse at 16% 82%, var(--deep-wash), var(--transparent) 42%);
  mix-blend-mode: screen;
  transform: translate3d(calc(var(--motion-x) * 12px), calc(var(--motion-y) * -10px), 0);
  transition: transform 0.18s linear;
}

.scene {
  z-index: 2;
  touch-action: none;
}

.scene canvas {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: grab;
  transition: opacity 0.8s var(--ease-out);
}

.scene canvas.is-marker-hover {
  cursor: pointer;
}

body.is-grabbing .scene canvas {
  cursor: grabbing;
}

.is-ready .starfield,
.is-ready .scene canvas {
  opacity: 1;
}

.masthead,
.mission-card,
.telemetry,
.control-dock,
.interaction-guide,
.source-note {
  position: absolute;
  z-index: 5;
}

.masthead {
  top: max(28px, env(safe-area-inset-top));
  left: clamp(24px, 4vw, 68px);
  right: clamp(24px, 4vw, 68px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.brand,
.render-status {
  pointer-events: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  position: relative;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  box-shadow: inset 0 0 18px var(--cyan-wash), 0 0 24px var(--cyan-wash);
  transition: transform 0.6s var(--ease-out), border-color 0.35s ease;
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid var(--cyan);
  border-radius: 50%;
}

.brand-mark::after {
  inset: 15px;
  border: 0;
  background: var(--cyan-bright);
  box-shadow: 0 0 12px var(--cyan);
}

.brand:hover .brand-mark {
  transform: rotate(28deg) scale(1.06);
  border-color: var(--cyan);
}

.brand-type {
  display: grid;
  gap: 2px;
}

.brand-type strong {
  color: var(--ink-strong);
  font-family: var(--display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.22em;
}

.brand-type small {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.25em;
}

.render-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(14px);
  color: var(--muted);
  font-family: var(--display);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.render-status b {
  padding-left: 8px;
  border-left: 1px solid var(--line);
  color: var(--cyan-bright);
  font-weight: 500;
}

/* Shared geographic search */
.place-explorer {
  position: absolute;
  z-index: 7;
  top: max(25px, env(safe-area-inset-top));
  left: 50%;
  width: min(720px, calc(100vw - 520px));
  min-width: 420px;
  transform: translateX(-50%);
  transition: opacity 0.3s ease, transform 0.45s var(--ease-out);
}

.place-search-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px;
  gap: 7px;
}

.place-search-input,
.place-filter-toggle {
  min-height: 44px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  box-shadow: 0 14px 40px var(--shadow);
  backdrop-filter: blur(18px);
}

.place-search-input {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 0 14px;
}

.place-search-input svg,
.place-filter-toggle svg {
  width: 18px;
  fill: none;
  stroke: var(--cyan);
  stroke-linecap: round;
  stroke-width: 1.35;
}

.place-search-input input {
  width: 100%;
  height: 42px;
  padding: 0;
  border: 0;
  outline: 0;
  background: var(--transparent);
  color: var(--ink);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.place-search-input input::placeholder { color: var(--muted-dim); }
.place-search-input > span { color: var(--muted); font-family: var(--display); font-size: 8px; letter-spacing: 0.08em; white-space: nowrap; }

.place-filter-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.place-filter-toggle:hover,
.place-filter-toggle[aria-expanded="true"] { border-color: var(--line-strong); color: var(--cyan-bright); }

.place-search-panel {
  position: absolute;
  top: 52px;
  right: 0;
  left: 0;
  max-height: min(610px, calc(100vh - 95px));
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: rgba(3, 13, 20, 0.97);
  box-shadow: 0 26px 90px var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  transition: opacity 0.25s ease, transform 0.4s var(--ease-out);
}

body.place-search-open .place-search-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.place-filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  padding: 12px;
  background: var(--line);
}

.place-filter-grid label {
  display: grid;
  gap: 6px;
  padding: 10px 11px;
  background: var(--panel-raised);
}

.place-filter-grid label > span { color: var(--muted-dim); font-size: 7px; letter-spacing: 0.14em; }
.place-filter-grid select {
  width: 100%;
  border: 0;
  outline: 0;
  background: var(--panel-raised);
  color: var(--ink);
  font-size: 10px;
}
.place-filter-grid select:disabled { color: var(--muted-dim); }

.place-result-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 15px 10px;
  border-bottom: 1px solid var(--line);
}

.place-result-heading span { color: var(--muted); font-size: 9px; letter-spacing: 0.08em; }
.place-result-heading button { padding: 5px; background: var(--transparent); color: var(--cyan); font-size: 8px; cursor: pointer; }

.place-search-results {
  max-height: min(460px, calc(100vh - 250px));
  overflow-y: auto;
  padding: 5px 8px 9px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) var(--transparent);
}

.place-search-result {
  display: grid;
  width: 100%;
  min-height: 52px;
  grid-template-columns: 13px minmax(0, 1fr) auto 18px;
  gap: 11px;
  align-items: center;
  padding: 8px 9px;
  border-bottom: 1px solid var(--line);
  background: var(--transparent);
  text-align: left;
  cursor: pointer;
}

.place-search-result:hover,
.place-search-result:focus-visible { background: var(--cyan-wash); }
.place-search-result > i { width: 7px; height: 7px; border: 1px solid var(--cyan); border-radius: 50%; box-shadow: 0 0 8px var(--cyan); }
.place-search-result > i.is-story { border-color: var(--warm); box-shadow: 0 0 8px var(--warm); }
.place-search-result > span { display: grid; gap: 3px; }
.place-search-result strong { color: var(--ink); font-size: 12px; font-weight: 400; }
.place-search-result small { color: var(--muted-dim); font-size: 8px; letter-spacing: 0.05em; }
.place-search-result em { color: var(--muted); font-family: var(--display); font-size: 7px; font-style: normal; letter-spacing: 0.08em; }
.place-search-result > b { color: var(--cyan); font-size: 13px; font-weight: 400; }
.place-result-limit { margin: 10px 4px 3px; color: var(--muted-dim); font-size: 8px; text-align: center; }

.place-search-empty {
  display: grid;
  min-height: 150px;
  place-content: center;
  gap: 8px;
  color: var(--muted);
  text-align: center;
}
.place-search-empty strong { color: var(--ink); font-size: 13px; font-weight: 400; }
.place-search-empty span { font-size: 9px; }

.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 9px var(--cyan);
  animation: signal 2.4s ease-in-out infinite;
}

.mission-card {
  top: 25%;
  left: clamp(28px, 5vw, 86px);
  width: min(270px, 25vw);
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--cyan);
  font-family: var(--display);
  font-size: 9px;
  letter-spacing: 0.28em;
}

.mission-card h1 {
  position: relative;
  display: grid;
  width: max-content;
  margin: 0;
  color: var(--ink-strong);
  font-family: "STKaiti", "KaiTi", "FangSong", var(--body);
  font-size: clamp(42px, 5vw, 74px);
  font-weight: 600;
  line-height: 0.83;
  letter-spacing: 0.03em;
  text-shadow: 0 8px 38px var(--shadow);
  transform: rotate(-1.4deg);
}

.mission-card h1 span:last-child { margin-left: 0.22em; }
.mission-card h1::after {
  content: "";
  position: absolute;
  right: -8px;
  bottom: -13px;
  left: 11px;
  height: 3px;
  background: linear-gradient(90deg, var(--transparent), var(--cyan) 16%, var(--cyan-bright) 72%, var(--transparent));
  filter: blur(0.3px);
  opacity: 0.68;
  transform: rotate(-2deg) scaleX(0.92);
  transform-origin: left;
}

.mission-copy {
  width: 220px;
  margin: 22px 0 26px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.9;
  letter-spacing: 0.08em;
}

.planet-facts {
  display: flex;
  gap: clamp(16px, 2vw, 28px);
  margin: 0;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.planet-facts div {
  display: grid;
  gap: 5px;
}

.planet-facts dt,
.planet-facts dd {
  margin: 0;
}

.planet-facts dt {
  color: var(--muted-dim);
  font-size: 8px;
  letter-spacing: 0.16em;
}

.planet-facts dd {
  color: var(--ink);
  font-family: var(--display);
  font-size: 10px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.telemetry {
  bottom: clamp(54px, 7vh, 92px);
  left: clamp(28px, 4vw, 68px);
  width: clamp(250px, 24vw, 380px);
  padding: 16px 18px 13px;
  border-left: 1px solid var(--line-strong);
  background: linear-gradient(90deg, var(--panel), var(--transparent));
  pointer-events: none;
}

.coordinate-grid .altitude-metric { pointer-events: auto; cursor: help; }
.coordinate-grid .altitude-metric > span::after { content: "  ⓘ"; color: var(--cyan); }

.telemetry-heading {
  display: flex;
  justify-content: space-between;
  color: var(--muted-dim);
  font-family: var(--display);
  font-size: 8px;
  letter-spacing: 0.2em;
}

.coordinate-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  gap: 20px;
  margin-top: 13px;
}

.coordinate-grid div {
  display: grid;
  gap: 4px;
}

.coordinate-grid span {
  color: var(--muted-dim);
  font-family: var(--display);
  font-size: 8px;
  letter-spacing: 0.18em;
}

.coordinate-grid strong {
  color: var(--ink);
  font-family: var(--display);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  font-weight: 450;
  letter-spacing: 0.03em;
}

.signal-line {
  height: 1px;
  margin-top: 13px;
  overflow: hidden;
  background: var(--line);
}

.signal-line i {
  display: block;
  width: 28%;
  height: 100%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  animation: scan 3.8s ease-in-out infinite;
}

.control-dock {
  top: 50%;
  right: clamp(22px, 3.3vw, 56px);
  display: grid;
  gap: 10px;
  transform: translateY(-50%);
}

.control-button {
  position: relative;
  display: grid;
  width: 47px;
  height: 47px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel);
  backdrop-filter: blur(14px);
  cursor: pointer;
  transition: color 0.3s ease, background 0.3s ease, border-color 0.3s ease, transform 0.3s var(--ease-out);
}

.control-button::after {
  content: attr(data-tooltip);
  position: absolute;
  top: 50%;
  right: calc(100% + 12px);
  padding: 6px 9px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.1em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(6px, -50%);
  transition: opacity 0.2s ease, transform 0.3s var(--ease-out);
}

.control-button:hover,
.control-button.is-active {
  border-color: var(--line-strong);
  color: var(--cyan-bright);
  background: var(--cyan-wash);
}

.control-button:hover {
  transform: scale(1.07);
}

.control-button:hover::after {
  opacity: 1;
  transform: translate(0, -50%);
}

.control-button svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.35;
}

.control-button[data-action="rotate"]:not(.is-active) .pause-glyph {
  display: none;
}

.interaction-guide {
  bottom: max(24px, env(safe-area-inset-bottom));
  left: 50%;
  display: flex;
  gap: 24px;
  align-items: center;
  color: var(--muted-dim);
  font-size: 9px;
  letter-spacing: 0.13em;
  transform: translateX(-50%);
  pointer-events: none;
}

.interaction-guide span {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  white-space: nowrap;
}

.mouse-icon,
.scroll-icon,
.touch-icon {
  position: relative;
  display: inline-block;
  width: 12px;
  height: 16px;
  border: 1px solid var(--muted-dim);
  border-radius: 8px;
}

.mouse-icon::after,
.scroll-icon::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 50%;
  width: 1px;
  height: 4px;
  background: var(--cyan);
  transform: translateX(-50%);
}

.scroll-icon::after {
  animation: wheel 1.8s ease-in-out infinite;
}

.touch-icon {
  border: 0;
}

.touch-icon::before,
.touch-icon::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  border: 1px solid var(--muted-dim);
  border-radius: 50%;
}

.touch-icon::before { top: 2px; left: 1px; }
.touch-icon::after { right: 0; bottom: 1px; }
.touch-hint { display: none !important; }

.source-note {
  right: clamp(24px, 4vw, 68px);
  bottom: max(26px, env(safe-area-inset-bottom));
  display: grid;
  gap: 5px;
  text-align: right;
  font-family: var(--display);
}

.source-note span {
  color: var(--muted-dim);
  font-size: 7px;
  letter-spacing: 0.2em;
}

.source-note a {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.12em;
  transition: color 0.25s ease;
}

.source-note a:hover { color: var(--cyan-bright); }

.loading-screen {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  background: var(--void-deep);
  transition: opacity 0.85s ease, visibility 0.85s;
}

.loading-screen[hidden] { display: none; }

.is-ready .loading-screen {
  visibility: hidden;
  opacity: 0;
}

.loading-screen p {
  margin: 23px 0 13px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.22em;
}

.loading-screen > span {
  margin-top: 8px;
  color: var(--cyan);
  font-family: var(--display);
  font-size: 9px;
  letter-spacing: 0.15em;
}

.loading-orbit {
  position: relative;
  width: 64px;
  height: 64px;
  border: 1px solid var(--line);
  border-radius: 50%;
  animation: orbit 2.6s linear infinite;
}

.loading-orbit::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
}

.loading-orbit i {
  position: absolute;
  top: -3px;
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan-bright);
  box-shadow: 0 0 13px var(--cyan);
}

.loading-orbit b {
  position: absolute;
  inset: 25px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 18px var(--cyan-glow);
}

.loading-track {
  width: 180px;
  height: 1px;
  background: var(--line);
}

.loading-track i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  transition: width 0.35s ease;
}

.error-panel {
  position: fixed;
  z-index: 30;
  top: 50%;
  left: 50%;
  width: min(420px, calc(100vw - 40px));
  padding: 28px;
  border: 1px solid var(--line-strong);
  background: var(--panel-strong);
  box-shadow: 0 28px 90px var(--shadow);
  text-align: center;
  transform: translate(-50%, -50%);
}

.error-panel strong {
  font-family: var(--display);
  font-size: 17px;
  letter-spacing: 0.08em;
}

.error-panel p {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

@keyframes orbit { to { transform: rotate(1turn); } }
@keyframes orbit-card-out {
  to { opacity: 0; transform: translate3d(48%, -24%, 0) rotate(8deg) scale(0.84); }
}
@keyframes orbit-card-in {
  from { opacity: 0; transform: translate3d(-28%, 20%, 0) rotate(-5deg) scale(0.9); }
  to { opacity: 1; transform: translate3d(0, 0, 0) rotate(0) scale(1); }
}
@keyframes signal { 50% { opacity: 0.35; transform: scale(0.72); } }
@keyframes scan { 0%, 100% { transform: translateX(-100%); } 50% { transform: translateX(360%); } }
@keyframes wheel { 0%, 100% { opacity: 0; transform: translate(-50%, -1px); } 35% { opacity: 1; } 70% { opacity: 0; transform: translate(-50%, 4px); } }

@media (max-width: 900px) {
  .mission-card { display: none; }

  .telemetry {
    bottom: 72px;
    width: min(330px, calc(100vw - 110px));
  }

  .source-note { display: none; }
}

@media (max-width: 620px) {
  .masthead {
    top: max(18px, env(safe-area-inset-top));
    left: 18px;
    right: 18px;
  }

  .brand { gap: 10px; }
  .brand-mark { width: 31px; height: 31px; }
  .brand-mark::before { inset: 6px; }
  .brand-mark::after { inset: 12px; }
  .brand-type strong { font-size: 11px; }
  .brand-type small { font-size: 8px; }
  .render-status span:not(.status-dot),
  .render-status b { display: none; }
  .render-status { padding: 10px; border-radius: 50%; }

  .control-dock {
    top: auto;
    right: 50%;
    bottom: max(20px, env(safe-area-inset-bottom));
    grid-template-columns: repeat(4, 44px);
    gap: 9px;
    transform: translateX(50%);
  }

  .control-button { width: 44px; height: 44px; }
  .control-button::after { display: none; }

  .telemetry {
    top: max(78px, calc(env(safe-area-inset-top) + 65px));
    bottom: auto;
    left: 18px;
    width: calc(100vw - 36px);
    padding: 11px 13px 10px;
    border-left: 0;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, var(--panel), var(--transparent));
  }

  .telemetry-heading { font-size: 7px; }
  .coordinate-grid { margin-top: 9px; }
  .coordinate-grid strong { font-size: 13px; }
  .signal-line { margin-top: 9px; }
  .interaction-guide { display: none; }
}

@media (hover: none) and (pointer: coarse) {
  .interaction-guide .mouse-icon,
  .interaction-guide .scroll-icon,
  .interaction-guide span:not(.touch-hint) { display: none; }
  .interaction-guide .touch-hint { display: inline-flex !important; }
}

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

/* Product exploration layers */
.lod-monitor {
  position: absolute;
  z-index: 5;
  top: 24%;
  right: clamp(24px, 3.8vw, 64px);
  display: grid;
  width: 170px;
  gap: 5px;
  padding: 12px 14px 13px;
  border-right: 1px solid var(--line-strong);
  background: linear-gradient(270deg, var(--panel), var(--transparent));
  text-align: right;
  pointer-events: none;
}

.lod-kicker {
  color: var(--muted-dim);
  font-family: var(--display);
  font-size: 7px;
  letter-spacing: 0.22em;
}

.lod-monitor strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.08em;
}

.lod-monitor small {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.lod-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-top: 8px;
}

.lod-track i {
  height: 2px;
  background: var(--line);
  transition: background 0.45s ease, box-shadow 0.45s ease;
}

.lod-track i.is-active {
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}

.daily-discovery {
  position: absolute;
  z-index: 5;
  right: clamp(24px, 4vw, 68px);
  bottom: clamp(86px, 10vh, 120px);
  width: 230px;
  height: 132px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 18px 60px var(--shadow);
  transition: transform 0.5s var(--ease-out), border-color 0.3s ease, opacity 0.35s ease;
}

.daily-discovery:hover {
  border-color: var(--line-strong);
  transform: translateY(-5px);
}

.daily-discovery img,
.daily-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.daily-discovery img {
  object-fit: cover;
  transition: transform 0.8s var(--ease-out);
}

.daily-discovery:hover img { transform: scale(1.06); }

.daily-discovery.is-orbit-leaving,
.discovery-widget.is-orbit-leaving {
  animation: orbit-card-out 0.28s cubic-bezier(0.55, 0, 1, 0.45) both;
}

.daily-discovery.is-orbit-entering,
.discovery-widget.is-orbit-entering {
  animation: orbit-card-in 0.56s var(--ease-out) both;
}

.daily-shade {
  background: linear-gradient(90deg, var(--photo-shade), var(--photo-shade-soft));
}

.daily-copy {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px;
}

.daily-copy small {
  color: var(--cyan-bright);
  font-size: 8px;
  letter-spacing: 0.14em;
}

.daily-copy small b { font-family: var(--display); font-weight: 500; }

.daily-copy strong {
  margin-top: 5px;
  color: var(--ink-strong);
  font-size: 19px;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.daily-copy em {
  margin-top: 8px;
  color: var(--white-soft);
  font-size: 8px;
  font-style: normal;
  letter-spacing: 0.1em;
}

.app-nav {
  position: absolute;
  z-index: 9;
  bottom: max(22px, env(safe-area-inset-bottom));
  left: 50%;
  display: flex;
  gap: 3px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel-strong);
  box-shadow: 0 14px 50px var(--shadow);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.app-nav-button {
  position: relative;
  display: flex;
  min-width: 82px;
  height: 42px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 15px;
  border-radius: 22px;
  background: var(--transparent);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.25s ease, background 0.25s ease;
}

.app-nav-button:hover,
.app-nav-button.is-active {
  color: var(--cyan-bright);
  background: var(--cyan-wash);
}

.app-nav-button svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.4;
}

.app-nav-button span {
  font-size: 10px;
  letter-spacing: 0.1em;
}

.app-nav-button > b {
  position: absolute;
  top: 3px;
  right: 7px;
  display: grid;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  place-items: center;
  border-radius: 8px;
  background: var(--cyan);
  color: var(--void);
  font-family: var(--display);
  font-size: 8px;
  font-weight: 600;
}

.interaction-guide { bottom: 86px; }

/* Place detail */
.place-panel {
  position: absolute;
  z-index: 10;
  top: 18px;
  right: 18px;
  bottom: 18px;
  display: grid;
  width: min(430px, calc(100vw - 36px));
  grid-template-rows: minmax(240px, 42%) 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel-raised);
  box-shadow: -28px 0 90px var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateX(calc(100% + 28px));
  transition: transform 0.7s var(--ease-out), opacity 0.4s ease;
}

body.place-open .place-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

body.place-open .daily-discovery,
body.place-open .place-explorer,
body.place-open .source-note,
body.place-open .lod-monitor {
  opacity: 0;
  pointer-events: none;
}

body.place-open .control-dock {
  right: min(476px, calc(100vw - 72px));
}

.panel-close {
  position: absolute;
  z-index: 3;
  top: 15px;
  right: 15px;
  display: grid;
  width: 37px;
  height: 37px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--white-faint);
  border-radius: 50%;
  background: var(--photo-shade);
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.panel-close svg {
  width: 17px;
  fill: none;
  stroke: var(--ink);
  stroke-linecap: round;
  stroke-width: 1.4;
}

.place-gallery {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background: var(--void-deep);
}

.place-gallery::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(0deg, var(--photo-shade), var(--transparent) 48%);
}

.gallery-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.75s var(--ease-out);
}

.gallery-slide {
  position: relative;
  flex: 0 0 100%;
  min-width: 0;
  height: 100%;
  margin: 0;
}

.gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 10px;
  background:
    linear-gradient(rgba(100, 231, 255, 0.055) 1px, var(--transparent) 1px),
    linear-gradient(90deg, rgba(100, 231, 255, 0.055) 1px, var(--transparent) 1px),
    radial-gradient(circle at 50% 50%, var(--cyan-wash), var(--transparent) 48%),
    var(--void-deep);
  background-size: 34px 34px, 34px 34px, auto, auto;
  text-align: center;
}

.gallery-placeholder[hidden],
.place-source[hidden] { display: none; }
.gallery-placeholder > span { color: var(--cyan); font-family: var(--display); font-size: 8px; letter-spacing: 0.25em; }
.gallery-placeholder > i {
  position: relative;
  width: 68px;
  height: 68px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  box-shadow: inset 0 0 24px var(--cyan-wash), 0 0 28px var(--cyan-wash);
}
.gallery-placeholder > i::before,
.gallery-placeholder > i::after { content: ""; position: absolute; background: var(--line-strong); }
.gallery-placeholder > i::before { top: 50%; right: -24px; left: -24px; height: 1px; }
.gallery-placeholder > i::after { top: -24px; bottom: -24px; left: 50%; width: 1px; }
.gallery-placeholder > strong { color: var(--ink); font-size: 18px; font-weight: 400; letter-spacing: 0.08em; }
.gallery-placeholder > small { color: var(--muted); font-size: 9px; letter-spacing: 0.1em; }
.place-panel.is-index .gallery-track,
.place-panel.is-index .gallery-arrow,
.place-panel.is-index .photo-attribution { display: none; }
.place-panel.is-index .gallery-topline span:last-child { display: none; }

.gallery-topline {
  position: absolute;
  z-index: 2;
  top: 18px;
  left: 18px;
  display: flex;
  gap: 12px;
  color: var(--white-soft);
  font-family: var(--display);
  font-size: 8px;
  letter-spacing: 0.16em;
}

.gallery-topline span:first-child { color: var(--cyan-bright); }

.gallery-arrow {
  position: absolute;
  z-index: 2;
  bottom: 18px;
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--white-faint);
  border-radius: 50%;
  background: var(--photo-shade);
  color: var(--ink);
  cursor: pointer;
}

.gallery-arrow--prev { right: 58px; }
.gallery-arrow--next { right: 18px; }

.photo-attribution {
  position: absolute;
  z-index: 2;
  bottom: 19px;
  left: 18px;
  display: flex;
  align-items: center;
  gap: 5px;
  max-width: 220px;
  overflow: hidden;
  color: var(--white-soft);
  font-size: 7px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.photo-attribution a {
  overflow: hidden;
  color: inherit;
  text-overflow: ellipsis;
}

.photo-attribution .photo-credit { min-width: 0; }
.photo-attribution .photo-license { flex: 0 0 auto; color: var(--cyan-bright); }
.photo-attribution[hidden] { display: none; }

.gallery-slide--deleted {
  display: grid;
  place-items: center;
  background:
    linear-gradient(rgba(100, 231, 255, 0.045) 1px, var(--transparent) 1px),
    linear-gradient(90deg, rgba(100, 231, 255, 0.045) 1px, var(--transparent) 1px),
    radial-gradient(circle at 50% 45%, var(--cyan-wash), var(--transparent) 46%),
    var(--void-deep);
  background-size: 28px 28px, 28px 28px, auto, auto;
}

.gallery-deleted-state {
  display: grid;
  max-width: 220px;
  justify-items: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
}

.gallery-deleted-state::before {
  content: "";
  width: 52px;
  height: 52px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--transparent) 48%, var(--cyan) 49%, var(--cyan) 51%, var(--transparent) 52%);
  box-shadow: inset 0 0 25px var(--cyan-wash), 0 0 24px var(--cyan-wash);
}

.gallery-deleted-state span,
.gallery-deleted-state small {
  color: var(--cyan);
  font-family: var(--display);
  font-size: 8px;
  letter-spacing: 0.16em;
}

.gallery-deleted-state strong { color: var(--ink); font-size: 16px; font-weight: 400; letter-spacing: 0.08em; }
.gallery-deleted-state small { color: var(--muted); line-height: 1.6; }

.place-content {
  min-height: 0;
  overflow-y: auto;
  padding: 26px 28px 30px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) var(--transparent);
}

.place-meta {
  display: flex;
  gap: 8px;
  color: var(--cyan);
  font-size: 8px;
  letter-spacing: 0.17em;
}

.place-meta span + span::before {
  content: "/";
  margin-right: 8px;
  color: var(--muted-dim);
}

.place-tagline {
  margin: 22px 0 5px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.place-content h2 {
  margin: 0;
  color: var(--ink-strong);
  font-size: clamp(31px, 3vw, 44px);
  font-weight: 400;
  letter-spacing: -0.05em;
}

.place-coordinate {
  margin: 8px 0 0;
  color: var(--muted-dim);
  font-family: var(--display);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.place-summary {
  margin: 22px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.95;
  letter-spacing: 0.04em;
}

.place-source,
.place-notices-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  padding: 0;
  border: 0;
  background: none;
  margin: -8px 0 19px;
  color: var(--cyan);
  font-size: 9px;
  letter-spacing: 0.08em;
}
.place-source:hover,
.place-notices-link:hover { color: var(--cyan-bright); }

.place-image-tools { margin: 0 0 19px; }

.image-editor-toggle {
  display: flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 12px 9px 15px;
  border: 1px solid var(--line);
  background:
    linear-gradient(90deg, var(--cyan-wash), var(--transparent) 38%),
    var(--panel-soft);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.image-editor-toggle:hover,
.image-editor-toggle[aria-expanded="true"] { border-color: var(--line-strong); background-color: var(--cyan-wash); }
.image-editor-toggle > span { display: grid; gap: 3px; }
.image-editor-toggle small { color: var(--cyan); font-family: var(--display); font-size: 7px; letter-spacing: 0.18em; }
.image-editor-toggle strong { font-size: 11px; font-weight: 500; letter-spacing: 0.08em; }
.image-editor-toggle b { color: var(--muted); font-size: 8px; font-weight: 400; letter-spacing: 0.08em; }

.place-image-editor {
  border: 1px solid var(--line);
  border-top: 0;
  background: var(--void-deep);
}

.place-image-editor[hidden] { display: none; }

.place-image-editor > header {
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px 9px 15px;
  border-bottom: 1px solid var(--line);
}

.place-image-editor > header > div { display: grid; gap: 3px; }
.place-image-editor > header small { color: var(--muted-dim); font-size: 7px; letter-spacing: 0.12em; }
.place-image-editor > header strong { color: var(--ink); font-size: 10px; font-weight: 500; letter-spacing: 0.09em; }
.place-image-editor > header button,
.image-slot-actions button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: var(--transparent);
  color: var(--muted);
  cursor: pointer;
  font-size: 8px;
  letter-spacing: 0.06em;
}

.place-image-editor > header button:hover,
.image-slot-actions button:hover { border-color: var(--line-strong); color: var(--cyan-bright); }

.place-image-slots { display: grid; }

.image-slot {
  position: relative;
  display: grid;
  min-width: 0;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 10px 12px 10px 15px;
  border-bottom: 1px solid var(--line);
}

.image-slot::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 0;
  width: 2px;
  background: var(--cyan);
  opacity: 0.25;
}

.image-slot[data-image-state="custom"]::before { opacity: 1; box-shadow: 0 0 12px var(--cyan); }
.image-slot[data-image-state="deleted"]::before { background: var(--muted-dim); opacity: 0.45; }

.image-slot-preview {
  position: relative;
  display: grid;
  width: 72px;
  height: 50px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(rgba(100, 231, 255, 0.05) 1px, var(--transparent) 1px),
    linear-gradient(90deg, rgba(100, 231, 255, 0.05) 1px, var(--transparent) 1px),
    var(--panel-soft);
  background-size: 12px 12px;
}

.image-slot-preview img { width: 100%; height: 100%; object-fit: cover; }
.image-slot-preview > span {
  position: absolute;
  right: 4px;
  bottom: 3px;
  padding: 2px 4px;
  background: var(--photo-shade);
  color: var(--cyan-bright);
  font-family: var(--display);
  font-size: 7px;
}

.image-slot[data-image-state="deleted"] .image-slot-preview::after { content: "×"; color: var(--muted); font-family: var(--display); font-size: 18px; }
.image-slot-copy { display: grid; min-width: 0; gap: 4px; }
.image-slot-copy small { color: var(--cyan); font-family: var(--display); font-size: 7px; letter-spacing: 0.13em; }
.image-slot[data-image-state="deleted"] .image-slot-copy small { color: var(--muted-dim); }
.image-slot-copy strong { overflow: hidden; color: var(--ink); font-size: 9px; font-weight: 400; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.image-slot-actions { display: grid; grid-template-columns: 1fr; gap: 5px; }
.image-slot-actions button { color: var(--muted-dim); }
.image-slot-actions button:disabled { cursor: default; opacity: 0.35; }

.place-image-editor > p {
  margin: 0;
  padding: 10px 15px 12px;
  color: var(--muted-dim);
  font-size: 8px;
  line-height: 1.65;
}

.place-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0;
  padding: 17px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.place-facts div { display: grid; gap: 5px; }
.place-facts dt,
.place-facts dd { margin: 0; }
.place-facts dt { color: var(--muted-dim); font-size: 8px; letter-spacing: 0.12em; }
.place-facts dd { color: var(--ink); font-size: 10px; line-height: 1.45; }

.place-actions,
.dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 22px;
}

.primary-action,
.secondary-action,
.export-button {
  min-height: 44px;
  padding: 0 17px;
  cursor: pointer;
  transition: transform 0.25s var(--ease-out), border-color 0.25s ease, background 0.25s ease;
}

.primary-action {
  background: var(--cyan-bright);
  color: var(--void);
}

.secondary-action {
  border: 1px solid var(--line);
  background: var(--transparent);
  color: var(--ink);
}

.primary-action:hover,
.secondary-action:hover,
.export-button:hover { transform: translateY(-2px); }
.secondary-action:hover { border-color: var(--line-strong); }

.place-native-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.place-native-actions button {
  display: grid;
  gap: 4px;
  min-height: 52px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, var(--cyan-wash), var(--transparent));
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.25s ease, transform 0.25s var(--ease-out);
}

.place-native-actions button:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.place-native-actions button:last-child { grid-column: 1 / -1; }
.place-native-actions span { font-size: 10px; letter-spacing: 0.08em; }
.place-native-actions small { color: var(--muted-dim); font-size: 7px; letter-spacing: 0.08em; }

/* Journal and service card workspace */
.workspace-panel {
  position: absolute;
  z-index: 8;
  inset: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 30px clamp(30px, 5vw, 80px) 120px;
  background:
    radial-gradient(circle at 78% 12%, var(--cyan-wash), var(--transparent) 30%),
    linear-gradient(135deg, var(--void-deep), var(--void) 58%, var(--void-deep));
  opacity: 0;
  pointer-events: none;
  transform: translateY(28px);
  transition: opacity 0.45s ease, transform 0.65s var(--ease-out);
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) var(--void);
}

body:not([data-view="explore"]) .workspace-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

body:not([data-view="explore"]) .mission-card,
body:not([data-view="explore"]) .place-explorer,
body:not([data-view="explore"]) .telemetry,
body:not([data-view="explore"]) .lod-monitor,
body:not([data-view="explore"]) .control-dock,
body:not([data-view="explore"]) .daily-discovery,
body:not([data-view="explore"]) .interaction-guide,
body:not([data-view="explore"]) .source-note,
body:not([data-view="explore"]) .place-panel {
  opacity: 0;
  pointer-events: none;
}

.workspace-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto 44px;
  padding-top: 70px;
}

.workspace-header p {
  margin: 0 0 8px;
  color: var(--cyan);
  font-family: var(--display);
  font-size: 9px;
  letter-spacing: 0.24em;
}

.workspace-header h2 {
  margin: 0;
  color: var(--ink-strong);
  font-size: clamp(36px, 5vw, 68px);
  font-weight: 400;
  letter-spacing: -0.06em;
}

.workspace-close {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px 9px 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
}

.workspace-close span { font-size: 9px; letter-spacing: 0.1em; }
.workspace-close svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.3; }

.workspace-view {
  max-width: 1400px;
  margin: 0 auto;
}

.journal-overview {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: clamp(32px, 6vw, 96px);
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
}

.journal-intro > p {
  max-width: 410px;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.9;
  letter-spacing: 0.05em;
}

.export-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line-strong);
  background: var(--cyan-wash);
  color: var(--cyan-bright);
  font-size: 10px;
  letter-spacing: 0.1em;
}

.export-button svg { width: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.4; }

.trip-countdown {
  position: relative;
  display: grid;
  gap: 7px;
  max-width: 410px;
  margin-top: 18px;
  padding: 16px 18px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: radial-gradient(circle at 100% 0, var(--cyan-wash), var(--panel-faint) 58%);
}

.trip-countdown::after {
  position: absolute;
  top: -34px;
  right: -24px;
  width: 92px;
  height: 92px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  box-shadow: 0 0 28px var(--cyan-wash);
  content: '';
}

.trip-countdown small { color: var(--cyan); font-family: var(--display); font-size: 7px; letter-spacing: 0.18em; }
.trip-countdown strong { color: var(--ink); font-size: 18px; font-weight: 400; }
.trip-countdown span { color: var(--muted); font-size: 10px; }
.trip-countdown button { justify-self: start; padding: 0; background: transparent; color: var(--cyan-bright); font-size: 9px; cursor: pointer; }

.journal-stats {
  display: grid;
  grid-template-columns: 0.75fr 0.75fr 0.75fr 1.35fr;
  gap: 1px;
  background: var(--line);
}

.journal-stats > div {
  display: grid;
  min-height: 115px;
  align-content: space-between;
  padding: 19px;
  background: var(--panel-faint);
}

.journal-stats span { color: var(--muted-dim); font-size: 8px; letter-spacing: 0.14em; }
.journal-stats strong { color: var(--ink); font-family: var(--display); font-size: 32px; font-weight: 400; }
.progress-stat i { height: 2px; overflow: hidden; background: var(--line); }
.progress-stat i b { display: block; width: 0; height: 100%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); transition: width 0.6s var(--ease-out); }

.footprint-map {
  position: relative;
  height: clamp(260px, 34vw, 480px);
  margin: 36px 0 44px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--void-deep);
}

.footprint-map > img,
.footprint-map-shade,
.footprint-points {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.footprint-map > img { object-fit: fill; opacity: 0.72; filter: saturate(0.78) brightness(0.72) contrast(1.14); }
.footprint-map-shade { background: linear-gradient(0deg, var(--photo-shade), var(--transparent) 55%), var(--cyan-wash); }

.footprint-point {
  position: absolute;
  width: 11px;
  height: 11px;
  border: 2px solid var(--ink-strong);
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 8px var(--cyan-wash), 0 0 22px var(--cyan);
  transform: translate(-50%, -50%);
}

.footprint-point.is-wishlist { background: var(--wishlist); box-shadow: 0 0 0 8px var(--white-faint), 0 0 20px var(--wishlist); }
.footprint-point::after { content: attr(data-name); position: absolute; top: 16px; left: 50%; padding: 4px 7px; background: var(--panel-strong); color: var(--ink); font-size: 8px; white-space: nowrap; transform: translateX(-50%); }

.map-caption {
  position: absolute;
  z-index: 2;
  right: 22px;
  bottom: 18px;
  left: 22px;
  display: flex;
  justify-content: space-between;
  color: var(--white-soft);
  font-family: var(--display);
  font-size: 8px;
  letter-spacing: 0.16em;
}

.map-caption b { color: var(--cyan-bright); font-weight: 500; }

.timeline-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.timeline-heading h3 { margin: 0; color: var(--ink); font-size: 19px; font-weight: 400; }

.filter-tabs {
  display: flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 20px;
}

.filter-tabs button {
  min-width: 54px;
  padding: 7px 12px;
  border-radius: 16px;
  background: var(--transparent);
  color: var(--muted);
  font-size: 9px;
  cursor: pointer;
}

.filter-tabs button.is-active { background: var(--cyan-wash); color: var(--cyan-bright); }

.journey-timeline {
  display: grid;
  gap: 1px;
  background: var(--line);
}

.timeline-entry {
  display: grid;
  grid-template-columns: 110px minmax(120px, 0.55fr) minmax(220px, 1fr) 120px;
  gap: 24px;
  align-items: center;
  min-height: 118px;
  padding: 18px 22px;
  background: var(--panel-faint);
}

.timeline-photo { width: 110px; height: 80px; object-fit: cover; background: var(--cyan-wash); }
.timeline-photo-placeholder { display: grid; width: 110px; height: 80px; place-items: center; background: linear-gradient(135deg, var(--cyan-wash), var(--panel)); color: var(--cyan); font-family: var(--display); font-size: 26px; }
.timeline-place { display: grid; gap: 6px; }
.timeline-place small { color: var(--cyan); font-size: 8px; letter-spacing: 0.14em; }
.timeline-place strong { color: var(--ink); font-size: 18px; font-weight: 400; }
.timeline-place span { color: var(--muted-dim); font-family: var(--display); font-size: 8px; }
.timeline-note { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.8; }
.timeline-actions { display: grid; justify-items: end; gap: 10px; }
.timeline-actions time { color: var(--muted-dim); font-family: var(--display); font-size: 9px; }
.timeline-actions button { padding: 0; background: var(--transparent); color: var(--cyan); font-size: 8px; cursor: pointer; opacity: 0.78; }
.timeline-actions button[data-action="delete-entry"] { color: var(--danger); }

.empty-journey {
  display: grid;
  min-height: 210px;
  place-items: center;
  background: var(--panel-faint);
  text-align: center;
}

.empty-journey div { display: grid; justify-items: center; gap: 9px; }
.empty-journey i { display: grid; width: 45px; height: 45px; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--cyan); font-family: var(--display); font-style: normal; }
.empty-journey strong { color: var(--ink); font-size: 15px; font-weight: 400; }
.empty-journey span { color: var(--muted); font-size: 10px; }
.empty-journey button { margin-top: 5px; padding: 8px 14px; border: 1px solid var(--line); background: var(--transparent); color: var(--cyan); font-size: 9px; cursor: pointer; }

/* Desktop cards */
.place-catalog-section {
  margin-bottom: 74px;
  padding-bottom: 70px;
  border-bottom: 1px solid var(--line);
}

.place-catalog-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 24px;
}

.place-catalog-heading p { margin: 0 0 8px; color: var(--cyan); font-family: var(--display); font-size: 8px; letter-spacing: 0.22em; }
.place-catalog-heading h3 { margin: 0; color: var(--ink); font-size: clamp(28px, 3.4vw, 46px); font-weight: 400; letter-spacing: -0.04em; }
.place-catalog-heading > span { color: var(--muted); font-family: var(--display); font-size: 9px; letter-spacing: 0.08em; }

.place-catalog {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.place-catalog-card {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--white-faint);
  background: var(--panel);
  text-align: left;
  cursor: pointer;
}

.place-catalog-card > img,
.place-catalog-shade { position: absolute; inset: 0; width: 100%; height: 100%; }
.place-catalog-card > img { object-fit: cover; transition: transform 0.8s var(--ease-out), filter 0.4s ease; }
.place-catalog-shade { background: linear-gradient(0deg, rgba(0, 7, 11, 0.92), rgba(0, 7, 11, 0.04) 74%); }
.place-catalog-card:hover > img { transform: scale(1.045); filter: saturate(1.08); }

.place-catalog-copy {
  position: absolute;
  z-index: 2;
  right: 18px;
  bottom: 18px;
  left: 18px;
  display: grid;
  gap: 4px;
}
.place-catalog-copy small { color: var(--cyan-bright); font-size: 8px; letter-spacing: 0.1em; }
.place-catalog-copy strong { color: var(--ink-strong); font-size: clamp(21px, 2.3vw, 31px); font-weight: 400; letter-spacing: -0.03em; }
.place-catalog-copy em { overflow: hidden; color: var(--white-soft); font-size: 9px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.place-catalog-copy b { margin-top: 7px; color: var(--ink); font-size: 8px; font-weight: 400; letter-spacing: 0.08em; }
.place-catalog-copy b i { color: var(--cyan); font-style: normal; }

.widget-intro {
  display: grid;
  grid-template-columns: 1fr;
  gap: 60px;
  align-items: end;
  margin-bottom: 42px;
  padding-bottom: 35px;
  border-bottom: 1px solid var(--line);
}

.widget-eyebrow { margin: 0 0 10px; color: var(--cyan); font-family: var(--display); font-size: 9px; letter-spacing: 0.22em; }
.widget-intro h3 { margin: 0; color: var(--ink); font-size: clamp(30px, 4vw, 54px); font-weight: 400; letter-spacing: -0.05em; }
.widget-intro > p { max-width: 500px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.9; }

.widget-stage {
  display: grid;
  grid-template-columns: minmax(300px, 1.1fr) minmax(300px, 0.9fr);
  gap: clamp(20px, 4vw, 52px);
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
}

.harmony-widget {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--white-faint);
  border-radius: 34px;
  box-shadow: 0 34px 90px var(--shadow);
}

.discovery-widget { aspect-ratio: 1.55; min-height: 340px; background: var(--panel); }
.discovery-widget > img,
.widget-image-shade { position: absolute; inset: 0; width: 100%; height: 100%; }
.discovery-widget > img { object-fit: cover; }
.widget-image-shade { background: linear-gradient(0deg, var(--photo-shade), var(--transparent) 68%); }

.widget-brand {
  position: absolute;
  z-index: 2;
  top: 24px;
  right: 26px;
  left: 26px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--white-soft);
  font-size: 10px;
  letter-spacing: 0.1em;
}

.widget-brand i { width: 8px; height: 8px; border: 1px solid var(--cyan-bright); border-radius: 50%; box-shadow: 0 0 9px var(--cyan); }
.widget-brand b { margin-left: auto; font-size: 8px; font-weight: 400; opacity: 0.75; }

.widget-discovery-copy {
  position: absolute;
  z-index: 2;
  right: 28px;
  bottom: 27px;
  left: 28px;
}

.widget-discovery-copy small { color: var(--cyan-bright); font-size: 9px; letter-spacing: 0.13em; }
.widget-discovery-copy h4 { margin: 5px 0 3px; color: var(--ink-strong); font-size: clamp(27px, 3.8vw, 48px); font-weight: 400; letter-spacing: -0.04em; }
.widget-discovery-copy p { margin: 0; color: var(--white-soft); font-size: 11px; letter-spacing: 0.06em; }
.widget-discovery-copy button { position: absolute; right: 0; bottom: 1px; padding: 9px 13px; border: 1px solid var(--white-faint); border-radius: 17px; background: var(--photo-shade); color: var(--ink); font-size: 9px; cursor: pointer; backdrop-filter: blur(10px); }

.widget-pager {
  position: absolute;
  z-index: 3;
  top: 64px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border: 1px solid var(--white-faint);
  background: var(--photo-shade);
  backdrop-filter: blur(12px);
}
.widget-pager button { display: grid; width: 30px; height: 30px; padding: 0; place-items: center; background: var(--transparent); color: var(--ink); cursor: pointer; }
.widget-pager button:hover { background: var(--white-faint); }
.widget-pager span { color: var(--white-soft); font-family: var(--display); font-size: 7px; letter-spacing: 0.08em; }

.progress-widget {
  min-height: 390px;
  padding: 84px 28px 28px;
  background: radial-gradient(circle at 75% 32%, var(--cyan-wash), var(--transparent) 45%), var(--panel-raised);
}

.progress-ring {
  position: relative;
  display: grid;
  width: 165px;
  height: 165px;
  margin: 8px auto 24px;
  place-content: center;
  border-radius: 50%;
  background: conic-gradient(var(--cyan) var(--widget-progress, 0%), var(--line) 0);
  box-shadow: 0 0 50px var(--cyan-wash);
}

.progress-ring::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  background: var(--panel-raised);
}
.progress-ring strong,
.progress-ring span { position: relative; z-index: 1; text-align: center; }
.progress-ring strong { color: var(--ink); font-family: var(--display); font-size: 34px; font-weight: 400; }
.progress-ring span { color: var(--muted); font-size: 8px; letter-spacing: 0.14em; }

.widget-progress-copy { text-align: center; }
.widget-progress-copy p { margin: 0; color: var(--muted); font-size: 9px; }
.widget-progress-copy > strong { display: block; margin: 3px 0; color: var(--ink); font-size: 22px; font-weight: 400; }
.widget-progress-copy > strong b { color: var(--cyan-bright); font-family: var(--display); font-size: 30px; font-weight: 500; }
.widget-progress-copy > span { color: var(--muted-dim); font-size: 9px; }
.widget-progress-copy em { color: var(--wishlist); font-style: normal; }
.widget-open-journal { display: block; margin: 20px auto 0; padding: 8px 13px; border: 1px solid var(--line); border-radius: 17px; background: var(--transparent); color: var(--cyan-bright); font-size: 9px; cursor: pointer; }

.legal-footer { display: flex; justify-content: center; padding: 34px 0 8px; }
.legal-footer button { padding: 8px 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--transparent); color: var(--muted); font: 9px var(--body); letter-spacing: 0.08em; cursor: pointer; }
.legal-footer button:hover { border-color: var(--line-strong); color: var(--cyan-bright); }

/* Journal dialog */
.journal-dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line-strong);
  background: var(--panel-raised);
  color: var(--ink);
  box-shadow: 0 35px 120px var(--shadow);
}

.journal-dialog::backdrop { background: var(--photo-shade); backdrop-filter: blur(9px); }
.journal-dialog form { padding: 28px; }
.journal-dialog header { display: flex; justify-content: space-between; align-items: flex-start; }
.journal-dialog header p { margin: 0 0 6px; color: var(--cyan); font-family: var(--display); font-size: 8px; letter-spacing: 0.2em; }
.journal-dialog header h2 { margin: 0; font-size: 26px; font-weight: 400; }
.journal-dialog header button { width: 32px; height: 32px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--transparent); color: var(--muted); font-size: 19px; cursor: pointer; }

.status-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 26px 0 18px;
  padding: 0;
  border: 0;
}

.status-choice legend { grid-column: 1 / -1; margin-bottom: 8px; color: var(--muted); font-size: 9px; letter-spacing: 0.12em; }
.status-choice input { position: absolute; opacity: 0; }
.status-choice label span { display: grid; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); cursor: pointer; transition: border-color 0.25s ease, background 0.25s ease; }
.status-choice input:checked + span { border-color: var(--line-strong); background: var(--cyan-wash); }
.status-choice b { color: var(--ink); font-size: 13px; font-weight: 400; }
.status-choice small { color: var(--muted-dim); font-size: 8px; }

.form-field { position: relative; display: grid; gap: 8px; margin-top: 16px; }
.form-field > span { color: var(--muted); font-size: 9px; letter-spacing: 0.12em; }
.form-field input,
.form-field textarea { width: 100%; border: 1px solid var(--line); border-radius: 0; outline: 0; background: var(--panel-faint); color: var(--ink); font: 11px var(--body); }
.form-field input { height: 42px; padding: 0 12px; color-scheme: dark; }
.form-field textarea { resize: vertical; min-height: 88px; padding: 12px; line-height: 1.7; }
.form-field input:focus,
.form-field textarea:focus { border-color: var(--line-strong); }
.form-field > small { position: absolute; right: 8px; bottom: 7px; color: var(--muted-dim); font-family: var(--display); font-size: 7px; }

.photo-field {
  position: relative;
  display: grid;
  min-height: 94px;
  margin-top: 18px;
  overflow: hidden;
  place-items: center;
  border: 1px dashed var(--line-strong);
  background: var(--panel-faint);
  cursor: pointer;
}

.photo-field input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.photo-placeholder { display: grid; justify-items: center; gap: 3px; color: var(--muted); font-size: 9px; }
.photo-placeholder b { color: var(--cyan); font-size: 22px; font-weight: 300; }
.photo-placeholder small { color: var(--muted-dim); font-size: 7px; }
.photo-field img { width: 100%; max-height: 220px; object-fit: cover; }
.dialog-actions { margin-top: 20px; }

.delete-entry-dialog {
  width: min(420px, calc(100vw - 32px));
}

.delete-entry-dialog form {
  padding: 26px;
}

.delete-entry-copy {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.delete-entry-confirm {
  background: var(--danger);
  color: var(--ink);
}

.notices-dialog {
  width: min(900px, calc(100vw - 32px));
  height: min(760px, calc(100vh - 32px));
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--panel-raised);
  color: var(--ink);
  box-shadow: 0 35px 120px var(--shadow);
}
.notices-dialog::backdrop { background: var(--photo-shade); backdrop-filter: blur(9px); }
.notices-dialog header { display: flex; justify-content: space-between; align-items: flex-start; padding: 22px 24px 18px; border-bottom: 1px solid var(--line); }
.notices-dialog header p { margin: 0 0 5px; color: var(--cyan); font-family: var(--display); font-size: 8px; letter-spacing: 0.18em; }
.notices-dialog header h2 { margin: 0; font-size: 24px; font-weight: 400; }
.notices-dialog header button { width: 32px; height: 32px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--transparent); color: var(--muted); font-size: 19px; cursor: pointer; }
.notices-dialog pre { height: calc(100% - 91px); margin: 0; padding: 22px 24px 36px; overflow: auto; color: var(--muted); font: 10px/1.8 var(--body); white-space: pre-wrap; overflow-wrap: anywhere; }

.toast {
  position: fixed;
  z-index: 40;
  top: 24px;
  left: 50%;
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 11px 16px;
  border: 1px solid var(--line-strong);
  background: var(--panel-raised);
  box-shadow: 0 18px 55px var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -18px);
  transition: opacity 0.3s ease, transform 0.45s var(--ease-out);
}

.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast i { width: 6px; height: 6px; border-radius: 50%; background: var(--visited); box-shadow: 0 0 8px var(--visited); }
.toast span { color: var(--ink); font-size: 10px; letter-spacing: 0.08em; }

@media (max-width: 1080px) {
  .place-explorer { top: 82px; width: min(660px, calc(100vw - 48px)); min-width: 0; }
  .place-catalog { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .journal-overview { grid-template-columns: 1fr; }
  .widget-stage { grid-template-columns: 1fr; max-width: 620px; }
  .timeline-entry { grid-template-columns: 90px 0.7fr 1fr 90px; gap: 16px; }
  .timeline-photo,
  .timeline-photo-placeholder { width: 90px; height: 70px; }
}

@media (max-width: 900px) {
  .lod-monitor { top: 23%; right: 22px; }
  .daily-discovery { right: 22px; }
  .workspace-panel { padding-right: 28px; padding-left: 28px; }
  .widget-intro { grid-template-columns: 1fr; gap: 20px; }
  .journal-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
  .place-catalog { grid-template-columns: 1fr; }
  .place-catalog-card { min-height: 280px; }
  .place-catalog-heading { align-items: flex-start; gap: 18px; }
  .place-panel {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: min(78vh, 720px);
    grid-template-rows: 225px 1fr;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    transform: translateY(105%);
  }

  body.place-open .place-panel { transform: translateY(0); }
  body.place-open .control-dock { right: 14px; }
  body.place-open .app-nav { opacity: 0; pointer-events: none; }
  .place-content { padding: 22px 20px 26px; }

  .workspace-panel { padding: 18px 16px 104px; }
  .workspace-header { margin-bottom: 30px; padding-top: 76px; }
  .workspace-close span { display: none; }
  .workspace-header h2 { font-size: 38px; }
  .journal-overview { padding-bottom: 28px; }
  .footprint-map { margin: 26px 0 34px; }
  .timeline-entry { grid-template-columns: 72px 1fr auto; gap: 14px; min-height: 104px; padding: 14px; }
  .timeline-photo,
  .timeline-photo-placeholder { width: 72px; height: 72px; }
  .timeline-note { grid-column: 2 / -1; }
  .timeline-actions { align-self: start; }
  .widget-stage { gap: 22px; }
  .discovery-widget { min-height: 300px; }
}

@media (max-width: 620px) {
  .place-explorer { top: max(62px, calc(env(safe-area-inset-top) + 50px)); width: calc(100vw - 24px); }
  .place-search-shell { grid-template-columns: minmax(0, 1fr) 76px; }
  .place-search-input { padding: 0 11px; }
  .place-search-input > span { display: none; }
  .place-filter-grid { grid-template-columns: 1fr; }
  .place-search-panel { max-height: calc(100dvh - 118px); }
  .place-search-results { max-height: calc(100dvh - 350px); }
  .place-search-result { min-height: 58px; grid-template-columns: 13px minmax(0, 1fr) 18px; }
  .place-search-result em { display: none; }
  .telemetry { display: none; }
  .control-dock {
    top: 51%;
    right: 13px;
    bottom: auto;
    grid-template-columns: 40px;
    gap: 7px;
    transform: translateY(-50%);
  }

  .control-button { width: 40px; height: 40px; }
  .app-nav { bottom: max(14px, env(safe-area-inset-bottom)); }
  .app-nav-button { min-width: 72px; height: 39px; padding: 0 12px; }
  .daily-discovery { right: auto; bottom: 76px; left: 15px; width: 178px; height: 96px; }
  .daily-copy { padding: 12px; }
  .daily-copy strong { font-size: 15px; }
  .daily-copy em { display: none; }
  .lod-monitor { top: 190px; right: 12px; width: 145px; padding: 9px 10px 10px; }
  .lod-monitor small { display: none; }
  .telemetry { z-index: 5; }
  .journal-stats > div { min-height: 98px; padding: 15px; }
  .journal-stats strong { font-size: 27px; }
  .footprint-map { height: 230px; }
  .footprint-point::after { display: none; }
  .timeline-heading { align-items: flex-start; gap: 14px; }
  .filter-tabs button { min-width: 43px; padding: 6px 9px; }
  .widget-intro h3 { font-size: 33px; }
  .harmony-widget { border-radius: 26px; }
  .discovery-widget { min-height: 270px; }
  .widget-discovery-copy button { position: static; margin-top: 14px; }
  .widget-pager { top: 56px; right: 18px; }
  .journal-dialog form { padding: 22px 18px; }
}

@media (max-width: 430px) {
  .place-filter-toggle span { display: none; }
  .place-search-shell { grid-template-columns: minmax(0, 1fr) 48px; }
  .place-filter-toggle svg { width: 19px; }
  .place-result-heading { align-items: flex-start; gap: 8px; }
  .place-catalog-heading { display: grid; }
  .app-nav-button { min-width: 66px; padding: 0 10px; }
  .app-nav-button span { font-size: 9px; }
  .lod-monitor { display: none; }
  .daily-discovery { width: 160px; }
  .place-facts { gap: 7px; }
  .workspace-header h2 { font-size: 33px; }
  .journal-stats { grid-template-columns: 1fr 1fr; }
  .timeline-heading { display: grid; }
  .timeline-entry { grid-template-columns: 62px 1fr; }
  .timeline-photo,
  .timeline-photo-placeholder { width: 62px; height: 62px; }
  .timeline-actions { grid-column: 2; grid-row: 2; justify-items: start; grid-auto-flow: column; }
  .timeline-note { grid-column: 1 / -1; }
  .image-slot { grid-template-columns: 62px minmax(0, 1fr); }
  .image-slot-preview { width: 62px; height: 48px; grid-row: 1 / span 2; }
  .image-slot-actions { grid-column: 2; grid-template-columns: 1fr 1fr; }
  .place-image-editor > header { align-items: flex-start; }
}
