.tp {
  --tp-ink: #1b303e;
  --tp-muted: #44606d;
  --tp-line: #d9e4ec;
  color: var(--tp-ink);
}
.tp h3 {
  margin: 0 0 5px;
  color: var(--tp-ink);
  font-size: 14px;
  font-weight: 750;
}
.tp-studio-heading,.tp-workbench-head,.tp-ceramic-head {
  display:flex;align-items:flex-start;justify-content:space-between;flex-wrap:wrap;gap:8px;
}
.tp-studio-heading{align-items:center;margin-bottom:9px}
.mc .tp-studio-heading h2{font-size:19px;margin-bottom:0}
.tp-mode,.tp-edit-tools,.tp-edit-controls{display:flex;align-items:center;flex-wrap:wrap;gap:5px}
.tp-mode{padding:4px;border-radius:9px;background:#e8eff5}
.mc :is(.tp-mode,.tp-edit-tools) button {
  min-height:39px;padding:6px 9px;border:1px solid #c4d5e1;border-radius:6px;background:#fff;color:#24475e;
  font:inherit;font-size:12px;font-weight:700;cursor:pointer;
}
.mc .tp-mode button{border-color:transparent;background:transparent}
.mc :is(.tp-mode,.tp-edit-tools) button[aria-pressed=true]{border-color:#254e70;background:#254e70;color:#fff}
.tp-workbench{margin:8px 0 13px;padding:10px;border:1px solid #c8d9e4;border-radius:10px;background:#f4f8fc}
.tp-workbench,.tp-drawing{scroll-margin-top:85px}
@media(min-width:900px){
  .mc-plan-active .mc-layout{grid-template-columns:minmax(0,1fr) minmax(250px,310px)}
  .mc-plan-active .mc-results{top:88px;max-height:calc(100dvh - 104px);overflow:auto}
}
.mc-plan-active .mc-results:has(.mc-compact-result){padding:11px 12px}
.mc-plan-active .mc-compact-result {
  grid-template-columns:minmax(0,1fr) auto;
  align-items:baseline;
  gap:3px 8px;
  padding:8px 10px;
}
.mc-plan-active .mc-compact-result strong{font-size:clamp(22px,4vw,28px)}
.mc-plan-active .mc-compact-result small{grid-column:1/-1}
.mc .mc-main-breakdown{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:4px;
  margin:6px 0 3px;
}
.mc .mc-main-breakdown div{
  display:grid;
  align-content:start;
  justify-content:stretch;
  gap:1px;
  min-width:0;
  padding:4px 3px;
  border:0;
  line-height:1.25;
}
.mc .mc-main-breakdown dt{font-size:11px;word-break:keep-all}
.mc .mc-main-breakdown dd{text-align:left;font-size:14px}
.mc-result-details{margin:0 0 7px;color:var(--mc-text);font-size:12px}
.mc-result-details summary{padding:6px 0;cursor:pointer;font-weight:700}
.mc .mc-result-details p{line-height:1.4;word-break:keep-all}
.tp-workbench-head{margin-bottom:6px}
.te-pager{display:flex;align-items:center;flex-wrap:wrap;gap:5px;margin:0 0 7px}
.te-pager select,.tp-edit-inspector select{width:100%;min-height:37px;padding:4px 7px;border:1px solid #b7ccd9;border-radius:6px;background:#fff;color:#264760;font:inherit}
.te-wall-page-label{min-width:105px;max-width:100%}
.te-page-count{font-size:12px;color:#466377;white-space:nowrap}
.te-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.mc .te-pager [data-te-page][aria-pressed=true]{border-color:#254e70;background:#254e70;color:#fff}
.mc .te-free{width:max-content;max-width:100%;gap:6px;margin:5px 0 6px;padding:3px 8px;border:1px solid #bcd2e2;border-radius:6px;background:#fff;color:#284a64}
.te-free small{color:#597384;font-weight:500}
.tp-drawing[data-docked]{border-top:0;padding:4px 0 0}
.tp-drawing[data-docked] [data-tp-primary-surface]{display:none}
.tp-line-match{display:flex;align-items:center;flex-wrap:wrap;gap:4px;min-width:0}
.tp-line-match small{color:#375d75;font-size:11px;word-break:keep-all}
.mc .tp-line-match button{min-height:32px;padding:4px 7px}
.mc .tp-line-match button[aria-pressed=true]{color:#79422b;background:#fbf0e7;border-color:#ddc0a9}
.mc .tp-quick-start[aria-pressed=true]{background:#e4f2f0;border-color:#328479}
.te-wall-offsets{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(215px,100%),1fr));gap:4px;margin:6px 0}
.te-wall-offsets small{display:flex;flex-wrap:wrap;align-items:center;gap:2px 6px;padding:5px 6px;border-radius:5px;background:#eaf2f8;color:#2a4e67;font-size:11px}
.te-wall-offsets small span{color:#496275;white-space:nowrap}
.te-offset-rule{stroke:#597f9c;stroke-width:1.25;pointer-events:none}
.te-offset-mark{fill:#254c69;stroke:#f8fbfe;stroke-width:3;paint-order:stroke;font:700 14px system-ui,sans-serif;pointer-events:none}
.te-position{flex:1 1 100%;min-width:0;padding:4px 6px;border:1px solid #cadde9;border-radius:6px;background:#fff}
.te-position summary{cursor:pointer;font-size:12px;font-weight:700;color:#264760}
.te-position summary small{font-weight:500;color:#496677;margin-left:5px}
.te-position-fields{display:flex;align-items:flex-end;flex-wrap:wrap;gap:6px;margin:6px 0 3px}
.tp .te-position-fields label{flex:1 1 105px;min-width:0;max-width:175px;font-size:11px}
.tp-workbench-head p,.tp-edit-error{font-size:12px;line-height:1.5;word-break:keep-all;color:#355669}
.mc .tp-edit-error{color:#9b2439;margin:5px 0 0}
.tp-edit-error:empty,.tp-edit-inspector:empty{display:none}
.tp-edit-tools{margin-bottom:7px}
.tp-edit-frame{overflow:hidden;border:1px solid #c8d8e3;border-radius:7px;background:#f9fcfe}
.te-canvas{width:100%;height:auto;display:block;user-select:none}
.te-canvas.te-drawing{touch-action:pinch-zoom;cursor:crosshair}
.te-paper{fill:#f8fbfe}
.te-outline{fill:#dbe9f1;stroke:none}
.te-outline.te-ghost,.te-drawing .te-wall,.te-drawing .te-label{opacity:.42}
.te-drawing .te-label{opacity:1}
.te-wall{stroke:#335973;stroke-width:5}
.te-wall.te-active-wall{stroke:#147f73;stroke-width:8}
.te-wall-selected .te-wall{stroke:#147f73;stroke-width:7}
.te-structure{fill:#9ab8cc;stroke:#3c6b85;stroke-width:2;cursor:pointer}
.te-door{stroke:#bd741e;stroke-width:11;stroke-dasharray:11 5;cursor:pointer}
.te-hit{stroke:transparent;stroke-width:24;cursor:pointer}
.te-label{fill:#1d4663;font:700 19px system-ui,sans-serif;pointer-events:none}
.te-label-hit .te-label{pointer-events:all;cursor:pointer}
.te-draft{fill:none;stroke:#0a876e;stroke-width:4;stroke-linejoin:round;pointer-events:none}
.te-corner{fill:#0f7e6e;stroke:#fff;stroke-width:2;pointer-events:none}
.te-draft-footprint{fill:#71b7c074;stroke:#0e766f;stroke-width:2;stroke-dasharray:7 5;pointer-events:none}
.te-drawing .te-hit,.te-drawing .te-door{cursor:crosshair}
.tp-workbench:focus-visible{outline:2px solid #2a6b84;outline-offset:2px}
.te-canvas:not(.te-drawing) :is(.te-hit,.te-door,.te-handle,.te-structure){touch-action:none;cursor:grab}
.te-handle{fill:#fff;stroke:#416780;stroke-width:2.5}
.te-handle-hit{fill:transparent;touch-action:none;cursor:grab}
.te-door-symbol{color:#1c556b;cursor:grab;touch-action:none}
.te-door-selected{color:#11736c}
.te-door-hit{stroke:transparent;stroke-width:22}
.te-door-leaf{stroke:currentColor;stroke-width:3}
.te-door-swing{stroke:currentColor;stroke-width:1.55}
.te-door-hinge{fill:currentColor}
.tp-svg-door-gap{stroke:#14273d;stroke-width:2.5}
.tp-svg-door-leaf{stroke:#ffd788;stroke-width:1.9}
.tp-svg-door-swing{stroke:#ffd788;stroke-width:1.15}
.te-active-door{stroke:#a64726;stroke-dasharray:none}
.te-niche{stroke:#327a95}
.te-niche.te-active-door{stroke:#165975}
.te-structure.te-elevated{fill:#aeaeda88;stroke:#595f96;stroke-dasharray:6 4}
.tp-svg-elevated{fill:#b3a4e615;stroke:#c8b8f1;stroke-dasharray:5 3;vector-effect:non-scaling-stroke}
.tp-feature-tabs{width:100%}
.tp-feature-tabs>div{display:flex;flex-wrap:wrap;gap:4px;padding-bottom:4px}
.tp-bowl-help{grid-column:1/-1}
.te-structure.te-active-structure{fill:#bddfd7;stroke:#10786b;stroke-width:3}
.te-dimension{fill:#173e52;stroke:#f8fbfe;stroke-width:4;paint-order:stroke;font:750 20px system-ui,sans-serif;pointer-events:none}
.te-dimension.te-dimension-live,.te-depth{fill:#0c695c}
.tp-edit-measure{min-height:0;padding:3px 0 0;color:#145b50;font-weight:700;font-size:12px;font-variant-numeric:tabular-nums}
.tp-edit-measure:empty{display:none}
.te-angle{display:inline-flex;gap:3px;border:1px solid #cedfe9;border-radius:7px;padding:2px;background:#e7eff6}
.te-angle button{border:0;border-radius:5px;padding:5px 8px;min-height:33px;font:inherit;font-size:12px;font-weight:700;color:#2a4d64;background:transparent;cursor:pointer}
.te-angle button[aria-pressed=true]{background:#fff;color:#164867;box-shadow:0 1px 3px #23496322}
.tp-edit-controls .te-wall-select{display:flex;align-items:center;gap:6px}
.tp-edit-controls .te-wall-select select{width:auto;max-width:100%;min-height:34px}
.tp-edit-inspector .te-remove{color:#8b3440;border-color:#dfc0c6}
.tp-edit-inspector .te-remove:hover{color:#73212c;background:#fff1f3;border-color:#c98b94}
.tp-edit-controls:not(:empty){margin-top:8px}
.tp-edit-inspector{display:flex;align-items:flex-end;flex-wrap:wrap;gap:7px;margin-top:8px;padding-top:8px;border-top:1px solid #d1e0eb}
.tp-edit-inspector>div{flex:1 1 90px;display:grid;gap:4px}
.tp-edit-inspector small,.tp-edit-inspector label{font-size:12px;color:#37586b}
.tp-edit-inspector label{display:grid;gap:3px;flex:1 1 90px;max-width:150px}
.tp-edit-inspector input{min-width:0;width:100%;min-height:39px;padding:5px 7px;background:#fff;border:1px solid #b7ccd9;border-radius:5px;font:inherit}
.tp-svg-anchor{stroke:#ffd27a;stroke-width:2;stroke-dasharray:6 4;vector-effect:non-scaling-stroke}
.tp-ceramic-head{align-items:center}
.tp-ceramic-items,.tp-stock-layouts{display:grid;gap:7px;margin-top:5px}
.tp-ceramic-item{display:flex;align-items:flex-end;gap:7px}
.tp-stock-card{margin:4px 0 0;padding:8px;border:1px solid #cadce8;border-radius:7px;background:#f6faff}
.tp-stock-card svg{width:100%;height:auto;display:block;max-height:230px}
.tp-stock-card figcaption{margin-bottom:5px;font-size:13px;font-weight:700}
.tp-stock-card ol{font-size:12px;margin:5px 0 0;padding-left:18px}
.tp-stock-card .tc-cutout{stroke-dasharray:4 2}
@media(max-width:430px){
  .tp-workbench{padding:7px}
  .tp-mode,.tp-workbench-head>div{max-width:100%}
  .tp-edit-tools button{flex:1 1 auto}
  .te-label{font-size:23px}
}
.tp .tp-intro {
  margin: 0 0 9px;
  color: var(--tp-muted);
  font-size: 12px;
  line-height: 1.5;
  word-break: keep-all;
}
.tp .tp-section {
  min-width: 0;
  padding: 8px 0;
  border-top: 1px solid var(--tp-line);
}
.tp-fields {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 7px 9px;
}
.tp-tile-fields { grid-template-columns:repeat(3,minmax(0,1fr)); }
@media (min-width:900px) {
  .tp-room-fields { grid-template-columns:repeat(4,minmax(0,1fr)); }
}
.mc .tp-field {
  display: grid;
  gap: 4px;
  min-width: 0;
  margin: 0;
  color: var(--tp-muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}
.tp-field :is(input,select) {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 6px 9px;
  border: 1px solid #c5d5e1;
  border-radius: 7px;
  background: #fff;
  color: var(--tp-ink);
  font: inherit;
  font-size: 14px;
}
.tp .tp-check {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  margin: 0;
  color: var(--tp-muted);
  font-size: 12px;
  font-weight: 650;
}
.tp-check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #246282;
}
.tp :is(.tp-openings,.tp-suggestions,.tp-inline-details) summary {
  color: var(--tp-ink);
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}
.tp :is(.tp-openings,.tp-inline-details) summary small {
  float:right;
  margin-inline-start:6px;
  color:var(--tp-muted);
  font-size:11px;
  font-weight:550;
}
.tp .tp-inline-details {
  min-width:0;
  margin-top:5px;
  padding:6px 8px;
  border:1px solid var(--tp-line);
  border-radius:6px;
  background:#f6f9fc;
}
.tp :is(.tp-item,.tp-inline-details)[open] > summary { margin-bottom:6px; }
.tp-surface-inputs{display:flex;align-items:center;flex-wrap:wrap;gap:3px 8px;margin-top:4px}
.tp .tp-surface-inputs .tp-inline-details{margin-top:0}
.tp .tp-surface-inputs .tp-inline-details[open]{flex-basis:100%}
.tp :is(.tp-openings,.tp-suggestions) p,.tp .tp-help {
  padding: 5px 0;
  color: var(--tp-muted);
  font-size: 12px;
  line-height: 1.5;
  word-break: keep-all;
}
.tp-items {
  display: grid;
  gap: 6px;
  margin-bottom: 6px;
}
.tp-item {
  min-width: 0;
  margin: 0;
  padding: 5px 8px;
  border: 1px solid var(--tp-line);
  border-radius: 8px;
  background: #f4f8fb;
}
.tp-item button { margin-top: 5px; }
.tp-actions, .tp-drawing-head, .tp-surfaces {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}
.tp-drawing-head { justify-content: space-between; }
.tp .tp-drawing-head h3 { margin: 0; }
.tp-surfaces { margin: 7px 0 0; }
.tp-surfaces button {
  flex: 0 1 auto;
  min-height: 34px;
  min-width:0;
  max-width:100%;
  padding: 5px 8px;
  border: 1px solid #c8d7e5;
  border-radius: 7px;
  background: #f0f5f9;
  color: #23435c;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  overflow-wrap:anywhere;
  cursor: pointer;
}
.tp-surfaces b {
  display:inline-block;
  padding:1px 4px;
  border-radius:4px;
  background:#dceaf3;
  color:#254c65;
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}
.tp-surfaces button[aria-pressed=true] b{background:#e5f0f6}
.tp-surfaces button:hover, .tp .tp-point[aria-pressed=true] {
  border-color: #55829b;
  background: #e7f1f6;
}
.tp-surfaces button[aria-pressed=true] {
  border-color: #295879;
  background: #254e6b;
  color: #fff;
}
.tp-surfaces button.tp-excluded { opacity: .66; }
.tp .tp-point { align-self: end; }
.tp-blueprint {
  display: block;
  width: 100%;
  max-width: 620px;
  height: auto;
  margin: 7px auto 0;
  user-select: none;
}
.tp-blueprint-pick { cursor: crosshair; }
.tp-room { fill: #29455b; stroke: #b5d1e8; stroke-width: 1.5; }
.tp-svg-tile { stroke: #b3cfde; stroke-width: .65; }
.tp-svg-full { fill: #48738c; }
.tp-svg-cut { fill: #aa7b41; stroke: #f1c77b; }
.tp-svg-door { fill: url(#tp-door-pattern); stroke: #dcc36f; stroke-width: .75; }
.tp-svg-door-line { stroke: #f0cf70; stroke-width: 4; }
.tp-svg-niche { fill:#183c50; stroke:#83e3f1; stroke-width:1.6; stroke-dasharray:4 2; }
.tp-svg-niche-line { stroke:#83e3f1; stroke-width:3.2; stroke-dasharray:5 3; }
.tp-svg-niche-label,.tp-svg-face-label {
  fill:#e1f9ff;
  font-size:11px;
  font-weight:700;
  pointer-events:none;
}
.tp-svg-feature { fill: #222f47; stroke: #97b2cc; stroke-width: 1; stroke-dasharray: 3 2; }
.tp-svg-source { fill: #186581; stroke: #7ddfff; stroke-width: 2.1; stroke-dasharray: 4 2; }
.tp-svg-target { fill: #674ba0; stroke: #e4c3ff; stroke-width: 2.1; }
.tp-svg-fragment { stroke:none; }
.tp-piece-number {
  fill:#fff;
  stroke:#203a47;
  stroke-width:1.8;
  stroke-linejoin:round;
  paint-order:stroke fill;
  font-weight:800;
  font-variant-numeric:tabular-nums;
  pointer-events:none;
}
.tp-cut-callout{pointer-events:none}
.tp-cut-callout .tp-cut-leader{stroke:#ffd88d;stroke-width:1;stroke-dasharray:3 2;stroke-opacity:.85}
.tp-cut-callout circle{fill:#ffd88d;stroke:#192f42;stroke-width:.7}
.tp-cut-callout rect{fill:#14273d;stroke:#ffd88d;stroke-width:1}
.tp-cut-callout text{fill:#fff3ce;font-size:11px;font-weight:800;font-variant-numeric:tabular-nums}
.tp-cut-narrow:focus .tp-svg-tile{fill:#d8a050;stroke:#fff2bd;stroke-width:1.8}
.tp-cut-narrow:focus .tp-svg-fragment{stroke:none}
.tp-dim-line { stroke: #abc2d6; stroke-width: .8; }
.tp-dim-label,.tp-wall-number {
  fill: #f0f5f9;
  font-family: inherit;
  font-size: 13px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.tp-wall-number { fill: #deeaf6; font-size: 12px; }
.tp-origin-guides { fill:none;stroke:#9df4d3;stroke-width:1;stroke-dasharray:4 3;opacity:.58;pointer-events:none }
.tp-origin { fill:none;stroke:#a6f5d7;stroke-width:1.35;cursor:grab;touch-action:none }
.tp-origin-hit { fill:transparent;stroke:none;pointer-events:all }
.tp-origin-ring { fill:#162e43;stroke:#a6f5d7;stroke-width:2 }
.tp-origin:focus-visible { outline:none }
.tp-origin:is(:hover,:focus-visible) .tp-origin-ring { fill:#296e61;stroke:white }
.tp-origin-dragging,.tp-origin-dragging .tp-origin { cursor:grabbing }
.tp-blueprint-pick .tp-origin { cursor:crosshair }
.tp-origin-preview { fill:#2c302c;stroke:#f7d58b;stroke-width:1.6;pointer-events:none }
.tp-origin-preview path { fill:none;stroke-dasharray:4 3;stroke-width:1.15 }
.tp-origin-readout {
  display:flex;align-items:center;flex-wrap:wrap;gap:4px 13px;margin:7px auto 0;padding:5px 9px;
  width:fit-content;max-width:100%;border:1px solid #adc8bb;border-radius:7px;
  background:#eff7f1;color:#284d3e;font-size:12px;font-variant-numeric:tabular-nums;
}
.tp-origin-readout[data-preview] { border-color:#b88938;background:#fff6df;color:#745521 }
.tp-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  padding: 6px 1px 3px;
  color: var(--tp-muted);
  font-size: 12px;
  line-height: 1.35;
}
.tp-legend span { display: inline-flex; align-items: center; gap: 4px; }
.tp-legend strong{margin-inline-start:auto;color:var(--tp-ink)}
.tp-legend span::before {
  display: inline-block;
  width: 9px;
  height: 9px;
  border: 1px solid #345976;
  border-radius: 2px;
  background: var(--tp-key);
  content: '';
}
.tp-legend-cut { --tp-key: #ecbe76; }
.tp-legend-door { --tp-key: #f9de81; }
.tp-legend-niche { --tp-key: #83e3f1; }
.tp-legend-source { --tp-key: #7ddfff; }
.tp-legend-target { --tp-key: #e4c3ff; }
.tp-piece-index ul {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(185px,1fr));
  gap:1px 10px;
  max-height:200px;
  overflow:auto;
  margin:0;
  padding:0;
  list-style:none;
}
.tp-piece-index li {
  display:grid;
  grid-template-columns:minmax(32px,auto) minmax(0,1fr) auto;
  align-items:center;
  gap:5px;
  padding:4px 0;
  border-top:1px solid var(--tp-line);
  font-size:11px;
  font-variant-numeric:tabular-nums;
}
.tp-piece-index li small {
  color:var(--tp-muted);
  text-align:right;
}
.tp-suggestions {
  margin-top:5px;
  padding: 6px 8px;
  border: 1px solid #d2e0ed;
  border-radius: 7px;
  background: #f3f7fb;
}
.tp-suggestions ol {
  max-height: 310px;
  overflow: auto;
  margin: 0;
  padding: 0 5px 0 19px;
  color: var(--tp-ink);
  font-size: 12px;
  line-height: 1.55;
}
.tp-suggestions li { padding: 6px 0; border-top: 1px solid var(--tp-line); }
.tp-suggestions li .tp-actions { margin-top: 4px; }
.tp .tp-empty {
  padding: 9px;
  border-radius: 7px;
  background: #eef3f8;
  color: var(--tp-ink);
  font-size: 12px;
}
@media (max-width:400px) {
  .tp-drawing-head { align-items: start; flex-direction: column; }
  .tp-surfaces button { padding-inline: 6px; }
}
