/* Ателье — canvas-first tool UI. Tokens follow Telegram themeParams when present. */

:root {
  --bg: var(--tg-theme-bg-color, #0e0f10);
  --text: var(--tg-theme-text-color, #f2f2f0);
  --hint: var(--tg-theme-hint-color, #9a9a94);
  --btn: var(--tg-theme-button-color, #c4a15a);
  --btn-text: var(--tg-theme-button-text-color, #16140e);
  --sec: var(--tg-theme-secondary-bg-color, #1a1b1d);
  --header: var(--tg-theme-header-bg-color, var(--bg));
  --line: color-mix(in srgb, var(--text) 14%, transparent);
  --stage: #d4cfc4;
  --danger: var(--tg-theme-destructive-text-color, #e05555);
  --tg-vh: var(--tg-viewport-stable-height, 100dvh);
  --safe-t: calc(var(--tg-safe-area-inset-top, env(safe-area-inset-top, 0px)) + var(--tg-content-safe-area-inset-top, 0px));
  --safe-b: calc(var(--tg-safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)) + var(--tg-content-safe-area-inset-bottom, 0px));
  --safe-l: calc(var(--tg-safe-area-inset-left, env(safe-area-inset-left, 0px)) + var(--tg-content-safe-area-inset-left, 0px));
  --safe-r: calc(var(--tg-safe-area-inset-right, env(safe-area-inset-right, 0px)) + var(--tg-content-safe-area-inset-right, 0px));
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --radius: 8px;
  --radius-lg: 12px;
  --fs-caption: 11px;
  --fs-body: 13px;
  --fs-ui: 15px;
  --fs-title: 17px;
  --fs-display: 22px;
  --ease: 180ms ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Roboto, sans-serif;
  font-size: 16px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: var(--tg-vh, 100dvh); background: var(--bg); color: var(--text); overflow: hidden; }
button { font-family: inherit; cursor: pointer; color: inherit; border: 0; background: transparent; }
button:focus-visible { outline: 2px solid var(--btn); outline-offset: 2px; }

/* Shell */
#app {
  height: var(--tg-vh, 100dvh);
  display: flex;
  flex-direction: column;
  padding-top: var(--safe-t);
  padding-left: var(--safe-l, 0px);
  padding-right: var(--safe-r, 0px);
  background: var(--bg);
}
#app > .view { flex: 1 1 auto; min-height: 0; overflow: auto; }
.section-root { display: flex; flex-direction: column; overflow: hidden; background: var(--bg); }

.tabs {
  flex: 0 0 auto;
  display: flex;
  gap: var(--space-1);
  padding: 6px 8px calc(6px + var(--safe-b));
  background: var(--bg);
  border-top: 1px solid var(--line);
  transition: opacity var(--ease), transform var(--ease);
}
.tab {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--hint);
  font-weight: 650;
  font-size: 12px;
  height: 40px;
  border-radius: var(--radius);
}
.tab.on { background: var(--sec); color: var(--text); }
#app.focus-mode .tabs { display: none; }

/* Home */
.home { padding: 20px 16px 28px; }
.home h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 4px;
}
.home-lead { margin: 0 0 20px; color: var(--hint); font-size: var(--fs-body); line-height: 1.4; }
.home-cards { display: flex; flex-direction: column; gap: var(--space-3); }
.home-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 0;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--sec);
  color: var(--text);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-align: left;
  min-height: 112px;
  transition: border-color var(--ease);
}
.home-card:active { border-color: var(--btn); }
.home-card img {
  width: 112px; height: 112px;
  object-fit: cover; display: block; background: #2a2a28;
}
.home-card-body { padding: 12px 14px; display: flex; flex-direction: column; justify-content: center; gap: 2px; min-width: 0; }
.home-card-kicker {
  font-size: 11px; font-weight: 650; color: var(--hint);
  text-transform: uppercase; letter-spacing: .06em;
}
.home-card-title { font-size: var(--fs-title); font-weight: 700; letter-spacing: -0.02em; }
.home-card-meta { font-size: var(--fs-caption); color: var(--hint); }

/* Embroidery: chart fills the section; chrome floats on top */
.emb-root {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  z-index: 0;
  display: flex;
  flex-direction: column;
  background: var(--stage);
}
.emb-root .stage {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  background: var(--stage);
}
#viewer, #viewer .openseadragon-container { width: 100%; height: 100%; }

.stage, #viewer, #viewer canvas, .openseadragon-container, .openseadragon-canvas, .openseadragon-container canvas {
  touch-action: none !important;
  user-select: none;
  -webkit-user-select: none;
  overscroll-behavior: none;
}

