/*
 * Spacetime Lux v7
 * Final product layer for the Timeline and Location workspaces.
 */

body.expert-ui-ready .timeline-overlay,
body.expert-ui-ready .mapv.location-lab {
  --lux-bg: #080a0d;
  --lux-bg-raised: #0d1116;
  --lux-panel: rgba(14, 18, 24, .94);
  --lux-panel-soft: rgba(18, 23, 30, .82);
  --lux-line: rgba(207, 216, 226, .12);
  --lux-line-strong: rgba(207, 216, 226, .2);
  --lux-ivory: #f4f1e8;
  --lux-text: #e9edf2;
  --lux-muted: #9ca7b5;
  --lux-gold: #caa85f;
  --lux-gold-soft: rgba(202, 168, 95, .16);
  --lux-teal: #6fc8b1;
  --lux-teal-soft: rgba(111, 200, 177, .14);
  --lux-blue: #88a5c7;
  --lux-rust: #b4745c;
  color: var(--lux-text) !important;
  font-family: "DM Sans", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  letter-spacing: 0 !important;
  text-rendering: optimizeLegibility;
}

body.expert-ui-ready .timeline-overlay *,
body.expert-ui-ready .mapv.location-lab * {
  letter-spacing: 0 !important;
}

body.expert-ui-ready .timeline-overlay button,
body.expert-ui-ready .timeline-overlay input,
body.expert-ui-ready .mapv.location-lab button,
body.expert-ui-ready .mapv.location-lab input,
body.expert-ui-ready .mapv.location-lab select {
  font: inherit;
}

/* Timeline: precision chronology instrument. */
body.expert-ui-ready .timeline-overlay {
  overflow: hidden !important;
  border: 1px solid var(--lux-line-strong) !important;
  border-radius: 8px !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .018), transparent 18%),
    var(--lux-bg) !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .34) !important;
}

body.expert-ui-ready .timeline-overlay .tl-head {
  z-index: 8 !important;
  border: 0 !important;
  border-bottom: 1px solid var(--lux-line) !important;
  border-radius: 0 !important;
  background: rgba(11, 14, 18, .96) !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .16) !important;
  backdrop-filter: blur(22px) saturate(1.12) !important;
}

body.expert-ui-ready .timeline-overlay .tl-title-wrap {
  min-width: 0 !important;
  align-self: center !important;
}

body.expert-ui-ready .timeline-overlay .tl-kicker,
body.expert-ui-ready .timeline-overlay .tl-filter-kicker,
body.expert-ui-ready .timeline-overlay .tl-group-label,
body.expert-ui-ready .timeline-overlay .tl-panel-note {
  color: var(--lux-gold) !important;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace !important;
  font-size: .55rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
}

body.expert-ui-ready .timeline-overlay .tl-title-wrap h2 {
  margin: 2px 0 !important;
  color: var(--lux-ivory) !important;
  font-size: 1.34rem !important;
  font-weight: 750 !important;
  line-height: 1.05 !important;
}

body.expert-ui-ready .timeline-overlay .tl-sub {
  color: var(--lux-muted) !important;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace !important;
  font-size: .56rem !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
}

body.expert-ui-ready .timeline-overlay .tl-toolbar,
body.expert-ui-ready .timeline-overlay .tl-toolbar-main,
body.expert-ui-ready .timeline-overlay .tl-toolbar-meta {
  min-width: 0 !important;
}

body.expert-ui-ready .timeline-overlay .tl-searchbox input {
  min-height: 40px !important;
  padding: 0 14px !important;
  border: 1px solid var(--lux-line-strong) !important;
  border-radius: 8px !important;
  outline: 0 !important;
  background: rgba(4, 6, 8, .78) !important;
  color: var(--lux-ivory) !important;
  font-size: .78rem !important;
  font-weight: 650 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025) !important;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease !important;
}

body.expert-ui-ready .timeline-overlay .tl-searchbox input:focus {
  border-color: rgba(111, 200, 177, .58) !important;
  background: rgba(5, 9, 11, .96) !important;
  box-shadow: 0 0 0 3px rgba(111, 200, 177, .1) !important;
}

body.expert-ui-ready .timeline-overlay .tl-searchbox input::placeholder {
  color: #7f8da0 !important;
}

body.expert-ui-ready .timeline-overlay .tl-plus-btn,
body.expert-ui-ready .timeline-overlay .tl-context-btn,
body.expert-ui-ready .timeline-overlay .tl-inline-btn,
body.expert-ui-ready .timeline-overlay .tl-shell-btn,
body.expert-ui-ready .timeline-overlay .tl-close,
body.expert-ui-ready .timeline-overlay .tl-stage-btn,
body.expert-ui-ready .timeline-overlay .tl-evidence-btn {
  border: 1px solid var(--lux-line-strong) !important;
  border-radius: 8px !important;
  background: rgba(21, 26, 33, .86) !important;
  color: var(--lux-text) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035) !important;
  transition: transform .16s ease, border-color .16s ease, background .16s ease !important;
}

body.expert-ui-ready .timeline-overlay :is(.tl-plus-btn, .tl-context-btn, .tl-inline-btn, .tl-shell-btn, .tl-close, .tl-stage-btn, .tl-evidence-btn):hover {
  transform: translateY(-1px) !important;
  border-color: rgba(202, 168, 95, .52) !important;
  background: rgba(202, 168, 95, .12) !important;
}

body.expert-ui-ready .timeline-overlay .tl-plus-btn {
  border-color: rgba(111, 200, 177, .42) !important;
  background: var(--lux-teal-soft) !important;
}

body.expert-ui-ready .timeline-overlay .tl-plus-btn b {
  color: var(--lux-teal) !important;
}

body.expert-ui-ready .timeline-overlay .tl-context-btn {
  display: none !important;
}

body.expert-ui-ready .timeline-overlay .tl-inline-btn#tlContextJump,
body.expert-ui-ready .timeline-overlay .tl-stage-btn.cinema {
  border-color: rgba(202, 168, 95, .46) !important;
  background: var(--lux-gold-soft) !important;
  color: #fff4d7 !important;
}

