/* K-BEAUTY AI extras: 쿠팡 제품 찾기 + 카카오톡 채널. 모바일 우선, 고정(fixed/sticky)·팝업 없음. 접두사 kb- */
.kb-section{margin:18px 0;padding:18px 16px;border:1px solid #f0e3df;border-radius:20px;background:#fff;color:#2b2528}
.kb-section[hidden]{display:none}
.kb-section header p,.kb-eyebrow{margin:0 0 4px;font-size:11px;font-weight:800;letter-spacing:.1em;color:#c0626a}
.kb-section h2{margin:0 0 6px;font-size:20px;line-height:1.3}
.kb-section header span{display:block;margin-bottom:12px;font-size:12px;line-height:1.55;color:#7b6f73}
.kb-need{display:grid;gap:8px;margin-bottom:8px}
.kb-search{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:60px;padding:10px 14px;border:1px solid #f0e3df;border-radius:14px;background:#fffaf6;color:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent}
.kb-search span{display:grid;gap:1px;min-width:0}
.kb-search small{font-size:11px;font-weight:800;color:#c0626a}
.kb-search b{font-size:14px;line-height:1.35;overflow-wrap:anywhere}
.kb-search em{font-style:normal;font-size:11px;color:#7b6f73}
.kb-search i{flex:none;font-style:normal;font-size:12px;font-weight:800;color:#2b2528}
.kb-product{display:grid;grid-template-columns:72px 1fr;grid-template-areas:"img copy" "btn btn";gap:10px 12px;padding:12px;border:1px solid #f0e3df;border-radius:14px;background:#fff}
.kb-product img,.kb-noimg{grid-area:img;width:72px;height:72px;object-fit:cover;border-radius:10px;background:#fdeeea}
.kb-product-copy{grid-area:copy;display:grid;gap:3px;align-content:start;min-width:0}
.kb-product-copy b{font-size:14px;line-height:1.35;overflow-wrap:anywhere}
.kb-price{font-size:13px;font-weight:800;color:#c0626a}
.kb-product-copy small{font-size:11px;color:#7b6f73}
.kb-btn{grid-area:btn;display:flex;align-items:center;justify-content:center;min-height:48px;border-radius:12px;background:#c25b4c;color:#fff;font-size:14px;font-weight:800;text-decoration:none}
.kb-btn--off{background:#f0e3df;color:#7b6f73}
.kb-note{margin:10px 0 0;font-size:11px;line-height:1.55;color:#7b6f73}
/* 카카오톡 채널 */
#kb-kakao{text-align:center}
.kb-kakao-body{margin:0 0 14px;font-size:14px;line-height:1.6;color:#5e5357}
.kb-kakao-btn{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:100%;min-height:52px;padding:0 16px;border-radius:12px;background:#fee500;color:#191919;font-size:16px;font-weight:700;text-decoration:none;-webkit-tap-highlight-color:transparent}
.kb-kakao-btn--off{background:#eee;color:#777;font-weight:500}
.kb-kakao-btn:focus-visible,.kb-search:focus-visible,.kb-btn:focus-visible{outline:3px solid #2b2528;outline-offset:2px}
#kb-kakao small{display:block;margin-top:12px;font-size:12px;line-height:1.5;color:#7b6f73}
.kb-footer{display:grid;gap:4px;padding:18px 16px calc(24px + env(safe-area-inset-bottom));text-align:center;color:#7b6f73;font-size:12px}
.kb-footer b{color:#2b2528;font-size:13px;letter-spacing:.06em}
/* 개발용 검증 패널은 ?qa 에서만 */
body:not([data-qa]) .qa-details,body:not([data-qa]) .json-panel{display:none}
@media (min-width:640px){.kb-section{max-width:520px;margin-left:auto;margin-right:auto}}

/* 단계별 사진 아래 "사용 제품" */
.stage-grid .kb-stage-products{margin:0;padding:8px 12px 12px;background:#fff;display:flex;flex-wrap:wrap;align-items:center;gap:5px}
.stage-grid .kb-stage-products small{flex:0 0 100%;font-size:10.5px;font-weight:800;letter-spacing:.08em;color:#c0626a}
.stage-grid .kb-stage-products span{padding:4px 9px;border:1px solid #f0e3df;border-radius:999px;background:#fffaf6;font-size:12px;line-height:1.35;color:#2b2528}

/* 참고 사진 샘플 줄(샘플로 체험 줄은 삭제됨): 한 줄 전체 폭 */
.sample-lab.sample-lab--reference{grid-template-columns:1fr}
.sample-lab.sample-lab--reference:not(:has(> div:not([hidden]))){display:none}

/* 단계 카드 높이가 달라도 아래에 배경색(회색) 빈 칸이 비치지 않게: 카드는 흰 바탕 + 제품 영역이 남는 높이를 채운다 */
.stage-grid figure{background:#fff;display:flex;flex-direction:column}
.stage-grid figure .kb-stage-products{flex:1 1 auto;align-content:flex-start}

/* 참고 사진 찾기(이름 검색) */
.kb-ref-search{flex:0 0 100%;display:block;margin:6px 0 0;padding-top:10px;border-top:1px dashed #f0e3df}
.kb-ref-search label{display:block;margin-bottom:6px;font-size:11px;font-weight:800;letter-spacing:.08em;color:#c0626a}
.kb-ref-search-row{display:flex;gap:6px}
.kb-ref-search-row input{flex:1 1 auto;min-width:0;min-height:44px;padding:8px 14px;border:1px solid #f0e3df;border-radius:999px;background:#fff;font-size:16px;color:#2b2528}
.kb-ref-search-row input:focus{outline:2px solid #c0626a;outline-offset:1px}
.kb-ref-search-row button{flex:0 0 auto;min-height:44px;padding:8px 16px;border:1px solid #c0626a;border-radius:999px;background:#c0626a;color:#fff;font-size:13px;font-weight:700;cursor:pointer}
.kb-ref-search-row button.kb-ref-search-alt{background:#fff;color:#c0626a}
.kb-search-hint{margin:8px 2px 0;font-size:12px;line-height:1.55;color:#7b6f73}
.kb-search-hint[data-error="true"]{color:#b3363f;font-weight:700}

/* 참고 사진 찾기: 3단계 안내 + 돌아오기 버튼 */
.kb-search-steps{margin:10px 0 0;padding:10px 12px 10px 30px;border-radius:14px;background:#fffaf6;font-size:12.5px;line-height:1.7;color:#4a3f43}
.kb-search-steps b{color:#c0626a}
.kb-search-steps small{color:#7b6f73;font-size:11.5px}
.kb-return{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:10px;padding:12px 14px;border:1px solid #c0626a;border-radius:14px;background:#fff0ee;font-size:13px;font-weight:700;color:#2b2528}
.kb-return[hidden]{display:none}
.kb-return button{min-height:44px;padding:8px 16px;border:0;border-radius:999px;background:#c0626a;color:#fff;font-size:13px;font-weight:700;cursor:pointer}

/* 메이크업 강도 버튼 (25/50/75/100%) — 슬라이더가 아니라 버튼 */
.kb-intensity{margin:14px 0;padding:12px 14px;border:1px solid #f0e3df;border-radius:18px;background:#fff}
.kb-intensity-head{display:flex;align-items:baseline;justify-content:space-between;margin-bottom:8px;font-size:13px;color:#2b2528}
.kb-intensity-head strong{font-size:18px;color:#c0626a}
.kb-intensity-buttons{display:grid;grid-template-columns:repeat(6,1fr);gap:5px}
.kb-intensity-buttons button{min-height:44px;padding:0;border:1px solid #f0e3df;border-radius:999px;background:#fffaf6;color:#7b6f73;font-size:13px;font-weight:700;cursor:pointer}
.kb-intensity-buttons button.active{border-color:#c0626a;background:#c0626a;color:#fff}
.kb-intensity[data-busy="true"]{opacity:.7;pointer-events:none}

/* 사용 편의 개선 (2026-10-03) */
body:not([data-sample="on"]) #sample-button{display:none}
.kb-tips{margin:0 0 14px;padding:10px 14px;border-radius:14px;background:#fffaf6;font-size:12.5px;line-height:1.6;color:#4a3f43}
.kb-tips b{margin-right:6px;color:#c0626a}
.kb-result-actions{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 0}
.kb-result-actions button{flex:1 1 200px;min-height:48px;padding:10px 16px;border-radius:999px;font-size:14px;font-weight:700;cursor:pointer}
.kb-nudge{border:1px solid #c0626a;background:#fff;color:#c0626a}
.kb-nudge[hidden]{display:none}
.kb-save{border:0;background:#c0626a;color:#fff}
.kb-note-small{margin:8px 4px 0;font-size:12px;color:#7b6f73}
.kb-note-small[hidden]{display:none}
.kb-error{margin:14px 0;padding:14px 16px;border:1px solid #c0626a;border-radius:16px;background:#fff0ee;color:#2b2528}
.kb-error[hidden]{display:none}
.kb-error b{display:block;margin-bottom:4px;font-size:15px;color:#b3363f}
.kb-error p{margin:0 0 10px;font-size:13px;line-height:1.6}
.kb-error button{min-height:44px;padding:8px 18px;border:0;border-radius:999px;background:#c0626a;color:#fff;font-size:13px;font-weight:700;cursor:pointer}
.kb-swipe-hint{display:none;margin:-2px 2px 10px;font-size:12px;color:#7b6f73}
@media(max-width:600px){
  .kb-swipe-hint{display:block}
  .stage-grid{display:flex;gap:12px;overflow-x:auto;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;padding-bottom:12px}
  .stage-grid figure{flex:0 0 80%;scroll-snap-align:center}
}

/* 폰·태블릿: "메이크업 전/후" 문구가 얼굴을 가리지 않게 사진 아래로 내린다 (2026-10-03) */
.stage-grid{position:relative;isolation:isolate}
@media(max-width:760px){
  .before-after-hero figure,.reference-pair figure{overflow:visible;background:transparent;display:flex;flex-direction:column;box-shadow:none}
  .before-after-hero canvas,.reference-pair canvas,.reference-pair img{border-radius:18px}
  .before-after-hero figure.after{box-shadow:none}
  .before-after-hero figure.after canvas{box-shadow:0 0 0 2px #e7a59b,0 10px 22px rgba(194,91,76,.14)}
  .before-after-hero figcaption,.reference-pair figcaption{position:static!important;margin:8px 0 0!important;padding:0 2px!important;background:transparent!important;backdrop-filter:none!important;display:block!important;border-radius:0;text-align:center}
  .before-after-hero figcaption b,.reference-pair figcaption b{display:block;font-size:13px}
  .before-after-hero figcaption span,.reference-pair figcaption span{display:block;margin-top:1px;font-size:11.5px;text-align:center!important}
}

/* Before/After 캡션: 작은 한글 "메이크업 전/후" 를 사진 아래에(모든 화면 폭). 얼굴을 가리지 않는다. */
.before-after-hero figure{overflow:visible;background:transparent;display:flex;flex-direction:column}
.before-after-hero figure.after{box-shadow:none}
.before-after-hero canvas{border-radius:18px}
.before-after-hero figure.after canvas{box-shadow:0 0 0 2px #e7a59b,0 10px 22px rgba(194,91,76,.14)}
.before-after-hero figcaption{position:static!important;margin:8px 0 0!important;padding:0 2px!important;background:transparent!important;backdrop-filter:none!important;display:block!important;border-radius:0;text-align:center}
.before-after-hero figcaption b{display:block;font-size:11px;font-weight:800;letter-spacing:.2em;color:#7b6f73}
.before-after-hero figure.after figcaption b{color:#c0626a}
.before-after-hero figcaption span{display:none}

/* 푸터: 안내 링크 + 제휴 고지 */
.kb-footer-links{display:flex;gap:14px;justify-content:center;flex-wrap:wrap;margin-top:8px}
.kb-footer-links a{color:#7b6f73;font-size:13px;text-decoration:underline}
.kb-footer-note{display:block;max-width:520px;margin:8px auto 0;font-size:11.5px;line-height:1.6;color:#7b6f73}

/* 제품 카드: 이미지가 없으면 빈 네모 없이 글자만, 대표 제품 표시 */
.kb-product--noimg{grid-template-columns:1fr;grid-template-areas:"copy" "btn"}
.kb-product-cat{font-size:11px;font-weight:800;letter-spacing:.04em;color:#c0626a}

/* ───── 12칸 결과(2026-10-05): 윗줄 전체 얼굴 6칸 + 아랫줄 단계별 확대컷 6칸. 한 열(.kb-stage-col)이 한 단계의 [전체 얼굴 + 확대컷] ───── */
.kb-zoom-note{margin:-2px 2px 12px;font-size:12.5px;line-height:1.5;color:#7b6f73}
.stage-grid{grid-template-columns:repeat(6,minmax(0,1fr));column-gap:12px;row-gap:0}
.stage-grid .kb-stage-col{display:grid;grid-row:span 2;grid-template-rows:subgrid;row-gap:14px;min-width:0}
.stage-grid .kb-stage-col figure{min-width:0}
.stage-grid .kb-stage-col figcaption{min-height:58px;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:3px;padding:9px 11px}
.stage-grid .kb-stage-col figcaption b{font-size:12px;white-space:nowrap}
.stage-grid .kb-stage-col figcaption span{max-width:none;text-align:left;font-size:11px;white-space:nowrap}
@media(max-width:900px){
  .kb-swipe-hint{display:block}
  .stage-grid{display:grid;grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:min(78%,300px);grid-template-rows:auto auto;column-gap:12px;overflow-x:auto;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;padding-bottom:12px}
  .stage-grid .kb-stage-col{scroll-snap-align:center}
}
/* ───── 내 얼굴 핵심 분석: 상품 아래 작고 간단한 목록(2026-10-05) ───── */
.kb-insights{padding:12px 16px}
.kb-insights .kb-eyebrow{margin:0 0 4px}
.kb-insight-list{display:grid;gap:0}
.kb-insight-list article{display:grid;grid-template-columns:86px 1fr;gap:1px 10px;align-items:baseline;padding:8px 0;border:0;border-top:1px solid #f4eae7;border-radius:0;background:none;box-shadow:none}
.kb-insight-list article:first-child{border-top:0}
.kb-insight-list span{grid-row:span 2;font-size:10px;font-weight:800;letter-spacing:.06em;color:#c0626a}
.kb-insight-list h3{margin:0;font-size:14px;line-height:1.4}
.kb-insight-list p{margin:0;font-size:12px;line-height:1.5;color:#7b6f73}

.audit-strip[hidden]{display:none}

/* Language switcher KO / EN / FR */
.kb-lang { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line, #f0e3df); border-radius: 999px; background: #fff; }
.kb-lang a { display: inline-block; min-width: 34px; padding: 5px 9px; border-radius: 999px; color: var(--muted, #7b6f73); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-align: center; text-decoration: none; }
.kb-lang a:hover { color: var(--ink, #2b2528); }
.kb-lang a[aria-current="true"] { background: var(--coral, #c25b4c); color: #fff; pointer-events: none; }
.kb-lang a:focus-visible { outline: 2px solid var(--coral, #c25b4c); outline-offset: 2px; }
.kb-browse-entry .ghost-button{flex:none;min-height:44px}
/* 올리브영 글로벌 진열 · 회원가입 안내 */
.kb-badge{justify-self:start;display:inline-block;padding:2px 8px;border-radius:999px;background:#fdeeea;color:#a24a3f;font-size:10.5px;font-weight:800;letter-spacing:.02em}
@media (max-width:380px){.kb-btns--two{grid-template-columns:1fr}}
.kb-more>summary{cursor:pointer;list-style:none;min-height:44px;display:flex;align-items:center;justify-content:center;border:1px solid #f0e3df;border-radius:12px;background:#fff;color:#2b2528;font-size:13.5px;font-weight:800}
.kb-more>summary::-webkit-details-marker{display:none}
.kb-more[open]>summary{margin-bottom:8px}
.kb-more>summary:focus-visible{outline:3px solid #2b2528;outline-offset:2px}.kb-need--section{gap:10px;margin-top:6px}
.kb-need-head--section b{font-size:16px}
/* Product grid: image-first cards, 2 columns on phones, 3 on tablets, 4 on desktop */
@media (min-width:640px){:is(#kb-products,#kb-browse,#kb-oy-shop).kb-section{max-width:1100px}}
:is(#kb-products,#kb-browse,#kb-oy-shop) .kb-need--section{--kb-cols:2;display:grid;grid-template-columns:repeat(var(--kb-cols),minmax(0,1fr));gap:12px;align-items:stretch}
@media (min-width:700px){:is(#kb-products,#kb-browse,#kb-oy-shop) .kb-need--section{--kb-cols:3;gap:16px}}
@media (min-width:1000px){:is(#kb-products,#kb-browse,#kb-oy-shop) .kb-need--section{--kb-cols:4}}
:is(#kb-products,#kb-browse,#kb-oy-shop) .kb-need--section>.kb-need-head,:is(#kb-products,#kb-browse,#kb-oy-shop) .kb-need--section>.kb-more{grid-column:1/-1}
/* .kb-more is a <details> element: Chrome lays its content out inside an internal ::details-content box,
   so putting display:grid directly on <details> silently fails (children stack in one column). The grid
   goes on a real <div class="kb-more-grid"> wrapper inside it instead. */
:is(#kb-products,#kb-browse,#kb-oy-shop) .kb-more-grid{display:grid;grid-template-columns:repeat(var(--kb-cols),minmax(0,1fr));gap:inherit}
:is(#kb-products,#kb-browse,#kb-oy-shop) .kb-need--section .kb-product{display:flex;flex-direction:column;gap:8px;padding:8px 8px 10px;grid-template-columns:none;height:100%}
:is(#kb-products,#kb-browse,#kb-oy-shop) .kb-need--section .kb-product>img{width:100%;height:auto;min-height:0;aspect-ratio:1/1;object-fit:contain;background:#fff;border-radius:10px}
:is(#kb-products,#kb-browse,#kb-oy-shop) .kb-need--section .kb-product-copy{flex:1;gap:3px;padding:0 2px}
:is(#kb-products,#kb-browse,#kb-oy-shop) .kb-need--section .kb-product-copy b{font-size:13.5px;line-height:1.35}
:is(#kb-products,#kb-browse,#kb-oy-shop) .kb-need--section .kb-product-reason{font-size:12px;line-height:1.4;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
:is(#kb-products,#kb-browse,#kb-oy-shop) .kb-need--section .kb-btns,:is(#kb-products,#kb-browse,#kb-oy-shop) .kb-need--section .kb-btns--two{grid-template-columns:1fr;gap:6px;margin-top:auto}
:is(#kb-products,#kb-browse,#kb-oy-shop) .kb-need--section .kb-btns .kb-btn{min-height:40px;font-size:12.5px;border-radius:10px}.kb-note--tip{margin:12px 0 0;padding:10px 12px;font-size:13px;line-height:1.6;color:#4a3a40;background:#fff6f2;border:1px solid #f0cfc4;border-radius:10px}
.kb-guide{margin:14px 0 0;padding:16px 18px;background:#fff6f2;border:2px solid #c25b4e;border-radius:12px;color:#3d2c31}
.kb-guide-title{display:block;font-size:18px;margin:0 0 8px;color:#a8453a}
.kb-guide ol{margin:0 0 8px;padding-left:22px;font-size:14px;line-height:1.65}
.kb-guide-note{margin:6px 0 0;font-size:13px;line-height:1.6;font-weight:600}
.kb-guide-link{display:inline-block;margin-left:4px;padding:2px 10px;border-radius:999px;background:#c25b4e;color:#fff;font-size:12px;font-weight:700;text-decoration:none;white-space:nowrap}
.kb-guide-link:hover{background:#a8453a}
#kb-oy-shop .kb-need-head{display:flex;flex-direction:column;gap:2px;margin:0}
#kb-oy-shop .kb-need-head b{font-size:16px}
#kb-oy-shop .kb-need-head span{font-size:12px;color:#7b6f73}
.kb-guide a:not(.kb-guide-link){color:#a8453a;font-weight:700}
#kb-oy-shop [hidden]{display:none!important}
.kb-note--ad{margin:12px 0 0;padding:10px 12px;font-size:13px;line-height:1.6;color:#3d2c31;background:#fff;border:1.5px solid #c25b4e;border-radius:10px}
.kb-note--ad b{color:#a8453a}
.kb-oy-find{margin:14px 0 4px;padding:10px 0 6px;scroll-margin-top:8px}
.kb-oy-find-box{display:flex;align-items:center;gap:8px;min-height:48px;padding:0 6px 0 12px;border:1.5px solid #e6cfc8;border-radius:12px;background:#fff}
.kb-oy-find-box:focus-within{border-color:#c25b4e;box-shadow:0 0 0 3px rgba(194,91,78,.15)}
.kb-oy-find-icon{flex:none;font-size:18px;color:#7b6f73}
.kb-oy-find-input{flex:1;min-width:0;height:44px;border:0;outline:0;background:transparent;font:inherit;font-size:16px;color:#2b2528}
.kb-oy-find-input::-webkit-search-cancel-button{display:none}
.kb-oy-find-clear{flex:none;width:40px;height:40px;border:0;border-radius:10px;background:#f6ece8;color:#4a3a40;font-size:20px;line-height:1;cursor:pointer}
.kb-oy-chips{display:flex;gap:6px;margin-top:8px;overflow-x:auto;padding-bottom:4px;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.kb-oy-chips::-webkit-scrollbar{display:none}
.kb-oy-chip{flex:none;min-height:40px;padding:0 14px;border:1px solid #e6cfc8;border-radius:999px;background:#fff;color:#3d2c31;font:inherit;font-size:13.5px;font-weight:700;white-space:nowrap;cursor:pointer}
.kb-oy-chip[aria-pressed="true"]{background:#c25b4e;border-color:#c25b4e;color:#fff}
.kb-oy-chip:focus-visible,.kb-oy-find-clear:focus-visible{outline:3px solid #2b2528;outline-offset:2px}
.kb-oy-find-status{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.kb-oy-empty{grid-column:1/-1;display:grid;gap:10px;justify-items:start;padding:16px;border:1px dashed #e6cfc8;border-radius:12px;background:#fff;font-size:14px}
.kb-oy-empty p{margin:0}
.kb-product-stock{display:inline-block;margin-top:2px;padding:2px 6px;border-radius:6px;background:#f4ece9;color:#6b5a60!important;font-weight:700;line-height:1.4}
