/* ============================================================
   DVVPCOE Virtual Campus Tour — style.css
   Theme : Light & Fresh  (white / sky-blue / navy accents)
   Hotspot fix: NO transition on wrapper, will-change:transform
   ============================================================ */

/* ── Google Font (loaded in HTML) ─────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
.progress {
  height: 100%;
  width: 0%;
  background: #002054;
  animation: loadProgress 10s linear forwards;
}
#countdown {
  font-size: 32px;
  font-weight: bold;
  margin-top: 10px;
  color: #3b82f6;
}
#introOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  /* Base background (important) */
  background-color: #ffffff;

  background: linear-gradient(145deg, #f0f5ff 0%, #e8edf8 50%, #f5f7fc 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
}
.introContent {
  text-align: center;
  font-size: 38px;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: -.02em;
    margin-bottom: 12px;
}

.logo {
  width: 150px;
  margin-bottom: 50px;
}

.small {
  opacity: 0.7;
  font-size: 18px;
  margin-top: 10px;
}

/* Progress bar */
.progress-bar {
  width: 250px;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  margin: 20px auto;
  border-radius: 5px;
  overflow: hidden;
}

.progress {
  height: 100%;
  width: 0%;
  background: #3b82f6;
  animation: loadProgress 15s linear forwards;
}

@keyframes loadProgress {
  from {
    width: 0%;
  }

  to {
    width: 100%;
  }
}

:root {
  /* Surfaces */
  --bg: #f0f4fa;
  --surface-0: #ffffff;
  --surface-1: #f7f9fc;
  --surface-2: #edf1f7;
  --surface-3: #dde5f0;

  /* Borders */
  --border: rgba(30, 60, 120, 0.10);
  --border-mid: rgba(30, 60, 120, 0.18);
  --border-strong: rgba(30, 60, 120, 0.30);

  /* Brand / accent */
  --navy: #1a3a7c;
  --navy-mid: #2152a8;
  --navy-light: #3a6fd4;
  --sky: #e8f0fd;
  --sky-mid: #c5d8fc;

  /* Text */
  --text: #0f1f3d;
  --text-mid: #3d5280;
  --text-muted: #7a90b8;
  --text-on-navy: #ffffff;

  /* Feedback */
  --green: #16a34a;
  --green-bg: #dcfce7;

  /* Dimensions */
  --sidebar-w: 280px;
  --topbar-h: 60px;
  --statusbar-h: 36px;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;

  --shadow-sm: 0 1px 3px rgba(15, 31, 61, .08), 0 1px 2px rgba(15, 31, 61, .06);
  --shadow-md: 0 4px 14px rgba(15, 31, 61, .10), 0 2px 6px rgba(15, 31, 61, .07);
  --shadow-lg: 0 12px 32px rgba(15, 31, 61, .13), 0 4px 10px rgba(15, 31, 61, .08);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --fast: 130ms;
  --normal: 260ms;
}

/* ── Reset ──────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* ════════════════════════════════════════════════════════
   APP SHELL
═════════════════════════════════════════════════════════ */
#app {
  display: flex;
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
}

/* Mobile overlay */
#sidebarOverlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 31, 61, .35);
  backdrop-filter: blur(4px);
  z-index: 900;
}

#sidebarOverlay.open {
  display: block;
}

/* ════════════════════════════════════════════════════════
   SIDEBAR
═════════════════════════════════════════════════════════ */
#sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  height: 100%;
  background: var(--surface-0);
  border-right: 1px solid var(--border-mid);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: width var(--normal) var(--ease),
    transform var(--normal) var(--ease);
  z-index: 800;
}

#sidebar.collapsed {
  width: 0;
  border-right: none;
  box-shadow: none;
}

/* ── Logo / Brand ──────────────────────────────────────── */
.logoBox {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--navy);
  flex-shrink: 0;
}

.logo-badge {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  color: var(--navy);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .20);
  letter-spacing: .3px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.brand-name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  letter-spacing: .01em;
}

.brand-sub {
  font-size: 11px;
  color: rgba(255, 255, 255, .65);
  white-space: nowrap;
}

