:root {
  --bg-abyss: #080b10;
  --surface-1: #11161d;
  --surface-2: #161c26;
  --glass: rgba(13, 17, 23, 0.90);
  --glass-strong: rgba(11, 15, 21, 0.96);
  --border: rgba(255, 255, 255, 0.085);
  --border-strong: rgba(255, 255, 255, 0.16);
  --border-gold: rgba(245, 158, 11, 0.38);
  --accent: #2b7fff;
  --accent-hover: #3b8bff;
  --cyan: #60a5fa;
  --gold: #f59e0b;
  --text: #e6edf3;
  --muted: #8b949e;
  --subtle: #6e7681;
}

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

html, body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: var(--bg-abyss);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  -webkit-font-smoothing: antialiased;
}

#map3d {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background: var(--bg-abyss);
  outline: none;
}

.maplibregl-ctrl-bottom-left {
  bottom: 84px !important;
  left: 14px !important;
  z-index: 16 !important;
}

.maplibregl-ctrl-bottom-right {
  bottom: 84px !important;
  right: 422px !important;
  z-index: 16 !important;
}

.maplibregl-ctrl-group {
  background: rgba(17, 22, 29, 0.90) !important;
  border: 1px solid var(--border) !important;
  border-radius: 9px !important;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45) !important;
}

.maplibregl-ctrl-group button + button {
  border-top: 1px solid rgba(255, 255, 255, 0.07) !important;
}

.maplibregl-ctrl-icon {
  filter: invert(0.92);
}

.maplibregl-ctrl-scale {
  background: rgba(17, 22, 29, 0.86) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  color: var(--muted) !important;
  font-size: 10px !important;
  font-variant-numeric: tabular-nums;
  padding: 2px 6px !important;
  border-radius: 5px;
}

.maplibregl-ctrl-attrib {
  background: rgba(17, 22, 29, 0.82) !important;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--subtle) !important;
  font-size: 10px !important;
}

.maplibregl-ctrl-attrib a {
  color: var(--muted) !important;
}

body.cinema-mode .maplibregl-ctrl-bottom-left,
body.cinema-mode .maplibregl-ctrl-bottom-right {
  display: none !important;
}

/* Memorial Sonar Markers */
.naval-marker {
  --pin-color: #57c7ff;
  position: absolute;
  top: 0;
  left: 0;
  width: 16px;
  height: 16px;
  cursor: pointer;
  user-select: none;
  transition: opacity 0.25s ease;
}

.naval-marker.class-submarine { --pin-color: #ef4444; }
.naval-marker.class-torpedo { --pin-color: #ff5d73; }
.naval-marker.class-warship { --pin-color: #a78bfa; }
.naval-marker.class-transport { --pin-color: #f59e0b; }
.naval-marker.class-sailing { --pin-color: #e5c158; }
.naval-marker.class-aviation { --pin-color: #38bdf8; }
.naval-marker.class-shrines { --pin-color: #34d399; }
.naval-marker.is-lefort { --pin-color: #60a5fa; }

.naval-marker.is-dimmed {
  opacity: 0.45;
}

.naval-marker.is-dimmed:hover {
  opacity: 1;
}

.naval-marker-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--pin-color);
  border: 2px solid #071320;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.65);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.naval-marker-dot.has-3d {
  width: 12px;
  height: 12px;
  border-color: #ffffff;
}

.naval-marker-star {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  color: #ef4444;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.78));
  transition: transform 0.18s ease, filter 0.18s ease;
}

.naval-star-svg {
  width: 100%;
  height: 100%;
  fill: #ef4444;
  stroke: #ffffff;
  stroke-width: 1.65;
  stroke-linejoin: round;
}

.naval-marker.is-highlight .naval-marker-star {
  transform: translate(-50%, -50%) scale(1.15);
  filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.72));
}

.naval-marker.is-focused .naval-marker-star {
  transform: translate(-50%, -50%) scale(1.42);
  filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.95));
}

.naval-marker-flag {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 26px;
  height: 18px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.75));
  transition: transform 0.18s ease, filter 0.18s ease;
}

.naval-flag-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.naval-marker.is-lefort:hover .naval-marker-flag,
.naval-marker.is-highlight .naval-marker-flag {
  transform: translate(-50%, -50%) scale(1.16);
  filter: drop-shadow(0 0 8px rgba(96, 165, 250, 0.75));
}

.naval-marker.is-focused .naval-marker-flag {
  transform: translate(-50%, -50%) scale(1.32);
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.85));
}

.naval-marker-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 28px;
  height: 28px;
  transform: translate(-50%, -50%) scale(0.75);
  border-radius: 50%;
  border: 1.5px solid var(--pin-color);
  opacity: 0;
  pointer-events: none;
}

.naval-marker.is-highlight .naval-marker-ring,
.naval-marker.is-focused .naval-marker-ring {
  animation: sonarPulse 2.4s ease-out infinite;
}

