/* ═══════════════════════════════════════════════════════════════════════
   DeedSocial Design System — v8.1
   Dark theme, gradient brand (orange → pink → purple)
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  --ds-bg:          #0a0c10;
  --ds-bg-2:        #111318;
  --ds-panel:       #13161c;
  --ds-panel-hover: #181b23;
  --ds-border:      #1e2330;
  --ds-border-2:    #2a3040;
  --ds-text:        #e2e8f0;
  --ds-text-dim:    #94a3b8;
  --ds-muted:       #64748b;
  --ds-accent-1:    #f97316;  /* orange */
  --ds-accent-2:    #ec4899;  /* pink */
  --ds-accent-3:    #a855f7;  /* purple */
  --ds-danger:      #ef4444;
  --ds-success:     #10b981;
  --ds-warning:     #f59e0b;
  --ds-ring:        linear-gradient(135deg, var(--ds-accent-1), var(--ds-accent-2), var(--ds-accent-3));
  --ds-radius:      10px;
  --ds-radius-lg:   16px;
  --ds-shadow:      0 4px 24px rgba(0,0,0,0.4);
  --ds-shadow-lg:   0 8px 40px rgba(0,0,0,0.6);
  --ds-font:        -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, Helvetica, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  background: var(--ds-bg);
  color: var(--ds-text);
  font-family: var(--ds-font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; }

/* ─── Utility ─────────────────────────────────────────────── */
.ds-muted     { color: var(--ds-muted); }
.ds-small     { font-size: 0.8rem; }
.ds-center-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

/* ─── Auth card (no-auth state) ───────────────────────────── */
.ds-auth-card {
  text-align: center;
  max-width: 480px;
  padding: 3rem 2rem;
  background: var(--ds-panel);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-lg);
  box-shadow: var(--ds-shadow);
}
.ds-logo-big {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--ds-ring);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 1rem;
}

/* ─── Buttons ─────────────────────────────────────────────── */
.ds-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.7rem 1.4rem;
  background: var(--ds-ring);
  color: #fff;
  border-radius: var(--ds-radius);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}
.ds-btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(236, 72, 153, 0.3);
}
.ds-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.ds-btn-ghost {
  padding: 0.55rem 1rem;
  background: transparent;
  color: var(--ds-text-dim);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius);
  font-size: 0.82rem;
  font-weight: 600;
  transition: border 0.15s, color 0.15s;
}
.ds-btn-ghost:hover { border-color: var(--ds-accent-1); color: var(--ds-text); }

.ds-btn-danger {
  padding: 0.5rem 1rem;
  background: var(--ds-danger);
  color: #fff;
  border-radius: var(--ds-radius);
  font-size: 0.82rem;
  font-weight: 700;
}
.ds-btn-danger:hover { opacity: 0.9; }

/* ─── Header ──────────────────────────────────────────────── */
.ds-header {
  background: rgba(10, 12, 16, 0.85);
  border-bottom: 1px solid var(--ds-border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.ds-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.ds-logo {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--ds-ring);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.ds-header-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.ds-header-link { display: flex; align-items: center; }
.ds-tdp-badge {
  padding: 0.3rem 0.7rem;
  background: rgba(27, 45, 94, 0.4);
  border: 1px solid rgba(27, 45, 94, 0.8);
  color: #cbd5e1;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 999px;
  transition: background 0.15s;
}
.ds-tdp-badge:hover { background: rgba(27, 45, 94, 0.7); }

.ds-user-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem 0.35rem 0.35rem;
  background: var(--ds-panel);
  border: 1px solid var(--ds-border);
  border-radius: 999px;
  font-size: 0.84rem;
}
.ds-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--ds-bg-2);
}

