:root {
  --bg: #f4ede4; --card: #fbf7f1; --ink: #3b2a20; --muted: #8a7566; --line: #e0d3c3;
  --accent: #7a5238; --accent-ink: #fbf7f1;
  --natural: #7a5238; --regen: #b99672; --synth: #c9bdb0; --warn: #a4533a;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #1f1712; --card: #2a2019; --ink: #efe3d4; --muted: #a18f7e; --line: #3d2f25;
    --accent: #c79a73; --accent-ink: #1f1712; --natural: #c79a73; --regen: #8f6d52; --synth: #5a4a3e; --warn: #d68a6c; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 Georgia, 'Iowan Old Style', serif; }
main { max-width: 760px; margin: 0 auto; padding: 56px 16px 40px; }
h1 { font-weight: 400; font-size: 2.2rem; letter-spacing: .04em; margin: 0; }
.tagline { color: var(--muted); margin: 6px 0 36px; }
input, select, button { font: inherit; color: inherit; }
input, select { width: 100%; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; }
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.row { display: flex; gap: 12px; align-items: end; margin-top: 12px; }
.row label { flex: 1; font-size: .85rem; color: var(--muted); }
.row label input { margin-top: 4px; color: var(--ink); }
.opt { font-size: .75rem; opacity: .8; }
button { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 8px; padding: 12px 28px; cursor: pointer; letter-spacing: .03em; }
button:disabled { opacity: .5; cursor: wait; }
#manual { margin-top: 16px; display: grid; gap: 10px; }
#manualNote { margin: 0; color: var(--warn); font-size: .9rem; }
#status { color: var(--muted); min-height: 1.5em; margin: 20px 0 0; }
section { margin-top: 24px; }
h2 { font-weight: 400; font-size: 1.1rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 36px 0 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.head { display: flex; justify-content: space-between; gap: 16px; align-items: start; }
.name { font-size: 1.15rem; margin: 0; }
.sub { color: var(--muted); font-size: .9rem; }
.price { white-space: nowrap; font-size: 1.1rem; }
.grade { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); font-size: 1.1rem; }
.bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--line); margin: 16px 0 10px; }
.bar i { display: block; }
.natural { background: var(--natural); } .regenerated { background: var(--regen); } .synthetic, .other { background: var(--synth); }
ul.mats { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .9rem; }
ul.mats li::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--synth); }
ul.mats li.natural::before { background: var(--natural); } ul.mats li.regenerated::before { background: var(--regen); }
.verdict { margin: 12px 0 0; font-size: .9rem; color: var(--muted); }
.grid { display: grid; gap: 14px; }
.alt .delta { color: var(--natural); font-size: .85rem; }
.alt a { color: var(--accent); }
.empty { color: var(--muted); }
footer { margin-top: 56px; color: var(--muted); font-size: .8rem; text-align: center; }
@media (max-width: 480px) { .row { flex-direction: column; align-items: stretch; } }
.alt h3 a { color: inherit; text-decoration: underline; text-decoration-color: var(--muted); text-underline-offset: 3px; }
.alt .shop { display: inline-block; margin-top: 12px; padding: 8px 14px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); text-decoration: none; font-size: .9rem; }
.alt .shop:hover { opacity: .9; }
.alt .sample { margin-top: 12px; color: var(--muted); font-size: .8rem; font-style: italic; }
.searched { margin: -8px 0 16px; color: var(--muted); font-size: .9rem; }
