/* ═══════════════════════════════════════════════════════════════
   ChromaStage Studio v3.0 — Components: Steps, Dropzones, Settings
   ═══════════════════════════════════════════════════════════════ */

/* ═══ Step Cards — the journey ═══ */
.step-card {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.008)),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  animation: stepReveal 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes stepReveal {
  from { opacity: 0; transform: translateY(16px) scale(0.99); }
  to { opacity: 1; transform: none; }
}

/* gradient hairline along the top edge */
.step-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.22), transparent 28%, transparent 72%, rgba(139, 92, 246, 0.22));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.step-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

/* Active step — "you are here" beacon */
.step-card.is-active {
  border-color: rgba(109, 109, 248, 0.5);
  box-shadow:
    0 0 0 1px rgba(109, 109, 248, 0.28),
    0 18px 52px -18px rgba(109, 109, 248, 0.4);
}

/* Completed step — calm green */
.step-card.is-done {
  border-color: rgba(52, 211, 153, 0.28);
}

.step-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.step-num {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--primary-gradient);
  color: white;
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(109, 109, 248, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.step-card.is-active .step-num {
  animation: stepBeacon 2.2s ease-in-out infinite;
}
@keyframes stepBeacon {
  0%, 100% { box-shadow: 0 4px 14px rgba(109, 109, 248, 0.45), 0 0 0 0 rgba(129, 140, 248, 0.5); }
  50% { box-shadow: 0 4px 18px rgba(139, 92, 246, 0.6), 0 0 0 7px rgba(129, 140, 248, 0); }
}

/* Done → number morphs into a check */
.step-card.is-done .step-num {
  background: linear-gradient(135deg, #34d399, #059669);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
  color: transparent;
}
.step-card.is-done .step-num::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 17px;
  font-weight: 800;
}

.step-title-wrap h2 {
  font-size: 17px;
  font-weight: 700;
  margin: 0;
  color: var(--text);
  letter-spacing: -0.01em;
}

.step-title-wrap p {
  margin: 2px 0 0;
  color: var(--muted);
}

/* ═══ Dropzones — invitation to create ═══ */
.dropzone {
  position: relative;
  border: 2px dashed rgba(129, 140, 248, 0.38);
  background: rgba(10, 15, 27, 0.55);
  border-radius: var(--radius-md);
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  overflow: hidden;
}

/* idle sheen sweep */
.dropzone::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(105deg, transparent 42%, rgba(165, 180, 252, 0.07) 50%, transparent 58%);
  transform: translateX(-110%);
  animation: dzSheen 4.2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes dzSheen { 55%, 100% { transform: translateX(110%); } }

.dropzone:hover, .dropzone.hover {
  border-color: var(--primary-hover);
  background: rgba(99, 102, 241, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 10px 32px -8px rgba(99, 102, 241, 0.35);
}

.dropzone .dz-icon {
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.dropzone:hover .dz-icon, .dropzone.hover .dz-icon {
  transform: scale(1.14) translateY(-2px);
}

.dropzone.has-file {
  border-color: rgba(52, 211, 153, 0.65);
  border-style: solid;
  background: rgba(16, 185, 129, 0.06);
}
.dropzone.has-file::after { animation: none; opacity: 0; }

.dropzone.uploading {
  border-color: var(--accent);
  background: rgba(236, 72, 153, 0.06);
}
.dropzone.uploading::after { animation: none; opacity: 0; }

.dropzone.error {
  border-color: rgba(248, 113, 113, 0.6);
  background: rgba(248, 113, 113, 0.05);
}
.dropzone.error::after { animation: none; opacity: 0; }

.dz-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.dz-icon {
  font-size: 34px;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.45)) drop-shadow(0 0 18px rgba(99, 102, 241, 0.3));
}

.dz-text {
  font-size: 14.5px;
  color: var(--text);
  font-weight: 500;
}

.dz-hint {
  font-size: 12px;
  color: var(--muted);
}

/* Upload Progress */
.dz-progress {
  margin-top: 14px;
  padding: 12px;
  background: rgba(10, 15, 27, 0.75);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  text-align: left;
}

.dz-prog-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dz-prog-size {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}

.progress-bar {
  width: 100%;
  height: 7px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--primary-gradient);
  background-size: 200% 100%;
  animation: shimmer 1.8s linear infinite;
  border-radius: 99px;
  transition: width 0.2s ease;
}
@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.dz-prog-status {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}
.dz-prog-status.success { color: var(--success); font-weight: 600; }
.dz-prog-status.error { color: var(--danger); font-weight: 600; }

/* Mini Dropzone (BGM / Intro / Outro) */
.dropzone-mini {
  padding: 12px 16px;
  border-radius: 11px;
  border: 1.5px dashed var(--line-strong);
  background: rgba(10, 15, 27, 0.45);
}
.dropzone-mini::after { animation: none; display: none; }

