/* ==========================================================================
   형태와집 (hyeongtae-house) — DREXLY 템플릿
   원자료: 템플릿/50 · 00-디자인보드(색·활자 정본) · 01-home · 02-페이지시안 · 06-mobile
   축: 「내 집에 들어가는가」 — 상품 카드 나열이 아니라 치수와 공간이 중심이다.
   ========================================================================== */

:root {
  /* 색 — 00-디자인보드.png 의 다섯 칩 그대로 */
  --warm-white: #f7f6f3;
  --linen: #e7e3db;
  --walnut: #6b4a3a;
  --ultramarine: #11266b;
  --brass: #b89758;

  --paper: #fcfbf9;
  --ink: #1d1a17;
  --ink2: #574f47;
  --muted: #8a8178;
  --line: rgba(29, 26, 23, 0.15);
  --line-soft: rgba(29, 26, 23, 0.08);
  --ultra-press: #0b1a4d;
  --ultra-wash: rgba(17, 38, 107, 0.07);

  /* 의미색 — 프롬프트가 색을 지정하지 않아 디자인보드에서 파생해 직접 정의한다.
     상태는 색만으로 전달하지 않는다. 항상 아이콘+글자를 함께 쓴다. */
  --ok: #2c6249;
  --ok-bg: rgba(44, 98, 73, 0.09);
  --warn: #8a5a16;
  --warn-bg: rgba(184, 151, 88, 0.16);
  --bad: #98291f;
  --bad-bg: rgba(152, 41, 31, 0.09);

  --sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    system-ui, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  --serif: "Nanum Myeongjo", "Noto Serif KR", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --wrap: 1180px;
  --narrow: 820px;
  --gutter: 32px;
  --sec: 96px;
  --ease: cubic-bezier(0.22, 0.7, 0.28, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
  margin: 0;
  background: var(--warm-white);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.78;
  letter-spacing: -0.004em;
  /* 한국어는 어절 단위로 끊는다 — 「2층」·「좌면고」가 갈라지지 않게 */
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; line-height: 1.35; letter-spacing: -0.02em; }
p { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }

:focus-visible { outline: 2px solid var(--ultramarine); outline-offset: 3px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; }
.ico-xs { width: 14px; height: 14px; stroke-width: 1.6; }
.ico-sm { width: 16px; height: 16px; stroke-width: 1.45; }
.ico-lg { width: 30px; height: 30px; stroke-width: 1; }

.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; }

.skip { position: absolute; left: -9999px; top: 0; z-index: 300; background: var(--ultramarine); color: #fff; padding: 12px 20px; font-size: 14px; }
.skip:focus { left: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-narrow { max-width: var(--narrow); }

/* 숫자는 도면처럼 — 치수가 이 템플릿의 주인공이다 */
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: 0.01em; font-weight: 500; }
.u { font-family: var(--mono); font-size: 0.82em; color: var(--muted); margin-left: 2px; font-weight: 400; }

.eyebrow { display: flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--walnut); margin-bottom: 18px; }
.eyebrow .rule { width: 34px; height: 1px; background: var(--brass); flex: none; }

/* ------------------------------------------------------------------ 버튼 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border: 1px solid transparent; border-radius: 1px;
  font-size: 15px; font-weight: 600; letter-spacing: -0.01em; cursor: pointer;
  transition: background 0.16s var(--ease), color 0.16s var(--ease), border-color 0.16s var(--ease);
}
.btn-solid { background: var(--ultramarine); color: #fff; }
.btn-solid:hover { background: var(--ultra-press); }
.btn-line { border-color: var(--line); color: var(--ink); background: var(--paper); }
.btn-line:hover { border-color: var(--ultramarine); color: var(--ultramarine); }
.btn[aria-disabled="true"] { opacity: 0.6; pointer-events: none; }

.txtlink { display: inline-flex; align-items: center; gap: 6px; color: var(--ultramarine); font-weight: 600; font-size: 15px; border-bottom: 1px solid var(--ultramarine); padding-bottom: 2px; }
.txtlink:hover { color: var(--ultra-press); }

/* ------------------------------------------------------------------ 헤더 */
.site-header { position: sticky; top: 0; z-index: 90; background: var(--warm-white); border-bottom: 1px solid var(--line-soft); }
.hd-top-in { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 68px; gap: 16px; }
.hd-note { font-size: 12.5px; color: var(--muted); letter-spacing: -0.01em; }
.brand { justify-self: center; text-align: center; display: block; }
.brand-kr { display: block; font-family: var(--serif); font-size: 22px; letter-spacing: 0.42em; text-indent: 0.42em; color: var(--ink); }
.brand-en { display: block; font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.24em; color: var(--muted); margin-top: 2px; }
.hd-util { justify-self: end; display: flex; align-items: center; gap: 4px; }
.util { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; font-size: 13px; color: var(--ink2); cursor: pointer; border-radius: 1px; }
.util:hover { color: var(--ultramarine); }
.util em { font-family: var(--mono); font-style: normal; font-size: 12px; color: var(--ultramarine); }

