/* FTFM local Add a card form. Phone first, offline: local fonts only. */
@font-face { font-family: "Anton"; src: url(fonts/anton-400.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Inter"; src: url(fonts/inter-var.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Space Mono"; src: url(fonts/space-mono-400.woff2) format("woff2"); font-display: swap; }
:root { --cream: #f5f1e8; --paper: #fbf9f3; --ink: #17201b; --ink-2: #4b544e; --line: #dcd5c5; --green: #1f4d36; --green-2: #2f7a4f; --mint: #dfe9df; --gold: #c99a2e; --yellow: #e8c35a; --brick: #a3402d;
  --display: "Anton", Impact, "Arial Narrow", sans-serif; --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; --mono: "Space Mono", ui-monospace, Menlo, monospace; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 110px; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--cream); line-height: 1.45; font-size: 16px; overflow-x: hidden; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.banner { position: sticky; top: 0; z-index: 20; background: var(--yellow); color: var(--ink); padding: 10px 16px; font-size: 14px; text-align: center; border-bottom: 2px solid var(--ink); }
.top { position: sticky; top: 41px; z-index: 19; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--green); color: #fff; padding: 10px 16px; }
.brand { font-family: var(--display); font-size: 22px; letter-spacing: .02em; text-transform: uppercase; }
.mark { color: var(--yellow); }
.toplink { color: #fff; font-weight: 700; font-size: 14px; text-decoration: none; border: 1.5px solid rgba(255,255,255,.6); border-radius: 999px; padding: 4px 12px; white-space: nowrap; }
.toplink span { background: var(--yellow); color: var(--ink); border-radius: 999px; padding: 0 7px; margin-left: 4px; }
.wrap { max-width: 640px; margin: 0 auto; padding: 14px 12px 40px; }
.card { background: var(--paper); border: 1.5px solid var(--line); border-radius: 14px; padding: 16px 14px; margin-bottom: 14px; }
h2 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 22px; letter-spacing: .02em; margin: 0 0 12px; line-height: 1.1; }
.opt { font-family: var(--sans); text-transform: none; font-size: 13px; color: var(--ink-2); letter-spacing: 0; }
.hint { font-size: 13px; color: var(--ink-2); margin: 10px 0 0; }
.req { color: var(--brick); }
.priv { font-family: var(--mono); font-size: 10px; font-weight: 700; background: var(--ink); color: #fff; border-radius: 4px; padding: 1px 5px; vertical-align: 1px; }
.mode { background: var(--mint); border-color: #b9cdb9; }
.switch { display: flex; gap: 10px; align-items: center; font-weight: 700; }
.switch input, .check input { width: 22px; height: 22px; accent-color: var(--green); margin: 0; flex: none; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 10px; }
.f { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); min-width: 0; }
.f > input, .f > select, .f > textarea, .f > .money, .asof > b { display: block; margin-top: 4px; }
.f > .field-err { margin-top: 4px; }
.full { grid-column: 1 / -1; }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea { width: 100%; min-width: 0; font: inherit; font-size: 16px; font-weight: 400; color: var(--ink); background: #fff; border: 1.5px solid #c9c1ae; border-radius: 10px; padding: 10px 11px; min-height: 46px; }
input[type=date] { -webkit-appearance: none; appearance: none; }
textarea { resize: vertical; }
[aria-invalid] { border-color: var(--brick) !important; background: #fff6f3 !important; }
.money { position: relative; display: block; }
.money::before { content: "$"; position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ink-2); font-weight: 400; font-size: 16px; }
.money input { padding-left: 24px !important; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 600; font-size: 15px; }
.field-err { color: var(--brick); font-size: 13px; font-weight: 600; }
.field-err:empty { display: none; }
.seg { border: 0; padding: 0; margin: 14px 0 12px; display: flex; gap: 0; }
.seg legend { font-size: 13px; font-weight: 600; color: var(--ink-2); padding: 0; margin-bottom: 6px; }
.seg label { flex: 1; text-align: center; border: 1.5px solid var(--green); padding: 10px; font-weight: 700; color: var(--green); cursor: pointer; }
.seg label:first-of-type { border-radius: 10px 0 0 10px; }
.seg label:last-of-type { border-radius: 0 10px 10px 0; border-left: 0; }
.seg input { position: absolute; opacity: 0; }
.seg label:has(input:checked) { background: var(--green); color: #fff; }
.seg label:has(input:focus-visible) { outline: 3px solid var(--gold); outline-offset: 2px; }
.preview-name, .total { margin: 12px 0 0; font-size: 14px; overflow-wrap: anywhere; }
.total b { font-family: var(--mono); font-size: 16px; }
.photos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.photo { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.shot { aspect-ratio: 5 / 7; border: 2px dashed #b5ab95; border-radius: 12px; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: pointer; }
.shot img { width: 100%; height: 100%; object-fit: cover; }
.shot-empty { text-align: center; font-weight: 700; color: var(--green); padding: 10px; font-size: 14px; }
.shot-empty::before { content: ""; display: block; width: 34px; height: 26px; margin: 0 auto 8px; border: 2.5px solid currentColor; border-radius: 6px; box-shadow: inset 0 0 0 6px #fff, inset 0 0 0 12px currentColor; }
.file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.photo { position: relative; }
.photo:has(.file:focus-visible) .shot { outline: 3px solid var(--gold); outline-offset: 2px; }
.cap { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.err-summary { background: #fff1ec; border: 2px solid var(--brick); border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; font-size: 14px; }
.err-summary ul { margin: 6px 0 0; padding-left: 18px; }
.err-summary a { color: var(--brick); font-weight: 700; }
.actions { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; }
.btn { font: inherit; font-weight: 700; font-size: 16px; border: 2px solid var(--green); background: var(--green); color: #fff; border-radius: 12px; padding: 12px 14px; min-height: 48px; cursor: pointer; width: 100%; }
.btn-ghost { background: transparent; color: var(--green); }
.btn-danger { background: transparent; color: var(--brick); border-color: var(--brick); margin-top: 10px; }
.saved-msg { color: var(--green); font-weight: 700; margin: 10px 2px 14px; }
.saved-msg:empty { display: none; }
.count { font-family: var(--mono); font-size: 14px; background: var(--ink); color: #fff; border-radius: 999px; padding: 2px 9px; vertical-align: 3px; }
.items { list-style: none; margin: 0 0 6px; padding: 0; }
.item { display: grid; grid-template-columns: 64px 1fr; gap: 6px 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.item:first-child { border-top: 0; padding-top: 0; }
.item img { width: 64px; height: 90px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); grid-row: span 2; }
.it-main { min-width: 0; }
.it-tags { display: flex; gap: 6px; margin-bottom: 4px; }
.tag { font-family: var(--mono); font-size: 11px; font-weight: 700; border: 1.5px solid var(--ink); border-radius: 4px; padding: 0 6px; }
.tag-sample { background: var(--yellow); }
.tag-real { background: var(--green); color: #fff; border-color: var(--green); }
.it-name { display: block; font-size: 15px; line-height: 1.25; overflow-wrap: anywhere; }
.it-meta { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.it-ids { font-family: var(--mono); font-size: 11px; color: var(--ink-2); overflow-wrap: anywhere; margin-top: 2px; }
.it-del { justify-self: start; font: inherit; font-size: 13px; font-weight: 700; color: var(--brick); background: none; border: 1.5px solid var(--brick); border-radius: 8px; padding: 4px 10px; min-height: 34px; cursor: pointer; }
.dl { border-top: 1.5px solid var(--line); padding-top: 12px; margin-top: 6px; }
.dl > .hint { margin: 0 0 10px; }
.dl-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.dl-row .btn { font-size: 14px; padding: 10px 8px; }
.empty { color: var(--ink-2); margin: 0; }
.foot { font-size: 13px; color: var(--ink-2); text-align: center; margin: 4px 8px 0; }
[hidden] { display: none !important; }
@media (min-width: 560px) { .grid { grid-template-columns: 1fr 1fr 1fr; } .photos { grid-template-columns: 180px 180px; } }
.asof { margin: 0; }
.asof b { font-weight: 400; color: var(--ink); font-size: 15px; padding: 11px 0; }
/* v1.2: photo links, preview and confirm */
.links { margin-top: 12px; }
.links summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.preview h2 { margin-top: 0; }
.preview .pv-rows { list-style: none; padding: 0; margin: 8px 0; font-size: 14px; }
.preview .pv-rows li { padding: 4px 0; border-bottom: 1px solid #e6e6e6; overflow-wrap: anywhere; }
.preview .pv-rows code, .preview .hash { font-size: 12px; overflow-wrap: anywhere; word-break: break-all; }
.preview .pv-warn { background: #fff4e5; border: 1px solid #e0a040; padding: 8px 10px; border-radius: 6px; }
.preview .pv-ok { color: #1f4d3a; }
.preview .actions { margin-top: 12px; }
.preview pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; background: #f6f6f4; padding: 8px; border-radius: 6px; max-width: 100%; }
.formnav { display: flex; gap: 8px; max-width: 640px; margin: 10px auto 0; padding: 0 12px; }
.formnav a { flex: 1; text-align: center; font-weight: 700; font-size: 14px; color: var(--green); border: 1.5px solid var(--green); border-radius: 999px; padding: 6px 10px; text-decoration: none; }
.formnav a[aria-current="page"] { background: var(--green); color: #fff; }
.item-noimg { grid-template-columns: 1fr; }
