:root {
  --life-band-safe-zone: 50px;

  --bg: #0b1020;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --panel-border: rgba(148, 163, 184, 0.14);
  --text: #e5e7eb;
  --muted: #94a3b8;
  --shadow: 0 18px 40px rgba(2, 6, 23, 0.45);
  --label-col: 0px;
  --row-h: 88px;
  --row-gap: 8px;
  --event-label-w: 148px;
  --event-range-label-w: 136px;
  --event-label-min-w: 70px;
  --event-label-max-w: 190px;
  --event-label-h: 38px;
  --event-label-font: 11px;
  --axis-color: rgba(148, 163, 184, 0.28);
  --connector-color: rgba(148, 163, 184, 0.22);
  --chip-bg: rgba(255, 255, 255, 0.04);
  --chip-bg-hover: rgba(255, 255, 255, 0.08);
  --chip-border: rgba(148, 163, 184, 0.18);
  --chip-border-hover: rgba(148, 163, 184, 0.32);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.14), transparent 28%),
    radial-gradient(circle at top right, rgba(168, 85, 247, 0.12), transparent 24%),
    linear-gradient(180deg, #0b1020 0%, #0f172a 100%);
}

.wrap {
  width: min(1680px, 100%);
  max-width: 100%;
  margin: 0 auto;
  padding: 18px 18px 24px;
}

.dashboard-layout {
  display: grid;
  grid-template-rows: minmax(70vh, 78vh) auto;
  gap: 18px;
  min-height: 100vh;
}

.top-row {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(320px, 3fr);
  gap: 18px;
  min-height: 0;
}

.top-row__timeline,
.top-row__map,
.bottom-row {
  min-height: 0;
}

.timeline-layout {
  display: block;
  width: 100%;
  height: 100%;
}

.timeline-shell {
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: 100%;
}

.timeline,
.map-panel,
.stats-panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.timeline {
  width: 100%;
  max-width: 100%;
  padding: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.controls,
.toolbar,
.filters-panel,
.row-label,
.filter-row,
.filters-panel__rows,
.filters-panel__header,
.filter-chip,
.row-filter-chip {
  display: none !important;
}

.controls label,
.filters-title {
  font-size: 12px;
  color: var(--muted);
}

.scroller {
  overflow-x: auto;
  overflow-y: auto;
  padding: 6px 0 10px;
  min-height: 0;
  height: 100%;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.5) transparent;
}

.scroller::-webkit-scrollbar {
  height: 10px;
}

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

.scroller::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.45);
  border-radius: 999px;
}

.stage {
  position: relative;
  min-width: 1000px;
}

.category-row {
  position: relative;
  min-height: var(--row-h);
  margin-bottom: var(--row-gap);
}

.row-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  overflow: visible;
}

.row-axis {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg,
      transparent 0%,
      var(--axis-color) 4%,
      var(--axis-color) 96%,
      transparent 100%);
}

.life-band-global {
  position: absolute;
  left: 0;
  right: 0;
  top: 18px;
  bottom: 0;
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.18s ease;
}

.life-band {
  position: absolute;
  top: 8px;
  bottom: 8px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(24, 62, 122, 0.10), rgba(0, 0, 0, 0.06));
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.life-band-label {
  position: absolute;
  left: 8px;
  top: 8px;
  font-size: 9px;
  line-height: 1;
  padding: 4px 7px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(106, 176, 76, 0.22);
  white-space: nowrap;
  font-weight: 600;
}

.event {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.event-bar,
.event-dot {
  position: absolute;
  z-index: 3;
}

.event-bar {
  height: 6px;
  border-radius: 999px;
  box-shadow: 0 0 0 1.5px rgba(15, 23, 42, 0.95);
}

.event-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow:
    0 0 0 2px rgba(15, 23, 42, 0.95),
    0 6px 14px rgba(2, 6, 23, 0.45);
}

.event--interactive .event-label,
.event--interactive .event-dot,
.event--interactive .event-bar {
  pointer-events: auto;
  cursor: pointer;
}

.event--non-interactive .event-label,
.event--non-interactive .event-dot,
.event--non-interactive .event-bar {
  pointer-events: none;
  cursor: default;
}

.event-connector-v,
.event-connector-h {
  position: absolute;
  background: var(--connector-color);
  z-index: 1;
}

.event-connector-v {
  width: 2px;
  transform: translateX(-1px);
  background: linear-gradient(to bottom,
      transparent,
      rgba(148, 163, 184, 0.55),
      transparent);
}

.event-connector-h {
  height: 2px;
  transform: translateY(-1px);
}

.event-label {
  position: absolute;
  min-width: var(--event-label-min-w);
  max-width: var(--event-label-max-w);
  min-height: var(--event-label-h);
  padding: 8px 10px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.10);
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.42);
  font-size: var(--event-label-font);
  line-height: 1.22;
  white-space: normal;
  overflow: visible;
  word-break: break-word;
  overflow-wrap: anywhere;
  z-index: 20;
  color: var(--text);
  border-left: 3px solid var(--event-color, #8ab4ff);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.event-label.compact-range {
  max-width: var(--event-label-max-w);
}

.event-label-measure {
  left: -10000px !important;
  top: -10000px !important;
  visibility: hidden;
  pointer-events: none;
  z-index: -1;
}

.event-date {
  color: #94a3b8;
  font-size: 9px;
  margin-bottom: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.event-title {
  color: #f8fafc;
  font-weight: 700;
}

.event-desc {
  margin-top: 4px;
  color: #cbd5e1;
  font-size: 10px;
}

.today-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, transparent, #ffffff, transparent);
  z-index: 1;
}

.today-badge {
  position: absolute;
  top: 14px;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 800;
  color: #0f172a;
  background: #ffffff;
  padding: 4px 8px;
  border-radius: 999px;
  z-index: 5;
  letter-spacing: 0.03em;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.25);
}

