:root {
  --bg: #faf8fc;
  --bg-card: #ffffff;
  --ink: #332f44;
  --ink-soft: #7a7490;
  --line: #eae4f3;
  --accent: #6c63a6;
  --accent-ink: #ffffff;
  --badge-bg: #ede7f6;
  --shadow: 0 6px 20px rgba(51, 47, 68, 0.08);
  --shadow-lg: 0 16px 48px rgba(51, 47, 68, 0.20);
  --radius: 16px;
  --stage-glow: #efe9fa;
  --wall: #f1eef8;
  --wall-side: #e3ddf0;
  --glass: rgba(210, 226, 236, 0.55);
  --font-display: "Gowun Dodum", "Noto Sans KR", sans-serif;
  --font-body: "Noto Sans KR", "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --chart-material: #6c63a6;
  --chart-labor: #c97b4a;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #201e2a;
    --bg-card: #2a2738;
    --ink: #efeaf7;
    --ink-soft: #b0a8c4;
    --line: #3c3750;
    --accent: #b7ade0;
    --accent-ink: #241f36;
    --badge-bg: #362f4d;
    --stage-glow: #2e2a40;
    --wall: #2c2839;
    --wall-side: #221f30;
    --glass: rgba(120, 150, 170, 0.28);
    --shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.55);
    --chart-material: #8f7fe0;
    --chart-labor: #c97b4a;
  }
}
:root[data-theme="dark"] {
  --bg: #201e2a;
  --bg-card: #2a2738;
  --ink: #efeaf7;
  --ink-soft: #b0a8c4;
  --line: #3c3750;
  --accent: #b7ade0;
  --accent-ink: #241f36;
  --badge-bg: #362f4d;
  --stage-glow: #2e2a40;
  --wall: #2c2839;
  --wall-side: #221f30;
  --glass: rgba(120, 150, 170, 0.28);
  --shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.55);
  --chart-material: #8f7fe0;
  --chart-labor: #c97b4a;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
  word-break: keep-all;
}

h1, h2, h3 {
  font-family: var(--font-display);
  text-wrap: balance;
}

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  padding: 28px 0 22px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg-card), var(--bg));
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-mark { width: 58px; height: 58px; flex: none; }
.brand h1 { margin: 0; font-size: 23px; letter-spacing: -0.2px; }
.tagline { margin: 4px 0 0; color: var(--ink-soft); font-size: 14px; }

.theme-toggle {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); transform: scale(1.06); }
.theme-toggle svg { width: 19px; height: 19px; }

.muted { color: var(--ink-soft); }
.small-note { color: var(--ink-soft); font-size: 12.5px; line-height: 1.6; margin: 8px 0 0; }
.code-line { margin: 2px 0 10px; font-size: 12.5px; color: var(--ink-soft); }
.code-line code {
  background: var(--badge-bg);
  color: var(--accent);
  padding: 1px 7px;
  border-radius: 6px;
  font-weight: 700;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

/* Steps */
.step { padding: 36px 0; }
.step.hidden { display: none; }
.step-head { margin-bottom: 22px; }
.step-badge {
  display: inline-block;
  background: var(--badge-bg);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
  letter-spacing: 0.3px;
}
.step-head h2 { margin: 4px 0 6px; font-size: 22px; }

.btn-link {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 13px;
  cursor: pointer;
  padding: 0 0 10px;
  display: block;
}
.btn-link:hover { text-decoration: underline; }

/* Category grid */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.category-card {
  background: var(--tint-light);
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 22px 18px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .category-card { background: var(--tint-dark); }
}
:root[data-theme="dark"] .category-card { background: var(--tint-dark); }
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}
.category-card:hover .category-icon {
  transform: scale(1.06);
}
.category-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--bg-card);
  box-shadow: 0 3px 10px rgba(38, 42, 36, 0.10);
  margin-bottom: 14px;
  color: var(--icon-light);
  transition: transform 0.15s ease;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .category-icon { color: var(--icon-dark); }
}
:root[data-theme="dark"] .category-icon { color: var(--icon-dark); }
.category-icon svg { width: 22px; height: 22px; }
.category-card h3 { margin: 0 0 4px; font-size: 16.5px; color: var(--ink); }
.category-card p { margin: 0; font-size: 13px; color: var(--ink-soft); }

