:root {
  --bg: #050816;
  --bg-deep: #02030a;
  --panel: rgba(10, 15, 35, 0.58);
  --panel-strong: rgba(12, 18, 38, 0.82);
  --text: #f4f1ea;
  --muted: rgba(244, 241, 234, 0.72);
  --line: rgba(255, 255, 255, 0.1);
  --gold: #ffbf69;
  --coral: #ff6b6b;
  --cyan: #69e2ff;
  --mint: #9df3c4;
  --amber: #f6a04d;
  --steel: #7ec6d9;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  --mouse-x: 0.5;
  --mouse-y: 0.5;
  --scroll-depth: 0;
  --motion-scale: 1;
  --camera-x: 0px;
  --camera-y: 0px;
  --planet-accent: #ffbf69;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  height: 100%;
  font-family: "Syne", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 30% 68%, rgba(255, 173, 92, 0.06), transparent 26%),
    radial-gradient(circle at 78% 22%, rgba(126, 198, 217, 0.08), transparent 24%),
    linear-gradient(160deg, #040712 0%, #07101b 54%, #03050c 100%);
  overflow-x: hidden;
  overflow-y: hidden;
  cursor: grab;
}

body.dragging {
  cursor: grabbing;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: -15%;
  pointer-events: none;
  z-index: -3;
}

body::before {
  background:
    radial-gradient(circle at 24% 62%, rgba(255, 191, 105, 0.08), transparent 22%),
    radial-gradient(circle at 78% 26%, rgba(105, 226, 255, 0.08), transparent 20%);
  filter: blur(110px);
  opacity: 0.34;
  transform: scale(1.02);
}

body::after {
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.03), transparent 72%);
  opacity: 0.1;
}

.noise,
.starfield {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.vault-architecture {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -4;
  opacity: 0.08;
}

.vault-ring,
.vault-beam,
.vault-fog,
.vault-pulse {
  position: absolute;
}

.vault-ring {
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 40px rgba(255, 255, 255, 0.02);
}

.vault-ring-a {
  width: 92vw;
  height: 92vw;
  max-width: 1280px;
  max-height: 1280px;
  left: -18vw;
  top: 10vh;
  transform: rotate(8deg);
  opacity: 0.18;
}

.vault-ring-b {
  width: 76vw;
  height: 76vw;
  max-width: 980px;
  max-height: 980px;
  right: -16vw;
  top: -8vh;
  border-color: rgba(126, 198, 217, 0.08);
  opacity: 0.14;
}

.vault-ring-c {
  width: 110vw;
  height: 64vw;
  left: -6vw;
  bottom: -20vh;
  border-radius: 50%;
  border-color: rgba(246, 160, 77, 0.07);
  opacity: 0.1;
}

.vault-beam {
  width: 2px;
  height: 120vh;
  top: -10vh;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  filter: blur(1px);
  opacity: 0.22;
}

.vault-beam-a {
  left: 16%;
  transform: rotate(8deg);
}

.vault-beam-b {
  right: 14%;
  transform: rotate(-10deg);
}

.vault-fog {
  border-radius: 50%;
  filter: blur(70px);
  mix-blend-mode: screen;
}

.vault-fog-a {
  width: 54vw;
  height: 36vw;
  left: -8vw;
  top: 16vh;
  background: radial-gradient(circle at 30% 40%, rgba(126, 198, 217, 0.11), transparent 65%);
  animation: fog-drift-a 28s ease-in-out infinite alternate;
}

.vault-fog-b {
  width: 46vw;
  height: 32vw;
  right: -10vw;
  top: 8vh;
  background: radial-gradient(circle at 60% 40%, rgba(246, 160, 77, 0.12), transparent 62%);
  animation: fog-drift-b 34s ease-in-out infinite alternate;
}

.vault-fog-c {
  width: 70vw;
  height: 24vw;
  left: 10vw;
  bottom: 6vh;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.05), transparent 70%);
  animation: fog-drift-c 22s ease-in-out infinite alternate;
}

.vault-pulse {
  inset: 0;
  background:
    radial-gradient(circle at 72% 48%, rgba(126, 198, 217, 0.08), transparent 18%),
    radial-gradient(circle at 68% 52%, rgba(246, 160, 77, 0.06), transparent 16%);
  opacity: 0.42;
  animation: chamber-breathe calc(12s / var(--motion-scale)) ease-in-out infinite;
}

.starfield {
  z-index: -2;
  width: 100%;
  height: 100%;
  opacity: 0.2;
}

.noise {
  z-index: -1;
  opacity: 0.02;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.85'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.experience {
  width: 100%;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
}

.hero {
  min-height: 100svh;
  min-height: 100dvh;
  height: 100svh;
  height: 100dvh;
  display: grid;
  place-items: center;
  padding: 0;
}

.hero-orbital {
  position: relative;
  width: 100%;
  min-height: 100svh;
  min-height: 100dvh;
  height: 100svh;
  height: 100dvh;
  display: grid;
  place-items: center;
  overflow: hidden;
  touch-action: none;
}

.hero-orbital::before {
  content: "";
  position: absolute;
  inset: 6% 2%;
  border-radius: 36px;
  background:
    radial-gradient(circle at 62% 52%, rgba(126, 198, 217, 0.04), transparent 18%),
    radial-gradient(circle at 57% 72%, rgba(246, 160, 77, 0.035), transparent 20%);
  opacity: 0.18;
  transform: translateZ(-120px);
}

.world {
  position: absolute;
  inset: 0;
  transform:
    translate3d(var(--camera-x), var(--camera-y), 0)
    scale(1);
  transform-style: preserve-3d;
}

.planet-ui {
  position: absolute;
  left: 24px;
  top: 16px;
  bottom: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 12px;
  max-height: calc(100svh - 32px);
  z-index: 4;
  pointer-events: auto;
  touch-action: auto;
}

.view-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: min(420px, calc(100vw - 32px));
}

.visit-top-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: min(620px, calc(100vw - 32px));
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 209, 128, 0.2);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 209, 128, 0.12), rgba(255, 255, 255, 0.03)),
    rgba(12, 16, 28, 0.84);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
}

.visit-top-banner.is-hidden {
  display: none;
}

.visit-top-copy-wrap {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.visit-top-copy-wrap .builder-copy {
  margin: 0;
}

.universe-browser {
  width: min(360px, calc(100vw - 32px));
  max-height: min(58svh, 520px);
  overflow: hidden;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(14, 18, 35, 0.92), rgba(9, 12, 24, 0.86));
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

.universe-browser.is-hidden {
  display: none;
}

.universe-search-list {
  display: grid;
  gap: 10px;
  max-height: min(42svh, 360px);
  margin-top: 12px;
  overflow: auto;
  padding-right: 4px;
}

.universe-search-card {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  text-align: left;
  color: rgba(244, 241, 234, 0.94);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.universe-search-card:hover {
  transform: translateY(-1px);
  border-color: rgba(157, 243, 196, 0.28);
  background: rgba(255, 255, 255, 0.06);
}

.universe-search-card.is-selected {
  border-color: rgba(157, 243, 196, 0.38);
  background: rgba(157, 243, 196, 0.1);
  box-shadow: 0 10px 24px rgba(157, 243, 196, 0.12);
}

.universe-search-title {
  font: 700 0.98rem/1.2 "Syne", sans-serif;
}

.universe-search-meta {
  color: rgba(244, 241, 234, 0.64);
  font: 500 0.74rem/1.45 "IBM Plex Mono", monospace;
  letter-spacing: 0.04em;
}

.universe-search-empty {
  padding: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  color: rgba(244, 241, 234, 0.68);
}

.view-chip {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  min-height: 38px;
  padding: 0 14px;
  background: rgba(7, 10, 22, 0.74);
  color: rgba(244, 241, 234, 0.86);
  backdrop-filter: blur(16px);
  font: 500 0.7rem/1 "IBM Plex Mono", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.view-chip.is-active {
  border-color: rgba(157, 243, 196, 0.42);
  background: rgba(157, 243, 196, 0.1);
  color: rgba(244, 241, 234, 0.96);
  box-shadow: 0 10px 24px rgba(157, 243, 196, 0.12);
}

.view-chip:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(201, 244, 255, 0.28);
  background: rgba(255, 255, 255, 0.06);
}

.view-chip:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.view-chip.has-unread {
  border-color: rgba(255, 191, 105, 0.42);
  background: rgba(255, 191, 105, 0.12);
  color: rgba(255, 245, 231, 0.98);
  box-shadow: 0 10px 24px rgba(255, 191, 105, 0.14);
}

.view-chip[data-unread-count]:not([data-unread-count="0"])::after {
  content: attr(data-unread-count);
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  margin-left: 8px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(255, 191, 105, 0.92);
  color: rgba(7, 10, 22, 0.92);
  font: 700 0.62rem/1 "IBM Plex Mono", monospace;
  letter-spacing: 0;
}

.debug-badge {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 5;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(7, 10, 22, 0.76);
  color: rgba(244, 241, 234, 0.88);
  font: 500 0.7rem/1 "IBM Plex Mono", monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.debug-badge:hover,
.debug-badge.is-active {
  border-color: rgba(143, 231, 255, 0.28);
  background: rgba(10, 16, 30, 0.9);
  transform: translateY(-1px);
}

.fps-badge {
  position: absolute;
  left: 16px;
  bottom: 56px;
  z-index: 5;
  padding: 8px 10px;
  border: 1px solid rgba(157, 243, 196, 0.24);
  border-radius: 999px;
  background: rgba(7, 10, 22, 0.8);
  color: rgba(157, 243, 196, 0.96);
  font: 500 0.72rem/1 "IBM Plex Mono", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fps-badge.is-hidden {
  display: none;
}

.reflection-debug-panel {
  position: absolute;
  left: 16px;
  bottom: 56px;
  z-index: 6;
  display: none;
  width: min(560px, calc(100vw - 32px));
  max-height: min(42vh, 360px);
  overflow: auto;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(7, 10, 22, 0.92);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.34);
  color: rgba(244, 241, 234, 0.9);
  font: 500 0.72rem/1.5 "IBM Plex Mono", monospace;
  white-space: pre-wrap;
  cursor: copy;
}

.reflection-debug-panel.is-open {
  display: block;
}

.universe-label {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 5;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(7, 10, 22, 0.84);
  color: rgba(244, 241, 234, 0.94);
  backdrop-filter: blur(16px);
  font: 600 0.78rem/1.1 "Syne", sans-serif;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 14px));
  white-space: nowrap;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
}

.universe-label-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.universe-node-label {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 5;
  max-width: min(28vw, 260px);
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(7, 10, 22, 0.72);
  color: rgba(244, 241, 234, 0.88);
  backdrop-filter: blur(14px);
  font: 600 0.72rem/1.1 "Syne", sans-serif;
  transform: translate(-50%, calc(-100% - 22px));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
  opacity: 0.76;
  pointer-events: auto;
  cursor: pointer;
  transition: opacity 160ms ease, transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.universe-node-label:hover,
.universe-node-label.is-hovered,
.universe-node-label.is-selected {
  opacity: 1;
  transform: translate(-50%, calc(-100% - 28px));
  border-color: rgba(177, 235, 255, 0.42);
  background: rgba(10, 14, 30, 0.9);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
}

.universe-node-label.is-hidden {
  display: none;
}

.universe-label.is-actionable {
  pointer-events: auto;
  cursor: pointer;
}

.universe-label.is-hidden {
  display: none;
}

.reflection-open-button {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 6;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: rgba(7, 10, 22, 0.9);
  color: rgba(244, 241, 234, 0.96);
  backdrop-filter: blur(16px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
  font: 600 0.78rem/1 "Syne", sans-serif;
  transform: translate(-50%, calc(-100% - 12px));
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.reflection-open-button.is-hidden {
  display: none;
}

.photo-hover-label,
.photo-open-button {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 6;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(7, 10, 22, 0.9);
  color: rgba(244, 241, 234, 0.96);
  backdrop-filter: blur(16px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
}

.photo-hover-label {
  padding: 8px 10px;
  border-radius: 12px;
  max-width: 220px;
  font: 600 0.72rem/1.2 "Syne", sans-serif;
  pointer-events: none;
}

.photo-open-button {
  padding: 9px 14px;
  border-radius: 16px;
  font: 600 0.78rem/1 "Syne", sans-serif;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.reflection-open-button:hover {
  transform: translate(-50%, calc(-100% - 14px)) scale(1.03);
  border-color: rgba(157, 243, 196, 0.42);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34), 0 0 26px rgba(126, 198, 217, 0.12);
}

.photo-open-button:hover {
  transform: translate(-50%, -50%) scale(1.03);
  border-color: rgba(157, 243, 196, 0.42);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34), 0 0 26px rgba(126, 198, 217, 0.12);
}

.photo-hover-label.is-hidden,
.photo-open-button.is-hidden {
  display: none;
}

.reflection-backdrop {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  z-index: 5;
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 58%, rgba(11, 16, 34, 0.02), rgba(4, 7, 16, 0.08) 48%, rgba(2, 4, 10, 0.2) 100%);
  backdrop-filter: none;
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.08);
  pointer-events: none;
}

.reward-scene-overlay,
.reward-scene-open-button,
.reward-scene-hit-target {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 8;
}

.reward-scene-overlay {
  display: grid;
  gap: 12px;
  transform: translate(-50%, -100%);
  pointer-events: auto;
}

.reward-scene-overlay.is-hidden,
.reward-scene-open-button.is-hidden,
.reward-scene-hit-target.is-hidden {
  display: none;
}

.reward-scene-title {
  margin: 0;
  color: rgba(248, 245, 236, 0.84);
  font: 700 clamp(1.5rem, 4.2vw, 3.4rem)/0.94 "Syne", sans-serif;
  letter-spacing: 0.02em;
  text-align: center;
  text-shadow:
    0 8px 26px rgba(0, 0, 0, 0.42),
    0 0 34px rgba(255, 219, 156, 0.16);
}

.reward-scene-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.reward-scene-actions.is-hidden {
  display: none;
}

.reward-scene-actions .ui-secondary,
.reward-scene-open-button {
  min-width: 108px;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(7, 10, 22, 0.56);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
}

.reward-scene-actions .ui-secondary:hover,
.reward-scene-actions .ui-secondary:focus-visible {
  border-color: rgba(157, 243, 196, 0.42);
  background: rgba(21, 34, 60, 0.78);
  color: rgba(214, 255, 231, 0.98);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28), 0 0 24px rgba(126, 198, 217, 0.16);
}

.reward-scene-open-button {
  transform: translate(-50%, -50%);
}

.reward-scene-hit-target {
  width: 190px;
  height: 190px;
  transform: translate(-50%, -50%);
  border: none;
  padding: 0;
  background: transparent;
  box-shadow: none;
  opacity: 0;
  cursor: pointer;
}

.reflection-backdrop.is-hidden {
  display: none;
}

.ui-fab,
.ui-close {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(7, 10, 22, 0.72);
  color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
  cursor: pointer;
}

.ui-fab {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font: 500 1.8rem/1 "IBM Plex Mono", monospace;
  box-shadow:
    0 18px 36px rgba(0, 0, 0, 0.3),
    0 0 30px rgba(126, 198, 217, 0.08);
}

.ui-fab.is-hidden {
  display: none;
}

.reflection-trigger-orb {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(157, 243, 196, 0.24);
  background:
    radial-gradient(circle at 35% 30%, rgba(196, 244, 255, 0.36), rgba(26, 44, 72, 0.1) 48%, rgba(6, 9, 20, 0.82) 78%),
    rgba(7, 10, 22, 0.72);
  color: rgba(244, 241, 234, 0.92);
  backdrop-filter: blur(18px);
  font: 700 1.15rem/1 "Syne", sans-serif;
  cursor: pointer;
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.28),
    0 0 28px rgba(122, 229, 255, 0.14);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.reflection-trigger-orb:hover {
  transform: translateY(-1px) scale(1.03);
  border-color: rgba(157, 243, 196, 0.42);
  box-shadow:
    0 18px 36px rgba(0, 0, 0, 0.32),
    0 0 34px rgba(122, 229, 255, 0.22);
}

.reflection-trigger-orb.is-hidden,
.reflection-modal.is-hidden,
.reflection-reward-toast.is-hidden {
  display: none;
}

.moon-editor {
  width: min(360px, calc(100vw - 32px));
  max-height: 100%;
  padding: 16px 16px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    rgba(7, 10, 22, 0.78);
  backdrop-filter: blur(20px);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.34);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(157, 243, 196, 0.35) rgba(255, 255, 255, 0.06);
  transition: opacity 180ms ease, transform 220ms ease;
}

