/* ═══════════════════════════════════════════════════════════════════════
   Discover Suli 360° — Daylight Light Mode (Porcelain, Sky Azure & Amber)
   Distinct bespoke visual identity for the Public User Website
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  color-scheme: light;
  --bg-deep: #F4F8F5;
  --glass-bg: rgba(255, 255, 255, 0.88);
  --glass-solid: #FFFFFF;
  --glass-card: #F6FAF7;
  --glass-soft: rgba(37, 132, 95, 0.08);
  --border: rgba(2, 30, 35, 0.12);
  --border-strong: rgba(37, 132, 95, 0.36);
  --ink: #021E23;
  --ink-soft: #264245;
  --ink-muted: #4E6B69;
  --emerald: #25845F;
  --pine: #0A534E;
  --gold: #25845F;
  --gold-deep: #0A534E;
  --radius-pill: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-bar: 0 10px 30px rgba(2, 30, 35, 0.14), 0 1px 3px rgba(2, 30, 35, 0.08);
  --shadow-panel: 0 22px 52px rgba(2, 30, 35, 0.18), 0 2px 10px rgba(2, 30, 35, 0.08);
  --header-h: 56px;
  --tr: 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  --focus: #25845F;
}

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

html, body {
  inline-size: 100%;
  block-size: 100%;
  overflow: hidden;
  font-family: 'Plus Jakarta Sans', 'Noto Sans Arabic', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg-deep);
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img, svg, canvas { display: block; }

:where(a:any-link, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

/* ─── Fullscreen WebGL Stage ──────────────────────────────────────────── */
.stage {
  position: fixed;
  inset: 0;
  inline-size: 100%;
  block-size: 100dvh;
  background: #E4EFE6;
  overflow: hidden;
}

#pano-canvas {
  inline-size: 100%;
  block-size: 100%;
  cursor: grab;
  touch-action: none;
  outline: none;
}

#pano-canvas:active { cursor: grabbing; }

.transition-veil {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(37, 132, 95, 0.16), rgba(244, 248, 245, 0.72));
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
  z-index: 4;
}
.transition-veil.active { opacity: 1; }

.pano-loader {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 42%, #FFFFFF 0%, #E6F2E9 100%);
  color: var(--ink);
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
.pano-loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.loader-logo {
  inline-size: min(240px, 66vw);
  block-size: auto;
  margin-block-end: 16px;
  filter: drop-shadow(0 8px 22px rgba(2, 30, 35, 0.09));
}

.loader-spinner {
  inline-size: 48px;
  block-size: 48px;
  border-radius: 50%;
  border: 3px solid rgba(37, 132, 95, 0.18);
  border-top-color: #25845F;
  border-inline-end-color: #8CBC93;
  animation: spin 0.85s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .loader-logo {
  inline-size: min(240px, 66vw);
  block-size: auto;
  margin-block-end: 16px;
  filter: drop-shadow(0 8px 22px rgba(2, 30, 35, 0.09));
}

.loader-spinner { animation-duration: 6s; }
}
@keyframes spin { to { transform: rotate(360deg); } }

.loader-title {
  margin-block-start: 14px;
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  padding-inline: 20px;
  color: var(--pine);
}
.loader-sub { margin-block-start: 4px; font-size: 12px; color: var(--ink-soft); }

/* ─── Floating Frosted Porcelain Light Pill Header ────────────────────── */
.suli-header {
  position: fixed;
  top: 14px;
  inset-inline: 18px;
  block-size: var(--header-h);
  z-index: 30;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(246, 250, 247, 0.88));
  backdrop-filter: blur(22px) saturate(185%);
  -webkit-backdrop-filter: blur(22px) saturate(185%);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow-bar), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  padding-inline: 6px;
  gap: 4px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

body.clean-ui .suli-header,
body.clean-ui .viewer-controls,
body.clean-ui .scene-pager,
body.clean-ui .suli-compass,
body.clean-ui .mobile-dock {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
}

.clean-exit-btn {
  position: fixed;
  top: 16px;
  inset-inline-end: 18px;
  z-index: 60;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  min-block-size: 44px;
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  color: var(--pine);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  box-shadow: var(--shadow-bar);
  font-size: 12px;
  font-weight: 700;
}
body.clean-ui .clean-exit-btn { display: inline-flex; }

.brand-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding-inline: 12px 14px;
  block-size: 42px;
  border-radius: 12px;
  flex-shrink: 0;
  transition: background-color var(--tr);
}
.brand-btn:hover { background: var(--glass-soft); }

