:root {
  --paper: #faf9f5;
  --canvas: #eeebe3;
  --ink: #302f28;
  --muted: #807260;
  --quiet: #8b8679;
  --line: #e6e1d7;
  --rust: #a7583e;
  --rust-dark: #83402b;
  --rust-wash: #f2e6de;
  --olive: #3e4736;
  --serif: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans Devanagari", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

::selection {
  background: #decab5;
  color: #302a20;
}

::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-thumb {
  background: #d6cfc1;
  border-radius: 99px;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.lab-app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
}

/* 1. TOP BAR */
.topbar {
  height: 72px;
  flex-shrink: 0;
  padding: 0 26px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 30;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 11px;
  user-select: none;
}

.brand-lambda {
  font: 400 40px/1 var(--serif);
  color: #765a3f;
}

.brand-wordmark {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-auren {
  font-size: 17px;
  letter-spacing: 4px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1;
}

.brand-sub {
  font-size: 7.5px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--quiet);
  font-weight: 600;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.top-nav-btn {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 500;
  padding: 7px 13px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.top-nav-btn:hover {
  color: var(--ink);
  background: #f3efe7;
}

.top-nav-btn.active {
  background: var(--rust-wash);
  color: var(--rust-dark);
  font-weight: 600;
}

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

.gpu-badge-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #edf1e4;
  border: 1px solid #d4dfc2;
  color: #465931;
  font-size: 10.5px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}

.gpu-badge-btn:hover {
  background: #e4ebd7;
}

.lang-select {
  appearance: auto;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 11px;
  font-weight: 500;
  padding: 6px 9px;
  border-radius: 4px;
  cursor: pointer;
}

.share-button {
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 4px;
  padding: 9px 13px;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: background 0.15s ease;
}

.share-button:hover {
  background: #434138;
}

/* 2. THREE-COLUMN WORKSPACE */
.workspace {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr) 318px;
  overflow: hidden;
}

@media (min-width: 1620px) {
  .workspace {
    grid-template-columns: 272px minmax(0, 1fr) 344px;
  }
}

@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: 210px minmax(0, 1fr) 282px;
  }
}

/* LEFT RAIL: COLLECTION & POINTS OF INTEREST */
.collection-sidebar {
  background: var(--paper);
  border-right: 1px solid var(--line);
  padding: 24px 18px 18px 22px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.eyebrow {
  font-size: 8.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  color: var(--rust);
  margin-bottom: 8px;
}

.sidebar-h1 {
  font: 400 clamp(23px, 2vw, 29px)/1.16 var(--serif);
  letter-spacing: -0.6px;
  color: var(--ink);
  margin: 0 0 10px;
}

.sidebar-lead {
  font-size: 11px;
  line-height: 1.65;
  color: var(--muted);
  margin: 0 0 12px;
}

.study-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  background: #f4f0e8;
  border: 1px solid #e3dacb;
  color: #796853;
  font-size: 9.5px;
  padding: 4px 8px;
  border-radius: 3px;
}

.study-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--rust);
}

.rail-divider {
  height: 1px;
  background: var(--line);
  margin: 18px 0 14px;
  flex-shrink: 0;
}

.poi-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--quiet);
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}

.poi-rail-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: auto;
}

.poi-rail-item {
  display: grid;
  grid-template-columns: 22px 1fr 14px;
  align-items: center;
  gap: 6px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 8px 9px;
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.14s ease;
  font-variant-numeric: tabular-nums;
}

.poi-rail-item:hover {
  background: #f0ece4;
  color: var(--ink);
}

.poi-rail-item.active {
  background: #ede5da;
  color: #79452e;
  font-weight: 600;
}

.poi-num {
  font-size: 9.5px;
  color: var(--quiet);
}

.poi-rail-item.active .poi-num,
.poi-rail-item.active .poi-arrow {
  color: var(--rust);
}

.poi-arrow {
  font-size: 10px;
  opacity: 0;
}

.poi-rail-item.active .poi-arrow,
.poi-rail-item:hover .poi-arrow {
  opacity: 1;
}

