* { box-sizing: border-box; }
:root { color-scheme: dark; --bg:#101510; --panel:#1b241e; --text:#edf1e8; --muted:#a9b5a7; --accent:#c8df8e; }
body { margin:0; background:var(--bg); color:var(--text); font:15px/1.55 system-ui,sans-serif; }
header, main { width:100%; max-width:1080px; margin:auto; padding:20px; }
header { padding-top:max(24px,env(safe-area-inset-top)); padding-bottom:0; }
small { color:var(--accent); letter-spacing:.13em; font-size:10px; }
h1 { font-size:clamp(25px,6vw,36px); line-height:1.2; margin:12px 0; }
p { color:var(--muted); overflow-wrap:anywhere; }
button, select, .link-button { font:inherit; color:var(--text); background:#26332a; border:1px solid #495a46; border-radius:10px; padding:10px 12px; cursor:pointer; min-height:44px; }
button { line-height:1.4; overflow-wrap:anywhere; }
button:focus-visible, select:focus-visible, a:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
button:hover, .link-button:hover { background:#374a37; }
button:active { background:#405638; }
.controls { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:16px; background:var(--panel); padding:16px; border-radius:16px; }
label:not(.check) { display:flex; flex-direction:column; gap:7px; min-width:0; }
select { width:100%; min-width:0; max-width:100%; text-overflow:ellipsis; }
.check { display:flex; align-items:center; gap:10px; grid-column:1/-1; min-height:36px; cursor:pointer; }
.check input { width:20px; height:20px; margin:0; accent-color:var(--accent); flex-shrink:0; }
#status { grid-column:1/-1; margin:0; font-size:13px; }
.toolbar { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; margin:20px 0 12px; gap:12px; }
.toolbar strong { font-size:18px; min-width:0; overflow-wrap:anywhere; }
.zoom-controls { display:flex; flex-wrap:nowrap; align-items:center; gap:10px; flex-shrink:0; }
.zoom-controls button { min-width:46px; height:46px; }
#fit { padding-inline:16px; }
#viewport { height:60vh; height:60svh; min-height:320px; max-height:650px; overflow:hidden; background:#151c18; border:1px solid #40503d; border-radius:14px; touch-action:none; position:relative; cursor:grab; }
#viewport:active { cursor:grabbing; }
#plane { position:absolute; left:0; top:0; transform-origin:0 0; pointer-events:none; }
#map-image { display:block; width:100%; height:100%; pointer-events:none; user-select:none; }
#markers { position:absolute; inset:0; pointer-events:none; }
.pin { position:absolute; transform:translate(-50%,-50%); border-radius:50%; border:2px solid #141a12; width:44px; min-width:44px; height:44px; min-height:44px; padding:0; line-height:40px; background:#d7aa58; color:#12180f; font-size:13px; font-weight:800; z-index:1; pointer-events:auto; box-shadow:0 2px 6px #0005; }
.pin:hover { background:#edc980; }
.pin.exact { background:#b4dd85; border-radius:10px; }
.pin.selected { border-color:#efffc9; box-shadow:0 0 0 3px #a8c27766; }
.pin.found { background:#8eaa76; }
.hint { font-size:12px; line-height:1.65; }
#map-credit { margin-top:14px; padding:12px 14px; background:#1b241e; border-radius:10px; }
#map-error { position:absolute; inset:30px; text-align:center; pointer-events:none; }
#map-section { scroll-margin-top:12px; }
.card { min-width:0; background:var(--panel); padding:18px; margin:14px 0; border-radius:16px; border:1px solid #354230; scroll-margin-top:16px; }
.card.active { border-color:var(--accent); box-shadow:0 0 0 1px var(--accent); }
.card h2 { font-size:18px; line-height:1.4; margin:0 0 8px; overflow-wrap:anywhere; }
.card p { margin:10px 0; }
.card .place { font-size:14px; color:var(--accent); margin:0 0 12px; }
.badges { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:12px; }
.badge { display:inline-block; font-size:11px; line-height:1.5; border:1px solid #647052; border-radius:6px; padding:3px 7px; color:var(--accent); max-width:100%; overflow-wrap:anywhere; }
.badge.warn { color:#e4b565; border-color:#96733d; }
.description { line-height:1.65; }
.photo-button { display:block; padding:0; margin:14px 0; width:100%; overflow:hidden; background:#111911; cursor:zoom-in; text-align:left; }
.photo-button img { display:block; max-height:230px; width:100%; object-fit:contain; border-radius:9px 9px 0 0; }
.photo-button span { display:block; padding:8px 12px; font-size:12px; color:var(--accent); }
.meta, footer { font-size:12px; color:var(--muted); }
a { color:var(--accent); overflow-wrap:anywhere; text-underline-offset:3px; }
.actions { display:grid; grid-template-columns:repeat(auto-fit,minmax(125px,1fr)); gap:10px; align-items:stretch; margin-top:14px; }
.actions button, .link-button { min-width:0; text-align:center; }
.link-button { display:flex; align-items:center; justify-content:center; text-decoration:none; }
.actions .secondary { background:transparent; }
.card.done .badge, .card.done h2 { opacity:.75; }
dialog { border:1px solid #63724f; border-radius:16px; background:var(--bg); color:var(--text); width:min(94vw,800px); max-width:94vw; max-height:90vh; max-height:90svh; padding:16px; }
dialog::backdrop { background:#000c; }
.dialog-head { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; padding-bottom:14px; }
.dialog-head h2, .dialog-head p { font-size:17px; line-height:1.4; margin:0; flex:1 1 160px; min-width:0; overflow-wrap:anywhere; }
.dialog-head button { flex-shrink:0; }
dialog img { display:block; max-width:100%; width:auto; max-height:68vh; max-height:68svh; object-fit:contain; margin:0 auto; }
#spots { width:min(94vw,540px); }
#spot-list { display:flex; flex-direction:column; gap:12px; max-height:62vh; max-height:62svh; overflow:auto; padding:3px; }
#spot-list button { width:100%; text-align:left; padding:12px 14px; flex-shrink:0; }
.spot-place { display:block; color:var(--muted); font-size:12px; margin-top:4px; }
footer { padding:20px 0 max(30px,env(safe-area-inset-bottom)); }
#empty { text-align:center; padding:30px 12px; }
[hidden] { display:none !important; }
@media (max-width:359px) { header,main { padding-inline:14px; } .controls { grid-template-columns:minmax(0,1fr); } .card { padding:15px; } .toolbar { align-items:flex-start; } }
@media (min-width:850px) { #cards { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:16px; margin-top:20px; align-items:start; } .card { margin:0; } .controls { grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto; align-items:end; } .check { grid-column:auto; min-height:44px; } }