.brand-emblem-wrap { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand-emblem { inline-size: auto; block-size: 28px; display: block; object-fit: contain; }
.brand-wordmark { display: flex; flex-direction: column; line-height: 1.05; text-align: start; }
.brand-top {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.brand-top em { color: var(--emerald); font-style: normal; font-weight: 800; }
.brand-sub {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--gold-deep);
  margin-block-start: 2px;
}

.header-group {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.hdr-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 38px;
  block-size: 38px;
  border-radius: 10px;
  color: var(--ink-soft);
  background: rgba(2, 30, 35, 0.04);
  border: 1px solid transparent;
  transition: background-color var(--tr), color var(--tr), border-color var(--tr), transform var(--tr);
}

.hdr-btn-pill {
  inline-size: auto;
  padding-inline: 11px;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
}
.hdr-btn-pill .hdr-lbl { white-space: nowrap; }

.hdr-btn:hover {
  background: rgba(37, 132, 95, 0.11);
  color: var(--emerald);
  border-color: rgba(37, 132, 95, 0.25);
  transform: translateY(-1px);
}
.hdr-btn:active { scale: 0.94; }

.hdr-btn.active {
  color: #FFFFFF;
  background: linear-gradient(135deg, #25845F, #0A534E);
  border-color: #25845F;
  box-shadow: 0 4px 12px rgba(37, 132, 95, 0.30);
}

.hdr-btn svg { inline-size: 18px; block-size: 18px; }

.hdr-tip {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background: #021E23;
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(2, 30, 35, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
  z-index: 45;
}

.hdr-btn:hover .hdr-tip,
.hdr-btn:focus-visible .hdr-tip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Center Scene Title */
.scene-title-wrap {
  flex: 1 1 auto;
  min-inline-size: 0;
  padding-inline: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.scene-place-pill {
  flex-shrink: 0;
  max-inline-size: 170px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: rgba(37, 132, 95, 0.11);
  color: var(--pine);
  border: 1px solid rgba(37, 132, 95, 0.22);
  cursor: pointer;
  transition: background-color var(--tr), border-color var(--tr), scale 0.14s ease-out;
}
.scene-place-pill:hover { background: rgba(37, 132, 95, 0.18); border-color: rgba(37, 132, 95, 0.36); }
.scene-place-pill:active { scale: 0.96; }
.scene-place-pill[hidden] { display: none; }

.scene-cat-dot {
  inline-size: 9px;
  block-size: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--emerald);
  box-shadow: 0 0 8px currentColor;
}

.suli-scene-title {
  font-family: 'Playfair Display', 'Noto Sans Arabic', serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

.header-end {
  display: flex;
  align-items: center;
  padding-inline: 4px 6px;
  flex-shrink: 0;
}

.lang-select {
  appearance: none;
  background: rgba(37, 132, 95, 0.08) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%230A534E' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 9px center;
  border: 1px solid rgba(37, 132, 95, 0.22);
  border-radius: 999px;
  padding-block: 6px;
  padding-inline-start: 12px;
  padding-inline-end: 26px;
  min-block-size: 36px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--pine);
  cursor: pointer;
}

.lang-select option { background: #FFFFFF; color: #021E23; }
html[dir="rtl"] .lang-select { background-position: left 9px center; }

/* ─── Live Rotating Suli Compass Widget ───────────────────────────────── */
.suli-compass {
  position: fixed;
  top: 82px;
  inset-inline-end: 20px;
  z-index: 22;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  pointer-events: auto;
  cursor: pointer;
  transition: opacity 0.25s ease, transform var(--tr), scale 0.14s ease-out;
}
.suli-compass:hover .compass-dial {
  border-color: var(--emerald);
  box-shadow: 0 10px 26px rgba(37, 132, 95, 0.24), 0 1px 3px rgba(2, 30, 35, 0.08);
}
.suli-compass:active { scale: 0.95; }

.compass-dial {
  position: relative;
  inline-size: 50px;
  block-size: 50px;
  border-radius: 50%;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-bar), inset 0 0 0 1px rgba(37, 132, 95, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.06s linear, border-color var(--tr), box-shadow var(--tr);
}

.compass-n {
  position: absolute;
  top: 2px;
  font-size: 8.5px;
  font-weight: 800;
  color: var(--pine);
}

.compass-deg {
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.90);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(2, 30, 35, 0.10);
  font-size: 9.5px;
  font-weight: 800;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(2, 30, 35, 0.10);
  white-space: nowrap;
}

/* ─── 3D Hotspots Layer (White-Rimmed Category Teardrops) ───────────────── */
.hotspots-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 12;
  transition: opacity 0.2s ease;
}
body.hide-pins .hotspots-layer,
body.clean-ui .hotspots-layer { opacity: 0; pointer-events: none; }

.hs-pin {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -100%);
  pointer-events: auto;
  z-index: 12;
  padding: 4px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hs-pin:hover, .hs-pin.hovered { z-index: 25; }

.hs-pill-lbl {
  position: absolute;
  top: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 12px rgba(2, 30, 35, 0.22);
  color: #021E23;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
  max-inline-size: 168px;
  pointer-events: auto;
  transition: transform 0.18s ease, background-color 0.18s ease;
}
.hs-pill-lbl > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.hs-pill-dot { inline-size: 7px; block-size: 7px; border-radius: 50%; flex-shrink: 0; }
.hs-pin:hover .hs-pill-lbl,
.hs-pin:focus-visible .hs-pill-lbl { background: #FFFFFF; transform: translateX(-50%) scale(1.04); }

.hs-pin::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 2px;
  inline-size: 16px;
  block-size: 8px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.65);
  filter: blur(2px);
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .hs-pin::after { animation: pulseRing 2.2s ease-out infinite; }
}

@keyframes pulseRing {
  0% { transform: translateX(-50%) scale(0.8); opacity: 0.9; }
  100% { transform: translateX(-50%) scale(2.1); opacity: 0; }
}

.hs-teardrop {
  inline-size: 42px;
  block-size: 51px;
  filter: drop-shadow(0 5px 12px rgba(2, 30, 35, 0.38));
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  transform-origin: 50% 95%;
}

.hs-pin:hover .hs-teardrop,
.hs-pin:focus-visible .hs-teardrop,
.hs-pin.hovered .hs-teardrop {
  transform: scale(1.16) translateY(-3px);
}

/* Kuula / Street-View Directional Navigation Portal Signs */
.hs-pin-nav {
  transform: translate(-50%, -50%);
}
.hs-pin-nav::after {
  bottom: 50%;
  inline-size: 46px;
  block-size: 46px;
  transform: translate(-50%, 50%);
  border: 2px solid rgba(255, 255, 255, 0.75);
  background: transparent;
  filter: none;
}
@media (prefers-reduced-motion: no-preference) {
  .hs-pin-nav::after { animation: navPortalPulse 2.1s ease-out infinite; }
}
@keyframes navPortalPulse {
  0% { transform: translate(-50%, 50%) scale(0.95); opacity: 0.85; }
  100% { transform: translate(-50%, 50%) scale(1.48); opacity: 0; }
}
.hs-nav-disc {
  inline-size: 44px;
  block-size: 44px;
  border-radius: 50%;
  border: 2.8px solid #FFFFFF;
  color: #FFFFFF;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 18px rgba(2, 30, 35, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.2s ease;
}
.hs-nav-disc svg { inline-size: 22px; block-size: 22px; }
.hs-pin-nav:hover .hs-nav-disc,
.hs-pin-nav:focus-visible .hs-nav-disc,
.hs-pin-nav.hovered .hs-nav-disc {
  transform: scale(1.15);
  box-shadow: 0 10px 24px rgba(2, 30, 35, 0.5), 0 0 0 5px rgba(255, 255, 255, 0.3);
}

/* Floating Light Glass Preview Card */
.hs-card {
  position: fixed;
  z-index: 28;
  inline-size: 256px;
  background: var(--glass-solid);
  color: var(--ink);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-panel);
  border: 1px solid var(--border);
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px) scale(0.97);
  transition: opacity 0.16s ease, transform 0.16s ease;
}
.hs-card.open { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }

.hs-card-thumb {
  position: relative;
  inline-size: 100%;
  aspect-ratio: 2 / 1;
  background: #DDE8DF;
  overflow: hidden;
}
.hs-card-thumb img { inline-size: 100%; block-size: 100%; object-fit: cover; }

.hs-card-badge {
  position: absolute;
  top: 8px;
  inset-inline-start: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  color: #FFFFFF;
  background: var(--pin-color, var(--pine));
  box-shadow: 0 2px 8px rgba(2, 30, 35, 0.25);
}

.hs-card-body { padding: 12px 14px; }
.hs-card-title { font-size: 13px; font-weight: 700; color: var(--ink); line-height: 1.35; }
.hs-card-sub { margin-block-start: 4px; font-size: 11px; color: var(--ink-soft); line-height: 1.45; }
.hs-card-cta { margin-block-start: 8px; display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; color: var(--emerald); }

/* ─── Bottom Glass Camera Controls Pill & Scene Switcher ──────────────── */
.viewer-controls {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 8px;
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  box-shadow: var(--shadow-bar);
  transition: opacity 0.25s ease;
}

.vc-btn {
  inline-size: 36px;
  block-size: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  transition: color var(--tr), background-color var(--tr), transform var(--tr);
}
.vc-btn:hover { color: var(--emerald); background: rgba(37, 132, 95, 0.12); transform: scale(1.06); }
.vc-btn:active { scale: 0.91; }
.vc-btn svg { inline-size: 19px; block-size: 19px; }
.vc-sep { inline-size: 1px; block-size: 20px; background: rgba(2, 30, 35, 0.14); margin-inline: 2px; flex-shrink: 0; }

