/* SKB designer — kitchen, wardrobe and media wall.
   Paper control panel on the left, dark 3D stage on the right; on phones the stage sits on top.
   Uses the tokens from site.css (paper, ink, steel, line, night, glow, mono). */

.designer-page { --dz-head: 72px; --dz-pad: 26px; }

.dz {
  display: grid; grid-template-columns: minmax(330px, 400px) minmax(0, 1fr);
  height: calc(100vh - var(--dz-head)); height: calc(100dvh - var(--dz-head)); min-height: 560px;
  background: var(--paper); border-bottom: 1px solid var(--night-line);
}

/* ------------------------------------------------------------------ panel */
.dz-panel {
  min-width: 0; overflow-y: auto; overscroll-behavior: contain; background: var(--paper);
  border-right: 1px solid var(--line); scrollbar-width: thin; scrollbar-color: rgba(23,24,26,.25) transparent;
}

.dz-modes {
  position: sticky; top: 0; z-index: 4; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  background: var(--night); border-bottom: 1px solid var(--night-line);
}
.dz-modes button {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 8px;
  border: 0; background: transparent; color: rgba(255,255,255,.6); cursor: pointer;
  font: 600 14px/1.1 var(--sans); font-stretch: 105%; letter-spacing: .005em; transition: color .2s, background .2s;
}
.dz-modes button + button { border-left: 1px solid var(--night-line); }
.dz-modes button svg { width: 18px; height: 18px; flex: none; opacity: .8; }
.dz-modes button:hover { color: #fff; }
.dz-modes button[aria-selected="true"] { color: #fff; background: var(--night-2); }
.dz-modes button[aria-selected="true"] svg { color: var(--glow); opacity: 1; }
.dz-modes button[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--glow); }
.dz-modes button:focus-visible { outline: 2px solid var(--glow); outline-offset: -3px; }

.dz-head { padding: 26px var(--dz-pad) 22px; border-bottom: 1px solid var(--line); }
.dz-kicker { color: var(--steel); margin: 0 0 10px; display: flex; align-items: center; gap: 10px; }
.dz-kicker::before { content: ""; width: 22px; height: 1px; background: currentColor; }
.dz-head h1 { font-size: clamp(26px, 2.2vw, 32px); font-stretch: 112%; font-weight: 620; letter-spacing: -.02em; line-height: 1.02; margin: 0 0 12px; }
.dz-sub { font-size: 14.5px; line-height: 1.55; color: var(--ink-2); margin: 0; }

/* accordion steps */
.dz-steps { list-style: none; margin: 0; padding: 0 0 40px; }
.dz-step { border-bottom: 1px solid var(--line); }
.dz-step-h {
  width: 100%; display: grid; grid-template-columns: 30px minmax(0, auto) minmax(0, 1fr) 14px; align-items: baseline; gap: 10px;
  padding: 17px var(--dz-pad); border: 0; background: transparent; text-align: left; cursor: pointer; transition: background .15s;
}
.dz-step-h::after { content: ""; width: 9px; height: 9px; justify-self: end; align-self: center; border-right: 1.5px solid var(--steel); border-bottom: 1.5px solid var(--steel); transform: translateY(-3px) rotate(45deg); transition: transform .2s var(--ease); }
.dz-step.open .dz-step-h::after { transform: translateY(2px) rotate(-135deg); border-color: var(--ink); }
.dz-step-h:hover { background: rgba(23,24,26,.03); }
.dz-step-h:focus-visible { outline: 2px solid var(--glow); outline-offset: -2px; }
.dz-step-h .n { color: var(--steel); font-size: 11.5px; }
.dz-step.open .dz-step-h .n { color: #a8620e; }
.dz-step-h .t { font-weight: 600; font-size: 16px; white-space: nowrap; }
.dz-step-h .v { font-size: 13px; color: var(--steel); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dz-step:not(.open) .dz-step-b { display: none; }
.dz-step-b { padding: 4px var(--dz-pad) 26px; }
.dz-next { width: 100%; margin-top: 24px; }

.hintp { font-size: 14px; line-height: 1.5; color: var(--ink-2); margin: 0 0 16px; }
.hintp a { font-weight: 600; }
.lbl { color: var(--steel); margin: 22px 0 10px; font-size: 11.5px; }
.dz-step-b > .lbl:first-child { margin-top: 0; }

/* hide native radios / checkboxes but keep them focusable */
.card input, .chipr input, .sw input, .tg input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }

/* radio cards (layout, door style, door type, media style) */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.card {
  position: relative; display: flex; flex-direction: column; gap: 3px; padding: 12px 12px 13px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.card:hover { border-color: rgba(23,24,26,.4); }
.card svg { width: 64px; height: auto; color: var(--ink-2); margin-bottom: 8px; }
.card b { font-size: 14.5px; font-weight: 600; line-height: 1.25; }
.card small { font-size: 12.5px; line-height: 1.35; color: var(--steel); }
.card small.rg { font-size: 10.5px; margin-top: 4px; color: var(--ink-2); }
.card.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.card.on svg { color: var(--ink); }
.card.on::after { content: ""; position: absolute; top: 10px; right: 10px; width: 8px; height: 8px; background: var(--glow); }
.card:has(input:focus-visible), .chipr:has(input:focus-visible) span, .sw:has(input:focus-visible) .dot, .tg:has(input:focus-visible) .tg-ui { outline: 2px solid var(--glow); outline-offset: 2px; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chipr { position: relative; cursor: pointer; }
.chipr span { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 12px; font-size: 14px; line-height: 1.25; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); transition: background .15s, color .15s, border-color .15s; }
.chipr:hover span { border-color: rgba(23,24,26,.4); }
.chipr.on span { background: var(--ink); border-color: var(--ink); color: #fff; }

/* TV size chips draw the real screen proportion */
.tvp { display: inline-flex; align-items: flex-end; gap: 7px; font-family: var(--mono); font-size: 12.5px; }
.tvp i { display: inline-block; border: 1.5px solid currentColor; background: rgba(23,24,26,.08); }
.chipr.on .tvp i { background: rgba(255,255,255,.18); }

/* swatches */
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); gap: 12px 8px; }
.sw { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; text-align: center; min-width: 0; }
.sw .dot { width: 100%; aspect-ratio: 4 / 3; border: 1px solid rgba(23,24,26,.18); border-radius: var(--radius); box-shadow: inset 0 -8px 14px -10px rgba(0,0,0,.25); transition: transform .15s; }
.sw:hover .dot { transform: translateY(-1px); }
.sw .nm { font-size: 11.5px; line-height: 1.2; color: var(--steel); overflow-wrap: anywhere; }
.sw.on .dot { outline: 2px solid var(--ink); outline-offset: 2px; }
.sw.on .nm { color: var(--ink); font-weight: 600; }

/* toggle switch */
.tgs { display: grid; gap: 12px; margin: 4px 0; }
.tg { position: relative; display: flex; align-items: center; gap: 12px; font-size: 14.5px; line-height: 1.35; cursor: pointer; margin: 14px 0 0; }
.tgs .tg { margin: 0; }
.tg-ui { position: relative; flex: none; width: 40px; height: 22px; background: var(--paper-2); border: 1px solid rgba(23,24,26,.3); border-radius: var(--radius); transition: background .2s, border-color .2s; }
.tg-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; background: var(--ink-2); border-radius: 1px; transition: transform .2s var(--ease), background .2s; }
.tg input:checked + .tg-ui { background: var(--ink); border-color: var(--ink); }
.tg input:checked + .tg-ui::after { transform: translateX(18px); background: var(--glow); }

/* number + stepper + slider */
.numf { margin: 0 0 18px; }
.numf > label { display: block; color: var(--steel); margin-bottom: 7px; font-size: 11.5px; }
.numrow { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto 44px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.numrow:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(240,164,58,.3); }
.numrow button { height: 44px; border: 0; background: transparent; font-size: 20px; line-height: 1; cursor: pointer; color: var(--ink-2); }
.numrow button:hover { background: rgba(23,24,26,.05); color: var(--ink); }
.numrow button:first-child { border-right: 1px solid var(--line); }
.numrow button:last-child { border-left: 1px solid var(--line); }
.numrow input { width: 100%; min-width: 0; border: 0; background: transparent; text-align: right; padding: 0 6px; font: 600 18px/1 var(--mono); color: var(--ink); -moz-appearance: textfield; appearance: textfield; }
.numrow input:focus { outline: none; }
.numrow input::-webkit-outer-spin-button, .numrow input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.numrow .unit { color: var(--steel); padding-right: 10px; font-size: 11.5px; }
.numf input[type=range] { width: 100%; margin: 12px 0 0; accent-color: var(--ink); height: 18px; cursor: pointer; }

/* wardrobe interior picker */
.isecs { display: flex; gap: 4px; padding: 4px; background: var(--card); border: 1px solid var(--ink); border-radius: var(--radius); }
.isec {
  flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px 7px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 1px; cursor: pointer; color: var(--ink-2); transition: border-color .15s, background .15s;
}
.isec:hover { border-color: var(--ink); color: var(--ink); background: #fff; }
.isec:focus-visible { outline: 2px solid var(--glow); outline-offset: 1px; }
.isec svg { width: 100%; max-width: 38px; height: auto; }
.isec span { font-size: 9.5px; letter-spacing: .02em; line-height: 1.15; text-align: center; overflow-wrap: anywhere; }
.isec small { font-size: 9.5px; color: var(--steel); text-transform: none; letter-spacing: 0; }
.isec-reset { width: 100%; min-height: 40px; margin-top: 12px; font-size: 14px; }

.share { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.share .btn { flex: 1 1 150px; min-height: 42px; font-size: 14px; padding: 0 12px; }

/* enquiry form inside the narrow panel */
.dz-form { margin-top: 4px; }
.dz-form .form-grid { grid-template-columns: 1fr; gap: 14px; }
.dz-form .field label { margin-bottom: 6px; font-size: 11.5px; }
.dz-form .field input, .dz-form .field select, .dz-form .field textarea { padding: 11px 12px; }
.dz-form .field textarea { min-height: 92px; }
.dz-form .form-msg { margin: 16px 0 0; font-size: 14.5px; }
.dz-send { width: 100%; margin-top: 18px; white-space: normal; }

/* ------------------------------------------------------------------ stage */
.dz-stage {
  position: relative; min-width: 0; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr);
  background: var(--night); color: #fff;
}
.dz-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--night-line); background: var(--night); z-index: 2; }
.seg { display: inline-flex; border: 1px solid var(--night-line); border-radius: var(--radius); }
.seg[hidden] { display: none; }
.seg button, .tb-btn {
  border: 0; background: transparent; color: rgba(255,255,255,.66); padding: 0 12px; min-height: 34px; cursor: pointer;
  font: 500 13px/1 var(--sans); letter-spacing: .01em; white-space: nowrap; transition: background .15s, color .15s;
}
.seg button + button { border-left: 1px solid var(--night-line); }
.seg button:hover, .tb-btn:hover { color: #fff; background: rgba(255,255,255,.05); }
.seg button[aria-pressed="true"] { color: #fff; background: rgba(255,255,255,.13); box-shadow: inset 0 -2px 0 var(--glow); }
.seg button:focus-visible, .tb-btn:focus-visible { outline: 2px solid var(--glow); outline-offset: -2px; }
.tb-btn { border: 1px solid var(--night-line); border-radius: var(--radius); }
.tb-btn[hidden] { display: none; }
.tb-open { color: #fff; border-color: rgba(240,164,58,.55); }
.tb-open[aria-pressed="true"] { background: var(--glow); color: #1b1408; border-color: var(--glow); }
.tb-btn[data-snap] { margin-left: auto; }

.dz-canvas, .dz-plan, .dz-warn, .dz-hint { grid-row: 2; grid-column: 1; }
.dz-canvas { position: relative; min-height: 0; overflow: hidden; touch-action: none; }
.dz-canvas canvas { display: block; width: 100%; height: 100%; cursor: grab; }
.dz-canvas canvas:active { cursor: grabbing; }
.dz-canvas[hidden], .dz-plan[hidden], .dz-warn[hidden], .dz-hint[hidden] { display: none; }
.dz-loading { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.55); text-align: center; padding: 20px; }

.dz-plan { min-height: 0; overflow: auto; background: var(--paper); color: var(--ink); padding: clamp(12px, 3vw, 32px); display: flex; flex-direction: column; gap: 12px; }
.plan-fig { flex: 1 1 auto; min-height: 0; display: grid; place-items: center; }
.plan-fig svg { width: 100%; height: 100%; max-height: 100%; }
.plan-warn { flex: none; align-self: flex-start; max-width: 640px; background: var(--card); border: 1px solid var(--line); border-left: 2px solid var(--glow); padding: 8px 12px; font-size: 13.5px; line-height: 1.45; }
.plan-warn p { margin: 0; }
.plan-warn p + p { margin-top: 4px; }

.dz-warn {
  align-self: start; justify-self: start; z-index: 3; margin: 14px; max-width: min(440px, calc(100% - 28px));
  background: rgba(18,19,21,.88); backdrop-filter: blur(6px); border: 1px solid var(--night-line); border-left: 2px solid var(--glow);
  padding: 10px 14px; font-size: 13.5px; line-height: 1.45; color: rgba(255,255,255,.9);
}
.dz-warn p { margin: 0; }
.dz-warn p + p { margin-top: 6px; }
.dz-hint { align-self: end; justify-self: center; z-index: 2; margin-bottom: 12px; padding: 6px 12px; pointer-events: none; color: rgba(255,255,255,.62); background: rgba(18,19,21,.55); font-size: 11px; border-radius: var(--radius); }

.dz-summary { display: flex; align-items: stretch; border-top: 1px solid var(--night-line); background: var(--night); overflow-x: auto; scrollbar-width: none; }
.dz-summary::-webkit-scrollbar { display: none; }
.sm { flex: none; display: flex; flex-direction: column; justify-content: center; gap: 3px; padding: 12px 22px; border-right: 1px solid var(--night-line); }
.sm b { font-size: 20px; font-weight: 600; font-stretch: 112%; letter-spacing: -.01em; line-height: 1; white-space: nowrap; }
.sm span { font-family: var(--mono); font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: rgba(255,255,255,.5); white-space: nowrap; }
.sm-btn { flex: none; margin-left: auto; padding: 0 22px; border: 0; border-left: 1px solid var(--night-line); background: transparent; color: var(--glow); cursor: pointer; white-space: nowrap; }
.sm-btn:hover { background: rgba(240,164,58,.1); }
.sm-btn:focus-visible { outline: 2px solid var(--glow); outline-offset: -2px; }

/* ------------------------------------------------------------------ schedule dialog */
dialog.sched-dlg { width: min(780px, calc(100% - 24px)); max-height: min(86vh, 900px); padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); color: var(--ink); box-shadow: 0 30px 80px rgba(0,0,0,.35); }
dialog.sched-dlg::backdrop { background: rgba(18,19,21,.62); backdrop-filter: blur(2px); }
.dlg-h { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 22px; background: var(--paper); border-bottom: 1px solid var(--line); }
.dlg-h h2 { font-size: 21px; font-stretch: 110%; }
.dlg-h button { width: 38px; height: 38px; flex: none; border: 1px solid var(--line); background: var(--card); font-size: 22px; line-height: 1; cursor: pointer; border-radius: var(--radius); }
.dlg-h button:hover { border-color: var(--ink); }
dialog.sched-dlg .hintp { padding: 16px 22px 0; }
table.sched { width: 100%; border-collapse: collapse; font-size: 14px; margin: 6px 0 18px; }
.sched th { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; color: var(--steel); text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--ink); }
.sched td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.sched th:first-child, .sched td:first-child { padding-left: 22px; }
.sched th:last-child, .sched td:last-child { padding-right: 22px; }
.sched td.mono { font-size: 12.5px; text-transform: none; white-space: nowrap; }
.sched tbody tr:hover { background: rgba(23,24,26,.03); }

/* ------------------------------------------------------------------ phones & tablets */
@media (max-width: 899.98px) {
  .designer-page { --dz-pad: 18px; }
  .dz { display: flex; flex-direction: column; height: auto; min-height: 0; }
  .dz-stage { order: -1; position: sticky; top: var(--dz-head); z-index: 20; height: 55vh; height: 55svh; min-height: 300px; box-shadow: 0 10px 24px -14px rgba(0,0,0,.6); }
  .dz-panel { overflow: visible; border-right: 0; }
  /* keep focused fields and opened steps clear of the sticky preview */
  .dz-step, .dz-panel :is(input, select, textarea, button, label) { scroll-margin-top: calc(var(--dz-head) + max(55svh, 300px) + 12px); scroll-margin-bottom: 16px; }
  .dz-modes { position: static; }
  .dz-modes button { min-height: 50px; font-size: 13.5px; }
  .dz-toolbar { flex-wrap: nowrap; overflow-x: auto; padding: 8px 10px; gap: 6px; scrollbar-width: none; }
  .dz-toolbar::-webkit-scrollbar { display: none; }
  .seg, .tb-btn { flex: none; }
  .seg button, .tb-btn { padding: 0 10px; min-height: 32px; font-size: 12.5px; }
  .tb-btn[data-snap] { margin-left: 0; }
  /* most-used controls first on a narrow toolbar */
  .dz-toolbar > .seg:first-child { order: 0; }
  .tb-open { order: 1; }
  .seg[aria-label="Lighting"] { order: 2; }
  .seg[data-cams] { order: 3; }
  .tb-btn[data-snap] { order: 4; }
  .dz-hint { display: none; }
  .dz-warn { margin: 8px; font-size: 12.5px; padding: 8px 10px; }
  .sm { padding: 8px 14px; }
  .sm b { font-size: 15.5px; }
  .sm span { font-size: 9.5px; }
  .sm-btn { padding: 0 14px; font-size: 11px; }
  .dz-head { padding-top: 22px; }
  .dz-step-h { padding-top: 15px; padding-bottom: 15px; }
}
@media (max-width: 380px) {
  .dz-modes button { flex-direction: column; gap: 4px; font-size: 12.5px; padding: 6px 4px; }
  .dz-step-h { grid-template-columns: 24px minmax(0, auto) minmax(0, 1fr) 12px; gap: 8px; }
  .cards { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) { .dz-step-h::after, .tg-ui::after, .sw .dot { transition: none; } }

/* ================================================================== free plan (kitchen) */
/* quick design / free plan switch under the tabs */
.dz-pick { padding: 14px var(--dz-pad) 0; background: var(--paper); }
.dz-pick[hidden] { display: none; }
.dz-sub-seg { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.dz-sub-seg button { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 10px 12px 11px; border: 0; background: transparent; text-align: left; cursor: pointer; color: var(--ink-2); transition: background .15s, color .15s; }
.dz-sub-seg button + button { border-left: 1px solid var(--line); }
.dz-sub-seg button b { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.dz-sub-seg button small { font-size: 12px; line-height: 1.3; color: var(--steel); }
.dz-sub-seg button:hover { background: rgba(23,24,26,.035); }
.dz-sub-seg button[aria-checked="true"] { background: var(--ink); }
.dz-sub-seg button[aria-checked="true"] b { color: #fff; }
.dz-sub-seg button[aria-checked="true"] small { color: rgba(255,255,255,.62); }
.dz-sub-seg button[aria-checked="true"] b::before { content: ""; display: inline-block; width: 7px; height: 7px; background: var(--glow); margin: 0 7px 1px 0; }
.dz-sub-seg button:focus-visible { outline: 2px solid var(--glow); outline-offset: -2px; }
.dz-sub-x { margin: 10px 0 0; font-size: 13px; color: var(--steel); }
.linkbtn { border: 0; background: none; padding: 0; font: inherit; font-weight: 600; color: var(--ink); text-decoration: underline; text-decoration-color: var(--glow); text-underline-offset: 3px; cursor: pointer; }
.linkbtn:hover { color: #a8620e; }
.is-free .dz-head { padding-bottom: 16px; }
.is-free .dz-sub-x { display: none; }

/* stage layout: plan | splitter | 3D */
.dz-stage > .dz-toolbar, .dz-stage > .dz-summary { grid-column: 1 / -1; }
.dz.is-free.is-split .dz-stage { grid-template-columns: minmax(0, var(--fp-split, 50%)) 8px minmax(0, 1fr); }
.fp-pane { grid-row: 2; grid-column: 1 / -1; position: relative; min-width: 0; min-height: 0; overflow: hidden; background: var(--paper); color: var(--ink); }
.fp-pane[hidden], .fp-split[hidden], .fp-insp[hidden], .fp-warns[hidden], .fp-3dhint[hidden], .fp-ghost[hidden], .fp-empty[hidden], .fp-coach[hidden] { display: none; }
.dz.is-free.is-split .fp-pane { grid-column: 1; }
.dz.is-free.is-split .dz-canvas { grid-column: 3; }
.dz.is-free.is-3d .dz-canvas { grid-column: 1 / -1; }
.fp-split { grid-row: 2; grid-column: 2; position: relative; cursor: col-resize; background: var(--night); border-left: 1px solid var(--night-line); border-right: 1px solid var(--night-line); touch-action: none; z-index: 3; }
.fp-split::after { content: ""; position: absolute; left: 2px; right: 2px; top: 50%; height: 44px; margin-top: -22px; background: repeating-linear-gradient(0deg, rgba(255,255,255,.4) 0 2px, transparent 2px 6px); border-radius: 1px; }
.fp-split:hover, .fp-split:focus-visible { background: #24262a; outline: none; }
.fp-split:focus-visible::after { background: repeating-linear-gradient(0deg, var(--glow) 0 2px, transparent 2px 6px); }

.fp-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
.fp-svg:active { cursor: grabbing; }
.fp-svg:focus-visible { outline: 2px solid var(--glow); outline-offset: -3px; }
.fp-svg .it { cursor: move; }
.fp-svg .it:hover > :first-child { stroke: #a8620e; }
.fp-svg .op { cursor: ew-resize; }
.fp-svg .op-h { cursor: col-resize; }
.fp-svg .wall-hit { cursor: pointer; }
.fp-svg .wall-hit:hover { stroke: rgba(240,164,58,.55); stroke-opacity: 1; }
.fp-svg .sel-fill { fill: rgba(240,164,58,.14); }

/* plan tools (undo / redo / zoom) */
.fp-tools { position: absolute; top: 12px; left: 12px; z-index: 3; display: flex; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 6px 18px -10px rgba(0,0,0,.35); }
.fp-tools button { width: 38px; height: 36px; display: grid; place-items: center; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; }
.fp-tools button + button { border-left: 1px solid var(--line); }
.fp-tools button svg { width: 18px; height: 18px; }
.fp-tools button:hover:not(:disabled) { background: rgba(23,24,26,.05); color: var(--ink); }
.fp-tools button:disabled { color: rgba(23,24,26,.25); cursor: default; }
.fp-tools button:focus-visible { outline: 2px solid var(--glow); outline-offset: -2px; }
.fp-tools .sep { width: 8px; align-self: stretch; background: var(--paper-2); border-left: 1px solid var(--line); }
.fp-tools .sep + button { border-left: 1px solid var(--line); }

/* empty state + first-use coach */
.fp-empty { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2; width: min(380px, calc(100% - 32px)); padding: 22px 22px 20px; background: rgba(251,250,247,.96); border: 1px solid var(--line); border-top: 2px solid var(--glow); box-shadow: 0 18px 40px -22px rgba(0,0,0,.4); text-align: left; }
.fp-empty .mono { margin: 0 0 6px; color: var(--steel); font-size: 11px; }
.fp-empty h3 { margin: 0 0 8px; font-size: 21px; font-stretch: 110%; letter-spacing: -.01em; }
.fp-empty-d { margin: 0 0 16px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.fp-empty-b .btn { width: 100%; min-height: 42px; font-size: 14px; }
.fp-coach { grid-row: 2; grid-column: 1 / -1; align-self: end; justify-self: center; z-index: 6; margin-bottom: 18px; width: min(400px, calc(100% - 24px)); padding: 16px 18px 16px; background: rgba(18,19,21,.94); color: #fff; border-left: 2px solid var(--glow); box-shadow: 0 18px 40px -16px rgba(0,0,0,.6); backdrop-filter: blur(6px); }
.fp-coach ol { margin: 0 0 12px; padding: 0; list-style: none; counter-reset: c; display: grid; gap: 8px; font-size: 13.5px; line-height: 1.45; color: rgba(255,255,255,.82); }
.fp-coach li { counter-increment: c; }
.fp-coach li::before { content: counter(c, decimal-leading-zero); font-family: var(--mono); font-size: 11px; color: var(--glow); padding-top: 2px; }
.fp-coach li b { color: #fff; font-weight: 600; }
.fp-coach .btn { min-height: 36px; padding: 0 16px; font-size: 13.5px; }
.fp-coach li { display: block; padding-left: 26px; position: relative; }
.fp-coach li::before { position: absolute; left: 0; top: 0; }

/* inspector for the selected unit / opening */
.fp-insp { grid-row: 2; grid-column: 1 / -1; align-self: start; justify-self: end; z-index: 5; margin: 12px; width: min(318px, calc(100% - 24px)); background: var(--card); color: var(--ink); border: 1px solid var(--line); border-top: 2px solid var(--glow); border-radius: var(--radius); box-shadow: 0 18px 44px -18px rgba(0,0,0,.55); }
.fpi-h { display: grid; grid-template-columns: 46px minmax(0, 1fr) 34px; align-items: center; gap: 10px; padding: 10px 8px 10px 12px; border-bottom: 1px solid var(--line); }
.fpi-ic { width: 46px; height: 40px; display: grid; place-items: end center; color: var(--ink-2); }
.fpi-ic svg { width: 100%; height: 100%; }
.fpi-ic-op svg { width: 34px; height: 26px; }
.fpi-t { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fpi-t b { font-size: 14.5px; font-weight: 600; line-height: 1.2; }
.fpi-t small { font-family: var(--mono); font-size: 11px; color: var(--steel); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fpi-x { width: 32px; height: 32px; display: grid; place-items: center; border: 0; background: transparent; color: var(--steel); cursor: pointer; }
.fpi-x svg { width: 16px; height: 16px; }
.fpi-x:hover { color: var(--ink); background: rgba(23,24,26,.05); }
.fpi-fs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; padding: 12px 12px 4px; }
.fpi-f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fpi-f span { font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--steel); }
.fpi-f select, .fpi-f input { width: 100%; min-width: 0; height: 34px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; font: 500 13.5px/1 var(--mono); color: var(--ink); }
.fpi-f select:focus, .fpi-f input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(240,164,58,.3); }
.fpi-acts { display: flex; gap: 6px; padding: 10px 12px 12px; }
.fpi-acts button { flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; font: 500 13px/1 var(--sans); color: var(--ink); cursor: pointer; }
.fpi-acts button svg { width: 16px; height: 16px; flex: none; }
.fpi-acts button:hover { border-color: var(--ink); }
.fpi-acts button.danger { color: #b3261e; }
.fpi-acts button.danger:hover { border-color: #b3261e; background: #fff5f4; }
.fpi-acts button:focus-visible { outline: 2px solid var(--glow); outline-offset: 1px; }
/* wardrobe free plan: interior sections of the selected wardrobe */
.fpi-int { padding: 10px 12px 0; }
.fpi-int > p { margin: 0 0 6px; font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--steel); }
.fpi-int .isecs { padding: 3px; }
.fpi-int .isec { padding: 6px 2px 5px; }
.fpi-int .isec svg { max-width: 26px; }
.fp-cards + .fp-ex { margin-top: 12px; }
.fpi-bad { display: flex; gap: 8px; margin: 0; padding: 9px 12px 11px; border-top: 1px solid var(--line); font-size: 12.5px; line-height: 1.4; color: #a1262b; background: #fff6f5; }
.fpi-bad svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }

/* warnings list */
.fp-warns { grid-row: 2; grid-column: 1 / -1; align-self: end; justify-self: start; z-index: 4; margin: 12px; max-width: min(420px, calc(100% - 24px)); background: rgba(18,19,21,.92); color: #fff; border: 1px solid var(--night-line); border-left: 2px solid var(--glow); border-radius: var(--radius); backdrop-filter: blur(6px); box-shadow: 0 14px 34px -18px rgba(0,0,0,.6); }
.dz.is-free.is-split .fp-warns, .dz.is-free.is-split .fp-toast { grid-column: 1; }

.fp-warns.has-warn { border-left-color: #ff6b5e; }
.fpw-h { width: 100%; display: flex; align-items: center; gap: 9px; padding: 9px 12px; border: 0; background: transparent; color: #fff; font: 600 13px/1.2 var(--sans); text-align: left; cursor: pointer; }
.fpw-h svg { width: 17px; height: 17px; flex: none; color: var(--glow); }
.has-warn .fpw-h svg { color: #ff8a7e; }
.fpw-h span { flex: 1; }
.fpw-h i { width: 8px; height: 8px; border-right: 1.5px solid rgba(255,255,255,.6); border-bottom: 1.5px solid rgba(255,255,255,.6); transform: rotate(-135deg) translate(-2px, -2px); }
.fp-warns.open .fpw-h i { transform: rotate(45deg); }
.fpw-h:focus-visible { outline: 2px solid var(--glow); outline-offset: -2px; }
.fpw-l { list-style: none; margin: 0; padding: 0 0 6px; max-height: min(30vh, 220px); overflow-y: auto; border-top: 1px solid var(--night-line); scrollbar-width: thin; }
.fpw-l li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 6px 12px 6px 30px; position: relative; }
.fpw-l li::before { content: ""; position: absolute; left: 13px; top: 13px; width: 6px; height: 6px; background: #ff6b5e; }
.fpw-l li.info::before { background: var(--glow); border-radius: 50%; }
.fpw-m { flex: 1 1 200px; border: 0; background: none; padding: 0; text-align: left; font: 13px/1.45 var(--sans); color: rgba(255,255,255,.88); cursor: pointer; }
.fpw-m:hover { color: #fff; text-decoration: underline; text-decoration-color: rgba(240,164,58,.7); }
.fpw-fix { flex: none; min-height: 26px; padding: 0 9px; border: 1px solid rgba(240,164,58,.6); border-radius: var(--radius); background: transparent; color: var(--glow); font: 500 12px/1 var(--sans); cursor: pointer; }
.fpw-fix:hover { background: var(--glow); color: #1b1408; }
.fp-warns.ok { border-left-color: #6fbf73; }
.fpw-ok { display: flex; align-items: center; gap: 8px; margin: 0; padding: 8px 12px; font-size: 13px; color: rgba(255,255,255,.85); }
.fpw-ok svg { width: 16px; height: 16px; color: #7fd083; }

.fp-toast { grid-row: 2; grid-column: 1 / -1; align-self: start; justify-self: center; z-index: 6; margin-top: 60px; padding: 8px 14px; background: var(--ink); color: #fff; font-size: 11.5px; border-radius: var(--radius); border-left: 2px solid var(--glow); box-shadow: 0 10px 26px -12px rgba(0,0,0,.6); opacity: 0; transform: translateY(-6px); transition: opacity .2s, transform .2s; pointer-events: none; }
.fp-toast.on { opacity: 1; transform: none; }
.fp-3dhint { grid-row: 2; grid-column: 1 / -1; align-self: end; justify-self: center; z-index: 2; margin-bottom: 12px; padding: 6px 12px; pointer-events: none; color: rgba(255,255,255,.62); background: rgba(18,19,21,.55); font-size: 11px; border-radius: var(--radius); }
.dz.is-free.is-split .fp-3dhint, .dz.is-free.is-split .fp-coach { grid-column: 3; }
.fp-coaching .fp-3dhint { display: none; }
.dz.is-free .dz-hint { display: none; }

/* drag ghost */
.fp-ghost { position: fixed; left: 0; top: 0; z-index: 200; pointer-events: none; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 104px; padding: 8px; margin: -46px 0 0 -52px; background: var(--card); border: 1px solid var(--ink); border-radius: var(--radius); box-shadow: 0 16px 34px -12px rgba(0,0,0,.45); color: var(--ink); transition: opacity .12s; }
.fp-ghost svg { width: 64px; height: 50px; }
.fp-ghost span { font-size: 10.5px; text-align: center; line-height: 1.2; }
.fp-ghost.over { opacity: 0; }
body.fp-dragging, body.fp-dragging * { cursor: grabbing !important; user-select: none; -webkit-user-select: none; }

/* ---------------------------------------------------------------- panel: room + catalogue */
.fp-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; margin-top: 14px; }
.fp-two .numrow { grid-template-columns: 34px minmax(0, 1fr) auto 34px; }
.fp-two .numrow input { font-size: 15px; }
.fp-two-b { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.fp-two-b .btn { min-height: 40px; font-size: 13.5px; padding: 0 10px; gap: 6px; }
.fp-two-b .btn svg { width: 15px; height: 15px; flex: none; }
.fp-small { font-size: 12.5px; color: var(--steel); margin: 12px 0 0; }
.fpo-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.fpo-list li { display: flex; align-items: stretch; }
.fpo-list li + li { border-top: 1px solid var(--line); }
.fpo-row { flex: 1; display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px; border: 0; background: transparent; text-align: left; font: 14px/1.3 var(--sans); color: var(--ink); cursor: pointer; }
.fpo-row .mono { font-size: 10.5px; color: var(--steel); width: 38px; }
.fpo-row.on { background: rgba(240,164,58,.12); box-shadow: inset 2px 0 0 var(--glow); }
.fpo-row:hover { background: rgba(23,24,26,.035); }
.fpo-x { width: 40px; border: 0; border-left: 1px solid var(--line); background: transparent; color: var(--steel); cursor: pointer; display: grid; place-items: center; }
.fpo-x svg { width: 14px; height: 14px; }
.fpo-x:hover { color: #b3261e; }
.fpo-none { padding: 10px; font-size: 13.5px; color: var(--steel); }

.fp-addto { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 12px; }
.fp-addto > .mono { font-size: 11px; color: var(--steel); }
.fp-walls { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.fp-walls button { width: 32px; height: 30px; border: 0; background: transparent; font: 600 12.5px/1 var(--mono); color: var(--ink-2); cursor: pointer; }
.fp-walls button + button { border-left: 1px solid var(--line); }
.fp-walls button.on { background: var(--ink); color: var(--glow); }
.fp-walls button:focus-visible { outline: 2px solid var(--glow); outline-offset: -2px; }
.fp-search { position: relative; margin-bottom: 10px; }
.fp-search svg { position: absolute; left: 11px; top: 50%; width: 16px; height: 16px; margin-top: -8px; color: var(--steel); pointer-events: none; }
.fp-search input { width: 100%; height: 40px; padding: 0 12px 0 34px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); font: 14px/1 var(--sans); color: var(--ink); }
.fp-search input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(240,164,58,.3); }
.fp-cats { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; }
.fp-cats::-webkit-scrollbar { display: none; }
.fp-cat { flex: none; min-height: 32px; padding: 0 11px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); font: 500 13px/1 var(--sans); color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.fp-cat:hover { border-color: rgba(23,24,26,.4); }
.fp-cat.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.fp-cat:focus-visible { outline: 2px solid var(--glow); outline-offset: 1px; }
.fp-howto { margin: 4px 0 12px; }
.fp-grp + .fp-grp { margin-top: 18px; }
.fp-grp h4 { margin: 0 0 8px; font-size: 11px; font-weight: 500; color: var(--steel); letter-spacing: .05em; text-transform: uppercase; }
.fp-grp[hidden], .fp-card[hidden], .fp-noresult[hidden] { display: none; }
.fp-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.fp-card { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .15s, box-shadow .15s, transform .15s; }
.fp-card:hover { border-color: rgba(23,24,26,.45); box-shadow: 0 8px 18px -14px rgba(0,0,0,.45); }
.fp-add { display: flex; flex-direction: column; align-items: stretch; gap: 6px; padding: 10px 8px 6px; border: 0; background: transparent; cursor: grab; text-align: center; color: var(--ink-2); touch-action: pan-y; -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
.fp-add:active { cursor: grabbing; }
.fp-add.dragging { opacity: .45; }
.fp-add:focus-visible { outline: 2px solid var(--glow); outline-offset: -2px; }
.fp-ic { height: 56px; display: grid; place-items: end center; color: var(--ink-2); }
.fp-ic svg { width: 100%; height: 56px; }
.fp-card:hover .fp-ic { color: var(--ink); }
.fp-nm { font-size: 12.5px; font-weight: 600; line-height: 1.25; color: var(--ink); min-height: 2.5em; display: flex; align-items: center; justify-content: center; }
.fp-w { margin: 0 8px 8px; height: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; font: 500 12px/1 var(--mono); color: var(--ink); padding: 0 4px; text-align: center; text-align-last: center; }
.fp-w:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(240,164,58,.3); }
.fp-w1 { display: grid; place-items: center; border-color: transparent; background: transparent; color: var(--steel); }
.fp-noresult { margin: 8px 0 0; }

/* schedule dialog category rows */
.sched tr.sch-cat th { padding-top: 16px; border-bottom: 1px solid var(--line); color: var(--ink); }
table.sched + table.sched { margin-top: 10px; }

/* keep the bug-report button clear of the designer's controls */
.dz-steps { padding-bottom: 84px; }
@media (min-width: 900px) {
  .designer-page .bb-fab { left: auto; right: 18px; bottom: 84px; }
}

/* ---------------------------------------------------------------- free plan on phones / tablets */
@media (max-width: 899.98px) {
  .dz-pick { padding-top: 12px; }
  .dz.is-free .dz-stage { height: 62vh; height: 62svh; }
  .dz.is-free .dz-step, .dz.is-free .dz-panel :is(input, select, textarea, button, label) { scroll-margin-top: calc(var(--dz-head) + max(62svh, 300px) + 12px); }
  [data-viewmode="split"] { display: none; }
  .fp-tools { top: 8px; left: 8px; }
  .fp-tools button { width: 34px; height: 32px; }
  .fp-insp { align-self: end; justify-self: stretch; width: auto; margin: 6px; }
  .fpi-h { padding: 4px 4px 4px 10px; grid-template-columns: 30px minmax(0, 1fr) 30px; gap: 8px; border-bottom: 0; }
  .fpi-ic { width: 30px; height: 26px; }
  .fpi-t b { font-size: 13.5px; }
  .fpi-t small { font-size: 10.5px; }
  .fpi-body { display: flex; align-items: flex-end; gap: 6px; padding: 0 8px 8px; }
  .fpi-fs { display: block; flex: 1 1 auto; min-width: 0; padding: 0; }
  .fpi-fs .fpi-f:not(:first-child) { display: none; }
  .fpi-f span { display: none; }
  .fpi-f select, .fpi-f input { height: 36px; }
  .fpi-acts { flex: none; padding: 0; gap: 4px; }
  .fpi-acts button { width: 42px; min-height: 36px; padding: 0; flex: none; }
  .fpi-acts button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .fpi-bad { display: none; }
  .fpi-int { padding: 0 8px 6px; }
  .fpi-int > p { display: none; }
  .fpi-int .isec { flex-direction: row; justify-content: center; gap: 6px; padding: 4px 2px; }
  .fpi-int .isec svg { max-width: 16px; }
  .fpi-int .isec small { display: none; }
  .dz-stage:has(.fp-insp:not([hidden])) .fp-warns { display: none; }
  .fp-warns { margin: 6px; max-width: calc(100% - 12px); }
  .fpw-h { padding: 7px 10px; font-size: 12.5px; }
  .fp-coach { bottom: 10px; padding: 12px 14px; }
  .fp-coach ol { font-size: 12.5px; gap: 5px; }
  .fp-empty { padding: 16px; top: 54%; }
  .fp-empty h3 { font-size: 18px; }
  .fp-empty-d { font-size: 13px; margin-bottom: 12px; }
  .fp-cards { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  .fp-cats { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(var(--dz-pad) * -1) 6px; padding: 0 var(--dz-pad) 4px; scrollbar-width: none; }
  .fp-cats::-webkit-scrollbar { display: none; }
  .fp-toast { margin-top: 52px; }
}
@media (prefers-reduced-motion: reduce) { .fp-toast, .fp-card { transition: none; } }
@media (max-width: 1080px) { .designer-page .bb-fab { top: 13px; bottom: auto; right: 72px; left: auto; width: 44px; height: 44px; z-index: 60; transform: none !important; opacity: 1 !important; pointer-events: auto !important; } }