/* Film grid */
.film-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
}
.film-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  text-align: left;
}
.film-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.film-swatch { height: 110px; position: relative; overflow: hidden; }
.film-rank {
  position: absolute; top: 8px; left: 8px;
  background: rgba(43,39,36,0.62);
  color: #fff;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
}
.film-tag {
  position: absolute; bottom: 8px; left: 8px;
  background: rgba(255,255,255,0.92);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}
.film-info { padding: 12px 14px 16px; }
.film-info h3 { margin: 0 0 4px; font-size: 14.5px; font-family: var(--font-body); font-weight: 700; }
.film-info p { margin: 0; font-size: 12.5px; color: var(--ink-soft); }
.texture-badge {
  display: inline-block;
  margin-top: 8px;
  font-size: 11px;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  padding: 1px 8px;
  border-radius: 999px;
}

/* Gloss shine animation */
.shine::after {
  content: "";
  position: absolute;
  top: -50%; left: -60%;
  width: 40%; height: 200%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.55), transparent);
  transform: rotate(20deg);
  animation: shineMove 3.2s ease-in-out infinite;
}
@keyframes shineMove {
  0% { left: -60%; }
  50% { left: 120%; }
  100% { left: 120%; }
}
@media (prefers-reduced-motion: reduce) {
  .shine::after { animation: none; }
}

/* Modal */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(30, 24, 46, 0.5);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 30px 16px;
  overflow-y: auto;
  z-index: 100;
}
.modal-overlay.hidden { display: none; }
.modal {
  background: var(--bg-card);
  border-radius: 20px;
  max-width: 920px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  animation: pop 0.18s ease;
}
@keyframes pop {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.modal-close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: none;
  font-size: 26px; line-height: 1;
  cursor: pointer;
  color: var(--ink-soft);
  z-index: 2;
}
.modal-close:hover { color: var(--ink); }
.modal-body {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
}
.modal-left, .modal-right {
  padding: 28px 26px;
  min-width: 0; /* 그리드 아이템 기본 min-width:auto가 고정폭 3D 목업 때문에 모달 전체를 늘리는 것 방지 */
}
.modal-left { border-right: 1px solid var(--line); }
.modal-left h3 { margin: 8px 0 2px; font-size: 20px; }
.preview-tag {
  display: inline-block;
  background: var(--badge-bg);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}
.preview-block { margin-top: 20px; }
.preview-block-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.preview-block h4 { margin: 0 0 10px; font-size: 13.5px; color: var(--ink-soft); font-weight: 700; }

.btn-ghost {
  background: var(--badge-bg);
  color: var(--accent);
  border: none;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  white-space: nowrap;
}
.btn-ghost:hover { filter: brightness(0.96); }

.swatch-macro {
  height: 150px;
  border-radius: 12px;
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}

/* ---------- 3D mockup stage ---------- */
.mockup3d-stage {
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 900px;
  background: radial-gradient(ellipse at 50% 100%, var(--stage-glow), transparent 70%);
  border-radius: 12px;
  margin-bottom: 14px;
  max-width: 100%;
  overflow: hidden; /* 회전된 3D 면이 좁은 화면에서 스테이지 밖으로 번지는 것을 자름 */
}