.hd-main { border-top: 1px solid var(--line-soft); background: var(--paper); }
.hd-main-in { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 50px; }
.navlinks { display: flex; gap: 32px; }
.navlinks a { position: relative; font-size: 14.5px; color: var(--ink2); padding: 12px 0; }
.navlinks a:hover { color: var(--ink); }
.navlinks a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.navlinks a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 1px; background: var(--walnut); }
.hd-cta { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ultramarine); font-weight: 600; }
.hd-cta:hover { color: var(--ultra-press); }

.menu-btn { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; cursor: pointer; margin-left: -10px; }

/* ------------------------------------------------------------------ 서랍 */
.scrim { position: fixed; inset: 0; background: rgba(29, 26, 23, 0.42); opacity: 0; visibility: hidden; transition: opacity 0.24s var(--ease), visibility 0.24s; z-index: 110; }
.scrim.open { opacity: 1; visibility: visible; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(88vw, 340px); z-index: 120;
  background: var(--warm-white); border-left: 1px solid var(--line);
  transform: translateX(100%); transition: transform 0.28s var(--ease);
  padding: 18px 22px 32px; overflow-y: auto;
}
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.drawer-close { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; margin-right: -10px; }
.drawer-nav { display: flex; flex-direction: column; border-top: 1px solid var(--line-soft); }
.drawer-nav a { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 8px 2px; border-bottom: 1px solid var(--line-soft); font-family: var(--serif); font-size: 18px; }
.drawer-nav a[aria-current="page"] { color: var(--ultramarine); }
.drawer-util { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0; }
.drawer-util button { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line-soft); font-size: 13px; color: var(--ink2); cursor: pointer; }
.drawer-contact { display: grid; gap: 8px; }
.drawer-contact .btn { justify-content: flex-start; }

/* ------------------------------------------------------------------ 섹션 */
.sec { padding: var(--sec) 0; }
.sec.alt { background: var(--linen); }
.sec-head { max-width: 640px; margin-bottom: 44px; }
.sec-head h2 { font-family: var(--serif); font-size: clamp(26px, 3vw, 34px); }
.sec-head p { margin-top: 14px; color: var(--ink2); font-size: 15.5px; }

.lead { color: var(--ink2); font-size: 17px; line-height: 1.85; }
.hint { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; font-size: 13.5px; color: var(--muted); }
.hint .ico { margin-top: 4px; color: var(--brass); }

/* 등장 효과 — 스크롤 위치를 직접 재서 켠다(빠른 스크롤에서 놓치지 않게) */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
html:not(.js) .reveal { opacity: 1; transform: none; }

/* ------------------------------------------------------------------ 홈: 히어로 */
.hero { padding: 72px 0 0; }
.hero-in { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero h1 { font-family: var(--serif); font-size: clamp(30px, 4.4vw, 50px); line-height: 1.32; }
.hero .lead { margin-top: 22px; max-width: 30em; }
.hero .lead b { font-weight: 700; color: var(--ink); box-shadow: inset 0 -0.42em 0 rgba(184, 151, 88, 0.28); }
.hero-act { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.hero-facts { display: grid; gap: 9px; margin-top: 32px; padding-top: 26px; border-top: 1px solid var(--line-soft); }
.hero-facts li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink2); }
.hero-facts .ico { color: var(--walnut); }
.hero-fig { margin: 0; }
.hero-fig img { width: 100%; height: auto; }
.hero-fig figcaption { margin-top: 12px; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.02em; color: var(--muted); }