.sidebar-footer {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.research-shortcut {
  width: 100%;
  text-align: left;
  background: #f5f1e8;
  border: 1px solid #e2d9c8;
  border-radius: 5px;
  padding: 10px 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: border-color 0.15s ease;
}

.research-shortcut:hover {
  border-color: #c7b69c;
}

.shortcut-title {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
}

.shortcut-sub {
  display: block;
  font-size: 9.5px;
  color: var(--muted);
}

.plain-link {
  background: none;
  border: none;
  padding: 3px 2px;
  text-align: left;
  font-size: 10.5px;
  color: var(--muted);
  cursor: pointer;
}

.plain-link:hover {
  color: var(--rust-dark);
}

/* CENTER 3D VIEWPORT (.explorer) */
.explorer {
  position: relative;
  background: var(--canvas);
  overflow: hidden;
  min-width: 0;
}

#xr-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  outline: none;
  z-index: 1;
}

#ar-passthrough-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

#ar-passthrough-video.simulated-passthrough {
  background:
    radial-gradient(circle at 50% 50%, rgba(167, 88, 62, 0.08), rgba(238, 235, 227, 0.94)),
    repeating-linear-gradient(0deg, rgba(128, 114, 96, 0.09) 0 1px, transparent 1px 32px),
    repeating-linear-gradient(90deg, rgba(128, 114, 96, 0.09) 0 1px, transparent 1px 32px);
}

/* Projected 2D-over-3D POI Pins */
.poi-labels-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  overflow: hidden;
}

.temple-label {
  position: absolute;
  left: 0;
  top: 0;
  will-change: transform;
  pointer-events: auto;
  height: 28px;
  min-width: 28px;
  padding: 0 8px;
  border-radius: 24px;
  background: rgba(251, 249, 243, 0.94);
  border: 1px solid rgba(119, 93, 59, 0.28);
  color: var(--ink);
  font-size: 10.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(48, 47, 40, 0.1);
  transition: background 0.15s ease, color 0.15s ease;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.temple-label .pin-text {
  display: none;
}

.temple-label:hover .pin-text,
.temple-label.active .pin-text {
  display: inline;
}

.temple-label.active {
  background: #5a6b48;
  border-color: #465536;
  color: #fffdf7;
  padding: 0 12px;
  z-index: 6;
}

/* Viewport Overlays */
.scene-breadcrumb {
  position: absolute;
  top: 20px;
  left: 24px;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--quiet);
  pointer-events: none;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7d8966;
}

.scene-note {
  position: absolute;
  top: 64px;
  left: 24px;
  max-width: 295px;
  z-index: 6;
  pointer-events: none;
}

.scene-note .eyebrow {
  color: var(--quiet);
  margin-bottom: 4px;
}

.scene-note p {
  margin: 0;
  font: 400 20px/1.28 var(--serif);
  letter-spacing: -0.3px;
  color: #7c6b56;
}

