/* ============================================================
   public/designs.css — ShortsCraft Designs Hub & Convert to Editable
   ============================================================ */

/* ── Hero / Header ─────────────────────────────────────────── */
.ds-page-container .ds-header { justify-content:space-between; gap:16px; padding:0; margin:0 0 24px; align-items:center; }
.ds-page-container .ds-header h1 { font-size:clamp(26px,3vw,34px); margin:0; letter-spacing:-.04em; }
.ds-search-label input { width:230px; max-width:100%; padding:11px 14px; border:1px solid var(--sc-border); background:var(--sc-surface); color:var(--sc-text); border-radius:9px; font:inherit; font-size:13px; }
.ds-search-label .sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
body.sh-body .ds-filter-btn.active,body.sh-body .ds-filter-btn[aria-pressed="true"],body.sh-body .ds-btn-magic,body.sh-body .ds-mode-btn-primary { background:var(--sc-brand); color:var(--sc-on-brand); box-shadow:none; }
.ds-page-container .ds-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; align-items:start; }
.ds-page-container .ds-card-thumb { aspect-ratio:16/9; height:auto; padding:0; background:var(--sc-surface-2); display:flex; align-items:center; justify-content:center; }
.ds-template-preview { display:block; width:100%; height:100%; object-fit:contain; }
.ds-page-container .ds-card { position:relative; cursor:pointer; }
.ds-page-container .ds-card-body { padding:12px 14px; gap:6px; }
.ds-page-container .ds-card-title { font-size:15px; line-height:1.4; margin:0; min-height:0; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; overflow-wrap:anywhere; }
.ds-page-container .ds-card-author { font-size:12px; line-height:1.4; color:var(--sc-muted); margin:0; }
.ds-card .ds-card-author { position:relative; z-index:2; display:flex; align-items:center; gap:7px; text-decoration:none; margin-top:0; cursor:pointer; min-height:32px; min-width:0; flex:1; }
.ds-card-footer { display:flex; align-items:center; gap:8px; }
.ds-card-menu-trigger { position:relative; z-index:2; flex:none; width:40px; height:40px; border:0; border-radius:8px; background:transparent; color:var(--sc-text); font:700 24px/1 sans-serif; cursor:pointer; }
.ds-card-menu-trigger:hover,.ds-card-menu-trigger[aria-expanded="true"] { background:var(--sc-surface-2); }
.ds-design-menu { position:fixed; z-index:1200; width:210px; padding:5px; border:1px solid var(--sc-border); border-radius:10px; background:var(--sc-surface); color:var(--sc-text); box-shadow:0 8px 30px #0003; }
.ds-design-menu button,.ds-design-menu a { display:block; box-sizing:border-box; width:100%; min-height:44px; padding:12px; text-align:left; border:0; border-radius:6px; background:transparent; color:inherit; font:inherit; font-size:13px; text-decoration:none; cursor:pointer; }
.ds-design-menu button:hover,.ds-design-menu a:hover { background:var(--sc-surface-2); }
.ds-card-unavailable { font-size:11px; color:var(--sc-muted); }
.ds-preview-dialog { width:min(850px,calc(100vw - 24px)); max-height:90dvh; padding:0; overflow:auto; border:1px solid var(--sc-border); border-radius:14px; background:var(--sc-surface); color:var(--sc-text); }
.ds-preview-dialog::backdrop { background:#0008; }
.ds-preview-dialog header,.ds-preview-dialog footer { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:16px; }
.ds-preview-dialog h2 { margin:0; font-size:17px; }
.ds-preview-dialog button { min-height:44px; padding:10px 16px; border:1px solid var(--sc-border); border-radius:9px; background:var(--sc-surface-2); color:var(--sc-text); font:inherit; cursor:pointer; }
.ds-preview-dialog .ds-preview-close { font-size:24px; padding:4px 14px; }
.ds-preview-image { height:min(60dvh,calc(min(850px,100vw - 24px) / var(--ds-preview-ratio,1.77778))); background:var(--sc-surface-2); display:flex; justify-content:center; }
.ds-preview-image .ds-template-preview { object-fit:contain; height:100%; }
.ds-preview-dialog footer { flex-wrap:wrap; font-size:13px; }
.ds-preview-dialog footer p { margin:0; width:100%; }
.ds-card .sh-tcreator-avatar { width:22px; height:22px; border-radius:50%; background:var(--sc-surface-2); border:1px solid var(--sc-border); display:grid; place-items:center; font-size:9.5px; font-weight:750; color:var(--sc-text); flex:none; }
.ds-card .sh-tcreator-info { display:flex; flex-direction:column; min-width:0; flex:1; line-height:1.2; }
.ds-card .sh-tcreator-name { font-size:11.5px; font-weight:600; color:var(--sc-text); display:flex; align-items:center; gap:4px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ds-card .sh-tcreator-name .sc-name-text { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ds-card .sh-tcreator-name .sh-verified { flex:none; width:12px; height:12px; display:inline-flex; color:#3b82f6; }
.ds-card .sh-tcreator-handle { font-size:10.5px; color:var(--sc-muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ds-card .ds-card-author:hover .sh-tcreator-name .sc-name-text { text-decoration:underline; color:var(--sc-brand); }
.ds-card-open { position:absolute; inset:0; z-index:1; width:100%; height:100%; border:0; background:transparent; cursor:pointer; }
.ds-card-open:focus-visible { outline:2px solid var(--sc-text); outline-offset:-4px; border-radius:inherit; }
.ds-card-open[aria-busy="true"]::after { content:none; }
.ds-card[data-opening]::after { content:attr(data-opening); position:absolute; top:10px; left:10px; z-index:3; max-width:calc(100% - 20px); padding:7px 10px; border-radius:8px; background:var(--sc-surface); color:var(--sc-text); font-size:12px; border:1px solid var(--sc-border); pointer-events:none; }
.ds-card .sh-tcreator-avatar { overflow:hidden; }
.ds-card .sh-tcreator-avatar img { width:100%; height:100%; display:block; object-fit:cover; }
.ds-card-prem-badge { max-width:calc(100% - 20px); box-sizing:border-box; }
.ds-page-container .ds-card-author { padding:0; }
@media(max-width:900px) {
 body.sh-body:has(.ds-page-container) .sh-top-actions > .sh-tupload-btn { display:inline-flex !important; width:40px; min-width:40px; height:40px; padding:0; justify-content:center; }
 body.sh-body:has(.ds-page-container) .sh-tupload-btn span { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
}
@media(max-width:379px) {
 body.sh-body:has(.ds-page-container) .sh-top-actions .sh-credit-chip { display:none; }
}
#reviewReconstructedStage { width:100%; height:320px; }
.ds-modal-backdrop [hidden] { display:none !important; }
.ds-dropzone:focus-visible { outline:2px solid var(--sc-text); outline-offset:3px; }
@media(max-width:1050px) { .ds-page-container .ds-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:600px) {
 .ds-page-container .ds-header { flex-direction:row; align-items:center; gap:12px; }
 .ds-page-container { padding:18px 12px 40px !important; }
 .ds-header h1 { flex-shrink:0; }
 .ds-search-label input { width:100%; min-width:0; box-sizing:border-box; }
 .ds-search-label { width:auto; flex:1; min-width:0; max-width:230px; }
 .ds-page-container .ds-grid { grid-template-columns:minmax(0,1fr); gap:16px; }
 .ds-page-container .ds-card-title { min-height:0; }
 .ds-modal-card { max-height:90dvh; overflow-y:auto; }
}
.ds-page-container {
  max-width: var(--ds-page, 1200px);
  margin: 0 auto;
  padding: 32px 20px 80px;
}

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

.ds-header-main h1 {
  font-family: var(--sh-display, inherit);
  font-size: 28px;
  font-weight: 800;
  color: var(--sc-text);
  margin: 0;
  letter-spacing: -0.02em;
}

.ds-header-main p {
  color: var(--sc-muted);
  font-size: 15px;
  margin: 0;
  max-width: 620px;
  line-height: 1.5;
}

.ds-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ds-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--sc-radius-sm, 10px);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.16s ease;
  text-decoration: none;
  line-height: 1;
}

.ds-btn-outline {
  background: var(--sc-surface);
  color: var(--sc-text);
  border-color: var(--sc-border);
}

.ds-btn-outline:hover {
  background: var(--sc-surface-2);
  border-color: var(--sc-border-strong);
}

.ds-btn-magic {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
}

.ds-btn-magic:hover {
  background: linear-gradient(135deg, #1d4ed8, #6d28d9);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.38);
  transform: translateY(-1px);
}

/* ── Filters Bar ────────────────────────────────────────────── */
.ds-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 24px;
  -webkit-overflow-scrolling: touch;
  scroll-padding-inline: 12px;
}

.ds-filter-bar::-webkit-scrollbar {
  height: 4px;
}

.ds-filter-bar::-webkit-scrollbar-thumb {
  background: var(--sc-border);
  border-radius: 4px;
}

.ds-filter-btn {
  background: var(--sc-surface);
  color: var(--sc-muted);
  border: 1px solid var(--sc-border);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.ds-filter-btn:hover {
  color: var(--sc-text);
  border-color: var(--sc-border-strong);
}

.ds-filter-btn[aria-pressed="true"],
.ds-filter-btn.active {
  background: var(--sc-brand);
  color: #ffffff;
  border-color: var(--sc-brand);
  box-shadow: 0 2px 8px rgba(31, 107, 240, 0.25);
}

/* ── Designs Grid ───────────────────────────────────────────── */
.ds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

/* ── Template Card ──────────────────────────────────────────── */
.ds-card {
  background: var(--sc-surface);
  border: 1px solid var(--sc-border);
  border-radius: var(--sc-radius, 14px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--sc-shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.ds-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sc-shadow-md);
  border-color: var(--sc-border-strong);
}

.ds-card-thumb {
  position: relative;
  background: #0b0f19;
  overflow: hidden;
  border-bottom: 1px solid var(--sc-border);
}

.ds-pv-stage {
  position: relative;
  width: 100%;
  height: 0;
  overflow: hidden;
}

.ds-pv-img {
  position: absolute;
  object-fit: cover;
  pointer-events: none;
}

.ds-pv-shape {
  position: absolute;
  pointer-events: none;
}

.ds-pv-txt {
  position: absolute;
  line-height: 1.1;
  pointer-events: none;
  white-space: pre-wrap;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.ds-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.badge-editable {
  background: rgba(16, 185, 129, 0.9);
  color: #ffffff;
}

.badge-ai {
  background: linear-gradient(135deg, #7c3aed, #2563eb);
  color: #ffffff;
}

.badge-image {
  background: rgba(30, 41, 59, 0.85);
  color: #e2e8f0;
}

.ds-card-like {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ds-card-like svg {
  width: 13px;
  height: 13px;
}

.ds-card-like:hover {
  background: rgba(15, 23, 42, 0.9);
  transform: scale(1.05);
}

.ds-card-like.liked {
  color: #ef4444;
}

.ds-card-like.liked svg {
  fill: #ef4444;
  stroke: #ef4444;
}

.ds-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.ds-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 12px;
}

.ds-card-cat {
  color: var(--sc-brand);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ds-card-author {
  color: var(--sc-subtle);
}

.ds-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--sc-text);
  margin: 0 0 6px;
  line-height: 1.3;
}

.ds-card-desc {
  font-size: 13px;
  color: var(--sc-muted);
  margin: 0 0 16px;
  line-height: 1.4;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ds-card-actions {
  display: flex;
  align-items: center;
}

.ds-btn-edit {
  width: 100%;
  background: var(--sc-surface-2);
  color: var(--sc-text);
  border: 1px solid var(--sc-border);
  padding: 9px 14px;
  border-radius: var(--sc-radius-sm, 10px);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.ds-btn-edit:hover {
  background: var(--sc-brand);
  color: #ffffff;
  border-color: var(--sc-brand);
}

/* ── States ─────────────────────────────────────────────────── */
.ds-loading, .ds-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: var(--sc-surface);
  border: 1px dashed var(--sc-border);
  border-radius: var(--sc-radius, 14px);
}

.ds-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--sc-border);
  border-top-color: var(--sc-brand);
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: dsSpin 0.8s linear infinite;
}

@keyframes dsSpin {
  to { transform: rotate(360deg); }
}

.ds-loading p {
  color: var(--sc-muted);
  font-size: 14px;
  margin: 0;
}

.ds-empty h3 {
  font-size: 18px;
  color: var(--sc-text);
  margin: 0 0 8px;
}

.ds-empty p {
  color: var(--sc-muted);
  font-size: 14px;
  margin: 0;
}

/* ── Modal & Converter Overlay ──────────────────────────────── */
.ds-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(10, 15, 29, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.ds-modal-backdrop.open,
.ds-modal-backdrop:not([hidden]) {
  opacity: 1;
  pointer-events: auto;
}

.ds-modal-card {
  background: var(--sc-surface);
  border: 1px solid var(--sc-border);
  border-radius: var(--sc-radius-lg, 20px);
  width: 100%;
  max-width: 760px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  animation: dsModalSlide 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dsModalSlide {
  from { transform: translateY(12px) scale(0.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.ds-modal-step:not([hidden]) {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.ds-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--sc-border);
}

.ds-modal-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--sc-text);
  margin: 0;
}

.ds-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: var(--sc-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
}

.ds-modal-close:hover {
  color: var(--sc-text);
  background: var(--sc-surface-2);
}

.ds-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

/* ── Step 1: Dropzone ───────────────────────────────────────── */
.ds-dropzone {
  border: 2px dashed var(--sc-border-strong);
  background: var(--sc-surface-2);
  border-radius: var(--sc-radius, 14px);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ds-dropzone:hover,
.ds-dropzone.dragover {
  border-color: var(--sc-brand);
  background: var(--sc-brand-soft);
}

.ds-dropzone-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  background: var(--sc-surface);
  border: 1px solid var(--sc-border);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sc-brand);
}

.ds-dropzone-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--sc-text);
  margin: 0 0 6px;
}

.ds-dropzone-subtitle {
  font-size: 13px;
  color: var(--sc-muted);
  margin: 0 0 16px;
}

.ds-dropzone-tags {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.ds-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--sc-surface);
  color: var(--sc-subtle);
  border: 1px solid var(--sc-border);
}

/* ── Step 2: Choose Mode ────────────────────────────────────── */
.ds-picked-preview-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: var(--sc-surface-2);
  border-radius: var(--sc-radius-sm, 10px);
  border: 1px solid var(--sc-border);
  margin-bottom: 24px;
}

.ds-picked-thumb {
  width: 72px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--sc-border);
}

.ds-picked-info strong {
  display: block;
  font-size: 14px;
  color: var(--sc-text);
}

.ds-picked-info span {
  font-size: 12px;
  color: var(--sc-muted);
}

.ds-mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.ds-mode-card {
  border: 2px solid var(--sc-border);
  background: var(--sc-surface);
  border-radius: var(--sc-radius, 14px);
  padding: 20px;
  cursor: pointer;
  text-align: left;
  transition: all 0.18s ease;
  display: flex;
  flex-direction: column;
}

.ds-mode-card:hover {
  border-color: var(--sc-brand);
  transform: translateY(-2px);
  box-shadow: var(--sc-shadow-md);
}

.ds-mode-card.featured {
  border-color: #3b82f6;
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.04) 0%, var(--sc-surface) 100%);
}

.ds-mode-badge {
  align-self: flex-start;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 5px;
  background: #2563eb;
  color: #ffffff;
  margin-bottom: 12px;
}

.ds-mode-icon {
  font-size: 28px;
  margin-bottom: 10px;
}

.ds-mode-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--sc-text);
  margin: 0 0 6px;
}