/* ── Active Location Card ────────────────────────────────
.active-card {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px;
  padding: 10px 12px;
  background: var(--sky);
  border: 1px solid var(--sky-mid);
  border-radius: var(--radius);
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.active-card-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-xs);
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.active-card-icon svg {
  width: 15px;
  height: 15px;
}

.active-card-info {
  flex: 1;
  overflow: hidden;
}

.active-card-name {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--navy);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.active-card-sub {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 1px;
}

.active-card-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .07em;
  color: var(--navy);
  background: var(--sky-mid);
  border: 1px solid var(--border-mid);
  padding: 3px 7px;
  border-radius: 99px;
  flex-shrink: 0;
} */

/* ── Menu ──────────────────────────────────────────────── */
.menu {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px 0 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--surface-3) transparent;
}

.nav-section-label {
  padding: 12px 16px 4px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Top-level nav buttons */
.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px 9px 10px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text-mid);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  position: relative;
  transition: background var(--fast), color var(--fast);
  white-space: nowrap;
  overflow: hidden;
}

.nav-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  background: transparent;
  border-radius: 0 3px 3px 0;
  transition: background var(--fast);
}

.nav-item:hover {
  background: var(--surface-1);
  color: var(--navy);
}

.nav-item.active-item {
  background: var(--sky);
  color: var(--navy);
}

.nav-item.active-item::before {
  background: var(--navy);
}

.nav-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-xs);
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: background var(--fast), color var(--fast), border-color var(--fast);
}

.nav-icon svg {
  width: 13px;
  height: 13px;
}

.nav-item:hover .nav-icon,
.nav-item.active-item .nav-icon {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.nav-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-arrow {
  font-size: 16px;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity var(--fast);
}

.nav-item:hover .nav-arrow {
  opacity: 1;
}

.nav-chevron {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform var(--normal);
}

.nav-chevron svg {
  width: 13px;
  height: 13px;
  display: block;
}

.nav-chevron.sm svg {
  width: 11px;
  height: 11px;
}

.menu-section.open>.nav-item .nav-chevron,
.dept.open>.dept-toggle .nav-chevron {
  transform: rotate(180deg);
}

/* Sub-menus */
.submenu {
  display: none;
  background: var(--surface-1);
  border-top: 1px solid var(--border);
}

.menu-section.open .submenu {
  display: block;
}

.dept-sub {
  display: none;
}

.dept.open .dept-sub {
  display: block;
}

.dept-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 8px 20px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text-mid);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background var(--fast), color var(--fast);
}

.dept-toggle:hover {
  background: var(--surface-2);
  color: var(--navy);
}

.dept-toggle.active-item {
  color: var(--navy-mid);
  background: var(--sky);
}

.dept-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--surface-3);
  flex-shrink: 0;
  transition: background var(--fast);
}

.dept-toggle:hover .dept-dot,
.dept-toggle.active-item .dept-dot {
  background: var(--navy-mid);
}

/* Room / lab buttons */
.dept-sub button,
.submenu button.flat {
  width: 100%;
  display: block;
  padding: 7px 12px 7px 32px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  transition: background var(--fast), color var(--fast), padding-left var(--fast);
}

.dept-sub button:hover,
.submenu button.flat:hover {
  background: var(--surface-2);
  color: var(--navy);
  padding-left: 36px;
}

.dept-sub button.active-item,
.submenu button.flat.active-item {
  color: var(--navy);
  background: var(--sky);
  font-weight: 600;
}

/* Sidebar footer */
.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid var(--border-mid);
  font-size: 10px;
  color: var(--text-muted);
  font-family: monospace;
  flex-shrink: 0;
  white-space: nowrap;
  background: var(--surface-1);
}

.footer-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: .3;
  }
}

/* ════════════════════════════════════════════════════════
   MAIN COLUMN
═════════════════════════════════════════════════════════ */
#main {
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* ── Topbar ────────────────────────────────────────────── */
#topbar {
  flex-shrink: 0;
  height: var(--topbar-h);
  background: var(--surface-0);
  border-bottom: 1px solid var(--border-mid);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px 0 12px;
  z-index: 50;
}

#sidebarToggle {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-1);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-xs);
  color: var(--text-mid);
  cursor: pointer;
  transition: background var(--fast), color var(--fast);
}

#sidebarToggle svg {
  width: 15px;
  height: 15px;
}

#sidebarToggle:hover {
  background: var(--sky);
  color: var(--navy);
  border-color: var(--sky-mid);
}

#mobileToggle {
  display: none;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  border: none;
  border-radius: var(--radius-xs);
  color: #fff;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

#mobileToggle svg {
  width: 15px;
  height: 15px;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 9px;
}