.picked-stone-toast {
  margin-top: 8px;
  pointer-events: auto;
  background: rgba(250, 249, 245, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid #d9d2c6;
  border-radius: 5px;
  padding: 7px 10px;
  font-size: 10.5px;
  color: var(--ink);
}

.scene-top-buttons {
  position: absolute;
  top: 18px;
  right: 22px;
  z-index: 6;
  display: flex;
  gap: 6px;
}

.frosted-icon-btn {
  width: 33px;
  height: 33px;
  border-radius: 5px;
  background: rgba(250, 249, 240, 0.84);
  backdrop-filter: blur(8px);
  border: 1px solid #d9d2c6;
  color: #5c5143;
  font-size: 14px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.14s ease;
}

.frosted-icon-btn:hover {
  background: #fffdf8;
  border-color: var(--rust);
  color: var(--rust-dark);
}

.compass-widget {
  position: absolute;
  top: 66px;
  right: 24px;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 8px;
  font-weight: 700;
  color: var(--quiet);
  pointer-events: none;
}

.compass-dial {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid #cfc7b9;
  background: rgba(250, 249, 245, 0.72);
  display: grid;
  place-items: center;
}

.compass-needle {
  font-size: 12px;
  color: #7c6b56;
  transition: transform 0.1s linear;
}

/* Floating Bottom Control Pill + Time Lens */
.scene-bottom {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 14px;
  z-index: 7;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.scene-controls {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 7px;
  border-radius: 8px;
  background: rgba(253, 252, 247, 0.94);
  backdrop-filter: blur(14px);
  border: 1px solid #dcd5c9;
  box-shadow: 0 6px 20px rgba(102, 86, 59, 0.08);
}

.ctrl-btn {
  border: 1px solid transparent;
  background: transparent;
  color: #6b5e4e;
  font-size: 11px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.ctrl-btn:hover {
  background: #f2ede3;
  color: var(--ink);
}

.ctrl-btn.active {
  background: var(--rust-wash);
  border-color: #dfbfb0;
  color: var(--rust-dark);
  font-weight: 600;
}

.ctrl-sep {
  width: 1px;
  height: 18px;
  background: #e2dbcf;
  margin: 0 3px;
}

.timeline-card {
  pointer-events: auto;
  width: min(670px, 100%);
  padding: 9px 18px 10px;
  border-radius: 7px;
  background: rgba(250, 248, 240, 0.92);
  backdrop-filter: blur(10px);
  border: 1px solid #dcd5c7;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.timeline-top {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #7c6d59;
}

.timeline-stops {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 6px;
}

.timeline-stops::before {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  top: 50%;
  height: 1px;
  background: #d5cbb9;
  z-index: 0;
}

.epoch-node-btn {
  position: relative;
  z-index: 1;
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 2px 4px;
}

.epoch-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid #b5a690;
  transition: all 0.15s ease;
}

.epoch-node-btn.active .epoch-dot {
  background: var(--rust);
  border-color: var(--rust);
  box-shadow: 0 0 0 3px rgba(167, 88, 62, 0.2);
}

.epoch-lbl {
  font-size: 9.5px;
  color: var(--quiet);
  white-space: nowrap;
}

.epoch-node-btn.active .epoch-lbl {
  color: var(--rust-dark);
  font-weight: 600;
}

.timeline-caption {
  text-align: center;
  font-size: 9.5px;
  color: var(--quiet);
}

/* Live Voice / Guided Toast Dock */
.live-voice-dock {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 12;
  max-width: min(560px, 90%);
  background: #363d2e;
  color: #f9f6e9;
  border: 1px solid #6b785f;
  border-radius: 7px;
  padding: 9px 14px;
  box-shadow: 0 12px 32px rgba(32, 34, 24, 0.25);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 11.5px;
}

.live-voice-dock[hidden] {
  display: none;
}

/* RIGHT RAIL: OBJECT INSPECTOR */
.inspector {
  background: var(--paper);
  border-left: 1px solid var(--line);
  padding: 20px 22px 18px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.inspector-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 11px;
}

.inspector-label {
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--quiet);
}

.lod0-chip-btn {
  background: #f5e9dd;
  border: 1px solid #e4cbb4;
  color: #8c482e;
  font-size: 9.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 3px;
  cursor: pointer;
}

.object-drawing {
  position: relative;
  flex-shrink: 0;
  background: #f3eee5;
  border: 1px solid #e7dece;
  border-radius: 4px;
  height: 156px;
  overflow: hidden;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.drawing-expand-btn {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 25px;
  height: 25px;
  border-radius: 4px;
  background: rgba(250, 249, 245, 0.88);
  border: 1px solid #d8cebe;
  color: #6c5b47;
  font-size: 11px;
  cursor: pointer;
}

.drawing-caption {
  position: absolute;
  bottom: 5px;
  left: 8px;
  font-size: 8px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #6c5b47;
  background: rgba(250, 249, 245, 0.84);
  padding: 2px 6px;
  border-radius: 2px;
}

.inspector-h2 {
  font: 400 26px/1.18 var(--serif);
  letter-spacing: -0.6px;
  color: var(--ink);
  margin: 2px 0 4px;
}

.inspector-sub {
  font-size: 11px;
  color: var(--muted);
  margin: 0 0 12px;
}

.underline-tabs {
  display: flex;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}

.u-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 6px 1px 8px;
  font-size: 11px;
  font-weight: 500;
  color: var(--quiet);
  cursor: pointer;
  margin-bottom: -1px;
}

.u-tab.active {
  color: var(--rust-dark);
  border-bottom-color: var(--rust);
  font-weight: 600;
}

.inspector-copy {
  font-size: 11.5px;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 13px;
}

.audio-button {
  flex-shrink: 0;
  width: 100%;
  background: #f0ece3;
  border: 1px solid #e2dacb;
  border-radius: 4px;
  padding: 10px 12px;
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.14s ease;
}

.audio-button:hover {
  background: #e9e2d5;
}

.voice-sublink {
  background: none;
  border: none;
  padding: 6px 0 0;
  font-size: 10px;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
}

.voice-sublink:hover {
  color: var(--rust-dark);
}

.next-discovery-box {
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 13px;
}

.next-poi-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  cursor: pointer;
}