.naval-marker.is-focused .naval-marker-dot {
  transform: translate(-50%, -50%) scale(1.4);
  box-shadow: 0 0 14px var(--pin-color);
}

@keyframes sonarPulse {
  0% { transform: translate(-50%, -50%) scale(0.55); opacity: 0.85; }
  100% { transform: translate(-50%, -50%) scale(1.85); opacity: 0; }
}

.naval-marker-pill {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 7px);
  transform: translateX(-50%);
  display: none;
  align-items: center;
  gap: 6px;
  background: rgba(13, 17, 23, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f0f6fc;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: auto;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.68);
}

/* 8 anti-collision label positions around pin */
.naval-marker.pos-right .naval-marker-pill {
  left: calc(100% + 7px);
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
}
.naval-marker.pos-left .naval-marker-pill {
  left: auto;
  right: calc(100% + 7px);
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
}
.naval-marker.pos-bottom .naval-marker-pill {
  left: 50%;
  top: calc(100% + 7px);
  bottom: auto;
  transform: translateX(-50%);
}
.naval-marker.pos-tr .naval-marker-pill {
  left: calc(100% + 4px);
  bottom: calc(100% + 4px);
  transform: none;
}
.naval-marker.pos-br .naval-marker-pill {
  left: calc(100% + 4px);
  top: calc(100% + 4px);
  bottom: auto;
  transform: none;
}
.naval-marker.pos-tl .naval-marker-pill {
  left: auto;
  right: calc(100% + 4px);
  bottom: calc(100% + 4px);
  transform: none;
}
.naval-marker.pos-bl .naval-marker-pill {
  left: auto;
  right: calc(100% + 4px);
  top: calc(100% + 4px);
  bottom: auto;
  transform: none;
}

.naval-marker.is-highlight .naval-marker-pill,
.naval-marker.is-focused .naval-marker-pill,
.naval-marker.has-label-on .naval-marker-pill,
.naval-marker.few-show-label .naval-marker-pill,
.naval-marker:not(.is-dimmed).zoom-show-label .naval-marker-pill,
.naval-marker:hover .naval-marker-pill {
  display: flex;
}

.naval-marker:hover {
  z-index: 95 !important;
}

.naval-marker.has-label-on:not(:hover):not(.is-focused) .naval-marker-pill {
  padding: 3px 7px;
  font-size: 10.5px;
}

.naval-marker.is-focused .naval-marker-pill {
  border-color: var(--pin-color);
  background: #0d1117;
  box-shadow: 0 0 0 1px var(--pin-color), 0 12px 30px rgba(0, 0, 0, 0.78);
  padding: 5px 10px 5px 6px;
  font-size: 12px;
  font-weight: 600;
}

.pill-thumb {
  display: none;
  width: 24px;
  height: 18px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.naval-marker.is-focused .pill-thumb,
.naval-marker:hover .pill-thumb {
  display: block;
}

.pill-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pill-depth {
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-weight: 500;
}

.naval-marker.group-small-craft .pill-depth {
  color: #fda4af;
}

.pill-3d {
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(43, 127, 255, 0.16);
  border: 1px solid rgba(43, 127, 255, 0.42);
  color: #93c5fd;
}

.story-photo-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: #06101b;
  border: 1px solid rgba(96, 165, 250, 0.25);
  flex-shrink: 0;
}

.story-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Narrow Site Portal Strip (Desktop) */
.site-nav-strip {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 34px;
  z-index: 35;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  background: rgba(8, 12, 18, 0.94);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.site-nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.site-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 9px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: #b1bac4;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.site-nav-link:hover,
.site-nav-drop.open > .site-nav-drop-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.site-nav-link.is-active {
  color: #93c5fd;
  background: rgba(43, 127, 255, 0.12);
  border-color: rgba(43, 127, 255, 0.28);
}

.site-nav-caret {
  font-size: 9px;
  opacity: 0.72;
}

.site-nav-drop {
  position: relative;
}

.site-nav-menu {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  min-width: 210px;
  padding: 6px;
  border-radius: 10px;
  background: rgba(11, 15, 21, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.72);
  display: none;
  flex-direction: column;
  gap: 2px;
}

.site-nav-drop.open .site-nav-menu {
  display: flex;
}

.site-nav-menu a {
  padding: 7px 10px;
  border-radius: 7px;
  color: #d0d7de;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.site-nav-menu a:hover {
  background: rgba(43, 127, 255, 0.16);
  color: #ffffff;
}

.site-nav-credits {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--subtle);
  white-space: nowrap;
}

.site-nav-credits a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav-credits a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.site-nav-credits .dot {
  opacity: 0.5;
}

.mobile-site-menu {
  display: none;
}

/* Top Navigation Header */
.top-bar {
  position: fixed;
  top: 44px;
  left: 14px;
  right: 14px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 12px;
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.42);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}

.brand-copy {
  min-width: 0;
  flex: 1;
}