.topbar-logo {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-xs);
  flex-shrink: 0;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 11px;
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.topbar-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.topbar-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
}

.topbar-sub {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Start Tour — navy button */
.start-tour-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 16px;
  height: 34px;
  background: var(--navy);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  transition: background var(--fast), transform var(--fast), box-shadow var(--fast);
}

.start-tour-btn svg {
  width: 11px;
  height: 11px;
}

.start-tour-btn:hover {
  background: var(--navy-mid);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Control buttons */
.topbar-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.ctrl-btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-1);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-xs);
  color: var(--text-mid);
  cursor: pointer;
  transition: background var(--fast), color var(--fast), border-color var(--fast);
}

.ctrl-btn svg {
  width: 14px;
  height: 14px;
}

.ctrl-btn:hover {
  background: var(--sky);
  color: var(--navy);
  border-color: var(--sky-mid);
}

.ctrl-btn.active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

/* ════════════════════════════════════════════════════════
   VIEWER AREA
═════════════════════════════════════════════════════════ */
#viewerArea {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: var(--surface-2);
}

/* Marzipano — must be absolute with real pixel size */
#pano {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* ── Welcome Screen ──────────────────────────────────── */
#welcomeScreen {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #f0f5ff 0%, #e8edf8 50%, #f5f7fc 100%);
  overflow: hidden;
  opacity: 1;
  visibility: visible;
  transition: opacity .45s ease, visibility .45s ease;
}

#welcomeScreen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Subtle dot grid */
.welcome-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(26, 58, 124, .12) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 75% 75% at 50% 50%, black 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 75% 75% at 50% 50%, black 20%, transparent 75%);
}

/* Soft blue radial glow */
.welcome-glow {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(33, 82, 168, .07) 0%, transparent 65%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.welcome-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px 32px;
}

.welcome-icon {
  width: 90px;
  height: 90px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid var(--border-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  margin-bottom: 28px;
  box-shadow: var(--shadow-lg);
  animation: float 4s ease-in-out infinite;
}

.welcome-icon svg {
  width: 38px;
  height: 38px;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-9px);
  }
}

.welcome-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -.02em;
  margin-bottom: 12px;
}

.welcome-sub {
  font-size: 14px;
  color: var(--text-mid);
  max-width: 340px;
  line-height: 1.75;
  margin-bottom: 30px;
}

.welcome-cta {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 26px;
  height: 46px;
  background: var(--navy);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: background var(--fast), transform var(--fast), box-shadow var(--fast);
}

.welcome-cta svg {
  width: 14px;
  height: 14px;
}

.welcome-cta:hover {
  background: var(--navy-mid);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* ── Status Bar ──────────────────────────────────────── */
#statusBar {
  flex-shrink: 0;
  height: var(--statusbar-h);
  background: var(--surface-0);
  border-top: 1px solid var(--border-mid);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  z-index: 50;
}

.status-live {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--green);
  font-family: monospace;
  letter-spacing: .04em;
  white-space: nowrap;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 5px var(--green);
  animation: pulse 2s ease-in-out infinite;
}

.status-sep {
  width: 1px;
  height: 14px;
  background: var(--border-mid);
  flex-shrink: 0;
}

