.layout-help { margin: 9px 0 0; color: var(--muted); font-size: .875rem; line-height: 1.5; }
.sizing-panel { margin-top: 16px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 16px; background: rgba(16,16,21,.88); }
.sizing-heading { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 20px; }
.sizing-heading span { color: var(--muted); font-size: .875rem; }
.layout-controls { display: grid; grid-template-columns: minmax(240px,1.5fr) minmax(190px,1fr) minmax(190px,1fr); align-items: start; gap: 28px; }
.layout-controls label, .layout-controls legend { font-size: .875rem; color: #dedbe3; }
.control-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 30px; margin-bottom: 9px; }
.unit-switch, .alignment-options { display: flex; padding: 3px; border: 1px solid var(--line-strong); border-radius: 9px; background: #0a0a0e; }
.unit-switch button { border: 0; border-radius: 6px; background: none; color: var(--muted); padding: 4px 10px; font-size: .875rem; cursor: pointer; }
.unit-switch button[aria-pressed="true"] { background: #35303c; color: var(--text); }
.width-inputs { display: flex; align-items: center; gap: 15px; }
.dimension-input { display: flex; align-items: center; gap: 5px; border: 1px solid var(--line-strong); background: #0a0a0e; border-radius: 9px; padding: 0 10px; }
.dimension-input input { width: 78px; min-height: 38px; border: 0; background: none; color: var(--text); font: inherit; font-variant-numeric: tabular-nums; }
.dimension-input span { color: var(--muted); font-size: .875rem; }
.layout-controls input[type="range"] { min-width: 40px; width: 100%; height: 32px; margin: 0; accent-color: #f0addb; cursor: pointer; }
.range-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: .8rem; margin-top: 5px; font-variant-numeric: tabular-nums; }
.alignment-control { border: 0; padding: 0; margin: 0; min-width: 0; }
.alignment-control legend { padding: 0; line-height: 30px; margin-bottom: 9px; }
.alignment-options label { flex: 1; position: relative; text-align: center; cursor: pointer; }
.alignment-options input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.alignment-options span { display: block; border-radius: 6px; padding: 10px 8px; color: var(--muted); }
.alignment-options input:checked + span { background: #33232f; color: #ffd3f1; box-shadow: inset 0 0 0 1px #744563; }
.alignment-options input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 3px; }
.gap-control output { color: #f0addb; font-size: .875rem; font-variant-numeric: tabular-nums; }
.layout-controls input:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.card-dimensions { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; justify-content: space-between; padding: 12px 18px; border-top: 1px solid #22222c; font-size: .875rem; font-variant-numeric: tabular-nums; color: #e2dbe7; }
.card-dimensions small { color: var(--muted); font-size: .8rem; }
.export-dimensions { margin: 16px 0 20px; color: #f2d4e8; font-size: 1rem; font-variant-numeric: tabular-nums; }
.export-dialog .layout-controls { grid-template-columns: minmax(240px,1fr) minmax(190px,1fr); gap: 18px 26px; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: #15151c; }
.export-dialog .gap-control { grid-column: 1 / -1; }
.export-dialog .export-stage { position: relative; max-height: none; overflow: hidden; }
.dimension-guides { position: absolute; pointer-events: none; border: 1px dashed #55505c80; }
.width-guide { position: absolute; bottom: calc(100% + 18px); width: 100%; border-top: 1px solid #8e7e92; height: 7px; border-left: 1px solid #8e7e92; border-right: 1px solid #8e7e92; }
.width-guide span { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); white-space: nowrap; color: #e4d7e7; font-size: .875rem; font-variant-numeric: tabular-nums; }
.height-guide { position: absolute; left: calc(100% + 18px); height: 100%; width: 7px; border-right: 1px solid #8e7e92; border-top: 1px solid #8e7e92; border-bottom: 1px solid #8e7e92; }
.height-guide span { position: absolute; top: 50%; left: 15px; white-space: nowrap; transform: translateY(-50%); color: #e4d7e7; font-size: .875rem; font-variant-numeric: tabular-nums; }
.line-measurements { margin-top: 18px; padding: 13px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: .875rem; }
.line-measurements summary { cursor: pointer; color: #ddd6e2; }
.line-measurements table { width: 100%; border-collapse: collapse; margin-top: 12px; font-variant-numeric: tabular-nums; }
.line-measurements th, .line-measurements td { padding: 9px 10px; text-align: right; border-bottom: 1px solid #25252e; }
.line-measurements th:first-child, .line-measurements td:first-child { text-align: left; }
.line-measurements th { color: var(--muted); font-weight: 500; }
.line-measurements[hidden] { display: none; }
@media (min-width: 900px) and (max-width: 1100px) {
  .layout-controls { gap: 18px; grid-template-columns: minmax(240px,1.3fr) minmax(180px,1fr); }
  .layout-controls .gap-control { grid-column: 1 / -1; }
}
