:root {
  color-scheme: dark;
  --ink: #f8efdf;
  --muted: #c5d0be;
  --surface: #142821;
  --surface-top: #20372e;
  --control: #263e33;
  --line: #7b9080;
  --frame: #647f6e;
  --amber: #f4c28d;
  --rose: #efb0a5;
  --moss: #b5d8a6;
  --focus: #ffe3ab;
  --gutter: 18px;
  --top-edge: max(var(--gutter), env(safe-area-inset-top));
  --left-edge: max(var(--gutter), env(safe-area-inset-left));
  --right-edge: max(var(--gutter), env(safe-area-inset-right));
  --bottom-edge: max(var(--gutter), env(safe-area-inset-bottom));
  --header-height: 65px;
  --footer-reserve: calc(var(--bottom-edge) + 65px);
  --chrome-shadow: 0 4px 10px #06191252, 0 14px 30px #06191232;
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-family: system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; overflow: hidden; background: #334c3e; color: var(--ink); }
h1, h2, p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button, select { cursor: pointer; }
button {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--control);
  transition: color .15s, background-color .15s, border-color .15s;
}
button:hover { background-color: #365447; border-color: var(--amber); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

#atlas, #map { position: absolute; inset: 0; }
#map { isolation: isolate; touch-action: none; cursor: grab; overflow: hidden; }
#map.dragging { cursor: grabbing; }
#map:focus-visible { z-index: 1; outline: 0; }
#map:focus-visible::before {
  content: "";
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 2px var(--surface), inset 0 0 0 4px var(--focus);
}
canvas, #atmosphere { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#paper-wash { display: none; position: absolute; inset: 0; pointer-events: none; }
#atlas[data-skin="watercolor"] #paper-wash {
  display: block;
  background: radial-gradient(ellipse at 40% -25%, #f5efcf4a, transparent 68%),
    linear-gradient(170deg, #e1e8de20, transparent 48%, #607c8520);
  box-shadow: inset 0 0 14vw #e7e8d026;
}
#atlas[data-skin="watercolor"][data-lighting="golden"] #map::after {
  background: radial-gradient(ellipse at 4% 8%, #fae7b025, transparent 58%);
  box-shadow: inset 0 0 12vw #566d7026;
}
#atlas[data-skin="watercolor"][data-lighting="night"] #paper-wash {
  background: linear-gradient(170deg, #adc7ce10, transparent 46%, #223f5620);
  box-shadow: inset 0 0 14vw #b1c6c00d;
}
#atlas[data-skin="watercolor"] #paper-wash::after {
  content: ""; position: absolute; inset: 0; opacity: .055;
  background: url("./paper-grain.svg") repeat;
}
#map::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 11vw #162b241b;
}
#atlas[data-lighting="golden"] #map::after {
  background: radial-gradient(ellipse at 10% -15%, #ffd2a124, transparent 66%),
    linear-gradient(157deg, #f7b66b17 3%, transparent 60%, #8c4d5717);
  box-shadow: inset 0 0 15vw #502c4233;
}
#atlas[data-lighting="night"] #map::after {
  background: radial-gradient(ellipse at 48% 43%, transparent 34%, #0d1b3138);
  box-shadow: inset 0 0 14vw #101c3266;
}
#atmosphere { z-index: 2; overflow: hidden; }
#atmosphere[data-weather="cloudy"] { background: #618b9e16; }
#atmosphere[data-weather="fog"] {
  background: radial-gradient(ellipse at 45% 76%, #deebe689, #dbe7e34f 44%, #b3c4c213 82%);
}
#atmosphere[data-weather="rain"], #atmosphere[data-weather="snow"] { background: #4860791a; }
#atmosphere[data-weather="rain"]::after, #atmosphere[data-weather="snow"]::after {
  content: "";
  position: absolute;
  inset: -200px;
  background-size: 166px 130px;
  animation: fall .8s linear infinite;
}
#atmosphere[data-weather="rain"]::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='166' height='130'%3E%3Cpath d='m8 1-3 10m29 37-3 10m13 52-3 10m64-92-3 11m52 20-3 10m-32 41-3 10m-49-55-3 10' stroke='%23cfebf2' opacity='.39'/%3E%3C/svg%3E");
}
#atmosphere[data-weather="snow"]::after {
  animation-duration: 6s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='166' height='130'%3E%3Cpath d='M8 4h2v2H8zm26 44h2v2h-2zm13 62h3v3h-3zm60-80h2v2h-2zm52 31h3v3h-3zm-32 51h2v2h-2zm-49-44h2v2h-2z' fill='%23fffdf2' opacity='.86'/%3E%3C/svg%3E");
}
@keyframes fall { from { transform: translate(35px, -130px); } to { transform: translate(0, 0); } }