.moon-editor.is-hidden {
  display: none;
}

.moon-editor.is-dock-panel {
  position: fixed;
  z-index: 7;
  width: min(460px, calc(100vw - 132px));
  min-width: 360px;
  min-height: 460px;
  max-width: min(760px, calc(100vw - 28px));
  max-height: calc(100svh - 32px);
  resize: both;
  overflow: auto;
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(157, 243, 196, 0.06) inset;
  border-color: rgba(143, 231, 255, 0.18);
}

.moon-editor.is-dock-panel .moon-editor-header {
  cursor: move;
  user-select: none;
}

.moon-editor.is-dock-panel .builder-nav {
  display: none;
}

.moon-editor.is-dock-panel .builder-section[data-section="moons"] {
  display: grid;
}

.moon-editor.is-dock-panel .builder-section:not([data-section="moons"]) {
  display: none !important;
}

.moon-editor.is-reflection-dock-panel .builder-section[data-section="reflection"] {
  display: grid !important;
}

.moon-editor.is-reflection-dock-panel .builder-section:not([data-section="reflection"]) {
  display: none !important;
}

.moon-editor.is-photo-dock-panel {
  width: min(880px, calc(100vw - 132px));
  min-width: 640px;
  max-width: min(980px, calc(100vw - 28px));
}

.moon-editor.is-photo-dock-panel .builder-section[data-section="photos"] {
  display: grid !important;
}

.moon-editor.is-photo-dock-panel .builder-section:not([data-section="photos"]) {
  display: none !important;
}

.moon-editing-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 6px 0 0;
  padding: 8px 12px;
  border: 1px solid rgba(143, 231, 255, 0.18);
  border-radius: 999px;
  background: rgba(143, 231, 255, 0.08);
  color: rgba(244, 241, 234, 0.88);
  font: 500 0.7rem/1 "IBM Plex Mono", monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.moon-editor-targeting {
  color: rgba(157, 243, 196, 0.94);
}

.moon-perspective-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-top: 2px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.moon-perspective-button {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 8px 12px;
  background: transparent;
  color: rgba(244, 241, 234, 0.74);
  font: 500 0.7rem/1 "IBM Plex Mono", monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.moon-perspective-button:hover {
  transform: translateY(-1px);
  color: rgba(244, 241, 234, 0.94);
  border-color: rgba(143, 231, 255, 0.18);
}

.moon-perspective-button.is-active {
  background: linear-gradient(135deg, rgba(143, 231, 255, 0.18), rgba(157, 243, 196, 0.12));
  border-color: rgba(143, 231, 255, 0.22);
  color: rgba(244, 241, 234, 0.96);
}

.module-dock {
  --module-dock-scale: 1;
  --module-dock-gap: calc(12px * var(--module-dock-scale));
  --module-dock-width: calc(88px * var(--module-dock-scale));
  --module-dock-padding-y: calc(14px * var(--module-dock-scale));
  --module-dock-padding-x: calc(10px * var(--module-dock-scale));
  --module-dock-radius: calc(28px * var(--module-dock-scale));
  --module-dock-card-size: calc(64px * var(--module-dock-scale));
  --module-dock-card-radius: calc(22px * var(--module-dock-scale));
  --module-dock-icon-size: calc(52px * var(--module-dock-scale));
  --module-dock-icon-radius: calc(18px * var(--module-dock-scale));
  --module-dock-action-size: calc(56px * var(--module-dock-scale));
  --module-dock-action-radius: calc(18px * var(--module-dock-scale));
  --module-dock-label-font-size: calc(0.72rem * var(--module-dock-scale));
  --module-dock-label-padding-y: calc(8px * var(--module-dock-scale));
  --module-dock-label-padding-x: calc(12px * var(--module-dock-scale));
  position: fixed;
  right: 24px;
  top: 16px;
  bottom: 16px;
  z-index: 5;
  width: max(64px, var(--module-dock-width));
  max-height: calc(100svh - 32px);
  padding: var(--module-dock-padding-y) var(--module-dock-padding-x) calc(12px * var(--module-dock-scale));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--module-dock-radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    rgba(7, 10, 22, 0.78);
  backdrop-filter: blur(20px);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.34);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: var(--module-dock-gap);
  overflow: visible;
  transition: width 180ms ease, padding 180ms ease, border-color 180ms ease, background 180ms ease;
}

.module-dock.is-collapsed {
  --module-dock-width: 64px;
  --module-dock-padding-y: calc(10px * var(--module-dock-scale));
  --module-dock-padding-x: calc(6px * var(--module-dock-scale));
  --module-dock-gap: calc(10px * var(--module-dock-scale));
}

.module-dock.is-left {
  left: 24px;
  right: auto;
}

.module-dock.is-compact {
  --module-dock-width: 72px;
  --module-dock-padding-y: calc(12px * var(--module-dock-scale));
  --module-dock-padding-x: calc(8px * var(--module-dock-scale));
  --module-dock-card-size: calc(56px * var(--module-dock-scale));
  --module-dock-card-radius: calc(18px * var(--module-dock-scale));
  --module-dock-icon-size: calc(46px * var(--module-dock-scale));
  --module-dock-icon-radius: calc(16px * var(--module-dock-scale));
  --module-dock-action-size: calc(44px * var(--module-dock-scale));
  --module-dock-action-radius: calc(14px * var(--module-dock-scale));
}

.module-list {
  display: grid;
  gap: calc(10px * var(--module-dock-scale));
  width: 100%;
  justify-items: center;
}

.module-dock-actions {
  display: grid;
  gap: calc(10px * var(--module-dock-scale));
  width: 100%;
  justify-items: center;
  margin-top: auto;
}

.moons-btn-icon {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
  animation: moons-icon-float 6.6s ease-in-out infinite;
}

.photos-btn-icon {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
}

.photos-btn-stack {
  position: absolute;
  inset: 9px 8px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 214, 163, 0.28), rgba(102, 196, 255, 0.08)),
    rgba(13, 20, 34, 0.92);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
}

.photos-btn-stack-back {
  transform: translate(-5px, 5px) rotate(-10deg);
  opacity: 0.46;
}

.photos-btn-stack-mid {
  transform: translate(4px, -2px) rotate(7deg);
  opacity: 0.64;
}

.photos-btn-stack-front {
  overflow: hidden;
}

.friends-ring-btn-icon {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
}

.friends-ring-btn-core {
  position: absolute;
  inset: 16px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.34), transparent 52%),
    radial-gradient(circle at 60% 65%, #9fdcff 0%, #6d9eff 48%, #89ffd0 100%);
  box-shadow:
    0 0 12px rgba(109, 158, 255, 0.36),
    inset 0 -4px 10px rgba(0, 0, 0, 0.2);
}

.friends-ring-btn-orbit {
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  border: 1px solid rgba(167, 200, 255, 0.42);
  box-shadow: 0 0 14px rgba(96, 145, 255, 0.18);
}

.friends-ring-btn-planet {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffffff, #b4d3ff 60%, #88a8ff 100%);
  box-shadow: 0 0 8px rgba(143, 189, 255, 0.46);
}

.friends-ring-btn-planet-a {
  top: 8px;
  left: 21px;
}

.friends-ring-btn-planet-b {
  right: 9px;
  top: 22px;
  width: 7px;
  height: 7px;
}

.friends-ring-btn-planet-c {
  left: 10px;
  bottom: 13px;
  width: 6px;
  height: 6px;
}

.photos-btn-sun,
.photos-btn-hill {
  position: absolute;
}

.photos-btn-sun {
  top: 10px;
  right: 11px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ffe097;
  box-shadow: 0 0 12px rgba(255, 224, 151, 0.55);
}

.photos-btn-hill {
  left: -8px;
  right: -8px;
  bottom: -10px;
  height: 22px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 20%, rgba(186, 255, 202, 0.9), rgba(84, 190, 123, 0.85) 55%, rgba(36, 102, 71, 0.88));
  transform: rotate(-6deg);
}

.moons-btn-planet,
.moons-btn-moon,
.moons-btn-orbit {
  position: absolute;
  border-radius: 999px;
}

.moons-btn-planet {
  left: 11px;
  top: 12px;
  width: 24px;
  height: 24px;
  background:
    radial-gradient(circle at 34% 30%, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.14) 34%, transparent 35%),
    radial-gradient(circle at 35% 30%, #93e4ff, #5069d6 70%, #1c2046 100%);
  box-shadow:
    0 0 18px rgba(126, 198, 255, 0.34),
    inset -4px -6px 10px rgba(8, 10, 28, 0.42);
}