.scene-pager {
  position: fixed;
  bottom: 18px;
  inset-inline-start: 18px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.72);
  padding: 5px 9px;
  border-radius: 999px;
  box-shadow: var(--shadow-bar);
  max-inline-size: min(390px, calc(50% - 165px));
}
.scene-pager[hidden] { display: none; }
.sp-nav { inline-size: 26px; block-size: 26px; border-radius: 50%; background: rgba(37, 132, 95, 0.10); color: var(--pine); font-weight: 800; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sp-nav:hover { background: var(--emerald); color: #fff; }
.sp-label { font-size: 10.5px; font-weight: 700; color: var(--pine); padding-inline: 4px; white-space: nowrap; }
.sp-counter { padding: 2px 7px; border-radius: 999px; background: rgba(37, 132, 95, 0.12); color: var(--pine); font-size: 10px; font-weight: 800; white-space: nowrap; }
.sp-thumbs {
  display: flex; gap: 5px; overflow-x: auto; scrollbar-width: none;
  scroll-snap-type: x proximity;
  padding-inline: 2px;
}
.sp-thumbs::-webkit-scrollbar { display: none; }
.sp-thumbs > * { scroll-snap-align: start; }

.sp-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 3px;
  border-radius: 999px;
  background: rgba(2, 30, 35, 0.05);
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
  flex-shrink: 0;
  transition: all var(--tr);
}
.sp-chip img { inline-size: 26px; block-size: 26px; border-radius: 50%; object-fit: cover; }
.sp-chip.active { background: linear-gradient(135deg, #25845F, #0A534E); border-color: #25845F; color: #FFFFFF; font-weight: 700; }

/* ─── Floating Crisp Porcelain Light Mode Panels ──────────────────────── */
.float-panel {
  position: fixed;
  top: calc(14px + var(--header-h) + 10px);
  z-index: 35;
  background: var(--glass-solid);
  color: var(--ink);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-panel);
  border: 1px solid var(--border);
  max-block-size: calc(100dvh - var(--header-h) - 44px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.float-panel.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
.float-panel.left { inset-inline-start: 18px; inline-size: min(560px, calc(100% - 36px)); }
.float-panel.left.narrow { inline-size: min(390px, calc(100% - 36px)); }
.float-panel.right { inset-inline-end: 18px; inline-size: min(440px, calc(100% - 36px)); }
.float-panel.right.compact { inline-size: min(300px, calc(100% - 36px)); }

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 16px;
  border-block-end: 1px solid var(--border);
  background: #F6FAF7;
  flex-shrink: 0;
}
.panel-head h2 { font-size: 14px; font-weight: 700; color: var(--pine); }
.panel-close {
  inline-size: 32px;
  block-size: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
}
.panel-close:hover { background: var(--glass-soft); color: var(--emerald); }
.panel-body {
  padding: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(37, 132, 95, 0.35) transparent;
}

/* Search Panel */
.search-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1.5px solid #B8CEBE;
  border-radius: 999px;
  background: #F6FAF7;
}
.search-input-row:focus-within { border-color: var(--emerald); background: #FFFFFF; }
.search-input-row input { flex: 1 1 auto; min-inline-size: 0; border: none; background: none; outline: none; font-size: max(1rem, 14px); color: var(--ink); }
.search-input-row input::placeholder { color: var(--ink-muted); }
.search-clear-btn { font-size: 12px; font-weight: 600; color: var(--emerald); padding: 4px 8px; }

.filter-section-label { margin-block: 12px 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-muted); }
.cat-chips { display: flex; flex-wrap: wrap; gap: 7px; }

.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-soft);
  background: #EBF3EC;
  border: 1.5px solid var(--border);
  transition: all var(--tr);
}
.cat-chip:hover { border-color: var(--chip-color, var(--emerald)); color: var(--ink); }
.cat-chip.active { background: var(--chip-color, var(--pine)); border-color: var(--chip-color, var(--emerald)); color: #FFFFFF; }
.cat-chip-dot { inline-size: 9px; block-size: 9px; border-radius: 50%; background: var(--chip-color, var(--emerald)); }
.cat-chip.active .cat-chip-dot { background: #FFFFFF; }

.tod-row { display: flex; gap: 6px; margin-block-start: 10px; }
.tod-btn { padding: 5px 11px; border-radius: 999px; font-size: 11px; font-weight: 600; background: #EBF3EC; border: 1px solid var(--border); color: var(--ink-soft); }
.tod-btn.active { background: var(--emerald); border-color: var(--emerald); color: #FFFFFF; }

.search-results-meta { margin-block: 14px 10px; font-size: 12px; font-weight: 600; color: var(--ink-muted); }
.search-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }

.scene-card {
  position: relative;
  display: flex;
  flex-direction: column;
  text-align: start;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--glass-card);
  transition: transform var(--tr), box-shadow var(--tr), border-color var(--tr), scale 0.14s ease-out;
}
.scene-card:hover { transform: translateY(-3px); box-shadow: 0 12px 24px rgba(2, 30, 35, 0.14); border-color: var(--emerald); }
.scene-card:active { scale: 0.985; }
.scene-card.is-current { border: 2px solid var(--emerald); box-shadow: 0 6px 18px rgba(37, 132, 95, 0.22); }
.scene-card-thumb { position: relative; aspect-ratio: 16 / 10; background: #DDE8DF; overflow: hidden; }
.scene-card-thumb img { inline-size: 100%; block-size: 100%; object-fit: cover; transition: transform 0.32s ease; }
.scene-card:hover .scene-card-thumb img { transform: scale(1.06); }
.leaflet-popup-content-wrapper { border-radius: 12px !important; box-shadow: 0 12px 32px rgba(2, 30, 35, 0.18) !important; }

.scene-card-cat {
  position: absolute;
  top: 7px;
  inset-inline-start: 7px;
  inline-size: 24px;
  block-size: 24px;
  border-radius: 50%;
  background: var(--card-color, var(--pine));
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(2, 30, 35, 0.25);
}
.scene-card-tod {
  position: absolute;
  top: 7px;
  inset-inline-end: 7px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 9.5px;
  font-weight: 700;
  background: rgba(2, 30, 35, 0.78);
  color: #FFFFFF;
  text-transform: uppercase;
}
.scene-card-count {
  position: absolute;
  bottom: 7px;
  inset-inline-end: 7px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  background: rgba(2, 30, 35, 0.84);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.28);
}
.scene-card-info { padding: 9px 10px; }
.scene-card-title { font-size: 12px; font-weight: 700; color: var(--ink); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.scene-card-loc { margin-block-start: 3px; font-size: 10.5px; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Info Panel */
.info-loc-title { font-family: 'Playfair Display', serif; font-size: 18px; font-weight: 700; color: var(--ink); line-height: 1.28; }
.info-scene-sub { font-size: 12.5px; font-weight: 700; color: var(--emerald); margin-block-start: 4px; }
.info-desc { margin-block-start: 10px; font-size: 12.5px; line-height: 1.65; color: var(--ink-soft); }
.info-meta-list { margin-block-start: 14px; display: flex; flex-direction: column; gap: 7px; padding: 10px 12px; border-radius: 8px; background: #F6FAF7; border: 1px solid var(--border); font-size: 12px; color: var(--ink-soft); }
.info-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-block-start: 12px; }
.info-tag { padding: 3px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 600; background: #EEF6F0; border: 1px solid rgba(37, 132, 95, 0.22); color: var(--pine); }
.info-actions { display: flex; gap: 8px; margin-block-start: 14px; flex-wrap: wrap; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  min-block-size: 42px;
  border-radius: 8px;
  background: linear-gradient(135deg, #25845F, #0A534E);
  color: #FFFFFF;
  font-size: 12.5px;
  font-weight: 700;
  transition: filter var(--tr);
}
.btn-primary:hover { filter: brightness(1.08); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  min-block-size: 42px;
  border-radius: 8px;
  background: #EBF3EC;
  border: 1px solid var(--border);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
}

.info-nearby-head {
  margin-block: 16px 8px; font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-muted);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.info-strip {
  display: flex; gap: 10px; overflow-x: auto; padding-block-end: 6px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin; scrollbar-color: rgba(37, 132, 95, 0.28) transparent;
}
.info-strip .scene-card { flex: 0 0 162px; scroll-snap-align: start; }

/* Share Panel */
.share-preview { inline-size: 100%; aspect-ratio: 2 / 1; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); margin-block-end: 12px; background: #DDE8DF; }
.share-preview img { inline-size: 100%; block-size: 100%; object-fit: cover; }
.share-url-row { display: flex; gap: 8px; }
.share-url-row input { flex: 1 1 auto; min-inline-size: 0; padding: 8px 10px; min-block-size: 42px; border: 1px solid #B8CEBE; border-radius: 8px; background: #F6FAF7; font-size: 12px; color: var(--ink); }
.share-social-row { display: flex; gap: 8px; margin-block-end: 12px; }
.share-social-btn { flex: 1 1 0; padding: 8px; min-block-size: 40px; border-radius: 8px; border: 1px solid var(--border); background: #F6FAF7; font-size: 11.5px; font-weight: 600; color: var(--ink); }

/* Feedback Form */
.field { display: flex; flex-direction: column; align-items: stretch; gap: 4px; margin-block-end: 14px; }
.field label { font-size: 12px; font-weight: 600; color: var(--ink); }
.field .hint { font-size: 11px; color: var(--ink-muted); }
.field input, .field select, .field textarea {
  font: inherit;
  font-size: max(1rem, 13.5px);
  padding: 9px 11px;
  min-block-size: 44px;
  border: 1.5px solid #B8CEBE;
  border-radius: 8px;
  background: #F6FAF7;
  color: var(--ink);
}
.field select option { background: #FFFFFF; color: var(--ink); }
.field textarea { min-block-size: 96px; resize: vertical; }
.error-msg { display: none; font-size: 12px; color: #B91C1C; font-weight: 600; }
:is(input, select, textarea):is(:user-invalid, .user-invalid-fallback) { border-color: #DC2626; background-color: #FEF2F2; }
:is(input, select, textarea):is(:user-invalid, .user-invalid-fallback) + .error-msg { display: block; }
:is(input, select, textarea):user-valid { border-color: #25845F; }
.fb-actions { display: flex; justify-content: flex-end; gap: 8px; }
.fb-status { margin-block-start: 10px; font-size: 12px; font-weight: 600; }
.fb-status.ok { color: #0A534E; }
.fb-status.err { color: #B91C1C; }

/* View Mode */
.vm-list { display: flex; flex-direction: column; gap: 6px; }
.vm-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; min-block-size: 44px; border-radius: 8px; border: 1px solid var(--border); background: #F6FAF7; font-size: 12.5px; font-weight: 600; text-align: start; color: var(--ink); }
.vm-item.active { border-color: var(--emerald); background: rgba(37, 132, 95, 0.10); color: var(--pine); font-weight: 700; }
.vm-sep { border: 0; border-block-start: 1px solid var(--border); margin-block: 12px 10px; }
.vm-links-label { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-muted); margin-block-end: 6px; }
.vm-links { display: flex; flex-direction: column; gap: 6px; }
.vm-link-btn {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; min-block-size: 42px; border-radius: 8px;
  border: 1px solid var(--border); background: #FFFFFF;
  font-size: 12.5px; font-weight: 700; color: var(--ink); text-decoration: none;
  transition: background-color 0.15s, border-color 0.15s;
}
.vm-link-btn:hover { background: #F6FAF7; border-color: var(--emerald); }
.vm-link-primary {
  background: linear-gradient(135deg, rgba(37, 132, 95, 0.12), rgba(140, 188, 147, 0.2));
  border-color: rgba(37, 132, 95, 0.35);
  color: var(--pine);
}

/* ─── Explore Split-Screen Overlay (Map + Carousels) ─────────────────── */
.explore-overlay {
  position: fixed;
  top: calc(14px + var(--header-h) + 10px);
  inset-inline: 18px;
  bottom: 16px;
  z-index: 32;
  background: var(--glass-solid);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-panel);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.explore-overlay.open { opacity: 1; pointer-events: auto; transform: translateY(0); }

.explore-map-pane { position: relative; block-size: var(--split-top, 52%); min-block-size: 160px; background: #E4EFE6; flex-shrink: 0; }
#explore-map { inline-size: 100%; block-size: 100%; }

.explore-close-btn {
  position: absolute;
  top: 12px;
  inset-inline-end: 12px;
  z-index: 500;
  inline-size: 38px;
  block-size: 38px;
  border-radius: 50%;
  background: var(--glass-bg);
  color: var(--ink);
  border: 1px solid rgba(2, 30, 35, 0.14);
  box-shadow: var(--shadow-bar);
  display: flex;
  align-items: center;
  justify-content: center;
}

.explore-map-tools { position: absolute; top: 12px; inset-inline-start: 56px; inset-inline-end: 58px; z-index: 500; display: flex; gap: 6px; flex-wrap: wrap; pointer-events: none; }
.explore-map-tools .map-pill-btn { pointer-events: auto; }
.map-pill-btn { padding: 7px 13px; min-block-size: 36px; border-radius: 999px; background: var(--glass-bg); color: var(--ink); border: 1px solid rgba(2, 30, 35, 0.14); box-shadow: var(--shadow-bar); font-size: 11.5px; font-weight: 700; transition: background-color 0.15s, color 0.15s, border-color 0.15s; }
.map-pill-btn:hover { border-color: var(--emerald); color: var(--emerald); }
.map-pill-btn.active { background: #0284C7; color: #FFFFFF; border-color: #0284C7; }
.user-gps-icon { background: transparent; border: none; }
.user-gps-dot {
  inline-size: 18px;
  block-size: 18px;
  border-radius: 50%;
  background: #0284C7;
  border: 3px solid #FFFFFF;
  box-shadow: 0 0 0 7px rgba(2, 132, 199, 0.28), 0 4px 12px rgba(2, 30, 35, 0.35);
}
@media (prefers-reduced-motion: no-preference) {
  .user-gps-dot { animation: gpsPulse 2s ease-out infinite; }
}
@keyframes gpsPulse {
  0% { box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.45), 0 4px 10px rgba(2, 30, 35, 0.3); }
  100% { box-shadow: 0 0 0 18px rgba(2, 132, 199, 0), 0 4px 10px rgba(2, 30, 35, 0.3); }
}

.explore-resizer { block-size: 16px; background: #EBF3EC; border-block: 1px solid var(--border); display: flex; align-items: center; justify-content: center; cursor: row-resize; flex-shrink: 0; color: var(--ink-muted); user-select: none; }
.explore-carousels { flex: 1 1 auto; overflow-y: auto; padding: 16px 20px 24px; background: var(--glass-solid); overscroll-behavior: contain; }

.carousel-section { margin-block-end: 22px; }
.carousel-head { display: flex; align-items: center; justify-content: space-between; margin-block-end: 10px; }
.carousel-title { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--ink); }
.carousel-arrows { display: flex; gap: 6px; }
.carousel-arrow { inline-size: 30px; block-size: 30px; border-radius: 50%; border: 1px solid var(--border); background: #F6FAF7; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: var(--ink-soft); }
.carousel-arrow:hover { border-color: var(--emerald); color: var(--emerald); }
.carousel-track {
  display: flex; gap: 12px; overflow-x: auto; scroll-behavior: smooth; scrollbar-width: none; padding-block: 2px 6px;
  scroll-snap-type: x proximity;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track .scene-card { flex: 0 0 218px; scroll-snap-align: start; }

/* Scroll-driven edge fades on horizontal scrollers (progressive enhancement) */
@property --fade-start { syntax: "<length>"; inherits: false; initial-value: 0px; }
@property --fade-end { syntax: "<length>"; inherits: false; initial-value: 0px; }
@supports (animation-timeline: scroll(self inline)) {
  .carousel-track, .info-strip {
    --fade-size: 26px;
    --fade-dir: right;
    --fade-start-pos: 0;
    --fade-end-pos: 100%;
    scroll-padding-inline: var(--fade-size);
    mask:
      linear-gradient(black, black) no-clip subtract,
      linear-gradient(to var(--fade-dir), black, transparent) var(--fade-start-pos) 0 / var(--fade-start) 100% no-repeat no-clip,
      linear-gradient(to var(--fade-dir), transparent, black) var(--fade-end-pos) 0 / var(--fade-end) 100% no-repeat no-clip;
    animation: reveal-fade-start linear both, hide-fade-end linear both;
    animation-timeline: scroll(self inline);
    animation-range: 0 var(--fade-size), calc(100% - var(--fade-size)) 100%;
  }
  .carousel-track:dir(rtl), .info-strip:dir(rtl) {
    --fade-dir: left;
    --fade-start-pos: 100%;
    --fade-end-pos: 0;
  }
}
@keyframes reveal-fade-start { to { --fade-start: var(--fade-size); } }
@keyframes hide-fade-end { from { --fade-end: var(--fade-size); } }
.suli-map-pin { background: transparent; border: none; }

/* ─── Native Welcome / Guide Modal Dialog ─────────────────────────────── */
dialog#help-dialog {
  margin: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0;
  inline-size: min(560px, calc(100% - 28px));
  max-block-size: calc(100dvh - 36px);
  box-shadow: var(--shadow-panel);
  background: var(--glass-solid);
  color: var(--ink);
  overflow: hidden;
}
dialog#help-dialog:modal { overscroll-behavior: contain; }
dialog#help-dialog::backdrop { background: rgba(2, 30, 35, 0.45); backdrop-filter: blur(4px); overflow: hidden; overscroll-behavior: contain; }
.dlg-wrap { display: flex; flex-direction: column; max-block-size: calc(100dvh - 36px); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-block-end: 1px solid var(--border); background: #F6FAF7; }
.dlg-head h2 { font-family: 'Playfair Display', serif; font-size: 20px; font-weight: 700; color: var(--ink); }
.dlg-body { padding: 20px; overflow-y: auto; }
.guide-slide[hidden] { display: none; }
.guide-slide h3 { font-size: 16px; font-weight: 700; margin-block-end: 8px; color: var(--pine); }
.guide-slide p { font-size: 13.5px; line-height: 1.65; color: var(--ink-soft); margin-block-end: 10px; }
.guide-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-block-start: 10px; }
.guide-cat-pill { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; background: #F6FAF7; border: 1px solid var(--border); font-size: 12px; font-weight: 600; }
.dlg-foot { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; border-block-end: 0; border-block-start: 1px solid var(--border); background: #F6FAF7; }
.guide-dots { display: flex; gap: 6px; }
.guide-dot { inline-size: 28px; block-size: 28px; border-radius: 50%; border: 1px solid var(--border); background: #FFFFFF; font-size: 11.5px; font-weight: 700; color: var(--ink-soft); }
.guide-dot.active { background: var(--emerald); border-color: var(--emerald); color: #FFFFFF; }

.toast { position: fixed; bottom: 76px; left: 50%; transform: translateX(-50%) translateY(20px); z-index: 80; background: #021E23; color: #FFFFFF; border: 1px solid rgba(255, 255, 255, 0.16); padding: 10px 18px; border-radius: 999px; font-size: 12.5px; font-weight: 700; box-shadow: var(--shadow-panel); opacity: 0; pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.mobile-dock { display: none; }

@media (max-width: 1200px) {
  .hdr-btn-pill { inline-size: 38px; padding-inline: 0; }
  .hdr-btn-pill .hdr-lbl { display: none; }
  .scene-place-pill { max-inline-size: 120px; }
}

@media (max-width: 860px) {
  .suli-header { top: 10px; inset-inline: 10px; block-size: 48px; }
  .header-group-left, .header-group-right, .suli-compass { display: none; }
  .brand-btn { padding-inline: 8px; }
  .scene-title-wrap { padding-inline: 6px; }
  .suli-scene-title { font-size: 12.5px; }

  .mobile-dock {
    position: fixed;
    bottom: 0;
    inset-inline: 0;
    block-size: calc(58px + env(safe-area-inset-bottom, 0px));
    padding-block-end: env(safe-area-inset-bottom, 0px);
    padding-inline: 2px;
    z-index: 35;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border-block-start: 1px solid var(--border);
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }
  .mob-btn {
    flex: 1 1 auto;
    min-inline-size: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-block-size: 48px;
    padding-inline: 2px;
    color: var(--ink-soft);
    font-size: 9.5px;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
  }
  .mob-btn.mob-btn-dash { color: var(--pine); font-weight: 700; }
  .mob-btn.active { color: var(--emerald); }
  .mob-btn svg { inline-size: 19px; block-size: 19px; flex-shrink: 0; }

  .viewer-controls { bottom: calc(66px + env(safe-area-inset-bottom, 0px)); gap: 2px; padding: 4px 6px; max-inline-size: calc(100% - 16px); overflow-x: auto; scrollbar-width: none; }
  .viewer-controls::-webkit-scrollbar { display: none; }
  .vc-btn { inline-size: 38px; block-size: 38px; flex-shrink: 0; }
  .scene-pager { bottom: calc(114px + env(safe-area-inset-bottom, 0px)); inset-inline-start: 10px; max-inline-size: calc(100% - 20px); }
  .float-panel.left, .float-panel.left.narrow, .float-panel.right, .float-panel.right.compact { top: 66px; inset-inline: 10px; inline-size: auto; max-block-size: calc(100dvh - 134px - env(safe-area-inset-bottom, 0px)); }
  .explore-overlay { top: 66px; inset-inline: 10px; bottom: calc(66px + env(safe-area-inset-bottom, 0px)); }
  .hs-card { max-inline-size: calc(100vw - 24px); }
  .field input, .field select, .field textarea, .search-input-row input { font-size: 16px; }
}

@media (max-width: 600px) {
  .scene-place-pill, .brand-sub { display: none; }
  .suli-scene-title { font-size: 12px; }
  .brand-emblem { block-size: 23px; }
  .brand-top { font-size: 14.5px; }
  .brand-btn { padding-inline: 6px; gap: 6px; }
  .lang-select { padding-inline: 9px 22px; font-size: 11px; min-block-size: 34px; }
  dialog#help-dialog { inline-size: calc(100% - 16px); }
  .dlg-head, .dlg-foot { padding: 12px 14px; }
  .dlg-body { padding: 14px; }
}

@media (max-width: 390px) {
  .mob-btn { font-size: 9px; padding-inline: 1px; }
  .mob-btn svg { inline-size: 17px; block-size: 17px; }
}
