:root{--ink:#111214;--ink-2:#4b4f57;--muted:#8b9099;--line:#ebe7e0;--bg:#fff;--cream:#fbf7f1;--soft:#f5f2ec;--accent:#e8452c;--accent-bg:#fff1ee;--green:#1f9d61;--green-bg:#e8f6ee;--amber:#c27a00;--amber-bg:#fff4dc;--orange:#d9601c;--orange-bg:#ffeadd;--red:#c7361f;--red-bg:#ffe7e2}
*{box-sizing:border-box;margin:0;padding:0}
html,body{background:#ece8e1}
body{font-family:"Pretendard Variable",Pretendard,-apple-system,sans-serif;color:var(--ink);-webkit-font-smoothing:antialiased;letter-spacing:-.01em;line-height:1.5}
a{color:inherit;text-decoration:none}
button{font:inherit;cursor:pointer;border:0;background:none;color:inherit}
.shell{max-width:480px;margin:0 auto;min-height:100vh;background:var(--cream);position:relative;padding-bottom:84px;box-shadow:0 0 40px rgba(0,0,0,.06)}
.top{position:sticky;top:0;z-index:10;display:flex;align-items:center;justify-content:space-between;padding:14px 18px;background:rgba(251,247,241,.94);backdrop-filter:blur(8px)}
.brand{display:flex;align-items:center;gap:8px;font-weight:700;font-size:16px}
.brand svg{width:26px;height:26px}
.brand em{font-style:normal;font-size:10.5px;font-weight:700;color:var(--accent);background:var(--accent-bg);padding:2px 6px;border-radius:5px}
.age-chip{font-size:13px;font-weight:600;padding:7px 12px;border-radius:999px;background:#fff;border:1px solid var(--line)}
.age-chip::after{content:" ▾";color:var(--muted)}
#view{padding:4px 18px 24px}
.tabs{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:100%;max-width:480px;display:grid;grid-template-columns:repeat(4,1fr);background:#fff;border-top:1px solid var(--line);padding:8px 0 calc(8px + env(safe-area-inset-bottom));z-index:20}
.tabs a{display:flex;flex-direction:column;align-items:center;gap:3px;font-size:11.5px;font-weight:600;color:var(--muted)}
.tabs svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linejoin:round;stroke-linecap:round}
.tabs a.on{color:var(--ink)}

h1{font-size:25px;line-height:1.3;letter-spacing:-.04em;font-weight:800;margin:10px 0 16px}
h2{font-size:18px;letter-spacing:-.03em;font-weight:700;margin:28px 0 12px;display:flex;justify-content:space-between;align-items:baseline}
h2 a{font-size:13px;font-weight:500;color:var(--muted)}
.search{display:flex;align-items:center;gap:10px;background:#fff;border:1.5px solid var(--ink);border-radius:14px;padding:0 14px;height:50px}
.search svg{width:20px;height:20px;fill:none;stroke:var(--ink);stroke-width:2}
.search input{flex:1;border:0;font:inherit;font-size:16px;outline:none;background:transparent;min-width:0}
.cats{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}
.cat{display:flex;flex-direction:column;align-items:center;gap:6px;font-size:12.5px;font-weight:600;text-align:center}
.cat i{width:100%;aspect-ratio:1;border-radius:18px;display:grid;place-items:center;font-style:normal;font-size:26px;background:#fff;border:1px solid var(--line)}
.cat small{font-size:11px;color:var(--muted);font-weight:500;margin-top:-4px}
.note{margin-top:22px;font-size:13px;color:var(--ink-2);background:#fff;border:1px dashed #e0d6c8;border-radius:14px;padding:13px 14px;line-height:1.55}
.note b{color:var(--accent)}
.rail{display:flex;gap:10px;overflow-x:auto;scroll-snap-type:x mandatory;margin:0 -18px;padding:0 18px 6px;scrollbar-width:none}
.rail::-webkit-scrollbar{display:none}
.rail .card{flex:0 0 150px;width:150px;min-width:0;flex-direction:column;align-items:flex-start;scroll-snap-align:start;overflow:hidden}
.rail .card .meta{width:100%}

.card{display:flex;gap:12px;align-items:center;background:#fff;border:1px solid var(--line);border-radius:16px;padding:12px;margin-bottom:8px}
.thumb{width:52px;height:52px;flex-shrink:0;border-radius:13px;display:grid;place-items:center;font-size:23px;background:var(--soft)}
.meta{flex:1;min-width:0}
.meta .mk{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.meta .nm{font-size:14.5px;font-weight:600;line-height:1.35;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.meta .nu{font-size:12px;color:var(--ink-2);margin-top:3px}
.badge{width:36px;height:36px;flex-shrink:0;border-radius:11px;display:grid;place-items:center;font-weight:800;font-size:17px}
.g-A{background:var(--green-bg);color:var(--green)}.g-B{background:var(--amber-bg);color:var(--amber)}.g-C{background:var(--orange-bg);color:var(--orange)}.g-D{background:var(--red-bg);color:var(--red)}.g-N{background:var(--soft);color:var(--muted);font-size:13px}
.rail .badge{position:absolute}
.rail .card{position:relative}
.rail .card .badge{top:10px;right:10px;width:30px;height:30px;font-size:15px}

.chips{display:flex;gap:6px;overflow-x:auto;margin:0 -18px 12px;padding:0 18px;scrollbar-width:none}
.chips::-webkit-scrollbar{display:none}
.chip{flex-shrink:0;font-size:13.5px;font-weight:600;padding:8px 13px;border-radius:999px;background:#fff;border:1px solid var(--line);color:var(--ink-2)}
.chip.on{background:var(--ink);color:#fff;border-color:var(--ink)}
.count{font-size:13px;color:var(--muted);margin:4px 0 10px}
.more{display:block;width:100%;padding:13px;border-radius:12px;background:#fff;border:1px solid var(--line);font-weight:600;margin-top:6px}
.empty{text-align:center;color:var(--muted);padding:48px 0;font-size:14.5px}

/* detail */
.back{display:inline-flex;align-items:center;gap:4px;font-size:14px;color:var(--ink-2);margin:6px 0 10px}
.hero{background:#fff;border-radius:22px;padding:22px 20px;border:1px solid var(--line)}
.hero .thumb{width:64px;height:64px;font-size:30px;border-radius:16px}
.hero .row{display:flex;gap:14px;align-items:center}
.hero .mk{font-size:13px;color:var(--muted)}
.hero .nm{font-size:19px;font-weight:700;letter-spacing:-.03em;line-height:1.35}
.hero .tags{display:flex;gap:6px;flex-wrap:wrap;margin-top:12px}
.tag{font-size:12px;font-weight:600;padding:4px 9px;border-radius:7px;background:var(--soft);color:var(--ink-2)}
.tag.warn{background:var(--red-bg);color:var(--red)}
.verdict{display:flex;gap:12px;align-items:center;margin-top:18px;padding:14px;border-radius:16px}
.verdict .badge{width:46px;height:46px;font-size:22px;border-radius:14px;background:#fff}
.verdict b{display:block;font-size:15.5px}
.verdict span{font-size:13px;color:var(--ink-2)}
.save{margin-left:auto;align-self:flex-start;width:40px;height:40px;border-radius:12px;border:1px solid var(--line);display:grid;place-items:center}
.save svg{width:20px;height:20px;fill:none;stroke:var(--ink);stroke-width:1.8}
.save.on svg{fill:var(--accent);stroke:var(--accent)}
.panel{background:#fff;border:1px solid var(--line);border-radius:20px;padding:18px;margin-top:12px}
.panel h3{font-size:15.5px;font-weight:700;margin-bottom:4px;display:flex;justify-content:space-between;align-items:baseline}
.panel h3 small{font-size:12px;font-weight:500;color:var(--muted)}
.bar{margin-top:14px}
.bar .l{display:flex;justify-content:space-between;font-size:13.5px}
.bar .l b{font-weight:700}
.bar .t{height:9px;background:var(--soft);border-radius:99px;margin-top:6px;overflow:hidden}
.bar .t i{display:block;height:100%;border-radius:99px}
.bar small{display:block;font-size:11.5px;color:var(--muted);margin-top:4px}
table.nut{width:100%;border-collapse:collapse;font-size:14px;margin-top:8px}
table.nut td{padding:9px 0;border-bottom:1px solid var(--soft)}
table.nut td:last-child{text-align:right;font-weight:600}
table.nut td small{color:var(--muted);font-weight:400}
.pending{display:flex;gap:10px;align-items:center;font-size:13.5px;color:var(--ink-2);background:var(--soft);border-radius:12px;padding:12px;margin-top:10px}
.pending i{font-style:normal;font-size:11px;font-weight:700;color:var(--amber);background:var(--amber-bg);padding:3px 7px;border-radius:6px;flex-shrink:0}
.foot{font-size:11.5px;color:var(--muted);line-height:1.6;margin-top:18px}

/* kid */
.seg{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;background:#fff;border:1px solid var(--line);border-radius:14px;padding:5px}
.seg button{padding:11px 0;border-radius:10px;font-weight:600;font-size:14.5px;color:var(--ink-2)}
.seg button.on{background:var(--ink);color:#fff}
.allergy{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.allergy label{display:flex;align-items:center;gap:6px;background:#fff;border:1px solid var(--line);border-radius:12px;padding:10px;font-size:14px;font-weight:500;cursor:pointer}
.allergy input{accent-color:var(--accent);width:16px;height:16px}
.sheet{position:fixed;inset:0;background:rgba(17,18,20,.4);z-index:50;display:flex;align-items:flex-end;justify-content:center}
.sheet>div{background:#fff;width:100%;max-width:480px;border-radius:22px 22px 0 0;padding:22px 18px calc(22px + env(safe-area-inset-bottom))}
.sheet h3{font-size:17px;margin-bottom:14px}
.skel{height:76px;border-radius:16px;background:linear-gradient(90deg,#f3efe8,#faf7f2,#f3efe8);background-size:200% 100%;animation:sk 1.2s infinite;margin-bottom:8px}
@keyframes sk{to{background-position:-200% 0}}