.time-ticks {
  position: relative;
  height: 22px;
  margin-left: 0;
  margin-bottom: 10px;
}

.tick {
  position: absolute;
  top: 0;
  transform: translateX(2px);
  color: #94a3b8;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.tick::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 18px;
  width: 1px;
  height: 14px;
  background: rgba(148, 163, 184, 0.22);
  transform: translateX(-50%);
}

.bottom-row {
  min-height: 0;
}

.bottom-row .stats-panel {
  width: 100%;
  margin-top: 0;
}

.map-panel,
.stats-panel {
  padding: 16px;
}

.map-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.map-panel-header,
.stats-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.map-panel-header h2,
.stats-panel-header h2 {
  margin: 0 0 4px;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: #f8fafc;
}

.map-panel-header p,
.stats-panel-header p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.stats-panel-header {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.stats-panel {
  display: flex;
  flex-direction: column;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-content: start;
}

.stat-card {
  min-height: 112px;
  padding: 16px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.85) 0%, rgba(15, 23, 42, 0.96) 100%);
  border: 1px solid rgba(148, 163, 184, 0.10);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  box-shadow: 0 8px 20px rgba(2, 6, 23, 0.26);
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
}

.stats-grid .stat-card:nth-child(-n + 4)::after {
  content: "";
  position: absolute;
  inset: auto -18px -18px auto;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.18), rgba(59, 130, 246, 0));
  pointer-events: none;
}

.stat-label {
  color: #94a3b8;
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-weight: 700;
}

.stat-value {
  font-size: 38px;
  line-height: 1;
  color: #f8fafc;
  letter-spacing: -0.04em;
}

.stat-meta {
  color: #94a3b8;
  font-size: 11px;
}

.map-panel-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.map-panel-body {
  position: relative;
  flex: 1;
  min-height: 320px;
}

.map-view,
.event-drawer {
  position: absolute;
  inset: 0;
  min-height: 0;
}

.map-view {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.map-view.is-active {
  opacity: 1;
  pointer-events: auto;
}

#events-map {
  width: 100%;
  height: 100%;
  min-height: 320px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.10);
}

.map-popup {
  color: #0f172a;
  min-width: 180px;
}

.map-popup-date {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 4px;
  font-weight: 600;
}

.map-popup-title {
  font-weight: 700;
  margin-bottom: 4px;
}

.map-popup-location,
.map-popup-desc {
  font-size: 13px;
  line-height: 1.4;
  color: #334155;
}

.event--interactive .event-label:focus-visible,
.event--interactive .event-label:hover,
.event--interactive .event-dot:focus-visible+.event-label,
.event--interactive .event-bar:focus-visible+.event-label {
  box-shadow: 0 16px 30px rgba(2, 6, 23, 0.5);
  transform: translateY(-2px);
}

.event-drawer {
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.event-drawer__panel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
  overflow: hidden;
}

.event-drawer.is-open {
  pointer-events: auto;
  opacity: 1;
}

.event-drawer__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(148, 163, 184, 0.10);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: #f8fafc;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.24);
}

.event-drawer__content {
  height: 100%;
  overflow-y: auto;
  padding: 24px 24px 34px;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.45) transparent;
}

.event-drawer__empty {
  margin-top: 44px;
  color: var(--muted);
}

.event-drawer__title {
  margin: 12px 0 8px;
  font-size: 28px;
  line-height: 1.05;
  color: #f8fafc;
}

.event-drawer__location {
  margin: 0 0 18px;
  color: #cbd5e1;
  font-weight: 500;
}

.event-drawer__section {
  margin-top: 22px;
}

.event-drawer__section h3 {
  margin: 0 0 10px;
  font-size: 14px;
  color: #f8fafc;
}

.event-drawer__section p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.65;
}

.drawer-meta-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-right: 46px;
}

.drawer-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(148, 163, 184, 0.10);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 600;
}

.drawer-badge--date {
  background: rgba(255, 255, 255, 0.03);
}

.event-video-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: 18px;
  overflow: hidden;
  background: #111827;
  border: 1px solid rgba(148, 163, 184, 0.10);
}

.event-video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

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

.event-gallery__item {
  margin: 0;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.10);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(2, 6, 23, 0.24);
}

.event-gallery__item img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.event-gallery__item figcaption {
  padding: 10px 12px;
  font-size: 12px;
  color: #cbd5e1;
}

.event-steps-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.event-steps-list--nested {
  margin-top: 10px;
  padding-left: 14px;
  border-left: 2px solid rgba(148, 163, 184, 0.16);
}

.event-steps-list__item {
  margin: 0;
}

.event-steps-list__card {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.10);
}

.event-steps-list__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.event-steps-list__title {
  font-weight: 700;
  color: #f8fafc;
}

.event-steps-list__date,
.event-steps-list__meta {
  font-size: 12px;
  color: #cbd5e1;
}

.event-steps-list__date {
  color: #94a3b8;
  white-space: nowrap;
}

.event-steps-list__meta {
  margin-top: 6px;
  line-height: 1.5;
}

@media (min-width: 981px) {
  .top-row__map {
    display: flex;
    flex-direction: column;
  }

  .top-row__map #events-map {
    flex: 1;
  }

  .timeline-shell,
  .timeline {
    height: 100%;
    min-height: 0;
  }
}

@media (max-width: 1220px) {
  .top-row {
    grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr);
  }
}

@media (max-width: 980px) {
  .network-tab-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-layout {
    grid-template-rows: auto auto;
    min-height: auto;
  }

  .top-row {
    grid-template-columns: 1fr;
  }

  .timeline-layout {
    height: auto;
  }

  .top-row__map {
    min-height: 420px;
  }

  .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .timeline-card {
    height: auto;
  }

  .timeline-card__header {
    flex-direction: column;
    align-items: stretch;
  }

  .timeline-card__actions {
    width: 100%;
    justify-content: space-between;
  }

  .timeline-card__zoom {
    min-width: 0;
  }
}