/* ─── Main layout ─────────────────────────────────────────── */
.ds-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* ─── Tabs ────────────────────────────────────────────────── */
.ds-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--ds-border);
  margin-bottom: 2rem;
}
.ds-tab-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.5rem;
  color: var(--ds-text-dim);
  font-size: 0.92rem;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border 0.15s;
}
.ds-tab-btn:hover { color: var(--ds-text); }
.ds-tab-active {
  color: var(--ds-text);
  border-bottom-color: var(--ds-accent-2);
}
.ds-tab-count {
  background: var(--ds-border);
  color: var(--ds-text-dim);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  min-width: 22px;
  text-align: center;
}
.ds-tab-count-red { background: var(--ds-danger); color: #fff; }
.ds-tab-count-red:empty, .ds-tab-count-red[data-value="0"] { display: none; }

/* ─── Panel ───────────────────────────────────────────────── */
.ds-panel { animation: ds-fade-in 0.25s ease-out; }
@keyframes ds-fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.ds-panel-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.ds-panel-title { font-size: 1.5rem; font-weight: 700; color: var(--ds-text); margin-bottom: 0.25rem; }
.ds-panel-sub { font-size: 0.85rem; color: var(--ds-text-dim); }

/* ─── Stories grid (to be expanded in 6.2) ────────────────── */
.ds-stories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

/* ─── Inbox list (to be expanded in 6.3) ──────────────────── */
.ds-inbox-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* ─── Empty state ─────────────────────────────────────────── */
.ds-empty {
  padding: 4rem 2rem;
  text-align: center;
  background: var(--ds-panel);
  border: 1px dashed var(--ds-border-2);
  border-radius: var(--ds-radius-lg);
}
.ds-empty-emoji { font-size: 3rem; margin-bottom: 1rem; }
.ds-empty h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--ds-text); }
.ds-empty p {
  font-size: 0.9rem;
  color: var(--ds-text-dim);
  max-width: 480px;
  margin: 0 auto 1.5rem;
  line-height: 1.6;
}

/* ─── Modal ───────────────────────────────────────────────── */
.ds-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  animation: ds-fade-in 0.2s;
}
.ds-modal {
  background: var(--ds-panel);
  border: 1px solid var(--ds-border-2);
  border-radius: var(--ds-radius-lg);
  max-width: 640px;
  width: 100%;
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
  box-shadow: var(--ds-shadow-lg);
}

/* ─── Toast ───────────────────────────────────────────────── */
.ds-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(2rem);
  padding: 0.85rem 1.5rem;
  background: var(--ds-panel);
  border: 1px solid var(--ds-border-2);
  border-radius: var(--ds-radius);
  color: var(--ds-text);
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: var(--ds-shadow);
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 2000;
  pointer-events: none;
}
.ds-toast.ds-toast-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.ds-toast.ds-toast-success { border-color: var(--ds-success); }
.ds-toast.ds-toast-error   { border-color: var(--ds-danger); }

/* ─── Loading overlay ─────────────────────────────────────── */
.ds-loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 16, 0.85);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ds-spinner {
  width: 42px;
  height: 42px;
  border: 3px solid var(--ds-border-2);
  border-top-color: var(--ds-accent-2);
  border-radius: 50%;
  animation: ds-spin 0.8s linear infinite;
}
@keyframes ds-spin { to { transform: rotate(360deg); } }

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 640px) {
  .ds-header-inner { padding: 0.8rem 1rem; }
  .ds-user-chip { padding: 0.2rem 0.6rem 0.2rem 0.2rem; }
  .ds-user-chip span { display: none; }
  .ds-tdp-badge { display: none; }
  .ds-main { padding: 1.25rem 1rem; }
  .ds-panel-header { flex-direction: column; align-items: stretch; }
  .ds-tab-btn { padding: 0.7rem 1rem; font-size: 0.85rem; }
}


/* ═══════════════════════════════════════════════════════════════════════
   v8.1 — Step 6.2: Upload modal + Story cards
   ═══════════════════════════════════════════════════════════════════════ */

/* ─── Modal header + close ────────────────────────────────── */
.ds-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.3rem;
  border-bottom: 1px solid var(--ds-border);
}
.ds-modal-title { font-size: 1.05rem; font-weight: 700; }
.ds-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--ds-text-dim);
  font-size: 1.4rem;
  line-height: 1;
  transition: background 0.15s, color 0.15s;
}
.ds-modal-close:hover { background: var(--ds-bg-2); color: var(--ds-text); }

