/* Hallmark · shape: Workbench (app screen) · genre: playful · theme: Sticker (deal 1/3, seed tukda-free-open-source-collage-6f88·6cc0ff94·2026-11-29·r0) · job: try · draw: app-scope
 * hero: none (app screen) · nav: tool bar, wordmark and three actions · footer: none · imagery: the archive itself · signature: every cut piece becomes a die-cut sticker on the table · sticker: sheet
 * axes: light/display-heavy/chromatic-magenta · posture: full-palette · contrast: pass · fold: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P3 H3 E3 S4 R3 V3 · weakest: R, three panels on one screen; the table stays the largest surface and panels collapse to a dock below 60rem */
@import url("./tokens.css");
@import url("./base.css");

body.studio { height: 100dvh; display: grid; grid-template-rows: auto 1fr; overflow: hidden; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs); height: 48px; padding: 0 var(--space-lg); border: 0; border-radius: var(--radius-pill); background: var(--color-paper-3); color: var(--color-ink); font-weight: 700; font-size: var(--text-md); text-decoration: none; cursor: pointer; box-shadow: inset 0 0 0 2px var(--color-ink); transition: translate var(--dur-micro) var(--ease-out), box-shadow var(--dur-micro) var(--ease-out), background-color var(--dur-micro) var(--ease-out); white-space: nowrap; }
.btn--sm { height: 40px; padding: 0 var(--space-md); font-size: var(--text-sm); }
.btn:hover { background: var(--color-paper-2); }
.btn:active { translate: 1px 1px; }
.btn:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; transition: none; }
.btn--primary { background: var(--color-accent); color: var(--color-accent-ink); box-shadow: 0 0 0 4px var(--color-white), 4px 5px 0 var(--color-ink); }
.btn--primary:hover { background: var(--color-accent-deep); }
.btn--primary:active { translate: 3px 4px; box-shadow: 0 0 0 4px var(--color-white), var(--shadow-press); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; translate: none; }
.btn[aria-busy="true"] { cursor: progress; opacity: 0.7; }

.tool { height: 36px; padding: 0 var(--space-sm); border: 0; border-radius: var(--radius-pill); background: var(--color-paper-3); color: var(--color-ink); font-weight: 700; font-size: var(--text-sm); cursor: pointer; box-shadow: inset 0 0 0 2px var(--color-ink); transition: background-color var(--dur-micro) var(--ease-out); }
.tool:hover { background: var(--color-paper-2); }
.tool:active { translate: 1px 1px; }
.tool:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; transition: none; }
.tool.is-on, .tool[aria-checked="true"] { background: var(--color-ink); color: var(--color-paper); }
.tool:disabled { opacity: 0.45; cursor: not-allowed; }

.icon-btn { width: 40px; height: 40px; border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--color-ink); font-size: var(--text-lg); cursor: pointer; }
.icon-btn:hover { background: var(--color-paper-2); }
.icon-btn:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }

.toggle { display: inline-flex; align-items: center; gap: var(--space-xs); font-weight: 600; font-size: var(--text-sm); cursor: pointer; }
.toggle input { width: 20px; height: 20px; accent-color: var(--color-ink); }
.toggle input:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }

/* ---------- top bar ---------- */
.bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); padding: var(--space-sm) var(--space-lg); background: var(--color-ink); color: var(--color-paper); }
.wordmark { font-family: var(--font-display); font-size: var(--text-xl); color: var(--color-paper); text-decoration: none; letter-spacing: var(--tracking-display); }
.wordmark:hover { color: var(--color-accent-2); }
.wordmark:focus-visible { outline: 3px solid var(--color-accent-2); outline-offset: 4px; }
.bar__actions { display: flex; align-items: center; gap: var(--space-sm); flex-wrap: wrap; justify-content: flex-end; }
.bar .btn--ghost { background: transparent; color: var(--color-paper); box-shadow: inset 0 0 0 2px var(--color-paper); }
.bar .btn--ghost:hover { background: var(--color-ink-2); }
.bar label.btn:focus-within { outline: 3px solid var(--color-accent-2); outline-offset: 3px; }
.noscript { padding: var(--space-lg); }