.moons-btn-orbit {
  left: 5px;
  top: 8px;
  width: 38px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  transform: rotate(-18deg);
  opacity: 0.68;
}

.moons-btn-moon {
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.9), #ffd9a6 72%, #a86d49 100%);
  box-shadow: 0 0 12px rgba(255, 208, 157, 0.26);
}

.moons-btn-moon-a {
  width: 9px;
  height: 9px;
  right: 8px;
  top: 12px;
  animation: moons-icon-orbit-a 5.5s linear infinite;
}

.moons-btn-moon-b {
  width: 6px;
  height: 6px;
  left: 6px;
  bottom: 11px;
  animation: moons-icon-orbit-b 7.2s linear infinite reverse;
}

#module-moons:hover .moons-btn-icon,
#module-moons.is-active .moons-btn-icon {
  animation-duration: 4.4s;
}

@keyframes moons-icon-float {
  0%, 100% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-1.5px) scale(1.02); }
}

@keyframes moons-icon-orbit-a {
  0% { transform: translate(0px, 0px); }
  25% { transform: translate(-2px, 3px); }
  50% { transform: translate(-4px, 7px); }
  75% { transform: translate(-1px, 3px); }
  100% { transform: translate(0px, 0px); }
}

@keyframes moons-icon-orbit-b {
  0% { transform: translate(0px, 0px); }
  25% { transform: translate(3px, -2px); }
  50% { transform: translate(7px, -5px); }
  75% { transform: translate(3px, -1px); }
  100% { transform: translate(0px, 0px); }
}

.module-collapse-button {
  display: none !important;
  width: 42px;
  height: 42px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(244, 241, 234, 0.94);
  cursor: pointer;
  display: grid;
  place-items: center;
  position: relative;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.module-collapse-button:hover,
.module-collapse-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(157, 243, 196, 0.32);
  background: rgba(157, 243, 196, 0.1);
}

.module-collapse-glyph {
  display: inline-block;
  font: 600 1.15rem/1 "Syne", sans-serif;
  transition: transform 180ms ease;
}

.module-dock.is-collapsed .module-collapse-glyph {
  transform: rotate(180deg);
}

.module-card {
  position: relative;
  width: var(--module-dock-card-size);
  height: var(--module-dock-card-size);
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--module-dock-card-radius);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(244, 241, 234, 0.94);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.module-card-icon {
  position: relative;
  width: var(--module-dock-icon-size);
  height: var(--module-dock-icon-size);
  display: grid;
  place-items: center;
  border-radius: var(--module-dock-icon-radius);
  background: transparent;
  overflow: hidden;
}

.module-card:hover,
.module-card.is-active {
  transform: translateY(-1px);
  border-color: rgba(157, 243, 196, 0.32);
  background: rgba(157, 243, 196, 0.08);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.22);
}

.module-card-label {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  padding: var(--module-dock-label-padding-y) var(--module-dock-label-padding-x);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(7, 10, 22, 0.92);
  color: rgba(244, 241, 234, 0.94);
  font: 500 var(--module-dock-label-font-size)/1 "IBM Plex Mono", monospace;
  letter-spacing: 0.06em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease, transform 150ms ease;
}

.orbit-chat-dock-card .orbit-chat-dock-icon {
  background: rgba(255, 255, 255, 0.02);
}

.orbit-chat-dock-card .orbit-chat-dock-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 12px rgba(142, 194, 255, 0.26));
}

.ledger-btn-icon {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 72% 24%, rgba(105, 226, 255, 0.32), transparent 20%),
    radial-gradient(circle at 32% 72%, rgba(255, 191, 105, 0.28), transparent 22%),
    linear-gradient(145deg, rgba(6, 16, 32, 0.95), rgba(18, 36, 56, 0.78));
}

.ledger-btn-screen,
.ledger-btn-orbit,
.ledger-btn-core,
.ledger-btn-line {
  position: absolute;
}

.ledger-btn-screen {
  inset: 11px 10px 13px;
  border: 1px solid rgba(157, 243, 196, 0.44);
  border-radius: 10px;
  background: rgba(3, 9, 18, 0.68);
  box-shadow: inset 0 0 18px rgba(105, 226, 255, 0.16), 0 0 16px rgba(105, 226, 255, 0.18);
}

.ledger-btn-orbit {
  width: 34px;
  height: 20px;
  border: 1px solid rgba(255, 191, 105, 0.74);
  border-radius: 50%;
  transform: rotate(-24deg);
}

.ledger-btn-core {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #69e2ff;
  box-shadow: 0 0 14px rgba(105, 226, 255, 0.78);
}

.ledger-btn-line {
  left: 17px;
  right: 17px;
  height: 1px;
  background: rgba(157, 243, 196, 0.72);
}

.ledger-btn-line-a {
  top: 17px;
}

.ledger-btn-line-b {
  bottom: 17px;
}

.module-card-icon-yes-show {
  background:
    radial-gradient(circle at 50% 50%, rgba(103, 232, 249, 0.22), transparent 34%),
    linear-gradient(145deg, rgba(2, 10, 24, 0.96), rgba(10, 34, 55, 0.86));
}

.yes-show-btn-icon {
  position: relative;
  width: 38px;
  height: 38px;
  display: block;
}

.yes-show-btn-ring,
.yes-show-btn-core,
.yes-show-btn-scan {
  position: absolute;
}

.yes-show-btn-ring {
  inset: 6px;
  border: 1px solid rgba(103, 232, 249, 0.76);
  border-radius: 50%;
  transform: rotate(-20deg) scaleY(0.58);
  box-shadow: 0 0 14px rgba(103, 232, 249, 0.32);
}

.yes-show-btn-core {
  inset: 14px;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.72);
}

.yes-show-btn-scan {
  left: 8px;
  right: 8px;
  height: 1px;
  background: rgba(153, 246, 228, 0.82);
}

.yes-show-btn-scan-a {
  top: 12px;
}

.yes-show-btn-scan-b {
  bottom: 12px;
}

.module-card:hover .module-card-label,
.module-card:focus-visible .module-card-label,
.module-card.is-active .module-card-label {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.module-dock.labels-always .module-card-label,
.module-dock.labels-always .module-add-button .module-card-label,
.module-dock.labels-always .module-settings-button .module-card-label {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.module-dock.labels-hidden .module-card-label,
.module-dock.labels-hidden .module-add-button .module-card-label,
.module-dock.labels-hidden .module-settings-button .module-card-label {
  display: none;
}

.module-card.is-hidden,
.module-library-row.is-hidden {
  display: none;
}

.module-preview-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.module-add-button,
.module-settings-button {
  width: var(--module-dock-action-size);
  height: var(--module-dock-action-size);
  border-radius: var(--module-dock-action-radius);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(244, 241, 234, 0.94);
  font: 500 1.6rem/1 "Syne", sans-serif;
  cursor: pointer;
  backdrop-filter: blur(14px);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
  position: relative;
  display: grid;
  place-items: center;
}

.module-dock.is-collapsed .module-settings-button,
.module-dock.is-collapsed .module-add-button {
  width: max(38px, calc(44px * var(--module-dock-scale)));
  height: max(38px, calc(44px * var(--module-dock-scale)));
  border-radius: max(12px, calc(14px * var(--module-dock-scale)));
  font-size: 1.2rem;
}

.module-add-button:hover,
.module-settings-button:hover,
.module-settings-button.is-active {
  transform: translateY(-1px);
  border-color: rgba(157, 243, 196, 0.32);
  background: rgba(157, 243, 196, 0.12);
}

.module-settings-button {
  font: 500 1.2rem/1 "Syne", sans-serif;
}

.module-card-icon-td {
  background: linear-gradient(145deg, rgba(51, 65, 85, 0.92), rgba(15, 23, 42, 0.98));
}

.td-btn-icon {
  position: relative;
  width: 34px;
  height: 34px;
  display: block;
}

.td-btn-lane {
  position: absolute;
  left: 3px;
  right: 3px;
  top: 15px;
  height: 4px;
  border-radius: 999px;
  background: rgba(203, 213, 225, 0.7);
  box-shadow: 0 10px 0 rgba(203, 213, 225, 0.38);
}

.td-btn-tower,
.td-btn-creep {
  position: absolute;
  border: 2px solid rgba(147, 197, 253, 0.95);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.35);
}

.td-btn-tower {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: rgba(30, 64, 175, 0.9);
}

.td-btn-tower-a {
  left: 7px;
  top: 5px;
}

.td-btn-tower-b {
  right: 5px;
  bottom: 3px;
  border-color: rgba(251, 146, 60, 0.95);
  background: rgba(154, 52, 18, 0.9);
}

.td-btn-creep {
  left: 17px;
  top: 13px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  border-color: rgba(244, 114, 182, 0.95);
  background: rgba(190, 24, 93, 0.95);
}

.module-edit-button {
  font: 600 1rem/1 "Syne", sans-serif;
}

.module-dock.is-collapsed .module-list,
.module-dock.is-collapsed .module-dock-actions {
  justify-items: center;
}

.module-dock.is-collapsed .module-library-popover,
.module-dock.is-collapsed .module-settings-popover {
  right: calc(100% + 10px);
}

.module-dock.is-left .module-library-popover,
.module-dock.is-left .module-settings-popover {
  left: calc(100% + 14px);
  right: auto;
}

.module-dock.is-left.is-collapsed .module-library-popover,
.module-dock.is-left.is-collapsed .module-settings-popover {
  left: calc(100% + 10px);
  right: auto;
}

.module-dock.is-left .module-card-label,
.module-dock.is-left .module-add-button .module-card-label,
.module-dock.is-left .module-settings-button .module-card-label {
  left: calc(100% + 12px);
  right: auto;
}

.module-add-button .module-card-label,
.module-settings-button .module-card-label {
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(6px);
}

.module-add-button:hover .module-card-label,
.module-add-button:focus-visible .module-card-label,
.module-settings-button:hover .module-card-label,
.module-settings-button:focus-visible .module-card-label,
.module-settings-button.is-active .module-card-label {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.module-library-popover {
  position: absolute;
  right: calc(100% + 14px);
  bottom: 0;
  width: min(320px, calc(100vw - 132px));
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(7, 10, 22, 0.94);
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.34);
}

.module-library-popover.is-hidden {
  display: none;
}

.module-settings-popover {
  position: absolute;
  right: calc(100% + 14px);
  bottom: 76px;
  width: min(320px, calc(100vw - 132px));
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(7, 10, 22, 0.94);
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.34);
}

.module-settings-popover.is-hidden {
  display: none;
}

.module-settings-grid {
  display: grid;
  gap: 12px;
}

.module-settings-copy {
  margin: 0;
}

.module-library-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.module-library-list {
  display: grid;
  gap: 10px;
}

.module-library-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
}

.module-library-row strong {
  display: block;
  margin-top: 4px;
  font: 700 0.98rem/1.1 "Syne", sans-serif;
}

.module-shell {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom, 0px));
  background:
    radial-gradient(circle at 50% 24%, rgba(126, 198, 217, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(4, 7, 18, 0.94), rgba(4, 8, 20, 0.98));
  backdrop-filter: blur(18px);
  animation: panel-in 220ms ease;
}

.module-shell--friends-ring {
  inset: auto;
  top: 7rem;
  right: 5.75rem;
  width: min(24rem, calc(100vw - 1.5rem));
  max-height: min(78vh, 46rem);
  padding: 0;
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(132, 205, 255, 0.18);
  border-radius: 1.15rem;
  background:
    radial-gradient(circle at 18% 0%, rgba(109, 204, 255, 0.18), transparent 32%),
    linear-gradient(180deg, rgba(9, 16, 30, 0.96), rgba(5, 10, 20, 0.97));
  box-shadow:
    0 1.6rem 4.2rem rgba(0, 0, 0, 0.44),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.module-shell.is-hidden {
  display: none;
}

.module-shell-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
}

.module-shell-body {
  min-height: 0;
  overflow: auto;
}

.module-shell--friends-ring .module-shell-header {
  align-items: center;
  padding: 0.95rem 1rem 0.82rem;
  border-bottom: 1px solid rgba(132, 205, 255, 0.12);
  cursor: grab;
  user-select: none;
}

.module-shell--friends-ring .module-shell-header:active {
  cursor: grabbing;
}

.module-shell--friends-ring .module-shell-header .moon-editor-kicker {
  font: 500 0.68rem/1.1 "IBM Plex Mono", monospace;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(145, 219, 255, 0.88);
}

.module-shell--friends-ring .module-shell-title,
.module-shell--friends-ring #module-shell-title {
  font: 700 1rem/1 "Syne", sans-serif;
}

.module-shell--friends-ring .module-shell-body {
  padding: 0.95rem 1rem 1rem;
}