/* 홈: 방 파노라마 + 치수선(시그니처 연출) */
.band { margin-top: 64px; }
.band-img { width: 100%; height: auto; }
.band-under { padding-top: 26px; padding-bottom: 8px; }
.band-h { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); font-weight: 400; }
.dimline { display: flex; align-items: center; gap: 0; margin: 14px 0 12px; height: 14px; }
.dimline .dl-cap { width: 1px; height: 12px; background: var(--walnut); flex: none; }
.dimline .dl-bar { display: block; flex: 1; height: 1px; background: var(--walnut); transform-origin: left center; }
@keyframes dl-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
/* 스크롤 연동은 향상층으로만 — 미지원 브라우저는 이미 그려진 상태를 본다 */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .dimline .dl-bar { animation: dl-grow linear both; animation-timeline: view(); animation-range: entry 24% cover 42%; }
  }
}
.band-note { font-size: 15px; color: var(--ink2); }
.band-note b { font-size: 19px; color: var(--ink); }
.band-why { display: block; margin-top: 6px; font-size: 13.5px; color: var(--muted); }

/* 홈: 공간 카테고리 */
.cat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); }
.cat-grid a { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 30px 10px 26px; background: var(--warm-white); height: 100%; transition: background 0.16s var(--ease); }
.cat-grid a:hover { background: var(--paper); }
.cat-ico { display: grid; place-items: center; width: 56px; height: 56px; border: 1px solid var(--line-soft); border-radius: 50%; color: var(--walnut); }
.cat-grid b { font-size: 15px; font-weight: 600; }
.cat-grid i { font-style: normal; font-size: 11.5px; color: var(--muted); }

/* 홈: 컬렉션 */
.coll-in { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }
.coll-fig { margin: 0; }
.coll-fig img { width: 100%; height: auto; }
.coll-copy h2 { font-family: var(--serif); font-size: clamp(24px, 2.8vw, 32px); }
.coll-copy p { margin-top: 16px; color: var(--ink2); font-size: 15.5px; }
.dimlist { margin-top: 24px; border-top: 1px solid var(--line-soft); }
.dimlist > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.dimlist dt { font-size: 13.5px; color: var(--muted); }
.dimlist dd { font-size: 14.5px; text-align: right; }
.coll-copy .txtlink { margin-top: 26px; }

/* 홈: 내 집에 들어가는가 */
.fit-in { display: grid; grid-template-columns: 1.35fr 0.65fr; gap: 52px; align-items: start; }
.fit-steps { display: grid; gap: 30px; }
.fit-steps li { display: grid; grid-template-columns: 54px 1fr; gap: 6px 18px; padding-bottom: 26px; border-bottom: 1px solid var(--line-soft); }
.fit-steps li:last-child { border-bottom: 0; padding-bottom: 0; }
.stepno { grid-row: span 3; font-size: 26px; color: var(--brass); line-height: 1.1; }
.fit-steps h3 { font-family: var(--serif); font-size: 20px; }
.fit-steps p { color: var(--ink2); font-size: 15px; margin-top: 6px; }
.fit-steps .hint { margin-top: 8px; }
.fit-fig { margin: 0; padding: 22px; border: 1px solid var(--line-soft); background: var(--paper); }
.fit-fig img { width: 100%; height: auto; }
.fit-fig figcaption { margin-top: 14px; font-size: 13px; color: var(--ink2); }
.fit-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 40px; }

/* 홈: 배송·설치 */
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.svc-grid li { background: var(--warm-white); border: 1px solid var(--line-soft); padding: 30px 26px; }
.svc-ico { display: grid; place-items: center; width: 52px; height: 52px; border: 1px solid var(--line-soft); color: var(--walnut); margin-bottom: 18px; }
.svc-grid h3 { font-family: var(--serif); font-size: 20px; }
.svc-grid p { margin-top: 10px; font-size: 14.5px; color: var(--ink2); }
.svc-num { margin-top: 14px !important; padding-top: 12px; border-top: 1px solid var(--line-soft); font-size: 13px !important; color: var(--ink) !important; }