.dropzone-mini:hover, .dropzone-mini.hover {
  border-color: var(--primary-hover);
  background: rgba(99, 102, 241, 0.08);
}

.dropzone-mini.has-file {
  border-color: rgba(52, 211, 153, 0.6);
  border-style: solid;
  background: rgba(16, 185, 129, 0.07);
}

.dropzone-mini.uploading { border-color: var(--accent); }
.dropzone-mini.error { border-color: rgba(248, 113, 113, 0.6); }

.dz-inner-mini {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dz-icon-mini { font-size: 22px; }
.dz-text-mini { font-size: 13px; color: var(--muted); flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-remove {
  color: var(--danger);
  margin-left: 8px;
  padding: 2px 8px;
}

/* ═══ Person Preview (before/after) ═══ */
.person-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
  animation: stepReveal 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.person-side {
  position: relative;
  background: #070b14;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.person-side.person-side-cut {
  background: repeating-conic-gradient(#16203a 0% 25%, #0b101c 0% 50%) 50% / 16px 16px;
  border-color: rgba(52, 211, 153, 0.35);
  box-shadow: 0 0 24px -6px rgba(52, 211, 153, 0.25);
}

.person-side img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.person-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 9px;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.72);
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.person-badge.success {
  background: rgba(16, 185, 129, 0.88);
  color: #fff;
  box-shadow: 0 2px 12px rgba(16, 185, 129, 0.45);
}

/* Chroma Tuning Accordion */
.chroma-tune-details {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(10, 15, 27, 0.35);
  overflow: hidden;
}

.chroma-tune-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: color 0.15s, background 0.15s;
}

.chroma-tune-summary::-webkit-details-marker { display: none; }
.chroma-tune-summary:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.summary-arrow { transition: transform 0.2s; }
.chroma-tune-details[open] .summary-arrow { transform: rotate(180deg); }

.chroma-tune-body {
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
}

/* ═══ Step 2: Backgrounds & Templates ═══ */
.step2-nav-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  background: rgba(10, 15, 27, 0.65);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.step2-tab {
  flex: 1;
  padding: 9px 14px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: inherit;
}

.step2-tab:hover { color: var(--text); }
.step2-tab.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.85), rgba(139, 92, 246, 0.85));
  color: #fff;
  box-shadow: 0 2px 12px rgba(99, 102, 241, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.template-view-hint {
  font-size: 12px;
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.1);
  padding: 9px 13px;
  border-radius: 10px;
  border: 1px solid rgba(99, 102, 241, 0.22);
  margin-bottom: 12px;
}

/* Background Grid (Scene Cards) */
.bg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.bg-card {
  position: relative;
  aspect-ratio: 16/9;
  background: #070b14;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  animation: stepReveal 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.bg-card:hover {
  border-color: var(--primary-hover);
  transform: translateY(-3px);
  box-shadow: 0 10px 26px -6px rgba(0, 0, 0, 0.55), 0 0 18px -4px rgba(99, 102, 241, 0.4);
}

.bg-card img { transition: transform 0.25s ease; }
.bg-card:hover img { transform: scale(1.06); }

.bg-card.preview-active {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.5), 0 0 20px rgba(34, 211, 238, 0.5);
}

.bg-card.dragging {
  opacity: 0.4;
  border-style: dashed;
}

.bg-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bg-num {
  position: absolute;
  bottom: 4px;
  left: 4px;
  padding: 1px 7px;
  background: rgba(0, 0, 0, 0.78);
  font-size: 10px;
  font-weight: 700;
  border-radius: 5px;
  color: #fff;
  font-variant-numeric: tabular-nums;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.bg-location-tag {
  position: absolute;
  top: 4px;
  left: 4px;
  max-width: calc(100% - 32px);
  padding: 2px 7px;
  background: rgba(12, 18, 30, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
  transition: all 0.15s ease;
  z-index: 2;
}

.bg-location-tag:hover {
  background: rgba(15, 23, 42, 0.95);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: scale(1.03);
}

.bg-del {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: rgba(220, 38, 38, 0.88);
  color: white;
  border: none;
  font-size: 13px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  opacity: 0.9;
}
.bg-del:hover {
  transform: scale(1.18);
  box-shadow: 0 2px 10px rgba(239, 68, 68, 0.55);
}

/* Templates Gallery Grid */
.templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.template-card {
  position: relative;
  background: rgba(11, 16, 28, 0.7);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.template-card:hover {
  border-color: var(--primary-hover);
  transform: translateY(-3px);
  box-shadow: 0 14px 34px -10px rgba(0, 0, 0, 0.6), 0 0 22px -6px rgba(99, 102, 241, 0.45);
}

.template-card.applied {
  border-color: rgba(52, 211, 153, 0.7);
  box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.35), 0 0 22px -4px rgba(52, 211, 153, 0.45);
}

.template-card-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  background: #0b101c;
  transition: transform 0.25s ease;
}
.template-card:hover .template-card-img { transform: scale(1.05); }

.template-card-body { padding: 10px 12px; }
.template-card-title { font-size: 14px; font-weight: 700; color: var(--text); }
.template-card-desc { font-size: 11px; color: var(--muted); margin: 3px 0 6px; }
.template-card-meta { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); }

