:root {
  --bg: #faf7f2;
  --card: #ffffff;
  --ink: #1c1917;
  --ink2: #57534e;
  --muted: #a8a29e;
  --line: #e7e2da;
  --accent: #c2410c;
  --accent-soft: #fff1e8;
  --ok: #15803d;
  --warn: #b45309;
  --radius: 14px;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #171412; --card: #221e1b; --ink: #f5f0ea; --ink2: #c9c1b8; --muted: #8a8079; --line: #3a332e;
    --accent: #fb923c; --accent-soft: #3a2416; --ok: #4ade80; --warn: #fbbf24; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #171412; --card: #221e1b; --ink: #f5f0ea; --ink2: #c9c1b8; --muted: #8a8079; --line: #3a332e;
  --accent: #fb923c; --accent-soft: #3a2416; --ok: #4ade80; --warn: #fbbf24; color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.5; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
a { color: var(--accent); }

.top { border-bottom: 1px solid var(--line); background: var(--card); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brand { font-weight: 800; font-size: 18px; color: var(--ink); text-decoration: none; letter-spacing: -0.02em; }
.brand::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); margin-right: 8px; }
nav a { margin-left: 18px; color: var(--ink2); text-decoration: none; font-size: 14px; }

.hero { padding: 40px 0 8px; }
.hero h1 { font-size: clamp(26px, 4.4vw, 42px); line-height: 1.15; margin: 0 0 14px; letter-spacing: -0.03em; }
.hero h1 span { color: var(--ink2); font-weight: 600; }
.hero em { color: var(--accent); font-style: normal; }
.hero p { max-width: 720px; color: var(--ink2); font-size: 17px; margin: 0; }

.step { margin: 28px 0; }
.step h2 { font-size: 18px; margin: 0 0 12px; display: flex; align-items: center; gap: 10px; }
.step h2 b { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--bg); display: inline-grid; place-items: center; font-size: 13px; }

.products { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.product { text-align: left; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 14px; cursor: pointer; display: grid; grid-template-columns: 44px 1fr; gap: 12px; color: var(--ink); font: inherit; }
.product:hover { border-color: var(--muted); }
.product.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.bottle { width: 44px; height: 72px; border-radius: 10px 10px 8px 8px; position: relative; }
.bottle::before { content: ""; position: absolute; left: 14px; top: -10px; width: 16px; height: 12px; border-radius: 3px; background: #44403c; }
.product h3 { margin: 0; font-size: 15px; }
.product .brandname { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.product .claim { font-size: 13px; color: var(--ink2); margin-top: 4px; }
.product .price { font-size: 13px; font-weight: 700; margin-top: 6px; }

.paste { margin-top: 12px; }
.paste summary { cursor: pointer; color: var(--ink2); font-size: 14px; }
.paste textarea { width: 100%; margin: 10px 0 8px; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; }
.claim-read { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: var(--accent-soft); font-size: 14px; }
.claim-read .chip { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); margin: 2px 4px 2px 0; font-size: 13px; }
.claim-read .no { color: var(--warn); }

.faces { display: grid; grid-template-columns: 1fr 1.2fr; gap: 16px; }
@media (max-width: 720px) { .faces { grid-template-columns: 1fr; } }
.face-pick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.sample { border: 1.5px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; background: var(--card); padding: 0; color: var(--ink); font: inherit; text-align: left; }
.sample.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.sample img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.sample span { display: block; padding: 6px 10px; font-size: 13px; color: var(--ink2); }
.upload { display: block; border: 1.5px dashed var(--muted); border-radius: var(--radius); padding: 18px; cursor: pointer; background: var(--card); }
.upload.on { border-color: var(--accent); border-style: solid; }
.upload input { display: none; }
.upload span { font-weight: 700; }
.upload small { display: block; color: var(--muted); margin-top: 4px; }
.framer { display: flex; gap: 14px; margin-top: 12px; flex-wrap: wrap; }
.frame-box { position: relative; width: 180px; height: 180px; border-radius: 12px; overflow: hidden; }
.frame-box canvas { width: 100%; height: 100%; display: block; }
.oval { position: absolute; left: 14%; top: 12%; width: 72%; height: 72%; border: 2px solid rgba(255,255,255,.95); border-radius: 50%; box-shadow: 0 0 0 999px rgba(0,0,0,.35); }
.frame-ctl { flex: 1; min-width: 180px; font-size: 13px; color: var(--ink2); }
.frame-ctl label { display: block; margin-bottom: 6px; }
.frame-ctl input { width: 100%; }
.note { font-size: 13px; color: var(--muted); }

.primary { background: var(--accent); color: #fff; border: 0; border-radius: 12px; padding: 14px 22px; font: inherit; font-weight: 700; font-size: 16px; cursor: pointer; }
.primary:disabled { opacity: .45; cursor: not-allowed; }
.ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); border-radius: 10px; padding: 8px 14px; font: inherit; cursor: pointer; }
.progress { list-style: none; padding: 0; margin: 16px 0 0; font-size: 14px; }
.progress li { padding: 4px 0 4px 26px; position: relative; color: var(--muted); }
.progress li::before { content: ""; position: absolute; left: 4px; top: 10px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--muted); }
.progress li.doing { color: var(--ink); }
.progress li.doing::before { border-color: var(--accent); border-top-color: transparent; animation: spin .8s linear infinite; }
.progress li.done { color: var(--ink2); }
.progress li.done::before { background: var(--ok); border-color: var(--ok); }
.progress li small { color: var(--muted); margin-left: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
.error { color: #b91c1c; font-weight: 600; }

.result { margin: 8px 0 36px; }
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 720px) { .trio { grid-template-columns: 1fr; } }
.trio figure { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.trio figure.hl { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.trio img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: var(--line); }
.trio figcaption { padding: 10px 12px; font-size: 14px; }
.trio figcaption b { display: block; }
.trio figcaption span { color: var(--ink2); font-size: 13px; }

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
@media (max-width: 720px) { .compare { grid-template-columns: 1fr; } }
.cmp-box { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 1; background: var(--line); }
.cmp-box img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cmp-box #cmp-b { clip-path: inset(0 0 0 50%); }
.cmp-line { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: #fff; box-shadow: 0 0 6px rgba(0,0,0,.4); pointer-events: none; }
.cmp-l, .cmp-r { position: absolute; top: 10px; font-size: 12px; font-weight: 700; color: #fff; background: rgba(0,0,0,.45); padding: 2px 8px; border-radius: 999px; }
.cmp-l { left: 10px; } .cmp-r { right: 10px; }
.cmp-box input { position: absolute; left: 0; right: 0; bottom: 10px; width: calc(100% - 20px); margin: 0 10px; }
.verdict { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.verdict h3 { margin: 0 0 6px; font-size: 20px; letter-spacing: -0.01em; }
.verdict .big { font-size: 15px; color: var(--ink2); margin: 0 0 12px; }
.verdict table { width: 100%; border-collapse: collapse; font-size: 14px; }
.verdict td { padding: 6px 0; border-top: 1px solid var(--line); }
.verdict td:last-child { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.verdict .tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--accent-soft); color: var(--accent); }
.verdict .fine { font-size: 12px; color: var(--muted); margin: 12px 0 0; }
.side { margin-top: 12px; font-size: 13px; color: var(--ink2); }

.how { border-top: 1px solid var(--line); padding: 24px 0 8px; margin-top: 32px; }
.how h2 { font-size: 20px; }
.how li { margin-bottom: 8px; color: var(--ink2); }
.fine { font-size: 13px; color: var(--muted); }
.foot { font-size: 12px; color: var(--muted); padding: 24px 16px 40px; }
