/* Shared icons for the Properties and Control headings. */
.sec-title { display: flex; align-items: center; gap: 9px; }
.sec-ico { flex: none; width: 26px; height: 26px; padding: 5px; border-radius: 7px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sec-ico.props { color: var(--violet); background: rgba(155,92,255,.14); }
.control-ico { width: 18px; height: 18px; flex: none; }
/* Properties: one compact row each, label left and the control in a fixed column on the right. */
.fields { display: flex; flex-direction: column; margin: 0 -18px; border-top: 1px solid var(--line); }
.set { display: grid; grid-template-columns: minmax(0, 1fr) 128px 22px; grid-template-areas: "label ctl rst"; align-items: center; gap: 6px 8px; padding: 7px 10px 7px 18px; border-bottom: 1px solid var(--line); }
.set:hover { background: rgba(255,255,255,.02); }
.set > label { grid-area: label; min-width: 0; font-size: 13px; line-height: 1.3; cursor: default; }
.set > label small { display: block; margin-top: 1px; font-size: 11.5px; line-height: 1.35; color: var(--muted); }
.set .ctl { grid-area: ctl; min-width: 0; display: flex; align-items: center; gap: 6px; }
/* Sliders and segmented choices take the full width under their label; color swatches go under the color. */
.set.stack { grid-template-areas: "label out rst" "ctl ctl rst"; }
.set.wide { grid-template-areas: "label ctl rst" "sw sw rst"; }
.set .out { grid-area: out; justify-self: end; font: 500 12px var(--mono); color: var(--text); }
.set .ctl > input[type=text], .set .ctl > select { flex: 1; min-width: 0; height: 30px; padding: 0 8px; border-radius: 8px; font: 400 13px var(--body); }
.set .ctl > input.num { text-align: right; font-family: var(--mono); font-size: 12.5px; }
.set .ctl > select { background: var(--bg-2); color: var(--text); border: 1px solid var(--line); outline: none; cursor: pointer; }
.set .ctl > select:focus { border-color: var(--violet); }
.set .ctl > input[type=color] { flex: none; width: 30px; height: 30px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-2); cursor: pointer; }
.set .ctl > input[type=color] + input { font-family: var(--mono); font-size: 12.5px; }
.set .ctl > input[type=range] { flex: 1; min-width: 0; height: 20px; margin: 0; accent-color: var(--violet); cursor: pointer; }
.seg { flex: 1; min-width: 0; display: flex; gap: 2px; padding: 2px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; }
.seg button { flex: 1; min-width: 0; height: 26px; padding: 0 6px; border: 0; border-radius: 6px; background: none; color: var(--muted); font: 500 12.5px var(--body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.seg button:hover { color: var(--text); }
.seg button[aria-checked=true] { background: #2e2840; color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.4); }
.swatches { grid-area: sw; display: flex; flex-wrap: wrap; gap: 7px; }
.swatches button { width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); cursor: pointer; }
.swatches button[aria-pressed=true] { outline: 2px solid var(--text); outline-offset: 2px; }
.set .sw { position: relative; flex: none; width: 38px; height: 22px; margin-left: auto; padding: 0; border: 0; border-radius: 99px; background: #2a2538; cursor: pointer; transition: background .2s; }
.set .sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #8a829c; transition: .2s; }
.set .sw[aria-checked=true] { background: var(--lime); }
.set .sw[aria-checked=true]::after { left: 19px; background: #0b0a10; }
.set .sw:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.set .rst { grid-area: rst; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--muted); font-size: 14px; line-height: 1; cursor: pointer; visibility: hidden; }
.set.changed .rst { visibility: visible; }
.set .rst:hover { color: var(--text); background: var(--bg-2); }
.grp > summary { display: flex; align-items: center; gap: 8px; padding: 12px 18px 6px; font: 600 10.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); cursor: pointer; list-style: none; user-select: none; }
.grp > summary::-webkit-details-marker { display: none; }
.grp > summary::before { content: '▾'; font-size: 11px; transition: transform .15s; }
.grp:not([open]) > summary { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.grp:not([open]) > summary::before { transform: rotate(-90deg); }
.grp > summary:hover { color: var(--text); }
.fields > .saved { padding: 10px 18px; font: 500 11px var(--mono); color: var(--muted); }
.fields.readonly input, .fields.readonly select, .fields.readonly button { opacity: .6; cursor: not-allowed; }