/* ─── Modal tabs ──────────────────────────────────────────── */
.ds-modal-tabs {
  display: flex;
  border-bottom: 1px solid var(--ds-border);
  background: var(--ds-bg);
}
.ds-modal-tab {
  flex: 1;
  padding: 0.9rem 1rem;
  color: var(--ds-text-dim);
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, background 0.15s, border 0.15s;
}
.ds-modal-tab:hover:not(:disabled) { background: var(--ds-panel-hover); color: var(--ds-text); }
.ds-modal-tab.ds-modal-tab-active {
  color: var(--ds-text);
  border-bottom-color: var(--ds-accent-2);
  background: var(--ds-panel);
}
.ds-modal-tab:disabled { opacity: 0.35; cursor: not-allowed; }

/* ─── Modal body panels ───────────────────────────────────── */
.ds-modal-body { padding: 1.4rem; }
.ds-modal-pane { display: none; }
.ds-modal-pane.ds-pane-active { display: block; animation: ds-fade-in 0.2s; }

/* ─── Drop zone ──────────────────────────────────────────── */
.ds-dropzone {
  border: 2px dashed var(--ds-border-2);
  border-radius: var(--ds-radius);
  padding: 2.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: var(--ds-bg);
}
.ds-dropzone:hover { border-color: var(--ds-accent-1); background: var(--ds-bg-2); }
.ds-dropzone.ds-dropzone-active {
  border-color: var(--ds-accent-2);
  background: rgba(236, 72, 153, 0.05);
}
.ds-dropzone-icon { font-size: 2.2rem; margin-bottom: 0.6rem; }
.ds-dropzone-hint { font-size: 0.8rem; color: var(--ds-muted); margin-top: 0.4rem; }
.ds-dropzone input[type="file"] { display: none; }

/* ─── Preview area ─────────────────────────────────────────── */
.ds-preview-box {
  position: relative;
  background: var(--ds-bg);
  border-radius: var(--ds-radius);
  overflow: hidden;
  aspect-ratio: 9 / 16;
  max-height: 360px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ds-preview-box img, .ds-preview-box video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}
.ds-preview-clear {
  position: absolute;
  top: 8px; right: 8px;
  width: 30px; height: 30px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  border-radius: 50%;
  font-size: 1.1rem;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
}

/* ─── Text-story editor ───────────────────────────────────── */
.ds-text-canvas {
  aspect-ratio: 9 / 16;
  max-height: 340px;
  margin: 0 auto 1rem;
  border-radius: var(--ds-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
  font-weight: 700;
  font-size: 1.3rem;
  line-height: 1.35;
  word-break: break-word;
  position: relative;
  overflow: hidden;
  transition: background 0.15s, color 0.15s;
}
.ds-text-canvas textarea {
  width: 100%;
  height: 100%;
  background: transparent;
  color: inherit;
  border: none;
  resize: none;
  outline: none;
  text-align: center;
  font-weight: inherit;
  font-size: inherit;
  font-family: inherit;
  line-height: inherit;
}
.ds-text-canvas textarea::placeholder { color: rgba(255,255,255,0.5); }

.ds-color-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.8rem 0;
  flex-wrap: wrap;
}
.ds-color-label { font-size: 0.78rem; color: var(--ds-text-dim); margin-right: 0.2rem; }
.ds-color-swatch {
  width: 26px; height: 26px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.1s, border 0.15s;
}
.ds-color-swatch:hover { transform: scale(1.15); }
.ds-color-swatch.ds-color-active { border-color: #fff; transform: scale(1.15); }

.ds-char-counter {
  text-align: right;
  font-size: 0.72rem;
  color: var(--ds-muted);
  margin-bottom: 0.6rem;
}
.ds-char-counter.ds-char-over { color: var(--ds-danger); }

/* ─── Modal footer ────────────────────────────────────────── */
.ds-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  padding: 1rem 1.3rem;
  border-top: 1px solid var(--ds-border);
  background: var(--ds-bg);
}

/* ─── Upload progress ─────────────────────────────────────── */
.ds-progress-wrap {
  margin-top: 0.6rem;
  background: var(--ds-bg-2);
  border-radius: 4px;
  height: 4px;
  overflow: hidden;
}
.ds-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--ds-ring);
  transition: width 0.2s;
}

/* ─── Story card (grid) ───────────────────────────────────── */
.ds-story-card {
  background: var(--ds-panel);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s, transform 0.15s;
  cursor: pointer;
  position: relative;
}
.ds-story-card:hover { border-color: var(--ds-accent-2); transform: translateY(-2px); }

