@font-face {
  font-family: "Ygro Sans Beta";
  src: url("/fonts/ygro-sans-beta/YgroSansBeta-Book.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Ygro Sans Beta";
  src: url("/fonts/ygro-sans-beta/YgroSansBeta-Medium.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Ygro Sans Beta";
  src: url("/fonts/ygro-sans-beta/YgroSansBeta-Bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("/fonts/poppins/Poppins-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --workbench: #171918;
  --surface: #212421;
  --board: #2b2e2a;
  --paper: #fafaf7;
  --gold: #d0b785;
  --blue: #2a369e;
  --muted: #a4aaa3;
  --quiet: #80877f;
  --line: #373c36;
  --line-strong: #50584e;
  --error: #f4aa9a;
  --radius: 8px;
  --tray-width: 328px;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--workbench); }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--workbench);
  color: var(--paper);
  font: 400 14px/1.4 "Ygro Sans Beta", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button, select, input[type="color"], input[type="range"] { cursor: pointer; }
button {
  color: inherit;
  border: 1px solid transparent;
  background: none;
  border-radius: 5px;
  -webkit-tap-highlight-color: transparent;
}
button, select, input[type="text"], input[type="number"] {
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease;
}
button:disabled, input:disabled, select:disabled { cursor: not-allowed; opacity: 0.38; }
button:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}
button:not(:disabled):hover { background-color: #fafaf70a; }
button[aria-pressed="true"]:not(:disabled):hover { background-color: #d0b78516; }
[hidden] { display: none !important; }
::selection { background: var(--gold); color: var(--workbench); }

.veil-app { max-width: 1800px; min-height: 100vh; margin-inline: auto; padding: 0 32px 20px; }
.veil-header {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}
.veil-identity { display: flex; align-items: baseline; gap: 22px; }
.veil-identity h1 {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin: 0;
  font-size: 64px;
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -4px;
}
.identity-dot { width: 8px; height: 8px; background: var(--gold); border-radius: 50%; }
.veil-identity p { margin: 0; color: var(--muted); font-size: 14px; }
.header-actions { display: flex; align-items: center; gap: 24px; }
.undo-actions { display: flex; align-items: center; gap: 2px; }
.icon-button { display: grid; place-items: center; width: 34px; height: 34px; font-size: 23px; }
.quiet-button { min-height: 34px; padding: 6px 9px; font-size: 13px; color: var(--muted); }
.quiet-button > span { margin-right: 5px; font-size: 17px; vertical-align: -1px; }
.quiet-button[aria-pressed="true"] { color: var(--gold); border-color: #d0b78555; }
.wci-mark { border-left: 1px solid var(--line); padding-left: 26px; font-size: 35px; font-weight: 700; line-height: 0.9; letter-spacing: -2.2px; }
.wci-mark span { display: block; margin-top: 7px; color: var(--muted); font-size: 10px; font-weight: 400; line-height: 1; letter-spacing: 0.2px; }

.veil-workspace { display: grid; grid-template-columns: minmax(0, 1fr) var(--tray-width); gap: 32px; align-items: start; padding-top: 24px; }
.veil-stage-column { min-width: 0; }
.veil-stage-meta { min-height: 32px; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.field-title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-width: 0; }
.field-title strong { font-size: 14px; font-weight: 500; }
.field-title > span:last-child { color: var(--muted); font-size: 12px; }
.live-dot { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: var(--gold); }
.live-dot.paused, .live-dot.is-paused { background: var(--quiet); }
.veil-render-stats { display: flex; align-items: baseline; gap: 18px; margin: 0; font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.veil-render-stats > div { display: flex; align-items: baseline; gap: 7px; }
.veil-render-stats dt { color: var(--muted); }
.veil-render-stats dd { margin: 0; color: var(--paper); }
.render-detail { opacity: 0.6; }
.veil-stage {
  position: relative;
  height: clamp(450px, calc(100dvh - 250px), 820px);
  min-height: 450px;
  min-width: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  overflow: hidden;
  background: var(--board);
  border-radius: 3px;
}
#veilCanvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
  background: var(--blue);
  box-shadow: 0 10px 32px #00000026;
}
.stage-hint { position: absolute; right: 13px; bottom: 7px; font-size: 10px; color: #a4aaa380; pointer-events: none; }

.veil-timeline { display: flex; align-items: center; gap: 12px; min-height: 57px; border-bottom: 1px solid var(--line); }
.play-button { flex: 0 0 30px; height: 30px; padding: 0; color: var(--gold); font-size: 16px; }
.timeline-time { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
#timeline { flex: 1 1 100px; min-width: 30px; }
.loop-label { display: flex; align-items: center; gap: 6px; margin-left: 7px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.loop-label > span { font-size: 23px; line-height: 1; color: var(--gold); }

input[type="range"] { --range-fill: 50%; width: 100%; height: 20px; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; appearance: none; -webkit-appearance: none; }
input[type="range"]::-webkit-slider-runnable-track { height: 3px; border-radius: 2px; background: linear-gradient(to right, var(--gold) 0 var(--range-fill), var(--line-strong) var(--range-fill) 100%); }
input[type="range"]::-webkit-slider-thumb { width: 11px; height: 11px; margin-top: -4px; border: 0; border-radius: 50%; background: var(--paper); box-shadow: 0 0 0 3px var(--surface); appearance: none; -webkit-appearance: none; }
input[type="range"]::-moz-range-track { height: 3px; border-radius: 2px; background: var(--line-strong); }
input[type="range"]::-moz-range-progress { height: 3px; border-radius: 2px; background: var(--gold); }
input[type="range"]::-moz-range-thumb { width: 11px; height: 11px; border: 0; border-radius: 50%; background: var(--paper); box-shadow: 0 0 0 3px var(--surface); }
#timeline::-webkit-slider-thumb { width: 8px; height: 8px; margin-top: -2.5px; box-shadow: 0 0 0 3px var(--workbench); background: var(--gold); }
#timeline::-moz-range-thumb { width: 8px; height: 8px; box-shadow: 0 0 0 3px var(--workbench); background: var(--gold); }

.veil-variation-bar { min-height: 58px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.veil-variation-bar > label { color: var(--muted); font-size: 12px; }
#variation { width: 91px; padding: 6px 0; border: 0; border-bottom: 1px solid transparent; border-radius: 0; background: transparent; color: var(--paper); font-variant-numeric: tabular-nums; appearance: textfield; -moz-appearance: textfield; }
#variation:hover, #variation:focus { border-bottom-color: var(--line-strong); }
#variation::-webkit-inner-spin-button, #variation::-webkit-outer-spin-button { margin: 0; appearance: none; -webkit-appearance: none; }
.text-button { padding: 5px 3px; color: var(--muted); font-size: 12px; }
.new-variation { display: flex; align-items: center; gap: 8px; min-height: 36px; margin-left: auto; padding: 6px 12px; color: var(--workbench); background: var(--gold); border-color: var(--gold); font-size: 13px; font-weight: 500; }
.new-variation:not(:disabled):hover { background: #dfc998; border-color: #dfc998; }
.new-variation > span { font-size: 22px; line-height: 1; }
kbd { display: inline-block; padding: 1px 4px; border: 1px solid var(--line-strong); border-radius: 3px; color: var(--muted); font: 400 10px/1.4 "Ygro Sans Beta", sans-serif; }
.new-variation kbd { margin-left: 5px; border-color: #17191833; color: #171918b3; }
.veil-captures { padding-top: 17px; }
.veil-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.veil-section-heading > div { display: flex; align-items: baseline; gap: 12px; }
.veil-section-heading h2 { margin: 0; font-size: 14px; font-weight: 500; }
.veil-section-heading span { color: var(--quiet); font-size: 12px; }
.veil-capture-list { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.capture-card { position: relative; flex: 0 0 109px; min-width: 0; overflow: hidden; padding: 0 0 7px; border: 1px solid transparent; border-radius: 4px; text-align: left; background: var(--surface); }
.capture-card canvas { display: block; width: 100%; height: 65px; object-fit: cover; }
.capture-name, .capture-card > span { display: block; padding: 7px 8px 0; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: 12px; white-space: nowrap; }
.capture-card[aria-current="true"], .capture-card[aria-pressed="true"] { border-color: var(--gold); }
.capture-card[aria-current="true"] .capture-name, .capture-card[aria-pressed="true"] .capture-name { color: var(--gold); }
.capture-card:not(:disabled):hover { border-color: var(--line-strong); background: var(--surface); }
.capture-card[aria-current="true"]:not(:disabled):hover { border-color: var(--gold); }
.capture-meta { font-size: 11px; color: var(--quiet); }

.veil-tray { position: sticky; top: 20px; display: flex; flex-direction: column; height: calc(100dvh - 163px); min-height: 580px; max-height: 1040px; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.inspector-tabs { display: flex; flex-shrink: 0; gap: 4px; min-height: 50px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.inspector-tabs > button { position: relative; flex: 1; color: var(--muted); font-size: 13px; }
.inspector-tabs > button[aria-selected="true"] { background: #fafaf709; color: var(--paper); }
.inspector-tabs > button[aria-selected="true"]::after { content: ""; position: absolute; width: 14px; height: 2px; bottom: 0; left: calc(50% - 7px); border-radius: 1px; background: var(--gold); }
.inspector-body { flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.inspector-panel { padding: 22px 20px 24px; }
.veil-control-group { min-width: 0; margin: 0 0 26px; padding: 0; border: 0; }
.veil-control-group:last-child { margin-bottom: 0; }
.veil-control-group + .veil-control-group { padding-top: 24px; border-top: 1px solid var(--line); }
.veil-control-group legend { display: block; float: left; width: 100%; margin: 0 0 16px; padding: 0; color: var(--paper); font-size: 14px; font-weight: 500; }
.veil-control-group legend + * { clear: both; }
.group-note { display: block; margin-top: 4px; color: var(--quiet); font-size: 12px; font-weight: 400; }
.control-help { margin: 0 0 18px; color: var(--muted); font-size: 12px; line-height: 1.6; }

.mode-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 25px; }
.mode-cards > button { min-width: 0; padding: 0 0 7px; overflow: hidden; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); }
.mode-cards canvas { display: block; width: 100%; height: 58px; object-fit: cover; background: var(--board); }
.mode-cards span { display: block; padding: 7px 3px 0; font-size: 12px; }
.mode-cards > button[aria-pressed="true"] { border-color: var(--gold); color: var(--gold); background: #d0b78508; }
.surface-style { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -5px 0 24px; font-size: 13px; }
.style-toggle { display: flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 5px; background: var(--workbench); }
.style-toggle button { display: flex; align-items: center; gap: 7px; min-height: 32px; padding: 5px 9px; color: var(--muted); font-size: 12px; }
.style-toggle button[aria-pressed="true"] { background: #d0b78518; color: var(--gold); }
.style-sample { display: block; width: 12px; height: 12px; border-radius: 2px; }
.smooth-sample { background: currentColor; opacity: .7; }
.dither-sample { background: radial-gradient(currentColor 1px, transparent 1px) 0 0 / 3px 3px; }
.dither-controls { margin: -7px 0 24px; padding: 0 0 18px 12px; border-left: 2px solid #d0b78555; border-bottom: 1px solid var(--line); }
.dither-controls .veil-range:first-child { margin-top: 0; }
.adjust-dither { margin-top: 9px; color: var(--gold); }
.veil-range { margin-top: 19px; }
.veil-range > div, .veil-control-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; font-size: 13px; }
.veil-range output, .veil-control-label output { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.veil-range small { display: flex; justify-content: space-between; gap: 12px; margin-top: 0; color: var(--quiet); font-size: 12px; }
.veil-range input { display: block; }
.veil-control-label { padding-bottom: 6px; }

.palette-presets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.palette-preset { min-width: 0; padding: 5px 5px 7px; border: 1px solid var(--line); border-radius: 5px; text-align: left; }
.palette-strip, .palette-swatches { display: flex; width: 100%; height: 31px; overflow: hidden; border-radius: 2px; }
.palette-strip > i, .palette-swatches > * { flex: 1; display: block; }
.palette-name { display: block; padding: 7px 2px 0; color: var(--muted); font-size: 12px; }
.palette-preset[aria-pressed="true"], .palette-preset.is-active { border-color: var(--gold); background: #d0b78508; }
.palette-preset[aria-pressed="true"] .palette-name, .palette-preset.is-active .palette-name { color: var(--gold); }
.veil-inks { display: grid; gap: 10px; }
.veil-ink { display: grid; grid-template-columns: 42px 29px minmax(0, 1fr); align-items: center; gap: 12px; }
.veil-ink > label { color: var(--muted); font-size: 12px; }
.veil-ink input[type="color"] { width: 29px; height: 29px; padding: 0; border: 1px solid #ffffff1f; border-radius: 4px; overflow: hidden; background: transparent; }
.veil-ink input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.veil-ink input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 2px; }
.veil-ink input[type="color"]::-moz-color-swatch { border: 0; border-radius: 2px; }
.veil-ink input[type="text"] { width: 100%; height: 32px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 4px; color: var(--paper); background: #17191866; font: 400 12px/1.4 "Poppins", sans-serif; }
.veil-ink input[type="text"]:hover { border-color: var(--line-strong); }
.veil-ink input[aria-invalid="true"] { border-color: var(--error); }
.veil-inline-actions { display: flex; gap: 8px; margin-top: 18px; }
.veil-inline-actions > button { flex: 1; min-height: 33px; padding: 6px 8px; border-color: var(--line); color: var(--muted); font-size: 12px; }
.reset-colors { display: block; margin: 10px auto 0; }

.veil-ratios { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.veil-ratios > button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; height: 63px; padding: 8px 3px; border-color: var(--line); color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.veil-ratios i { display: block; width: auto; height: 18px; max-width: 31px; border: 1px solid currentColor; border-radius: 1px; }
.veil-ratios > button[aria-pressed="true"] { color: var(--gold); border-color: var(--gold); background: #d0b78508; }
.veil-switch { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 23px; cursor: pointer; }
.veil-switch strong { display: block; font-size: 13px; font-weight: 400; }
.veil-switch small { display: block; margin-top: 4px; color: var(--quiet); font-size: 12px; }
.veil-switch input { position: absolute; right: 0; width: 34px; height: 20px; margin: 0; opacity: 0; cursor: pointer; }
.veil-switch > i { width: 34px; height: 20px; flex: 0 0 34px; padding: 3px; border: 1px solid var(--line-strong); border-radius: 12px; background: #171918; pointer-events: none; }
.veil-switch > i::after { content: ""; display: block; width: 12px; height: 12px; border-radius: 50%; background: var(--muted); transition: transform 140ms ease; }
.veil-switch input:checked + i { background: var(--gold); border-color: var(--gold); }
.veil-switch input:checked + i::after { transform: translateX(14px); background: var(--workbench); }
.veil-switch input:focus-visible + i { outline: 2px solid var(--gold); outline-offset: 4px; }
.veil-switch input:disabled + i { opacity: 0.38; }

.veil-output-group { flex-shrink: 0; padding: 17px 20px 20px; border-top: 1px solid var(--line); background: var(--surface); }
.veil-export-settings { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.veil-export-settings label { color: var(--muted); font-size: 12px; }
.veil-export-settings select { max-width: 115px; min-height: 29px; padding: 4px 22px 4px 7px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--paper); font-size: 12px; }
.veil-export-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.veil-export-actions > button { min-width: 0; min-height: 60px; padding: 10px 11px; border: 1px solid var(--line-strong); border-radius: 5px; text-align: left; }
.veil-export-actions > button > span { display: flex; align-items: center; justify-content: space-between; gap: 3px; font-size: 13px; font-weight: 500; }
.veil-export-actions b { font-size: 16px; font-weight: 400; }
.veil-export-actions small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.veil-export-actions > .veil-export-primary { background: var(--gold); border-color: var(--gold); color: var(--workbench); }
.veil-export-actions > .veil-export-primary small { color: #171918ad; }
.veil-export-actions > .veil-export-primary:not(:disabled):hover { background: #dfc998; border-color: #dfc998; }
.veil-cancel { display: block; width: 100%; min-height: 32px; margin-top: 10px; border-color: var(--line); color: var(--muted); font-size: 12px; }
.veil-progress { margin-top: 13px; }
.veil-progress > div { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.veil-progress #status { min-width: 0; overflow-wrap: anywhere; }
.veil-progress output { flex-shrink: 0; font-variant-numeric: tabular-nums; }
.veil-progress > i { display: block; height: 3px; margin-top: 8px; overflow: hidden; border-radius: 2px; background: var(--line); }
#exportProgressBar { display: block; height: 100%; width: 0; background: var(--gold); transition: width 160ms linear; }
.veil-error, .launch-notice { padding: 11px 12px; border: 1px solid #f4aa9a40; border-radius: 5px; color: var(--error); background: #f4aa9a08; font-size: 12px; line-height: 1.6; }
.veil-error { margin: 13px 0 0; }
.launch-notice { margin: 18px 0 0; }

.veil-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--quiet); font-size: 11px; }
.footer-credit { margin-left: 6px; color: var(--muted); }
.veil-footer kbd { margin-inline: 7px 3px; }
.veil-toast { position: fixed; z-index: 10; left: 50%; bottom: 26px; max-width: calc(100% - 32px); transform: translateX(-50%); padding: 12px 19px; border: 1px solid #d0b78566; border-radius: 6px; background: #212421f5; color: var(--paper); box-shadow: 0 6px 24px #00000026; font-size: 13px; line-height: 1.4; text-align: center; pointer-events: none; }

.focus-mode .veil-workspace { grid-template-columns: minmax(0, 1fr); padding-top: 20px; }
.focus-mode .veil-tray, .focus-mode .veil-captures, .focus-mode .veil-variation-bar, .focus-mode .veil-footer { display: none; }
.focus-mode .veil-stage { height: calc(100dvh - 230px); max-height: none; min-height: 330px; }
.focus-mode .veil-stage-column { width: 100%; }
.focus-mode .veil-timeline { max-width: 920px; margin-inline: auto; border-bottom: 0; }
.focus-mode .stage-hint { display: none; }

@media (max-width: 1180px) {
  .field-title > span:last-child { display: none; }
  .render-detail { display: none !important; }
  .veil-footer > span:last-child { display: none; }
}

@media (max-width: 980px) {
  :root { --tray-width: 300px; }
  .veil-app { padding-inline: 22px; }
  .veil-workspace { gap: 22px; }
  .header-actions { gap: 16px; }
  .veil-identity { gap: 17px; }
  .veil-identity p { font-size: 12px; }
  .veil-stage { padding: 20px; }
  .loop-label { display: none; }
  .inspector-panel { padding-inline: 16px; }
  .veil-output-group { padding-inline: 16px; }
  .veil-variation-bar { gap: 8px; }
  .new-variation { padding-inline: 5px; font-size: 12px; }
  .veil-section-heading > div { display: block; }
  .veil-section-heading > div > span { display: block; margin-top: 3px; }
  .capture-card { flex-basis: 100px; }
}

@media (max-width: 720px) {
  .veil-app { padding: 0 18px 22px; }
  .veil-header { height: 86px; gap: 14px; }
  .veil-identity h1 { font-size: 53px; letter-spacing: -3px; }
  .veil-identity p { display: none; }
  .header-actions { gap: 12px; }
  .wci-mark { padding-left: 15px; font-size: 28px; }
  .wci-mark span { font-size: 8px; margin-top: 6px; }
  .undo-actions { gap: 0; }
  .icon-button { width: 29px; height: 32px; }
  .veil-workspace { display: flex; flex-direction: column; gap: 22px; padding-top: 16px; }
  .veil-stage-column { width: 100%; }
  .veil-stage-meta { margin-bottom: 9px; min-height: 27px; }
  .field-title > span:last-child { display: inline; font-size: 11px; }
  .veil-stage { height: clamp(330px, 56dvh, 590px); min-height: 330px; padding: 22px; }
  .veil-timeline { min-height: 52px; }
  .loop-label { display: flex; }
  .veil-variation-bar { gap: 12px; min-height: 55px; }
  .new-variation { font-size: 13px; padding-inline: 8px; }
  .new-variation kbd { display: none; }
  .veil-section-heading > div { display: flex; align-items: baseline; gap: 10px; }
  .veil-section-heading > div > span { margin-top: 0; }
  .veil-tray { position: static; top: auto; width: 100%; height: auto; min-height: 0; max-height: none; overflow: visible; }
  .inspector-tabs { min-height: 52px; }
  .inspector-body { overflow: visible; }
  .inspector-panel { padding: 23px 22px; }
  .veil-output-group { padding: 18px 22px 22px; border-radius: 0 0 var(--radius) var(--radius); }
  .mode-cards { gap: 12px; }
  .mode-cards canvas { height: 82px; }
  .mode-cards span { padding-top: 8px; padding-bottom: 2px; font-size: 13px; }
  .veil-range { margin-top: 23px; }
  input[type="range"] { height: 26px; }
  input[type="range"]::-webkit-slider-thumb { width: 14px; height: 14px; margin-top: -5.5px; }
  input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; }
  .palette-strip { height: 44px; }
  .palette-preset { padding: 7px 7px 10px; }
  .veil-export-actions > button { min-height: 65px; }
  .veil-export-actions small { font-size: 12px; }
  .veil-footer { margin-top: 22px; font-size: 11px; }
  .veil-footer > span:nth-child(2) { display: none; }
  .focus-mode .veil-stage { height: calc(100dvh - 198px); min-height: 300px; padding: 18px; }
}

@media (max-width: 420px) {
  .veil-app { padding-inline: 14px; }
  .veil-header { height: 80px; }
  .veil-identity h1 { font-size: 48px; }
  .identity-dot { width: 6px; height: 6px; }
  .header-actions { gap: 7px; }
  .header-actions .quiet-button { padding-inline: 4px; font-size: 12px; }
  .wci-mark { padding-left: 10px; font-size: 25px; }
  .wci-mark span { font-size: 7px; }
  .field-title > span:last-child { display: none; }
  .veil-stage { height: 360px; min-height: 330px; padding: 18px; }
  .veil-timeline { gap: 9px; }
  .loop-label { display: none; }
  .veil-variation-bar { gap: 7px; }
  #variation { width: 77px; font-size: 13px; }
  .veil-variation-bar label, .text-button { font-size: 12px; }
  .new-variation { gap: 4px; padding-inline: 3px; font-size: 12px; }
  .veil-section-heading > div { display: block; }
  .veil-section-heading > div > span { display: block; margin-top: 2px; font-size: 11px; }
  .inspector-panel, .veil-output-group { padding-inline: 17px; }
  .capture-card { flex-basis: 100px; }
  .mode-cards canvas { height: 69px; }
  .focus-mode .veil-stage { height: calc(100dvh - 189px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
