:root {
  --bg: #fbf8f4; --card: #ffffff; --text: #22201c; --muted: #6f6a62; --line: #ece6dd;
  --brand: #ff7a45; --brand-soft: #fff0e8;
  --no: #d92d20; --no-soft: #fef1f0; --caution: #b54708; --caution-soft: #fff6e5; --ok: #0f8a47; --ok-soft: #ecf9f1;
  --radius: 16px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15130f; --card: #1f1c18; --text: #f3efe8; --muted: #a79f93; --line: #332e28;
    --brand: #ff8f60; --brand-soft: #2c1f18;
    --no: #ff6b5e; --no-soft: #2c1715; --caution: #f5b14b; --caution-soft: #2b2213; --ok: #42cf80; --ok-soft: #13261b;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Pretendard, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; line-height: 1.65; word-break: keep-all; overflow-wrap: anywhere; }
a { color: var(--brand); }
.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-bottom: 40px; }
header.top { padding: 16px 0 4px; }
.logo { font-weight: 800; font-size: 16px; color: var(--text); text-decoration: none; }
h1 { font-size: 26px; line-height: 1.3; margin: 10px 0 6px; letter-spacing: -0.5px; }
h2 { font-size: 19px; margin: 0 0 10px; letter-spacing: -0.3px; }
h3 { font-size: 16px; margin: 18px 0 6px; }
.lead { color: var(--muted); margin: 0 0 14px; }
.disclosure { font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; margin: 8px 0 12px; background: var(--card); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.article p, .article li { margin: 0 0 8px; }
.article ul, .eaten ol { padding-left: 20px; margin: 0; }

/* 홈 */
.hero { padding: 8px 0 4px; }
.search input { width: 100%; font: inherit; font-size: 17px; padding: 14px 16px; border: 2px solid var(--brand); border-radius: 14px; background: var(--card); color: var(--text); }
.search input:focus { outline: 3px solid var(--brand-soft); }
.results { margin-top: 8px; }
.results:empty { display: none; }
.results .none { color: var(--muted); font-size: 14px; padding: 8px 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.chip { font-size: 14px; text-decoration: none; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: 6px 12px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 4px; margin: 6px 0 14px; }
.tab { font: inherit; font-weight: 700; border: 0; border-radius: 10px; padding: 10px; background: none; color: var(--muted); cursor: pointer; }
.tab.on { background: var(--brand); color: #fff; }
.group { margin-bottom: 18px; }
.group h2 small { color: var(--muted); font-weight: 600; font-size: 14px; }

.food-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.food-link { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.card .food-link { background: var(--bg); }
.food-link .em { font-size: 20px; }
.food-link .nm { flex: 1; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dots { display: flex; gap: 2px; }
.dot { font-style: normal; font-size: 11px; width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.dot.no { background: var(--no-soft); box-shadow: inset 0 0 0 2px var(--no); }
.dot.caution { background: var(--caution-soft); box-shadow: inset 0 0 0 2px var(--caution); }
.dot.ok { background: var(--ok-soft); box-shadow: inset 0 0 0 2px var(--ok); }

/* 상세 */
.crumb { font-size: 13px; color: var(--muted); margin-top: 4px; }
.crumb a { color: var(--muted); }
.aka { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.verdict { border-radius: var(--radius); padding: 16px; margin-bottom: 14px; border: 2px solid; }
.verdict.no { background: var(--no-soft); border-color: var(--no); }
.verdict.caution { background: var(--caution-soft); border-color: var(--caution); }
.verdict.ok { background: var(--ok-soft); border-color: var(--ok); }
.v-row { display: flex; gap: 12px; padding: 8px 0; }
.v-row + .v-row { border-top: 1px dashed var(--line); }
.v-who { flex: 0 0 74px; font-weight: 700; padding-top: 2px; }
.v-body p { margin: 2px 0 0; }
.v-label { font-size: 20px; }
.v-label.no { color: var(--no); } .v-label.caution { color: var(--caution); } .v-label.ok { color: var(--ok); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 700; border: 0; border-radius: 12px; padding: 12px 16px; cursor: pointer; text-decoration: none; }
.btn.share { width: 100%; margin-top: 10px; background: var(--card); color: var(--text); border: 1px solid var(--line); }
.btn.primary { background: var(--brand); color: #fff; }
.eaten.no { border-left: 4px solid var(--no); }
.eaten.caution { border-left: 4px solid var(--caution); }
.eaten ol li { margin-bottom: 4px; }
.products { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.product { display: block; text-decoration: none; color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--bg); }
.product b { display: block; font-size: 15px; }
.product span { display: block; font-size: 13px; color: var(--muted); }
.product em { display: block; font-style: normal; font-size: 13px; color: var(--brand); font-weight: 700; margin-top: 6px; }
details { border-bottom: 1px solid var(--line); padding: 12px 0; }
details:last-child { border-bottom: 0; }
summary { font-weight: 700; cursor: pointer; }
details p { margin: 8px 0 0; color: var(--muted); }
.sources { font-size: 13px; color: var(--muted); padding: 4px 2px; }
.sources ul { padding-left: 18px; margin: 4px 0 8px; }
.sources a { color: var(--muted); }

/* 광고 */
.ad-slot { min-height: 90px; border: 1px dashed var(--line); border-radius: 12px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; margin: 14px 0; }
.ad { margin: 14px 0; }
.ad-label { display: block; font-size: 11px; color: var(--muted); margin-bottom: 2px; }

footer { font-size: 12px; color: var(--muted); text-align: center; padding: 20px 16px 32px; }
footer p { margin: 4px 0; }
footer a { color: var(--muted); margin: 0 6px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 99px; font-size: 14px; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.show { opacity: 1; }
@media (max-width: 380px) {
  h1 { font-size: 22px; }
  .food-grid, .products { grid-template-columns: 1fr; }
  .v-who { flex-basis: 64px; }
}
