:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, sans-serif;
  color: #192f28;
  background: #eef1e9;
  --ink: #192f28;
  --muted: #4f6459;
  --line: #ccd6cc;
  --green: #1a664e;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible, canvas:focus-visible { outline: 3px solid #c17c2a; outline-offset: 2px; }
.top {
  min-height: 70px;
  padding: 12px max(24px, calc((100% - 1400px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: #f9faf6;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; text-decoration: none; white-space: nowrap; }
.brand span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: #14503d; color: #eaf7ed; }
.languages { display: flex; gap: 3px; }
.languages a { padding: 7px 9px; text-decoration: none; font-size: .86rem; font-weight: 650; border-radius: 7px; }
.languages a[aria-current] { background: #d7e7dc; }
main { width: min(100% - 48px, 1400px); margin: 0 auto; }
.intro { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: end; padding: clamp(20px, 3.5vw, 54px) 0 22px; }
.intro a { color: var(--green); font-weight: 650; text-underline-offset: 3px; }
.intro p { color: var(--muted); max-width: 43ch; margin: 0 0 3px; line-height: 1.55; }
h1 { margin: 9px 0 0; font-size: clamp(2.2rem, 4vw, 4rem); line-height: 1.02; letter-spacing: -.049em; text-wrap: balance; }
h2 { margin: 0; font-size: 1.16rem; }
.route-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.route-nav a, .places a { text-decoration: none; font-weight: 650; }
.route-nav a { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; background: #f9faf6; }
.route-nav a[aria-current], .places a[aria-current] { background: #15533f; color: white; border-color: #15533f; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(210px, 265px); gap: 14px; }
.map-card, aside { min-width: 0; border: 1px solid var(--line); border-radius: 13px; background: #f9faf6; }
.map-header { min-height: 76px; padding: 13px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.map-header p { margin: 4px 0 0; color: var(--muted); font-size: .85rem; }
.modes { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.modes button { border: 0; background: transparent; min-height: 37px; padding: 5px 13px; color: var(--ink); font-weight: 730; }
.modes button[aria-pressed="true"] { background: #d7e7dc; }
.stage { isolation: isolate; position: relative; height: max(420px, min(60vh, 650px)); background: #172e29; overflow: hidden; }
.stage canvas, #sceneCanvas, .markers { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage canvas { touch-action: none; cursor: grab; }
.stage canvas:active { cursor: grabbing; }
#sceneCanvas canvas { outline-offset: -6px; }
.controls { position: absolute; z-index: 2; top: 12px; left: 12px; display: flex; gap: 6px; }
.controls button { min-width: 40px; min-height: 39px; background: #f6faf4; color: var(--ink); border: 1px solid #cedbd0; border-radius: 7px; font-weight: 700; padding: 5px 11px; }
.controls button:hover, .modes button:hover { background: #e4ede1; }
.markers { pointer-events: none; z-index: 1; }
.marker { position: absolute; transform: translate(-50%, -50%); font-weight: 700; font-size: .78rem; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 5px 8px; border: 1px solid #93aa9a; border-radius: 6px; background: #f8fbf6; color: #1a3329; box-shadow: 0 2px 4px #0d282655; }
.marker.reference { border-style: dashed; background: #fff2d8; }
#message { position: absolute; z-index: 3; left: 12px; bottom: 32px; pointer-events: none; background: #172e29ec; color: white; border-radius: 6px; max-width: calc(100% - 24px); padding: 7px 10px; font-size: .83rem; }
#message:empty { display: none; }
.attribution { position: absolute; z-index: 2; right: 7px; bottom: 6px; background: #102a26e5; color: #f1f7e9; padding: 3px 6px; border-radius: 4px; font-size: .7rem; }
.legend { display: flex; gap: 9px 16px; flex-wrap: wrap; font-size: .8rem; color: var(--muted); padding: 11px 16px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { display: inline-block; width: 16px; height: 4px; border-radius: 3px; }
aside { padding: 16px; align-self: start; }
.places { display: grid; gap: 5px; margin: 12px 0 15px; }
.places a { display: block; border: 1px solid var(--line); border-radius: 7px; padding: 9px 10px; font-size: .91rem; }
.places a:hover:not([aria-current]) { background: #e4ede1; }
.notes { color: var(--muted); font-size: .87rem; line-height: 1.5; border-top: 1px solid var(--line); padding-top: 12px; }
.notes p { margin: 0 0 8px; }
.notes p:last-child { margin-bottom: 0; }
footer { padding: 10px 0 30px; color: var(--muted); font-size: .83rem; line-height: 1.45; }
footer p { margin: 7px 0; }
@media (max-width: 820px) {
  main { width: calc(100% - 28px); }
  .top { padding-inline: 14px; }
  .intro, .layout { grid-template-columns: 1fr; }
  .intro { gap: 11px; padding-bottom: 15px; }
  .intro h1 { max-width: 17ch; }
  .stage { height: max(380px, 52svh); }
  .places { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 390px) {
  .languages a { padding-inline: 7px; }
  .route-nav a { padding: 8px 10px; font-size: .86rem; }
  .stage { height: 390px; }
}
.intro {min-height:135px}
.stage {height:max(450px,min(61vh,650px))}
#spatialHost {position:absolute;inset:0}
#spatialHost canvas {width:100%;height:100%}
#search {width:100%;font:inherit;border:1px solid var(--line);border-radius:8px;padding:9px 10px;margin-top:10px;background:#fff;color:var(--ink)}
#results {max-height:290px;overflow:auto;margin:9px 0 15px}
#results button {text-align:left;border:1px solid var(--line);padding:7px 9px;min-height:36px;border-radius:7px;color:var(--ink);background:#f8faf5;font-size:.91rem}
#results button[aria-current] {background:#15533f;color:#fff}
#results button span {display:block;font-size:.73rem;margin-top:1px;opacity:.8}
#selectedName {font-weight:700;color:var(--ink);margin-top:8px}
#actions {display:grid;gap:6px;margin:10px 0}
.action {background:#f6faf4;color:var(--ink);border:1px solid var(--line);border-radius:7px;text-align:left;padding:6px 9px;font-size:.85rem}
#kmv {display:inline-block;color:#1a664e;font-weight:675}
.marker {padding:4px 6px;font-size:.7rem}
@media(max-width:820px){.stage {height:max(360px,49svh)}#results {grid-template-columns:repeat(2,minmax(0,1fr));max-height:205px}.intro{min-height:0}}
.institutions {border:1px solid var(--line);border-radius:8px;background:#f2f6ef;padding:9px;margin:11px 0}
.institutions summary {font-weight:710;font-size:.92rem;cursor:pointer}
.institutions p {margin:6px 0;color:var(--muted);font-size:.8rem}
.institutions select,.institutions input[type=search] {width:100%;min-height:35px;font:inherit;font-size:.85rem;border:1px solid var(--line);border-radius:6px;padding:5px 7px;background:white;color:var(--ink)}
.institutions label[for] {display:block;margin:5px 0 3px;font-size:.8rem}
.institutions input[type=search] {margin:6px 0}
.verified-filter {display:flex;align-items:center;gap:6px;font-size:.76rem;line-height:1.25}
.poi-results {list-style:none;padding:0;margin:7px 0;max-height:260px;overflow:auto}
.poi-results li+li {margin-top:4px}
.poi-results button,#poiMore {width:100%;min-height:34px;text-align:left;background:#fff;border:1px solid var(--line);border-radius:6px;padding:5px 8px;color:var(--ink);font-size:.8rem}
.poi-results button[aria-pressed=true] {background:#d9eade;border-color:#c4dbca}
.poi-results small {display:block;margin-top:2px;color:var(--muted)}
.poi-card {border-top:1px solid var(--line);margin-top:8px;padding-top:8px;font-size:.84rem}
.poi-card a {display:block;color:#165843;margin:4px 0}
.marker.poi-point {background:#f7faf5;border:2px solid #336956;width:10px;height:10px;border-radius:50%;padding:0;z-index:2}
.marker.poi-point.confirmed {background:#f5c668;border-color:#774b16}
.marker.poi-point.selected {width:auto;height:auto;max-width:210px;background:#fff5d8;color:#382c18;border-radius:5px;padding:4px 7px;z-index:3}
.city-links{display:flex;gap:12px;flex-wrap:wrap;margin:0 0 14px}
.city-links a,.city-list a{display:block;padding:9px 13px;border:1px solid #cedbcf;border-radius:8px;background:#f7faf5;color:#175540;text-decoration:none;font-weight:680}
.city-links a:hover,.city-list a:hover{background:#e5efe4}
.city-list{list-style:none;padding:0;margin:14px 0;display:grid;grid-template-columns:repeat(auto-fit,minmax(205px,1fr));gap:9px}
.city-list a:focus-visible,.city-links a:focus-visible{outline:2px solid #185746;outline-offset:2px}