.ds-story-media {
  aspect-ratio: 9 / 16;
  background: var(--ds-bg-2);
  overflow: hidden;
  position: relative;
  max-height: 320px;
}
.ds-story-media img, .ds-story-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ds-story-media-text {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.3;
  word-break: break-word;
  overflow: hidden;
}
.ds-story-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 0.2rem 0.5rem;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 4px;
  backdrop-filter: blur(6px);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.ds-story-timer {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 0.2rem 0.5rem;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 600;
  border-radius: 4px;
  backdrop-filter: blur(6px);
}
.ds-story-body { padding: 0.7rem 0.8rem 0.8rem; }
.ds-story-stats {
  display: flex;
  gap: 0.9rem;
  font-size: 0.78rem;
  color: var(--ds-text-dim);
}
.ds-story-stats span { display: inline-flex; align-items: center; gap: 0.25rem; }
.ds-story-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.3rem;
  margin-top: 0.5rem;
}
.ds-story-icon-btn {
  width: 28px; height: 28px;
  border-radius: 6px;
  color: var(--ds-text-dim);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
  font-size: 0.95rem;
}
.ds-story-icon-btn:hover { background: var(--ds-bg-2); color: var(--ds-text); }
.ds-story-icon-btn.ds-story-btn-danger:hover { color: var(--ds-danger); background: rgba(239,68,68,0.12); }


/* ═══════════════════════════════════════════════════════════════════════
   v8.1 — Step 7.3: Profile hot page + Viewer overlay
   ═══════════════════════════════════════════════════════════════════════ */

.ds-profile-body { background: var(--ds-bg); }

.dsp-loading {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--ds-bg);
  z-index: 500;
}

/* ─── Topbar ──────────────────────────────────────────────── */
.dsp-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--ds-border);
  background: rgba(10, 12, 16, 0.8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 100;
}
.dsp-topbar-actions { display: flex; gap: 0.5rem; }
.dsp-copy-btn:active { transform: scale(0.97); }

/* ─── Main layout ─────────────────────────────────────────── */
.dsp-main {
  max-width: 680px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* ─── Hero ───────────────────────────────────────────────── */
.dsp-hero {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.8rem;
}
.dsp-photo-wrap {
  position: relative;
  width: 140px;
  height: 140px;
  flex-shrink: 0;
}
.dsp-photo-wrap.dsp-has-stories { cursor: pointer; }
.dsp-photo-wrap.dsp-has-stories:hover .dsp-photo { transform: scale(1.04); }
.dsp-photo-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  padding: 4px;
  background: var(--ds-border);
  display: none;
}
.dsp-photo-wrap.dsp-has-stories .dsp-photo-ring {
  display: block;
  background: conic-gradient(from 180deg, var(--ds-accent-1), var(--ds-accent-2), var(--ds-accent-3), var(--ds-accent-1));
  animation: dsp-ring-spin 4s linear infinite;
}
@keyframes dsp-ring-spin { to { transform: rotate(360deg); } }
.dsp-photo-wrap.dsp-has-stories .dsp-photo-ring::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.25), 0 0 30px rgba(236, 72, 153, 0.2);
  pointer-events: none;
}
.dsp-photo {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--ds-bg);
  background: var(--ds-bg-2);
  transition: transform 0.2s;
}
.dsp-photo-wrap:not(.dsp-has-stories) .dsp-photo { border-width: 3px; border-color: var(--ds-border); }
.dsp-photo-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  z-index: 2;
  padding: 0.2rem 0.6rem;
  background: var(--ds-ring);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 999px;
  border: 2px solid var(--ds-bg);
  letter-spacing: 0.02em;
}

.dsp-identity { flex: 1; min-width: 0; }
.dsp-name-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.2rem; flex-wrap: wrap; }
.dsp-display-name {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ds-text);
  line-height: 1.15;
}
.dsp-verified {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: var(--ds-accent-2);
  color: #fff;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
}
.dsp-handle {
  font-size: 0.92rem;
  color: var(--ds-muted);
  font-family: "JetBrains Mono", monospace;
  margin-bottom: 0.5rem;
}
.dsp-tagline {
  font-size: 1rem;
  color: var(--ds-text-dim);
  line-height: 1.4;
}