/* ---------- desk ---------- */
.desk { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr) minmax(0, 272px); min-height: 0; }
.drawer > *, .tray > * { flex-shrink: 0; }
.drawer, .tray { display: flex; flex-direction: column; gap: var(--space-sm); min-height: 0; padding: var(--space-md); background: var(--color-paper-2); overflow-y: auto; }
.tray { background: var(--color-paper-2); }
.drawer__head { display: flex; align-items: center; justify-content: space-between; }
.panel-title { font-size: var(--text-lg); max-width: none; }
.search { height: 44px; padding: 0 var(--space-md); border: 0; border-radius: var(--radius-card); background: var(--color-paper-3); color: var(--color-ink); box-shadow: inset 0 0 0 2px var(--color-ink); }
.search:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.search::placeholder { color: var(--color-muted); }

.chips { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.chip { height: 32px; padding: 0 var(--space-sm); border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--color-ink); font-weight: 600; font-size: var(--text-xs); cursor: pointer; box-shadow: inset 0 0 0 2px var(--color-ink); }
.chip:hover { background: var(--color-paper-3); }
.chip:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.chip[aria-pressed="true"] { background: var(--color-ink); color: var(--color-paper); }

.sheets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-sm); margin: 0; padding: 0; list-style: none; }
.sheet { display: block; width: 100%; padding: 0; border: 4px solid var(--color-white); border-radius: 12px; background: var(--color-slot); cursor: pointer; aspect-ratio: 4 / 5; overflow: hidden; box-shadow: 3px 4px 0 var(--color-ink); transition: translate var(--dur-micro) var(--ease-out), rotate var(--dur-micro) var(--ease-out); }
.sheet img { width: 100%; height: 100%; object-fit: cover; }
.sheet:hover { translate: 0 -2px; rotate: -1deg; }
.sheet:active { translate: 2px 3px; box-shadow: var(--shadow-press); }
.sheet:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; transition: none; }
.sheets__empty { grid-column: 1 / -1; color: var(--color-muted); font-size: var(--text-sm); }

.pieces { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-sm); margin: 0; padding: 0; list-style: none; }
.piece { display: grid; place-items: center; width: 100%; aspect-ratio: 1; padding: var(--space-xs); border: 0; border-radius: 12px; background: var(--color-paper-3); cursor: grab; box-shadow: inset 0 0 0 2px var(--color-rule); }
.piece img { max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(2px 3px 0 var(--color-ink)); }
.piece:hover { box-shadow: inset 0 0 0 2px var(--color-ink); }
.piece:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.piece-entry { position: relative; }
.piece.is-selected { box-shadow: inset 0 0 0 4px var(--color-ink); background: var(--color-accent); }
.tray-instruction { font-size: var(--text-sm); color: var(--color-muted); }
.tray-actions { position: sticky; bottom: 0; display: flex; align-items: center; gap: 8px; padding: 8px 0; background: var(--color-paper-2); }
.tray-actions span { margin-right: auto; font-size: var(--text-sm); }
.tray-delete { display: grid; place-items: center; width: 44px; height: 44px; border: 2px solid var(--color-ink); border-radius: 50%; background: white; cursor: pointer; }
.tray-delete:disabled { opacity: .4; cursor: default; }
.tray__empty { color: var(--color-muted); font-size: var(--text-sm); }

