@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700&display=swap");

:root {
  --ink: #17312d;
  --muted: #66756f;
  --faint: #93a09b;
  --line: #dfe5df;
  --line-strong: #cbd5cd;
  --paper: #f8f8f3;
  --panel: #ffffff;
  --stage: #eef0e8;
  --accent: #e95d35;
  --accent-dark: #ca4725;
  --green: #1e7d67;
  --green-pale: #dff1e9;
  --shadow: 0 20px 55px rgba(31, 49, 44, 0.11);
  --font-sans: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "DM Mono", "SFMono-Regular", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 74% 10%, rgba(219, 229, 213, 0.7), transparent 31rem),
    var(--paper);
}

button,
input,
select {
  font: inherit;
}

button,
select,
input[type="range"],
input[type="checkbox"],
input[type="radio"] {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(30, 125, 103, 0.24);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 34px;
  border-bottom: 1px solid var(--line);
  background: rgba(248, 248, 243, 0.9);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.brand-mark {
  width: 31px;
  height: 31px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  align-items: end;
  transform: rotate(-8deg);
}

.brand-mark span {
  display: block;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
}

.brand-mark span:nth-child(1) { height: 46%; }
.brand-mark span:nth-child(2) { height: 76%; }
.brand-mark span:nth-child(3) { height: 100%; }

.topbar-note {
  display: flex;
  align-items: center;
  gap: 9px;
  font: 12px var(--font-mono);
  color: var(--muted);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #55a88e;
  box-shadow: 0 0 0 5px rgba(85, 168, 142, 0.13);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(340px, 440px) minmax(0, 1fr);
  min-height: calc(100vh - 68px);
}

.control-panel {
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  min-width: 0;
}

.intro-block {
  padding: 34px 34px 30px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.17em;
  font: 500 10px var(--font-mono);
}

.intro-block h1 {
  max-width: 360px;
  font-size: clamp(25px, 2vw, 33px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin: 0 0 14px;
}

.intro-block > p:last-child {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  margin: 0;
  max-width: 360px;
}

.intro-block > #intro-description {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  margin: 0;
  max-width: 360px;
}

.mode-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  margin-top: 21px;
}

.mode-field > span {
  color: var(--muted);
  font: 500 9px var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.mode-field select {
  width: 100%;
  height: 39px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: 0 34px 0 12px;
  color: var(--ink);
  background: #fff;
  font-size: 11px;
  font-weight: 700;
}

.panel-section {
  padding: 26px 34px 28px;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-bottom: 22px;
}

.step-number {
  flex: 0 0 auto;
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--green);
  font: 500 9px var(--font-mono);
  margin-top: 1px;
}

.section-heading h2 {
  font-size: 14px;
  line-height: 1.2;
  margin: 0 0 5px;
}

.section-heading p {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
}

.search-form {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 11px;
}

.search-icon {
  position: absolute;
  left: 15px;
  top: 15px;
  width: 13px;
  height: 13px;
  border: 1.7px solid var(--muted);
  border-radius: 50%;
  pointer-events: none;
}

.search-icon::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 1.7px;
  background: var(--muted);
  transform: rotate(45deg);
  right: -5px;
  bottom: -2px;
  border-radius: 2px;
}

.search-form input {
  width: 100%;
  height: 44px;
  padding: 0 70px 0 42px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font-size: 12px;
}

.search-form input::placeholder { color: var(--faint); }

.search-form button {
  position: absolute;
  right: 5px;
  top: 5px;
  height: 34px;
  border: 0;
  border-radius: 6px;
  padding: 0 13px;
  color: #fff;
  background: var(--green);
  font-size: 11px;
  font-weight: 700;
}

.search-form button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.search-status {
  min-height: 0;
  color: var(--muted);
  font-size: 11px;
}

.search-status:not(:empty) { margin: -2px 0 10px; }
.search-status.error { color: #a4402a; }

.provider-note {
  margin: -1px 1px 10px;
  color: var(--faint);
  font-size: 8px;
  line-height: 1.45;
}

.provider-note a { color: var(--green); }

.route-dropzone {
  min-height: 118px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  padding: 18px;
  border: 1px dashed #aebdb3;
  border-radius: 9px;
  background: #f8faf7;
  color: var(--ink);
  text-align: center;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.route-dropzone:hover,
.route-dropzone.is-dragging {
  border-color: var(--green);
  background: #f0f7f3;
}

.route-dropzone.is-dragging { transform: scale(1.01); }
.route-dropzone strong { font-size: 11px; }
.route-dropzone > span:last-child { color: var(--muted); font-size: 8px; }

.route-file-icon {
  width: 28px;
  height: 28px;
  border: 1px solid #b9c9bf;
  border-radius: 50%;
  position: relative;
  background: #fff;
}

.route-file-icon::before,
.route-file-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  background: var(--green);
  transform: translateX(-50%);
}

.route-file-icon::before { width: 1px; height: 10px; top: 7px; }
.route-file-icon::after { width: 9px; height: 1px; top: 16px; }

.sample-route-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  margin: 9px 0 0;
  color: var(--faint);
  font-size: 8px;
}