.mockup3d {
  position: relative;
  transform-style: preserve-3d;
  transform: rotateX(-14deg) rotateY(-32deg);
  width: var(--w);
  height: var(--h);
}
.mockup3d .face { position: absolute; border: 1px solid rgba(0,0,0,0.15); overflow: hidden; }
.mockup3d .face.front { width: var(--w); height: var(--h); transform: translateZ(calc(var(--d) / 2)); }
.mockup3d .face.side {
  width: var(--d); height: var(--h);
  left: var(--w);
  transform: rotateY(90deg) translateZ(calc(var(--w) / 2));
  filter: brightness(0.72);
}
.mockup3d .face.top {
  width: var(--w); height: var(--d);
  top: calc(var(--d) / -2);
  transform: rotateX(90deg) translateZ(calc(var(--d) / 2));
  filter: brightness(1.3);
}
.door-line {
  position: absolute;
  top: 6%; bottom: 6%;
  width: 1px;
  background: rgba(0,0,0,0.2);
}
.door-handle {
  position: absolute;
  top: 50%;
  width: 4px; height: 22px;
  border-radius: 3px;
  background: rgba(20,16,12,0.55);
  transform: translateY(-50%);
}
.door-frame {
  position: absolute;
  inset: -8px;
  border: 8px solid var(--wall);
  border-radius: 2px;
  z-index: -1;
}

/* kitchen: upper + lower cabinet stack */
.mockup-kitchen {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}
.mockup-kitchen .mockup3d.upper { opacity: 0.94; }
.counter-line {
  width: calc(var(--kw) * 1px);
  height: 6px;
  border-radius: 3px;
  background: var(--wall-side);
}

/* glass jungmoon door */
.mockup-glass .face.front {
  background-blend-mode: normal;
}
.glass-grid {
  position: absolute;
  inset: 10px;
  background-image:
    repeating-linear-gradient(0deg, transparent 0 26px, rgba(255,255,255,0.9) 26px 30px),
    repeating-linear-gradient(90deg, transparent 0 26px, rgba(255,255,255,0.9) 26px 30px);
  mix-blend-mode: overlay;
  opacity: 0.5;
}
.glass-fill {
  position: absolute;
  inset: 10px;
  background: var(--glass);
}

/* multiple items side by side (문/중문 개수만큼 반복) */
.mockup-multi {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.mockup-multi-item { flex: none; }
.mockup-more {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border-radius: 10px;
  background: var(--badge-bg);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  align-self: center;
}

/* molding: room corner */
.mockup-corner {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  transform: scale(var(--corner-scale, 1)) rotateX(4deg);
  transform-origin: center bottom;
  transform-style: preserve-3d;
}
.corner-wall {
  width: 140px;
  height: 218px;
  position: relative;
  background: var(--wall);
  border: 1px solid rgba(0,0,0,0.08);
}
.corner-wall.left { transform: perspective(700px) rotateY(22deg); border-radius: 4px 0 0 4px; }
.corner-wall.right { transform: perspective(700px) rotateY(-22deg); background: var(--wall-side); border-radius: 0 4px 4px 0; }
.corner-strip {
  position: absolute;
  left: 0; right: 0;
  height: 10px;
}
.corner-strip.molding-top { top: 0; }
.corner-strip.baseboard-bottom { bottom: 0; height: 14px; }

/* Tips & Budget */
.block { margin-bottom: 24px; }
.block h4 { margin: 0 0 10px; font-size: 14.5px; }
.tip-list { margin: 0; padding-left: 18px; }
.tip-list li { margin-bottom: 8px; font-size: 13.5px; color: var(--ink); }

.calc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.calc-row label { font-size: 13px; color: var(--ink-soft); }
.calc-row select {
  min-width: 84px;
  padding: 7px 28px 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: var(--bg-card) url('data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 20 20%22><path fill=%22%237a7490%22 d=%22M5.5 8l4.5 4.5L14.5 8z%22/></svg>') no-repeat right 8px center / 14px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  appearance: none;
  cursor: pointer;
}
.calc-row select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.calc-hint { font-size: 12px; color: var(--ink-soft); }

.calc-fire-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 12.5px;
  color: var(--ink-soft);
  cursor: pointer;
}
.calc-fire-row input { accent-color: var(--accent); width: 15px; height: 15px; flex: none; }

