:root { --green:#61B655; --cream:#FFFCF2; --bg:#fafaf7; --panel:#fff; --fg:#1d1d1b; --muted:#5d5d58; --line:#dcdcd6; --accent:#2b5f8a; --warn-bg:#fff6df; --warn-fg:#5a4300; }
@media (prefers-color-scheme: dark) {
  :root { --bg:#141417; --panel:#1c1c20; --fg:#ececea; --muted:#a6a6a2; --line:#34343a; --accent:#7db4e6; --warn-bg:#3a3017; --warn-fg:#f1dba0; }
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; display: flex; flex-direction: column; background: var(--bg); color: var(--fg); font: 16px/1.5 -apple-system, "Segoe UI", Helvetica, Arial, sans-serif; }
a { color: var(--accent); }
header.site { position: relative; z-index: 2000; padding: 10px 12px; background: var(--green); color: var(--cream); }
.navbar { display: flex; align-items: center; gap: 18px; padding: 8px 18px; border-radius: 16px; background: rgba(0,0,0,.18); }
.brand { margin-right: auto; min-width: 0; }
.brand h1 { margin: 0; font-size: 18px; line-height: 1.25; font-weight: 700; color: var(--cream); }
.nav-links { display: flex; align-items: center; gap: 20px; font-size: 14px; }
.nav-links a { color: rgba(255,252,242,.92); text-decoration: none; }
.nav-links a:hover { color: #fff; text-decoration: underline; }
.nav-cta { padding: 8px 16px; border-radius: 999px; background: var(--cream); color: var(--green); font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.nav-cta:hover { background: #fff; }
.mobile-only { display: none; }
.nav-toggle { display: none; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 10px; background: transparent; cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.nav-toggle span { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--cream); }
main { position: relative; overflow: hidden; flex: 1; min-height: 0; }
#mapbox { position: absolute; top: 0; right: 0; bottom: 0; left: 0; }
#map { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: #e8e8e4; }
#tilemsg { position: absolute; z-index: 500; left: 8px; right: 8px; bottom: 28px; margin: 0; padding: 6px 10px; border-radius: 6px; font-size: 13px; background: var(--warn-bg); color: var(--warn-fg); }
#list { position: absolute; z-index: 1200; top: 0; bottom: 0; left: 0; display: flex; flex-direction: column; overflow: hidden; background: var(--panel); border-right: 1px solid var(--line); }
.panehead { display: none; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.panehead h2 { font-size: 16px; margin: 0; }
.panehead button { font: inherit; font-size: 22px; line-height: 1; padding: 2px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--fg); cursor: pointer; }
#zonebar { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
#zonebar button { display: flex; align-items: center; gap: 8px; text-align: left; font: inherit; font-size: 13px; line-height: 1.25; padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--fg); cursor: pointer; }
#zonebar button:hover { background: color-mix(in srgb, var(--accent) 12%, var(--bg)); }
#zonebar button[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
#zonebar button:first-child { grid-column: 1 / -1; }
#zonebar .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
#works { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
#panelTab { position: absolute; z-index: 1100; cursor: pointer; color: var(--fg); background: var(--panel); border: 1px solid var(--line); font: inherit; }
#panelTab:hover { background: color-mix(in srgb, var(--accent) 12%, var(--panel)); }
#panelTab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#works { list-style: none; margin: 0; padding: 0; }
#works li { border-bottom: 1px solid var(--line); }
#works button { display: flex; width: 100%; gap: 10px; align-items: flex-start; text-align: left; background: none; border: 0; color: inherit; font: inherit; padding: 10px 14px; cursor: pointer; }
#works button:hover, #works li.sel button { background: color-mix(in srgb, var(--accent) 12%, transparent); }
#works button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
#works .dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 6px; flex: none; }
#works .nm { font-weight: 500; display: block; }
#works .wh { font-size: 13px; color: var(--muted); display: block; }
.empty { padding: 16px; color: var(--muted); }
.pop h3 { margin: 0 0 2px; font-size: 16px; }
.pop .meta { margin: 0 0 6px; font-size: 13px; color: #5d5d58; }
.pop p { margin: 0 0 6px; font-size: 14px; line-height: 1.4; }
.pop .go { font-size: 14px; margin: 8px 0 4px; }
.pop .go a { margin-right: 10px; font-weight: 600; }
.pop .small { font-size: 12px; margin: 0; }
.leaflet-container { font: inherit; }
@media (min-width: 761px) {
  #list { width: 360px; transition: transform .25s ease, visibility 0s; }
  body.panel-hidden #list { transform: translateX(-100%); visibility: hidden; transition: transform .25s ease, visibility 0s linear .25s; }
  #mapbox { left: 360px; transition: left .25s ease; }
  body.panel-hidden #mapbox { left: 0; }
  #panelTab { top: 50%; left: 360px; transform: translateY(-50%); width: 22px; height: 64px; padding: 0; border-left: 0; border-radius: 0 10px 10px 0; font-size: 22px; line-height: 1; box-shadow: 2px 0 6px rgba(0,0,0,.15); transition: left .25s ease; }
  body.panel-hidden #panelTab { left: 0; }
  #panelTab .lbl { display: none; }
}
@media (max-width: 760px) {
  html, body { height: 100%; }
  body { height: 100vh; height: 100dvh; }
  header.site { padding: 8px 10px; }
  .navbar { padding: 6px 8px 6px 14px; gap: 8px; }
  .brand h1 { font-size: 16px; }
  .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .nav-links { display: none; position: absolute; top: 100%; left: 10px; right: 10px; margin-top: 6px; padding: 6px; flex-direction: column; align-items: stretch; gap: 0; border-radius: 14px; background: #4a8f40; box-shadow: 0 6px 18px rgba(0,0,0,.3); z-index: 2100; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; font-size: 16px; }
  .mobile-only { display: block; }
  #list { right: 0; width: auto; border-right: 0; transition: transform .25s ease, visibility 0s; }
  .panehead { display: flex; }
  #zonebar button { font-size: 14px; padding: 9px 10px; }
  body.panel-hidden #list { transform: translateX(-100%); visibility: hidden; transition: transform .25s ease, visibility 0s linear .25s; }
  #panelTab { left: 50%; bottom: 28px; transform: translateX(-50%); padding: 10px 20px; border-radius: 999px; font-size: 15px; box-shadow: 0 2px 10px rgba(0,0,0,.25); white-space: nowrap; display: none; }
  body.panel-hidden #panelTab { display: block; }
  #panelTab .chev { display: none; }
}
@media (prefers-reduced-motion: reduce) { #list, #mapbox, #panelTab { transition: none !important; } }

.pop .photo { position: relative; margin: 0 0 8px; height: 200px; background: #2a2a28; border-radius: 6px; overflow: hidden; }
.pop .photo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.pop .photo .credit { position: absolute; right: 4px; bottom: 4px; font-size: 10px; color: #fff; background: rgba(0,0,0,.55); padding: 1px 5px; border-radius: 3px; }
.pop .photo img { cursor: zoom-in; }
.lightbox { position: fixed; inset: 0; z-index: 3000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px; background: rgba(0,0,0,.88); cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: calc(100% - 90px); object-fit: contain; }
.lightbox .lbcap { margin: 0; color: #fff; font-size: 14px; text-align: center; }
.lightbox .lbclose { font: inherit; font-size: 14px; padding: 8px 18px; border: 1px solid #fff; border-radius: 6px; background: transparent; color: #fff; cursor: pointer; }
