@font-face { font-family: "Comfortaa"; src: url(/fonts/comfortaa.woff2) format("woff2"); font-weight: 300 700; font-display: swap; }
:root {
  --bg: #b2a7cd; --panel: #74eeb1; --ink: #00081c; --ink-soft: #1d2540; --pill: #9987c5;
  --surface: rgba(255,255,255,.78); --line: rgba(0,8,28,.1); --shadow: 0 24px 60px rgba(0,8,28,.18);
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: "Comfortaa", system-ui, sans-serif; overscroll-behavior: none; }
button { font: inherit; color: inherit; }
.view { min-height: 100%; padding: calc(24px + var(--safe-t)) 20px calc(24px + var(--safe-b)); max-width: 520px; margin: 0 auto; }
.view.full { position: fixed; inset: 0; max-width: none; padding: 0; background: #000; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.dot { width: 14px; height: 14px; border-radius: 50%; background: var(--panel); border: 2px solid var(--ink); }
h1 { font-size: 2rem; line-height: 1.15; margin: 28px 0 8px; }
h2 { font-size: 1rem; margin: 28px 0 8px; }
.lede { color: var(--ink-soft); }
.fine { font-size: .75rem; color: var(--ink-soft); }
.note { background: var(--surface); border-radius: 14px; padding: 10px 14px; margin: 12px 0; font-size: .85rem; }
.error { color: #8a1c1c; font-size: .85rem; }
.btn { border: 0; border-radius: 999px; padding: 14px 22px; background: var(--surface); font-weight: 700; cursor: pointer; width: 100%; margin: 6px 0; }
.btn.primary { background: var(--panel); }
.btn.danger { background: #ffb4a8; }
.btn.small { width: auto; padding: 8px 14px; font-size: .85rem; margin: 0; }
.list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.list li { background: var(--surface); border-radius: 14px; padding: 12px 14px; display: flex; justify-content: space-between; cursor: pointer; font-size: .9rem; }
#cam { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dim { position: absolute; inset: 0; background: #000; color: #888; display: grid; place-items: center; text-align: center; padding: 40px; }
.hud { position: absolute; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; color: #fff; z-index: 2; }
.hud.top { top: 0; padding-top: calc(12px + var(--safe-t)); font-size: .75rem; flex-wrap: wrap; background: linear-gradient(#000a, transparent); }
.hud.bottom { bottom: 0; padding-bottom: calc(20px + var(--safe-b)); background: linear-gradient(transparent, #000b); }
.hint { position: absolute; left: 0; right: 0; bottom: calc(120px + var(--safe-b)); text-align: center; color: #fff; font-size: .8rem; margin: 0; z-index: 2; text-shadow: 0 1px 4px #000; }
.shutter { width: 76px; height: 76px; border-radius: 50%; border: 5px solid #fff; background: var(--panel); cursor: pointer; }
.shutter:active { transform: scale(.94); }
.seg { display: grid; gap: 6px; }
.seg button { border: 0; border-radius: 999px; padding: 8px 14px; background: #fff3; color: #fff; font-weight: 700; }
.seg button.on { background: var(--panel); color: var(--ink); }
.side { display: grid; gap: 6px; }
#rv { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: manipulation; }
.chips { position: absolute; top: calc(10px + var(--safe-t)); left: 0; right: 0; display: flex; gap: 6px; flex-wrap: wrap; padding: 0 12px; z-index: 2; }
.chip { border-radius: 999px; padding: 4px 10px; font-size: .72rem; font-weight: 700; color: var(--ink); }
.palette { position: absolute; left: 0; right: 0; bottom: calc(110px + var(--safe-b)); display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; padding: 0 12px; z-index: 3; }
.palette button { border: 2px solid #fff; border-radius: 999px; padding: 8px 12px; font-weight: 700; font-size: .8rem; }
#map { position: absolute; inset: 0; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; background: var(--surface); backdrop-filter: blur(14px); border-radius: 24px 24px 0 0; padding: 14px 16px calc(14px + var(--safe-b)); box-shadow: var(--shadow); max-height: 52%; overflow: auto; z-index: 3; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.toggle { font-size: .8rem; display: flex; align-items: center; gap: 6px; }
.share { font-size: 2.2rem; font-weight: 700; margin: 6px 0; }
.share small { font-size: .8rem; font-weight: 400; margin-left: 8px; color: var(--ink-soft); }
.grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; max-width: 260px; }
.grid i { aspect-ratio: 1; border-radius: 4px; background: rgba(0,8,28,.1); }
.grid i.on { background: var(--panel); border: 1px solid var(--ink); }
.grid i.band { background: #74eeb166; }
.toast { position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: .85rem; z-index: 10; max-width: 90vw; }
.shutter.busy { opacity: .5; pointer-events: none; }
#tr { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.btn.small.on { background: var(--panel); }
.panel { position: absolute; left: 8px; right: 8px; bottom: calc(96px + var(--safe-b)); background: var(--surface); backdrop-filter: blur(14px); border-radius: 18px; padding: 12px; z-index: 3; display: grid; gap: 8px; max-height: 44%; overflow: auto; }
.chipbar { display: flex; flex-wrap: wrap; gap: 6px; }
.chipbar button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 10px; font-size: .78rem; }
.chipbar button.on { background: var(--panel); border-color: var(--ink); font-weight: 700; }
.field { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; background: #fff; }
.pair { display: flex; gap: 6px; }
.detail { position: absolute; left: 8px; right: 8px; top: calc(8px + var(--safe-t)); max-width: 520px; max-height: 62%; overflow: auto; background: var(--surface-strong, #fffe); backdrop-filter: blur(14px); border-radius: 18px; padding: 12px; z-index: 5; box-shadow: var(--shadow); }
.d-photo { position: relative; display: inline-block; max-width: 100%; margin: 8px 0 4px; line-height: 0; }
.d-photo img { max-width: 100%; max-height: 34vh; border-radius: 10px; display: block; }
.d-boxes { position: absolute; inset: 0; }
.d-box { position: absolute; border: 2px dashed; border-radius: 4px; cursor: pointer; }
.d-box.on { border-style: solid; border-width: 3px; box-shadow: 0 0 0 2px #fff8; }
.d-box span { position: absolute; left: -2px; bottom: 100%; color: #fff; font-size: 10px; line-height: 1.5; padding: 0 5px; border-radius: 4px 4px 0 0; white-space: nowrap; }
.list.small li { display: block; font-size: .8rem; padding: 8px 10px; }
.list.small li.on { outline: 2px solid var(--ink); }
.pin { width: 24px; height: 24px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 2px 8px #0008; cursor: grab; }
.pin:active { cursor: grabbing; }
.pin-cam { background: #1d2540; }
#pick-map { position: absolute; inset: 0; }
.crosshair { position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; transform: translate(-50%, -50%); border-radius: 50%; border: 4px solid #fff; background: #1d2540; box-shadow: 0 2px 10px #0009; z-index: 3; pointer-events: none; }
#h-gps.manual { text-decoration: underline; cursor: pointer; }
.photo-pop img { display: block; width: 180px; border-radius: 8px; margin-bottom: 4px; }
