:root {
  color-scheme: dark;
  --ink-950: #070807;
  --ink-900: #0c0e0d;
  --ink-850: #111312;
  --ink-800: #171918;
  --ink-700: #242725;
  --ink-600: #343836;
  --paper: #f7f6f1;
  --paper-soft: #e7e4dc;
  --text: #f3f1ea;
  --muted: #aaa69c;
  --faint: #706d66;
  --line: rgba(255, 255, 255, 0.13);
  --line-strong: rgba(255, 255, 255, 0.22);
  --red: #d73730;
  --red-deep: #9e211d;
  --green: #56b878;
  --blue: #5d91e8;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.34);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

#codex-browser-sidebar-comments-root {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  background: var(--ink-950);
  color: var(--text);
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

svg {
  width: 20px;
  height: 20px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.app-shell {
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-rows: 58px minmax(0, 1fr);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 240px),
    var(--ink-950);
}

.topbar {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 8, 7, 0.96);
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 22px;
  border-right: 1px solid var(--line);
  min-width: 0;
}

.brand-logo {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: block;
  border-radius: 9px;
  object-fit: contain;
  background: #000000;
}

.brand-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 20px;
  font-weight: 780;
  letter-spacing: 0;
}

.brand-sub {
  color: var(--muted);
  font-size: 20px;
  font-weight: 420;
  margin-left: -5px;
}

.modebar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  min-width: 0;
}

#fileInput {
  display: none;
}

.command-btn,
.icon-btn,
.tool-btn,
.mini-btn,
.reset-btn,
.curve-action-btn,
.export-btn,
.channel-tab {
  border: 1px solid transparent;
  background: transparent;
  border-radius: 5px;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.command-btn {
  height: 40px;
  min-width: 116px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.command-btn svg {
  width: 19px;
  height: 19px;
}

.command-btn:hover,
.command-btn:focus-visible {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

.command-btn.is-active {
  color: #ff5149;
  background: rgba(215, 55, 48, 0.14);
  border-color: rgba(215, 55, 48, 0.18);
}

.viewbar {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 16px;
  border-left: 1px solid var(--line);
  min-width: 0;
}

.icon-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.icon-btn:hover,
.icon-btn:focus-visible,
.tool-btn:hover,
.tool-btn:focus-visible,
.mini-btn:hover,
.mini-btn:focus-visible,
.curve-action-btn:hover,
.curve-action-btn:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.08);
}

.icon-btn.is-active {
  color: #ff5149;
  background: rgba(215, 55, 48, 0.14);
  border-color: rgba(215, 55, 48, 0.18);
}

.divider {
  width: 1px;
  height: 27px;
  background: var(--line-strong);
  margin: 0 4px;
}

.zoom-select {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  min-width: 92px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  justify-content: center;
}

.zoom-select select {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.studio-main {
  min-height: 0;
  display: grid;
  grid-template-columns: 110px minmax(520px, 1fr) 374px;
  grid-template-areas: "tools workspace inspector";
}

.toolrail {
  grid-area: tools;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 8px 12px;
  background: var(--ink-900);
  border-right: 1px solid var(--line);
  min-width: 0;
}

.tool-btn {
  width: 88px;
  min-height: 60px;
  display: grid;
  place-items: center;
  gap: 4px;
  color: #c7c3ba;
  padding: 4px;
}

.tool-btn svg {
  width: 22px;
  height: 22px;
}

.tool-btn span {
  font-size: 10.5px;
  line-height: 1.12;
  color: currentColor;
  max-width: 82px;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

.tool-btn.is-selected {
  color: #fff;
  background: rgba(215, 55, 48, 0.16);
  border-color: rgba(215, 55, 48, 0.32);
}

.tool-btn-export {
  color: #fff;
  background: #111311;
  border-color: rgba(215, 55, 48, 0.2);
  font-size: 12px;
  font-weight: 780;
}

.tool-btn-export-ref {
  margin-top: auto;
  background: linear-gradient(180deg, #df3c35, #b72621);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 24px rgba(173, 34, 28, 0.18);
}

.tool-btn-export-before {
  border-color: var(--line-strong);
}

.workspace {
  grid-area: workspace;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 38px minmax(330px, 1fr);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    var(--ink-850);
  background-size: 36px 36px;
}

.document-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 10, 9, 0.92);
  min-width: 0;
}

.doc-meta,
.doc-state {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 12px;
  min-width: 0;
}

.doc-meta strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 680;
}

.doc-meta span,
.doc-meta strong {
  white-space: nowrap;
}

.caret {
  width: 0;
  height: 0;
  border-left: 5px solid var(--muted);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}

.canvas-stage {
  --zoom-scale: 1;
  --zoom-pan-x: 0px;
  --zoom-pan-y: 0px;
  position: relative;
  min-height: 0;
  min-width: 0;
  padding: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: #050605;
  overflow: hidden;
  touch-action: none;
}

.canvas-stage.single-view {
  grid-template-columns: 1fr;
}

.canvas-stage.is-zoomed {
  cursor: grab;
}

.canvas-stage.is-panning {
  cursor: grabbing;
}

.canvas-stage.single-view .before-pane {
  display: none;
}

.canvas-pane {
  position: relative;
  margin: 0;
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--paper);
}

