/* CST Tools panel in the editor's Job pane. */
.cstStart{display:flex;gap:8px;margin:0 0 12px}
.cstStart button{flex:1}
/* Under the floating toolbar (z-index 8), so its tools and the Top-down toggle stay usable. */
#cstTopDown{position:absolute;inset:0;z-index:7;background:#f4f1ea}
#cstTopDown canvas{display:block;width:100%;height:100%;cursor:default;touch-action:none}
.cstTopDownHint{position:absolute;left:106px;top:52px;margin:0;padding:4px 10px;border-radius:8px;background:#ffffffd9;color:#1d2221;font-size:12px;pointer-events:none}
/* Top left, just right of the floating toolbar. */
.cstTopDownBack{position:absolute;top:12px;left:106px}
.cstScaleNote{border:1px solid var(--pt-accent);border-radius:10px;padding:10px 12px;margin:0 0 12px;background:var(--pt-panel)}
.cstScaleNote p{margin:0 0 8px;font-size:13px;line-height:1.4}
#cstDesigner .fieldRowInput{display:flex;align-items:center;gap:4px;color:var(--pt-muted)}
#cstDesigner .fieldRowInput input{width:72px;text-align:right}
#cstDesigner .fieldRow select{max-width:190px}
.cstSurface{border:1px solid var(--pt-border);border-radius:10px;padding:8px 10px;margin:0 0 8px;background:var(--pt-panel)}
.cstSurface summary{display:grid;grid-template-columns:1fr auto;gap:2px 8px;cursor:pointer}
.cstSurfaceName{font-weight:600}
.cstSurfaceMeta{grid-column:1;font-size:12px;color:var(--pt-muted)}
.cstSurfacePrice{grid-column:2;grid-row:1/3;align-self:center;font-weight:600}
.cstSurface[open] summary{margin-bottom:8px}
.cstRemoveSurface{margin-top:4px;font-size:12px}
.cstSystemNote{margin:0 0 8px;font-size:12px}
.cstFinishes{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 10px}
.cstFinish{display:flex;flex-direction:column;align-items:center;gap:2px;width:72px;font-size:11px;text-align:center;cursor:pointer;color:var(--pt-ink)}
.cstFinish input{position:absolute;opacity:0;pointer-events:none}
.cstFinish img,.cstSwatchBlank{width:64px;height:44px;border-radius:6px;object-fit:cover;border:2px solid transparent;background:var(--pt-border)}
.cstFinish.on img,.cstFinish.on .cstSwatchBlank{border-color:var(--pt-accent)}
.cstFinish:has(input:focus-visible) img{outline:2px solid var(--pt-accent);outline-offset:2px}
.cstTableSmall{width:100%;border-collapse:collapse;font-size:13px}
.cstTableSmall td{padding:4px 0;border-bottom:1px solid var(--pt-border);vertical-align:top}
.cstTableSmall td.n{text-align:right;white-space:nowrap;padding-left:8px;font-size:12px}
/* Material names get the room; quantities and prices sit small on the right. */
.cstOrderTable td:first-child{width:100%}
.cstTableSmall td.sub{padding-left:10px;color:var(--pt-muted)}
.cstLineHead td{font-weight:600;padding-top:8px}
.cstTotal{display:flex;justify-content:space-between;margin:8px 0 0;font-size:14px}
.cstSample{display:inline-block;margin-left:6px;padding:0 5px;border-radius:999px;background:#fdebe1;color:#8a2f08;font-size:10px;font-weight:600;vertical-align:middle}
/* Pond-only editor groups and tools, plus the surface material picker (CST surfaces are always paving). */
body[data-product="cst"] #leftControls [data-widget="layers"],
body[data-product="cst"] #leftControls [data-widget="draw"],
body[data-product="cst"] #poolShapes,
body[data-product="cst"] #pondAppearance,
body[data-product="cst"] #draw-clear,
body[data-product="cst"] #traceWater,
body[data-product="cst"] #pond-ai-open,
body[data-product="cst"] #landscapeSurfaces .surfacePick,
body[data-product="cst"] #landscapeSurfaces > h3,
body[data-product="cst"] #gardenPathTools,
body[data-product="cst"] #ls-plant-controls{display:none}

/* Find a surface in the photo: tap samples, the photo tracer grows the outline. */
.cstTraceBtn{width:100%;margin:0 0 12px}
#cstTraceDialog{width:min(920px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:16px 18px;overflow:auto;background:var(--pt-paper);color:var(--pt-ink);border:1px solid var(--pt-border);border-radius:14px}
#cstTraceDialog::backdrop{background:#08172180}
#cstTraceDialog header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 8px}
#cstTraceDialog h2{margin:0;font-size:20px}
#cstTraceDialog header button{width:36px;min-height:36px;padding:0;font-size:22px}
.cstTraceHelp{margin:0 0 10px;font-size:13px;line-height:1.45;color:var(--pt-muted)}
.cstTraceModes{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 10px}
.cstTraceModes button[aria-pressed="true"]{border-color:var(--pt-accent);color:var(--pt-accent);font-weight:600}
#cstTraceDialog canvas{display:block;width:100%;height:auto;border-radius:10px;cursor:crosshair;background:var(--pt-surface)}
.cstTraceStatus{min-height:1.4em;margin:8px 0;font-size:13px;color:var(--pt-muted)}
.cstTraceActions{display:flex;gap:8px;justify-content:flex-end}

/* The finish photo, large, while a swatch is hovered or focused. */
#cstFinishPeek{position:fixed;z-index:60;margin:0;padding:6px;border:1px solid var(--pt-border);border-radius:12px;background:var(--pt-paper);box-shadow:0 8px 28px #0003;pointer-events:none}
#cstFinishPeek[hidden]{display:none}
#cstFinishPeek img{display:block;width:100%;height:auto;max-height:60vh;object-fit:cover;border-radius:8px}
#cstFinishPeek figcaption{padding:6px 4px 2px;font-size:13px;font-weight:600;color:var(--pt-ink)}