.next-poi-title {
  font: 400 21px/1.25 var(--serif);
  color: var(--ink);
  margin: 3px 0 2px;
}

.next-poi-sub {
  font-size: 10.5px;
  color: var(--muted);
  margin: 0 0 6px;
}

.why-link-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 10.5px;
  color: var(--rust);
  font-weight: 500;
  cursor: pointer;
}

.why-link-btn:hover {
  text-decoration: underline;
}

/* Dark Olive Guided Discovery Card */
.guided-tour-card {
  flex-shrink: 0;
  margin-top: auto;
  padding-top: 14px;
}

.guided-olive-btn {
  width: 100%;
  background: var(--olive);
  color: #f4f0df;
  border: 1px solid #333b2c;
  border-radius: 5px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease;
}

.guided-olive-btn:hover {
  background: #48533f;
}

.play-ring {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(244, 240, 223, 0.35);
  display: grid;
  place-items: center;
  font-size: 11px;
  flex-shrink: 0;
}

.guided-eyebrow {
  font-size: 7.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #bdc6aa;
}

.guided-title {
  font: 400 18px/1.2 var(--serif);
  color: #f9f6e8;
}

.guided-meta {
  font-size: 9.5px;
  color: #bdc6aa;
}

/* 3. BOTTOM STATUS BAR */
.statusbar {
  height: 31px;
  flex-shrink: 0;
  background: var(--paper);
  border-top: 1px solid var(--line);
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 9px;
  color: var(--quiet);
  z-index: 30;
}

.status-left, .status-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.status-sq {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #8a9977;
  margin-right: 5px;
}

.status-link {
  background: none;
  border: none;
  padding: 0;
  font-size: 9.5px;
  color: var(--muted);
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}

.status-link:hover {
  color: var(--rust-dark);
}

/* LOADING OVERLAY */
#loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
}

#loading-overlay[hidden] {
  display: none;
}

.loader-editorial {
  width: min(460px, 90vw);
  text-align: center;
  padding: 32px;
}

.loader-editorial h2 {
  font: 400 28px/1.2 var(--serif);
  margin: 10px 0 8px;
}

.loader-bar-track {
  height: 4px;
  background: #e6dfd3;
  border-radius: 99px;
  overflow: hidden;
  margin: 16px 0 10px;
}

.loader-bar-fill {
  height: 100%;
  background: var(--rust);
  transition: width 0.2s ease;
}

