:root {
  color-scheme: dark;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  color: #e9eee1;
  background: #152521;
  --muted: #a8b7a9;
  --border: #344842;
  --accent: #d8e5aa;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 2px solid #d8e5aa; outline-offset: 3px; }
.atlas { display: grid; grid-template-columns: minmax(290px, 342px) minmax(0, 1fr); min-height: 100dvh; }
.viewport { position: sticky; top: 0; grid-column: 2; grid-row: 1; height: 100dvh; overflow: hidden; isolation: isolate; background: #91aeaf; }
#world { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
#world:active { cursor: grabbing; }
.sidebar { grid-column: 1; grid-row: 1; padding: clamp(25px, 4vh, 48px) 26px 25px; border-right: 1px solid var(--border); }
header { border-bottom: 1px solid var(--border); padding-bottom: 26px; }
.eyebrow, h2 { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .17em; text-transform: uppercase; }
.eyebrow { margin: 0 0 19px; }
h1 { margin: 0; font: 400 clamp(58px, 5.3vw, 80px)/.89 "Instrument Serif", Georgia, serif; letter-spacing: -.075em; }
.subtitle { margin: 15px 0 0; color: var(--accent); font: italic 24px/1.12 "Instrument Serif", Georgia, serif; }
nav { margin-top: 24px; }
h2 { margin: 0 0 12px; }
.view-button {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  padding: 11px 11px 11px 12px; text-align: left; border: 1px solid transparent;
  border-bottom-color: var(--border); background: transparent; color: #e9eee1;
}
.view-button[aria-pressed="true"] { border-color: #596b53; background: #263a30; color: var(--accent); }
.view-button:hover { background: #263a30; }
.view-button strong, .view-button small { display: block; }
.view-button strong { font-size: 13px; line-height: 1.3; font-weight: 650; }
.view-button small { margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.3; }
.view-button > span:last-child { margin-left: 5px; color: var(--accent); font-size: 15px; }
.tour-button { width: 100%; margin-top: 18px; padding: 10px 13px; border: 1px solid var(--accent); background: var(--accent); color: #1e3026; text-align: left; font-weight: 700; font-size: 12px; }
.tour-button:hover { background: #ebf1cf; }
.tour-button span:first-child { display: inline-block; width: 20px; font-size: 15px; }
.map { margin: 22px 0 0; border: 1px solid var(--border); }
#minimap { display: block; width: 100%; height: auto; background: #1d3d3a; }
.map figcaption { display: flex; justify-content: space-between; padding: 9px 9px; color: var(--muted); font-size: 9px; letter-spacing: .045em; }
.viewport-top, .viewport-bottom { position: absolute; left: 22px; right: 22px; display: flex; justify-content: space-between; align-items: center; gap: 10px; pointer-events: none; }
.viewport-top { top: 20px; }
.viewport-bottom { bottom: 17px; align-items: flex-end; }
.view-name, .quiet-button, .mouse-help, .credits, .place-card, .view-message {
  background: #142521ed; color: #eef1e5; border: 1px solid #c6d2b54a; font-size: 11px;
}
.view-name, .quiet-button { padding: 9px 12px; }
.status-dot { display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--accent); vertical-align: 1px; }
.quiet-button, .credits a { pointer-events: auto; }
.quiet-button:hover { background: #31453b; }
.view-actions { display: flex; gap: 6px; }
#walk-toggle[aria-pressed="true"] { background: var(--accent); color: #1e3026; }
#walk-controls { position: absolute; z-index: 2; right: 22px; bottom: 60px; padding: 9px; background: #142521ed; border: 1px solid #c6d2b54a; }
.walk-arrows { display: grid; grid-template-columns: repeat(3, 40px); gap: 4px; justify-content: center; }
.walk-arrows button { min-height: 38px; padding: 0; border: 1px solid #718578; background: #263d34; color: #eef1e5; font-size: 20px; touch-action: none; user-select: none; }
.walk-arrows button:hover, .walk-arrows button:active { background: #476755; }
.walk-arrows button:first-child { grid-column: 2; }
.walk-arrows button:nth-child(2) { grid-column: 1; }
#walk-controls p { margin: 7px 0 0; font-size: 10px; }
.viewport:has(#walk-controls:not([hidden])) .mouse-help { display: none; }
.mouse-help, .credits { margin: 0; padding: 8px 10px; color: #e0e7d8; }
.mouse-help span { color: #a4ae88; padding: 0 3px; }
.credits a { color: inherit; text-underline-offset: 2px; }
.place-card { position: absolute; left: 22px; bottom: 58px; padding: 11px 12px; display: flex; align-items: flex-start; gap: 14px; min-width: 180px; max-width: calc(100% - 44px); }
.place-card strong, .place-card small { display: block; }
.place-card strong { font-size: 14px; }
.place-card small { margin-top: 4px; color: #c6d4c3; font-size: 11px; }
.place-card button { background: none; color: inherit; border: 0; margin-left: auto; font-size: 16px; line-height: 1; }
.directory { margin-top: 17px; display: grid; gap: 6px; }
.directory label { font-size: 11px; color: var(--muted); }
.directory-fields { display: flex; gap: 6px; }
.directory input, .directory button { padding: 7px; background: #20342c; color: #eef1e5; border: 1px solid var(--border); font: inherit; font-size: 12px; }
.directory input { flex: 1; min-width: 0; }
.directory button { padding-inline: 11px; }
.directory button:hover { background: #31453b; }
.view-message { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); padding: 12px 15px; text-align: center; max-width: 85%; }
[hidden] { display: none !important; }
@media (max-width: 760px) {
  .atlas { display: flex; flex-direction: column; }
  .viewport { position: relative; height: 61dvh; min-height: 350px; }
  .sidebar { padding: 23px 18px; border: 0; }
  .desktop-break, .mouse-help { display: none; }
  h1 { font-size: 58px; }
  .viewport-top, .viewport-bottom { left: 10px; right: 10px; }
  .viewport-top { top: 10px; }
  .view-name { max-width: 43%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .view-name, .quiet-button { padding: 8px; }
  .place-card { left: 10px; bottom: 44px; }
  #walk-controls { right: 10px; bottom: 43px; }
  .viewport-bottom { bottom: 10px; justify-content: flex-end; }
  .map { max-width: 350px; }
}

.experiment-button { margin-top: 18px; }
#ferry-panel { margin-top: 8px; padding: 11px; border: 1px solid var(--border); border-radius: 8px; font-size: 12px; }
#ferry-panel label { display: block; font-weight: 600; margin-bottom: 5px; }
#ferry-panel select, #ferry-panel button {
  padding: 5px 7px; border: 1px solid var(--border); border-radius: 5px; background: #fff; color: #142522; font: inherit;
}
#ferry-panel button { cursor: pointer; }
.ferry-actions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
#ferry-panel #ferry-play { background: #254742; color: #fff; }
#ferry-metrics { white-space: pre-line; font-variant-numeric: tabular-nums; line-height: 1.5; }
#ferry-comparison:empty { display: none; }
#ferry-panel button:disabled { opacity: .6; cursor: default; }
.ferry-sources { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-bottom: 0; }
.ferry-sources a { color: var(--accent); }

.catalog-return { display: inline-block; margin-bottom: 24px; color: var(--accent); font-size: 12px; text-underline-offset: 4px; }