@media (max-width: 760px) {

  .stats-grid,
  .bottom-row .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  :root {
    --label-col: 0px;
    --row-h: 80px;
    --event-label-w: 118px;
    --event-range-label-w: 112px;
    --event-label-max-w: 164px;
  }

  #events-map {
    height: 320px;
  }
}

@media (max-width: 640px) {
  .wrap {
    padding: 12px;
  }

  .stats-grid,
  .bottom-row .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat-card {
    min-height: auto;
  }

  .stat-value {
    font-size: 30px;
  }

  .event-gallery {
    grid-template-columns: 1fr;
  }

  .map-panel-header {
    flex-direction: column;
    align-items: stretch;
  }

  .map-panel-actions {
    justify-content: flex-start;
  }

  .map-toggle,
  .map-view-toggle {
    width: fit-content;
  }
}

.top-row__timeline .timeline,
.top-row__map,
.bottom-row .stats-panel {
  width: 100%;
  margin-top: 0;
}

.top-row__map,
.bottom-row .stats-panel {
  padding: 16px;
}

.bottom-row .stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.timeline-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  padding: 14px;
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.timeline-card__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.timeline-card__header h2 {
  margin: 0 0 4px;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: #f8fafc;
}

.timeline-card__header p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.timeline-card__zoom {
  min-width: 180px;
}

.timeline-card__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.timeline-btn {
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #e5e7eb;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.timeline-btn:hover,
.timeline-btn:focus-visible {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(148, 163, 184, 0.26);
  outline: none;
}

.timeline-btn--icon {
  width: 42px;
  min-width: 42px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}

.timeline-overlay-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  z-index: 1790;
}

.timeline-overlay-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

body.timeline-focus-open {
  overflow: hidden;
}

body.timeline-focus-open .timeline-card {
  position: fixed;
  inset: 18px;
  z-index: 1800;
  height: calc(100vh - 36px);
  border-radius: 28px;
  padding: 18px;
}

body.timeline-focus-open .timeline-card .timeline-layout,
body.timeline-focus-open .timeline-card .timeline-shell,
body.timeline-focus-open .timeline-card .timeline,
body.timeline-focus-open .timeline-card .scroller {
  height: 100%;
  min-height: 0;
}

body.timeline-focus-open .timeline-card__header {
  position: sticky;
  top: 0;
  z-index: 3;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(14px);
}

body.timeline-focus-open .timeline-card__zoom {
  min-width: 240px;
}

body.timeline-focus-open .top-row__map {
  visibility: hidden;
}

.timeline-card .timeline-layout {
  flex: 1;
  min-height: 0;
}

.timeline-card .timeline {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.timeline-card .timeline {
  padding: 0;
}

.timeline-card .timeline-shell {
  height: 100%;
}

.timeline-card .scroller {
  padding: 6px 0 0;
}

.map-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(148, 163, 184, 0.12);
  color: #e5e7eb;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.map-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(148, 163, 184, 0.22);
}

.map-toggle input[type="checkbox"] {
  accent-color: #3b82f6;
  margin: 0;
  flex-shrink: 0;
}

.map-view-toggle {
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(59, 130, 246, 0.16);
  color: #e5e7eb;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.map-view-toggle:hover {
  background: rgba(59, 130, 246, 0.24);
  border-color: rgba(96, 165, 250, 0.32);
  transform: translateY(-1px);
}

.map-view-toggle:focus-visible {
  outline: 2px solid rgba(96, 165, 250, 0.6);
  outline-offset: 2px;
}


/* ===== Fixed left panel inside timeline block ===== */
.timeline-card .timeline-layout {
  overflow: hidden;
}

.timeline-card .timeline-shell {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 0px;
  align-items: stretch;
  height: 100%;
  min-height: 0;
}

.timeline-left-panel {
  position: relative;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.timeline-left-panel__inner {
  position: sticky;
  top: 0;
  left: 0;
  height: 100%;
  min-height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}

.timeline-left-panel__inner::-webkit-scrollbar {
  width: 8px;
}

.timeline-left-panel__inner::-webkit-scrollbar-track {
  background: transparent;
}

.timeline-left-panel__inner::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 999px;
}