/* ---------- table ---------- */
.table { position: relative; display: grid; grid-template-rows: 1fr auto; min-height: 0; padding: var(--space-lg); gap: var(--space-sm); }
.board-wrap { position: relative; display: grid; place-items: center; min-height: 0; container-type: size; overflow: hidden; padding: var(--space-sm); border-radius: var(--radius-card); touch-action: none; }
.board { width: min(100cqw, 80cqh); height: auto; aspect-ratio: 4 / 5; border: 0; border-radius: 4px; background: var(--color-paper-3); touch-action: none; cursor: inherit; }
.board:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 4px; }
.board-hint { position: absolute; max-width: 30ch; text-align: center; color: var(--color-muted); font-weight: 600; pointer-events: none; }
.selbar { position: absolute; left: 50%; bottom: var(--space-sm); translate: -50% 0; display: flex; gap: var(--space-xs); padding: var(--space-xs); border: 4px solid var(--color-white); border-radius: var(--radius-pill); background: var(--color-paper-3); box-shadow: var(--shadow-card); z-index: var(--z-raised); }
.grounds { display: flex; justify-content: center; gap: var(--space-sm); }
.ground { width: 32px; height: 32px; border: 3px solid var(--color-white); border-radius: 50%; cursor: pointer; box-shadow: 0 0 0 2px var(--color-ink); }
.ground[data-ground="paper"] { background: var(--color-paper-3); }
.ground[data-ground="ink"] { background: var(--color-ink); }
.ground[data-ground="accent"] { background: var(--color-accent); }
.ground[data-ground="accent-2"] { background: var(--color-accent-2); }
.ground.is-on { box-shadow: 0 0 0 2px var(--color-ink), 0 0 0 5px var(--color-accent-2); }
.ground:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 4px; }

/* ---------- cutter ---------- */
dialog { border: 0; padding: 0; color: var(--color-ink); }
dialog::backdrop { background: color-mix(in oklch, var(--color-ink) 70%, transparent); }
.cutter { width: 100%; max-width: 100%; height: 100dvh; max-height: 100%; margin: 0; background: var(--color-paper); }
.cutter[open] { display: grid; grid-template-rows: auto 1fr auto; }
.cutter__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-md); padding: var(--space-sm) var(--space-lg); background: var(--color-paper-2); }
.tools { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.cutter__actions { display: flex; gap: var(--space-sm); }
.cutter__stage { display: grid; place-items: center; min-height: 0; padding: var(--space-md); overflow: hidden; container-type: size; }
.cut-canvas { max-width: 100cqw; max-height: 100cqh; touch-action: none; cursor: crosshair; border: 6px solid var(--color-white); box-shadow: var(--shadow-card); background: var(--color-slot); }
.cutter__hint { padding: var(--space-xs) var(--space-lg) var(--space-md); text-align: center; color: var(--color-muted); font-weight: 600; }

/* ---------- info + export ---------- */
.help-dialog { width: min(680px, 94vw); max-height: min(88dvh, 820px); overflow-y: auto; border: 6px solid var(--color-white); border-radius: var(--radius-card); background: var(--color-paper-3); box-shadow: var(--shadow-card); }
.help-dialog__inner { display: grid; gap: var(--space-md); padding: var(--space-lg); }
.help-dialog__inner > p { margin: 0; color: var(--color-muted); }
.help-list { display: grid; gap: var(--space-sm); margin: 0; }
.help-list > div { display: grid; grid-template-columns: minmax(120px, 0.7fr) minmax(0, 2fr); gap: var(--space-md); padding-top: var(--space-sm); border-top: 1px solid var(--color-rule); }
.help-list dt { font-weight: 700; }
.help-list dd { margin: 0; }
.help-list kbd { display: inline-block; padding: 0 0.3em; border: 1px solid var(--color-rule); border-radius: 4px; background: var(--color-paper); color: var(--color-ink); font: 600 0.9em var(--font-body); white-space: nowrap; }
.card-dialog { background: transparent; max-width: min(440px, 92vw); overflow: visible; }
.diecut { border: 6px solid var(--color-white); border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
.story { display: grid; gap: var(--space-sm); padding: var(--space-lg); background: var(--color-paper-3); rotate: -1deg; }
.story h3 { font-size: var(--text-xl); }
.story__meta { color: var(--color-muted); font-weight: 600; font-size: var(--text-sm); }
.story a { font-weight: 700; text-decoration-color: var(--color-accent); }
.story a:hover { color: var(--color-accent-deep); }
.story a:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }

.export { width: min(760px, 94vw); max-height: 92dvh; background: var(--color-paper); border-radius: var(--radius-card); }
.export__inner { display: grid; gap: var(--space-sm); padding: var(--space-md); }
.export__header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); }
.export__header h2 { margin: 0; }
.export__pair { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-md); align-items: start; }
.export__shot { margin: 0; min-width: 0; }
.export__pair img { display: block; width: auto; max-width: 100%; max-height: 50dvh; }
.export__actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); }