.canvas-pane::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(0, 0, 0, 0.16);
  pointer-events: none;
  z-index: 2;
}

.canvas-pane canvas {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  transform: translate3d(var(--zoom-pan-x), var(--zoom-pan-y), 0) scale(var(--zoom-scale));
  transform-origin: center;
  transition: transform 140ms ease;
  will-change: transform;
}

.canvas-stage.is-panning .canvas-pane canvas {
  transition: none;
}

.pane-label {
  position: absolute;
  left: 13px;
  top: 13px;
  z-index: 3;
  padding: 5px 8px;
  background: rgba(0, 0, 0, 0.82);
  color: #fff;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.mobile-canvas-controls {
  display: none;
}

.canvas-control-btn {
  height: 34px;
  min-width: 44px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 5px;
  background: rgba(9, 10, 9, 0.88);
  color: #f7f6f1;
  font-size: 12px;
  font-weight: 780;
  line-height: 1;
  cursor: pointer;
}

.canvas-control-btn.is-active {
  background: rgba(215, 55, 48, 0.92);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.canvas-control-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.canvas-icon-btn {
  width: 38px;
  min-width: 38px;
  display: inline-grid;
  place-items: center;
  padding: 0;
}

.canvas-icon-btn svg {
  width: 18px;
  height: 18px;
}

.inspector {
  grid-area: inspector;
  min-width: 0;
  min-height: 0;
  padding: 12px 12px 14px;
  border-left: 1px solid var(--line);
  background: var(--ink-900);
  overflow-y: auto;
}

.panel {
  border-bottom: 1px solid var(--line);
  padding: 0 0 12px;
  margin-bottom: 12px;
}

.panel h2 {
  margin: 0 0 11px;
  font-size: 16px;
  font-weight: 780;
  letter-spacing: 0;
}

.control-row,
.select-row,
.curve-values,
.curve-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.control-row {
  margin-top: 8px;
  margin-bottom: 3px;
}

.control-row label,
.select-row label,
.curve-values label,
.curve-meta {
  color: #d7d2c9;
  font-size: 12px;
  font-weight: 700;
}

output,
.curve-values output {
  min-width: 42px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  padding: 0 7px;
  color: var(--text);
  background: #111311;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 640;
}

input[type="range"] {
  width: 100%;
  height: 16px;
  margin: 0;
  accent-color: var(--red);
}

.scale-labels {
  position: relative;
  display: block;
  height: 14px;
  margin-top: -2px;
  color: var(--muted);
  font-size: 11px;
}

.scale-labels span {
  position: absolute;
  top: 0;
  min-width: max-content;
  text-align: center;
  transform: translateX(-50%);
}

.scale-labels span:nth-child(1) { left: 0%; }
.scale-labels span:nth-child(2) { left: 20%; }
.scale-labels span:nth-child(3) { left: 40%; }
.scale-labels span:nth-child(4) { left: 60%; }
.scale-labels span:nth-child(5) { left: 80%; }
.scale-labels span:nth-child(6) { left: 100%; }

.compact-panel {
  padding-bottom: 11px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 25px;
  color: #d4d0c8;
  font-size: 12px;
  font-weight: 620;
}

.check-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--red);
}

.select-row {
  margin-top: 6px;
}

select {
  min-width: 112px;
  height: 30px;
  border: 1px solid var(--line-strong);
  background: #111311;
  color: var(--text);
  border-radius: 4px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 650;
}

.curves-panel {
  padding-bottom: 11px;
}

.channel-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

.channel-tab {
  height: 29px;
  border-radius: 0;
  border-right: 1px solid var(--line);
  color: var(--muted);
  background: #111311;
  font-size: 12px;
  font-weight: 700;
}

.channel-tab:last-child {
  border-right: 0;
}

.channel-tab.is-active {
  color: #fff;
  background: #2a2d2a;
}

.channel-tab.red.is-active {
  color: #ff6b65;
}

.channel-tab.green.is-active {
  color: #76d996;
}

.channel-tab.blue.is-active {
  color: #8ab4ff;
}

.curve-meta {
  margin-bottom: 6px;
}

.curve-wrap {
  position: relative;
  height: 198px;
  background: #090a09;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  overflow: hidden;
}

#curveCanvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
  touch-action: none;
}

