html{color-scheme:light}
:root{padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}
body{margin:0}
[hidden]{display:none!important}
:root {
--bg: #eef1ec;
--panel: #ffffff;
--ink: #17201a;
--muted: #5d6b61;
--line: #d3dbd4;
--accent: #1f6b3a;
--accent-ink: #ffffff;
--accent-soft: #dcebdf;
--warn: #9a5b00;
--warn-soft: #fbedd5;
--info: #2c5d8a;
--info-soft: #dde8f3;
--bad: #a33a2a;
--bad-soft: #f6e0dc;
--f-display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
--f-body: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
--f-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) {
--bg: #111613; --panel: #19201b; --ink: #e6ece7; --muted: #95a399; --line: #2c3730;
--accent: #4fb36e; --accent-ink: #0c1a10; --accent-soft: #1f3326; --warn: #f0b45a; --warn-soft: #3a2c14;
--info: #7fb2e5; --info-soft: #1b2a3a; --bad: #ef8d7c; --bad-soft: #3a1d18;
color-scheme: dark;
}
}
:root[data-theme="dark"] {
--bg: #111613; --panel: #19201b; --ink: #e6ece7; --muted: #95a399; --line: #2c3730;
--accent: #4fb36e; --accent-ink: #0c1a10; --accent-soft: #1f3326; --warn: #f0b45a; --warn-soft: #3a2c14;
--info: #7fb2e5; --info-soft: #1b2a3a; --bad: #ef8d7c; --bad-soft: #3a1d18;
color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { overflow-x: hidden; -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 15px; }
a { color: var(--accent); }
.wrap { max-width: 560px; margin: 0 auto; padding-inline: 16px; padding-block: 0 32px; display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
.wrap > *, .search > * { min-width: 0; }
header.bar {
position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5;
background: var(--bg); padding-block: 8px 6px; display: grid; gap: 6px;
}
.meta { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 8px; flex-wrap: wrap; }
.meta h1 { margin: 0; font-family: var(--f-display); font-weight: 700; font-size: 22px; letter-spacing: .04em; text-transform: uppercase; }
.meta span { font-family: var(--f-mono); font-size: 12px; color: var(--muted); }
.titleline { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.back { font-family: var(--f-display); font-weight: 600; font-size: 16px; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; color: var(--accent); white-space: nowrap; padding: 4px 0; }
.back:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.hint { font-size: 12px; color: var(--muted); }
.hint.err { color: var(--warn); font-weight: 500; }
.hint.ok { color: var(--accent); font-weight: 500; }
.flag { background: var(--warn-soft); color: var(--warn); border-radius: 8px; padding: 8px 10px; font-size: 13px; font-weight: 500; }
.banner { background: var(--info-soft); color: var(--info); border-radius: 10px; padding: 8px 10px; font-size: 13px; font-weight: 500; }
.banner a { color: inherit; font-weight: 600; }
.empty { color: var(--muted); padding: 18px 4px; text-align: center; }
.btn {
display: inline-flex; align-items: center; justify-content: center; gap: 8px;
font-family: var(--f-display); font-weight: 700; font-size: 18px; letter-spacing: .06em; text-transform: uppercase;
padding: 12px 16px; border: 0; border-radius: 12px; background: var(--accent); color: var(--accent-ink); cursor: pointer; text-decoration: none;
}
.btn.ghost { background: var(--panel); color: var(--accent); border: 2px solid var(--accent); padding: 10px 14px; }
.btn:disabled { opacity: .5; cursor: default; }
.btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

/* lookup */
#q { width: 100%; }
.search { display: flex; gap: 8px; }
#q {
flex: 1; min-width: 0; font-family: var(--f-mono); font-size: 24px; font-weight: 600; letter-spacing: .06em;
padding: 8px 10px; border: 2px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--ink);
font-variant-numeric: tabular-nums;
}
#q:focus { outline: none; border-color: var(--accent); }
#clear {
font-family: var(--f-display); font-weight: 700; font-size: 16px; letter-spacing: .06em; text-transform: uppercase;
padding: 0 12px; border: 0; border-radius: 10px; background: var(--accent); color: var(--accent-ink); cursor: pointer;
}
#clear:focus-visible, #scan:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
#scan {
display: grid; place-items: center; width: 50px; flex: none; border-radius: 10px; cursor: pointer;
background: var(--panel); color: var(--accent); border: 2px solid var(--accent);
}
#scan.on { background: var(--accent); color: var(--accent-ink); }
#cambox { position: relative; border-radius: 14px; overflow: hidden; background: #000; height: 150px; }
#vid { width: 100%; height: 100%; object-fit: cover; display: block; }
#vid.mirror { transform: scaleX(-1); }
.guide { position: absolute; left: 10%; right: 10%; top: 30%; bottom: 30%; border: 3px solid var(--accent); border-radius: 8px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); transition: border-color .15s; }
#cambox.flash .guide { border-color: #ffffff; }
#stop, #flip { position: absolute; bottom: 8px; font-family: var(--f-display); font-weight: 700; font-size: 15px; letter-spacing: .06em; text-transform: uppercase; padding: 6px 12px; border: 0; border-radius: 8px; background: var(--panel); color: var(--ink); cursor: pointer; }
#stop { right: 8px; }
#flip { left: 8px; }
body.scanning .meta, body.scanning .banner { display: none; }
.hit { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: grid; gap: 8px; }
.loc { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cell { background: var(--accent-soft); border-radius: 10px; padding: 8px 10px; display: grid; }
.cell b { font-family: var(--f-display); font-weight: 600; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.cell i { font-style: normal; font-family: var(--f-display); font-weight: 700; font-size: 44px; line-height: 1; font-variant-numeric: tabular-nums; color: var(--ink); }
.cell i.small { font-size: 30px; padding-block: 11px; }
.desc { font-weight: 600; font-size: 17px; }
.fix { color: var(--muted); font-size: 13px; }
.ids { display: flex; flex-wrap: wrap; gap: 6px 14px; font-family: var(--f-mono); font-size: 13px; color: var(--muted); }
.ids em { font-style: normal; color: var(--ink); }
.list { display: grid; gap: 6px; }
.list h2 { margin: 4px 0 0; font-family: var(--f-display); font-size: 14px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.row {
display: grid; grid-template-columns: 74px 1fr; gap: 10px; align-items: center; text-align: left;
background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; cursor: pointer; color: var(--ink); font: inherit;
}
.row:focus-visible { outline: 2px solid var(--accent); }
.row .pos { font-family: var(--f-mono); font-weight: 600; font-size: 13px; font-variant-numeric: tabular-nums; }
.row .txt { min-width: 0; display: grid; }
.row .txt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .txt small { font-family: var(--f-mono); color: var(--muted); font-size: 12px; }
mark { background: var(--accent); color: var(--accent-ink); border-radius: 2px; padding: 0 1px; }
.map { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 8px 10px; display: grid; gap: 4px; }
.maphead { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 12px; color: var(--muted); }
.maphead b { font-family: var(--f-display); font-size: 14px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.map svg { width: 100%; height: auto; max-height: 30vh; max-height: 30svh; display: block; }
.m-board { fill: var(--bg); }
.m-rail { fill: var(--muted); }
.m-t { fill: var(--line); stroke: var(--panel); stroke-width: .15; cursor: pointer; }
.m-alt { fill: var(--accent-soft); stroke: var(--accent); stroke-width: .25; }
.m-hit { fill: var(--accent); stroke: var(--ink); stroke-width: .3; }
.m-cross { stroke: var(--warn); stroke-width: .18; stroke-dasharray: .6 .6; opacity: .7; pointer-events: none; }
.m-ring { fill: none; stroke: var(--warn); stroke-width: .5; pointer-events: none; transform-box: fill-box; transform-origin: center; }
@media (prefers-reduced-motion: no-preference) { .m-ring { animation: ping 1.4s ease-out 3; } }
@keyframes ping { 0% { opacity: 1; transform: scale(.5); } 100% { opacity: 0; transform: scale(1.5); } }

/* index */
.home-head { padding-block: 14px 4px; display: grid; gap: 2px; }
.home-head h1 { margin: 0; font-family: var(--f-display); font-weight: 700; font-size: 30px; letter-spacing: .04em; text-transform: uppercase; }
.home-head p { margin: 0; color: var(--muted); font-size: 13px; }
.sec { margin: 8px 0 0; font-family: var(--f-display); font-size: 14px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.cards { display: grid; gap: 10px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; display: grid; }
.card-main { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px; color: var(--ink); text-decoration: none; border-radius: 14px; }
a.card-main:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.thumb { width: 72px; height: 72px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); object-fit: cover; display: grid; place-items: center; overflow: hidden; color: var(--muted); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-txt { min-width: 0; display: grid; gap: 3px; }
.card-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.code { font-family: var(--f-mono); font-weight: 600; font-size: 17px; letter-spacing: .04em; }
.card-desc { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-meta { font-family: var(--f-mono); font-size: 12px; color: var(--muted); }
.chip { font-family: var(--f-display); font-weight: 600; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; border-radius: 999px; padding: 2px 8px; background: var(--line); color: var(--ink); white-space: nowrap; }
.chip.active { background: var(--accent-soft); color: var(--accent); }
.chip.pending { background: var(--info-soft); color: var(--info); }
.chip.processing { background: var(--info-soft); color: var(--info); }
.chip.needs_photos, .chip.flags { background: var(--warn-soft); color: var(--warn); }
.chip.superseded, .chip.archived { background: var(--line); color: var(--muted); }
.card-note { margin: 0 10px 10px; }
.card-actions { display: flex; gap: 8px; padding: 0 10px 10px; flex-wrap: wrap; }
.card-actions .btn { font-size: 15px; padding: 8px 12px; }
details.prev { padding: 0 10px 10px; font-size: 13px; color: var(--muted); }
details.prev summary { cursor: pointer; padding: 4px 0; }
details.prev ul { margin: 4px 0 0; padding-left: 18px; display: grid; gap: 4px; }
details.archive > summary { cursor: pointer; list-style: none; }
details.archive > summary::-webkit-details-marker { display: none; }
details.archive > summary::after { content: " ▸"; }
details.archive[open] > summary::after { content: " ▾"; }
details.archive .cards { margin-top: 10px; }
.add-big { width: 100%; margin-top: 6px; }
.tip { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: start; background: var(--info-soft); color: var(--info); border-radius: 12px; padding: 10px 12px; font-size: 13px; }
.tip button { background: none; border: 0; color: inherit; font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; }

/* add */
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field > label, .group h2 { font-family: var(--f-display); font-size: 15px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0; }
.field input, .field textarea {
width: 100%; min-width: 0; font: inherit; font-size: 17px; padding: 10px 12px; border: 2px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--ink);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field input.mono { font-family: var(--f-mono); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.field small, .group p { color: var(--muted); font-size: 12px; margin: 0; }
.group { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: grid; gap: 8px; }
.group-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pick { position: relative; overflow: hidden; }
.pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; }
.shot { position: relative; aspect-ratio: 3 / 4; border-radius: 8px; overflow: hidden; background: var(--bg); border: 1px solid var(--line); }
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot button { position: absolute; top: 3px; right: 3px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 16px; line-height: 1; cursor: pointer; }
.shot .bar { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--accent); width: 0; transition: width .2s; }
.shot.done::after { content: "✓"; position: absolute; inset: auto 4px 6px auto; color: #fff; background: var(--accent); border-radius: 50%; width: 20px; height: 20px; display: grid; place-items: center; font-size: 12px; }
.done-box { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: grid; gap: 10px; text-align: center; }
.done-box h2 { margin: 0; font-family: var(--f-display); font-size: 26px; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); }
.field input.secret { font-family: var(--f-mono); letter-spacing: .08em; -webkit-text-security: disc; text-security: disc; }

/* scanner: link to POG info */
.gear { display: inline-grid; place-items: center; width: 32px; height: 32px; margin: -6px 0; border-radius: 8px; color: var(--muted); align-self: center; }
.gear:focus-visible { outline: 2px solid var(--accent); }

/* POG info page */
.about .panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: grid; gap: 8px; }
.about h2 { margin: 0; font-family: var(--f-display); font-size: 16px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.about .lede { margin: 0; font-weight: 600; font-size: 17px; }
.about .sub { margin: 0; color: var(--muted); font-size: 12px; }
.facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; margin: 0; font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-family: var(--f-mono); font-size: 13px; overflow-wrap: anywhere; }
.flaggroup { display: grid; gap: 6px; }
.flaggroup + .flaggroup { margin-top: 6px; }
a.row { text-decoration: none; }
.tablewrap { overflow-x: auto; margin: 0 -4px; }
table.fx { width: 100%; border-collapse: collapse; font-size: 13px; }
table.fx th { text-align: left; font-family: var(--f-display); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 4px; border-bottom: 1px solid var(--line); }
table.fx td { padding: 6px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.fx tr:last-child td { border-bottom: 0; }
table.fx .num { text-align: right; font-family: var(--f-mono); }
ul.plain { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 14px; }
details.photos > summary { cursor: pointer; list-style: none; }
details.photos > summary::-webkit-details-marker { display: none; }
details.photos > summary h2::after { content: " ▸"; }
details.photos[open] > summary h2::after { content: " ▾"; }
details.photos[open] .sub { margin-top: 8px; }
.photogrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.photogrid a { display: grid; gap: 2px; text-decoration: none; color: var(--muted); font-size: 11px; font-family: var(--f-mono); }
.photogrid img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); }
.progress { display: grid; gap: 6px; }
.progress-track { height: 14px; border-radius: 999px; background: var(--line); overflow: hidden; }
.progress-track span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width .2s ease-out; }
.progress-text { font-family: var(--f-mono); font-size: 14px; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }
