/* ---------- Unified Flagship Chat Canvas (Hero -> Ambient HUD + Editorial Stream) ---------- */
.gx-home {
  min-height: calc(100dvh - 64px);
  display: flex; flex-direction: column; align-items: center;
  width: min(100% - 32px, 860px);
  margin-inline: auto;
  position: relative;
}
.gx-home:not(.has-turns) {
  justify-content: flex-start;
  padding: 10px 0 36px;
}
.gx-home.has-turns {
  justify-content: flex-start;
  padding: 8px 0 0;
}

/* Unified Sticky Workspace Capsule (Telemetry + Embedded Optical Zoom Dial + Controls) */
.gx-ambient-hud {
  position: sticky; top: 62px; z-index: 20;
  width: 100%; max-width: 768px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; column-gap: 0;
  min-height: 36px;
  padding: 4px 6px 4px 8px; margin: 4px 0 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-elevated);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-highlight), var(--shadow-sm);
  transition: border-color .22s, box-shadow .22s, background-color .22s, opacity .22s;
}
.gx-home.has-turns:not(.globe-expanded):not(.is-routing-journey) .gx-ambient-hud,
body[data-home="focus"]:not(.globe-drawer-forced) .gx-ambient-hud {
  grid-template-columns: minmax(0, 1fr) auto auto;
}
.gx-home:not(.has-turns) .gx-ambient-hud {
  padding: 3.5px 6px 3.5px 8px; margin: 2px 0 6px;
  border-color: rgba(255, 255, 255, 0.68);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.48) 0%, rgba(255, 255, 255, 0.28) 100%);
  backdrop-filter: saturate(205%) blur(22px); -webkit-backdrop-filter: saturate(205%) blur(22px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), 0 0 0 0.5px rgba(15, 23, 42, 0.06), 0 6px 18px -8px rgba(15, 23, 42, 0.10);
}
html[data-theme="dark"] .gx-home:not(.has-turns) .gx-ambient-hud {
  border-color: rgba(255, 255, 255, 0.15);
  background: linear-gradient(180deg, rgba(34, 40, 56, 0.36) 0%, rgba(18, 21, 32, 0.22) 100%);
  backdrop-filter: saturate(205%) brightness(1.12) blur(22px); -webkit-backdrop-filter: saturate(205%) brightness(1.12) blur(22px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 8px 22px -10px rgba(0, 0, 0, 0.45);
}
.gx-home:not(.has-turns) .gx-hud-btn {
  background: transparent;
  border-color: transparent;
  color: var(--text-2);
}
.gx-home:not(.has-turns) .gx-hud-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}
.gx-home:not(.has-turns) .gx-hud-chat-only { display: none !important; }
.gx-ambient-hud .sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.gx-hud-left {
  display: flex; align-items: center; gap: 6px; min-width: 0; justify-self: start; max-width: 100%;
  font-size: 12.2px; color: var(--text-2);
}
.gx-hud-status {
  display: inline-flex; align-items: center; gap: 7px; min-width: 0; max-width: 100%;
  height: 26px; padding: 0 7px 0 6px; border-radius: 999px;
  border: 1px solid transparent; background: transparent;
  color: inherit; font: inherit; text-align: left;
  cursor: default; pointer-events: none;
  transition: background-color .16s, border-color .16s, color .16s;
}
.gx-home.has-turns .gx-hud-status {
  cursor: pointer; pointer-events: auto;
}
.gx-home.has-turns .gx-hud-status:hover {
  background: var(--surface-2);
}
.gx-home.has-turns .gx-hud-status.is-active {
  background: var(--primary-50);
  border-color: var(--primary-100);
}
html[data-theme="dark"] body[data-home="globe"] .gx-home.has-turns .gx-hud-status:hover {
  background: rgba(255, 255, 255, 0.08);
}
html[data-theme="dark"] body[data-home="globe"] .gx-home.has-turns .gx-hud-status.is-active {
  background: rgba(96, 165, 250, 0.14);
  border-color: rgba(96, 165, 250, 0.30);
}
.gx-hud-drawer-cue {
  display: none; align-items: center; justify-content: center;
  width: 14px; height: 14px; flex: 0 0 auto;
  color: var(--text-3);
  transform: rotate(90deg);
  transition: transform .24s cubic-bezier(.22, 1, .36, 1), color .16s;
}
.gx-home.has-turns .gx-hud-drawer-cue { display: inline-flex; }
.gx-hud-status:hover .gx-hud-drawer-cue { color: var(--text); }
.gx-hud-status.is-active .gx-hud-drawer-cue {
  color: var(--primary);
  transform: rotate(-90deg);
}
.gx-hud-title {
  font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gx-hud-meta {
  color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gx-hud-center {
  display: flex; align-items: center; justify-content: center; justify-self: center;
  padding-inline: 8px;
  max-width: 310px;
  opacity: 1;
  overflow: hidden;
  transition: max-width .38s cubic-bezier(.22, 1, .36, 1), opacity .24s ease, padding .32s cubic-bezier(.22, 1, .36, 1);
}
.gx-home.has-turns:not(.globe-expanded):not(.is-routing-journey) .gx-hud-center,
body[data-home="focus"]:not(.globe-drawer-forced) .gx-hud-center {
  max-width: 0;
  padding-inline: 0;
  opacity: 0;
  pointer-events: none;
}
.gx-preset-active-chip {
  display: inline-flex; align-items: center; gap: 4px;
  height: 21px; padding: 0 6px 0 8px; border-radius: 999px;
  background: var(--primary-50); border: 1px solid var(--primary-100);
  color: var(--primary); font-size: 11.2px; font-weight: 600; white-space: nowrap;
}
.gx-preset-active-chip button {
  width: 14px; height: 14px; border: 0; border-radius: 50%;
  background: transparent; color: currentColor; font-size: 12px; line-height: 1;
  display: grid; place-items: center;
}
.gx-preset-active-chip button:hover { background: var(--primary-100); }
.gx-hud-right {
  display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; justify-self: end;
}
.gx-hud-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 4.5px;
  height: 26px; padding: 0 10px; border-radius: 999px;
  border: 1px solid transparent; background: var(--surface-2);
  color: var(--text-2); font-size: 11.8px; font-weight: 540; white-space: nowrap;
  transition: border-color .16s, color .16s, background-color .16s;
}
.gx-hud-btn:hover { color: var(--text); background: var(--surface-3); }
.gx-hud-btn.is-active,
.gx-hud-btn[aria-expanded="true"] { border-color: var(--primary-100); background: var(--primary-50); color: var(--primary); }
.gx-hud-icon-btn {
  width: 26px; padding: 0;
}
.gx-hud-more-wrap {
  position: relative; display: inline-flex;
}
.gx-menu.gx-hud-more-menu {
  left: auto; right: 0;
  width: 228px;
}
.gx-hud-dot {
  width: 5.5px; height: 5.5px; border-radius: 50%; background: var(--primary);
}

/* Shared Read-Only Snapshot Banner */
.gx-shared-banner {
  width: 100%; max-width: 768px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 9px 14px; margin: 4px 0 8px; border-radius: 16px;
  border: 1px solid var(--primary-100); background: var(--primary-50);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  font-size: 12.5px; color: var(--text);
}
.gx-shared-banner-info { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Hero Greeting (Shown cleanly in Focus Mode; Hidden in Globe Mode so 3D Stage breathes) */
.gx-hero-head {
  text-align: center; margin: 42px 0 22px; max-width: 620px;
  animation: enter .35s cubic-bezier(.2, .8, .2, 1) both;
}
.gx-home.has-turns .gx-hero-head,
body[data-home="globe"] .gx-hero-head { display: none; }
.gx-hero-head h1 {
  font-size: clamp(24px, 2.7vw, 32px); font-weight: 680; letter-spacing: -0.03em;
  line-height: 1.22; color: var(--text);
}
.gx-print-cover { display: none; }

/* 3D Globe Stage (Hero on 0 turns; Holds cleanly during Turn-1 routing flight, then folds smoothly) */
.gx-globe-sec {
  width: 100%;
  display: flex; flex-direction: column; align-items: center;
  position: relative;
  flex: 0 0 auto;
  overflow: visible;
  transition: max-height .92s cubic-bezier(.22, 1, .36, 1), opacity .72s ease, margin .82s cubic-bezier(.22, 1, .36, 1);
  max-height: 540px;
  opacity: 1;
}
body[data-home="focus"]:not(.globe-drawer-forced) .gx-globe-sec {
  max-height: 0 !important;
  opacity: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  pointer-events: none;
}
.gx-home.has-turns:not(.globe-expanded):not(.is-routing-journey) .gx-globe-sec {
  max-height: 0;
  opacity: 0;
  margin: 0;
  overflow: hidden;
  pointer-events: none;
}
.gx-home.has-turns.is-routing-journey:not(.globe-expanded) .gx-globe-sec {
  max-height: 312px;
  opacity: 1;
  margin: 2px 0 8px;
  padding: 4px 0 2px;
  overflow: visible;
}
.gx-home.has-turns.globe-expanded .gx-globe-sec {
  max-height: 368px;
  opacity: 1;
  margin: 2px 0 10px;
  padding: 6px 0 4px;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}
.gx-globe-stage {
  position: relative;
  width: min(100%, 768px);
  height: clamp(282px, 36dvh, 360px);
  display: grid; place-items: center;
  cursor: grab;
  touch-action: none;
  user-select: none;
  transition: height .58s cubic-bezier(.22, 1, .36, 1), width .42s cubic-bezier(.22, 1, .36, 1);
}
.gx-globe-stage:active { cursor: grabbing; }
.gx-home.has-turns.is-routing-journey:not(.globe-expanded) .gx-globe-stage {
  width: min(100%, 768px);
  height: 240px;
}
.gx-home.has-turns.globe-expanded .gx-globe-stage {
  width: min(100%, 768px);
  height: 268px;
}
.gx-globe-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  transition: opacity .52s ease 0s;
}
.gx-backdrop-canvas { z-index: 0; }
#globeGlCanvas { z-index: 1; }
#globeMapCanvas { z-index: 2; pointer-events: none; }
#globeCityGlCanvas { z-index: 3; pointer-events: none; }
#globeHudCanvas { z-index: 4; pointer-events: none; }

/* Real AMap 3D Full-Screen Unified Layer + Optical Spotlight Vignette */
.gx-amap-wrap {
  position: absolute; inset: 0; z-index: 5;
  opacity: 0; visibility: hidden;
  transition: opacity .82s cubic-bezier(.22, 1, .36, 1), visibility 0s linear .82s;
  pointer-events: none;
  will-change: opacity;
}
.gx-amap-wrap.is-visible {
  opacity: 1; visibility: visible;
  transition: opacity .82s cubic-bezier(.22, 1, .36, 1), visibility 0s linear 0s;
  pointer-events: auto;
}
.gx-amap-container,
.gx-amap-overlay {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
}
.gx-amap-overlay { pointer-events: none; z-index: 2; }
.gx-amap-vignette {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: radial-gradient(ellipse 560px 300px at 56% 290px, rgba(4, 7, 15, 0) 38%, rgba(4, 7, 15, 0.34) 72%, rgba(4, 7, 15, 0.64) 100%);
}
body[data-sidebar="closed"] .gx-amap-vignette {
  background: radial-gradient(ellipse 560px 300px at 50% 290px, rgba(4, 7, 15, 0) 38%, rgba(4, 7, 15, 0.34) 72%, rgba(4, 7, 15, 0.64) 100%);
}
html[data-theme="light"] .gx-amap-vignette {
  background: radial-gradient(ellipse 560px 300px at 56% 290px, rgba(249, 249, 251, 0) 40%, rgba(249, 249, 251, 0.38) 74%, rgba(249, 249, 251, 0.72) 100%);
}
html[data-theme="light"] body[data-sidebar="closed"] .gx-amap-vignette {
  background: radial-gradient(ellipse 560px 300px at 50% 290px, rgba(249, 249, 251, 0) 40%, rgba(249, 249, 251, 0.38) 74%, rgba(249, 249, 251, 0.72) 100%);
}
.gx-amap-container .amap-logo,
.gx-amap-container .amap-copyright { opacity: 0.24 !important; transform: scale(0.82); transform-origin: left bottom; }
.gx-backdrop-wrap.is-amap-active .gx-globe-canvas {
  opacity: 0;
  pointer-events: none;
  transition: opacity .65s ease .36s;
}
.gx-globe-stage.is-amap-active { pointer-events: none; }
.gx-globe-stage.is-amap-active > * { pointer-events: auto; }

.gx-amap-pick-banner {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 9;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 5px 12px; border-radius: 999px;
  background: var(--success);
  color: #ffffff; font-size: 11.5px; font-weight: 600;
  box-shadow: 0 6px 18px rgba(16, 163, 127, 0.28);
  white-space: nowrap;
}
.gx-amap-pick-banner button {
  border: 0; border-radius: 999px; padding: 2px 8px;
  background: rgba(255, 255, 255, 0.22); color: #fff; font-size: 11px; cursor: pointer;
}
.gx-mock-notice-pill {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 7;
  display: inline-flex; align-items: center; gap: 6px;
  height: 23px; padding: 0 11px; border-radius: 999px;
  border: 1px solid rgba(26, 115, 232, 0.22);
  background: rgba(255, 255, 255, 0.90);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  color: var(--primary-600); font-size: 10.8px; font-weight: 550; white-space: nowrap;
  cursor: pointer; box-shadow: 0 4px 12px rgba(15, 17, 21, 0.06);
  transition: transform .16s, background-color .16s, border-color .16s, color .16s;
}
.gx-mock-notice-pill:hover {
  background: #eef4fd; border-color: rgba(26, 115, 232, 0.40);
}
.gx-globe-stage.is-dark .gx-mock-notice-pill {
  background: rgba(12, 19, 34, 0.84);
  border-color: rgba(96, 165, 250, 0.34);
  color: #93c5fd;
}
.gx-globe-stage.is-dark .gx-mock-notice-pill:hover {
  background: rgba(20, 30, 52, 0.94);
  border-color: rgba(96, 165, 250, 0.56);
  color: #dbeafe;
}
.gx-mini-btn.is-unconfigured {
  border-color: var(--primary-100);
  color: var(--primary);
}
.gx-globe-stage.is-dark .gx-mini-btn.is-unconfigured {
  border-color: rgba(96, 165, 250, 0.45);
  color: #93c5fd;
}
.gx-mini-btn.is-ready,
.gx-mini-btn.is-located {
  border-color: rgba(16, 163, 127, 0.34);
  color: var(--success);
}
.gx-globe-stage.is-dark .gx-mini-btn.is-ready,
.gx-globe-stage.is-dark .gx-mini-btn.is-located {
  border-color: rgba(52, 211, 153, 0.42);
  color: #6ee7b7;
}

/* Embedded Optical Lens Zoom Dial (Unified inside Top HUD Capsule) */
.gx-scale-bar {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 5px 0 3px; border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(15, 23, 42, 0.045);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06);
  color: #111215;
  user-select: none;
  transition: background-color .22s, border-color .22s, box-shadow .22s;
}
html[data-theme="dark"] .gx-scale-bar {
  border-color: rgba(255, 255, 255, 0.11);
  background: rgba(6, 9, 16, 0.34);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.38), inset 0 -0.5px 0 rgba(255, 255, 255, 0.08);
  color: #f2f4f8;
}
.gx-scale-bar.is-journey {
  border-color: rgba(16, 163, 127, 0.38);
  box-shadow: inset 0 1px 2px rgba(16, 163, 127, 0.08), 0 0 0 1px rgba(16, 163, 127, 0.12);
}
html[data-theme="dark"] .gx-scale-bar.is-journey {
  border-color: rgba(76, 195, 138, 0.42);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(76, 195, 138, 0.14);
}
.gx-scale-divider {
  width: 1px; height: 14px; flex: 0 0 1px;
  background: rgba(15, 17, 21, 0.10);
}
html[data-theme="dark"] .gx-scale-divider {
  background: rgba(255, 255, 255, 0.12);
}