.curve-values {
  margin: 7px 0 9px;
  justify-content: flex-start;
}

.curve-check {
  margin: 0 0 9px;
  padding: 7px 8px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.curve-values label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
}

.curve-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.curve-action-btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 8px;
  border-color: var(--line-strong);
  color: var(--muted);
  background: #111311;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.1;
  text-align: center;
}

.curve-action-btn svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.curve-action-btn:disabled,
.icon-btn:disabled {
  cursor: not-allowed;
  opacity: 0.35;
  background: transparent;
  border-color: var(--line);
  color: var(--muted);
}

.curve-action-btn.is-active {
  color: #fff;
  background: rgba(215, 55, 48, 0.2);
  border-color: rgba(215, 55, 48, 0.42);
}

.curve-action-wide {
  grid-column: 1 / -1;
}

.mini-btn {
  height: 32px;
  display: grid;
  place-items: center;
  border-color: var(--line-strong);
  color: var(--muted);
}

.mini-btn:disabled {
  cursor: not-allowed;
  opacity: 0.35;
  background: transparent;
  border-color: var(--line);
  color: var(--muted);
}

.reset-btn {
  height: 32px;
  border-color: var(--line-strong);
  background: #111311;
  font-size: 12px;
  font-weight: 700;
}

.reset-btn:hover,
.reset-btn:focus-visible {
  background: rgba(255, 255, 255, 0.07);
}

.export-actions {
  display: grid;
  gap: 10px;
}

.export-btn {
  width: 100%;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  background: linear-gradient(180deg, #df3c35, #b72621);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 30px rgba(173, 34, 28, 0.24);
  font-size: 14px;
  font-weight: 820;
}

.export-btn:hover,
.export-btn:focus-visible {
  transform: translateY(-1px);
  background: linear-gradient(180deg, #ec443d, #c12b25);
}

.export-btn-secondary {
  height: 44px;
  background: #111311;
  border-color: var(--line-strong);
  box-shadow: none;
}

.export-btn-secondary:hover,
.export-btn-secondary:focus-visible {
  background: rgba(255, 255, 255, 0.07);
}

.export-meta {
  display: flex;
  justify-content: center;
  gap: 16px;
  color: var(--muted);
  font-size: 12px;
  margin-top: 10px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%) translateY(16px);
  opacity: 0;
  pointer-events: none;
  background: rgba(7, 8, 7, 0.94);
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  box-shadow: var(--shadow);
  padding: 11px 14px;
  font-size: 13px;
  font-weight: 680;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
  z-index: 10;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: 1fr;
  }

  .viewbar {
    display: none;
  }

  .studio-main {
    grid-template-columns: 110px minmax(0, 1fr);
    grid-template-rows: minmax(650px, auto) auto;
    grid-template-areas:
      "tools workspace"
      "inspector inspector";
    overflow-y: auto;
    overscroll-behavior: contain;
    align-content: start;
    padding-bottom: max(120px, calc(env(safe-area-inset-bottom) + 96px));
    scroll-padding-bottom: max(150px, calc(env(safe-area-inset-bottom) + 120px));
  }

  .workspace {
    min-height: 650px;
  }

  .inspector {
    border-left: 0;
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    overflow: visible;
    padding-bottom: max(120px, calc(env(safe-area-inset-bottom) + 96px));
  }

  .panel {
    border-bottom: 0;
    margin-bottom: 0;
    padding-bottom: 0;
  }

  .export-actions,
  .export-meta {
    grid-column: 1 / -1;
    scroll-margin-bottom: max(150px, calc(env(safe-area-inset-bottom) + 120px));
  }

  .export-actions {
    margin-top: 8px;
  }

  .export-meta {
    padding-bottom: max(180px, calc(env(safe-area-inset-bottom) + 150px));
  }

  body.curves-focused .curves-panel {
    position: fixed;
    z-index: 9;
    left: 124px;
    right: 14px;
    bottom: 14px;
    max-height: min(420px, calc(100vh - 96px));
    overflow-y: auto;
    padding: 16px;
    margin: 0;
    background: rgba(9, 10, 9, 0.98);
    border: 1px solid rgba(215, 55, 48, 0.48);
    border-radius: 6px;
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.58);
  }

  body.curves-focused .curves-panel h2 {
    color: #fff;
  }

  body.curves-focused .curve-wrap {
    height: clamp(190px, 28vh, 250px);
  }
}