.toast { position: fixed; left: 50%; bottom: var(--space-xl); translate: -50% 0; padding: var(--space-sm) var(--space-lg); border: 4px solid var(--color-white); border-radius: var(--radius-pill); background: var(--color-accent-2); color: var(--color-ink); font-weight: 700; box-shadow: var(--shadow-card); opacity: 0; pointer-events: none; transition: opacity var(--dur-short) var(--ease-out); z-index: var(--z-toast); }
.toast.is-on { opacity: 1; }

/* ---------- narrow ---------- */
.only-narrow { display: none; }
.dock { gap: var(--space-sm); justify-content: center; padding: var(--space-sm); background: var(--color-paper-2); }
@media (max-width: 60rem) {
  body.studio { grid-template-rows: auto 1fr auto; }
  .only-narrow { display: inline-flex; }
  .dock { display: flex; }
  .desk { grid-template-columns: minmax(0, 1fr); }
  .drawer, .tray { position: fixed; inset: auto 0 0 0; max-height: 78dvh; z-index: var(--z-modal); border-top: 6px solid var(--color-white); box-shadow: 0 -4px 0 var(--color-ink); translate: 0 105%; visibility: hidden; transition: translate var(--dur-short) var(--ease-out), visibility var(--dur-short); }
  .drawer.is-open, .tray.is-open { translate: 0 0; visibility: visible; }
  .sheets { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pieces { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .table { padding: var(--space-sm); }
  .bar { padding: var(--space-xs) var(--space-sm); }
  .bar__actions .btn--sm { height: 36px; padding: 0 var(--space-sm); }
  .export__pair img { max-height: 36dvh; }
  .help-dialog__inner { padding: var(--space-md); }
  .help-list > div { grid-template-columns: minmax(0, 1fr); gap: var(--space-2xs); }
}

/* ---------- toolbar pill (undo, redo, add, new) ---------- */
.bar { display: grid; grid-template-columns: auto 1fr auto; }
.toolpill { justify-self: center; display: flex; align-items: center; gap: var(--space-2xs); padding: var(--space-2xs); border-radius: var(--radius-pill); background: var(--color-paper-3); }
.tp { display: inline-flex; align-items: center; height: 34px; padding: 0 var(--space-sm); border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--color-ink); font-weight: 600; font-size: var(--text-sm); white-space: nowrap; cursor: pointer; }
.tp:hover { background: var(--color-paper-2); }
.tp:active { translate: 1px 1px; }
.tp:focus-visible, .toolpill label.tp:focus-within { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.tp:disabled { opacity: 0.35; cursor: not-allowed; translate: none; }
.tp--new { background: var(--color-accent); color: var(--color-accent-ink); }
.tp--new:hover { background: var(--color-accent-deep); }
.tp__sep { width: 1px; height: 20px; background: var(--color-rule); }
.bar__link { color: var(--color-paper); font-weight: 600; font-size: var(--text-sm); text-decoration: none; }
.bar__link:hover { text-decoration: underline; text-decoration-color: var(--color-accent-2); }
.bar__link:focus-visible { outline: 3px solid var(--color-accent-2); outline-offset: 4px; }
.remix { font-size: var(--text-md); }
@media (max-width: 60rem) {
  .bar { grid-template-columns: auto 1fr; row-gap: var(--space-xs); }
  .toolpill { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; justify-content: space-between; overflow-x: auto; }
  .tp { padding: 0 var(--space-xs); font-size: var(--text-xs); }
  .tp__sep { display: none; }
  .toolpill { gap: 0; }
  .bar__link { display: none; }
}

/* ---------- editor: icons, search, panel heads ---------- */
.ico { width: 18px; height: 18px; flex: none; }
.tp { gap: var(--space-2xs); }
.drawer__title { display: flex; align-items: baseline; gap: var(--space-xs); }
.panel-count { color: var(--color-muted); font-weight: 700; font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.search-wrap { position: relative; display: grid; }
.search-wrap .search { width: 100%; padding-left: 40px; padding-right: 40px; }
.search-ico { position: absolute; left: 12px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; color: var(--color-muted); pointer-events: none; }
.search-clear { position: absolute; right: 6px; top: 50%; translate: 0 -50%; width: 32px; height: 32px; border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--color-ink); font-size: var(--text-lg); line-height: 1; cursor: pointer; }
.search-clear:hover { background: var(--color-paper-2); }
.search-clear:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 0; }
.search::-webkit-search-cancel-button { display: none; }

/* ---------- table: stage, overlays, view controls ---------- */
.board-stage { position: relative; display: grid; place-items: center; transform-origin: 50% 50%; will-change: transform; }
.board-wrap.is-hand, .board-wrap.is-hand-temp { cursor: grab; }
.board-wrap.is-panning { cursor: grabbing; }
.board-hint { z-index: 1; padding: var(--space-md) var(--space-lg); }
.board-hint__lead { color: var(--color-ink); font-weight: 700; }
.board-hint__sub { font-size: var(--text-sm); }
.drop-overlay { position: absolute; inset: -8px; z-index: var(--z-raised); display: grid; place-items: center; border: 4px dashed var(--color-accent); border-radius: var(--radius-card); background: color-mix(in oklch, var(--color-accent-2) 55%, transparent); pointer-events: none; }
.drop-overlay span { padding: var(--space-sm) var(--space-lg); border: 4px solid var(--color-white); border-radius: var(--radius-pill); background: var(--color-ink); color: var(--color-paper); font-weight: 700; box-shadow: var(--shadow-card); }
.xform-pill { position: absolute; z-index: var(--z-raised); padding: 2px var(--space-xs); border-radius: var(--radius-pill); background: var(--color-ink); color: var(--color-paper); font-weight: 700; font-size: var(--text-xs); font-variant-numeric: tabular-nums; pointer-events: none; white-space: nowrap; }

.selbar { align-items: center; max-width: calc(100% - var(--space-md)); overflow-x: auto; scrollbar-width: none; }
.tool--ico { display: inline-flex; align-items: center; gap: var(--space-2xs); }
.tool--danger:hover { background: color-mix(in oklch, var(--color-error) 14%, var(--color-paper-3)); color: var(--color-error); box-shadow: inset 0 0 0 2px var(--color-error); }
.selbar__sep { width: 1px; align-self: stretch; margin: var(--space-2xs) 0; background: var(--color-rule); }

.table-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-sm); }
.grounds { align-items: center; }
.foot-label { color: var(--color-muted); font-weight: 700; font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.06em; }
.hud { display: flex; align-items: center; gap: var(--space-2xs); padding: var(--space-2xs); border-radius: var(--radius-pill); background: var(--color-paper-3); box-shadow: inset 0 0 0 2px var(--color-ink); }
.hud__group { display: flex; align-items: center; gap: 2px; }
.hud__sep { width: 1px; height: 20px; background: var(--color-rule); }
.hud__btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2xs); min-width: 34px; height: 34px; padding: 0 var(--space-xs); border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--color-ink); font-weight: 700; font-size: var(--text-sm); cursor: pointer; }
.hud__btn:hover { background: var(--color-paper-2); }
.hud__btn:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 1px; }
.hud__btn.is-on { background: var(--color-ink); color: var(--color-paper); }
.hud__btn:disabled { opacity: 0.35; cursor: not-allowed; }
.hud__zoom { min-width: 58px; font-variant-numeric: tabular-nums; }
.hud__txt { font-size: var(--text-xs); }