body.expert-ui-ready .timeline-overlay .tl-mini-note,
body.expert-ui-ready .timeline-overlay .tl-stage-pill,
body.expert-ui-ready .timeline-overlay .tl-badge {
  min-height: 26px !important;
  border: 1px solid var(--lux-line) !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, .025) !important;
  color: var(--lux-muted) !important;
}

body.expert-ui-ready .timeline-overlay .tl-mini-note strong,
body.expert-ui-ready .timeline-overlay .tl-stage-pill:first-child {
  color: #f4ddb0 !important;
}

body.expert-ui-ready .timeline-overlay .tl-quick-presets {
  min-width: 0 !important;
  gap: 5px !important;
}

body.expert-ui-ready .timeline-overlay .tl-quick-preset {
  min-width: 84px !important;
  min-height: 40px !important;
  padding: 6px 10px !important;
  border: 1px solid var(--lux-line) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, .024) !important;
  color: var(--lux-muted) !important;
  box-shadow: none !important;
}

body.expert-ui-ready .timeline-overlay .tl-quick-preset strong {
  color: var(--lux-text) !important;
  font-size: .66rem !important;
}

body.expert-ui-ready .timeline-overlay .tl-quick-preset small {
  color: #7f8b9b !important;
  font-size: .5rem !important;
}

body.expert-ui-ready .timeline-overlay .tl-quick-preset:hover,
body.expert-ui-ready .timeline-overlay .tl-quick-preset.act {
  border-color: rgba(202, 168, 95, .48) !important;
  background: var(--lux-gold-soft) !important;
}

body.expert-ui-ready .timeline-overlay .tl-main {
  background:
    linear-gradient(90deg, rgba(111, 200, 177, .025) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(0deg, rgba(255, 255, 255, .018) 1px, transparent 1px) 0 0 / 44px 44px,
    #080b0f !important;
}

body.expert-ui-ready .timeline-overlay .tl-stage-shell,
body.expert-ui-ready .timeline-overlay .tl-sidebar-shell,
body.expert-ui-ready .timeline-overlay .tl-inspector .tli-shell,
body.expert-ui-ready .timeline-overlay .tl-focus-dock,
body.expert-ui-ready .timeline-overlay .tl-atlas,
body.expert-ui-ready .timeline-overlay .tl-ribbon,
body.expert-ui-ready .timeline-overlay .tl-scene-strip {
  border: 1px solid var(--lux-line) !important;
  border-radius: 8px !important;
  background: rgba(8, 12, 16, .9) !important;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .2) !important;
}

body.expert-ui-ready .timeline-overlay .tl-stage-meta {
  border: 0 !important;
  border-bottom: 1px solid var(--lux-line) !important;
  border-radius: 0 !important;
  background: rgba(11, 15, 20, .96) !important;
}

body.expert-ui-ready .timeline-overlay .tl-context-rail {
  scrollbar-width: thin;
  scrollbar-color: rgba(202, 168, 95, .34) transparent;
}

body.expert-ui-ready .timeline-overlay .tl-context-chip {
  min-width: 190px !important;
  border: 1px solid var(--lux-line) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, .022) !important;
  box-shadow: none !important;
}

body.expert-ui-ready .timeline-overlay .tl-context-chip:hover {
  border-color: rgba(111, 200, 177, .44) !important;
  background: var(--lux-teal-soft) !important;
}

body.expert-ui-ready .timeline-overlay .tl-context-chip span {
  color: var(--lux-gold) !important;
}

body.expert-ui-ready .timeline-overlay .tl-context-chip strong {
  color: var(--lux-ivory) !important;
}

body.expert-ui-ready .timeline-overlay .tl-user-context-panel {
  border: 1px solid var(--lux-line) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, .022) !important;
  box-shadow: none !important;
}

body.expert-ui-ready .timeline-overlay .tl-user-context-panel span,
body.expert-ui-ready .timeline-overlay .tl-user-context-panel strong {
  color: var(--lux-text) !important;
}

body.expert-ui-ready .timeline-overlay .tl-context-meter {
  overflow: hidden !important;
  border: 1px solid var(--lux-line) !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, .04) !important;
}

body.expert-ui-ready .timeline-overlay .tl-context-meter i {
  background: linear-gradient(90deg, var(--lux-teal), var(--lux-gold)) !important;
  box-shadow: none !important;
}

body.expert-ui-ready .timeline-overlay .tl-epoch-strip {
  gap: 6px !important;
}

body.expert-ui-ready .timeline-overlay .tl-epoch-bar {
  border: 1px solid var(--lux-line) !important;
  border-radius: 6px !important;
  background: rgba(255, 255, 255, .02) !important;
}

body.expert-ui-ready .timeline-overlay .tl-stage,
body.expert-ui-ready .timeline-overlay .tl-canvas-wrap {
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 0 0 8px 8px !important;
  background: #071017 !important;
}

body.expert-ui-ready .timeline-overlay .tl-tip {
  border: 1px solid var(--lux-line-strong) !important;
  border-radius: 8px !important;
  background: rgba(9, 12, 16, .96) !important;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .42) !important;
}

