:root {
  color-scheme: dark;
  --background: #0b0c0e;
  --surface: #14161a;
  --surface-raised: #1b1e22;
  --line: rgba(255, 255, 255, 0.09);
  --text: #f6f2e8;
  --muted: #8e9299;
  --accent: #ffd84d;
  --canvas-size: 352px;
  --cell-size: 11px;
  --grid-line: rgba(255, 255, 255, 0.055);
  font-family: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: var(--background);
}

body {
  min-width: 280px;
  color: var(--text);
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
  touch-action: manipulation;
}

button:focus-visible,
input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

#app {
  min-height: 100svh;
}

.app-shell {
  width: min(100%, 460px);
  min-height: 100svh;
  margin: 0 auto;
  background: var(--background);
}

.editor-screen {
  display: flex;
  height: 100svh;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
}

.editor-header,
.editor-body {
  background: var(--background);
}

.editor-header {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 52px;
  padding: max(4px, env(safe-area-inset-top)) 10px 4px;
  border-bottom: 1px solid var(--line);
}

.loop-name {
  max-width: 116px;
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  font-weight: 680;
  letter-spacing: -0.01em;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  justify-content: flex-end;
  gap: 2px;
}

.header-action,
.icon-button,
.tray-action,
.frame-action,
.tool-button,
.brush-button,
.utility-button,
.quick-color,
.magic-button,
.toggle-button,
.speed-button,
.frame-card,
.add-frame {
  border: 0;
  background: transparent;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition: background-color 100ms ease, border-color 100ms ease, color 100ms ease, transform 80ms ease;
}

.header-action,
.icon-button {
  display: inline-flex;
  min-width: 42px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 6px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
}

.header-action:active,
.icon-button:active,
.tray-action:active,
.frame-action:active,
.tool-button:active,
.brush-button:active,
.utility-button:active,
.quick-color:active,
.magic-button:active,
.toggle-button:active,
.speed-button:active,
.add-frame:active {
  background: rgba(255, 255, 255, 0.08);
  transform: scale(0.96);
}

button:disabled {
  cursor: default;
  opacity: 0.34;
}

.back-action {
  display: flex;
  justify-self: start;
  gap: 2px;
  padding: 0 8px 0 4px;
  color: var(--text);
  font-size: 15px;
}

.back-action > span:first-child {
  margin-top: -2px;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 32px;
  font-weight: 260;
  line-height: 1;
}

.play-icon {
  width: 0;
  height: 0;
  margin-left: 3px;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 11px solid currentColor;
}

.is-playing .play-icon {
  width: 12px;
  height: 14px;
  margin-left: 0;
  border: 0;
  background: linear-gradient(90deg, currentColor 0 4px, transparent 4px 8px, currentColor 8px 12px);
}

.share-icon {
  position: relative;
  width: 17px;
  height: 16px;
  margin-top: 5px;
  border: 1.7px solid currentColor;
  border-radius: 4px;
}

.share-icon::before {
  position: absolute;
  top: -8px;
  left: 6px;
  width: 6px;
  height: 9px;
  border-top: 1.7px solid currentColor;
  border-left: 1.7px solid currentColor;
  content: "";
  transform: rotate(45deg);
}

.share-icon::after {
  position: absolute;
  top: -7px;
  left: 7px;
  width: 1.7px;
  height: 11px;
  background: currentColor;
  content: "";
}

.editor-body {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: center;
  padding: 8px 16px 5px;
}

.canvas-stack {
  width: var(--canvas-size);
}

.canvas-stage {
  position: relative;
  width: var(--canvas-size);
  height: var(--canvas-size);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  background: #15171a;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  isolation: isolate;
}

