/* Celestial Orbit Interface
   A clean, authoritative presentation layer over the legacy gameplay DOM. */

:root {
  --orbit-ink-0: #02080d;
  --orbit-ink-1: #06151d;
  --orbit-ink-2: #0a2830;
  --orbit-jade: #79d9c0;
  --orbit-jade-bright: #baf5df;
  --orbit-gold: #d8b864;
  --orbit-gold-bright: #ffe8a5;
  --orbit-ivory: #f4edcf;
  --orbit-muted: #b8cfca;
  --orbit-danger: #e16f62;
  --orbit-panel: rgba(5, 18, 26, 0.96);
  --orbit-panel-soft: rgba(8, 31, 37, 0.88);
  --orbit-line: rgba(216, 184, 100, 0.3);
  --orbit-gong-size: clamp(340px, 33vw, 420px);
  --orbit-stage-height: 575px;
  --shell-top: 82px;
  --shell-bottom: 0px;
  --ui-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", sans-serif;
  --display-font: "Palatino Linotype", Palatino, Georgia, serif;
}

html,
body {
  width: 100%;
  max-width: 100%;
  min-height: 100%;
  background: var(--orbit-ink-0);
}

body.celestial-orbit-ui {
  font-family: var(--ui-font);
  font-size: 16px;
  line-height: 1.5;
  font-synthesis: none;
  -webkit-font-smoothing: auto;
  text-rendering: optimizeLegibility;
  color: var(--orbit-ivory);
  background:
    radial-gradient(circle at 50% 24%, rgba(84, 169, 146, 0.13), transparent 34%),
    linear-gradient(180deg, #061720, #02090e 72%);
}

body.celestial-orbit-ui::before {
  opacity: 0.24 !important;
  background:
    linear-gradient(180deg, transparent 45%, rgba(1, 6, 10, 0.84)),
    url("assets/celestial-orbit-stage.svg") center / cover no-repeat !important;
  filter: none !important;
}

body.celestial-orbit-ui::after {
  opacity: 0.24 !important;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.01) 1px, transparent 1px) !important;
  background-size: 54px 54px !important;
  mix-blend-mode: screen;
}

.celestial-orbit-ui .bg-layer {
  position: fixed;
  inset: 0;
  opacity: 1 !important;
  background:
    radial-gradient(circle at 50% 36%, rgba(100, 199, 170, 0.1), transparent 31%),
    linear-gradient(180deg, rgba(1, 7, 11, 0.08), rgba(1, 7, 11, 0.64)),
    url("assets/celestial-orbit-stage.svg") center / cover no-repeat !important;
  animation: celestialBackdropDrift 34s ease-in-out infinite alternate !important;
}

.celestial-orbit-ui .hidden {
  display: none !important;
}

@keyframes celestialBackdropDrift {
  from { transform: scale(1.02) translate3d(-0.25%, 0, 0); }
  to { transform: scale(1.055) translate3d(0.25%, -0.7%, 0); }
}

/* Resource crown */
.celestial-orbit-ui .topbar {
  position: fixed !important;
  inset: max(8px, env(safe-area-inset-top)) 0 auto !important;
  z-index: 920 !important;
  display: block !important;
  min-height: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  pointer-events: none;
}

.celestial-orbit-ui .topbar-left,
.celestial-orbit-ui .branding,
.celestial-orbit-ui .gear-menu-wrap,
.celestial-orbit-ui .legal-note {
  display: none !important;
}

.celestial-orbit-ui .resource-strip {
  position: relative;
  display: grid !important;
  grid-template-columns: repeat(9, minmax(0, 1fr)) !important;
  gap: 5px !important;
  width: min(1120px, calc(100vw - 28px)) !important;
  min-height: 62px !important;
  margin: 0 auto !important;
  padding: 7px 9px !important;
  overflow: visible !important;
  border: 1px solid rgba(216, 184, 100, 0.38) !important;
  border-radius: 23px !important;
  background:
    linear-gradient(180deg, rgba(10, 32, 39, 0.95), rgba(3, 14, 22, 0.95)),
    radial-gradient(circle at 50% -30%, rgba(121, 217, 192, 0.18), transparent 65%) !important;
  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.4),
    inset 0 1px rgba(255, 239, 178, 0.1),
    0 0 0 4px rgba(3, 14, 21, 0.46) !important;
  pointer-events: auto;
}

.celestial-orbit-ui .resource-strip::before,
.celestial-orbit-ui .resource-strip::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(216, 184, 100, 0.46);
  background: radial-gradient(circle, rgba(121, 217, 192, 0.32), rgba(4, 18, 25, 0.98) 66%);
  box-shadow: 0 0 18px rgba(121, 217, 192, 0.16);
  transform: translateY(-50%) rotate(45deg);
}

.celestial-orbit-ui .resource-strip::before { left: -14px; }
.celestial-orbit-ui .resource-strip::after { right: -14px; }

.celestial-orbit-ui .resource-chip {
  position: relative !important;
  display: grid !important;
  grid-template-columns: 28px minmax(0, 1fr) !important;
  grid-template-rows: auto auto !important;
  align-content: center !important;
  align-items: center !important;
  column-gap: 7px !important;
  min-width: 0 !important;
  min-height: 48px !important;
  padding: 5px 7px 5px 5px !important;
  overflow: hidden !important;
  border: 1px solid rgba(121, 217, 192, 0.17) !important;
  border-radius: 15px !important;
  background:
    linear-gradient(135deg, rgba(18, 56, 61, 0.62), rgba(4, 18, 29, 0.78)),
    radial-gradient(circle at 18% 20%, rgba(255, 232, 159, 0.09), transparent 46%) !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025) !important;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease !important;
}

.celestial-orbit-ui .resource-chip.hidden {
  display: none !important;
}

.celestial-orbit-ui .resource-chip::before {
  content: "" !important;
  position: relative !important;
  inset: auto !important;
  grid-column: 1 !important;
  grid-row: 1 / 3 !important;
  display: block !important;
  width: 26px !important;
  height: 26px !important;
  opacity: 0.95 !important;
  background: var(--resource-icon, url("assets/ui-thumbs/res-qi.png")) center / contain no-repeat !important;
  filter: drop-shadow(0 0 5px rgba(121, 217, 192, 0.28));
  transform: none !important;
}

.celestial-orbit-ui #chip-qi { --resource-icon: url("assets/ui-thumbs/res-qi.png"); }
.celestial-orbit-ui #chip-condensed-qi { --resource-icon: url("assets/ui-thumbs/res-condensed.png"); }
.celestial-orbit-ui #chip-true-qi { --resource-icon: url("assets/thunder-seal.svg"); }
.celestial-orbit-ui #chip-flow { --resource-icon: url("assets/ui-thumbs/res-flow.png"); }
.celestial-orbit-ui #chip-vitality { --resource-icon: url("assets/ui-thumbs/res-vitality.png"); }
.celestial-orbit-ui #chip-corruption { --resource-icon: url("assets/ui-thumbs/res-corruption.png"); }
.celestial-orbit-ui #chip-herbs { --resource-icon: url("assets/ui-thumbs/res-herbs.png"); }
.celestial-orbit-ui #chip-pills { --resource-icon: url("assets/ui-thumbs/res-pills.png"); }
.celestial-orbit-ui #chip-roots { --resource-icon: url("assets/ui-thumbs/res-roots.png"); }

