/* DEOL 화면 문법(docs/DESIGN.md): 출처 눈금 실린더. 색 6개, 글꼴 IBM Plex Sans KR 하나, 말체 명사형 */
:root {
  --wall: #a3241b;
  --wall2: #8e1d15;
  --bench: #15171a;
  --bench2: #22252a;
  --glass: rgba(255, 255, 255, 0.62);
  --white: #ffffff;
  --water: #d6e8ee;
  --water2: #b8d4de;
  --paper: #f2f2ee;
  --ink: #111214;
  --sub: #4d5258;
  --onwall: rgba(255, 255, 255, 0.86);
  --onbench: #c9ccd1;
  --line: #4a4f57;
  --paperline: #b9bcc0;
  --cap: #2c2f34;
  --focus: #ffffff;
  --font: "IBM Plex Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --H: 200px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
b, strong { font-weight: 600; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bench); color: var(--white); font: 15px/1.45 var(--font); word-break: keep-all; overflow-wrap: anywhere; }
svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.bcard :focus-visible, dialog :focus-visible, .card.editing :focus-visible { outline-color: var(--ink); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* 판: 휴대폰은 위가 벽(빨강), 아래가 실험대(검정). PC는 왼쪽 실험대, 오른쪽 벽 */
.stage { display: grid; grid-template-columns: minmax(0, 1fr); }
.top, #who, #verdict, #shint, .shelf { background: var(--wall); padding-left: 16px; padding-right: 16px; }
/* 휴대폰: .scene을 풀어 벽(판정, 선반) 다음 실험대(병), 그 아래 범례와 상한 없는 성분 */
.scene { display: contents; }
.top { order: 1; } #who { order: 2; } #verdict, #shint { order: 3; } .shelf { order: 4; } #basis { order: 5; } .bench { order: 6; } .extra { order: 7; } footer { order: 8; }
.top { display: flex; align-items: center; gap: 6px 10px; padding-top: 14px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; }
.mark { width: 30px; height: 30px; }
.top h1 { margin: 0; font-size: 26px; font-weight: 600; letter-spacing: 0.04em; line-height: 1; }
.tagline { margin: 0; font-size: 13px; color: var(--onwall); flex: 1 1 160px; }
.top-r { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.langsw { color: var(--white); font-size: 13px; display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; text-decoration: underline; text-underline-offset: 3px; }
.fbbtn { min-height: 44px; padding: 0 12px; border: 1.5px solid var(--glass); border-radius: 6px; background: transparent; color: var(--white); font-size: 13px; font-weight: 600; }

/* 사람 */
#who { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding-top: 10px; padding-bottom: 4px; }
.seg { display: inline-flex; gap: 4px; }
.seg button { border: 0; background: rgba(0, 0, 0, 0.3); color: var(--white); padding: 0 12px; border-radius: 6px; display: inline-flex; gap: 6px; align-items: center; min-height: 44px; }
.seg button[aria-checked="true"] { background: var(--white); color: var(--ink); font-weight: 600; }
.seg.small button { padding: 0 10px; font-size: 14px; }
.age select { min-height: 44px; border: 0; border-radius: 6px; background: var(--white); color: var(--ink); padding: 0 10px; font-weight: 600; }

/* 판정 한 줄 */
#verdict { min-height: 44px; padding-top: 10px; }
#verdict .line { margin: 0; font-size: 15px; }
#verdict .line2 { margin: 4px 0 0; font-size: 15px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.dropline { font-style: normal; font-weight: 600; background: var(--white); color: var(--ink); padding: 1px 7px; border-radius: 3px; }
.who-l { margin: 6px 0 0; font-size: 12px; color: var(--onwall); display: flex; align-items: center; flex-wrap: wrap; }
.scene .tip { color: var(--white); }

/* 실린더 선반 */
.shelf { margin: 0; padding: 8px 0 0 !important; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
.rack { display: flex; align-items: flex-end; gap: 12px; padding: 40px 16px 0; width: max-content; min-width: 100%;
  background: linear-gradient(180deg, transparent calc(100% - 52px), var(--bench2) calc(100% - 52px), var(--bench) calc(100% - 40px)); }
.cyl { position: relative; width: 58px; flex: none; border: 0; background: transparent; color: var(--white); padding: 0 0 6px; display: flex; flex-direction: column; align-items: center; border-radius: 6px; }
.cyl:hover .tube, .cyl.open .tube { border-color: var(--white); }
.tube { position: relative; display: block; width: 34px; height: var(--H); border: 2px solid var(--glass); border-top: 0; border-radius: 0 0 6px 6px; background: rgba(255, 255, 255, 0.05); }
.tube::before { content: ""; position: absolute; top: -3px; left: -6px; right: -6px; height: 5px; border: 2px solid var(--glass); border-radius: 50%; }
.ticks { position: absolute; left: 3px; top: 0; bottom: 0; width: 9px; background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.85) 0 1px, transparent 1px 10px); opacity: 0.7; z-index: 2; }
.liq { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(90deg, var(--water2), var(--water) 40%, var(--water2)); border-radius: 0 0 4px 4px; transition: height 1.1s cubic-bezier(0.4, 0.1, 0.2, 1); }
.liq::before { content: ""; position: absolute; top: -3px; left: 0; right: 0; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.9); }
.rni { position: absolute; left: -4px; right: -4px; border-top: 2px dotted rgba(255, 255, 255, 0.95); z-index: 3; }
.spill { position: absolute; top: -6px; right: -8px; width: 6px; height: 0; opacity: 0; background: linear-gradient(180deg, var(--white), var(--water)); border-radius: 0 6px 3px 3px; transition: height 0.9s ease, opacity 0.9s; z-index: 5; }
.cyl.over .spill { height: calc(100% + 14px); opacity: 1; }
.cyl.over .tube { border-color: var(--white); }
/* 넘친 실린더는 바깥으로 물방울이 흘러내림(입력 없을 때 움직이는 것은 이것뿐) */
.cyl.over .tube::after { content: ""; position: absolute; right: -9px; top: -2px; width: 7px; height: 9px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: var(--water); box-shadow: 0 0 2px rgba(255,255,255,.8); animation: drip 2.8s cubic-bezier(.5,0,.9,.6) infinite; z-index: 6; }
@keyframes drip { 0% { transform: translateY(0); opacity: 0; } 12% { opacity: 1; } 85% { transform: translateY(var(--H)); opacity: 1; } 100% { transform: translateY(calc(var(--H) + 8px)); opacity: 0; } }
.cyl.over .liq::after { content: ""; position: absolute; top: -9px; left: -4px; right: -10px; height: 12px; border-radius: 50% 60% 40% 50%; background: rgba(240, 248, 250, 0.95); }
.pct { position: absolute; left: 50%; transform: translate(-50%, -6px); font-weight: 600; font-size: 13px; white-space: nowrap; z-index: 4; background: var(--white); color: var(--wall); padding: 0 4px; border-radius: 3px; transition: bottom 1.1s cubic-bezier(0.4, 0.1, 0.2, 1); }
.cyl.full .pct { transform: translate(-50%, 100%); top: 6px; bottom: auto !important; }
.cyl.over .pct { background: var(--wall); color: var(--white); box-shadow: 0 0 0 1.5px var(--white); }
.flag { position: absolute; top: -30px; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 600; background: var(--white); color: var(--wall); padding: 1px 5px; border-radius: 3px; white-space: nowrap; opacity: 0; transition: opacity 0.4s; }
.cyl.over .flag { opacity: 1; }
.base { display: block; width: 50px; height: 9px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.25)); clip-path: polygon(14% 0, 86% 0, 100% 100%, 0 100%); }
.nm { margin-top: 6px; font-size: 12px; font-weight: 600; line-height: 1.15; text-align: center; min-height: 28px; overflow-wrap: normal; width: 78px; margin-left: -10px; margin-right: -10px; }
.tot { font-size: 11px; color: var(--onbench); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cyl.open .nm { text-decoration: underline; text-underline-offset: 3px; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 12px; color: var(--onwall); margin-top: 10px; }
.legend .tip { color: var(--white); }
.lg { display: inline-flex; align-items: center; }
.lg i { display: inline-block; width: 14px; margin-right: 5px; }
.lg-ul { height: 0; border-top: 2px solid var(--white); }
.lg-rni { height: 0; border-top: 2px dotted var(--white); }

/* 상한 없는 성분과 범례: 휴대폰은 병 아래, PC는 벽 아래쪽 */
.extra { padding: 4px 16px 0; min-width: 0; }
.extra .legend { color: var(--onbench); margin-top: 0; }
.extra .legend .tip, .extra .nl-h, .extra .tip { color: var(--onbench); }
/* 근거 카드 */
.bcard { margin: 12px 16px 0; background: var(--paper); color: var(--ink); border-radius: 6px; padding: 10px 14px 12px; }
.bhead { display: flex; align-items: center; justify-content: space-between; }
.bhead h2 { margin: 0; font-size: 17px; }
.bhead h2 span { color: var(--wall); }
.basis { margin: 0; padding: 4px 0 0; font-size: 13px; display: grid; gap: 6px; }
.basis div { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 8px; }
.basis dt { color: var(--sub); }
.basis dd { margin: 0; overflow-wrap: anywhere; }
.basis a { color: var(--wall); }

/* 상한 없는 성분 */
.noul { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; align-items: center; }
.nl-h { font-size: 12px; color: var(--onwall); display: inline-flex; align-items: center; margin-right: 2px; }
.nl { border: 1.5px solid var(--glass); background: transparent; color: var(--white); border-radius: 6px; padding: 0 9px; min-height: 44px; font-size: 13px; }
.nl b { font-variant-numeric: tabular-nums; }
.nl small { color: var(--onwall); }
.nl.open { background: var(--white); color: var(--ink); }

/* 실험대와 병 */
.bench { padding: 14px 16px 6px; }
.col-h { font-size: 13px; font-weight: 600; color: var(--onbench); margin: 0 0 12px; }
#pctl { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
#pctl:not(:empty) { margin-bottom: 14px; }
.exnote .tag { color: var(--white); }
.exnote { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0; font-size: 13px; color: var(--onbench); }
#plist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 10px; align-items: start; }
/* 실제 제품 이름은 길어서 휴대폰에서는 병을 한 줄씩 */
@media (max-width: 599px) { #plist { grid-template-columns: minmax(0, 1fr); gap: 16px; } }
.bottle { position: relative; min-width: 0; transition: transform 0.45s cubic-bezier(0.3, 1.4, 0.5, 1), opacity 0.45s; }
.btl { width: 100%; text-align: left; border: 0; border-radius: 10px 10px 8px 8px; background: var(--paper); color: var(--ink); padding: 14px 40px 10px 10px; display: grid; gap: 2px; min-height: 76px; position: relative; transition: background 0.3s; }
.btl::before { content: ""; position: absolute; top: -7px; left: 20%; right: 20%; height: 10px; border-radius: 4px 4px 0 0; background: var(--cap); }
.btl b { font-size: 15px; line-height: 1.2; }
.btl small { font-size: 12px; color: var(--sub); display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.btl .ings { font-size: 11px; color: var(--sub); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.offmk { display: none; font-weight: 600; color: var(--ink); }
.bottle.off { transform: translateY(8px) rotate(-2.5deg) scale(0.97); }
.bottle.off .btl, .bottle.off .pen { background: var(--onbench); }
.bottle.off .btl small, .bottle.off .btl .ings, .bottle.off .pen { color: var(--ink); }
.bottle.off .offmk { display: inline; }
.bottle.off .meta .mk.drop { display: none; }
.pen { position: absolute; top: 2px; right: 2px; width: 44px; min-height: 44px; border: 0; background: var(--paper); color: var(--sub); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; border-radius: 6px; font-size: 11px; line-height: 1.1; padding: 4px 0; }
.pen svg { width: 16px; height: 16px; }
.pen:hover { color: var(--ink); }
.tag { font-size: 11px; font-weight: 600; color: var(--ink); border: 1px solid currentColor; padding: 0 4px; border-radius: 3px; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; margin-top: 6px; font-size: 14px; color: var(--onbench); }
.mk { display: inline-flex; align-items: center; font-weight: 600; border-radius: 3px; padding: 1px 6px; }
.mk.drop { background: var(--wall); color: var(--white); }
.mk.muted { background: var(--cap); color: var(--onbench); }
.mk .tip, .meta .tip { color: inherit; }
.fx { color: var(--white); }
.ifoff { display: inline; line-height: 1.6; }
.ifoff .if { color: var(--white); }
.ifoff .tip { width: 20px; height: 20px; min-width: 20px; }
.shint { margin: 0; padding-top: 6px; font-size: 13px; color: var(--onwall); display: flex; flex-wrap: wrap; gap: 0 10px; }
.shint .more { color: var(--white); font-weight: 600; }
.kinds, .quick { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 10px 0 2px; }
.kh { width: 100%; font-size: 12px; color: var(--sub); display: inline-flex; align-items: center; }
.qk { display: inline-flex; align-items: center; gap: 2px; min-height: 40px; padding: 0 10px 0 6px; border: 1px solid var(--paperline); border-radius: 20px; background: var(--white); color: var(--ink); font-size: 13px; }
.qk svg { width: 14px; height: 14px; fill: currentColor; }
.bottle.add { border: 2px dashed rgba(255, 255, 255, 0.45); background: transparent; color: var(--white); border-radius: 10px; min-height: 76px; display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 600; padding: 10px; }
.bottle.add:hover { border-color: var(--white); }
.gaps { width: 100%; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 12px; margin-top: 6px; }
.gap { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.find { display: inline-flex; align-items: center; gap: 6px; }
.find svg { width: 14px; height: 14px; }
.find a { color: var(--water); text-decoration: underline; text-underline-offset: 3px; min-height: 44px; padding: 0 6px; display: inline-flex; align-items: center; }
.adnote { width: 100%; margin: 2px 0 0; font-size: 11px; color: var(--onbench); }
.err { display: inline-block; background: var(--wall); color: var(--white); padding: 4px 8px; border-radius: 3px; font-size: 13px; font-weight: 600; }

/* 단추 */
.ghost { border: 1.5px solid var(--line); background: transparent; color: var(--white); border-radius: 6px; padding: 0 12px; display: inline-flex; gap: 6px; align-items: center; min-height: 44px; }
.ghost.sm { font-size: 13px; padding: 0 10px; }
.ghost.danger { color: var(--wall); border-color: currentColor; }
.solid { border: 0; background: var(--ink); color: var(--white); border-radius: 6px; padding: 0 14px; display: inline-flex; gap: 6px; align-items: center; min-height: 44px; font-weight: 600; }
.icon { width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 6px; padding: 0; }
.icon.ghost { border-color: transparent; color: var(--sub); }

/* 편집(라벨 종이) */
.card.editing { grid-column: 1 / -1; background: var(--paper); color: var(--ink); border-radius: 6px; padding: 12px 14px; }
.card.editing .ghost { color: var(--ink); border-color: var(--paperline); }
.card.editing .ghost.danger { color: var(--wall); }
.row1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sp { flex: 1; }
.pname { flex: 1 1 180px; font-size: 16px; font-weight: 600; border: 0; border-bottom: 2px solid var(--paperline); padding: 6px 2px; background: transparent; min-height: 44px; }
.perday { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--sub); }
.perday input { width: 52px; }
.ing-edit { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--paperline); }
.ing-edit select, .ing-edit input, .perday input { min-height: 44px; border: 1px solid var(--paperline); border-radius: 6px; padding: 0 8px; background: var(--white); color: var(--ink); }
.ing-edit select[data-f="nutrient"] { flex: 1 1 170px; max-width: 100%; }
.ing-edit input[data-f="amount"] { width: 92px; }
.ing-edit .u { width: 104px; }
.ing-edit input[data-f="label"] { flex: 1 1 140px; }
.mini { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; color: var(--sub); }
.mini input { width: 80px; }
.row-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* 설명 상자 */
.tip { width: 22px; height: 22px; min-width: 22px; border-radius: 50%; border: 0; background: transparent; display: inline-grid; place-items: center; margin-left: 6px; padding: 0; color: var(--onbench); position: relative; vertical-align: middle; }
.tip svg { width: 18px; height: 18px; fill: currentColor; }
.tip::after { content: ""; position: absolute; inset: -11px; }
#tipbox { position: absolute; z-index: 20; background: var(--white); color: var(--ink); font-size: 13px; line-height: 1.5; padding: 10px 12px; border-radius: 6px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45); }

/* 의견 창 */
dialog#fb { border: 0; border-radius: 6px; padding: 16px; width: min(440px, calc(100vw - 32px)); background: var(--paper); color: var(--ink); }
dialog#fb::backdrop { background: rgba(0, 0, 0, 0.55); }
#fb h2 { margin: 0 0 10px; font-size: 17px; }
#fb textarea { width: 100%; min-height: 140px; border: 1px solid var(--paperline); border-radius: 6px; padding: 10px; background: var(--white); color: var(--ink); resize: vertical; }
#fb-st { min-height: 20px; margin: 6px 0; font-size: 13px; }
.fb-act { display: flex; justify-content: flex-end; gap: 8px; }
#fb .ghost { color: var(--ink); border-color: var(--paperline); }

/* 바닥 */
footer { padding: 18px 16px 40px; font-size: 12px; color: var(--onbench); display: grid; gap: 4px; }
footer a { color: var(--onbench); display: inline-flex; align-items: center; min-height: 44px; }
.ivel-line { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* 개인정보 페이지 */
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px 48px; }
.wrap .top { background: transparent; padding-left: 0; }
.wrap a { color: var(--water); }
.plain { line-height: 1.7; padding-left: 18px; }
.sub { color: var(--onbench); font-size: 12px; }

@media (min-width: 900px) {
  :root { --H: clamp(220px, calc(100vh - 430px), 520px); }
  .stage { grid-template-columns: 380px minmax(0, 1fr); grid-template-rows: auto auto 1fr auto; min-height: calc(100vh - 44px); }
  .top, #who, .bench, footer { grid-column: 1; background: var(--bench); }
  .extra .legend, .extra .nl-h, .extra .tip { color: var(--onwall); }
  .top { padding: 18px 20px 4px; }
  .top h1 { font-size: 30px; }
  .tagline { flex-basis: 100%; order: 3; color: var(--onbench); }
  .fbbtn { border-color: var(--line); }
  #who { padding: 10px 20px 0; }
  #who .seg button:not([aria-checked="true"]) { background: var(--cap); }
  .bench { padding: 18px 20px 6px; }
  #plist { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .scene { grid-column: 2; grid-row: 1 / -1; align-self: start; position: sticky; top: 0; height: calc(100vh - 44px); overflow-y: auto; background: linear-gradient(180deg, var(--wall), var(--wall2)); padding: 22px 28px 16px; display: flex; flex-direction: column; }
  #verdict, #shint, .shelf { background: transparent; padding-left: 0; padding-right: 0; }
  /* 성분이 많아 벽 칸이 넘쳐도 판정 줄이 눌려 겹치지 않게 */
  .scene > * { flex-shrink: 0; }
  .bcard { margin: 12px 0 0; }
  .extra { padding: 12px 0 0; }
  #verdict .line, #verdict .line2 { font-size: 18px; }
  .shelf { margin: 8px -28px 0; flex: 1 0 auto; display: flex; align-items: flex-end; }
  .rack { gap: 20px; padding: 46px 28px 0; }
  .cyl { width: 62px; }
  .bcard, .noul, .legend { max-width: 760px; }
}
@media (prefers-reduced-motion: reduce) {
  .liq, .pct, .spill, .bottle, .btl, .flag { transition: none !important; }
  .cyl.over .tube::after { animation: none; }
}

/* 제품 쪽, 성분 쪽(tools/pages.py): 벽(빨강) 머리, 실험대 위 종이 표 */
.docb { background: var(--bench); }
.doc { max-width: 860px; margin: 0 auto; padding: 0 0 24px; }
.crumb { background: var(--wall); padding: 12px 16px 0; font-size: 13px; display: flex; gap: 8px; color: var(--onwall); }
.crumb a { color: var(--white); font-weight: 600; letter-spacing: .04em; }
.crumb span::before { content: "/"; margin-right: 8px; opacity: .6; }
.dhead { background: var(--wall); padding: 10px 16px 14px; display: flex; gap: 14px; align-items: center; }
.dhead h1 { margin: 0; font-size: 22px; line-height: 1.25; }
.dmeta { margin: 4px 0 0; font-size: 13px; color: var(--onwall); }
.shape { width: 64px; height: 64px; flex: none; background: rgba(0,0,0,.22); border-radius: 10px; padding: 6px; }
.dlead { background: var(--wall); margin: 0; padding: 0 16px 6px; font-size: 15px; }
.mrack { background: var(--wall); display: flex; align-items: flex-end; gap: 10px; padding: 34px 16px 0; overflow-x: auto;
  background-image: linear-gradient(180deg, transparent calc(100% - 46px), var(--bench2) calc(100% - 46px), var(--bench) calc(100% - 34px)); }
.cyl.mini { --H: 110px; width: 52px; }
.cyl.mini .tube { width: 28px; }
.cyl.mini .liq { transition: none; }
.cyl.mini .nm { width: 66px; margin-left: -7px; margin-right: -7px; min-height: 0; }
.cta { display: flex; align-items: center; justify-content: center; margin: 16px 16px 4px; min-height: 48px; border-radius: 6px; background: var(--white); color: var(--ink); font-weight: 600; text-decoration: none; }
.cta:hover { background: var(--water); }
.dsec { margin: 18px 16px 0; }
.dsec h2 { font-size: 16px; margin: 0 0 8px; }
.tblw { overflow-x: auto; background: var(--paper); border-radius: 6px; }
.dt { width: 100%; border-collapse: collapse; color: var(--ink); font-size: 14px; font-variant-numeric: tabular-nums; }
.dt th, .dt td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--paperline); white-space: nowrap; }
.dt thead th { font-size: 12px; color: var(--sub); font-weight: 600; }
.dt tbody th { font-weight: 600; }
.dt a { color: var(--ink); }
.dt b.o { background: var(--wall); color: var(--white); padding: 1px 6px; border-radius: 3px; }
.plist2, .olist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.plist2 li { background: var(--paper); color: var(--ink); border-radius: 6px; padding: 10px 12px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.plist2 li a:first-child { color: var(--ink); font-weight: 600; flex: 1 1 200px; }
.plist2 .ov { font-size: 13px; color: var(--wall); font-weight: 600; }
.plist2 .try { font-size: 13px; color: var(--ink); border: 1px solid var(--paperline); border-radius: 6px; padding: 0 10px; min-height: 40px; display: inline-flex; align-items: center; text-decoration: none; }
.olist { display: flex; flex-wrap: wrap; gap: 6px; }
.olist li { border: 1.5px solid var(--line); border-radius: 6px; padding: 4px 10px; font-size: 13px; color: var(--onbench); }
.dsec .sub { margin: 6px 0 0; }
.dfoot { max-width: 860px; margin: 0 auto; }
@media (min-width: 900px) {
  .doc { padding-top: 16px; }
  .crumb { border-radius: 8px 8px 0 0; padding: 14px 24px 0; }
  .dhead, .dlead, .mrack { padding-left: 24px; padding-right: 24px; }
  .dhead h1 { font-size: 28px; }
  .cta { margin: 18px 0 4px; max-width: 360px; }
  .dsec { margin: 22px 0 0; }
}

/* 제품 검색 */
.finder { margin: 0 0 18px; position: relative; }
.fbox { display: flex; align-items: center; gap: 8px; background: var(--white); color: var(--ink); border-radius: 8px; padding: 0 12px; min-height: 52px; box-shadow: 0 0 0 3px rgba(255,255,255,.12); }
.fbox svg { width: 22px; height: 22px; color: var(--sub); }
.fbox input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 16px; min-height: 50px; color: var(--ink); outline: none; }
.fbox:focus-within { box-shadow: 0 0 0 3px var(--water); }
.qres { list-style: none; margin: 6px 0 0; padding: 4px; background: var(--paper); border-radius: 8px; color: var(--ink); display: grid; gap: 2px; }
.qr { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; border: 0; background: transparent; border-radius: 6px; padding: 6px 8px; min-height: 52px; color: var(--ink); }
.qr:hover, .qr:focus-visible { background: var(--white); }
.qr[disabled] { opacity: .55; cursor: default; }
.qr .shape { width: 40px; height: 40px; padding: 4px; background: var(--bench2); border-radius: 8px; }
.qr .qt { flex: 1; min-width: 0; display: grid; }
.qr .qt b { font-size: 14px; line-height: 1.25; }
.qr .qt small { font-size: 12px; color: var(--sub); }
.qr.man { border-top: 1px solid var(--paperline); border-radius: 0 0 6px 6px; color: var(--wall); }
.qr.man svg { width: 18px; height: 18px; margin: 0 11px; }
.qn { padding: 10px; font-size: 13px; color: var(--sub); }
.dbline { margin: 8px 0 0; font-size: 12px; color: var(--onbench); display: flex; align-items: center; flex-wrap: wrap; gap: 4px 0; }
.live { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--white); font-weight: 600; }
.live .dot { width: 8px; height: 8px; border-radius: 50%; background: #7ee2a8; box-shadow: 0 0 0 0 rgba(126,226,168,.6); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(126,226,168,.6); } 70% { box-shadow: 0 0 0 8px rgba(126,226,168,0); } 100% { box-shadow: 0 0 0 0 rgba(126,226,168,0); } }
/* DB 제품 병: 모양 그림, 업체 이름, 성분 표 링크 */
.btl.db { padding-left: 58px; }
.btl.db .shape { position: absolute; left: 8px; top: 14px; width: 42px; height: 42px; padding: 4px; background: var(--bench2); border-radius: 8px; }
.plink { display: inline-flex; align-items: center; min-height: 36px; font-size: 13px; color: var(--water); margin-top: 2px; text-underline-offset: 3px; }
.bottle.land { animation: land .8s cubic-bezier(.3,1.4,.5,1); }
@keyframes land { 0% { transform: translateY(-18px); opacity: .2; } 100% { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .bottle.land, .live .dot { animation: none; } }
.seen { background: var(--wall); margin: 0; padding: 0 16px 8px; font-size: 14px; }
.seen .sub { margin-left: 6px; color: var(--onwall); }
.plist2 .ov.n { color: var(--sub); }
@media (min-width: 900px) { .seen { padding-left: 24px; padding-right: 24px; } }
.dt .sub { color: var(--sub); font-size: 12px; }
.dt .fn { font-size: 11px; color: var(--sub); font-weight: 400; }

/* 생성 그림 모양(tools/art.py): 그림 자체에 배경이 있어 칸 여백을 없앤다 */
img.shape { padding: 0; object-fit: cover; display: block; }

/* 쿠팡 상품 칸(제품 쪽, 성분 쪽). 대가성 표시는 칸 첫머리 */
.shop .adnote { font-size: 12px; opacity: .8; margin: 0 0 8px; }
.shopl { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.shopl a { display: flex; gap: 10px; align-items: center; background: var(--paper); color: var(--ink); border-radius: 6px; padding: 8px 10px; text-decoration: none; min-height: 72px; }
.shopl img { width: 56px; height: 56px; object-fit: contain; background: #fff; border-radius: 4px; flex: none; }
.shopl span { flex: 1; font-size: 13px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.shopl b { font-size: 13px; white-space: nowrap; }

/* 판정 2026-11-06: 검색창을 첫 화면 위로, 예시 표시는 결과 바로 위 */
.stage > .finder { order: 2; background: var(--wall); margin: 0; padding: 10px 16px 0; }
.stage > .finder .dbline { color: var(--onwall); }
.stage > .finder .tip { color: var(--white); }
#who { order: 3; } #exbar, #verdict, #shint { order: 4; } .shelf { order: 5; } #basis { order: 6; } .bench { order: 7; } .extra { order: 8; } footer { order: 9; }
.exbar { background: var(--wall); margin: 0; padding: 12px 16px 0; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--onwall); }
.exbar[hidden] { display: none; }
.exbar .tag { color: var(--white); }
.exbar .ghost { border-color: var(--glass); }
.ph3 { margin: 14px 0 6px; font-size: 14px; font-weight: 600; color: var(--onbench); }
/* 제품 쪽 표: 상한 칸의 덧붙임 글은 줄을 바꿔 휴대폰에서 잘리지 않게 */
.dt .fn { display: block; white-space: normal; margin-top: 2px; }
.dt td:last-child { white-space: normal; min-width: 64px; }
@media (max-width: 599px) { .dt th, .dt td { padding: 9px 6px; } .dt { font-size: 13px; } }
@media (min-width: 900px) {
  .stage { grid-template-rows: auto auto auto 1fr auto; }
  .stage > .finder { grid-column: 1; background: var(--bench); padding: 14px 20px 0; }
  .stage > .finder .dbline { color: var(--onbench); }
  .exbar { background: transparent; padding: 0 0 8px; }
  /* 오른쪽 패널: 높이를 화면에 묶지 않아 안쪽 스크롤로 마지막 칩이 잘리지 않게(내용이 짧으면 그대로 붙어 있음) */
  .scene { height: auto; min-height: calc(100vh - 44px); overflow-y: visible; }
}
.tline { margin: 18px 16px 0; line-height: 2; }
@media (min-width: 900px) { .tline { margin: 22px 0 0; } }
.tline a { color: var(--white); margin-right: 10px; white-space: nowrap; }
.crumb a + a::before { content: "/"; margin-right: 8px; opacity: .6; }