.template-card-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 11px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}
.template-card-btn:hover {
  background: rgba(99, 102, 241, 0.85);
  border-color: transparent;
}
.template-card.applied .template-card-btn {
  background: rgba(16, 185, 129, 0.9);
  border-color: transparent;
}

/* ═══ Form Controls & Settings ═══ */
.settings-section {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.settings-section:first-child { border-top: none; padding-top: 0; }

.settings-group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.settings-group-icon {
  font-size: 20px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.16), rgba(34, 211, 238, 0.1));
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 10px;
}

.settings-section-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  color: var(--text);
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.setting { display: flex; flex-direction: column; gap: 6px; }
.setting-full { grid-column: 1 / -1; }

.setting label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.slider-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Range sliders — custom candy */
input[type=range] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 99px;
  background: linear-gradient(90deg, rgba(109, 109, 248, 0.75), rgba(34, 211, 238, 0.55));
  outline: none;
  cursor: pointer;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--primary);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5), 0 0 10px rgba(109, 109, 248, 0.45);
  cursor: grab;
  transition: transform 0.12s ease;
}
input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.18); }
input[type=range]:active::-webkit-slider-thumb { cursor: grabbing; transform: scale(1.1); }

input[type=range]::-moz-range-thumb {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--primary);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5), 0 0 10px rgba(109, 109, 248, 0.45);
  cursor: grab;
}

.badge {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 7px;
  background: rgba(19, 26, 43, 0.9);
  border: 1px solid var(--line);
  color: var(--accent-cyan);
  min-width: 48px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* Seg / Segment Buttons */
.seg {
  display: flex;
  background: rgba(10, 15, 27, 0.65);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 4px;
}

.seg button {
  flex: 1;
  padding: 8px 10px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: inherit;
  line-height: 1.3;
  text-align: center;
}

.seg button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}
.seg button.active {
  background: linear-gradient(135deg, #6d6df8, #8b5cf6);
  color: #ffffff;
  box-shadow: 0 2px 12px rgba(109, 109, 248, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.seg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
}

/* Visual 9-Grid Positioner */
.position-visual-wrap {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(10, 15, 27, 0.45);
  padding: 10px 14px;
  border-radius: 11px;
  border: 1px solid var(--line);
}

.position-label-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.position-select {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  padding: 4px 8px;
  font-size: 13px;
  font-family: inherit;
}

.grid-9-selector {
  display: grid;
  grid-template-columns: repeat(3, 28px);
  grid-template-rows: repeat(3, 28px);
  gap: 3px;
  background: rgba(0, 0, 0, 0.45);
  padding: 4px;
  border-radius: 9px;
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.grid-9-cell {
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid transparent;
  border-radius: 5px;
  color: var(--muted);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
}

.grid-9-cell:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  transform: scale(1.08);
}

.grid-9-cell.active {
  background: linear-gradient(135deg, #6d6df8, #8b5cf6);
  color: #fff;
  box-shadow: 0 0 10px rgba(109, 109, 248, 0.65);
}

/* Style Rows for Text / Watermark */
.style-row {
  display: grid;
  grid-template-columns: auto 90px 1fr;
  gap: 12px;
  align-items: center;
}

.color-picker-pill, .size-input-pill, .opacity-slider-pill {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

input[type=text], input[type=number] {
  width: 100%;
  background: rgba(10, 15, 27, 0.65);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input[type=text]:focus, input[type=number]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(109, 109, 248, 0.18);
}

input[type=color] {
  width: 46px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
  padding: 2px;
}
input[type=color]:hover { border-color: var(--line-strong); }

.chroma-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}
.checkbox-pill input {
  accent-color: var(--primary);
  width: 17px;
  height: 17px;
  cursor: pointer;
}

/* ═══ Touch-friendly scene reorder buttons ═══ */
.bg-move {
  position: absolute;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 10px;
  line-height: 1;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.bg-move-up { top: 4px; }
.bg-move-down { top: 28px; }
.bg-move:hover { background: var(--primary); border-color: var(--primary); }
.bg-move:disabled { opacity: 0.35; cursor: default; }

/* Show move controls on touch/coarse-pointer devices where HTML5 drag does not work */
@media (hover: none), (pointer: coarse) {
  .bg-move { display: inline-flex; }
  .bg-card { user-select: none; -webkit-user-select: none; }
}
