:root { color-scheme: dark; --ink: #efeadc; --muted: #b7b9a7; --line: #44493a; --gold: #d4b46e; --panel: #242820; }
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: #d7c89f; color: var(--ink); font: 14px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; border: 1px solid var(--line); border-radius: 6px; background: #34392d; color: var(--ink); padding: 9px 12px; }
button:hover { background: #454c39; border-color: #827750; }
button:disabled { opacity: .45; cursor: default; }
input { min-width: 0; border: 1px solid var(--line); border-radius: 6px; background: #1c2019; color: var(--ink); padding: 10px 12px; }
input:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
input[type=checkbox] { accent-color: var(--gold); width: 16px; height: 16px; }
a { color: var(--gold); text-underline-offset: 3px; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 1100; width: 310px; padding: 30px 24px 18px; display: flex; flex-direction: column; background: var(--panel); border-right: 1px solid #53573f; box-shadow: 4px 0 25px #14170e33; }
.eyebrow { color: var(--gold); font-size: 10px; font-weight: 650; letter-spacing: 1.8px; }
h1 { font: 42px/1.15 Georgia, serif; margin: 14px 0 12px; letter-spacing: -1px; }
h1 span { display: block; color: var(--muted); font: 14px/1.5 system-ui, sans-serif; letter-spacing: 0; margin-top: 6px; }
.intro { color: var(--muted); font-size: 12px; margin-bottom: 26px; }
.search-label { font-size: 12px; margin-bottom: 7px; }
.filters { display: grid; gap: 10px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.filters label { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.filters span { margin-left: auto; color: var(--muted); font-size: 12px; }
.list-heading { display: flex; align-items: center; justify-content: space-between; margin-top: 15px; }
h2 { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.3px; }
#result-count { color: var(--muted); font-size: 11px; }
.location-list { list-style: none; margin: 4px -10px 12px; padding: 0 5px; overflow-y: auto; flex: 1; min-height: 70px; scrollbar-width: thin; scrollbar-color: #62634c transparent; }
.location-list button { width: 100%; border: 0; background: transparent; text-align: left; display: flex; align-items: center; gap: 10px; padding: 9px 7px; }
.location-list button:hover { background: #353b2d; }
.list-dot { color: var(--gold); font-size: 17px; }
.resource-list-icon { display: block; width: 26px; height: 26px; }
.resource-pin { filter: drop-shadow(0 2px 3px #0009); }
.resource-symbol > svg { display: block; width: 100%; height: 100%; }
.point-icon-image { width: 24px; height: 24px; }
.location-list small { display: block; color: var(--muted); font-size: 10px; }
.empty { padding: 16px 7px; color: var(--muted); }
.sidebar-actions { display: grid; gap: 7px; }
.server-state { font-size: 11px; color: var(--gold); margin: 10px 0 0; }
dialog { width: min(370px, calc(100% - 30px)); color: var(--ink); background: var(--panel); border: 1px solid var(--gold); border-radius: 10px; padding: 24px; }
dialog::backdrop { background: #111a; }
dialog label { display: block; margin: 15px 0 7px; }
dialog input { width: 100%; }
#edit-error { color: #ffba9e; font-size: 12px; }
footer { font-size: 11px; color: var(--muted); padding-top: 12px; }
footer p { margin: 8px 0; }
.credits { opacity: .75; font-size: 10px; }
#map { height: 100%; margin-left: 310px; background: #d7c89f; }
.coordinate-card { position: fixed; right: 20px; bottom: 30px; width: 310px; padding: 17px; z-index: 1000; background: #242820f5; border: 1px solid #68684c; border-radius: 10px; box-shadow: 0 8px 30px #171c1950; }
.card-heading { display: flex; align-items: center; justify-content: space-between; }
#zoom-level { font-size: 10px; color: var(--muted); }
.coordinates { display: flex; gap: 12px; margin: 12px 0; }
.coordinates label { display: flex; align-items: center; gap: 8px; color: var(--gold); font-size: 12px; }
.coordinates input { width: 100%; font: 15px ui-monospace, monospace; padding: 8px; }
.coordinate-actions { display: flex; gap: 8px; }
.coordinate-actions button { flex: 1; font-size: 12px; }
.save-point { display: flex; gap: 8px; margin-top: 9px; }
.save-point input { width: 100%; font-size: 12px; }
.save-point button { color: #242820; background: var(--gold); font-weight: 650; }
.point-icon-preview:not([hidden]) { display: flex; align-items: center; gap: 8px; min-height: 24px; margin-top: 8px; color: var(--gold); font-size: 11px; }
#status { min-height: 18px; font-size: 11px; color: var(--muted); margin: 10px 0 0; }
.town-pin, .custom-pin, .selected-pin { display: grid; place-items: center; border-radius: 50%; border: 2px solid #f0dfac; color: #f6e7c4; background: #4a5039; box-shadow: 0 2px 6px #0007; font: bold 15px Georgia, serif; }
.custom-pin { background: #855936; }
.selected-pin { background: #a63d2d; border: 3px solid #fff2c7; box-shadow: 0 0 0 6px #a63d2d40; }
.town-label { background: #282e22e8; color: #f5e9cb; border: 1px solid #8c865a; box-shadow: 0 2px 4px #0002; font-size: 11px; }
.leaflet-tooltip-top.town-label::before { border-top-color: #8c865a; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: #f3eddc; color: #32382a; }
.leaflet-popup-content { min-width: 145px; }
.leaflet-popup-content strong { font: bold 19px Georgia, serif; }
.leaflet-popup-content p { margin: 8px 0; }
.leaflet-popup-content button { font-size: 12px; margin: 4px 4px 0 0; }
.leaflet-control-zoom a { background: #242820; color: var(--ink); border-color: var(--line); }
.leaflet-control-zoom a:hover { background: #454c39; color: white; }
.leaflet-control-attribution { max-width: 100%; font-size: 10px; }
.map-error { position: fixed; top: 20px; left: calc(50% + 155px); transform: translateX(-50%); max-width: 420px; background: #fff1cf; color: #693a20; padding: 14px 20px; z-index: 1200; border: 1px solid #b78843; border-radius: 6px; }
.panel-toggle { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
@media (max-width: 760px) {
  #map { margin-left: 0; }
  .sidebar { width: min(310px, 87vw); padding-top: 64px; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.is-open { transform: translateX(0); }
  .panel-toggle { display: block; position: fixed; top: 12px; left: 12px; z-index: 1150; box-shadow: 0 2px 10px #0003; }
  .coordinate-card { right: 12px; bottom: 28px; width: min(310px, calc(100vw - 24px)); padding: 12px 15px; }
  .map-error { left: 50%; width: calc(100% - 24px); top: 68px; }
  .leaflet-top.leaflet-right { top: 4px; }
}
@media (max-height: 650px) { .sidebar { padding-top: 16px; } h1 { font-size: 32px; margin: 8px 0; } .intro { display: none; } footer p:first-child { display: none; } .filters { padding: 10px 0; } }
@media (max-height: 650px) and (max-width: 760px) { .sidebar { padding-top: 60px; overflow-y: auto; } }
@media (prefers-reduced-motion: reduce) { .sidebar { transition: none; } }
