/* Layer Studio: compact controls, deliberate changes, persistent action bar. */
.workspace.has-layers.has-style-panel { grid-template-columns:270px minmax(0,1fr) 380px; }
.style-panel { background:#faf9f9; min-width:0; }
.style-header { padding:16px 20px 18px; background:var(--surface); }
.style-header-top { display:flex; align-items:center; justify-content:space-between; margin-bottom:6px; }
.style-header-top .eyebrow { margin:0; color:var(--accent); letter-spacing:1.4px; }
.style-header-top .icon-button { width:28px; height:28px; }
.style-header h2 { font-size:22px; font-weight:650; letter-spacing:-.5px; margin:0 0 14px; }
.style-layer-context { display:flex; gap:8px; align-items:center; font-size:12px; }
#style-layer-name { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:600; }
.geometry-badge { flex-shrink:0; font-size:10px; background:var(--accent-soft); color:var(--accent); padding:4px 7px; border-radius:5px; }
.style-tabs { display:flex; gap:20px; padding:0 20px; background:var(--surface); border-bottom:1px solid var(--line); }
.style-tabs button { position:relative; border:0; background:none; padding:12px 4px; font-size:12px; font-weight:650; color:var(--muted); }
.style-tabs button[aria-selected=true] { color:var(--accent); }
.style-tabs button[aria-selected=true]::after { content:''; position:absolute; left:0; right:0; bottom:-1px; height:3px; background:var(--accent); border-radius:3px 3px 0 0; }
.style-panel .style-form { padding:0; display:flex; flex-direction:column; flex:1; overflow:hidden; min-height:0; }
.style-scroll { flex:1; min-height:0; overflow-y:auto; overscroll-behavior:contain; padding:16px; scrollbar-gutter:stable; }
.style-section { background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:14px; margin:12px 0; }
.style-section-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:12px; }
.style-section-heading h3 { font-size:12px; font-weight:650; min-width:0; overflow-wrap:anywhere; }
.style-caption { color:var(--muted); font-size:10px; line-height:1.6; }
p.style-caption { margin:10px 0 0; }
.style-preview-card { border:1px solid #eadadd; background:linear-gradient(125deg,#fff,#fff6f7); border-radius:12px; padding:14px; }
.style-preview-card .style-section-heading { margin-bottom:10px; }
.style-preview { min-height:54px; display:grid; gap:5px; }
.studio-preview-row { display:flex; gap:10px; align-items:center; min-height:38px; font-size:11px; }
.studio-sample { min-width:64px; min-height:32px; display:flex; align-items:center; justify-content:center; }
.studio-symbol { display:block; flex-shrink:0; border-style:solid; box-sizing:border-box; }
.studio-symbol.point { border-radius:50%; }
.studio-symbol.polygon { border-radius:4px; }
.studio-symbol.line { border-radius:3px; }
.studio-preview-caption { flex:1; min-width:0; overflow-wrap:anywhere; }
.studio-preview-count { color:var(--muted); font-size:10px; font-variant-numeric:tabular-nums; }
.studio-label-sample { display:flex; align-items:center; justify-content:center; padding:16px 5px; overflow-wrap:anywhere; }
.style-mode-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.style-mode-grid button { display:flex; gap:9px; align-items:center; border:1px solid var(--line); border-radius:8px; padding:11px 9px; text-align:left; background:#fff; color:var(--ink); }
.style-mode-grid button>i { color:var(--muted); font-size:13px; width:15px; text-align:center; }
.style-mode-grid button>span { font-size:11px; font-weight:650; line-height:1.4; }
.style-mode-grid button small { display:block; font-size:9px; font-weight:400; color:var(--muted); margin-top:3px; }
.style-mode-grid button[aria-pressed=true] { border-color:var(--accent); background:#fff4f5; box-shadow:0 0 0 1px var(--accent); }
.style-mode-grid button[aria-pressed=true]>i { color:var(--accent); }
.style-mode-grid button:disabled { opacity:.45; cursor:not-allowed; }
.style-panel input[type=text],.style-panel input[type=number],.style-panel input[type=search],.style-panel select { font-size:12px; margin:6px 0 14px; background:#fbfafa; border:1px solid var(--line); border-radius:7px; width:100%; padding:9px; min-width:0; }
.style-panel label { font-size:11px; }
.style-panel input[type=color] { display:block; width:100%; height:34px; margin:6px 0 12px; cursor:pointer; }
.style-field-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:12px; }
.studio-field { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:9px 0; border-bottom:1px solid #f3eff0; }
.studio-field:last-child { border:0; padding-bottom:0; }
.studio-field-control { display:flex; align-items:center; gap:8px; }
.studio-field-control output { font-size:10px; color:var(--muted); min-width:32px; text-align:right; font-variant-numeric:tabular-nums; }
.style-panel .studio-field-control input[type=color] { width:30px; height:28px; margin:0; border-radius:5px; padding:2px; }
.style-panel .studio-field-control input[type=number] { width:62px; padding:6px; margin:0; }
.style-panel .studio-field-control input[type=range] { width:104px; }
.style-control-label { display:block; font-size:11px; font-weight:600; margin:0 0 8px; }
.palette-options { display:flex; gap:9px; padding:3px; }
.palette-options button { width:62px; height:26px; border:3px solid #fff; border-radius:6px; box-shadow:0 0 0 1px var(--line); }
.palette-options button[aria-pressed=true] { box-shadow:0 0 0 2px var(--accent); }
.style-text-button { border:0; padding:3px 0; color:var(--accent); background:none; font-size:10px; font-weight:600; }
.style-text-button:hover { text-decoration:underline; }
.category-list { display:grid; gap:4px; max-height:250px; overflow-y:auto; margin:8px 0; }
.category-row { display:flex; align-items:center; gap:8px; text-align:left; border:1px solid transparent; background:#faf8f8; border-radius:7px; padding:8px; width:100%; }
.category-row[aria-pressed=true] { border-color:var(--accent); background:var(--accent-soft); }
.category-sample { width:40px; min-height:24px; display:flex; align-items:center; justify-content:center; flex-shrink:0; overflow:hidden; }
.category-sample .studio-symbol { max-width:30px; max-height:24px; }
.category-sample .studio-symbol.point { max-width:20px; max-height:20px; }
.category-caption { min-width:0; flex:1; overflow-wrap:anywhere; font-size:11px; font-weight:600; }
.category-caption small { display:block; color:var(--muted); font-size:9px; font-weight:400; }
.category-feature-count { font-size:10px; color:var(--muted); }
.category-editor { padding:12px; border:1px solid var(--line); border-radius:8px; margin-top:12px; }
.category-editor .style-section-heading { align-items:flex-start; }
.style-toggle { display:flex; align-items:center; justify-content:space-between; gap:12px; padding-bottom:12px; }
.style-toggle span { font-size:12px; font-weight:600; }
.style-toggle small { display:block; font-size:10px; color:var(--muted); font-weight:400; margin-top:5px; }
.style-toggle input[type=checkbox] { appearance:none; width:34px; height:20px; border-radius:20px; background:#ccc5c7; border:0; position:relative; cursor:pointer; }
.style-toggle input[type=checkbox]::after { content:''; width:14px; height:14px; position:absolute; top:3px; left:3px; border-radius:50%; background:#fff; transition:transform .15s; }
.style-toggle input[type=checkbox]:checked { background:var(--accent); }
.style-toggle input[type=checkbox]:checked::after { transform:translateX(14px); }
.style-toggle input:disabled { opacity:.4; cursor:not-allowed; }
.style-apply-bar { background:#fff; border-top:1px solid var(--line); padding:12px 16px 16px; flex-shrink:0; box-shadow:0 -5px 20px #30292b06; }
.style-apply-status { display:flex; justify-content:space-between; align-items:center; gap:8px; font-size:10px; color:var(--muted); margin-bottom:10px; }
.style-apply-status .is-pending { color:var(--accent); }
.style-apply-actions { display:grid; grid-template-columns:1fr 1.6fr; gap:8px; }
.style-apply-actions .button { justify-content:center; font-size:12px; padding:10px; }
.style-error { color:var(--danger); font-size:11px; line-height:1.6; background:#fff1f0; border-radius:6px; padding:9px; margin-bottom:10px; }
@media (max-width:1100px) {
  .workspace.has-layers.has-style-panel { grid-template-columns:260px minmax(0,1fr); }
  .style-panel { width:380px; max-width:100%; }
}
@media (max-width:700px) {
  .workspace.has-layers.has-style-panel { grid-template-columns:minmax(0,1fr); }
  .style-panel { width:min(380px,100%); }
  .style-header { padding:12px 16px; }
  .style-header h2 { font-size:20px; margin-bottom:10px; }
}
@media (prefers-reduced-motion:reduce) { .style-toggle input[type=checkbox]::after { transition:none; } }
