* {
  box-sizing: border-box;
}

body.pavilion-mode {
  --pav-bg: #f6f6f6;
  --pav-secondary: #ffffff;
  --pav-blue: #024594;
  --pav-blue-bright: #035ab8;
  --pav-accent: #6bb024;
  --pav-accent-hover: #5a9a1e;
  --pav-text-main: #024594;
  --pav-text-heading: #01325f;
  --pav-text-body: #333333;
  --pav-text-muted: #6b7280;
  --pav-glass: rgba(255, 255, 255, 0.78);
  --pav-glass-border: rgba(2, 69, 148, 0.10);
  --pav-line: #d6dbe2;
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  font-family: "IBM Plex Sans", Arial, Helvetica, sans-serif;
  background: var(--pav-bg);
  color: var(--pav-text-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.pavilion-mode::before {
  content: none;
}

body.pavilion-mode::after {
  content: none;
}

/* ── Layout grid ───────────────────────────────────────────── */
#container {
  display: grid;
  grid-template-columns: 400px 1fr;
  grid-template-rows: 56px 1fr 60px;
  gap: 0;
  height: 100vh;
  overflow: hidden;
}

/* ── Header bar ────────────────────────────────────────────── */
.logo-container {
  grid-column: 1 / -1;
  grid-row: 1;
  position: relative;
  width: 100%;
  height: 56px;
  z-index: 200;
  display: flex;
  align-items: center;
  background: var(--pav-blue);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.logo-container::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--pav-accent);
}

.center-logo-link,
.brand-logo-link {
  display: block;
}

.center-logo-link {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-decoration: none;
}

.header-wordmark {
  color: #ffffff;
  font-family: "IBM Plex Sans", Arial, sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.header-wordmark-o {
  color: #ffffff;
}

.language-selected {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.1);
  transition: background 0.2s ease;
}

.language-selected:hover {
  background: rgba(255, 255, 255, 0.18);
}

.language-selector {
  border: 0;
  color: #ffffff;
  background: transparent;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.language-selector option {
  color: var(--pav-blue);
  background: #ffffff;
}

/* ── 3D Viewer window ──────────────────────────────────────── */
.viewer-viewer {
  grid-column: 2;
  grid-row: 2;
  position: relative !important;
  z-index: 1;
  margin: 16px 16px 0 8px;
  width: auto;
  height: auto;
  border: 1px solid rgba(2, 69, 148, 0.12);
  border-radius: 4px;
  background:
    /* soft center spotlight */
    radial-gradient(ellipse 70% 60% at 50% 55%, rgba(255, 255, 255, 0.35) 0%, transparent 70%),
    /* depth gradient – light top fading to cool navy-grey bottom */
    linear-gradient(
      175deg,
      #f7f8fa 0%,
      #f2f4f8 30%,
      #edf0f5 55%,
      #e8ecf2 80%,
      #e2e7f0 100%
    );
  box-shadow:
    inset 0 -40px 60px -20px rgba(2, 53, 118, 0.04),
    0 2px 20px rgba(2, 53, 118, 0.07),
    0 0 0 1px rgba(2, 69, 148, 0.05);
  overflow: hidden;
}

/* floor reflection fade */
.viewer-viewer::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 35%;
  background: linear-gradient(
    to top,
    rgba(2, 53, 118, 0.06) 0%,
    rgba(2, 53, 118, 0.02) 40%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 0;
}

/* subtle top edge highlight */
.viewer-viewer::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.8) 30%,
    rgba(255, 255, 255, 0.9) 50%,
    rgba(255, 255, 255, 0.8) 70%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 1;
}

.viewer-viewer canvas {
  display: block;
  width: 100%;
  height: 100%;
  filter: contrast(1.02) saturate(1.03);
}

/* ── Hotspots ──────────────────────────────────────────────── */
.viewer-hotspot-overlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.viewer-hotspot-overlay.is-visible {
  opacity: 1;
}