/* Zone 1: Compact Metric Readout Pill with Vertical Micro-Roll */
.gx-scale-scope {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 7px 0 6px;
  border-radius: 999px; border: 0;
  background: rgba(255, 255, 255, 0.56);
  color: #111215; font-size: 11.2px; font-weight: 620; white-space: nowrap;
  cursor: pointer;
  transition: background-color .16s, color .16s;
}
.gx-scale-scope:hover { background: rgba(255, 255, 255, 0.85); }
html[data-theme="dark"] .gx-scale-scope {
  background: rgba(255, 255, 255, 0.07);
  color: #f1f5f9;
}
html[data-theme="dark"] .gx-scale-scope:hover {
  background: rgba(255, 255, 255, 0.13);
}
.gx-scale-scope-dot {
  width: 5.5px; height: 5.5px; border-radius: 50%; flex: 0 0 5.5px;
  background: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-50);
  transition: background-color .2s, box-shadow .2s;
}
.gx-scale-bar.is-3d-comm .gx-scale-scope-dot,
.gx-scale-bar.is-journey .gx-scale-scope-dot {
  background: var(--success);
  box-shadow: 0 0 0 2.5px var(--success-50);
}
.gx-scale-bar.is-journey .gx-scale-scope-dot {
  animation: blink .85s ease-in-out infinite;
}
.gx-scale-metric-box {
  position: relative;
  display: inline-flex; align-items: center; justify-content: flex-end;
  min-width: 50px; height: 16px; overflow: hidden;
}
.gx-scale-metric {
  display: inline-block;
  font-size: 11.2px; font-weight: 650; line-height: 16px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  color: #111215;
  will-change: transform, opacity;
}
html[data-theme="dark"] .gx-scale-metric { color: #f8fafc; }
.gx-scale-metric.is-roll-up {
  animation: gxMetricRollUp .22s cubic-bezier(.22, 1, .36, 1) both;
}
.gx-scale-metric.is-roll-down {
  animation: gxMetricRollDown .22s cubic-bezier(.22, 1, .36, 1) both;
}
@keyframes gxMetricRollUp {
  0% { opacity: 0.15; transform: translate3d(0, 7px, 0); }
  100% { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes gxMetricRollDown {
  0% { opacity: 0.15; transform: translate3d(0, -7px, 0); }
  100% { opacity: 1; transform: translate3d(0, 0, 0); }
}
.gx-scale-scope-dim {
  font-style: normal; font-size: 9.2px; font-weight: 660;
  font-variant-numeric: tabular-nums;
  padding: 0 4px; border-radius: 4px; line-height: 14px;
  background: var(--success-50); color: var(--success);
}
html[data-theme="dark"] .gx-scale-scope-dim {
  background: rgba(52, 211, 153, 0.18); color: #6ee7b7;
}

/* Zone 2: Horizontal Camera Lens Zoom Dial (Pure GPU translate3d Tape) */
.gx-scale-dial {
  position: relative;
  width: 168px; height: 26px; flex: 0 0 auto;
  cursor: grab; touch-action: none; outline: none;
  border-radius: 999px;
}
.gx-scale-dial:active { cursor: grabbing; }
.gx-scale-dial:focus-visible {
  box-shadow: 0 0 0 2px var(--primary-100);
}
.gx-dial-needle {
  position: absolute; left: 50%; top: 1px; z-index: 3;
  width: 1.5px; height: 10px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 8px rgba(26, 115, 232, 0.55);
  pointer-events: none;
  transition: background-color .2s, box-shadow .2s;
}
.gx-dial-needle::before {
  content: '';
  position: absolute; top: -1px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%;
  background: inherit;
}
html[data-theme="dark"] .gx-dial-needle {
  background: #8ab4f8;
  box-shadow: 0 0 10px rgba(138, 180, 248, 0.72);
}
.gx-scale-bar.is-3d-comm .gx-dial-needle,
.gx-scale-bar.is-journey .gx-dial-needle {
  background: var(--success);
  box-shadow: 0 0 10px rgba(16, 163, 127, 0.65);
}
html[data-theme="dark"] .gx-scale-bar.is-3d-comm .gx-dial-needle,
html[data-theme="dark"] .gx-scale-bar.is-journey .gx-dial-needle {
  background: #4cc38a;
  box-shadow: 0 0 10px rgba(76, 195, 138, 0.75);
}
.gx-dial-viewport {
  position: relative; width: 100%; height: 100%; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 18%, #000 82%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 18%, #000 82%, transparent 100%);
}
.gx-dial-tape {
  position: absolute; left: 50%; top: 0; bottom: 0; width: 0;
  will-change: transform;
  transform: translate3d(0px, 0, 0);
}
.gx-dial-fill {
  position: absolute; left: 0; top: 9px;
  width: 272px; height: 1.5px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--success));
  opacity: 0.72;
  transform-origin: left center;
  transform: scaleX(0);
  will-change: transform;
  pointer-events: none;
}
html[data-theme="dark"] .gx-dial-fill {
  background: linear-gradient(90deg, #8ab4f8, #4cc38a);
  opacity: 0.85;
}
.gx-dial-ruler-svg {
  position: absolute; left: -48px; top: 1px;
  display: block; pointer-events: none;
  color: #111215;
}
html[data-theme="dark"] .gx-dial-ruler-svg { color: #e2e8f0; }
.gx-dial-ticks-lead { stroke: currentColor; stroke-width: 1; opacity: 0.16; }
.gx-dial-ticks-minor { stroke: currentColor; stroke-width: 1; opacity: 0.28; }
.gx-dial-ticks-mid { stroke: currentColor; stroke-width: 1.1; opacity: 0.48; }
.gx-dial-ticks-major { stroke: currentColor; stroke-width: 1.35; opacity: 0.78; }
.gx-dial-stop {
  position: absolute; top: 10.5px; transform: translateX(-50%);
  height: 15px; padding: 0 5px; border: 0; border-radius: 4px;
  background: transparent;
  display: inline-flex; align-items: center; justify-content: center;
  color: rgba(17, 18, 21, 0.50); font-size: 9.8px; font-weight: 560; line-height: 1; white-space: nowrap;
  cursor: pointer; z-index: 2;
  transition: color .15s, transform .15s;
}
html[data-theme="dark"] .gx-dial-stop { color: rgba(203, 213, 225, 0.54); }
.gx-dial-stop.is-passed { color: rgba(17, 18, 21, 0.66); }
html[data-theme="dark"] .gx-dial-stop.is-passed { color: rgba(226, 232, 240, 0.68); }
.gx-dial-stop.is-current {
  color: #111215; font-weight: 720;
}
html[data-theme="dark"] .gx-dial-stop.is-current {
  color: #ffffff;
}
.gx-dial-stop:hover { color: var(--primary); }
html[data-theme="dark"] .gx-dial-stop:hover { color: #93c5fd; }

@media (max-width: 780px) {
  .gx-hud-meta { display: none; }
  .gx-scale-dial { width: 140px; }
}
@media (max-width: 640px) {
  .gx-ambient-hud {
    display: flex; align-items: center; justify-content: space-between; gap: 6px;
  }
  .gx-hud-center { padding-inline: 0; }
  .gx-scale-dial { width: 112px; }
  .gx-scale-metric-box { min-width: 44px; }
  .gx-hud-btn span { display: none; }
  .gx-hud-btn { padding: 0 8px; }
}

.gx-globe-stage.is-dark .gx-mini-btn {
  background: linear-gradient(180deg, rgba(34, 38, 50, 0.46) 0%, rgba(18, 20, 28, 0.34) 100%);
  backdrop-filter: saturate(190%) brightness(1.14) blur(18px); -webkit-backdrop-filter: saturate(190%) brightness(1.14) blur(18px);
  border-color: rgba(255, 255, 255, 0.18);
  color: #e4e7ef;
  box-shadow: 0 6px 18px -4px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.gx-globe-stage.is-dark .gx-mini-btn:hover { background: linear-gradient(180deg, rgba(46, 52, 68, 0.62) 0%, rgba(26, 30, 42, 0.50) 100%); color: #ffffff; border-color: rgba(255, 255, 255, 0.28); }

/* Subtle floating controls on Globe (luminous macOS glass capsules, crisp on hover/interaction) */
.gx-globe-ctrls {
  position: absolute; right: 12px; bottom: 12px; z-index: 6;
  display: inline-flex; align-items: center; gap: 5px;
  opacity: 0.78;
  transition: opacity .24s ease;
}
.gx-globe-stage:hover .gx-globe-ctrls,
.gx-globe-stage.is-zoomed .gx-globe-ctrls,
.gx-globe-stage.is-amap-active .gx-globe-ctrls,
.gx-globe-ctrls:focus-within {
  opacity: 1;
}
.gx-mini-btn {
  display: inline-flex; align-items: center; gap: 4.5px;
  height: 25px; padding: 0 9px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.64) 0%, rgba(255, 255, 255, 0.42) 100%);
  backdrop-filter: saturate(190%) blur(18px); -webkit-backdrop-filter: saturate(190%) blur(18px);
  color: #2b2e35; font-size: 11.2px; font-weight: 560;
  box-shadow: 0 4px 14px -2px rgba(15, 23, 42, 0.10), 0 0 0 0.5px rgba(15, 17, 21, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  transition: border-color .18s, color .18s, background-color .18s, box-shadow .18s;
}
.gx-mini-btn:hover { border-color: rgba(255, 255, 255, 0.95); color: #111215; background: rgba(255, 255, 255, 0.78); }

/* Globe Hover Tooltip */
.gx-tooltip {
  position: absolute; z-index: 12; pointer-events: none;
  padding: 8px 11px; border-radius: 10px;
  background: rgba(22, 23, 28, 0.92); color: #ececf1;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
  font-size: 12px; line-height: 1.45; white-space: nowrap;
  transform: translate(-50%, calc(-100% - 12px));
  transition: opacity .14s;
}
.gx-tooltip strong { display: block; font-size: 12.5px; font-weight: 650; color: #fff; }
.gx-tooltip span { color: #b6bac4; font-size: 11.5px; }

/* Telemetry Strip under Globe (Only shows active route journey or minimal node chips) */
.gx-telemetry {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px;
  margin: 4px 0 12px;
  min-height: 0;
}
.gx-telemetry:empty { display: none; }
.gx-tele-pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 25px; padding: 0 11px; border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-highlight);
  color: var(--text-2); font-size: 11.8px; font-weight: 520;
}
.gx-tele-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); flex: 0 0 auto; }
.gx-tele-dot.is-idle { background: var(--text-3); }
.gx-tele-dot.is-streaming { background: var(--primary); animation: blink .9s ease-in-out infinite; }
.gx-node-chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 25px; padding: 0 10px; border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-highlight);
  color: var(--text-2); font-size: 11.5px; font-weight: 520;
  transition: border-color .18s, background-color .18s, color .18s, transform .18s;
}
.gx-node-chip:hover {
  border-color: var(--primary-100); background: var(--primary-50); color: var(--primary);
  transform: translateY(-1px);
}
.gx-node-chip i { width: 5px; height: 5px; border-radius: 50%; background: var(--success); }
.gx-node-chip.is-busy i { background: var(--warn); animation: blink .9s ease-in-out infinite; }

/* Editorial Conversation Stream */
.gx-thread {
  width: 100%; max-width: 768px;
  flex: 1 1 auto;
  display: flex; flex-direction: column; gap: 28px;
  padding: 16px 4px 28px;
}
.gx-turn {
  display: flex; flex-direction: column; gap: 18px;
  padding-bottom: 6px;
}
.gx-turn + .gx-turn {
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.gx-user-row { display: flex; justify-content: flex-end; }
.gx-user-bubble {
  max-width: min(84%, 600px);
  padding: 11px 17px;
  border-radius: 20px 20px 6px 20px;
  background: var(--user-pill);
  border: 1px solid var(--user-pill-border);
  color: var(--text);
  font-size: 15px; line-height: 1.64;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.gx-asst-row {
  display: flex; gap: 14px; align-items: flex-start;
}
.gx-asst-icon {
  width: 30px; height: 30px; flex: 0 0 auto; border-radius: 9px;
  margin-top: 1px; display: grid; place-items: center;
  font-size: 12.5px; font-weight: 700;
  color: var(--c1, hsl(var(--h, 221) 70% 48%));
  background: color-mix(in srgb, var(--c1, var(--primary)) 8%, var(--surface-solid));
  border: 1px solid color-mix(in srgb, var(--c1, var(--primary)) 18%, var(--line));
  box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.8), 0 1px 2px rgba(15, 17, 21, 0.04);
}
.gx-asst-icon.is-mono {
  color: var(--text);
  background: var(--surface-solid);
  border-color: var(--line);
}
.gx-asst-icon.is-alias {
  color: var(--primary);
  background: var(--primary-50);
  border-color: var(--primary-100);
}
html[data-theme="dark"] .gx-asst-icon {
  color: color-mix(in srgb, var(--c1, #60a5fa) 76%, #ffffff);
  background: color-mix(in srgb, var(--c1, #60a5fa) 14%, rgba(255, 255, 255, 0.06));
  border-color: color-mix(in srgb, var(--c1, #60a5fa) 22%, rgba(255, 255, 255, 0.10));
  box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.08);
}
html[data-theme="dark"] .gx-asst-icon.is-mono {
  color: #f1f3f8;
  background: rgba(255, 255, 255, 0.075);
  border-color: rgba(255, 255, 255, 0.12);
}
html[data-theme="dark"] .gx-asst-icon.is-alias {
  color: var(--primary);
  background: var(--primary-50);
  border-color: var(--primary-100);
}
.gx-asst-icon .lobe-logo { width: 18px; height: 18px; }
.gx-asst-body {
  flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 9px;
}
.gx-asst-head {
  display: flex; align-items: center; flex-wrap: wrap; gap: 7px;
  font-size: 12.5px; color: var(--text-3);
  min-height: 24px;
}
.gx-asst-head strong { color: var(--text); font-size: 13.5px; font-weight: 640; letter-spacing: -0.01em; }
.gx-asst-prose {
  font-size: 15.2px; line-height: 1.78; color: var(--text); overflow-wrap: anywhere;
}

/* Floating Scroll-to-Bottom Pill (Anchored cleanly above Composer) */
.gx-scroll-bottom {
  position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%);
  z-index: 16;
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 13px; border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--surface-elevated);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  color: var(--text); font-size: 12.5px; font-weight: 560; white-space: nowrap;
  box-shadow: var(--shadow);
  transition: transform .18s, opacity .18s, border-color .18s;
}
.gx-scroll-bottom[hidden] { display: none !important; }
.gx-scroll-bottom:hover { border-color: var(--primary-100); color: var(--primary); transform: translate(-50%, -2px); }
.gx-scroll-bottom i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--primary);
  animation: blink .9s ease-in-out infinite;
}
.gx-scroll-bottom:not(.is-streaming) i { display: none; }

/* Flagship Composer Shell */
.gx-dock {
  width: 100%; max-width: 768px;
  display: flex; flex-direction: column; align-items: center;
  position: relative; z-index: 10;
}
.gx-home.has-turns .gx-dock {
  position: sticky; bottom: 0;
  padding: 10px 0 18px;
  background: linear-gradient(180deg, var(--dock-fade) 0%, var(--dock-solid) 28%, var(--dock-solid) 100%);
}
.gx-composer {
  width: 100%;
  background: var(--composer-bg);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--line-2);
  border-radius: 24px;
  padding: 15px 15px 11px 19px;
  box-shadow: var(--composer-shadow);
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.gx-composer:focus-within {
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: var(--composer-focus-shadow);
}
html[data-theme="light"] .gx-composer:focus-within {
  border-color: rgba(17, 18, 21, 0.28);
}
.gx-composer.is-privacy-locked {
  border-color: rgba(16, 163, 127, 0.38);
  box-shadow: 0 18px 42px -12px rgba(16, 163, 127, 0.12), 0 0 0 3px var(--success-50);
}

/* Live Privacy Pre-Flight Shield Banner */
.gx-privacy-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: -2px 0 8px; padding: 6px 10px; border-radius: 12px;
  background: var(--success-50); border: 1px solid rgba(16, 163, 127, 0.22);
  color: var(--success); font-size: 12px; line-height: 1.45;
}
.gx-privacy-banner-main { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1; font-weight: 540; }
.gx-privacy-banner-main span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gx-privacy-act {
  flex: 0 0 auto; height: 22px; padding: 0 8px; border-radius: 999px;
  border: 1px solid rgba(16, 163, 127, 0.30); background: var(--surface);
  color: var(--success); font-size: 11px; font-weight: 600;
  transition: background-color .15s, border-color .15s;
}
.gx-privacy-act:hover { background: var(--success-50); border-color: var(--success); }

.gx-tool-pill[data-nas-active="true"] {
  background: var(--primary-50); color: var(--primary); border-color: var(--primary-100); font-weight: 620;
}
.gx-tool-pill[data-privacy="local-only"] {
  background: var(--success-50); color: var(--success); border-color: rgba(16, 163, 127, 0.25); font-weight: 620;
}

/* Three-Stage Live P2P / KV / Warm Routing Stepper (Codex-style borderless quiet status trace) */
.rx-route-stepper {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  padding: 2px 0; border-radius: 0;
  background: transparent; border: 0;
  font-size: 11.8px; color: var(--text-3);
}
.rx-step-node {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--text-3); font-weight: 480;
}
.rx-step-node.is-done { color: var(--text-3); }
.rx-step-node.is-active { color: var(--primary); font-weight: 560; }
.rx-step-node.is-p2p { color: var(--text-2); font-weight: 540; }
.rx-step-node.is-p2p .rx-step-dot { background: var(--success); }
.rx-step-dot {
  width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex: 0 0 auto;
}
.rx-step-node.is-active .rx-step-dot { animation: blink .85s ease-in-out infinite; }
.rx-step-sep { color: var(--text-3); opacity: 0.45; font-size: 11px; user-select: none; }
.rx-boost-chip {
  display: inline-flex; align-items: center; gap: 4px;
  height: 19px; padding: 0 6.5px; border-radius: 999px;
  font-size: 10.8px; font-weight: 500;
  background: var(--surface-2); border: 1px solid transparent; color: var(--text-3);
}
.rx-boost-chip.is-warm { color: var(--text-2); background: var(--surface-2); border-color: var(--line); }
.rx-boost-chip.is-kv { color: var(--text-2); background: var(--surface-2); border-color: var(--line); }
.rx-boost-chip.is-priv { color: var(--success); background: var(--success-50); border-color: transparent; }
.rx-save-pill {
  display: inline-flex; align-items: center; gap: 4px;
  height: 21px; padding: 0 8px; border-radius: 999px;
  background: var(--success-50); color: var(--success);
  font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums;
}

/* Inline NAS Data-Gravity Tool Call Timeline */
.rx-nas-card {
  margin: 2px 0 8px; border-radius: 13px; overflow: hidden;
  border: 1px solid var(--line-2); background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.rx-nas-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;
  padding: 8px 12px; background: var(--surface-2); border-bottom: 1px solid var(--line);
  font-size: 12.2px;
}
.rx-nas-title { display: inline-flex; align-items: center; gap: 6px; font-weight: 620; color: var(--text); }
.rx-nas-title .icon { color: var(--primary); }
.rx-nas-seal {
  display: inline-flex; align-items: center; gap: 4px;
  height: 20px; padding: 0 8px; border-radius: 999px;
  background: var(--success-50); color: var(--success); font-size: 11px; font-weight: 600;
}
.rx-nas-list {
  display: flex; flex-direction: column; gap: 5px;
  padding: 8px 12px; max-height: 210px; overflow-y: auto;
}
.rx-nas-item {
  display: flex; align-items: center; gap: 8px; min-width: 0;
  font-size: 12px; color: var(--text-2); line-height: 1.45;
}
.rx-nas-step-badge {
  flex: 0 0 auto; font-family: var(--font-mono); font-size: 10.5px; font-weight: 600;
  padding: 1px 6px; border-radius: 5px; background: var(--surface-2); color: var(--text-3);
}
.rx-nas-tool {
  flex: 0 0 auto; font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; color: var(--primary);
}
.rx-nas-arg {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--text-3); font-family: var(--font-mono); font-size: 11.2px;
}
.rx-nas-st { flex: 0 0 auto; font-size: 11px; font-weight: 600; color: var(--success); }
.rx-nas-st.is-pending { color: var(--primary); }
.rx-nas-st.is-err { color: var(--danger); }

/* Clickable NAS Source Citations */
.rx-citations {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--line);
}
.rx-cite-label { font-size: 11.5px; color: var(--text-3); font-weight: 560; margin-right: 2px; }
.rx-cite-chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 24px; padding: 0 9px; border-radius: 7px;
  border: 1px solid var(--line-2); background: var(--surface-2);
  color: var(--text); font-family: var(--font-mono); font-size: 11.5px;
  transition: border-color .16s, background-color .16s, color .16s;
}
.rx-cite-chip:hover { border-color: var(--primary-100); background: var(--primary-50); color: var(--primary); }

