.plan-explorer { border: 1px solid var(--rule); border-radius: 10px; background: var(--paper); }
.plan-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 14px; }
.plan-regions, .plan-search, .plan-quote-alt { display: flex; gap: 8px; }
.plan-regions { flex-wrap: wrap; }
.plan-regions button, .plan-zoom button { min-height: 42px; padding: 7px 12px; border: 1px solid var(--rule); border-radius: 5px; background: var(--white); font-size: .82rem; font-weight: 700; cursor: pointer; }
.plan-regions button[aria-pressed="true"] { color: var(--white); border-color: var(--ink); background: var(--ink); }
.plan-search { flex: 0 1 350px; }
.plan-search input, .plan-quote input:not([type="hidden"]), .plan-quote textarea, .plan-models select { min-width: 0; width: 100%; min-height: 44px; padding: 9px 10px; color: var(--ink); border: 1px solid #c9d0c5; border-radius: 5px; background: var(--white); font: inherit; font-size: .85rem; }
.plan-search .button { white-space: nowrap; cursor: pointer; }
.plan-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.plan-search-status { margin: 0 14px; color: var(--muted); font-size: .8rem; }
.plan-search-status:not(:empty) { padding-bottom: 10px; }
.plan-matches { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; }
.plan-matches[hidden] { display: none; }
.plan-matches button { padding: 6px 10px; border: 1px solid var(--rule); border-radius: 4px; background: var(--white); font-size: .82rem; font-weight: 700; cursor: pointer; }
.plan-body { display: grid; grid-template-columns: minmax(0, 1fr); border-top: 1px solid var(--rule); }
.plan-figure { min-width: 0; }
.plan-viewport { position: relative; height: clamp(335px, 43vw, 570px); background: #e7eee8; }
.plan-preview, .plan-canvas { width: 100%; height: 100%; }
.plan-preview { object-fit: contain; }
.plan-preview[hidden], .plan-canvas[hidden] { display: none; }
.plan-canvas { display: block; cursor: grab; touch-action: none; }
.plan-canvas:active { cursor: grabbing; }
.plan-canvas:focus-visible { outline-offset: -4px; }
.plan-zoom { display: grid; gap: 5px; position: absolute; top: 12px; right: 12px; }
.plan-zoom button { width: 42px; padding: 0; box-shadow: 0 1px 4px #203b2e26; font-size: 1.2rem; }
.plan-figure figcaption { padding: 10px 14px; color: var(--muted); font-size: .72rem; }
.plan-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 0; margin: 0 0 4px; list-style: none; }
.plan-legend li { display: inline-flex; align-items: center; gap: 5px; }
.plan-legend li::before { content: ''; width: 10px; height: 10px; border: 1px solid #23332655; border-radius: 2px; background: #fae249; }
.plan-legend li:nth-child(2)::before { background: #a6a0d2; }
.plan-legend li:nth-child(3)::before { background: #ff89a5; }
.plan-details { width: min(570px, calc(100% - 24px)); max-height: 88dvh; box-sizing: border-box; padding: 0; border: 1px solid var(--rule); background: var(--white); color: var(--ink); border-radius: 12px; overflow: auto; }
.plan-details::backdrop { background: #0c241db3; }
.plan-selection { padding: 20px; }
.plan-details .plan-back { display: inline-flex; float: right; padding: 8px; }
.plan-figure { margin: 0; }
.plan-details h3 { margin: 4px 0 8px; font-size: clamp(1.6rem, 3vw, 2.25rem); }
.plan-details p { color: var(--muted); font-size: .83rem; }
.plan-details .project-kicker { color: var(--accent); font-size: .68rem; }
.plan-details .plan-lot-summary { color: var(--ink); font-weight: 700; }
.plan-lot-note:not(:empty) { margin-top: 6px; }
.plan-models { margin: 16px 0; }
.plan-models label, .plan-quote-form label { display: block; margin: 0 0 5px; font-size: .79rem; font-weight: 700; }
.plan-model-note { margin: 7px 0; }
.plan-layout-preview { display: block; width: 100%; padding: 0; border: 1px solid var(--rule); border-radius: 6px; background: var(--paper); text-align: left; overflow: hidden; cursor: pointer; }
.plan-layout-preview img { aspect-ratio: 1.85; object-fit: contain; background: white; }
.plan-layout-preview > span { display: flex; justify-content: space-between; padding: 7px 9px; font-size: .75rem; font-weight: 700; }
.plan-style-button, .plan-copy, .plan-back { padding: 0; border: 0; background: transparent; cursor: pointer; }
.plan-back { display: none; }
.plan-style-button { margin-top: 8px; }
.plan-style-button[hidden] { display: none; }
.plan-quote { margin-top: 15px; border-top: 1px solid var(--rule); }
.plan-quote summary { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 47px; padding: 8px 0; color: var(--ink); font-size: .87rem; font-weight: 700; list-style: none; cursor: pointer; }
.plan-quote summary::-webkit-details-marker { display: none; }
.plan-quote[open] summary span { transform: rotate(180deg); }
.plan-quote-form label { margin-bottom: 10px; }
.plan-quote-form label > :is(input, textarea) { display: block; margin-top: 4px; font-weight: 400; }
.plan-quote-form .button { cursor: pointer; }
.plan-quote-alt { flex-wrap: wrap; margin: 9px 0; }
.plan-details .plan-quote-feedback { font-size: .73rem; }
.plan-quote-manual { margin-top: 8px; }
.plan-image-dialog { width: min(1220px, calc(100% - 24px)); }
.plan-image-panel { position: relative; padding: 16px; overflow: auto; }
.plan-image-panel h3 { margin: 0 44px 12px 0; font-size: 1.35rem; }
.plan-image-panel img { min-width: 900px; }

@media (max-width: 760px) {
  .plan-body { grid-template-columns: minmax(0, 1fr); }
  .plan-toolbar { padding: 11px; }
  .plan-search { flex: 1 1 100%; }
  .plan-regions { gap: 5px; }
  .plan-regions button { padding-inline: 9px; }
  .plan-viewport { height: clamp(285px, 67vw, 420px); }
  .plan-selection { scroll-margin-top: 106px; }
  .plan-back { display: inline-flex; margin-bottom: 10px; }
}
