@font-face {
  font-family: "DM Sans";
  src: url("assets/dm-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("assets/instrument-serif.woff2") format("woff2");
  font-display: swap;
}
:root {
  color-scheme: light;
  --paper: #e9ebd9;
  --panel: #f4f3e7;
  --ink: #233b32;
  --muted: #4d6054;
  --accent: #285d4b;
  --line: #bdc8b1;
  --display: "Instrument Serif", Georgia, serif;
  --body: "DM Sans", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.5 var(--body); }
h1, h2, p { margin: 0; }
a { color: var(--accent); text-underline-offset: .22em; }
a:hover { text-decoration-thickness: 2px; }
button { font: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
:focus-visible { outline: 2px solid #245b4c; outline-offset: 3px; }
[hidden] { display: none !important; }
.skip { position: absolute; z-index: 4; top: .5rem; left: .5rem; padding: .5rem 1rem; background: var(--panel); transform: translateY(-150%); }
.skip:focus { transform: none; }
.world-wrap { width: min(100% - 3rem, 86rem); margin-inline: auto; }
.masthead, .footer { display: flex; align-items: center; gap: .85rem; }
.masthead { min-height: 4rem; justify-content: space-between; border-bottom: 1px solid var(--line); }
.masthead nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: .9rem; font-weight: 650; text-decoration: none; }
.masthead nav a:hover { text-decoration: underline; }
.brand { display: inline-flex; align-items: center; min-height: 44px; }
.brand img { display: block; }
.brand:hover { opacity: .7; }
.world-intro { padding: 1.45rem 0 1.12rem; animation: enter .35s ease-out both; }
.world h1 { font: 400 clamp(2.8rem, 6vw, 4.9rem)/.98 var(--display); letter-spacing: -.022em; }
.world-intro p { color: var(--muted); margin-top: .5rem; }
.world-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(15.8rem, 19rem); gap: .9rem; align-items: start; }
.map-panel, .exhibit { border: 1px solid var(--line); background: var(--panel); border-radius: 6px; }
.map-header, .map-controls { display: flex; align-items: center; justify-content: space-between; padding-inline: .75rem; gap: .65rem; }
.map-header { min-height: 48px; }
.map-location { display: flex; align-items: center; gap: .5rem; font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.status-light { width: .48rem; height: .48rem; background: #548b6b; border-radius: 50%; }
.map-actions { display: flex; gap: .5rem; }
.map-header button { min-height: 44px; padding: 0 .3rem; color: var(--accent); border: 0; background: transparent; font-size: .78rem; font-weight: 650; }
.map-header button:hover:not(:disabled) { text-decoration: underline; }
.map-frame { position: relative; height: clamp(320px, 57vh, 650px); overflow: hidden; isolation: isolate; background: #cfdad4; }
.map-frame canvas { display: block; width: 100%; height: 100%; }
.map-frame canvas:focus-visible { outline-offset: -4px; }
#scene-status, .no-script { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%); padding: .8rem 1rem; width: min(85%, 26rem); text-align: center; border-radius: 4px; background: var(--panel); }
.no-script { z-index: 2; }
.map-marker { position: absolute; z-index: 1; top: 0; left: 0; display: grid; place-items: center; width: 44px; height: 44px; border: 0; padding: 0; color: #17352a; background: transparent; }
.map-marker span { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; border: 1px solid #425a44; background: #f3e2a5; font: 700 .81rem/1 var(--body); box-shadow: 0 2px 6px #21392e60; }
.map-marker:hover span, .map-marker[aria-current="location"] span { background: #fff5cf; transform: translateY(-2px); }
.map-controls { padding-block: .35rem; }
.map-controls p { color: var(--muted); font-size: .79rem; }
kbd { display: inline-block; border: 1px solid var(--line); border-radius: 3px; padding: 0 .22em; margin-right: .18em; font: 700 .78rem/1.4 var(--body); }
.dpad { display: flex; gap: .25rem; }
.dpad button { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); background: var(--paper); touch-action: none; }
.dpad button:hover:not(:disabled), .dpad button:active:not(:disabled) { background: #cfdcc3; }
.exhibit-body { min-height: 14.25rem; padding: 1.15rem 1rem .55rem; }
.exhibit-type { color: var(--accent); font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.exhibit h2 { margin-block: .3rem .55rem; font: 400 2.7rem/.98 var(--display); }
.exhibit-body > p:not(.exhibit-type) { color: var(--muted); font-size: .9rem; }
.exhibit-body a { display: inline-flex; align-items: center; min-height: 44px; gap: .25rem; font-size: .82rem; font-weight: 650; }
#publication-links { margin: .55rem 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
#publication-links li { border-bottom: 1px solid var(--line); }
#publication-links a { display: flex; padding-block: .55rem; line-height: 1.35; }
#inspect-exhibit { display: block; min-height: 44px; margin: .15rem 0 .4rem; padding: .35rem .7rem; border: 1px solid var(--line); border-radius: 4px; color: var(--accent); background: #e7ece0; font-size: .82rem; font-weight: 650; }
#inspect-exhibit:hover { background: #dce7d6; }
.stops { display: grid; border-top: 1px solid var(--line); padding: .35rem; }
.stops button { display: flex; align-items: center; gap: .65rem; min-height: 44px; padding-inline: .6rem; border: 0; border-radius: 4px; background: none; color: var(--ink); text-align: left; font-size: .87rem; }
.stops button:hover, .stops button[aria-current="location"] { background: #dfe8d5; }
.stop-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: #6f8e53; }
.stop-dot.whiteboard { background: #3e8d83; }
.stop-dot.boat { background: #407588; }
.stop-dot.drone { background: #ad5f49; }
.stop-dot.robots { background: #ac7626; }
.footer { margin-top: 1.25rem; padding-block: .75rem; border-top: 1px solid var(--line); color: var(--muted); }
@keyframes enter {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 800px) {
  .world-layout { grid-template-columns: minmax(0, 1fr); }
  .exhibit-body { min-height: auto; }
  .stops { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 625px) {
  .world-wrap { width: min(100% - 1.5rem, 86rem); }
  .map-frame { height: clamp(290px, 45svh, 415px); }
  .map-controls { flex-direction: column; align-items: flex-start; padding-block: .45rem; }
  .dpad { align-self: center; gap: .5rem; }
  .map-actions { gap: .15rem; }
}
@media (prefers-reduced-motion: reduce) {
  .world-intro { animation: none; }
}