.sample-route-row button,
.replace-route-button {
  border: 0;
  padding: 3px 4px;
  background: transparent;
  color: var(--green);
  font-size: 8px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.selected-route { margin-top: 11px; }

.route-line-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #d8eee5;
  position: relative;
}

.route-line-icon::before,
.route-line-icon::after,
.route-line-icon span {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: var(--green);
}

.route-line-icon::before { width: 5px; height: 5px; left: 7px; top: 17px; }
.route-line-icon::after { width: 5px; height: 5px; right: 6px; top: 7px; }
.route-line-icon span { width: 16px; height: 2px; left: 8px; top: 14px; transform: rotate(-37deg); border-radius: 2px; }

.search-results {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 11px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(31, 49, 44, 0.1);
}

.result-button {
  display: block;
  width: 100%;
  padding: 11px 13px;
  border: 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  background: #fff;
  color: var(--ink);
}

.result-button:last-child { border-bottom: 0; }
.result-button:hover { background: #f3f7f2; }
.result-button strong,
.result-button span { display: block; }
.result-button strong { font-size: 11px; margin-bottom: 3px; }
.result-button span { font-size: 9px; color: var(--muted); line-height: 1.4; }

.selected-place {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 13px;
  border: 1px solid #c6ded3;
  border-radius: 8px;
  background: #f1f8f4;
}

.place-pin {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #d8eee5;
  display: grid;
  place-items: center;
}

.place-pin span {
  width: 9px;
  height: 11px;
  background: var(--green);
  border-radius: 7px 7px 7px 0;
  transform: rotate(-45deg);
  position: relative;
}

.place-pin span::after {
  content: "";
  width: 3px;
  height: 3px;
  position: absolute;
  top: 3px;
  left: 3px;
  background: #d8eee5;
  border-radius: 50%;
}

.place-copy { min-width: 0; }
.place-copy strong,
.place-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.place-copy strong { font-size: 11px; margin-bottom: 4px; }
.place-copy span { color: var(--muted); font-size: 9px; }
.place-check { color: var(--green); font-size: 12px; }

.field-group {
  margin: 0 0 20px;
  padding: 0;
  border: 0;
}

.field-group legend,
.select-field > span,
.range-label label {
  font-size: 10px;
  font-weight: 700;
  margin-bottom: 8px;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f2f4ef;
}

.segmented-control label { position: relative; }
.segmented-control input { position: absolute; opacity: 0; }
.segmented-control span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  border-radius: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.segmented-control input:checked + span {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 2px 8px rgba(31, 49, 44, 0.08);
}

.segmented-control input:focus-visible + span { outline: 3px solid rgba(30, 125, 103, 0.24); }

.ratio-icon {
  display: inline-block;
  border: 1.3px solid currentColor;
  border-radius: 1px;
  width: 14px;
}

.ratio-wide { height: 8px; }
.ratio-square { height: 12px; width: 12px; }
.ratio-tall { height: 14px; width: 9px; }

.two-column-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 21px;
}

.select-field > span { display: block; }
.select-field select {
  width: 100%;
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: 0 30px 0 11px;
  background: #fff;
  color: var(--ink);
  font-size: 10px;
}

.route-only-field {
  display: block;
  margin: -4px 0 21px;
}

.route-only-field[hidden] { display: none; }

.stop-label-field small {
  display: block;
  margin-top: 6px;
  color: var(--faint);
  font-size: 8px;
  line-height: 1.4;
}

.range-field { margin-bottom: 21px; }
.range-label { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.range-label output { color: var(--green); font: 500 9px var(--font-mono); }

input[type="range"] {
  width: 100%;
  height: 3px;
  appearance: none;
  background: linear-gradient(90deg, var(--green) var(--range-progress, 45%), #dce3dd var(--range-progress, 45%));
  border-radius: 5px;
  display: block;
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 3px solid #fff;
  background: var(--green);
  box-shadow: 0 0 0 1px var(--green), 0 2px 6px rgba(31, 49, 44, 0.2);
}

input[type="range"]::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 3px solid #fff;
  background: var(--green);
  box-shadow: 0 0 0 1px var(--green), 0 2px 6px rgba(31, 49, 44, 0.2);
}

.range-ends {
  display: flex;
  justify-content: space-between;
  color: var(--faint);
  font: 8px var(--font-mono);
  margin-top: 7px;
}

.duration-field { margin-bottom: 24px; }

.toggle-row {
  display: grid;
  gap: 12px;
}

.toggle-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.toggle-option input { position: absolute; opacity: 0; }
.toggle-ui {
  width: 31px;
  height: 18px;
  border-radius: 10px;
  background: #cbd4ce;
  position: relative;
  transition: background 180ms ease;
}

.toggle-ui::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(31, 49, 44, 0.2);
  transition: transform 180ms ease;
}