.hotspot-anchor {
  display: none;
}

/* ── Viewer loading spinner ──────────────────────────────── */
.viewer-loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  z-index: 80;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.viewer-loader.is-hidden {
  opacity: 0;
  pointer-events: none;
}

/* Spinner stays hidden while the intro video is playing — JS removes
   `.is-deferred` if the model is still loading after the video ends. */
.viewer-loader.is-deferred {
  opacity: 0;
  pointer-events: none;
}

.viewer-loader-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(0, 0, 0, 0.08);
  border-top-color: var(--pav-accent, #6bb024);
  border-radius: 50%;
  animation: viewer-spin 0.8s linear infinite;
}

@keyframes viewer-spin {
  to { transform: rotate(360deg); }
}

.viewer-loader-text {
  font-size: 13px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.45);
  letter-spacing: 0.02em;
}

.hotspot-dot {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  pointer-events: none;
  cursor: default;
  will-change: transform, opacity;
  transition: opacity 0.18s ease;
  opacity: 1;
}

/* Hotspot is geometrically behind the GLB from the current camera angle.
   We fade instead of display:none so the throttled occlusion check
   (~15 Hz) never produces a visible flicker. */
.hotspot-dot.is-occluded {
  opacity: 0.125;
  pointer-events: none;
}
.hotspot-dot.is-occluded .hotspot-dot-core {
  pointer-events: none;
  cursor: default;
}

/* While the arm is animating, hotspots are unreliable (their occluder
   geometry is moving faster than we can sensibly raycast). Fully hide
   them and any open callout — they get re-evaluated and faded back in
   the moment the arm stops. */
.viewer-hotspot-overlay.is-suppressed .hotspot-dot,
.hotspot-dot.is-suppressed {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.viewer-hotspot-overlay.is-suppressed .hotspot-dot-core,
.hotspot-dot.is-suppressed .hotspot-dot-core {
  pointer-events: none;
  cursor: default;
}

.hotspot-dot-core {
  position: relative;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2.5px solid #ffffff;
  background: var(--pav-accent);
  box-shadow:
    0 0 0 4px rgba(107, 176, 36, 0.14),
    0 2px 8px rgba(0, 0, 0, 0.12);
  transition: all 0.25s ease;
  pointer-events: auto;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Invisible expanded touch target (~44px) for touchscreen friendliness */
.hotspot-dot-core::before {
  content: '';
  position: absolute;
  top: -14px;
  left: -14px;
  right: -14px;
  bottom: -14px;
  border-radius: 999px;
}

.hotspot-dot:hover .hotspot-dot-core,
.hotspot-dot.is-selected .hotspot-dot-core {
  box-shadow:
    0 0 0 7px rgba(107, 176, 36, 0.18),
    0 2px 12px rgba(107, 176, 36, 0.35);
  transform: scale(1.15);
}

.hotspot-dot.is-selected {
  z-index: 60;
}

/* ── Hotspot callout (two-segment line + chat bubble) ──────── */
/* Callout lives in #hotspot-overlay (sibling of the dots) so its
   `backdrop-filter` blur samples the 3D viewer canvas. JS sets its
   transform every frame to `translate(dotX, dotY) translate(0, -100%)`
   which anchors the callout's bottom-left at the dot center, matching
   the layout that used to be achieved by being a child of the dot. */
.hotspot-callout {
  position: absolute;
  left: 0;
  top: 0;
  width: 260px;
  pointer-events: none;
  z-index: 50;
  transition: opacity 0.18s ease;
}

.hotspot-callout-line {
  position: absolute;
  left: 0;
  bottom: 0;
  overflow: visible;
}

.hotspot-callout-line .callout-seg1 {
  stroke: var(--pav-accent);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: 80;
  stroke-dashoffset: 80;
  animation: callout-draw-seg1 0.35s ease-out forwards;
}

.hotspot-callout-line .callout-seg2 {
  stroke: var(--pav-accent);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
  animation: callout-draw-seg2 0.25s ease-out 0.3s forwards;
}

.hotspot-callout-line .callout-joint {
  fill: var(--pav-accent);
  opacity: 0;
  animation: callout-joint-pop 0.2s ease-out 0.28s forwards;
}

.hotspot-callout-bubble {
  position: absolute;
  left: 56px;
  bottom: 18px;
  width: 190px;
  padding: 14px 16px 12px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(24px) saturate(1.8);
  -webkit-backdrop-filter: blur(24px) saturate(1.8);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-bottom-color: rgba(255, 255, 255, 0.25);
  border-right-color: rgba(255, 255, 255, 0.30);
  border-radius: 6px 6px 6px 0;
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  animation: callout-bubble-in 0.35s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards;
  box-shadow:
    0 8px 32px rgba(2, 53, 118, 0.14),
    0 2px 8px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.60);
  pointer-events: auto;
}

.hotspot-callout-bubble::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--pav-accent), rgba(107, 176, 36, 0.5));
  border-radius: 6px 6px 0 0;
}

