.designer { --stage: #f4f4f2; }
.studio { display: grid; grid-template-columns: minmax(0, 1fr) 400px; min-height: calc(100dvh - 64px); border-bottom: 1px solid var(--line); }

/* stage */
.stage-wrap { position: sticky; top: 64px; height: calc(100dvh - 64px); display: flex; flex-direction: column; background: var(--stage); }
.stage { flex: 1; min-height: 0; display: grid; place-items: center; padding: 24px; outline: none; }
.stage:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.stage svg { width: 100%; height: 100%; max-height: 100%; overflow: visible; color: #5d6066; }
.stage.dark { --stage: #0d110b; background: #0d110b; }
.stage .el { cursor: grab; touch-action: none; }
.stage .el:active { cursor: grabbing; }
.stage .dim line { stroke: currentColor; stroke-width: 1px; vector-effect: non-scaling-stroke; }
.stage .dim text { font-family: var(--font); }
.stage .sel { fill: none; stroke: var(--accent); stroke-width: 1.5px; stroke-dasharray: 5 3; vector-effect: non-scaling-stroke; pointer-events: none; }
.stage .issue { fill: rgba(196, 22, 28, .07); stroke: #c4161c; stroke-width: 1px; stroke-dasharray: 2 2; vector-effect: non-scaling-stroke; pointer-events: none; }
.stage-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 24px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); background: #fff; }
.toggle { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }

/* panel */
.panel { border-left: 1px solid var(--line); padding: 8px 24px 40px; background: #fff; }
.sec { border-bottom: 1px solid var(--line); padding: 20px 0; }
.sec:last-child { border-bottom: 0; }
.sec > h2 { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 0 0 14px; }
:lang(hi) .sec > h2, :lang(mr) .sec > h2 { letter-spacing: .02em; font-size: 13px; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; font-size: 13px; color: var(--muted); }
.field > span { font-size: 13px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.panel input[type=text], .panel input[type=number], .panel input[type=email], .panel input[type=tel], .panel select, .panel textarea {
  width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink); font-size: 15px; }
textarea { min-height: 70px; resize: vertical; }
.panel input:focus, .panel select:focus, .panel textarea:focus { outline: none; border-color: var(--ink); }
.hint { font-size: 13px; color: var(--muted); margin: 6px 0 0; line-height: 1.45; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 99px; background: #fff; cursor: pointer; font-size: 14px; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.seg button { border: 0; background: #fff; min-height: 38px; padding: 0 12px; cursor: pointer; font-size: 14px; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }

.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.sw { width: 34px; height: 34px; border-radius: 50%; border: 1px solid #c9c9c4; cursor: pointer; position: relative; padding: 0; }
.sw[aria-pressed="true"] { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink); }
.sw.plate { background: linear-gradient(135deg, #eef0f2, #c9ced4); }
.sw.none { background: #fff; }
.sw.none::after { content: ""; position: absolute; left: 50%; top: 4px; bottom: 4px; width: 1.5px; background: var(--accent); transform: rotate(45deg); }

.items { list-style: none; margin: 0 0 12px; padding: 0; max-height: 220px; overflow-y: auto; border: 1px solid var(--line); }
.items li button { width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: #fff; padding: 8px 10px; cursor: pointer; font-size: 14px; display: flex; gap: 8px; align-items: center; }
.items li:last-child button { border-bottom: 0; }
.items li button[aria-current="true"] { background: var(--surface); font-weight: 600; }
.items .kind { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; min-width: 38px; }
.items .warn { margin-left: auto; color: var(--accent); }
.editor { background: var(--surface); padding: 14px; margin-top: 4px; }
.nudge { display: grid; grid-template-columns: repeat(3, 44px); grid-template-rows: repeat(2, 40px); gap: 4px; }
.nudge button { border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 16px; }
.nudge button:hover { border-color: var(--ink); }
.nudge .up { grid-column: 2; } .nudge .left { grid-column: 1; grid-row: 2; } .nudge .down { grid-column: 2; grid-row: 2; } .nudge .right { grid-column: 3; grid-row: 2; }
.move-row { display: flex; gap: 16px; align-items: flex-end; margin-bottom: 12px; }

.checks { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.checks li { padding: 4px 0 4px 20px; position: relative; }
.checks li::before { content: ""; position: absolute; left: 2px; top: 11px; width: 8px; height: 8px; border-radius: 50%; background: #1e7a3c; }
.checks li.bad::before { background: var(--accent); }
.checks li.bad { cursor: pointer; }

.price-box .amount { font-size: 40px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.price-box .per { color: var(--muted); font-size: 14px; margin-left: 6px; }
.price-box .basis { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.price-box .basis span { display: block; }
.price-box .msg { font-size: 18px; font-weight: 600; }
.price-box .fine { font-size: 12px; color: var(--muted); margin-top: 10px; }

details summary { cursor: pointer; font-size: 14px; margin-bottom: 10px; }
.actions { display: grid; gap: 10px; margin-top: 16px; }
.actions .btn { width: 100%; }

/* order dialog */
.od { padding: 28px; max-width: 520px; }
.od h2 { margin: 0 0 12px; font-size: 22px; letter-spacing: -0.02em; font-weight: 600; }
.od .files { list-style: none; padding: 0; margin: 0 0 18px; font-size: 14px; }
.od .files li { padding: 8px 10px; background: var(--surface); margin-bottom: 6px; display: flex; justify-content: space-between; gap: 8px; }
.od .opt { border-top: 1px solid var(--line); padding: 14px 0; }
.od .opt .btn { width: 100%; }
.od .opt p { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
#order-dialog { max-width: 520px; }

@media (max-width: 900px) {
  .studio { grid-template-columns: 1fr; }
  .stage-wrap { top: 56px; height: 42vh; height: 42dvh; z-index: 5; border-bottom: 1px solid var(--line); }
  .stage { padding: 12px; }
  .stage-bar { padding: 6px 12px; }
  .panel { border-left: 0; padding: 0 16px 40px; }
}