/* ---------- right panel: tabs, layers, inspector ---------- */
.panel-tabs { display: flex; gap: 2px; padding: 3px; border-radius: var(--radius-pill); background: var(--color-paper-3); box-shadow: inset 0 0 0 2px var(--color-ink); }
.panel-tab { display: inline-flex; align-items: center; gap: var(--space-2xs); height: 32px; padding: 0 var(--space-sm); border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--color-ink); font-weight: 700; font-size: var(--text-sm); cursor: pointer; }
.panel-tab:hover { background: var(--color-paper-2); }
.panel-tab:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 1px; }
.panel-tab.is-on { background: var(--color-ink); color: var(--color-paper); }
.tab-badge { min-width: 20px; padding: 0 5px; border-radius: var(--radius-pill); background: var(--color-paper-2); color: var(--color-ink); font-size: var(--text-xs); font-variant-numeric: tabular-nums; text-align: center; }
.panel-tab.is-on .tab-badge { background: var(--color-accent-2); }
.panel-body { display: grid; gap: var(--space-sm); align-content: start; }

.layers { display: grid; gap: var(--space-2xs); margin: 0; padding: 0; list-style: none; }
.layer { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 2px; padding: 3px; border-radius: 12px; background: var(--color-paper-3); box-shadow: inset 0 0 0 2px var(--color-rule); }
.layer:hover { box-shadow: inset 0 0 0 2px var(--color-ink); }
.layer.is-sel { box-shadow: inset 0 0 0 2px var(--color-accent); background: color-mix(in oklch, var(--color-slot) 70%, var(--color-paper-3)); }
.layer.is-hidden .layer__thumb, .layer.is-hidden .layer__name { opacity: 0.4; }
.layer.is-dragging { opacity: 0.5; }
.layer.drop-above::before, .layer.drop-below::after { content: ""; position: absolute; left: 6px; right: 6px; height: 3px; border-radius: 3px; background: var(--color-accent); }
.layer.drop-above::before { top: -4px; }
.layer.drop-below::after { bottom: -4px; }
.layer__pick { display: flex; align-items: center; gap: var(--space-xs); min-width: 0; padding: 2px; border: 0; border-radius: 9px; background: transparent; color: var(--color-ink); text-align: left; cursor: pointer; }
.layer__pick:focus-visible, .layer__btn:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 1px; }
.layer__thumb { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 8px; background: var(--color-paper-2); }
.layer__thumb img { max-width: 34px; max-height: 34px; object-fit: contain; }
.layer__name { overflow: hidden; font-weight: 600; font-size: var(--text-sm); white-space: nowrap; text-overflow: ellipsis; }
.layer__btn { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--color-muted); cursor: pointer; }
.layer__btn:hover { background: var(--color-paper-2); color: var(--color-ink); }
.layer__btn[aria-pressed="true"] { color: var(--color-accent-deep); }