.ds-mode-card p {
  font-size: 13px;
  color: var(--sc-muted);
  line-height: 1.4;
  margin: 0 0 16px;
  flex: 1;
}

.ds-mode-btn {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-align: center;
}

.ds-mode-btn-primary {
  background: var(--sc-brand);
  color: #ffffff;
}

.ds-mode-btn-primary:hover {
  background: var(--sc-brand-hover);
}

.ds-mode-btn-subtle {
  background: var(--sc-surface-2);
  color: var(--sc-text);
  border: 1px solid var(--sc-border);
}

.ds-mode-btn-subtle:hover {
  background: var(--sc-surface-3);
}

.ds-mode-badge.ds-badge-beta {
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(236, 72, 153, 0.35);
}

/* ── Step 3: Progress ───────────────────────────────────────── */
.ds-progress-wrap {
  padding: 32px 20px;
  text-align: center;
}

.ds-progress-bar-bg {
  width: 100%;
  height: 10px;
  background: var(--sc-surface-2);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid var(--sc-border);
}

.ds-progress-bar-fill {
  width: 15%;
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #8b5cf6);
  border-radius: 999px;
  transition: width 0.4s ease;
}

.ds-progress-status {
  font-size: 15px;
  font-weight: 600;
  color: var(--sc-text);
  margin: 0 0 14px;
}

