:root {
  color-scheme: light;
  --ink: #17352e;
  --muted: #64756f;
  --paper: #f5f8f6;
  --surface: #ffffff;
  --leaf: #0b6b58;
  --leaf-dark: #075143;
  --mint: #dff2eb;
  --lime: #d9ee72;
  --amber: #f1a63b;
  --red: #bd4b3d;
  --line: #dce7e2;
  --shadow: 0 16px 38px rgba(17, 71, 59, .10);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--paper); color: var(--ink); padding-bottom: 92px; }
button, input { font: inherit; }
button { cursor: pointer; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; padding: 14px max(18px, env(safe-area-inset-left)); background: rgba(245,248,246,.92); backdrop-filter: blur(16px); border-bottom: 1px solid rgba(220,231,226,.8); }
.brand { color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 10px; font-weight: 800; }
.brand-mark { width: 34px; height: 34px; border-radius: 11px 11px 11px 4px; display: grid; place-items: center; background: var(--leaf); color: white; }
.icon-button { border: 0; border-radius: 999px; background: var(--ink); color: white; padding: 9px 15px; font-weight: 750; }
main { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.search-panel { margin-top: 20px; padding: clamp(24px, 6vw, 52px); border-radius: 30px; color: white; background: radial-gradient(circle at 92% 10%, rgba(217,238,114,.55) 0 8%, transparent 31%), linear-gradient(135deg, var(--leaf-dark), var(--leaf)); box-shadow: var(--shadow); }
.eyebrow { margin: 0 0 7px; color: inherit; opacity: .74; text-transform: uppercase; letter-spacing: .11em; font-size: .76rem; font-weight: 850; }
h1 { margin: 0 0 22px; max-width: 720px; font-size: clamp(2rem, 6vw, 4.2rem); line-height: .98; letter-spacing: -.045em; }
.search-box { display: flex; align-items: center; gap: 12px; width: min(720px, 100%); background: white; color: var(--ink); border-radius: 18px; padding: 0 18px; box-shadow: 0 12px 28px rgba(0,0,0,.12); }
.search-box span { font-size: 1.6rem; }
.search-box input { width: 100%; min-height: 58px; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 1.04rem; }
.quick-filters { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 19px; }
.chip { border: 1px solid rgba(255,255,255,.28); border-radius: 999px; padding: 9px 13px; color: white; background: rgba(255,255,255,.1); font-weight: 720; }
.chip.active { color: var(--leaf-dark); background: var(--lime); border-color: var(--lime); }
.results-section { padding: 34px 0; scroll-margin-top: 76px; }
[hidden] { display: none !important; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 18px; }
.section-heading .eyebrow { color: var(--leaf); opacity: 1; }
h2 { margin: 0; font-size: clamp(1.45rem, 3vw, 2.15rem); letter-spacing: -.025em; }
.result-count { color: var(--muted); font-weight: 700; white-space: nowrap; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.use-card { display: flex; flex-direction: column; min-height: 245px; padding: 20px; text-align: left; border: 1px solid var(--line); border-radius: 22px; color: var(--ink); background: var(--surface); box-shadow: 0 7px 24px rgba(23,53,46,.055); transition: transform .18s ease, box-shadow .18s ease; }
.use-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-top { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.category-label, .risk-label { border-radius: 999px; padding: 6px 9px; font-size: .72rem; font-weight: 820; }
.category-label { background: var(--mint); color: var(--leaf-dark); }
.risk-label.caution { background: #fff0d9; color: #8c5100; }
.risk-label.professional { background: #fae3df; color: #872f25; }
.use-card h3 { margin: 22px 0 9px; font-size: 1.25rem; line-height: 1.15; }
.use-card p { margin: 0; color: var(--muted); line-height: 1.5; }
.card-products { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 18px; }
.product-pill { padding: 5px 8px; border-radius: 8px; background: #f0f5f2; color: #49645b; font-size: .76rem; font-weight: 720; }
.empty-state { padding: 50px 20px; text-align: center; border: 1px dashed #b8c9c2; border-radius: 22px; }
.detail-dialog { width: min(720px, calc(100% - 24px)); max-height: min(88vh, 900px); padding: 0; border: 0; border-radius: 26px; box-shadow: 0 24px 80px rgba(8,46,38,.32); }
.detail-dialog::backdrop { background: rgba(11,34,29,.68); backdrop-filter: blur(3px); }
.detail-shell { padding: clamp(22px, 5vw, 36px); }
.dialog-actions { display: flex; justify-content: space-between; gap: 10px; }
.close-button, .favorite-button { border: 1px solid var(--line); border-radius: 999px; padding: 9px 13px; background: white; color: var(--ink); font-weight: 750; }
.detail-shell h2 { margin: 28px 0 8px; font-size: clamp(1.8rem, 5vw, 2.8rem); }
.detail-intro { color: var(--muted); line-height: 1.55; }
.detail-block { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.detail-block h3 { margin: 0 0 10px; }
.detail-block ul, .detail-block ol { margin: 0; padding-left: 1.25rem; }
.detail-block li { margin: 8px 0; line-height: 1.5; }
.calculator label { display: grid; gap: 8px; color: var(--muted); font-weight: 750; }
.calculator input { min-height: 48px; border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; color: var(--ink); background: white; font-size: 1rem; }
.calc-result { margin-top: 12px; padding: 14px; border-radius: 14px; color: var(--leaf-dark); background: var(--mint); line-height: 1.6; }
.product-use-list { display: grid; gap: 8px; }
.product-use-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; width: 100%; padding: 13px 14px; text-align: left; border: 1px solid var(--line); border-radius: 13px; color: var(--ink); background: white; }
.product-use-row small { color: var(--muted); white-space: nowrap; }
.info-card { cursor: default; }
.safety-note { padding: 14px; border-radius: 14px; background: #fff3e2; color: #754613; line-height: 1.5; }
.source-link { color: var(--leaf); font-weight: 800; }
.bottom-nav { position: fixed; z-index: 30; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; grid-template-columns: repeat(4, 1fr); width: min(620px, calc(100% - 24px)); padding: 7px; border: 1px solid rgba(220,231,226,.9); border-radius: 22px; background: rgba(255,255,255,.94); backdrop-filter: blur(18px); box-shadow: 0 14px 40px rgba(16,59,50,.18); }
.bottom-nav button { display: grid; place-items: center; gap: 2px; min-height: 52px; border: 0; border-radius: 16px; color: var(--muted); background: transparent; font-size: .76rem; font-weight: 720; }
.bottom-nav button span { font-size: 1.14rem; }
.bottom-nav button.active { color: white; background: var(--leaf); }
@media (max-width: 820px) { .card-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 560px) { main { width: min(100% - 22px, 1120px); } .search-panel { margin-top: 11px; border-radius: 22px; } .card-grid { grid-template-columns: 1fr; } .section-heading { align-items: start; } .use-card { min-height: 210px; } }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
