/* Pop Boll — the skin editor on /palettes (docs/PALETTES.md §13; SK03). Colours are palette tokens only;
   inside .pompa the skin's own variables (--pk-*) come from Pompa's skin.js. */
.sk-editor { margin-top: 1.5rem; }
.sk-layout { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 720px) { .sk-layout { grid-template-columns: minmax(0, 1fr); } }
.sk-fields { display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem; padding: 0.5rem 0; }
.sk-field { display: flex; flex-direction: column; gap: 0.2rem; min-width: 7.5rem; }
.sk-field .input { max-width: 100%; }
.sk-check { flex-direction: row; align-items: center; }
.sk-colours .sk-colour { min-width: 12rem; }
.sk-part { border-top: 1px solid var(--line); padding: 0.4rem 0; }
.sk-part summary { cursor: pointer; }
.sk-size { margin-top: 0.4rem; }
.sk-file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.sk-import { position: relative; cursor: pointer; }
.sk-keys { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0.4rem 0; }
.sk-brush { display: inline-flex; gap: 0.25rem; align-items: center; }

/* the painter */
.sk-paint { display: block; max-width: 320px; touch-action: none; cursor: crosshair; background: var(--well); border: 2px solid var(--frame); }
.sk-paint-wide { max-width: 320px; }
.sk-paint-svg { display: block; width: 100%; height: auto; }
.sk-gridlines line { stroke: var(--line); stroke-width: 1px; vector-effect: non-scaling-stroke; opacity: 0.6; }

/* the matrix glyph: 13 x 8 lights */
.sk-glyph-grid { display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 3px; max-width: 320px; padding: 6px;
  background: var(--ink); border: 2px solid var(--frame); }
.sk-led { aspect-ratio: 1; min-width: 0; padding: 0; border: 0; border-radius: 50%; cursor: pointer; background: var(--well); }
.sk-led-1 { background: var(--led); }
.sk-led-2 { background: color-mix(in oklch, var(--led) 45%, var(--well)); }
.sk-led:focus-visible { outline: 2px solid var(--secondary); outline-offset: 1px; }

/* the preview: a small Pompa wearing the skin */
.sk-preview { display: flex; flex-direction: column; gap: calc(var(--pk-gap, 8px) * var(--pk-density, 1));
  padding: calc(var(--pk-gap, 8px) * var(--pk-density, 1)); background: var(--pk-c-screen, var(--bg)); color: var(--pk-c-text, var(--text));
  border: var(--pk-border, 2px) solid var(--pk-c-frame, var(--frame)); border-radius: var(--pk-radius, 2px);
  font-family: var(--pk-font, inherit); font-size: calc(13px * var(--pk-scale, 1)); text-transform: var(--pk-case, uppercase);
  box-shadow: var(--pk-shadow, none); }
.sk-preview .sk-head { font-family: var(--pk-font-display, inherit); font-size: 1.3em; color: var(--pk-c-accent, var(--primary)); }
.sk-preview .sk-head .pk-sprite { width: 64px; height: 32px; }
.sk-preview .sk-transport { display: flex; gap: 4px; }
.sk-preview.pk-tr-bottom .sk-transport { order: 5; }
.sk-preview .sk-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px;
  background: var(--pk-c-card); color: var(--pk-c-card-text); border: var(--pk-border) solid var(--pk-c-line); border-radius: var(--pk-radius); }
.sk-preview .sk-btn .pk-sprite { width: 24px; height: 24px; }
.sk-preview .sk-np { display: flex; gap: calc(var(--pk-gap) * var(--pk-density)); align-items: flex-start; }
.sk-preview.pk-np-stack .sk-np, .sk-preview.pk-np-deck .sk-np { flex-direction: column; }
.sk-preview .sk-tile { flex: none; padding: 4px; background: var(--pk-c-tile); color: var(--pk-c-tile-text);
  border: var(--pk-border) solid var(--pk-c-now); border-radius: var(--pk-radius); }
.sk-preview .sk-cover { display: flex; align-items: center; justify-content: center; width: calc(64px * var(--pk-tile));
  height: calc(64px * var(--pk-tile)); font-size: 2em; }
.sk-preview .sk-cover .pk-sprite { width: 100%; height: 100%; }
.sk-preview .sk-meta { min-width: 0; flex: 1; }
.sk-preview .sk-title { margin: 0; font-family: var(--pk-font-display, inherit); }
.sk-preview .sk-muted { margin: 0; color: var(--pk-c-muted); }
.sk-preview .sk-seek { height: 6px; margin: 6px 0; background: var(--pk-c-well); border-radius: var(--pk-radius); overflow: hidden; }
.sk-preview .sk-seek-fill { width: 40%; height: 100%; background: var(--pk-c-seek); }
.sk-preview .sk-notes { display: flex; flex-wrap: wrap; gap: 2px; color: var(--pk-c-note-on); }
.sk-preview.pk-notes-grid .sk-notes { display: grid; grid-template-columns: repeat(4, max-content); }
.sk-preview .sk-notes .pk-sprite { width: 16px; height: 16px; }
.sk-preview .sk-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.sk-preview .sk-card { padding: calc(4px * var(--pk-card)) 6px; background: var(--pk-c-card); color: var(--pk-c-card-text);
  border-radius: var(--pk-radius); }
.sk-preview .sk-hidden { color: var(--pk-c-hidden); }
/* the site's .input grows in flex rows; here every field keeps its own height */
.sk-editor .input { flex: none; min-height: 40px; font-size: 16px; }
.sk-editor .cta-row > .input { flex: 1 1 14rem; }
.sk-fields { align-items: flex-start; }

/* the market's skin tag and report picker (SK04) */
.pal-item-skin { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.pal-report .input { flex: none; min-height: 32px; font-size: 13px; }

/* settings: hidden palettes (SK04b) */
.pal-settings { margin-top: 1.5rem; border-top: 1px solid var(--line); padding-top: 0.6rem; }
.pal-settings > summary { cursor: pointer; }
.pal-hidden-list .pal-item-head { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
