.hero { text-align: center; margin: 10px 0 20px; }
.hero .lede { max-width: 640px; margin: 0 auto 16px; }

.step { margin-bottom: 18px; }
.step h2 { display: flex; align-items: center; gap: 10px; font-size: 1.35rem; }
.num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(144deg, var(--accent-1), var(--accent-3));
  font-size: 1.1rem;
}

.center { text-align: center; }

/* ---------- step 1 ---------- */
.drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  border: 2px dashed rgba(255, 255, 255, 0.35);
  border-radius: var(--radius);
  padding: 40px 16px;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s, border-color 0.2s;
}
.drop:hover, .drop.over { background: rgba(255, 255, 255, 0.06); border-color: var(--accent-3); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop-icon { font-size: 3rem; }
.drop-main { font-size: 1.25rem; font-weight: bold; }
.drop-sub { color: var(--muted); font-size: 0.9rem; }

/* ---------- step 2 ---------- */
.cut-layout, .compose-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.cut-stage { position: relative; }
#editor {
  width: 100%; height: auto; display: block; border-radius: 12px; touch-action: none; cursor: crosshair;
  background-color: #2a2d4a;
  background-image: linear-gradient(45deg, #3a3e63 25%, transparent 25%), linear-gradient(-45deg, #3a3e63 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #3a3e63 75%), linear-gradient(-45deg, transparent 75%, #3a3e63 75%);
  background-size: 24px 24px;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
}
.busy {
  position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  background: rgba(5, 6, 45, 0.7); border-radius: 12px; font-size: 1.1rem; text-align: center; padding: 10px;
}
.busy.on { display: flex; }
.spinner {
  width: 54px; height: 54px; border-radius: 50%;
  border: 5px solid rgba(255, 255, 255, 0.2); border-top-color: var(--accent-3);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.cut-tools .seg { margin-bottom: 12px; }
#toScenes { width: 100%; margin-top: 8px; }

/* ---------- step 3 ---------- */
.tpl-strip {
  display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 12px; margin-bottom: 8px;
  scroll-snap-type: x proximity;
}
.tpl {
  flex: 0 0 auto; width: 118px; background: rgba(255, 255, 255, 0.06); border: 2px solid transparent;
  border-radius: 12px; padding: 6px; cursor: pointer; color: #fff; font: inherit; font-size: 0.82rem;
  scroll-snap-align: start; text-align: center;
}
.tpl canvas { width: 100%; height: auto; display: block; border-radius: 8px; margin-bottom: 4px; aspect-ratio: 4 / 5; background: #111; }
.tpl.on { border-color: var(--accent-3); background: rgba(0, 221, 235, 0.12); }
.preview-wrap canvas {
  width: 100%; height: auto; display: block; border-radius: 12px; touch-action: none; cursor: grab;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); background: #05062d;
}
.preview-wrap canvas:active { cursor: grabbing; }
.with-btn { display: flex; gap: 8px; align-items: center; }
.with-btn input { flex: 1; }
.with-btn .btn { margin-top: 6px; }
input[type="range"] { width: 100%; margin-top: 8px; accent-color: var(--accent-3); }

/* ---------- step 4 ---------- */
.save-row { margin-bottom: 14px; }
.save-box { border-top: 1px solid var(--panel-border); padding-top: 12px; }
.save-box .seg { margin: 6px 0; }
.saved { margin-top: 14px; background: rgba(0, 221, 235, 0.08); }
.saved h3 { margin: 0 0 6px; }

/* ---------- pet of the week teaser ---------- */
.potw {
  display: inline-flex; align-items: center; gap: 12px; padding: 8px 14px 8px 8px;
  background: rgba(255, 228, 138, 0.12); border: 1px solid rgba(255, 228, 138, 0.5); border-radius: 999px;
  color: #fff; text-decoration: none;
}
.potw img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }

@media (max-width: 760px) {
  .cut-layout, .compose-layout { grid-template-columns: 1fr; }
  .drop { padding: 30px 12px; }
}
