@font-face {
  font-family: Inter;
  src: url("assets/fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
:root {
  color-scheme: light;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  font-feature-settings: "cv11", "ss01";
  --page: #f4f2ec;
  --panel: #fcfbf7;
  --field: #ffffff;
  --surface: #eeeee5;
  --selected: #f2ebdf;
  --ink: #252c27;
  --muted: #667064;
  --line: #dfdfd3;
  --strong-line: #b5bba8;
  --action: #735b3c;
  --action-hover: #5e482e;
  --action-text: #ffffff;
  --coyote: #b6956d;
  --olive: #4f6040;
  --focus: #7c8c57;
  --notice: #f3e9d4;
  --notice-ink: #685028;
  --glass-bg: #fcfbf7e8;
  --glass-line: #ffffffb3;
  --panel-shadow: 0 4px 12px #00000005, 0 18px 48px #373d2510;
  --stage-glow: #d5c5a480;
  --thumb-glow: #f9f6ee;
  --header-height: 72px;
  background: var(--page);
  color: var(--ink);
}
:root[data-theme=dark] {
  color-scheme: dark;
  --page: #141917;
  --panel: #202823;
  --field: #1a211d;
  --surface: #2a332c;
  --selected: #32372a;
  --ink: #f2f2e9;
  --muted: #b1b9ac;
  --line: #354035;
  --strong-line: #667259;
  --action: #b6956d;
  --action-hover: #c9aa83;
  --action-text: #171c16;
  --olive: #c0d1a2;
  --focus: #c1cc9a;
  --notice: #393323;
  --notice-ink: #ead8ac;
  --glass-bg: #202823e8;
  --glass-line: #ffffff1a;
  --panel-shadow: 0 4px 12px #00000010, 0 18px 48px #00000024;
  --stage-glow: #8f9d6e30;
  --thumb-glow: #354031;
}
* { box-sizing: border-box; }
body { margin: 0; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
[hidden] { display: none !important; }
button, input, select { font: inherit; }
button, .file-button {
  min-height: 44px; padding: 11px 16px; border: 1px solid transparent; border-radius: 8px;
  background: var(--action); color: var(--action-text); font-weight: 650; cursor: pointer;
}
button:hover, .file-button:hover { background: var(--action-hover); }
button:disabled { cursor: default; opacity: .45; }
button.secondary, .file-button { background: transparent; color: var(--ink); border-color: var(--line); }
button.secondary:hover, .file-button:hover { background: var(--surface); border-color: var(--strong-line); }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
a { color: var(--olive); text-underline-offset: 4px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 27px; font-weight: 780; letter-spacing: -.055em; margin: 0; display: flex; align-items: center; gap: 7px; }
h2 { font-size: 27px; line-height: 1.2; letter-spacing: -.045em; font-weight: 740; margin-bottom: 8px; }
h3 { font-size: 17px; line-height: 1.35; letter-spacing: -.025em; font-weight: 690; }
p { line-height: 1.55; }
.page-header {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  width: 100%; max-width: 1680px; margin: 0 auto; padding: 10px 32px;
  border-bottom: 1px solid var(--line); flex-shrink: 0; background: var(--panel); z-index: 30;
}
.page-header p { font-size: 11px; color: var(--muted); margin: 3px 0 0; }
.brand-dot { width: 7px; height: 7px; margin-top: 10px; border-radius: 50%; background: var(--coyote); }
.header-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; }
.environment-badge { color: var(--action); border: 1px solid var(--strong-line); padding: 5px 7px; border-radius: 6px; white-space: nowrap; font-size: 10px; font-weight: 650; }
.theme-toggle { display: inline-flex; gap: 8px; align-items: center; font-size: 12px; }
.badge { display: inline-flex; align-items: center; justify-content: center; font-size: 12px; color: var(--muted); background: var(--surface); border-radius: 20px; padding: 7px 11px; white-space: nowrap; }
.badge, #catalog-count, .environment-badge, output { font-variant-numeric: tabular-nums; }
#outfit-count { min-width: 8ch; }
.workspace {
  width: 100%; max-width: 1680px; margin: 0 auto; display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 24px;
  padding: 24px 32px 18px; align-items: stretch; flex: 1; min-height: 0;
}
.preview-panel, .catalog-panel, .layers-panel, .saved-section {
  padding: 24px; margin: 0; min-width: 0; border: 1px solid var(--line); border-radius: 24px;
  background: var(--panel); box-shadow: var(--panel-shadow);
}
.preview-panel { min-height: 0; display: flex; flex-direction: column; position: relative; }
.preview-panel > :not(.stage-viewport) { flex-shrink: 0; }
.preview-top h2, .section-heading h2, .catalog-heading h2 { margin-bottom: 5px; }
.section-subtitle { color: var(--muted); font-size: 12px; margin-bottom: 0; }
.stage-toolbar {
  display: flex; gap: 6px; align-items: center; align-self: center;
  max-width: 100%; margin: 20px 0 6px; padding: 5px; border: 1px solid var(--glass-line);
  border-radius: 16px; background: var(--panel); box-shadow: 0 3px 16px #0000000a;
}
.view-switch { display: flex; gap: 2px; min-width: 0; }
.view-switch button { min-height: 40px; background: transparent; color: var(--muted); font-size: 12px; padding: 9px 12px; border-radius: 10px; }
.view-switch button:hover { color: var(--ink); background: var(--surface); }
.view-switch button.active { background: var(--ink); color: var(--page); box-shadow: 0 2px 8px #00000012; }
.settings-toggle { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; font-size: 12px; padding: 9px 10px; }
button.settings-toggle { border-color: transparent; }
.stage-viewport {
  position: relative; flex: 1; min-width: 0; min-height: 0; container-type: size;
  display: flex; justify-content: center; align-items: center; border-radius: 24px;
  background: radial-gradient(ellipse at 50% 42%, var(--stage-glow), transparent 68%);
}
.stage { position: relative; width: min(100cqw, calc(100cqh * 2 / 3)); aspect-ratio: 2 / 3; overflow: hidden; border-radius: 16px; background: transparent; }
.stage[data-background=white] { background: #ffffff; }
.stage[data-background=grid] { background-image: conic-gradient(var(--surface) 25%, var(--panel) 0 50%, var(--surface) 0 75%, var(--panel) 0); background-size: 20px 20px; }
.stage img, .stage svg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; user-select: none; }
.clothing-slot { position: absolute; inset: 0; pointer-events: none; }
.clothing-layer { transform-origin: 50% 0; }
.stage svg { z-index: 100; }
.stage svg path { fill: none; stroke: var(--olive); stroke-width: 2; stroke-dasharray: 8 8; opacity: .8; }
.stage svg text { fill: var(--olive); font: 20px Inter, sans-serif; }
.stage-placeholder { position: absolute; inset: 0; padding: 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--muted); }
.notice { background: var(--notice); color: var(--notice-ink); padding: 12px 16px; font-size: 12px; line-height: 1.5; margin: 10px 0; border-radius: 12px; }
.export-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 12px; margin-top: 14px; font-size: 11px; }
.export-controls label { display: inline-flex; align-items: center; gap: 6px; }
.controls-panel {
  min-height: 0; min-width: 0; overflow-y: auto; overscroll-behavior-y: contain;
  scrollbar-width: thin; scrollbar-color: var(--strong-line) transparent;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-content: start; align-items: start;
  gap: 20px; padding: 0 8px 24px 0;
}
.catalog-panel { grid-column: 1 / -1; }
.catalog-heading, .section-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
#catalog-count { font-size: 11px; margin: 0; min-width: 18ch; text-align: right; }
.catalog-filters { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 12px; margin-top: 24px; }
.field { display: grid; gap: 8px; margin-bottom: 16px; font-size: 12px; color: var(--muted); font-weight: 550; }
input:not([type=checkbox]):not([type=radio]), select { min-height: 46px; width: 100%; min-width: 0; background: var(--field); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: 13px; }
input::placeholder { color: var(--muted); opacity: 1; }
select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%23818c78' stroke-width='1.6' viewBox='0 0 24 24'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.search-control { display: block; position: relative; }
.search-control input { padding-left: 42px !important; }
.ui-icon { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.search-icon { position: absolute; left: 14px; top: 14px; color: var(--muted); pointer-events: none; }
input[type=checkbox] { accent-color: var(--action); width: 16px; height: 16px; }
input[type=file] { font-size: 11px !important; }
input[type=file]::file-selector-button { background: var(--surface); color: var(--ink); border: 0; border-radius: 8px; padding: 7px 10px; margin-right: 8px; cursor: pointer; }
.muted { color: var(--muted); font-size: 12px; }
.catalog-hint { font-size: 11px; margin-bottom: 18px; }
.catalog { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 2px; }
.item-card {
  --card-lift: 0px; --card-scale: 1;
  position: relative; display: flex; flex-direction: column; min-width: 0; padding: 10px;
  background: var(--field); border: 1px solid var(--line); border-radius: 16px;
  transform: translateY(var(--card-lift)) scale(var(--card-scale));
}
.item-card.selected { --card-scale: 1.01; background: var(--selected); border-color: var(--coyote); box-shadow: 0 0 0 1px var(--coyote); }
@supports selector(:has(*)) {
  .item-card:has(.select-item:checked) { --card-scale: 1.01; background: var(--selected); border-color: var(--coyote); box-shadow: 0 0 0 1px var(--coyote); }
}
.item-thumb {
  display: block; width: 100%; height: auto; aspect-ratio: 5 / 4; object-fit: contain;
  background: radial-gradient(ellipse at 50% 42%, var(--thumb-glow), var(--surface));
  border-radius: 11px; cursor: grab; touch-action: none; user-select: none;
}
.item-info { min-width: 0; padding: 16px 6px 6px; display: flex; flex-direction: column; flex: 1; }
.item-title h3 { margin: 0 0 8px; }
.item-meta { display: grid; gap: 7px; font-size: 12px; line-height: 1.5; margin: 0; }
.item-meta > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.item-meta dt { font-size: 10px; color: var(--muted); }
.item-meta dd { margin: 0; color: var(--ink); font-weight: 550; overflow-wrap: anywhere; }
.item-color { color: var(--ink); font-weight: 550; }
.item-meta .item-color::before { content: ''; display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 50%; background: var(--swatch); box-shadow: 0 0 0 1px #80808040; }
.item-colors { border: 0; padding: 0; margin: 12px 0 0; min-width: 0; }
.item-colors legend { padding: 0; margin-bottom: 6px; font-size: 10px; color: var(--muted); }
.item-colors legend .item-color { font-size: 11px; margin-left: 4px; }
.color-options { display: flex; flex-wrap: wrap; gap: 6px; }
.color-option { position: relative; display: inline-flex; max-width: 100%; cursor: pointer; }
.color-option input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.color-chip { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid transparent; border-radius: 50%; }
.swatch { width: 26px; height: 26px; border-radius: 50%; background: var(--swatch); box-shadow: inset 0 0 0 1px #80808040; }
.swatch[data-pattern=multicam], .item-color[data-pattern=multicam]::before { background: conic-gradient(#827449 0 25%, #c9b994 0 40%, #65734c 0 65%, #594e35 0 80%, #ad9b72 0); }
.color-option input:checked + .color-chip { border-color: var(--action); background: var(--selected); }
.color-option input:focus-visible + .color-chip { outline: 3px solid var(--focus); outline-offset: 2px; }
.selection-status { position: absolute; top: 20px; left: 20px; display: inline-flex; gap: 4px; align-items: center; padding: 5px 8px; background: var(--glass-bg); border: 1px solid var(--glass-line); border-radius: 20px; color: var(--olive); font-size: 10px; font-weight: 650; }
.selection-status .ui-icon { width: 12px; height: 12px; }
.item-actions { display: flex; gap: 8px; padding-top: 16px; margin-top: auto; }
.selection-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; flex: 1; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; background: var(--panel); font-size: 12px; font-weight: 600; }
.selection-toggle:hover { border-color: var(--strong-line); }
.selection-toggle input { margin: 0; }
.visibility-toggle { width: 44px; min-height: 44px; padding: 10px; display: inline-flex; align-items: center; justify-content: center; }
.visibility-toggle[aria-pressed=true] { color: var(--olive); }
.empty { grid-column: 1 / -1; padding: 20px 4px; color: var(--muted); font-size: 13px; line-height: 1.6; }
details { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 24px; }
summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 12px; }
.item-details { border: 0; padding: 0; margin: 12px 0 0; }
.item-details summary { font-size: 11px; color: var(--muted); margin: 0; font-weight: 500; }
.item-details p { font-size: 11px; margin: 8px 0 0; }
.layers-panel h2, .saved-section h2 { font-size: 21px; }
.section-heading { margin-bottom: 20px; }
#outfit-list { display: grid; gap: 10px; margin-bottom: 16px; }
.outfit-entry { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: var(--field); }
.outfit-entry-head { display: flex; gap: 8px; align-items: flex-start; }
.outfit-entry .layer-name { flex: 1; min-width: 0; font-size: 12px; font-weight: 650; line-height: 1.5; overflow-wrap: anywhere; }
.icon-button { padding: 3px 10px; min-height: 32px; }
.outfit-entry .muted { font-size: 11px; margin: 4px 0 10px; }
.outfit-entry label { display: flex; align-items: center; gap: 6px; font-size: 11px; }
.full { width: 100%; }
.saved-row { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.saved-row button:first-child { flex: 1; text-align: left; overflow-wrap: anywhere; font-size: 12px; }
.config-actions { display: grid; gap: 10px; margin-top: 24px; }
.config-actions button, .file-button { font-size: 12px; }
.file-button { display: block; text-align: center; }
.file-button input { display: none; }
footer { padding: 0 32px 12px; width: 100%; max-width: 1680px; margin: 0 auto; font-size: 10px; color: var(--muted); flex-shrink: 0; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--panel); color: var(--ink); border: 1px solid var(--glass-line); box-shadow: var(--panel-shadow); padding: 14px 20px; border-radius: 16px; max-width: min(620px, 90vw); z-index: 200; font-size: 13px; }
.settings-sheet { position: fixed; inset: auto; left: var(--sheet-left, 24px); top: var(--sheet-top, 120px); margin: 0; width: min(380px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto; padding: 24px; background: var(--panel); color: var(--ink); border: 1px solid var(--glass-line); border-radius: 24px; box-shadow: 0 24px 80px #00000030; }
.settings-sheet::backdrop { background: #10181333; }
.settings-open { overflow: hidden; }
.sheet-handle { display: none; }
.sheet-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 24px; }
.sheet-heading h2 { font-size: 22px; }
.sheet-heading .icon-button { min-width: 44px; min-height: 44px; font-size: 22px; border-color: var(--line); }
.preview-options { display: grid; gap: 20px; margin: 0 0 24px; font-size: 13px; }
.preview-options > label:not(.field) { display: flex; align-items: center; gap: 10px; min-height: 32px; }
.preview-options .field { margin: 0; }
.wearing-controls { margin-bottom: 24px; font-size: 12px; }
.wearing-controls label { display: grid; gap: 10px; }
@supports ((backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px))) {
  .page-header, .stage-toolbar, .settings-sheet, .toast, .selection-status { background: var(--glass-bg); backdrop-filter: blur(12px) saturate(160%); -webkit-backdrop-filter: blur(12px) saturate(160%); }
}
.item-dragging, .item-dragging .item-thumb { cursor: grabbing; user-select: none; }
.item-card.is-dragging .item-thumb { opacity: .45; }
.drop-overlay { display: none; position: absolute; inset: 6px; z-index: 150; border: 2px dashed var(--strong-line); border-radius: 14px; pointer-events: none; align-items: flex-end; justify-content: center; padding: 8px; }
.stage.drag-active .drop-overlay { display: flex; }
.stage.drag-over .drop-overlay { border-color: var(--coyote); background: color-mix(in srgb, var(--selected) 25%, transparent); }
.drop-overlay span { padding: 8px 10px; border-radius: 10px; background: var(--panel); color: var(--ink); font-size: 11px; text-align: center; box-shadow: var(--panel-shadow); }
.drag-preview { position: fixed; top: 0; left: 0; width: 100px; z-index: 1000; pointer-events: none; background: var(--panel); border: 1px solid var(--coyote); border-radius: 14px; box-shadow: 0 8px 28px #00000030; overflow: hidden; }
.drag-preview canvas { display: block; width: 100px; height: 80px; background: var(--surface); }
.drag-preview span { display: block; padding: 7px; color: var(--ink); font-size: 10px; line-height: 1.3; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (hover: hover) and (pointer: fine) {
  .item-card:hover { --card-lift: -3px; border-color: var(--strong-line); box-shadow: 0 10px 24px #0000000a; }
  .item-card.selected:hover { border-color: var(--coyote); box-shadow: 0 0 0 1px var(--coyote), 0 10px 24px #0000000a; }
  .color-option:hover .color-chip { background: var(--surface); }
}
@media (prefers-reduced-motion: no-preference) {
  button, .selection-toggle, .color-chip, input, select { transition: background-color .16s ease, border-color .16s ease, transform .16s ease; }
  button:not(:disabled):active, .selection-toggle:active { transform: scale(.97); }
  .item-card { transition: transform .2s cubic-bezier(.2,.7,.2,1), background-color .2s ease, border-color .2s ease, box-shadow .2s ease; }
  .settings-sheet[open] { animation: sheet-enter .22s cubic-bezier(.2,.7,.2,1); }
  @keyframes sheet-enter { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
}
@media (prefers-reduced-motion: reduce) { .item-card { transform: none; } }
@media (max-width: 1200px) {
  .workspace { gap: 18px; padding: 18px 24px; }
  .page-header { padding-inline: 24px; }
  .preview-panel, .catalog-panel, .layers-panel, .saved-section { padding: 18px; border-radius: 20px; }
  .controls-panel { grid-template-columns: minmax(0, 1fr); }
  .stage-toolbar { flex-wrap: wrap; justify-content: center; }
  .settings-toggle span { display: none; }
  .catalog-heading { flex-wrap: wrap; gap: 8px; }
  #catalog-count { text-align: left; }
}
@media (min-width: 821px) and (max-width: 1000px) {
  .catalog { grid-template-columns: minmax(0, 1fr); }
  .item-card { display: grid; grid-template-columns: minmax(110px, 36%) minmax(0, 1fr); gap: 12px; }
  .item-info { padding: 8px 4px; }
  .item-thumb { align-self: center; }
}
@media (max-width: 820px) {
  body { height: auto; display: block; overflow: visible; }
  body.settings-open { overflow: hidden; }
  .page-header { position: sticky; top: 0; }
  .workspace { grid-template-columns: minmax(0, 1fr); padding: 16px; gap: 16px; }
  .controls-panel { overflow: visible; padding: 0; gap: 16px; }
  .preview-panel {
    position: sticky; top: calc(var(--header-height) + 8px); z-index: 20; height: clamp(220px, 32dvh, 290px);
    display: grid; grid-template-columns: minmax(100px, 36%) minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto; gap: 8px 12px; padding: 14px; background: var(--panel);
  }
  .stage-viewport { grid-column: 1; grid-row: 1 / span 3; }
  .preview-top { grid-column: 2; grid-row: 1; }
  .preview-top h2 { font-size: 21px; }
  .preview-top .section-subtitle { font-size: 10px; }
  .stage-toolbar { grid-column: 2; grid-row: 2; align-self: start; justify-self: start; margin: 4px 0 0; padding: 4px; gap: 2px; flex-wrap: nowrap; }
  .view-switch button { min-height: 40px; padding: 8px; font-size: 11px; }
  .settings-toggle { width: 40px; padding: 10px; }
  .export-controls { grid-column: 2; grid-row: 3; justify-content: flex-start; margin: 0; gap: 6px; font-size: 10px; }
  .export-controls button { min-height: 40px; padding: 9px 12px; font-size: 11px; }
  .preview-panel > .notice { position: absolute; top: 100%; left: 0; right: 0; margin: 4px 0; z-index: 40; }
  .settings-sheet {
    left: 0; right: 0; top: auto; bottom: 0; width: 100%; max-height: 85dvh;
    padding: 12px 24px max(24px, env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0;
  }
  .sheet-handle { display: block; width: 36px; height: 4px; margin: 0 auto 20px; border-radius: 4px; background: var(--strong-line); }
  .settings-sheet::backdrop { background: #10181366; }
  .sheet-heading h2 { font-size: 23px; }
}
@media (max-width: 560px) {
  .page-header { padding: 10px 16px; gap: 12px; }
  h1 { font-size: 24px; }
  .page-header p { font-size: 10px; max-width: 190px; }
  .theme-toggle { padding: 10px; }
  .theme-toggle span { display: none; }
  .workspace { padding: 12px 10px 24px; }
  .preview-panel { padding: 12px; gap: 8px; }
  .catalog-panel, .layers-panel, .saved-section { padding: 18px 14px; }
  .catalog-heading h2 { font-size: 25px; }
  .section-subtitle { font-size: 11px; }
  .catalog-filters { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 20px; }
  .catalog { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 2px; }
  .item-card { display: grid; grid-template-columns: minmax(88px, 34%) minmax(0, 1fr); gap: 10px; padding: 10px; }
  .item-thumb { aspect-ratio: 5 / 4; align-self: start; margin-top: 24px; }
  .item-info { padding: 4px 0; }
  .item-title h3 { font-size: 14px; margin-bottom: 7px; }
  .item-meta { font-size: 11px; gap: 4px; }
  .item-meta dt { font-size: 9px; }
  .item-colors { margin-top: 8px; }
  .item-actions { gap: 6px; padding-top: 12px; }
  .selection-toggle { padding: 8px 6px; font-size: 11px; gap: 6px; }
  .selection-toggle input { width: 14px; height: 14px; }
  .visibility-toggle { width: 40px; flex-shrink: 0; padding: 10px; }
  .selection-status { top: 14px; left: 14px; font-size: 9px; padding: 3px 6px; }
  .catalog-hint { font-size: 10px; }
  footer { padding: 0 18px 20px; }
}
@media (max-width: 360px) {
  .preview-panel { grid-template-columns: minmax(82px, 32%) minmax(0, 1fr); }
  .view-switch button { padding: 8px 6px; font-size: 10px; }
  .stage-toolbar { gap: 0; }
  .item-card { grid-template-columns: 80px minmax(0, 1fr); gap: 8px; padding: 8px; }
  .visibility-toggle { width: 36px; padding: 8px; }
}
@media (min-width: 821px) and (max-height: 650px) {
  .workspace { padding-block: 12px; }
  .preview-top h2 { font-size: 22px; }
  .preview-top .section-subtitle { display: none; }
  .stage-toolbar { margin: 10px 0 4px; }
  .export-controls { margin-top: 8px; }
  .export-controls button { min-height: 38px; padding: 8px 12px; }
}