/* Enterprise Privacy Guard / Quota Compliance Interception Card */
.rx-guard-card {
  padding: 15px 17px; border-radius: 15px;
  border: 1px solid rgba(180, 105, 14, 0.30);
  background: linear-gradient(135deg, var(--warn-50) 0%, var(--surface) 68%);
  display: flex; flex-direction: column; gap: 10px;
  box-shadow: var(--shadow-sm);
}
.rx-guard-card.is-privacy {
  border-color: rgba(16, 163, 127, 0.34);
  background: linear-gradient(135deg, var(--success-50) 0%, var(--surface) 70%);
}
.rx-guard-top { display: flex; align-items: center; gap: 9px; }
.rx-guard-ico {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: 0 0 auto;
  background: var(--success-50); color: var(--success);
}
.rx-guard-card:not(.is-privacy) .rx-guard-ico { background: var(--warn-50); color: var(--warn); }
.rx-guard-top strong { font-size: 14px; font-weight: 660; color: var(--text); }
.rx-guard-top small { display: block; font-size: 11.8px; color: var(--text-3); }
.rx-guard-desc { font-size: 13.2px; line-height: 1.62; color: var(--text-2); }
.rx-guard-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.rx-guard-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 12px; border-radius: 8px;
  border: 1px solid var(--line-2); background: var(--surface);
  color: var(--text); font-size: 12.2px; font-weight: 580;
  transition: border-color .16s, background-color .16s, color .16s;
}
.rx-guard-btn:hover { border-color: var(--primary-100); color: var(--primary); background: var(--primary-50); }
.rx-guard-btn.is-primary { background: var(--text); color: var(--surface); border-color: transparent; }
.rx-guard-btn.is-primary:hover { opacity: 0.9; color: var(--surface); }