.ds-progress-stages {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 300px;
  margin: 0 auto 16px;
  text-align: left;
}

.ds-stage-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--sc-muted, #94a3b8);
  transition: all 0.25s ease;
}

.ds-stage-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sc-border, #475569);
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.ds-stage-step.active {
  color: var(--sc-text, #ffffff);
  font-weight: 600;
}

.ds-stage-step.active .ds-stage-dot {
  background: #3b82f6;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.7);
  transform: scale(1.3);
}

.ds-stage-step.done {
  color: #10b981;
}

.ds-stage-step.done .ds-stage-dot {
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.45);
}

.ds-progress-hint {
  font-size: 12px;
  color: var(--sc-muted);
  margin: 0;
}

/* ── Step 5: Error / Fallback Card ──────────────────────────── */
.ds-error-fallback-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

/* ── Step 4: Review Layers ──────────────────────────────────── */
.ds-review-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.ds-review-col h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--sc-text);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ds-view-toggle {
  display: flex;
  background: var(--sc-surface-2);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
  border: 1px solid var(--sc-border);
  margin-bottom: 12px;
}

.ds-view-toggle button {
  flex: 1;
  background: none;
  border: none;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--sc-muted);
  cursor: pointer;
  border-radius: 6px;
}

.ds-view-toggle button.active {
  background: var(--sc-surface);
  color: var(--sc-text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ds-review-stage-box {
  background: #0f172a;
  border-radius: var(--sc-radius-sm, 10px);
  overflow: hidden;
  border: 1px solid var(--sc-border);
  position: relative;
  min-height: 220px;
}

.ds-review-stage-box img {
  width: 100%;
  height: auto;
  display: block;
}

.ds-review-layers-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
}

.ds-review-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--sc-surface-2);
  border: 1px solid var(--sc-border);
  border-radius: 8px;
  gap: 10px;
}