.emb-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 8;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 0 8px;
  padding: 8px 12px 8px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  transition: opacity var(--ease), transform var(--ease);
}
.emb-top .scheme-name { grid-column: 1; grid-row: 1; }
.emb-top-end { grid-column: 2; grid-row: 1; display: flex; align-items: center; gap: 8px; }
.emb-top .bar { grid-column: 1 / -1; grid-row: 2; margin: 8px 0 0; }
.scheme-name {
  border: 0; background: transparent; color: inherit;
  font-size: var(--fs-title); font-weight: 650; letter-spacing: -0.02em;
  text-align: left; padding: 0; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.scheme-name::after { content: " ▾"; font-size: 11px; color: var(--hint); font-weight: 500; }
.pct {
  font-size: var(--fs-ui);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--btn);
}
.bar {
  height: 2px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--text) 22%, transparent);
  overflow: hidden;
}
.bar i { display: block; height: 100%; width: 0; background: var(--btn); transition: width .2s ease; }

.chrome-btn, .zoom-stack button, .focus-exit {
  border: 0;
  background: var(--sec);
  color: var(--text);
  width: 36px; height: 36px;
  border-radius: var(--radius);
  display: grid; place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  transition: background var(--ease), border-color var(--ease), opacity var(--ease);
}
.chrome-btn svg, .zoom-stack button svg, .focus-exit svg,
.mode-btn svg, .pal-btn svg, .ico {
  width: 18px; height: 18px;
  stroke: currentColor; fill: none;
  stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}
.zoom-stack button:disabled { opacity: .4; }

/* Floating tool dock: one panel (two rows at most), zoom cluster on the same baseline */
.palette {
  position: absolute;
  left: calc(8px + var(--safe-l, 0px));
  bottom: 8px;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  padding: 4px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: opacity var(--ease), transform var(--ease);
}
.palette-row[hidden] { display: none; }
.mode-seg, .palette-row {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}
.mode-btn, .pal-btn {
  border: 0;
  background: transparent;
  color: var(--hint);
  border-radius: var(--radius);
  min-width: 44px;
  height: 40px;
  padding: 2px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  font-size: 9px;
  font-weight: 650;
  line-height: 1.1;
  transition: background var(--ease), color var(--ease);
}
.pal-btn { min-width: 40px; }
.mode-btn.on, .pal-btn.on {
  background: var(--btn);
  color: var(--btn-text);
}
.unit-seg {
  display: flex;
  align-items: center;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}
.unit-seg button {
  border: 0;
  background: transparent;
  color: var(--hint);
  border-radius: var(--radius);
  height: 40px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 650;
}
.unit-seg button.on { background: var(--btn); color: var(--btn-text); }

.zoom-stack {
  position: absolute;
  right: calc(8px + var(--safe-r, 0px));
  bottom: 8px;
  z-index: 8;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: opacity var(--ease), transform var(--ease);
}
.zoom-stack button {
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
}

/* Layers popover */
.popover {
  position: absolute;
  z-index: 12;
  min-width: 168px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
.popover[hidden] { display: none; }
.popover button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  border-radius: var(--radius);
  height: 40px;
  padding: 0 10px;
  font-size: var(--fs-body);
  font-weight: 600;
}
.popover button.on { background: var(--sec); color: var(--btn); }