.module-shell--friends-ring .module-shell-stage {
  min-height: 0;
  display: block;
}

.module-shell--friends-ring .module-shell-card {
  width: 100%;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.module-shell--friends-ring .preset-actions .ui-secondary,
.module-shell--friends-ring .preset-actions .ui-close {
  min-height: 2rem;
}

.friends-ring-shell {
  display: grid;
  gap: 0.8rem;
}

.friends-ring-intro {
  display: grid;
  gap: 0.35rem;
}

.friends-ring-kicker {
  font: 500 0.68rem/1.1 "IBM Plex Mono", monospace;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(141, 216, 255, 0.88);
}

.friends-ring-shell .module-shell-headline {
  font: 700 1.15rem/1.02 "Syne", sans-serif;
}

.friends-ring-shell .builder-copy,
.friends-ring-row-copy p,
.friends-ring-empty {
  margin: 0;
  font: 400 0.82rem/1.45 "IBM Plex Mono", monospace;
  color: rgba(205, 225, 244, 0.8);
}

.friends-ring-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.friends-ring-chip,
.friends-ring-section-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.34rem 0.58rem;
  border-radius: 999px;
  border: 1px solid rgba(121, 187, 255, 0.16);
  background: rgba(83, 140, 255, 0.1);
  color: rgba(228, 241, 255, 0.86);
  font: 500 0.64rem/1 "IBM Plex Mono", monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.friends-ring-section {
  display: grid;
  gap: 0.65rem;
  padding: 0.82rem 0.9rem;
  border: 1px solid rgba(145, 214, 255, 0.08);
  border-radius: 1rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)),
    rgba(10, 17, 31, 0.6);
}

.friends-ring-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.friends-ring-section-header h4 {
  margin: 0;
  font: 700 0.86rem/1 "Syne", sans-serif;
  color: rgba(244, 248, 255, 0.96);
}

.friends-ring-stack {
  display: grid;
  gap: 0.55rem;
}

.friends-ring-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
  align-items: start;
  padding: 0.6rem 0.65rem;
  border-radius: 0.88rem;
  background: rgba(255, 255, 255, 0.03);
}

.friends-ring-row-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 30%, rgba(207, 240, 255, 0.96), rgba(93, 151, 255, 0.74));
  color: rgba(7, 16, 31, 0.95);
  font: 700 0.72rem/1 "IBM Plex Mono", monospace;
  letter-spacing: 0.06em;
}

.friends-ring-row-avatar.is-recent {
  background: radial-gradient(circle at 30% 30%, rgba(255, 234, 203, 0.92), rgba(141, 198, 255, 0.66));
}

.friends-ring-row-copy {
  display: grid;
  gap: 0.18rem;
}

.friends-ring-row-copy strong {
  color: rgba(246, 249, 255, 0.96);
  font: 700 0.84rem/1.15 "Syne", sans-serif;
}

.friends-ring-settings-grid {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.module-shell--friends-ring .editor-field {
  gap: 0.34rem;
}

.module-shell--friends-ring .editor-field span:first-child {
  font: 500 0.63rem/1.2 "IBM Plex Mono", monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(150, 211, 244, 0.78);
}

.module-shell--friends-ring .editor-field select,
.module-shell--friends-ring .editor-field input[type="color"],
.module-shell--friends-ring .editor-field input[type="range"] {
  width: 100%;
}

.module-shell--friends-ring .editor-field select {
  min-height: 2.15rem;
  padding: 0.48rem 0.65rem;
  border-radius: 0.82rem;
  border: 1px solid rgba(141, 214, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(236, 245, 255, 0.94);
  font: 500 0.76rem/1.2 "IBM Plex Mono", monospace;
}

.module-shell--friends-ring .editor-field input[type="color"] {
  min-height: 2.15rem;
  padding: 0.16rem;
  border-radius: 0.82rem;
  border: 1px solid rgba(141, 214, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
}

.module-shell--friends-ring .editor-field input[type="range"] {
  accent-color: rgba(138, 211, 255, 0.9);
}

.module-shell-stage {
  min-height: calc(100svh - 118px);
  display: grid;
  place-items: center;
}

.module-shell-card {
  width: min(680px, calc(100vw - 48px));
  display: grid;
  gap: 12px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(7, 10, 22, 0.78);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
}

.module-shell-headline {
  margin: 0;
  font: 700 clamp(1.4rem, 2vw, 2rem)/1 "Syne", sans-serif;
  color: rgba(244, 241, 234, 0.98);
}

.module-shell-stage-economy {
  place-items: stretch;
}

.module-shell-card-economy {
  width: 100%;
  max-width: none;
}

.economy-shell {
  display: grid;
  gap: 18px;
}

.economy-hero {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.9fr);
  align-items: start;
}

.economy-hero-copy {
  display: grid;
  gap: 8px;
}

.economy-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.economy-stat-card,
.economy-section,
.economy-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
}

.economy-stat-card strong {
  color: rgba(244, 241, 234, 0.98);
  font: 700 1.25rem/1 "Syne", sans-serif;
}

.economy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.economy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.economy-section {
  align-content: start;
}

.economy-stack {
  display: grid;
  gap: 10px;
}

.economy-row,
.economy-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.economy-row {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.economy-row strong,
.economy-card-title {
  margin: 0;
  color: rgba(244, 241, 234, 0.96);
  font: 700 0.98rem/1.2 "Syne", sans-serif;
}

.economy-progress {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.economy-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(157, 243, 196, 0.85), rgba(255, 221, 145, 0.95));
}

.profile-onboarding {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(5, 7, 16, 0.68);
}

.profile-onboarding.is-hidden {
  display: none;
}

.profile-onboarding-card {
  width: min(440px, calc(100vw - 40px));
  padding: 20px 20px 18px;
  border: 1px solid rgba(157, 243, 196, 0.18);
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02)),
    rgba(7, 10, 22, 0.9);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(157, 243, 196, 0.05) inset;
  backdrop-filter: blur(18px);
}

.profile-onboarding-options {
  display: grid;
  gap: 14px;
}

.profile-onboarding-option {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.02);
}

.profile-onboarding-option .ui-secondary {
  justify-self: start;
}

.ftue-overlay {
  position: absolute;
  right: 18px;
  top: 72px;
  z-index: 8;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.ftue-overlay.is-hidden {
  display: none;
}

.ftue-card {
  display: grid;
  gap: 12px;
  padding: 16px 16px 14px;
  border: 1px solid rgba(157, 243, 196, 0.18);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(7, 10, 22, 0.92);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(157, 243, 196, 0.05) inset;
  backdrop-filter: blur(24px);
  pointer-events: auto;
  animation: panel-in 220ms ease;
}

.ftue-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ftue-progress-label,
.ftue-hint {
  margin: 0;
  font: 500 0.74rem/1.5 "IBM Plex Mono", monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ftue-progress-label {
  color: rgba(157, 243, 196, 0.9);
}

.ftue-hint {
  color: rgba(244, 241, 234, 0.72);
}

.ftue-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ftue-primary {
  border: 1px solid rgba(157, 243, 196, 0.26);
  border-radius: 999px;
  padding: 11px 16px;
  background: linear-gradient(135deg, rgba(157, 243, 196, 0.22), rgba(143, 231, 255, 0.18));
  color: rgba(244, 241, 234, 0.96);
  font: 600 0.82rem/1 "IBM Plex Mono", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, filter 180ms ease;
}

.ftue-primary:hover {
  transform: translateY(-1px);
  border-color: rgba(157, 243, 196, 0.38);
  filter: brightness(1.06);
}

.ftue-primary:disabled {
  opacity: 0.5;
  cursor: wait;
  transform: none;
  filter: none;
}

.ftue-resume {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 8;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(157, 243, 196, 0.24);
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 30%, rgba(157, 243, 196, 0.18), transparent 55%),
    rgba(7, 10, 22, 0.92);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.34);
  color: rgba(244, 241, 234, 0.96);
  font: 700 1.05rem/1 "IBM Plex Mono", monospace;
  cursor: pointer;
}

.ftue-resume.is-hidden {
  display: none;
}

.moon-editor.is-ftue-mode .builder-tab:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.reflection-modal {
  position: absolute;
  left: min(392px, calc(100vw - 376px));
  top: 64px;
  z-index: 6;
  width: min(360px, calc(100vw - 32px));
  max-height: calc(100svh - 112px);
  overflow: auto;
  padding: 16px 16px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02)),
    rgba(7, 10, 22, 0.82);
  box-shadow: 0 24px 52px rgba(0, 0, 0, 0.34);
  pointer-events: auto;
  animation: panel-in 220ms ease;
}

.reflection-modal.reflection-composer-card {
  left: 0;
  top: 0;
  width: min(380px, calc(100vw - 32px));
  max-height: min(72svh, 640px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03)),
    rgba(8, 12, 24, 0.64);
  backdrop-filter: blur(24px);
  border-color: rgba(143, 231, 255, 0.18);
  box-shadow:
    0 28px 64px rgba(0, 0, 0, 0.34),
    0 0 44px rgba(126, 220, 255, 0.08);
}

.reflection-modal.reflection-composer-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 18%, rgba(143, 231, 255, 0.12), rgba(143, 231, 255, 0) 30%),
    radial-gradient(circle at 82% 20%, rgba(255, 182, 219, 0.08), rgba(255, 182, 219, 0) 28%);
}

.auth-modal {
  position: absolute;
  left: min(392px, calc(50vw - 220px));
  top: 88px;
  z-index: 24;
  width: min(440px, calc(100vw - 48px));
  max-height: calc(100svh - 110px);
  overflow: auto;
  padding: 18px 18px 16px;
  border: 1px solid rgba(157, 243, 196, 0.16);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(7, 10, 22, 0.94);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(157, 243, 196, 0.05) inset;
  backdrop-filter: blur(24px);
  pointer-events: auto;
}

.auth-modal .reflection-modal-header {
  cursor: move;
  user-select: none;
}

.auth-modal .reflection-modal-header button,
.auth-modal input,
.auth-modal button,
.auth-modal select,
.auth-modal textarea,
.auth-modal label {
  pointer-events: auto;
}

.auth-modal.is-hidden {
  display: none;
}

.planet-ui.is-auth-gated .moon-editor,
.planet-ui.is-auth-gated .reflection-popout,
.planet-ui.is-auth-gated .photo-lightbox,
.planet-ui.is-auth-gated .reflection-modal,
.planet-ui.is-auth-gated .module-shell,
.planet-ui.is-auth-gated .reflection-trigger-orb,
.planet-ui.is-auth-gated .ui-fab {
  display: none !important;
}

.planet-ui.is-module-open .moon-editor,
.planet-ui.is-module-open .universe-browser,
.planet-ui.is-module-open .reflection-popout,
.planet-ui.is-module-open .photo-lightbox,
.planet-ui.is-module-open .reflection-modal,
.planet-ui.is-module-open .reflection-trigger-orb,
.planet-ui.is-module-open .ui-fab {
  display: none !important;
}

.planet-ui.is-universe-mode .moon-editor,
.planet-ui.is-universe-mode .ui-fab,
.planet-ui.is-universe-mode .reflection-trigger-orb {
  display: none !important;
}

.planet-ui.is-auth-gated .universe-browser {
  display: none !important;
}

.auth-advanced {
  margin-top: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
}

.auth-advanced summary {
  cursor: pointer;
  font: 500 0.72rem/1.2 "IBM Plex Mono", monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(244, 241, 234, 0.76);
}

.auth-advanced[open] {
  display: grid;
  gap: 10px;
}

.reflection-popout {
  position: absolute;
  left: min(392px, calc(100vw - 376px));
  right: auto;
  top: 72px;
  z-index: 7;
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100svh - 120px);
  overflow: auto;
  padding: 16px 16px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(7, 10, 22, 0.9);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.36);
  pointer-events: auto;
  animation: panel-in 220ms ease;
}

.reflection-popout .reflection-modal-header {
  justify-content: flex-end;
  margin-bottom: 4px;
}

.reflection-popout .reflection-modal-header > div {
  display: none;
}

.reflection-popout.is-hidden {
  display: none;
}

.reflection-popout-heading {
  display: none !important;
}

.photo-lightbox {
  position: absolute;
  left: min(392px, calc(100vw - 760px));
  top: 48px;
  z-index: 7;
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100svh - 96px);
  overflow: auto;
  padding: 16px 16px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(7, 10, 22, 0.92);
  backdrop-filter: blur(18px);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.38);
  animation: panel-in 220ms ease;
}

.photo-lightbox.is-hidden {
  display: none;
}

.photo-lightbox-body {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.8fr);
  gap: 16px;
}