.status-loc {
  font-size: 11.5px;
  color: var(--text-mid);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.status-hint {
  font-size: 10px;
  color: var(--text-muted);
  font-family: monospace;
  white-space: nowrap;
  margin-left: auto;
}

/* ════════════════════════════════════════════════════════
   HOTSPOTS — DRIFT-FREE

   Rule: .link-hotspot wrapper → NO CSS transition whatsoever.
   Marzipano sets its transform every rAF. Any transition
   on this element causes the browser to interpolate between
   old & new translate values → visible drift while panning.

   Hover effects live ONLY on child elements
   (filter/opacity — compositor-only, don't touch parent).
═════════════════════════════════════════════════════════ */
.hotspot {
  /* GPU compositing layer for Marzipano's per-frame transform */
  will-change: transform;
}

.link-hotspot {
  width: 64px;
  height: 64px;
  margin-top: -32px;
  /* -(height/2) — centres on anchor */
  margin-left: -32px;
  /* -(width/2)  — centres on anchor */
  position: relative;
  cursor: pointer;
  /* ✗ NO transition  ✗ NO CSS transform  ✗ NO animation */
}

/* Original img/link.png icon */
.link-hotspot-icon {
  display: block;
  width: 100%;
  height: 100%;
  /* Filter is compositor-only — safe for hover ✓ */
  filter: drop-shadow(0 3px 8px rgba(15, 31, 61, .45));
  transition: filter 110ms linear;
}

.link-hotspot:hover .link-hotspot-icon {
  filter: drop-shadow(0 0 10px rgba(26, 58, 124, .7)) drop-shadow(0 3px 8px rgba(15, 31, 61, .45));
}

/* Tooltip — child element, its own transform doesn't affect parent */
.link-hotspot-tooltip {
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  /* child-only — parent unaffected */

  padding: 6px 13px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;

  border-radius: var(--radius-sm);
  background: var(--surface-0);
  border: 1px solid var(--border-mid);
  color: var(--navy);
  box-shadow: var(--shadow-md);

  pointer-events: none;
  opacity: 0;
  transition: opacity 160ms ease;
  /* opacity only — safe ✓ */
}

.link-hotspot:hover .link-hotspot-tooltip {
  opacity: 1;
  pointer-events: auto;
}

/* Info Hotspot */
/* Info Hotspot */
.info-hotspot {
  background: var(--surface-0);
  border: 1.5px solid var(--border-mid);
  border-radius: var(--radius-sm);
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
  transition: background 110ms linear, box-shadow 110ms linear;
}

.info-hotspot:hover {
  background: var(--sky);
  box-shadow: var(--shadow-md);
}

/* ════════════════════════════════════════════════════════
   SCROLLBARS
═════════════════════════════════════════════════════════ */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--surface-3);
  border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--navy-light);
}

/* ════════════════════════════════════════════════════════
   TABLET ≤900px
═════════════════════════════════════════════════════════ */
@media (max-width: 900px) and (min-width: 769px) {
  :root {
    --sidebar-w: 230px;
  }

  .brand-name {
    font-size: 13px;
  }

  .nav-item {
    font-size: 12px;
  }
}

/* ════════════════════════════════════════════════════════
   MOBILE ≤768px  — sidebar becomes a slide-over drawer
═════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  #app {
    display: block;
  }

  #main {
    width: 100%;
    height: 100%;
  }

  #sidebar {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 82% !important;
    max-width: 300px;
    height: 100% !important;
    transform: translateX(-108%) !important;
    transition: transform var(--normal) var(--ease) !important;
    z-index: 1000;
    box-shadow: none;
  }

  #sidebar.mobile-open {
    transform: translateX(0) !important;
    box-shadow: var(--shadow-lg) !important;
  }

  #sidebar.collapsed {
    transform: translateX(-108%) !important;
    width: 82% !important;
  }

  #sidebarToggle {
    display: none !important;
  }

  #mobileToggle {
    display: flex !important;
  }

  #topbar {
    padding: 0 10px;
    gap: 8px;
  }

  .topbar-name {
    display: none;
  }

  .topbar-sub {
    display: none;
  }

  /* Start Tour: icon only on mobile */
  .start-tour-btn {
    padding: 0 10px;
    font-size: 0;
    gap: 0;
    min-width: 34px;
  }

  .start-tour-btn svg {
    width: 14px;
    height: 14px;
  }

  /* Hide zoom buttons — keep autorotate + fullscreen */
  .ctrl-btn:nth-child(2),
  .ctrl-btn:nth-child(3) {
    display: none;
  }

  .status-hint {
    display: none;
  }

  .welcome-title {
    font-size: 22px;
  }

  .welcome-sub {
    font-size: 13px;
    max-width: 280px;
  }

  .welcome-icon {
    width: 74px;
    height: 74px;
  }

  .welcome-icon svg {
    width: 32px;
    height: 32px;
  }

  /* Tooltip below hotspot on mobile (no room to the right) */
  .link-hotspot-tooltip {
    left: 50%;
    top: calc(100% + 8px);
    transform: translateX(-50%);
    white-space: normal;
    max-width: 140px;
    text-align: center;
  }
}