.brand-guide {
  margin: 12px 0 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
}
.brand-guide summary {
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent);
  list-style: none;
}
.brand-guide summary::-webkit-details-marker { display: none; }
.brand-guide summary::before { content: "▸ "; }
.brand-guide[open] summary::before { content: "▾ "; }
.brand-guide-body { margin-top: 10px; display: grid; gap: 8px; }
.brand-guide-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
  font-size: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.brand-guide-item:last-child { border-bottom: none; padding-bottom: 0; }
.brand-guide-item .bg-name { font-weight: 700; color: var(--ink); }
.brand-guide-item .bg-price { color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.brand-guide-item .bg-note { grid-column: 1 / -1; color: var(--ink-soft); line-height: 1.5; }

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  border: none;
  border-radius: 10px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-block;
  text-decoration: none;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-sm { padding: 8px 14px; }
.btn-xs { padding: 4px 10px; font-size: 11.5px; }

/* 예상 견적 — 영수증 스타일 명세 + 강조형 합계 */
.receipt-frame { background: var(--bg); border-radius: 12px; padding: 4px 0; margin-bottom: 12px; }
.receipt-tear {
  height: 9px;
  background:
    linear-gradient(135deg, var(--bg-card) 50%, transparent 50%),
    linear-gradient(-135deg, var(--bg-card) 50%, transparent 50%);
  background-size: 14px 14px;
  background-repeat: repeat-x;
}
.receipt-tear.bottom { transform: scaleY(-1); }
.receipt-body { background: var(--bg-card); padding: 20px 20px 18px; }
.receipt-title { font-family: var(--font-display); font-size: 16px; text-align: center; letter-spacing: 0.5px; color: var(--ink); }
.receipt-sub { text-align: center; font-size: 11.5px; color: var(--ink-soft); margin-top: 3px; }
.receipt-meta {
  text-align: center; font-size: 11.5px; color: var(--ink-soft);
  margin-top: 6px; padding-bottom: 14px; border-bottom: 1px dashed var(--line);
}
.receipt-group-title {
  font-size: 11px; font-weight: 700; color: var(--accent);
  letter-spacing: 0.4px; margin: 16px 0 6px;
}
.receipt-row { display: flex; align-items: flex-end; gap: 6px; font-size: 12.5px; padding: 3px 0; color: var(--ink); }
.receipt-row .rl { flex: 1; border-bottom: 1px dotted var(--line); margin-bottom: 4px; }
.receipt-row .amt { font-variant-numeric: tabular-nums; white-space: nowrap; }
.receipt-row.subtotal { font-weight: 700; margin-top: 2px; }
.receipt-row-note {
  font-size: 10.5px; color: var(--ink-soft); line-height: 1.5;
  margin: -1px 0 2px; padding-left: 2px;
}
.receipt-total-hero {
  text-align: center;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 3px double var(--ink);
}
.receipt-total-label { display: block; font-size: 12px; color: var(--ink-soft); margin-bottom: 4px; }
.receipt-total-value {
  display: block; font-family: var(--font-display); font-size: 24px;
  color: var(--accent); font-variant-numeric: tabular-nums;
}
.receipt-ratio { margin-top: 12px; }
.receipt-ratio-bar {
  display: flex;
  gap: 2px;
  height: 14px;
  max-width: 240px;
  margin: 0 auto;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.receipt-ratio-seg { display: block; height: 100%; }
.receipt-ratio-material { background: var(--chart-material); }
.receipt-ratio-labor { background: var(--chart-labor); }
.receipt-ratio-legend {
  display: flex; justify-content: center; gap: 16px;
  margin-top: 7px; font-size: 11px; color: var(--ink-soft);
}
.receipt-ratio-item { display: inline-flex; align-items: center; gap: 5px; }
.receipt-ratio-item b { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.ratio-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; font-style: normal; }
.ratio-dot-material { background: var(--chart-material); }
.ratio-dot-labor { background: var(--chart-labor); }

/* Estimate ("견적서") button + modal */
.estimate-btn { margin-top: 14px; width: 100%; text-align: center; }

.modal-estimate {
  max-width: 900px;
  width: 100%;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}
.estimate-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}
.estimate-toolbar-title { font-weight: 700; font-size: 14px; color: var(--ink); }
.estimate-toolbar-actions { display: flex; align-items: center; gap: 6px; }
.estimate-toolbar .modal-close { position: static; }
.estimate-scroll {
  overflow-y: auto;
  padding: 22px;
  background: #d9d5e3;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .estimate-scroll { background: #14131a; }
}
:root[data-theme="dark"] .estimate-scroll { background: #14131a; }

/* estimate-doc is a simulated A4 sheet: always light/paper-toned regardless of app theme */
.estimate-doc {
  background: #ffffff;
  color: #26232e;
  width: 100%;
  max-width: 210mm;
  min-height: 297mm;
  margin: 0 auto;
  padding: 16mm 14mm;
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
  font-family: var(--font-body);
}
.estimate-doc .doc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 3px solid #6c63a6;
  padding-bottom: 14px;
  margin-bottom: 18px;
}
.estimate-doc .doc-header h2 { margin: 0 0 4px; font-size: 22px; color: #26232e; font-family: var(--font-display); }
.estimate-doc .doc-brand { font-size: 12px; color: #7a7490; }
.estimate-doc .doc-meta { font-size: 11.5px; color: #7a7490; text-align: right; line-height: 1.7; }
.estimate-doc .doc-section { margin-bottom: 20px; }
.estimate-doc .doc-section h4 {
  font-size: 12.5px;
  letter-spacing: 0.4px;
  color: #6c63a6;
  text-transform: uppercase;
  margin: 0 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #ece7f6;
}
.estimate-doc .doc-product { display: flex; gap: 16px; align-items: center; }
.estimate-doc .doc-swatch {
  width: 96px; height: 96px;
  border-radius: 10px;
  border: 1px solid #ece7f6;
  flex: none;
}
.estimate-doc .doc-product-info div { font-size: 12.5px; color: #7a7490; margin-bottom: 2px; }
.estimate-doc .doc-product-info h3 { margin: 2px 0 6px; font-size: 18px; color: #26232e; }
.estimate-doc .doc-code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; color: #6c63a6; font-weight: 700; }
.estimate-doc .doc-mockup-wrap {
  display: flex;
  justify-content: center;
  background: radial-gradient(ellipse at 50% 100%, #efe9fa, transparent 70%);
  border-radius: 12px;
  padding: 10px;
}
.estimate-doc .doc-tips { margin: 0; padding-left: 18px; font-size: 12.5px; line-height: 1.9; color: #26232e; }
.estimate-doc table { width: 100%; border-collapse: collapse; font-size: 13px; }
.estimate-doc table th, .estimate-doc table td { padding: 9px 10px; border-bottom: 1px solid #ece7f6; text-align: left; }
.estimate-doc table th { color: #7a7490; font-weight: 600; width: 34%; }
.estimate-doc table td { font-variant-numeric: tabular-nums; }
.estimate-doc .doc-total-row td { font-weight: 800; color: #6c63a6; font-size: 14.5px; }

/* 예상 견적 항목 명세 — 앱 화면의 영수증 스타일과 통일 */
.estimate-doc .doc-receipt { border: 1px solid #ece7f6; border-radius: 10px; padding: 14px 18px; }
.estimate-doc .doc-receipt-group {
  font-size: 11px; font-weight: 700; color: #6c63a6;
  letter-spacing: 0.4px; text-transform: uppercase; margin: 12px 0 6px;
}
.estimate-doc .doc-receipt-group:first-child { margin-top: 0; }
.estimate-doc .doc-receipt-row { display: flex; align-items: flex-end; gap: 6px; font-size: 12.5px; padding: 3px 0; color: #26232e; }
.estimate-doc .doc-receipt-row .rl { flex: 1; border-bottom: 1px dotted #d8d2e6; margin-bottom: 4px; }
.estimate-doc .doc-receipt-row .amt { font-variant-numeric: tabular-nums; white-space: nowrap; }
.estimate-doc .doc-receipt-row.subtotal { font-weight: 700; margin-top: 2px; }
.estimate-doc .doc-receipt-note { font-size: 10.5px; color: #9c96ac; line-height: 1.5; margin: -1px 0 4px; }
.estimate-doc .doc-receipt-total {
  text-align: center; margin-top: 14px; padding-top: 12px; border-top: 3px double #26232e;
}
.estimate-doc .doc-receipt-total-label { display: block; font-size: 12px; color: #7a7490; margin-bottom: 4px; }
.estimate-doc .doc-receipt-total-value {
  display: block; font-family: var(--font-display); font-size: 21px;
  color: #6c63a6; font-variant-numeric: tabular-nums;
}
.estimate-doc .doc-ratio { margin-top: 10px; }
.estimate-doc .doc-ratio-bar {
  display: flex; gap: 2px; height: 12px; max-width: 220px; margin: 0 auto;
  border-radius: 999px; background: #ece7f6; overflow: hidden;
}
.estimate-doc .doc-ratio-seg { display: block; height: 100%; }
.estimate-doc .doc-ratio-material { background: #6c63a6; }
.estimate-doc .doc-ratio-labor { background: #c97b4a; }
.estimate-doc .doc-ratio-legend {
  display: flex; justify-content: center; gap: 14px;
  margin-top: 6px; font-size: 10.5px; color: #7a7490;
}
.estimate-doc .doc-ratio-item { display: inline-flex; align-items: center; gap: 5px; }
.estimate-doc .doc-ratio-item b { color: #26232e; font-weight: 700; font-variant-numeric: tabular-nums; }
.estimate-doc .doc-ratio-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none; font-style: normal; }
.estimate-doc .doc-ratio-dot-material { background: #6c63a6; }
.estimate-doc .doc-ratio-dot-labor { background: #c97b4a; }

.estimate-doc .doc-footer {
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid #ece7f6;
  font-size: 11px;
  color: #9c96ac;
  line-height: 1.7;
}

@media print {
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
  @page { size: A4; margin: 12mm; }
  body * { visibility: hidden; }
  #estimate-doc, #estimate-doc * { visibility: visible; }
  #estimate-doc {
    position: absolute; top: 0; left: 0;
    width: 100%; max-width: none; min-height: 0;
    margin: 0; padding: 0; box-shadow: none;
  }
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 22px 0 40px;
  margin-top: 20px;
}
.site-footer p { font-size: 12px; color: var(--ink-soft); margin: 0; }
.site-footer .copyright {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  letter-spacing: 0.2px;
}

/* Responsive */
@media (max-width: 720px) {
  .modal-body { grid-template-columns: 1fr; }
  .modal-left { border-right: none; border-bottom: 1px solid var(--line); }
}

@media (max-width: 480px) {
  .brand h1 { font-size: 18px; }
  .tagline { font-size: 12px; }
  .mockup3d-stage { height: 210px; }
  .mockup3d { transform: scale(0.72) rotateX(-14deg) rotateY(-32deg); }
  .mockup-corner { transform: scale(calc(var(--corner-scale, 1) * 0.8)) rotateX(4deg); }
  .preview-block-head { flex-wrap: wrap; }

  .estimate-toolbar { flex-wrap: wrap; }
  .estimate-toolbar-title { width: 100%; }
  .estimate-doc { padding: 24px 18px; min-height: 0; }
  .estimate-doc .doc-header { flex-direction: column; }
  .estimate-doc .doc-meta { text-align: left; }
}