.canvas-hud {
  display: flex;
  height: 26px;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 720;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.tool-status {
  color: var(--accent);
}

.canvas-stage::after {
  position: absolute;
  inset: 0;
  z-index: 2;
  background-image:
    repeating-linear-gradient(to right, var(--grid-line) 0 1px, transparent 1px var(--cell-size)),
    repeating-linear-gradient(to bottom, var(--grid-line) 0 1px, transparent 1px var(--cell-size));
  content: "";
  pointer-events: none;
}

#pixel-canvas {
  display: block;
  width: var(--canvas-size);
  height: var(--canvas-size);
  touch-action: none;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.editor-tray {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  margin-top: 0;
  padding: 8px 12px calc(9px + env(safe-area-inset-bottom));
  overflow-y: auto;
  border-top: 1px solid var(--line);
  background: var(--surface);
  scrollbar-width: none;
}

.editor-tray::-webkit-scrollbar {
  display: none;
}

.frames-row {
  display: flex;
  align-items: center;
}

.frames-row {
  gap: 8px;
  min-width: 0;
}

.frame-strip {
  display: flex;
  flex: 1;
  gap: 8px;
  min-width: 0;
  padding: 1px 2px 4px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}

.frame-strip::-webkit-scrollbar {
  display: none;
}

.frame-card,
.add-frame {
  position: relative;
  display: grid;
  flex: 0 0 56px;
  width: 56px;
  height: 68px;
  padding: 0;
  place-items: start center;
  border-radius: 8px;
  scroll-snap-align: start;
}

.frame-card canvas {
  width: 56px;
  height: 56px;
  border: 2px solid transparent;
  border-radius: 6px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.frame-card.is-selected canvas {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(255, 216, 77, 0.25);
}

.frame-card > span {
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  line-height: 12px;
}

.frame-card.is-selected > span {
  color: var(--text);
}

.add-frame {
  height: 56px;
  align-content: center;
  gap: 1px;
  place-items: center;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  color: var(--muted);
}

.add-frame > span:first-child {
  font-size: 23px;
  font-weight: 300;
  line-height: 22px;
}

.add-frame > span:last-child {
  font-size: 10px;
  font-weight: 650;
  line-height: 12px;
}

.tray-action {
  display: flex;
  flex: 0 0 56px;
  width: 56px;
  height: 68px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.frame-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 2px 0 7px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101216;
}

.frame-action {
  display: inline-flex;
  min-width: 0;
  height: 34px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 5px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: #b9bbc0;
  font-size: 10px;
  font-weight: 690;
}

.frame-action:last-child {
  border-right: 0;
}

.frame-action > span[aria-hidden="true"] {
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
}

.frame-action.delete-frame {
  border-left: 1px solid rgba(255, 111, 124, 0.12);
  color: #e7b0b5;
}

.frame-action.delete-frame:not(:disabled):active {
  background: rgba(255, 111, 124, 0.13);
}

.frame-action .duplicate-icon {
  width: 12px;
  height: 12px;
}

.frame-action .duplicate-icon::before {
  top: -4px;
  left: -4px;
  width: 10px;
  height: 10px;
}

.duplicate-icon {
  position: relative;
  width: 14px;
  height: 14px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
}

.duplicate-icon::before {
  position: absolute;
  top: -5px;
  left: -5px;
  width: 12px;
  height: 12px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
  content: "";
}

.magic-button {
  display: flex;
  min-width: 0;
  height: 48px;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0 4px;
  border: 1px solid rgba(255, 216, 77, 0.24);
  border-radius: 8px;
  background: #17181b;
  color: var(--text);
  font-size: 11px;
  font-weight: 720;
  white-space: nowrap;
}

.magic-button > span:last-child {
  display: grid;
  gap: 1px;
  text-align: left;
}

.magic-button strong {
  font-size: 11px;
  line-height: 1.05;
}

.magic-button small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 620;
  line-height: 1.05;
}

.magic-button > span:first-child {
  color: var(--accent);
  font-size: 13px;
  line-height: 1;
}

.drawing-controls {
  display: grid;
  gap: 7px;
  padding-top: 7px;
  border-top: 1px solid var(--line);
}

.tool-group {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.tool-button {
  display: flex;
  min-width: 0;
  height: 46px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 7px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 9px;
  background: #101216;
  color: #b5b7bc;
  font-size: 12px;
  font-weight: 680;
}

.tool-button.is-selected {
  border-color: var(--accent);
  background: var(--accent);
  color: #181608;
}

.tool-button.is-selected .tool-icon {
  color: #181608;
}

.tool-icon {
  position: relative;
  display: block;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
}

.color-row,
.utility-row,
.control-footer,
.brush-control,
.brush-group,
.history-group,
.color-palette,
.helper-group,
.speed-control,
.speed-group {
  display: flex;
  align-items: center;
}

.color-row {
  min-width: 0;
  gap: 7px;
}

.control-label {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 680;
  letter-spacing: 0.01em;
}

.color-palette {
  flex: 1;
  min-width: 0;
  justify-content: space-between;
  gap: 4px;
}

.quick-color {
  position: relative;
  display: grid;
  flex: 0 0 31px;
  width: 31px;
  height: 31px;
  padding: 0;
  place-items: center;
  border: 2px solid transparent;
  border-radius: 8px;
}

.quick-color::before {
  width: 20px;
  height: 20px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 5px;
  background: var(--quick-color);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45);
  content: "";
}

.quick-color.is-selected {
  border-color: var(--accent);
  background: rgba(255, 216, 77, 0.12);
  transform: translateY(-1px);
}

.utility-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  justify-content: space-between;
  gap: 5px;
}