.toggle-option input:checked + .toggle-ui { background: var(--green); }
.toggle-option input:checked + .toggle-ui::after { transform: translateX(13px); }
.toggle-option input:focus-visible + .toggle-ui { outline: 3px solid rgba(30, 125, 103, 0.24); }
.toggle-option strong,
.toggle-option small { display: block; }
.toggle-option strong { font-size: 10px; margin-bottom: 2px; }
.toggle-option small { color: var(--muted); font-size: 8px; }

.action-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 9px;
}

.button {
  border-radius: 7px;
  min-height: 43px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 10px;
  font-weight: 700;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { opacity: 0.58; cursor: wait; }
.secondary-button { color: var(--ink); border: 1px solid var(--line-strong); background: #fff; }
.primary-button { color: #fff; border: 1px solid var(--accent); background: var(--accent); box-shadow: 0 8px 20px rgba(233, 93, 53, 0.21); }
.primary-button:hover:not(:disabled) { background: var(--accent-dark); box-shadow: 0 10px 24px rgba(233, 93, 53, 0.27); }

.play-icon {
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid currentColor;
}

.download-icon {
  width: 11px;
  height: 12px;
  border-bottom: 1.5px solid currentColor;
  position: relative;
}

.download-icon::before {
  content: "";
  position: absolute;
  width: 1.5px;
  height: 8px;
  background: currentColor;
  left: 5px;
  top: -2px;
}

.download-icon::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  left: 3px;
  top: 2px;
}

.privacy-note {
  margin: 11px 0 0;
  color: var(--faint);
  font-size: 8px;
  text-align: center;
}

.render-progress { margin-top: 15px; }
.progress-track { height: 4px; background: #e3e8e3; border-radius: 4px; overflow: hidden; }
.progress-track span { display: block; width: 0; height: 100%; background: var(--accent); transition: width 150ms linear; }
.render-progress p { margin: 7px 0 0; color: var(--muted); font-size: 9px; }

.stage-panel {
  min-width: 0;
  padding: clamp(28px, 4vw, 62px);
  background:
    linear-gradient(rgba(30, 59, 52, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 59, 52, 0.025) 1px, transparent 1px),
    var(--stage);
  background-size: 28px 28px;
  display: flex;
  flex-direction: column;
}

.stage-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 0 auto 18px;
  width: 100%;
  max-width: 1120px;
}

.stage-toolbar .eyebrow { margin-bottom: 6px; }
.stage-toolbar h2 { margin: 0; font-size: 17px; letter-spacing: -0.02em; }
.stage-meta { display: flex; align-items: center; gap: 9px; color: var(--muted); font: 9px var(--font-mono); }
.meta-divider { width: 3px; height: 3px; border-radius: 50%; background: var(--line-strong); }

.canvas-wrap {
  display: grid;
  place-items: center;
  flex: 1 1 auto;
  min-height: 300px;
  width: 100%;
}

.map-frame {
  width: 100%;
  max-width: 1120px;
  background: #dfe5dd;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow), 0 0 0 1px rgba(31, 49, 44, 0.1);
  transition: max-width 240ms ease, aspect-ratio 240ms ease;
}

.map-frame.format-landscape { aspect-ratio: 16 / 9; }
.map-frame.format-square { aspect-ratio: 1 / 1; max-width: min(72vh, 760px); }
.map-frame.format-vertical { aspect-ratio: 9 / 16; max-width: min(42vh, 460px); min-height: 560px; }

#map { position: absolute; inset: 0; }
.maplibregl-control-container { display: none; }

.map-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(10, 25, 21, 0.3) 0%, transparent 28%, transparent 72%, rgba(10, 25, 21, 0.18) 100%);
}

.title-overlay {
  position: absolute;
  z-index: 3;
  left: clamp(22px, 4vw, 56px);
  top: clamp(22px, 4vw, 52px);
  color: #fff;
  max-width: min(75%, 620px);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.38);
  transition: opacity 180ms ease;
}

.title-kicker {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font: 500 clamp(7px, 0.8vw, 11px) var(--font-mono);
  margin-bottom: 8px;
  opacity: 0.78;
}