.ds-review-item-main {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  flex: 1;
}

.ds-review-ico {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--sc-surface);
  border: 1px solid var(--sc-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  color: var(--sc-brand);
}

.ds-review-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ds-review-name {
  font-size: 13px;
  color: var(--sc-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ds-review-detail {
  font-size: 11px;
  color: var(--sc-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ds-review-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ds-conf-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  white-space: nowrap;
}

.ds-review-del {
  background: none;
  border: none;
  color: var(--sc-subtle);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}

.ds-review-del:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.ds-review-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--sc-border);
}

/* ── Mobile Breakpoint ──────────────────────────────────────── */
@media (max-width: 768px) {
  .ds-header {
    flex-direction: column;
    align-items: stretch;
  }
  .ds-header-actions {
    width: 100%;
  }
  .ds-header-actions .ds-btn {
    flex: 1;
  }
  .ds-grid {
    grid-template-columns: 1fr;
  }
  .ds-modal-card .ds-mode-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .ds-modal-card .ds-mode-card {
    padding: 12px 14px;
    border-radius: 12px;
  }
  .ds-modal-card .ds-mode-badge {
    margin-bottom: 6px;
  }
  .ds-modal-card .ds-mode-icon {
    font-size: 20px;
    margin-bottom: 4px;
  }
  .ds-modal-card .ds-mode-card h3 {
    font-size: 15px;
    margin: 0 0 3px;
  }
  .ds-modal-card .ds-mode-card p {
    font-size: 12px;
    line-height: 1.35;
    margin: 0 0 8px;
  }
  .ds-modal-card .ds-mode-btn {
    min-height: 40px;
    font-size: 13px;
    padding: 8px 12px;
  }
  .ds-modal-card .ds-picked-preview-row {
    padding: 8px 12px;
    margin-bottom: 10px;
  }
  .ds-modal-card .ds-picked-thumb {
    width: 36px;
    height: 36px;
  }
  .ds-modal-card .ds-review-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .ds-modal-card {
    max-height: calc(100dvh - 16px - env(safe-area-inset-top, 0px));
    border-radius: 18px 18px 0 0;
    position: fixed;
    bottom: 0;
    margin: 0;
    left: 0;
    right: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .ds-modal-header { padding: 12px 16px; flex: none; gap: 8px; }
  .ds-modal-step:not([hidden]) { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; }
  .ds-modal-title { font-size: 17px; }
  .ds-modal-close { min-width: 40px; min-height: 40px; }
  .ds-modal-body {
    flex: 1;
    min-height: 0;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px));
    overscroll-behavior: contain;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .ds-review-actions { flex-wrap: wrap; gap: 8px; }
  .ds-review-actions button { flex: 1 1 130px; min-height: 42px; }
  .ds-page-container .ds-filter-btn { min-height: 40px; flex-shrink: 0; }
  .ds-modal-card :is(input,select,textarea) { font-size: 16px; min-width: 0; max-width: 100%; }
}

/* ── Premium Design Marketplace Styles ── */
.badge-premium {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), 0 0 10px rgba(245, 158, 11, 0.5);
}
.ds-card-prem-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), 0 0 10px rgba(245, 158, 11, 0.4);
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.ds-modal-prem-box {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 12px;
  padding: 14px;
  margin: 14px 0;
}
.ds-modal-prem-box h4 {
  margin: 0 0 6px;
  color: #d97706;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ds-modal-prem-box p {
  margin: 0;
  color: var(--sc-muted, #64748b);
  font-size: 12px;
  line-height: 1.45;
}