.inspector { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; gap: var(--space-sm); margin-top: auto; padding: var(--space-sm); border: 4px solid var(--color-white); border-radius: var(--radius-card); background: var(--color-paper-3); box-shadow: 3px 4px 0 var(--color-ink); }
.inspector__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-xs); }
.inspector__reset { flex: none; }
.inspector__title { min-width: 0; max-width: none; overflow: hidden; font-family: var(--font-body); font-weight: 700; font-size: var(--text-sm); white-space: nowrap; text-overflow: ellipsis; }
.inspector__reset, .insp-chip { height: 28px; padding: 0 var(--space-xs); border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--color-ink); font-weight: 700; font-size: var(--text-xs); cursor: pointer; box-shadow: inset 0 0 0 2px var(--color-ink); }
.inspector__reset:hover, .insp-chip:hover { background: var(--color-paper-2); }
.inspector__reset:focus-visible, .insp-chip:focus-visible, .insp-range:focus-visible, .insp-select:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.inspector__reset:disabled, .insp-chip:disabled { opacity: 0.4; cursor: not-allowed; }
.insp-row { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; align-items: center; gap: var(--space-xs); }
.insp-row:has(select) { grid-template-columns: 58px minmax(0, 1fr); }
.insp-label { color: var(--color-muted); font-weight: 700; font-size: var(--text-xs); }
.insp-range { width: 100%; accent-color: var(--color-accent); }
.insp-val { min-width: 4ch; font-weight: 700; font-size: var(--text-xs); text-align: right; }
.insp-select { height: 32px; min-width: 0; padding: 0 var(--space-xs); border: 0; border-radius: 10px; background: var(--color-paper-2); color: var(--color-ink); font-weight: 600; font-size: var(--text-sm); box-shadow: inset 0 0 0 2px var(--color-ink); }
.insp-checks { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.toggle--sm { font-size: var(--text-xs); }
.toggle--sm input { width: 18px; height: 18px; }
.insp-align { display: flex; flex-wrap: wrap; gap: var(--space-2xs); }

/* ---------- cutter: zoom, pan, footer ---------- */
.cutter__left { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm); }
.cutter__actions { flex-wrap: wrap; align-items: center; }
.cutter__zoom { display: flex; gap: 2px; }
.tool--compact { min-width: 36px; padding: 0 var(--space-xs); font-variant-numeric: tabular-nums; }
.cutter__stage { position: relative; touch-action: none; }
.cutter__stage.is-hand-temp, .cutter__stage.is-hand-temp .cut-canvas { cursor: grab; }
.cutter__stage.is-panning, .cutter__stage.is-panning .cut-canvas { cursor: grabbing; }
.cutter__pan { display: grid; place-items: center; transform-origin: 50% 50%; will-change: transform; }
.cutter__foot { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 0 var(--space-md); padding: 0 var(--space-lg); }
.cutter__foot .cutter__hint { padding-inline: 0; }
.cutter__title { max-width: 40ch; overflow: hidden; color: var(--color-ink); font-weight: 700; font-size: var(--text-sm); white-space: nowrap; text-overflow: ellipsis; }