.photo-lightbox-stage {
  display: grid;
  place-items: center;
  min-height: 360px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.photo-lightbox-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 68svh;
  object-fit: contain;
}

.photo-lightbox-sidebar {
  display: grid;
  align-content: start;
  gap: 12px;
}

.photo-gallery-shell {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background:
    radial-gradient(circle at top left, rgba(255, 214, 163, 0.12), transparent 34%),
    radial-gradient(circle at top right, rgba(102, 196, 255, 0.12), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02)),
    rgba(8, 12, 24, 0.7);
}

.photo-gallery-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.photo-gallery-add {
  flex: 0 0 auto;
  white-space: nowrap;
}

.photo-local-banner {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid rgba(143, 231, 255, 0.12);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(143, 231, 255, 0.08), rgba(157, 243, 196, 0.04)),
    rgba(255, 255, 255, 0.02);
}

.photo-gallery-stage {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.photo-gallery-stack {
  position: relative;
  min-height: 360px;
  padding: 20px 28px;
}

.photo-gallery-card {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    rgba(10, 14, 28, 0.96);
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.28);
}

.photo-gallery-card-back {
  transform: translate(-34px, 20px) rotate(-7deg) scale(0.9);
  opacity: 0.52;
}

.photo-gallery-card-mid {
  transform: translate(32px, 18px) rotate(6deg) scale(0.92);
  opacity: 0.64;
}

.photo-gallery-card-active {
  position: relative;
  z-index: 1;
}

.photo-gallery-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  background:
    linear-gradient(135deg, rgba(255, 214, 163, 0.18), rgba(102, 196, 255, 0.18)),
    rgba(17, 23, 39, 0.95);
}

.photo-gallery-nav {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(7, 10, 22, 0.82);
  color: rgba(244, 241, 234, 0.96);
  font: 500 1.6rem/1 "Syne", sans-serif;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.photo-gallery-nav:hover {
  transform: translateY(-1px);
  border-color: rgba(157, 243, 196, 0.34);
  background: rgba(157, 243, 196, 0.12);
}

.photo-gallery-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.photo-gallery-copy {
  display: grid;
  gap: 6px;
}

.photo-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.photo-gallery-thumb {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.photo-gallery-thumb-preview {
  width: 100%;
  aspect-ratio: 1.08 / 1;
  border-radius: 16px;
  object-fit: cover;
  background:
    linear-gradient(135deg, rgba(255, 214, 163, 0.18), rgba(102, 196, 255, 0.16)),
    rgba(17, 23, 39, 0.95);
}

.photo-gallery-thumb-text {
  display: grid;
  gap: 4px;
}

.photo-gallery-thumb .moon-row-name,
.photo-gallery-thumb .moon-row-meta {
  display: block;
}

.photo-settings-shell {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(340px, 1.2fr);
  gap: 16px;
  align-items: start;
}

.photo-settings-panel,
.photo-detail-column {
  display: grid;
  gap: 14px;
}

.photo-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.photo-field-full {
  grid-column: 1 / -1;
}

.photo-inline-panel,
.photo-editor-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.photo-inline-panel.is-hidden,
.photo-editor-panel.is-hidden {
  display: none;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.photo-inline-preview-wrap {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
}

.photo-inline-preview {
  display: block;
  width: 100%;
  aspect-ratio: 1.35 / 1;
  object-fit: cover;
}

.photo-upload-note {
  margin-top: -4px;
}

.photo-editor-actions,
.photo-viewer-actions {
  flex-wrap: wrap;
}

.reflection-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  cursor: grab;
  user-select: none;
}

.reflection-modal-header:active {
  cursor: grabbing;
}

.reflection-modal-header .ui-close {
  cursor: pointer;
}

.reflection-body {
  display: grid;
  gap: 10px;
}

.reflection-composer-anchor-copy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.reflection-composer-meta {
  margin-top: -2px;
}

.reflection-chip.is-hidden {
  display: none;
}

.reflection-prompt {
  margin: 0;
  color: rgba(244, 241, 234, 0.9);
  font: 600 0.96rem/1.45 "Syne", sans-serif;
}

.reflection-modal textarea,
.editor-field textarea {
  width: 100%;
  resize: vertical;
  min-height: 120px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(244, 241, 234, 0.94);
  padding: 12px 14px;
  font: 500 0.9rem/1.5 "Syne", sans-serif;
}

.reflection-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.reflection-chip {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(244, 241, 234, 0.84);
  font: 500 0.7rem/1 "IBM Plex Mono", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.reflection-chip[data-state="checking"] {
  border-color: rgba(157, 216, 255, 0.24);
  color: rgba(203, 232, 255, 0.94);
}

.reflection-chip[data-state="available"] {
  border-color: rgba(157, 243, 196, 0.32);
  color: rgba(198, 255, 224, 0.96);
}

.reflection-chip[data-state="taken"],
.reflection-chip[data-state="error"] {
  border-color: rgba(255, 180, 170, 0.32);
  color: rgba(255, 208, 200, 0.96);
}

.reflection-feedback {
  margin: 0;
  color: rgba(255, 196, 171, 0.92);
  font: 500 0.8rem/1.4 "Syne", sans-serif;
}

.reflection-feedback.is-hidden {
  display: none;
}

.reflection-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.reflection-actions .ui-secondary {
  min-width: 94px;
}

.reflection-reward-toast {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 7;
  max-width: min(340px, calc(100vw - 32px));
  padding: 12px 14px;
  border: 1px solid rgba(157, 243, 196, 0.22);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(157, 243, 196, 0.12), rgba(255, 255, 255, 0.04)),
    rgba(7, 10, 22, 0.82);
  color: rgba(244, 241, 234, 0.94);
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.3);
  font: 600 0.88rem/1.45 "Syne", sans-serif;
}

.reflection-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.reflection-daily-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.reflection-generated-card {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid rgba(143, 231, 255, 0.18);
  border-radius: 18px;
  background:
    radial-gradient(circle at top, rgba(143, 231, 255, 0.14), rgba(255, 255, 255, 0.03) 54%),
    rgba(7, 10, 22, 0.66);
}

.reflection-generated-inputs.is-hidden {
  display: none;
}

.reflection-stat-card {
  display: grid;
  gap: 5px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.reflection-stat-card strong {
  color: rgba(244, 241, 234, 0.96);
  font: 700 1.1rem/1 "Syne", sans-serif;
}

.reflection-inline-panel {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 14px 14px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
    rgba(7, 10, 22, 0.64);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.22);
}

.reflection-inline-panel.is-hidden {
  display: none;
}

.reflection-library {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

.reflection-library-empty {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(244, 241, 234, 0.74);
}

.reflection-library-empty strong {
  font: 700 0.92rem/1.1 "Syne", sans-serif;
  color: rgba(244, 241, 234, 0.94);
}

.reflection-library-empty span {
  font: 500 0.76rem/1.45 "Syne", sans-serif;
}

.reflection-library-card {
  width: 100%;
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    rgba(9, 14, 28, 0.88);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.reflection-library-card:hover {
  transform: translateY(-1px);
  border-color: rgba(201, 244, 255, 0.24);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

.reflection-library-card.is-selected {
  border-color: rgba(157, 243, 196, 0.42);
  background:
    linear-gradient(180deg, rgba(157, 243, 196, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(9, 14, 28, 0.92);
  box-shadow: inset 0 0 0 1px rgba(201, 244, 255, 0.08), 0 14px 30px rgba(0, 0, 0, 0.2);
}

.reflection-library-card.is-muted {
  opacity: 0.64;
  filter: saturate(0.8);
}

.reflection-library-preview {
  --reflection-preview-accent: #8fe7ff;
  --reflection-preview-accent-soft: #dff8ff;
  --reflection-preview-texture: rgba(255, 255, 255, 0.18);
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 32%, rgba(255, 255, 255, 0.06), transparent 40%),
    radial-gradient(circle at 50% 78%, rgba(0, 0, 0, 0.22), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)),
    rgba(5, 10, 22, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.reflection-library-preview-glow {
  position: absolute;
  width: 72%;
  height: 72%;
  border-radius: 999px;
  background: radial-gradient(circle, color-mix(in srgb, var(--reflection-preview-accent) 56%, white 44%) 0%, color-mix(in srgb, var(--reflection-preview-accent) 38%, transparent) 46%, transparent 74%);
  filter: blur(14px);
  opacity: 0.9;
}

.reflection-library-orb {
  position: relative;
  width: 44%;
  height: 44%;
  border-radius: 999px;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.56), transparent 34%),
    linear-gradient(145deg, var(--reflection-preview-texture), rgba(255, 255, 255, 0.04)),
    linear-gradient(180deg, var(--reflection-preview-accent-soft), var(--reflection-preview-accent));
  box-shadow:
    inset 0 -10px 20px rgba(0, 0, 0, 0.18),
    0 10px 24px rgba(0, 0, 0, 0.28),
    0 0 20px color-mix(in srgb, var(--reflection-preview-accent) 46%, transparent);
  transform: rotate(-10deg);
}

.reflection-library-orb[data-effect="bright"],
.reflection-library-orb[data-effect="pulse"] {
  box-shadow:
    inset 0 -10px 20px rgba(0, 0, 0, 0.16),
    0 10px 24px rgba(0, 0, 0, 0.24),
    0 0 24px color-mix(in srgb, var(--reflection-preview-accent) 70%, white 30%);
}

.reflection-library-orb[data-effect="crystal"] {
  opacity: 0.88;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.34), transparent 36%),
    linear-gradient(145deg, color-mix(in srgb, var(--reflection-preview-accent-soft) 64%, white 36%), var(--reflection-preview-accent));
}

.reflection-library-orb[data-effect="metallic"] {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.24), transparent 34%),
    linear-gradient(180deg, color-mix(in srgb, var(--reflection-preview-accent-soft) 42%, #d9dde8 58%), color-mix(in srgb, var(--reflection-preview-accent) 44%, #6f7f9b 56%));
}

.reflection-library-orb.is-shape-capsule {
  width: 52%;
  height: 32%;
  border-radius: 999px;
}

.reflection-library-orb.is-shape-cube {
  border-radius: 14px;
}

.reflection-library-orb.is-shape-gem,
.reflection-library-orb.is-shape-prism {
  border-radius: 0;
  clip-path: polygon(50% 0%, 92% 32%, 76% 100%, 24% 100%, 8% 32%);
}

.reflection-library-orb.is-shape-shard {
  width: 32%;
  height: 58%;
  border-radius: 0;
  clip-path: polygon(45% 0%, 88% 18%, 66% 100%, 12% 78%);
}

.reflection-library-orb.is-shape-bloom,
.reflection-library-orb.is-shape-lotus,
.reflection-library-orb.is-shape-star {
  border-radius: 0;
  clip-path: polygon(50% 0%, 61% 26%, 88% 12%, 74% 38%, 100% 50%, 74% 62%, 88% 88%, 61% 74%, 50% 100%, 39% 74%, 12% 88%, 26% 62%, 0% 50%, 26% 38%, 12% 12%, 39% 26%);
}

.reflection-library-orb.is-shape-ring {
  background: none;
  border: 10px solid var(--reflection-preview-accent);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.28),
    0 0 20px color-mix(in srgb, var(--reflection-preview-accent) 46%, transparent);
}

.reflection-library-orb.is-shape-heart,
.reflection-library-orb.is-shape-heartgem {
  border-radius: 0;
  clip-path: path("M 50 90 C 20 70 0 48 0 25 C 0 8 14 0 26 0 C 38 0 46 8 50 18 C 54 8 62 0 74 0 C 86 0 100 8 100 25 C 100 48 80 70 50 90 Z");
}

.reflection-library-orb.is-shape-meteor {
  width: 52%;
  height: 38%;
  border-radius: 55% 45% 60% 40% / 60% 45% 55% 40%;
}

.reflection-library-orb.is-shape-crystals {
  border-radius: 0;
  clip-path: polygon(18% 78%, 30% 28%, 44% 60%, 52% 10%, 66% 54%, 82% 24%, 74% 84%, 28% 100%);
}

.reflection-library-asset-shell {
  position: relative;
  width: 76%;
  height: 76%;
  display: grid;
  place-items: center;
  padding: 10px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.18), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
}

.reflection-library-asset {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.26));
}

