export const APP_STYLES = `      :root {
        --radius-xl: 0;
        --radius-lg: 0;
        --radius-md: 0;
        --shadow: 0 12px 30px rgba(2, 6, 23, 0.14);
        --shadow-soft: 0 8px 18px rgba(2, 6, 23, 0.1);
        --chart-grid: rgba(255, 255, 255, 0.035);
        --chart-band: rgba(100, 116, 139, 0.16);
      }

      body[data-theme="dark"] {
        color-scheme: dark;
        --bg: #0b1120;
        --bg-accent-a: rgba(59, 130, 246, 0.12);
        --bg-accent-b: rgba(30, 41, 59, 0.14);
        --panel: rgba(15, 23, 42, 0.9);
        --panel-float: rgba(15, 23, 42, 0.72);
        --panel-strong: rgba(30, 41, 59, 0.96);
        --surface: rgba(15, 23, 42, 0.72);
        --surface-float: rgba(15, 23, 42, 0.54);
        --surface-strong: rgba(30, 41, 59, 0.95);
        --border: rgba(148, 163, 184, 0.16);
        --border-strong: rgba(148, 163, 184, 0.26);
        --text: #e2e8f0;
        --muted: #94a3b8;
        --accent: #94a3b8;
        --accent-strong: #cbd5e1;
        --input-bg: rgba(15, 23, 42, 0.92);
        --button-secondary-bg: rgba(148, 163, 184, 0.12);
        --button-secondary-hover: rgba(148, 163, 184, 0.18);
        --danger-bg: rgba(239, 68, 68, 0.12);
        --danger-hover: rgba(239, 68, 68, 0.18);
        --danger-text: #fca5a5;
        --status-tint: rgba(148, 163, 184, 0.16);
        --progress-track: rgba(148, 163, 184, 0.16);
        --photo-bg: rgba(15, 23, 42, 0.7);
        --photo-active-bg: rgba(51, 65, 85, 0.76);
        --photo-active-border: rgba(148, 163, 184, 0.34);
        --empty-border: rgba(148, 163, 184, 0.22);
        --overlay-bg: rgba(2, 6, 23, 0.7);
        --overlay-media-bg: rgba(15, 23, 42, 0.86);
        --overlay-media-border: rgba(148, 163, 184, 0.18);
        --overlay-media-shadow: 0 12px 30px rgba(2, 6, 23, 0.3);
        --overlay-caption-text: rgba(226, 232, 240, 0.82);
        --card-border: rgba(148, 163, 184, 0.16);
        --timeline-surface: rgba(15, 23, 42, 0.88);
        --timeline-surface-soft: rgba(15, 23, 42, 0.76);
        --timeline-surface-strong: rgba(30, 41, 59, 0.96);
        --timeline-border: rgba(148, 163, 184, 0.18);
        --timeline-border-strong: rgba(191, 219, 254, 0.28);
        --timeline-text: #e2e8f0;
        --timeline-text-muted: #94a3b8;
        --timeline-bar-border: rgba(148, 163, 184, 0.48);
        --timeline-bar-fill: rgba(148, 163, 184, 0.84);
        --timeline-bar-fill-hover: rgba(125, 211, 252, 0.88);
        --timeline-bar-fill-selected: rgba(186, 230, 253, 0.92);
        --timeline-bar-fill-selected-active: rgba(226, 232, 240, 0.98);
        --timeline-axis-color: rgba(148, 163, 184, 0.5);
        --timeline-axis-label: #d1d5db;
        --timeline-meta: rgba(209, 213, 219, 0.72);
        --timeline-selection-border: rgba(191, 219, 254, 0.36);
        --timeline-selection-bg: rgba(148, 163, 184, 0.16);
        --timeline-brush-border: rgba(226, 232, 240, 0.68);
        --timeline-brush-bg: rgba(148, 163, 184, 0.24);
        --chart-grid: rgba(255, 255, 255, 0.05);
        --accent-shadow: rgba(148, 163, 184, 0.18);
        --spinner-track: rgba(125, 211, 252, 0.26);
        --route-color: #7dd3fc;
        --marker-border: rgba(15, 23, 42, 0.94);
        --marker-border-active: rgba(191, 219, 254, 0.96);
        --marker-shadow: 0 8px 18px rgba(2, 6, 23, 0.34);
        --marker-active-shadow: 0 0 0 3px rgba(125, 211, 252, 0.18), 0 10px 22px rgba(2, 6, 23, 0.38);
      }

      body[data-theme="light"] {
        color-scheme: light;
        --bg: #eef2f6;
        --bg-accent-a: rgba(100, 116, 139, 0.08);
        --bg-accent-b: rgba(148, 163, 184, 0.06);
        --panel: rgba(255, 255, 255, 0.9);
        --panel-float: rgba(255, 255, 255, 0.68);
        --panel-strong: rgba(255, 255, 255, 0.98);
        --surface: rgba(255, 255, 255, 0.84);
        --surface-float: rgba(255, 255, 255, 0.56);
        --surface-strong: rgba(241, 245, 249, 0.98);
        --border: rgba(15, 23, 42, 0.1);
        --border-strong: rgba(15, 23, 42, 0.16);
        --text: #111827;
        --muted: #5b6472;
        --accent: #64748b;
        --accent-strong: #475569;
        --input-bg: white;
        --button-secondary-bg: rgba(15, 23, 42, 0.05);
        --button-secondary-hover: rgba(15, 23, 42, 0.08);
        --danger-bg: rgba(120, 53, 15, 0.08);
        --danger-hover: rgba(120, 53, 15, 0.14);
        --danger-text: #b91c1c;
        --status-tint: rgba(100, 116, 139, 0.12);
        --progress-track: rgba(15, 23, 42, 0.08);
        --photo-bg: rgba(255, 255, 255, 0.84);
        --photo-active-bg: rgba(100, 116, 139, 0.12);
        --photo-active-border: rgba(100, 116, 139, 0.32);
        --empty-border: rgba(15, 23, 42, 0.16);
        --overlay-bg: rgba(8, 12, 18, 0.15);
        --overlay-media-bg: rgba(248, 250, 252, 0.94);
        --overlay-media-border: rgba(148, 163, 184, 0.26);
        --overlay-media-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
        --overlay-caption-text: #303030;
        --card-border: rgba(15, 23, 42, 0.11);
        --timeline-surface: rgba(255, 255, 255, 0.84);
        --timeline-surface-soft: rgba(255, 255, 255, 0.94);
        --timeline-surface-strong: rgba(241, 245, 249, 0.98);
        --timeline-border: rgba(148, 163, 184, 0.22);
        --timeline-border-strong: rgba(100, 116, 139, 0.32);
        --timeline-text: #303030;
        --timeline-text-muted: rgba(48, 48, 48, 0.72);
        --timeline-bar-border: rgba(75, 85, 99, 0.82);
        --timeline-bar-fill: rgba(100, 116, 139, 0.82);
        --timeline-bar-fill-hover: rgba(75, 85, 99, 0.92);
        --timeline-bar-fill-selected: rgba(55, 65, 81, 0.92);
        --timeline-bar-fill-selected-active: rgba(15, 23, 42, 0.96);
        --timeline-axis-color: rgba(107, 114, 128, 0.52);
        --timeline-axis-label: #303030;
        --timeline-meta: rgba(48, 48, 48, 0.72);
        --timeline-selection-border: rgba(75, 85, 99, 0.42);
        --timeline-selection-bg: rgba(107, 114, 128, 0.14);
        --timeline-brush-border: rgba(55, 65, 81, 0.62);
        --timeline-brush-bg: rgba(107, 114, 128, 0.2);
        --chart-grid: rgba(15, 23, 42, 0.06);
        --accent-shadow: rgba(100, 116, 139, 0.16);
        --spinner-track: rgba(96, 165, 250, 0.22);
        --route-color: #2d6cdf;
        --marker-border: rgba(255, 255, 255, 0.92);
        --marker-border-active: rgba(100, 116, 139, 0.95);
        --marker-shadow: 0 8px 18px rgba(15, 23, 42, 0.22);
        --marker-active-shadow: 0 0 0 3px rgba(100, 116, 139, 0.18), 0 10px 22px rgba(15, 23, 42, 0.28);
      }

      * {
        box-sizing: border-box;
      }

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

      body {
        position: relative;
        height: 100dvh;
        overflow: hidden;
        font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
        color: var(--text);
        background:
          radial-gradient(circle at top left, var(--bg-accent-a), transparent 28%),
          radial-gradient(circle at bottom right, var(--bg-accent-b), transparent 26%),
          var(--bg);
      }

      h1,
      h2,
      p {
        margin: 0;
      }

      aside,
      main,
      .card {
        background: var(--panel);
        backdrop-filter: blur(14px);
        border: 1px solid var(--border);
        border-radius: var(--radius-xl);
        box-shadow: var(--shadow);
      }

      .overlay-card {
        background: transparent;
        border: 0;
        box-shadow: none;
      }

      .muted {
        color: var(--muted);
      }

      aside {
        position: absolute;
        top: 16px;
        left: 16px;
        bottom: 128px;
        width: min(280px, calc(100vw - 32px));
        min-height: 0;
        min-width: 0;
        padding: 8px;
        display: grid;
        grid-template-rows: auto minmax(0, 1fr);
        gap: 8px;
        overflow: hidden;
        z-index: 700;
        backdrop-filter: blur(16px);
        background: var(--timeline-surface-soft);
        border-color: var(--timeline-border);
        transition: width 180ms ease, transform 180ms ease, opacity 180ms ease, padding 180ms ease;
      }

      aside.sidebar-collapsed {
        width: 44px;
        padding: 6px;
      }

      aside.sidebar-collapsed .panel-stack {
        padding: 0;
        background: transparent;
        border-color: transparent;
        backdrop-filter: none;
      }

      aside.sidebar-collapsed .panel-stack > :not(.panel-toolbar),
      aside.sidebar-collapsed .photo-card {
        display: none;
      }

      aside.sidebar-collapsed .panel-toolbar {
        justify-content: center;
      }

      aside.sidebar-collapsed .theme-toggle {
        display: none;
      }

      aside.sidebar-collapsed .panel-logo {
        display: none;
      }

      .card {
        min-width: 0;
        padding: 10px;
        border-radius: var(--radius-lg);
        border: 1px solid var(--timeline-border);
        background: var(--timeline-surface-soft);
        color: var(--timeline-text);
        backdrop-filter: blur(16px);
      }

      .photo-card {
        min-height: 0;
        display: grid;
        grid-template-rows: auto auto minmax(0, 1fr);
        overflow: hidden;
      }

      .card h2 {
        font-size: 0.92rem;
        margin-bottom: 6px;
      }

      .card p,
      .card small {
        color: var(--timeline-text-muted);
      }

      label {
        display: grid;
        gap: 6px;
        margin-top: 10px;
        font-size: 0.84rem;
      }

      input {
        width: 100%;
        border: 1px solid var(--border-strong);
        border-radius: var(--radius-md);
        padding: 9px 11px;
        font: inherit;
        color: var(--text);
        background: var(--input-bg);
      }

      .button-row {
        display: flex;
        gap: 8px;
        margin-top: 8px;
        flex-wrap: wrap;
      }

      .panel-stack {
        display: grid;
        gap: 8px;
      }

      .panel-toolbar {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 8px;
      }

      .panel-logo {
        display: block;
        width: min(75px, calc(100% - 40px));
        height: auto;
        object-fit: contain;
        flex: 0 1 auto;
      }

      .theme-toggle {
        width: 40px;
        height: 40px;
        padding: 0;
        justify-content: center;
      }

      .top-right-controls {
        position: fixed;
        top: 16px;
        right: 16px;
        z-index: 900;
        display: grid;
        gap: 2px;
        padding: 4px;
        background: var(--timeline-surface-soft);
        border: 1px solid var(--timeline-border);
        box-shadow: var(--shadow-soft);
        backdrop-filter: blur(14px);
      }

      .route-toggle {
        width: 40px;
        height: 40px;
        padding: 0;
        justify-content: center;
      }

      .theme-toggle,
      .route-toggle {
        background: transparent;
        color: var(--timeline-text);
        border: 1px solid transparent;
        box-shadow: none;
        opacity: 0.78;
      }

      .theme-toggle:hover,
      .route-toggle:hover {
        background: var(--timeline-surface-strong);
        border-color: var(--timeline-border);
        opacity: 1;
      }

      .route-toggle[aria-pressed="true"] {
        background: var(--timeline-surface-strong);
        border-color: var(--timeline-border-strong);
        color: var(--route-color);
        opacity: 1;
      }

      .route-toggle[aria-pressed="false"] {
        color: var(--timeline-text-muted);
      }

      .theme-toggle .button-icon,
      .route-toggle .button-icon {
        width: 18px;
        height: 18px;
      }

      .panel-collapse {
        width: 32px;
        min-width: 32px;
        height: 32px;
        padding: 0;
        justify-content: center;
        flex: 0 0 auto;
      }

      button {
        border: 0;
        border-radius: var(--radius-md);
        padding: 8px 11px;
        font: inherit;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        gap: 8px;
      }

      .button-icon {
        width: 1em;
        height: 1em;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
      }

      .button-icon svg {
        display: block;
        width: 100%;
        height: 100%;
      }

      .primary {
        background: var(--accent);
        color: white;
        box-shadow: 0 6px 14px var(--accent-shadow);
      }

      .primary:hover {
        background: var(--accent-strong);
      }

      .secondary {
        background: var(--button-secondary-bg);
        color: var(--text);
      }

      .secondary:hover {
        background: var(--button-secondary-hover);
      }

      .danger {
        background: var(--danger-bg);
        color: var(--danger-text);
      }

      .danger:hover {
        background: var(--danger-hover);
      }

      .status {
        margin-top: 6px;
        font-size: 0.8rem;
        color: var(--muted);
        overflow-wrap: anywhere;
      }

      .status-row {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-top: 6px;
        min-width: 0;
      }

      .status-row .status {
        margin-top: 0;
      }

      .spinner {
        width: 16px;
        height: 16px;
        border-radius: 50%;
        border: 2px solid var(--spinner-track);
        border-top-color: var(--accent);
        opacity: 0;
        transform: scale(0.8);
        transition: opacity 120ms ease, transform 120ms ease;
      }

      .spinner.active {
        opacity: 1;
        transform: scale(1);
        animation: spin 0.8s linear infinite;
      }

      @keyframes spin {
        to {
          transform: rotate(360deg);
        }
      }

      .progress {
        display: grid;
        gap: 6px;
        margin-top: 8px;
      }

      .progress-bar {
        height: 8px;
        border-radius: var(--radius-md);
        overflow: hidden;
        background: var(--progress-track);
      }

      .progress-fill {
        width: 0%;
        height: 100%;
        border-radius: inherit;
        background: linear-gradient(90deg, var(--accent), #67b2ff);
        transition: width 180ms ease;
      }

      .progress-meta {
        display: flex;
        justify-content: space-between;
        gap: 12px;
        font-size: 0.76rem;
        color: var(--muted);
        min-width: 0;
      }

      .progress-meta span {
        min-width: 0;
        overflow-wrap: anywhere;
      }

      .list {
        --photo-thumb-size: 64px;
        display: flex;
        flex-wrap: wrap;
        align-content: flex-start;
        gap: 4px;
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        scrollbar-gutter: stable;
        padding-right: 2px;
      }

      .photo {
        display: block;
        position: relative;
        flex: 0 0 var(--photo-thumb-size);
        width: var(--photo-thumb-size);
        height: var(--photo-thumb-size);
        padding: 0;
        border-radius: var(--radius-md);
        background: var(--timeline-surface-soft);
        border: 1px solid var(--timeline-border);
        color: var(--timeline-text);
        min-width: 0;
        overflow: hidden;
      }

      .photo img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center center;
        border-radius: 0;
        display: block;
      }

      .photo::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(to top, rgba(15, 23, 42, 0.34), transparent 42%);
        opacity: 0;
        transition: opacity 140ms ease;
      }

      .photo:hover::after,
      .photo.active::after {
        opacity: 1;
      }

      .photo.active {
        border-color: var(--timeline-border-strong);
        background: var(--timeline-surface-strong);
      }

      .empty-state {
        padding: 10px;
        border-radius: var(--radius-md);
        border: 1px dashed var(--timeline-border);
        color: var(--timeline-text-muted);
        background: var(--timeline-surface);
        text-align: center;
      }

      main {
        position: absolute;
        inset: 0;
        min-height: 0;
        min-width: 0;
        overflow: hidden;
      }

      .map-panel {
        position: absolute;
        inset: 0;
        min-height: 0;
        overflow: hidden;
        border-radius: 0;
        border: 0;
        background: transparent;
        backdrop-filter: none;
        box-shadow: none;
      }

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

      .overlay {
        position: fixed;
        inset: 0;
        display: none;
        place-items: center;
        background: var(--overlay-bg);
        backdrop-filter: blur(4px);
        z-index: 1000;
        padding: 24px;
      }

      .overlay.open {
        display: grid;
      }

      .overlay-card {
        display: inline-grid;
        width: fit-content;
        max-width: min(100%, calc(100vw - 48px));
        gap: 10px;
        overflow: hidden;
        border-radius: 0;
        background: transparent;
        border: 0;
        box-shadow: none;
        color: var(--timeline-text);
        touch-action: none;
        user-select: none;
      }

      .overlay-media {
        position: relative;
        width: fit-content;
        max-width: 100%;
        min-height: 0;
        background: var(--overlay-media-bg);
        border: 1px solid var(--overlay-media-border);
        box-shadow: var(--overlay-media-shadow);
      }

      .overlay-card img {
        display: block;
        width: auto;
        max-width: min(1440px, calc(100vw - 48px));
        max-height: calc(100vh - 112px);
        object-fit: contain;
        background: transparent;
        transition: opacity 120ms ease;
      }

      .overlay-caption {
        margin: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        text-align: center;
        color: var(--overlay-caption-text);
      }

      .overlay-caption strong {
        display: block;
        max-width: min(72ch, calc(100vw - 96px));
        padding: 0 10px;
        font-size: 0.78rem;
        font-weight: 500;
        letter-spacing: 0.01em;
        line-height: 1.35;
        color: var(--overlay-caption-text);
        opacity: 0.95;
      }

      .overlay-card.loading img {
        opacity: 0;
      }

      .overlay-loading {
        position: absolute;
        inset: 0;
        display: none;
        place-items: center;
        align-content: center;
        gap: 10px;
        padding: 24px;
        min-width: 240px;
        text-align: center;
        color: var(--timeline-text-muted);
      }

      .overlay-loading.active {
        display: grid;
      }

      .overlay-loading .spinner {
        opacity: 1;
        transform: scale(1);
        animation: spin 0.8s linear infinite;
      }

      .overlay-loading.error .spinner {
        animation: none;
        opacity: 0.45;
      }

      .overlay-loading strong {
        color: var(--timeline-text);
        font-size: 0.92rem;
        font-weight: 600;
      }

      .close {
        background: var(--timeline-surface);
        color: var(--timeline-text);
      }

      .overlay-close {
        position: fixed;
        top: 16px;
        right: 16px;
        z-index: 1001;
        width: 40px;
        height: 40px;
        padding: 0;
        justify-content: center;
        background: var(--timeline-surface-soft);
        color: var(--timeline-text);
        border: 1px solid var(--timeline-border);
        box-shadow: var(--shadow-soft);
        backdrop-filter: blur(14px);
      }

      .overlay-close:hover {
        background: var(--timeline-surface-strong);
        border-color: var(--timeline-border-strong);
      }

      .overlay-download {
        position: fixed;
        top: 16px;
        right: 64px;
        z-index: 1001;
        width: 40px;
        height: 40px;
        padding: 0;
        justify-content: center;
        background: var(--timeline-surface-soft);
        color: var(--timeline-text);
        border: 1px solid var(--timeline-border);
        box-shadow: var(--shadow-soft);
        backdrop-filter: blur(14px);
        text-decoration: none;
      }

      .overlay-action {
        display: inline-flex;
        align-items: center;
      }

      .overlay-download:hover {
        background: var(--timeline-surface-strong);
        border-color: var(--timeline-border-strong);
      }

      .overlay-download[aria-disabled="true"] {
        opacity: 0.45;
        pointer-events: none;
      }

      .overlay-nav {
        position: fixed;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1001;
        width: 44px;
        height: 44px;
        padding: 0;
        justify-content: center;
        background: var(--timeline-surface-soft);
        color: var(--timeline-text);
        border: 1px solid var(--timeline-border);
        box-shadow: var(--shadow-soft);
        backdrop-filter: blur(14px);
      }

      .overlay-nav:hover {
        background: var(--timeline-surface-strong);
        border-color: var(--timeline-border-strong);
      }

      .overlay-prev {
        left: 16px;
      }

      .overlay-next {
        right: 16px;
      }

      .overlay-nav[disabled] {
        opacity: 0.45;
        cursor: default;
        pointer-events: none;
      }

      .thumb {
        width: min(210px, 100%);
        box-sizing: border-box;
        padding: 8px;
        display: grid;
        gap: 8px;
        background: var(--timeline-surface-soft);
        border: 1px solid var(--timeline-border);
        color: var(--timeline-text);
      }

      .thumb small {
        color: var(--timeline-text-muted);
      }

      .thumb img {
        width: 100%;
        aspect-ratio: 4 / 3;
        object-fit: cover;
        border-radius: 0;
      }

      .leaflet-popup-content-wrapper,
      .leaflet-popup-tip {
        background: var(--timeline-surface-strong);
        color: var(--timeline-text);
      }

      .leaflet-popup-content-wrapper {
        border-radius: 6px;
        overflow: hidden;
      }

      .leaflet-popup-content {
        margin: 14px 12px 12px;
        color: var(--timeline-text);
      }

      .leaflet-popup-content small {
        color: var(--timeline-text-muted);
      }

      .photo-map-marker {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        overflow: hidden;
        border: 2px solid var(--marker-border);
        box-shadow: var(--marker-shadow);
        background: var(--timeline-surface-strong);
      }

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

      .photo-map-marker.active {
        border-color: var(--marker-border-active);
        box-shadow: var(--marker-active-shadow);
      }

      .timeline {
        position: absolute;
        left: 8px;
        right: 8px;
        bottom: 6px;
        padding: 4px;
        display: grid;
        gap: 4px;
        z-index: 650;
        backdrop-filter: none;
        background: transparent;
        opacity: 1;
        border-color: var(--timeline-border);
        transition: height 180ms ease, transform 180ms ease, opacity 180ms ease, padding 180ms ease;
      }

      .timeline.timeline-collapsed {
        height: 40px;
        padding: 4px;
        overflow: hidden;
      }

      .timeline.timeline-collapsed .timeline-summary,
      .timeline.timeline-collapsed .timeline-chart,
      .timeline.timeline-collapsed .timeline-body {
        display: none;
      }

      .timeline-header h2 {
        margin: 0 0 4px;
        font-size: 0.84rem;
      }

      .timeline-summary {
        color: var(--timeline-text-muted);
        font-size: 0.72rem;
      }

      .timeline-body {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 4px;
        align-items: stretch;
      }

      .timeline-chart {
        position: relative;
        min-height: 64px;
        padding: 4px 6px 4px;
        border-radius: 0;
        border: 0;
        background: var(--timeline-surface);
        overflow: hidden;
        touch-action: none;
        user-select: none;
        box-shadow: none;
      }

      .timeline-chart.selecting {
        cursor: ew-resize;
      }

      .timeline-selection,
      .timeline-brush {
        position: absolute;
        top: 4px;
        bottom: 18px;
        left: 0;
        width: 0;
        opacity: 0;
        pointer-events: none;
        transition: opacity 120ms ease, background 120ms ease, border-color 120ms ease;
      }

      .timeline-selection {
        background: var(--timeline-selection-bg);
        border: 1px solid var(--timeline-selection-border);
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
        z-index: 0;
      }

      .timeline-selection.visible {
        opacity: 1;
      }

      .timeline-brush {
        background: var(--timeline-brush-bg);
        border: 1px solid var(--timeline-brush-border);
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 4px 12px rgba(15, 23, 42, 0.12);
        z-index: 2;
      }

      .timeline-brush.visible {
        opacity: 1;
      }

      .timeline-chart::before {
        content: none;
      }

      .timeline-bars {
        height: 36px;
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(8px, 1fr);
        align-items: end;
        gap: 0;
        position: relative;
        z-index: 1;
      }

      .timeline-bar {
        position: relative;
        height: 100%;
        display: grid;
        align-items: end;
        cursor: pointer;
        border-radius: 0;
        background: transparent;
        padding: 0;
        border: 0;
      }

      .timeline-bar-fill {
        width: 100%;
        border-radius: inherit;
        min-height: 3px;
        background: var(--timeline-bar-fill);
        border: 1px solid var(--timeline-bar-border);
        transition: transform 140ms ease, background 140ms ease, opacity 140ms ease, box-shadow 140ms ease;
        transform-origin: bottom;
        box-shadow: none;
        box-sizing: border-box;
      }

      .timeline-bar:hover .timeline-bar-fill,
      .timeline-bar.active .timeline-bar-fill {
        background: var(--timeline-bar-fill-hover);
      }

      .timeline-bar.selected .timeline-bar-fill {
        background: var(--timeline-bar-fill-selected);
        border-color: var(--timeline-border-strong);
        box-shadow: 0 0 0 1px var(--timeline-selection-border);
      }

      .timeline-bar.active .timeline-bar-fill {
        transform: translateY(-1px);
      }

      .timeline-bar.selected.active .timeline-bar-fill {
        background: var(--timeline-bar-fill-selected-active);
      }

      .timeline-bar-meta {
        position: absolute;
        left: 50%;
        bottom: -12px;
        transform: translateX(-50%);
        white-space: nowrap;
        font-size: 0.62rem;
        color: var(--timeline-axis-label);
        font-variant-numeric: tabular-nums;
        pointer-events: none;
      }

      .timeline-actions {
        display: flex;
        align-items: flex-start;
        gap: 4px;
        justify-content: flex-end;
        padding-top: 0;
      }

      .timeline-actions .panel-collapse {
        width: 28px;
        min-width: 28px;
        height: 28px;
        padding: 0;
        justify-content: center;
        background: var(--timeline-surface-soft);
        color: var(--timeline-text);
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
        border: 1px solid var(--timeline-border);
      }

      @media (max-width: 920px) {
        body {
          height: auto;
          min-height: 100dvh;
          overflow: auto;
        }

        aside {
          position: static;
          width: auto;
          margin: 12px;
          bottom: auto;
          right: auto;
          top: auto;
          overflow: visible;
        }

        .theme-toggle {
          top: 12px;
          right: 12px;
        }

        .top-right-controls {
          top: 12px;
          right: 12px;
        }

        .list {
          max-height: min(52vh, 420px);
          --photo-thumb-size: 64px;
          gap: 4px;
        }

        main {
          position: static;
          inset: auto;
          min-height: 60vh;
        }

        #map {
          min-height: 60vh;
        }

        .timeline {
          position: static;
          left: auto;
          right: auto;
          bottom: auto;
          margin: 0 12px 12px;
        }
      }
`;