.brand > div {
  min-width: 0;
  overflow: hidden;
}

.brand-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 8px;
  background: #0a0e14;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2px;
}

.brand-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: #f0f6fc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-sub {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-stats {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.stat-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.stat-val {
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: #f0f6fc;
  line-height: 1.1;
}

.stat-val--gold {
  color: #f59e0b;
}

.stat-lbl {
  font-size: 9px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--subtle);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.header-seg {
  display: inline-flex;
  align-items: center;
  background: #0a0e14;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 2px;
  gap: 2px;
}

.seg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 9px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.1;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.seg-btn:hover {
  color: #ffffff;
}

.seg-btn.active {
  background: #1c2432;
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 1px 2px rgba(0, 0, 0, 0.4);
}

.top-sep {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-1);
  color: #d0d7de;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.16s ease;
  white-space: nowrap;
}

.btn:hover {
  background: #1a212c;
  border-color: var(--border-strong);
  color: #ffffff;
}

.btn.active {
  background: #1b2535;
  border-color: rgba(43, 127, 255, 0.65);
  color: #ffffff;
}

.btn--primary {
  background: var(--accent);
  border-color: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.btn--primary:hover {
  background: var(--accent-hover);
  border-color: rgba(255, 255, 255, 0.24);
}

.btn--gold {
  background: rgba(245, 158, 11, 0.11);
  border-color: var(--border-gold);
  color: #fcd34d;
}

.btn--gold:hover {
  background: rgba(245, 158, 11, 0.22);
  border-color: var(--gold);
  color: #ffffff;
}

/* Theatre & Filter Row */
.theatre-bar {
  position: fixed;
  top: 106px;
  left: 14px;
  z-index: 18;
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-width: calc(100vw - 432px);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(13, 17, 23, 0.86);
  color: #b1bac4;
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: all 0.15s ease;
}

.pill:hover {
  background: #171e29;
  border-color: var(--border-strong);
  color: #ffffff;
}

.pill.active {
  background: #192434;
  border-color: rgba(43, 127, 255, 0.72);
  color: #ffffff;
  box-shadow: 0 0 0 1px rgba(43, 127, 255, 0.18);
}

.pill--gold.active {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.6);
  color: #fde68a;
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.14);
}

.pill--all {
  background: #141a23;
  border-color: rgba(255, 255, 255, 0.13);
  color: #f0f6fc;
}

.pill--all.active {
  background: var(--accent);
  border-color: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.pill-sep {
  width: 1px;
  height: 18px;
  align-self: center;
  background: rgba(255, 255, 255, 0.08);
  margin: 0 2px;
}

.pill-cnt {
  opacity: 0.7;
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  margin-left: 0;
}

/* Catalog Directory & Class Sorting inside right story-panel */
.catalog-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.catalog-sort-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.sort-lbl {
  font-size: 10.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-right: 2px;
}

.sort-btn {
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #131820;
  color: var(--muted);
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sort-btn.active {
  border-color: rgba(43, 127, 255, 0.65);
  background: #192434;
  color: #ffffff;
}

.catalog-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.catalog-class-hdr {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.catalog-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: #12171f;
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.catalog-item:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: #171e28;
}

.catalog-item-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.catalog-item-name {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 12.5px;
  font-weight: 500;
  color: #f0f6fc;
}

.catalog-name-txt {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.catalog-item-sub {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.catalog-item-badges {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.catalog-3d-tag {
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(43, 127, 255, 0.16);
  border: 1px solid rgba(43, 127, 255, 0.42);
  color: #93c5fd;
}

/* Story / Inspection Side Card */
.story-panel {
  position: fixed;
  top: 108px;
  right: 14px;
  bottom: 84px;
  width: 396px;
  max-width: calc(100vw - 28px);
  z-index: 19;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 14px;
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.62);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.25s ease;
}

.story-panel.is-moskit {
  border-color: var(--border-gold);
}

.story-scroll {
  padding: 16px 17px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.story-scroll::-webkit-scrollbar {
  width: 5px;
}

.story-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
}

.story-tag-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.era-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(43, 127, 255, 0.12);
  border: 1px solid rgba(43, 127, 255, 0.30);
  color: #79b8ff;
}

.era-badge--gold {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.40);
  color: #fcd34d;
}

.year-badge {
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.story-title {
  font-size: 17.5px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.28;
  color: #f0f6fc;
}

.chapter-emblem-box {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 10px;
  background: #0a0e14;
  border: 1px solid rgba(255, 255, 255, 0.07);
  flex-shrink: 0;
}

.chapter-emblem-img {
  max-height: 72px;
  max-width: 100%;
  width: auto;
  object-fit: contain;
  display: block;
  mix-blend-mode: screen;
}

.story-summary {
  font-size: 13px;
  line-height: 1.56;
  color: #b1bac4;
}

.story-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.meta-box {
  background: #12171f;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 9px 11px;
}

.meta-lbl {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--subtle);
  margin-bottom: 3px;
}

.meta-val {
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #f0f6fc;
}

.details-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.details-list li {
  position: relative;
  padding-left: 14px;
  font-size: 12.5px;
  line-height: 1.5;
  color: #b1bac4;
}

.details-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.story-panel.is-moskit .details-list li::before {
  background: var(--gold);
}

.wreck-chips-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--subtle);
  margin-top: 2px;
}

