/* dollhouse.css — wave177 (2026-10-27): the Dollhouse joined view
 * (dollhouse.js) — a full-screen overlay in the planview family:
 * the joined 2D floor plan, the floor picker, the room list with
 * each room's placed / auto-arranged / couldn't-build state, and
 * the door into the shared 3D viewer. Tokens only (--ds-*), so
 * Light / Navy / System read right. The one gold is the View in 3D
 * button (btn-primary — the view's main action).
 *
 * wave245 (2026-10-29): the Arrange editor — View | Arrange pills
 * (the Houzz segmented pattern, active pill filled in ink, never
 * gold), the plan on a light graph-paper grid drawn in metres
 * (currentColor, so every theme reads), the selected room's outline
 * + turn handle in the accent, the selection panel, and the
 * Saving / Saved / Not saved states.
 *
 * wave248 (2026-10-29): Square up + neighbour snap — the room a drag
 * has clicked flush against lights its outline in the accent while
 * the snap holds, and the hint line's snap note names it.
 *
 * wave249 (2026-10-30): object labels + the 2D | 3D shell — the plan's
 * wall-run dimensions and item markers (pointer-transparent, so a drag
 * still takes the room), the Labels checkbox, the 2D | 3D pill pair
 * (2D filled in ink like View | Arrange; the 3D half keeps the view's
 * one gold), and the item hotspots in every 3D view — each hidden with
 * that view's Dimensions checkbox. Tokens only, no new colours.
 *
 * wave255 (2026-10-29): Line up + aligned snapping — a guide line in
 * the accent crosses the plan through each edge a drag holds: solid
 * for flush, dashed for aligned.
 *
 * wave250 (2026-10-30): finishes — the room list's Finishes door +
 * summary, and the finishes sheet (panel + product picker) inside the
 * Dollhouse overlay. No-photo products wear the violet placeholder. */