.reflection-library-content {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.reflection-library-name {
  font: 700 0.88rem/1.15 "Syne", sans-serif;
  color: rgba(244, 241, 234, 0.96);
}

.reflection-library-date {
  font: 500 0.64rem/1 "IBM Plex Mono", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(244, 241, 234, 0.56);
}

.reflection-library-meta {
  font: 500 0.74rem/1.35 "Syne", sans-serif;
  color: rgba(244, 241, 234, 0.68);
}

.reflection-library-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.reflection-reveal-modal {
  width: min(760px, calc(100vw - 30px));
}

.reflection-reveal-modal.is-centered {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(460px, calc(100vw - 32px));
  max-height: min(78svh, 680px);
  z-index: 8;
}

.reflection-reveal-modal.is-stage-only {
  left: auto;
  top: 18px;
  right: 18px;
  transform: none;
  width: auto;
  max-height: none;
  padding: 0;
  border: none;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
}

.reflection-reveal-modal.is-stage-only .reflection-modal-header {
  justify-content: flex-end;
  margin: 0;
}

.reflection-reveal-modal.is-stage-only .reflection-modal-header > div,
.reflection-reveal-modal.is-stage-only .reflection-reveal-copy {
  display: none;
}

.reflection-reveal-modal.is-stage-only .reflection-reveal-test-actions {
  display: flex;
}

.reflection-reveal-modal.is-stage-only .ui-close {
  background: rgba(7, 10, 22, 0.56);
}

.reflection-reveal-modal.is-stage-only::after {
  content: "Click box";
  position: absolute;
  right: 56px;
  top: 0;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(7, 10, 22, 0.52);
  color: rgba(244, 241, 234, 0.84);
  font: 500 0.72rem/1 "IBM Plex Mono", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.reflection-reveal-test-actions {
  position: absolute;
  left: 18px;
  top: 18px;
  z-index: 1;
}

.reflection-reveal-body {
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}

.reflection-reveal-stage {
  display: none;
}

.reflection-reveal-stage::before {
  content: "";
  position: absolute;
  inset: 12% 12% auto;
  height: 44%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(143, 231, 255, 0.18), rgba(143, 231, 255, 0));
  filter: blur(22px);
  pointer-events: none;
}

.reflection-mystery-box {
  position: absolute;
  bottom: 36px;
  width: 160px;
  height: 128px;
  transform: translateY(0);
}

.reflection-mystery-box-core,
.reflection-mystery-box-lid,
.reflection-mystery-box-glow {
  position: absolute;
  left: 0;
  width: 100%;
  border-radius: 18px;
}

.reflection-mystery-box-core {
  bottom: 0;
  height: 88px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(135deg, rgba(255, 214, 153, 0.92), rgba(188, 120, 255, 0.72)),
    rgba(24, 14, 38, 0.94);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.36);
}

.reflection-mystery-box-core::before,
.reflection-mystery-box-core::after {
  content: "";
  position: absolute;
  background: rgba(255, 241, 210, 0.88);
}

.reflection-mystery-box-core::before {
  left: 50%;
  top: 0;
  width: 18px;
  height: 100%;
  transform: translateX(-50%);
}

.reflection-mystery-box-core::after {
  left: 0;
  top: 50%;
  width: 100%;
  height: 14px;
  transform: translateY(-50%);
}

.reflection-mystery-box-lid {
  top: 2px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(135deg, rgba(255, 229, 176, 0.96), rgba(255, 135, 170, 0.7)),
    rgba(34, 20, 48, 0.98);
  transform-origin: 16px 36px;
  animation: reflectionMysteryLid 2.8s ease-in-out infinite;
}

.reflection-mystery-box-glow {
  bottom: -12px;
  left: 10%;
  width: 80%;
  height: 36px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0));
  filter: blur(12px);
}

.reflection-artifact-shell {
  position: absolute;
  bottom: 132px;
  display: grid;
  place-items: center;
  width: 200px;
  height: 200px;
  animation: reflectionArtifactFloat 2.8s ease-in-out infinite;
}

.reflection-artifact-preview {
  width: 124px;
  height: 124px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background-color: rgba(143, 231, 255, 0.82);
  background-size: cover;
  background-position: center;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 24px 48px rgba(0, 0, 0, 0.34),
    0 0 44px rgba(143, 231, 255, 0.3);
}

.reflection-artifact-preview.shape-sphere {
  border-radius: 999px;
}

.reflection-artifact-preview.shape-cube {
  border-radius: 24px;
  transform: rotate(-12deg);
}

.reflection-artifact-preview.shape-gem {
  clip-path: polygon(50% 0%, 86% 22%, 100% 58%, 50% 100%, 0% 58%, 14% 22%);
}

.reflection-artifact-preview.shape-shard {
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
}

.reflection-artifact-preview.shape-bloom {
  clip-path: polygon(50% 0%, 66% 20%, 90% 10%, 80% 34%, 100% 50%, 80% 66%, 90% 90%, 66% 80%, 50% 100%, 34% 80%, 10% 90%, 20% 66%, 0% 50%, 20% 34%, 10% 10%, 34% 20%);
}

.reflection-artifact-preview.shape-capsule {
  border-radius: 999px;
  transform: rotate(26deg);
}

.reflection-reveal-copy {
  display: grid;
  gap: 10px;
}

@keyframes reflectionMysteryLid {
  0%, 12%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  22%, 72% {
    transform: translateY(-4px) rotate(-24deg);
  }
  82% {
    transform: translateY(-2px) rotate(-8deg);
  }
}

@keyframes reflectionArtifactFloat {
  0%, 100% {
    transform: translateY(12px) scale(0.92);
  }
  22% {
    transform: translateY(-72px) scale(1.02);
  }
  58% {
    transform: translateY(-92px) scale(1.04);
  }
  78% {
    transform: translateY(-78px) scale(1);
  }
}

.moon-editor-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.moon-editor-title {
  margin: 4px 0 0;
  font: 700 1.2rem/1 "Syne", sans-serif;
  color: rgba(244, 241, 234, 0.96);
}

.builder-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.builder-tab {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  min-height: 42px;
  padding: 0.72rem 0.7rem;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(244, 241, 234, 0.8);
  font: 500 0.64rem/1 "IBM Plex Mono", monospace;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
}

.builder-tab.is-active {
  border-color: rgba(157, 243, 196, 0.4);
  background: rgba(157, 243, 196, 0.09);
  color: rgba(244, 241, 234, 0.96);
}

.builder-sections {
  display: grid;
}

.builder-section {
  display: none;
}

.builder-section.is-active {
  display: block;
}

.builder-section-header {
  margin-bottom: 12px;
}

.builder-copy {
  margin: 6px 0 0;
  color: rgba(244, 241, 234, 0.58);
  font: 500 0.8rem/1.45 "Syne", sans-serif;
}

.moon-list-wrap {
  margin-bottom: 12px;
}

.moon-list-header {
  margin-bottom: 8px;
}

.moon-list {
  display: grid;
  gap: 8px;
  max-height: 180px;
  overflow: auto;
  padding-right: 4px;
}

.preset-library {
  display: grid;
  gap: 10px;
  max-height: 320px;
  overflow: auto;
  padding-right: 4px;
}

.preset-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 8px;
}

.preset-actions-systems {
  margin-bottom: 12px;
}

.custom-texture-library {
  display: grid;
  gap: 10px;
  margin: 6px 0 10px;
}

.preset-visual-library {
  margin-top: 8px;
}

.preset-visual-library:empty {
  display: none;
}

.custom-texture-library-group {
  display: grid;
  gap: 8px;
}

.custom-texture-library-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.custom-texture-library-toggle-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(244, 241, 234, 0.82);
  font: 600 0.82rem/1 "IBM Plex Mono", monospace;
}

.custom-texture-library-label {
  font: 600 0.63rem/1 "IBM Plex Mono", monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(244, 241, 234, 0.5);
}

.custom-texture-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}

.custom-texture-library-grid.is-collapsed {
  display: none;
}

.custom-texture-chip {
  display: grid;
  gap: 6px;
  min-width: 0;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(244, 241, 234, 0.88);
  cursor: pointer;
  text-align: left;
  overflow: hidden;
}

.preset-visual-card {
  min-height: 122px;
  align-content: start;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.preset-visual-card:hover {
  transform: translateY(-1px);
  border-color: rgba(201, 244, 255, 0.24);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.14);
}

.custom-texture-chip.is-active {
  border-color: rgba(157, 243, 196, 0.42);
  box-shadow: 0 0 0 1px rgba(157, 243, 196, 0.18);
}

.custom-texture-chip-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  background-size: cover;
  background-position: center;
}

.custom-texture-chip-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: inherit;
  pointer-events: none;
}

.custom-texture-chip.is-animated .custom-texture-chip-preview::before {
  content: "GIF";
  position: absolute;
  right: 6px;
  bottom: 6px;
  z-index: 1;
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(7, 10, 22, 0.78);
  color: rgba(255, 243, 221, 0.96);
  font: 600 0.5rem/1 "IBM Plex Mono", monospace;
  letter-spacing: 0.08em;
}

.custom-texture-chip-name {
  display: block;
  min-width: 0;
  font: 500 0.64rem/1.2 "IBM Plex Mono", monospace;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(244, 241, 234, 0.76);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-texture-chip.is-locked {
  opacity: 0.72;
}

.custom-texture-chip.is-locked .custom-texture-chip-preview {
  filter: grayscale(0.25) saturate(0.82);
}

.custom-texture-chip-badge {
  position: absolute;
  right: 6px;
  top: 6px;
  z-index: 1;
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(7, 10, 22, 0.8);
  color: rgba(255, 243, 221, 0.96);
  font: 600 0.5rem/1 "IBM Plex Mono", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.moon-shape-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
}

.moon-shape-card-preview {
  background-size: cover;
  background-position: center;
}

.visit-mode-banner {
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 209, 128, 0.18);
  border-radius: 16px;
  background: rgba(255, 209, 128, 0.07);
}

.visit-mode-banner.is-hidden {
  display: none;
}

.visit-mode-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 10px;
}

.account-summary {
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(157, 243, 196, 0.18);
  border-radius: 16px;
  background: rgba(157, 243, 196, 0.07);
}

.account-summary.is-hidden {
  display: none;
}

.recipe-inbox-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 191, 105, 0.18);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 191, 105, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(7, 10, 22, 0.66);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.2);
}

.recipe-inbox-panel.is-disabled {
  opacity: 0.72;
}

.recipe-inbox-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.recipe-inbox-title {
  margin: 4px 0 0;
  font: 700 1rem/1 "Syne", sans-serif;
  color: rgba(244, 241, 234, 0.96);
}

.recipe-inbox-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.recipe-inbox-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.recipe-inbox-list {
  display: grid;
  gap: 10px;
}

.recipe-directory-panel {
  display: grid;
  gap: 12px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.recipe-directory-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.recipe-directory-list {
  display: grid;
  gap: 10px;
}

.recipe-person-row {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
}

.recipe-person-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.recipe-inbox-empty {
  padding: 12px 14px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.recipe-inbox-empty strong {
  display: block;
  margin-bottom: 6px;
  color: rgba(244, 241, 234, 0.96);
  font: 700 0.96rem/1.2 "Syne", sans-serif;
}

.recipe-inbox-card {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
}

.recipe-inbox-card.is-unread {
  border-color: rgba(255, 191, 105, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 191, 105, 0.08), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, 0.03);
}

.recipe-inbox-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.recipe-inbox-card-title {
  margin: 0;
  color: rgba(244, 241, 234, 0.96);
  font: 700 0.96rem/1.25 "Syne", sans-serif;
}

.recipe-inbox-card-copy {
  margin: 0;
  color: rgba(244, 241, 234, 0.66);
  font: 500 0.82rem/1.5 "Syne", sans-serif;
}

.recipe-inbox-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.moon-editor.is-visit-mode .builder-section input:disabled,
.moon-editor.is-visit-mode .builder-section select:disabled,
.moon-editor.is-visit-mode .builder-section textarea:disabled,
.moon-editor.is-visit-mode .builder-section button:disabled {
  opacity: 0.54;
}

.moon-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, opacity 160ms ease, filter 160ms ease, box-shadow 160ms ease;
}

.moon-row.is-selected {
  border-color: rgba(157, 243, 196, 0.42);
  background: rgba(157, 243, 196, 0.08);
  box-shadow: inset 0 0 0 1px rgba(201, 244, 255, 0.08), 0 12px 26px rgba(0, 0, 0, 0.16);
}

.moon-row:hover {
  transform: translateY(-1px);
  border-color: rgba(201, 244, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
}

.moon-row.is-muted {
  opacity: 0.58;
  filter: saturate(0.72);
}

.moon-row.is-muted .moon-row-name,
.moon-row.is-muted .moon-row-meta {
  color: rgba(244, 241, 234, 0.56);
}

.moon-row-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 500 0.86rem/1.2 "Syne", sans-serif;
  color: rgba(244, 241, 234, 0.92);
}

