:root {
  --bg: #f5f4f1; --panel: #fff; --ink: #1d1f21; --mut: #626a70; --line: rgba(29, 31, 33, .13); --soft: #eef0f1;
  --brand: #2c6e8f; --on-brand: #fff; --bad: #b3261e; --ok: #23784a;
  --font: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; --r: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #121416; --panel: #1b1e21; --ink: #e9ecee; --mut: #9aa4ab; --line: rgba(233, 236, 238, .13); --soft: #24282c; --bad: #f2a39d; --ok: #8fd3a8; color-scheme: dark; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
body.embed { background: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
main { max-width: 620px; margin: 0 auto; padding: 16px 16px 48px; }
.top { display: flex; align-items: center; gap: 12px; padding: 18px 0 14px; }
.top img { height: 40px; width: auto; max-width: 220px; }
.top .nm { font-weight: 800; font-size: 1.15rem; }
.embed .top { display: none; }
h1 { font-size: 1.45rem; line-height: 1.25; margin: 4px 0 4px; letter-spacing: -.01em; }
h2 { font-size: 1.05rem; margin: 0 0 10px; }
.mut { color: var(--mut); }
.small { font-size: .88rem; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin: 0 0 14px; }

label.f { display: block; margin: 0 0 14px; }
label.f > span { display: block; font-weight: 650; font-size: .93rem; margin: 0 0 5px; }
label.f > span small { font-weight: 400; color: var(--mut); }
input[type=text], input[type=tel], input[type=email], textarea, select {
  width: 100%; padding: 12px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); font-size: 16px; }
textarea { min-height: 120px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.bad-field { border-color: var(--bad) !important; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 460px) { .row2 { grid-template-columns: 1fr; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips label { padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); cursor: pointer; font-size: .93rem; }
.chips input:checked + label { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.chips input:focus-visible + label { outline: 2px solid var(--brand); outline-offset: 2px; }

.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.shot { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--soft); }
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot button { position: absolute; top: 5px; right: 5px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; font-size: 18px; line-height: 1; }
.add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; aspect-ratio: 1; border: 2px dashed var(--line); border-radius: 10px; cursor: pointer; color: var(--mut); font-size: .88rem; text-align: center; }
.add svg { width: 28px; height: 28px; }
.add:hover { border-color: var(--brand); color: var(--brand); }
#photos { position: absolute; opacity: 0; width: 1px; height: 1px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 20px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); font-weight: 700; cursor: pointer; text-decoration: none; }
.btn.go { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .55; cursor: default; }
.btn.link { border: 0; background: none; padding: 10px; color: var(--mut); font-weight: 600; text-decoration: underline; }
.err { color: var(--bad); font-weight: 600; margin: 10px 0 0; }
.hp { position: absolute; left: -5000px; }

.done { text-align: center; padding: 34px 16px; }
.done .tick { width: 56px; height: 56px; border-radius: 50%; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; margin: 0 auto 12px; }

/* quote page */
.qhead { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.qref { font-size: .84rem; color: var(--mut); text-align: right; flex: none; padding-top: 6px; }
.lines { width: 100%; border-collapse: collapse; }
.lines td { padding: 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.lines td.amt { text-align: right; white-space: nowrap; padding-left: 12px; font-variant-numeric: tabular-nums; }
.lines .q { display: block; color: var(--mut); font-size: .86rem; }
.tot { display: flex; justify-content: space-between; padding: 5px 0; font-variant-numeric: tabular-nums; }
.tot.big { font-size: 1.3rem; font-weight: 800; padding-top: 10px; }
.status { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--r); background: color-mix(in srgb, var(--brand) 12%, var(--panel)); border: 1px solid color-mix(in srgb, var(--brand) 35%, transparent); margin: 0 0 14px; font-weight: 650; }
.status.lost { background: var(--soft); border-color: var(--line); }
ul.qs { margin: 6px 0 0; padding-left: 20px; }
ul.qs li { margin: 0 0 4px; }
.actions { display: grid; gap: 8px; }
.foot { text-align: center; color: var(--mut); font-size: .85rem; padding: 18px 0; }
.foot a { color: inherit; }
dialog { border: 0; border-radius: 16px; padding: 18px; width: min(460px, calc(100vw - 32px)); background: var(--panel); color: var(--ink); }
dialog::backdrop { background: rgba(0,0,0,.45); }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-weight: 600; z-index: 50; }
.toast.bad { background: var(--bad); color: #fff; }
@media print { body { background: #fff; color: #000; } .actions, .noprint { display: none !important; } .card { border: 0; padding: 0; } }