.dh-overlay {
  position: fixed; inset: 0; z-index: 120; display: flex; flex-direction: column;
  background: var(--ds-bg, #f4f6f8); color: var(--ds-ink, #12212e);
}
.dh-bar {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px;
  background: var(--ds-card, #fff); border-bottom: 1px solid var(--ds-line, #d8e0e7);
}
.dh-title { font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; gap: 7px; }
.dh-barsp { flex: 1; }
.dh-body {
  flex: 1; overflow: auto; display: flex; gap: 18px; align-items: flex-start;
  padding: 16px; max-width: 1240px; width: 100%; margin: 0 auto; box-sizing: border-box;
}
.dh-loading { padding: 12px 4px; }
.dh-main { flex: 1 1 640px; min-width: 0; }
.dh-side { flex: 0 1 340px; min-width: 260px; }
.dh-tools { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; flex-wrap: wrap; }
.dh-floorpick { display: inline-flex; align-items: center; gap: 7px; font-size: var(--ds-fs-sm, 13px); font-weight: 600; }
.dh-floorpick select {
  font: inherit; font-weight: 500; padding: 5px 8px; min-height: 32px;
  border: 1px solid var(--ds-line-strong, #b9c6d0); border-radius: var(--ds-r-sm, 6px);
  background: var(--ds-card, #fff); color: var(--ds-ink, #12212e);
}
.dh-floorname { font-weight: 700; }

.dh-plan {
  display: block; width: 100%; height: auto; max-height: 62vh;
  background: var(--ds-card, #fff); border: 1px solid var(--ds-line, #d8e0e7);
  border-radius: var(--ds-r-md, 10px); color: var(--ds-ink, #12212e);
}
.dh-grid-minor { stroke: currentColor; stroke-opacity: .06; stroke-width: .008; }
.dh-grid-major { stroke: currentColor; stroke-opacity: .13; stroke-width: .014; }
.dh-floor { fill: rgba(98, 88, 72, .16); stroke: none; }
.dh-auto-fill { fill: rgba(98, 88, 72, .08); }
.dh-wall { stroke: #22303c; stroke-width: .1; stroke-linecap: round; }
.dh-rname { fill: var(--ds-ink, #12212e); font-weight: 600; paint-order: stroke; stroke: rgba(255, 255, 255, .85); stroke-width: .06; }

.dh-honest { margin: 8px 0 0; font-size: var(--ds-fs-xs, 12px); line-height: 1.5; max-width: 78ch; }
.dh-none { margin: 6px 0; }

.dh-rlist { display: flex; flex-direction: column; gap: 8px; }
.dh-rrow {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  background: var(--ds-card, #fff); border: 1px solid var(--ds-line, #d8e0e7);
  border-radius: var(--ds-r-md, 10px);
}
.dh-rrow .grow { flex: 1; min-width: 0; }
.dh-rrow .t { margin: 0; font-weight: 600; }
.dh-rrow .s { margin: 2px 0 0; font-size: var(--ds-fs-xs, 12px); color: var(--ds-muted, #5c6f7d); }
.dh-chip {
  flex: none; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  border: 1px solid var(--ds-line-strong, #b9c6d0); color: var(--ds-muted, #5c6f7d); background: transparent;
}
.dh-chip-ok { border-color: #2e7d4f; color: #2e7d4f; }
.dh-chip-bad { border-color: #b3452e; color: #b3452e; }
.dh-door { margin: 14px 0 4px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dh-doors { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 14px; }
.dh-doors.hidden { display: none; }
.dh-home-intro { color: var(--muted); margin: -4px 0 16px; }
.dh-home-card .body { display: flex; flex-direction: column; gap: 8px; min-height: 178px; }
.dh-home-rooms { color: var(--muted); font-size: 12.5px; line-height: 1.5; margin: 0; }
.dh-home-meta { min-height: 24px; }
.dh-home-open { align-self: flex-start; margin-top: auto; }
.dh-door .s { margin: 0; }

/* ---- wave245: View | Arrange ---- */
.dh-modes {
  display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px;
  background: var(--ds-card, #fff); border: 1px solid var(--ds-line, #d8e0e7);
}
.dh-mode {
  font: inherit; font-size: var(--ds-fs-sm, 13px); font-weight: 600; min-height: 30px; padding: 4px 16px;
  border: 0; border-radius: 999px; background: transparent; color: var(--ds-muted, #5c6f7d); cursor: pointer;
}
.dh-mode.on { background: var(--ds-ink, #12212e); color: var(--ds-card, #fff); }
.dh-mode:disabled { opacity: .45; cursor: not-allowed; }
.dh-mode:focus-visible { outline: 2px solid var(--ds-accent, #2a6f97); outline-offset: 2px; }

.dh-plan[data-dh-mode="arrange"] { touch-action: none; user-select: none; -webkit-user-select: none; }
.dh-plan[data-dh-mode="arrange"] .dh-room { cursor: grab; }
.dh-plan.dh-dragging, .dh-plan.dh-dragging .dh-room, .dh-plan.dh-dragging .dh-roth { cursor: grabbing; }
.dh-sel .dh-floor { stroke: var(--ds-accent, #2a6f97); stroke-width: .06; stroke-linejoin: round; }
.dh-unsaved-fill { fill: rgba(179, 69, 46, .14); }
.dh-rotline { stroke: var(--ds-accent, #2a6f97); stroke-width: .03; stroke-dasharray: .08 .06; pointer-events: none; }
.dh-roth { fill: var(--ds-card, #fff); stroke: var(--ds-accent, #2a6f97); stroke-width: .05; cursor: grab; }
.dh-hint { margin: 8px 0 0; font-size: var(--ds-fs-xs, 12px); line-height: 1.5; max-width: 78ch; color: var(--ds-ink, #12212e); }

.dh-selpanel {
  margin: 0 0 16px; padding: 12px 14px; background: var(--ds-card, #fff);
  border: 1px solid var(--ds-line, #d8e0e7); border-radius: var(--ds-r-md, 10px);
}
.dh-selpanel .t { margin: 0; font-weight: 700; }
.dh-selnone { margin: 0; font-size: var(--ds-fs-sm, 13px); }
.dh-coords { display: grid; grid-template-columns: auto 1fr; gap: 3px 14px; margin: 8px 0; font-variant-numeric: tabular-nums; }
.dh-coords dt { font-size: var(--ds-fs-xs, 12px); color: var(--ds-muted, #5c6f7d); }
.dh-coords dd { margin: 0; font-weight: 600; }
.dh-save { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; font-size: var(--ds-fs-xs, 12px); }
.dh-save-ok { color: #2e7d4f; font-weight: 600; }
.dh-save-bad { color: #b3452e; }
.dh-selbtns { display: flex; flex-wrap: wrap; gap: 6px; }
.dh-pickable { cursor: pointer; }
.dh-pickable:hover { border-color: var(--ds-line-strong, #b9c6d0); }
.dh-rrow.dh-picked { border-color: var(--ds-accent, #2a6f97); box-shadow: 0 0 0 1px var(--ds-accent, #2a6f97); }
.dh-pickable:focus-visible { outline: 2px solid var(--ds-accent, #2a6f97); outline-offset: 2px; }

.dh-snapto .dh-floor { stroke: var(--ds-accent, #2a6f97); stroke-width: .05; stroke-dasharray: .12 .08; }
.dh-snapto .dh-wall { stroke: var(--ds-accent, #2a6f97); }
.dh-snapnote { font-weight: 700; color: var(--ds-accent, #2a6f97); }

/* ---- wave249: labels + the 2D | 3D shell ---- */
.dh-dims, .dh-items { pointer-events: none; }
.dh-dim { fill: var(--ds-muted, #5c6f7d); font-weight: 600; font-variant-numeric: tabular-nums; paint-order: stroke; stroke: rgba(255, 255, 255, .9); stroke-width: .05; }
.dh-item-box { fill: var(--ds-accent, #2a6f97); fill-opacity: .1; stroke: var(--ds-accent, #2a6f97); stroke-opacity: .7; stroke-width: .025; stroke-dasharray: .07 .05; }
.dh-item-op { stroke: var(--ds-accent, #2a6f97); stroke-width: .14; stroke-linecap: butt; stroke-opacity: .55; }
.dh-item-dot { fill: var(--ds-accent, #2a6f97); }
.dh-item-name { fill: var(--ds-ink, #12212e); font-weight: 600; paint-order: stroke; stroke: rgba(255, 255, 255, .92); stroke-width: .045; }
.dh-labels { display: inline-flex; align-items: center; gap: 6px; font-size: var(--ds-fs-sm, 13px); font-weight: 600; cursor: pointer; }
.dh-labels input { accent-color: var(--ds-accent, #2a6f97); margin: 0; }
.dh-views { align-items: center; }
.dh-views .dh-view3d { min-height: 30px; padding: 4px 16px; border-radius: 999px; }

.sm-hs.sm-hs-item {
  font-size: 11px; font-weight: 600; line-height: 1.25; padding: 2px 8px; white-space: nowrap;
  border-radius: 999px; border: 1px solid var(--ds-accent, #2a6f97);
  background: var(--ds-card, #fff); color: var(--ds-ink, #12212e); opacity: .92;
}
.sm-nodims .sm-hs-item, .rk-model-nodims .sm-hs-item { display: none; }

@media (max-width: 860px) {
  .dh-body { flex-direction: column; }
  .dh-side { flex: none; width: 100%; min-width: 0; }
  .dh-plan { max-height: 52vh; }
}

/* ---- wave255: CAD-style edge alignment ---- */
.dh-guides { pointer-events: none; }
.dh-guide { stroke: var(--ds-accent, #2a6f97); stroke-width: .03; stroke-linecap: butt; pointer-events: none; }
.dh-guide-aligned { stroke-dasharray: .16 .1; }

/* ---- wave250: finishes ---- */
.dh-rrow .dh-fin-door { flex: 0 0 auto; }
.dh-fin-sum { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.dh-fin-chip { display: inline-flex; align-items: center; gap: 5px; }
.dh-fin-dot {
  display: inline-block; width: 11px; height: 11px; border-radius: 50%; flex: 0 0 auto; vertical-align: -1px;
  box-shadow: 0 0 0 1px var(--ds-line-strong, #b9c6d0);
}
.dh-fin-sheet {
  position: fixed; inset: 0; z-index: 130; display: flex; justify-content: flex-end;
  background: var(--ds-scrim, rgba(18, 33, 46, .32));
}
.dh-fin-card-wrap {
  width: min(720px, 100%); height: 100%; overflow: auto; box-sizing: border-box; padding: 16px 18px 24px;
  background: var(--ds-card, #fff); border-left: 1px solid var(--ds-line, #d8e0e7);
}
.dh-fin-head { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; }
.dh-fin-head .t { flex: 1; margin: 0; font-weight: 700; font-size: 15px; }
.dh-fin-lead { margin: 0 0 12px; font-size: var(--ds-fs-xs, 12px); line-height: 1.5; }
.dh-fin-surf { border: 1px solid var(--ds-line, #d8e0e7); border-radius: var(--ds-r-md, 10px); padding: 10px 12px; margin: 0 0 10px; }
.dh-fin-shead { display: flex; align-items: center; gap: 8px; }
.dh-fin-shead h4 { flex: 1; margin: 0; font-size: var(--ds-fs-sm, 13px); }
.dh-fin-sbtns { display: flex; gap: 6px; }
.dh-fin-cur { display: flex; align-items: center; gap: 10px; margin: 8px 0 0; }
.dh-fin-cur .grow { flex: 1; min-width: 0; }
.dh-fin-cur .t { margin: 0; font-weight: 600; }
.dh-fin-cur .s { margin: 2px 0 0; font-size: var(--ds-fs-xs, 12px); color: var(--ds-muted, #5c6f7d); }
.dh-fin-none, .dh-fin-hint { margin: 6px 0 0; font-size: var(--ds-fs-xs, 12px); }
.dh-fin-msg { margin: 6px 0 0; font-size: var(--ds-fs-xs, 12px); line-height: 1.45; }
.dh-fin-noprice {
  display: inline-block; padding: 0 7px; border-radius: 999px; font-size: 11px; font-weight: 600;
  background: var(--ds-neutral-bg, #eef1f4); color: var(--ds-neutral-ink, #4a5a66);
}
.dh-fin-thumb, .dh-fin-pimg { object-fit: cover; background: var(--ds-fill, #eef1f4); border-radius: var(--ds-r-sm, 6px); }
.dh-fin-thumb { width: 52px; height: 52px; flex: 0 0 auto; }
.dh-fin-ph {
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ds-violet, #6d4bd8); background: var(--ds-violet-tint, #f3efff); box-shadow: inset 0 0 0 1px var(--ds-violet-line, #d9d0fb);
}
.dh-fin-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 8px 0 10px; }
.dh-fin-q {
  flex: 1 1 200px; font: inherit; padding: 6px 10px; min-height: 32px; box-sizing: border-box;
  border: 1px solid var(--ds-line-strong, #b9c6d0); border-radius: var(--ds-r-sm, 6px); background: var(--ds-card, #fff); color: var(--ds-ink, #12212e);
}
.dh-fin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.dh-fin-pcard {
  display: flex; flex-direction: column; gap: 4px; text-align: left; font: inherit; color: inherit; cursor: pointer;
  padding: 8px; border: 1px solid var(--ds-line, #d8e0e7); border-radius: var(--ds-r-md, 10px); background: var(--ds-card, #fff);
}
.dh-fin-pcard:hover { border-color: var(--ds-line-strong, #b9c6d0); }
.dh-fin-pcard.on { border-color: var(--ds-accent, #2a6f97); box-shadow: 0 0 0 2px var(--ds-accent, #2a6f97); }
.dh-fin-pimg { width: 100%; aspect-ratio: 4 / 3; height: auto; }
.dh-fin-pname { font-weight: 600; font-size: var(--ds-fs-sm, 13px); line-height: 1.3; }
.dh-fin-pmeta { font-size: 11px; color: var(--ds-muted, #5c6f7d); }
.dh-fin-pprice { font-size: var(--ds-fs-sm, 13px); font-weight: 600; }
.dh-fin-more { margin: 8px 0 0; font-size: var(--ds-fs-xs, 12px); }
.dh-fin-foot {
  position: sticky; bottom: -24px; margin: 12px -18px -24px; padding: 12px 18px 16px;
  background: var(--ds-card, #fff); border-top: 1px solid var(--ds-line, #d8e0e7);
  display: flex; flex-direction: column; gap: 8px; align-items: flex-start;
}
.dh-fin-chosen { margin: 0; }
.dh-fin-swatches { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dh-fin-sw {
  width: 24px; height: 24px; border-radius: 50%; padding: 0; cursor: pointer;
  border: 2px solid var(--ds-card, #fff); box-shadow: 0 0 0 1px var(--ds-line-strong, #b9c6d0);
}
.dh-fin-sw.on { box-shadow: 0 0 0 2px var(--ds-accent, #2a6f97); }
.dh-fin-swnote { font-size: 11px; }
@media (max-width: 860px) {
  .dh-fin-card-wrap { width: 100%; border-left: 0; }
}
