.planner-type-strip {
  padding: 14px 18px;
  margin-bottom: 16px;
}

.planner-type-strip-row {
  display: grid;
  grid-template-columns: auto minmax(260px, 360px) auto minmax(260px, 1fr);
  gap: 12px 16px;
  align-items: end;
}

.planner-type-strip-row h3 {
  margin: 0;
  white-space: nowrap;
}

.planner-type-strip-field {
  margin: 0;
}

.planner-type-strip-field span,
.planner-type-strip-meta {
  font-size: 0.9rem;
}

.planner-type-strip-actions {
  margin: 0;
}

.planner-type-strip-actions .ghost-button {
  min-height: 48px;
}

.planner-type-strip-meta {
  color: var(--muted);
  line-height: 1.45;
  padding-bottom: 6px;
}

.planner-visual-stage-hybrid {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.planner-current-preview-bridge {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 14px;
  min-width: 0;
}

.planner-front-dock {
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(246, 238, 226, 0.78));
}

.planner-front-dock-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 10px;
}

.planner-front-dock-head h4 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.2;
}

.planner-front-dock-head p {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.35;
  color: var(--muted);
  text-align: right;
}

.planner-front-dock-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1.3fr) minmax(170px, 0.8fr);
  gap: 8px 10px;
  align-items: end;
}

.planner-front-dock .field {
  margin: 0;
}

.planner-front-dock .field span {
  font-size: 0.82rem;
  line-height: 1.25;
}

.planner-front-dock .field input,
.planner-front-dock .field select {
  min-height: 42px;
  font-size: 0.92rem;
}

.planner-front-dock-actions {
  grid-column: 1 / span 2;
  gap: 8px;
}

.planner-front-dock-actions .ghost-button {
  min-height: 42px;
  padding: 10px 12px;
  font-size: 0.88rem;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.icon-svg {
  width: 16px;
  height: 16px;
  display: inline-block;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
  flex: 0 0 16px;
}

.icon-plus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23205f52' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 3.5v9M3.5 8h9'/%3E%3C/svg%3E");
}

.icon-save {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23205f52' stroke-width='1.45' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.2 2.8h7.4l2.2 2.2v8H3.2z'/%3E%3Cpath d='M5.1 2.8h4.1v3H5.1zM5 10.4h6'/%3E%3C/svg%3E");
}

.icon-load {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23205f52' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 3.2v6M5.5 6.8 8 9.3l2.5-2.5M3.4 12.5h9.2'/%3E%3C/svg%3E");
}

.icon-undo {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23205f52' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6.1 5.2H2.9V2M2.9 5.2A5.2 5.2 0 1 1 4.5 12'/%3E%3C/svg%3E");
}

.icon-redo {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23205f52' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9.9 5.2h3.2V2M13.1 5.2A5.2 5.2 0 1 0 11.5 12'/%3E%3C/svg%3E");
}

.icon-reset {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23205f52' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 5.5V3h2.5M3.8 4.9A5 5 0 1 1 3.6 9.8'/%3E%3C/svg%3E");
}

.icon-split-vertical {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23205f52' stroke-width='1.45' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.7' y='2.7' width='10.6' height='10.6' rx='1.4'/%3E%3Cpath d='M8 3.9v8.2'/%3E%3C/svg%3E");
}

.icon-split-horizontal {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23205f52' stroke-width='1.45' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.7' y='2.7' width='10.6' height='10.6' rx='1.4'/%3E%3Cpath d='M3.9 8h8.2'/%3E%3C/svg%3E");
}

.icon-file-csv {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23205f52' stroke-width='1.35' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.3 2.6h6.1l3.3 3.3v7.5H3.3z'/%3E%3Cpath d='M9.4 2.6v3.3h3.3M4.7 11.2h1.1l.6-.9-.6-.9H4.7m2.6 0-.7 1.8m.7-1.8.7 1.8m.8-1.8h1.5l-1.5 1.8h1.5'/%3E%3C/svg%3E");
}

