.zero-editor {
  min-width: 0;
  width: 100%;
  border: 1px solid #ded9d6;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 15px 38px #261c1510;
  overflow: hidden;
  color: #211c1a;
}

.zero-bar, .zero-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 48px;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 500;
}
.zero-bar { border-bottom: 1px solid #e7dfda; }
.zero-brand { display: flex; align-items: center; gap: 7px; flex-shrink: 0; font-weight: 700; }
.zero-brand span { width: 9px; height: 9px; background: #f98b70; border-radius: 2px; transform: rotate(12deg); }
.zero-controls:not([hidden]) { display: flex; gap: 5px; }
.zero-editor button {
  min-height: 36px;
  border: 1px solid #e5dedb;
  padding: 5px 10px;
  border-radius: 6px;
  background: #fff;
  line-height: 1.2;
  cursor: pointer;
  transition: translate .18s ease, background-color .18s ease, border-color .18s ease;
}
.zero-editor button[aria-pressed='true'] { background: #ffede7; border-color: #f5b6a8; }
.zero-editor button:hover { background: #fff1ec; border-color: #ee9e8a; }
.zero-editor button:active { background: #ffdfd2; }
@media (prefers-reduced-motion: no-preference) {
  .zero-editor button:active { translate: 0 1px; }
}

.zero-stage {
  position: relative;
  isolation: isolate;
  overflow: clip;
  aspect-ratio: 1.58;
  background: #faf6f0;
  container-type: inline-size;
}
.zero-stage::before {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(#be8e7d33 1px, transparent 1px), linear-gradient(90deg, #be8e7d33 1px, transparent 1px);
  background-size: 5% 5%;
  opacity: 0;
  content: '';
  transition: opacity .2s ease;
}
.zero-stage[data-grid='true']::before { opacity: 1; }
.zero-composition { position: absolute; inset: 19% auto auto 9%; pointer-events: none; }
.zero-title { display: block; font-size: clamp(34px, 13cqw, 78px); line-height: .85; letter-spacing: -.085em; font-weight: 700; }
.zero-underline { display: block; height: 2px; width: 42%; margin-top: 17%; background: #ee8d75; transform-origin: left; }
.zero-anchor {
  position: absolute;
  inset: 0;
  transform: translate(var(--zero-x, 60%), var(--zero-y, 35%));
  pointer-events: none;
}
.zero-piece {
  position: absolute;
  top: 0;
  left: 0;
  width: 28%;
  height: 42%;
  border-radius: 3px;
  cursor: grab;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
}
.zero-piece.is-dragging { cursor: grabbing; }
.zero-tile {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: #fc957a;
  box-shadow: 4px 8px 16px #94452a27;
  border-radius: inherit;
}
.zero-tile span {
  display: block;
  width: 64%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, #2f231f 0 1px, transparent 2px 6px), #ffe8c9;
  transform: rotate(-12deg);
}
.zero-selection { position: absolute; inset: -3px; border: 1px solid #bd4d35; pointer-events: none; }
.zero-selection i { position: absolute; width: 6px; height: 6px; border: 1px solid #bd4d35; background: #fff; }
.zero-selection i:nth-child(1) { top: -3px; left: -3px; }
.zero-selection i:nth-child(2) { top: -3px; right: -3px; }
.zero-selection i:nth-child(3) { bottom: -3px; left: -3px; }
.zero-selection i:nth-child(4) { bottom: -3px; right: -3px; }
.zero-footer:not([hidden]) { display: flex; border-top: 1px solid #e7dfda; }
.zero-footer p { margin: 0; line-height: 1.25; color: #665752; }
.zero-editor .zero-play { flex-shrink: 0; min-height: 37px; }
.zero-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }

@media (prefers-reduced-motion: no-preference) {
  .zero-anchor { transition: transform .18s cubic-bezier(.2,.7,.25,1); }
  .zero-anchor:has(.zero-piece.is-dragging) { transition: none; }
  .zero-piece:hover .zero-tile span { transform: rotate(10deg) scale(.92); }
  .zero-tile span { transition: transform .25s ease; }
  .zero-editor.is-seen .zero-underline { animation: zero-line .6s cubic-bezier(.22,.7,.3,1) both; }
  @keyframes zero-line { from { transform: scaleX(.12); opacity: .35; } to { transform: scaleX(1); opacity: 1; } }
}
@media (max-width: 767px) {
  .zero-editor { max-width: 620px; margin-inline: auto; }
}