/* Read-Only NAS File Citation Preview Modal */
.nas-modal-backdrop {
  position: fixed; inset: 0; z-index: 80;
  background: var(--overlay);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: 20px;
}
.nas-modal {
  width: min(100%, 760px); max-height: min(82dvh, 680px);
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: 22px; border: 1px solid var(--line-2);
  background: var(--surface-elevated);
  backdrop-filter: saturate(180%) blur(30px); -webkit-backdrop-filter: saturate(180%) blur(30px);
  box-shadow: var(--glass-highlight), var(--shadow-lg);
}
.nas-modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2);
}
.nas-modal-head strong { font-family: var(--font-mono); font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nas-modal-body {
  flex: 1; overflow: auto; background: var(--code-bg); color: var(--code-fg);
  padding: 14px 16px; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.65;
  white-space: pre;
}
.gx-textarea {
  width: 100%;
  min-height: 50px; max-height: 200px;
  border: 0; background: transparent; resize: none;
  font-size: 15.2px; line-height: 1.58; color: var(--text);
  padding: 0 4px 6px 0;
  display: block;
}
.gx-textarea::placeholder { color: var(--text-3); }
.gx-textarea:focus { outline: none; }

.gx-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding-top: 4px;
}
.gx-bar-left {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap; min-width: 0;
}
.gx-bar-right {
  display: flex; align-items: center; gap: 10px; flex: 0 0 auto;
}
.gx-icon-btn {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--line-2);
  background: transparent; color: var(--text-2);
  display: grid; place-items: center; flex: 0 0 auto;
  transition: background-color .16s, color .16s, border-color .16s;
}
.gx-icon-btn:hover { background: var(--surface-2); color: var(--text); border-color: var(--primary-100); }