/* Active filter chip */
.filter-chip {
  position: absolute;
  left: 8px;
  right: 8px;
  top: 58px;
  z-index: 9;
  display: flex;
  align-items: center;
  gap: 2px;
  width: max-content;
  max-width: calc(100% - 16px);
  margin: 0 auto;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 2px 2px 4px;
  transition: opacity var(--ease);
}
.filter-chip[hidden] { display: none; }
.filter-chip-open {
  border: 0;
  background: transparent;
  color: inherit;
  font-size: var(--fs-caption);
  font-weight: 650;
  padding: 6px 8px;
  border-radius: 999px;
}
.filter-chip-reset {
  border: 0;
  background: transparent;
  color: var(--hint);
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding: 0;
}
.filter-chip-reset svg { width: 14px; height: 14px; }
.emb-root.filter-on .cell-pill { top: 98px; }

/* Cell info pill */
.cell-pill {
  position: absolute;
  left: 8px;
  right: 8px;
  top: 58px;
  z-index: 9;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100% - 16px);
  margin: 0 auto;
  width: max-content;
  max-width: calc(100% - 16px);
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px 6px 6px;
  pointer-events: none;
  transition: opacity var(--ease);
}
.cell-pill[hidden] { display: none; }
.ci-swatch {
  width: 32px; height: 32px; border-radius: 50%;
  flex: 0 0 auto;
  display: grid; place-items: center;
  border: 1px solid color-mix(in srgb, var(--text) 16%, transparent);
  overflow: hidden;
}
.ci-swatch svg { width: 18px; height: 18px; }
.ci-text { min-width: 0; }
.ci-cell { font-size: var(--fs-body); font-weight: 650; letter-spacing: -0.01em; }
.ci-meta { font-size: var(--fs-caption); color: var(--hint); line-height: 1.3; }

#toast {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  pointer-events: none;
  z-index: 10;
  white-space: nowrap;
}
#toast[hidden] { display: none; }

.focus-exit {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 15;
  width: 40px; height: 40px;
  display: none;
}
.emb-root.focus .emb-top,
.emb-root.focus .palette,
.emb-root.focus .zoom-stack,
.emb-root.focus .popover,
.emb-root.focus .cell-pill,
.emb-root.focus .filter-chip { display: none; }
.emb-root.focus .focus-exit { display: grid; }