.icon-file-pdf {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23205f52' stroke-width='1.35' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.3 2.6h6.1l3.3 3.3v7.5H3.3z'/%3E%3Cpath d='M9.4 2.6v3.3h3.3M4.7 11.3V9.2H6c.6 0 1 .3 1 .85S6.6 11 6 11H4.7zm3-.05h.7c.84 0 1.25-.4 1.25-1.15S9.24 8.7 8.4 8.7h-.7zm3.05.35V9.2h1.45'/%3E%3C/svg%3E");
}

.icon-file-xlsx {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23205f52' stroke-width='1.35' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.3 2.6h6.1l3.3 3.3v7.5H3.3z'/%3E%3Cpath d='M9.4 2.6v3.3h3.3M4.7 11.2 6 9.2M6 11.2 4.7 9.2M7.2 9.2h1.05v2H7.2zM9.4 9.2l1.7 2M11.1 9.2l-1.7 2'/%3E%3C/svg%3E");
}

#plannerCurrentMeta {
  display: none !important;
}

.planner-sidebar-lower-start {
  margin-top: 208px;
}

.planner-front-tile .decor-toggle {
  position: relative;
}

.planner-search-field {
  margin: 4px 0 10px;
}

.planner-search-field span {
  font-size: 0.8rem;
  color: var(--muted);
}

.planner-search-field input {
  min-height: 38px;
  font-size: 0.9rem;
}

.planner-cost-grid {
  gap: 8px 10px;
  margin-bottom: 10px;
}

.planner-cost-grid .field {
  margin: 0;
}

.planner-cost-grid .field span {
  font-size: 0.79rem;
  line-height: 1.2;
}

.planner-cost-grid input {
  min-height: 38px;
  font-size: 0.9rem;
}

.planner-cost-summary {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.85), rgba(246,238,226,0.72));
  padding: 10px 12px;
  display: grid;
  gap: 5px;
}

.planner-cost-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  font-size: 0.83rem;
  color: var(--muted);
}

.planner-cost-row strong {
  color: var(--ink);
  font-size: 0.86rem;
}

.planner-cost-row.is-total {
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px dashed var(--line);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.9rem;
}

.planner-current-preview-3d-shell,
.planner-current-preview-click-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(246, 238, 226, 0.78));
  overflow: hidden;
}

.planner-current-preview-3d-shell {
  padding: 14px;
}

.planner-current-preview-click-shell {
  padding: 12px;
}

.planner-current-preview-3d-head,
.planner-current-preview-click-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  min-height: 112px;
  margin-bottom: 12px;
}

.planner-current-preview-3d-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.planner-current-preview-3d-head strong,
.planner-current-preview-click-head strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.02rem;
}

.planner-current-preview-3d-copy span,
.planner-current-preview-click-head span {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
  text-align: left;
  min-width: 0;
}

.planner-cad2d-open {
  align-self: flex-start;
  min-width: 86px;
  min-height: 34px;
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
}

.planner-cad-modal {
  position: fixed;
  inset: 0;
  z-index: 1700;
  display: grid;
  place-items: center;
}

.planner-cad-modal.is-hidden {
  display: none;
}

.planner-cad-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(16, 24, 38, 0.45);
}

.planner-cad-modal-window {
  position: relative;
  width: min(1180px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  border-radius: 18px;
  border: 1px solid rgba(34, 28, 22, 0.2);
  background: #f8f6f2;
  box-shadow: 0 28px 80px rgba(14, 21, 33, 0.38);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.planner-cad-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(34, 28, 22, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(243, 237, 228, 0.96));
}

.planner-cad-modal-title h3 {
  margin: 0;
  font: 700 1.02rem/1.2 "Space Grotesk", sans-serif;
  color: #2d261f;
}

.planner-cad-modal-title p {
  margin: 4px 0 0;
  color: #6f6558;
  font-size: 0.86rem;
  line-height: 1.35;
}

.planner-cad-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(34, 28, 22, 0.16);
  background: rgba(255, 255, 255, 0.95);
  color: #3d3328;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.planner-cad-modal-body {
  overflow: auto;
  padding: 14px;
}