/* Toolbar Pills (Gemini / Codex borderless ghost controls; light up softly on hover or active state) */
.gx-picker-wrap { position: relative; }
.gx-tool-pill {
  display: inline-flex; align-items: center; gap: 5px;
  height: 30px; padding: 0 10px; border-radius: 999px;
  border: 1px solid transparent; background: transparent;
  color: var(--text-2); font-size: 12.6px; font-weight: 520;
  max-width: 230px;
  transition: background-color .16s, color .16s, border-color .16s;
}
.gx-tool-pill:hover,
.gx-tool-pill[aria-expanded="true"] {
  background: var(--surface-2); color: var(--text); border-color: transparent;
}
.gx-tool-pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gx-model-pill-icon {
  display: inline-grid; place-items: center;
  width: 16px; height: 16px; flex: 0 0 auto;
  overflow: visible !important;
  color: currentColor;
}
.gx-model-pill-icon.is-mono { color: var(--text); }
.gx-menu-logo {
  width: 26px; height: 26px; flex: 0 0 auto; border-radius: 7.5px;
  display: inline-grid; place-items: center;
  font-family: var(--font-num); font-size: 11px; font-weight: 680;
  color: var(--c1, var(--primary));
  background: color-mix(in srgb, var(--c1, var(--primary)) 8%, var(--surface-solid));
  border: 1px solid color-mix(in srgb, var(--c1, var(--primary)) 16%, var(--line));
}
.gx-menu-logo.is-mono {
  color: var(--text);
  background: var(--surface-solid);
  border-color: var(--line);
}
.gx-menu-logo.is-alias {
  color: var(--primary);
  background: var(--primary-50);
  border-color: var(--primary-100);
}
html[data-theme="dark"] .gx-menu-logo {
  background: color-mix(in srgb, var(--c1, #60a5fa) 14%, rgba(255, 255, 255, 0.065));
  border-color: color-mix(in srgb, var(--c1, #60a5fa) 22%, rgba(255, 255, 255, 0.10));
}
html[data-theme="dark"] .gx-menu-logo.is-mono {
  color: #f1f3f8;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}
html[data-theme="dark"] .gx-menu-logo.is-alias {
  color: var(--primary);
  background: var(--primary-50);
  border-color: var(--primary-100);
}
.gx-menu-logo .lobe-logo { width: 16px; height: 16px; }
.cmdk-model-logo {
  display: inline-grid; place-items: center;
  width: 18px; height: 18px; flex: 0 0 auto;
  color: var(--text);
}
.gx-tool-pill .gx-caret { width: 13px; height: 13px; opacity: 0.65; transition: transform .18s; }
.gx-tool-pill[aria-expanded="true"] .gx-caret { transform: rotate(90deg); }
.gx-tool-pill[data-route="p2p"] .icon { color: var(--success); }
.gx-tool-pill[data-route="relay"] .icon { color: var(--primary); }

/* Popover Model Menu */
@keyframes gxPopIn {
  from { opacity: 0; transform: translateY(4px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.gx-menu {
  position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 40;
  width: min(350px, calc(100vw - 40px)); max-height: 340px; overflow-y: auto;
  padding: 6px; border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(247, 249, 253, 0.93) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 1), 0 0 0 0.5px rgba(15, 23, 42, 0.10), 0 22px 54px -12px rgba(15, 23, 42, 0.22);
  animation: gxPopIn .16s cubic-bezier(.22, 1, .36, 1) both;
}
html[data-theme="dark"] .gx-menu {
  border-color: rgba(255, 255, 255, 0.16);
  background: linear-gradient(180deg, rgba(30, 34, 46, 0.95) 0%, rgba(18, 20, 28, 0.94) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 24px 60px -12px rgba(0, 0, 0, 0.78);
}
.gx-menu.open-down { bottom: auto; top: calc(100% + 8px); }
.gx-menu-group {
  padding: 6px 10px 4px; color: var(--text-3);
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.02em;
}
.gx-menu-group + .gx-menu-group { margin-top: 4px; border-top: 1px solid var(--line); padding-top: 8px; }
.gx-menu-item {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 10px; border: 0; border-radius: 10px;
  background: transparent; text-align: left; color: var(--text);
  font-size: 13px; transition: background-color .14s;
}
.gx-menu-item:hover { background: var(--surface-2); }
.gx-menu-item.is-selected { background: var(--primary-50); color: var(--primary); font-weight: 600; }
.gx-menu-main { min-width: 0; flex: 1; }
.gx-menu-main strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: inherit; }
.gx-menu-main small { display: block; color: var(--text-3); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gx-menu-badge {
  flex: 0 0 auto; font-size: 11.5px; color: var(--text-3);
  display: inline-flex; align-items: center; gap: 4px;
}

.gx-hint { color: var(--text-3); font-size: 12px; white-space: nowrap; }

/* Circular Submit / Stop Button */
.gx-send {
  width: 34px; height: 34px; border-radius: 50%; border: 0;
  display: grid; place-items: center; flex: 0 0 auto;
  background: var(--surface-3); color: var(--text-3);
  transition: background-color .18s, color .18s, transform .15s, box-shadow .18s;
}
.gx-send.is-ready {
  background: var(--text); color: var(--bg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
}
.gx-send.is-running {
  background: var(--danger); color: var(--primary-fg);
}
.gx-send.is-ready:hover { opacity: 0.88; }
.gx-send.is-running:hover { opacity: 0.92; }
.gx-send.is-ready:active,
.gx-send.is-running:active { transform: scale(0.93); }
.gx-send:disabled { opacity: 1; cursor: default; }

/* Gemini-Style Airy Frosted Prompt Chips (Lightweight single-row pills beneath Composer) */
.gx-suggest-wrap {
  width: 100%; max-width: 768px; margin-top: 14px;
}
.gx-home.has-turns .gx-suggest-wrap { display: none; }
.gx-suggest {
  width: 100%;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px;
  max-width: 768px;
}
.gx-home.has-turns .gx-suggest { display: none; }
.gx-suggest-card {
  display: inline-flex; flex-direction: row; align-items: center; gap: 7px;
  height: 35px; padding: 0 14px 0 12px; border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  text-align: left;
  box-shadow: var(--glass-highlight), var(--shadow-sm);
  transition: border-color .18s cubic-bezier(.2, .8, .2, 1), background-color .18s, transform .18s cubic-bezier(.2, .8, .2, 1), box-shadow .18s, color .18s;
}
.gx-suggest-card:hover {
  border-color: var(--line-2); background: var(--surface-elevated);
  transform: translateY(-1px); box-shadow: var(--glass-highlight), var(--shadow);
}
.gx-suggest-card:hover .gx-suggest-ico {
  color: var(--text);
}
.gx-suggest-card.is-selected {
  border-color: var(--primary-100);
  background: var(--primary-50);
}
.gx-suggest-ico {
  width: 16px; height: 16px; border-radius: 0; flex: 0 0 auto;
  display: grid; place-items: center;
  background: transparent; color: var(--text-3);
  border: 0;
  transition: color .16s;
}
.gx-suggest-card.is-selected .gx-suggest-ico {
  background: transparent; color: var(--primary); border-color: transparent;
}
.gx-suggest-txt { min-width: 0; }
.gx-suggest-txt strong {
  display: block; font-size: 12.6px; font-weight: 540; letter-spacing: -0.01em; color: var(--text-2);
  white-space: nowrap;
  transition: color .16s;
}
.gx-suggest-card:hover .gx-suggest-txt strong,
.gx-suggest-card.is-selected .gx-suggest-txt strong {
  color: var(--text);
}
.gx-suggest-txt span {
  display: none;
}

/* Multi-node selection & filtering states (Classic Topology Map) */
.entity-node { transition: border-color .25s, box-shadow .25s, opacity .28s, transform .25s; }
.entity-node.is-probing {
  border-color: var(--primary-100);
  box-shadow: 0 0 0 4px var(--primary-50);
}
.entity-node.is-eliminated { opacity: 0.38; transform: scale(0.985); }
.entity-node.is-winner-lock {
  border-color: var(--success);
  box-shadow: 0 0 0 4px var(--success-50);
}
.link-probing { stroke: var(--primary); stroke-width: 2; stroke-dasharray: 5 6; animation: dash 0.55s linear infinite; }
.link-winner { stroke: var(--success); stroke-width: 2.4; }

@media (max-width: 1080px) {
  .wrap { width: min(100% - 28px, 1320px); }
  .topbar-inner { gap: 10px; }
  .brand-text span { display: none; }
  .top-tab { padding: 0 9px; font-size: 13px; }
  .topbar-right { gap: 8px; }
  .live-pill { padding: 0 10px; font-size: 12.5px; }
  .view-switch-opt { padding: 0 8px; font-size: 12px; }
}

@media (max-width: 860px) {
  .gx-suggest { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .view-switch-opt span { display: none; }
  .view-switch-opt { padding: 0 9px; }
  .gx-globe-stage { height: 224px; }
  .gx-home.has-turns.globe-expanded .gx-globe-stage { height: 190px; }
  .gx-composer { border-radius: 20px; padding: 12px 12px 9px 14px; }
  .gx-hint { display: none; }
  .gx-tool-pill { max-width: 175px; font-size: 12.5px; padding: 0 8px; }
  .gx-suggest { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .gx-hud-meta { display: none; }
}

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

/* ---------- Phase 3: Commercial 3-Pane Workspace (Sidebar + Chat + Artifacts) ---------- */
.gx-workspace {
  display: flex; align-items: stretch;
  min-height: calc(100dvh - 64px);
  width: 100%; position: relative;
}

/* Collapsible Multi-Session Left Sidebar (Codex-Style Calm Borderless Carbon/Paper Pane) */
.gx-sidebar {
  width: 256px; flex: 0 0 256px;
  position: sticky; top: 53px; height: calc(100dvh - 53px);
  display: flex; flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--sidebar-bg, var(--surface));
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  transition: margin-left .28s cubic-bezier(.2, .8, .2, 1), opacity .22s ease;
  z-index: 22; overflow: hidden;
}
body[data-sidebar="closed"] .gx-sidebar {
  margin-left: -256px; opacity: 0; pointer-events: none;
}
.sb-head {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 10px 6px;
}
.sb-new-btn {
  flex: 1; height: 34px; padding: 0 10px; border-radius: 9px;
  border: 1px solid transparent; background: transparent;
  color: var(--text); font-size: 13px; font-weight: 540;
  display: inline-flex; align-items: center; justify-content: space-between; gap: 8px;
  transition: border-color .16s, background-color .16s, color .16s;
}
.sb-new-btn:hover { background: var(--surface-2); color: var(--text); }
.sb-new-left { display: inline-flex; align-items: center; gap: 8px; }
.sb-kbd {
  padding: 0; border-radius: 0;
  background: transparent; border: 0;
  color: var(--text-3); font-family: var(--font-mono); font-size: 11px;
}
.sb-search-wrap { padding: 2px 10px 8px; }
.sb-search {
  width: 100%; height: 31px; padding: 0 10px; border-radius: 8px;
  border: 1px solid transparent; background: var(--surface-2);
  color: var(--text); font-size: 12.5px;
  transition: border-color .16s, background-color .16s;
}
.sb-search:focus { outline: none; border-color: var(--line-2); background: var(--surface); }
.sb-list {
  flex: 1; overflow-y: auto; padding: 4px 10px 14px;
  display: flex; flex-direction: column; gap: 2px;
}
.sb-group-label {
  padding: 8px 8px 4px; color: var(--text-3);
  font-size: 11px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase;
}
.sb-item {
  position: relative; display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 8px;
  cursor: pointer; color: var(--text-2);
  transition: background-color .14s, color .14s;
}
.sb-item:hover { background: var(--surface-2); color: var(--text); }
.sb-item.is-active {
  background: var(--surface-3); color: var(--text); font-weight: 580;
}
.sb-item-main { flex: 1; min-width: 0; }
.sb-item-title {
  display: block; font-size: 13px; line-height: 1.38;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: inherit;
}
.sb-item-sub {
  display: flex; align-items: center; gap: 6px; margin-top: 2px;
  font-size: 11px; color: var(--text-3); font-weight: 450;
}
.sb-item-acts {
  display: none; align-items: center; gap: 2px; flex: 0 0 auto;
}
.sb-item:hover .sb-item-acts,
.sb-item.is-active .sb-item-acts { display: inline-flex; }
.sb-act-btn {
  width: 22px; height: 22px; border-radius: 6px; border: 0;
  background: transparent; color: var(--text-3);
  display: grid; place-items: center; font-size: 11px;
  transition: background-color .14s, color .14s;
}
.sb-act-btn:hover { background: var(--surface); color: var(--text); }
.sb-act-btn.is-danger:hover { color: var(--danger); background: var(--danger-50); }
.sb-foot {
  padding: 10px 14px; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 11.5px; color: var(--text-3);
}
.sb-backdrop {
  display: none; position: fixed; inset: 64px 0 0; z-index: 21;
  background: var(--overlay); backdrop-filter: blur(2px);
}

/* Main Column inside 3-Pane Workspace + Full-Viewport Seamless Cartographic Backdrop */
.gx-main-col {
  flex: 1 1 auto; min-width: 0;
  display: flex; flex-direction: column; align-items: center;
  padding: 0 16px;
  position: relative;
  isolation: isolate;
}
html[data-theme="dark"] body[data-home="globe"] .gx-main-col {
  background: transparent;
}
.gx-backdrop-wrap {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  margin: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  transition: opacity 1.15s cubic-bezier(.22, 1, .36, 1), filter 1.15s ease, transform 1.4s cubic-bezier(.22, 1, .36, 1);
}
body[data-home="focus"]:not(.globe-drawer-forced) .gx-backdrop-wrap {
  opacity: 0;
}
.gx-main-col:has(.gx-home.has-turns.is-routing-journey:not(.globe-expanded)) .gx-backdrop-wrap {
  opacity: 0.96;
  filter: none;
  transform: none;
  transition: opacity .55s ease, filter .55s ease, transform .55s ease;
}
.gx-main-col:has(.gx-home.has-turns:not(.globe-expanded):not(.is-routing-journey)) .gx-backdrop-wrap {
  opacity: 0.56;
}
.gx-main-col:has(.gx-home.has-turns:not(.globe-expanded)) .gx-backdrop-wrap.is-settled-dim {
  opacity: 0.30;
  filter: blur(18px) saturate(0.76) brightness(0.74);
  transform: scale(1.04);
  transition: opacity 4.2s cubic-bezier(.22, 1, .36, 1), filter 4.2s ease, transform 4.2s cubic-bezier(.22, 1, .36, 1);
}
html[data-theme="light"] .gx-main-col:has(.gx-home.has-turns:not(.globe-expanded)) .gx-backdrop-wrap.is-settled-dim {
  opacity: 0.28;
  filter: blur(18px) saturate(0.75) brightness(1.06);
  transform: scale(1.04);
}
.gx-main-col:has(.gx-home.has-turns.globe-expanded) .gx-backdrop-wrap {
  opacity: 1;
  filter: none;
  transform: none;
  transition: opacity .45s ease, filter .45s ease, transform .45s ease;
}
@media (prefers-reduced-motion: reduce) {
  .gx-backdrop-wrap,
  .gx-main-col:has(.gx-home.has-turns:not(.globe-expanded)) .gx-backdrop-wrap.is-settled-dim {
    transition-duration: .01s !important;
  }
}
.gx-backdrop-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.gx-main-col > .gx-home {
  width: min(100%, 840px);
  position: relative;
  z-index: 1;
  pointer-events: none;
}
.gx-main-col > .gx-home > * {
  pointer-events: auto;
}
.gx-main-col > .gx-home > .gx-globe-sec {
  pointer-events: none;
}
.gx-main-col > .gx-home > .gx-globe-sec > * {
  pointer-events: auto;
}

/* macOS Liquid Glass × Gemini Spatial Dock × Codex Borderless Order over Full-Viewport Cosmos & Map */
html[data-theme="dark"] body[data-tab="chat"][data-home="globe"] .topbar {
  background: linear-gradient(180deg, rgba(24, 28, 42, 0.42) 0%, rgba(14, 16, 25, 0.28) 100%);
  backdrop-filter: saturate(210%) brightness(1.12) blur(28px);
  -webkit-backdrop-filter: saturate(210%) brightness(1.12) blur(28px);
  border-bottom-color: rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 -0.5px 0 rgba(255, 255, 255, 0.08), 0 10px 30px -12px rgba(0, 0, 0, 0.48);
}
html[data-theme="dark"] body[data-tab="chat"][data-home="globe"] .gx-sidebar {
  background: linear-gradient(180deg, rgba(22, 26, 40, 0.44) 0%, rgba(12, 14, 22, 0.34) 100%);
  backdrop-filter: saturate(210%) brightness(1.12) blur(30px);
  -webkit-backdrop-filter: saturate(210%) brightness(1.12) blur(30px);
  border-right-color: rgba(255, 255, 255, 0.14);
  box-shadow:
    inset -1px 0 0 rgba(255, 255, 255, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    12px 0 38px -14px rgba(0, 0, 0, 0.56);
}
html[data-theme="dark"] body[data-tab="chat"][data-home="globe"] .gx-sidebar .sb-group-label,
html[data-theme="dark"] body[data-tab="chat"][data-home="globe"] .gx-sidebar .sb-item-sub,
html[data-theme="dark"] body[data-tab="chat"][data-home="globe"] .gx-sidebar .sb-tenant-meta small,
html[data-theme="dark"] body[data-tab="chat"][data-home="globe"] .gx-sidebar .sb-quota-labels,
html[data-theme="dark"] body[data-tab="chat"][data-home="globe"] .gx-sidebar .sb-sess-mini,
html[data-theme="dark"] body[data-tab="chat"][data-home="globe"] .gx-sidebar .sb-search::placeholder {
  color: rgba(224, 230, 242, 0.58);
}
html[data-theme="dark"] body[data-tab="chat"][data-home="globe"] .gx-sidebar .sb-search {
  background: rgba(255, 255, 255, 0.065);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
html[data-theme="dark"] body[data-tab="chat"][data-home="globe"] .gx-sidebar .sb-search:focus {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.22);
}
html[data-theme="dark"] body[data-tab="chat"][data-home="globe"] .gx-sidebar .sb-item.is-active {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.13) 0%, rgba(255, 255, 255, 0.08) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 4px 14px -6px rgba(0, 0, 0, 0.40);
}
html[data-theme="dark"] body[data-tab="chat"][data-home="globe"] .gx-sidebar .sb-filter-pill.is-active {
  background: rgba(255, 255, 255, 0.11);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
html[data-theme="dark"] body[data-home="globe"] .gx-home.has-turns .gx-dock {
  background: linear-gradient(180deg, rgba(10, 12, 18, 0) 0%, rgba(10, 12, 18, 0.44) 48%, rgba(10, 12, 18, 0.72) 100%);
}
html[data-theme="dark"] body[data-home="globe"] .gx-composer {
  background: linear-gradient(148deg, rgba(42, 48, 68, 0.38) 0%, rgba(18, 21, 32, 0.22) 54%, rgba(28, 34, 50, 0.32) 100%);
  backdrop-filter: saturate(220%) brightness(1.15) blur(30px);
  -webkit-backdrop-filter: saturate(220%) brightness(1.15) blur(30px);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow:
    inset 0 1.25px 0 rgba(255, 255, 255, 0.34),
    inset 0 -1px 0 rgba(255, 255, 255, 0.06),
    inset 0 0 0 0.5px rgba(255, 255, 255, 0.10),
    0 22px 54px -14px rgba(0, 0, 0, 0.64);
}
html[data-theme="dark"] body[data-home="globe"] .gx-composer:focus-within {
  background: linear-gradient(148deg, rgba(48, 56, 78, 0.48) 0%, rgba(22, 26, 38, 0.34) 54%, rgba(34, 40, 58, 0.42) 100%);
  border-color: rgba(255, 255, 255, 0.34);
  box-shadow:
    inset 0 1.25px 0 rgba(255, 255, 255, 0.42),
    inset 0 -1px 0 rgba(255, 255, 255, 0.09),
    inset 0 0 0 0.5px rgba(255, 255, 255, 0.14),
    0 26px 60px -14px rgba(0, 0, 0, 0.72),
    0 0 0 1px rgba(255, 255, 255, 0.14);
}
html[data-theme="dark"] body[data-home="globe"] .gx-textarea::placeholder {
  color: rgba(236, 240, 249, 0.60);
}
html[data-theme="dark"] body[data-home="globe"] .gx-suggest-card {
  background: linear-gradient(155deg, rgba(44, 50, 70, 0.34) 0%, rgba(18, 21, 32, 0.20) 100%);
  backdrop-filter: saturate(215%) brightness(1.14) blur(24px);
  -webkit-backdrop-filter: saturate(215%) brightness(1.14) blur(24px);
  border-color: rgba(255, 255, 255, 0.19);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 0 0 0.5px rgba(255, 255, 255, 0.07),
    0 10px 26px -8px rgba(0, 0, 0, 0.48);
}
html[data-theme="dark"] body[data-home="globe"] .gx-suggest-card:hover {
  background: linear-gradient(155deg, rgba(58, 66, 90, 0.48) 0%, rgba(28, 32, 48, 0.34) 100%);
  border-color: rgba(255, 255, 255, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.40),
    0 14px 32px -8px rgba(0, 0, 0, 0.56);
}
html[data-theme="dark"] body[data-home="globe"] .gx-user-bubble {
  background: linear-gradient(155deg, rgba(44, 50, 68, 0.48) 0%, rgba(22, 26, 38, 0.36) 100%);
  backdrop-filter: saturate(200%) brightness(1.10) blur(24px);
  -webkit-backdrop-filter: saturate(200%) brightness(1.10) blur(24px);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 8px 24px -10px rgba(0, 0, 0, 0.45);
}
html[data-theme="dark"] body[data-home="globe"] .gx-suggest-txt strong {
  color: rgba(240, 244, 252, 0.90);
}
html[data-theme="dark"] body[data-home="globe"] .gx-suggest-card:hover .gx-suggest-txt strong {
  color: #ffffff;
}
html[data-theme="dark"] body[data-home="globe"] .gx-suggest-ico {
  color: rgba(228, 234, 248, 0.76);
}
html[data-theme="dark"] body[data-home="globe"] .gx-tele-pill,
html[data-theme="dark"] body[data-home="globe"] .gx-node-chip {
  background: linear-gradient(180deg, rgba(36, 42, 58, 0.38) 0%, rgba(16, 19, 28, 0.26) 100%);
  backdrop-filter: saturate(205%) brightness(1.14) blur(22px);
  -webkit-backdrop-filter: saturate(205%) brightness(1.14) blur(22px);
  border-color: rgba(255, 255, 255, 0.17);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 6px 20px -6px rgba(0, 0, 0, 0.44);
  color: rgba(236, 240, 248, 0.90);
}
html[data-theme="dark"] body[data-home="globe"] .gx-ambient-hud {
  background: linear-gradient(180deg, rgba(38, 44, 62, 0.44) 0%, rgba(18, 21, 32, 0.30) 100%);
  backdrop-filter: saturate(210%) brightness(1.12) blur(26px);
  -webkit-backdrop-filter: saturate(210%) brightness(1.12) blur(26px);
  border-color: rgba(255, 255, 255, 0.17);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.26), 0 12px 32px -10px rgba(0, 0, 0, 0.50);
}
html[data-theme="dark"] body[data-home="globe"] .gx-tool-pill:not([data-nas-active="true"]):not([data-posture="strict"]):not([data-posture="arena"]):not([data-privacy="local-only"]),
html[data-theme="dark"] body[data-home="globe"] .gx-plus-btn {
  background: transparent;
  border-color: transparent;
  color: rgba(232, 237, 248, 0.84);
}
html[data-theme="dark"] body[data-home="globe"] .gx-tool-pill:not([data-nas-active="true"]):not([data-posture="strict"]):not([data-posture="arena"]):not([data-privacy="local-only"]):hover,
html[data-theme="dark"] body[data-home="globe"] .gx-tool-pill[aria-expanded="true"],
html[data-theme="dark"] body[data-home="globe"] .gx-plus-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  color: #ffffff;
}
html[data-theme="dark"] body[data-home="globe"] .gx-hud-btn:not(.is-active):not([aria-expanded="true"]),
html[data-theme="dark"] body[data-home="globe"] .gx-ctx-meter {
  background: rgba(255, 255, 255, 0.06);
  border-color: transparent;
  color: rgba(228, 234, 246, 0.80);
}
html[data-theme="dark"] body[data-home="globe"] .gx-hud-btn:hover {
  background: rgba(255, 255, 255, 0.13);
  color: #ffffff;
}
html[data-theme="dark"] body[data-home="globe"] .gx-hud-btn.is-active,
html[data-theme="dark"] body[data-home="globe"] .gx-hud-btn[aria-expanded="true"] {
  background: rgba(96, 165, 250, 0.18);
  border-color: rgba(96, 165, 250, 0.36);
  color: #93c5fd;
}

/* Light: macOS Daylight Liquid Glass × Gemini Spatial Dock × Codex Borderless Sidebar */
html:not([data-theme="dark"]) body[data-tab="chat"][data-home="globe"] .topbar {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.54) 0%, rgba(248, 251, 255, 0.34) 100%);
  backdrop-filter: saturate(215%) brightness(1.04) blur(28px);
  -webkit-backdrop-filter: saturate(215%) brightness(1.04) blur(28px);
  border-bottom-color: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 -0.5px 0 rgba(15, 23, 42, 0.07), 0 8px 26px -12px rgba(15, 23, 42, 0.09);
}
html:not([data-theme="dark"]) body[data-tab="chat"][data-home="globe"] .gx-sidebar {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.50) 0%, rgba(245, 249, 255, 0.36) 100%);
  backdrop-filter: saturate(215%) brightness(1.04) blur(30px);
  -webkit-backdrop-filter: saturate(215%) brightness(1.04) blur(30px);
  border-right-color: rgba(255, 255, 255, 0.84);
  box-shadow:
    inset -1px 0 0 rgba(255, 255, 255, 0.94),
    10px 0 30px -14px rgba(15, 23, 42, 0.11);
}
html:not([data-theme="dark"]) body[data-tab="chat"][data-home="globe"] .gx-sidebar .sb-search {
  background: rgba(255, 255, 255, 0.44);
  border-color: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88), 0 0 0 0.5px rgba(15, 23, 42, 0.05);
}
html:not([data-theme="dark"]) body[data-tab="chat"][data-home="globe"] .gx-sidebar .sb-search:focus {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(26, 115, 232, 0.32);
}
html:not([data-theme="dark"]) body[data-tab="chat"][data-home="globe"] .gx-sidebar .sb-item.is-active {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.76) 0%, rgba(255, 255, 255, 0.54) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96), 0 2px 10px -4px rgba(15, 23, 42, 0.10), 0 0 0 0.5px rgba(15, 23, 42, 0.06);
}
html:not([data-theme="dark"]) body[data-tab="chat"][data-home="globe"] .gx-sidebar .sb-filter-pill.is-active {
  background: rgba(255, 255, 255, 0.66);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), 0 1px 3px rgba(15, 23, 42, 0.06);
}
html:not([data-theme="dark"]) body[data-home="globe"] .gx-main-col {
  background: transparent;
}
html:not([data-theme="dark"]) body[data-home="globe"] .gx-home.has-turns .gx-dock {
  background: linear-gradient(180deg, rgba(245, 248, 253, 0) 0%, rgba(245, 248, 253, 0.52) 48%, rgba(245, 248, 253, 0.78) 100%);
}
html:not([data-theme="dark"]) body[data-home="globe"] .gx-composer {
  background: linear-gradient(148deg, rgba(255, 255, 255, 0.50) 0%, rgba(255, 255, 255, 0.22) 54%, rgba(255, 255, 255, 0.38) 100%);
  backdrop-filter: saturate(225%) brightness(1.05) blur(30px);
  -webkit-backdrop-filter: saturate(225%) brightness(1.05) blur(30px);
  border-color: rgba(255, 255, 255, 0.90);
  box-shadow:
    inset 0 1.25px 0 rgba(255, 255, 255, 1),
    inset 0 -1px 0 rgba(255, 255, 255, 0.42),
    inset 0 0 0 0.5px rgba(255, 255, 255, 0.72),
    0 0 0 0.5px rgba(15, 23, 42, 0.08),
    0 20px 48px -12px rgba(15, 23, 42, 0.14);
}
html:not([data-theme="dark"]) body[data-home="globe"] .gx-composer:focus-within {
  background: linear-gradient(148deg, rgba(255, 255, 255, 0.68) 0%, rgba(255, 255, 255, 0.40) 54%, rgba(255, 255, 255, 0.56) 100%);
  border-color: rgba(255, 255, 255, 0.98);
  box-shadow:
    inset 0 1.25px 0 rgba(255, 255, 255, 1),
    inset 0 -1px 0 rgba(255, 255, 255, 0.52),
    0 0 0 1px rgba(26, 115, 232, 0.28),
    0 24px 54px -12px rgba(15, 23, 42, 0.17);
}
html:not([data-theme="dark"]) body[data-home="globe"] .gx-suggest-card {
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.48) 0%, rgba(255, 255, 255, 0.20) 56%, rgba(255, 255, 255, 0.34) 100%);
  backdrop-filter: saturate(220%) brightness(1.05) blur(24px);
  -webkit-backdrop-filter: saturate(220%) brightness(1.05) blur(24px);
  border-color: rgba(255, 255, 255, 0.86);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 1),
    inset 0 0 0 0.5px rgba(255, 255, 255, 0.66),
    0 0 0 0.5px rgba(15, 23, 42, 0.08),
    0 12px 30px -10px rgba(15, 23, 42, 0.12);
}
html:not([data-theme="dark"]) body[data-home="globe"] .gx-suggest-card:hover {
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.68) 0%, rgba(255, 255, 255, 0.42) 56%, rgba(255, 255, 255, 0.56) 100%);
  border-color: rgba(255, 255, 255, 0.98);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 1),
    0 0 0 0.5px rgba(15, 23, 42, 0.12),
    0 16px 36px -10px rgba(15, 23, 42, 0.16);
}
html:not([data-theme="dark"]) body[data-home="globe"] .gx-user-bubble {
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.64) 0%, rgba(244, 248, 255, 0.44) 100%);
  backdrop-filter: saturate(205%) blur(24px);
  -webkit-backdrop-filter: saturate(205%) blur(24px);
  border-color: rgba(255, 255, 255, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.98), 0 0 0 0.5px rgba(15, 23, 42, 0.07), 0 8px 22px -10px rgba(15, 23, 42, 0.10);
}
html:not([data-theme="dark"]) body[data-home="globe"] .gx-tele-pill,
html:not([data-theme="dark"]) body[data-home="globe"] .gx-node-chip {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.56) 0%, rgba(255, 255, 255, 0.34) 100%);
  backdrop-filter: saturate(210%) blur(22px);
  -webkit-backdrop-filter: saturate(210%) blur(22px);
  border-color: rgba(255, 255, 255, 0.84);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.98), 0 0 0 0.5px rgba(15, 23, 42, 0.07), 0 6px 18px -6px rgba(15, 23, 42, 0.10);
}
html:not([data-theme="dark"]) body[data-home="globe"] .gx-ambient-hud {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.58) 0%, rgba(255, 255, 255, 0.34) 100%);
  backdrop-filter: saturate(210%) blur(26px);
  -webkit-backdrop-filter: saturate(210%) blur(26px);
  border-color: rgba(255, 255, 255, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.98), 0 0 0 0.5px rgba(15, 23, 42, 0.07), 0 10px 26px -8px rgba(15, 23, 42, 0.11);
}
html:not([data-theme="dark"]) .gx-tool-pill[data-arena="true"],
html:not([data-theme="dark"]) .gx-strategy-pill[data-posture="arena"] {
  background: rgba(132, 48, 206, 0.08); color: #8430ce; border-color: rgba(132, 48, 206, 0.22);
}