/* CENTERED EDITORIAL MODALS (Matching Auren Spec) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: rgba(41, 39, 28, 0.36);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.modal-backdrop[hidden] {
  display: none;
}

.feature-modal {
  width: min(820px, 100%);
  max-height: min(90dvh, 880px);
  background: var(--paper);
  border: 1px solid #d6cbb7;
  border-radius: 12px;
  box-shadow: 0 28px 100px rgba(44, 34, 26, 0.24);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.feature-modal.narrow {
  width: min(510px, 100%);
}

.modal-heading {
  padding: 20px 26px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background: var(--paper);
}

.modal-heading h2 {
  font: 400 28px/1.2 var(--serif);
  letter-spacing: -0.6px;
  margin: 3px 0 0;
  color: var(--ink);
}

.close-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: #fffefb;
  color: var(--muted);
  font-size: 15px;
  cursor: pointer;
}

.modal-content {
  padding: 22px 26px 26px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-footer {
  padding: 11px 26px;
  background: #f5f1e9;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: var(--quiet);
}

/* Modal Internal Cards, XAI Metric Grid, Bars & Equation */
.inset-card {
  background: #f5f1e8;
  border: 1px solid #e3dacb;
  border-radius: 7px;
  padding: 15px 17px;
}

.white-card {
  background: #fffdf9;
  border: 1px solid #e6dfd2;
  border-radius: 7px;
  padding: 15px 17px;
}

.serif-h3 {
  font: 400 22px/1.28 var(--serif);
  margin: 2px 0 6px;
  color: var(--ink);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.metric-box {
  background: #f7f3eb;
  border: 1px solid #e5dccd;
  border-radius: 6px;
  padding: 12px 14px;
}

.metric-lbl {
  font-size: 9.5px;
  color: var(--quiet);
}

.metric-val {
  font: 400 28px/1.2 var(--serif);
  color: #5b4332;
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
}

.bar-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bar-item-top {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--ink);
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}

.bar-track {
  height: 6px;
  background: #e8dfcf;
  border-radius: 99px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: #ac7350;
  border-radius: 99px;
}

.bar-fill.negative {
  background: #8b8679;
}

.equation-line {
  background: #f2ebdf;
  border: 1px solid #e2d7c5;
  border-radius: 6px;
  padding: 12px;
  text-align: center;
  font: 400 20px/1.3 var(--serif);
  color: #6b4833;
  font-variant-numeric: tabular-nums;
}

.primary-button {
  background: var(--rust);
  color: #fffaf3;
  border: 1px solid var(--rust);
  border-radius: 5px;
  padding: 10px 15px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.primary-button:hover {
  background: var(--rust-dark);
}

.secondary-button {
  background: #f8f5ef;
  color: #6c5b47;
  border: 1px solid #d9cfbe;
  border-radius: 5px;
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.secondary-button:hover {
  border-color: var(--rust);
  color: var(--rust-dark);
}

.choice-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.choice-button {
  background: #f7f3eb;
  border: 1px solid #e2d8c8;
  color: #6c5b47;
  border-radius: 5px;
  padding: 6px 11px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
}

.choice-button.active {
  background: #f2e2d6;
  border-color: #be9275;
  color: #8c482e;
  font-weight: 600;
}

.panel-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Knowledge Graph Dot-Grid Stage */
.graph-stage {
  width: 100%;
  background-color: #f6f1e8;
  background-image: radial-gradient(rgba(187, 170, 140, 0.35) 0.9px, transparent 0.9px);
  background-size: 15px 15px;
  border: 1px solid #e2d8c6;
  border-radius: 8px;
}

/* Photo vs v57 Split Stage */
.compare-stage {
  position: relative;
  width: 100%;
  height: 260px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #dfd6c7;
  background: #ebe5da;
}

.compare-stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.compare-overlay {
  position: absolute;
  inset: 0;
  width: 50%;
  overflow: hidden;
  border-right: 2px solid var(--rust);
}

.compare-stage input[type="range"] {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 10px;
  width: calc(100% - 28px);
  accent-color: var(--rust);
  z-index: 4;
}

.status-pill-sage {
  background: #edf1e4;
  border: 1px solid #d4dfc2;
  color: #53653c;
  font-size: 9.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
}

.status-pill-rust {
  background: #f5e9dd;
  border: 1px solid #e8d4bf;
  color: #936044;
  font-size: 9.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
}

@media (max-width: 860px) {
  .workspace {
    grid-template-columns: 1fr;
  }
  .collection-sidebar, .inspector {
    display: none;
  }
  .panel-grid-2, .metric-grid {
    grid-template-columns: 1fr;
  }
}