.celestial-orbit-ui .resource-chip > span,
.celestial-orbit-ui .resource-chip > strong,
.celestial-orbit-ui .resource-chip > .vitality-mini-meter,
.celestial-orbit-ui .resource-chip > .chip-meter {
  grid-column: 2 !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

.celestial-orbit-ui .resource-chip > span {
  grid-row: 1 !important;
  overflow: hidden !important;
  color: rgba(194, 225, 217, 0.72) !important;
  font: 750 9px/1.05 var(--ui-font) !important;
  letter-spacing: 0.07em !important;
  text-overflow: ellipsis !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
}

.celestial-orbit-ui .resource-chip > strong {
  grid-row: 2 !important;
  overflow: hidden !important;
  color: #f7f2dc !important;
  font: 800 clamp(11px, 1.05vw, 14px)/1.12 var(--ui-font) !important;
  letter-spacing: 0 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.celestial-orbit-ui .resource-chip:hover,
.celestial-orbit-ui .resource-chip:focus-visible {
  z-index: 2;
  border-color: rgba(255, 225, 145, 0.58) !important;
  background: linear-gradient(135deg, rgba(29, 80, 74, 0.82), rgba(6, 26, 36, 0.92)) !important;
  box-shadow: 0 0 20px rgba(121, 217, 192, 0.12), inset 0 1px rgba(255, 239, 178, 0.08) !important;
  transform: translateY(-2px) !important;
}

/* Main celestial altar */
.celestial-orbit-ui .layout {
  position: relative !important;
  inset: auto !important;
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 100svh !important;
  max-width: none !important;
  max-height: none !important;
  padding: calc(var(--shell-top) + 10px) 0 36px !important;
  overflow-x: clip !important;
  overflow-y: visible !important;
}

.celestial-orbit-ui .hero-panel {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  width: 100% !important;
  min-height: calc(100svh - var(--shell-top)) !important;
  margin: 0 !important;
  padding: 0 10px 24px !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.celestial-orbit-ui .hero-panel::before,
.celestial-orbit-ui .hero-panel::after {
  content: none !important;
  display: none !important;
}

.celestial-orbit-ui .gong-focus {
  position: relative !important;
  isolation: isolate;
  display: block !important;
  width: min(980px, 100vw) !important;
  height: var(--orbit-stage-height) !important;
  min-height: var(--orbit-stage-height) !important;
  margin: 0 auto !important;
  overflow: visible !important;
  transition: height 0.2s ease, min-height 0.2s ease;
}

.celestial-orbit-ui .gong-focus.action-drawer-open {
  height: calc(var(--orbit-stage-height) + 215px) !important;
  min-height: calc(var(--orbit-stage-height) + 215px) !important;
}

.celestial-orbit-ui .gong-focus.action-drawer-open + .gong-hint {
  visibility: hidden;
  margin-bottom: 0 !important;
}

.celestial-orbit-ui .gong-focus:has(.dao-choice-panel:not(.hidden)) {
  height: calc(var(--orbit-stage-height) + 72px) !important;
  min-height: calc(var(--orbit-stage-height) + 72px) !important;
}

.celestial-stage-title {
  position: absolute;
  z-index: 3;
  top: 7px;
  left: 50%;
  display: grid;
  justify-items: center;
  color: var(--orbit-gold-bright);
  text-align: center;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.9);
  transform: translateX(-50%);
}

.celestial-stage-title span {
  color: rgba(173, 223, 209, 0.7);
  font: 750 9px/1 var(--ui-font);
  letter-spacing: 0.38em;
  text-transform: uppercase;
}

.celestial-stage-title strong {
  font: 600 clamp(18px, 2vw, 27px)/1.08 var(--display-font);
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.celestial-orbit-art {
  position: absolute;
  z-index: 0;
  top: 44px;
  left: 50%;
  width: 640px;
  height: 510px;
  pointer-events: none;
  transform: translateX(-50%);
}

.celestial-orbit-art::before,
.celestial-orbit-art::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.celestial-orbit-art::before {
  inset: 1px 66px;
  border: 1px solid rgba(216, 184, 100, 0.3);
  background:
    repeating-conic-gradient(from 4deg, rgba(255, 226, 143, 0.22) 0 1deg, transparent 1deg 15deg),
    radial-gradient(circle, transparent 60%, rgba(121, 217, 192, 0.035) 61% 68%, transparent 69%);
  box-shadow:
    inset 0 0 50px rgba(121, 217, 192, 0.045),
    0 0 45px rgba(121, 217, 192, 0.06);
  animation: celestialRingTurn 90s linear infinite;
}

.celestial-orbit-art::after {
  inset: 54px 122px;
  border: 1px dashed rgba(121, 217, 192, 0.24);
  box-shadow: 0 0 22px rgba(121, 217, 192, 0.06);
  animation: celestialRingTurn 48s linear infinite reverse;
}

.celestial-orbit-line {
  position: absolute;
  border: 1px solid rgba(121, 217, 192, 0.14);
  border-radius: 50%;
}

.orbit-line-one { inset: 27px 92px; transform: rotate(12deg); }
.orbit-line-two { inset: 84px 149px; border-style: dashed; transform: rotate(-17deg); }
.orbit-line-three { inset: 120px 186px; border-color: rgba(216, 184, 100, 0.19); }

.celestial-orbit-star {
  position: absolute;
  width: 8px;
  height: 8px;
  border: 1px solid rgba(255, 228, 150, 0.72);
  background: #0d3a3a;
  box-shadow: 0 0 14px rgba(121, 217, 192, 0.55);
  transform: rotate(45deg);
  animation: celestialStarPulse 3.8s ease-in-out infinite;
}

.orbit-star-one { top: 93px; left: 84px; }
.orbit-star-two { top: 77px; right: 98px; animation-delay: -1.2s; }
.orbit-star-three { bottom: 80px; left: 122px; animation-delay: -2.2s; }
.orbit-star-four { right: 132px; bottom: 67px; animation-delay: -0.6s; }

@keyframes celestialRingTurn { to { transform: rotate(360deg); } }
@keyframes celestialStarPulse {
  0%, 100% { opacity: 0.45; filter: brightness(0.9); }
  50% { opacity: 1; filter: brightness(1.4); }
}

.celestial-orbit-ui .gong-focus > #gather-btn,
.celestial-orbit-ui .gong-button {
  position: absolute !important;
  z-index: 12 !important;
  top: 70px !important;
  left: 50% !important;
  display: flex !important;
  width: var(--orbit-gong-size) !important;
  height: var(--orbit-gong-size) !important;
  min-width: var(--orbit-gong-size) !important;
  min-height: var(--orbit-gong-size) !important;
  margin: 0 !important;
  border: 4px solid rgba(255, 226, 144, 0.9) !important;
  background:
    radial-gradient(circle at 39% 34%, rgba(255, 246, 192, 0.98), transparent 14%),
    radial-gradient(circle at 50% 47%, #e9c66c 0 38%, #ae7d31 66%, #51311b 100%) !important;
  box-shadow:
    inset 0 0 0 7px rgba(85, 48, 21, 0.44),
    inset 0 0 0 11px rgba(255, 230, 158, 0.2),
    inset 0 0 42px rgba(255, 246, 194, 0.48),
    inset 0 -38px 55px rgba(69, 34, 16, 0.5),
    0 0 0 2px rgba(24, 65, 61, 0.82),
    0 0 42px rgba(230, 191, 91, 0.37),
    0 0 110px var(--realm-glow-soft),
    0 28px 65px rgba(0, 0, 0, 0.54) !important;
  transform: translateX(-50%) translateZ(0) !important;
}

.celestial-orbit-ui .gong-button:hover {
  border-color: #fff0b0 !important;
  filter: brightness(1.035) saturate(1.04);
  transform: translateX(-50%) translateY(-2px) scale(1.008) !important;
}

.celestial-orbit-ui .gong-button:active,
.celestial-orbit-ui .gong-button.is-pressing {
  transform: translateX(-50%) scale(0.976) !important;
  transition-duration: 0.045s !important;
}

.celestial-orbit-ui .gong-button::before {
  opacity: 0.6;
  background-size: 72% !important;
  mix-blend-mode: soft-light;
}

.celestial-orbit-ui .gong-halo::before { inset: -28px !important; }
.celestial-orbit-ui .gong-halo::after { inset: -51px !important; opacity: 0.52; }

.celestial-orbit-ui .gong-state-ring {
  inset: -22px !important;
  border-width: 3px !important;
}

.celestial-orbit-ui .gong-center {
  width: clamp(52px, 16%, 70px) !important;
  height: clamp(52px, 16%, 70px) !important;
  border-width: 3px !important;
  box-shadow:
    inset 0 0 11px rgba(255, 213, 143, 0.48),
    0 0 0 7px rgba(94, 52, 24, 0.22),
    0 0 22px rgba(255, 225, 149, 0.25) !important;
}

.celestial-orbit-ui .gong-dao-symbol {
  width: 100% !important;
  height: 100% !important;
  border-radius: 50%;
  object-fit: cover;
}

.celestial-orbit-ui .gong-resonance-readout {
  right: 5% !important;
  bottom: 18% !important;
}

/* Orbit navigation */
.celestial-orbit-ui .fab-rail,
.celestial-orbit-ui body:not(.ui-mode-condense) .fab-rail {
  position: absolute !important;
  inset: 0 !important;
  z-index: 24 !important;
  display: block !important;
  visibility: visible !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  opacity: 1 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  transform: none !important;
  pointer-events: none !important;
}

.celestial-orbit-ui .fab-btn,
.celestial-orbit-ui body:not(.ui-mode-condense) #fab-stats-btn,
.celestial-orbit-ui body:not(.ui-mode-condense) #fab-systems-btn,
.celestial-orbit-ui body:not(.ui-mode-condense) #fab-guide-btn,
.celestial-orbit-ui body:not(.ui-mode-condense) #fab-settings-btn {
  position: absolute !important;
  display: grid !important;
  place-items: center !important;
  visibility: visible !important;
  width: 132px !important;
  min-width: 132px !important;
  height: 48px !important;
  min-height: 48px !important;
  padding: 0 16px !important;
  overflow: hidden !important;
  border: 1px solid rgba(216, 184, 100, 0.48) !important;
  border-radius: 14px !important;
  color: rgba(238, 243, 225, 0.9) !important;
  font: 800 12px/1 var(--ui-font) !important;
  letter-spacing: 0.08em !important;
  text-align: center;
  text-transform: uppercase !important;
  opacity: 1 !important;
  background: linear-gradient(180deg, rgba(13, 55, 57, 0.98), rgba(5, 27, 36, 0.98)) !important;
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.34),
    inset 0 1px rgba(255, 244, 205, 0.08) !important;
  transform: none !important;
  pointer-events: auto !important;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease, color 140ms ease !important;
}

.celestial-orbit-ui .fab-btn::before,
.celestial-orbit-ui .fab-btn::after {
  content: none !important;
  display: none !important;
  background: none !important;
}

.celestial-orbit-ui #fab-stats-btn {
  top: 170px !important;
  left: calc(50% - 354px) !important;
}

.celestial-orbit-ui #fab-systems-btn {
  top: 170px !important;
  right: calc(50% - 354px) !important;
  left: auto !important;
  transform: none !important;
}

.celestial-orbit-ui #fab-guide-btn {
  top: 350px !important;
  left: calc(50% - 354px) !important;
  transform: none !important;
}

.celestial-orbit-ui #fab-settings-btn {
  top: 350px !important;
  right: calc(50% - 354px) !important;
  left: auto !important;
  transform: none !important;
}

.celestial-orbit-ui .fab-btn:hover,
.celestial-orbit-ui .fab-btn:focus-visible,
.celestial-orbit-ui .fab-btn.fab-active,
.celestial-orbit-ui .fab-btn[aria-expanded="true"] {
  z-index: 3;
  color: #fff0b5 !important;
  border-color: rgba(255, 228, 148, 0.86) !important;
  background: linear-gradient(180deg, rgba(24, 78, 70, 0.99), rgba(6, 34, 42, 0.99)) !important;
  box-shadow:
    0 9px 24px rgba(0, 0, 0, 0.38),
    0 0 0 2px rgba(121, 217, 192, 0.12),
    inset 0 0 0 1px rgba(255, 232, 161, 0.18) !important;
  transform: none !important;
}

.celestial-orbit-ui .fab-btn:active {
  background: linear-gradient(180deg, rgba(17, 63, 61, 0.99), rgba(5, 28, 36, 0.99)) !important;
  box-shadow:
    0 5px 14px rgba(0, 0, 0, 0.34),
    inset 0 0 0 2px rgba(255, 225, 145, 0.22) !important;
  transform: none !important;
}

.celestial-orbit-ui #fab-objective-btn,
.celestial-orbit-ui #fab-milestone-btn,
.celestial-orbit-ui #fab-events-btn,
.celestial-orbit-ui #fab-close-btn {
  display: none !important;
}

.celestial-orbit-ui .gong-focus .notification-center-btn,
.celestial-orbit-ui .gong-focus .mentor-orb-btn {
  position: absolute !important;
  z-index: 28 !important;
  top: 88px !important;
  display: grid !important;
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  padding: 0 !important;
  border: 1px solid rgba(216, 184, 100, 0.64) !important;
  border-radius: 50% !important;
  background:
    radial-gradient(circle at 40% 32%, rgba(255, 231, 155, 0.24), transparent 36%),
    linear-gradient(145deg, rgba(20, 69, 66, 0.98), rgba(3, 19, 29, 0.98)) !important;
  box-shadow: 0 0 0 4px rgba(2, 13, 20, 0.6), 0 0 20px rgba(121, 217, 192, 0.16) !important;
}

.celestial-orbit-ui .gong-focus .mentor-orb-btn {
  left: calc(50% - 270px) !important;
  right: auto !important;
}

.celestial-orbit-ui .gong-focus .notification-center-btn {
  right: calc(50% - 270px) !important;
  left: auto !important;
}

.celestial-orbit-ui .gong-spirit-icon {
  width: 26px !important;
  height: 26px !important;
}

/* Contextual action seal */
.celestial-orbit-ui .gong-focus .core-actions {
  position: absolute !important;
  z-index: 34 !important;
  top: 466px !important;
  left: 50% !important;
  display: block !important;
  width: 470px !important;
  min-height: 66px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: translateX(-50%) !important;
}

