:root {
  color-scheme: dark;
  --ink: #080a09;
  --panel: #0e110f;
  --panel-2: #141814;
  --line: rgba(231, 238, 226, 0.16);
  --line-bright: rgba(231, 238, 226, 0.34);
  --paper: #eef1ec;
  --muted: #879087;
  --acid: #caff36;
  --cyan: #55dcff;
  --violet: #c060ff;
  --orange: #ff8d3a;
  --font-display: "Bodoni 72", Didot, "Iowan Old Style", Georgia, serif;
  --font-ui: "Avenir Next Condensed", "DIN Alternate", "Helvetica Neue", sans-serif;
  --font-mono: "SFMono-Regular", "Roboto Mono", Consolas, monospace;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 90%, rgba(108, 174, 55, 0.08), transparent 28rem),
    var(--ink);
  color: var(--paper);
  font-family: var(--font-ui);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }
button, select, input[type="range"], input[type="color"] { cursor: pointer; }
button { color: inherit; }

button:focus-visible, select:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 3px;
}

[hidden] { display: none !important; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

.ambient {
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.12;
  pointer-events: none;
}
.ambient-a { width: 22vw; height: 22vw; right: 8vw; top: -12vw; background: var(--cyan); }
.ambient-b { width: 24vw; height: 24vw; left: 28vw; bottom: -20vw; background: var(--acid); }

.topbar {
  height: 72px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto minmax(360px, 1fr);
  align-items: stretch;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 10, 9, 0.92);
  backdrop-filter: blur(20px);
  position: relative;
  z-index: 20;
}

.brand {
  display: grid;
  grid-template-columns: 56px auto auto;
  align-items: center;
  gap: 15px;
  width: fit-content;
  padding: 0 22px;
  color: var(--paper);
  text-decoration: none;
}
.brand-index { color: var(--acid); font: 9px/1 var(--font-mono); writing-mode: vertical-rl; transform: rotate(180deg); letter-spacing: .12em; }
.brand-word { font: 23px/.8 var(--font-display); letter-spacing: -.04em; }
.brand-cn { color: var(--muted); font-size: 10px; letter-spacing: .18em; }

.topbar-status {
  align-self: center;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font: 9px/1 var(--font-mono);
  letter-spacing: .08em;
}
.status-light {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 14px var(--acid);
  animation: status-pulse 2.5s ease-in-out infinite;
}

.topbar-actions { justify-self: end; display: flex; align-items: stretch; }
.language-toggle {
  min-width: 72px;
  border: 0;
  border-left: 1px solid var(--line);
  padding: 0 14px;
  background: transparent;
  font: 10px/1 var(--font-mono);
  letter-spacing: .08em;
  transition: background .2s ease;
}
.language-toggle:hover { background: var(--panel-2); }
.language-toggle span { color: var(--acid); }
.button {
  min-width: 104px;
  border: 0;
  border-left: 1px solid var(--line);
  padding: 0 19px;
  background: transparent;
  font-size: 11px;
  letter-spacing: .07em;
  transition: background .2s ease, color .2s ease, opacity .2s ease;
}
.button:disabled { opacity: .3; cursor: not-allowed; }
.button-quiet { display: flex; justify-content: center; align-items: center; gap: 18px; }
.button-quiet:hover:not(:disabled) { background: var(--panel-2); }
.button-acid { min-width: 150px; background: var(--acid); color: #111508; font-weight: 700; }
.button-acid:hover:not(:disabled) { background: #dbff75; }

.workspace {
  height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 354px;
}

.studio {
  min-width: 0;
  display: grid;
  grid-template-rows: 28px minmax(0, 1fr) 46px auto 28px;
  padding: 16px 20px 12px;
  position: relative;
  overflow: hidden;
}
.studio::before {
  content: "";
  position: absolute;
  inset: 16px 20px 12px;
  border: 1px solid rgba(229, 238, 225, .05);
  pointer-events: none;
}

.studio-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #667066;
  font: 8px/1 var(--font-mono);
  letter-spacing: .13em;
  text-transform: uppercase;
  position: relative;
  z-index: 2;
}
.meta-top { padding: 0 11px; }
.meta-bottom { padding: 0 11px; }

.viewport {
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 14px 24px;
  position: relative;
  overflow: hidden;
  background-image:
    linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px);
  background-size: 42px 42px;
}
.viewport::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 25%, rgba(8,10,9,.55) 92%);
  pointer-events: none;
}
.viewport.is-dragging { background-color: rgba(202, 255, 54, .05); }