.timeline-left-panel__header {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.timeline-left-panel__header h3 {
  margin: 0 0 6px;
  font-size: 16px;
  color: #f8fafc;
  letter-spacing: -0.02em;
}

.timeline-left-panel__header p {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.timeline-left-panel__body {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-top: 0;
  min-height: 100%;
}

.left-category-label {
  position: relative;
  width: 100%;
}

.left-category-label[data-category="living_place"] {
  margin-top: 8px;
}

.left-category-label__content {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 100%;
  width: 100%;
  padding: 0 14px;
  border-left: 3px solid var(--category-accent, #3b82f6);
}

.left-category-label__text {
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.2;
}

.timeline-card .timeline {
  min-width: 0;
  height: 100%;
}

.timeline-card .scroller {
  min-width: 0;
  overflow-x: auto;
  overflow-y: auto;
}

@media (max-width: 980px) {
  .timeline-card .timeline-shell {
    grid-template-columns: 1fr;
  }

  .timeline-left-panel {
    height: auto;
    max-height: 220px;
  }

  .timeline-left-panel__inner {
    position: relative;
    min-height: 0;
    height: auto;
  }

  .timeline-left-panel__body {
    padding-top: 0;
  }

  .left-category-label {
    height: auto !important;
  }

  .left-category-label__content {
    min-height: 48px;
  }
}


/* ===== Hide left panel scrollbar (keep scroll functional) ===== */
.timeline-left-panel__inner {
  scrollbar-width: none;
}

.timeline-left-panel__inner::-webkit-scrollbar {
  display: none;
}

.left-category-label {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.left-category-label__content {
  transition: opacity 0.18s ease, transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.left-category-label:focus-visible .left-category-label__content {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(148, 163, 184, 0.22);
  transform: translateX(2px);
}

.left-category-label:hover .left-category-label__text,
.left-category-label:hover .left-category-label__checkbox {
  transform: translateX(2px);
}

.left-category-label:focus-visible {
  outline: none;
}

.left-category-label.is-inactive .left-category-label__content {
  opacity: 0.48;
}

.left-category-label__checkbox {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.left-category-label__checkbox input {
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--category-accent, #3b82f6);
}

.left-category-label.is-inactive .left-category-label__checkbox input {
  filter: grayscale(0.25);
}


.life-band-global.is-muted {
  opacity: 0.22;
}

.event--muted .event-dot,
.event--muted .event-bar,
.event--muted .event-connector-v,
.event--muted .event-connector-h {
  opacity: 0.28;
}


.event--muted .event-dot,
.event--muted .event-bar {
  filter: saturate(0.7);
}

.event--muted .event-dot,
.event--muted .event-bar,
.event--muted .event-connector-v,
.event--muted .event-connector-h {
  transition: opacity 0.18s ease, filter 0.18s ease;
}


/* stronger transparency tweak */
.event--muted {
  opacity: 0.35;
}

.event--muted .event-dot,
.event--muted .event-bar,
.event--muted .event-connector-v,
.event--muted .event-connector-h {
  opacity: 0.25;
}

.event--muted .event-label {
  opacity: 0.4;
  transform: none;
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.42);
}

.life-band-global.is-muted {
  opacity: 0.18;
}


.left-category-label[data-category="living_place"] .left-category-label__content {
  min-height: 0;
  padding-top: 4px;
  padding-bottom: 4px;
}

.map-reset-btn {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.2);
  background: rgba(255,255,255,0.08);
  color: white;
  font-size: 16px;
  cursor: pointer;
}

.map-reset-btn:hover {
  background: rgba(255,255,255,0.16);
}

.stat-card--interactive {
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.stat-card--interactive:hover,
.stat-card--interactive:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(2, 6, 23, 0.34);
  border-color: rgba(96, 165, 250, 0.32);
}

.stat-card--interactive:focus-visible {
  outline: 2px solid rgba(96, 165, 250, 0.55);
  outline-offset: 2px;
}

body.has-stats-modal-open {
  overflow: hidden;
}

.stats-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.stats-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.stats-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(8px);
}

.stats-modal__dialog {
  position: relative;
  width: min(860px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  margin: 24px auto;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.5);
  overflow: hidden;
}

.stats-modal__content {
  padding: 24px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}

.stats-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: #f8fafc;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.stats-modal__title {
  margin: 4px 48px 8px 0;
  font-size: 28px;
  line-height: 1.08;
  color: #f8fafc;
}

.stats-modal__subtitle {
  margin: 0;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stats-modal__body {
  margin-top: 18px;
}

.stats-detail-list {
  display: grid;
  gap: 12px;
}

.stats-detail-list--compact {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.stats-detail-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.stats-detail-item__main {
  min-width: 0;
}

.stats-detail-item__title {
  color: #f8fafc;
  font-weight: 700;
  line-height: 1.35;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.stats-detail-item__title-prefix,
.mini-bar-row__prefix {
  flex: 0 0 auto;
  font-size: 1.1em;
  line-height: 1;
}

.stats-detail-item__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
  line-height: 1.5;
}

.stats-detail-item__meta-text {
  color: #94a3b8;
  font-size: 11px;
}

.stats-detail-item__event {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  border: 1px solid rgba(148, 163, 184, 0.16);
  color: #e2e8f0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.stats-detail-item__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.stats-detail-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(148, 163, 184, 0.1);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 600;
}

.stats-detail-item__action {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(96, 165, 250, 0.28);
  background: rgba(59, 130, 246, 0.16);
  color: #e5e7eb;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.stats-detail-empty {
  margin: 0;
  padding: 24px;
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.1);
  color: #cbd5e1;
}

.stats-route-map {
  width: 100%;
  height: 360px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.12);
  margin-top: 14px;
}

.stats-route-map__legend {
  margin-top: 10px;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 640px) {
  .stats-modal__dialog {
    width: min(100vw - 20px, 100%);
    margin: 10px auto;
    max-height: calc(100vh - 20px);
  }

  .stats-modal__content {
    padding: 18px;
    max-height: calc(100vh - 20px);
  }

  .stats-modal__title {
    font-size: 22px;
  }

  .stats-detail-item {
    flex-direction: column;
  }
}


.stats-detail-groups {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.stats-detail-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stats-detail-group__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.stats-detail-group__title {
  margin: 0;
  font-size: 16px;
  color: #f8fafc;
}

.stats-detail-group__meta {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 600;
}


.artists-podium-section {
  margin-bottom: 22px;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96) 0%, rgba(30, 41, 59, 0.84) 100%);
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.artists-podium-section__header {
  margin-bottom: 16px;
}

.artists-podium-section__title {
  margin: 0;
  font-size: 16px;
  color: #f8fafc;
}

.artists-podium-section__subtitle {
  margin: 6px 0 0;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.5;
}

.artists-podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}


.artists-top10-rest {
  margin-top: 18px;
}

.artists-podium__item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.artists-podium__card {
  position: relative;
  padding: 16px 14px;
  border-radius: 18px 18px 14px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.24);
}

.artists-podium__place {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  width: fit-content;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.3);
  color: #f8fafc;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.artists-podium__name {
  margin-top: 14px;
  color: #0f172a;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.15;
}

.artists-podium__score {
  margin-top: 8px;
  color: #0f172a;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.artists-podium__meta {
  margin-top: 8px;
  color: rgba(15, 23, 42, 0.8);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
}

