:root {
  --ink: #1e1d1a;
  --muted: #77726a;
  --paper: #f3f0e9;
  --paper-2: #faf8f3;
  --line: #d9d5cc;
  --accent: #d7c7a8;
  --white: #fff;
  --display: "DM Sans", "Noto Sans KR", sans-serif;
  --body: "Noto Sans KR", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper-2); font-family: var(--body); font-weight: 400; }
button, input { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.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-link { position: fixed; z-index: 1000; top: 10px; left: 10px; padding: 10px 14px; background: #fff; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.notice { height: 34px; display: grid; place-items: center; background: #1d1d1b; color: #f7f6f2; font-size: 12px; letter-spacing: .06em; }

.site-header { height: 72px; padding: 0 clamp(22px, 5vw, 76px); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border-bottom: 1px solid var(--line); background: rgba(250,248,243,.92); backdrop-filter: blur(14px); position: sticky; top: 0; z-index: 50; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 600 20px/1 var(--display); letter-spacing: -.04em; width: fit-content; }
.brand-mark { width: 22px; height: 22px; display: grid; gap: 3px; }
.brand-mark i { display: block; border: 1.5px solid currentColor; border-radius: 1px; }
.site-header nav { display: flex; gap: 42px; font-size: 13px; }
.site-header nav a { padding: 9px 0; position: relative; }
.site-header nav a::after { content:""; position: absolute; left: 0; right: 100%; bottom: 2px; height: 1px; background: currentColor; transition: right .25s; }
.site-header nav a:hover::after { right: 0; }
.icon-button { justify-self: end; width: 38px; height: 38px; display: grid; place-items: center; background: transparent; border: 0; }
.icon-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }

.hero { min-height: 580px; padding: 92px 24px 56px; text-align: center; display: flex; flex-direction: column; align-items: center; background: radial-gradient(circle at 50% 30%, #fffdf8 0, #f7f4ed 46%, #efebe3 100%); }
.eyebrow { margin: 0 0 18px; font: 500 11px/1 var(--display); letter-spacing: .25em; }
.hero h1 { margin: 0; font-size: clamp(38px, 5vw, 70px); font-weight: 300; letter-spacing: -.055em; }
.hero-copy { margin: 24px 0 20px; color: #5f5b54; font-size: 15px; line-height: 1.85; font-weight: 300; }
.text-link { padding: 8px 3px; border-bottom: 1px solid var(--ink); font-size: 13px; }
.progress { margin-top: auto; width: min(720px, 88vw); }
.progress-line { height: 1px; background: #d4d0c7; position: relative; }
.progress-line span { display: block; width: 16%; height: 1px; background: var(--ink); }
.progress ol { margin: -5px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); }
.progress li { display: flex; flex-direction: column; gap: 10px; align-items: center; color: #aaa59c; font-size: 11px; }
.progress li::before { content:""; width: 9px; height: 9px; background: var(--paper); border: 1px solid #c9c5bd; border-radius: 50%; }
.progress li.active { color: var(--ink); }
.progress li.active::before { background: var(--ink); border-color: var(--ink); box-shadow: 0 0 0 5px rgba(30,29,26,.08); }
.progress b { font: 500 10px/1 var(--display); }

.configurator { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(440px, .9fr); max-width: 1540px; margin: 0 auto; border-top: 1px solid var(--line); }
.preview-column { padding: clamp(28px, 4vw, 64px); background: #eeebe4; }
.preview-card { position: sticky; top: 100px; overflow: hidden; background: #f9f7f2; border: 1px solid #d5d0c7; border-radius: 3px; box-shadow: 0 24px 60px rgba(48,43,35,.08); }
.preview-toolbar { height: 58px; padding: 0 18px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #dfdbd2; }
.view-tabs { display: inline-flex; padding: 3px; border: 1px solid #d8d4cb; border-radius: 24px; }
.view-tabs button { min-width: 58px; padding: 7px 13px; border: 0; border-radius: 18px; background: transparent; font-size: 11px; }
.view-tabs button.active { background: var(--ink); color: #fff; }
.dimension-toggle { border: 0; background: transparent; color: #aaa49b; font-size: 11px; }
.dimension-toggle.active { color: var(--ink); }
.stage { position: relative; min-height: min(620px, 58vw); display: grid; place-items: center; overflow: hidden; touch-action: none; background: linear-gradient(180deg, #fbfaf6 0%, #f4f1ea 100%); }
.stage::after { content:""; position: absolute; left: 8%; right: 8%; bottom: 8%; height: 1px; background: linear-gradient(90deg, transparent, rgba(34,30,25,.16), transparent); }
.stage-note { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); z-index: 2; font-size: 10px; color: #8c867c; letter-spacing: .03em; white-space: nowrap; }
.stage-note span { width: 6px; height: 6px; display: inline-block; margin-right: 4px; background: #84a18d; border-radius: 50%; }
#drawerSvg { width: 94%; height: auto; max-height: 590px; overflow: visible; user-select: none; }
.resize-handle { cursor: ew-resize; }
.resize-handle.horizontal { cursor: ns-resize; }
.divider-hit { cursor: ns-resize; }
.resize-dot { fill: #fff; stroke: #1f1e1b; stroke-width: 2; }
.dimension-line { stroke: #7d776e; stroke-width: 1.2; stroke-dasharray: 4 4; }
.dimension-text { font: 500 15px var(--display); fill: #4d4943; letter-spacing: .02em; }
.drag-cursor { position: absolute; display: none; z-index: 4; pointer-events: none; width: 34px; height: 34px; place-items: center; background: var(--ink); color: #fff; border-radius: 50%; font-size: 13px; box-shadow: 0 6px 18px rgba(0,0,0,.2); }
.preview-footer { min-height: 78px; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #dedad1; }
.preview-footer div { display: flex; flex-direction: column; gap: 5px; }
.preview-footer span { color: #8a857d; font-size: 10px; letter-spacing: .06em; }
.preview-footer strong { font-size: 13px; font-weight: 500; }
.reset-button { border: 0; padding: 7px 0; background: transparent; color: #706b63; font-size: 11px; border-bottom: 1px solid #aaa49a; }
.tip-card { margin-top: 16px; padding: 18px 20px; display: flex; align-items: flex-start; gap: 17px; border: 1px solid #d5d0c7; background: rgba(255,255,255,.45); }
.tip-index { padding: 3px 6px; background: var(--ink); color: #fff; font: 500 9px/1 var(--display); letter-spacing: .08em; }
.tip-card p { margin: 0; font-size: 11px; line-height: 1.7; color: #706b63; }
.tip-card strong { color: var(--ink); font-weight: 500; }

.controls-column { padding: clamp(48px, 6vw, 90px) clamp(26px, 5vw, 76px) 100px; background: #fff; border-left: 1px solid var(--line); }
.step-heading { padding-bottom: 50px; }
.step-heading > span { font: 500 10px/1 var(--display); letter-spacing: .18em; color: #837d74; }
.step-heading h2 { margin: 18px 0; font-size: clamp(31px, 3.4vw, 50px); line-height: 1.16; letter-spacing: -.05em; font-weight: 300; }
.step-heading p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.75; }
.control-section { padding: 34px 0 42px; border-top: 1px solid var(--line); }
.section-title { display: flex; gap: 14px; align-items: baseline; margin-bottom: 22px; }
.section-title span { font: 500 10px var(--display); color: #99938a; }
.section-title h3 { margin: 0; font-size: 18px; font-weight: 500; letter-spacing: -.03em; }
.preset-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-bottom: 16px; }
.preset-row button { padding: 11px 8px; border: 1px solid #dedad2; background: #fff; font-size: 11px; }
.preset-row button.active { border-color: var(--ink); background: var(--ink); color: #fff; }
.dimension-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.dimension-grid label { display: block; }
.dimension-grid label > span { display: block; margin-bottom: 7px; font-size: 10px; color: #777169; }
.dimension-grid label div { position: relative; }
.dimension-grid input { width: 100%; height: 48px; padding: 0 32px 0 12px; border: 1px solid #d9d5cd; border-radius: 0; background: #faf9f6; font: 500 14px var(--display); outline: none; }
.dimension-grid input:focus { border-color: var(--ink); background: #fff; }
.dimension-grid em { position: absolute; top: 16px; right: 9px; font: normal 10px var(--display); color: #8b867e; }
.count-options { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.count-options button { min-width: 0; height: 58px; border: 1px solid #dcd8d0; background: #fff; }
.count-options button.active { border-color: var(--ink); background: var(--ink); color: #fff; }
.count-options b { font: 500 17px var(--display); }
.count-options span { margin-left: 2px; font-size: 10px; }
.drawer-heights { margin-top: 17px; display: grid; gap: 7px; }
.height-row { display: grid; grid-template-columns: 44px 1fr 58px; gap: 9px; align-items: center; font-size: 10px; color: #79736a; }
.height-row input[type=range] { width: 100%; accent-color: var(--ink); }
.height-row output { text-align: right; font: 500 11px var(--display); color: var(--ink); }
.material-options { display: grid; gap: 8px; }
.material-card { position: relative; width: 100%; min-height: 74px; display: grid; grid-template-columns: 62px 1fr auto; align-items: center; gap: 13px; padding: 10px; text-align: left; border: 1px solid #ddd9d1; background: #fff; }
.material-card.active { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.material-sample { height: 52px; display: block; border: 1px solid rgba(0,0,0,.06); background-color: var(--accent); }
.material-sample.birch { background-image: repeating-linear-gradient(100deg, transparent 0 15px, rgba(113,88,53,.09) 16px, transparent 18px); }
.material-sample.oak { background: #9d7954; background-image: repeating-linear-gradient(94deg, transparent 0 9px, rgba(64,38,17,.15) 10px, transparent 13px); }
.material-sample.steel { background: #41464a; }
.material-card b, .material-card small { display: block; }
.material-card b { font-size: 12px; font-weight: 500; }
.material-card small { margin-top: 5px; color: #89837b; font-size: 10px; }
.material-card em { align-self: end; padding: 0 4px 4px 0; color: #6c675f; font: normal 10px var(--display); }
.color-fieldset { margin: 24px 0 0; padding: 0; border: 0; }
.color-fieldset legend { margin-bottom: 12px; font-size: 10px; color: #777169; }
.swatches { display: flex; gap: 11px; align-items: center; }
.swatches > button, .custom-color { width: 34px; height: 34px; padding: 0; display: grid; place-items: center; border-radius: 50%; border: 1px solid #d5d1c9; background: var(--swatch); position: relative; }
.swatches > button.active::after { content:""; position: absolute; inset: -5px; border: 1px solid var(--ink); border-radius: 50%; }
.custom-color { overflow: hidden; background: conic-gradient(#ef6b62, #e8ce5f, #76b36b, #4e99d2, #a66cca, #ef6b62); cursor: pointer; border: 0; }
.custom-color input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.custom-color span { width: 24px; height: 24px; display: grid; place-items: center; background: #fff; border-radius: 50%; font-size: 15px; }
#colorName { margin: 13px 0 0; font-size: 10px; color: #777169; }
.detail-group { display: grid; grid-template-columns: 70px 1fr; gap: 12px; align-items: center; margin-top: 11px; }
.detail-group > span { font-size: 10px; color: #777169; }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid #dad6ce; }
.segmented button { height: 42px; border: 0; border-right: 1px solid #dad6ce; background: #fff; font-size: 11px; }
.segmented button:last-child { border-right: 0; }
.segmented button.active { background: var(--ink); color: #fff; }
.summary-card { margin-top: 12px; padding: 25px; background: #eeebe4; border: 1px solid #d3cec4; }
.summary-top { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.summary-top span { font-size: 10px; color: #777169; }
.summary-top h3 { margin: 8px 0 0; font: 500 clamp(26px, 3vw, 36px)/1 var(--display); letter-spacing: -.04em; }
.summary-top .estimate-badge { padding: 6px 8px; border: 1px solid #bdb8ae; color: #49453f; }
#summaryText { margin: 22px 0; padding-top: 16px; border-top: 1px solid #d0ccc3; color: #5c5750; font-size: 11px; line-height: 1.65; }
.summary-actions { display: grid; grid-template-columns: 1fr 1.65fr; gap: 8px; }
.summary-actions button { min-height: 50px; padding: 0 14px; border: 1px solid var(--ink); font-size: 11px; }
.secondary-button { background: transparent; }
.primary-button { display: flex; justify-content: space-between; align-items: center; background: var(--ink); color: #fff; }
.summary-card > small { display: block; margin-top: 12px; color: #89837b; font-size: 9px; }

.guide { padding: clamp(70px, 10vw, 140px) clamp(28px, 8vw, 120px); display: grid; grid-template-columns: 1fr 1.35fr; gap: 10vw; background: #262522; color: #f4f1ea; }
.guide h2 { margin: 0; font-size: clamp(34px, 4.2vw, 62px); font-weight: 300; line-height: 1.25; letter-spacing: -.055em; }
.guide ol { list-style: none; margin: 0; padding: 0; }
.guide li { padding: 25px 0; display: grid; grid-template-columns: 60px 1fr; gap: 10px; border-top: 1px solid #54514b; }
.guide li > span { font: 500 10px var(--display); color: #96918a; }
.guide h3 { margin: 0 0 8px; font-size: 17px; font-weight: 400; }
.guide li p { margin: 0; color: #aaa59d; font-size: 11px; line-height: 1.7; }
footer { min-height: 170px; padding: 35px clamp(24px, 5vw, 76px); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; background: #191918; color: #f1eee8; border-top: 1px solid #3e3c38; }
footer p, footer > span { color: #86817a; font-size: 10px; }
footer > span { justify-self: end; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: 30px; transform: translate(-50%, 20px); padding: 12px 18px; background: #1f1e1b; color: #fff; font-size: 11px; opacity: 0; pointer-events: none; transition: .25s; box-shadow: 0 8px 30px rgba(0,0,0,.22); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 980px) {
  .configurator { grid-template-columns: 1fr; }
  .preview-column { padding: 28px; }
  .preview-card { position: relative; top: auto; }
  .stage { min-height: 570px; }
  .controls-column { border-left: 0; border-top: 1px solid var(--line); }
}

@media (max-width: 640px) {
  .notice { font-size: 10px; }
  .site-header { height: 62px; grid-template-columns: 1fr auto; padding: 0 18px; }
  .site-header nav { display: none; }
  .brand { font-size: 17px; }
  .hero { min-height: 510px; padding-top: 72px; }
  .hero h1 { font-size: 39px; }
  .progress { width: 95%; }
  .preview-column { padding: 12px; }
  .stage { min-height: 430px; }
  .stage-note { top: 14px; }
  .preview-footer { padding: 14px; }
  .tip-card { display: none; }
  .controls-column { padding: 48px 20px 72px; }
  .step-heading { padding-bottom: 38px; }
  .step-heading h2 { font-size: 34px; }
  .count-options { grid-template-columns: repeat(3, 1fr); }
  .material-card { grid-template-columns: 50px 1fr; }
  .material-card em { display: none; }
  .summary-actions { grid-template-columns: 1fr; }
  .guide { grid-template-columns: 1fr; gap: 48px; padding: 72px 24px; }
  footer { grid-template-columns: 1fr; gap: 18px; text-align: left; }
  footer > span { justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