.artboard {
  width: min(76%, 760px);
  aspect-ratio: 4 / 5;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: #e9ece8;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.16),
    0 26px 75px rgba(0, 0, 0, .52),
    0 0 120px rgba(202, 255, 54, .045);
  z-index: 1;
  transition: aspect-ratio .28s ease, box-shadow .3s ease;
  animation: artboard-enter .8s cubic-bezier(.2,.8,.2,1) both;
}
.artboard.has-media { box-shadow: 0 0 0 1px rgba(255,255,255,.2), 0 34px 90px rgba(0,0,0,.68); }

#effectCanvas, .compare-layer, .compare-layer > img, .compare-layer > video {
  width: 100%; height: 100%; display: block;
}
#effectCanvas { background: #edf0ea; }
.compare-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  opacity: 0;
  transition: opacity .12s ease;
  pointer-events: none;
  background: #050505;
}
.compare-layer.is-visible { opacity: 1; }
.compare-layer > img, .compare-layer > video { object-fit: contain; }
.compare-layer[data-fit="fill"] > img,
.compare-layer[data-fit="fill"] > video { object-fit: cover; }

.dropzone {
  position: absolute;
  inset: 0;
  z-index: 4;
  padding: clamp(28px, 4vw, 54px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  color: #10140e;
  background:
    radial-gradient(circle at 69% 27%, rgba(202,255,54,.92) 0 5%, rgba(202,255,54,.45) 18%, transparent 38%),
    radial-gradient(circle at 48% 15%, rgba(96,222,255,.85), transparent 22%),
    radial-gradient(circle at 74% 49%, rgba(192,96,255,.5), transparent 27%),
    #eef1ec;
  overflow: hidden;
}
.dropzone::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .32;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.86' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  pointer-events: none;
}
.dropzone-number { position: absolute; left: 32px; top: 30px; font: 10px/1 var(--font-mono); letter-spacing: .12em; }
.dropzone-orbit {
  position: absolute;
  width: 58%; aspect-ratio: 1;
  right: -8%; top: -3%;
  border: 1px solid rgba(10,15,8,.28);
  border-radius: 50%;
  animation: orbit-spin 16s linear infinite;
}
.dropzone-orbit::before, .dropzone-orbit::after, .dropzone-orbit span {
  content: ""; position: absolute; border-radius: 50%; border: 1px solid rgba(10,15,8,.2);
}
.dropzone-orbit::before { inset: 17%; }
.dropzone-orbit::after { inset: 33%; }
.dropzone-orbit span:nth-child(1) { width: 8px; height: 8px; border: 0; background: #0b0e09; left: 9%; top: 43%; }
.dropzone-orbit span:nth-child(2) { width: 5px; height: 5px; border: 0; background: #0b0e09; right: 21%; top: 11%; }
.dropzone-orbit span:nth-child(3) { width: 3px; height: 3px; border: 0; background: #0b0e09; right: 4%; bottom: 30%; }
.eyebrow { margin: 0 0 12px; font: 9px/1 var(--font-mono); letter-spacing: .13em; }
.dropzone h1 { margin: 0; font: 400 clamp(38px, 4.1vw, 70px)/.87 var(--font-display); letter-spacing: -.055em; position: relative; }
.dropzone-copy { margin: 20px 0 23px; font-size: 12px; line-height: 1.65; letter-spacing: .03em; position: relative; }
.dropzone-button {
  min-width: 170px;
  padding: 13px 16px;
  display: flex; justify-content: space-between;
  border: 1px solid #11150f;
  background: #11150f;
  color: var(--paper);
  font-size: 10px;
  letter-spacing: .08em;
  position: relative;
  transition: background .2s ease, color .2s ease;
}
.dropzone-button:hover { color: #11150f; background: transparent; }
.dropzone-formats { margin: 14px 0 0; color: rgba(16,20,14,.58); font: 7px/1 var(--font-mono); letter-spacing: .12em; position: relative; }
.artboard.has-media .dropzone { display: none; }

.loading-panel {
  position: absolute;
  z-index: 8;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  background: rgba(8,10,9,.8);
  backdrop-filter: blur(14px);
  color: var(--muted);
  font: 9px/1 var(--font-mono);
  letter-spacing: .12em;
}
.loading-mark { width: 28px; height: 28px; border: 1px solid var(--line-bright); border-top-color: var(--acid); border-radius: 50%; animation: spin .8s linear infinite; }

.stage-tools {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 10px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 2;
}
.segmented { display: flex; border: 1px solid var(--line); padding: 2px; }
.segment { border: 0; padding: 6px 10px; background: transparent; color: var(--muted); font: 8px/1 var(--font-mono); letter-spacing: .08em; }
.segment.is-active { background: var(--paper); color: #0c100b; }
.select-label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; }
select {
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 6px 28px 6px 9px;
  background: var(--panel);
  color: var(--paper);
  font-size: 10px;
}
select:disabled { opacity: .35; cursor: not-allowed; }
.motion-button {
  border: 1px solid var(--line);
  padding: 7px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--muted);
  font: 8px/1 var(--font-mono);
  letter-spacing: .08em;
  white-space: nowrap;
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}
.motion-button:hover:not(:disabled) { border-color: var(--line-bright); color: var(--paper); }
.motion-button.is-active { border-color: rgba(202,255,54,.56); background: rgba(202,255,54,.07); color: var(--acid); }
.motion-light { width: 6px; height: 6px; border: 1px solid currentColor; border-radius: 50%; }
.motion-button.is-active .motion-light { background: var(--acid); box-shadow: 0 0 10px var(--acid); animation: status-pulse 1.8s ease-in-out infinite; }
.compare-button {
  margin-left: auto;
  border: 1px solid var(--line);
  padding: 7px 10px;
  display: flex; align-items: center; gap: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
}
.compare-button:hover:not(:disabled) { border-color: var(--line-bright); color: var(--paper); }
.compare-button:disabled { opacity: .3; cursor: not-allowed; }
.compare-icon { width: 13px; height: 8px; border: 1px solid currentColor; position: relative; }
.compare-icon::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; border-left: 1px solid currentColor; }

.video-controls {
  display: grid;
  grid-template-columns: 30px 42px minmax(0,1fr) 42px auto;
  align-items: center;
  gap: 10px;
  padding: 9px 10px 4px;
}
.video-play, .mute-button { border: 0; background: transparent; color: var(--paper); padding: 0; }
.video-play { font-size: 11px; }
.mute-button { color: var(--muted); font: 8px/1 var(--font-mono); letter-spacing: .08em; }
.timecode { color: var(--muted); font: 8px/1 var(--font-mono); }
.timeline { width: 100%; accent-color: var(--acid); }

.control-panel {
  min-width: 0;
  border-left: 1px solid var(--line);
  background: rgba(13,16,14,.92);
  display: grid;
  grid-template-rows: 76px minmax(0,1fr) 31px;
  overflow: hidden;
  position: relative;
  z-index: 10;
}
.panel-heading { padding: 17px 18px 13px; display: flex; align-items: flex-end; justify-content: space-between; border-bottom: 1px solid var(--line); }
.panel-heading .eyebrow { margin-bottom: 7px; color: var(--muted); }
.panel-heading h2 { margin: 0; font: 25px/.9 var(--font-display); letter-spacing: -.035em; }
.panel-grip { display: none; }
.panel-scroll { min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #343a34 transparent; }
.panel-scroll::-webkit-scrollbar { width: 4px; }
.panel-scroll::-webkit-scrollbar-thumb { background: #343a34; }

.preset-section { padding: 17px 16px 19px; border-bottom: 1px solid var(--line); }
.section-label { display: flex; align-items: center; gap: 10px; margin-bottom: 13px; }
.section-label span { color: var(--acid); font: 8px/1 var(--font-mono); }
.section-label h3 { margin: 0; color: var(--muted); font-size: 9px; font-weight: 500; letter-spacing: .12em; }
.preset-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.preset-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 31px minmax(0,1fr);
  align-items: center;
  gap: 9px;
  padding: 7px;
  border: 1px solid var(--line);
  background: #0c0f0d;
  text-align: left;
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
}
.preset-card:hover { border-color: var(--line-bright); transform: translateY(-1px); }
.preset-card.is-active { border-color: var(--acid); background: rgba(202,255,54,.055); }
.preset-card strong, .preset-card small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.preset-card strong { font-size: 9px; font-weight: 600; letter-spacing: .02em; }
.preset-card small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.preset-swatch { width: 31px; height: 31px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255,255,255,.16); }
.preset-acid { background: radial-gradient(circle at 35% 35%, #edffbe, #c9ff38 30%, #14120f 65%, #7c2d9b); }
.preset-ghost { background: radial-gradient(circle at 62% 30%, #dfe8de, #608160 36%, #09100d 68%); }
.preset-thermal { background: radial-gradient(circle at 60% 38%, #48dff3, #994dca 37%, #0a070d 70%); }
.preset-burnt { background: radial-gradient(circle at 38% 25%, #ff9a3c, #124b66 45%, #06070a 72%); }

.control-group { border-bottom: 1px solid var(--line); }
.control-group summary {
  list-style: none;
  min-height: 42px;
  padding: 0 17px;
  display: flex; align-items: center; justify-content: space-between;
  color: #b9c0b8;
  font-size: 9px;
  letter-spacing: .1em;
  cursor: pointer;
}
.control-group summary::-webkit-details-marker { display: none; }
.control-group summary b { color: var(--muted); font: 8px/1 var(--font-mono); margin-right: 9px; }
.control-group summary i { width: 8px; height: 8px; position: relative; }
.control-group summary i::before, .control-group summary i::after { content: ""; position: absolute; background: var(--muted); }
.control-group summary i::before { left: 0; right: 0; top: 3px; height: 1px; }
.control-group summary i::after { top: 0; bottom: 0; left: 3px; width: 1px; transition: transform .2s; }
.control-group[open] summary i::after { transform: rotate(90deg); }
.control-list { padding: 3px 17px 15px; }

.range-control {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 6px;
  padding: 7px 0;
  color: #c7cdc5;
  font-size: 10px;
}
.range-control span small, .switch-control span small { color: #5f685f; font: 7px/1 var(--font-mono); margin-left: 5px; letter-spacing: .08em; }
.range-control output { color: var(--muted); font: 8px/1 var(--font-mono); }
.range-control input[type="range"] { grid-column: 1 / -1; width: 100%; }

input[type="range"] {
  height: 14px;
  margin: 0;
  appearance: none;
  background: transparent;
}
input[type="range"]::-webkit-slider-runnable-track { height: 1px; background: #3b433b; }
input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 8px; height: 8px;
  margin-top: -3.5px;
  border: 0; border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 0 0 3px rgba(238,241,236,.08);
}
input[type="range"]::-moz-range-track { height: 1px; background: #3b433b; }
input[type="range"]::-moz-range-thumb { width: 8px; height: 8px; border: 0; border-radius: 50%; background: var(--paper); }

.palette-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin: 5px 0 8px; }
.palette-row label { color: var(--muted); font-size: 8px; text-align: center; }
input[type="color"] { display: block; width: 100%; height: 32px; margin-top: 6px; padding: 0; border: 1px solid var(--line); background: transparent; }
input[type="color"]::-webkit-color-swatch-wrapper { padding: 2px; }
input[type="color"]::-webkit-color-swatch { border: 0; }

.switch-control { min-height: 33px; display: flex; align-items: center; justify-content: space-between; color: #c7cdc5; font-size: 10px; }
.switch-control input { position: absolute; opacity: 0; pointer-events: none; }
.switch-control i { width: 30px; height: 15px; border: 1px solid #465046; border-radius: 20px; position: relative; transition: border-color .2s; }
.switch-control i::after { content: ""; position: absolute; width: 9px; height: 9px; left: 2px; top: 2px; border-radius: 50%; background: var(--muted); transition: transform .2s, background .2s; }
.switch-control input:checked + i { border-color: var(--acid); }
.switch-control input:checked + i::after { transform: translateX(15px); background: var(--acid); }

.panel-foot { display: flex; align-items: center; justify-content: space-around; border-top: 1px solid var(--line); color: #525a52; font: 7px/1 var(--font-mono); letter-spacing: .11em; }

.export-dialog {
  width: min(520px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--line-bright);
  background: #0c0f0d;
  color: var(--paper);
  box-shadow: 0 35px 120px #000;
}
.export-dialog::backdrop { background: rgba(3,5,3,.76); backdrop-filter: blur(12px); }
.export-card { padding: 24px; }
.export-head { display: flex; justify-content: space-between; align-items: flex-start; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.export-head h2 { margin: 0; font: 37px/.9 var(--font-display); letter-spacing: -.04em; }
.dialog-close { border: 0; background: transparent; color: var(--muted); font: 26px/1 var(--font-display); }
.export-image-options { display: grid; grid-template-columns: 1fr 1.5fr; gap: 12px; padding: 20px 0 14px; }
.export-field { display: grid; gap: 7px; color: var(--muted); font-size: 9px; letter-spacing: .06em; }
.export-field select { width: 100%; min-height: 38px; }
.quality-field { grid-column: 1 / -1; }
.quality-field span { display: flex; justify-content: space-between; }
.export-note { margin: 20px 0 14px; display: grid; grid-template-columns: 48px 1fr; gap: 14px; align-items: center; padding: 14px; border: 1px solid var(--line); background: #111512; }
.export-note p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.export-note-icon { color: var(--orange); font: 9px/1 var(--font-mono); letter-spacing: .1em; }
.export-summary { padding: 14px 0; display: flex; justify-content: space-between; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; }
.export-summary strong { color: var(--paper); font: 9px/1 var(--font-mono); }
.export-confirm { width: 100%; padding: 15px 16px; display: flex; justify-content: space-between; border: 0; background: var(--acid); color: #10140c; font-size: 11px; font-weight: 700; letter-spacing: .08em; }

.export-progress { position: fixed; z-index: 60; inset: 0; display: grid; place-items: center; background: rgba(5,7,5,.86); backdrop-filter: blur(16px); }
.progress-card { width: min(520px, calc(100vw - 32px)); display: grid; grid-template-columns: 120px 1fr; align-items: center; gap: 30px; padding: 30px; border: 1px solid var(--line-bright); background: #0d100e; }
.progress-ring { width: 120px; aspect-ratio: 1; display: grid; place-content: center; border: 1px solid var(--acid); border-radius: 50%; box-shadow: inset 0 0 38px rgba(202,255,54,.08); font: 36px/.8 var(--font-display); }
.progress-ring small { color: var(--acid); font: 8px/1 var(--font-mono); text-align: center; }
.progress-card h2 { margin: 0 0 8px; font: 31px/.95 var(--font-display); }
.progress-card p:last-child { margin: 0; color: var(--muted); font-size: 10px; }

.toast {
  position: fixed;
  z-index: 80;
  left: 50%; bottom: 26px;
  transform: translateX(-50%);
  min-width: min(420px, calc(100vw - 32px));
  padding: 12px 16px;
  border: 1px solid var(--line-bright);
  background: rgba(15,19,16,.96);
  box-shadow: 0 15px 45px rgba(0,0,0,.45);
  color: var(--paper);
  text-align: center;
  font-size: 10px;
  letter-spacing: .05em;
}
.toast.is-error { border-color: rgba(255,141,58,.65); color: #ffc39e; }

@keyframes status-pulse { 50% { opacity: .4; box-shadow: 0 0 4px var(--acid); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes orbit-spin { to { transform: rotate(360deg); } }
@keyframes artboard-enter { from { opacity: 0; transform: scale(.96) translateY(10px); } }

@media (max-width: 1020px) {
  .topbar { grid-template-columns: 1fr auto; }
  .topbar-status { display: none; }
  .workspace { grid-template-columns: minmax(0, 1fr) 320px; }
  .artboard { width: min(84%, 690px); }
}

@media (max-width: 760px) {
  body { overflow: hidden; }
  .topbar { height: 60px; grid-template-columns: 1fr auto; }
  .brand { grid-template-columns: 30px auto; gap: 9px; padding: 0 12px; }
  .brand-word { font-size: 18px; }
  .brand-cn { display: none; }
  .topbar-actions .button-quiet:not(#uploadButton), .topbar-actions #uploadButton { display: none; }
  .language-toggle { min-width: 58px; padding: 0 8px; }
  .button-acid { min-width: 106px; padding: 0 11px; font-size: 9px; }
  .workspace { height: calc(100vh - 60px); display: block; }
  .studio { height: 100%; padding: 8px 8px 74px; grid-template-rows: 22px minmax(0,1fr) 44px auto 22px; }
  .studio::before { inset: 8px 8px 74px; }
  .viewport { padding: 8px; }
  .artboard { width: min(94%, 620px); }
  .dropzone { padding: 28px 24px; }
  .dropzone h1 { font-size: clamp(36px, 12vw, 57px); }
  .dropzone-copy { font-size: 10px; }
  .stage-tools { gap: 6px; padding-inline: 4px; }
  .segment { padding-inline: 7px; }
  .select-label > span { display: none; }
  .motion-button { padding-inline: 7px; }
  .compare-button { font-size: 0; padding: 7px; }
  .control-panel {
    position: fixed;
    z-index: 40;
    left: 0; right: 0; bottom: 0;
    height: min(72vh, 670px);
    border: 1px solid var(--line-bright);
    border-bottom: 0;
    border-radius: 18px 18px 0 0;
    grid-template-rows: 62px minmax(0,1fr) 30px;
    transform: translateY(calc(100% - 66px));
    transition: transform .32s cubic-bezier(.2,.8,.2,1);
    box-shadow: 0 -28px 80px rgba(0,0,0,.62);
  }
  .control-panel.is-open { transform: translateY(0); }
  .panel-heading { padding: 13px 17px; align-items: center; }
  .panel-heading h2 { font-size: 20px; }
  .panel-grip { display: block; width: 44px; height: 28px; border: 0; background: transparent; }
  .panel-grip span { display: block; width: 34px; height: 3px; margin: auto; border-radius: 5px; background: #4c554c; }
  .preset-grid { grid-template-columns: repeat(2, 1fr); }
  .progress-card { grid-template-columns: 84px 1fr; gap: 18px; padding: 21px; }
  .progress-ring { width: 84px; font-size: 28px; }
}

@media (max-width: 420px) {
  .brand-index { display: none; }
  .brand { grid-template-columns: auto; }
  .stage-tools .segmented { display: none; }
  .export-image-options { grid-template-columns: 1fr; }
  .quality-field { grid-column: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