.title-overlay strong {
  display: block;
  font-size: clamp(19px, 3vw, 45px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.marker-overlay {
  width: 34px;
  height: 34px;
  z-index: 4;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.marker-core {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: var(--accent);
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.35);
}

.pulse-ring {
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.9);
  animation: marker-pulse 2.3s ease-out infinite;
}

@keyframes marker-pulse {
  0% { transform: scale(0.4); opacity: 0; }
  24% { opacity: 0.8; }
  100% { transform: scale(1.45); opacity: 0; }
}

.frame-attribution {
  position: absolute;
  z-index: 4;
  right: 9px;
  bottom: 7px;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(15, 29, 25, 0.58);
  border-radius: 3px;
  padding: 3px 5px;
  font: 7px var(--font-sans);
}

.frame-attribution a {
  color: inherit;
  text-decoration: none;
}

.frame-attribution a:hover { text-decoration: underline; }

.frame-corners { position: absolute; z-index: 5; inset: 13px; pointer-events: none; }
.frame-corners span { position: absolute; width: 13px; height: 13px; opacity: 0.55; }
.frame-corners span:nth-child(1) { left: 0; top: 0; border-left: 1px solid #fff; border-top: 1px solid #fff; }
.frame-corners span:nth-child(2) { right: 0; top: 0; border-right: 1px solid #fff; border-top: 1px solid #fff; }
.frame-corners span:nth-child(3) { right: 0; bottom: 0; border-right: 1px solid #fff; border-bottom: 1px solid #fff; }
.frame-corners span:nth-child(4) { left: 0; bottom: 0; border-left: 1px solid #fff; border-bottom: 1px solid #fff; }

.timeline-panel {
  width: 100%;
  max-width: 1120px;
  margin: 18px auto 0;
  padding: 15px 17px 13px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(200, 210, 203, 0.78);
  border-radius: 8px;
  backdrop-filter: blur(10px);
}

.timeline-topline { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font: 8px var(--font-mono); margin-bottom: 14px; }
#timeline-status { display: flex; align-items: center; gap: 7px; }
#timeline-status i { width: 5px; height: 5px; border-radius: 50%; background: var(--green); }
.timeline-track { height: 4px; border-radius: 4px; background: #d5dcd6; position: relative; }
.timeline-fill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 4px; background: var(--accent); }
.timeline-marker { position: absolute; top: 9px; color: var(--faint); font: 7px var(--font-mono); transform: translateX(-50%); white-space: nowrap; }
.timeline-marker i { position: absolute; width: 1px; height: 7px; background: #aab6ae; left: 50%; top: -10px; }
.timeline-legend { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 14px; margin-top: 23px; color: var(--faint); font: 7px var(--font-mono); }
.timeline-legend span { display: flex; align-items: center; gap: 5px; }
.legend-block { width: 12px; height: 3px; border-radius: 2px; }
.legend-block.hold { background: #b7c2ba; }
.legend-block.motion { background: var(--accent); }

.stage-tip {
  width: 100%;
  max-width: 1120px;
  margin: 14px auto 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.tip-icon { width: 19px; height: 19px; border: 1px solid #bdc8c0; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; font: 9px var(--font-mono); }
.stage-tip p { margin: 0; font-size: 8px; line-height: 1.5; }
.stage-tip strong { color: var(--ink); margin-right: 4px; }

.is-hidden { opacity: 0; pointer-events: none; }
.is-rendering .map-frame { box-shadow: 0 0 0 3px rgba(233, 93, 53, 0.25), var(--shadow); }

@media (max-width: 1080px) {
  .workspace { grid-template-columns: 365px minmax(0, 1fr); }
  .intro-block, .panel-section { padding-left: 26px; padding-right: 26px; }
  .stage-panel { padding: 34px 26px; }
}

@media (max-width: 820px) {
  .topbar { padding: 0 20px; }
  .workspace { display: block; }
  .control-panel { border-right: 0; }
  .stage-panel { min-height: 690px; }
  .intro-block, .panel-section { padding-left: 24px; padding-right: 24px; }
  .map-frame.format-vertical { min-height: 620px; }
}

@media (max-width: 520px) {
  .topbar-note span:last-child { display: none; }
  .topbar { height: 60px; }
  .brand { font-size: 12px; }
  .intro-block { padding-top: 28px; }
  .two-column-fields { grid-template-columns: 1fr; }
  .action-grid { grid-template-columns: 1fr; }
  .stage-panel { padding: 28px 14px; }
  .stage-toolbar { align-items: flex-start; }
  .stage-meta { display: none; }
  .map-frame.format-vertical { min-height: 520px; }
  .timeline-legend { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
