/* Interface design: a quiet, readable workspace around the map. */
:root {
  --ink: #eff6f5;
  --muted: #a2b5ba;
  --accent: #8fe2d4;
  --border: rgba(203, 226, 225, .12);
  --surface: #152731;
  --control: #203740;
  --control-border: rgba(191, 220, 217, .16);
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
}
body { background: #111e29; }
button, input, select { font-family: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible {
  outline: 2px solid #9cf0df;
  outline-offset: 3px;
}
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.topbar { height: 68px; padding: 0 24px; gap: 8px; background: #111f29; border-bottom: 1px solid rgba(215, 236, 235, .09); }
.brand { gap: 11px; margin-right: 18px; }
.brand-symbol { width: 38px; height: 38px; border: 1px solid rgba(152, 231, 214, .3); border-radius: 12px; background: linear-gradient(145deg, #254b4c, #193337); }
.brand-symbol svg { width: 29px; height: 29px; fill: none; stroke: #b2eddf; stroke-width: 1.55; }
.brand strong { font-size: 16px; font-weight: 720; letter-spacing: -.45px; white-space: nowrap; }
.brand em { color: #a9dcd4; font-weight: 560; }
.brand small { font-size: 8px; letter-spacing: 1.5px; color: #90aab0; margin-top: 5px; }
.mode-switch { background: #0d1a22; border: 1px solid rgba(214, 236, 232, .12); border-radius: 10px; padding: 3px; margin-right: 7px; }
.mode-switch button { border-radius: 7px; padding: 7px 11px; color: #97abb0; font-size: 11px; font-weight: 650; }
.mode-switch button.active { background: #2b4850; color: #f3fbf9; box-shadow: 0 1px 3px #0004; }
.status { color: #aabec0; margin: 0 10px 0 4px; font-size: 11px; white-space: nowrap; }
.status-dot { width: 6px; height: 6px; background: #89d8c3; box-shadow: 0 0 0 3px #79cdb52a; }
.header-button, .header-button#about-button { min-height: 36px; padding: 8px 10px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: #b7c8ca; font-size: 11px; font-weight: 650; white-space: nowrap; }
.header-button .icon { width: 16px; height: 16px; color: #9ab4b6; }
.header-button:hover { background: #203740; border-color: #ffffff10; color: white; }
.project-trigger { background: #213740; border-color: #ffffff12; color: #e3f2ef; padding: 8px 11px; }
.project-trigger .icon { width: 14px; }
.menu { top: 58px; right: 22px; background: #1b3038; border: 1px solid rgba(208, 235, 228, .15); border-radius: 12px; padding: 6px; min-width: 190px; box-shadow: 0 18px 50px #050e13a6; }
.menu button { padding: 10px 11px; border-radius: 8px; color: #dcece9; font-size: 12px; }
.menu button:hover { background: #2a4850; }
.workspace { inset: 68px 0 0; }
.workspace #map { background: #29444e; }
.map-vignette { background: linear-gradient(90deg, rgba(11, 24, 31, .15), transparent 45%), linear-gradient(0deg, rgba(7, 18, 26, .18), transparent 28%); }
.sidebar { top: 16px; bottom: 16px; left: 16px; width: 390px; max-height: calc(100% - 32px); border: 1px solid rgba(205, 232, 227, .14); border-radius: 16px; background: #152731f7; box-shadow: 0 20px 55px #07151c85, 0 2px 8px #07151c55; }
.side-heading { padding: 22px 22px 17px; gap: 15px; }
.eyebrow, .field-label { color: #8fc8bd; font-size: 10px; font-weight: 750; letter-spacing: 1.15px; }
.side-heading h1 { margin: 8px 0 5px; color: #f5faf9; font-size: 23px; font-weight: 690; letter-spacing: -.75px; line-height: 1.16; }
.side-heading p, .panel-intro p, .section-title p { color: #a2b7b9; font-size: 12px; line-height: 1.55; }
.side-heading p { margin: 0; }
.icon-button { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border: 1px solid rgba(210, 232, 229, .1); border-radius: 9px; background: #203740; color: #a5c1bf; }
.icon-button:hover { background: #2a4a50; color: white; }
.tabs { gap: 4px; margin: 0 16px; padding: 4px 0 12px; border-bottom: 1px solid var(--border); }
.tabs .tab { display: flex; align-items: center; justify-content: center; gap: 5px; min-width: 0; padding: 9px 3px; border: 0; border-radius: 8px; color: #90a9ac; font-size: 11px; font-weight: 650; }
.tabs .tab .icon { width: 15px; height: 15px; }
.tabs .tab span { color: inherit; font-size: inherit; margin: 0; }
.tabs .tab:hover { background: #ffffff0b; color: #e9f7f4; }
.tabs .tab.active { background: #315358; color: #eafbf7; box-shadow: inset 0 0 0 1px #a4e5d519; }
.panel-scroll { overscroll-behavior: contain; scrollbar-color: #526d70 transparent; scrollbar-width: thin; }
.panel { padding: 20px 22px 28px; }
.search { margin-top: 9px; background: #1d343d; border: 1px solid rgba(189, 223, 218, .17); border-radius: 10px; transition: border-color .15s, box-shadow .15s; }
.search:focus-within { border-color: #84d8c7; box-shadow: 0 0 0 3px #8ce6d522; }
.search > .icon { width: 16px; height: 16px; margin-left: 12px; color: #a1bdbb; }
.search input { padding: 13px 9px; color: #f1f8f6; font-size: 12px; }
.search input::placeholder, input::placeholder { color: #91a9aa; opacity: 1; }
.search button { align-self: center; margin-right: 5px; padding: 8px 10px; border-radius: 7px; background: #31565a; color: #e4f9f2; font-size: 11px; }
.search button:hover { background: #42746f; }
.search-results { background: #1b323a; border-color: #47645f; border-radius: 10px; }
.section-title { margin-top: 24px; }
.section-title h2, .panel-intro h2 { font-size: 16px; font-weight: 680; letter-spacing: -.25px; color: #f0f8f6; }
.panel-intro h2 { font-size: 21px; margin: 8px 0; }
.panel-intro { margin-bottom: 23px; }
.route-tools { gap: 9px; margin-top: 14px; }
.action-button, .secondary-button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 42px; padding: 10px 11px; border: 1px solid #466866; border-radius: 9px; background: #233f44; color: #e5f7f1; font-size: 12px; font-weight: 650; }
.action-button .icon { width: 17px; height: 17px; color: #a9ebda; }
.action-button span { margin: 0; color: inherit; font-size: inherit; }
.action-button:hover, .secondary-button:hover { background: #31575a; }
.mode-help { background: #294c4b; border-color: #4f8980; border-radius: 10px; color: #e2f7ef; }
.mode-help button, .text-button { color: #a5ddd3; text-decoration-color: #77b4a8; font-size: 11px; }
.route-list { margin: 13px 0 6px; }
.route-item { grid-template-columns: 12px 25px minmax(0, 1fr) auto; gap: 8px; min-height: 58px; padding: 8px 0; border-color: rgba(208, 230, 228, .09); }
.drag { color: #7f9a9c; }
.route-number { width: 25px; height: 25px; border-color: #75beb0; color: #b8ebdd; background: #244d4a; font-size: 10px; }
.route-item input[type="text"] { width: 100%; min-width: 0; margin: 0; padding: 3px 4px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: #f0f7f5; font-size: 12px; font-weight: 600; }
.route-item input[type="text"]:hover, .route-item input[type="text"]:focus { background: #223d43; border-color: #527a75; }
.route-item small { margin: 3px 4px 0; font-size: 10px !important; color: #9cb4b3 !important; }
.item-actions { gap: 0; }
.item-actions button { min-width: 20px; min-height: 28px; padding: 3px 2px; color: #a1bdb9; border-radius: 5px; font-size: 13px; }
.item-actions button:hover { background: #31534f; color: white; }
.empty-route { padding: 21px 20px; border: 1px dashed #4a6969; border-radius: 11px; color: #a9bebc; }
.empty-route strong { color: #e5f2ef; font-size: 12px; }
.empty-route p { font-size: 11px; }
.empty-icon { display: grid; place-items: center; width: 40px; height: 40px; margin: 0 auto 10px; border-radius: 12px; background: #284449; color: #a6e6d7; }
.empty-icon .icon { width: 22px; height: 22px; }
.route-footer { gap: 10px 15px; margin: 14px 0 20px; }
.sample-picker { padding: 14px; border: 1px solid rgba(158, 219, 204, .17); border-radius: 12px; background: #203c3d; }
.sample-picker .help-text { color: #abc2bd; }
.sample-picker .sample { background: #2a4b48; }
.sample { border-color: #4b7068; border-radius: 9px; padding: 11px; }
.sample:hover { background: #355e57; }
.sample-icon { width: 34px; height: 34px; background: #3f6c62; color: #d0f2e4; border-radius: 10px; }
.sample-icon .icon { width: 20px; height: 20px; }
.sample strong { font-size: 12px; }
.sample small { color: #b3cbc3; font-size: 10px; }
.divider { margin: 22px 0; }
select, input[type="text"] { background: #1d343d; border: 1px solid rgba(189, 223, 218, .18); border-radius: 9px; color: #edf6f3; font-size: 12px; padding: 11px 12px; }
select:hover, input[type="text"]:hover { border-color: #6c9790; }
.help-text { color: #a0b7b5; font-size: 11px; line-height: 1.55; }
.check-row { gap: 9px; color: #cfdfdc; font-size: 12px; margin: 15px 0; }
.check-row input { width: 15px; height: 15px; accent-color: #8fdbca; }
.range-field { margin: 25px 0; }
.range-field label { color: #dfede9; font-size: 12px; }
.range-field output { color: #a8e2d5; font-variant-numeric: tabular-nums; }
.range-ends { color: #98b1af; font-size: 10px; }
input[type="range"] { appearance: none; -webkit-appearance: none; height: 4px; border: 0; border-radius: 10px; background: #54716f; cursor: pointer; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border: 2px solid #d6fff2; border-radius: 50%; background: #79cdbd; box-shadow: 0 1px 5px #0006; }
input[type="range"]::-moz-range-thumb { width: 11px; height: 11px; border: 2px solid #d6fff2; border-radius: 50%; background: #79cdbd; }
.tip { border-color: #43645f; border-radius: 10px; background: #203d3d; }
.primary-button { min-height: 45px; background: #9ce2d0; color: #102e2b; border-radius: 10px; font-size: 12px; }
.primary-button:hover { background: #baf3e3; }
.secondary-button { width: 100%; }
.export-progress { background: #203d3d; border-color: #436a61; border-radius: 10px; }
.scene-swatch { height: 96px; border-radius: 11px; }
.scene-swatch span { left: 12px; bottom: 11px; padding: 6px 8px; border-radius: 6px; background: #13242dc9; }
.map-buttons { top: 16px; right: 16px; border: 1px solid #ffffff25; border-radius: 12px; background: #152a32ef; box-shadow: 0 8px 28px #07151c70; }
.map-buttons button { display: grid; place-items: center; width: 42px; height: 41px; border-bottom: 1px solid #ffffff12; color: #e1f1ed; }
.map-buttons button:last-child { border-bottom: 0; }
.map-buttons button[aria-pressed="false"] { opacity: .58; }
.map-buttons .icon { width: 18px; height: 18px; }
.map-message { right: 18px; bottom: 19px; background: #132932e8; border-color: #ffffff1e; border-radius: 8px; color: #c9dbd7; font-size: 10px; }
.transport { left: calc(50% + 190px); bottom: 18px; transform: translateX(-50%); width: min(520px, calc(100% - 500px)); min-width: 290px; gap: 13px; padding: 11px 14px; background: #152a32f2; border: 1px solid #ffffff22; border-radius: 13px; box-shadow: 0 12px 38px #07141a80; }
.play-button { width: 40px; height: 40px; border-radius: 12px; background: #9ce2d0; color: #163832; font-family: "Segoe UI Symbol", Arial, sans-serif; font-variant-emoji: text; font-size: 14px; padding-left: 3px; }
.play-button:hover { background: #c1f3e6; }
.transport-meta { color: #a3bcb9; font-size: 10px; font-variant-numeric: tabular-nums; }
.transport-meta strong { color: #e6f3f0; font-size: 11px; }
.transport input { margin-top: 9px; }
.transport-reset { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; color: #a9c3c0; }
.transport-reset:hover { background: #ffffff10; color: white; }
.transport-reset .icon { width: 19px; height: 19px; }
.expand { display: inline-flex; align-items: center; gap: 8px; top: 16px; left: 16px; padding: 11px 13px; border-radius: 10px; background: #152a32f2; color: #ecf8f4; font-size: 12px; font-weight: 650; }
.overview-wrap { top: 16px; right: 69px; border-color: #d9f2e777; border-radius: 11px; }
.overview-title, .overview-wrap button { background: #152a32e8; }
.maplibregl-ctrl-attrib { font-size: 9px !important; }
.map-error { top: 17px; border: 1px solid #e3bf803f; border-radius: 10px; background: #604a31f5; color: #fff3d4; box-shadow: 0 8px 22px #0003; font-size: 12px; }
.modal-backdrop { background: #07141ddc; }
.modal { background: #192f37; border-color: #56716e; border-radius: 17px; padding: 28px; }
.modal h2 { color: #f2faf7; }
.modal p, .modal li { color: #c0d3d0; }
.toast { background: #d6f3e9; color: #173c35; border-radius: 10px; }
@media (max-width: 1100px) { .map-message { display: none; } }
@media (max-width: 900px) { .topbar { gap: 6px; } .status { display: none; } .header-button#about-button { padding: 8px 10px; } }
@media (max-width: 750px) {
  .topbar { height: 60px; padding: 0 12px; gap: 5px; }
  .brand { margin-right: 2px; gap: 8px; }
  .brand-symbol { width: 34px; height: 34px; border-radius: 10px; }
  .brand-symbol svg { width: 26px; height: 26px; }
  .brand strong { font-size: 13px; }
  .brand small { font-size: 7px; letter-spacing: .9px; }
  .workspace { top: 60px; }
  .sidebar { top: auto; left: 10px; right: 10px; bottom: 82px; width: auto; max-height: min(48vh, 470px); border-radius: 15px; }
  .side-heading { padding: 15px 17px 10px; }
  .side-heading h1 { margin: 4px 0 0; font-size: 18px; }
  .side-heading p { display: none; }
  .tabs { margin: 0 13px; padding: 2px 0 9px; }
  .tabs .tab { padding: 8px 3px; font-size: 11px; }
  .tabs .tab span { display: inline; font-size: inherit; }
  .panel { padding: 17px; }
  .map-buttons { top: 11px; right: 11px; }
  .map-buttons button { width: 38px; height: 37px; }
  .transport { left: 10px; right: 10px; bottom: 10px; transform: none; width: auto; min-width: 0; padding: 9px 11px; }
  .overview-wrap { top: 11px; right: 58px; width: 150px; height: 103px; }
  .expand { top: 11px; left: 11px; }
  .map-error { left: 10px; right: 56px; top: 11px; max-width: none; transform: none; }
  .maplibregl-ctrl-bottom-right { bottom: 51vh !important; right: 56px !important; }
  .mode-switch { margin-right: 1px; }
  .mode-switch button { padding: 7px 8px; font-size: 10px; }
  .header-button, .header-button#about-button { min-width: 34px; min-height: 34px; padding: 7px; }
  .header-button .button-label { display: none; }
  .project-trigger .button-label { display: inline; }
  .header-button .icon { width: 16px; height: 16px; }
  .project-trigger .icon { width: 12px; }
  .menu { top: 52px; right: 10px; }
}
@media (max-width: 440px) {
  .brand-copy { display: none; }
  .brand { margin-right: 3px; }
  .header-spacer { flex: 1; }
}
@media (max-height: 620px) and (min-width: 751px) {
  .side-heading { padding-top: 15px; padding-bottom: 10px; }
  .side-heading p { display: none; }
  .tabs { padding-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; } }
.status[data-state="error"] .status-dot { background: #e7b47d; box-shadow: 0 0 0 3px #dba56924; }
.status[data-state="loading"] .status-dot { background: #aec0c0; box-shadow: 0 0 0 3px #b7d3cb20; }
.play-button { padding: 0; }
.play-button svg { width: 18px; height: 18px; fill: currentColor; }
.play-button .pause-icon, .play-button[aria-label="Pause flight"] .play-icon { display: none; }
.play-button[aria-label="Pause flight"] .pause-icon { display: block; }
@media (min-width: 1101px) { .map-message { bottom: 88px; } }
/* Readable controls and responsive touch targets. */
button { transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease; }
.action-button, .secondary-button, .check-row, .range-field label, .route-item input[type="text"], select, input[type="text"] { font-size: 12.5px; }
.item-actions button { min-width: 23px; min-height: 31px; }
@media (max-width: 750px) {
  .header-button, .header-button#about-button { min-width: 40px; min-height: 40px; }
  .map-buttons button { width: 42px; height: 40px; }
}
.project-trigger .project-icon { display: none; }
.transport-meta { gap: 8px; }
.transport-meta strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.transport-meta span { flex: none; white-space: nowrap; }
@media (max-width: 750px) {
  .map-buttons { display: grid; grid-template-columns: repeat(2, 40px); }
  .map-buttons button { width: 40px; height: 40px; border-bottom: 0; }
  .map-buttons button:nth-child(odd) { border-right: 1px solid #ffffff12; }
  .map-buttons button:nth-child(-n + 4) { border-bottom: 1px solid #ffffff12; }
  .overview-wrap { right: 101px; }
  .map-error { right: 101px; }
}
@media (max-width: 350px) {
  .topbar { padding: 0 8px; gap: 3px; }
  .brand { margin-right: 2px; }
  .mode-switch button { padding-left: 6px; padding-right: 6px; }
  .header-button, .header-button#about-button { min-width: 36px; width: 36px; padding: 6px; }
  .project-trigger .button-label, .project-trigger .chevron-icon { display: none; }
  .project-trigger .project-icon { display: block; width: 17px; height: 17px; }
}
@media (max-width: 440px) {
  .route-item { grid-template-columns: 12px 25px minmax(0, 1fr); gap: 0 8px; align-items: start; padding: 9px 0; }
  .route-item .drag, .route-item .route-number { margin-top: 3px; }
  .route-item > div { min-width: 0; }
  .route-item .item-actions { grid-column: 3; justify-content: flex-start; margin: 2px 0 -3px; }
  .route-item .item-actions button { min-width: 31px; min-height: 30px; font-size: 14px; }
}
.expand { z-index: 5; }
@media (max-width: 750px) { #map-error:not(.hidden) ~ .expand { top: 112px; } }