.moon-row-meta {
  font: 500 0.65rem/1 "IBM Plex Mono", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(244, 241, 234, 0.56);
}

.preset-card {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)),
    rgba(255, 255, 255, 0.025);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.preset-card.is-selected {
  border-color: rgba(157, 243, 196, 0.42);
  background:
    linear-gradient(180deg, rgba(157, 243, 196, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(157, 243, 196, 0.04);
}

.preset-card-top {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 10px;
  align-items: stretch;
}

.preset-card-preview {
  width: 100%;
  aspect-ratio: 1.55 / 1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(4, 7, 18, 0.7);
  overflow: hidden;
}

.preset-card-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preset-card-copy {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 8px;
}

.preset-card-name {
  margin: 0;
  font: 700 0.95rem/1.1 "Syne", sans-serif;
  color: rgba(244, 241, 234, 0.96);
}

.preset-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.preset-card-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(244, 241, 234, 0.78);
  font: 500 0.62rem/1 "IBM Plex Mono", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.preset-card-meta {
  display: grid;
  gap: 4px;
}

.preset-card-line {
  color: rgba(244, 241, 234, 0.62);
  font: 500 0.75rem/1.35 "Syne", sans-serif;
}

.preset-card-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.preset-card-actions .ui-secondary {
  padding-inline: 0.5rem;
}

.moon-editor-kicker,
.editor-field span {
  font: 500 0.72rem/1.2 "IBM Plex Mono", monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(244, 241, 234, 0.8);
}

.ui-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font: 500 0.9rem/1 "IBM Plex Mono", monospace;
}

.editor-field {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.editor-field input[type="range"] {
  width: 100%;
  accent-color: #9df3c4;
  cursor: ew-resize;
  touch-action: auto;
}

.editor-field input[type="range"].has-zero-marker::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background:
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.22) 0,
      rgba(255, 255, 255, 0.22) calc(50% - 0.75px),
      rgba(255, 230, 186, 0.9) calc(50% - 0.75px),
      rgba(255, 230, 186, 0.9) calc(50% + 0.75px),
      rgba(255, 255, 255, 0.22) calc(50% + 0.75px),
      rgba(255, 255, 255, 0.22) 100%
    );
}

.editor-field input[type="range"].has-zero-marker::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background:
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.22) 0,
      rgba(255, 255, 255, 0.22) calc(50% - 0.75px),
      rgba(255, 230, 186, 0.9) calc(50% - 0.75px),
      rgba(255, 230, 186, 0.9) calc(50% + 0.75px),
      rgba(255, 255, 255, 0.22) calc(50% + 0.75px),
      rgba(255, 255, 255, 0.22) 100%
    );
}

.editor-field input[type="text"] {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(244, 241, 234, 0.94);
  font: 500 0.95rem/1.2 "Syne", sans-serif;
}

.editor-field select {
  appearance: none;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 10px 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)),
    rgba(18, 24, 39, 0.94);
  color: rgba(244, 241, 234, 0.94);
  font: 500 0.9rem/1.2 "Syne", sans-serif;
  color-scheme: dark;
}

.editor-field select option {
  background: #151c2b;
  color: rgba(244, 241, 234, 0.96);
}

.editor-field input[type="color"] {
  width: 100%;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
  cursor: pointer;
}

.planet-map-wrap {
  margin-top: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0)),
    rgba(11, 16, 27, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

#planet-map-editor {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 1;
  cursor: crosshair;
  image-rendering: auto;
  touch-action: none;
  pointer-events: auto;
}

.editor-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.ui-secondary {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 0.72rem 0.9rem;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(244, 241, 234, 0.9);
  font: 500 0.68rem/1 "IBM Plex Mono", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.ui-secondary.is-save-pending {
  border-color: rgba(157, 243, 196, 0.38);
  background: rgba(157, 243, 196, 0.1);
  color: rgba(230, 255, 241, 0.96);
}

.ui-secondary.is-save-ok {
  border-color: rgba(157, 243, 196, 0.42);
  background: rgba(157, 243, 196, 0.14);
  color: rgba(230, 255, 241, 0.96);
}

.ui-secondary.is-save-error {
  border-color: rgba(255, 166, 139, 0.42);
  background: rgba(255, 166, 139, 0.12);
  color: rgba(255, 226, 215, 0.98);
}

.ui-secondary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.system-root {
  position: absolute;
}

.system-primary {
  left: calc(50% - 260px);
  top: calc(50% - 260px);
  width: 520px;
  height: 520px;
}

.system-secondary {
  width: 240px;
  height: 240px;
  opacity: 0.88;
  filter: saturate(0.95);
}

.system-amber {
  left: calc(50% + 720px);
  top: calc(50% - 340px);
}

.system-cyan {
  left: calc(50% - 920px);
  top: calc(50% + 420px);
}

.artifact-grid,
.sigil,
.halo,
.core,
.artifact-dais,
.mini-halo,
.mini-core {
  position: absolute;
}

.orbital-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.artifact-grid {
  inset: 10% 6%;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.22;
  transform: translateZ(-80px);
  mask-image: radial-gradient(circle at center, black 45%, transparent 90%);
}

.sigil {
  border: 1px solid rgba(255, 255, 255, 0.14);
  opacity: 0.7;
}

.sigil-a {
  width: 180px;
  height: 180px;
  top: 8%;
  right: 10%;
  border-radius: 24px;
  transform: rotate(45deg) translateZ(40px);
}

.sigil-b {
  width: 220px;
  height: 44px;
  left: 4%;
  top: 34%;
  border-radius: 999px;
  transform: translateZ(60px);
}

.sigil-c {
  width: 140px;
  height: 140px;
  left: 18%;
  bottom: 8%;
  border-radius: 50%;
  box-shadow: inset 0 0 0 16px rgba(255, 255, 255, 0.04);
  transform: translateZ(65px);
}

.halo {
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 40px rgba(255, 255, 255, 0.04);
}

.halo-a {
  width: 420px;
  height: 420px;
  border-style: solid;
  border-color: rgba(246, 160, 77, 0.22);
  transform: rotateX(72deg) translateZ(10px);
  animation: spin-a calc(24s / var(--motion-scale)) linear infinite;
}

.halo-b {
  width: 280px;
  height: 280px;
  border-color: rgba(126, 198, 217, 0.34);
  border-style: dashed;
  transform: rotateY(74deg) translateZ(30px);
  animation: spin-b calc(19s / var(--motion-scale)) linear infinite reverse;
}

.halo-c {
  width: 500px;
  height: 500px;
  border-color: rgba(255, 255, 255, 0.14);
  border-style: dotted;
  transform: rotateZ(35deg) rotateX(80deg);
  animation: spin-c calc(28s / var(--motion-scale)) linear infinite;
}

.mini-halo {
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  inset: 50%;
  transform: translate(-50%, -50%);
}

.mini-halo-a {
  width: 170px;
  height: 170px;
  border-color: rgba(246, 160, 77, 0.2);
  animation: spin-a calc(20s / var(--motion-scale)) linear infinite;
}

.mini-halo-b {
  width: 110px;
  height: 110px;
  border-color: rgba(126, 198, 217, 0.24);
  border-style: dashed;
  animation: spin-b calc(14s / var(--motion-scale)) linear infinite reverse;
}

.mini-core {
  left: 50%;
  top: 50%;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(circle at 34% 34%, rgba(255, 255, 255, 0.98), rgba(255, 191, 105, 0.68) 22%, rgba(105, 226, 255, 0.24) 58%, rgba(4, 6, 12, 0.12) 74%);
  box-shadow:
    0 0 28px rgba(255, 191, 105, 0.16),
    0 0 56px rgba(126, 198, 217, 0.08);
}

.system-secondary::before {
  content: "";
  position: absolute;
  inset: 50%;
  width: 220px;
  height: 220px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.04), transparent 66%);
  filter: blur(10px);
}

.system-cyan .mini-halo-a {
  border-color: rgba(126, 198, 217, 0.22);
}

.system-cyan .mini-halo-b {
  border-color: rgba(255, 255, 255, 0.14);
}

.system-cyan .mini-core {
  background:
    radial-gradient(circle at 34% 34%, rgba(255, 255, 255, 0.98), rgba(188, 214, 236, 0.68) 22%, rgba(126, 198, 217, 0.28) 58%, rgba(4, 6, 12, 0.12) 74%);
}

.artifact-dais {
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(255, 191, 105, 0.08), transparent 54%),
    conic-gradient(from 90deg, rgba(126, 198, 217, 0.12), rgba(255, 255, 255, 0.02), rgba(246, 160, 77, 0.12), rgba(255, 255, 255, 0.02), rgba(126, 198, 217, 0.12));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 0 40px rgba(255, 255, 255, 0.03),
    0 0 70px rgba(246, 160, 77, 0.06);
  transform: rotateX(78deg) translateY(140px) translateZ(-20px);
}

.core {
  width: 240px;
  height: 240px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.98), color-mix(in srgb, var(--planet-accent) 78%, white) 18%, color-mix(in srgb, var(--planet-accent) 42%, transparent) 34%, rgba(105, 226, 255, 0.18) 56%, rgba(3, 5, 13, 0.1) 72%),
    radial-gradient(circle at center, rgba(105, 226, 255, 0.26), transparent 60%);
  filter: drop-shadow(0 0 24px rgba(255, 191, 105, 0.24));
  animation: pulse calc(6s / var(--motion-scale)) ease-in-out infinite;
}

.core-ring {
  position: absolute;
  inset: -18px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 30px rgba(255, 255, 255, 0.05);
  animation: ripple calc(4.8s / var(--motion-scale)) ease-out infinite;
}

.ring-delay {
  animation-delay: 1.4s;
}

.core-center {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  box-shadow:
    0 0 28px rgba(255, 255, 255, 0.5),
    0 0 60px rgba(105, 226, 255, 0.24);
}

body.alert .hero,
body.alert .hero {
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.45),
    0 0 50px rgba(246, 160, 77, 0.08);
}

body.alert .core {
  filter:
    drop-shadow(0 0 24px rgba(255, 191, 105, 0.24))
    drop-shadow(0 0 50px rgba(126, 198, 217, 0.18));
}

body.surge .vault-pulse {
  animation-duration: 3s;
  opacity: 0.75;
}

body.surge .vault-fog-a,
body.surge .vault-fog-b,
body.surge .vault-fog-c {
  filter: blur(86px);
}

body.surge .hero-orbital::before {
  opacity: 1;
}

@keyframes spin-a {
  from {
    transform: rotate(0deg) rotateX(72deg);
  }
  to {
    transform: rotate(360deg) rotateX(72deg);
  }
}

@keyframes spin-b {
  from {
    transform: rotate(0deg) rotateY(74deg);
  }
  to {
    transform: rotate(360deg) rotateY(74deg);
  }
}

@keyframes spin-c {
  from {
    transform: rotate(35deg) rotateX(80deg);
  }
  to {
    transform: rotate(395deg) rotateX(80deg);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(0.96);
  }
  50% {
    transform: scale(1.04);
  }
}

@keyframes ripple {
  0% {
    opacity: 0;
    transform: scale(0.82);
  }
  24% {
    opacity: 0.6;
  }
  100% {
    opacity: 0;
    transform: scale(1.22);
  }
}

@keyframes fog-drift-a {
  from {
    transform: translate3d(-2%, -1%, 0) scale(1);
  }
  to {
    transform: translate3d(5%, 2%, 0) scale(1.08);
  }
}

@keyframes fog-drift-b {
  from {
    transform: translate3d(1%, -2%, 0) scale(1.02);
  }
  to {
    transform: translate3d(-5%, 3%, 0) scale(1.1);
  }
}

@keyframes fog-drift-c {
  from {
    transform: translate3d(-1%, 0, 0) scale(1);
  }
  to {
    transform: translate3d(4%, -3%, 0) scale(1.06);
  }
}

@keyframes chamber-breathe {
  0%,
  100% {
    transform: scale(0.96);
    opacity: 0.32;
  }
  50% {
    transform: scale(1.04);
    opacity: 0.5;
  }
}


@media (max-width: 980px) {
  .hero-orbital {
    min-height: 460px;
  }

  .system-amber {
    left: calc(50% + 520px);
    top: calc(50% - 260px);
  }

  .system-cyan {
    left: calc(50% - 700px);
    top: calc(50% + 340px);
  }
}