.masthead, .navigation, .map-footer, .loading, .detail-status, .place, .ride-panel {
  position: absolute;
  z-index: 3;
}
.brand, .search, .conditions, .navigation, .explore, .legend, .scene-presets,
.scene-status, .loading, .detail-status, .place, .ride-panel {
  background: linear-gradient(156deg, var(--surface-top), var(--surface) 70%);
  border: 1px solid var(--frame);
  border-radius: 12px;
  box-shadow: var(--chrome-shadow);
}

.masthead {
  z-index: 5;
  inset: var(--top-edge) var(--right-edge) auto var(--left-edge);
  display: grid;
  grid-template-columns: auto minmax(210px, 350px) minmax(0, 1fr) auto;
  min-height: var(--header-height);
  gap: 10px;
  pointer-events: none;
}
.masthead > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 12px; padding: 8px 15px 9px 10px; }
.mark {
  flex: none;
  width: 43px;
  height: 43px;
  padding: 6px;
  color: var(--amber);
  border: 1px solid #9b7e61;
  border-radius: 9px;
  background: #3b3b2b;
}
.eyebrow {
  display: block;
  color: var(--muted);
  font: 650 .66rem/1.25 var(--mono);
  letter-spacing: .12em;
  white-space: nowrap;
}
.brand .eyebrow { color: var(--rose); }
h1 { font: 500 clamp(1.36rem, 2.25vw, 1.96rem)/1.06 Georgia, serif; letter-spacing: -.035em; }
.brand h1 { margin-top: 2px; white-space: nowrap; }

.search { position: relative; display: flex; align-items: center; gap: 8px; padding: 5px 8px 5px 13px; }
.search:focus-within { border-color: var(--amber); }
.search svg { width: 20px; fill: none; stroke: var(--amber); stroke-width: 1.65; flex: none; }
.search input { min-width: 0; flex: 1; border: 0; background: transparent; padding: 9px 2px; font-size: .89rem; }
.search input::placeholder { color: var(--muted); }
.search button { min-width: 40px; min-height: 38px; font-size: 1.18rem; color: var(--amber); }
.search-results {
  position: absolute;
  inset: calc(100% + 7px) 0 auto;
  max-height: min(44vh, 330px);
  overflow: auto;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--chrome-shadow);
  font-size: .86rem;
}
.search-results button { display: block; width: 100%; min-height: 42px; margin: 4px 0; padding: 8px; text-align: left; }

.conditions { grid-column: 4; display: flex; align-items: center; gap: 11px; padding: 7px 10px; }
.signal {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--moss);
  box-shadow: 0 0 0 3px #b5d8a627;
}
#clock { display: block; margin-top: 3px; white-space: nowrap; font-size: 1rem; font-variant-numeric: tabular-nums; }
.weather-control { padding-left: 11px; border-left: 1px solid var(--frame); }
.weather-control select {
  margin-top: 3px;
  padding: 2px 4px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--control);
  font-size: .8rem;
}

.scene-status {
  max-width: 100%;
  padding: 5px 9px;
  border-radius: 7px;
  font-size: .73rem;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}