.planner-cad-sheet {
  width: 100%;
  min-width: 920px;
  height: auto;
  display: block;
  border: 1px solid rgba(47, 40, 31, 0.2);
  border-radius: 10px;
  background: #fff;
}

body.planner-cad-modal-open {
  overflow: hidden;
}

.planner-current-preview-3d {
  position: relative;
  min-height: 470px;
  border-radius: 18px;
  overflow: hidden;
  touch-action: none;
  overscroll-behavior: contain;
  user-select: none;
  background:
    radial-gradient(circle at top center, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.94) 42%, rgba(248, 245, 239, 0.98) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 240, 232, 0.82));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.planner-current-preview-3d::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, rgba(255,255,255,0) 52%, rgba(22, 35, 58, 0.14) 100%),
    linear-gradient(180deg, rgba(255,255,255,0.16) 0%, rgba(255,255,255,0) 26%);
  mix-blend-mode: multiply;
}

.planner-current-preview-3d canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  touch-action: none;
}

.planner-current-preview-3d.is-pro-preview-locked canvas,
.planner-current-preview-3d.is-pro-preview-locked .planner-current-preview-3d-stage,
.planner-current-preview-3d.is-pro-preview-locked .planner-current-preview-3d-fallback,
.planner-current-preview-3d.is-pro-preview-locked .planner-current-preview-3d-model,
.planner-current-preview-3d.is-pro-preview-locked .planner-current-preview-3d-ground {
  filter: blur(8px) saturate(0.72);
  transform: scale(1.015);
  transform-origin: center center;
}

.planner-current-preview-3d.is-pro-preview-locked::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(248, 244, 237, 0.14), rgba(248, 244, 237, 0.36)),
    radial-gradient(circle at center, rgba(255,255,255,0.08), rgba(214, 199, 173, 0.22));
  pointer-events: none;
}

.planner-current-preview-3d-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  perspective: 1800px;
  overflow: hidden;
}

.planner-current-preview-3d-stage.is-fallback {
  place-items: center;
}

.planner-current-preview-3d-fallback {
  max-width: calc(100% - 32px);
  max-height: calc(100% - 32px);
  display: grid;
  place-items: center;
}

.planner-current-preview-3d-fallback .planner-cabinet-helper {
  transform: scale(1.15);
  transform-origin: center center;
}

.planner-cabinet-helper {
  pointer-events: none !important;
  margin: 0 auto;
}

.planner-cabinet-helper .planner-front-segment,
.planner-cabinet-helper .planner-cabinet-fronts {
  pointer-events: none !important;
}

.planner-cabinet-helper .planner-front-segment.is-selected {
  outline-width: 3px;
}

.planner-current-preview-3d-ground {
  position: absolute;
  left: 50%;
  bottom: 16px;
  width: min(72%, 620px);
  height: 118px;
  transform: translateX(-50%) rotateX(72deg);
  transform-origin: center bottom;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(154, 127, 88, 0.18), rgba(154, 127, 88, 0.05) 58%, rgba(154, 127, 88, 0) 74%);
  filter: blur(1px);
}

.planner-current-preview-3d-model {
  --hybrid-scale: 1;
  --hybrid-yaw: -22deg;
  --hybrid-pitch: 12deg;
  position: relative;
  transform-style: preserve-3d;
  transform:
    translate3d(0, 0, 0)
    rotateX(var(--hybrid-pitch))
    rotateY(var(--hybrid-yaw))
    scale(var(--hybrid-scale));
  transition: transform 140ms ease-out;
  filter: drop-shadow(0 22px 32px rgba(71, 52, 27, 0.14));
}

.planner-hybrid-front,
.planner-hybrid-side,
.planner-hybrid-top {
  position: absolute;
  transform-style: preserve-3d;
}

.planner-hybrid-front {
  overflow: visible;
  border-radius: 14px;
}

.planner-hybrid-side {
  background: linear-gradient(180deg, rgba(213, 204, 190, 0.98), rgba(190, 178, 160, 0.98));
  border: 1px solid rgba(81, 63, 41, 0.18);
  border-left: none;
  transform-origin: left center;
  transform: skewY(0deg) skewX(0deg);
  clip-path: polygon(0 0, 100% 12%, 100% 100%, 0 88%);
  box-shadow: inset -10px 0 18px rgba(88, 70, 49, 0.12);
}

.planner-hybrid-top {
  background: linear-gradient(180deg, rgba(238, 232, 223, 0.98), rgba(217, 208, 190, 0.98));
  border: 1px solid rgba(81, 63, 41, 0.16);
  border-bottom: none;
  transform-origin: left bottom;
  transform: skewX(-58deg);
  box-shadow: inset 0 -10px 18px rgba(88, 70, 49, 0.08);
}

.planner-hybrid-front .planner-cabinet-inner {
  overflow: hidden;
  border-radius: 16px;
}

.planner-current-preview-clickmap {
  min-height: 470px !important;
  padding: 10px;
  overflow: auto;
  display: grid;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.54), rgba(244, 236, 226, 0.64));
}

.planner-current-preview-clickmap .planner-cabinet {
  margin: 0 auto;
}

.planner-current-preview-3d-empty {
  display: grid;
  place-items: center;
  height: 100%;
  padding: 24px;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
}

.planner-sheet-card {
  padding: 10px 14px;
  border-radius: 20px;
}

.planner-sheet-card .table-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 8px;
}

.planner-sheet-card .table-card-title-row h3 {
  margin-bottom: 0;
}

.planner-sheet-card #plannerSheetMeta {
  margin: 0;
  max-width: 620px;
  font-size: 0.86rem;
  line-height: 1.35;
  text-align: right;
}

.planner-sheet-card .planner-compact-grid {
  gap: 8px 10px;
  align-items: end;
}

.planner-sheet-card .grid.four-cols {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.planner-sheet-card .field input {
  min-height: 38px;
  font-size: 0.92rem;
}

.planner-sheet-card .field span {
  font-size: 0.82rem;
  line-height: 1.2;
}

.planner-sheet-layout {
  margin-top: 10px;
}

.planner-feedback-note {
  margin: 18px 4px 0;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  align-items: center;
  font-size: 0.92rem;
  color: var(--muted);
}

.planner-feedback-note a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.planner-feedback-note a:hover {
  text-decoration: underline;
}

@media (max-width: 1080px) {
  .planner-type-strip-row {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .planner-type-strip-actions .ghost-button {
    width: 100%;
  }

  .planner-visual-stage-hybrid {
    grid-template-columns: 1fr;
  }

  .planner-current-preview-bridge {
    grid-template-columns: minmax(0, 1fr);
  }

  .planner-front-dock-head {
    flex-direction: column;
    align-items: start;
  }

  .planner-front-dock-head p {
    text-align: left;
  }

  .planner-front-dock-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .planner-front-dock-actions {
    grid-column: auto;
  }

  .planner-sidebar-lower-start {
    margin-top: 0;
  }

  .planner-sheet-card .table-card-header {
    display: grid;
  }

  .planner-sheet-card #plannerSheetMeta {
    text-align: left;
  }

  .planner-sheet-card .grid.four-cols {
    grid-template-columns: minmax(0, 1fr);
  }

  .planner-feedback-note {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .planner-current-preview-3d-head,
  .planner-current-preview-click-head {
    align-items: start;
    flex-direction: column;
    min-height: 0;
  }

  .planner-current-preview-3d-copy span,
  .planner-current-preview-click-head span {
    text-align: left;
  }

  .planner-cad2d-open {
    align-self: stretch;
    width: 100%;
  }
}