.artists-podium__base {
  width: 100%;
  border-radius: 0 0 18px 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 0;
  background: rgba(15, 23, 42, 0.92);
}

.artists-podium__event {
  margin-top: 8px;
  color: #000000;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
}

.artists-podium__item.gold .artists-podium__card {
  background: linear-gradient(180deg, #fef3c7 0%, #fbbf24 100%);
}

.artists-podium__item.silver .artists-podium__card {
  background: linear-gradient(180deg, #e2e8f0 0%, #94a3b8 100%);
}

.artists-podium__item.bronze .artists-podium__card {
  background: linear-gradient(180deg, #fed7aa 0%, #c2410c 100%);
}

.artists-podium__item.is-first .artists-podium__base {
  min-height: 96px;
}

.artists-podium__item.is-second .artists-podium__base {
  min-height: 62px;
}

.artists-podium__item.is-third .artists-podium__base {
  min-height: 42px;
}




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

.artists-ranking-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: 0 8px 18px rgba(2, 6, 23, 0.18);
}

.artists-ranking-item__rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.artists-ranking-item__main {
  min-width: 0;
}

.artists-ranking-item__name {
  color: #f8fafc;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
}

.artists-ranking-item__meta {
  margin-top: 4px;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.45;
}

.artists-ranking-item__score {
  justify-self: end;
  color: #38bdf8;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .artists-podium {
    grid-template-columns: 1fr;
  }

  .artists-podium__item {
    order: initial;
  }

  .artists-podium__item.is-first .artists-podium__base,
  .artists-podium__item.is-second .artists-podium__base,
  .artists-podium__item.is-third .artists-podium__base {
    min-height: 18px;
  }

  .artists-ranking-item {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .artists-ranking-item__score {
    grid-column: 2;
    justify-self: start;
  }
}


.stats-hierarchy {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.stats-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.stats-section__header h3 {
  margin: 0 0 4px;
  font-size: 15px;
  color: #f8fafc;
}

.stats-section__header p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.stats-group {
  display: grid;
  gap: 12px;
  overflow-x: hidden;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.45) transparent;
  padding-bottom: 4px;
  padding-top: 8px;
}

.stats-group::-webkit-scrollbar {
  height: 8px;
}

.stats-group::-webkit-scrollbar-track {
  background: transparent;
}

.stats-group::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.45);
  border-radius: 999px;
}

.stats-group--hero {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stats-group--medium {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.stats-group--others {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card {
  gap: 10px;
  min-width: 0;
}

.stat-card__main {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.stat-card--hero {
  min-height: 220px;
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.18) 0%, rgba(15, 23, 42, 0.96) 100%);
}

.stat-card--hero .stat-value {
  font-size: clamp(30px, 2.4vw, 42px);
}

.stat-card--medium {
  min-height: 190px;
  padding: 14px;
}

.stat-card--medium .stat-value {
  font-size: clamp(24px, 1.9vw, 30px);
}

.stat-card--other {
  min-height: 96px;
  padding: 14px;
}

.stat-card--other .stat-value {
  font-size: clamp(22px, 1.6vw, 26px);
}

.stat-card--interactive {
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.stat-card--interactive:hover,
.stat-card--interactive:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(96, 165, 250, 0.35);
  box-shadow: 0 14px 30px rgba(2, 6, 23, 0.36);
  outline: none;
}

.stat-visual {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.stat-visual-empty,
.stat-hero-caption {
  color: #94a3b8;
  font-size: 11px;
  line-height: 1.4;
}

.mini-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.mini-bar-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.mini-bar-row__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.mini-bar-row__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.mini-bar-row__label img{
  margin-right: 8px;
}

.mini-bar-row__label,
.mini-bar-row__value,
.mini-bar-row__meta {
  font-size: 11px;
}

.mini-bar-row__label {
  color: #e2e8f0;
  font-weight: 600;
}

.mini-bar-row__value {
  color: #cbd5e1;
}

.mini-bar-row__meta {
  color: #94a3b8;
}

.mini-bar-row__track {
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  overflow: hidden;
}

.mini-bar-row__fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(96, 165, 250, 0.95), rgba(129, 140, 248, 0.95));
}

.mini-podium {
  display: grid;
  gap: 10px;
}

.mini-podium__item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.mini-podium__item--gold {
  background: linear-gradient(180deg, rgba(254, 243, 199, 0.5) 0%, rgba(251, 191, 36, 0.5) 100%);
  border-color: rgba(251, 191, 36, 0.28);
}

.mini-podium__item--silver {
  background: linear-gradient(180deg, rgba(226, 232, 240, 0.5) 0%, rgba(148, 163, 184, 0.5) 100%);
  border-color: rgba(203, 213, 225, 0.24);
}

.mini-podium__item--bronze {
  background: linear-gradient(180deg, rgba(254, 215, 170, 0.5) 0%, rgba(194, 65, 12, 0.5) 100%);
  border-color: rgba(251, 146, 60, 0.24);
}

.mini-podium__rank {
  grid-row: 1 / span 2;
  color: rgba(15, 23, 42, 0.88);
  font-weight: 800;
  font-size: 13px;
}

.mini-podium__name {
  color: #f8fafc;
  font-weight: 700;
  font-size: 13px;
}

.mini-podium__meta {
  color: rgba(226, 232, 240, 0.9);
  font-size: 12px;
}

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.kpi-strip__item {
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.08);
  min-width: 0;
}

.kpi-strip__label {
  display: block;
  font-size: 10px;
  color: #94a3b8;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kpi-strip__value {
  display: block;
  color: #f8fafc;
  font-size: 13px;
  line-height: 1.3;
}