/* Omni-Composer: Paste / File Attachment Chips & Slash Menu */
.gx-composer { position: relative; }
.gx-composer.is-dragover {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-50);
  background: var(--primary-50);
}
.gx-attachments {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 10px;
}
.gx-att-chip {
  display: inline-flex; align-items: center; gap: 8px;
  max-width: 250px; padding: 6px 8px 6px 10px;
  border-radius: 11px; border: 1px solid var(--line-2);
  background: var(--surface-2); color: var(--text);
  font-size: 12px; box-shadow: var(--shadow-sm);
}
.gx-att-chip-main {
  min-width: 0; flex: 1; cursor: pointer;
}
.gx-att-chip-main strong {
  display: block; font-size: 12px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gx-att-chip-main small {
  display: block; font-size: 10.8px; color: var(--text-3);
}
.gx-att-rm {
  width: 20px; height: 20px; border-radius: 50%; border: 0;
  background: transparent; color: var(--text-3); display: grid; place-items: center;
}
.gx-att-rm:hover { background: var(--danger-50); color: var(--danger); }

.gx-tool-pill[data-arena="true"] {
  background: rgba(124, 58, 237, 0.12); color: #7c3aed; border-color: rgba(124, 58, 237, 0.28); font-weight: 620;
}
html[data-theme="dark"] .gx-tool-pill[data-arena="true"] {
  background: rgba(167, 139, 250, 0.16); color: #c4b5fd; border-color: rgba(167, 139, 250, 0.30);
}

/* Slash Command Menu */
.gx-slash-menu {
  position: absolute; left: 12px; bottom: calc(100% + 8px); z-index: 45;
  width: min(360px, calc(100% - 24px));
  padding: 6px; border-radius: 17px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(247, 249, 253, 0.93) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 1), 0 0 0 0.5px rgba(15, 23, 42, 0.10), 0 22px 54px -12px rgba(15, 23, 42, 0.22);
}
html[data-theme="dark"] .gx-slash-menu {
  border-color: rgba(255, 255, 255, 0.16);
  background: linear-gradient(180deg, rgba(30, 34, 46, 0.95) 0%, rgba(18, 20, 28, 0.94) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 24px 60px -12px rgba(0, 0, 0, 0.78);
}
.gx-slash-item {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 7px 10px; border: 0; border-radius: 9px;
  background: transparent; text-align: left; color: var(--text); font-size: 12.8px;
}
.gx-slash-item:hover,
.gx-slash-item.is-active { background: var(--primary-50); color: var(--primary); }
.gx-slash-cmd { font-family: var(--font-mono); font-weight: 650; font-size: 12px; }
.gx-slash-desc { font-size: 11.8px; color: var(--text-3); }

/* User Message Attachment Badges, Hover Actions & Inline Branch Editor */
.gx-user-col {
  display: flex; flex-direction: column; align-items: flex-end; gap: 5px; max-width: 100%;
}
.gx-user-atts {
  display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px;
}
.gx-user-att-pill {
  display: inline-flex; align-items: center; gap: 5px;
  height: 24px; padding: 0 9px; border-radius: 8px;
  border: 1px solid var(--line-2); background: var(--surface);
  color: var(--text-2); font-family: var(--font-mono); font-size: 11.5px;
}
.gx-user-att-pill:hover { border-color: var(--primary-100); color: var(--primary); }
.gx-user-tools {
  display: flex; align-items: center; gap: 4px;
  opacity: 0; transition: opacity .16s;
}
.gx-turn:hover .gx-user-tools,
.gx-user-tools:focus-within { opacity: 1; }
.gx-micro-btn {
  display: inline-flex; align-items: center; gap: 4px;
  height: 24px; padding: 0 8px; border-radius: 7px;
  border: 1px solid transparent; background: transparent;
  color: var(--text-3); font-size: 11.8px; font-weight: 520;
  transition: color .14s, background-color .14s, border-color .14s;
}
.gx-micro-btn:hover { color: var(--text); background: var(--surface-2); border-color: var(--line); }

.gx-edit-box {
  width: min(100%, 620px); padding: 12px; border-radius: 16px;
  border: 1px solid var(--primary-100); background: var(--surface);
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px;
}
.gx-edit-box textarea {
  width: 100%; min-height: 68px; padding: 6px 8px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface-2);
  color: var(--text); font-size: 14px; line-height: 1.55; resize: vertical;
}
.gx-edit-acts { display: flex; justify-content: flex-end; gap: 8px; }