.wreck-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.wreck-chip {
  padding: 5px 9px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #131820;
  color: #d0d7de;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.wreck-chip:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background: #1b2330;
  color: #ffffff;
}

.wreck-chip--has3d {
  border-color: rgba(43, 127, 255, 0.42);
  color: #dbeafe;
}

.story-footer {
  padding: 11px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(11, 15, 21, 0.96);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.story-footer .btn {
  flex: 1;
  justify-content: center;
}

/* Bottom Interactive Timeline */
.timeline-bar {
  position: fixed;
  bottom: 12px;
  left: 14px;
  right: 14px;
  z-index: 20;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 12px;
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.timeline-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.timeline-track {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
  flex: 1;
  padding-bottom: 2px;
}

.timeline-track::-webkit-scrollbar {
  height: 4px;
}

.timeline-track::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
}

.tl-step {
  flex: 1 0 auto;
  min-width: 56px;
  padding: 6px 9px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: #12171f;
  color: var(--muted);
  font-family: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: all 0.15s ease;
}

.tl-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.tl-logo {
  height: 21px;
  width: auto;
  max-width: 32px;
  object-fit: contain;
  flex-shrink: 0;
  mix-blend-mode: screen;
  opacity: 0.88;
}

.tl-step:hover {
  border-color: var(--border-strong);
  background: #18202c;
  color: #ffffff;
}

.tl-step.active {
  background: #192434;
  border-color: rgba(43, 127, 255, 0.72);
  color: #ffffff;
  box-shadow: 0 0 0 1px rgba(43, 127, 255, 0.2);
}

.tl-step--moskit {
  border-color: rgba(245, 158, 11, 0.26);
  color: #fcd34d;
}

.tl-step--moskit.active {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.68);
  color: #ffffff;
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.2);
}

.tl-yr {
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.tl-tag {
  font-size: 9px;
  opacity: 0.78;
  white-space: nowrap;
}

/* Overlays & Modals (3D Model Viewer, Mosquito Fleet Spotlight, Team & Partners) */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(4, 7, 11, 0.86);
  backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open {
  display: flex;
}

.modal-card {
  width: min(1240px, 100%);
  height: min(86vh, 860px);
  background: #0d1117;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.82);
}

.modal-card--gold {
  border-color: var(--border-gold);
}

.modal-header {
  padding: 13px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #11161d;
}

.modal-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.modal-title {
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: #f0f6fc;
}

.modal-sub {
  font-size: 12px;
  color: var(--muted);
}

.modal-close {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: #161c26;
  color: #d0d7de;
  font-size: 19px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.15s ease;
}

.modal-close:hover {
  background: #1f2734;
  border-color: var(--border-strong);
  color: #ffffff;
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  position: relative;
}

.modal-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #080b10;
  display: block;
}

/* Mosquito Fleet & Team Sections inside Modal */
.rich-wrap {
  padding: 24px 28px 34px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.moskit-banner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
  background: #12171f;
  border: 1px solid var(--border-gold);
  border-radius: 14px;
  padding: 18px;
}

.moskit-video-box {
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;
}

.moskit-video-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.moskit-kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.kpi-box {
  background: #0d1117;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 10px 12px;
}

.kpi-lbl {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gold);
  margin-bottom: 4px;
}

.kpi-val {
  font-size: 12.5px;
  line-height: 1.4;
  color: #e6edf3;
  font-weight: 600;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 14px;
}

.spotlight-card {
  background: #12171f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.spotlight-badge {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold);
}

.spotlight-title {
  font-size: 15px;
  font-weight: 600;
  color: #f0f6fc;
}

.spotlight-text {
  font-size: 12.5px;
  line-height: 1.5;
  color: #b1bac4;
  flex: 1;
}

/* Team Grid */
.section-h {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #79b8ff;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.team-card {
  background: #12171f;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.team-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center top;
  background: #0a0e14;
}

.team-info {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.team-name {
  font-size: 14px;
  font-weight: 600;
  color: #f0f6fc;
}

.team-role {
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--muted);
}

.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 12px;
}

.partner-card {
  background: #12171f;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
}

.partner-card--highlight {
  border-color: var(--border-gold);
}

.partner-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #f0f6fc;
  margin-bottom: 4px;
}

.partner-desc {
  font-size: 12px;
  line-height: 1.48;
  color: #b1bac4;
}