@media (max-width: 1380px) {
  .stats-group {
    gap: 10px;
  }

  .stat-card--hero {
    min-height: 208px;
    padding: 16px;
  }

  .stat-card--medium {
    min-height: 180px;
    padding: 13px;
  }

  .stat-card--other {
    min-height: 90px;
    padding: 13px;
  }
}

@media (max-width: 980px) {
  .stats-group {
    gap: 8px;
  }

  .stat-label {
    font-size: 10px;
  }

  .stat-meta {
    font-size: 10px;
    line-height: 1.3;
  }

  .stat-card--hero {
    min-height: 188px;
    padding: 14px;
  }

  .stat-card--hero .stat-value {
    font-size: clamp(24px, 2.8vw, 34px);
  }

  .stat-card--medium {
    min-height: 164px;
    padding: 12px;
  }

  .stat-card--medium .stat-value {
    font-size: clamp(20px, 2.2vw, 26px);
  }

  .stat-card--other {
    min-height: 84px;
    padding: 12px;
  }

  .stat-card--other .stat-value {
    font-size: clamp(18px, 1.9vw, 22px);
  }

  .mini-bar-row__label,
  .mini-bar-row__value,
  .mini-bar-row__meta {
    font-size: 10px;
  }

  .kpi-strip__label {
    font-size: 9px;
  }

  .kpi-strip__value {
    font-size: 12px;
  }
}

@media (max-width: 760px) {
  .stat-card--hero,
  .stat-card--medium {
    min-height: auto;
  }
}


.country-flag {
  display: inline-block;
  width: 1.1em;
  height: .8em;
  object-fit: cover;
  border-radius: .2em;
  vertical-align: -.08em;
  margin-right: .3em;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08);
}

.country-flag--mini {
  width: 18px;
  height: 12px;
  margin-right: 0;
  vertical-align: middle;
}

#stat-top-country {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

#stat-top-country .country-flag {
  width: 56px;
  height: 38px;
  border-radius: 8px;
  flex: 0 0 auto;
  margin-right: 0;
}

.mini-bar-row__flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  flex: 0 0 auto;
}

.mini-bar-row__label {
  display: inline-flex;
  align-items: center;
  gap: 0;
}

.network-panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  padding: 16px;
  display: flex;
  flex-direction: column;
  min-height: 70vh;
}

.bottom-row {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.network-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.network-panel__header h2 {
  margin: 0 0 4px;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: #f8fafc;
}

.network-panel__header p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.network-panel__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.network-btn {
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #e5e7eb;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.network-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(148, 163, 184, 0.22);
  transform: translateY(-1px);
}

.network-btn:focus-visible {
  outline: 2px solid rgba(96, 165, 250, 0.6);
  outline-offset: 2px;
}

.network-controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 0;
}

.network-control {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.10);
}

.network-control__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 700;
}

.network-control__top strong {
  color: #f8fafc;
  font-variant-numeric: tabular-nums;
}

.network-control input[type="range"] {
  width: 100%;
  margin: 0;
  accent-color: #7dd3fc;
}

.network-panel__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.network-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.1);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 600;
}

