:root {
  --bg: #fbf8f3;
  --surface: #ffffff;
  --ink: #1f1b16;
  --muted: #6b6359;
  --line: #e7e0d6;
  --brand: #2f6b4f;
  --brand-ink: #ffffff;
  --brand-soft: #e4f0e9;
  --accent: #c8553d;
  --high: #b3261e;
  --high-soft: #fbe9e7;
  --med: #a8650a;
  --med-soft: #fdf1dc;
  --low: #2f6b4f;
  --low-soft: #e4f0e9;
  --info: #3a5a8c;
  --info-soft: #e6edf7;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(31, 27, 22, .06), 0 4px 16px rgba(31, 27, 22, .06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171512;
    --surface: #211e1a;
    --ink: #f2ede6;
    --muted: #b0a698;
    --line: #36312a;
    --brand: #5fb489;
    --brand-ink: #10241a;
    --brand-soft: #1f3329;
    --accent: #e27b62;
    --high: #f2867c;
    --high-soft: #3a1f1c;
    --med: #f0b55a;
    --med-soft: #382b16;
    --low: #5fb489;
    --low-soft: #1f3329;
    --info: #8fb0e3;
    --info-soft: #1e2736;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
h1, h2, h3 { font-family: "Fraunces", Georgia, serif; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
a { color: var(--brand); }
img { max-width: 100%; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }

/* header */
.site-head { border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 20; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); text-decoration: none; font-size: 1.05rem; }
.logo-mark { width: 28px; height: 28px; border-radius: 8px; background: var(--brand); display: grid; place-items: center; color: var(--brand-ink); font-size: 15px; }
.nav { display: flex; gap: 18px; align-items: center; }
.nav a { color: var(--muted); text-decoration: none; font-size: .95rem; }
.nav a:hover { color: var(--ink); }
@media (max-width: 640px) { .nav .hide-sm { display: none; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 10px; border: 1px solid transparent; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; transition: transform .05s, background .15s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { filter: brightness(1.07); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface); }
.btn-sm { padding: 7px 12px; font-size: .9rem; border-radius: 8px; }
.btn-accent { background: var(--accent); color: #fff; }
.nav .btn { color: var(--brand-ink); }

/* hero */
.hero { padding: 64px 0 40px; }
.pill { display: inline-block; padding: 5px 12px; border-radius: 999px; background: var(--high-soft); color: var(--high); font-size: .85rem; font-weight: 600; margin-bottom: 18px; }
.hero p.lead { font-size: 1.2rem; color: var(--muted); max-width: 640px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 12px; }
.fine { color: var(--muted); font-size: .88rem; }

section { padding: 44px 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (max-width: 820px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card h3 { margin-bottom: .35em; }
.step-num { width: 30px; height: 30px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 700; margin-bottom: 10px; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { padding: 6px 0 6px 28px; position: relative; }
.checklist li::before { content: "✓"; position: absolute; left: 0; top: 6px; color: var(--brand); font-weight: 700; }
.price-card { text-align: left; }
.price { font-family: "Fraunces", Georgia, serif; font-size: 2.6rem; font-weight: 700; }
.price small { font-size: 1rem; color: var(--muted); font-family: "Inter", sans-serif; font-weight: 500; }
.price-card.featured { border: 2px solid var(--brand); }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: 10px 0 0; color: var(--muted); }
.site-foot { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: .88rem; }
.site-foot a { color: var(--muted); }
.mock-shot { border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--surface); padding: 14px; }

/* article */
.article { padding: 40px 0 20px; }
.article h2 { margin-top: 1.6em; }
.article li { margin-bottom: .4em; }
.callout { background: var(--info-soft); border-left: 4px solid var(--info); padding: 14px 18px; border-radius: 8px; margin: 1.2em 0; }
.callout.warn { background: var(--med-soft); border-color: var(--med); }
table.simple { border-collapse: collapse; width: 100%; margin: 1em 0; font-size: .95rem; }
table.simple th, table.simple td { border-bottom: 1px solid var(--line); text-align: left; padding: 9px 8px; vertical-align: top; }
.table-scroll { overflow-x: auto; }

/* ---------- app ---------- */
.app-top { padding: 22px 0 8px; }
.drop { display: block; cursor: pointer; margin-top: 14px; border: 2px dashed var(--line); border-radius: var(--radius); padding: 36px 20px; text-align: center; background: var(--surface); transition: border-color .15s, background .15s; }
.drop.over { border-color: var(--brand); background: var(--brand-soft); }
.drop input[type=file] { display: none; }
.how-export { margin-top: 14px; text-align: left; }
.how-export ol { margin: 6px 0 0; padding-left: 20px; }

.summary { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 18px 0; }
@media (max-width: 820px) { .summary { grid-template-columns: repeat(2, 1fr); } }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.stat b { display: block; font-size: 1.6rem; font-family: "Fraunces", Georgia, serif; }
.stat span { color: var(--muted); font-size: .85rem; }
.stat.high b { color: var(--high); }
.stat.med b { color: var(--med); }
.stat.low b { color: var(--low); }

.progress { height: 10px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress > div { height: 100%; background: var(--brand); width: 0; transition: width .3s; }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; }
.toolbar select, .toolbar input[type=search] { font: inherit; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.toolbar input[type=search] { flex: 1; min-width: 160px; }
.toolbar .spacer { flex: 1; }

.listing { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; scroll-margin-top: 80px; }
.listing.focus { outline: 3px solid var(--brand); outline-offset: 2px; }
.listing.locked { opacity: .55; }
.listing-head { display: flex; gap: 10px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; }
.listing-title { font-weight: 600; margin: 0; font-size: 1rem; max-width: 720px; }
.meta { color: var(--muted); font-size: .85rem; margin-top: 2px; }
.badge { display: inline-block; font-size: .78rem; font-weight: 600; padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.badge.high { background: var(--high-soft); color: var(--high); }
.badge.med { background: var(--med-soft); color: var(--med); }
.badge.low { background: var(--low-soft); color: var(--low); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.done { background: var(--brand); color: var(--brand-ink); }
.flags { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.flags li { font-size: .9rem; padding-left: 22px; position: relative; }
.flags li::before { position: absolute; left: 0; top: 0; }
.flags li.f-high::before { content: "●"; color: var(--high); }
.flags li.f-med::before { content: "●"; color: var(--med); }
.flags li.f-info::before { content: "●"; color: var(--info); }

.photos { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0 6px; }
.photo { position: relative; flex: 0 0 auto; width: 118px; height: 118px; border-radius: 10px; overflow: hidden; border: 2px solid var(--line); background: var(--bg); cursor: pointer; padding: 0; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo .num { position: absolute; left: 5px; top: 5px; background: rgba(0,0,0,.6); color: #fff; font-size: .72rem; font-weight: 700; padding: 1px 6px; border-radius: 6px; }
.photo.chosen { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.photo.chosen::after { content: "✓ Unedited"; position: absolute; left: 0; right: 0; bottom: 0; background: var(--brand); color: var(--brand-ink); font-size: .75rem; font-weight: 700; text-align: center; padding: 2px; }
.photo .broken { display: grid; place-items: center; height: 100%; font-size: .75rem; color: var(--muted); padding: 6px; text-align: center; }

.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; align-items: center; }
.actions .btn.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.actions .hint { color: var(--muted); font-size: .82rem; }
kbd { font: 600 .75rem ui-monospace, monospace; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; background: var(--bg); color: var(--ink); }

.paywall { background: linear-gradient(135deg, var(--brand-soft), var(--surface)); border: 2px solid var(--brand); border-radius: var(--radius); padding: 22px; margin: 16px 0; }
.paywall h3 { margin-bottom: .3em; }
.hidden { display: none !important; }
.kbd-help { font-size: .85rem; color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: .92rem; z-index: 50; box-shadow: var(--shadow); }

/* print shot list */
#printArea { display: none; }
@media print {
  body { background: #fff; color: #000; }
  body > *:not(#printArea) { display: none !important; }
  #printArea { display: block; font: 12pt/1.4 Georgia, serif; }
  #printArea h1 { font-size: 20pt; }
  #printArea h2 { font-size: 14pt; margin: 18px 0 4px; }
  .shot { display: flex; gap: 14px; border-bottom: 1px solid #ccc; padding: 10px 0; page-break-inside: avoid; }
  .shot img { width: 90px; height: 90px; object-fit: cover; border: 1px solid #ccc; }
  .shot .box { width: 16px; height: 16px; border: 1.5px solid #000; flex: 0 0 auto; margin-top: 3px; }
}
.mobile-only { display: none; }
@media (max-width: 640px), (pointer: coarse) { .mobile-only { display: block; } .kbd-help { display: none; } }
/* photo checker */
.pc-row { display: flex; gap: 16px; align-items: flex-start; }
.pc-thumb { flex: 0 0 140px; height: 140px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--bg); }
.pc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pc-body { flex: 1; min-width: 0; }
.pc-body .listing-title { word-break: break-all; }
.pc-ai { border-left: 5px solid var(--high); }
.pc-edited, .pc-none { border-left: 5px solid var(--med); }
.pc-camera { border-left: 5px solid var(--low); }
.flags li.f-ok::before { content: "✓"; color: var(--low); font-weight: 700; }
@media (max-width: 560px) { .pc-row { flex-direction: column; } .pc-thumb { flex-basis: auto; width: 100%; height: 200px; } }
.tool-card { display: block; text-decoration: none; color: var(--ink); transition: border-color .15s, transform .1s; }
.tool-card:hover { border-color: var(--brand); transform: translateY(-1px); }
.tool-card p { color: var(--muted); }
/* AI scan tags */
.ai-tag { position: absolute; right: 5px; top: 5px; font-size: .62rem; font-weight: 800; letter-spacing: .02em; padding: 1px 5px; border-radius: 5px; color: #fff; }
.ai-real { background: #2f6b4f; } .ai-edited { background: #a8650a; } .ai-mockup { background: #b3261e; } .ai-preview { background: #3a5a8c; } .ai-unclear { background: #6b6359; }
.progress #aiBar { height: 100%; background: var(--brand); width: 0; transition: width .3s; }