.helper-group,
.speed-group {
  gap: 4px;
}

.toggle-button,
.speed-button {
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111317;
  color: #b9bbc0;
  font-size: 10px;
  font-weight: 680;
}

.toggle-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 8px;
}

.toggle-button > span:first-child {
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
}

.toggle-button.is-selected,
.speed-button.is-selected {
  border-color: var(--accent);
  background: var(--accent);
  color: #181608;
}

.toggle-button.is-selected > span:first-child {
  color: #181608;
}

.onion-icon {
  position: relative;
  width: 14px;
  height: 14px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}

.onion-icon::after {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 8px;
  height: 8px;
  border: 1px solid currentColor;
  border-radius: 50%;
  content: "";
}

.speed-control {
  gap: 6px;
}

.speed-button {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  padding: 0;
  place-items: center;
  font-variant-numeric: tabular-nums;
}

.pencil-icon::before {
  position: absolute;
  top: 1px;
  left: 7px;
  width: 5px;
  height: 15px;
  border: 1.5px solid currentColor;
  border-radius: 2px 2px 1px 1px;
  content: "";
  transform: rotate(42deg);
}

.pencil-icon::after {
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 4px;
  height: 4px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  content: "";
  transform: rotate(-4deg);
}

.eraser-icon::before {
  position: absolute;
  top: 4px;
  left: 2px;
  width: 14px;
  height: 10px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
  content: "";
  transform: rotate(-40deg);
}

.eraser-icon::after {
  position: absolute;
  top: 9px;
  left: 7px;
  width: 8px;
  border-top: 1.5px solid currentColor;
  content: "";
  transform: rotate(-40deg);
}

.fill-icon::before {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 11px;
  height: 11px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
  content: "";
  transform: rotate(42deg);
}

.fill-icon::after {
  position: absolute;
  right: 0;
  bottom: 1px;
  width: 5px;
  height: 5px;
  border-radius: 50% 50% 55% 45%;
  background: currentColor;
  content: "";
  transform: rotate(45deg);
}

.eyedropper-icon::before {
  position: absolute;
  top: 1px;
  left: 7px;
  width: 6px;
  height: 15px;
  border: 1.5px solid currentColor;
  border-radius: 4px 4px 2px 2px;
  content: "";
  transform: rotate(45deg);
}

.eyedropper-icon::after {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 5px;
  height: 5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  content: "";
}

.color-button {
  position: relative;
  display: flex;
  flex: 0 0 54px;
  width: 54px;
  height: 31px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 8px;
  background: #111317;
  color: var(--muted);
  font-size: 10px;
  font-weight: 680;
  cursor: pointer;
}

.color-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.color-swatch {
  width: 16px;
  height: 16px;
  border: 1.5px solid rgba(255, 255, 255, 0.75);
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.65);
}

.control-footer {
  justify-content: space-between;
  gap: 8px;
}

.history-group,
.brush-group {
  gap: 4px;
}

.utility-button {
  display: inline-flex;
  height: 36px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111317;
  color: #c5c7cc;
  font-size: 11px;
  font-weight: 650;
}

.utility-button > span {
  margin-top: -1px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
}

.brush-control {
  gap: 7px;
}

.brush-button {
  display: grid;
  grid-template-rows: 11px 11px;
  flex: 0 0 32px;
  width: 32px;
  height: 36px;
  padding: 0;
  place-items: center;
  align-content: center;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #b6b8bd;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.brush-button.is-selected {
  border-color: var(--accent);
  background: var(--accent);
  color: #181608;
}

.motion-trigger {
  display: inline-flex;
  height: 36px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 10px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: #181608;
  font-size: 11px;
  font-weight: 780;
  cursor: pointer;
  transition: filter 100ms ease, transform 80ms ease;
}

.motion-chevron {
  margin-top: -2px;
  font-size: 14px;
  transition: transform 100ms ease;
}

.motion-trigger[aria-expanded="true"] .motion-chevron {
  transform: rotate(180deg);
}

.motion-trigger:active {
  filter: brightness(0.9);
  transform: scale(0.96);
}

.motion-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  padding: 7px;
  border: 1px solid rgba(255, 216, 77, 0.22);
  border-radius: 9px;
  background: #101216;
}

.motion-copy {
  display: flex;
  grid-column: 1 / -1;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 1px 2px 3px;
}

.motion-copy strong {
  color: var(--text);
  font-size: 11px;
}

.motion-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.motion-panel[hidden] {
  display: none;
}

.brush-square {
  width: var(--dot-size);
  height: var(--dot-size);
  border-radius: 1px;
  background: currentColor;
}

