:root { --bg:#0f1720; --panel:#161f2b; --ink:#e7edf3; --muted:#93a1b0; --accent:#3ea6ff; --line:#26313f; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; font: 15px/1.45 system-ui, -apple-system, Segoe UI, Roboto, sans-serif; color: var(--ink); }
#app, #map { position: absolute; inset: 0; }
#map { background: var(--bg); }

#panel {
  position: absolute; top: 14px; left: 14px; width: 300px; max-width: calc(100vw - 28px);
  background: rgba(22,31,43,.94); backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-radius: 14px; padding: 14px; z-index: 5;
  box-shadow: 0 8px 30px rgba(0,0,0,.35);
}
#panel header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
#panel h1 { font-size: 17px; margin: 0; letter-spacing: .2px; }
#panel-toggle, #panel-open { background: none; border: 0; color: var(--muted); font-size: 20px; cursor: pointer; }
#panel-open { position: absolute; top: 14px; left: 14px; z-index: 5; width: 40px; height: 40px;
  background: rgba(22,31,43,.94); border: 1px solid var(--line); border-radius: 12px; }

.field { margin: 10px 0; display: block; }
.field > span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.field em { color: var(--accent); font-style: normal; }
input[type=search] {
  width: 100%; padding: 9px 10px; border-radius: 10px; border: 1px solid var(--line);
  background: #0e1620; color: var(--ink); font-size: 14px;
}
input[type=range] { width: 100%; accent-color: var(--accent); }

#results { list-style: none; margin: 6px 0 0; padding: 0; max-height: 240px; overflow: auto; }
#results li { padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 13px; }
#results li:hover, #results li:focus { background: #1d2836; outline: none; }
#results b { font-weight: 600; }

.hint { color: var(--muted); font-size: 12px; margin: 10px 0 0; }
.attribution { color: var(--muted); font-size: 11px; margin: 12px 0 0; line-height: 1.4; }

#status { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 6;
  background: rgba(22,31,43,.96); border: 1px solid var(--line); color: var(--ink);
  padding: 8px 14px; border-radius: 10px; font-size: 13px; max-width: 90vw; }
.maplibregl-ctrl-attrib { font-size: 10px; }

/* click-identify modal */
#feature-modal {
  position: absolute; bottom: 18px; right: 18px; z-index: 7; width: 300px; max-width: calc(100vw - 36px);
  background: rgba(22,31,43,.97); backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 34px rgba(0,0,0,.45);
  overflow: hidden;
}
.fm-head { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 12px; border-bottom: 1px solid var(--line); }
.fm-head strong { font-size: 14px; }
#fm-close { background: none; border: 0; color: var(--muted); font-size: 20px; cursor: pointer; line-height: 1; }
.fm-body { padding: 6px 12px; max-height: 220px; overflow: auto; }
.frow { display: flex; gap: 10px; padding: 4px 0; border-bottom: 1px solid rgba(255,255,255,.05); font-size: 12.5px; }
.frow:last-child { border-bottom: 0; }
.fk { color: var(--muted); flex: 0 0 42%; text-transform: capitalize; }
.fv { color: var(--ink); flex: 1; word-break: break-word; }
.fm-full { display: block; padding: 10px 12px; border-top: 1px solid var(--line);
  color: var(--accent); text-decoration: none; font-size: 13px; font-weight: 600; }
.fm-full:hover { background: #1d2836; }

/* /object full-record page */
#obj { max-width: 820px; margin: 0 auto; padding: 24px 18px 60px; }
#obj header { display: flex; align-items: baseline; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
#obj h1 { font-size: 20px; margin: 0; }
#obj .back { color: var(--accent); text-decoration: none; font-size: 14px; }
#obj-table { width: 100%; border-collapse: collapse; background: var(--panel);
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
#obj-table th, #obj-table td { text-align: left; padding: 10px 14px; font-size: 13.5px;
  border-bottom: 1px solid var(--line); vertical-align: top; }
#obj-table th { color: var(--muted); font-weight: 600; width: 40%; text-transform: capitalize; white-space: nowrap; }
#obj-table td { color: var(--ink); word-break: break-word; }
#obj-table tr:last-child th, #obj-table tr:last-child td { border-bottom: 0; }
.obj-err { color: #ff8a8a; margin-top: 16px; }