.celestial-orbit-ui .gong-focus .core-actions.hidden {
  display: none !important;
}

.celestial-orbit-ui .action-primary-slot {
  width: 286px !important;
  min-height: 66px !important;
  margin: 0 auto !important;
}

.celestial-orbit-ui .action-primary-slot > button {
  position: relative !important;
  display: flex !important;
  width: 100% !important;
  min-height: 66px !important;
  padding: 10px 18px !important;
  border: 1px solid rgba(255, 226, 145, 0.75) !important;
  border-radius: 19px 5px 19px 5px !important;
  color: #fff0b4 !important;
  font: 850 14px/1.1 var(--ui-font) !important;
  letter-spacing: 0.025em !important;
  background:
    linear-gradient(145deg, rgba(44, 96, 79, 0.98), rgba(8, 35, 42, 0.98)),
    radial-gradient(circle at 50% -20%, rgba(255, 229, 151, 0.28), transparent 60%) !important;
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.46),
    0 0 24px rgba(121, 217, 192, 0.18),
    inset 0 1px rgba(255, 244, 198, 0.14) !important;
}

.celestial-orbit-ui .action-primary-slot > button::before,
.celestial-orbit-ui .action-primary-slot > button::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 13px;
  height: 13px;
  border: 1px solid rgba(255, 228, 151, 0.72);
  background: #175d54;
  transform: translateY(-50%) rotate(45deg);
}

.celestial-orbit-ui .action-primary-slot > button::before { left: -8px; }
.celestial-orbit-ui .action-primary-slot > button::after { right: -8px; }

.celestial-orbit-ui .core-actions .action-caption {
  color: rgba(202, 229, 216, 0.76) !important;
  font: 700 10px/1.2 var(--ui-font) !important;
  letter-spacing: 0.02em;
}

.celestial-orbit-ui .action-more-btn {
  position: absolute !important;
  top: 8px !important;
  right: 28px !important;
  display: grid !important;
  width: 52px !important;
  min-width: 52px !important;
  height: 52px !important;
  min-height: 52px !important;
  border: 1px solid rgba(216, 184, 100, 0.56) !important;
  border-radius: 50% !important;
  color: var(--orbit-gold-bright) !important;
  background: radial-gradient(circle, #164a47, #061c27 70%) !important;
  box-shadow: 0 0 0 4px rgba(2, 14, 20, 0.55), 0 10px 24px rgba(0, 0, 0, 0.42) !important;
}

.celestial-orbit-ui .action-secondary-drawer {
  position: absolute !important;
  z-index: 45 !important;
  top: 78px !important;
  left: 50% !important;
  width: 470px !important;
  margin: 0 !important;
  padding: 12px !important;
  border: 1px solid rgba(216, 184, 100, 0.42) !important;
  border-radius: 20px 6px 20px 6px !important;
  background:
    linear-gradient(155deg, rgba(9, 37, 41, 0.985), rgba(3, 15, 24, 0.99)),
    radial-gradient(circle at 50% 0%, rgba(121, 217, 192, 0.14), transparent 55%) !important;
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.58), inset 0 1px rgba(255, 238, 177, 0.08) !important;
  transform: translateX(-50%) !important;
}

.celestial-orbit-ui .action-secondary-drawer > header {
  border-color: rgba(216, 184, 100, 0.2) !important;
}

.celestial-orbit-ui .action-secondary-list {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 7px !important;
}

.celestial-orbit-ui .action-secondary-list > button {
  min-height: 58px !important;
  border-color: rgba(121, 217, 192, 0.22) !important;
  border-radius: 13px !important;
  color: #e8f1df !important;
  background: linear-gradient(145deg, rgba(22, 64, 64, 0.88), rgba(5, 24, 34, 0.96)) !important;
}

/* Compact objective scroll */
.celestial-orbit-ui .gong-hint {
  position: relative;
  z-index: 42;
  width: max-content;
  max-width: calc(100vw - 32px);
  margin: -66px auto 48px !important;
  padding: 5px 13px !important;
  border: 1px solid rgba(216, 184, 100, 0.26) !important;
  border-radius: 999px !important;
  color: rgba(244, 232, 190, 0.75) !important;
  background: rgba(3, 15, 22, 0.76) !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.34) !important;
  font-size: 11px !important;
}

.celestial-orbit-ui .next-action-card {
  position: relative !important;
  z-index: 20;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  grid-template-areas:
    "kicker action"
    "title action"
    "desc action"
    "meter meter"
    "reason reason" !important;
  gap: 3px 18px !important;
  width: min(690px, calc(100vw - 24px)) !important;
  min-height: 112px !important;
  margin: -2px auto 22px !important;
  padding: 14px 17px 13px !important;
  overflow: hidden !important;
  border: 1px solid rgba(216, 184, 100, 0.4) !important;
  border-radius: 5px 24px 5px 24px !important;
  background:
    linear-gradient(105deg, rgba(14, 55, 53, 0.95), rgba(4, 20, 29, 0.97) 64%),
    radial-gradient(circle at 0 0, rgba(255, 230, 157, 0.15), transparent 42%) !important;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.42), inset 0 1px rgba(255, 243, 194, 0.08) !important;
}

.celestial-orbit-ui .next-action-card::before {
  content: "" !important;
  position: absolute !important;
  inset: 7px !important;
  border: 1px solid rgba(216, 184, 100, 0.12) !important;
  border-radius: 2px 18px 2px 18px !important;
  background: none !important;
  pointer-events: none;
}

.celestial-orbit-ui .next-action-kicker { grid-area: kicker; }
.celestial-orbit-ui .next-action-card > strong { grid-area: title; }
.celestial-orbit-ui .next-action-card > p { grid-area: desc; }
.celestial-orbit-ui .next-action-card > .next-action-btn { grid-area: action; }
.celestial-orbit-ui .next-action-card > .next-action-meter { grid-area: meter; }
.celestial-orbit-ui .next-action-card > #next-action-reason { grid-area: reason; }

.celestial-orbit-ui .next-action-card .mentor-note-card,
.celestial-orbit-ui .next-action-card .realm-chapter-card,
.celestial-orbit-ui .next-action-card .journey-checklist-btn,
.celestial-orbit-ui .next-action-card .cultivation-flow {
  display: none !important;
}

.celestial-orbit-ui .next-action-kicker {
  color: var(--orbit-jade) !important;
  font: 800 9px/1.1 var(--ui-font) !important;
  letter-spacing: 0.18em !important;
}

.celestial-orbit-ui .next-action-card > strong {
  color: var(--orbit-gold-bright) !important;
  font: 600 clamp(18px, 2vw, 23px)/1.1 var(--display-font) !important;
}

.celestial-orbit-ui .next-action-card > p {
  margin: 1px 0 3px !important;
  color: rgba(224, 235, 222, 0.8) !important;
  font: 600 12px/1.35 var(--ui-font) !important;
}

.celestial-orbit-ui .next-action-card > small {
  color: rgba(166, 201, 193, 0.72) !important;
  font: 650 10px/1.3 var(--ui-font) !important;
}

.celestial-orbit-ui .next-action-btn {
  align-self: center !important;
  min-width: 132px !important;
  min-height: 48px !important;
  border-color: rgba(255, 226, 145, 0.54) !important;
  color: #fff0bb !important;
  background: linear-gradient(145deg, rgba(37, 89, 74, 0.92), rgba(7, 31, 39, 0.96)) !important;
}

.celestial-orbit-ui .next-action-meter {
  height: 8px !important;
  min-height: 8px !important;
  margin-top: 4px;
  border: 0 !important;
  background: rgba(1, 8, 12, 0.72) !important;
}

.celestial-orbit-ui .next-action-meter > div {
  min-height: 8px !important;
  background: linear-gradient(90deg, #2e9987, #e6c86e) !important;
  box-shadow: 0 0 10px rgba(121, 217, 192, 0.38);
}

.celestial-orbit-ui #next-action-percent {
  top: -14px !important;
  right: 0 !important;
  color: var(--orbit-gold-bright) !important;
}

/* Dao choice becomes a constellation, not another button list. */
.celestial-orbit-ui .dao-choice-panel {
  position: absolute !important;
  z-index: 52 !important;
  top: 422px !important;
  left: 50% !important;
  width: min(600px, calc(100vw - 20px)) !important;
  margin: 0 !important;
  padding: 13px !important;
  border: 1px solid rgba(216, 184, 100, 0.46) !important;
  border-radius: 24px 6px 24px 6px !important;
  background: linear-gradient(155deg, rgba(8, 35, 39, 0.98), rgba(3, 15, 24, 0.99)) !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), inset 0 1px rgba(255, 238, 178, 0.1) !important;
  transform: translateX(-50%) !important;
}

.celestial-orbit-ui .dao-seal-choice {
  min-height: 116px !important;
  border-radius: 50% 50% 18px 18px !important;
  background: radial-gradient(circle at 50% 25%, rgba(45, 104, 89, 0.8), rgba(4, 20, 29, 0.96) 68%) !important;
}

.celestial-orbit-ui .dao-seal-choice img {
  width: 58px !important;
  height: 58px !important;
}

/* Menus are focused temple screens. */
.celestial-orbit-ui .menu-backdrop,
.celestial-orbit-ui .mobile-drawer-backdrop {
  position: fixed !important;
  inset: 0 !important;
  z-index: 1190 !important;
  background:
    radial-gradient(circle at 50% 25%, rgba(47, 111, 96, 0.16), transparent 40%),
    rgba(1, 7, 11, 0.88) !important;
  backdrop-filter: blur(12px) saturate(0.8) !important;
}

.celestial-orbit-ui .menu-sheet,
.celestial-orbit-ui .mobile-drawer-panel,
.celestial-orbit-ui #systems-panel.menu-sheet {
  position: fixed !important;
  z-index: 1220 !important;
  top: 18px !important;
  right: auto !important;
  bottom: 18px !important;
  left: 50% !important;
  display: block;
  width: min(1120px, calc(100vw - 36px)) !important;
  max-width: 1120px !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 22px 24px !important;
  overflow-x: clip !important;
  overflow-y: auto !important;
  border: 1px solid rgba(216, 184, 100, 0.48) !important;
  border-radius: 28px 8px 28px 8px !important;
  color: var(--orbit-ivory) !important;
  background:
    linear-gradient(155deg, rgba(8, 34, 39, 0.985), rgba(3, 14, 23, 0.995) 68%),
    url("assets/celestial-orbit-stage.svg") center / cover no-repeat !important;
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.7), inset 0 1px rgba(255, 239, 181, 0.1) !important;
  transform: translateX(-50%) !important;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}

.celestial-orbit-ui .menu-sheet.hidden,
.celestial-orbit-ui .mobile-drawer-panel.hidden {
  display: none !important;
}