/* ─── Stats ──────────────────────────────────────────────── */
.dsp-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  padding: 1rem;
  background: var(--ds-panel);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-lg);
  margin-bottom: 1.5rem;
}
.dsp-stat { text-align: center; }
.dsp-stat-num { font-size: 1.35rem; font-weight: 800; color: var(--ds-text); }
.dsp-stat-label { font-size: 0.72rem; color: var(--ds-muted); margin-top: 0.1rem; text-transform: uppercase; letter-spacing: 0.06em; }

/* ─── CTAs ───────────────────────────────────────────────── */
.dsp-ctas {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.dsp-ctas .ds-btn-primary, .dsp-ctas .ds-btn-ghost {
  flex: 1;
  min-width: 140px;
  justify-content: center;
}

/* ─── Sections ───────────────────────────────────────────── */
.dsp-section {
  margin-bottom: 2rem;
}
.dsp-section-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ds-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.7rem;
}
.dsp-bio {
  font-size: 0.96rem;
  line-height: 1.65;
  color: var(--ds-text);
  white-space: pre-wrap;
}
.dsp-twocol {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

/* ─── Chips ──────────────────────────────────────────────── */
.dsp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.dsp-chip {
  padding: 0.35rem 0.85rem;
  background: var(--ds-panel);
  border: 1px solid var(--ds-border);
  color: var(--ds-text);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  transition: border 0.15s, background 0.15s;
}
.dsp-chip:hover { border-color: var(--ds-accent-1); background: var(--ds-panel-hover); }

/* ─── Gallery ────────────────────────────────────────────── */
.dsp-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.3rem;
}
.dsp-gallery-item {
  aspect-ratio: 1;
  background: var(--ds-bg-2);
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s;
}
.dsp-gallery-item:hover { transform: scale(0.97); }
.dsp-gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ─── Testimonials ───────────────────────────────────────── */
.dsp-testimonials {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.dsp-testimonial {
  padding: 1rem;
  background: var(--ds-panel);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius);
  font-size: 0.9rem;
  line-height: 1.6;
}
.dsp-testimonial-author {
  margin-top: 0.6rem;
  font-size: 0.8rem;
  color: var(--ds-muted);
  font-weight: 600;
}

/* ─── Footer ─────────────────────────────────────────────── */
.dsp-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--ds-border);
  text-align: center;
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 600px) {
  .dsp-hero { flex-direction: column; align-items: flex-start; gap: 1rem; text-align: left; }
  .dsp-photo-wrap { width: 110px; height: 110px; }
  .dsp-display-name { font-size: 1.4rem; }
  .dsp-twocol { grid-template-columns: 1fr; gap: 1.5rem; }
  .dsp-ctas { flex-direction: column; }
  .dsp-ctas .ds-btn-primary, .dsp-ctas .ds-btn-ghost { flex: unset; width: 100%; }
}

/* ═══════════════════════════════════════════════════════════════════════
   Story Viewer Overlay (fullscreen)
   ═══════════════════════════════════════════════════════════════════════ */

.dsv-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: ds-fade-in 0.2s;
  user-select: none;
}

.dsv-close {
  position: absolute;
  top: 1rem; right: 1rem;
  z-index: 10;
  width: 40px; height: 40px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  color: #fff;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  transition: background 0.15s;
}
.dsv-close:hover { background: rgba(255, 255, 255, 0.24); }

/* Progress bars (top) */
.dsv-progress-bars {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 5;
  display: flex;
  gap: 4px;
  padding: 0.8rem 1rem 0;
}
.dsv-progress-slot {
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 2px;
  overflow: hidden;
}
.dsv-progress-fill {
  height: 100%;
  width: 0%;
  background: #fff;
  border-radius: 2px;
  transition: width 0.1s linear;
}
.dsv-progress-fill.dsv-filled { width: 100% !important; }

