/* 볕들 리모델링 3D 쪽: 스튜디오 첫 화면과 자재 판. 나머지는 style.css를 그대로 씁니다 */
:root { --studio: #ECE8E2; }
.p3d { background: var(--bg); }

/* 떠 있는 머리글 */
.p3d .top { position: fixed; top: 14px; left: 50%; width: min(1240px, calc(100% - 28px)); transform: translateX(-50%); border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, .97); }
.p3d .top-in { height: 62px; padding-inline: 22px 12px; }
.p3d .m-nav { border-radius: 0 0 14px 14px; overflow: hidden; }

/* 스튜디오 첫 화면 */
.stage { position: relative; height: 100svh; min-height: 680px; max-height: 1100px; overflow: hidden; background: var(--studio); isolation: isolate; }
.stage-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 1.1s cubic-bezier(.2, .7, .2, 1); cursor: grab; outline: none; }
.stage-canvas:active { cursor: grabbing; }
.stage.is-live .stage-canvas { opacity: 1; }
.stage-copy { position: absolute; z-index: 2; top: clamp(100px, 12vh, 140px); left: 0; right: 0; padding-inline: 24px; text-align: center; pointer-events: none; transition: opacity .35s ease-out, transform .6s cubic-bezier(.2, .8, .2, 1), visibility 0s; }
.stage-copy > * { pointer-events: auto; }
.stage-copy h1 { font-size: clamp(42px, 5.6vw, 80px); line-height: 1.06; letter-spacing: -0.04em; }
.stage-copy .lead { max-width: 40em; margin: 12px auto 0; font-size: 18px; line-height: 1.6; color: var(--muted); }
.stage-copy .hero-cta { justify-content: center; margin-top: 20px; }
.stage-copy .btn-line { background: rgba(255, 255, 255, .7); }
.stage.is-picking .stage-copy { opacity: 0; transform: translateY(-18px); visibility: hidden; transition: opacity .3s ease-out, transform .6s cubic-bezier(.2, .8, .2, 1), visibility 0s .3s; }
.stage-note { position: absolute; z-index: 2; left: 24px; bottom: 18px; font-size: 13px; font-weight: 600; color: var(--muted); }
.stage-hint { position: absolute; z-index: 2; right: 24px; bottom: 16px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 10px; border-radius: 999px; background: rgba(255, 255, 255, .78); font-size: 13px; font-weight: 700; color: var(--ink); opacity: 0; transition: opacity .4s ease-out; }
.stage-hint i { font-size: 17px; }
.stage.is-live .stage-hint { opacity: 1; }
.stage-hint.is-done, .stage.is-picking .stage-note, .stage.is-picking .stage-hint { opacity: 0; visibility: hidden; }
.stage-poster { display: none; position: absolute; inset: 0; }
.stage-poster img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; }
.stage.no-3d .stage-poster { display: block; }
.no3d-only { display: none; }
.stage.no-3d .no3d-only { display: inline; }
.stage.no-3d .stage-canvas, .stage.no-3d .stage-labels, .stage.no-3d .stage-hint { display: none; }
.stage.no-3d { background: radial-gradient(ellipse at 50% 72%, #F6F3EE 0%, var(--studio) 62%); }

/* 방 이름표 */
.stage-labels { position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity .4s ease-out; }
.stage.is-picking.is-live .stage-labels { opacity: 1; }
.stage-labels span { position: absolute; left: 0; top: 0; translate: -50% -50%; padding: 3px 10px; border-radius: 999px; background: rgba(30, 28, 25, .8); font-size: 13px; font-weight: 700; color: #fff; white-space: nowrap; }

/* 자재 판 */
.picker { position: absolute; z-index: 3; left: 50%; bottom: 20px; width: min(1200px, calc(100% - 40px)); transform: translateX(-50%); display: grid; grid-template-columns: 236px minmax(0, 1fr) 268px; background: #fff; border: 1px solid var(--line-2); border-radius: 18px; animation: rise .55s cubic-bezier(.2, .8, .2, 1); }
.picker[hidden] { display: none; }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 24px); } }
.picker-tabs { display: grid; align-content: start; gap: 2px; padding: 14px 12px; border-right: 1px solid var(--line); }
.tab { display: grid; gap: 1px; min-height: 52px; padding: 8px 12px; border: 0; border-radius: 10px; background: transparent; text-align: left; transition: background-color .15s ease-out; }
.tab:hover { background: var(--soft); }
.tab b { font-size: 16px; font-weight: 800; letter-spacing: -0.02em; }
.tab span { overflow: hidden; font-size: 13px; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.tab[aria-selected="true"] { background: var(--ink); color: #fff; }
.tab[aria-selected="true"] span { color: #D9D4CC; }
.picker-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-content: start; padding: 16px; }
.picker .chip .sw { aspect-ratio: 3 / 2; }
.picker .chip .tag { padding: 10px 12px 12px; }
.picker-sum { display: flex; flex-direction: column; padding: 18px 20px 16px; border-left: 1px solid var(--line); }
.picker-sum .k { font-size: 14px; font-weight: 700; }
.sum-num { margin-top: 2px; font-size: 28px; font-weight: 900; line-height: 1.25; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.sum-num small { margin-left: 4px; font-size: 17px; font-weight: 700; }
.sum-wk { font-size: 14.5px; font-weight: 700; }
.sum-wk span { display: none; }
.picker-sum .btn { width: 100%; margin-top: auto; }
.sum-lines { margin: 14px 0 16px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13.5px; }
.sum-lines div { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }
.sum-lines dt { color: var(--muted); }
.sum-lines dd { font-weight: 800; font-variant-numeric: tabular-nums; }
.sum-fine { margin: -8px 0 14px; font-size: 13px; color: var(--muted); }
.picker-tools { position: absolute; right: 0; bottom: calc(100% + 10px); display: flex; gap: 8px; }
.tool { display: inline-flex; align-items: center; gap: 7px; height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .94); font-size: 14.5px; font-weight: 700; transition: background-color .15s ease-out, border-color .15s ease-out, color .15s ease-out; }
.tool i { font-size: 18px; }
.tool:hover { border-color: var(--line-2); }
.tool[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.tool-close { justify-content: center; width: 44px; padding: 0; }

/* 아래 견적표 */
.sheet-grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 56px; align-items: start; }
.sheet-grid h2 { font-size: 38px; line-height: 1.25; }
.sheet-head h3 { font-size: 21px; }
.picks { display: grid; gap: 0; margin-top: 32px; border-top: 1px solid var(--line); }
.picks li { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); }
.picks .sw { display: block; width: 112px; height: auto; aspect-ratio: 3 / 2; border-radius: 10px; background: var(--soft) center / cover no-repeat; box-shadow: inset 0 0 0 1px rgba(30, 28, 25, .08); }
.picks b { display: block; font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
.picks li > span:not(.sw) { font-size: 14.5px; color: var(--muted); }
.picks em { font-style: normal; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* 고른 다음에 볼 것 */
.next { border-top: 1px solid var(--line-2); }
.next a { display: grid; grid-template-columns: 220px minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 24px 4px; border-bottom: 1px solid var(--line-2); text-decoration: none; transition: background-color .15s ease-out; }
.next a:hover { background: rgba(255, 255, 255, .6); }
.next b { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.next span { color: var(--muted); }
.next i { font-size: 20px; }

@media (max-width: 1100px) {
  .picker { grid-template-columns: 200px minmax(0, 1fr) 236px; }
  .sheet-grid { grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; }
}

@media (max-width: 860px) {
  .p3d .top { top: 10px; width: calc(100% - 20px); border-radius: 12px; }
  .p3d .top-in { height: 56px; padding-inline: 16px 8px; }
  .stage { min-height: 620px; }
  .stage-copy { top: 92px; padding-inline: 20px; }
  .stage-copy h1 { font-size: clamp(34px, 10.4vw, 46px); }
  .stage-copy .lead { margin-top: 12px; font-size: 15.5px; }
  .stage-copy .hero-cta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 20px; }
  .stage-copy .btn { padding: 0 12px; height: 50px; font-size: 15px; }
  .stage-note { left: 16px; right: 16px; bottom: 14px; font-size: 13px; text-align: center; }
  .stage-hint { display: none; }
  .picker { left: 0; right: 0; bottom: 0; width: auto; transform: none; grid-template-columns: minmax(0, 1fr); border-width: 1px 0 0; border-radius: 18px 18px 0 0; padding-bottom: env(safe-area-inset-bottom); animation-name: rise-m; }
  @keyframes rise-m { from { opacity: 0; transform: translateY(32px); } }
  .picker-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 10px 10px 0; border-right: 0; }
  .tab { min-height: 44px; place-items: center; padding: 6px 4px; text-align: center; }
  .tab span { display: none; }
  .picker-chips { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 44%; gap: 10px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; padding: 12px; scrollbar-width: none; }
  .picker-chips .chip { scroll-snap-align: start; }
  .picker .chip .tag { padding: 8px 10px 10px; }
  .picker .chip .tag b { font-size: 14px; }
  .picker .chip .spec { display: none; }
  .picker-sum { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "k btn" "num btn" "wk btn"; column-gap: 12px; padding: 10px 12px 12px; border-left: 0; border-top: 1px solid var(--line); }
  .picker-sum .k { grid-area: k; font-size: 12.5px; }
  .sum-num { grid-area: num; font-size: 20px; }
  .sum-num small { font-size: 14px; }
  .sum-wk { grid-area: wk; font-size: 12.5px; }
  .sum-wk span { display: none; }
  .sum-lines, .sum-fine { display: none; }
  .picker-sum .btn { grid-area: btn; width: auto; height: 50px; margin: 0; padding: 0 16px; align-self: center; }
  .picker-tools { right: 10px; bottom: calc(100% + 8px); }
  .tool { height: 40px; padding: 0 14px; font-size: 13.5px; }
  .tool-close { width: 40px; }
  .p3d.is-picking .dock { display: none; }
  .sheet-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .sheet-grid h2 { font-size: 27px; }
  .picks li { grid-template-columns: 76px minmax(0, 1fr) auto; gap: 14px; }
  .picks .sw { width: 76px; }
  .picks b { font-size: 16px; }
  .next a { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 18px 2px; }
  .next b { font-size: 18px; }
  .next span { grid-column: 1; grid-row: 2; font-size: 15px; }
  .next i { grid-row: 1 / 3; grid-column: 2; }
}

@media (prefers-reduced-motion: reduce) {
  .stage-canvas, .stage-copy, .stage.is-picking .stage-copy, .stage-hint, .stage-labels, .tab, .tool { transition: none; }
  .picker { animation: none; }
}