.celestial-orbit-ui .menu-sheet::before {
  content: "" !important;
  position: fixed !important;
  top: 18px !important;
  left: 50% !important;
  z-index: -1 !important;
  width: min(1120px, calc(100vw - 36px)) !important;
  height: 6px !important;
  border-radius: 999px !important;
  background: linear-gradient(90deg, transparent, var(--orbit-gold), var(--orbit-jade), var(--orbit-gold), transparent) !important;
  opacity: 0.72 !important;
  transform: translateX(-50%) !important;
}

.celestial-orbit-ui .menu-sheet-header,
.celestial-orbit-ui #systems-panel .menu-sheet-header {
  position: sticky !important;
  z-index: 110 !important;
  top: 0 !important;
  display: flex !important;
  min-height: 76px !important;
  margin: 0 -22px 18px !important;
  padding: 15px 18px 12px 22px !important;
  border-bottom: 1px solid rgba(216, 184, 100, 0.24) !important;
  border-radius: 27px 7px 0 0 !important;
  background: linear-gradient(180deg, rgba(4, 20, 28, 0.99), rgba(4, 20, 28, 0.94)) !important;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.28) !important;
  backdrop-filter: blur(18px) !important;
}

.celestial-orbit-ui .menu-sheet-header h2,
.celestial-orbit-ui .menu-sheet > h2 {
  margin: 0 !important;
  color: var(--orbit-gold-bright) !important;
  font: 600 clamp(24px, 3vw, 36px)/1.05 var(--display-font) !important;
  letter-spacing: 0.025em;
}

.celestial-orbit-ui .menu-close,
.celestial-orbit-ui .menu-sheet-header .menu-close {
  position: static !important;
  display: grid !important;
  place-items: center !important;
  min-width: 84px !important;
  min-height: 42px !important;
  padding: 8px 15px !important;
  border: 1px solid rgba(216, 184, 100, 0.45) !important;
  border-radius: 12px 3px 12px 3px !important;
  color: var(--orbit-gold-bright) !important;
  background: rgba(10, 43, 44, 0.88) !important;
}

.celestial-orbit-ui #systems-panel .systems-hub {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 12px !important;
  margin: 0 !important;
  padding: 2px 0 18px !important;
  border: 0 !important;
  background: transparent !important;
}

.celestial-orbit-ui #systems-panel .systems-hub.hidden {
  display: none !important;
}

.celestial-orbit-ui #systems-panel .systems-hub .systems-tab,
.celestial-orbit-ui #systems-panel .realm-section-grid button {
  position: relative !important;
  display: grid !important;
  align-content: end !important;
  gap: 5px !important;
  min-height: 126px !important;
  padding: 18px !important;
  overflow: hidden !important;
  border: 1px solid rgba(216, 184, 100, 0.27) !important;
  border-radius: 22px 5px 22px 5px !important;
  color: var(--orbit-ivory) !important;
  text-align: left !important;
  background:
    radial-gradient(circle at 82% 12%, rgba(121, 217, 192, 0.2), transparent 28%),
    linear-gradient(145deg, rgba(19, 66, 64, 0.86), rgba(4, 20, 30, 0.96)) !important;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.26), inset 0 1px rgba(255, 241, 187, 0.05) !important;
}

.celestial-orbit-ui #systems-panel .systems-hub .systems-tab::before,
.celestial-orbit-ui #systems-panel .realm-section-grid button::before {
  content: "" !important;
  position: absolute !important;
  top: 14px !important;
  right: 16px !important;
  left: auto !important;
  width: 34px !important;
  height: 34px !important;
  border: 1px solid rgba(255, 225, 144, 0.4) !important;
  border-radius: 50% !important;
  background: radial-gradient(circle, rgba(121, 217, 192, 0.36), rgba(4, 22, 29, 0.72) 66%) !important;
  box-shadow: 0 0 18px rgba(121, 217, 192, 0.15) !important;
}

.celestial-orbit-ui #systems-panel .systems-hub .systems-tab > strong,
.celestial-orbit-ui #systems-panel .realm-section-grid button > strong {
  display: block !important;
  overflow: visible !important;
  color: var(--orbit-gold-bright) !important;
  font: 600 20px/1.12 var(--display-font) !important;
  text-overflow: clip !important;
  white-space: normal !important;
}

.celestial-orbit-ui #systems-panel .systems-hub .systems-tab > small,
.celestial-orbit-ui #systems-panel .realm-section-grid button > small {
  display: -webkit-box !important;
  overflow: hidden !important;
  color: rgba(207, 227, 216, 0.73) !important;
  font: 650 12px/1.4 var(--ui-font) !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 3 !important;
  line-clamp: 3 !important;
}

.celestial-orbit-ui #systems-panel #systems-tab-lab {
  display: none !important;
}

.celestial-orbit-ui #systems-panel .systems-hub .systems-tab:hover:not(:disabled),
.celestial-orbit-ui #systems-panel .systems-hub .systems-tab:focus-visible,
.celestial-orbit-ui #systems-panel .systems-hub .systems-tab.recommended {
  border-color: rgba(255, 227, 150, 0.74) !important;
  background:
    radial-gradient(circle at 82% 12%, rgba(255, 225, 143, 0.22), transparent 31%),
    linear-gradient(145deg, rgba(27, 82, 73, 0.94), rgba(5, 28, 36, 0.98)) !important;
  transform: translateY(-2px);
}

.celestial-orbit-ui #systems-panel .systems-detail-bar,
.celestial-orbit-ui #systems-panel .realm-detail-bar,
.celestial-orbit-ui #guide-panel .guide-toc {
  position: sticky !important;
  z-index: 90 !important;
  top: 76px !important;
  border: 1px solid rgba(216, 184, 100, 0.24) !important;
  border-radius: 16px 4px 16px 4px !important;
  background: rgba(4, 21, 29, 0.97) !important;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.3) !important;
  backdrop-filter: blur(16px) !important;
}

.celestial-orbit-ui #guide-panel .guide-toc {
  display: flex !important;
  gap: 6px !important;
  padding: 7px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
}

.celestial-orbit-ui #guide-panel .guide-tab,
.celestial-orbit-ui #systems-panel .systems-detail-bar button,
.celestial-orbit-ui #systems-panel .realm-detail-bar button {
  flex: 0 0 auto !important;
  min-height: 42px !important;
  border-radius: 11px 3px 11px 3px !important;
  white-space: nowrap !important;
}

.celestial-orbit-ui .sub-panel,
.celestial-orbit-ui .event-card,
.celestial-orbit-ui .objective-card,
.celestial-orbit-ui .quest-box,
.celestial-orbit-ui .mission-box {
  border-color: rgba(216, 184, 100, 0.23) !important;
  border-radius: 18px 5px 18px 5px !important;
  background: linear-gradient(145deg, rgba(13, 48, 49, 0.76), rgba(4, 18, 27, 0.88)) !important;
  box-shadow: inset 0 1px rgba(255, 241, 185, 0.04), 0 12px 28px rgba(0, 0, 0, 0.22) !important;
}

.celestial-orbit-ui .stats-grid > div,
.celestial-orbit-ui .guide-grid > div,
.celestial-orbit-ui .info-modal-details > div {
  border-color: rgba(121, 217, 192, 0.17) !important;
  border-radius: 13px 3px 13px 3px !important;
  background: rgba(6, 28, 34, 0.72) !important;
}

body.celestial-orbit-ui.ui-menu-open .gong-focus,
body.celestial-orbit-ui.ui-menu-open .next-action-card,
body.celestial-orbit-ui.ui-menu-open .topbar {
  filter: blur(4px) brightness(0.45);
  pointer-events: none !important;
}

/* Focused game states remain dedicated screens. */
.celestial-orbit-ui .guardian-arena,
.celestial-orbit-ui .combat-screen,
.celestial-orbit-ui .breakthrough-screen,
.celestial-orbit-ui .element-trial-card:not(.hidden) {
  z-index: 1600 !important;
}

.celestial-orbit-ui .info-modal-backdrop,
.celestial-orbit-ui .tutorial-modal-backdrop,
.celestial-orbit-ui .knowledge-modal-backdrop,
.celestial-orbit-ui .realm-trial-modal-backdrop,
.celestial-orbit-ui .modal-backdrop {
  background: rgba(1, 8, 12, 0.9) !important;
  backdrop-filter: blur(12px) !important;
}

.celestial-orbit-ui .info-modal-card,
.celestial-orbit-ui .tutorial-modal-card,
.celestial-orbit-ui .knowledge-modal-card,
.celestial-orbit-ui .realm-trial-modal-card,
.celestial-orbit-ui .modal-card {
  border-color: rgba(216, 184, 100, 0.52) !important;
  border-radius: 24px 6px 24px 6px !important;
  background:
    linear-gradient(150deg, rgba(11, 46, 46, 0.98), rgba(3, 15, 24, 0.995)),
    url("assets/celestial-orbit-stage.svg") center / cover no-repeat !important;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.66), inset 0 1px rgba(255, 239, 181, 0.1) !important;
}

/* Tablet */
@media (max-width: 900px) {
  :root {
    --shell-top: 108px;
    --orbit-gong-size: clamp(278px, 55vw, 350px);
    --orbit-stage-height: 510px;
  }

  html,
  body.celestial-orbit-ui {
    height: 100%;
    overflow: hidden !important;
  }

  .celestial-orbit-ui .layout {
    position: absolute !important;
    inset: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    padding: calc(var(--shell-top) + 8px) 0 24px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
  }

  .celestial-orbit-ui .resource-strip {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 4px !important;
    width: calc(100vw - 16px) !important;
    min-height: 94px !important;
    padding: 6px !important;
    border-radius: 19px !important;
  }

  .celestial-orbit-ui .resource-chip {
    grid-template-columns: 23px minmax(0, 1fr) !important;
    column-gap: 4px !important;
    min-height: 39px !important;
    padding: 3px 4px !important;
    border-radius: 11px !important;
  }

  .celestial-orbit-ui .resource-chip::before {
    width: 21px !important;
    height: 21px !important;
  }

  .celestial-orbit-ui .resource-chip > span {
    font-size: clamp(7px, 1.65vw, 9px) !important;
    letter-spacing: 0.03em !important;
  }

  .celestial-orbit-ui .resource-chip > strong {
    font-size: clamp(9px, 2.35vw, 12px) !important;
  }

  .celestial-orbit-ui #systems-panel .systems-hub {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .celestial-orbit-ui .menu-sheet,
  .celestial-orbit-ui .mobile-drawer-panel,
  .celestial-orbit-ui #systems-panel.menu-sheet {
    top: 7px !important;
    bottom: 7px !important;
    width: calc(100vw - 14px) !important;
    padding-inline: 14px !important;
    border-radius: 22px 5px 22px 5px !important;
  }

  .celestial-orbit-ui .menu-sheet-header,
  .celestial-orbit-ui #systems-panel .menu-sheet-header {
    margin-inline: -14px !important;
  }

  .celestial-orbit-ui .menu-sheet::before {
    top: 7px !important;
    width: calc(100vw - 14px) !important;
  }
}