.scene-status:empty { display: none; }
.scene-dock {
  position: absolute;
  z-index: 3;
  top: calc(var(--top-edge) + var(--header-height) + 7px);
  right: var(--right-edge);
  display: grid;
  justify-items: end;
  gap: 7px;
  max-width: min(460px, calc(100% - var(--left-edge) - var(--right-edge)));
  pointer-events: none;
}
.scene-dock > * { pointer-events: auto; }
.scene-presets {
  display: grid;
  gap: 5px;
  padding: 8px;
}
.scene-presets .eyebrow { padding-left: 3px; color: var(--rose); }
.skin-controls { display: grid; gap: 5px; border-bottom: 1px solid #a7a78432; padding-bottom: 8px; margin-bottom: 2px; }
.skin-controls .scene-buttons button { flex: 1 0 auto; }
.scene-options > summary { display: none; cursor: pointer; padding: 6px 3px; color: var(--muted); font-size: .75rem; }
.scene-options > .eyebrow { display: block; margin: 0 0 5px; }
.scene-options > .canopy-note { display: block; margin-top: 5px; }
.watercolor-walk { text-align: left; padding: 5px 7px; font-size: .7rem; color: #e8dfbc; background: #354d47; border-color: #8a9b85; }
.watercolor-walk span { float: right; margin-left: 10px; }
.scene-buttons { display: flex; gap: 4px; }
.scene-buttons button {
  min-width: 48px;
  min-height: 32px;
  padding: 4px 8px;
  color: var(--ink);
  white-space: nowrap;
  font-size: .76rem;
}
.scene-buttons button[aria-pressed="true"] {
  border-color: var(--rose);
  color: var(--rose);
  background-color: #503831;
  box-shadow: inset 0 -2px var(--rose);
}

.canopy-controls { display: flex; align-items: center; justify-content: space-between; gap: 7px; border-top: 1px solid #a7a78432; padding-top: 7px; margin-top: 4px; }
.canopy-controls .eyebrow { color: var(--amber); font-size: .55rem; letter-spacing: .1em; }
.canopy-controls .scene-buttons button { min-width: 50px; }
.canopy-note { font-size: .61rem; color: var(--muted); padding: 1px 3px 0; }
.explore .autumn-launch { color: #ffe0a9; border-color: #a89262; background: #54472f; }
.explore .autumn-launch:hover { background: #665437; }
.autumn-launch > span { margin-right: 3px; color: #f4bf68; }

.loading, .detail-status {
  left: 50%;
  top: 48%;
  transform: translate(-50%, -50%);
  padding: 10px 13px;
  text-align: center;
}
.detail-status {
  top: auto;
  bottom: var(--footer-reserve);
  max-width: min(340px, 46vw);
  transform: translateX(-50%);
  font-size: .75rem;
}

.navigation {
  right: var(--right-edge);
  bottom: var(--footer-reserve);
  display: grid;
  gap: 5px;
  padding: 8px;
}
.ride-launch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 39px;
  padding: 4px 7px;
  border-color: #819e79;
  background: #344a36;
  color: #f4eddb;
  font-size: .81rem;
  font-weight: 700;
}
.ride-launch svg {
  flex: none;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--moss);
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ride-launch:disabled { opacity: .66; cursor: wait; }
.rotate {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 43px;
  border-color: #edaf78;
  background: linear-gradient(135deg, #ffdda9, var(--amber) 52%, #efa99b);
  color: #292119;
  font-weight: 750;
}
.rotate:hover { border-color: #ffe1b8; background: #ffe1b8; }
.rotate span { font-size: 1.24rem; line-height: 1; }
kbd { padding: 1px 4px; border: 1px solid #80583c; border-radius: 4px; font: .68rem var(--mono); }
#heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--muted);
  font: 650 .67rem/1.7 var(--mono);
  letter-spacing: .11em;
}
#heading::before, #heading::after { content: ""; width: 12px; height: 1px; background: var(--frame); }
.zoom { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.zoom button { width: 38px; min-height: 36px; padding: 0; font-size: 1.15rem; }

.map-footer {
  inset: auto var(--right-edge) var(--bottom-edge) var(--left-edge);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
}
.explore, .legend { display: flex; align-items: center; min-width: 0; gap: 6px; padding: 6px 8px; pointer-events: auto; }
.explore { overflow: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.explore .eyebrow { padding: 0 3px; color: var(--rose); }
.explore button, .legend button { flex: none; min-height: 34px; padding: 5px 9px; white-space: nowrap; font-size: .77rem; }
.diorama-launch { display: inline-flex; align-items: center; flex: none; min-height: 34px; padding: 5px 9px; white-space: nowrap; font-size: .77rem; text-decoration: none; border: 1px solid #b7ba93; border-radius: 7px; color: #ebe5ba; background: #3f5043; }
.diorama-launch:hover { background: #52634e; }
.explore [data-place="ladds"] { border-color: var(--rose); color: var(--rose); }
#open-field-guide { display: inline-flex; align-items: center; gap: 5px; color: var(--amber); border-color: #b69c71; }
#open-field-guide svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.45; }
.legend { flex: none; gap: 9px; font-size: .76rem; }
.transit-toggle { display: flex; align-items: center; gap: 6px; min-height: 34px; cursor: pointer; white-space: nowrap; }
.transit-toggle input { margin: 0; width: 15px; height: 15px; accent-color: var(--moss); }
#transit-status { max-width: 140px; color: var(--muted); font-size: .71rem; }
#transit-status:empty { display: none; }

.place {
  z-index: 4;
  left: var(--left-edge);
  bottom: var(--footer-reserve);
  width: min(340px, calc(100% - var(--left-edge) - var(--right-edge) - 190px));
  padding: 15px 45px 15px 15px;
  border-left: 3px solid var(--rose);
}
.place .eyebrow { color: var(--rose); }
.place button, dialog form button {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  font-size: 1.2rem;
  line-height: 1;
}
.place h2, dialog h2 { margin: 4px 0 6px; font: 500 1.45rem/1.12 Georgia, serif; }
.place p, dialog p { color: var(--muted); font-size: .85rem; line-height: 1.5; }
.place-story {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 10px;
  border-top: 1px solid #718a785e;
  padding-top: 8px;
  margin-top: 10px;
  color: var(--moss);
  font-size: .7rem;
}
.place-story a { color: var(--amber); text-underline-offset: .17em; }

#atlas[data-ride] :is(.search, .navigation, .place, .explore, .detail-status) { display: none; }
#atlas[data-ride] #map { cursor: default; }
#atlas[data-ride] .map-footer { justify-content: flex-end; }
.ride-panel {
  z-index: 4;
  bottom: var(--bottom-edge);
  left: var(--left-edge);
  width: min(350px, calc(100% - var(--left-edge) - var(--right-edge)));
  padding: 14px 15px;
  border-left: 3px solid var(--rose);
}
.ride-kicker { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ride-kicker .eyebrow { color: var(--rose); }
#ride-distance { color: var(--muted); font: 650 .71rem var(--mono); font-variant-numeric: tabular-nums; }
.ride-panel h2 { margin-top: 3px; font: 500 1.64rem/1.13 Georgia, serif; }
#ride-stage { margin-top: 4px; color: var(--muted); font-size: .82rem; line-height: 1.35; }
#ride-progress {
  display: block;
  width: 100%;
  height: 5px;
  margin: 10px 0 12px;
  appearance: none;
  overflow: hidden;
  border: 0;
  border-radius: 4px;
  background: #495b4f;
  accent-color: var(--amber);
}
#ride-progress::-webkit-progress-bar { background: #495b4f; }
#ride-progress::-webkit-progress-value { background: linear-gradient(90deg, var(--rose), var(--amber)); }
#ride-progress::-moz-progress-bar { background: linear-gradient(90deg, var(--rose), var(--amber)); }
.ride-actions { display: flex; gap: 6px; }
.ride-actions button { min-height: 44px; padding: 4px 12px; font-size: .84rem; font-weight: 700; }
.ride-actions .ride-primary { flex: 1; border-color: var(--amber); background: var(--amber); color: #292119; }
.ride-actions .ride-primary:hover { background: #ffe1b8; }

dialog {
  max-width: min(540px, 92vw);
  max-height: 82dvh;
  overflow: auto;
  padding: 20px 25px 23px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--chrome-shadow);
}
dialog h2 { padding-right: 32px; }
dialog::backdrop { background: #0a1c18b8; }
dialog ul { padding-left: 20px; font-size: .87rem; line-height: 1.75; }
dialog a { color: var(--amber); text-underline-offset: .19em; }
dialog p + p { margin-top: 9px; }

#field-guide {
  width: min(784px, calc(100vw - 28px));
  max-width: none;
  max-height: 88dvh;
  padding: 23px;
  background: radial-gradient(ellipse at 0 0, #384b3b, transparent 50%), var(--surface);
}
#field-guide form { position: sticky; top: 0; z-index: 1; }
#field-guide form button { top: 0; right: 0; }
.guide-header { padding: 3px 38px 18px 2px; }
.guide-header .eyebrow { color: var(--rose); }
.guide-header h2 { margin: 6px 0 8px; padding: 0; font-size: clamp(1.9rem, 5vw, 3rem); letter-spacing: -.035em; }
.guide-stops {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 9px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.guide-stops li:first-child { grid-column: 1 / -1; }
.guide-stop {
  --illustration: #b4c79f;
  display: grid;
  grid-template-columns: 76px minmax(0,1fr) auto;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 111px;
  height: 100%;
  padding: 10px 12px 10px 9px;
  border: 1px solid #667f6b;
  border-radius: 9px;
  text-align: left;
  background: #263b30;
}
.guide-stop:hover { background: #30483a; }
.guide-stop[data-guide-stop="ladds"] {
  --illustration: #efb0a5;
  grid-template-columns: 116px minmax(0,1fr) auto;
  border-color: #bb8a80;
  background: linear-gradient(112deg, #44332f, #343b31 72%);
}
.guide-stop[data-guide-stop="ladds"]:hover { border-color: var(--rose); background: #493d36; }
.guide-stop[data-guide-stop="tilikum"] { --illustration: #a9c8ca; }
.guide-stop[data-guide-stop="tabor"] { --illustration: #e3bd83; }
.guide-illustration {
  display: block;
  width: 100%;
  aspect-ratio: 128 / 88;
  border: 1px solid #a6c0a33d;
  border-radius: 6px;
  background: #172b25;
  color: var(--illustration);
}
.guide-stop[data-guide-stop="ladds"] .guide-illustration { background: #302724; }
.guide-stop-copy { display: grid; gap: 4px; }
.guide-stop .eyebrow { color: var(--illustration); font-size: .57rem; }
.guide-stop strong { font: 500 1.19rem/1.08 Georgia, serif; }
.guide-stop[data-guide-stop="ladds"] strong { font-size: 1.45rem; }
.guide-note { color: var(--muted); font-size: .72rem; line-height: 1.38; }
.guide-arrow { color: var(--amber); font-size: 1rem; }

@media (max-width: 620px) {
  #field-guide { padding: 16px; }
  .guide-stops { grid-template-columns: 1fr; }
  .guide-stop, .guide-stop[data-guide-stop="ladds"] { grid-template-columns: 68px minmax(0,1fr) auto; min-height: 94px; }
  .guide-stop[data-guide-stop="ladds"] strong { font-size: 1.25rem; }
}

@media (max-width: 600px) {
  .scene-options > summary { display: list-item; margin-left: 15px; }
  .scene-options > .eyebrow { margin-top: 6px; }
  .skin-controls { padding-bottom: 5px; margin-bottom: 0; }
  .skin-controls > .eyebrow { display: none; }
  .watercolor-walk { min-height: 32px; }
}

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

@media (max-width: 840px) {
  :root { --gutter: 10px; --header-height: 117px; --footer-reserve: calc(var(--bottom-edge) + 127px); }
  .masthead { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 62px 48px; gap: 7px; }
  .brand { gap: 7px; padding: 5px 8px; }
  .brand > div { min-width: 0; }
  .mark { width: 28px; height: 28px; padding: 4px; }
  .brand h1 { font-size: clamp(1.02rem, 4.1vw, 1.58rem); white-space: normal; }
  .brand .eyebrow { overflow: hidden; text-overflow: ellipsis; font-size: .55rem; letter-spacing: .08em; }
  .brand-coordinates { display: none; }
  .conditions .eyebrow { font-size: .52rem; letter-spacing: .035em; }
  .conditions { grid-column: 2; gap: 6px; padding: 5px 7px; }
  .conditions .signal { display: none; }
  #clock { margin-top: 2px; font-size: .84rem; }
  .weather-control { padding-left: 6px; }
  .weather-control select { width: 81px; margin-top: 2px; font-size: .7rem; }
  .search { grid-column: 1 / -1; grid-row: 2; padding: 2px 5px 2px 10px; }
  .search input { font-size: 1rem; }
  .search button { min-width: 40px; min-height: 39px; }
  .map-footer { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .explore, .legend { padding: 4px 7px; }
  .explore button, .legend button, .diorama-launch { min-height: 40px; }
  .legend { justify-content: space-between; }
  .detail-status { bottom: calc(var(--footer-reserve) + 190px); max-width: calc(100vw - 2 * var(--gutter)); }
  #atlas[data-ride] { --header-height: 62px; }
  #atlas[data-ride] .masthead { grid-template-rows: var(--header-height); }
  .ride-panel { bottom: calc(var(--bottom-edge) + 65px); }
}

@media (max-width: 475px) {
  .place { bottom: calc(var(--footer-reserve) + 190px); width: auto; right: var(--right-edge); }
}

@media (max-width: 365px) {
  .brand .mark { display: none; }
  .brand .eyebrow { font-size: .51rem; }
  .conditions { gap: 5px; }
  .legend { gap: 5px; }
  .legend button { padding: 5px 6px; }
}

@media (pointer: coarse) {
  :root { --footer-reserve: calc(var(--bottom-edge) + 74px); }
  .rotate, .ride-launch, .zoom button, .search button, .search-results button,
  .scene-buttons button, .transit-toggle, .explore button, .legend button,
  .place button, dialog form button, .weather-control select, .diorama-launch, .watercolor-walk, .scene-options > summary { min-height: 44px; }
  .zoom button, .search button, .place button, dialog form button { min-width: 44px; }
  .weather-control { position: relative; }
  .weather-control .eyebrow { position: absolute; z-index: 1; top: 5px; left: 17px; pointer-events: none; }
  .weather-control select { margin-top: 0; padding: 13px 4px 3px; }
  .place { padding-right: 59px; }
  .rotate kbd { display: none; }
  @media (max-width: 840px) {
    :root { --footer-reserve: calc(var(--bottom-edge) + 134px); }
    .search { padding-block: 0; }
    .weather-control .eyebrow { left: 12px; }
  }
}

@media (max-height: 520px) and (min-width: 520px) and (max-width: 840px) {
  :root { --header-height: 56px; --footer-reserve: calc(var(--bottom-edge) + 64px); }
  .masthead { grid-template-columns: auto minmax(100px, 1fr) auto; grid-template-rows: 56px; }
  .brand h1 { font-size: clamp(1rem, 2.9vw, 1.4rem); }
  .conditions { grid-column: 3; }
  .search { grid-column: 2; grid-row: 1; }
  .search input { font-size: .86rem; }
  .map-footer { display: flex; }
  .legend { flex: 0 0 auto; }
  .scene-dock { left: var(--left-edge); right: auto; justify-items: start; }
  .detail-status { bottom: var(--footer-reserve); }
  #atlas[data-ride] { --header-height: 56px; }
  #atlas[data-ride] .scene-dock { left: auto; right: var(--right-edge); justify-items: end; }
}

@media (max-height: 550px) and (max-width: 519px) {
  .scene-dock { gap: 3px; }
  .scene-presets { gap: 0; padding: 4px; }
  .scene-presets .eyebrow { display: none; }
  .navigation { gap: 3px; padding: 4px; }
  #heading { line-height: 1.1; }
}

@media (max-height: 520px) and (max-width: 840px) and (orientation: landscape) {
  .ride-panel { bottom: var(--bottom-edge); width: min(292px, calc(50vw - var(--left-edge) - 24px)); padding: 9px 11px; }
  .ride-panel h2 { font-size: 1.34rem; }
  .ride-actions button { padding-inline: 8px; }
  #atlas[data-ride] .scene-presets { padding: 4px; }
  #atlas[data-ride] .scene-presets .eyebrow { display: none; }
  #atlas[data-ride] .scene-buttons button { min-width: 44px; padding-inline: 5px; font-size: .72rem; }
}

@media (max-height: 520px) and (max-width: 600px) and (orientation: landscape) {
  #atlas[data-ride] .map-footer { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  button { transition: none; }
  #atmosphere::after { animation: none !important; }
}
