/* Kunstrommet V2: calm responsive studio. Scoped to .kv2 to protect V1. */
.kv2 { max-width: 1520px; margin: 0 auto; }
.kv2 button, .kv2 input, .kv2 textarea { font: inherit; }
.kv2 h1, .kv2 h2, .kv2 p { margin-top: 0; }
.kv2 h2 { font-size: 1.13rem; }
.kv2-heading { display: flex; justify-content: space-between; gap: 22px; align-items: flex-end; }
.kv2-privacy { color: #547666; font-size: .91rem; margin-bottom: 0; }
.kv2-navigation { display: flex; flex-wrap: wrap; gap: 9px; }
.kv2-navigation a { text-decoration: none; border: 1px solid #c9c9c5; border-radius: 16px; padding: 8px 12px; color: inherit; }
.kv2-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; margin: 20px 0; align-items: start; }
.kv2-editor, .kv2-panel { min-width: 0; }
.kv2-titlebar { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: center; gap: 10px; }
.kv2-titlebar output { color: #4e7160; font-size: .91rem; }
.kv2 label { display: block; margin: 13px 0 7px; font-weight: 600; }
.kv2 input[type="text"], .kv2 textarea { display: block; width: 100%; box-sizing: border-box; padding: 11px 12px; border: 1px solid #bcc4be; background: #fff; color: #222; border-radius: 11px; }
.kv2 button, .kv2-file { cursor: pointer; border-radius: 11px; padding: 9px 12px; background: #f8f8f5; border: 1px solid #b9c1bd; color: #1f2c2b; }
.kv2 button:hover, .kv2-file:hover { background: #e8eeea; }
.kv2 button:focus-visible, .kv2 a:focus-visible, .kv2-file:focus-within { outline: 3px solid #4874a8; outline-offset: 3px; }
.kv2 button[aria-pressed="true"] { background: #304d43; color: #fff; border-color: #304d43; }
.kv2 button:disabled { cursor: not-allowed; opacity: .48; }
.kv2-toolbar, .kv2-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 15px; }
.kv2-toolbar label { display: inline-flex; align-items: center; gap: 6px; margin: 0 4px; font-weight: 500; font-size: .9rem; }
.kv2-toolbar input[type="color"] { width: 39px; height: 35px; padding: 1px; border: 0; background: transparent; }
.kv2-toolbar input[type="range"] { width: 110px; }
.kv2-paper { margin: 16px 0; padding: 13px; border-radius: 16px; background: #dce1de; border: 1px solid #c4cec7; overflow: auto; max-height: min(76vh, 900px); overscroll-behavior: contain; }
.kv2-paper:focus-visible { outline: 3px solid #4874a8; outline-offset: 3px; }
.kv2-zoom-controls { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.kv2-zoom-controls output { min-width: 3.4rem; font-weight: 650; text-align: center; font-variant-numeric: tabular-nums; }
#kv2-canvas { display: block; width: 100%; max-width: none; height: auto; background: #fff; box-shadow: 0 4px 24px #3d524b22; border-radius: 2px; touch-action: none; user-select: none; -webkit-user-select: none; }
.kv2-tip { font-size: .84rem; color: #63716c; line-height: 1.55; margin: 12px 0; }
.kv2-primary { background: #304d43 !important; border-color: #304d43 !important; color: #fff !important; font-weight: 700 !important; }
.kv2-actions .kv2-file { display: inline-flex; margin: 0; align-items: center; font-weight: 500; position: relative; }
.kv2-file input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.kv2-sidebar { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.kv2-layers { display: flex; flex-direction: column; gap: 7px; margin: 12px 0; }
.kv2-layer { display: grid; grid-template-columns: 40px minmax(0,1fr) 57px; gap: 6px; align-items: stretch; padding: 6px; border: 1px solid #d0d7d1; border-radius: 11px; }
.kv2-layer.kv2-selected { border-color: #4b7765; background: #ebf2ed; }
.kv2-layer button { padding: 7px 5px; font-size: .78rem; }
.kv2-layer-name { text-align: left; overflow-wrap: anywhere; }
.kv2-layer-actions { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; }
.kv2-layer-actions button:first-child { grid-column: 1/-1; }
.kv2-slider { display: flex; gap: 12px; align-items: center; }
.kv2-slider input { flex: 1; min-width: 0; }
.kv2-projects { display: flex; flex-direction: column; gap: 8px; }
.kv2-project { display: flex; gap: 9px; justify-content: space-between; align-items: center; padding: 9px 0; border-top: 1px solid #d5dbd5; }
.kv2-project span { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 1080px) {
  .kv2-workspace { grid-template-columns: minmax(0, 1fr); }
  .kv2-sidebar { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 680px) {
  .kv2-heading, .kv2-sidebar { display: block; }
  .kv2-sidebar > * { margin-bottom: 16px; }
  .kv2-workspace { gap: 14px; }
  .kv2-paper { padding: 6px; }
  .kv2-toolbar { align-items: stretch; }
  .kv2-toolbar label { width: 100%; justify-content: space-between; }
}

/* Single Kunstrommet: small, unobtrusive existing Aha integration panels. */
.kv2-inspiration { border-top: 1px solid #d5dbd5; padding: 9px 0; }
.kv2-inspiration strong { display: block; overflow-wrap: anywhere; }
.kv2-inspiration button { font-size: .84rem; }
#kv2-collection-select { box-sizing: border-box; width: 100%; padding: 10px; border: 1px solid #bcc4be; border-radius: 10px; background: #fff; color: #222; }
#kv2-unlink-aha { grid-column: 1 / -1; }

/* Unified sketchbook – thumbnail, search and simple project actions. */
#kv2-project-search { width: 100%; box-sizing: border-box; border: 1px solid #bcc4be; border-radius: 10px; padding: 10px 12px; background: #fff; color: #222; }
.kv2-project--saved { flex-direction: column; align-items: stretch; gap: 8px; padding: 11px; border: 1px solid #d6ded8; border-radius: 12px; background: #fafbf9; }
.kv2-project-preview { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: contain; background: #fff; border: 1px solid #e0e5e0; border-radius: 8px; }
.kv2-project-info { display: flex; justify-content: space-between; gap: 8px; overflow-wrap: anywhere; align-items: baseline; }
.kv2-project-info span { font-weight: 600; }
.kv2-project-info small { color: #63716c; white-space: nowrap; }
.kv2-project-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.kv2-project-actions button { flex: 1 0 auto; font-size: .84rem; }
.kv2-project-actions button:last-child { color: #923c35; border-color: #bb9995; }

/* Selection is only a visual overlay; it must never modify exported artwork. */
.kv2-stage { position: relative; width: 100%; }
.kv2-selection-overlay { position: absolute; box-sizing: border-box; z-index: 2;
  border: 2px dashed #1d6bba; box-shadow: 0 0 0 1px #fff inset, 0 0 0 1px #fff;
  background: #338fe91b; pointer-events: none; }
.kv2-selection-overlay[hidden] { display: none; }
.kv2-selection-tools, .kv2-transform-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 9px 0; }
.kv2-transform-tools button { flex: 1 1 125px; }
.kv2-selection-tools button { flex: 1 1 auto; }
@media (max-width: 680px) {
  .kv2-transform-tools button, .kv2-selection-tools button { flex: 1 1 45%; }
}

/* Non-destructive layer masks: a compact control group in the existing layer sidebar. */
.kv2-mask-panel { border: 1px solid #d0dcd3; border-radius: 12px; padding: 12px; margin: 14px 0; background: #f8faf8; }
.kv2-mask-panel h3 { margin: 0 0 6px; font-size: 1rem; }
.kv2-mask-panel .kv2-tip { margin: 7px 0; }
.kv2-mask-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin: 10px 0; }
.kv2-mask-tools button { font-size: .82rem; min-width: 0; }

/* Lasso outline shares stage geometry with the raster, no pointer capture. */
.kv2-lasso-overlay { position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 2; }
.kv2-lasso-overlay path { fill: #338fe91b; stroke: #1d6bba; stroke-width: 2;
  stroke-dasharray: 7 5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.kv2-lasso-overlay[hidden] { display: none; }

/* Compact, accessible brush settings and eight local-only color shortcuts. */
.kv2-toolbar select { font: inherit; color: #1f2c2b; background: #fff;
  border: 1px solid #b9c1bd; border-radius: 9px; padding: 7px 9px; }
.kv2-toolbar select:focus-visible { outline: 3px solid #4874a8; outline-offset: 2px; }
.kv2-palette { display: inline-flex; flex-wrap: wrap; gap: 6px;
  align-items: center; padding: 3px; }
.kv2-toolbar .kv2-swatch { width: 31px; height: 31px; padding: 2px;
  border-radius: 50%; background: var(--kv2-swatch);
  border: 2px solid #9caaa2; box-shadow: 0 0 0 2px #fff inset; }
.kv2-toolbar .kv2-swatch[aria-pressed="true"] {
  background: var(--kv2-swatch); color: inherit;
  outline: 2px solid #304d43; outline-offset: 2px; border-color: #fff; }
@media (max-width: 680px) {
  .kv2-palette { width: 100%; }
  .kv2-toolbar .kv2-swatch { width: 36px; height: 36px; }
}

/* Layer blend mode: same local controls and accessible focus treatment. */
#kv2-blend-mode { display: block; box-sizing: border-box; width: 100%;
  padding: 10px 12px; border: 1px solid #bcc4be; border-radius: 10px;
  background: #fff; color: #1f2c2b; font: inherit; }
#kv2-blend-mode:focus-visible { outline: 3px solid #4874a8; outline-offset: 2px; }
#kv2-blend-mode:disabled { opacity: .55; }

/* Adjustment sliders stay in the existing layer sidebar, also on small iPads. */
.kv2-adjustments { box-sizing: border-box; min-width: 0; padding: 12px;
  margin: 14px 0; border: 1px solid #d0dcd3; border-radius: 12px; background: #fafbf9; }
.kv2-adjustments legend { padding: 0 5px; font-weight: 650; font-size: .94rem; }
.kv2-adjustments label { margin-top: 9px; }
.kv2-adjustments .kv2-slider { gap: 10px; }
.kv2-adjustments input[type="range"] { width: 100%; min-width: 0; }
.kv2-adjustments output { min-width: 46px; text-align: right; font-variant-numeric: tabular-nums; }
.kv2-adjustments button { margin-top: 12px; font-size: .86rem; width: 100%; }

/* Transient shape preview: never included in PNG or project backup. */
.kv2-shape-overlay { position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 3; }
.kv2-shape-overlay path { stroke-linejoin: round; stroke-dasharray: 6 4;
  vector-effect: non-scaling-stroke; }
.kv2-shape-overlay[hidden] { display: none; }

/* Line and arrow use the shared stroke thickness, not fill/outline mode. */
#kv2-shape-style:disabled { opacity: .55; cursor: not-allowed; }


/* The typography panel is part of the same atelier, not a second editor. */
.kv2-text-panel { border: 1px solid #b8c7bf; border-radius: 12px; padding: 12px;
  margin: 12px 0; background: #f6f9f7; display: grid; gap: 9px; }
.kv2-text-panel[hidden] { display: none; }
.kv2-text-panel textarea { display: block; width: 100%; min-height: 64px; box-sizing: border-box;
  font: inherit; padding: 10px; border: 1px solid #aebdb5; border-radius: 8px; resize: vertical; }
.kv2-text-options, .kv2-text-actions { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.kv2-text-options label { display: grid; gap: 5px; min-width: 115px; }
.kv2-text-options select, .kv2-text-options input[type="number"] {
  max-width: 170px; font: inherit; padding: 8px; border-radius: 8px;
  border: 1px solid #aebdb5; background: #fff; color: #25372d; }
.kv2-text-options .kv2-text-bold-label { display: inline-flex; gap: 6px;
  align-items: center; min-width: 0; padding: 8px; }
.kv2-text-actions button { flex: 0 1 auto; }
.kv2-text-overlay { position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 4; }
#kv2-text-edit-preview { z-index: 1; }
.kv2-text-overlay text { paint-order: stroke; stroke: #fff;
  stroke-width: .5px; stroke-opacity: .35; }
.kv2-text-overlay[hidden] { display: none; }
@media (max-width: 680px) {
  .kv2-text-panel { padding: 10px; }
  .kv2-text-actions button { flex: 1 1 42%; }
}

#kv2-text-warning:not(:empty) { color: #9b4130; font-weight: 600; margin: 0; }

.kv2-free-transform[hidden] { display: none; }
.kv2-free-transform { display: grid; gap: 8px; }
#kv2-free-preview { display: block; width: 100%; height: auto; background: #fff; border: 1px solid #a3b0a8; }

#kv2-transform-live, #kv2-transform-overlay { position: absolute; top: 0; left: 0; }
#kv2-transform-live { z-index: 5; pointer-events: none; }
#kv2-transform-overlay { z-index: 6; touch-action: none; user-select: none; -webkit-user-select: none; }
#kv2-transform-live[hidden], #kv2-transform-overlay[hidden] { display: none; }
#kv2-transform-frame, #kv2-transform-stem { fill: none; stroke: #176aca; stroke-width: 2; vector-effect: non-scaling-stroke; pointer-events: none; }
#kv2-transform-overlay circle { fill: #fff; stroke: #176aca; stroke-width: 2; vector-effect: non-scaling-stroke; cursor: grab; }
#kv2-transform-overlay #kv2-handle-pivot { fill: #ffbe66; stroke: #a04b08; }

/* View-only magnetic alignment guides; never intercept drawing or exports. */
#kv2-snap-guides { position: absolute; top: 0; left: 0; z-index: 4; pointer-events: none; }
#kv2-snap-guides[hidden] { display: none; }
#kv2-snap-guides line { stroke: #cf267d; stroke-width: 1.5; stroke-dasharray: 5 3; vector-effect: non-scaling-stroke; }

/* Move-only layer multi-selection, independent of the active editing layer. */
.kv2-layer { grid-template-columns: 40px minmax(0,1fr) 57px 30px; }
.kv2-move-together { width: 22px; height: 22px; align-self: center; justify-self: center; accent-color: #304d43; }
.kv2-group-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; font-size: .82rem; }

.kv2-group-label { grid-column: 2 / -1; color: #547666; overflow-wrap: anywhere; }
.kv2-named-groups { margin: 12px 0; padding: 10px; border: 1px solid #d0d7d1; border-radius: 11px; display: grid; gap: 6px; }
.kv2-named-groups select { min-width: 0; max-width: 100%; font: inherit; padding: 7px; border-radius: 8px; border: 1px solid #bcc4be; }
.kv2-group-buttons { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
.kv2-group-buttons button { font-size: .82rem; padding: 6px; }

/* Disposable full-composition gradient preview below the direction guide. */
#kv2-gradient-live { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
#kv2-gradient-live[hidden] { display: none; }

#kv2-brush-live { position:absolute; inset:0; width:100%; height:100%; z-index:1; pointer-events:none; }
#kv2-brush-live[hidden], #kv2-brush-advanced[hidden] { display:none; }
#kv2-brush-advanced { border:1px solid #b8c7bf; padding:10px; border-radius:8px; }

/* Studio 5.0 layout: keep the drawing surface ahead of long settings. */
.kv2-fold { border:1px solid #d0dcd3; border-radius:10px; padding:9px 12px; margin:10px 0; background:#fafbf9; min-width:0; }
.kv2-fold summary { cursor:pointer; font-weight:650; color:#304d43; padding:5px 0; }
.kv2-fold summary:focus-visible { outline:3px solid #4874a8; outline-offset:3px; }
.kv2-brush-inspector { margin:12px 0; }
.kv2-brush-parameter-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:5px 14px; align-items:center; }
.kv2-brush-parameter-grid label { margin:7px 0; }
.kv2-brush-parameter-grid .kv2-tip { grid-column:1/-1; }
.kv2-brush-parameter-grid select { width:100%; min-width:0; padding:8px; font:inherit; }
.kv2-brush-parameter-grid input[type="range"] { width:100%; }
.kv2-brush-parameter-grid output { min-width:3rem; font-variant-numeric:tabular-nums; text-align:right; }
#kv2-brush-settings-jump[hidden] { display:none; }
.kv2[data-studio-focus="true"] .kv2-workspace { grid-template-columns:minmax(0,1fr); margin-top:8px; }
.kv2[data-studio-focus="true"] .kv2-heading, .kv2[data-studio-focus="true"] .kv2-sidebar,
.kv2[data-studio-focus="true"] .kv2-document-heading, .kv2[data-studio-focus="true"] .kv2-document-notes,
.kv2[data-studio-focus="true"] .kv2-workspace-help { display:none; }
.kv2[data-studio-focus="true"] .kv2-paper { max-height:min(85vh,1100px); }
@media(max-width:680px) { .kv2-brush-parameter-grid { grid-template-columns:minmax(0,1fr); } }

/* Local stroke samples use the same rendering engine as the active brush. */
.kv2-studio-brushes { display:grid; grid-template-columns:repeat(auto-fit,minmax(125px,1fr)); gap:8px; }
.kv2-studio-brushes button { display:grid; gap:5px; text-align:left; min-width:0; padding:7px; }
.kv2-studio-brushes canvas, .kv2-active-sample canvas, #kv2-saved-brush-sample { display:block; width:100%; max-width:240px; height:auto; background-color:#fff; background-image:linear-gradient(45deg,#e7e7e7 25%,transparent 25%),linear-gradient(-45deg,#e7e7e7 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#e7e7e7 75%),linear-gradient(-45deg,transparent 75%,#e7e7e7 75%);background-size:12px 12px;background-position:0 0,0 6px,6px -6px,-6px 0; border-radius:5px; }
#kv2-saved-brush-sample[hidden] { display:none; }
.kv2-active-sample { display:flex; flex-wrap:wrap; gap:12px; align-items:center; margin:10px 0; }

.kv2-color-chips {display:flex;flex-wrap:wrap;gap:7px;margin:8px 0;}
.kv2-color-chips .kv2-color-chip {min-width:76px;min-height:44px;font-size:.78rem;border:1px solid #8e9e96;font-variant-numeric:tabular-nums;}
#kv2-color-library-panel select {font:inherit;max-width:100%;padding:8px;border-radius:8px;border:1px solid #b9c1bd;background:white;}
#kv2-color-library-panel h3 {font-size:1rem;margin:14px 0 5px;}

/* Composition guide layer: follows raster width at any zoom, ignores pointer events. */
#kv2-composition-guides {position:absolute;top:0;left:0;width:100%;height:auto;aspect-ratio:3 / 2;z-index:2;pointer-events:none;overflow:hidden;}
#kv2-composition-guides[hidden] {display:none;}
#kv2-composition-guides path {fill:none;stroke:#116aac;stroke-width:1.2;vector-effect:non-scaling-stroke;}
#kv2-composition-guides #kv2-guide-marks {stroke:#b53355;stroke-width:2.2;}
.kv2-guide-panel select {font:inherit;max-width:100%;padding:8px;border:1px solid #b9c1bd;border-radius:8px;background:white;}
.kv2-guide-panel output {min-width:3rem;font-variant-numeric:tabular-nums;text-align:right;}

#kv2-symmetry-overlay {position:absolute;top:0;left:0;width:100%;height:auto;aspect-ratio:3 / 2;z-index:3;pointer-events:none;overflow:hidden;}
#kv2-symmetry-overlay[hidden]{display:none;}
#kv2-symmetry-lines{fill:none;stroke:#a73881;stroke-width:1.5;stroke-dasharray:8 5;vector-effect:non-scaling-stroke;opacity:.8;}
.kv2-symmetry-panel select{font:inherit;max-width:100%;padding:8px;border:1px solid #b9c1bd;border-radius:8px;background:white;}
.kv2-symmetry-panel output{min-width:3rem;text-align:right;font-variant-numeric:tabular-nums;}

#kv2-perspective-lock-overlay {position:absolute;top:0;left:0;width:100%;height:auto;aspect-ratio:3 / 2;z-index:4;pointer-events:none;overflow:hidden;}
#kv2-perspective-lock-overlay[hidden]{display:none;}
#kv2-perspective-lock-line{fill:none;stroke:#cc701c;stroke-width:2;vector-effect:non-scaling-stroke;stroke-dasharray:6 3;}

.kv2-size-panel select{font:inherit;max-width:100%;padding:8px;border:1px solid #b9c1bd;border-radius:8px;background:white;}
.kv2-size-inputs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
.kv2-size-inputs input{width:100%;min-width:0;box-sizing:border-box;}

/* Studio 8.1 – drawing-first layout, independent of the feed's 760px width. */
.aha-dashboard.kv2 { width: min(1520px, 100%); max-width: 1520px; box-sizing: border-box; padding-inline: clamp(8px, 1.5vw, 20px); }
.kv2 .kv2-heading { padding: 12px 16px; align-items: center; }
.kv2-heading h1 { margin: 0 0 4px; font-size: clamp(1.4rem, 2.3vw, 1.85rem); }
.kv2-heading .eyebrow, .kv2-heading h1 + p { margin-bottom: 4px; }
.kv2 .kv2-editor, .kv2 .kv2-panel { padding: clamp(10px, 1.5vw, 16px); }
.kv2-workspace { gap: 12px; margin-top: 10px; grid-template-columns: minmax(0, 1fr) 300px; }
.kv2-titlebar h2 { margin: 0; }
#kv2-focus-hint { margin: 4px 0; }
.kv2-toolbar { gap: 6px; margin-top: 8px; }
.kv2-toolbar > button, .kv2-zoom-controls > button, .kv2-actions > button, .kv2-actions > .kv2-file { min-height: 44px; padding: 7px 10px; font-size: .86rem; border-radius: 8px; }
.kv2-toolbar label { margin: 0 2px; }
.kv2-toolbar .kv2-swatch { min-width: 44px; min-height: 44px; }
.kv2-toolbar input[type="color"] { width: 44px; height: 44px; }
.kv2-paper { margin: 10px 0; padding: 8px; border-radius: 10px; }
.kv2-actions { margin-top: 8px; gap: 6px; }
.kv2-sidebar { gap: 12px; }
@media (max-width: 1100px) {
  .kv2-workspace { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 680px) {
  .kv2 .kv2-heading { padding: 10px; }
  .kv2-toolbar { align-items: center; }
  .kv2-toolbar label { width: auto; max-width: 100%; flex-wrap: wrap; justify-content: flex-start; }
  .kv2-toolbar .kv2-palette { width: 100%; gap: 4px; }
  .kv2-zoom-controls { max-width: 100%; }
  .kv2-paper { padding: 4px; }
}

/* Studio 8.1 – accessible icon strip and optional layer disclosure. */
.kv2-tool-strip { display:flex; flex:1 0 100%; flex-wrap:wrap; gap:4px; min-width:0; }
.kv2 .kv2-toolbar .kv2-icon-tool { display:inline-flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; min-width:48px; min-height:48px; padding:4px 5px; border-radius:8px; font-size:.68rem; line-height:1.1; }
.kv2-icon-tool svg { flex:none; display:block; }
.kv2-icon-tool span { white-space:nowrap; }
.kv2 .kv2-layer-disclosure > summary { cursor:pointer; padding:10px 0; min-height:44px; box-sizing:border-box; font-weight:600; }
.kv2-layer-disclosure > summary:focus-visible { outline:3px solid #4874a8; outline-offset:2px; }
@media(max-width:680px) { .kv2-tool-strip { gap:4px; } }

/* Studio 8.1 – contextual controls: respect hidden despite toolbar label flex rules. */
.kv2-toolbar > [hidden], .kv2-context-bar [hidden] { display:none !important; }
/* Keep the optional expanded overview's original flex layout. */
.kv2[data-studio-layout="overview"] .kv2-context-bar { display:contents; }
#kv2-gradient-panel:not([hidden]) { flex:1 0 100%; display:flex; flex-wrap:wrap; align-items:center; gap:6px; min-width:0; }
#kv2-gradient-panel .kv2-tip { flex-basis:100%; margin:4px 0; }

/* 9.1 – color-region preview is separate from all artwork canvases. */
#kv2-color-region-overlay{position:absolute;inset:0;width:100%;height:100%;z-index:2;pointer-events:none;}
#kv2-color-region-overlay[hidden],#kv2-color-region-panel[hidden]{display:none!important;}
#kv2-color-region-panel:not([hidden]){display:flex;flex:1 0 100%;flex-wrap:wrap;gap:8px;align-items:center;min-width:0;}
#kv2-color-region-info{flex-basis:100%;}

/* 9.5d: opt-in view-only prompt markers. CSS-pixel size stays readable at all zoom levels. */
#kv2-ai-points-overlay{position:absolute;top:0;left:0;z-index:5;overflow:hidden;pointer-events:none;}
#kv2-ai-points-overlay[hidden],#kv2-ai-region-controls[hidden],#kv2-color-region-panel [hidden]{display:none!important;}
#kv2-ai-region-controls:not([hidden]){display:flex;flex:1 0 100%;flex-wrap:wrap;align-items:center;gap:8px;min-width:0;}
.kv2-ai-point{position:absolute;transform:translate(-50%,-50%);display:grid;place-items:center;width:22px;height:22px;box-sizing:border-box;border:2px solid #fff;border-radius:50%;background:#197647;color:#fff;font:bold 16px/1 system-ui;box-shadow:0 1px 4px #0008;pointer-events:none;}
.kv2-ai-point[data-label="0"]{background:#b52935;}

/* Hidden opt-in controls must win against the normal icon-toolbar display rule. */
.kv2 #kv2-ai-region[hidden]{display:none!important;}

/* Studio 10.0a: three direct-access tool families, no extra mode or menu. */
.kv2-tool-strip {gap:6px 12px;align-items:flex-start;}
.kv2-tool-group {display:flex;flex-direction:column;gap:3px;min-width:0;max-width:100%;}
.kv2-tool-group-label {font-size:.7rem;font-weight:650;color:#63716c;line-height:1.25;letter-spacing:.015em;}
.kv2-tool-group-buttons {display:flex;flex-wrap:wrap;gap:4px;min-width:0;}
@media(max-width:680px) {
  .kv2-tool-strip {gap:7px 9px;}
  .kv2-tool-group-label {font-size:.68rem;}
}

/* 10.0b clone controls and view-only source crosshair. */
#kv2-clone-panel:not([hidden]){display:flex;flex:1 0 100%;align-items:center;flex-wrap:wrap;gap:6px;min-width:0;}
#kv2-clone-info{flex-basis:100%;margin:3px 0;}
#kv2-clone-marker{position:absolute;z-index:6;transform:translate(-50%,-50%);width:24px;height:24px;border:2px solid white;box-shadow:0 0 0 1px #222;box-sizing:border-box;border-radius:50%;background:#255b8c99;color:white;font:bold 18px/20px system-ui;text-align:center;pointer-events:none;}
#kv2-clone-marker[hidden]{display:none!important;}

/* 10.0d bounded layer-local photo perspective previews. */
#kv2-photo-perspective-source,#kv2-photo-perspective-result{display:block;width:100%;height:auto;max-width:320px;background:repeating-conic-gradient(#eee 0% 25%,#fff 0% 50%) 0/16px 16px;border:1px solid #b9c4bf;box-sizing:border-box;}
#kv2-photo-perspective-source{touch-action:none;cursor:crosshair;}
#kv2-photo-perspective-panel[hidden]{display:none!important;}

/* 10.0e selectable detail crop, equal before/after scale. */
#kv2-photo-detail-overview,#kv2-photo-detail-before,#kv2-photo-detail-after{display:block;max-width:100%;height:auto;background:repeating-conic-gradient(#eee 0% 25%,#fff 0% 50%) 0/16px 16px;}
#kv2-photo-detail-overview{touch-action:none;cursor:crosshair;}
.kv2-detail-comparison{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;}
.kv2-detail-comparison canvas{width:100%;height:auto;}
#kv2-photo-detail-panel[hidden]{display:none!important;}

/* 10.1a – compact, viewport-bound studio. Overview retains the previous layout. */
.kv2-studio-tabs,.kv2-studio-mount,#kv2-studio-close,#kv2-studio-context-mount:empty{display:none;}
.kv2 [data-studio-icon] svg{display:none;}
.kv2-studio-switch button{display:flex;align-items:center;gap:6px;min-height:44px;}
body.aha-product-shell main.aha-dashboard.kv2[data-studio-layout="compact"]{width:100%;max-width:none;height:calc(100dvh - var(--aha-global-header-height,54px) - var(--aha-global-footer-height,50px) - env(safe-area-inset-top) - env(safe-area-inset-bottom));margin:0 auto;padding:4px 8px;display:grid;grid-template-rows:auto auto minmax(0,1fr);gap:4px;overflow:hidden;}
.kv2[data-studio-layout="compact"] .kv2-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:4px 8px;margin:0;border-radius:8px;}
.kv2[data-studio-layout="compact"] .kv2-heading h1{font-size:1rem;margin:0;}
.kv2[data-studio-layout="compact"] .kv2-heading .eyebrow,.kv2[data-studio-layout="compact"] .kv2-heading h1~p,.kv2[data-studio-layout="compact"] .kv2-navigation{display:none;}
.kv2[data-studio-layout="compact"] .kv2-studio-tabs{display:flex;gap:3px;align-items:center;justify-content:flex-end;flex-wrap:wrap;min-width:0;}
.kv2[data-studio-layout="compact"] .kv2-studio-tabs button{display:flex;align-items:center;justify-content:center;gap:4px;min-width:44px;min-height:44px;padding:4px 8px;border-radius:7px;font-size:.74rem;}
.kv2[data-studio-layout="compact"] .kv2-workspace{position:relative;display:grid;grid-template-columns:minmax(0,1fr) minmax(210px, min(28vw,300px));gap:5px;margin:0;min-height:0;align-items:stretch;}
.kv2[data-studio-layout="compact"] .kv2-editor{display:grid;grid-template-columns:100px minmax(0,1fr);grid-template-rows:auto auto minmax(0,1fr) auto;gap:4px;padding:4px;margin:0;min-height:0;overflow:hidden;border-radius:8px;}
.kv2[data-studio-layout="compact"] .kv2-editor>.kv2-titlebar{grid-area:1/2;min-width:0;gap:4px;}
.kv2[data-studio-layout="compact"] .kv2-editor>.kv2-titlebar h2{font-size:.84rem;margin:0;}
.kv2[data-studio-layout="compact"] #kv2-status{font-size:.75rem;max-width:100%;overflow-wrap:anywhere;}
.kv2[data-studio-layout="compact"] #kv2-focus-mode{min-height:44px;font-size:.75rem;padding:4px 6px;}
.kv2[data-studio-layout="compact"] #kv2-focus-hint,.kv2[data-studio-layout="compact"] .kv2-editor>.kv2-tip{display:none;}
.kv2[data-studio-layout="compact"] .kv2-toolbar{display:contents;}
.kv2[data-studio-layout="compact"] .kv2-tool-strip{grid-area:1/1/5/2;display:flex;flex-direction:column;flex-wrap:nowrap;align-items:stretch;overflow:auto;gap:4px;padding:2px;border-right:1px solid #70807855;overscroll-behavior:contain;}
.kv2[data-studio-layout="compact"] .kv2-tool-group-label{display:none;}
.kv2[data-studio-layout="compact"] .kv2-tool-group-buttons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:3px;}
.kv2[data-studio-layout="compact"] .kv2-tool-group+.kv2-tool-group{border-top:1px solid #70807855;padding-top:4px;}
.kv2[data-studio-layout="compact"] .kv2-toolbar .kv2-icon-tool{min-width:44px;min-height:44px;padding:5px;gap:0;}
.kv2[data-studio-layout="compact"] .kv2-icon-tool span,.kv2[data-studio-layout="compact"] [data-studio-icon] span{display:none;}
.kv2[data-studio-layout="compact"] [data-studio-icon] svg{display:block;}
.kv2[data-studio-layout="compact"] [data-studio-icon]{min-height:44px;min-width:44px;display:inline-flex;align-items:center;justify-content:center;padding:5px;box-sizing:border-box;}
.kv2[data-studio-layout="compact"] .kv2-context-bar{grid-area:2/2;display:flex;align-items:center;flex-wrap:wrap;gap:4px;max-height:min(132px,22dvh);overflow:auto;min-width:0;overscroll-behavior:contain;padding:2px;}
.kv2[data-studio-layout="compact"] .kv2-context-bar [hidden],.kv2[data-studio-layout="compact"] [data-studio-panel] [hidden]{display:none!important;}
.kv2[data-studio-layout="compact"] .kv2-context-bar label{display:inline-flex;width:auto;max-width:100%;font-size:.76rem;gap:4px;margin:0;align-items:center;flex-wrap:wrap;}
.kv2[data-studio-layout="compact"] .kv2-context-bar input[type="range"]{width:90px;max-width:100%;}
.kv2[data-studio-layout="compact"] .kv2-context-bar .kv2-tip{margin:2px 0;font-size:.73rem;line-height:1.25;}
.kv2[data-studio-layout="compact"] .kv2-context-bar .kv2-palette{width:auto;flex-wrap:nowrap;gap:3px;max-width:100%;overflow-x:auto;}
.kv2[data-studio-layout="compact"] .kv2-context-bar .kv2-swatch{min-width:44px;min-height:44px;}
.kv2[data-studio-layout="compact"] .kv2-context-bar .kv2-text-panel{margin:0;padding:4px;gap:4px;width:100%;box-sizing:border-box;}
.kv2[data-studio-layout="compact"] .kv2-context-bar .kv2-text-panel textarea{min-height:44px;}
.kv2[data-studio-layout="compact"] .kv2-selection-tools:not(:has(button:not(:disabled))){display:none;}
.kv2[data-studio-layout="compact"] #kv2-studio-context-mount{flex-basis:100%;min-width:0;}
.kv2[data-studio-layout="compact"] .kv2-paper{grid-area:3/2;min-height:0;max-height:none;height:auto;margin:0;padding:4px;container-type:size;align-content:center;box-sizing:border-box;}
.kv2[data-studio-layout="compact"] .kv2-stage{width:min(100%,calc(100cqh * var(--kv2-aspect,1.5)));margin-inline:auto;}
.kv2[data-studio-layout="compact"] .kv2-actions{grid-area:4/2;display:flex;flex-wrap:nowrap;gap:4px;margin:0;overflow-x:auto;min-width:0;}
.kv2[data-studio-layout="compact"] .kv2-sidebar{display:block;overflow:auto;min-height:0;overscroll-behavior:contain;margin:0;position:relative;}
.kv2[data-studio-layout="compact"] .kv2-sidebar>section{display:none;margin:0;padding:7px;min-width:0;border-radius:8px;}
.kv2[data-studio-layout="compact"][data-studio-panel="layers"] .kv2-sidebar>[data-studio-panel="layers"]{display:block;}
.kv2[data-studio-layout="compact"][data-studio-panel="photo"] .kv2-sidebar>[data-studio-panel="photo"]{display:block;}
.kv2[data-studio-layout="compact"][data-studio-panel="mask"] .kv2-sidebar>[data-studio-panel="mask"]{display:block;}
.kv2[data-studio-layout="compact"][data-studio-panel="brush"] .kv2-sidebar>[data-studio-panel="brush"]{display:block;}
.kv2[data-studio-layout="compact"][data-studio-panel="guides"] .kv2-sidebar>[data-studio-panel="guides"]{display:block;}
.kv2[data-studio-layout="compact"][data-studio-panel="project"] .kv2-sidebar>[data-studio-panel="project"]{display:block;}
.kv2[data-studio-layout="compact"][data-studio-panel="help"] .kv2-sidebar>[data-studio-panel="help"]{display:block;}
.kv2[data-studio-layout="compact"] .kv2-sidebar .kv2-panel h2{font-size:.95rem;margin:0 0 6px;}
.kv2[data-studio-layout="compact"] .kv2-sidebar .kv2-tip{font-size:.76rem;line-height:1.35;margin:4px 0;}
.kv2[data-studio-layout="compact"] .kv2-sidebar label{font-size:.78rem;margin:6px 0 4px;}
.kv2[data-studio-layout="compact"] .kv2-sidebar .kv2-fold{margin:5px 0;padding:5px;}
.kv2[data-studio-layout="compact"] .kv2-layer-disclosure>p.kv2-tip:not(:has(strong)),.kv2[data-studio-layout="compact"] #kv2-merge-down-note{display:none;}
.kv2[data-studio-layout="compact"] .kv2-layer-actions{display:flex;flex-wrap:wrap;gap:3px;margin:6px 0;}
.kv2[data-studio-layout="compact"] .kv2-transform-tools{gap:4px;margin:4px 0;}
.kv2[data-studio-layout="compact"] .kv2-transform-tools>[data-studio-icon]{flex:0 0 44px;}
.kv2[data-studio-layout="compact"] .kv2-layers{margin:4px 0;gap:3px;}
.kv2[data-studio-layout="compact"] .kv2-layer{gap:3px;padding:3px;grid-template-columns:36px minmax(0,1fr) 50px 26px;}
.kv2[data-studio-layout="compact"] .kv2-layer button{min-height:44px;}
.kv2[data-studio-layout="compact"] .kv2-studio-mount>.aha-panel{margin:6px 0;padding:5px;}
.kv2[data-studio-layout="compact"] .kv2-studio-brush-note{font-size:.75rem;}
.kv2[data-studio-layout="compact"] .kv2-studio-brush-note:has(+ #kv2-brush-advanced:not([hidden])){display:none;}
.kv2[data-studio-layout="compact"][data-studio-focus="true"] .kv2-workspace{grid-template-columns:minmax(0,1fr);}
.kv2[data-studio-layout="compact"][data-studio-focus="true"] .kv2-heading{display:flex;}
.kv2[data-studio-layout="compact"][data-studio-focus="true"] .kv2-paper{max-height:none;}
.kv2[data-studio-layout="compact"][data-studio-focus="true"] .kv2-sidebar{display:none;}
@media(min-width:760px) and (max-width:1000px){.kv2[data-studio-layout="compact"] .kv2-studio-tabs button span{display:none;}}
@media(max-width:759px){
 .kv2[data-studio-layout="compact"] .kv2-workspace{grid-template-columns:minmax(0,1fr);}
 .kv2[data-studio-layout="compact"] .kv2-editor{grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto auto minmax(0,1fr) auto;}
 .kv2[data-studio-layout="compact"] .kv2-editor>.kv2-titlebar{grid-area:1/1;}
 .kv2[data-studio-layout="compact"] .kv2-tool-strip{grid-area:2/1;flex-direction:row;flex-wrap:wrap;border-right:0;gap:3px;max-height:145px;}
 .kv2[data-studio-layout="compact"] .kv2-tool-group-buttons{display:flex;flex-wrap:wrap;gap:2px;}
 .kv2[data-studio-layout="compact"] .kv2-tool-group+.kv2-tool-group{border-top:0;padding:0;}
 .kv2[data-studio-layout="compact"] .kv2-context-bar{grid-area:3/1;max-height:98px;}
 .kv2[data-studio-layout="compact"] .kv2-paper{grid-area:4/1;}
 .kv2[data-studio-layout="compact"] .kv2-actions{grid-area:5/1;}
 .kv2[data-studio-layout="compact"] .kv2-studio-tabs{justify-content:space-between;flex-wrap:nowrap;overflow:auto;}
 .kv2[data-studio-layout="compact"] .kv2-studio-tabs button{flex:1 0 44px;padding:4px;}.kv2[data-studio-layout="compact"] .kv2-studio-tabs button span{display:none;}
 .kv2[data-studio-layout="compact"] .kv2-sidebar{display:none;position:absolute;inset:0 0 0 auto;width:min(100%,340px);z-index:15;background:#f4f6f3;color:#1f2c2b;box-shadow:-4px 0 18px #0004;padding:6px;box-sizing:border-box;}
 .kv2[data-studio-layout="compact"][data-studio-inspector-open="true"]:not([data-studio-focus="true"]) .kv2-sidebar{display:block;}
 .kv2[data-studio-layout="compact"] #kv2-studio-close{display:flex;min-width:44px;min-height:44px;align-items:center;justify-content:center;margin:0 0 4px auto;}
}

/* 10.1b — drawing-first polish; no change to the document or pixel engine. */
.kv2-file-actions{display:contents;}
#kv2-studio-view-actions:empty{display:none;}
.kv2[data-studio-layout="compact"]{--studio-bg:#17191c;--studio-panel:#202327;--studio-line:#373c42;--studio-ink:#e9ecef;--studio-muted:#abb5bf;--studio-active:#314b43;--studio-accent:#9cd1b6;color:var(--studio-ink);}
body.aha-product-shell main.aha-dashboard.kv2[data-studio-layout="compact"]{gap:3px;padding:3px 5px;background:var(--studio-bg);}
.kv2[data-studio-layout="compact"] .kv2-heading,.kv2[data-studio-layout="compact"] .kv2-editor,.kv2[data-studio-layout="compact"] .kv2-sidebar>section{background:var(--studio-panel);color:var(--studio-ink);box-shadow:none;border:0;border-radius:4px;}
.kv2[data-studio-layout="compact"] .kv2-heading{padding:0 5px;}
.kv2[data-studio-layout="compact"] .kv2-studio-tabs{gap:1px;min-height:44px;}
.kv2[data-studio-layout="compact"] .kv2-studio-tabs button,.kv2[data-studio-layout="compact"] .kv2-toolbar .kv2-icon-tool,.kv2[data-studio-layout="compact"] [data-studio-icon],.kv2[data-studio-layout="compact"] #kv2-studio-view-actions>.kv2-icon-tool,.kv2[data-studio-layout="compact"] #kv2-studio-layout,.kv2[data-studio-layout="compact"] #kv2-focus-mode,.kv2[data-studio-layout="compact"] #kv2-studio-close{color:var(--studio-ink);background:transparent;border:1px solid transparent;border-radius:5px;box-shadow:none;min-height:44px;}
.kv2[data-studio-layout="compact"] :is(.kv2-studio-tabs button,.kv2-icon-tool,[data-studio-icon],#kv2-studio-layout,#kv2-focus-mode,#kv2-studio-close):hover{background:#343b40;}
.kv2[data-studio-layout="compact"] :is(.kv2-studio-tabs button,.kv2-icon-tool,[data-studio-icon],#kv2-studio-layout,#kv2-focus-mode)[aria-pressed="true"]{background:var(--studio-active);color:var(--studio-accent);border-color:#608874;}
.kv2[data-studio-layout="compact"] :is(.kv2-studio-tabs button,.kv2-icon-tool,[data-studio-icon],#kv2-studio-layout,#kv2-studio-close) svg{width:22px;height:22px;flex:none;}
.kv2[data-studio-layout="compact"] .kv2-studio-tabs button{padding:3px 7px;}
.kv2[data-studio-layout="compact"] .kv2-titlebar output{color:var(--studio-muted);}
.kv2[data-studio-layout="compact"] .kv2-editor>.kv2-titlebar h2{font-size:.77rem;font-weight:500;color:var(--studio-muted);}
.kv2[data-studio-layout="compact"] .kv2-tool-strip{padding:1px;gap:3px;border-color:var(--studio-line);}
.kv2[data-studio-layout="compact"] .kv2-tool-group-buttons{gap:2px;}
.kv2[data-studio-layout="compact"] .kv2-tool-group+.kv2-tool-group{border-color:var(--studio-line);padding-top:3px;}
.kv2[data-studio-layout="compact"] .kv2-context-bar{gap:5px;padding:0 3px;align-content:flex-start;background:var(--studio-panel);border-top:1px solid var(--studio-line);border-bottom:1px solid var(--studio-line);}
.kv2[data-studio-layout="compact"] .kv2-context-bar:not(:has(#kv2-clone-panel:not([hidden]),#kv2-color-region-panel:not([hidden]),#kv2-gradient-panel:not([hidden]),#kv2-text-panel:not([hidden]),.kv2-selection-tools button:not(:disabled))){flex-wrap:nowrap;max-height:52px;overflow-x:auto;overflow-y:hidden;align-items:center;}
.kv2[data-studio-layout="compact"] .kv2-context-bar>label{flex-shrink:0;min-height:44px;}
.kv2[data-studio-layout="compact"] .kv2-context-bar select,.kv2[data-studio-layout="compact"] .kv2-context-bar>button{min-height:44px;}
.kv2[data-studio-layout="compact"] #kv2-studio-context-mount:not(:has(#kv2-text-panel:not([hidden]),.kv2-selection-tools button:not(:disabled))){display:none;}
.kv2[data-studio-layout="compact"] .kv2-paper{background:#34383c;border:0;border-radius:3px;padding:2px;}
.kv2[data-studio-layout="compact"] .kv2-actions{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px;border-top:1px solid var(--studio-line);overflow:visible;}
.kv2[data-studio-layout="compact"] .kv2-file-actions{display:flex;gap:1px;min-width:0;overflow-x:auto;align-items:center;}
.kv2[data-studio-layout="compact"] #kv2-studio-view-actions{display:flex;gap:1px;align-items:center;justify-content:flex-end;border-left:1px solid var(--studio-line);min-width:0;}
.kv2[data-studio-layout="compact"] #kv2-studio-view-actions>.kv2-icon-tool{display:inline-flex;align-items:center;justify-content:center;min-width:44px;padding:4px;}
.kv2[data-studio-layout="compact"] #kv2-studio-view-actions .kv2-zoom-controls{flex-wrap:nowrap;gap:1px;}
.kv2[data-studio-layout="compact"] #kv2-studio-view-actions #kv2-zoom-value{font-size:.75rem;min-width:45px;}
.kv2[data-studio-layout="compact"] #kv2-studio-view-actions #kv2-zoom-reset{min-width:44px;}
.kv2[data-studio-layout="compact"] .kv2-sidebar{background:var(--studio-panel);border-left:1px solid var(--studio-line);}
.kv2[data-studio-layout="compact"] .kv2-sidebar .kv2-tip,.kv2[data-studio-layout="compact"] .kv2-context-bar .kv2-tip{color:var(--studio-muted);}
.kv2[data-studio-layout="compact"] .kv2-sidebar :is(.kv2-fold,.kv2-named-groups,.kv2-adjustments,.kv2-mask-panel,.kv2-project--saved),.kv2[data-studio-layout="compact"] .kv2-text-panel{background:#262a2e;border-color:var(--studio-line);color:var(--studio-ink);border-radius:5px;box-shadow:none;}
.kv2[data-studio-layout="compact"] .kv2-sidebar .kv2-fold summary{color:var(--studio-ink);}
.kv2[data-studio-layout="compact"] .kv2-layer{border:0;border-bottom:1px solid var(--studio-line);border-radius:3px;grid-template-columns:44px minmax(0,1fr) 48px 25px;}
.kv2[data-studio-layout="compact"] .kv2-layer.kv2-selected{background:var(--studio-active);}
.kv2[data-studio-layout="compact"] .kv2-layer button{background:transparent;color:var(--studio-ink);border-color:transparent;border-radius:4px;}
.kv2[data-studio-layout="compact"] .kv2-layer button[aria-pressed="true"]{color:var(--studio-accent);}
.kv2[data-studio-layout="compact"] .kv2-sidebar .kv2-palette{display:grid;grid-template-columns:repeat(auto-fit,minmax(44px,1fr));gap:3px;padding:3px 0;}
.kv2[data-studio-layout="compact"] .kv2-sidebar .kv2-swatch{background:var(--kv2-swatch);min-width:44px;min-height:44px;border:2px solid #adb7bf;border-radius:50%;padding:0;box-shadow:inset 0 0 0 2px #202327;}
.kv2[data-studio-layout="compact"] .kv2-sidebar .kv2-swatch[aria-pressed="true"]{outline:2px solid var(--studio-accent);outline-offset:1px;}
@media(min-width:760px){
 body.aha-product-shell main.aha-dashboard.kv2[data-studio-layout="compact"]{grid-template-columns:auto minmax(0,1fr);grid-template-rows:44px minmax(0,1fr);}
 .kv2[data-studio-layout="compact"] .kv2-heading{grid-area:1/1;}
 .kv2[data-studio-layout="compact"] .kv2-studio-tabs{grid-area:1/2;flex-wrap:nowrap;overflow-x:auto;}
 .kv2[data-studio-layout="compact"] .kv2-workspace{grid-area:2/1/3/3;grid-template-columns:minmax(0,1fr) minmax(212px,min(24vw,275px));}
 .kv2[data-studio-layout="compact"] .kv2-editor{grid-template-columns:94px minmax(0,1fr);gap:2px;padding:2px;}
 .kv2[data-studio-layout="compact"] .kv2-tool-group-buttons{grid-template-columns:repeat(2,44px);}
}
@media(max-width:759px){
 .kv2[data-studio-layout="compact"] .kv2-tool-strip{display:grid;grid-template-columns:repeat(auto-fit,minmax(44px,1fr));gap:2px;max-height:140px;}
 .kv2[data-studio-layout="compact"] .kv2-tool-group,.kv2[data-studio-layout="compact"] .kv2-tool-group-buttons{display:contents;}
 .kv2[data-studio-layout="compact"] .kv2-actions{grid-template-columns:minmax(0,1fr);gap:1px;}
 .kv2[data-studio-layout="compact"] #kv2-studio-view-actions{border-left:0;justify-content:center;border-top:1px solid var(--studio-line);}
 .kv2[data-studio-layout="compact"] .kv2-sidebar{background:var(--studio-panel);color:var(--studio-ink);}
}
/* Keep focus mode spanning the whole workspace even after the desktop grid refinement. */
.kv2[data-studio-layout="compact"][data-studio-focus="true"] .kv2-workspace{grid-template-columns:minmax(0,1fr);}

/* 10.1c — portrait and narrow tablet: keep the full-width drawing surface.
   Same predicate as studioDocked(); no artwork is resized or reloaded. */
.kv2-mobile-settings-icon{display:none;}
@media (min-width:760px) and (max-width:999px), (min-width:760px) and (orientation:portrait){
 .kv2[data-studio-layout="compact"] .kv2-workspace{grid-template-columns:minmax(0,1fr);}
 .kv2[data-studio-layout="compact"] .kv2-sidebar{display:none;position:absolute;inset:0 0 0 auto;width:min(360px,90%);z-index:15;box-sizing:border-box;padding:5px;box-shadow:-5px 0 20px #0006;}
 .kv2[data-studio-layout="compact"][data-studio-inspector-open="true"]:not([data-studio-focus="true"]) .kv2-sidebar{display:block;}
 .kv2[data-studio-layout="compact"] #kv2-studio-close{display:flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;margin:0 0 4px auto;}
 .kv2[data-studio-layout="compact"] .kv2-studio-tabs button span{display:none;}
}
.kv2[data-studio-layout="compact"] #kv2-studio-close{position:sticky;top:0;z-index:2;background:var(--studio-panel);}
.kv2[data-studio-layout="compact"] .kv2-paper{align-content:safe center;}
.kv2[data-studio-layout="compact"] .kv2-context-bar select{max-width:100%;min-width:0;}
@media(max-width:759px){
 .kv2[data-studio-layout="compact"] .kv2-context-bar .kv2-context-caption{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;}
 .kv2[data-studio-layout="compact"] #kv2-context-brush{min-width:0;flex:1 1 112px;}
 .kv2[data-studio-layout="compact"] #kv2-brush-preset{width:100%;min-width:0;max-width:160px;font-size:.8rem;padding:5px;}
 .kv2[data-studio-layout="compact"] #kv2-context-size{min-width:0;flex:0 1 92px;flex-wrap:nowrap;}
 .kv2[data-studio-layout="compact"] #kv2-context-size input{width:64px;min-width:35px;max-width:100%;flex:1 1 auto;min-height:44px;}
 .kv2[data-studio-layout="compact"] #kv2-size-value{min-width:18px;text-align:right;}
 .kv2[data-studio-layout="compact"] #kv2-color{width:44px;height:44px;min-width:44px;}
 .kv2[data-studio-layout="compact"] #kv2-brush-settings-jump:not([hidden]){display:inline-flex;align-items:center;justify-content:center;flex:0 0 44px;min-width:44px;padding:4px;}
 .kv2[data-studio-layout="compact"] #kv2-brush-settings-jump .kv2-mobile-settings-icon{display:block;}
 .kv2[data-studio-layout="compact"] #kv2-brush-settings-jump span{display:none;}
 .kv2[data-studio-layout="compact"] .kv2-context-bar:has(#kv2-brush-settings-jump:not([hidden])){flex-wrap:wrap;max-height:100px;overflow-y:auto;}
 .kv2[data-studio-layout="compact"] .kv2-context-bar label{min-width:0;}
}