/* ------------------------------------------------------------------ 아코디언 */
.accordion { border-top: 1px solid var(--line); }
.acc-item { border-bottom: 1px solid var(--line-soft); }
.acc-h { margin: 0; font-size: inherit; font-weight: inherit; }
.acc-trigger { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 18px; min-height: 62px; padding: 14px 2px; text-align: left; cursor: pointer; font-family: var(--serif); font-size: 18px; color: var(--ink); }
.acc-trigger:hover { color: var(--ultramarine); }
.acc-chev { color: var(--muted); transition: transform 0.24s var(--ease); }
.acc-item.open .acc-chev { transform: rotate(180deg); }
.acc-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.26s var(--ease); }
.acc-item.open .acc-panel { grid-template-rows: 1fr; }
.acc-in { overflow: hidden; }
.acc-in > * { margin-top: 0; }
.acc-in > * + * { margin-top: 12px; }
.acc-panel p, .acc-panel li { font-size: 15px; color: var(--ink2); }
.acc-item.open .acc-in { padding-bottom: 22px; }
html:not(.js) .acc-panel { grid-template-rows: 1fr; }
html:not(.js) .acc-in { padding-bottom: 22px; }

.tick { display: grid; gap: 7px; }
.tick li { position: relative; padding-left: 18px; }
.tick li::before { content: ""; position: absolute; left: 0; top: 12px; width: 7px; height: 1px; background: var(--brass); }
.tick-bad li::before { background: var(--bad); }

/* ------------------------------------------------------------------ 상품 상세 */
.crumb { display: flex; align-items: center; gap: 6px; max-width: var(--wrap); margin: 0 auto; padding: 18px var(--gutter) 0; font-size: 12.5px; color: var(--muted); }
.crumb a:hover { color: var(--ultramarine); }
.crumb .ico { color: var(--line); }

.pdp { padding: 34px 0 var(--sec); }
.pdp-in { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.gal-main { margin: 0; background: var(--linen); display: grid; place-items: center; padding: 26px; min-height: 380px; }
.gal-main img { width: auto; max-height: 480px; height: auto; }
.gal-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 8px; }
.gal-t { display: block; height: 84px; overflow: hidden; background: var(--linen); border: 1px solid transparent; cursor: pointer; padding: 0; }
.gal-t img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; user-select: none; }
.gal-t.is-on { border-color: var(--walnut); }

.buy-tag { display: inline-block; font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--walnut); border: 1px solid var(--brass); padding: 3px 9px; }
.buy h1 { font-family: var(--serif); font-size: clamp(28px, 3.6vw, 40px); margin-top: 16px; }
.buy-price { margin-top: 10px; display: flex; align-items: baseline; gap: 8px; }
.buy-price b { font-size: 28px; }
.buy-price .vat { font-size: 12.5px; color: var(--muted); margin-left: 4px; }
.buy-rate { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 13.5px; color: var(--ink2); }
.stars { color: var(--brass); letter-spacing: 0.12em; }
.rate-n { color: var(--muted); font-size: 12.5px; }

.opt { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line-soft); }
.opt-h { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
/* input 은 label 밖에 두지 않으면 클릭이 이중 토글돼 상쇄된다 — sr-only 로 숨기고 for 로만 잇는다 */
.swatches input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.swatches label { display: inline-flex; align-items: center; gap: 9px; min-height: 46px; padding: 0 14px; border: 1px solid var(--line); font-size: 14px; cursor: pointer; }
.swatches label:hover { border-color: var(--walnut); }
.swatches input:checked + label { border-color: var(--ultramarine); background: var(--ultra-wash); }
.swatches input:focus-visible + label { outline: 2px solid var(--ultramarine); outline-offset: 2px; }
.swatches .sw { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line); }
.sw-1 { background: #6b4a3a; }
.sw-2 { background: #3d281f; }
.sw-3 { background: #c8a97e; }
.swatches i { font-style: normal; font-size: 11.5px; color: var(--muted); }

.qty-row { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 22px; }
.qty-row .opt-h { margin: 0; }
.qty { display: inline-flex; border: 1px solid var(--line); }
.qty-b { width: 46px; height: 46px; display: grid; place-items: center; cursor: pointer; font-size: 18px; }
.qty-b:hover { background: var(--linen); }
.qty-n { width: 54px; height: 46px; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); text-align: center; font-family: var(--mono); font-size: 15px; background: transparent; color: var(--ink); }
.qty-sum { margin-left: auto; font-size: 14px; color: var(--ink2); }
.qty-sum b { font-size: 17px; color: var(--ink); }

.buy-act { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.buy-facts { display: grid; gap: 10px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line-soft); }
.buy-facts li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink2); }
.buy-facts .ico { margin-top: 4px; color: var(--walnut); }

/* 표 — 넘치는 표는 상자 안에서만 구른다.
   position:relative 가 없으면 320·390px 에서 문서 전체가 가로로 밀린다. */