@media (max-width: 60rem) {
  .table-foot { justify-content: center; }
  .hud__txt { display: none; }
  .selbar .tool--ico span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .selbar .tool--ico { width: 40px; justify-content: center; padding: 0; }
  .inspector { margin-top: var(--space-sm); }
  .cutter__top { padding: var(--space-xs) var(--space-sm); gap: var(--space-xs); }
  .cutter__foot { padding: 0 var(--space-sm); }
}
@media (max-width: 40rem) {
  .toolpill .tp .ico + span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

.studio-filters { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0; }
.studio-saved { align-self: flex-start; padding: 6px 12px; border: 1px solid currentColor; border-radius: 999px; background: transparent; color: inherit; font: inherit; font-weight: 700; cursor: pointer; }
.studio-saved[aria-pressed="true"] { background: var(--color-ink); color: white; }
.studio-filters details { position: relative; }
.studio-filters summary { cursor: pointer; border: 1px solid currentColor; border-radius: 999px; padding: 5px 10px; font-weight: 700; list-style: none; }
.studio-filter-options { position: absolute; z-index: 20; top: 100%; left: 0; width: 220px; max-height: 260px; overflow: auto; padding: 8px; background: white; box-shadow: 0 4px 16px #0003; border-radius: 8px; }
.studio-filter-options label { display: flex; gap: 8px; padding: 5px; }
.board { background: white; }