@media (min-width: 821px) and (max-width: 1180px) {
  html,
  body {
    height: auto;
    min-height: 100%;
    overflow-y: auto;
  }

  body {
    overflow-x: hidden;
  }

  .app-shell {
    min-height: 100dvh;
    height: auto;
    grid-template-rows: 58px auto;
  }

  .studio-main {
    overflow: visible;
    padding-bottom: max(220px, calc(env(safe-area-inset-bottom) + 190px));
  }

  .inspector {
    padding-bottom: max(220px, calc(env(safe-area-inset-bottom) + 190px));
  }

  .export-actions {
    position: fixed;
    z-index: 12;
    left: 96px;
    right: 18px;
    bottom: max(18px, env(safe-area-inset-bottom));
    padding-top: 12px;
    padding: 12px;
    margin: 0;
    border-top: 1px solid var(--line);
    border-radius: 6px;
    background:
      linear-gradient(180deg, rgba(9, 10, 9, 0), rgba(9, 10, 9, 0.96) 24%),
      var(--ink-900);
    box-shadow: 0 -16px 42px rgba(0, 0, 0, 0.38);
  }
}

@media (max-width: 820px) {
  html,
  body {
    height: auto;
    min-height: 100%;
    overflow-y: auto;
  }

  body {
    overflow-x: hidden;
  }

  .app-shell {
    min-height: 100dvh;
    height: auto;
    grid-template-rows: auto auto;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 8;
    grid-template-columns: 1fr;
    gap: 0;
    padding-bottom: 0;
  }

  .brand {
    height: 54px;
    padding: 0 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand-logo {
    width: 33px;
    height: 33px;
    border-radius: 8px;
  }

  .brand-name {
    font-size: 18px;
  }

  .studio-main {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    grid-template-areas:
      "tools"
      "workspace"
      "inspector";
    overflow: visible;
    padding-bottom: max(120px, calc(env(safe-area-inset-bottom) + 96px));
  }

  .toolrail {
    position: sticky;
    top: 54px;
    z-index: 7;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    min-height: 0;
    height: auto;
    padding: 8px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    scroll-snap-type: x proximity;
  }

  .tool-btn {
    flex: 0 0 64px;
    width: 64px;
    min-height: 48px;
    padding: 4px 2px;
    scroll-snap-align: start;
  }

  .tool-btn-export,
  .tool-btn-export-ref {
    margin-top: 0;
  }

  .tool-btn span {
    max-width: 100%;
    font-size: 10px;
  }

  .workspace {
    min-height: 0;
    grid-template-rows: 36px minmax(430px, 64dvh);
  }

  .document-bar {
    gap: 8px;
    padding: 0 10px;
  }

  .doc-state,
  .doc-meta span:nth-of-type(n + 3) {
    display: none;
  }

  .doc-meta {
    gap: 9px;
  }

  .canvas-stage {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    padding: 6px;
    overflow-x: hidden;
    overflow-y: hidden;
    touch-action: none;
  }

  .canvas-stage .before-pane {
    display: none;
  }

  .canvas-stage.mobile-show-before .before-pane {
    display: grid;
  }

  .canvas-stage.mobile-show-before .after-pane {
    display: none;
  }

  .mobile-canvas-controls {
    position: absolute;
    left: auto;
    right: 12px;
    top: 10px;
    bottom: auto;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    pointer-events: auto;
  }

  .mobile-pane-switch,
  .mobile-zoom-controls {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    background: rgba(5, 6, 5, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 7px;
    backdrop-filter: blur(10px);
  }

  .mobile-pane-switch .canvas-control-btn {
    min-width: 74px;
  }

  .mobile-zoom-controls .canvas-control-btn:not(.canvas-icon-btn) {
    min-width: 72px;
  }

  .inspector {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 10px 12px max(130px, calc(env(safe-area-inset-bottom) + 104px));
  }

  body.curves-focused .curves-panel {
    left: 10px;
    right: 10px;
    bottom: 10px;
    max-height: min(72vh, 500px);
  }

  .curve-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .curve-action-btn {
    min-height: 44px;
    padding: 0 6px;
  }

  .curve-action-wide {
    grid-column: 1 / -1;
  }

  .export-meta {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .workspace {
    grid-template-rows: 34px minmax(390px, 62dvh);
  }

  .brand-name {
    font-size: 16px;
  }

  .brand-logo {
    width: 31px;
    height: 31px;
    border-radius: 8px;
  }

  .tool-btn {
    flex-basis: 58px;
    width: 58px;
  }

  .tool-btn span {
    font-size: 9.5px;
  }

  .curve-wrap {
    height: 180px;
  }

  .pane-label {
    left: 8px;
    top: 8px;
    font-size: 10px;
  }

  .mobile-canvas-controls {
    left: auto;
    right: 8px;
    gap: 5px;
  }

  .mobile-pane-switch .canvas-control-btn {
    min-width: 60px;
  }

  .mobile-zoom-controls .canvas-control-btn:not(.canvas-icon-btn) {
    min-width: 58px;
  }

  .canvas-icon-btn {
    width: 34px;
    min-width: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
