/* Motion Editor (/editor): stage with direct manipulation, keyframe timeline and the
   clay panel. Built on the regular editor chrome (styles.css .editor-view, editor-skins.css). */

.me-view { font-family: Inter, system-ui, sans-serif; }
/* On /editor the full-screen editor is a direct child of <body>, so its z-index (250 in
   styles.css) would cover the site's modals (190: export window, dialogs) and the cookie bar
   (170). On the home page the same editor sits inside a lower stacking context. */
.me-body .editor-view.me-view { z-index: 1; }
.me-view [hidden] { display: none !important; }

/* ── Toolbar: format menu ── */
.me-format { position: relative; }
.me-format .ed-format-chip { display: inline-flex; }
.me-format .ed-format-chip.is-portrait .ed-format-ico { width: 10px; height: 16px; }
.me-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 40;
  display: grid;
  gap: 2px;
  min-width: 210px;
  padding: 6px;
  border-radius: 16px;
  background: #2a292f;
  box-shadow: 0 24px 44px -12px #000d, inset 0 1px 0 #ffffff14, 0 0 0 1px #00000040;
  animation: me-pop 0.18s cubic-bezier(0.2, 1.2, 0.4, 1);
}
.me-menu button {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: 11px;
  background: none;
  color: #eeecf2;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.me-menu button:hover { background: #ffffff0d; }
.me-menu button[aria-checked="true"] { background: color-mix(in srgb, #6f8cff 32%, #2a292f); color: #fff; }
.me-menu-shape { width: 22px; display: grid; place-items: center; }
.me-menu-shape span { display: block; border: 2px solid currentColor; border-radius: 4px; }
@keyframes me-pop { from { opacity: 0; transform: translateY(-4px) scale(0.97); } }

/* ── Stage ── */
.me-canvas-wrap { position: relative; overflow: hidden; padding: 28px 40px 16px; touch-action: none; }
.me-stage-box { position: relative; flex: 0 0 auto; touch-action: none; }
/* The export dock floats over the bottom of the stage, so the stage never resizes under it. */
.me-canvas-wrap .ex-dock-slot { position: absolute; left: 0; right: 0; bottom: 18px; max-width: none; margin: 0; pointer-events: none; }
.me-canvas-wrap .ex-dock.is-on { pointer-events: auto; }
.me-stage-box .me-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  aspect-ratio: auto;
  cursor: default;
}
.me-ghost-layer { position: absolute; inset: 0; pointer-events: none; }
.me-image {
  position: absolute;
  left: 0;
  top: 0;
  max-width: none;
  max-height: none;
  transform-origin: 0 0;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  will-change: transform, opacity;
}
.me-image.is-pixel { image-rendering: pixelated; }
.me-ghost { filter: saturate(0.6); }
.me-overlay { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.me-overlay .me-sel { fill: none; stroke: #fff; stroke-width: 1.5; vector-effect: non-scaling-stroke; filter: drop-shadow(0 1px 2px #0009); }
.me-overlay .me-handle { fill: #fff; stroke: #2b5cff; stroke-width: 2; filter: drop-shadow(0 2px 4px #000a); }
.me-overlay .me-rot-line { stroke: #fff; stroke-width: 1.5; opacity: 0.85; }
.me-overlay .me-rot { fill: #2b5cff; stroke: #fff; stroke-width: 2.5; filter: drop-shadow(0 2px 4px #000a); }
.me-overlay .me-guide { stroke: #ff3d9a; stroke-width: 1.5; stroke-dasharray: 5 4; }
.me-overlay .me-dot { fill: #2b5cff; stroke: #fff; stroke-width: 2.5; }
.me-stage-box.is-hover-image { cursor: move; }
.me-stage-box.is-dragging, .me-stage-box.is-dragging * { cursor: grabbing !important; }

/* Empty state: drop the image on the stage. */
.me-drop {
  position: absolute;
  inset: 14px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  padding: 24px;
  border-radius: 18px;
  border: 2px dashed #ffffff26;
  background: #0b0b0dcc;
  text-align: center;
  transition: border-color 0.2s, background 0.2s;
}
.me-drop.is-over { border-color: #4f7bff; background: #101a33d9; }
.me-drop-ico {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 6px;
  border-radius: 20px;
  background: linear-gradient(180deg, #ff9a6e, #ff8152);
  color: #1a1410;
  box-shadow: 0 10px 24px -8px #ff815299, inset 0 -3px 0 #0003, inset 0 1px 0 #fff6;
}
.me-drop-ico svg { width: 30px; height: 30px; }
.me-drop-title { color: #fff; font-size: 22px; font-weight: 800; letter-spacing: -0.01em; }
.me-drop-lead { max-width: 340px; color: #a3a0ad; font-size: 14px; font-weight: 700; line-height: 1.45; }
.me-drop-btn { margin-top: 8px; }
.me-stage-box.has-image .me-drop { display: none; }
/* A preset (gallery link or the dialog) waits for an image: the card covers the stage. */
.me-stage-box.is-preset-pending .me-drop { display: grid; background: #0b0b0deb; }
.me-drop-preset {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  padding: 5px 5px 5px 14px;
  border: 1px solid #4f7bff59;
  border-radius: 999px;
  background: #4f7bff1f;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}
.me-drop-preset-tag { color: #9cb6ff; }
.me-drop-preset-x {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: #ffffff14;
  color: #c9d6ff;
  cursor: pointer;
}
.me-drop-preset-x:hover { background: #ffffff29; color: #fff; }
.me-drop-preset-x svg { width: 12px; height: 12px; }
.me-drop-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }
.me-drop-actions .me-drop-btn { margin-top: 0; }
.me-drop-keep {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid #ffffff26;
  border-radius: 14px;
  background: #ffffff0d;
  color: #fff;
  font: 800 14px/1 Inter, system-ui, sans-serif;
  cursor: pointer;
}
.me-drop-keep:hover { background: #ffffff1a; }
.me-drop-presets {
  margin-top: 2px;
  padding: 4px 6px;
  border: 0;
  background: none;
  color: #9cb6ff;
  font: 800 14px/1.3 Inter, system-ui, sans-serif;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.me-drop-presets:hover { color: #c3d3ff; }

/* ── Toolbar: "Szablony ustawień" ── */
.me-presets-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #ffffff1f;
  border-radius: 14px;
  background: #1d1d22;
  color: #fff;
  font: 800 13px/1 Inter, system-ui, sans-serif;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.me-presets-btn:hover { background: #26262c; border-color: #ffffff33; }
.me-presets-btn svg { width: 16px; height: 16px; color: #ffc94d; flex: none; }

/* ── Presets dialog (fm-dialog frame from dialogs.css) ── */
.me-presets-dialog { width: min(980px, calc(100% - 32px)); font-family: Inter, system-ui, sans-serif; }
.me-presets-head p { margin: 4px 0 0; color: #a3a0ad; font-size: 14px; font-weight: 700; line-height: 1.5; }
.me-presets-dialog .fm-dialog-body { padding: 20px 24px 24px; }
.me-presets-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); gap: 14px; }
.me-preset {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 8px 8px 12px;
  border: 1px solid #ffffff14;
  border-radius: 16px;
  background: #1b1b1f;
  color: #fff;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.me-preset:hover { background: #222227; border-color: #ffffff29; }
.me-preset[aria-selected="true"] { border-color: #4f7bff; background: #19203a; box-shadow: 0 0 0 1px #4f7bff; }
.me-preset:focus-visible { outline: 2px solid #9cb6ff; outline-offset: 2px; }
.me-preset-stage {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 10px;
  background-color: #050506;
  background-image:
    linear-gradient(45deg, #121214 25%, transparent 25%),
    linear-gradient(-45deg, #121214 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #121214 75%),
    linear-gradient(-45deg, transparent 75%, #121214 75%);
  background-size: 14px 14px;
  background-position: 0 0, 0 7px, 7px -7px, -7px 0;
}
.me-preset-img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; visibility: hidden; pointer-events: none; }
.me-preset-img.is-pixel { image-rendering: pixelated; }
.me-preset-copy { display: grid; gap: 3px; padding: 0 4px; }
.me-preset-copy b { font-size: 14px; font-weight: 800; }
.me-preset-copy small { color: #a3a0ad; font-size: 12px; font-weight: 700; line-height: 1.4; }

/* ── Deck: transport + timeline ── */
.me-deck { padding: 6px 0 16px; }
.me-transport { display: flex; align-items: center; gap: 10px; }
.me-time { font-variant-numeric: tabular-nums; font-weight: 700; }
.me-time #meTimeNow { color: #fff; font-weight: 800; }
.me-transport-gap { flex: 1; }
.me-tool {
  display: inline-grid;
  grid-auto-flow: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 12px;
  background: #ffffff0f;
  color: #d9d7e0;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.12s;
}
.me-tool svg { width: 18px; height: 18px; }
.me-tool:hover:not(:disabled) { background: #ffffff1c; color: #fff; }
.me-tool:active:not(:disabled) { transform: scale(0.94); }
.me-tool:disabled { opacity: 0.32; cursor: default; }
.me-tool--label { padding: 0 14px 0 12px; background: #2b5cff26; color: #c9d6ff; }
.me-tool--label:hover:not(:disabled) { background: #2b5cff40; }
.me-tool-sep { width: 1px; height: 22px; margin: 0 2px; background: #ffffff1a; }

.me-tl {
  --pad: 14px;
  position: relative;
  margin: 10px 32px 0;
  padding: 0 var(--pad);
  user-select: none;
  touch-action: none;
  cursor: pointer;
}
.me-tl-ruler { position: relative; height: 22px; }
.me-tl-tick { position: absolute; bottom: 0; width: 1px; height: 5px; background: #ffffff2e; transform: translateX(-0.5px); }
.me-tl-tick.is-major { height: 9px; background: #ffffff59; }
.me-tl-tick b {
  position: absolute;
  bottom: 11px;
  left: 0;
  transform: translateX(-50%);
  color: #8e8b97;
  font-size: 10.5px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.me-tl-track {
  position: relative;
  height: 58px;
  margin: 4px calc(-1 * var(--pad)) 0;
  padding: 0 var(--pad);
  border-radius: 16px;
  background: #141317;
  box-shadow: inset 2px 2px 6px #00000080, inset -2px -2px 5px #ffffff08;
}
.me-tl-clip {
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: var(--pad);
  width: 0;
  border-radius: 11px;
  background: linear-gradient(180deg, #2b5cff1f, #2b5cff12);
  box-shadow: inset 0 0 0 1px #2b5cff38;
  pointer-events: none;
}
.me-tl-items { position: absolute; inset: 0 var(--pad); }
.me-tl-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  color: #77747f;
  font-size: 13px;
  font-weight: 700;
  pointer-events: none;
}
.me-seg {
  position: absolute;
  top: 50%;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transform: translateY(-50%);
  border-radius: 9px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--seg) 42%, #26252b), color-mix(in srgb, var(--seg) 26%, #1e1d22));
  box-shadow: inset 0 1px 0 #ffffff1c, 0 2px 6px #0007;
  color: color-mix(in srgb, var(--seg) 40%, #fff);
  overflow: hidden;
  pointer-events: none;
}
.me-seg.is-active { box-shadow: inset 0 1px 0 #ffffff26, 0 0 0 2px color-mix(in srgb, var(--seg) 75%, #fff), 0 2px 8px #0008; }
.me-seg[data-ease="smooth"] { --seg: #6f8cff; }
.me-seg[data-ease="in"] { --seg: #ff8152; }
.me-seg[data-ease="out"] { --seg: #2fd3a6; }
.me-seg svg { flex: 0 0 auto; width: 26px; height: 16px; }
.me-seg .me-seg-bounce { width: 14px; height: 14px; }
.me-seg.is-narrow svg:not(:first-child) { display: none; }
.me-seg.is-tiny svg { display: none; }
.me-key {
  position: absolute;
  top: 50%;
  width: 28px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  transform: translate(-50%, -50%);
  cursor: grab;
  z-index: 2;
}
.me-key::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 15px;
  height: 15px;
  border-radius: 4px;
  background: linear-gradient(180deg, #f3f0eb, #d4d0c8);
  box-shadow: 0 3px 8px #000a, inset 0 -2px 0 #0000002e;
  transform: translate(-50%, -50%) rotate(45deg);
  transition: transform 0.22s cubic-bezier(0.3, 1.5, 0.5, 1), background 0.15s;
}
.me-key:hover::before { transform: translate(-50%, -50%) rotate(45deg) scale(1.15); }
.me-key.is-on::before {
  background: linear-gradient(180deg, #7d9bff, #2b5cff);
  box-shadow: 0 0 0 3px #141317, 0 0 0 5px #7d9bff, 0 4px 12px #2b5cff80;
  transform: translate(-50%, -50%) rotate(45deg) scale(1.12);
}
.me-key.is-drag { cursor: grabbing; }
.me-tl-end {
  position: absolute;
  top: 8px;
  bottom: 8px;
  width: 0;
  border-left: 2px dashed #ffffff30;
  pointer-events: none;
}
.me-playhead {
  position: absolute;
  top: 18px;
  bottom: -4px;
  left: var(--pad);
  width: 2px;
  margin-left: -1px;
  background: #fff;
  border-radius: 2px;
  box-shadow: 0 0 8px #0009;
  pointer-events: none;
  z-index: 3;
}
.me-playhead-knob {
  position: absolute;
  top: -4px;
  left: 50%;
  width: 14px;
  height: 14px;
  border-radius: 5px 5px 7px 7px;
  background: #fff;
  transform: translateX(-50%);
  box-shadow: 0 2px 6px #000a;
}
.me-tl.is-disabled { pointer-events: none; }
.me-tl.is-disabled .me-playhead { opacity: 0; }

/* ── Panel (clay skin from editor-skins.css) ── */
.me-props .ed-props-body { padding-top: 16px; }
.me-panel { display: grid; gap: 12px; }
.editor-view .ed-props [data-ed-skin="clay"] .me-card { display: grid; gap: 12px; }
.editor-view .ed-props [data-ed-skin="clay"] .me-card.is-flash { animation: me-flash 0.9s cubic-bezier(0.3, 1.2, 0.5, 1); }
@keyframes me-flash { 30% { box-shadow: inset 0 1px 0 #ffffff17, 0 0 0 3px var(--kind), 0 16px 30px -18px #000; } }
.me-card .label-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 26px; }
.me-row { display: flex; align-items: center; gap: 8px; }
.me-sub { margin: -4px 0 0; color: var(--kind-muted); font-size: 12.5px; font-weight: 700; line-height: 1.4; }
.me-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--kind) 16%, #1c1b20);
  color: color-mix(in srgb, var(--kind) 55%, #fff);
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.me-icon-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: #2c2b31;
  color: var(--kind-ink);
  box-shadow: 0 2px 5px #0007, inset 0 1px 0 #ffffff14;
  cursor: pointer;
  transition: background 0.15s, transform 0.12s;
}
.me-icon-btn svg { width: 16px; height: 16px; }
.me-icon-btn:hover:not(:disabled) { background: #36353c; }
.me-icon-btn:active:not(:disabled) { transform: scale(0.92); }
.me-icon-btn:disabled { opacity: 0.3; cursor: default; }
.me-pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 11px;
  background: #2c2b31;
  color: var(--kind-ink);
  box-shadow: 0 2px 5px #0007, inset 0 1px 0 #ffffff14;
  font: inherit;
  font-size: 12.5px;
  font-weight: 750;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, transform 0.12s;
}
.me-pill-btn svg { width: 15px; height: 15px; }
.me-pill-btn:hover:not(:disabled) { background: #36353c; }
.me-pill-btn:active:not(:disabled) { transform: scale(0.96); }
.me-pill-btn:disabled { opacity: 0.35; cursor: default; }
.me-pill-btn.is-primary { background: linear-gradient(180deg, #4f7bff, #2b5cff); color: #fff; box-shadow: 0 6px 14px -6px #2b5cffaa, inset 0 1px 0 #ffffff40; }
.me-pill-btn.is-primary:hover:not(:disabled) { background: linear-gradient(180deg, #5a84ff, #3463ff); }

.me-key-head { display: flex; align-items: center; gap: 10px; }
.me-key-title { flex: 1; min-width: 0; color: var(--kind-ink); font-size: 15px; font-weight: 800; letter-spacing: -0.01em; }
.me-key-nav { display: flex; gap: 6px; }

/* Image card */
.me-img-row { display: flex; align-items: center; gap: 12px; }
.me-thumb {
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
  border-radius: 14px;
  background-color: #2a292f;
  background-image: linear-gradient(45deg, #1d1c21 25%, transparent 25%), linear-gradient(-45deg, #1d1c21 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #1d1c21 75%), linear-gradient(-45deg, transparent 75%, #1d1c21 75%);
  background-size: 12px 12px;
  background-position: 0 0, 0 6px, 6px -6px, -6px 0;
  box-shadow: 0 4px 10px #0008;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.me-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.me-img-copy { flex: 1; min-width: 0; display: grid; gap: 3px; }
.me-img-name { overflow: hidden; color: var(--kind-ink); font-size: 13px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.me-img-meta { color: var(--kind-muted); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.me-img-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* Speed ramp presets */
.me-eases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.me-ease {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-width: 0;
  padding: 12px 6px 10px;
  border: 0;
  border-radius: 16px;
  background: #17161a;
  box-shadow: inset 2px 2px 6px #00000080, inset -2px -2px 5px #ffffff0a;
  color: var(--kind-muted);
  font: inherit;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, color 0.2s, transform 0.12s;
}
.me-ease:active:not(:disabled) { transform: scale(0.96); }
.me-ease svg { width: 100%; max-width: 74px; height: 40px; overflow: visible; }
.me-ease .me-curve { fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; opacity: 0.75; }
.me-ease .me-curve-base { stroke: #ffffff1a; stroke-width: 1.5; stroke-dasharray: 3 3; }
.me-ease b { font-size: 12.5px; font-weight: 800; color: var(--kind-ink); }
.me-ease small { font-size: 11px; font-weight: 700; line-height: 1.25; text-align: center; text-wrap: balance; }
.me-ease[aria-checked="true"] {
  background: linear-gradient(180deg, #34333a, #2a292f);
  box-shadow: 0 3px 10px #0008, inset 0 1px 0 #ffffff1a, 0 0 0 2px var(--kind);
  color: color-mix(in srgb, var(--kind) 60%, #fff);
}
.me-ease[aria-checked="true"] .me-curve { stroke: var(--kind); opacity: 1; }
.me-ease:disabled { opacity: 0.35; cursor: default; }
.me-toggle-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #17161a;
  box-shadow: inset 2px 2px 6px #00000080, inset -2px -2px 5px #ffffff0a;
  cursor: pointer;
  --kind: #35c98a;
}
.me-toggle-row .ed-toggle-label { display: grid; gap: 2px; }
.me-toggle-row .ed-toggle-label b { color: var(--kind-ink); font-size: 13px; font-weight: 800; }
.me-toggle-row .ed-toggle-label small { color: var(--kind-muted); font-size: 11.5px; font-weight: 700; line-height: 1.35; }
.me-toggle-row.is-disabled { opacity: 0.35; pointer-events: none; }

/* Sliders and numbers */
.me-field { display: grid; gap: 4px; }
.me-field + .me-field { margin-top: 2px; }
.me-field-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.me-field-name { color: var(--kind-muted); font-size: 12.5px; font-weight: 750; }
.me-value { display: inline-flex; align-items: center; gap: 4px; }
.editor-view .ed-props [data-ed-skin="clay"] .me-value .ed-range-value { width: 6ch; text-align: center; }
.me-unit { color: var(--kind-muted); font-size: 12px; font-weight: 750; min-width: 1ch; }
.me-value .ed-range-reset { width: 26px; height: 26px; margin-left: 2px; }
.me-value .ed-range-reset svg { width: 13px; height: 13px; }
.me-xy { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.me-xy-field { display: grid; gap: 6px; }
.me-xy-field .me-field-name { padding-left: 2px; }
.editor-view .ed-props [data-ed-skin="clay"] .me-xy .ed-number-input .ed-sk-step { width: 34px; height: 40px; border-radius: 12px; }
.editor-view .ed-props [data-ed-skin="clay"] .me-xy .ed-number-input.ed-sk-num { gap: 6px; }
.editor-view .ed-props [data-ed-skin="clay"] .me-xy .ed-number-input input { min-height: 40px !important; padding: 0 4px !important; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.me-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.me-panel.is-empty .me-card:not(.me-card--image) { display: none; }

/* ── Phones and small windows: stage on top, panel below (styles.css stacks .ed-body) ── */
@media (max-width: 980px) {
  .me-view .ed-body { grid-template-rows: minmax(0, 1fr) auto; }
  .me-view .ed-props { max-height: 38vh; }
  .me-canvas-wrap { padding: 12px 12px 8px; }
  .me-deck { padding: 4px 0 10px; }
  .me-transport { padding-left: 12px; padding-right: 12px; gap: 6px; }
  .me-tl { margin: 4px 12px 0; --pad: 12px; }
  .me-tl-ruler { height: 18px; }
  .me-tl-tick b { font-size: 9.5px; }
  .me-tl-track { height: 48px; }
  .me-tool--label span { display: none; }
  .me-tool--label { padding: 0 10px; }
}
@media (max-width: 760px), (max-width: 980px) and (max-height: 520px) {
  .me-presets-btn { min-width: 44px; height: 44px; justify-content: center; padding: 0 12px; }
  .me-presets-btn span { display: none; }
  .me-presets-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .me-presets-dialog .fm-dialog-body { padding: 14px; }
  /* The phone stage is short: the upload card keeps the title, the buttons and the presets link. */
  .me-drop { inset: 8px; gap: 6px; padding: 10px; }
  .me-drop-ico, .me-drop-lead { display: none; }
  .me-drop-title { font-size: 18px; }
  .me-drop-actions { margin-top: 2px; gap: 8px; }
  .me-view .ed-props { max-height: none; }
  .me-canvas-wrap { display: flex; }
  .me-tool { min-width: 40px; height: 40px; }
  .me-transport .ed-transport-play { width: 40px; height: 40px; }
  .me-key { width: 34px; height: 44px; }
  .me-icon-btn { width: 40px; height: 40px; }
  .me-pill-btn { min-height: 44px; }
}