/* Timeline: embedded desktop. */
@media (min-width: 901px) {
  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay {
    grid-template-rows: 148px minmax(0, 1fr) !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-head {
    display: grid !important;
    height: 148px !important;
    min-height: 148px !important;
    max-height: 148px !important;
    grid-template-columns: 220px minmax(0, 1fr) auto !important;
    grid-template-areas: "title controls actions" !important;
    gap: 12px !important;
    padding: 10px 12px !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-title-block {
    grid-area: title !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-controls {
    grid-area: controls !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-head-actions {
    grid-area: actions !important;
    align-self: start !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-toolbar {
    display: grid !important;
    grid-template-rows: 42px 56px !important;
    gap: 8px !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-toolbar-main {
    display: grid !important;
    grid-template-columns: minmax(240px, 1fr) auto !important;
    gap: 7px !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-toolbar-actions {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-plus-btn {
    width: 42px !important;
    min-width: 42px !important;
    height: 40px !important;
    padding: 0 !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-plus-btn span,
  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-plus-btn small {
    display: none !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-toolbar-meta {
    display: grid !important;
    grid-template-columns: max-content max-content minmax(360px, 1fr) !important;
    align-items: center !important;
    gap: 7px !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-quick-presets {
    display: flex !important;
    justify-content: flex-end !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-main {
    padding: 8px !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay :is(.tl-ribbon, .tl-atlas, .tl-sidebar, .tl-inspector, .tl-focus-dock, .tl-scene-strip) {
    display: none !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-workbench {
    display: grid !important;
    height: 100% !important;
    min-height: 0 !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, 1fr) !important;
    gap: 0 !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-shell {
    display: grid !important;
    height: 100% !important;
    min-height: 0 !important;
    grid-template-rows: 142px minmax(0, 1fr) !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-meta {
    display: grid !important;
    height: 142px !important;
    max-height: 142px !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-areas:
      "context actions"
      "depth depth"
      "epoch epoch" !important;
    grid-template-rows: 50px 38px 28px !important;
    gap: 6px 10px !important;
    padding: 8px 10px !important;
    overflow: hidden !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-badges,
  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-copy {
    display: none !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-context-rail {
    grid-area: context !important;
    display: flex !important;
    gap: 6px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-actions {
    grid-area: actions !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 5px !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-user-context-panel {
    grid-area: depth !important;
    display: grid !important;
    min-height: 38px !important;
    grid-template-columns: max-content minmax(160px, 1fr) auto !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 5px 8px !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-user-context-panel > div:first-child {
    display: flex !important;
    align-items: center !important;
    gap: 7px !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-user-context-panel p {
    display: none !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-epoch-strip {
    grid-area: epoch !important;
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)) !important;
  }
}

@media (min-width: 721px) {
  body.expert-ui-ready .mapv.location-lab .maprail {
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
  }

  body.expert-ui-ready .mapv.location-lab #MAPDETAILS {
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  body.expert-ui-ready .mapv.location-lab .mapatlas-head p {
    display: -webkit-box !important;
    overflow: hidden !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
}

/* Timeline: full-screen research cockpit. */
body.expert-ui-ready .timeline-overlay:is(:fullscreen, .pseudo-fullscreen) {
  width: 100vw !important;
  height: 100dvh !important;
  max-height: none !important;
  grid-template-rows: 84px minmax(0, 1fr) !important;
  border: 0 !important;
  border-radius: 0 !important;
}

body.expert-ui-ready .timeline-overlay:is(:fullscreen, .pseudo-fullscreen) .tl-head {
  display: grid !important;
  height: 84px !important;
  min-height: 84px !important;
  grid-template-columns: 168px minmax(0, 1fr) auto !important;
  grid-template-areas: "title controls actions" !important;
  gap: 12px !important;
  padding: 10px 12px !important;
}

body.expert-ui-ready .timeline-overlay:is(:fullscreen, .pseudo-fullscreen) .tl-title-block {
  display: block !important;
  grid-area: title !important;
}

body.expert-ui-ready .timeline-overlay:is(:fullscreen, .pseudo-fullscreen) .tl-controls {
  grid-area: controls !important;
}

body.expert-ui-ready .timeline-overlay:is(:fullscreen, .pseudo-fullscreen) .tl-head-actions {
  grid-area: actions !important;
}

body.expert-ui-ready .timeline-overlay:is(:fullscreen, .pseudo-fullscreen) .tl-toolbar {
  display: grid !important;
  grid-template-rows: 40px 24px !important;
  gap: 5px !important;
}

body.expert-ui-ready .timeline-overlay:is(:fullscreen, .pseudo-fullscreen) .tl-toolbar-main {
  display: grid !important;
  grid-template-columns: minmax(320px, 1fr) auto !important;
  gap: 7px !important;
}

body.expert-ui-ready .timeline-overlay:is(:fullscreen, .pseudo-fullscreen) .tl-plus-btn {
  min-width: 126px !important;
  height: 40px !important;
}

body.expert-ui-ready .timeline-overlay:is(:fullscreen, .pseudo-fullscreen) .tl-plus-btn small {
  display: none !important;
}

body.expert-ui-ready .timeline-overlay:is(:fullscreen, .pseudo-fullscreen) .tl-toolbar-meta {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  overflow: hidden !important;
}

body.expert-ui-ready .timeline-overlay:is(:fullscreen, .pseudo-fullscreen) .tl-quick-presets {
  margin-left: auto !important;
}

body.expert-ui-ready .timeline-overlay:is(:fullscreen, .pseudo-fullscreen) .tl-quick-preset {
  min-width: 72px !important;
  min-height: 26px !important;
  padding: 3px 8px !important;
}

body.expert-ui-ready .timeline-overlay:is(:fullscreen, .pseudo-fullscreen) .tl-quick-preset small {
  display: none !important;
}

body.expert-ui-ready .timeline-overlay:is(:fullscreen, .pseudo-fullscreen) .tl-main {
  padding: 10px !important;
}

body.expert-ui-ready .timeline-overlay:is(:fullscreen, .pseudo-fullscreen) .tl-workbench {
  grid-template-columns: 150px minmax(0, 1fr) 260px !important;
  gap: 10px !important;
}

body.expert-ui-ready .timeline-overlay:is(:fullscreen, .pseudo-fullscreen) .tl-stage-shell {
  grid-template-rows: 126px minmax(0, 1fr) 84px !important;
}

body.expert-ui-ready .timeline-overlay:is(:fullscreen, .pseudo-fullscreen) .tl-stage-meta {
  max-height: 126px !important;
  padding: 8px 10px !important;
}

body.expert-ui-ready .timeline-overlay:is(:fullscreen, .pseudo-fullscreen) .tl-panel,
body.expert-ui-ready .timeline-overlay:is(:fullscreen, .pseudo-fullscreen) .tli-card,
body.expert-ui-ready .timeline-overlay:is(:fullscreen, .pseudo-fullscreen) .tl-focus-source,
body.expert-ui-ready .timeline-overlay:is(:fullscreen, .pseudo-fullscreen) .tl-focus-record,
body.expert-ui-ready .timeline-overlay:is(:fullscreen, .pseudo-fullscreen) .tl-focus-topic {
  border-radius: 8px !important;
  border-color: var(--lux-line) !important;
  background: rgba(255, 255, 255, .024) !important;
  box-shadow: none !important;
}

/* Location: quiet, map-first atlas. */
body.expert-ui-ready .mapv.location-lab {
  overflow: hidden !important;
  border: 1px solid var(--lux-line-strong) !important;
  border-radius: 8px !important;
  background: var(--lux-bg) !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .34) !important;
}

body.expert-ui-ready .mapv.location-lab .maplayout {
  inset: 10px !important;
  height: auto !important;
  min-height: 0 !important;
  grid-template-columns: minmax(0, 1fr) 340px !important;
  gap: 10px !important;
}

body.expert-ui-ready .mapv.location-lab .mapstage,
body.expert-ui-ready .mapv.location-lab .maprail {
  min-width: 0 !important;
  min-height: 0 !important;
  border: 1px solid var(--lux-line-strong) !important;
  border-radius: 8px !important;
  background: #080c11 !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .26), inset 0 1px 0 rgba(255, 255, 255, .025) !important;
}

body.expert-ui-ready .mapv.location-lab .mapstage {
  height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

body.expert-ui-ready .mapv.location-lab #MAP {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  background: #090d12 !important;
}

body.expert-ui-ready .mapv.location-lab .leaflet-tile {
  filter: saturate(.72) contrast(1.08) brightness(.76) !important;
}

body.expert-ui-ready .mapv.location-lab .leaflet-control-layers,
body.expert-ui-ready .mapv.location-lab .leaflet-bar a,
body.expert-ui-ready .mapv.location-lab .leaflet-control-scale-line {
  border-color: var(--lux-line-strong) !important;
  border-radius: 7px !important;
  background: rgba(10, 14, 19, .9) !important;
  color: var(--lux-ivory) !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .3) !important;
  backdrop-filter: blur(16px) !important;
}

body.expert-ui-ready .mapv.location-lab .mapstage-workbar {
  z-index: 900 !important;
  top: 12px !important;
  right: 12px !important;
  left: 12px !important;
  display: grid !important;
  grid-template-columns: minmax(270px, .62fr) minmax(0, 1fr) !important;
  gap: 8px !important;
  padding: 8px !important;
  overflow: visible !important;
  border: 1px solid rgba(207, 216, 226, .18) !important;
  border-radius: 8px !important;
  background: rgba(9, 13, 18, .88) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .3) !important;
  backdrop-filter: blur(22px) saturate(1.08) !important;
}

body.expert-ui-ready .mapv.location-lab .mapwork-search,
body.expert-ui-ready .mapv.location-lab .mapwork-actions {
  min-width: 0 !important;
  border: 0 !important;
  border-radius: 6px !important;
  background: rgba(255, 255, 255, .024) !important;
  box-shadow: none !important;
}

body.expert-ui-ready .mapv.location-lab .mapwork-search {
  min-height: 40px !important;
}

body.expert-ui-ready .mapv.location-lab .mapwork-search label,
body.expert-ui-ready .mapv.location-lab .mapwork-group-label,
body.expert-ui-ready .mapv.location-lab .modebrief-kicker,
body.expert-ui-ready .mapv.location-lab .mapchaptertool > label,
body.expert-ui-ready .mapv.location-lab .maptitle {
  color: var(--lux-gold) !important;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace !important;
  font-size: .52rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
}

body.expert-ui-ready .mapv.location-lab .mapwork-search input,
body.expert-ui-ready .mapv.location-lab .mapsearch-inline input,
body.expert-ui-ready .mapv.location-lab .mapchapterrow select {
  min-height: 36px !important;
  border: 1px solid var(--lux-line) !important;
  border-radius: 7px !important;
  outline: 0 !important;
  background: rgba(4, 6, 8, .78) !important;
  color: var(--lux-ivory) !important;
  box-shadow: none !important;
}

body.expert-ui-ready .mapv.location-lab :is(.mapwork-search input, .mapsearch-inline input, .mapchapterrow select):focus {
  border-color: rgba(111, 200, 177, .58) !important;
  box-shadow: 0 0 0 3px rgba(111, 200, 177, .09) !important;
}

body.expert-ui-ready .mapv.location-lab .mapwork-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 6px !important;
  padding: 4px !important;
}

body.expert-ui-ready .mapv.location-lab .mapwork-group {
  display: inline-flex !important;
  flex: 0 0 auto !important;
  flex-wrap: nowrap !important;
  gap: 3px !important;
  padding: 3px !important;
  border: 1px solid var(--lux-line) !important;
  border-radius: 7px !important;
  background: rgba(0, 0, 0, .22) !important;
}

body.expert-ui-ready .mapv.location-lab .mapwork-group-label {
  align-self: center !important;
  padding: 0 4px !important;
  color: #768293 !important;
}

body.expert-ui-ready .mapv.location-lab .mapwork-actions button,
body.expert-ui-ready .mapv.location-lab .mapdensity-row button,
body.expert-ui-ready .mapv.location-lab .mapsearch-inline button,
body.expert-ui-ready .mapv.location-lab .mapchapterrow button,
body.expert-ui-ready .mapv.location-lab .modechrome-btn,
body.expert-ui-ready .mapv.location-lab .modebrief-btn,
body.expert-ui-ready .mapv.location-lab .mapstage-hud .actions button {
  min-height: 32px !important;
  padding: 0 10px !important;
  border: 1px solid var(--lux-line) !important;
  border-radius: 7px !important;
  background: rgba(20, 25, 32, .88) !important;
  color: var(--lux-text) !important;
  font-size: .6rem !important;
  font-weight: 700 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03) !important;
  white-space: nowrap !important;
  transition: transform .16s ease, border-color .16s ease, background .16s ease !important;
}

body.expert-ui-ready .mapv.location-lab :is(.mapwork-actions button, .mapdensity-row button, .mapsearch-inline button, .mapchapterrow button, .modechrome-btn, .modebrief-btn, .mapstage-hud .actions button):hover {
  transform: translateY(-1px) !important;
  border-color: rgba(202, 168, 95, .5) !important;
  background: var(--lux-gold-soft) !important;
}

body.expert-ui-ready .mapv.location-lab :is(.mapwork-actions button.act, .mapdensity-row button.act) {
  border-color: rgba(111, 200, 177, .5) !important;
  background: var(--lux-teal-soft) !important;
  color: #eafff9 !important;
}

body.expert-ui-ready .mapv.location-lab .mapwork-primary {
  border-color: rgba(202, 168, 95, .42) !important;
  background: var(--lux-gold-soft) !important;
  color: #fff2cf !important;
}

body.expert-ui-ready .mapv.location-lab .mapstage-hud {
  z-index: 850 !important;
  left: 14px !important;
  bottom: 14px !important;
  display: block !important;
  width: min(390px, calc(100% - 28px)) !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: 164px !important;
  padding: 12px !important;
  overflow: hidden !important;
  border: 1px solid rgba(202, 168, 95, .3) !important;
  border-radius: 8px !important;
  background: rgba(9, 13, 18, .92) !important;
  box-shadow: 0 18px 46px rgba(0, 0, 0, .38) !important;
  backdrop-filter: blur(22px) saturate(1.08) !important;
}

body.expert-ui-ready .mapv.location-lab .mapstage-hud .k {
  color: var(--lux-gold) !important;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace !important;
  font-size: .52rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
}

body.expert-ui-ready .mapv.location-lab .mapstage-hud strong {
  display: -webkit-box !important;
  margin: 3px 0 !important;
  overflow: hidden !important;
  color: var(--lux-ivory) !important;
  font-size: .98rem !important;
  font-weight: 750 !important;
  line-height: 1.12 !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

body.expert-ui-ready .mapv.location-lab .mapstage-hud p {
  display: -webkit-box !important;
  margin: 0 !important;
  overflow: hidden !important;
  color: var(--lux-muted) !important;
  font-size: .64rem !important;
  line-height: 1.35 !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

body.expert-ui-ready .mapv.location-lab .mapstage-hud .meta,
body.expert-ui-ready .mapv.location-lab .mapstage-hud .actions {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 5px !important;
  margin-top: 7px !important;
}

body.expert-ui-ready .mapv.location-lab .mapstage-hud .meta {
  overflow: hidden !important;
}

body.expert-ui-ready .mapv.location-lab .mapstage-hud .meta span {
  flex: 0 1 auto !important;
  min-width: 0 !important;
  padding: 3px 6px !important;
  overflow: hidden !important;
  border: 1px solid var(--lux-line) !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, .025) !important;
  color: #aeb8c5 !important;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace !important;
  font-size: .48rem !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.expert-ui-ready .mapv.location-lab .maplegend {
  right: 14px !important;
  bottom: 14px !important;
  gap: 10px !important;
  padding: 7px 10px !important;
  border: 1px solid var(--lux-line) !important;
  border-radius: 8px !important;
  background: rgba(9, 13, 18, .84) !important;
  color: var(--lux-muted) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .28) !important;
  backdrop-filter: blur(16px) !important;
}

body.expert-ui-ready .mapv.location-lab .maprail {
  height: 100% !important;
  padding: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  scrollbar-width: thin;
  scrollbar-color: rgba(202, 168, 95, .35) transparent;
}

body.expert-ui-ready .mapv.location-lab .maphud,
body.expert-ui-ready .mapv.location-lab .mapbrief {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.expert-ui-ready .mapv.location-lab .modechrome-head {
  gap: 9px !important;
  padding: 14px !important;
  border-bottom: 1px solid var(--lux-line) !important;
  background: rgba(13, 17, 22, .94) !important;
}

body.expert-ui-ready .mapv.location-lab .modechrome-title {
  color: var(--lux-ivory) !important;
  font-size: 1.02rem !important;
  font-weight: 750 !important;
  line-height: 1.12 !important;
}

body.expert-ui-ready .mapv.location-lab .modechrome-text {
  display: none !important;
}

body.expert-ui-ready .mapv.location-lab .modechrome-actions {
  gap: 5px !important;
}

body.expert-ui-ready .mapv.location-lab .modechrome-btn {
  min-height: 30px !important;
  padding: 0 8px !important;
  font-size: .56rem !important;
}

body.expert-ui-ready .mapv.location-lab .mapstats,
body.expert-ui-ready .mapv.location-lab .mapatlas-metrics {
  gap: 6px !important;
  padding: 10px 12px 0 !important;
}

body.expert-ui-ready .mapv.location-lab .mapstat,
body.expert-ui-ready .mapv.location-lab .mapatlas-metric,
body.expert-ui-ready .mapv.location-lab .modebrief-card,
body.expert-ui-ready .mapv.location-lab .mapfocus-card,
body.expert-ui-ready .mapv.location-lab .mapchaptertool {
  border: 1px solid var(--lux-line) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, .024) !important;
  box-shadow: none !important;
}

body.expert-ui-ready .mapv.location-lab .mapstat {
  min-height: 54px !important;
  padding: 9px !important;
}

body.expert-ui-ready .mapv.location-lab .mapstat strong,
body.expert-ui-ready .mapv.location-lab .mapatlas-metric strong {
  color: var(--lux-ivory) !important;
  font-size: .78rem !important;
  font-weight: 750 !important;
}

body.expert-ui-ready .mapv.location-lab .mapstat span,
body.expert-ui-ready .mapv.location-lab .mapatlas-metric span {
  color: #788596 !important;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace !important;
  font-size: .46rem !important;
  text-transform: uppercase !important;
}

body.expert-ui-ready .mapv.location-lab .mapchaptertool {
  margin: 10px 12px 0 !important;
  padding: 10px !important;
}

body.expert-ui-ready .mapv.location-lab #MAPTXT,
body.expert-ui-ready .mapv.location-lab .mapsource {
  margin: 10px 12px 0 !important;
  padding: 9px 10px !important;
  border: 1px solid var(--lux-line) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, .018) !important;
  color: var(--lux-muted) !important;
  font-size: .62rem !important;
  line-height: 1.35 !important;
}

body.expert-ui-ready .mapv.location-lab .mapsource {
  color: #7f8b99 !important;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace !important;
  font-size: .5rem !important;
}

body.expert-ui-ready .mapv.location-lab #MAPDETAILS {
  display: grid !important;
  gap: 8px !important;
  padding: 10px 12px 14px !important;
}

body.expert-ui-ready .mapv.location-lab .mapatlas-head {
  padding: 12px !important;
  border: 1px solid var(--lux-line) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, .024) !important;
}

body.expert-ui-ready .mapv.location-lab .mapatlas-head h3,
body.expert-ui-ready .mapv.location-lab .mapfocus-card h4,
body.expert-ui-ready .mapv.location-lab .mapplace-card strong {
  color: var(--lux-ivory) !important;
  font-weight: 750 !important;
}

body.expert-ui-ready .mapv.location-lab .mapatlas-head p,
body.expert-ui-ready .mapv.location-lab .mapfocus-card p,
body.expert-ui-ready .mapv.location-lab .modebrief-card p,
body.expert-ui-ready .mapv.location-lab .mapplace-card small,
body.expert-ui-ready .mapv.location-lab .mapplace-card b {
  color: var(--lux-muted) !important;
}

body.expert-ui-ready .mapv.location-lab .mapinspector-tools {
  top: -1px !important;
  padding: 8px !important;
  border: 1px solid var(--lux-line) !important;
  border-radius: 8px !important;
  background: rgba(10, 14, 19, .94) !important;
  backdrop-filter: blur(16px) !important;
}

body.expert-ui-ready .mapv.location-lab .mapplace-list {
  gap: 5px !important;
}

body.expert-ui-ready .mapv.location-lab .mapplace-card {
  min-height: 58px !important;
  grid-template-columns: 28px minmax(0, 1fr) auto !important;
  gap: 8px !important;
  padding: 8px !important;
  border: 1px solid var(--lux-line) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, .018) !important;
  box-shadow: none !important;
}

body.expert-ui-ready .mapv.location-lab .mapplace-card:hover,
body.expert-ui-ready .mapv.location-lab .mapplace-card.active {
  transform: translateY(-1px) !important;
  border-color: rgba(111, 200, 177, .46) !important;
  background: var(--lux-teal-soft) !important;
}

body.expert-ui-ready .mapv.location-lab .mapplace-card .num,
body.expert-ui-ready .mapv.location-lab .maptrail-chip {
  border-color: rgba(111, 200, 177, .28) !important;
  border-radius: 7px !important;
  background: var(--lux-teal-soft) !important;
  color: #e6fff8 !important;
}

body.expert-ui-ready .mapv.location-lab .modebrief-link {
  border: 1px solid var(--lux-line) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, .018) !important;
}

/* Quiet map geometry: the active feature carries the emphasis. */
body.expert-ui-ready .mapv.location-lab .baibel-map-shape {
  fill-opacity: .07 !important;
  stroke-opacity: .32 !important;
  stroke-width: 1.2 !important;
}

body.expert-ui-ready .mapv.location-lab .baibel-map-route {
  stroke-opacity: .58 !important;
  stroke-width: 2 !important;
  stroke-dasharray: 7 8 !important;
  animation-duration: 4.6s !important;
}

body.expert-ui-ready .mapv.location-lab .baibel-map-shape.is-active {
  fill-opacity: .16 !important;
  stroke-opacity: .92 !important;
  filter: drop-shadow(0 0 7px rgba(111, 200, 177, .34)) !important;
}

body.expert-ui-ready .mapv.location-lab .baibel-map-route.is-active {
  stroke-opacity: 1 !important;
  filter: drop-shadow(0 0 7px rgba(202, 168, 95, .42)) !important;
}

body.expert-ui-ready .mapv.location-lab .baibel-map-marker span {
  width: 12px !important;
  height: 12px !important;
  border-radius: 4px 4px 4px 0 !important;
  background: linear-gradient(135deg, var(--lux-gold), #e7d39f) !important;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .48), 0 0 0 3px rgba(202, 168, 95, .1) !important;
}

body.expert-ui-ready .mapv.location-lab .baibel-map-marker.is-active span {
  width: 15px !important;
  height: 15px !important;
  background: linear-gradient(135deg, #f9edc7, var(--lux-teal)) !important;
  box-shadow: 0 10px 22px rgba(0, 0, 0, .5), 0 0 0 6px rgba(111, 200, 177, .14) !important;
}

body.expert-ui-ready .mapv.location-lab .baibel-map-tooltip {
  border: 1px solid var(--lux-line-strong) !important;
  border-radius: 8px !important;
  background: rgba(9, 13, 18, .96) !important;
  color: var(--lux-ivory) !important;
  box-shadow: 0 16px 38px rgba(0, 0, 0, .36) !important;
}

/* Location: full-screen layout and HUD repair. */
body.expert-ui-ready .mapv.location-lab:is(:fullscreen, .pseudo-fullscreen) {
  width: 100vw !important;
  height: 100dvh !important;
  max-height: none !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 0 !important;
}

body.expert-ui-ready .mapv.location-lab:is(:fullscreen, .pseudo-fullscreen) .maplayout {
  inset: 10px !important;
  display: grid !important;
  height: auto !important;
  grid-template-columns: minmax(0, 1fr) 350px !important;
  grid-template-rows: minmax(0, 1fr) !important;
  gap: 10px !important;
  overflow: hidden !important;
}

body.expert-ui-ready .mapv.location-lab:is(:fullscreen, .pseudo-fullscreen) .mapstage,
body.expert-ui-ready .mapv.location-lab:is(:fullscreen, .pseudo-fullscreen) #MAP,
body.expert-ui-ready .mapv.location-lab:is(:fullscreen, .pseudo-fullscreen) .maprail {
  width: auto !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
}

body.expert-ui-ready .mapv.location-lab:is(:fullscreen, .pseudo-fullscreen) .mapstage-hud {
  position: absolute !important;
  inset: auto auto 14px 14px !important;
  display: block !important;
  width: min(390px, calc(100% - 28px)) !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: 164px !important;
  margin: 0 !important;
  padding: 12px !important;
}

body.expert-ui-ready .mapv.location-lab:is(:fullscreen, .pseudo-fullscreen) .mapstage-hud > * {
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
}

body.expert-ui-ready .mapv.location-lab:is(:fullscreen, .pseudo-fullscreen) > :is(.fullscreen-legend, .reader-shell-jump) {
  display: none !important;
}

/* Tablet and narrow desktop. */
@media (max-width: 1180px) and (min-width: 721px) {
  body.expert-ui-ready .mapv.location-lab .maplayout {
    grid-template-columns: minmax(0, 1fr) 320px !important;
  }

  body.expert-ui-ready .mapv.location-lab .mapstage-workbar {
    grid-template-columns: 1fr !important;
  }

  body.expert-ui-ready .mapv.location-lab .mapwork-actions {
    justify-content: flex-start !important;
    overflow-x: auto !important;
  }
}

/* Mobile: complete controls, no clipped timeline, deliberate vertical flow. */
@media (max-width: 720px) {
  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay {
    grid-template-rows: 194px minmax(0, 1fr) !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-head {
    display: grid !important;
    height: 194px !important;
    min-height: 194px !important;
    max-height: 194px !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-areas:
      "title actions"
      "controls controls" !important;
    grid-template-rows: 40px minmax(0, 1fr) !important;
    gap: 6px !important;
    padding: 7px 9px !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-title-block {
    grid-area: title !important;
    display: flex !important;
    align-items: baseline !important;
    gap: 8px !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-kicker {
    display: none !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-title-wrap h2 {
    margin: 0 !important;
    font-size: 1.08rem !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-sub {
    max-width: 152px !important;
    overflow: hidden !important;
    font-size: .48rem !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-controls {
    grid-area: controls !important;
    min-width: 0 !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-head-actions {
    grid-area: actions !important;
    gap: 5px !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-toolbar {
    display: grid !important;
    grid-template-rows: 40px 92px !important;
    gap: 6px !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-toolbar-main {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 6px !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-searchbox input {
    min-height: 40px !important;
    padding: 0 11px !important;
    font-size: .68rem !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-toolbar-actions {
    display: flex !important;
    gap: 5px !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-plus-btn {
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    padding: 0 !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-plus-btn span,
  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-plus-btn small {
    display: none !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay #tlContextJump {
    width: 54px !important;
    min-width: 54px !important;
    padding: 0 7px !important;
    overflow: hidden !important;
    font-size: .52rem !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-toolbar-meta {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) max-content !important;
    grid-template-rows: 30px 56px !important;
    gap: 6px !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-mini-note {
    min-width: 0 !important;
    min-height: 30px !important;
    padding: 0 8px !important;
    overflow: hidden !important;
    font-size: .48rem !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-quick-presets {
    grid-column: 1 / -1 !important;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 5px !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-quick-preset {
    min-width: 0 !important;
    min-height: 54px !important;
    padding: 6px 4px !important;
    overflow: hidden !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-quick-preset strong {
    font-size: .58rem !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-quick-preset small {
    display: block !important;
    overflow: hidden !important;
    font-size: .42rem !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-main {
    padding: 6px !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay :is(.tl-ribbon, .tl-atlas, .tl-sidebar, .tl-inspector, .tl-focus-dock, .tl-scene-strip) {
    display: none !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-workbench {
    display: grid !important;
    height: 100% !important;
    min-height: 0 !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, 1fr) !important;
    gap: 0 !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-shell {
    display: grid !important;
    height: 100% !important;
    min-height: 0 !important;
    grid-template-rows: 132px minmax(0, 1fr) !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-meta {
    display: grid !important;
    height: 132px !important;
    max-height: 132px !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas:
      "context"
      "actions"
      "depth"
      "epoch" !important;
    grid-template-rows: 42px 32px 30px 20px !important;
    gap: 4px !important;
    padding: 5px 7px !important;
    overflow: hidden !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-badges,
  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-copy {
    display: none !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-context-rail {
    grid-area: context !important;
    display: flex !important;
    gap: 5px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x proximity;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-context-chip {
    flex: 0 0 166px !important;
    min-width: 166px !important;
    height: 42px !important;
    padding: 5px 7px !important;
    scroll-snap-align: start;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-context-chip span,
  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-context-chip small {
    font-size: .42rem !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-context-chip strong {
    overflow: hidden !important;
    font-size: .54rem !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-actions {
    grid-area: actions !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 4px !important;
    overflow-x: auto !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage-btn {
    flex: 0 0 auto !important;
    min-width: 32px !important;
    min-height: 30px !important;
    padding: 0 8px !important;
    font-size: .5rem !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-user-context-panel {
    grid-area: depth !important;
    display: grid !important;
    min-height: 30px !important;
    grid-template-columns: max-content minmax(80px, 1fr) !important;
    gap: 7px !important;
    padding: 4px 7px !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-user-context-panel > div:first-child {
    display: flex !important;
    align-items: baseline !important;
    gap: 5px !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-user-context-panel span {
    display: none !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-user-context-panel strong {
    font-size: .58rem !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-user-context-panel p,
  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay #tlStageAddContext {
    display: none !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-context-meter {
    height: 5px !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-epoch-strip {
    grid-area: epoch !important;
    display: flex !important;
    overflow: hidden !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-epoch-bar {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    height: 20px !important;
    padding: 2px 5px !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-epoch-bar b,
  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-epoch-bar em {
    font-size: .44rem !important;
  }

  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-stage,
  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-canvas-wrap,
  body.expert-ui-ready:not(.fullscreen-active) .app[data-active-mode="timeline"] .timeline-overlay .tl-canvas-wrap canvas {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
  }

  body.expert-ui-ready .mapv.location-lab {
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  body.expert-ui-ready .mapv.location-lab .maplayout,
  body.expert-ui-ready .mapv.location-lab:is(:fullscreen, .pseudo-fullscreen) .maplayout {
    position: relative !important;
    inset: auto !important;
    display: grid !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 470px auto !important;
    gap: 7px !important;
    padding: 6px !important;
    overflow: visible !important;
  }

  body.expert-ui-ready .mapv.location-lab .mapstage,
  body.expert-ui-ready .mapv.location-lab:is(:fullscreen, .pseudo-fullscreen) .mapstage {
    width: 100% !important;
    height: 470px !important;
    min-height: 470px !important;
    max-height: 470px !important;
    grid-row: 1 !important;
  }

  body.expert-ui-ready .mapv.location-lab #MAP,
  body.expert-ui-ready .mapv.location-lab:is(:fullscreen, .pseudo-fullscreen) #MAP {
    width: 100% !important;
    height: 470px !important;
    min-height: 470px !important;
  }

  body.expert-ui-ready .mapv.location-lab .mapstage-workbar {
    top: 7px !important;
    right: 7px !important;
    left: 7px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 6px !important;
    padding: 6px !important;
    overflow: visible !important;
  }

  body.expert-ui-ready .mapv.location-lab .mapwork-search {
    min-height: 38px !important;
  }

  body.expert-ui-ready .mapv.location-lab .mapwork-search label {
    display: none !important;
  }

  body.expert-ui-ready .mapv.location-lab .mapwork-search input {
    min-width: 0 !important;
    min-height: 36px !important;
  }

  body.expert-ui-ready .mapv.location-lab .mapwork-actions {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    justify-content: flex-start !important;
    gap: 5px !important;
    padding: 3px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }

  body.expert-ui-ready .mapv.location-lab .mapwork-actions::-webkit-scrollbar {
    display: none;
  }

  body.expert-ui-ready .mapv.location-lab .mapwork-group,
  body.expert-ui-ready .mapv.location-lab .mapwork-primary {
    flex: 0 0 auto !important;
    scroll-snap-align: start;
  }

  body.expert-ui-ready .mapv.location-lab .mapwork-group-label {
    display: none !important;
  }

  body.expert-ui-ready .mapv.location-lab .mapwork-actions button {
    min-height: 30px !important;
    padding: 0 9px !important;
    font-size: .55rem !important;
  }

  body.expert-ui-ready .mapv.location-lab .mapstage-hud,
  body.expert-ui-ready .mapv.location-lab:is(:fullscreen, .pseudo-fullscreen) .mapstage-hud,
  body.expert-ui-ready .mapv.location-lab .maplegend {
    display: none !important;
  }

  body.expert-ui-ready .mapv.location-lab .maprail,
  body.expert-ui-ready .mapv.location-lab:is(:fullscreen, .pseudo-fullscreen) .maprail {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    grid-row: 2 !important;
    overflow: visible !important;
  }

  body.expert-ui-ready .mapv.location-lab .maphud {
    display: block !important;
    padding-bottom: 10px !important;
  }

  body.expert-ui-ready .mapv.location-lab .modechrome-head {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 8px !important;
    padding: 11px !important;
  }

  body.expert-ui-ready .mapv.location-lab .modechrome-title {
    font-size: .92rem !important;
  }

  body.expert-ui-ready .mapv.location-lab .modechrome-actions {
    display: flex !important;
    justify-content: flex-start !important;
    overflow-x: auto !important;
  }

  body.expert-ui-ready .mapv.location-lab .mapstats {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.expert-ui-ready .mapv.location-lab .mapchapterrow {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, .72fr) auto !important;
    gap: 5px !important;
  }

  body.expert-ui-ready .mapv.location-lab #MAPTXT {
    display: -webkit-box !important;
    overflow: hidden !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  body.expert-ui-ready .mapv.location-lab .mapsource,
  body.expert-ui-ready .mapv.location-lab .mapatlas-head,
  body.expert-ui-ready .mapv.location-lab #MAPDETAILS > .modebrief-card:nth-last-child(-n + 2) {
    display: none !important;
  }

  body.expert-ui-ready .mapv.location-lab #MAPDETAILS {
    grid-template-columns: minmax(0, 1fr) !important;
    height: auto !important;
    max-height: none !important;
    padding: 0 10px 12px !important;
    overflow: visible !important;
  }

  body.expert-ui-ready .mapv.location-lab .mapinspector-tools {
    position: static !important;
  }

  body.expert-ui-ready .mapv.location-lab .mapfocus-card {
    position: static !important;
    padding: 11px !important;
  }

  body.expert-ui-ready .mapv.location-lab .mapfocus-card p {
    display: -webkit-box !important;
    overflow: hidden !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  body.expert-ui-ready .mapv.location-lab .mapfocus-meta {
    display: none !important;
  }

  body.expert-ui-ready .mapv.location-lab .mapplace-list {
    max-height: 300px !important;
    overflow-y: auto !important;
  }
}

@media (max-width: 420px) {
  body.expert-ui-ready .mapv.location-lab .maplayout {
    grid-template-rows: 405px auto !important;
  }

  body.expert-ui-ready .mapv.location-lab .mapstage,
  body.expert-ui-ready .mapv.location-lab #MAP {
    height: 405px !important;
    min-height: 405px !important;
    max-height: 405px !important;
  }

  body.expert-ui-ready .mapv.location-lab .modechrome-btn {
    min-height: 30px !important;
    padding: 0 7px !important;
    font-size: .52rem !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.expert-ui-ready .timeline-overlay *,
  body.expert-ui-ready .mapv.location-lab * {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }

  body.expert-ui-ready .mapv.location-lab .baibel-map-route {
    animation: none !important;
  }
}