/* One-hand portrait */
@media (max-width: 560px) {
  :root {
    --shell-top: 108px;
    --orbit-gong-size: min(292px, 75vw);
    --orbit-stage-height: 450px;
  }

  .celestial-orbit-ui .hero-panel {
    padding-inline: 4px !important;
  }

  .celestial-stage-title {
    top: 0;
  }

  .celestial-stage-title span { font-size: 7px; }
  .celestial-stage-title strong { font-size: 17px; }

  .celestial-orbit-art {
    top: 30px;
    width: 390px;
    height: 380px;
  }

  .celestial-orbit-art::before { inset: 1px 18px; }
  .celestial-orbit-art::after { inset: 44px 59px; }
  .orbit-line-one { inset: 22px 34px; }
  .orbit-line-two { inset: 66px 78px; }
  .orbit-line-three { inset: 94px 108px; }
  .orbit-star-one { top: 76px; left: 28px; }
  .orbit-star-two { top: 68px; right: 31px; }
  .orbit-star-three { bottom: 58px; left: 48px; }
  .orbit-star-four { bottom: 52px; right: 50px; }

  .celestial-orbit-ui .gong-focus > #gather-btn,
  .celestial-orbit-ui .gong-button {
    top: 50px !important;
  }

  .celestial-orbit-ui .gong-halo::before { inset: -18px !important; }
  .celestial-orbit-ui .gong-halo::after { inset: -31px !important; }
  .celestial-orbit-ui .gong-state-ring { inset: -15px !important; }

  .celestial-orbit-ui .fab-btn,
  .celestial-orbit-ui body:not(.ui-mode-condense) #fab-stats-btn,
  .celestial-orbit-ui body:not(.ui-mode-condense) #fab-systems-btn,
  .celestial-orbit-ui body:not(.ui-mode-condense) #fab-guide-btn,
  .celestial-orbit-ui body:not(.ui-mode-condense) #fab-settings-btn {
    box-sizing: border-box !important;
    width: 84px !important;
    min-width: 84px !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 5px !important;
    border-radius: 14px !important;
    font-size: clamp(8px, 2.35vw, 10px) !important;
    letter-spacing: 0.025em !important;
  }

  .celestial-orbit-ui .fab-btn::before,
  .celestial-orbit-ui .fab-btn::after {
    content: none !important;
    display: none !important;
  }

  .celestial-orbit-ui #fab-stats-btn {
    top: 132px !important;
    left: 1px !important;
  }

  .celestial-orbit-ui #fab-systems-btn {
    top: 132px !important;
    right: 1px !important;
  }

  .celestial-orbit-ui #fab-guide-btn {
    top: 274px !important;
    left: 1px !important;
  }

  .celestial-orbit-ui #fab-settings-btn {
    top: 274px !important;
    right: 1px !important;
  }

  .celestial-orbit-ui .gong-focus .notification-center-btn,
  .celestial-orbit-ui .gong-focus .mentor-orb-btn {
    top: 55px !important;
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
  }

  .celestial-orbit-ui .gong-focus .mentor-orb-btn {
    left: calc(50% - 170px) !important;
  }

  .celestial-orbit-ui .gong-focus .notification-center-btn {
    right: calc(50% - 170px) !important;
  }

  .celestial-orbit-ui .gong-spirit-icon {
    width: 22px !important;
    height: 22px !important;
  }

  .celestial-orbit-ui .gong-focus .core-actions {
    top: 335px !important;
    width: calc(100vw - 16px) !important;
  }

  .celestial-orbit-ui .action-primary-slot {
    width: min(226px, 61vw) !important;
  }

  .celestial-orbit-ui .action-primary-slot > button {
    min-height: 62px !important;
    padding-inline: 11px !important;
    font-size: 12px !important;
  }

  .celestial-orbit-ui .action-more-btn {
    right: 11px !important;
    width: 48px !important;
    min-width: 48px !important;
    height: 48px !important;
    min-height: 48px !important;
  }

  .celestial-orbit-ui .action-secondary-drawer {
    top: 70px !important;
    width: calc(100vw - 18px) !important;
    max-height: 248px;
    overflow-y: auto !important;
  }

  .celestial-orbit-ui .gong-hint {
    margin: -50px auto 39px !important;
    font-size: 9px !important;
  }

  .celestial-orbit-ui .next-action-card {
    grid-template-columns: minmax(0, 1fr) 105px !important;
    gap: 3px 10px !important;
    width: calc(100vw - 14px) !important;
    min-height: 106px !important;
    margin: 0 auto 14px !important;
    padding: 12px 13px 11px !important;
    border-radius: 4px 18px 4px 18px !important;
  }

  .celestial-orbit-ui .next-action-card > strong {
    font-size: 17px !important;
  }

  .celestial-orbit-ui .next-action-card > p {
    display: -webkit-box;
    overflow: hidden;
    font-size: 10px !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  .celestial-orbit-ui .next-action-btn {
    min-width: 0 !important;
    width: 105px !important;
    min-height: 44px !important;
    padding-inline: 7px !important;
    font-size: 10px !important;
  }

  .celestial-orbit-ui .dao-choice-panel {
    top: 326px !important;
    width: calc(100vw - 12px) !important;
    padding: 9px 7px !important;
  }

  .celestial-orbit-ui .dao-choice-panel > header p {
    display: none;
  }

  .celestial-orbit-ui .dao-seal-choice {
    min-height: 104px !important;
    padding-inline: 3px !important;
  }

  .celestial-orbit-ui .dao-seal-choice img {
    width: 48px !important;
    height: 48px !important;
  }

  .celestial-orbit-ui .menu-sheet,
  .celestial-orbit-ui .mobile-drawer-panel,
  .celestial-orbit-ui #systems-panel.menu-sheet {
    inset: 0 !important;
    width: 100vw !important;
    max-width: none !important;
    padding: 0 10px calc(16px + env(safe-area-inset-bottom)) !important;
    border: 0 !important;
    border-radius: 0 !important;
    transform: none !important;
  }

  .celestial-orbit-ui .menu-sheet::before {
    top: 0 !important;
    width: 100vw !important;
  }

  .celestial-orbit-ui .menu-sheet-header,
  .celestial-orbit-ui #systems-panel .menu-sheet-header {
    min-height: 68px !important;
    margin: 0 -10px 12px !important;
    padding: max(10px, env(safe-area-inset-top)) 10px 9px 14px !important;
    border-radius: 0 !important;
  }

  .celestial-orbit-ui .menu-sheet-header h2 {
    font-size: 24px !important;
  }

  .celestial-orbit-ui .menu-close,
  .celestial-orbit-ui .menu-sheet-header .menu-close {
    min-width: 68px !important;
    min-height: 40px !important;
    padding-inline: 10px !important;
  }

  .celestial-orbit-ui #systems-panel .systems-hub {
    gap: 8px !important;
  }

  .celestial-orbit-ui #systems-panel .systems-hub .systems-tab,
  .celestial-orbit-ui #systems-panel .realm-section-grid button {
    min-height: 124px !important;
    padding: 13px !important;
  }

  .celestial-orbit-ui #systems-panel .systems-hub .systems-tab > strong,
  .celestial-orbit-ui #systems-panel .realm-section-grid button > strong {
    font-size: 17px !important;
  }

  .celestial-orbit-ui #systems-panel .systems-detail-bar,
  .celestial-orbit-ui #systems-panel .realm-detail-bar,
  .celestial-orbit-ui #guide-panel .guide-toc {
    top: 68px !important;
  }
}

/* Readable dialog and typography contract.
   Keeps information surfaces sharp and prevents close controls from entering content grids. */
body.celestial-orbit-ui button,
body.celestial-orbit-ui input,
body.celestial-orbit-ui select,
body.celestial-orbit-ui textarea,
body.celestial-orbit-ui button > span,
body.celestial-orbit-ui button > strong,
body.celestial-orbit-ui button > small {
  font-family: var(--ui-font) !important;
  font-synthesis: none;
  -webkit-font-smoothing: auto;
  text-rendering: optimizeLegibility;
}

body.celestial-orbit-ui button {
  font-weight: 750;
  line-height: 1.22;
  letter-spacing: 0.01em;
}

body.celestial-orbit-ui.ui-menu-open .gong-focus,
body.celestial-orbit-ui.ui-menu-open .next-action-card,
body.celestial-orbit-ui.ui-menu-open .topbar {
  filter: brightness(0.5) saturate(0.72) !important;
}

.celestial-orbit-ui .menu-sheet,
.celestial-orbit-ui .menu-sheet-header,
.celestial-orbit-ui #systems-panel .menu-sheet-header,
.celestial-orbit-ui #systems-panel .systems-detail-bar,
.celestial-orbit-ui #systems-panel .realm-detail-bar,
.celestial-orbit-ui #guide-panel .guide-toc,
.celestial-orbit-ui .info-modal-backdrop,
.celestial-orbit-ui .tutorial-modal-backdrop,
.celestial-orbit-ui .knowledge-modal-backdrop,
.celestial-orbit-ui .realm-trial-modal-backdrop,
.celestial-orbit-ui .modal-backdrop {
  backdrop-filter: none !important;
}

.celestial-orbit-ui .resource-chip > span {
  color: rgba(216, 237, 231, 0.88) !important;
  font-size: 10px !important;
  font-weight: 750 !important;
  letter-spacing: 0.035em !important;
}

.celestial-orbit-ui .resource-chip > strong {
  color: #fff9e8 !important;
  font-size: clamp(13px, 1.05vw, 15px) !important;
  font-weight: 800 !important;
}

.celestial-orbit-ui .resource-strip[data-visible-count="1"] {
  grid-template-columns: minmax(180px, 260px) !important;
  justify-content: center;
}

.celestial-orbit-ui .resource-strip[data-visible-count="2"] {
  grid-template-columns: repeat(2, minmax(160px, 220px)) !important;
  justify-content: center;
}

.celestial-orbit-ui .resource-strip[data-visible-count="3"] {
  grid-template-columns: repeat(3, minmax(140px, 190px)) !important;
  justify-content: center;
}

.celestial-orbit-ui .resource-strip[data-visible-count="4"] {
  grid-template-columns: repeat(4, minmax(120px, 170px)) !important;
  justify-content: center;
}

.celestial-orbit-ui .resource-strip[data-visible-count="5"] {
  grid-template-columns: repeat(5, minmax(100px, 150px)) !important;
  justify-content: center;
}

.celestial-orbit-ui .fab-btn,
.celestial-orbit-ui body:not(.ui-mode-condense) #fab-stats-btn,
.celestial-orbit-ui body:not(.ui-mode-condense) #fab-systems-btn,
.celestial-orbit-ui body:not(.ui-mode-condense) #fab-guide-btn,
.celestial-orbit-ui body:not(.ui-mode-condense) #fab-settings-btn {
  color: #f4f5e8 !important;
  font-size: 13px !important;
  font-weight: 750 !important;
  letter-spacing: 0.015em !important;
  text-transform: none !important;
}