/* Sheets */
.sheet[hidden] { display: none; }
.sheet { position: fixed; inset: 0; z-index: 40; }
body.sheet-open .zoom-stack,
body.sheet-open .palette,
body.sheet-open .popover { visibility: hidden; pointer-events: none; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.sheet-card {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-height: 80dvh;
  background: var(--bg);
  border-radius: 16px 16px 0 0;
  display: flex; flex-direction: column;
  padding-bottom: var(--safe-b);
  border-top: 1px solid var(--line);
  animation: sheet-up 180ms ease;
}
.sheet-card.has-foot { padding-bottom: 0; }
.sheet-foot {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  padding: 8px 12px calc(8px + var(--safe-b));
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.sheet-foot[hidden] { display: none; }
.sheet-foot button {
  flex: 1;
  height: 44px;
  border: 0;
  border-radius: var(--radius);
  font-size: var(--fs-ui);
  font-weight: 650;
  background: var(--sec);
  color: var(--text);
}
.sheet-foot .primary { background: var(--btn); color: var(--btn-text); }

@keyframes sheet-up {
  from { transform: translateY(12px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.sheet-handle { width: 36px; height: 4px; border-radius: 4px; background: var(--hint); opacity: .4; margin: 8px auto 0; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px 6px; }
.sheet-head h2 { margin: 0; font-size: var(--fs-title); font-weight: 650; }
.icon-x {
  border: 0; background: var(--sec); color: var(--text);
  width: 32px; height: 32px; border-radius: 16px; font-size: 20px;
  display: grid; place-items: center;
}
.sheet-body { overflow: auto; padding: 0 12px 16px; -webkit-overflow-scrolling: touch; }

.legend-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 8px 10px;
  margin: 0 0 4px;
  border: 0;
  background: var(--sec);
  width: 100%;
  text-align: left;
  color: inherit;
  border-radius: var(--radius);
}
.legend-row.sel { background: color-mix(in srgb, var(--btn) 18%, var(--sec)); }
.swatch {
  width: 40px; height: 40px; border-radius: var(--radius);
  display: grid; place-items: center; flex: 0 0 auto;
  border: 0;
}
.swatch svg { width: 22px; height: 22px; }
.legend-meta { min-width: 0; }
.legend-meta .id { font-weight: 650; font-size: 14px; }
.legend-meta .sub { font-size: 11px; color: var(--hint); }
.legend-bar {
  height: 3px;
  margin-top: 6px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--text) 12%, transparent);
  overflow: hidden;
}
.legend-bar i { display: block; height: 100%; background: var(--btn); }
.legend-actions { display: flex; gap: 4px; }
.legend-actions button {
  border: 0; background: var(--sec); color: var(--text);
  border-radius: 8px; min-width: 32px; height: 32px; font-size: 13px; font-weight: 600;
}
.legend-actions .done.on { background: var(--btn); color: var(--btn-text); }

.scheme-row {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--sec);
  color: var(--text);
  border-radius: var(--radius-lg);
  padding: 8px;
  margin: 0 0 8px;
}
.scheme-row.on { border-color: var(--btn); }
.scheme-row img {
  width: 72px; height: 72px; object-fit: cover; border-radius: 8px; background: #2a2a28; display: block;
}
.scheme-row .tile-title { display: block; font-size: var(--fs-ui); font-weight: 700; }
.scheme-row .tile-sub { display: block; font-size: var(--fs-caption); color: var(--hint); margin-top: 2px; }
.scheme-row .scheme-pct { font-size: var(--fs-ui); font-weight: 650; color: var(--btn); font-variant-numeric: tabular-nums; }

.settings-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--line); font-size: 14px; }
.settings-row button, .danger {
  border: 0; background: var(--sec); color: var(--text); border-radius: 10px; padding: 8px 12px; font-weight: 600;
}
.toggle {
  width: 44px; height: 26px; border-radius: 13px; background: var(--sec); position: relative; border: 0; padding: 0;
}
.toggle.on { background: var(--btn); }
.toggle i { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .15s; }
.toggle.on i { left: 21px; }
.danger { background: color-mix(in srgb, var(--danger) 80%, var(--sec)); color: #fff; width: 100%; margin-top: 12px; }

.stats, .about, .io { margin-top: 16px; padding-top: 10px; border-top: 1px solid var(--line); }
.stats h3, .about h3, .io h3 { margin: 0 0 8px; font-size: 15px; }
.stats p, .about p, .io p { margin: 0 0 8px; font-size: 13px; line-height: 1.4; }
.stats-table { display: flex; flex-direction: column; gap: 4px; max-height: 30vh; overflow: auto; }
.stats-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.stats-row i { width: 12px; height: 12px; border-radius: 3px; flex: 0 0 auto; }
.stats-row span { flex: 1; }
.stats-row b { font-variant-numeric: tabular-nums; }
.io textarea {
  width: 100%; min-height: 90px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--sec); color: var(--text); padding: 8px; font-size: 11px; font-family: ui-monospace, monospace;
}
.io-btns { display: flex; gap: 8px; margin-top: 8px; }
.io-btns button, .io-btns .dock-btn {
  flex: 1; height: 36px; border: 0; border-radius: var(--radius);
  background: var(--sec); color: var(--text); font-weight: 600; font-size: 13px;
}
.sk-sub { margin: 0 0 10px; color: var(--hint); font-size: 13px; line-height: 1.4; }
code { font-size: 11px; }

#boot {
  position: fixed; inset: 0; display: grid; place-items: center;
  background: var(--bg); color: var(--hint); z-index: 50; font-size: 14px;
}
#boot.hide { opacity: 0; pointer-events: none; transition: opacity .25s; }