@media (max-width: 640px) {
  .hero-orbital {
    min-height: 380px;
  }

  .planet-ui {
    left: 14px;
    top: 14px;
    bottom: 14px;
    max-height: calc(100svh - 28px);
  }

  .halo-a {
    width: 300px;
    height: 300px;
  }

  .halo-b {
    width: 210px;
    height: 210px;
  }

  .halo-c {
    width: 360px;
    height: 360px;
  }

  .core {
    width: 170px;
    height: 170px;
  }

  .system-primary {
    left: calc(50% - 190px);
    top: calc(50% - 190px);
    width: 380px;
    height: 380px;
  }

  .system-secondary {
    width: 180px;
    height: 180px;
  }

}

@media (max-width: 820px) {
  .reflection-reveal-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .reflection-reveal-stage {
    display: none;
  }

  .hero,
  .hero-orbital,
  .experience {
    min-height: 100svh;
    min-height: 100dvh;
    height: 100svh;
    height: 100dvh;
  }

  .planet-ui {
    left: 0;
    right: 0;
    top: calc(10px + env(safe-area-inset-top, 0px));
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    padding: 0 12px;
    max-height: calc(100dvh - 20px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    pointer-events: none;
  }

  .planet-ui > * {
    pointer-events: auto;
  }

  .view-switch {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    max-width: none;
    width: 100%;
  }

  .visit-top-banner {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .universe-browser {
    width: 100%;
    max-height: min(54dvh, 420px);
  }

  .universe-search-list {
    max-height: min(36dvh, 270px);
  }

  .view-chip {
    min-height: 44px;
    padding: 0 10px;
    font-size: 0.82rem;
    letter-spacing: 0.14em;
  }

  .editor-field input[type="text"],
  .editor-field input[type="email"],
  .editor-field input[type="password"],
  .editor-field select,
  .editor-field textarea {
    font-size: 16px;
    line-height: 1.3;
  }

  .ui-fab {
    align-self: flex-start;
    width: 48px;
    height: 48px;
    margin-top: 10px;
  }

  .moon-editor {
    width: 100%;
    max-height: min(66dvh, 720px);
    margin-top: 12px;
    padding: 14px 14px 12px;
    border-radius: 24px;
  }

  .module-dock {
    right: 12px;
    left: auto;
    top: auto;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    --module-dock-width: 76px;
    --module-dock-padding-y: calc(10px * var(--module-dock-scale));
    --module-dock-padding-x: calc(8px * var(--module-dock-scale));
    --module-dock-radius: calc(24px * var(--module-dock-scale));
    --module-dock-card-size: calc(56px * var(--module-dock-scale));
    --module-dock-icon-size: calc(46px * var(--module-dock-scale));
    --module-dock-icon-radius: calc(16px * var(--module-dock-scale));
    --module-dock-action-size: calc(46px * var(--module-dock-scale));
    --module-dock-action-radius: calc(16px * var(--module-dock-scale));
    max-height: calc(100dvh - 140px);
  }

  .moon-editor.is-photo-dock-panel {
    min-width: 0;
    width: min(100vw - 24px, 760px);
  }

  .module-card-label {
    right: calc(100% + 10px);
    max-width: min(56vw, 220px);
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .module-shell {
    padding: calc(14px + env(safe-area-inset-top, 0px)) 14px calc(14px + env(safe-area-inset-bottom, 0px));
  }

  .module-shell-header {
    align-items: center;
  }

  .module-shell-header .preset-actions {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .module-shell-stage {
    min-height: calc(100dvh - 136px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  }

  .module-shell-card {
    width: 100%;
    padding: 20px 18px;
    border-radius: 24px;
  }

  .economy-hero,
  .economy-grid {
    grid-template-columns: 1fr;
  }

  .economy-stat-grid {
    grid-template-columns: 1fr 1fr;
  }

  .module-library-popover {
    right: calc(100% + 10px);
    width: min(280px, calc(100vw - 110px));
  }

  .module-settings-popover {
    right: calc(100% + 10px);
    bottom: 62px;
    width: min(280px, calc(100vw - 110px));
  }

  .photo-gallery-topbar,
  .photo-gallery-meta,
  .photo-gallery-stage {
    display: grid;
    grid-template-columns: 1fr;
  }

  .photo-gallery-add {
    width: 100%;
  }

  .photo-gallery-stage {
    gap: 10px;
  }

  .photo-gallery-nav {
    width: 100%;
    height: 40px;
  }

  .photo-gallery-stack {
    min-height: 280px;
    padding: 14px 12px;
  }

  .photo-gallery-card-back {
    transform: translate(-14px, 12px) rotate(-5deg) scale(0.94);
  }

  .photo-gallery-card-mid {
    transform: translate(14px, 12px) rotate(5deg) scale(0.95);
  }

  .photo-gallery-image {
    min-height: 240px;
  }

  .photo-settings-shell,
  .photo-settings-grid {
    grid-template-columns: 1fr;
  }

  .auth-modal {
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
    width: auto;
    max-height: min(78dvh, calc(100dvh - 92px - env(safe-area-inset-top, 0px)));
    padding: 16px 16px calc(18px + env(safe-area-inset-bottom, 0px));
    border-radius: 26px 26px 0 0;
    border-left: none;
    border-right: none;
    box-shadow: 0 -24px 60px rgba(0, 0, 0, 0.32);
  }

  .profile-onboarding {
    padding: 12px;
  }

  .profile-onboarding-card {
    width: min(100%, 520px);
    padding: 18px 16px 16px;
    border-radius: 24px;
  }

  .ftue-overlay {
    left: 16px;
    right: 16px;
    top: auto;
    bottom: 84px;
    width: auto;
  }

  .ftue-actions {
    flex-direction: column;
  }

  .ftue-actions > * {
    width: 100%;
  }

  .ftue-resume {
    right: 16px;
    bottom: 16px;
  }

  .reflection-popout,
  .photo-lightbox {
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
    width: auto;
    max-height: min(76dvh, calc(100dvh - 92px - env(safe-area-inset-top, 0px)));
    padding: 14px 14px calc(16px + env(safe-area-inset-bottom, 0px));
    border-radius: 24px 24px 0 0;
    border-left: none;
    border-right: none;
  }

  .photo-lightbox-body {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .photo-lightbox-stage {
    min-height: 220px;
  }

  .photo-lightbox-image {
    max-height: 40svh;
  }

  .reflection-open-button,
  .photo-open-button,
  .universe-node-label,
  .universe-label {
    max-width: min(70vw, 240px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .debug-badge {
    display: none;
  }

  .reflection-debug-panel {
    top: auto;
    bottom: 16px;
    min-width: 0;
    max-width: calc(100vw - 32px);
  }
}

/* ═══════════════════════════════════════════════════════════
   REFLECTIONS ORB — Dock icon
   ═══════════════════════════════════════════════════════════ */

/* Container */
.rfx-btn-icon {
  position: relative;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Main orb sphere ─────────────────────────────── */
.rfx-btn-orb {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,0.35) 0%, transparent 55%),
    radial-gradient(circle at 55% 55%, #7a5ff0 0%, #4a6cf7 40%, #2ad4a8 85%, #f0c860 100%);
  box-shadow:
    0 0 8px 2px rgba(100, 120, 255, 0.45),
    0 0 18px 4px rgba(120, 95, 240, 0.25),
    inset 0 -3px 6px rgba(42, 212, 168, 0.3);
  animation: rfx-pulse 3.2s ease-in-out infinite;
  z-index: 3;
}

/* Glassy highlight arc (top-left reflection) */
.rfx-btn-orb::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 3px;
  width: 10px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.7) 0%, transparent 70%);
  transform: rotate(-25deg);
}

/* Subtle bottom catchlight */
.rfx-btn-orb::after {
  content: '';
  position: absolute;
  bottom: 2px;
  right: 4px;
  width: 5px;
  height: 3px;
  border-radius: 50%;
  background: rgba(240,200,96,0.35);
  filter: blur(1px);
}

/* ── Ambient glow behind orb ─────────────────────── */
.rfx-btn-glow {
  position: absolute;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(100,130,255,0.20) 0%, rgba(120,95,240,0.08) 50%, transparent 72%);
  animation: rfx-glow-breathe 4s ease-in-out infinite;
  z-index: 1;
}

/* ── Orbiting memory particles ───────────────────── */
.rfx-btn-orbit {
  position: absolute;
  width: 100%;
  height: 100%;
  animation: rfx-orbit linear infinite;
  z-index: 4;
}
.rfx-btn-orbit::after {
  content: '';
  position: absolute;
  border-radius: 50%;
}

/* Particle 1: warm gold — closest, fastest */
.rfx-btn-orbit-1 {
  animation-duration: 4.8s;
}
.rfx-btn-orbit-1::after {
  top: 1px;
  left: 50%;
  width: 3.5px;
  height: 3.5px;
  background: radial-gradient(circle, #ffe08a, #f0a030);
  box-shadow: 0 0 5px 1.5px rgba(240,180,60,0.65), 0 0 10px 3px rgba(240,180,60,0.25);
  margin-left: -1.75px;
}

/* Particle 2: cool blue — medium orbit */
.rfx-btn-orbit-2 {
  animation-duration: 6.5s;
  animation-direction: reverse;
  animation-delay: -2s;
}
.rfx-btn-orbit-2::after {
  top: 0;
  left: 50%;
  width: 2.5px;
  height: 2.5px;
  background: radial-gradient(circle, #a8d0ff, #5588ff);
  box-shadow: 0 0 4px 1px rgba(100,150,255,0.60), 0 0 8px 2px rgba(100,150,255,0.20);
  margin-left: -1.25px;
}

/* Particle 3: violet — widest, slowest */
.rfx-btn-orbit-3 {
  animation-duration: 8.2s;
  animation-delay: -4.5s;
}
.rfx-btn-orbit-3::after {
  top: -1px;
  left: 50%;
  width: 2px;
  height: 2px;
  background: radial-gradient(circle, #d4b0ff, #9060e0);
  box-shadow: 0 0 4px 1px rgba(160,100,240,0.55), 0 0 8px 2px rgba(160,100,240,0.18);
  margin-left: -1px;
}

/* ── Faint ring trace (shows orbital path) ───────── */
.rfx-btn-ring-trace {
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(120, 140, 255, 0.08);
  z-index: 2;
  animation: rfx-ring-shimmer 6s ease-in-out infinite;
}

/* ── Keyframes ───────────────────────────────────── */
@keyframes rfx-pulse {
  0%, 100% { transform: scale(1);   box-shadow: 0 0 8px 2px rgba(100,120,255,0.45), 0 0 18px 4px rgba(120,95,240,0.25), inset 0 -3px 6px rgba(42,212,168,0.3); }
  50%      { transform: scale(1.06); box-shadow: 0 0 12px 4px rgba(100,120,255,0.55), 0 0 24px 6px rgba(120,95,240,0.35), inset 0 -3px 6px rgba(42,212,168,0.4); }
}

@keyframes rfx-glow-breathe {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.12); }
}

@keyframes rfx-orbit {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes rfx-ring-shimmer {
  0%, 100% { opacity: 0.3; border-color: rgba(120,140,255,0.08); }
  50%      { opacity: 0.8; border-color: rgba(120,140,255,0.18); }
}

/* ── Active state (panel open) — bloom everything ── */
#module-reflections.is-active .rfx-btn-orb {
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,0.50) 0%, transparent 55%),
    radial-gradient(circle at 55% 55%, #9070ff 0%, #5580ff 40%, #40e8c0 85%, #ffe070 100%);
  box-shadow:
    0 0 14px 5px rgba(100,120,255,0.65),
    0 0 28px 8px rgba(120,95,240,0.40),
    inset 0 -3px 6px rgba(42,212,168,0.4);
  animation-duration: 2s;
}

#module-reflections.is-active .rfx-btn-glow {
  background: radial-gradient(circle, rgba(100,130,255,0.35) 0%, rgba(120,95,240,0.15) 50%, transparent 72%);
  animation-duration: 2.5s;
}

#module-reflections.is-active .rfx-btn-orbit-1 { animation-duration: 3s; }
#module-reflections.is-active .rfx-btn-orbit-2 { animation-duration: 4s; }
#module-reflections.is-active .rfx-btn-orbit-3 { animation-duration: 5s; }

#module-reflections.is-active .rfx-btn-ring-trace {
  border-color: rgba(120,140,255,0.22);
  box-shadow: 0 0 6px 1px rgba(120,140,255,0.10);
}

/* ── Hover micro-interaction ─────────────────────── */
#module-reflections:hover .rfx-btn-orb {
  filter: brightness(1.15);
}
#module-reflections:hover .rfx-btn-orbit-1 { animation-duration: 3.2s; }
#module-reflections:hover .rfx-btn-orbit-2 { animation-duration: 4.5s; }
#module-reflections:hover .rfx-btn-orbit-3 { animation-duration: 5.8s; }
