/* Atlas: filters in a bar on top, the zone map takes the page, best spots listed in a side panel. */
:root {
  --bg: #0d1b22; --panel: #0a161c; --ink: #e4eef0; --muted: #8fa9b0; --line: #23404a;
  --accent: #4fd1c5; --accent-ink: #062024; --sel: #12303a; --field: #12262e;
  --gold: #ffd34d; --silver: #c9d3d8; --copper: #e39a6b;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--accent); }
header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 10px 16px; background: var(--panel); border-bottom: 1px solid var(--line); }
h1 { margin: 0; font-size: 20px; letter-spacing: .3px; white-space: nowrap; }
.tag { margin: 0 0 0 auto; color: var(--muted); font-size: 13px; max-width: 46ch; }
form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
label { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); background: var(--field);
  border: 1px solid var(--line); border-radius: 999px; padding: 3px 5px 3px 12px; }
label.check { color: var(--ink); padding: 7px 12px; cursor: pointer; }
label.check input { width: 16px; height: 16px; padding: 0; accent-color: var(--accent); }
input, select, button { font: inherit; }
label input[type=number], label select { border: 0; background: transparent; color: var(--accent); font-weight: 700; padding: 4px 6px; border-radius: 999px; }
label select option { background: var(--panel); color: var(--ink); }
input[type=number] { width: 58px; }
button { background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); border-radius: 999px; padding: 7px 16px; cursor: pointer; font-weight: 700; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
main { display: grid; grid-template-columns: minmax(0, 1fr) 400px; align-items: start; }
#mapbox { position: sticky; top: 0; min-width: 0; }
#map { width: 100%; aspect-ratio: 3 / 2; max-height: calc(100vh - 110px); background: #08131a; display: block; }
#tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px 0; }
#tabs button { background: var(--panel); color: var(--ink); border-color: var(--line); border-radius: 6px; font-weight: 500; padding: 4px 10px; font-size: 13px; }
#tabs button.on { border-color: var(--accent); color: var(--accent); }
#mapnote { margin: 6px 12px 10px; }
#map .grid { stroke: rgba(255,255,255,.3); stroke-width: .12; }
#map .zone { font-size: 4px; fill: var(--muted); font-weight: 600; }
#map .tick { font-size: 2.2px; fill: #fff; paint-order: stroke; stroke: rgba(0,0,0,.6); stroke-width: .4px; }
#map .dot { fill: #fff; stroke: #000; stroke-width: .15; opacity: .5; }
#map .dot.sel { fill: #ffd34d; opacity: .95; }
#map .ring { fill: rgba(255,211,77,.08); stroke: #ffd34d; stroke-width: .5; stroke-dasharray: 1.6 1; }
#map .pin circle { fill: #14181f; stroke: #ffd34d; stroke-width: .45; }
#map .pin text { font-size: 2.8px; fill: #ffd34d; font-weight: 700; text-anchor: middle; dominant-baseline: central; }
#map .pin { cursor: pointer; }
.muted { color: var(--muted); font-size: 13px; }
#results { background: var(--panel); border-left: 1px solid var(--line); min-height: calc(100vh - 60px); min-width: 0; }
#results h2 { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0; padding: 14px 14px 4px; }
#status { margin: 0; padding: 0 14px 8px; }
#reagents { padding: 0 14px 10px; }
#reagents summary { cursor: pointer; color: var(--muted); font-size: 13px; }
#reagents summary:hover { color: var(--ink); }
#reagents .chips { display: flex; flex-wrap: wrap; gap: 5px; padding-top: 8px; }
#reagents .chip { border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; font-size: 12px; }
.fb { margin: 0 14px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--field); }
.fb > summary { padding: 9px 12px; font-size: 14.5px; cursor: pointer; }
.fbform { display: flex; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 8px; padding: 0 12px 12px; position: relative; }
.fbform label.lbl { display: block; background: none; border: 0; border-radius: 0; padding: 0; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.fbform textarea, .fbform input[type=text] { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; resize: vertical; width: 100%; }
.fbform textarea:focus, .fbform input[type=text]:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.fbform .btn { align-self: flex-start; }
.fbform .note { margin: 0; font-size: 13px; color: var(--muted); }
.fbform .note:empty { display: none; }
.fbform .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.fbphotos { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-start; }
.fbphotos label.add { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border-radius: 12px; background: var(--bg); color: var(--ink);
  border: 1px solid var(--line); font-size: 14px; font-weight: 600; cursor: pointer; }
.fbphotos label.add:hover { border-color: var(--accent); }
.fbphotos label.add[hidden] { display: none; }
.fbphotos input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.fbphotos input[type=file]:focus-visible + .add { outline: 2px solid var(--accent); }
.fbphotos .th { position: relative; width: 56px; height: 56px; border-radius: 10px; overflow: hidden; background: var(--bg); }
.fbphotos .th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fbphotos .th button { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; border: 0; border-radius: 50%; background: rgba(20,24,20,.7); color: #fff;
  font-size: 15px; line-height: 1; cursor: pointer; padding: 0; font-weight: 400; }
.legal { font-size: 12px; }
#list { list-style: none; margin: 0; padding: 0; }
#list .empty { padding: 14px; }
.item { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 2px 8px; padding: 9px 14px; border-top: 1px solid var(--line); cursor: pointer; }
.item:hover { background: color-mix(in srgb, var(--sel) 55%, transparent); }
.item.on { background: var(--sel); box-shadow: inset 3px 0 0 var(--accent); }
.item .n { grid-row: span 2; align-self: center; font-size: 16px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.item .nm { font-weight: 600; color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .nm:hover { text-decoration: underline; }
.item .ev { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.item .sub { grid-column: 2 / 4; color: var(--muted); font-size: 12.5px; }
.item .brk, .item .parts { grid-column: 2 / 4; font-size: 12.5px; display: flex; flex-wrap: wrap; gap: 2px 12px; }
.item .brk { color: var(--muted); font-variant-numeric: tabular-nums; }
.part { white-space: nowrap; }
.g { color: var(--gold); } .s { color: var(--silver); } .c { color: var(--copper); }
.badge { font-size: 11px; border: 1px solid var(--line); border-radius: 5px; padding: 0 4px; color: var(--muted); margin-left: 4px; }
footer { color: var(--muted); font-size: 13px; padding: 18px 16px 30px; border-top: 1px solid var(--line); max-width: 1100px; }
@media (max-width: 860px) {
  main { grid-template-columns: minmax(0, 1fr); }
  #mapbox { position: static; }
  #results { border-left: 0; border-top: 1px solid var(--line); min-height: 0; }
  .tag { margin-left: 0; }
}