.celestial-orbit-ui .action-primary-slot > button,
.celestial-orbit-ui .action-secondary-list > button,
.celestial-orbit-ui .next-action-btn,
.celestial-orbit-ui .menu-close,
.celestial-orbit-ui .info-modal-close,
.celestial-orbit-ui #guide-panel .guide-tab,
.celestial-orbit-ui #systems-panel .systems-detail-bar button,
.celestial-orbit-ui #systems-panel .realm-detail-bar button {
  font-size: 13px !important;
  font-weight: 750 !important;
  letter-spacing: 0.01em !important;
  line-height: 1.25 !important;
}

.celestial-orbit-ui .core-actions .action-caption,
.celestial-orbit-ui .dao-seal-choice .action-caption {
  font-size: 12px !important;
  line-height: 1.3 !important;
}

.celestial-orbit-ui .next-action-kicker {
  font-size: 10px !important;
}

.celestial-orbit-ui .next-action-card > p {
  color: rgba(231, 240, 229, 0.9) !important;
  font-size: 14px !important;
  line-height: 1.48 !important;
}

.celestial-orbit-ui .next-action-card > small {
  color: rgba(195, 218, 211, 0.86) !important;
  font-size: 12px !important;
}

.celestial-orbit-ui .menu-sheet p,
.celestial-orbit-ui .menu-sheet li,
.celestial-orbit-ui .menu-sheet label,
.celestial-orbit-ui .menu-sheet .guide-note {
  font-size: clamp(13px, 0.9rem, 15px) !important;
  line-height: 1.52 !important;
}

.celestial-orbit-ui .menu-sheet small {
  font-size: 12px !important;
  line-height: 1.4 !important;
}

.celestial-orbit-ui #systems-panel .systems-hub .systems-tab > strong,
.celestial-orbit-ui #systems-panel .realm-section-grid button > strong {
  font-family: var(--ui-font) !important;
  font-size: 19px !important;
  font-weight: 750 !important;
  letter-spacing: -0.01em !important;
}

.celestial-orbit-ui #systems-panel .systems-hub .systems-tab > small,
.celestial-orbit-ui #systems-panel .realm-section-grid button > small {
  font-size: 13px !important;
  line-height: 1.4 !important;
}

.celestial-orbit-ui .stats-grid > div > span,
.celestial-orbit-ui .guide-grid > div > span {
  color: #c5dcd6 !important;
  font-size: 12px !important;
}

.celestial-orbit-ui .stats-grid > div > strong,
.celestial-orbit-ui .guide-grid > div > strong {
  font-size: 15px !important;
}

.celestial-orbit-ui #info-modal-card {
  position: relative;
  z-index: 1;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  gap: 0 !important;
  width: min(780px, calc(100vw - 32px)) !important;
  max-height: min(88svh, 800px) !important;
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: 20px !important;
}

.celestial-orbit-ui #info-modal.info-modal-backdrop {
  z-index: 3200 !important;
  isolation: isolate;
}

.celestial-orbit-ui #info-modal-card .info-modal-header {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding: 13px 16px 12px 20px;
  border-bottom: 1px solid rgba(216, 184, 100, 0.28);
  background: linear-gradient(180deg, #0b3335, #071f2a);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.24);
}

.celestial-orbit-ui #info-modal-card .info-modal-heading {
  min-width: 0;
}

.celestial-orbit-ui #info-modal-card .info-modal-kicker {
  display: block;
  color: #a8e3d2 !important;
  font-size: 11px !important;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.2;
}

.celestial-orbit-ui #info-modal-card h3 {
  margin: 3px 0 0 !important;
  overflow: hidden;
  color: #ffe6a0 !important;
  font-family: var(--display-font) !important;
  font-size: clamp(24px, 3.2vw, 32px) !important;
  font-weight: 700 !important;
  line-height: 1.08 !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.celestial-orbit-ui #info-modal-card .info-modal-close {
  position: static !important;
  inset: auto !important;
  display: grid !important;
  flex: 0 0 auto;
  place-items: center;
  width: auto !important;
  min-width: 88px !important;
  height: 42px !important;
  min-height: 42px !important;
  margin: 0 !important;
  padding: 8px 14px !important;
  border: 1px solid rgba(255, 226, 145, 0.46) !important;
  border-radius: 12px !important;
  color: #fff0b5 !important;
  background: #123f40 !important;
  box-shadow: inset 0 1px rgba(255, 245, 202, 0.08) !important;
}

.celestial-orbit-ui #info-modal-card .info-modal-body {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 24px;
  min-height: 0;
  padding: 22px;
  overflow-x: hidden;
  overflow-y: auto;
}

.celestial-orbit-ui #info-modal-card .info-modal-visual {
  display: grid;
  align-content: start;
  justify-items: center;
  min-width: 0;
}

.celestial-orbit-ui #info-modal-card .info-modal-image {
  width: 100% !important;
  max-width: 300px;
  max-height: 360px;
  margin: 0 !important;
  padding: 10px;
  object-fit: contain;
}

.celestial-orbit-ui #info-modal-card .info-modal-copy {
  min-width: 0;
  padding: 4px 0 0 !important;
}

.celestial-orbit-ui #info-modal-card .info-modal-value {
  margin: 0 0 10px !important;
  color: #fff8df !important;
  font-size: 20px !important;
  font-weight: 800;
  line-height: 1.25;
}

.celestial-orbit-ui #info-modal-card .info-modal-copy > p {
  margin: 0 0 14px !important;
  color: #dcebe6 !important;
  font-size: 15px !important;
  line-height: 1.55 !important;
}

.celestial-orbit-ui #info-modal-card .info-modal-details {
  gap: 9px !important;
  margin-top: 0 !important;
}

.celestial-orbit-ui #info-modal-card .info-modal-details > div {
  padding: 11px !important;
}

.celestial-orbit-ui #info-modal-card .info-modal-details strong,
.celestial-orbit-ui #info-modal-card .info-modal-details span {
  font-size: 13px !important;
  line-height: 1.45 !important;
}

.celestial-orbit-ui .journey-modal-card > .info-modal-close {
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  left: auto !important;
  width: auto !important;
  min-width: 82px !important;
  min-height: 42px !important;
  z-index: 5;
}

@media (max-width: 560px) {
  :root {
    --shell-top: 112px;
  }

  .celestial-orbit-ui .resource-strip {
    min-height: 100px !important;
  }

  .celestial-orbit-ui .resource-strip[data-visible-count="1"] {
    grid-template-columns: minmax(180px, 220px) !important;
  }

  .celestial-orbit-ui .resource-strip[data-visible-count="2"] {
    grid-template-columns: repeat(2, minmax(135px, 165px)) !important;
  }

  .celestial-orbit-ui .resource-strip[data-visible-count="3"] {
    grid-template-columns: repeat(3, minmax(98px, 116px)) !important;
  }

  .celestial-orbit-ui .resource-strip[data-visible-count="4"] {
    grid-template-columns: repeat(4, minmax(76px, 88px)) !important;
  }

  .celestial-orbit-ui .resource-strip[data-visible-count="5"],
  .celestial-orbit-ui .resource-strip[data-visible-count="6"],
  .celestial-orbit-ui .resource-strip[data-visible-count="7"],
  .celestial-orbit-ui .resource-strip[data-visible-count="8"],
  .celestial-orbit-ui .resource-strip[data-visible-count="9"] {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }

  .celestial-orbit-ui .resource-chip {
    grid-template-columns: 22px minmax(0, 1fr) !important;
    min-height: 42px !important;
  }

  .celestial-orbit-ui .resource-chip::before {
    width: 21px !important;
    height: 21px !important;
  }

  .celestial-orbit-ui .resource-chip > span {
    font-size: clamp(8.5px, 2.25vw, 10px) !important;
  }

  .celestial-orbit-ui .resource-chip > strong {
    font-size: clamp(11px, 3vw, 13px) !important;
  }

  .celestial-orbit-ui .fab-btn,
  .celestial-orbit-ui body:not(.ui-mode-condense) #fab-stats-btn,
  .celestial-orbit-ui body:not(.ui-mode-condense) #fab-systems-btn,
  .celestial-orbit-ui body:not(.ui-mode-condense) #fab-guide-btn,
  .celestial-orbit-ui body:not(.ui-mode-condense) #fab-settings-btn {
    width: 92px !important;
    min-width: 92px !important;
    height: 44px !important;
    min-height: 44px !important;
    padding-inline: 6px !important;
    font-size: 10.5px !important;
  }

  .celestial-orbit-ui .action-primary-slot > button {
    font-size: 13px !important;
  }

  .celestial-orbit-ui .gong-hint {
    font-size: 11px !important;
  }

  .celestial-orbit-ui .next-action-card > p {
    font-size: 12px !important;
    line-height: 1.42 !important;
  }

  .celestial-orbit-ui .next-action-btn {
    font-size: 12px !important;
  }

  .celestial-orbit-ui .menu-sheet p,
  .celestial-orbit-ui .menu-sheet li,
  .celestial-orbit-ui .menu-sheet label,
  .celestial-orbit-ui .menu-sheet .guide-note {
    font-size: 14px !important;
  }

  .celestial-orbit-ui #info-modal-card {
    width: calc(100vw - 16px) !important;
    max-height: calc(100dvh - 16px) !important;
    border-radius: 17px !important;
  }

  .celestial-orbit-ui #info-modal-card .info-modal-header {
    min-height: 66px;
    padding: 10px 10px 9px 14px;
  }

  .celestial-orbit-ui #info-modal-card h3 {
    font-size: clamp(21px, 6vw, 26px) !important;
  }

  .celestial-orbit-ui #info-modal-card .info-modal-close {
    min-width: 72px !important;
    height: 42px !important;
    min-height: 42px !important;
    padding-inline: 10px !important;
    font-size: 12px !important;
  }

  .celestial-orbit-ui #info-modal-card .info-modal-body {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
  }

  .celestial-orbit-ui #info-modal-card .info-modal-image {
    width: min(210px, 58vw) !important;
    max-height: 210px;
    padding: 6px;
  }

  .celestial-orbit-ui #info-modal-card .info-modal-copy {
    padding-top: 0 !important;
  }

  .celestial-orbit-ui #info-modal-card .info-modal-value {
    font-size: 18px !important;
  }

  .celestial-orbit-ui #info-modal-card .info-modal-copy > p {
    font-size: 14px !important;
  }

  .celestial-orbit-ui #info-modal-card .info-modal-details {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