/* Cinema Overlay Mode (?mode=cinema hook for future conference recording) */
.cinema-banner {
  position: fixed;
  left: 48px;
  bottom: 48px;
  max-width: 720px;
  z-index: 30;
  display: none;
  flex-direction: column;
  gap: 8px;
  background: rgba(6, 15, 25, 0.82);
  border-left: 4px solid var(--cyan);
  padding: 18px 24px;
  border-radius: 0 14px 14px 0;
  backdrop-filter: blur(10px);
}

body.cinema-mode .site-nav-strip,
body.cinema-mode .top-bar,
body.cinema-mode .theatre-bar,
body.cinema-mode .story-panel,
body.cinema-mode .timeline-bar {
  display: none !important;
}

body.cinema-mode .cinema-banner {
  display: flex;
}

.cinema-yr {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.cinema-title {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
  color: #ffffff;
}

.cinema-sub {
  font-size: 15px;
  line-height: 1.5;
  color: #cbd5e1;
}

.ui-ico {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: -0.125em;
}

.ui-ico--sm {
  width: 12.5px;
  height: 12.5px;
}

.seg-btn .ui-ico {
  width: 15px;
  height: 15px;
}

[data-ico] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.wreck-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.mobile-only,
.story-mobile-toggle {
  display: none;
}

@media (max-width: 1300px) {
  .live-stats { display: none; }
}

@media (max-width: 980px) {
  html, body {
    height: 100dvh;
  }

  .mobile-only {
    display: inline-flex;
  }

  .hide-sm,
  #btnFullscreen {
    display: none;
  }

  /* Disable expensive backdrop-filter compositing over WebGL on mobile GPUs */
  .top-bar,
  .theatre-bar.mobile-open,
  .story-panel,
  .timeline-bar,
  .naval-marker-pill,
  .maplibregl-ctrl-group {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .top-bar {
    top: 8px;
    left: 8px;
    right: 8px;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(13, 17, 23, 0.95);
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .brand {
    gap: 8px;
  }

  .brand-logo {
    width: 28px;
    height: 28px;
  }

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

  .brand-sub {
    font-size: 10px;
  }

  .top-actions {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    gap: 5px;
    padding-right: 16px;
    -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 92%, transparent 100%);
    mask-image: linear-gradient(90deg, #000 0%, #000 92%, transparent 100%);
  }

  .top-actions::-webkit-scrollbar {
    display: none;
  }

  .top-actions .btn {
    padding: 6px 9px;
    min-height: 32px;
    font-size: 11px;
    flex-shrink: 0;
  }

  .seg-btn {
    padding: 5px 8px;
    min-height: 28px;
  }

  .theatre-bar {
    display: none;
  }

  .theatre-bar.mobile-open {
    display: flex;
    top: 94px;
    left: 8px;
    right: 8px;
    max-width: none;
    max-height: 44dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 10px;
    border-radius: 12px;
    background: rgba(11, 15, 21, 0.97);
    border: 1px solid var(--border);
    z-index: 25;
  }

  .theatre-bar.mobile-open .pill {
    padding: 6px 9px;
    font-size: 11px;
  }

  .naval-marker-pill {
    max-width: 195px;
    background: rgba(13, 17, 23, 0.96);
  }

  .naval-marker-pill .pill-txt {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .maplibregl-ctrl-bottom-left {
    top: 100px !important;
    bottom: auto !important;
    left: 8px !important;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .maplibregl-ctrl-bottom-right {
    top: 100px !important;
    bottom: auto !important;
    right: 8px !important;
    max-width: 215px;
  }

  .maplibregl-ctrl-attrib {
    font-size: 9px !important;
  }

  .story-panel {
    top: auto;
    bottom: calc(64px + env(safe-area-inset-bottom));
    left: 8px;
    right: 8px;
    width: auto;
    max-width: none;
    height: min(32dvh, 270px);
    background: rgba(13, 17, 23, 0.95);
    border-radius: 14px;
  }

  body.mobile-browse-catalog .story-panel:not(.is-mobile-collapsed) {
    height: min(50dvh, 420px);
  }

  .story-panel.is-mobile-collapsed {
    height: auto;
  }

  .story-panel.is-mobile-collapsed .story-scroll,
  .story-panel.is-mobile-collapsed .story-footer {
    display: none;
  }

  .story-mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-height: 40px;
    padding: 8px 12px;
    background: #11161d;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    color: #f0f6fc;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
  }

  .story-panel.is-mobile-collapsed .story-mobile-toggle {
    border-bottom: none;
  }

  .story-mobile-summary {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .story-mobile-chevron {
    color: var(--muted);
    flex-shrink: 0;
  }

  .story-scroll {
    padding: 10px 12px;
    gap: 8px;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .story-title {
    font-size: 15px;
  }

  .chapter-emblem-box {
    padding: 5px 10px;
  }

  .chapter-emblem-img {
    max-height: 36px;
  }

  .story-footer {
    padding: 8px 10px;
    gap: 6px;
  }

  .story-footer .btn {
    padding: 7px 10px;
    min-height: 34px;
    font-size: 11.5px;
  }

  .timeline-bar {
    bottom: max(8px, env(safe-area-inset-bottom));
    left: 8px;
    right: 8px;
    padding: 6px 8px;
    gap: 6px;
    background: rgba(13, 17, 23, 0.95);
    border-radius: 12px;
  }

  .timeline-nav .btn {
    padding: 6px 9px;
    min-height: 34px;
    font-size: 12px;
  }

  .tl-step {
    padding: 5px 8px;
    gap: 5px;
  }

  .tl-logo {
    height: 16px;
    max-width: 22px;
  }

  .tl-yr {
    font-size: 10.5px;
  }

  .tl-tag {
    font-size: 8.5px;
  }

  .modal-overlay {
    padding: 8px;
  }

  .modal-card {
    width: 100%;
    height: 92dvh;
    border-radius: 14px;
  }

  .modal-header {
    padding: 10px 12px;
  }

  .modal-title {
    font-size: 14px;
  }

  .rich-wrap {
    padding: 14px 12px 24px;
    gap: 14px;
  }

  .moskit-banner {
    grid-template-columns: 1fr;
    padding: 12px;
    gap: 12px;
  }

  .cards-grid,
  .partners-grid {
    grid-template-columns: 1fr;
  }

  .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .brand-sub {
    display: none;
  }

  .moskit-kpis {
    grid-template-columns: 1fr;
  }

  .team-grid {
    grid-template-columns: 1fr;
  }
}

/* Experimental Bathymetry Legend */
.bathy-legend {
  position: fixed;
  left: 14px;
  bottom: 132px;
  z-index: 18;
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px 11px;
  min-width: 178px;
  border-radius: 10px;
  background: rgba(13, 17, 23, 0.92);
  border: 1px solid var(--border);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

.bathy-legend.open {
  display: flex;
}

.bathy-legend-title {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #93c5fd;
}

.bathy-legend-bar {
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2094b2 0%, #115887 38%, #0a315a 72%, #040e1f 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.bathy-legend-scale {
  display: flex;
  justify-content: space-between;
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

@media (max-width: 1180px) {
  .site-nav-credits {
    display: none;
  }
}

@media (max-width: 980px) {
  .site-nav-strip {
    display: none;
  }

  .site-mobile-menu-btn {
    padding: 5px 9px;
    min-height: 30px;
    font-size: 11px;
    flex-shrink: 0;
  }

  .mobile-site-menu.open {
    position: fixed;
    top: 94px;
    left: 8px;
    right: 8px;
    z-index: 36;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 10px;
    border-radius: 12px;
    background: rgba(11, 15, 21, 0.98);
    border: 1px solid var(--border);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.75);
  }

  .mobile-site-menu a {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: #e6edf3;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
  }

  .mobile-site-menu a.is-active {
    background: rgba(43, 127, 255, 0.16);
    border-color: rgba(43, 127, 255, 0.36);
    color: #ffffff;
  }

  .bathy-legend {
    left: auto;
    right: 8px;
    top: 132px;
    bottom: auto;
    min-width: 152px;
    padding: 6px 9px;
  }
}

/* Inline VK Video Card inside Wreck Story Panel */
.vk-video-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 2px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(16, 22, 32, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.22);
}

.story-panel.is-moskit .vk-video-card {
  border-color: var(--border-gold);
}

.vk-video-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.vk-video-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.video-src-switch {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border-radius: 7px;
  background: rgba(15, 23, 36, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.14);
  gap: 2px;
}

.video-src-btn {
  padding: 2px 7px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #94a3b8;
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.video-src-btn:hover {
  color: #e2e8f0;
}

.video-src-btn.is-active {
  background: #2563eb;
  color: #ffffff;
}

.video-src-btn[data-video-src="yt"].is-active {
  background: #dc2626;
  color: #ffffff;
}

.video-src-switch--compact .video-src-btn {
  padding: 2px 6px;
  font-size: 9.5px;
}

.tour-sp-foot-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.vk-video-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #7dd3fc;
}

.vk-expand-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #161c26;
  color: #e6edf3;
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.vk-expand-btn:hover {
  background: #1f2937;
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.vk-video-title {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
  color: #f0f6fc;
}

.vk-video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: #06090f;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.vk-video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* === Guided Chapter Audio Tour & Synchronized Object Spotlight === */
.chapter-audio-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 11px;
  border-radius: 10px;
  border: 1px solid rgba(56, 189, 248, 0.34);
  background: linear-gradient(135deg, rgba(16, 42, 74, 0.72), rgba(14, 24, 38, 0.92));
  color: #e6f2ff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.chapter-audio-btn:hover {
  border-color: rgba(56, 189, 248, 0.68);
  background: linear-gradient(135deg, rgba(22, 60, 104, 0.85), rgba(16, 29, 46, 0.96));
  color: #ffffff;
}

.chapter-audio-btn.is-playing {
  border-color: rgba(56, 189, 248, 0.82);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.25);
  color: #ffffff;
}

.chapter-audio-ico {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chapter-audio-text {
  flex: 1;
  text-align: left;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chapter-audio-dur {
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #93c5fd;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(147, 197, 253, 0.22);
  flex-shrink: 0;
}

/* Synchronized Story Reading Highlights */
.story-summary[data-detail],
.details-list li[data-detail] {
  transition: color 0.22s ease, background 0.22s ease, border-color 0.22s ease, padding 0.22s ease;
  border-radius: 8px;
}

.story-summary.is-speaking {
  color: #f8fafc;
  background: rgba(43, 127, 255, 0.11);
  border-left: 2px solid var(--cyan);
  padding: 7px 10px;
}

.details-list li.is-speaking {
  color: #ffffff;
  background: rgba(43, 127, 255, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.34);
  padding: 7px 10px 7px 22px;
}

.details-list li.is-speaking::before {
  left: 9px;
  top: 13px;
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.9);
}

.wreck-chip.is-speaking {
  border-color: rgba(56, 189, 248, 0.85);
  background: rgba(43, 127, 255, 0.26);
  color: #ffffff;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.28);
}

/* Floating Audio HUD (Spotlight Card + Audio Scrub Player) */
.tour-hud {
  position: fixed;
  left: 14px;
  right: 422px;
  bottom: 84px;
  z-index: 21;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}

body.tour-player-open .tour-hud {
  display: flex;
}

.tour-spotlight {
  width: min(760px, calc(100% - 88px));
  min-width: 340px;
  background: rgba(11, 16, 24, 0.94);
  border: 1px solid rgba(56, 189, 248, 0.34);
  border-radius: 13px;
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.68);
  padding: 12px 14px;
  display: none;
  flex-direction: column;
  gap: 6px;
  pointer-events: auto;
  animation: tourSpotlightIn 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.tour-spotlight.has-photo {
  flex-direction: row;
  align-items: stretch;
  gap: 16px;
  padding: 13px 15px;
}

.tour-sp-media {
  position: relative;
  width: 336px;
  min-height: 224px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #070d16;
  padding: 0;
  cursor: zoom-in;
  flex-shrink: 0;
}

.tour-sp-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.tour-sp-media:hover img {
  transform: scale(1.04);
}

.tour-sp-media-tag {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(9, 14, 22, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e2e8f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tour-sp-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.tour-spotlight.open {
  display: flex;
}

.tour-spotlight.tour-spotlight--gold {
  border-color: rgba(245, 158, 11, 0.48);
}

@keyframes tourSpotlightIn {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.tour-sp-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tour-sp-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #7dd3fc;
}

.tour-spotlight--gold .tour-sp-badge {
  color: #fcd34d;
}

.tour-sp-year {
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.tour-sp-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.24;
  color: #f8fafc;
}

.tour-sp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tour-sp-chip {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
}

.tour-sp-chip--depth {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.34);
  color: #7dd3fc;
}

.tour-sp-text {
  font-size: 12.2px;
  line-height: 1.46;
  color: #cbd5e1;
}

.tour-sp-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 6px;
  margin-top: 1px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.tour-sp-coords {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--subtle);
}

.tour-sp-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 7px;
  border: 1px solid rgba(56, 189, 248, 0.42);
  background: rgba(43, 127, 255, 0.18);
  color: #e0f2fe;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tour-sp-btn--video {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(248, 113, 113, 0.45);
  color: #fee2e2;
}

.tour-sp-btn--video:hover {
  background: #dc2626;
  border-color: #ef4444;
  color: #ffffff;
}

.tour-sp-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

/* Playback Control Bar */
.tour-player-bar {
  width: min(560px, calc(100% - 210px));
  min-width: 340px;
  background: rgba(11, 16, 24, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 13px;
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65);
  padding: 9px 12px;
  display: flex;
  align-items: center;
  gap: 11px;
  pointer-events: auto;
}

.tour-play-btn {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: var(--accent);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, transform 0.15s ease;
}

.tour-play-btn:hover {
  background: var(--accent-hover);
  transform: scale(1.04);
}

.tour-player-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tour-player-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tour-player-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.tour-eq {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 11px;
  flex-shrink: 0;
}

.tour-eq i {
  display: block;
  width: 2.5px;
  height: 4px;
  border-radius: 2px;
  background: var(--cyan);
  opacity: 0.45;
}

.tour-eq.is-playing i {
  opacity: 1;
  animation: tourEqPulse 0.9s ease-in-out infinite alternate;
}

.tour-eq.is-playing i:nth-child(2) {
  animation-delay: 0.2s;
}

.tour-eq.is-playing i:nth-child(3) {
  animation-delay: 0.42s;
}

@keyframes tourEqPulse {
  from { height: 3px; }
  to { height: 11px; }
}

.tour-stage-tag {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #93c5fd;
  white-space: nowrap;
}

.tour-cue-pill {
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #e0f2fe;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tour-time {
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  flex-shrink: 0;
}

.tour-subtitle {
  font-size: 11.5px;
  line-height: 1.32;
  color: #dbe4ef;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tour-progress-wrap {
  position: relative;
  height: 16px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
}

.tour-progress-track {
  position: relative;
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}

.tour-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  border-radius: 999px;
}

.tour-cue-ticks {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.tour-cue-tick {
  position: absolute;
  top: 50%;
  width: 7px;
  height: 7px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1.5px solid #0b1018;
  background: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.15s ease, background 0.15s ease;
}

.tour-cue-tick.is-wreck {
  width: 8px;
  height: 8px;
  background: var(--gold);
}

.tour-cue-tick:hover {
  transform: translate(-50%, -50%) scale(1.35);
  background: #ffffff;
}

.tour-progress-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--cyan);
  transform: translate(-50%, -50%);
  pointer-events: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.tour-player-ctrls {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.tour-icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #141a24;
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tour-icon-btn:hover {
  background: #1e2736;
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.tour-icon-btn.is-muted {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.35);
}

@media (max-width: 980px) {
  .tour-hud {
    position: static;
    display: none;
  }

  body.tour-player-open .tour-hud {
    display: block;
  }

  .tour-player-bar {
    position: fixed;
    top: 96px;
    left: 8px;
    right: 8px;
    width: auto;
    min-width: 0;
    z-index: 22;
    padding: 6px 8px;
    gap: 7px;
    pointer-events: auto;
  }

  .tour-play-btn {
    width: 30px;
    height: 30px;
  }

  .tour-stage-tag {
    display: none;
  }

  .tour-icon-btn {
    width: 27px;
    height: 27px;
  }

  .tour-subtitle {
    display: none;
  }

  .tour-spotlight {
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: calc(68px + min(32dvh, 270px));
    width: auto;
    min-width: 0;
    z-index: 21;
    padding: 9px 11px;
    gap: 5px;
  }

  .tour-spotlight.has-photo {
    flex-direction: row;
    gap: 9px;
    padding: 8px 9px;
  }

  .tour-sp-media {
    width: 128px;
    min-height: 92px;
    border-radius: 8px;
  }

  body.mobile-sheet-collapsed .tour-spotlight {
    bottom: calc(112px + env(safe-area-inset-bottom));
  }

  .tour-sp-title {
    font-size: 14px;
  }

  .tour-sp-text {
    font-size: 11.5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  body.tour-player-open .maplibregl-ctrl-bottom-left,
  body.tour-player-open .maplibregl-ctrl-bottom-right {
    top: 158px !important;
  }
}

/* Archival Gallery Strip & Photo Lightbox */
.story-photo-wrap.is-zoomable {
  cursor: zoom-in;
}

.story-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.gallery-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #080d14;
  padding: 0;
  cursor: zoom-in;
  text-align: left;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.gallery-thumb:hover {
  border-color: rgba(56, 189, 248, 0.65);
  transform: translateY(-1px);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 6px 5px;
  font-size: 9.5px;
  line-height: 1.25;
  color: #f1f5f9;
  background: linear-gradient(transparent, rgba(6, 10, 16, 0.92) 45%);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-card--photo {
  width: min(1400px, 96vw);
  height: min(92vh, 940px);
}

.modal-photo-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 12px 14px 14px;
  background: #060a10;
  overflow: hidden;
}

.modal-photo-stage {
  position: relative;
  flex: 1;
  width: 100%;
  min-height: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #04070c;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-photo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.modal-photo-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(11, 16, 24, 0.78);
  color: #f8fafc;
  font-size: 24px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: background 0.15s ease, transform 0.15s ease;
}

.modal-photo-nav:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-50%) scale(1.06);
}

.modal-photo-prev { left: 12px; }
.modal-photo-next { right: 12px; }

.modal-photo-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}

.modal-photo-cap {
  font-size: 13px;
  line-height: 1.4;
  color: #e2e8f0;
  flex: 1;
}

.modal-photo-count {
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #93c5fd;
  flex-shrink: 0;
}

.story-doc-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  background: rgba(15, 23, 36, 0.85);
  color: #e2e8f0;
  text-decoration: none;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.story-doc-card:hover {
  border-color: rgba(56, 189, 248, 0.62);
  background: rgba(20, 32, 50, 0.96);
  color: #ffffff;
  transform: translateY(-1px);
}

.story-doc-ico {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(43, 127, 255, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.32);
  color: #7dd3fc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.story-doc-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.story-doc-title {
  font-size: 11.8px;
  font-weight: 600;
  line-height: 1.3;
  color: #f0f6fc;
}

.story-doc-meta {
  font-size: 10.5px;
  color: #93c5fd;
}

.tl-step--audio {
  position: relative;
}

.tl-audio-dot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.85);
}
