/* 글꼴: 폴더 안 파일 사용 (인터넷 없이도 표시) — Pretendard, SIL OFL 1.1 (assets/fonts/LICENSE.txt) */
@font-face {
  font-family: "Pretendard Variable";
  src: url("assets/fonts/PretendardVariable.woff2") format("woff2-variations");
  font-weight: 45 920; font-style: normal; font-display: swap;
}
:root {
  --ink: #000;
  --sub: #737373;
  --line: #ececec;
  --fill: #f4f4f4;
  --bg: #fff;
  --pad: 20px;
  --r-card: 22px;
  --r-photo: 4px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color: var(--ink); background: #f7f7f7; letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}
#app { max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--bg); position: relative; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { display: block; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.scroll-x { display: flex; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.scroll-x::-webkit-scrollbar { display: none; }

/* ── 상단 */
.top { position: sticky; top: 0; z-index: 10; background: var(--bg); padding: 18px var(--pad) 0; }
.tabs { display: flex; align-items: center; gap: 18px; }
.tabs a { font-size: 27px; font-weight: 800; letter-spacing: -0.03em; color: #949494; }
.tabs a[aria-current="page"] { color: var(--ink); }
.tabs .bar { width: 1px; height: 22px; background: var(--line); }
.brandrow { gap: 8px; padding: 18px var(--pad) 14px; }
/* 옆으로 넘기는 줄 끝에도 오른쪽 여백이 남도록 (일부 브라우저는 끝 padding 을 무시함) */
.scroll-x::after { content: ""; flex: 0 0 1px; }
.chip {
  flex: none; height: 36px; padding: 0 15px; border-radius: 18px; background: var(--fill);
  font-size: 14.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
}
.chip[aria-pressed="true"], .chip[aria-current="true"] { background: var(--ink); color: #fff; }
.chip .n { font-weight: 500; color: #6b6b6b; font-size: 13px; }
.chip[aria-pressed="true"] .n, .chip[aria-current="true"] .n { color: rgba(255,255,255,.75); }
.chip.empty { color: #737373; background: #fafafa; }

/* ── 홈 카드 */
.grid { padding: 4px var(--pad) 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 26px 12px; }
.card { display: block; }
.card .ph { aspect-ratio: 1 / 1; border-radius: 16px; overflow: hidden; background: var(--fill); }
.card .ph img { width: 100%; height: 100%; object-fit: cover; }
.card .b { margin-top: 11px; font-size: 13px; font-weight: 600; color: var(--sub); }
.card h2 { margin-top: 2px; font-size: 18px; line-height: 1.3; font-weight: 800; letter-spacing: -0.03em; }
.card p { margin-top: 3px; font-size: 13.5px; color: #555; }

.section-h { padding: 34px var(--pad) 4px; font-size: 22px; font-weight: 800; letter-spacing: -0.03em; }
.section-sub { padding: 0 var(--pad); color: var(--sub); font-size: 14px; line-height: 1.5; }
.plain-list { padding: 8px var(--pad) 10px; }
.plain-list li { list-style: none; border-bottom: 1px solid var(--line); }
.plain-list a { display: flex; justify-content: space-between; align-items: baseline; padding: 15px 0; gap: 12px; }
.plain-list b { font-weight: 650; font-size: 16px; }
.plain-list span { color: var(--sub); font-size: 13.5px; flex: none; }

/* ── 상세 */
.float { position: absolute; top: 14px; z-index: 20; width: 46px; height: 46px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.14); display: grid; place-items: center; }
.float svg { width: 22px; height: 22px; }
.float.back { left: 14px; }
.float.home { right: max(14px, calc(50% - 240px + 14px)); }
.hero { aspect-ratio: 1 / 1; background: #ddd; overflow: hidden; }
.hero img { width: 100%; height: 100%; object-fit: cover; }
.head { padding: 24px var(--pad) 6px; }
.head .b { font-size: 15px; font-weight: 700; color: var(--sub); }
.head h1 { font-size: 32px; font-weight: 800; letter-spacing: -0.035em; margin-top: 4px; line-height: 1.2; }
.head .spec { margin-top: 10px; font-size: 14.5px; color: #555; line-height: 1.6; }
.colorbar { position: sticky; top: 0; z-index: 9; background: var(--bg); padding: 16px var(--pad); gap: 8px; border-bottom: 1px solid var(--line); }

.case { padding: 30px 0 8px; border-bottom: 8px solid #f6f6f6; }
.case h3 { padding: 0 var(--pad); font-size: 21px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.35; }
.case .info { padding: 6px var(--pad) 16px; color: var(--sub); font-size: 14.5px; display: flex; gap: 10px; flex-wrap: wrap; }
.case .info b { color: var(--ink); font-weight: 650; }
.gallery { gap: 10px; padding: 0 var(--pad); scroll-snap-type: x mandatory; scroll-padding: 0 var(--pad); }
.gallery img { flex: none; width: 84%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--r-photo); background: var(--fill); scroll-snap-align: start; }
.case .src { display: inline-block; margin: 14px var(--pad) 18px; font-size: 14px; color: #555; border-bottom: 1px solid #c9c9c9; padding-bottom: 1px; }
.count { padding: 22px var(--pad) 0; font-size: 15px; font-weight: 400; color: var(--sub); }
.count b { color: var(--ink); }
.empty-box { margin: 30px var(--pad); padding: 30px 22px; background: var(--fill); border-radius: 16px; font-size: 15px; line-height: 1.6; color: #444; }
.empty-box strong { display: block; font-size: 17px; color: var(--ink); margin-bottom: 4px; }

/* 비슷한 색상 */
.similar { gap: 12px; padding: 14px var(--pad) 8px; }
.sim { flex: none; width: 46%; }
.sim .ph { aspect-ratio: 1 / 1; border-radius: 14px; overflow: hidden; background: var(--fill); }
.sim .ph img { width: 100%; height: 100%; object-fit: cover; }
.sim .t1 { margin-top: 10px; font-size: 13px; color: var(--sub); font-weight: 600; }
.sim .t2 { margin-top: 2px; font-size: 16px; font-weight: 750; line-height: 1.3; letter-spacing: -0.02em; }
.sim .t3 { margin-top: 3px; font-size: 13px; color: var(--sub); }

/* 최신 시공 */
.latest { padding: 22px 0 20px; }
.lcard { display: block; padding: 0 var(--pad) 30px; }
.lcard .ph { aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; background: var(--fill); }
.lcard .ph img { width: 100%; height: 100%; object-fit: cover; }
.lcard .t1 { margin-top: 14px; font-size: 14px; color: var(--sub); font-weight: 600; }
.lcard .t2 { margin-top: 3px; font-size: 20px; font-weight: 800; letter-spacing: -0.03em; }
.lcard .t3 { margin-top: 4px; font-size: 14.5px; color: #555; }

.hint { padding: 26px var(--pad) 30px; }
.lcard .date { color: var(--sub); }
.foot { padding: 34px var(--pad) 60px; background: #f6f6f6; color: #666; font-size: 13.5px; line-height: 1.7; }
.foot strong { color: var(--ink); font-size: 16px; display: block; margin-bottom: 6px; }
.foot a { border-bottom: 1px solid #bbb; }

/* 단종 표시 */
.tag { display: inline-block; vertical-align: 1px; margin-left: 2px; padding: 1px 6px; border-radius: 4px;
  background: #ededed; color: #6b6b6b; font-size: 11.5px; font-weight: 700; line-height: 1.5; }
.disc-note { margin-top: 14px; padding: 13px 15px; border-radius: 12px; background: var(--fill); color: #444; font-size: 14px; line-height: 1.55; }
.src-none { height: 18px; }

/* ── 탭 3개 */
.tabs { gap: 14px; }
.tabs a { font-size: 25px; }
.tabs .badge { display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; margin-left: 4px; vertical-align: 6px;
  border-radius: 10px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: 0; }

/* 인스타 닮은 마루 번호 */
.sim .ph { position: relative; }
.sim .num { position: absolute; left: 8px; top: 6px; font-size: 20px; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.45); line-height: 1; }

/* 제품 페이지: 비교함 담기 */
.cmp-act { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px var(--pad) 0; }
.cmp-btn { height: 44px; padding: 0 18px; border-radius: 22px; background: var(--ink); color: #fff; font-weight: 700; font-size: 15px; }
.cmp-btn.on { background: var(--fill); color: var(--ink); }
.cmp-go { font-size: 14px; color: #555; }
.cmp-go b { color: var(--ink); }

/* 비교함 */
.cmp-intro { padding: 22px var(--pad) 6px; }
.cmp-intro h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.03em; }
.cmp-intro p { margin-top: 6px; color: var(--sub); font-size: 14.5px; line-height: 1.5; }
.cmp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 8px; padding: 16px 12px 4px; }
.cmp-grid.two .ph { aspect-ratio: 3 / 4; }
.cmp-cell { margin: 0; }
.cmp-cell .ph { position: relative; aspect-ratio: 1 / 1; border-radius: 12px; overflow: hidden; background: var(--fill); }
.cmp-cell .ph img { width: 100%; height: 100%; object-fit: cover; }
.cmp-cell .slotno { position: absolute; left: 8px; top: 8px; width: 24px; height: 24px; border-radius: 50%; background: #fff; color: #000;
  display: grid; place-items: center; font-size: 13px; font-weight: 800; }
.cmp-cell .nav { position: absolute; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,.92); font-size: 22px; line-height: 1; display: grid; place-items: center; padding-bottom: 3px; }
.cmp-cell .prev { left: 6px; }
.cmp-cell .next { right: 6px; }
.cmp-cell figcaption { padding: 8px 2px 0; }
.cmp-cell .t1 { font-size: 12.5px; color: var(--sub); font-weight: 600; line-height: 1.35; }
.cmp-cell .t2 { font-size: 16.5px; font-weight: 800; letter-spacing: -0.02em; margin-top: 1px; }
.cmp-cell .t3 { font-size: 12.5px; color: #666; margin-top: 2px; }
.cmp-note { padding-top: 10px; font-size: 13px; }
.slots { list-style: none; padding: 18px var(--pad) 6px; }
.slot { display: grid; grid-template-columns: 26px 56px 1fr auto; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.slot .no { width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 800; }
.slot.empty .no { background: var(--fill); color: #999; }
.slot .sl-ph { width: 56px; height: 56px; border-radius: 10px; overflow: hidden; background: var(--fill); }
.slot .sl-ph img { width: 100%; height: 100%; object-fit: cover; }
.slot .sl-t { display: flex; flex-direction: column; min-width: 0; }
.slot .sl-t span { font-size: 12.5px; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot .sl-t b { font-size: 16px; font-weight: 750; }
.slot .sl-act { display: flex; gap: 6px; }
.slot .sl-act button { font-size: 13px; color: #555; padding: 6px 8px; border-radius: 8px; background: var(--fill); }
.slot.empty .add { grid-column: 2 / -1; height: 48px; border-radius: 12px; border: 1.5px dashed #cfcfcf; font-size: 15px; font-weight: 650; text-align: left; padding: 0 16px; }
.slot .add em { font-style: normal; font-weight: 500; color: var(--sub); font-size: 13px; margin-left: 4px; }
.picker { grid-column: 1 / -1; background: #fafafa; border-radius: 14px; padding: 12px 12px 8px; }
.pk-h { font-size: 12.5px; font-weight: 700; color: var(--sub); margin: 6px 2px 8px; }
.pk-row { gap: 6px; padding-bottom: 4px; }
.pk-wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.picker .chip { background: #fff; border: 1px solid var(--line); height: 34px; font-size: 14px; }
.picker .chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.picker .chip[disabled] { opacity: .35; }
.pk-close { margin-top: 10px; width: 100%; height: 40px; font-size: 14px; color: #555; }
.cmp-tools { display: flex; gap: 8px; padding: 14px var(--pad) 26px; }
.cmp-tools button { flex: 1; height: 44px; border-radius: 12px; background: var(--fill); font-size: 14.5px; font-weight: 650; }

/* 안내 메시지 · 링크 상자 */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 50;
  max-width: min(440px, calc(100% - 32px)); padding: 12px 18px; border-radius: 14px; background: #111; color: #fff; font-size: 14.5px; line-height: 1.45; text-align: center; }
.toast[hidden] { display: none; }
.share-box { padding: 0 var(--pad) 24px; }
.share-box label { display: block; font-size: 13px; color: var(--sub); margin-bottom: 6px; }
.share-box input { width: 100%; height: 42px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; font: inherit; font-size: 13px; }
.share-box[hidden] { display: none; }

/* ── 사진 크게 보기 (Embla) */
html.lb-open, html.lb-open body { overflow: hidden; }
.gallery img, .cmp-cell .ph img { cursor: zoom-in; }
.lb { position: fixed; inset: 0; z-index: 100; background: #000; color: #fff; display: flex; flex-direction: column; }
.lb-top { display: flex; justify-content: space-between; align-items: center;
  padding: calc(10px + env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) 10px max(18px, env(safe-area-inset-left, 0px)); }
.lb-count { font-size: 15px; font-weight: 600; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
.lb-close { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; }
.lb-close svg { width: 24px; height: 24px; }
.lb-viewport { flex: 1; overflow: hidden; min-height: 0; touch-action: pan-y pinch-zoom; }
.lb-viewport.native { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.lb-viewport.native::-webkit-scrollbar { display: none; }
.lb-track { display: flex; height: 100%; }
.lb-slide { flex: 0 0 100%; min-width: 0; height: 100%; display: grid; place-items: center; scroll-snap-align: center; }
.lb-slide img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.lb-cap { padding: 12px max(18px, env(safe-area-inset-left, 0px)) calc(18px + env(safe-area-inset-bottom, 0px)); font-size: 14.5px; color: #cfcfcf; min-height: 48px; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,.14); color: #fff; font-size: 30px; line-height: 1; display: none; place-items: center; padding-bottom: 4px; }
.lb-nav.prev { left: 16px; } .lb-nav.next { right: 16px; }
.lb button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .lb-nav { display: grid; } }

/* 화면에는 안 보이고 화면 읽기 프로그램만 읽는 글 */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.gallery:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