/* Variant / Branch Switcher (< 1 / 2 >) & Turn Action Toolbar */
.rx-branch-nav {
  display: inline-flex; align-items: center; gap: 2px;
  height: 24px; padding: 0 4px; border-radius: 7px;
  border: 1px solid var(--line); background: var(--surface-2);
  font-family: var(--font-num); font-size: 11.5px; color: var(--text-2);
}
.rx-branch-nav button {
  width: 18px; height: 18px; border: 0; border-radius: 4px;
  background: transparent; color: var(--text-2); display: grid; place-items: center;
}
.rx-branch-nav button:hover:not(:disabled) { background: var(--surface); color: var(--primary); }
.msg-actions-right {
  margin-left: auto; display: inline-flex; align-items: center; flex-wrap: wrap; gap: 3px;
  opacity: 0.42;
  transition: opacity .18s ease;
}
.gx-turn:hover .msg-actions-right,
.msg-actions-right:focus-within {
  opacity: 1;
}

/* Split-Screen Node Arena (Side-by-Side Real-Time Contenders) */
.rx-arena {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
  margin: 4px 0 6px;
}
.rx-arena-col {
  display: flex; flex-direction: column; min-width: 0;
  border-radius: 15px; border: 1px solid var(--line-2);
  background: var(--surface); overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color .2s, box-shadow .2s;
}
.rx-arena-col.is-winner {
  border-color: var(--success);
  box-shadow: 0 0 0 3px var(--success-50);
}
.rx-arena-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;
  padding: 9px 12px; background: var(--surface-2); border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.rx-arena-tag {
  display: inline-flex; align-items: center; gap: 6px; font-weight: 650; color: var(--text);
}
.rx-arena-tag em {
  font-style: normal; padding: 1px 6px; border-radius: 5px;
  background: var(--primary-50); color: var(--primary); font-size: 10.5px; font-weight: 700;
}
.rx-arena-stats {
  font-family: var(--font-num); font-size: 11.2px; color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.rx-arena-body {
  padding: 12px 14px; flex: 1; min-height: 90px; max-height: 440px; overflow-y: auto;
  font-size: 14px; line-height: 1.72;
}
.rx-arena-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 12px; border-top: 1px solid var(--line); background: var(--surface-2);
  font-size: 11.5px; color: var(--text-3);
}
.rx-arena-adopt {
  height: 26px; padding: 0 10px; border-radius: 7px;
  border: 1px solid var(--line-2); background: var(--surface);
  color: var(--text); font-size: 11.5px; font-weight: 600;
  transition: border-color .15s, background-color .15s, color .15s;
}
.rx-arena-adopt:hover { border-color: var(--success); background: var(--success-50); color: var(--success); }
.rx-arena-col.is-winner .rx-arena-adopt {
  background: var(--success); border-color: var(--success); color: #fff;
}

/* Right-Side Live Artifacts Preview Split Pane */
.gx-artifact-pane {
  width: min(44vw, 560px); flex: 0 0 min(44vw, 560px);
  position: sticky; top: 64px; height: calc(100dvh - 64px);
  display: flex; flex-direction: column;
  border-left: 1px solid var(--line);
  background: var(--surface);
  box-shadow: -12px 0 32px rgba(0, 0, 0, 0.05);
  z-index: 20;
}
.art-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2);
}
.art-title {
  display: flex; align-items: center; gap: 8px; min-width: 0;
  font-size: 13px; font-weight: 640; color: var(--text);
}
.art-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.art-ctrls { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.art-seg {
  display: inline-flex; padding: 2px; border-radius: 8px;
  background: var(--surface-3); border: 1px solid var(--line);
}
.art-seg button {
  height: 24px; padding: 0 9px; border: 0; border-radius: 6px;
  background: transparent; color: var(--text-2); font-size: 11.5px; font-weight: 600;
}
.art-seg button.is-active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); }
.art-body { flex: 1; position: relative; overflow: hidden; background: #ffffff; }
.art-frame { width: 100%; height: 100%; border: 0; display: block; background: #ffffff; }
.art-source {
  position: absolute; inset: 0; overflow: auto;
  background: var(--code-bg); color: var(--code-fg);
  padding: 14px 16px; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.64;
  white-space: pre;
}
.md-code-btn.is-artifact {
  border-color: var(--primary-100); background: var(--primary-50); color: var(--primary);
}
.md-code-btn.is-artifact:hover { background: var(--primary-100); color: var(--primary-600); }

/* Cmd+K Global Command Palette */
.cmdk-backdrop {
  position: fixed; inset: 0; z-index: 90;
  background: var(--overlay);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: min(13dvh, 110px) 16px 24px;
}
.cmdk-modal {
  width: min(100%, 580px); max-height: min(72dvh, 520px);
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: 20px; border: 1px solid var(--line-2);
  background: var(--surface-elevated);
  backdrop-filter: saturate(210%) blur(32px); -webkit-backdrop-filter: saturate(210%) blur(32px);
  box-shadow: var(--glass-highlight), var(--shadow-lg);
}
.cmdk-head {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 16px; border-bottom: 1px solid var(--line);
}
.cmdk-head .icon { color: var(--text-3); }
.cmdk-input {
  flex: 1; border: 0; background: transparent;
  color: var(--text); font-size: 15px; outline: none;
}
.cmdk-input::placeholder { color: var(--text-3); }
.cmdk-list {
  flex: 1; overflow-y: auto; padding: 6px;
}
.cmdk-group {
  padding: 7px 10px 4px; font-size: 11px; font-weight: 650;
  color: var(--text-3); letter-spacing: 0.03em;
}
.cmdk-item {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 11px; border: 0; border-radius: 10px;
  background: transparent; color: var(--text); text-align: left; font-size: 13.2px;
}
.cmdk-item:hover,
.cmdk-item.is-active { background: var(--primary-50); color: var(--primary); }
.cmdk-item-left { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1; }
.cmdk-item-left span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmdk-item-right { flex: 0 0 auto; font-size: 11.5px; color: var(--text-3); font-family: var(--font-mono); }
.cmdk-foot {
  padding: 8px 14px; border-top: 1px solid var(--line); background: var(--surface-2);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11.5px; color: var(--text-3);
}

@media (max-width: 1100px) {
  .gx-sidebar {
    position: fixed; left: 0; top: 64px; bottom: 0;
    box-shadow: var(--shadow-lg);
  }
  body:not([data-sidebar="closed"]) .sb-backdrop { display: block; }
  .gx-artifact-pane {
    position: fixed; right: 0; top: 64px; bottom: 0;
    width: min(100vw, 520px); flex-basis: auto;
    box-shadow: var(--shadow-lg);
  }
}
@media (max-width: 720px) {
  .rx-arena { grid-template-columns: 1fr; }
  .gx-hud-meta { display: none; }
  .gx-ctx-meter span { display: none; }
}

/* ---------- Phase 4: Codex-Style Borderless Sidebar Filter, Quiet Identity Strip & Controls ---------- */
.sb-filter-bar {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px;
  margin-top: 6px; padding: 0; border-radius: 7px;
  background: transparent; border: 0;
}
.sb-filter-pill {
  height: 24px; border: 0; border-radius: 6px;
  background: transparent; color: var(--text-3);
  font-size: 11.4px; font-weight: 520;
  transition: background-color .14s, color .14s;
}
.sb-filter-pill:hover { color: var(--text); background: var(--surface-2); }
.sb-filter-pill.is-active {
  background: var(--surface-2); color: var(--text);
  box-shadow: none; font-weight: 580;
}

.sb-tenant-card {
  margin: 0; padding: 10px 14px 8px;
  border-radius: 0; border: 0; border-top: 1px solid var(--line);
  background: transparent;
  box-shadow: none;
  display: flex; flex-direction: column; gap: 6px;
}
.sb-tenant-top {
  display: flex; align-items: center; gap: 8px; min-width: 0;
}
.sb-tenant-avatar {
  width: 24px; height: 24px; border-radius: 999px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: var(--surface-3);
  color: var(--text); font-size: 11px; font-weight: 640;
}
.sb-tenant-meta { flex: 1; min-width: 0; }
.sb-tenant-meta strong {
  display: block; font-size: 12.2px; font-weight: 580; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sb-tenant-meta small {
  display: block; font-size: 10.6px; color: var(--text-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sb-key-btn {
  display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto;
  height: 22px; padding: 0 7px; border-radius: 999px;
  border: 1px solid transparent; background: transparent;
  color: var(--text-3); font-size: 11px; font-weight: 520;
  transition: background-color .14s, color .14s;
}
.sb-key-btn:hover { background: var(--surface-2); color: var(--text); }
.sb-quota-box { display: flex; flex-direction: column; gap: 3px; }
.sb-quota-labels {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 10.6px; color: var(--text-3);
}
.sb-quota-labels b { color: var(--text-2); font-weight: 560; }
.sb-quota-track {
  height: 2px; border-radius: 999px; overflow: hidden;
  background: var(--surface-3);
}
.sb-quota-fill {
  display: block; height: 100%; border-radius: 999px;
  background: var(--text-2);
  transition: width .3s ease;
}
.sb-quota-fill.is-warn { background: var(--warn); }
.sb-quota-fill.is-danger { background: var(--danger); }
.sb-roi-row {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
}
.sb-roi-pill {
  display: inline-flex; align-items: center; gap: 4px;
  height: 18px; padding: 0; border-radius: 0;
  background: transparent; border: 0; color: var(--text-3);
  font-size: 10.8px; font-weight: 520; font-variant-numeric: tabular-nums;
}
.sb-sess-mini { font-size: 10.8px; color: var(--text-3); }

/* Composer Progressive Disclosure, Active Param Strip, Image Chips & Context Meter */
.gx-param-strip {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  margin-bottom: 8px;
}
.gx-param-tag {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 8px; border-radius: 7px;
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--text-2); font-size: 11.2px; font-weight: 560;
}
.gx-param-tag.is-accent {
  background: var(--primary-50); border-color: var(--primary-100); color: var(--primary);
}
.gx-param-tag button {
  border: 0; background: transparent; color: inherit; font-size: 12.5px; line-height: 1; padding: 0 1px;
}

.gx-att-thumb {
  width: 30px; height: 30px; border-radius: 6px; object-fit: cover; flex: 0 0 auto;
  border: 1px solid var(--line);
}
.gx-user-img-thumb {
  max-width: 220px; max-height: 150px; border-radius: 12px;
  border: 1px solid var(--line-2); object-fit: cover; cursor: pointer;
}

.gx-plus-btn {
  background: transparent; border-color: transparent;
}
.gx-plus-btn:hover {
  background: var(--surface-2); border-color: transparent;
}
.gx-context-menu { width: min(290px, calc(100vw - 40px)); }
.gx-strategy-menu { width: min(340px, calc(100vw - 40px)); }
.gx-strategy-pill[data-posture="strict"] {
  background: var(--success-50); color: var(--success); border-color: rgba(16, 163, 127, 0.26); font-weight: 620;
}
.gx-strategy-pill[data-posture="arena"] {
  background: rgba(124, 58, 237, 0.12); color: #7c3aed; border-color: rgba(124, 58, 237, 0.28); font-weight: 620;
}
html[data-theme="dark"] .gx-strategy-pill[data-posture="arena"] {
  background: rgba(167, 139, 250, 0.16); color: #c4b5fd; border-color: rgba(167, 139, 250, 0.30);
}
.gx-switch-pill {
  display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto;
  height: 22px; padding: 0 8px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--text-2); font-size: 11px; font-weight: 600;
}
.gx-switch-pill.is-on {
  background: var(--primary-50); border-color: var(--primary-100); color: var(--primary);
}
.gx-switch-pill.is-green {
  background: var(--success-50); border-color: rgba(16, 163, 127, 0.26); color: var(--success);
}

.gx-ctx-meter {
  display: inline-flex; align-items: center; gap: 5px;
  height: 26px; padding: 0 8px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: 11.2px; color: var(--text-3); user-select: none;
}
.gx-ctx-ring { width: 15px; height: 15px; transform: rotate(-90deg); }
.gx-ctx-track { fill: none; stroke: var(--line-2); stroke-width: 2.3; }
.gx-ctx-fill {
  fill: none; stroke: var(--primary); stroke-width: 2.4; stroke-linecap: round;
  transition: stroke-dashoffset .25s ease, stroke .2s ease;
}
.gx-ctx-meter.is-warn .gx-ctx-fill { stroke: var(--warn); }
.gx-ctx-meter.is-danger .gx-ctx-fill { stroke: var(--danger); }

/* Right-Side Workbench Inspector Drawer (macOS Frosted Sheet) */
.gx-inspector-pane {
  width: 316px; flex: 0 0 316px;
  position: sticky; top: 53px; height: calc(100dvh - 53px);
  display: flex; flex-direction: column;
  border-left: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-highlight), -12px 0 34px -10px rgba(0, 0, 0, 0.14);
  z-index: 20;
}
.insp-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2);
}
.insp-body {
  flex: 1; overflow-y: auto; padding: 14px;
  display: flex; flex-direction: column; gap: 15px;
}
.insp-foot {
  padding: 12px 14px; border-top: 1px solid var(--line); background: var(--surface-2);
}
.insp-sec { display: flex; flex-direction: column; gap: 6px; }
.insp-label-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.insp-label { font-size: 12.2px; font-weight: 640; color: var(--text); }
.insp-sub { display: block; font-size: 11.2px; color: var(--text-3); margin-top: 2px; }
.insp-val { font-size: 12px; color: var(--primary); }
.insp-preset-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.insp-preset-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 9px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--surface-2);
  color: var(--text-2); font-size: 11.8px; font-weight: 580; text-align: left;
  transition: border-color .15s, background-color .15s, color .15s;
}
.insp-preset-btn:hover { border-color: var(--primary-100); color: var(--text); }
.insp-preset-btn.is-active { border-color: var(--primary); background: var(--primary-50); color: var(--primary); font-weight: 650; }
.insp-preset-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.insp-textarea {
  width: 100%; padding: 9px 10px; border-radius: 10px;
  border: 1px solid var(--line-2); background: var(--surface-2);
  color: var(--text); font-size: 12.6px; line-height: 1.55; resize: vertical;
}
.insp-textarea:focus, .insp-select:focus { outline: none; border-color: var(--primary); background: var(--surface); }
.insp-range { width: 100%; accent-color: var(--primary); cursor: pointer; }
.insp-scale-hints { display: flex; justify-content: space-between; font-size: 10.8px; color: var(--text-3); }
.insp-select {
  height: 34px; padding: 0 10px; border-radius: 9px;
  border: 1px solid var(--line-2); background: var(--surface-2);
  color: var(--text); font-size: 12.5px;
}
.insp-seg {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px;
  padding: 3px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line);
}
.insp-seg button {
  height: 26px; border: 0; border-radius: 6px; background: transparent;
  color: var(--text-2); font-size: 11.8px; font-weight: 580;
}
.insp-seg button.is-active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); font-weight: 650; }
.insp-toggle-row {
  flex-direction: row; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 11px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface-2);
}
.insp-checkbox { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }

/* Receipt Pill, Feedback Thumbs & Commercial Modals */
.rx-receipt-btn {
  display: inline-flex; align-items: center; gap: 4px;
  height: 21px; padding: 0 7px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent;
  color: var(--text-2); font-size: 11.2px; font-weight: 520; font-variant-numeric: tabular-nums;
  transition: border-color .14s, color .14s, background-color .14s;
}
.rx-receipt-btn:hover { border-color: var(--line-2); color: var(--text); background: var(--surface-2); }
.gx-fb-btn {
  width: 24px; height: 24px; border-radius: 6px; border: 1px solid transparent;
  background: transparent; color: var(--text-3); display: inline-grid; place-items: center;
  transition: color .14s, background-color .14s, border-color .14s;
}
.gx-fb-btn:hover { color: var(--text); background: var(--surface-2); border-color: var(--line); }
.gx-fb-btn.is-up { color: var(--success); background: var(--success-50); border-color: rgba(16, 163, 127, 0.25); }
.gx-fb-btn.is-down { color: var(--danger); background: var(--danger-50); border-color: rgba(217, 48, 37, 0.22); }

.comm-modal { width: min(100%, 780px); }
.comm-modal-sm { width: min(100%, 520px); }
.comm-modal-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 9px 14px; border-bottom: 1px solid var(--line); background: var(--surface);
}
.comm-modal-opts {
  display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap;
  font-size: 12px; color: var(--text-2);
}
.comm-modal-opts label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.comm-modal-form { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 13px; }
.comm-modal-desc { font-size: 12.8px; line-height: 1.6; color: var(--text-2); }
.comm-modal-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.comm-auth-status {
  padding: 9px 12px; border-radius: 10px; font-size: 12.4px;
  background: var(--success-50); color: var(--success); border: 1px solid rgba(16, 163, 127, 0.24);
}
.comm-auth-status.is-err {
  background: var(--danger-50); color: var(--danger); border-color: rgba(217, 48, 37, 0.24);
}
.comm-receipt-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; }
.rcpt-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 14px; border-radius: 12px;
  background: var(--success-50); border: 1px solid rgba(16, 163, 127, 0.26); color: var(--success);
}
.rcpt-banner strong { font-size: 13.5px; display: block; }
.rcpt-banner small { font-size: 11.5px; opacity: 0.9; }
.rcpt-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px;
}
.rcpt-cell {
  padding: 9px 11px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface-2);
}
.rcpt-cell span { display: block; font-size: 11px; color: var(--text-3); }
.rcpt-cell strong { display: block; margin-top: 2px; font-size: 12.8px; color: var(--text); font-family: var(--font-num); overflow-wrap: anywhere; }

@media (max-width: 1100px) {
  .gx-inspector-pane {
    position: fixed; right: 0; top: 64px; bottom: 0;
    width: min(100vw, 340px); flex-basis: auto;
    box-shadow: var(--shadow-lg);
  }
}

/* DSH Agent Pill, Quick Popover, Model Pair Modal & Interactive Approval Cards */
.gx-dsh-pill[data-dsh-active="true"] {
  background: var(--primary-50);
  color: var(--primary);
  border-color: var(--primary-100);
  font-weight: 600;
}
.gx-dsh-menu {
  width: min(360px, calc(100vw - 24px));
  padding: 8px;
}
.dsh-pop-summary {
  margin: 4px 2px 8px;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dsh-pop-route-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 12px;
  color: var(--text);
}
.dsh-pop-route-row span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}
.dsh-pop-route-row em {
  font-style: normal;
  font-size: 10.5px;
  font-weight: 650;
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--primary-50);
  color: var(--primary);
}
.dsh-pop-route-row b {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dsh-pop-arrow {
  color: var(--text-3);
  font-size: 12px;
  flex: 0 0 auto;
}
.dsh-pop-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.2px;
  color: var(--text-3);
}
.dsh-key-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 560;
}
.dsh-key-badge.is-ok {
  background: var(--success-50);
  color: var(--success);
  border: 1px solid rgba(16, 163, 127, 0.24);
}
.dsh-key-badge.is-warn {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.26);
}
[data-theme="dark"] .dsh-key-badge.is-warn { color: #fbbf24; }

.dsh-preset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 4px 2px 8px;
}
.dsh-preset-grid.is-modal {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 6px 0 0;
}
.dsh-preset-chip {
  text-align: left;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: border-color .14s, background-color .14s, box-shadow .14s;
}
.dsh-preset-chip:hover {
  border-color: var(--line-2);
  background: var(--surface);
}
.dsh-preset-chip.is-active {
  border-color: var(--primary);
  background: var(--primary-50);
}
.dsh-preset-chip strong {
  font-size: 12px;
  font-weight: 620;
  color: var(--text);
}
.dsh-preset-chip.is-active strong { color: var(--primary); }
.dsh-preset-chip small {
  font-size: 10.8px;
  color: var(--text-3);
  line-height: 1.35;
}
.dsh-pop-config-btn {
  border-top: 1px solid var(--line);
  margin-top: 2px;
  padding-top: 9px;
}
.gx-switch-pill.is-on {
  background: var(--primary-50);
  color: var(--primary);
  border-color: var(--primary-100);
}

.dsh-modal-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.dsh-modal-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.2px;
  color: var(--text-2);
  min-width: 0;
}
.dsh-st-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-3);
  flex: 0 0 auto;
}
.dsh-st-dot.is-ok { background: var(--success); box-shadow: 0 0 0 3px rgba(16, 163, 127, 0.18); }
.dsh-st-dot.is-warn { background: #f59e0b; }
.dsh-st-dot.is-err { background: var(--danger); }

.dsh-sec-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
}
.dsh-model-pair-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 680px) {
  .dsh-model-pair-grid { grid-template-columns: 1fr; }
}
.dsh-model-card {
  padding: 13px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dsh-model-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.dsh-model-card-head strong { font-size: 13px; color: var(--text); }
.dsh-model-card-head small { font-size: 11.2px; color: var(--text-3); }
.dsh-inline-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.8px;
  color: var(--text-2);
  cursor: pointer;
}
.dsh-inline-toggle input { accent-color: var(--primary); }
.dsh-sub-fields { display: flex; flex-direction: column; gap: 10px; transition: opacity .15s; }
.dsh-sub-fields.is-disabled { opacity: 0.45; pointer-events: none; }

.dsh-cred-box {
  padding: 12px 13px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dsh-cred-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.dsh-cred-box input {
  height: 36px;
  padding: 0 11px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: 12.8px;
}

.rx-nas-card.is-dsh-card {
  border-color: var(--line);
}
.rx-nas-seal.is-dsh {
  background: var(--primary-50);
  color: var(--primary);
  border-color: var(--primary-100);
}
.rx-nas-step-badge.is-sub {
  background: rgba(16, 163, 127, 0.14);
  color: var(--success);
}
.dsh-interactive-card {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(245, 158, 11, 0.34);
  background: rgba(245, 158, 11, 0.08);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dsh-interactive-card.is-question {
  border-color: var(--primary-100);
  background: var(--primary-50);
}
.dsh-inter-head strong { font-size: 12.6px; color: var(--text); display: block; }
.dsh-inter-head small { font-size: 11.5px; color: var(--text-2); display: block; margin-top: 2px; }
.dsh-inter-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dsh-q-item { display: flex; flex-direction: column; gap: 6px; }
.dsh-q-prompt { font-size: 12.5px; color: var(--text); }
.dsh-q-opts { display: flex; gap: 6px; flex-wrap: wrap; }
.dsh-q-opt-btn {
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  font-weight: 520;
  transition: border-color .14s, color .14s, background-color .14s;
}
.dsh-q-opt-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Enterprise Clean PDF / Print Report Stylesheet */
@media print {
  .topbar, .gx-sidebar, .sb-backdrop, .gx-ambient-hud, .gx-globe-sec, .gx-dock,
  .gx-inspector-pane, .gx-artifact-pane, .site-foot, .gx-user-tools, .msg-actions-right,
  .nas-modal-backdrop, .cmdk-backdrop, .toast {
    display: none !important;
  }
  body, .gx-workspace, .gx-main-col, .gx-home {
    background: #ffffff !important; color: #111215 !important;
    min-height: auto !important; width: 100% !important; max-width: 100% !important; padding: 0 !important; margin: 0 !important;
  }
  .gx-print-cover {
    display: block !important; width: 100%; margin-bottom: 20px; padding-bottom: 14px;
    border-bottom: 2px solid #111215;
  }
  .gx-thread { max-width: 100% !important; padding: 0 !important; }
  .gx-turn { break-inside: avoid; page-break-inside: avoid; }
}