.home-screen {
  position: relative;
  padding: max(28px, env(safe-area-inset-top)) 16px calc(22px + env(safe-area-inset-bottom));
  overflow: hidden;
}

.home-header {
  padding: 12px 4px 22px;
}

.home-header h1 {
  margin: 0;
  color: var(--accent);
  font-size: clamp(44px, 14vw, 58px);
  font-weight: 840;
  letter-spacing: -0.065em;
  line-height: 0.94;
}

.home-header p {
  max-width: 310px;
  margin: 12px 0 0;
  color: #c4c0b7;
  font-size: 16px;
  line-height: 1.35;
}

.home-magic-note {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 7px 9px;
  border: 1px solid rgba(255, 216, 77, 0.2);
  border-radius: 8px;
  background: rgba(255, 216, 77, 0.05);
  color: var(--muted);
  font-size: 11px;
}

.home-magic-note > span:first-child,
.home-magic-note strong {
  color: var(--accent);
}

.home-magic-note strong {
  font-weight: 760;
}

.home-content {
  display: grid;
  gap: 24px;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  min-height: 28px;
  padding: 0 2px 8px;
}

.section-heading h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 720;
  letter-spacing: -0.01em;
}

.section-heading > span {
  color: var(--muted);
  font-size: 12px;
}

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

.loop-card {
  display: grid;
  min-width: 0;
  padding: 8px 8px 10px;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.loop-card:active {
  background: var(--surface-raised);
}

.loop-preview {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 6px;
  background: #15171a;
}

.loop-preview canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.loop-card-name {
  overflow: hidden;
  font-size: 13px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.featured-row {
  display: flex;
  gap: 10px;
  margin-inline: -16px;
  padding: 0 16px 4px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}

.featured-row::-webkit-scrollbar {
  display: none;
}

.loop-card.is-compact {
  flex: 0 0 112px;
  width: 112px;
  scroll-snap-align: start;
}

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

.start-button {
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}

.start-button:active {
  background: var(--surface-raised);
}

.photo-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.photo-icon {
  position: relative;
  width: 18px;
  height: 15px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
}

.photo-icon::before {
  position: absolute;
  top: -4px;
  left: 4px;
  width: 8px;
  height: 4px;
  border: 1.5px solid currentColor;
  border-bottom: 0;
  border-radius: 2px 2px 0 0;
  content: "";
}

.photo-icon::after {
  position: absolute;
  top: 3px;
  left: 5px;
  width: 5px;
  height: 5px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  content: "";
}

.blank-icon {
  color: var(--accent);
  font-size: 25px;
  font-weight: 300;
  line-height: 1;
}

.status-toast {
  position: fixed;
  right: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom));
  z-index: 20;
  max-width: calc(100vw - 40px);
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #24272c;
  color: var(--text);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(50%);
  transition: opacity 120ms ease;
}

.status-toast.is-visible {
  opacity: 1;
}

@media (max-width: 360px) {
  .back-word {
    display: none;
  }

  .tool-button {
    gap: 4px;
    padding-inline: 4px;
    font-size: 11px;
  }

  .loop-name {
    max-width: 80px;
  }

  .header-action,
  .icon-button {
    gap: 3px;
    padding-inline: 4px;
    font-size: 9px;
  }

  .quick-color {
    flex-basis: 27px;
    width: 27px;
    height: 30px;
  }

  .quick-color::before {
    width: 18px;
    height: 18px;
  }

  .color-button {
    flex-basis: 46px;
    width: 46px;
    gap: 3px;
  }

  .brush-button {
    flex-basis: 29px;
    width: 29px;
  }

  .speed-button {
    flex-basis: 30px;
    width: 30px;
  }

  .utility-button {
    padding-inline: 7px;
  }

  .magic-button {
    gap: 2px;
    padding-inline: 2px;
    font-size: 9px;
  }

  .toggle-button {
    gap: 3px;
    padding-inline: 5px;
    font-size: 9px;
  }

  .utility-button {
    padding-inline: 5px;
    font-size: 9px;
  }

  .motion-trigger {
    padding-inline: 7px;
    font-size: 9px;
  }
}

@media (max-height: 700px) {
  .editor-header {
    min-height: 48px;
  }

  .editor-body {
    padding-top: 7px;
    padding-bottom: 8px;
  }

  .editor-tray {
    padding-top: 8px;
  }

  .drawing-controls {
    gap: 6px;
    padding-top: 6px;
  }

  .tool-button {
    height: 44px;
  }

  .frame-card,
  .add-frame {
    flex-basis: 52px;
    width: 52px;
  }

  .frame-card canvas,
  .add-frame {
    width: 52px;
    height: 52px;
  }
}

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