.tablewrap { position: relative; overflow-x: auto; border: 1px solid var(--line-soft); background: var(--paper); }
.dtable, .ctable { width: 100%; border-collapse: collapse; min-width: 660px; }
.dtable th, .dtable td, .ctable th, .ctable td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line-soft); font-size: 14.5px; vertical-align: middle; }
.dtable thead th, .ctable thead th { background: var(--linen); font-size: 12.5px; letter-spacing: 0.04em; color: var(--ink2); font-weight: 600; }
.dtable tbody th, .ctable tbody th { font-weight: 500; color: var(--ink2); width: 26%; }
.dtable .tnote { color: var(--muted); font-size: 13px; }
.tfoot { display: flex; gap: 9px; align-items: flex-start; margin-top: 16px; font-size: 13.5px; color: var(--muted); }
.tfoot .ico { margin-top: 4px; color: var(--brass); flex: none; }
.tfoot a { color: var(--ultramarine); border-bottom: 1px solid var(--ultramarine); }

.ctable thead th { text-align: center; vertical-align: bottom; padding-top: 20px; }
.ctable thead th:first-child { text-align: left; }
.ctable tbody td { text-align: center; }
.ch-fig { display: block; height: 108px; margin-bottom: 10px; background: var(--warm-white); }
.ch-fig img { width: 100%; height: 100%; object-fit: contain; }
.ch-name { display: block; font-family: var(--serif); font-size: 17px; color: var(--ink); letter-spacing: -0.01em; }
.ch-price { display: block; font-size: 13px; color: var(--ink2); margin-top: 2px; }

.pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; font-size: 12.5px; border: 1px solid; border-radius: 1px; white-space: nowrap; }
.pill-ok { color: var(--ok); border-color: var(--ok); background: var(--ok-bg); }
.pill-warn { color: var(--warn); border-color: var(--warn); background: var(--warn-bg); }
.pill-bad { color: var(--bad); border-color: var(--bad); background: var(--bad-bg); }

/* 라인업 표에서 앵커로 찾아온 줄을 잠깐 표시 */
.dtable tbody tr:target th { box-shadow: inset 3px 0 0 var(--brass); }

/* ------------------------------------------------------------------ 계산기(공용) */
.calc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; align-items: start; }
.calc-fields { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); min-width: 0; }
.fld { display: grid; gap: 7px; min-width: 0; }
.fld label { font-size: 13.5px; color: var(--ink2); }
.inwrap { display: flex; align-items: center; gap: 8px; min-width: 0; }
.inwrap input, .inwrap select { flex: 1; min-width: 0; height: 48px; padding: 0 14px; border: 1px solid var(--line); background: var(--warm-white); font-family: var(--mono); font-size: 15px; color: var(--ink); border-radius: 0; }
.inwrap select { font-family: var(--sans); font-size: 14px; }
.inwrap input:focus, .inwrap select:focus { outline: 2px solid var(--ultramarine); outline-offset: -1px; }
.inwrap .u { margin: 0; }