@media (max-width: 370px) {
  .celestial-orbit-ui .fab-btn,
  .celestial-orbit-ui body:not(.ui-mode-condense) #fab-stats-btn,
  .celestial-orbit-ui body:not(.ui-mode-condense) #fab-systems-btn,
  .celestial-orbit-ui body:not(.ui-mode-condense) #fab-guide-btn,
  .celestial-orbit-ui body:not(.ui-mode-condense) #fab-settings-btn {
    width: 88px !important;
    min-width: 88px !important;
    font-size: 9.5px !important;
  }
}

/* The one-time Gong hint sits below the action seal instead of crossing it. */
.celestial-orbit-ui .gong-hint {
  margin: -8px auto 34px !important;
}

@media (max-width: 560px) {
  .celestial-orbit-ui .gong-hint {
    margin: -6px auto 28px !important;
  }
}

/* Spacious Gong stage: the Gong leads, while navigation stays outside its rim. */
:root {
  --orbit-gong-size: clamp(410px, 36vw, 468px);
  --orbit-stage-height: 640px;
}

.celestial-orbit-ui .gong-focus > #gather-btn,
.celestial-orbit-ui .gong-button {
  top: 64px !important;
}

.celestial-orbit-ui #fab-stats-btn {
  top: 168px !important;
  left: calc(50% - 418px) !important;
}

.celestial-orbit-ui #fab-systems-btn {
  top: 168px !important;
  right: calc(50% - 418px) !important;
}

.celestial-orbit-ui #fab-guide-btn {
  top: 388px !important;
  left: calc(50% - 418px) !important;
}

.celestial-orbit-ui #fab-settings-btn {
  top: 388px !important;
  right: calc(50% - 418px) !important;
}

.celestial-orbit-ui .gong-focus .core-actions {
  top: calc(var(--orbit-gong-size) + 80px) !important;
}

.celestial-orbit-ui .dao-choice-panel,
.celestial-orbit-ui.dao-preview-open #dao-preview-card:not(.hidden) {
  top: calc(var(--orbit-gong-size) + 80px) !important;
}

@media (max-width: 900px) {
  :root {
    --orbit-gong-size: clamp(350px, 58vw, 400px);
    --orbit-stage-height: 590px;
  }

  .celestial-orbit-ui .gong-focus > #gather-btn,
  .celestial-orbit-ui .gong-button {
    top: 62px !important;
  }

  .celestial-orbit-ui .fab-btn,
  .celestial-orbit-ui body:not(.ui-mode-condense) #fab-stats-btn,
  .celestial-orbit-ui body:not(.ui-mode-condense) #fab-systems-btn,
  .celestial-orbit-ui body:not(.ui-mode-condense) #fab-guide-btn,
  .celestial-orbit-ui body:not(.ui-mode-condense) #fab-settings-btn {
    width: 110px !important;
    min-width: 110px !important;
  }

  .celestial-orbit-ui #fab-stats-btn {
    top: 130px !important;
    left: 4px !important;
  }

  .celestial-orbit-ui #fab-systems-btn {
    top: 130px !important;
    right: 4px !important;
  }

  .celestial-orbit-ui #fab-guide-btn {
    top: 300px !important;
    left: 4px !important;
  }

  .celestial-orbit-ui #fab-settings-btn {
    top: 300px !important;
    right: 4px !important;
  }

  .celestial-orbit-ui .gong-focus .core-actions,
  .celestial-orbit-ui .dao-choice-panel,
  .celestial-orbit-ui.dao-preview-open #dao-preview-card:not(.hidden) {
    top: calc(var(--orbit-gong-size) + 78px) !important;
  }
}

@media (max-width: 560px) {
  :root {
    --orbit-gong-size: min(320px, 80vw);
    --orbit-stage-height: clamp(425px, 121vw, 480px);
  }

  .celestial-orbit-ui .gong-focus > #gather-btn,
  .celestial-orbit-ui .gong-button {
    top: 50px !important;
  }

  .celestial-orbit-ui .fab-btn,
  .celestial-orbit-ui body:not(.ui-mode-condense) #fab-stats-btn,
  .celestial-orbit-ui body:not(.ui-mode-condense) #fab-systems-btn,
  .celestial-orbit-ui body:not(.ui-mode-condense) #fab-guide-btn,
  .celestial-orbit-ui body:not(.ui-mode-condense) #fab-settings-btn {
    width: 92px !important;
    min-width: 92px !important;
    height: 44px !important;
    min-height: 44px !important;
  }

  .celestial-orbit-ui #fab-stats-btn,
  .celestial-orbit-ui #fab-systems-btn {
    top: 36px !important;
  }

  .celestial-orbit-ui #fab-guide-btn,
  .celestial-orbit-ui #fab-settings-btn {
    top: calc(var(--orbit-gong-size) + 20px) !important;
  }

  .celestial-orbit-ui #fab-stats-btn,
  .celestial-orbit-ui #fab-guide-btn {
    left: 2px !important;
  }

  .celestial-orbit-ui #fab-systems-btn,
  .celestial-orbit-ui #fab-settings-btn {
    right: 2px !important;
  }

  .celestial-orbit-ui .gong-focus .mentor-orb-btn,
  .celestial-orbit-ui .gong-focus .notification-center-btn {
    top: clamp(158px, 45vw, 188px) !important;
    width: 34px !important;
    min-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
  }

  .celestial-orbit-ui .gong-focus .mentor-orb-btn {
    left: 2px !important;
  }

  .celestial-orbit-ui .gong-focus .notification-center-btn {
    right: 2px !important;
  }

  .celestial-orbit-ui .gong-focus .core-actions,
  .celestial-orbit-ui .dao-choice-panel,
  .celestial-orbit-ui.dao-preview-open #dao-preview-card:not(.hidden) {
    top: calc(var(--orbit-gong-size) + 64px) !important;
  }
}

@media (max-width: 370px) {
  .celestial-orbit-ui .fab-btn,
  .celestial-orbit-ui body:not(.ui-mode-condense) #fab-stats-btn,
  .celestial-orbit-ui body:not(.ui-mode-condense) #fab-systems-btn,
  .celestial-orbit-ui body:not(.ui-mode-condense) #fab-guide-btn,
  .celestial-orbit-ui body:not(.ui-mode-condense) #fab-settings-btn {
    width: 86px !important;
    min-width: 86px !important;
    font-size: 9.5px !important;
  }
}

/* Stable Dao oath flow: preview and Gong share one permanent center axis. */
@media (min-width: 901px) {
  html {
    scrollbar-gutter: stable;
  }
}

@media (max-width: 900px) {
  .celestial-orbit-ui .layout {
    scrollbar-gutter: stable;
  }
}

.celestial-orbit-ui .gong-focus,
.celestial-orbit-ui.dao-preview-open .gong-focus {
  right: auto !important;
  left: auto !important;
  width: 100% !important;
  max-width: 980px !important;
  margin-inline: auto !important;
  transform: none !important;
}

.celestial-orbit-ui.dao-preview-open .gong-focus {
  height: calc(var(--orbit-stage-height) + 245px) !important;
  min-height: calc(var(--orbit-stage-height) + 245px) !important;
}

.celestial-orbit-ui.dao-preview-open .gong-focus::after {
  content: none !important;
  display: none !important;
}

.celestial-orbit-ui.dao-preview-open .dao-choice-panel {
  visibility: hidden !important;
  pointer-events: none !important;
}

.celestial-orbit-ui.dao-preview-open .gong-hint {
  visibility: hidden !important;
}

.celestial-orbit-ui.dao-preview-open #dao-preview-card:not(.hidden) {
  position: absolute !important;
  z-index: 60 !important;
  top: 422px !important;
  right: auto !important;
  bottom: auto !important;
  left: 50% !important;
  width: min(600px, calc(100vw - 20px)) !important;
  max-height: 330px !important;
  margin: 0 !important;
  overflow: auto !important;
  background: linear-gradient(165deg, rgba(28, 35, 27, 0.99), rgba(5, 19, 30, 0.995)) !important;
  transform: translateX(-50%) !important;
  animation: daoPreviewStableReveal 0.14s ease-out both !important;
}

.celestial-orbit-ui .dao-seal-choice,
.celestial-orbit-ui .dao-seal-choice:nth-child(1),
.celestial-orbit-ui .dao-seal-choice:nth-child(2),
.celestial-orbit-ui .dao-seal-choice:nth-child(3),
.celestial-orbit-ui .dao-seal-choice:hover,
.celestial-orbit-ui .dao-seal-choice:focus-visible,
.celestial-orbit-ui .dao-seal-choice:active,
.celestial-orbit-ui .dao-seal-choice.dao-previewing {
  transform: none !important;
}

@keyframes daoPreviewStableReveal {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 560px) {
  .celestial-orbit-ui.dao-preview-open .gong-focus {
    height: calc(var(--orbit-stage-height) + 265px) !important;
    min-height: calc(var(--orbit-stage-height) + 265px) !important;
  }

  .celestial-orbit-ui.dao-preview-open #dao-preview-card:not(.hidden) {
    top: 326px !important;
    width: calc(100vw - 12px) !important;
    max-height: 350px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .celestial-orbit-ui.dao-preview-open #dao-preview-card:not(.hidden) {
    animation: none !important;
  }
}

@media (max-width: 370px) {
  :root {
    --orbit-gong-size: 268px;
    --orbit-stage-height: 426px;
  }

  .celestial-orbit-ui .resource-chip {
    grid-template-columns: 19px minmax(0, 1fr) !important;
  }

  .celestial-orbit-ui .resource-chip::before {
    width: 18px !important;
    height: 18px !important;
  }

  .celestial-orbit-ui .gong-focus > #gather-btn,
  .celestial-orbit-ui .gong-button {
    top: 54px !important;
  }

  .celestial-orbit-ui .gong-focus .core-actions {
    top: 322px !important;
  }

  .celestial-orbit-ui #fab-stats-btn,
  .celestial-orbit-ui #fab-systems-btn { top: 128px !important; }
  .celestial-orbit-ui #fab-guide-btn,
  .celestial-orbit-ui #fab-settings-btn { top: 255px !important; }

  .celestial-orbit-ui .fab-btn,
  .celestial-orbit-ui body:not(.ui-mode-condense) #fab-stats-btn,
  .celestial-orbit-ui body:not(.ui-mode-condense) #fab-systems-btn,
  .celestial-orbit-ui body:not(.ui-mode-condense) #fab-guide-btn,
  .celestial-orbit-ui body:not(.ui-mode-condense) #fab-settings-btn {
    width: 80px !important;
    min-width: 80px !important;
    font-size: 8px !important;
    letter-spacing: 0 !important;
  }

  .celestial-orbit-ui .gong-focus .mentor-orb-btn { left: 10px !important; }
  .celestial-orbit-ui .gong-focus .notification-center-btn { right: 10px !important; }

  .celestial-orbit-ui .next-action-card {
    grid-template-columns: minmax(0, 1fr) 92px !important;
  }

  .celestial-orbit-ui .next-action-btn {
    width: 92px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .celestial-orbit-ui .bg-layer,
  .celestial-orbit-art::before,
  .celestial-orbit-art::after,
  .celestial-orbit-star {
    animation: none !important;
  }
}