/* Top header with consultant info */
.dsv-top-header {
  position: absolute;
  top: 1.8rem;
  left: 0; right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 1rem;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
.dsv-consultant-photo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.5);
}
.dsv-consultant-info { flex: 1; min-width: 0; }
.dsv-consultant-name { font-size: 0.88rem; font-weight: 700; }
.dsv-story-time { font-size: 0.72rem; color: rgba(255, 255, 255, 0.7); }
.dsv-pause-btn {
  width: 34px; height: 34px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  color: #fff;
  font-size: 0.85rem;
}

/* Stage (media area) */
.dsv-stage {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.dsv-media {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dsv-media img, .dsv-media video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}
.dsv-media .dsv-text-story {
  width: 100%;
  max-width: 500px;
  aspect-ratio: 9 / 16;
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  font-weight: 700;
  font-size: 1.8rem;
  line-height: 1.3;
  word-break: break-word;
  border-radius: 8px;
}

/* Tap zones (invisible, cover stage thirds) */
.dsv-tap-zone {
  position: absolute;
  top: 0; bottom: 0;
  width: 33%;
  z-index: 3;
  cursor: pointer;
}
.dsv-tap-left { left: 0; }
.dsv-tap-right { right: 0; }

/* Bottom bar */
.dsv-bottom {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 5;
  padding: 1rem 1rem 1.3rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.dsv-reactions {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
}
.dsv-emoji-btn {
  width: 42px;
  height: 42px;
  font-size: 1.4rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(6px);
  border-radius: 50%;
  transition: transform 0.15s, background 0.15s;
}
.dsv-emoji-btn:hover { transform: scale(1.15); background: rgba(255, 255, 255, 0.2); }
.dsv-emoji-btn.dsv-emoji-burst { animation: dsv-burst 0.6s ease-out; }
@keyframes dsv-burst {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.5); }
  60%  { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.dsv-msg-form {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}
.dsv-msg-input {
  flex: 1;
  padding: 0.7rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: #fff;
  font-size: 0.88rem;
  cursor: pointer;
}
.dsv-msg-input::placeholder { color: rgba(255, 255, 255, 0.6); }
.dsv-msg-input:focus { border-color: rgba(255, 255, 255, 0.5); outline: none; }

/* DM modal extras (shared styles via ds-modal from dashboard step) */
.dsp-msg-input {
  width: 100%;
  padding: 0.7rem 0.85rem;
  background: var(--ds-bg);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius);
  color: var(--ds-text);
  font-size: 0.92rem;
  margin-bottom: 0.75rem;
}
.dsp-msg-input:focus { outline: none; border-color: var(--ds-accent-2); }
.dsp-msg-textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  background: var(--ds-bg);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius);
  color: var(--ds-text);
  font-size: 0.92rem;
  resize: vertical;
  min-height: 110px;
  margin-bottom: 0.75rem;
}
.dsp-msg-code {
  width: 100%;
  padding: 1rem;
  background: var(--ds-bg);
  border: 2px solid var(--ds-border-2);
  border-radius: var(--ds-radius);
  color: var(--ds-accent-1);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0.6em;
  text-align: center;
  font-family: "SF Mono", Monaco, Consolas, monospace;
  margin-bottom: 0.75rem;
}
.dsp-msg-code:focus { outline: none; border-color: var(--ds-accent-2); }
.dsp-msg-label {
  display: block;
  font-size: 0.76rem;
  color: var(--ds-text-dim);
  margin-bottom: 0.25rem;
  font-weight: 600;
}
.dsp-msg-err {
  color: var(--ds-danger);
  font-size: 0.82rem;
  margin-bottom: 0.6rem;
  display: none;
}


/* ═══════════════════════════════════════════════════════════════════════
   v8.1 — Step 7.5: Viewer-only mode (standalone /viewer/@slug)
   ═══════════════════════════════════════════════════════════════════════ */

.dsv-body-only {
  background: #000;
  overflow: hidden;
}
.dsv-body-only .dsp-loading { background: #000; }

/* When .dsv-standalone, the overlay IS the whole page */
.dsv-standalone {
  position: static !important;
  min-height: 100vh;
}

/* Mini footer inside viewer (shows link to full profile) */
.dsv-mini-footer {
  margin-top: 0.6rem;
  text-align: center;
}
.dsv-profile-link {
  display: inline-block;
  padding: 0.35rem 0.8rem;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
}
.dsv-profile-link:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}