/* ════════════════════════════════════════════════════════
   SMALL MOBILE ≤480px
═════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .topbar-logo {
    display: none;
  }

  #sidebar {
    width: 90% !important;
    max-width: 310px;
  }

  .ctrl-btn:nth-child(1),
  .ctrl-btn:nth-child(2),
  .ctrl-btn:nth-child(3) {
    display: none;
  }

  .welcome-title {
    font-size: 19px;
  }

  .welcome-sub {
    font-size: 12px;
  }

  .welcome-cta {
    font-size: 13px;
    height: 40px;
  }

  #statusBar {
    padding: 0 10px;
  }
}

/* ════════════════════════════════════════════════════════
   TOUCH DEVICES — no hover-only effects
═════════════════════════════════════════════════════════ */
@media (hover: none) and (pointer: coarse) {

  .dept-sub button:hover,
  .submenu button.flat:hover {
    padding-left: 32px;
  }

  .ctrl-btn {
    width: 40px;
    height: 40px;
  }

  #mobileToggle {
    width: 40px;
    height: 40px;
  }

  .welcome-cta:hover {
    transform: none;
  }

  .start-tour-btn:hover {
    transform: none;
  }
}

/* ════════════════════════════════════════════════════════
   CUSTOM LOGO IMAGES
   Sidebar : <img src="img/logo.png" class="sidebar-logo-img">
   Topbar  : <img src="img/logo.png" class="topbar-logo-img">
═════════════════════════════════════════════════════════ */

/* Sidebar logo — inside navy .logoBox strip */
.sidebar-logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: var(--radius-xs);
  background: #fff;
  padding: 3px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .22);
  display: block;
}

/* Topbar logo — next to brand name */
.topbar-logo-img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: var(--radius-xs);
  background: #fff;
  padding: 2px;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
  display: block;
}

/* ── Logo responsive tweaks ───────────────────────────── */

/* Tablet (900px) — slightly smaller logo */
@media (max-width: 900px) and (min-width: 769px) {
  .sidebar-logo-img {
    width: 36px;
    height: 36px;
  }

  .topbar-logo-img {
    width: 30px;
    height: 30px;
  }
}

/* Mobile (768px) — keep logos but tighten spacing */
@media (max-width: 768px) {
  .sidebar-logo-img {
    width: 36px;
    height: 36px;
  }

  .topbar-logo-img {
    width: 30px;
    height: 30px;
  }

  /* Brand text hidden on mobile — but logo still shows */
  .topbar-logo-img {
    display: block !important;
    /* always keep topbar logo */
  }
}

/* Small mobile (480px) — topbar logo hidden to save space */
@media (max-width: 480px) {
  .topbar-logo-img {
    display: none;
  }

  .sidebar-logo-img {
    width: 32px;
    height: 32px;
    padding: 2px;
  }
}

/* Very small (360px) — compact sidebar logo */
@media (max-width: 360px) {
  .sidebar-logo-img {
    width: 28px;
    height: 28px;
  }

  .logoBox {
    gap: 8px;
    padding: 12px;
  }

  .brand-name {
    font-size: 13px;
  }

  .brand-sub {
    display: none;
  }
} 
/* ══════════════════════════════════════════════════════════════
   AUDIO PLAYER WIDGET
══════════════════════════════════════════════════════════════ */

.audio-player {
  position: fixed;
  bottom: calc(var(--statusbar-h) + 12px);
  right: 16px;
  z-index: 600;
  background: var(--surface-0);
  border: 1.5px solid var(--border-mid);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(30,60,120,.04);
  padding: 10px 12px 10px 14px;
  min-width: 270px;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: audioSlideIn .3s ease;
}

@keyframes audioSlideIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.audio-player.hidden { display: none !important; }

.audio-dept-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--navy-mid);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.audio-dept-label svg { flex-shrink: 0; color: var(--navy-light); }

.audio-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.audio-play-btn {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--navy-mid);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, transform .1s;
}
.audio-play-btn:hover  { background: var(--navy); transform: scale(1.08); }
.audio-play-btn:active { transform: scale(.94); }

.audio-progress-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.audio-progress-bar {
  width: 100%;
  height: 5px;
  background: var(--surface-3);
  border-radius: 99px;
  cursor: pointer;
  overflow: hidden;
}

.audio-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--navy-light), var(--navy-mid));
  border-radius: 99px;
  transition: width .4s linear;
  pointer-events: none;
}

.audio-time {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.audio-close-btn {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface-2);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: background .15s, color .15s;
}
.audio-close-btn:hover { background: var(--surface-3); color: var(--text); }

@media (max-width: 768px) {
  .audio-player {
    bottom: calc(var(--statusbar-h) + 8px);
    right: 8px;
    left: 8px;
    max-width: none;
    min-width: unset;
  }
}