.hotspot-callout-title {
  margin: 4px 0 6px;
  color: var(--pav-text-heading);
  font-family: "IBM Plex Sans", Arial, sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.3;
}

.hotspot-callout-sep {
  display: none;
}

.hotspot-callout-text {
  margin: 0;
  color: var(--pav-text-body);
  font-family: "IBM Plex Sans", Arial, sans-serif;
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.6;
}

.hotspot-callout-close {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--pav-text-muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
  transition: background 0.15s ease, color 0.15s ease;
}

.hotspot-callout-close:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--pav-text-heading);
}

@keyframes callout-draw-seg1 {
  to { stroke-dashoffset: 0; }
}

@keyframes callout-draw-seg2 {
  to { stroke-dashoffset: 0; }
}

@keyframes callout-joint-pop {
  0% { opacity: 0; transform: scale(0); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes callout-bubble-in {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ── Pavilion environment (hidden) ─────────────────────────── */
#pav-environment {
  display: none;
}

.pav-beam-left,
.pav-beam-right {
  display: none;
}

.content-hider {
  display: none;
}

/* ── Content panel (left column) ───────────────────────────── */
.content-container {
  grid-column: 1;
  grid-row: 2;
  position: relative;
  z-index: 40;
  margin: 16px 0 0 16px;
  overflow: hidden;
  border: 1px solid var(--pav-line);
  border-radius: 4px;
  background: var(--pav-glass);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  display: flex;
  flex-direction: column;
  box-shadow:
    0 2px 16px rgba(0, 0, 0, 0.05),
    0 0 0 1px rgba(0, 0, 0, 0.02);
}

.content-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  pointer-events: none;
  background: var(--pav-accent);
  z-index: 2;
}

.content-container::after {
  content: none;
}

.content-container-content {
  position: relative;
  padding: 26px 24px 16px;
  overflow-y: auto;
  flex: 1;
  z-index: 1;
}

.content-container-content::-webkit-scrollbar {
  width: 3px;
}

.content-container-content::-webkit-scrollbar-track {
  background: transparent;
}

.content-container-content::-webkit-scrollbar-thumb {
  background: rgba(2, 69, 148, 0.15);
  border-radius: 4px;
}

.panel-kicker {
  margin: 0 0 8px;
  color: var(--pav-accent);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.content-container h1 {
  margin: 0 0 10px;
  font-family: "IBM Plex Sans", Arial, sans-serif;
  font-weight: 600;
  font-size: 24px;
  line-height: 1.18;
  letter-spacing: -0.2px;
  color: var(--pav-text-heading);
}

.separator {
  height: 2px;
  background: var(--pav-line);
}

.info-text .selected {
  margin: 14px 0 6px;
  font-size: 15px;
  font-family: "IBM Plex Sans", Arial, sans-serif;
  font-weight: 600;
  line-height: 1.35;
  color: var(--pav-text-main);
}

.info-text p,
.panel-body p,
.panel-body li {
  font-size: 13px;
  line-height: 1.65;
  font-weight: 400;
  color: var(--pav-text-body);
}

.panel-body {
  margin-top: 14px;
}

.panel-block + .panel-block {
  margin-top: 12px;
}

.panel-block-title {
  margin: 0 0 6px;
  color: var(--pav-text-main);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.panel-body ul {
  margin: 0;
  padding-left: 16px;
}

.panel-body li {
  margin-bottom: 3px;
}

.panel-body li::marker {
  color: var(--pav-accent);
}

/* ── POI buttons (inside content panel) ────────────────────── */
.button-container {
  padding: 12px 24px 18px;
  border-top: 1px solid var(--pav-line);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.button {
  flex: 1 1 calc(50% - 3px);
  min-width: 120px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 2px;
  color: var(--pav-text-muted);
  text-align: left;
  font-family: "IBM Plex Sans", Arial, sans-serif;
  font-weight: 500;
  font-size: 13px;
  background: transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}

.button:hover {
  color: var(--pav-text-main);
  background: var(--pav-secondary);
  border-color: var(--pav-line);
}

.button.selected {
  color: var(--pav-text-heading);
  font-weight: 600;
  background: rgba(2, 69, 148, 0.04);
  border-color: transparent;
  border-left: 3px solid var(--pav-accent);
}

.button-label {
  display: block;
}

.button-caption {
  display: block;
  margin-top: 2px;
  color: var(--pav-text-muted);
  font-size: 11px;
  font-weight: 400;
}

/* ── Bottom navigation bar ─────────────────────────────────── */
.sidebar {
  grid-column: 1 / -1;
  grid-row: 3;
  position: relative;
  z-index: 220;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2px;
  padding: 0 8px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border-top: 1px solid var(--pav-line);
}

.sidebar-button {
  position: relative;
  height: 42px;
  padding: 0 24px;
  border: none;
  border-radius: 0;
  color: var(--pav-text-muted);
  font-family: "IBM Plex Sans", Arial, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  background: transparent;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.sidebar-button:hover {
  background-color: var(--pav-secondary);
  color: var(--pav-text-main);
}

.sidebar-button.selected {
  background: var(--pav-blue);
  color: #ffffff;
}

.sidebar-button.selected::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--pav-accent);
}

/* ── Viewer controls ───────────────────────────────────────── */

.viewer-background-controls {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 40;
  display: flex;
  gap: 8px;
  align-items: center;
}

.button-static-pose {
  display: none;
}

.button-play-pause {
  position: absolute;
  bottom: 20px;
  right: 20px;
  z-index: 40;
  width: 46px;
  height: 46px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: rgba(107, 176, 36, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 2px 10px rgba(107, 176, 36, 0.30),
    0 1px 3px rgba(0, 0, 0, 0.10);
  transition: background 0.2s ease, transform 0.15s ease;
}

.button-play-pause:hover {
  background: var(--pav-accent-hover);
  transform: scale(1.06);
}

.button-play-pause svg {
  width: 18px;
  height: 18px;
  fill: #ffffff;
}

.button-play-pause .icon-play,
.button-play-pause .icon-pause {
  display: none;
}

.button-play-pause.is-paused .icon-play {
  display: block;
}

.button-play-pause:not(.is-paused) .icon-pause {
  display: block;
}

/* ── HD transition button ──────────────────────────────────── */
.button-hd-transition {
  position: absolute;
  bottom: 20px;
  right: 76px;
  z-index: 40;
  width: 46px;
  height: 46px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: rgba(2, 69, 148, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 2px 10px rgba(2, 69, 148, 0.30),
    0 1px 3px rgba(0, 0, 0, 0.10);
  transition: background 0.2s ease, transform 0.15s ease;
}

.button-hd-transition:hover {
  background: var(--pav-blue-bright);
  transform: scale(1.06);
}

.button-hd-transition svg {
  width: 28px;
  height: 16px;
}

.button-hd-transition.is-active {
  background: var(--pav-accent);
  z-index: 50;
}

.button-hd-transition.is-active:hover {
  background: var(--pav-accent-hover);
}

/* ── Product launch demo button (subtle, top-left of viewer) ── */
.button-launch-demo {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 12px 0 10px;
  border: 1px solid rgba(2, 69, 148, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  color: var(--pav-text-main);
  font-family: "IBM Plex Sans", Arial, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0.78;
  transition: opacity 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.12s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.button-launch-demo:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.92);
  color: var(--pav-text-heading);
}

.button-launch-demo:active {
  transform: scale(0.97);
}

.button-launch-demo svg {
  width: 9px;
  height: 9px;
  fill: var(--pav-accent);
  flex-shrink: 0;
}

.button-launch-demo.is-active {
  opacity: 0;
  pointer-events: none;
}

/* ── Zoom slider ───────────────────────────────────────────── */
.zoom-slider-container {
  position: absolute;
  bottom: 20px;
  right: 132px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 46px;
  padding: 0 10px;
  border-radius: 8px;
  background: rgba(2, 69, 148, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    0 2px 10px rgba(2, 69, 148, 0.30),
    0 1px 3px rgba(0, 0, 0, 0.10);
}

.zoom-label {
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  user-select: none;
  pointer-events: none;
  font-family: "IBM Plex Sans", Arial, sans-serif;
  opacity: 0.8;
}

.zoom-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 90px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.zoom-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  border: 2px solid var(--pav-accent);
  transition: transform 0.12s ease;
}

.zoom-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.zoom-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  border: 2px solid var(--pav-accent);
}

.zoom-slider::-moz-range-track {
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
}

/* ── HD transition overlay video ───────────────────────────── */
.hd-transition-overlay {
  position: absolute;
  inset: 0;
  width: 0;
  height: 0;
  object-fit: cover;
  z-index: 45;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

.hd-transition-overlay.is-visible {
  width: 100%;
  height: 100%;
  opacity: 1;
  pointer-events: auto;
}

.hd-transition-overlay.is-dissolving {
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.2s ease;
}

/* ── Meta panel (hidden by default) ────────────────────────── */
.meta-panel {
  display: none;
}

.viewer-links,
.viewer-meta,
.raw-data {
  padding: 12px 14px;
  border: 1px solid var(--pav-line);
  border-radius: 2px;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.viewer-links {
  display: grid;
  gap: 8px;
}

.viewer-links a {
  color: var(--pav-text-main);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}

.viewer-links a:hover {
  color: var(--pav-accent);
}

.viewer-meta {
  display: grid;
  gap: 8px;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--pav-text-muted);
  font-size: 12px;
}

.meta-row strong {
  color: var(--pav-text-main);
  text-align: right;
}

.raw-data summary {
  cursor: pointer;
  color: var(--pav-text-main);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#page-json {
  margin: 12px 0 0;
  max-height: 220px;
  overflow: auto;
  color: #024594;
  font-size: 12px;
  line-height: 1.5;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
  body.pavilion-mode {
    overflow: auto;
  }

  #container {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100vh;
  }

  .logo-container {
    position: sticky;
    top: 0;
  }

  .viewer-viewer {
    position: relative !important;
    height: 50vh !important;
    margin: 12px;
    width: calc(100% - 24px);
    border-radius: 4px;
    order: -1;
  }

  .viewer-hotspot-overlay {
    position: absolute;
  }

  .content-container {
    margin: 0 12px 12px;
    max-height: none;
  }

  .content-container-content {
    max-height: none;
  }

  .sidebar {
    position: sticky;
    bottom: 0;
    flex-wrap: wrap;
    padding: 8px;
    gap: 4px;
    border-top: 1px solid var(--pav-line);
    border-radius: 0;
  }

  .sidebar-button {
    height: 36px;
    padding: 0 14px;
    font-size: 10px;
  }
}