.calc-out { border: 1px solid var(--line); background: var(--paper); padding: 22px 24px; min-width: 0; }
.judge { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.judge b { font-weight: 700; }
.judge-ok { color: var(--ok); }
.judge-warn { color: var(--warn); }
.judge-bad { color: var(--bad); }
.judge-why { margin-top: 14px; font-size: 13.5px; color: var(--ink2); line-height: 1.8; }
.resline { display: grid; gap: 8px; margin-top: 16px; }
.resline li { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.resline span { color: var(--muted); font-size: 13px; min-width: 132px; }
.resline b { font-size: 15px; }
.tag { font-style: normal; font-size: 12px; padding: 2px 8px; border: 1px solid; margin-left: auto; }
.tag-ok { color: var(--ok); border-color: var(--ok); background: var(--ok-bg); }
.tag-warn { color: var(--warn); border-color: var(--warn); background: var(--warn-bg); }
.tag-bad { color: var(--bad); border-color: var(--bad); background: var(--bad-bg); }
.tag-plain { color: var(--muted); border-color: var(--line-soft); }
.calc-basis { margin-top: 18px; font-size: 13px; color: var(--muted); padding-top: 14px; border-top: 1px solid var(--line-soft); }

/* ------------------------------------------------------------------ 함께 쓰는 가구 */
.tog-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.tog-grid li { border: 1px solid var(--line-soft); background: var(--paper); padding: 24px; }
.tog-grid figure { margin: 0 0 18px; height: 200px; background: var(--linen); overflow: hidden; }
.tog-grid figure img { width: 100%; height: 100%; object-fit: cover; }
.tog-grid h3 { font-family: var(--serif); font-size: 21px; }
.tog-price { margin-top: 4px; font-size: 17px; }
.tog-grid p { font-size: 14.5px; color: var(--ink2); margin-top: 10px; }
.tog-dim { font-size: 12.5px !important; color: var(--muted) !important; padding-top: 12px; border-top: 1px solid var(--line-soft); }

/* ------------------------------------------------------------------ 모바일 구매 Dock */
.dock { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 95; background: var(--warm-white); border-top: 1px solid var(--line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
.dock-in { display: flex; align-items: center; gap: 8px; }
.dock-price { font-size: 15px; margin-right: auto; }
.dock-b { min-height: 48px; padding: 0 16px; font-size: 14px; }

/* ------------------------------------------------------------------ 면 머리 */
.pagehead { padding: 56px 0 0; }
.pagehead h1 { font-family: var(--serif); font-size: clamp(30px, 4vw, 44px); }
.pagehead .lead { margin-top: 18px; max-width: 44em; }
.pagehead .lead b { font-weight: 700; color: var(--ink); }
.pagehead-act { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

/* ------------------------------------------------------------------ 공간 플래너 */
.steps-nav { display: flex; gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); margin-bottom: 36px; }
.step-tab { flex: 1; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 58px; padding: 8px 12px; background: var(--warm-white); font-size: 14.5px; color: var(--muted); cursor: pointer; }
.step-tab .num { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line); font-size: 12px; }
.step-tab.is-on { color: var(--ink); font-weight: 600; background: var(--paper); }
.step-tab.is-on .num { background: var(--ultramarine); border-color: var(--ultramarine); color: #fff; }

.plan-in { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 48px; align-items: start; }
.plan-panels { min-width: 0; }
.plan-fig { margin: 0; border: 1px solid var(--line-soft); background: var(--paper); padding: 18px; }
.plan-fig img { width: 100%; height: auto; }
.plan-fig figcaption { margin-top: 14px; font-size: 12.5px; color: var(--muted); }
.step-panel { display: none; }
.step-panel.is-on { display: block; }
html:not(.js) .step-panel { display: block; margin-bottom: 40px; }
html:not(.js) .steps-nav { display: none; }
.step-panel h2 { font-family: var(--serif); font-size: 24px; margin-bottom: 12px; }
.step-panel > p { color: var(--ink2); font-size: 15px; }
.step-panel .calc-fields { margin-top: 22px; }
.step-move { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

.pick { display: grid; gap: 10px; margin-top: 22px; }
.pick li { position: relative; }
.pick input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.pick label { display: grid; gap: 3px; padding: 14px 16px 14px 46px; border: 1px solid var(--line); background: var(--warm-white); cursor: pointer; min-height: 56px; }
.pick label::before { content: ""; position: absolute; left: 16px; top: 18px; width: 18px; height: 18px; border: 1px solid var(--line); background: var(--warm-white); }
.pick input:checked + label { border-color: var(--ultramarine); background: var(--ultra-wash); }
.pick input:checked + label::before { background: var(--ultramarine); border-color: var(--ultramarine); box-shadow: inset 0 0 0 3px var(--warm-white), inset 0 0 0 9px var(--ultramarine); }
.pick input:focus-visible + label { outline: 2px solid var(--ultramarine); outline-offset: 2px; }
.pick label b { font-size: 15px; font-weight: 600; }
.pick label i { font-style: normal; font-size: 12.5px; color: var(--muted); font-family: var(--mono); }

.carry-in { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 32px; align-items: start; }
.carry-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.carry-fields .fld:first-child { grid-column: 1 / -1; }
.carry-notes { margin-top: 40px; padding: 26px 28px; border: 1px solid var(--line); background: var(--warm-white); }
.cn-h { font-family: var(--serif); font-size: 19px; margin-bottom: 12px; }
.carry-notes li { font-size: 14.5px; color: var(--ink2); }

/* ------------------------------------------------------------------ 이야기 */
.story-head { display: grid; grid-template-columns: 1fr 0.8fr; gap: 48px; align-items: center; }
.story-fig { margin: 0; }
.story-fig img { width: 100%; height: auto; }
.pr-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.pr-grid figure { margin: 0 0 20px; height: 220px; overflow: hidden; background: var(--linen); }
.pr-grid figure img { width: 100%; height: 100%; object-fit: cover; }
.pr-grid h3 { font-family: var(--serif); font-size: 21px; }
.pr-grid p { margin-top: 10px; font-size: 14.5px; color: var(--ink2); }

.proc { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.proc li { background: var(--warm-white); border: 1px solid var(--line-soft); padding: 16px; }
.proc figure { margin: 0 0 14px; height: 130px; overflow: hidden; background: var(--linen); }
.proc figure img { width: 100%; height: 100%; object-fit: cover; }
.proc .stepno { font-size: 15px; }
.proc h3 { font-family: var(--serif); font-size: 17px; margin-top: 4px; }
.proc p { margin-top: 8px; font-size: 13.5px; color: var(--ink2); line-height: 1.7; }

.show-in { display: grid; grid-template-columns: 0.6fr 1.4fr; gap: 48px; align-items: center; }
.show-fig { margin: 0; }
.show-fig img { width: 100%; height: auto; }
.show-in .sec-head { margin-bottom: 20px; }
.show-in .dimlist { max-width: 520px; }
.show-in .dimlist a { color: var(--ultramarine); border-bottom: 1px solid var(--ultramarine); }

/* ------------------------------------------------------------------ 폼 */
.warnbox { display: flex; gap: 12px; align-items: flex-start; padding: 18px 20px; border: 1px solid var(--warn); background: var(--warn-bg); font-size: 14.5px; color: var(--ink); margin-bottom: 32px; }
.warnbox .ico { margin-top: 4px; color: var(--warn); flex: none; }
.inquiry-form { display: grid; gap: 18px; }
.f-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 7px; position: relative; }
.field label { font-size: 13.5px; color: var(--ink2); }
.opt-note { color: var(--muted); font-size: 12px; }
.control { width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid var(--line); background: var(--warm-white); font-family: var(--sans); font-size: 15px; color: var(--ink); border-radius: 0; }
textarea.control { min-height: 130px; resize: vertical; line-height: 1.7; }
.control:focus { outline: 2px solid var(--ultramarine); outline-offset: -1px; }
.control::placeholder { color: #b3aca4; }
.selwrap { position: relative; display: block; }
.field.invalid .control { border-color: var(--bad); background: var(--bad-bg); }
.field.invalid::after { content: "이 칸을 채워 주세요"; font-size: 12.5px; color: var(--bad); }
.counter { justify-self: end; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.agree { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; color: var(--ink2); }
.agree input { width: 20px; height: 20px; margin-top: 3px; flex: none; accent-color: var(--ultramarine); }
.f-act { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.f-note { font-size: 13px; color: var(--muted); }
.spinner { width: 14px; height: 14px; border: 2px solid rgba(255, 255, 255, 0.45); border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ 푸터 */
.site-footer { background: var(--paper); border-top: 1px solid var(--line-soft); padding: 68px 0 40px; margin-top: 0; }
.ft-top { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 40px; padding-bottom: 40px; border-bottom: 1px solid var(--line-soft); }
.ft-brand .brand-kr { font-size: 19px; margin-bottom: 16px; }
.ft-line { font-size: 14px; color: var(--ink2); margin-bottom: 16px; }
.ft-meta { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink2); margin-top: 5px; }
.ft-meta .ico { color: var(--walnut); flex: none; }
.ft-meta a { display: flex; align-items: center; gap: 8px; }
.ft-meta a:hover { color: var(--ultramarine); }
.ft-nav h2 { font-size: 13px; font-weight: 600; letter-spacing: 0.04em; margin-bottom: 14px; }
.ft-nav a { display: block; font-size: 13.5px; color: var(--ink2); padding: 5px 0; }
.ft-nav a:hover { color: var(--ultramarine); }
.ft-legal { padding-top: 26px; font-size: 12.5px; color: var(--muted); }
.ft-legal p + p { margin-top: 10px; }
.ft-links { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.ft-links a { display: inline-flex; align-items: center; gap: 6px; }
.ft-links a:hover { color: var(--ultramarine); }
.ft-copy { color: #a49b91; }

.to-top { position: fixed; right: 24px; bottom: 24px; z-index: 92; width: 48px; height: 48px; display: grid; place-items: center; background: var(--warm-white); border: 1px solid var(--line); color: var(--ink2); cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s; }
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { border-color: var(--ultramarine); color: var(--ultramarine); }

/* 토스트 — 폭 전체 제출 버튼을 덮어 클릭을 삼키지 않도록 포인터를 통과시킨다 */
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 200; transform: translate(-50%, 10px); display: flex; align-items: center; gap: 10px; max-width: min(92vw, 520px); padding: 13px 20px; background: var(--ink); color: var(--warm-white); font-size: 14px; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0.22s; }
.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.toast .ico { color: var(--brass); }

/* ------------------------------------------------------------------ 반응형 1024 */
@media (max-width: 1024px) {
  :root { --sec: 76px; --gutter: 26px; }
  .hero-in, .coll-in, .fit-in, .plan-in, .carry-in, .story-head, .show-in, .calc { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .hero { padding-top: 48px; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .svc-grid { grid-template-columns: 1fr; }
  .proc { grid-template-columns: repeat(2, 1fr); }
  .pr-grid { grid-template-columns: 1fr; gap: 26px; }
  .pr-grid figure { height: 200px; }
  .pdp-in { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .plan-fig { order: 2; }
  .navlinks { gap: 22px; }
  .hd-note { display: none; }
}

/* ------------------------------------------------------------------ 반응형 900 — 모바일 구성 재편 */
@media (max-width: 900px) {
  .menu-btn { display: inline-flex; }
  .hd-main { display: none; }
  .hd-top-in { grid-template-columns: auto 1fr auto; min-height: 60px; }
  .hd-note { display: none; }
  .brand { justify-self: center; }
  .brand-kr { font-size: 19px; letter-spacing: 0.3em; text-indent: 0.3em; }
  .util-my, .util .ico + span { display: none; }
  .util { min-height: 44px; min-width: 44px; justify-content: center; padding: 0 8px; }
  .util-bag span { display: none; }
  .util-bag .ico { width: 20px; height: 20px; }
  .btn, button { min-height: 46px; }
  .toast { bottom: 92px; }

  /* 모바일은 축소판이 아니라 1과업 1화면 — 상품 면은 하단 Dock 으로 구매를 고정한다 */
  .dock { display: block; }
  .buy-act { display: none; }
  .pdp { padding-bottom: 40px; }
  body:has(.dock) .site-footer { padding-bottom: 100px; }

  .tog-grid { grid-template-columns: 1fr; }
  .f-grid { grid-template-columns: minmax(0, 1fr); }
  .carry-fields { grid-template-columns: minmax(0, 1fr); }
  .ft-top { grid-template-columns: 1fr 1fr; gap: 30px; }
  .ft-brand { grid-column: 1 / -1; }
  .steps-nav { flex-direction: column; }
  .step-tab { justify-content: flex-start; }
  .fit-steps li { grid-template-columns: 40px 1fr; }
  .stepno { font-size: 20px; }
  .gal-main { min-height: 260px; padding: 16px; }
  .gal-main img { max-height: 320px; }
  .qty-sum { margin-left: 0; width: 100%; }
}

/* ------------------------------------------------------------------ 반응형 560 */
@media (max-width: 560px) {
  :root { --sec: 60px; --gutter: 20px; }
  body { font-size: 15.5px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .proc { grid-template-columns: 1fr; }
  .proc figure { height: 160px; }
  .hero-act .btn, .fit-cta .btn, .pagehead-act .btn, .step-move .btn { width: 100%; }
  .swatches label { width: 100%; }
  .dock-price { width: 100%; margin-bottom: 6px; }
  .dock-in { flex-wrap: wrap; }
  .dock-b { flex: 1; }
  .ft-top { grid-template-columns: 1fr; }
  .resline span { min-width: 100%; }
  .tag { margin-left: 0; }
  .to-top { right: 14px; bottom: 14px; }
  .sec-head h2 { font-size: 24px; }
}

/* ------------------------------------------------------------------ 모션 끔
   스크롤로만 나타나게 짜 놓고 대체를 빠뜨리면 그 구획이 영영 안 보인다.
   진행 애니메이션을 없애고 최종 상태를 즉시 보여 준다. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .dimline .dl-bar { animation: none !important; transform: none !important; }
}

@media print {
  .site-header, .drawer, .scrim, .to-top, .toast, .dock, .steps-nav { display: none !important; }
  .step-panel { display: block !important; }
}