.network-legend__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.network-legend__dot--event { background: #60a5fa; }
.network-legend__dot--step { background: #34d399; }
.network-legend__dot--category { background: #f59e0b; }
.network-legend__dot--country { background: #38bdf8; }
.network-legend__dot--artist { background: #f472b6; }
.network-legend__dot--tag { background: #a78bfa; }

.network-panel__viewport-shell {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.network-panel__viewport {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 70vh;
  min-height: 420px;
  flex: 1 1 auto;
  align-self: stretch;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.10);
  background:
    radial-gradient(circle at 18% 18%, rgba(59, 130, 246, 0.11), transparent 22%),
    radial-gradient(circle at 82% 16%, rgba(168, 85, 247, 0.09), transparent 18%),
    radial-gradient(circle at 50% 82%, rgba(34, 197, 94, 0.05), transparent 20%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.99) 0%, rgba(11, 16, 32, 1) 100%);
}

.network-panel__viewport::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.045) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at center, black 58%, transparent 100%);
  pointer-events: none;
}

.network-panel__empty {
  height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.network-svg {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  position: relative;
  z-index: 1;
}

.network-svg.is-dragging {
  cursor: grabbing;
}

.network-link {
  stroke: rgba(148, 163, 184, 0.24);
  stroke-width: 1.15;
  stroke-linecap: round;
  transition: opacity 0.18s ease, stroke 0.18s ease, stroke-width 0.18s ease;
}

.network-link--category {
  stroke: rgba(245, 158, 11, 0.28);
}

.network-link--step {
  stroke: rgba(52, 211, 153, 0.3);
}

.network-link--country {
  stroke: rgba(56, 189, 248, 0.26);
}

.network-link--city {
  stroke: rgba(34, 197, 94, 0.24);
}

.network-link--artist {
  stroke: rgba(244, 114, 182, 0.22);
}

.network-link--person {
  stroke: rgba(52, 211, 153, 0.24);
}

.network-link--tag {
  stroke: rgba(167, 139, 250, 0.22);
}

.network-link--event-link {
  stroke: rgba(148, 163, 184, 0.24);
}

.network-node circle {
  stroke: rgba(255, 255, 255, 0.18);
  stroke-width: 1.35;
  transition: transform 0.18s ease, stroke 0.18s ease, stroke-width 0.18s ease, opacity 0.18s ease, r 0.18s ease;
}

.network-node text {
  fill: rgba(226, 232, 240, 0.82);
  font-size: 11px;
  font-weight: 600;
  paint-order: stroke;
  stroke: rgba(15, 23, 42, 0.96);
  stroke-width: 4px;
  stroke-linejoin: round;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.18s ease;
}

.network-node__label.is-always-visible,
.network-node.is-highlighted text,
.network-node.is-neighbor text,
.network-node:hover text {
  opacity: 1;
}

.network-node.is-faded {
  opacity: 0.12;
}

.network-node.is-muted {
  opacity: 0.32;
}

.network-node.is-muted circle,
.network-node.is-muted text {
  transition: opacity 0.18s ease, transform 0.18s ease, stroke 0.18s ease, stroke-width 0.18s ease;
}

.network-node.is-muted text {
  opacity: 0.38;
}

.network-link.is-faded {
  opacity: 0.05;
}

.network-link.is-muted {
  opacity: 0.12;
}

.network-node.is-neighbor:not(.is-muted) circle {
  stroke: rgba(255, 255, 255, 0.52);
  stroke-width: 2;
}

.network-node.is-highlighted:not(.is-muted) circle {
  stroke: rgba(255, 255, 255, 0.96);
  stroke-width: 2.8;
}

.network-link.is-highlighted {
  opacity: 0.88;
  stroke-width: 1.85;
}

.network-link.is-highlighted.is-muted {
  opacity: 0.12;
  stroke-width: 1.15;
}

.network-tooltip {
  position: absolute;
  inset: auto auto 16px 16px;
  z-index: 2;
  max-width: min(360px, calc(100% - 32px));
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.35);
  pointer-events: none;
}

.network-tooltip__eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.network-tooltip__title {
  margin: 8px 0 4px;
  color: #f8fafc;
  font-size: 16px;
  font-weight: 700;
}

.network-tooltip__meta {
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 1180px) {
  .network-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .network-panel {
    min-height: 70vh;
  }
}

@media (max-width: 700px) {
  .network-panel__header {
    flex-direction: column;
    align-items: stretch;
  }

  .network-panel__actions {
    justify-content: flex-start;
  }

  .network-settings-drawer {
    top: 8px;
    right: 8px;
    bottom: 8px;
    width: calc(100% - 16px);
  }

  .network-panel__viewport {
    min-height: 420px;
  }
}


.app-shell {
  display: grid;
  gap: 18px;
  min-height: 100vh;
}

.app-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 24px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.app-title {
  margin: 0 0 6px;
  font-size: 28px;
  line-height: 1;
  color: #f8fafc;
}

.app-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.tab-nav {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.tab-btn {
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(255,255,255,0.04);
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.tab-btn:hover,
.tab-btn:focus-visible {
  transform: translateY(-1px);
  background: rgba(255,255,255,0.08);
  border-color: rgba(148, 163, 184, 0.28);
}

.tab-btn.is-active {
  background: rgba(59, 130, 246, 0.16);
  border-color: rgba(96, 165, 250, 0.38);
  color: #f8fafc;
}

.tab-panel {
  min-height: 0;
}

.single-panel-layout,
.network-tab-layout {
  min-height: calc(100vh - 170px);
}

.network-tab-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.dashboard-layout--timeline {
  grid-template-rows: minmax(72vh, 80vh);
}

.top-row--timeline-only {
  min-height: 0;
}

.stats-panel--full {
  min-height: calc(100vh - 190px);
}

.network-filters-panel__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  min-height: 0;
}

.network-panel__viewport-shell {
  position: relative;
  flex: 1;
  min-height: 520px;
}

.network-panel__viewport-shell--overlay {
  overflow: hidden;
  border-radius: 20px;
}

.network-btn--icon {
  width: 44px;
  min-width: 44px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}

.network-settings-drawer {
  position: absolute;
  top: 16px;
  right: 16px;
  bottom: 16px;
  width: min(360px, calc(100% - 32px));
  z-index: 20;
  opacity: 0;
  pointer-events: none;
  transform: translateX(calc(100% + 24px));
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.network-settings-drawer.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.network-settings-drawer__panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  height: 100%;
  padding: 14px;
  border-radius: 20px;
  background: rgba(17, 24, 39, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 20px 45px rgba(2, 6, 23, 0.48);
  backdrop-filter: blur(16px);
  overflow: hidden;
}

.network-settings-drawer--forces {
  width: min(340px, calc(100% - 32px));
}

.network-settings-drawer--forces .network-settings-drawer__panel {
  height: auto;
  max-height: 100%;
}

.network-filters-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.network-filters-panel__header {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.network-filters-panel__header h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: #f8fafc;
}


.network-settings-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.network-settings-drawer__title {
  font-size: 14px;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.network-settings-drawer__close {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.05);
  color: #f8fafc;
  cursor: pointer;
}

.network-settings-section {
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(255, 255, 255, 0.035);
  overflow: hidden;
}

.network-settings-section summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 700;
  color: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.network-settings-section summary::-webkit-details-marker {
  display: none;
}

.network-settings-section summary::after {
  content: "›";
  font-size: 20px;
  line-height: 1;
  transform: rotate(90deg);
  transition: transform 0.18s ease;
}

.network-settings-section:not([open]) summary::after {
  transform: rotate(0deg);
}

.network-settings-section__body {
  padding: 0 14px 14px;
}

.network-category-toggle {
  border: 0;
  background: transparent;
  padding: 0;
  width: 100%;
  text-align: left;
}

.network-category-toggle__content {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 14px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-left: 3px solid var(--category-accent, #3b82f6);
  background: rgba(255, 255, 255, 0.03);
  transition: opacity 0.18s ease, transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.network-category-toggle:hover .network-category-toggle__content,
.network-category-toggle:focus-within .network-category-toggle__content {
  transform: translateX(2px);
  background: rgba(255,255,255,0.06);
  border-color: rgba(148, 163, 184, 0.24);
}

.network-category-toggle.is-inactive .network-category-toggle__content {
  opacity: 0.6;
}

.network-category-toggle.is-hidden .network-category-toggle__content {
  opacity: 0.34;
}

.network-category-toggle.is-hidden .network-category-toggle__checkbox {
  pointer-events: none;
}

.network-category-toggle.is-hidden .network-category-toggle__checkbox input {
  cursor: not-allowed;
  opacity: 0.4;
  filter: grayscale(1);
}

.network-category-toggle__checkbox {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.network-category-toggle__checkbox input {
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--category-accent, #3b82f6);
}

.network-category-toggle__text {
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.2;
}

.network-category-toggle__spacer {
  flex: 1 1 auto;
}

.network-category-toggle__eye {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.05);
  color: #f8fafc;
  cursor: pointer;
  flex: 0 0 auto;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}

.network-category-toggle__eye:hover,
.network-category-toggle__eye:focus-visible {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(148, 163, 184, 0.28);
  outline: none;
}

.network-category-toggle__eye.is-hidden {
  opacity: 0.75;
  background: rgba(15, 23, 42, 0.55);
}

.network-category-toggle__eye span {
  font-size: 15px;
  line-height: 1;
}

.network-panel--full {
  min-height: calc(100vh - 190px);
}

.network-panel__viewport-shell {
  flex: 1;
  min-height: 520px;
}

.network-panel__viewport {
  height: 100%;
  min-height: 520px;
}

@media (max-width: 1100px) {
  .network-settings-drawer {
    width: min(340px, calc(100% - 24px));
    top: 12px;
    right: 12px;
    bottom: 12px;
  }
}

@media (max-width: 980px) {
  .app-header {
    flex-direction: column;
    align-items: stretch;
  }

  .tab-nav {
    justify-content: flex-start;
  }
}


.network-category-toggle {
  cursor: pointer;
}

.network-category-toggle.is-hidden {
  cursor: default;
}

.network-category-toggle__content {
  width: 100%;
}

.network-category-toggle__text,
.network-category-toggle__checkbox {
  pointer-events: none;
}


.network-filters-panel__body {
  padding-right: 6px;
}

/* ===== REMOVE TRANSLATE SHIFT (NO OVERFLOW) ===== */
.left-category-label:hover .left-category-label__text,
.left-category-label:hover .left-category-label__checkbox {
  transform: none !important;
}

/* ===== REPLACE WITH SAFE HOVER EFFECT ===== */
.left-category-label:hover .left-category-label__content {
  padding-left: 16px;
  transition: padding 0.15s ease;
}

@media (max-width: 700px) {
  body.timeline-focus-open .timeline-card {
    inset: 10px;
    height: calc(100vh - 20px);
    padding: 12px;
    border-radius: 22px;
  }

  body.timeline-focus-open .timeline-card__actions {
    align-items: stretch;
  }

  body.timeline-focus-open .timeline-card__zoom {
    min-width: 0;
    flex: 1 1 auto;
  }
}

/* ===== Gallery lightbox / photo popup ===== */
body.gallery-lightbox-open {
  overflow: hidden;
}

.event-gallery__button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: zoom-in;
}

.event-gallery__button:focus-visible {
  outline: 2px solid rgba(96, 165, 250, 0.7);
  outline-offset: -3px;
}

.event-gallery__button img {
  transition: transform 0.22s ease, filter 0.22s ease;
}

.event-gallery__button:hover img,
.event-gallery__button:focus-visible img {
  transform: scale(1.025);
  filter: brightness(1.08);
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.gallery-lightbox[hidden] {
  display: none !important;
}

.gallery-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.88);
  backdrop-filter: blur(10px);
}

.gallery-lightbox__panel {
  position: relative;
  width: min(1180px, 100%);
  height: min(760px, calc(100vh - 48px));
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.gallery-lightbox__figure {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
}

.gallery-lightbox__image {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 152px);
  max-height: calc(100% - 116px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.42);
}

.gallery-lightbox__caption {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: min(760px, calc(100% - 152px));
  color: #e5e7eb;
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
  pointer-events: none;
}

.gallery-lightbox__close,
.gallery-lightbox__nav {
  position: absolute;
  z-index: 2;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.72);
  color: #f8fafc;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.26);
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.gallery-lightbox__close:hover,
.gallery-lightbox__nav:hover,
.gallery-lightbox__close:focus-visible,
.gallery-lightbox__nav:focus-visible {
  transform: translateY(-1px);
  background: rgba(30, 41, 59, 0.92);
  border-color: rgba(148, 163, 184, 0.34);
  outline: none;
}

.gallery-lightbox__close {
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  font-size: 22px;
  line-height: 1;
}

.gallery-lightbox__nav {
  top: 50%;
  width: 52px;
  height: 72px;
  border-radius: 999px;
  transform: translateY(-50%);
  font-size: 48px;
  line-height: 0.8;
}

.gallery-lightbox__nav:hover,
.gallery-lightbox__nav:focus-visible {
  transform: translateY(-50%) scale(1.03);
}

.gallery-lightbox__nav--prev {
  left: 18px;
}

.gallery-lightbox__nav--next {
  right: 18px;
}

.gallery-lightbox__counter {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 2;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.14);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 760px) {
  .gallery-lightbox {
    padding: 12px;
  }

  .gallery-lightbox__panel {
    height: calc(100vh - 24px);
    border-radius: 22px;
  }

  .gallery-lightbox__image {
    max-width: calc(100% - 28px);
    max-height: calc(100% - 136px);
  }

  .gallery-lightbox__caption {
    bottom: 72px;
    width: calc(100% - 28px);
    font-size: 13px;
  }

  .gallery-lightbox__nav {
    top: auto;
    bottom: 12px;
    width: 46px;
    height: 46px;
    font-size: 36px;
    transform: none;
  }

  .gallery-lightbox__nav:hover,
  .gallery-lightbox__nav:focus-visible {
    transform: scale(1.03);
  }

  .gallery-lightbox__nav--prev {
    left: calc(50% - 58px);
  }

  .gallery-lightbox__nav--next {
    right: calc(50% - 58px);
  }

  .gallery-lightbox__counter {
    left: 14px;
    bottom: 18px;
  }
}