/* Clean control geometry across the surrounding action and menu surfaces. */
.celestial-orbit-ui .action-primary-slot > button,
.celestial-orbit-ui .action-secondary-drawer,
.celestial-orbit-ui .next-action-card,
.celestial-orbit-ui .dao-choice-panel,
.celestial-orbit-ui .menu-sheet,
.celestial-orbit-ui .mobile-drawer-panel,
.celestial-orbit-ui #systems-panel.menu-sheet {
  border-radius: 18px !important;
}

.celestial-orbit-ui .action-primary-slot > button::before,
.celestial-orbit-ui .action-primary-slot > button::after {
  content: none !important;
  display: none !important;
}

.celestial-orbit-ui .next-action-card::before {
  border-radius: 12px !important;
}

.celestial-orbit-ui .menu-sheet-header,
.celestial-orbit-ui #systems-panel .menu-sheet-header {
  border-radius: 17px 17px 0 0 !important;
}

.celestial-orbit-ui .menu-close,
.celestial-orbit-ui .menu-sheet-header .menu-close,
.celestial-orbit-ui #systems-panel .systems-hub .systems-tab,
.celestial-orbit-ui #systems-panel .realm-section-grid button,
.celestial-orbit-ui #systems-panel .systems-detail-bar,
.celestial-orbit-ui #systems-panel .realm-detail-bar,
.celestial-orbit-ui #guide-panel .guide-toc,
.celestial-orbit-ui .sub-panel,
.celestial-orbit-ui .event-card,
.celestial-orbit-ui .objective-card,
.celestial-orbit-ui .quest-box,
.celestial-orbit-ui .mission-box {
  border-radius: 14px !important;
}

.celestial-orbit-ui #guide-panel .guide-tab,
.celestial-orbit-ui #systems-panel .systems-detail-bar button,
.celestial-orbit-ui #systems-panel .realm-detail-bar button,
.celestial-orbit-ui .stats-grid > div,
.celestial-orbit-ui .guide-grid > div,
.celestial-orbit-ui .info-modal-details > div {
  border-radius: 10px !important;
}

@media (max-width: 560px) {
  .celestial-orbit-ui .menu-sheet,
  .celestial-orbit-ui .mobile-drawer-panel,
  .celestial-orbit-ui #systems-panel.menu-sheet,
  .celestial-orbit-ui .menu-sheet-header,
  .celestial-orbit-ui #systems-panel .menu-sheet-header {
    border-radius: 0 !important;
  }
}

/* Narrow-screen order guard: legacy rules above must not shrink readable labels again. */
@media (max-width: 370px) {
  .celestial-orbit-ui .resource-chip {
    grid-template-columns: 22px minmax(0, 1fr) !important;
  }

  .celestial-orbit-ui .resource-chip::before {
    width: 21px !important;
    height: 21px !important;
  }

  .celestial-orbit-ui .fab-btn,
  .celestial-orbit-ui body:not(.ui-mode-condense) #fab-stats-btn,
  .celestial-orbit-ui body:not(.ui-mode-condense) #fab-systems-btn,
  .celestial-orbit-ui body:not(.ui-mode-condense) #fab-guide-btn,
  .celestial-orbit-ui body:not(.ui-mode-condense) #fab-settings-btn {
    width: 88px !important;
    min-width: 88px !important;
    font-size: 9.5px !important;
    letter-spacing: 0.01em !important;
  }
}

/* Final cascade guard for the enlarged stage and Dao panels. */
.celestial-orbit-ui .dao-choice-panel,
.celestial-orbit-ui.dao-preview-open #dao-preview-card:not(.hidden) {
  top: calc(var(--orbit-gong-size) + 80px) !important;
}

@media (max-width: 900px) {
  .celestial-orbit-ui .dao-choice-panel,
  .celestial-orbit-ui.dao-preview-open #dao-preview-card:not(.hidden) {
    top: calc(var(--orbit-gong-size) + 78px) !important;
  }
}

@media (max-width: 560px) {
  .celestial-orbit-ui .dao-choice-panel,
  .celestial-orbit-ui.dao-preview-open #dao-preview-card:not(.hidden) {
    top: calc(var(--orbit-gong-size) + 64px) !important;
  }
}

@media (max-width: 370px) {
  :root {
    --orbit-gong-size: min(320px, 80vw);
    --orbit-stage-height: clamp(425px, 121vw, 480px);
  }

  .celestial-orbit-ui .gong-focus > #gather-btn,
  .celestial-orbit-ui .gong-button {
    top: 50px !important;
  }

  .celestial-orbit-ui #fab-stats-btn,
  .celestial-orbit-ui #fab-systems-btn {
    top: 36px !important;
  }

  .celestial-orbit-ui #fab-guide-btn,
  .celestial-orbit-ui #fab-settings-btn {
    top: calc(var(--orbit-gong-size) + 20px) !important;
  }

  .celestial-orbit-ui #fab-stats-btn,
  .celestial-orbit-ui #fab-guide-btn {
    left: 2px !important;
  }

  .celestial-orbit-ui #fab-systems-btn,
  .celestial-orbit-ui #fab-settings-btn {
    right: 2px !important;
  }

  .celestial-orbit-ui .fab-btn,
  .celestial-orbit-ui body:not(.ui-mode-condense) #fab-stats-btn,
  .celestial-orbit-ui body:not(.ui-mode-condense) #fab-systems-btn,
  .celestial-orbit-ui body:not(.ui-mode-condense) #fab-guide-btn,
  .celestial-orbit-ui body:not(.ui-mode-condense) #fab-settings-btn {
    width: 86px !important;
    min-width: 86px !important;
    height: 44px !important;
    min-height: 44px !important;
    font-size: 9.5px !important;
  }

  .celestial-orbit-ui .gong-focus .mentor-orb-btn,
  .celestial-orbit-ui .gong-focus .notification-center-btn {
    top: clamp(158px, 45vw, 188px) !important;
    width: 34px !important;
    min-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
  }

  .celestial-orbit-ui .gong-focus .mentor-orb-btn {
    left: 2px !important;
  }

  .celestial-orbit-ui .gong-focus .notification-center-btn {
    right: 2px !important;
  }

  .celestial-orbit-ui .gong-focus .core-actions,
  .celestial-orbit-ui .dao-choice-panel,
  .celestial-orbit-ui.dao-preview-open #dao-preview-card:not(.hidden) {
    top: calc(var(--orbit-gong-size) + 64px) !important;
  }
}

/* Release stopper: keep the Dao oath above the external journey card. */
.celestial-orbit-ui.dao-preview-open .gong-focus {
  position: relative !important;
  z-index: 90 !important;
}

.celestial-orbit-ui.dao-preview-open #next-action-card,
.celestial-orbit-ui.dao-preview-open .next-action-card,
.celestial-orbit-ui.dao-preview-open .gong-hint {
  visibility: hidden !important;
  pointer-events: none !important;
}

.celestial-orbit-ui.dao-preview-open #dao-preview-card:not(.hidden) {
  z-index: 100 !important;
  overscroll-behavior: contain;
  pointer-events: auto !important;
  touch-action: pan-y;
}

.celestial-orbit-ui.dao-preview-open #dao-preview-card .dao-confirm-actions {
  position: sticky;
  z-index: 4;
  bottom: 0;
  margin: 0.7rem -0.15rem -0.15rem;
  padding: 0.65rem 0.15rem 0.15rem;
  background: linear-gradient(180deg, rgba(5, 19, 30, 0), rgba(5, 19, 30, 0.98) 32%);
}

.celestial-orbit-ui.dao-preview-open #dao-preview-card .dao-confirm-actions button {
  position: relative !important;
  z-index: 5 !important;
  pointer-events: auto !important;
  touch-action: manipulation;
}

/* Dao oath release stopper: selection and confirmation must never share a layer. */
body.celestial-orbit-ui.dao-preview-open #dao-choice-panel,
body.celestial-orbit-ui.dao-preview-open #dao-choice-panel:not(.hidden) {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.celestial-orbit-ui.dao-preview-open .gong-focus::after {
  content: "" !important;
  display: block !important;
  position: fixed !important;
  inset: 0 !important;
  z-index: 2140 !important;
  background: rgba(1, 8, 14, 0.84) !important;
  backdrop-filter: blur(8px) !important;
  pointer-events: auto !important;
}

body.celestial-orbit-ui.dao-preview-open #dao-preview-card:not(.hidden) {
  position: fixed !important;
  z-index: 2150 !important;
  top: 50% !important;
  right: auto !important;
  bottom: auto !important;
  left: 50% !important;
  width: min(580px, calc(100vw - 24px)) !important;
  max-height: min(680px, calc(100dvh - 24px)) !important;
  margin: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  visibility: visible !important;
  transform: translate(-50%, -50%) !important;
  pointer-events: auto !important;
}

/* Dao selection is one exclusive stage state. The journey card remains in the
   document for stable page geometry, but cannot cover the selectable seals. */
html {
  scrollbar-gutter: stable;
}

body.celestial-orbit-ui.dao-choice-open .gong-focus {
  z-index: 90 !important;
  height: max(var(--orbit-stage-height), calc(var(--orbit-gong-size) + 330px)) !important;
  min-height: max(var(--orbit-stage-height), calc(var(--orbit-gong-size) + 330px)) !important;
  transition: none !important;
}

body.celestial-orbit-ui.dao-choice-open #next-action-card,
body.celestial-orbit-ui.dao-choice-open .next-action-card,
body.celestial-orbit-ui.dao-choice-open .gong-hint {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

body.celestial-orbit-ui.dao-choice-open #dao-choice-panel:not(.hidden) {
  z-index: 100 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* The preview is a fixed oath dialog, so it must not resize the altar behind
   it. Keeping the normal stage height also prevents the post-confirm jump. */
body.celestial-orbit-ui.dao-preview-open .gong-focus {
  height: var(--orbit-stage-height) !important;
  min-height: var(--orbit-stage-height) !important;
  transition: none !important;
}

@media (max-width: 560px) {
  body.celestial-orbit-ui.dao-choice-open .gong-focus {
    height: max(var(--orbit-stage-height), calc(var(--orbit-gong-size) + 350px)) !important;
    min-height: max(var(--orbit-stage-height), calc(var(--orbit-gong-size) + 350px)) !important;
  }
}

@media (max-width: 560px) {
  body.celestial-orbit-ui.dao-preview-open #dao-preview-card:not(.hidden) {
    top: calc(var(--shell-top) + 6px) !important;
    bottom: calc(var(--shell-bottom) + 6px) !important;
    width: calc(100vw - 12px) !important;
    max-height: none !important;
    transform: translateX(-50%) !important;
  }
}
button,
[role="button"],
.resource-chip {
  touch-action: manipulation;
}