#gate {
  min-height: var(--tg-vh, 100dvh);
  display: grid; place-items: center;
  padding: 24px;
  background: var(--bg);
  color: var(--text);
}
#gate[hidden] { display: none; }
.gate-card { max-width: 320px; text-align: center; }
.gate-card h1 { margin: 0 0 10px; font-size: 24px; }
.gate-card p { margin: 0; color: var(--hint); line-height: 1.45; }

/* Sketches */
.sk-page { padding: 16px 14px 32px; }
.sk-head h1 { margin: 0 0 4px; font-size: 24px; font-weight: 700; letter-spacing: -0.03em; }
.sk-project { margin-top: 8px; }
.sk-project h2 { margin: 12px 0 4px; font-size: 18px; font-weight: 700; }
.sk-ver { margin: 16px 0 4px; font-size: 13px; font-weight: 650; color: var(--hint); text-transform: uppercase; letter-spacing: .04em; }
.sk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sk-card {
  border: 1px solid var(--line);
  background: var(--sec);
  color: var(--text);
  border-radius: var(--radius-lg);
  padding: 0;
  overflow: hidden;
  text-align: left;
}
.sk-card img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: #2a2a28; }
.sk-card span { display: block; padding: 8px 10px 10px; font-size: 12px; font-weight: 600; }

.sk-full { position: fixed; inset: 0; z-index: 30; background: #111; }
.sk-viewer, .sk-full .openseadragon-container { width: 100%; height: 100%; }
.sk-full-ui { position: absolute; inset: 0; pointer-events: none; }
.sk-full-ui > * { pointer-events: auto; }
.sk-full-ui .icon-x { position: absolute; top: calc(10px + var(--safe-t)); right: 12px; }
.sk-full-cap {
  position: absolute; left: 12px; right: 56px; top: calc(12px + var(--safe-t));
  color: #fff; font-size: 13px; font-weight: 600;
}
.sk-full-nav {
  position: absolute; left: 12px; right: 12px; bottom: calc(12px + var(--safe-b));
  display: flex; gap: 8px;
}
.sk-full-nav .dock-btn {
  flex: 1; height: 40px; border: 0; border-radius: var(--radius);
  background: var(--sec); color: var(--text); font-weight: 600;
}

/* Filter sheet */
.filter-section { margin: 4px 0 16px; }
.filter-section-title {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--hint);
  margin: 0 0 8px;
}
.filter-section-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.filter-hint { margin: 0; font-size: var(--fs-caption); color: var(--hint); line-height: 1.4; }
.filter-toolbar-actions { display: flex; gap: 8px; }
.text-btn {
  border: 0;
  background: var(--sec);
  color: var(--text);
  border-radius: var(--radius);
  height: 36px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 650;
}
.filter-presets, .filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.filter-presets button, .filter-chips button {
  border: 0;
  background: var(--sec);
  color: var(--text);
  border-radius: 999px;
  min-height: 40px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 650;
}
.filter-chips button { color: var(--hint); }
.filter-presets button.on, .filter-chips button.on {
  background: var(--btn);
  color: var(--btn-text);
}
.filter-seg {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--sec);
  border-radius: var(--radius-lg);
}
.filter-seg button {
  flex: 1 1 0;
  border: 0;
  background: transparent;
  color: var(--hint);
  border-radius: var(--radius);
  height: 40px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 650;
}
.filter-seg button.on { background: var(--btn); color: var(--btn-text); }

.swatch-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.swatch-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 76px;
  padding: 8px 4px 6px;
  border: 0;
  background: var(--sec);
  color: inherit;
  border-radius: var(--radius);
  text-align: center;
}
.swatch-cell .swatch {
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 0;
}
.swatch-cell .swatch svg { width: 20px; height: 20px; }
.swatch-cell .id {
  font-size: 11px;
  font-weight: 650;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.swatch-cell.sel {
  background: color-mix(in srgb, var(--btn) 22%, var(--sec));
  box-shadow: inset 0 0 0 2px var(--btn);
}
