/* =============================================
   JONARIX — Dashboard (mature dark UI, step 1)
   ============================================= */

/* ── Layout + tokens (scoped to dashboard app only) ───────── */
html, body { height: 100%; }

.dash-body {
  min-height: 100vh;
  overflow: auto;
  color-scheme: dark;
  /* Neutral black shell — zinc surfaces, soft white links/focus, green primary */
  --bg: #000000;
  --surface: #0a0a0a;
  --elevated: #141414;
  --border: #262626;
  --border-light: #3f3f3f;
  --purple: #d4d4d4;
  --purple-hover: #fafafa;
  --purple-light: #e5e5e5;
  --purple-mid: #a3a3a3;
  --purple-dim: rgba(255, 255, 255, 0.08);
  --purple-glow: rgba(255, 255, 255, 0.12);
  --cyan: #39d353;
  --green: #3fb950;
  --text: #fafafa;
  --text-2: #a3a3a3;
  --text-3: #737373;
  --radius: 8px;
  --radius-lg: 10px;
  --radius-sm: 6px;
  --transition: 0.15s ease;
  background: var(--bg);
}

/* ── Light mode theme ──────────────────────────────────────────────────────── */
.dash-body--light {
  color-scheme: light;
  --bg: #f5f5f5;
  --surface: #ffffff;
  --elevated: #efefef;
  --border: #e0e0e0;
  --border-light: #cccccc;
  --purple: #171717;
  --purple-hover: #000000;
  --purple-light: #404040;
  --purple-mid: #737373;
  --purple-dim: rgba(0,0,0,0.06);
  --purple-glow: rgba(0,0,0,0.1);
  --cyan: #16a34a;
  --green: #15803d;
  --text: #111111;
  --text-2: #525252;
  --text-3: #737373;
  background: var(--bg);
}
.dash-body--light .dash-sidebar { border-right-color: var(--border); }
.dash-body--light .dash-topbar { border-bottom-color: var(--border); }
.dash-body--light .dash-nav-item:hover { background: rgba(0,0,0,0.05); }
.dash-body--light .dash-nav-item.active { background: rgba(0,0,0,0.08); }
.dash-body--light .dash-loading { background: #f5f5f5; }
.dash-body--light .dash-search { background: rgba(0,0,0,0.05); border-color: var(--border); }
.dash-body--light .dash-search input { color: var(--text); }
.dash-body--light .dash-stat-card { background: var(--surface); border-color: var(--border); }
.dash-body--light .dash-modal { background: var(--surface); border-color: var(--border); }
.dash-body--light .dash-modal-overlay { background: rgba(0,0,0,0.45); }
.dash-body--light .btn.btn-ghost { border-color: var(--border); color: var(--text); }
.dash-body--light .btn.btn-ghost:hover { background: rgba(0,0,0,0.06); }
.dash-body--light .dash-table th { background: var(--elevated); }
.dash-body--light .dsc-left { border-right-color: var(--border); background: var(--surface); }
.dash-body--light .dsc-right { border-left-color: var(--border); background: var(--surface); }
.dash-body--light .dsc-list-item:hover { background: var(--elevated); }
.dash-body--light .dsc-list-item--active { background: var(--elevated); border-left-color: var(--purple); }
.dash-body--light .settings-account-nav { border-bottom-color: var(--border); }
.dash-body--light .settings-account-nav__btn.is-active { border-bottom-color: var(--purple); color: var(--text); }
.dash-body--light .settings-section { border-color: var(--border); }
.dash-body--light code, .dash-body--light pre { background: var(--elevated); color: var(--text); }
/* scrollbars for light mode */
.dash-body--light .dash-content,
.dash-body--light .dash-nav { scrollbar-color: rgba(0,0,0,0.2) rgba(0,0,0,0.05); }

/* Light mode: surfaces that were hard-coded for dark UI (settings hero, pricing, profile preview) */
.dash-body--light .settings-page-head {
  border-color: var(--border);
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04) inset, 0 8px 28px rgba(0, 0, 0, 0.06);
}
.dash-body--light .settings-page-head-logo {
  background: var(--elevated);
  border-color: var(--border);
}

.dash-body--light .dash-pricing-surface {
  background: var(--surface);
  border-color: var(--border);
}
.dash-body--light .dash-pricing-deco {
  opacity: 0.45;
  background: radial-gradient(ellipse 80% 60% at 50% -25%, rgba(99, 102, 241, 0.14), transparent 58%);
}
.dash-body--light .dash-pricing-card {
  background: var(--surface);
  border-color: var(--border);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.05);
}
.dash-body--light .dash-pricing-card--current {
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--green) 32%, transparent),
    0 10px 28px rgba(0, 0, 0, 0.08);
}
.dash-body--light .dash-pricing-card--featured {
  border-color: color-mix(in srgb, var(--purple-mid) 40%, var(--border));
  background: linear-gradient(165deg, #ffffff 0%, #f8fafc 48%, #f1f5f9 100%);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.08);
}
.dash-body--light .dash-pricing-card--featured.dash-pricing-card--current {
  border-color: color-mix(in srgb, var(--green) 50%, var(--border));
}
.dash-body--light .dash-pricing-ribbon {
  color: #5b21b6;
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(124, 58, 237, 0.35);
}
.dash-body--light .dash-pricing-list li {
  border-bottom-color: var(--border);
  color: var(--text-2);
}

.dash-body--light .dash-billing-panel {
  background: var(--surface);
}
.dash-body--light .dash-billing-table th {
  background: var(--elevated);
}

.dash-body--light .profile-preview-card--large {
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.08);
  backdrop-filter: none;
}
.dash-body--light .profile-preview-card--jonarix-platform {
  border-color: var(--border);
  background: var(--surface);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.08);
}
.dash-body--light .profile-preview-card--jonarix-platform .profile-chip {
  color: var(--text-2);
  background: var(--elevated);
  border-color: var(--border);
}
.dash-body--light .profile-preview-card--jonarix-platform .profile-preview-link {
  color: var(--text-2);
}
.dash-body--light .profile-preview-card--jonarix-platform .profile-preview-link:hover {
  color: var(--text);
}
.dash-body--light .profile-preview-stat {
  border-color: var(--border);
  background: var(--elevated);
}
.dash-body--light .profile-preview-readme-wrap {
  background: var(--elevated);
}
.dash-body--light .profile-preview-avatar--large {
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12), 0 0 0 2px var(--border);
}

.dash-body--light .dash-create-prompt-footer.modal-footer {
  border-top-color: var(--border);
}

/* Create prompt wizard — light mode (controls + demo chrome were dark-theme only) */
.dash-body--light .dash-create-mode-toggle {
  background: var(--elevated);
}
.dash-body--light .dash-create-mode-btn.active {
  border-color: var(--border-light);
  background: rgba(0, 0, 0, 0.05);
  color: var(--text);
}
.dash-body--light .dash-create-mode-btn.active span {
  color: var(--text-2);
}
.dash-body--light .dash-create-live-tab.active {
  border-color: var(--border-light);
  background: var(--elevated);
  color: var(--text);
}
.dash-body--light .dash-demo-tab.active {
  border-color: var(--border-light);
  background: var(--elevated);
  color: var(--text);
}
.dash-body--light .dash-create-live-demo img,
.dash-body--light .dash-create-live-demo video {
  border-color: var(--border);
  background: var(--elevated);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  transform: none;
}
.dash-body--light .dash-create-live-body {
  background: var(--elevated);
  border-color: var(--border);
}
.dash-body--light .dash-create-subcard {
  background: var(--surface);
  border-color: var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.dash-body--light .dash-create-callout--muted {
  border-color: var(--border);
  background: var(--elevated);
}
.dash-body--light .dash-demo-upload-zone {
  border-color: rgba(0, 0, 0, 0.14);
  background: var(--surface);
}
.dash-body--light .dash-demo-upload-zone:hover,
.dash-body--light .dash-demo-upload-zone:focus-visible {
  border-color: rgba(0, 0, 0, 0.26);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.dash-body--light .dash-demo-preview-wrap {
  border-color: var(--border);
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06);
  transform: none;
}
.dash-body--light .dash-demo-image-slot {
  border-color: rgba(0, 0, 0, 0.12);
  background: var(--elevated);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.dash-body--light .dash-demo-image-slot.is-filled {
  background: var(--surface);
  border-color: var(--border);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}
.dash-body--light .dash-topic-other-row {
  border-top-color: var(--border);
}
.dash-body--light .dash-topic-other-wrap {
  background: var(--elevated);
}

/* theme toggle button */
.theme-toggle-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--elevated);
  color: var(--text-2); font-size: 0.82rem; cursor: pointer;
  transition: var(--transition);
}
.theme-toggle-btn:hover { border-color: var(--border-light); color: var(--text); }
.theme-toggle-btn svg { flex-shrink: 0; }

/* ── Themed scrollbars (thin, dark — replaces bright OS default bars) ───── */
.dash-content,
.dash-nav,
.dash-modal,
.dash-drawer-body,
.install-block pre,
.help-accordion-body .help-code-block,
.help-sidebar {
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 156, 188, 0.45) rgba(255, 255, 255, 0.05);
}

.dash-content::-webkit-scrollbar,
.dash-nav::-webkit-scrollbar,
.dash-modal::-webkit-scrollbar,
.dash-drawer-body::-webkit-scrollbar,
.install-block pre::-webkit-scrollbar,
.help-accordion-body .help-code-block::-webkit-scrollbar,
.help-sidebar::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.dash-content::-webkit-scrollbar-track,
.dash-nav::-webkit-scrollbar-track,
.dash-modal::-webkit-scrollbar-track,
.dash-drawer-body::-webkit-scrollbar-track,
.install-block pre::-webkit-scrollbar-track,
.help-accordion-body .help-code-block::-webkit-scrollbar-track,
.help-sidebar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 100px;
}
.dash-content::-webkit-scrollbar-thumb,
.dash-nav::-webkit-scrollbar-thumb,
.dash-modal::-webkit-scrollbar-thumb,
.dash-drawer-body::-webkit-scrollbar-thumb,
.install-block pre::-webkit-scrollbar-thumb,
.help-accordion-body .help-code-block::-webkit-scrollbar-thumb,
.help-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 100px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.dash-content::-webkit-scrollbar-thumb:hover,
.dash-nav::-webkit-scrollbar-thumb:hover,
.dash-modal::-webkit-scrollbar-thumb:hover,
.dash-drawer-body::-webkit-scrollbar-thumb:hover,
.install-block pre::-webkit-scrollbar-thumb:hover,
.help-accordion-body .help-code-block::-webkit-scrollbar-thumb:hover,
.help-sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.32);
  border: 2px solid transparent;
  background-clip: padding-box;
}
.dash-content::-webkit-scrollbar-button,
.dash-nav::-webkit-scrollbar-button,
.dash-modal::-webkit-scrollbar-button,
.dash-drawer-body::-webkit-scrollbar-button,
.install-block pre::-webkit-scrollbar-button,
.help-accordion-body .help-code-block::-webkit-scrollbar-button,
.help-sidebar::-webkit-scrollbar-button {
  width: 0;
  height: 0;
  display: none;
}
.dash-content::-webkit-scrollbar-corner,
.dash-nav::-webkit-scrollbar-corner,
.dash-modal::-webkit-scrollbar-corner,
.dash-drawer-body::-webkit-scrollbar-corner,
.install-block pre::-webkit-scrollbar-corner,
.help-accordion-body .help-code-block::-webkit-scrollbar-corner,
.help-sidebar::-webkit-scrollbar-corner {
  background: transparent;
}

.dash-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ──────────────────────────────── */
.dash-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  /* Keep the sidebar visible while the main content scrolls */
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: visible;
  z-index: 5;
}

.dash-sidebar-top {
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.dash-sidebar-callout {
  margin: 12px 12px 4px;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
}
.dash-sidebar-callout-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 6px;
  line-height: 1.35;
}
.dash-sidebar-callout-desc {
  margin: 0 0 12px;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--text-2);
}
.dash-sidebar-callout-btn {
  width: 100%;
  justify-content: center;
  margin-bottom: 8px;
  font-size: 0.82rem;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
}
.dash-sidebar-callout-link {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--purple);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}
.dash-sidebar-callout-link:hover {
  text-decoration: underline;
  color: var(--purple-hover);
}

.dash-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--heading-font);
  font-weight: 700;
  font-size: 0.97rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  margin-bottom: 0;
}
.dash-logo .brand-logo {
  width: 28px;
  height: 28px;
}

.dash-nav {
  flex: 1;
  overflow-y: auto;
  padding: 10px 8px;
}

.dash-nav-section {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
  padding: 12px 10px 6px;
}

.dash-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.dash-nav-item svg { flex-shrink: 0; opacity: 0.75; transition: opacity var(--transition); }
.dash-nav-item:hover { background: rgba(240, 246, 252, 0.06); color: var(--text); }
.dash-nav-item:hover svg { opacity: 1; }
.dash-nav-item.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-weight: 600;
}
.dash-nav-item.active svg { opacity: 1; color: var(--purple); }
.dash-nav-item--muted { color: var(--text-3); }
.dash-nav-item--muted:hover { color: var(--text-2); }

.dash-nav-badge {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 600;
  background: var(--elevated);
  color: var(--text-2);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 1px 6px;
  min-width: 18px;
  text-align: center;
}

.dash-sidebar-bottom {
  border-top: 1px solid var(--border);
  padding: 12px 8px;
  flex-shrink: 0;
}

.dash-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
}
.dash-user-card:hover { background: rgba(255,255,255,0.04); }

.dash-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--elevated);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--heading-font);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text);
  flex-shrink: 0;
}
.dash-avatar-lg {
  width: 56px; height: 56px;
  font-size: 1.1rem;
  border-radius: 50%;
  background: var(--elevated);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--heading-font);
  font-weight: 700;
  color: var(--text);
}

.dash-user-info { flex: 1; min-width: 0; }
.dash-user-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-user-handle {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-plan-pill {
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.dash-plan-pill.free { background: rgba(255,255,255,0.06); color: var(--text-3); }
.dash-plan-pill.pro  { background: var(--purple-dim); color: var(--purple-light); border: 1px solid color-mix(in srgb, var(--purple) 30%, transparent); }

.dash-sidebar-divider--rail {
  height: 1px;
  margin: 8px 12px;
  background: var(--border);
  border: none;
  padding: 0;
}

/* ── Main area ────────────────────────────── */
.dash-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: visible;
  min-width: 0;
  min-height: 0;
  position: relative;
}

.dash-topbar {
  height: 56px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 22px;
  gap: 16px;
  flex-shrink: 0;
  background: var(--bg);
}

/* Keep top header fixed while scrolling */
.dash-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.dash-topbar-title {
  font-family: var(--heading-font);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.dash-search {
  flex: 1;
  max-width: min(560px, 52vw);
  min-width: 200px;
  position: relative;
}
.dash-search-form {
  display: block;
  position: relative;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
}
.dash-search-form svg {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  pointer-events: none;
}
.dash-search-form input {
  width: 100%;
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px 11px 40px;
  min-height: 42px;
  color: var(--text);
  font-size: 0.92rem;
  font-family: var(--font);
  outline: none;
  transition: var(--transition);
}
.dash-search-form input::placeholder { color: var(--text-3); }
.dash-search-form input:focus { border-color: var(--purple); background: var(--purple-dim); box-shadow: 0 0 0 1px color-mix(in srgb, var(--purple) 35%, transparent); }

/* ── Global search dropdown ────────────────────────────────────────────────── */
.gs-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.45);
  z-index: 9999;
  max-height: 380px;
  overflow-y: auto;
  padding: 6px 0;
}
.gs-group-label {
  font-size: 0.71rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-3);
  padding: 10px 14px 4px;
}
.gs-result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  cursor: pointer;
  font-size: 0.86rem;
  color: var(--text-2);
  border-radius: 0;
  transition: background var(--transition);
}
.gs-result:hover, .gs-result.gs-result--active {
  background: var(--elevated);
  color: var(--text);
}
.gs-result-icon {
  width: 26px; height: 26px;
  border-radius: var(--radius-sm);
  background: var(--elevated);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--text-3);
  font-size: 0.75rem;
}
.gs-result-text { flex: 1; min-width: 0; }
.gs-result-name { font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-result-sub  { font-size: 0.76rem; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-result-tag  { font-size: 0.72rem; color: var(--text-3); background: var(--elevated); border: 1px solid var(--border); border-radius: 4px; padding: 1px 6px; flex-shrink: 0; }
.gs-empty { padding: 18px 14px; font-size: 0.84rem; color: var(--text-3); text-align: center; }

.dash-topbar-spacer { flex: 1; }

.dash-topbar-btn {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--elevated);
  color: var(--text-2);
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}
.dash-topbar-btn:hover { color: var(--text); border-color: var(--border-light); }

/* ── Notifications ─────────────────────────────────────────────────────────── */
.notif-wrapper { position: relative; }
.notif-trigger { position: relative; }
.notif-dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #ef4444;
  border: 1.5px solid var(--bg);
}
.notif-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 340px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  z-index: 9998;
  overflow: hidden;
}
.notif-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px 10px;
  border-bottom: 1px solid var(--border);
}
.notif-panel-title { font-size: 0.88rem; font-weight: 600; color: var(--text); }
.notif-mark-all { font-size: 0.76rem; color: var(--text-3); background: none; border: none; cursor: pointer; padding: 0; }
.notif-mark-all:hover { color: var(--text); }
.notif-list { max-height: 360px; overflow-y: auto; }
.notif-empty { padding: 24px 16px; font-size: 0.84rem; color: var(--text-3); text-align: center; }
.notif-item {
  display: flex;
  gap: 10px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition);
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--elevated); }
.notif-item--unread { background: var(--purple-dim); }
.notif-item--unread:hover { background: color-mix(in srgb, var(--purple-dim) 70%, var(--elevated)); }
.notif-icon {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--elevated);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--text-3);
}
.notif-body { flex: 1; min-width: 0; }
.notif-text { font-size: 0.84rem; color: var(--text-2); line-height: 1.5; }
.notif-time { font-size: 0.74rem; color: var(--text-3); margin-top: 3px; }

/* ── Content area ─────────────────────────── */
.dash-content {
  flex: 1;
  overflow-y: auto;
  scroll-behavior: smooth;
  scroll-padding-top: 64px;
  padding: 28px 32px 52px;
}

/* ── Global branding footer (main column, below scroll) ───────────── */
.dash-brand-footer {
  --footer-hand: "Caveat", cursive;
  flex-shrink: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 0 32px;
  box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
  font-family: var(--footer-hand);
}
.dash-brand-footer__sponsors {
  padding: 18px 0 4px;
}
.dash-brand-footer__rule-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 18px;
}
.dash-brand-footer__rule-line {
  flex: 1;
  height: 1px;
  background: var(--border);
  min-width: 12px;
}
.dash-brand-footer__rule-label {
  font-family: var(--footer-hand);
  font-size: clamp(1rem, 2.2vw, 1.3rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--text-3);
  white-space: nowrap;
}
.dash-brand-footer__showcase {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 20px;
  padding-bottom: 18px;
}
.dash-brand-footer__brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.dash-brand-footer__logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--elevated);
}
.dash-brand-footer__brand-name {
  font-family: var(--heading-font);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.2;
}
.dash-brand-footer__brand-tag {
  font-size: 0.72rem;
  color: var(--text-2);
  line-height: 1.35;
  margin-top: 2px;
  max-width: 220px;
}
.dash-brand-footer__partners {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px 12px;
}
.dash-brand-footer__partner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--elevated);
  min-width: 0;
}
.dash-brand-footer__partner--logo-only {
  padding: 10px 14px;
}
.dash-brand-footer__partner-logo {
  height: 38px;
  width: auto;
  max-width: min(160px, 28vw);
  object-fit: contain;
  object-position: left center;
  flex-shrink: 0;
}
.dash-brand-footer__partner:not(.dash-brand-footer__partner--logo-only) .dash-brand-footer__partner-logo--kentunez {
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  object-fit: contain;
}
.dash-brand-footer__partner:not(.dash-brand-footer__partner--logo-only) .dash-brand-footer__partner-logo {
  height: 40px;
  width: 40px;
  max-width: 44px;
  object-fit: contain;
}
.dash-body--light .dash-brand-footer__partner--mark {
  background: #0a0a0a;
  border-color: #2a2a2a;
}
.dash-body--light .dash-brand-footer__partner--mark .dash-brand-footer__partner-name {
  color: #fafafa;
}

.dash-brand-footer__partner-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.dash-brand-footer__partner-name {
  font-family: var(--footer-hand);
  font-size: clamp(1.05rem, 2.4vw, 1.38rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.dash-brand-footer__partner-sub {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
  line-height: 1.25;
}
.dash-brand-footer__showcase-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
  flex-shrink: 0;
}
.dash-brand-footer__pitch {
  margin: 0;
  flex: 1;
  min-width: 160px;
  max-width: 360px;
  font-family: var(--footer-hand);
  font-size: clamp(0.92rem, 2vw, 1.05rem);
  font-weight: 500;
  line-height: 1.45;
  color: var(--text-2);
}
.dash-brand-footer__cta {
  font-family: var(--footer-hand);
  font-size: clamp(1.12rem, 2.4vw, 1.45rem);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: none;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  padding: 8px 2px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.dash-brand-footer__cta:hover {
  color: var(--purple-hover);
  background: var(--purple-dim);
}
.dash-body--light .dash-brand-footer__cta:hover {
  color: var(--cyan);
}
.dash-brand-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 0 16px;
  border-top: 1px solid var(--border);
}
.dash-brand-footer__legal {
  font-family: var(--footer-hand);
  font-size: clamp(0.95rem, 2.1vw, 1.28rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--text-3);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  row-gap: 6px;
}
.dash-brand-footer__legal a {
  color: var(--text-2);
  text-decoration: none;
  transition: color var(--transition);
}
.dash-brand-footer__legal a:hover {
  color: var(--text);
  text-decoration: underline;
}
.dash-brand-footer__copy,
.dash-brand-footer__attribution {
  color: var(--text-3);
}
.dash-brand-footer__sep {
  color: var(--border-light);
  user-select: none;
}
.dash-brand-footer__social {
  display: flex;
  align-items: center;
  gap: 10px;
}
.dash-brand-footer__social-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--elevated);
  border: 1px solid var(--border);
  color: var(--text);
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform 0.12s ease;
}
.dash-brand-footer__social-btn:hover {
  background: var(--purple-dim);
  border-color: var(--border-light);
  color: var(--purple-hover);
  transform: translateY(-1px);
}
.dash-body--light .dash-brand-footer {
  box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.06);
}
.dash-body--light .dash-brand-footer__social-btn:hover {
  color: var(--text);
  border-color: var(--purple-mid);
}
@media (max-width: 720px) {
  .dash-brand-footer {
    padding: 0 18px;
  }

  /* On small screens, sidebar should behave normally (not sticky) */
  .dash-sidebar {
    position: static;
    height: auto;
    overflow: auto;
    width: 100%;
  }
  .dash-brand-footer__showcase-divider {
    display: none;
  }
  .dash-brand-footer__showcase {
    flex-direction: column;
    align-items: flex-start;
  }
  .dash-brand-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Compact simple footer used on dashboard */

/* Dashboard v2 footer — handwritten accent (Caveat) + dark band */
.dash-footer-v2 {
  --footer-hand: "Caveat", cursive;
  background: var(--bg, #0c0e14);
  color: var(--text, #f4f4f5);
  border-top: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  font-family: var(--footer-hand);
}
.dash-footer-v2__sponsors-band {
  padding: 18px 24px;
}
.dash-footer-v2__label {
  font-family: var(--footer-hand);
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--text-3, #9aa3b2);
  text-align: center;
  margin-bottom: 12px;
}
.dash-footer-v2__sponsors-row {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
}
.dash-footer-v2__logos {
  display: flex;
  gap: 28px;
  justify-content: center;
  flex: 1;
  flex-wrap: wrap;
  align-items: center;
}
.dash-footer-v2__partner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.dash-footer-v2__partner-mark {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 10px;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.dash-footer-v2__partner-name {
  font-family: var(--footer-hand);
  font-size: clamp(1.28rem, 2.8vw, 1.65rem);
  font-weight: 700;
  color: var(--text, #f4f4f5);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.dash-footer-v2__cta-wrap { flex: 0 0 auto; }
.dash-footer-v2__cta {
  font-family: var(--footer-hand);
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: none;
  color: var(--purple, #a78bfa);
  text-decoration: none;
}
.dash-footer-v2__cta:hover {
  color: color-mix(in srgb, var(--purple, #a78bfa) 88%, white);
  text-decoration: underline;
}
.dash-footer-v2__divider {
  height: 1px;
  background: var(--border, rgba(255, 255, 255, 0.08));
}
.dash-footer-v2__legal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 24px;
}
.dash-footer-v2__legal-center {
  flex: 1;
  text-align: center;
  font-family: var(--footer-hand);
  font-size: clamp(1rem, 2.3vw, 1.35rem);
  font-weight: 500;
  color: var(--text-2, #b8c0cc);
  letter-spacing: 0.02em;
}
.dash-footer-v2__legal-center a {
  color: var(--text-2, #b8c0cc);
  text-decoration: none;
  margin: 0 8px;
}
.dash-footer-v2__legal-center a:hover {
  text-decoration: underline;
  color: var(--text, #f4f4f5);
}
.dash-footer-v2__by,
.dash-footer-v2__copy-year {
  color: var(--text-2, #b8c0cc);
}
.dash-footer-v2__dot {
  color: var(--text-3, #6b7280);
  margin: 0 2px;
}
.dash-footer-v2__social { display:flex; gap:10px; align-items:center; flex-shrink: 0; }
.dash-footer-v2__social-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text, #f4f4f5);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.dash-footer-v2__social-btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}
.dash-footer-v2__social-btn:focus-visible {
  outline: 2px solid var(--purple, #a78bfa);
  outline-offset: 2px;
}

@media (max-width:720px) {
  .dash-footer-v2__sponsors-row { flex-direction: column; align-items: center }
  .dash-footer-v2__cta-wrap { margin-top: 10px }
  .dash-footer-v2__logos { gap: 14px }
  .dash-footer-v2__partner-mark { width: 40px; height: 40px }
  .dash-footer-v2__partner-name { font-size: 1.2rem }
  .dash-footer-v2__legal-center { font-size: 1rem; line-height: 1.5 }
}

.dash-body--light .dash-footer-v2 {
  background: var(--surface);
  color: var(--text);
  border-top-color: var(--border);
}
.dash-body--light .dash-footer-v2__label {
  color: var(--text-3);
}
.dash-body--light .dash-footer-v2__partner-mark {
  background: rgba(0, 0, 0, 0.04);
  border-color: var(--border);
}
.dash-body--light .dash-footer-v2__partner-name {
  color: var(--text);
}
.dash-body--light .dash-footer-v2__legal-center,
.dash-body--light .dash-footer-v2__legal-center a,
.dash-body--light .dash-footer-v2__by,
.dash-body--light .dash-footer-v2__copy-year {
  color: var(--text-2);
}
.dash-body--light .dash-footer-v2__legal-center a:hover {
  color: var(--text);
}
.dash-body--light .dash-footer-v2__social-btn {
  background: rgba(0, 0, 0, 0.06);
  border-color: var(--border);
  color: var(--text);
}

.dash-footer-simple {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 10px 18px;
}
.dash-footer-simple__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1200px;
  margin: 0 auto;
  font-size: 0.82rem;
  color: var(--text-3);
}
.dash-footer-simple__sponsors { flex: 1; display:flex; justify-content:center }
.dash-footer-simple__legal { flex: 1; display:flex; justify-content:flex-end }
.dash-footer-simple__title {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}
.dash-footer-simple__list { color: var(--text-2); margin-left:10px }
.dash-footer-simple__brand-logos {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 6px;
}
.dash-footer-simple__brand-lockup {
  display: flex;
  align-items: center;
  gap: 18px;
  background: #ffffff;
  padding: 10px 18px;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}
.dash-footer-simple__brand-logo {
  height: 64px;
  width: auto;
  max-width: 320px;
  object-fit: contain;
  display: block;
}
.dash-footer-simple__cta {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  background: transparent;
  padding: 6px 10px;
}
.dash-footer-simple__legal { display:flex; align-items:center; gap:8px }
.dash-footer-simple__legal a { color: var(--text-2); text-decoration:none }
.dash-footer-simple__legal a:hover { color: var(--text); text-decoration:underline }
.dash-footer-simple__sep { color: var(--border-light) }
@media (max-width:720px) {
  .dash-footer-simple__inner { flex-direction: column; align-items: flex-start; gap:6px }
  .dash-footer-simple__brand-logos { gap: 12px }
  .dash-footer-simple__brand-lockup { padding: 8px 12px }
  .dash-footer-simple__brand-logo { height: 48px }
}

.dash-view { display: none; }
.dash-view.active { display: block; }

.dash-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
}
.dash-page-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 4px;
}
.dash-page-header p { font-size: 0.92rem; color: var(--text-2); line-height: 1.55; }

/* ── Stats row ────────────────────────────── */
.dash-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 20px;
  margin-bottom: 36px;
}

.dash-stat-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 14px 12px;
  overflow: hidden;
  box-shadow: none;
  transition: border-color var(--transition);
}
.dash-stat-card::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--purple);
  opacity: 0.35;
  pointer-events: none;
}
.dash-stat-card:hover {
  border-color: var(--border-light);
  transform: none;
  box-shadow: none;
}

.dash-stat-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.dash-stat-label svg { opacity: 0.6; }

.dash-stat-num {
  font-family: var(--heading-font);
  font-size: 1.72rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 6px;
}

.dash-stat-sub {
  font-size: 0.78rem;
  color: var(--text-3);
}
.dash-stat-sub .up   { color: var(--green); }
.dash-stat-sub .down { color: var(--red); }

/* ── Two-column grid ──────────────────────── */
.dash-two-col {
  display: grid;
  grid-template-columns: 1fr minmax(252px, 300px);
  gap: 28px;
  align-items: start;
}

/* Home overview: vertical stack in the right column */
.dash-home-side-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ── Section card ─────────────────────────── */
.dash-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: none;
  transition: border-color var(--transition);
}
.dash-card:hover {
  border-color: var(--border-light);
  box-shadow: none;
  transform: none;
}

.dash-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.dash-card-header h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}
.dash-card-header a, .dash-card-header button.link {
  font-size: 0.8rem;
  color: var(--purple-light);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--transition);
}
.dash-card-header a:hover, .dash-card-header button.link:hover { color: var(--text); }

/* ── Prompt table ─────────────────────────── */
.dash-table { width: 100%; border-collapse: collapse; }
.dash-table th {
  font-family: var(--mono);
  font-size: 0.67rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  padding: 10px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.dash-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.855rem;
  vertical-align: middle;
}
.dash-table tr:last-child td { border-bottom: none; }
.dash-table tbody tr { cursor: pointer; transition: background var(--transition); }
.dash-table tbody tr:hover { background: rgba(255,255,255,0.025); }

.dash-prompt-name {
  display: flex;
  align-items: center;
  gap: 10px;
}
.dash-prompt-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--purple-dim);
  display: flex; align-items: center; justify-content: center;
  color: var(--purple-light);
  flex-shrink: 0;
}
.dash-prompt-title { font-weight: 600; color: var(--text); }
.dash-prompt-desc  { font-size: 0.76rem; color: var(--text-3); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }

.dash-model-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--mono);
  font-size: 0.63rem;
  color: var(--text-3);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px;
  padding: 2px 7px;
  letter-spacing: 0.01em;
}

.dash-actions-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 220px;
}
.dash-icon-btn {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--elevated);
  color: var(--text-3);
  cursor: pointer;
  transition: var(--transition);
}
.dash-icon-btn:hover { color: var(--text); border-color: var(--border-light); }
.dash-icon-btn.danger:hover { color: var(--red); border-color: rgba(248,81,73,0.3); background: rgba(248,81,73,0.08); }

/* ── Activity feed ────────────────────────── */
.dash-activity { padding: 0; }
.dash-activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.dash-activity-item:last-child { border-bottom: none; }
.dash-activity-item:hover { background: rgba(255,255,255,0.02); }

.dash-activity-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}
.dot-green  { background: var(--green); box-shadow: 0 0 6px rgba(63,185,80,0.5); }
.dot-purple { background: var(--purple-light); box-shadow: 0 0 8px rgba(255, 255, 255, 0.22); }
.dot-cyan   { background: var(--cyan); box-shadow: 0 0 6px rgba(6,182,212,0.4); }
.dot-orange { background: var(--orange); box-shadow: 0 0 6px rgba(240,136,62,0.4); }

.dash-activity-body { flex: 1; min-width: 0; }
.dash-activity-text { font-size: 0.8rem; color: var(--text-2); line-height: 1.55; }
.dash-activity-text strong { color: var(--text); font-weight: 500; }
.dash-activity-time { font-family: var(--mono); font-size: 0.68rem; color: var(--text-3); margin-top: 2px; }

/* ── Quick actions ────────────────────────── */
.dash-quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px;
}
.dash-quick-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--elevated);
  color: var(--text-2);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 500;
  font-family: var(--font);
  transition: var(--transition);
  text-align: left;
  text-decoration: none;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.18);
}
.dash-quick-btn svg { color: var(--purple-light); flex-shrink: 0; }
.dash-quick-btn:hover { background: var(--purple-dim); color: var(--text); border-color: color-mix(in srgb, var(--purple) 32%, transparent); box-shadow: none; }

/* ── Collections bar ──────────────────────────────────────────────────────── */
.collections-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.collection-pill {
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--elevated);
  color: var(--text-3);
  cursor: pointer;
  transition: var(--transition);
}
.collection-pill:hover { border-color: var(--border-light); color: var(--text-2); }
.collection-pill--active { background: var(--purple-dim); border-color: var(--purple-mid); color: var(--text); }
.collection-pill--new { border-style: dashed; color: var(--text-3); }
.collection-pill--new:hover { color: var(--text); }

/* ── Toolbar / filter bar ─────────────────── */
.dash-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.dash-filter-tabs {
  display: flex;
  gap: 2px;
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px;
}
.dash-filter-tab {
  padding: 5px 14px;
  border-radius: 5px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-3);
  cursor: pointer;
  transition: var(--transition);
  border: none;
  background: none;
  font-family: var(--font);
}
.dash-filter-tab:hover { color: var(--text-2); }
.dash-filter-tab.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,0.3); }

.dash-toolbar-search {
  flex: 1;
  max-width: 280px;
  position: relative;
}
.dash-toolbar-search svg {
  position: absolute; left: 10px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-3); pointer-events: none;
}
.dash-toolbar-search input {
  width: 100%;
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 12px 7px 32px;
  color: var(--text);
  font-size: 0.84rem;
  font-family: var(--font);
  outline: none;
  transition: var(--transition);
}
.dash-toolbar-search input::placeholder { color: var(--text-3); }
.dash-toolbar-search input:focus { border-color: var(--purple); }

.dash-toolbar-spacer { flex: 1; }

.dash-toolbar-search--grow {
  flex: 1.25;
  max-width: min(560px, 100%);
}

.dash-select {
  background-color: var(--elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 34px 7px 12px;
  color: var(--text-2);
  font-size: 0.82rem;
  font-family: var(--font);
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1.5L5 4.5L9 1.5' fill='none' stroke='%238b949e' stroke-width='1.25' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 10px 6px;
}
.dash-select::-ms-expand {
  display: none;
}
.dash-select:focus { border-color: var(--purple); }

/* ── Empty state ──────────────────────────── */
.dash-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
  text-align: center;
}
.dash-empty-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius);
  background: var(--elevated);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3);
  margin-bottom: 18px;
}
.dash-empty h4 { font-size: 1rem; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.dash-empty p  { font-size: 0.875rem; color: var(--text-2); max-width: 320px; margin-bottom: 22px; line-height: 1.7; }

/* Home empty state: smaller copy, less chunky block, room comes from table cell padding */
.dash-empty--home {
  padding: 36px 28px;
}
.dash-empty--home .dash-empty-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
}
.dash-empty--home .dash-empty-icon svg {
  width: 20px;
  height: 20px;
}
.dash-empty--home h4 {
  font-size: 0.92rem;
  margin-bottom: 6px;
}
.dash-empty--home p {
  font-size: 0.8125rem;
  max-width: 300px;
  margin-bottom: 18px;
  line-height: 1.6;
}
.dash-empty--home .btn-primary {
  font-size: 0.8125rem;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
}

/* Home: smaller section titles, more air between major blocks */
#view-overview .dash-card-header h3 {
  font-size: 0.82rem;
}

/* ── Discover catalog ─────────────────────── */
#view-discover {
  position: relative;
  max-width: min(1320px, 100%);
  margin-inline: auto;
  padding-inline: clamp(12px, 2.5vw, 28px);
  box-sizing: border-box;
}

/* Full-width split when 3-panel catalog is present */
#view-discover:has(.dsc-layout) {
  max-width: none;
  margin-inline: 0;
  padding-inline: 0;
}

#view-starred {
  max-width: min(1320px, 100%);
  margin-inline: auto;
  padding-inline: clamp(12px, 2.5vw, 28px);
  box-sizing: border-box;
}
/* Catalog header — table-style: float on page background, no framed hero card */
#view-discover .dash-page-header {
  margin-bottom: 22px;
}
#view-discover .dash-page-header p {
  max-width: 52rem;
  line-height: 1.65;
}
.discover-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 11px;
  background: var(--bg);
}
.discover-badge--accent {
  color: var(--green);
  border-color: rgba(46, 160, 67, 0.45);
  background: rgba(46, 160, 67, 0.08);
}

.discover-filters {
  margin-bottom: 24px;
  padding: 0 0 18px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  box-shadow: none;
}
.discover-filters-top {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.discover-search {
  flex: 1;
  min-width: 200px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  min-height: 38px;
}
.discover-search svg {
  flex-shrink: 0;
  color: var(--text-3);
}
.discover-search input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 0.86rem;
  padding: 8px 4px 8px 0;
  outline: none;
  font-family: var(--font);
}
.discover-search input::placeholder {
  color: var(--text-3);
}
.discover-search:focus-within {
  border-color: var(--purple);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--purple) 35%, transparent);
}
.discover-clear {
  flex-shrink: 0;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--elevated);
  color: var(--text-2);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.discover-clear:hover {
  color: var(--text);
  border-color: var(--border-light);
  background: var(--surface);
}
.discover-filters-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: center;
}
.discover-select {
  width: 100%;
  min-width: 0;
  max-width: none;
  padding: 8px 36px 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color-scheme: dark;
  background-color: rgba(0, 0, 0, 0.82);
  color: var(--text);
  font-size: 0.8rem;
  font-family: var(--font);
  cursor: pointer;
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1.5L5 4.5L9 1.5' fill='none' stroke='%238b949e' stroke-width='1.25' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 10px 6px;
  transition: border-color var(--transition);
}
.discover-select::-ms-expand {
  display: none;
}
.discover-select:hover,
.discover-select:focus {
  border-color: color-mix(in srgb, var(--purple) 45%, #ffffff 18%);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--purple) 28%, transparent);
}

.discover-select option {
  background-color: var(--surface);
  color: var(--text);
}
.discover-filters-row input.discover-select[type="search"] {
  cursor: text;
  padding-right: 14px;
  background-image: none;
}
.discover-result-line {
  margin: 12px 0 0;
  font-size: 0.78rem;
  color: var(--text-3);
}

.discover-section {
  margin-bottom: 28px;
}
.discover-section--tight {
  margin-bottom: 0;
}
.discover-section-title {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 0 0 12px;
}

.discover-section-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin: 0 0 14px;
}
.discover-section-row .discover-section-title { margin: 0; }

.discover-type-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  padding: 5px;
}
.discover-type-chip {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(220, 226, 244, 0.78);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  white-space: nowrap;
}
.discover-type-chip:hover {
  background: rgba(255, 255, 255, 0.04);
  color: rgba(236, 241, 255, 0.96);
  border-color: rgba(255, 255, 255, 0.08);
}
.discover-type-chip.is-active {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
@media (max-width: 640px) {
  .discover-section-row { flex-direction: column; align-items: flex-start; }
  .discover-type-chips { width: 100%; overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .discover-type-chip { font-size: 0.68rem; padding: 6px 10px; }
}

@media (max-width: 1400px) {
  .discover-filters-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .discover-filters-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .discover-filters-row { grid-template-columns: 1fr; }
}

.discover-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 22px);
  margin-top: 0;
}

.discover-card {
  background: #0c0d14;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  box-shadow: 0 1px 2px rgba(0,0,0,0.5), 0 4px 18px rgba(0,0,0,0.3);
}
.discover-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(90deg,
    transparent 0%,
    hsl(var(--p-hue,262) 78% 64% / 0.9) 30%,
    hsl(calc(var(--p-hue,262) + 38) 72% 62% / 0.75) 68%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 2;
}
.discover-card:hover {
  border-color: rgba(255,255,255,0.13);
  box-shadow: 0 2px 6px rgba(0,0,0,0.55), 0 12px 36px rgba(0,0,0,0.38), 0 0 0 1px hsl(var(--p-hue,262) 72% 58% / 0.12);
  transform: translateY(-3px);
}

.discover-card--studio {
  position: relative;
  border-color: rgba(255,255,255,0.1);
}
.discover-card--studio::before {
  content: '';
  position: absolute;
  inset: 14px auto 14px 0;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    hsl(calc(var(--p-hue,262) + 22) 82% 66%),
    hsl(var(--p-hue,262) 85% 60%),
    hsl(calc(var(--p-hue,262) - 22) 78% 58%)
  );
  opacity: 0.9;
  pointer-events: none;
  z-index: 3;
}
.discover-card--studio .discover-card-body {
  position: relative;
  z-index: 1;
}

.discover-card-expando {
  margin: 10px 14px 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(135deg, hsla(var(--p-hue, 262), 88%, 62%, 0.12), rgba(8, 10, 18, 0.72)),
    rgba(6, 8, 14, 0.55);
  overflow: hidden;
}
.discover-card-expando > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(236, 241, 255, 0.92);
}
.discover-card-expando > summary::-webkit-details-marker {
  display: none;
}
.discover-card-expando-title {
  font-weight: 700;
}
.discover-card-expando-tag {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid hsla(var(--p-hue, 262), 88%, 62%, 0.45);
  background: hsla(var(--p-hue, 262), 72%, 52%, 0.16);
  color: #f6f7ff;
  max-width: 52%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.discover-card-expando-body {
  padding: 0 12px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.discover-card-expando-lead {
  margin: 10px 0 8px;
  font-size: 0.8rem;
  line-height: 1.55;
  color: rgba(224, 232, 250, 0.86);
}
.discover-card-expando-pre {
  margin: 0 0 8px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(3, 5, 12, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(214, 222, 245, 0.92);
  font-family: var(--mono);
  font-size: 0.68rem;
  line-height: 1.45;
  white-space: pre-wrap;
  max-height: 220px;
  overflow: auto;
}
.discover-card-expando-cta {
  font-size: 0.72rem;
  color: rgba(186, 198, 230, 0.82);
}

.drawer-studio-mount {
  margin: 0 0 14px;
}
.drawer-studio-shell {
  --studio-hue: 262;
  border-radius: 14px;
  padding: 2px;
  background:
    linear-gradient(135deg, hsla(var(--studio-hue), 88%, 62%, 0.55), hsla(calc(var(--studio-hue) + 64), 90%, 62%, 0.35), rgba(255, 255, 255, 0.06));
  box-shadow: 0 18px 46px rgba(2, 4, 10, 0.45);
}
.drawer-studio-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 12px;
  border-radius: 12px 12px 0 0;
  background:
    radial-gradient(120% 120% at 90% 0%, hsla(var(--studio-hue), 88%, 62%, 0.22), transparent 55%),
    rgba(6, 8, 14, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.drawer-studio-kicker {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(186, 198, 230, 0.78);
  margin-bottom: 6px;
}
.drawer-studio-title {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: #f6f7ff;
  line-height: 1.25;
}
.drawer-studio-sub {
  margin-top: 6px;
  font-size: 0.78rem;
  color: rgba(214, 222, 245, 0.86);
}
.drawer-studio-hero-pill {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background:
    conic-gradient(from 210deg, hsl(var(--studio-hue) 90% 62%), hsl(calc(var(--studio-hue) + 70) 85% 60%), hsl(var(--studio-hue) 35% 16%));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 30px hsla(var(--studio-hue), 88%, 62%, 0.22);
}
.drawer-studio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
  padding: 10px;
  border-radius: 0 0 12px 12px;
  background: rgba(5, 7, 12, 0.92);
}
.drawer-studio-card {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 10, 18, 0.72);
  overflow: hidden;
}
.drawer-studio-card--main {
  border-color: hsla(var(--studio-hue), 88%, 62%, 0.35);
  box-shadow: 0 0 0 1px hsla(var(--studio-hue), 88%, 62%, 0.08) inset;
}
.drawer-studio-card--viz {
  border-color: hsla(calc(var(--studio-hue) + 40), 90%, 62%, 0.32);
}
.drawer-studio-card--controls {
  border-color: hsla(calc(var(--studio-hue) + 120), 85%, 62%, 0.28);
}
.drawer-studio-card--audience {
  border-color: hsla(calc(var(--studio-hue) + 200), 85%, 62%, 0.28);
}
.drawer-studio-card-summary {
  cursor: pointer;
  list-style: none;
  padding: 10px 12px;
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(236, 241, 255, 0.92);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05), transparent);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.drawer-studio-card-summary::-webkit-details-marker {
  display: none;
}
.drawer-studio-card-body {
  padding: 10px 12px 12px;
}
.drawer-studio-prose {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.65;
  color: rgba(224, 232, 250, 0.9);
}
.drawer-studio-prose--tight {
  font-size: 0.8rem;
}
.drawer-studio-pre {
  margin: 0;
  padding: 10px;
  border-radius: 10px;
  background: rgba(3, 5, 12, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(214, 222, 245, 0.92);
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.45;
  white-space: pre-wrap;
  max-height: 320px;
  overflow: auto;
}
.drawer-studio-pre--ascii {
  color: rgba(186, 245, 226, 0.9);
}
.drawer-studio-list {
  margin: 0;
  padding-left: 18px;
  color: rgba(224, 232, 250, 0.9);
  font-size: 0.8rem;
  line-height: 1.55;
}
.drawer-studio-list li {
  margin: 4px 0;
}
.drawer-studio-muted {
  font-size: 0.78rem;
  color: rgba(186, 198, 230, 0.65);
}

.discover-empty {
  padding: 28px 16px;
  text-align: center;
  font-size: 0.84rem;
  color: var(--text-3);
}
.discover-empty--grid {
  grid-column: 1 / -1;
}

.discover-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.discover-card-name {
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.discover-card-author {
  font-size: 0.73rem;
  color: var(--text-3);
  margin-top: 2px;
}
.discover-card-desc {
  font-size: 0.82rem;
  color: var(--text-2);
  line-height: 1.6;
  flex: 1;
}
.discover-card-taxonomy {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  margin-top: 2px;
}
.discover-card-cat {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: hsl(var(--p-hue,262) 78% 72%);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid hsl(var(--p-hue,262) 72% 60% / 0.28);
  background: hsl(var(--p-hue,262) 72% 58% / 0.1);
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.discover-card-topic {
  font-size: 0.65rem;
  color: var(--text-3);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.04);
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.discover-card-footer {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: 2px;
}
.discover-card-models {
  display: flex; gap: 5px; flex-wrap: wrap;
}
.discover-card-stats {
  display: flex; align-items: center; gap: 12px;
}
.discover-stat {
  display: flex; align-items: center; gap: 4px;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-3);
}
.star-btn {
  display: flex; align-items: center; gap: 4px;
  background: none; border: none; cursor: pointer;
  font-family: var(--mono); font-size: 0.7rem;
  color: var(--text-3); padding: 0;
  transition: color var(--transition);
}
.star-btn:hover { color: var(--orange); }
.star-btn.starred { color: var(--orange); }

.discover-grid--featured {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.discover-card-preview {
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(160deg, hsl(var(--p-hue,262) 60% 14% / 0.35) 0%, rgba(0,0,0,0.88) 55%),
    rgba(6,7,14,0.92);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.discover-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.02) 58%),
    rgba(255, 255, 255, 0.015);
}
.discover-preview-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 99px;
  padding: 3px 10px 3px 6px;
}
.discover-preview-pill--ghost {
  color: rgba(250, 250, 250, 0.78);
}
.discover-preview-meta {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.discover-card-demo-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(63, 185, 80, 0.7);
}
.discover-preview-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #050505;
  cursor: zoom-in;
}
.discover-preview-frame--splash {
  background: radial-gradient(circle at 52% 45%, rgba(255, 255, 255, 0.08) 0%, rgba(0, 0, 0, 0.95) 70%);
}
.discover-preview-frame--metaballs {
  background:
    radial-gradient(90% 80% at 50% 40%, rgba(36, 33, 66, 0.45) 0%, rgba(9, 10, 18, 0.92) 75%),
    #0a0a0a;
}
.discover-preview-frame--blob {
  background:
    radial-gradient(90% 80% at 50% 42%, rgba(32, 28, 74, 0.42) 0%, rgba(9, 10, 18, 0.94) 74%),
    #0a0a0a;
}
.discover-preview-frame--spark {
  background:
    radial-gradient(90% 80% at 52% 44%, rgba(41, 34, 78, 0.46) 0%, rgba(7, 9, 16, 0.95) 72%),
    #0a0a0a;
}
.discover-preview-frame--star {
  background:
    radial-gradient(90% 80% at 52% 44%, rgba(52, 45, 88, 0.4) 0%, rgba(8, 10, 18, 0.95) 72%),
    #0a0a0a;
}
.discover-preview-frame--liquid {
  background:
    radial-gradient(95% 86% at 52% 44%, rgba(47, 57, 110, 0.36) 0%, rgba(8, 10, 18, 0.96) 74%),
    #0a0a0a;
}
.discover-preview-frame--light-rays {
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(245, 247, 255, 0.16) 0%, rgba(6, 8, 16, 0.95) 70%),
    #04060d;
}
.discover-preview-frame--waves {
  background: #000;
}
.discover-preview-frame--truefocus {
  background: #121218;
}
.discover-preview-frame--ascii-text {
  background: #0a0a0e;
}
.discover-preview-frame--scroll-velocity {
  background: #0c0c0f;
}
.discover-preview-frame--electric-border {
  background:
    radial-gradient(88% 74% at 50% 36%, rgba(60, 110, 130, 0.38) 0%, rgba(5, 8, 12, 0.96) 72%),
    #060a10;
  overflow: visible;
}
.discover-preview-frame--orbit-images {
  background:
    radial-gradient(95% 90% at 50% 26%, rgba(130, 118, 195, 0.45) 0%, rgba(12, 14, 24, 0.94) 55%, rgba(8, 9, 14, 0.98) 100%),
    #12141f;
}
.discover-preview-frame--logo-loop {
  background:
    radial-gradient(92% 88% at 50% 50%, rgba(120, 100, 200, 0.22) 0%, rgba(8, 9, 14, 0.97) 72%),
    #0a0b10;
}
.discover-preview-frame--target-cursor {
  background:
    radial-gradient(95% 90% at 50% 38%, rgba(120, 80, 200, 0.28) 0%, rgba(10, 6, 20, 0.96) 65%),
    #0a0614;
}
.discover-preview-frame--magic-rings {
  background:
    radial-gradient(92% 88% at 50% 48%, rgba(120, 70, 200, 0.32) 0%, rgba(8, 6, 14, 0.96) 68%),
    #08060f;
}
.discover-preview-frame--antigravity {
  background:
    radial-gradient(92% 88% at 50% 42%, rgba(98, 62, 220, 0.35) 0%, rgba(5, 5, 10, 0.96) 70%),
    #050508;
}
.discover-preview-frame--dither {
  background: radial-gradient(100% 100% at 50% 50%, rgba(40, 40, 44, 0.95) 0%, #020202 88%);
}
.discover-preview-frame--galaxy {
  background: radial-gradient(100% 100% at 50% 40%, rgba(18, 24, 44, 0.9) 0%, #05060c 85%);
}
.discover-preview-frame--evil-eye {
  background:
    radial-gradient(80% 60% at 50% 50%, rgba(255, 110, 50, 0.18) 0%, rgba(2, 2, 4, 0.98) 70%),
    #000;
}
.discover-preview-frame--soft-aurora {
  background:
    radial-gradient(120% 80% at 50% 60%, rgba(225, 0, 255, 0.18) 0%, rgba(8, 6, 16, 0.98) 70%),
    #08060f;
}
.discover-preview-frame--letter-glitch {
  background:
    radial-gradient(120% 80% at 50% 50%, rgba(97, 220, 163, 0.12) 0%, rgba(0, 0, 0, 0.98) 70%),
    #000;
}
.dsc-anim-sub-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.dsc-anim-sub-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.42rem 0.55rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-2);
  font-size: 0.72rem;
  cursor: pointer;
  text-align: left;
}
.dsc-anim-sub-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}
.dsc-anim-sub-item--active {
  background: rgba(102, 126, 234, 0.18);
  color: var(--text);
  font-weight: 600;
}
.dsc-anim-sub-item-count {
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 0.65rem;
  opacity: 0.75;
}
.discover-preview-frame--css-anim-card {
  background: radial-gradient(110% 75% at 50% 40%, rgba(102, 126, 234, 0.14) 0%, #000 78%), #000;
}
.discover-preview-frame--paper-anim-card {
  background: radial-gradient(110% 75% at 50% 38%, rgba(210, 180, 120, 0.16) 0%, #0a0908 78%), #0a0908;
}
.prompt-media-frame--paper-anim-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}
.jnx-paper-anim-card-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100%;
  padding: 12px 8px;
}
.jnx-paper-anim-card-preview__stage {
  width: 100%;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  position: relative;
}
.jnx-paper-anim-card-preview__stage .jnx-paper-anim-stage {
  overflow: visible;
}
.prompt-media-frame--css-anim-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}
.jnx-css-anim-card-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100%;
  padding: 12px 8px;
}
.jnx-css-anim-card-preview__stage {
  width: 100%;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.discover-preview-frame--text-fx-card {
  background: radial-gradient(110% 75% at 50% 35%, rgba(34, 211, 238, 0.1) 0%, #000 75%), #000;
}
.discover-preview-frame--motion-effect {
  background:
    radial-gradient(105% 85% at 50% 38%, rgba(90, 130, 220, 0.22) 0%, rgba(6, 8, 18, 0.94) 68%),
    #050508;
}
.prompt-media-frame--motion-effect {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
}
.motion-effect-preview {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.motion-effect-preview canvas.motion-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}
.motion-effect-hint {
  pointer-events: none;
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  z-index: 2;
  font-size: 0.62rem;
  font-family: var(--mono, ui-monospace, monospace);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}
.discover-preview-frame--3d-blueprint {
  background:
    radial-gradient(105% 85% at 50% 40%, rgba(0, 200, 255, 0.12) 0%, rgba(6, 8, 18, 0.94) 68%),
    #050508;
  cursor: default;
  overscroll-behavior: contain;
}
.discover-preview-frame--3d-blueprint .discover-landing-card {
  cursor: default;
}
.prompt-media-frame--3d-blueprint {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
.jnx-3d-blueprint-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #020208;
  touch-action: pan-y;
}
.jnx-3d-blueprint-hint {
  pointer-events: none;
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.62rem;
  font-family: var(--mono, ui-monospace, monospace);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
  color: rgba(220, 245, 255, 0.95);
  background: linear-gradient(135deg, rgba(8, 14, 28, 0.88), rgba(4, 8, 18, 0.92));
  border: 1px solid rgba(94, 231, 255, 0.22);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45), 0 0 20px rgba(46, 196, 255, 0.12);
  animation: jnx-3d-hint-pulse 2.4s ease-in-out infinite;
}
.jnx-3d-blueprint-hint__icon {
  display: inline-block;
  font-size: 0.72rem;
  line-height: 1;
  color: #5ee7ff;
  animation: jnx-3d-hint-bob 1.6s ease-in-out infinite;
}
@keyframes jnx-3d-hint-pulse {
  0%, 100% { border-color: rgba(94, 231, 255, 0.18); box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45), 0 0 16px rgba(46, 196, 255, 0.08); }
  50% { border-color: rgba(94, 231, 255, 0.38); box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45), 0 0 24px rgba(46, 196, 255, 0.22); }
}
@keyframes jnx-3d-hint-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}
.discover-preview-frame--3d-blueprint:hover .jnx-3d-blueprint-hint {
  opacity: 0.55;
  transition: opacity 0.25s ease;
}
.prompt-media-frame--text-fx-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}
.jnx-text-fx-card-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100%;
  padding: 10px 8px;
  text-align: center;
}
.jnx-text-fx-card-preview__anim {
  min-height: 1em;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  font-size: clamp(2rem, 11vmin, 4.75rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.05;
}
.prompt-media-frame--text-fx-card .jnx-text-fx-card-preview__anim .jnx-tfx-line {
  font-size: inherit;
  letter-spacing: inherit;
  line-height: inherit;
}
.prompt-media-frame--text-fx-card .jnx-text-fx-card-preview__anim .jnx-tfx-glitch-wrap {
  font-size: inherit;
}
.discover-preview-frame--liquid-chrome {
  background:
    radial-gradient(120% 80% at 50% 50%, rgba(220, 220, 220, 0.12) 0%, rgba(5, 5, 5, 0.98) 70%),
    #050505;
}
.discover-preview-frame--balatro {
  background:
    radial-gradient(120% 80% at 50% 50%, rgba(222, 68, 59, 0.18) 0%, rgba(17, 7, 11, 0.98) 70%),
    #11070b;
}
.discover-preview-frame--orb {
  background:
    radial-gradient(120% 80% at 50% 50%, rgba(120, 80, 230, 0.20) 0%, rgba(5, 6, 16, 0.98) 70%),
    #050610;
}
.discover-preview-frame--dot-grid {
  background:
    radial-gradient(120% 80% at 50% 50%, rgba(82, 39, 255, 0.16) 0%, rgba(6, 5, 9, 0.98) 70%),
    #060509;
}
.discover-preview-frame--pixel-blast {
  background:
    radial-gradient(110% 86% at 50% 50%, rgba(180, 151, 207, 0.22) 0%, rgba(8, 10, 18, 0.96) 74%),
    #060814;
}
.discover-preview-frame--video {
  background: #05070d;
}
.discover-preview-frame--video video,
.discover-preview-frame--video .discover-live-media {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #05070d;
}
.discover-preview-frame .prompt-media-frame--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(120% 90% at 50% 50%, hsla(var(--p-hue, 240), 70%, 60%, 0.2) 0%, rgba(7, 9, 17, 0.95) 70%),
    #060814;
  color: rgba(236, 241, 255, 0.84);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 0;
}
.discover-preview-placeholder-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 18px 22px;
  text-align: center;
}
.discover-preview-placeholder-kicker {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.86);
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}
.discover-preview-placeholder-body {
  font-size: 0.82rem;
  color: rgba(218, 224, 244, 0.85);
  line-height: 1.5;
  max-width: 32ch;
}
.discover-preview-caption {
  margin: 0;
  padding: 10px 12px 12px;
  color: rgba(212, 220, 242, 0.88);
  font-size: 0.76rem;
  line-height: 1.46;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.discover-live {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.discover-live--media {
  background: #0b0f18;
}
.discover-live--media-multi {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: #0b0f18;
}
.discover-live-media--multi {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
}
.discover-live-media {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0b0f18;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  transform: translateZ(0);
  backface-visibility: hidden;
  filter: none;
}
.discover-live--studio {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  background:
    radial-gradient(130% 120% at 8% 0%, hsla(var(--p-hue, 260), 86%, 62%, 0.22) 0%, rgba(7, 10, 18, 0.94) 66%),
    linear-gradient(140deg, rgba(7, 10, 18, 0.97), rgba(12, 16, 28, 0.98));
  overflow: hidden;
}
.discover-live-studio-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, 0.06) 50%, transparent 100%),
    radial-gradient(90% 75% at 100% 100%, hsla(var(--p-hue, 260), 86%, 60%, 0.2) 0%, transparent 64%);
  opacity: 0.7;
}
.discover-live-hint {
  position: absolute;
  left: 12px;
  bottom: 12px;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(236, 241, 255, 0.92);
  background: rgba(6, 9, 16, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 5px 10px;
  pointer-events: none;
}
.discover-live--splash {
  background:
    radial-gradient(220px 136px at var(--mx, 45%) var(--my, 50%), rgba(173, 127, 255, 0.28) 0%, transparent 62%),
    radial-gradient(160px 96px at 22% 70%, rgba(37, 84, 255, 0.18) 0%, transparent 72%);
}
.discover-live-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* ── Catalogue: render landing-style previews 1:1 ─────────────────────── */
.discover-preview-frame { padding: 0; }
.discover-preview-frame .discover-landing-card {
  display: block;
  width: 100%;
  height: 100%;
  background: transparent;
  box-shadow: none;
  border: 0;
  border-radius: 0;
  cursor: default;
  position: relative;
  isolation: isolate;
}
.discover-preview-frame .discover-landing-card .prompt-media-frame {
  aspect-ratio: auto;
  width: 100%;
  height: 100%;
  position: relative;
}
.discover-preview-frame .discover-landing-card .prompt-splash-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0.95;
  pointer-events: none;
}
.discover-preview-frame .discover-landing-card .prompt-media-frame--splash .prompt-preview-hint,
.discover-preview-frame .discover-landing-card .prompt-media-frame .prompt-click-hint {
  z-index: 3;
}

/* Splash preview lays its canvas + hint full-bleed inside the dashboard slot,
   without a second header bar (the discover-card chassis already shows it). */
.discover-preview-frame .discover-landing-card.prompt-media-card--splash {
  position: relative;
  isolation: isolate;
}
.discover-preview-frame .discover-landing-card.prompt-media-card--splash .prompt-media-frame--splash {
  position: absolute;
  inset: 0;
  z-index: 2;
}
.discover-live--splash .discover-live-canvas {
  mix-blend-mode: screen;
  opacity: 0.96;
}

@media (max-width: 1100px) {
  .discover-grid:not(.public-works-grid) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .discover-grid:not(.public-works-grid) {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .discover-preview-meta { max-width: 42%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .discover-preview-caption { font-size: 0.72rem; }
}
.discover-live--blob .discover-blob {
  position: absolute;
  left: 0;
  top: 0;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: #1fc7ff;
  box-shadow: 0 8px 16px rgba(2, 60, 83, 0.45);
  transform: translate(38%, 52%);
}
.discover-live--blob .discover-blob.b2 {
  width: 74px;
  height: 74px;
  opacity: 0.65;
}
.discover-live--blob .discover-blob.b3 {
  width: 56px;
  height: 56px;
  opacity: 0.52;
}
.discover-preview-spark {
  position: absolute;
  width: 0;
  height: 0;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.discover-preview-spark::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 1.4px solid var(--spark-color, #a78bfa);
  box-shadow: 0 0 18px rgba(167, 139, 250, 0.45);
  transform: translate(-50%, -50%);
  animation: clickSparkRing 520ms cubic-bezier(0.2, 0.7, 0.15, 1) forwards;
}
.discover-preview-spark .ray {
  position: absolute;
  left: 0;
  top: 0;
  width: 2px;
  height: 11px;
  border-radius: 10px;
  background: linear-gradient(180deg, var(--spark-color, #a78bfa) 0%, rgba(255,255,255,0.1) 100%);
  transform: translate(-50%, -50%);
  animation: clickSparkRay 520ms cubic-bezier(0.2, 0.7, 0.15, 1) forwards;
}
.discover-card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  background: transparent;
}
.discover-card-title-block { min-width: 0; }
.discover-card-author-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 5px;
  font-size: 0.71rem;
  color: var(--text-3);
}
.discover-card-mini-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--heading-font);
  font-size: 0.55rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, hsl(var(--p-hue, 265), 55%, 48%), hsl(calc(var(--p-hue, 265) + 35), 60%, 42%));
}
.discover-card-mini-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: inherit;
}
.discover-card-mini-avatar--photo {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: transparent;
}
.discover-card-mini-avatar--logo {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 1px;
  color: transparent;
}
.discover-card-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
}
.discover-card-pass {
  font-family: var(--mono);
  font-size: 0.67rem;
  color: hsl(142 60% 52%);
  font-weight: 500;
  opacity: 0.85;
}
.discover-author-verified {
  width: 12px;
  height: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 2px;
  line-height: 0;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.45));
}
.discover-author-verified svg { width: 12px; height: 12px; display: block; }
.discover-author-verified .dav-burst { filter: drop-shadow(0 1px 1px rgba(0,0,0,0.35)); }
.discover-card-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 0;
}
.discover-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 30px;
  padding: 0 9px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.08);
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.discover-icon-btn:hover {
  color: var(--text);
  border-color: rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.05);
}
.discover-icon-btn.is-active {
  color: var(--text);
  border-color: rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08);
}
.discover-icon-btn--like.is-active {
  color: #fda4af;
  border-color: rgba(251, 113, 133, 0.45);
  background: rgba(251, 113, 133, 0.1);
}
.discover-icon-btn--star.is-active {
  color: var(--orange);
  border-color: rgba(251, 146, 60, 0.45);
  background: rgba(251, 146, 60, 0.1);
}
.discover-icon-btn--fav.is-active {
  color: #c4b5fd;
  border-color: rgba(167, 139, 250, 0.45);
  background: rgba(139, 92, 246, 0.12);
}
.discover-icon-btn-count {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-2);
  min-width: 1ch;
}
.discover-icon-btn--like .discover-icon-btn-count { color: inherit; opacity: 0.9; }
.discover-card-dev-link {
  margin-left: auto;
  font-family: var(--font);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--text-3);
  background: transparent;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 4px 10px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.discover-card-dev-link:hover {
  color: var(--text);
  border-color: rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.05);
}
.discover-gift-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin-left: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--elevated);
  color: var(--text-2);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.discover-gift-btn:hover {
  color: var(--text);
  border-color: var(--border-light);
}
.discover-card-actions .star-btn { margin-left: 0; }
.discover-card-actions .discover-gift-btn { margin-left: auto; }

.dash-creators-head { margin: 8px 0 12px; }
.dash-creators-title {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text);
}
.dash-creators-sub {
  font-size: 0.8rem;
  color: var(--text-3);
  margin-top: 5px;
  max-width: 720px;
  line-height: 1.55;
}
.dash-creators-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}
.dash-creator-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition);
}
.dash-creator-card:hover { border-color: var(--border-light); }
.dash-creator-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--heading-font);
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, hsl(var(--p-hue, 265), 55%, 50%), hsl(calc(var(--p-hue, 265) + 40), 55%, 45%));
}
.dash-creator-info { flex: 1; min-width: 0; }
.dash-creator-name {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
}
.dash-creator-stats { font-size: 0.68rem; color: var(--text-3); margin-top: 2px; }
.dash-creator-top { font-size: 0.7rem; color: var(--text-2); margin-top: 4px; }
.dash-creator-prompt { color: var(--purple-light); }
.dash-creator-tip { flex-shrink: 0; padding: 6px 12px !important; font-size: 0.76rem !important; }

/* Shared badges from styles.css — reviewed tint matches dashboard link accent */
.dash-body .badge-reviewed {
  background: var(--purple-dim);
  color: var(--purple-light);
  border: 1px solid color-mix(in srgb, var(--purple) 30%, transparent);
}

.drawer-community-band { margin-bottom: 4px; }
.drawer-media-strip {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background:
    radial-gradient(ellipse 60% 80% at 15% 30%, hsla(var(--p-hue, 265), 65%, 52%, 0.25), transparent 55%),
    var(--elevated);
  margin-bottom: 12px;
  overflow: hidden;
}
.drawer-media-inner {
  display: grid;
  grid-template-columns: minmax(200px, 260px) minmax(0, 1fr);
  align-items: stretch;
  gap: 12px;
  padding: 14px 16px;
}
.drawer-media-preview {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(circle at 20% 20%, hsla(var(--p-hue, 265), 65%, 55%, 0.22), transparent 55%),
    #090d17;
  min-height: 122px;
}
.drawer-media-preview img,
.drawer-media-preview video {
  width: 100%;
  height: 100%;
  min-height: 122px;
  object-fit: cover;
  display: block;
}
.drawer-media-preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  width: 100%;
  min-height: 122px;
}
.drawer-media-preview-grid img {
  min-height: 118px;
  object-fit: cover;
}
.drawer-media-preview-empty {
  width: 100%;
  min-height: 122px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  font-size: 0.76rem;
  color: var(--text-3);
  text-align: center;
}
.drawer-media-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.drawer-media-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  flex-shrink: 0;
  background: linear-gradient(135deg, hsla(var(--p-hue, 265), 60%, 55%, 0.35), rgba(6, 182, 212, 0.15));
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.drawer-media-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.drawer-media-caption {
  font-size: 0.78rem;
  color: var(--text-3);
  line-height: 1.55;
}
.drawer-media-tip {
  margin-top: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.76rem;
  color: var(--text-2);
  line-height: 1.5;
}
.drawer-creator-support {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-sm);
}
.drawer-creator-support-text {
  font-size: 0.8rem;
  color: var(--text-2);
  line-height: 1.55;
  max-width: 420px;
}
.drawer-creator-support-text strong {
  display: block;
  font-size: 0.84rem;
  color: var(--text);
  margin-bottom: 4px;
}
@media (max-width: 640px) {
  .drawer-media-inner {
    grid-template-columns: 1fr;
  }
}

.preview-lightbox-stage {
  position: relative;
  min-height: clamp(240px, 42vh, 420px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    radial-gradient(100% 80% at 50% 0%, rgba(255, 255, 255, 0.1) 0%, transparent 60%),
    rgba(9, 13, 22, 0.92);
  overflow: hidden;
  display: flex;
  align-items: stretch;
}
#previewLightboxOverlay {
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(1px);
  align-items: center;
  justify-content: center;
}
#previewLightboxOverlay .dash-modal {
  margin: 0 auto;
}
.preview-lightbox-modal {
  width: min(680px, 86vw);
  max-width: 680px;
  max-height: min(74vh, 620px);
  padding: 0;
  overflow: hidden;
}
.preview-lightbox-modal .dash-modal-body {
  padding: 12px;
}
.preview-lightbox-stage .discover-live,
.preview-lightbox-stage .prompt-media-card,
.preview-lightbox-stage .prompt-media-frame,
.preview-lightbox-stage .discover-live-media {
  width: 100%;
  height: 100%;
}
.preview-lightbox-stage .discover-live-media {
  object-fit: contain;
  background: rgba(8, 10, 18, 0.9);
}
.prompt-runner-signals {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.prompt-runner-signal {
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}
.prompt-runner-signal--green {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.08);
}
.prompt-runner-signal--red {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.08);
}
.prompt-runner-signal-title {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  margin-bottom: 8px;
}
.prompt-runner-signal--green .prompt-runner-signal-title { color: #86efac; }
.prompt-runner-signal--red .prompt-runner-signal-title { color: #fca5a5; }
.prompt-runner-signal-list {
  margin: 0;
  padding-left: 16px;
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--text-2);
}
@media (max-width: 760px) {
  .prompt-runner-signals {
    grid-template-columns: 1fr;
  }
  .preview-lightbox-modal {
    width: min(92vw, 560px);
    max-height: 72vh;
  }
  .preview-lightbox-stage {
    min-height: clamp(200px, 36vh, 320px);
  }
}

/* ── API Keys ─────────────────────────────── */
.dash-key-info {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(6,182,212,0.06);
  border: 1px solid rgba(6,182,212,0.18);
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
  font-size: 0.85rem;
  color: var(--text-2);
  line-height: 1.6;
}
.dash-key-info svg { color: var(--cyan); flex-shrink: 0; margin-top: 1px; }

.key-provider-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
}
.key-provider-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}
.key-provider-logo {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
}
.key-provider-logo.openai   { background: rgba(16,163,127,0.12); color: #10a37f; border: 1px solid rgba(16,163,127,0.2); }
.key-provider-logo.anthropic{ background: rgba(204,120,92,0.12); color: #cc785c; border: 1px solid rgba(204,120,92,0.2); }
.key-provider-logo.google   { background: rgba(66,133,244,0.12); color: #4285F4; border: 1px solid rgba(66,133,244,0.2); }

.key-provider-name  { font-weight: 600; font-size: 0.9rem; color: var(--text); }
.key-provider-desc  { font-size: 0.78rem; color: var(--text-3); margin-top: 1px; }
.key-status-dot     { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.key-status-dot.set { background: var(--green); box-shadow: 0 0 6px rgba(63,185,80,0.5); }
.key-status-dot.unset { background: var(--text-3); }
.key-status-label { font-family: var(--mono); font-size: 0.7rem; margin-right: 8px; }
.key-status-label.set { color: var(--green); }
.key-status-label.unset { color: var(--text-3); }

.key-provider-body {
  padding: 18px 22px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.key-input-wrap { flex: 1; position: relative; }
.key-input-wrap input {
  width: 100%;
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 36px 9px 12px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.82rem;
  outline: none;
  transition: var(--transition);
}
.key-input-wrap input::placeholder { color: var(--text-3); }
.key-input-wrap input:focus { border-color: var(--purple); }
.key-eye-btn {
  position: absolute; right: 10px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--text-3); transition: color var(--transition);
}
.key-eye-btn:hover { color: var(--text-2); }
.key-save-btn, .key-del-btn { flex-shrink: 0; }
.key-test-row {
  padding: 0 22px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.key-test-result {
  font-family: var(--mono);
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 4px;
}
.key-test-result.ok  { color: var(--green); background: var(--green-dim); }
.key-test-result.err { color: var(--red);   background: rgba(248,81,73,0.08); }

/* API keys view layout hardening */
.api-keys-view { width: 100%; }
.api-keys-view .dash-page-header { margin-bottom: 12px; }
.api-keys-view > .dash-card,
.api-keys-view > .key-provider-card,
.api-keys-view > .install-block,
.api-keys-view > div {
  margin-bottom: 12px;
}
.runtime-section {
  padding: 4px 2px;
}
.runtime-section-title {
  margin: 0 0 12px;
  font-size: 0.96rem;
  color: var(--text);
}
.api-keys-view .dash-card-header h3 {
  font-size: 0.92rem;
}
.api-keys-view .dash-card {
  border-radius: 10px;
}
.api-keys-view .api-card { width: 100%; }
.api-keys-view .key-provider-header {
  flex-wrap: wrap;
  row-gap: 10px;
}
.api-keys-view .key-provider-body {
  flex-wrap: wrap;
  row-gap: 10px;
}
.api-keys-view .runtime-profile-actions .btn {
  min-width: 120px;
}
.runtime-profile-btn.active {
  background: #ffffff !important;
  color: #111827 !important;
  border-color: #ffffff !important;
  font-weight: 700;
}
.runtime-profile-btn.active:hover {
  background: #f8fafc !important;
  color: #111827 !important;
}
.api-keys-view .runtime-quota-grid {
  grid-template-columns: repeat(4, minmax(140px, 1fr));
}
.api-keys-view .runtime-health-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.runtime-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255,255,255,.02);
}
.runtime-chip-label {
  font-size: .72rem;
  color: var(--text-3);
}
.runtime-chip-value {
  font-size: .78rem;
  color: var(--text);
  font-family: var(--mono);
}
.runtime-chip--good {
  border-color: rgba(34, 197, 94, 0.28);
  background: rgba(34, 197, 94, 0.08);
}
.runtime-chip--good .runtime-chip-value { color: #22c55e; }
.runtime-chip--warn {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.1);
}
.runtime-chip--warn .runtime-chip-value { color: #fbbf24; }
.runtime-chip--bad {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.1);
}
.runtime-chip--bad .runtime-chip-value { color: #ef4444; }
.runtime-chart-panel {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  background: rgba(255,255,255,.012);
}
.runtime-chart-panel--flat {
  background: transparent;
  border-color: rgba(255,255,255,.12);
}
.runtime-chart-title {
  font-size: .78rem;
  color: var(--text-3);
  margin-bottom: 8px;
}
.runtime-health-notes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}
.runtime-health-notes--stack {
  grid-template-columns: 1fr;
  gap: 8px;
}
.api-keys-view .runtime-analytics-grid {
  grid-template-columns: 1fr 1fr;
}
.api-keys-view .runtime-analytics-grid--clean {
  gap: 14px;
}
.api-keys-view #runtimeSourceBars div {
  min-width: 0;
}
.api-keys-view #runtimeSourceBars span {
  overflow-wrap: anywhere;
}
.api-keys-view .api-code-block pre {
  white-space: pre-wrap;
  word-break: break-word;
  padding-right: 80px;
}
.api-keys-view #runtimeUsageTable {
  overflow-x: auto;
}
.api-keys-view #runtimeUsageTable .dash-table {
  min-width: 560px;
}
.runtime-alert {
  font-size: .78rem;
  margin: 4px 0;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.runtime-alert--ok {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.2);
}
.runtime-alert--warning {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
}
.runtime-alert--critical {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.35);
}
.runtime-error-row {
  font-size: .78rem;
  color: var(--text-2);
  margin: 4px 0;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.08);
}
.runtime-error-code {
  color: #ef4444;
}
.runtime-error-count {
  color: #fbbf24;
  font-family: var(--mono);
}

@media (max-width: 980px) {
  .api-keys-view .runtime-analytics-grid {
    grid-template-columns: 1fr;
  }
  .runtime-health-notes {
    grid-template-columns: 1fr;
  }
  .api-keys-view .runtime-quota-grid {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }
}

@media (max-width: 640px) {
  .api-keys-view .dash-page-header p {
    max-width: 100%;
  }
  .api-keys-view .dash-key-info {
    padding: 12px;
    margin-bottom: 14px;
  }
  .api-keys-view .key-provider-header,
  .api-keys-view .key-provider-body,
  .api-keys-view .key-test-row {
    padding-left: 12px;
    padding-right: 12px;
  }
  .api-keys-view .runtime-profile-actions .btn,
  .api-keys-view .key-provider-body .btn {
    width: 100%;
    justify-content: center;
  }
  .api-keys-view .key-provider-body .dash-icon-btn {
    width: 36px;
    height: 36px;
  }
  .api-keys-view .runtime-quota-grid {
    grid-template-columns: 1fr;
  }
  .api-keys-view .runtime-health-chips {
    gap: 6px;
  }
  .runtime-section {
    padding-left: 0;
    padding-right: 0;
  }
  .runtime-chip {
    width: 100%;
    justify-content: space-between;
  }
  .api-keys-view .install-copy-btn {
    position: static;
    margin-top: 8px;
  }
  .api-keys-view .api-code-block pre {
    padding-right: 0;
  }
}

/* ── Settings page (account view) ─────────────────────────────────────────── */
.dash-view--settings {
  width: 100%;
  max-width: 100%;
}

.settings-view-shell {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 0 40px;
}

.settings-page-head {
  margin: 0 0 22px;
  max-width: none;
  width: 100%;
  padding: 20px 22px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(18, 20, 28, 0.98) 0%, rgba(12, 14, 20, 0.99) 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 16px 40px rgba(0, 0, 0, 0.28);
}

.settings-page-head-brand {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  min-width: 0;
}

.settings-page-head-logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: contain;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.settings-page-head-copy {
  min-width: 0;
  flex: 1;
}

.settings-page-eyebrow {
  margin: 0 0 8px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--text-3);
}
.settings-page-title {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--text);
  line-height: 1.2;
}
.settings-page-lede {
  margin: 0;
  max-width: 70ch;
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.6;
}

.settings-page--layout {
  max-width: none;
  width: 100%;
  padding-bottom: 0;
  margin: 0;
}

.settings-page-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  align-items: stretch;
}

.settings-page-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  width: 100%;
  align-items: start;
  min-width: 0;
}

.settings-page-columns.settings-page-columns--identity-only {
  max-width: 820px;
  margin-inline: auto;
}

.settings-page-columns.settings-page-columns--security-only {
  max-width: 720px;
  margin-inline: auto;
}

@media (min-width: 1100px) {
  .settings-page-columns {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
    gap: 20px 28px;
  }

  .settings-page-columns.settings-page-columns--identity-only {
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-page-columns.settings-page-columns--security-only {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 1099px) {
  .settings-page-columns.settings-page-columns--identity-only,
  .settings-page-columns.settings-page-columns--security-only {
    max-width: none;
    margin-inline: 0;
  }
}

.settings-page-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

/* Tab panels: [hidden] must win over display:flex from .settings-panel-stack / columns (otherwise all tabs look “open”). */
#settingsPanelGeneral[hidden],
#settingsPanelIdentity[hidden],
#settingsColumnPrimary[hidden],
#settingsColumnSecondary[hidden],
#settingsSecuritySection[hidden],
#settingsPlanSection[hidden],
#settingsDangerSection[hidden] {
  display: none !important;
}

.settings-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 0;
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 8px 28px rgba(0, 0, 0, 0.18);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.settings-section:hover {
  border-color: color-mix(in srgb, var(--border-light) 85%, var(--purple) 15%);
}

.settings-section--danger:hover {
  border-color: rgba(248, 81, 73, 0.35);
}

.settings-section-header {
  padding: 18px 22px 16px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,0.025) 0%, transparent 100%);
}

.settings-section-heading { margin: 0; }

.settings-section-title {
  margin: 0 0 5px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text);
}

.settings-section-desc {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-3);
  line-height: 1.5;
}

.settings-section-body {
  padding: 22px 22px 24px;
}

.settings-section--profile .settings-section-body {
  padding-top: 20px;
}

.settings-section--danger {
  border-color: rgba(248,81,73,0.22);
  background: linear-gradient(180deg, rgba(248,81,73,0.04) 0%, var(--surface) 48%);
}

.settings-section-header--danger {
  border-bottom-color: rgba(248,81,73,0.18);
  background: transparent;
}

.settings-section-header--danger .settings-section-title {
  color: var(--text);
}

/* Legacy alias (MFA modal, etc.) */
.settings-label { font-size: 0.875rem; font-weight: 500; color: var(--text); }
.settings-hint {
  font-size: 0.78rem;
  color: var(--text-3);
  margin-top: 4px;
  line-height: 1.45;
}

.settings-input {
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  color: var(--text);
  font-size: 0.875rem;
  font-family: var(--font);
  outline: none;
  width: 100%;
  max-width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.settings-input:hover:not([readonly]) { border-color: color-mix(in srgb, var(--border-light) 70%, var(--text-3)); }
.settings-input:focus {
  border-color: color-mix(in srgb, var(--purple) 55%, var(--border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--purple) 18%, transparent);
}
.settings-input[readonly],
.settings-input--muted {
  color: var(--text-2);
  cursor: default;
  background: rgba(255,255,255,0.02);
}
.settings-input--mono {
  font-family: var(--mono);
  font-size: 0.84rem;
}

.settings-textarea {
  width: 100%;
  min-height: 72px;
  resize: vertical;
  line-height: 1.45;
  padding: 10px 12px;
}

.settings-panel-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.settings-account-nav {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0;
  padding: 4px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.22);
}

.settings-account-nav--full {
  align-self: flex-start;
  max-width: 100%;
}

.settings-tab-summary {
  margin: 12px 0 18px;
  font-size: 0.78rem;
  color: var(--text-3);
  line-height: 1.45;
  max-width: 72ch;
}

.settings-account-nav__btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-2);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.settings-account-nav__btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.settings-account-nav__btn.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.settings-panel-identity {
  padding-top: 2px;
}

.settings-identity-float {
  max-width: 640px;
  padding: 0 2px 12px;
}

.settings-identity-float-eyebrow {
  margin: 0 0 8px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

.settings-identity-float-title {
  margin: 0 0 10px;
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.settings-identity-float-lede {
  margin: 0 0 22px;
  font-size: 0.82rem;
  color: var(--text-2);
  line-height: 1.55;
  max-width: 58ch;
}

.settings-id-preview-wrap {
  margin-top: 10px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.22);
  aspect-ratio: 4 / 3;
  max-height: 168px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.settings-id-preview-img {
  max-width: 100%;
  max-height: 168px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.settings-id-history {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.settings-id-history-title {
  margin: 0 0 6px;
  font-size: 0.84rem;
  font-weight: 650;
  color: var(--text);
}

.settings-id-history-lede {
  margin: 0 0 14px !important;
  max-width: 56ch;
}

.settings-id-history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.settings-id-history-item {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px 16px;
  font-size: 0.78rem;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-2);
}

.settings-id-history-status {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #c4b5fd;
}

.settings-id-history-empty {
  margin-top: 4px !important;
}

.settings-file-input {
  width: 100%;
  max-width: 100%;
  font-size: 0.78rem;
  color: var(--text-2);
}

.settings-id-verify-status {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.settings-id-badge {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.settings-id-badge--none {
  color: var(--text-3);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.settings-id-badge--pending {
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.45);
  background: rgba(251, 191, 36, 0.1);
}

.settings-id-badge--rejected {
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.45);
  background: rgba(248, 113, 113, 0.08);
}

.settings-id-badge--verified {
  color: #e9d5ff;
  border: 1px solid rgba(168, 85, 247, 0.55);
  background: linear-gradient(135deg, rgba(126, 34, 206, 0.38) 0%, rgba(91, 33, 182, 0.2) 100%);
  box-shadow: 0 0 20px rgba(147, 51, 234, 0.28);
}

.settings-id-verify-explain {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-2);
  line-height: 1.55;
  max-width: 56ch;
}

.settings-id-tick-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(168, 85, 247, 0.4);
  background: rgba(88, 28, 135, 0.12);
}

.settings-id-tick-preview-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.settings-id-tick-purple {
  display: inline-flex;
  filter: drop-shadow(0 0 8px rgba(147, 51, 234, 0.55));
}

.settings-id-upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 14px;
}

@media (max-width: 720px) {
  .settings-id-upload-grid {
    grid-template-columns: 1fr;
  }
}

.settings-field-hint--status {
  margin-top: 10px;
  min-height: 1.25em;
}

.settings-id-rejected-panel {
  padding: 14px 14px 12px;
  border-radius: 10px;
  border: 1px solid rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.06);
  margin-bottom: 8px;
}

.settings-id-reject-title {
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 650;
  color: #fecaca;
}

.settings-id-reject-note {
  margin: 0 0 12px;
  font-size: 0.8rem;
  color: var(--text-2);
  line-height: 1.5;
}

.settings-identity {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 26px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.settings-identity-avatar {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  font-size: 1.05rem;
  border-radius: 14px;
  border: 1px solid var(--border-light);
  box-shadow: 0 2px 12px rgba(0,0,0,0.35);
}

.settings-identity-text { min-width: 0; }

.settings-identity-name {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.settings-identity-email {
  margin: 0 0 8px;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-2);
  word-break: break-all;
}

.settings-identity-note {
  margin: 0;
  font-size: 0.76rem;
  color: var(--text-3);
  line-height: 1.45;
}

.settings-fields {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.settings-field { margin: 0; }

.settings-field-label {
  display: block;
  margin: 0 0 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.settings-field-hint {
  margin: 0 0 10px;
  font-size: 0.78rem;
  color: var(--text-3);
  line-height: 1.5;
}

.settings-field-hint--wide { max-width: 52ch; }

.settings-field-hint--tight { margin-bottom: 8px; }

.settings-field-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.settings-field-row .settings-input {
  flex: 1 1 220px;
  min-width: 0;
}

.settings-field-action {
  flex: 0 0 auto;
  font-size: 0.8125rem !important;
  padding: 9px 18px !important;
  font-weight: 600;
}

.settings-field--flush { margin-top: 0; }

.settings-url-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.settings-url-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
}

.settings-url-value {
  flex: 1 1 auto;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--purple-light);
  background: none;
  padding: 0;
}

.settings-text-btn {
  font: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-2);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.settings-text-btn:hover {
  color: var(--text);
  border-color: var(--border-light);
  background: rgba(255,255,255,0.07);
}

.settings-callout {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px 20px;
  padding: 18px 18px;
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--purple) 22%, var(--border));
  background: linear-gradient(135deg, rgba(124,58,237,0.07) 0%, rgba(6,182,212,0.03) 100%);
}

.settings-callout-copy { flex: 1 1 280px; min-width: 0; }

.settings-callout-title {
  margin: 0 0 6px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text);
}

.settings-callout-text {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-2);
  line-height: 1.55;
}

.settings-callout-btn {
  flex-shrink: 0;
  font-size: 0.8125rem !important;
  padding: 9px 18px !important;
  font-weight: 600;
}

.settings-prose {
  margin: 16px 0 0;
  font-size: 0.78rem;
  color: var(--text-3);
  line-height: 1.55;
}

.settings-security-block {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 28px 24px;
  align-items: start;
}

.settings-security-intro .settings-field-label {
  margin-bottom: 8px;
}

.settings-security-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  text-align: left;
  max-width: none;
}

.settings-mfa-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.84rem;
}

.settings-mfa-label { color: var(--text-2); font-weight: 500; }

.settings-mfa-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
}

.settings-mfa-primary {
  font-size: 0.8125rem !important;
  padding: 9px 16px !important;
  font-weight: 600;
}

.settings-mfa-disable {
  font-size: 0.8125rem !important;
  padding: 9px 16px !important;
  color: var(--red) !important;
}

.settings-mfa-badge {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 99px;
  border: 1px solid var(--border);
}
.settings-mfa-badge--off {
  color: var(--text-3);
  background: rgba(110,118,129,0.12);
}
.settings-mfa-badge--on {
  color: var(--green);
  border-color: rgba(63,185,80,0.35);
  background: rgba(63,185,80,0.1);
}

.settings-mfa-note {
  margin: 0;
  font-size: 0.78rem;
  color: #f0883e;
  line-height: 1.45;
}

.settings-mfa-console-hint {
  margin: 4px 0 0;
  font-size: 0.72rem;
  color: var(--text-3);
  line-height: 1.5;
}

.settings-plan-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 18px;
  margin-bottom: 22px;
}

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

.settings-plan-pill {
  font-size: 0.68rem !important;
  padding: 5px 12px !important;
}

.settings-plan-upgrade {
  font-size: 0.8125rem !important;
  padding: 9px 18px !important;
  font-weight: 600;
}

.settings-usage-section {
  padding-top: 4px;
}

.settings-usage-head {
  margin-bottom: 10px;
}

.settings-usage-panel {
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.settings-usage-panel .usage-bar-label {
  margin-bottom: 8px;
}

.settings-danger-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.settings-danger-item {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.settings-danger-item:first-child { padding-top: 2px; }

.settings-danger-item:last-child {
  border-bottom: none;
  padding-bottom: 2px;
}

.settings-danger-label {
  margin: 0 0 6px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text);
}

.settings-danger-hint {
  margin: 0;
  max-width: 46ch;
  font-size: 0.78rem;
  color: var(--text-3);
  line-height: 1.5;
}

.settings-danger-btn {
  font-size: 0.8125rem !important;
  padding: 9px 16px !important;
}

.settings-danger-delete {
  font-size: 0.8125rem !important;
  padding: 9px 16px !important;
  color: var(--red);
  border-color: rgba(248,81,73,0.35);
  background: rgba(248,81,73,0.06);
  font-weight: 600;
}
.settings-danger-delete:hover {
  background: rgba(248,81,73,0.1);
  border-color: rgba(248,81,73,0.5);
}

@media (max-width: 720px) {
  .settings-security-block {
    grid-template-columns: 1fr;
  }
  .settings-field-row .settings-input {
    flex-basis: 100%;
  }
  .settings-field-action {
    width: 100%;
  }
  .settings-plan-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ── Plan usage bar ───────────────────────── */
.usage-bar-wrap { margin-top: 6px; }
.usage-bar-label {
  display: flex; justify-content: space-between;
  font-size: 0.78rem; color: var(--text-3); margin-bottom: 6px;
}
.usage-bar {
  height: 5px; border-radius: 99px;
  background: var(--elevated);
  overflow: hidden;
}
.usage-bar-fill {
  height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--purple), var(--purple-light));
  transition: width 0.5s ease;
}
.usage-bar-fill.warning { background: linear-gradient(90deg, var(--orange), #fbbf24); }

/* ── New Prompt Modal ─────────────────────── */
.dash-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.dash-modal-overlay.open { display: flex; }

.dash-modal {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.04) inset;
}

.dash-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0;
  background: var(--surface);
  z-index: 1;
}
.dash-modal-header h3 { font-size: 1rem; font-weight: 700; color: var(--text); }
.dash-modal-close {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--elevated);
  color: var(--text-2);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.dash-modal-close:hover { color: var(--text); }

.dash-modal-body { padding: 24px; }

.modal-step { display: none; }
.modal-step.active { display: block; }

.modal-steps-bar {
  display: flex; gap: 8px; margin-bottom: 28px; align-items: center;
}
.modal-step-dot {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.78rem; font-weight: 500; color: var(--text-3);
}
.modal-step-dot .num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--elevated);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 0.7rem; font-weight: 700;
}
.modal-step-dot.active { color: var(--text); }
.modal-step-dot.active .num { background: var(--purple-dim); border-color: rgba(124,58,237,0.4); color: var(--purple-light); }
.modal-step-dot.done .num { background: var(--green-dim); border-color: rgba(63,185,80,0.3); color: var(--green); }
.modal-step-line { flex: 1; height: 1px; background: var(--border); }

.modal-form-group { margin-bottom: 18px; }
.modal-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}
.modal-label span { color: var(--text-3); font-weight: 400; font-size: 0.78rem; margin-left: 4px; }
.modal-input, .modal-textarea, .modal-select {
  width: 100%;
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  color: var(--text);
  font-size: 0.875rem;
  font-family: var(--font);
  outline: none;
  transition: var(--transition);
}
.modal-input:focus, .modal-textarea:focus, .modal-select:focus { border-color: var(--purple); background: rgba(124,58,237,0.04); }

/* Native <select> dropdown list — dark menu (OS still may tint; color-scheme + option rules help) */
.modal-select,
.dash-select {
  color-scheme: dark;
  background-color: var(--elevated);
  color: var(--text);
}
.modal-select option,
.dash-select option {
  background-color: var(--surface);
  color: var(--text);
}

/*
 * Optgroup rows in native <select> often paint white on Windows/Chrome.
 * Force dark red section bands + readable labels (matches user request to replace white bars).
 */
.dash-body select optgroup,
.modal-select optgroup,
.dash-select optgroup,
.discover-select optgroup {
  background-color: #3f1519 !important;
  background-image: linear-gradient(180deg, #4a1a22 0%, #341015 100%) !important;
  color: #f0f6fc !important;
  font-weight: 600 !important;
  font-style: normal !important;
}

.dash-body select optgroup option,
.modal-select optgroup option,
.dash-select optgroup option,
.discover-select optgroup option {
  background-color: var(--surface) !important;
  color: var(--text) !important;
  font-weight: 400 !important;
}

.modal-input.mono { font-family: var(--mono); font-size: 0.84rem; }
.modal-input::placeholder, .modal-textarea::placeholder { color: var(--text-3); }
.modal-textarea { resize: vertical; min-height: 120px; line-height: 1.7; }
.modal-textarea.code { font-family: var(--mono); font-size: 0.82rem; min-height: 160px; }
.modal-hint { font-size: 0.76rem; color: var(--text-3); margin-top: 5px; }
.modal-hint code { font-family: var(--mono); color: var(--cyan); font-size: 0.78em; background: rgba(6,182,212,0.08); padding: 1px 4px; border-radius: 3px; }
.cat-combo { position: relative; width: 100%; }
.cat-combo__btn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--elevated); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 9px 12px; color: var(--text); font-size: 0.875rem; font-family: var(--font); cursor: pointer; text-align: left; transition: var(--transition); }
.cat-combo__btn:hover { border-color: rgba(255,255,255,.22); }
.cat-combo__btn[aria-expanded="true"] { border-color: var(--purple); background: rgba(124,58,237,0.04); }
.cat-combo__btn span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-combo__btn svg { flex-shrink: 0; color: var(--text-3); transition: transform 0.15s; }
.cat-combo__btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.cat-combo__drop { position: absolute; z-index: 300; top: calc(100% + 4px); left: 0; right: 0; background: var(--elevated); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: 0 8px 32px rgba(0,0,0,.45); overflow: hidden; }
.cat-combo__search-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--border); color: var(--text-3); }
.cat-combo__search-inp { flex: 1; background: transparent; border: none; color: var(--text); font-size: 0.875rem; font-family: var(--font); outline: none; }
.cat-combo__search-inp::placeholder { color: var(--text-3); }
.cat-combo__list { max-height: 220px; overflow-y: auto; }
.cat-combo__group { padding: 6px 10px 3px; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); background: rgba(255,255,255,.03); }
.cat-combo__opt { padding: 7px 12px; font-size: 0.875rem; cursor: pointer; color: var(--text); transition: background 0.1s; }
.cat-combo__opt:hover { background: rgba(124,58,237,0.12); }
.cat-combo__opt--sel { color: var(--purple); background: rgba(124,58,237,0.08); }
.cat-combo__empty { padding: 10px 12px; font-size: 0.82rem; color: var(--text-3); }
.modal-input-prefix-wrap { display: flex; align-items: center; }
.modal-input-prefix {
  background: var(--elevated);
  border: 1px solid var(--border);
  border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  padding: 9px 10px;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-3);
  white-space: nowrap;
}
.modal-input-prefix + .modal-input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

.modal-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.modal-vars-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.modal-var-row {
  display: flex; align-items: center; gap: 8px;
}
.modal-var-row .modal-input { flex: 1; }
.modal-var-del {
  width: 28px; height: 28px;
  border-radius: 6px; border: 1px solid var(--border);
  background: var(--elevated); color: var(--text-3);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: var(--transition);
}
.modal-var-del:hover { color: var(--red); border-color: rgba(248,81,73,0.3); }

.model-compat-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.model-compat-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  cursor: pointer;
  transition: var(--transition);
  display: flex; align-items: center; gap: 8px;
  background: var(--elevated);
}
.model-compat-card:hover { border-color: var(--border-light); }
.model-compat-card.selected {
  border-color: var(--purple);
  background: var(--purple-dim);
}
.model-compat-card input { display: none; }
.model-compat-name { font-size: 0.82rem; font-weight: 500; color: var(--text-2); }
.model-compat-card.selected .model-compat-name { color: var(--text); }

.model-compat-badge {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}
.model-compat-badge--openai { background: rgba(16, 163, 127, 0.18); color: #10a37f; }
.model-compat-badge--anthropic { background: rgba(204, 120, 92, 0.2); color: #cc785c; }
.model-compat-badge--google { background: rgba(66, 133, 244, 0.18); color: #8ab4f8; }
.model-compat-badge--meta { background: rgba(138, 180, 248, 0.12); color: var(--cyan); }
.model-compat-badge--mistral { background: rgba(250, 82, 82, 0.15); color: #fa5252; }
.model-compat-badge--deepseek { background: rgba(110, 168, 255, 0.15); color: #6ea8ff; }
.model-compat-badge--qwen { background: rgba(163, 113, 247, 0.18); color: #c4a7ff; }
.model-compat-badge--cohere { background: rgba(82, 204, 160, 0.14); color: #52cca0; }
.model-compat-badge--xai { background: rgba(255, 255, 255, 0.08); color: var(--text); }
.model-compat-badge--kimi {
  background: rgba(167, 139, 250, 0.2);
  color: #c4b5fd;
}
.model-compat-badge--zhipu {
  background: rgba(52, 211, 153, 0.14);
  color: #6ee7b7;
}
.model-compat-badge--other { background: rgba(255, 255, 255, 0.06); color: var(--text-3); }

.model-compat-grid--dense {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
@media (min-width: 520px) {
  .model-compat-grid--dense {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.model-compat-scroll {
  max-height: min(52vh, 440px);
  overflow-y: auto;
  padding-right: 4px;
  margin-top: 2px;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
  scrollbar-width: thin;
}
.model-compat-scroll::-webkit-scrollbar {
  width: 8px;
}
.model-compat-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 8px;
}

.dash-model-compat-search {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 10px;
}

.dash-model-compat-wrap {
  margin-top: 8px;
}

.dash-create-step-block {
  margin-bottom: 8px;
}
.dash-create-step-heading {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}
.dash-create-step-lede {
  margin: 0 0 18px;
  font-size: 0.86rem;
  color: var(--text-2);
  line-height: 1.65;
  max-width: 62ch;
}
.dash-create-step-lede .mono {
  font-family: var(--mono);
  font-size: 0.84em;
  color: var(--cyan);
}

.dash-create-optional-docs {
  margin-top: 36px;
  margin-bottom: 8px;
}

.dash-create-trust,
.dash-create-execution,
.dash-create-discovery-hint {
  margin-top: 32px;
}

.dash-create-secret-banner {
  margin: 20px 0 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(248, 81, 73, 0.35);
  background: rgba(248, 81, 73, 0.07);
  color: var(--text-2);
  font-size: 0.84rem;
  line-height: 1.55;
}

.dash-create-callout {
  margin: 0;
  line-height: 1.55;
}
.dash-create-callout--muted {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  font-size: 0.82rem;
  color: var(--text-2);
}

.dash-create-discovery-hint .dash-create-subcard-title {
  margin-bottom: 8px;
}

.dash-create-checkbox-label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
  font-size: 0.86rem;
  color: var(--text-2);
  line-height: 1.5;
}
.dash-create-checkbox-label input {
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: var(--purple);
}

.dash-create-review-trust {
  margin-bottom: 14px;
}

.dash-create-review-optional {
  margin-bottom: 14px;
}
.dash-create-review-opt-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.84rem;
}
.dash-create-review-opt-row:last-of-type {
  border-bottom: none;
}
.dash-create-review-opt-label {
  color: var(--text-2);
}
.dash-create-review-opt-yes {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--green);
}

.modal-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px;
  border-top: 1px solid var(--border);
  position: sticky; bottom: 0;
  background: var(--surface);
}

/* ── Create prompt — inline wizard (main panel) ─────────────────── */
#view-create-prompt.dash-view {
  background: var(--bg);
}

.dash-create-prompt-page {
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px 24px 56px;
}

.dash-create-prompt-page .dash-page-header {
  margin-bottom: 8px;
}

.dash-create-prompt-page .dash-page-header h2 {
  margin-top: 6px;
  letter-spacing: -0.02em;
}

.dash-create-prompt-page .dash-page-header p {
  max-width: 52ch;
  line-height: 1.65;
  color: var(--text-2);
}

.dash-create-mode-toggle {
  margin-top: 12px;
  display: inline-flex;
  align-items: stretch;
  gap: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
}

.dash-create-mode-btn {
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-2);
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  cursor: pointer;
  transition: var(--transition);
}

.dash-create-mode-btn span {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-3);
}

.dash-create-mode-btn.active {
  border-color: rgba(255, 255, 255, 0.45);
  background: var(--purple-dim);
  color: var(--text);
}

.dash-create-mode-btn.active span {
  color: var(--text-2);
}

#view-create-prompt[data-create-mode="basic"] .create-pro-only {
  display: none !important;
}

.dash-create-prompt-back {
  margin-bottom: 14px;
  padding-left: 0;
  font-size: 0.84rem;
}

.dash-create-prompt-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  gap: 26px;
  align-items: start;
  margin-top: 20px;
}

.dash-create-prompt-card {
  padding: 0;
  overflow: visible;
  margin-top: 0;
  border-radius: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.dash-create-prompt-inner {
  padding: 22px 12px 18px 0;
}

.dash-create-prompt-page .modal-form-group {
  margin-bottom: 34px;
}

.dash-create-prompt-page .modal-row {
  gap: 26px;
}

.dash-create-prompt-footer.modal-footer {
  position: relative;
  background: transparent;
  padding: 20px 0 6px !important;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  border-top-color: rgba(255, 255, 255, 0.08);
}

.dash-create-prompt-footer .btn {
  min-height: 42px;
  padding-left: 22px;
  padding-right: 22px;
}

.dash-create-prompt-lede {
  margin: 32px 0 0;
  font-size: 0.84rem;
  color: var(--text-3);
  line-height: 1.65;
}

.dash-create-live-preview {
  position: sticky;
  top: 74px;
}

.dash-create-live-preview-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.dash-create-live-preview-kicker {
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-3);
}

.dash-create-live-preview-step {
  font-size: 0.74rem;
  color: var(--text-3);
}

.dash-create-live-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 14px;
}

.dash-create-live-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.dash-create-live-name {
  font-family: var(--mono);
  font-size: 0.84rem;
  color: var(--text);
  font-weight: 600;
}

.dash-create-live-meta {
  margin-top: 4px;
  font-size: 0.72rem;
  color: var(--text-3);
}

.dash-create-live-stats {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.dash-create-live-stat-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--elevated);
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--text-3);
}

.dash-create-live-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.dash-create-live-tab {
  border: 1px solid var(--border);
  background: var(--elevated);
  color: var(--text-3);
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 6px 9px;
  cursor: pointer;
}

.dash-create-live-tab.active {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.08);
}

.dash-create-live-panel {
  display: none;
}

.dash-create-live-panel.active {
  display: block;
}

.dash-create-live-desc {
  margin: 0 0 10px;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--text-2);
}

.dash-create-live-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.dash-create-live-demo {
  margin-bottom: 10px;
}

.dash-create-live-demo img,
.dash-create-live-demo video {
  width: 100%;
  max-height: 150px;
  object-fit: contain;
  border: 1px solid rgba(120, 130, 160, 0.28);
  border-radius: 12px;
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(255, 255, 255, 0.16), rgba(0,0,0,0) 52%),
    radial-gradient(120% 120% at 100% 100%, rgba(168, 85, 247, 0.16), rgba(0,0,0,0) 56%),
    #05070d;
  display: block;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 24px rgba(0, 0, 0, 0.36);
  transform: perspective(1000px) rotateX(1.5deg);
}

.dash-create-live-demo img[hidden],
.dash-create-live-demo video[hidden] {
  display: none !important;
}

.dash-create-live-block-title {
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-3);
  margin: 0 0 6px;
}

.dash-create-live-body {
  margin: 0;
  min-height: 70px;
  max-height: 140px;
  overflow: auto;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-family: var(--mono);
  font-size: 0.74rem;
  line-height: 1.45;
  color: var(--text-2);
  white-space: pre-wrap;
  word-break: break-word;
}

.dash-create-subcard {
  margin-top: 8px;
  padding: 28px 26px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.dash-create-subcard-head {
  margin-bottom: 20px;
}

.dash-create-subcard-title {
  margin: 0 0 10px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.dash-create-subcard-lede {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-2);
  line-height: 1.65;
}

.dash-req {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--green);
  background: rgba(63, 185, 80, 0.12);
  border: 1px solid rgba(63, 185, 80, 0.28);
  border-radius: 999px;
  vertical-align: middle;
}

.dash-demo-tabs {
  display: inline-flex;
  gap: 8px;
  margin-bottom: 12px;
}

.dash-demo-tab {
  border: 1px solid var(--border);
  background: var(--elevated);
  color: var(--text-3);
  border-radius: 8px;
  padding: 6px 12px;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}

.dash-demo-tab.active {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.12);
}

.dash-demo-upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 168px;
  padding: 28px 22px;
  border-radius: var(--radius);
  border: 1px dashed rgba(255, 255, 255, 0.14);
  background: var(--surface);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.dash-demo-upload-zone:hover,
.dash-demo-upload-zone:focus-visible {
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
  outline: none;
}

.dash-demo-upload-zone.is-drag {
  border-color: var(--purple);
  background: var(--purple-dim);
}

.dash-demo-upload-zone.is-done {
  border-style: solid;
  border-color: rgba(63, 185, 80, 0.35);
}

.dash-demo-upload-icon {
  color: var(--text-3);
  margin-bottom: 12px;
  opacity: 0.9;
}

.dash-demo-upload-title {
  margin: 0 0 8px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}

.dash-demo-upload-hint {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-3);
  line-height: 1.5;
  max-width: 36ch;
}

.dash-demo-preview-wrap {
  margin-top: 20px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(120, 130, 160, 0.2);
  background:
    radial-gradient(120% 100% at 15% 0%, rgba(255, 255, 255, 0.12), transparent 48%),
    radial-gradient(120% 100% at 85% 100%, rgba(168, 85, 247, 0.12), transparent 52%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 16px 34px rgba(0, 0, 0, 0.32);
  transform: perspective(1100px) rotateX(1.2deg);
}

.dash-demo-image-slots {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.dash-demo-image-slot {
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 16px rgba(0, 0, 0, 0.28);
}

.dash-demo-image-slot.is-filled {
  border-style: solid;
  border-color: var(--border);
  background: #000;
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 14px 24px rgba(0, 0, 0, 0.38);
}

.dash-demo-image-slot-empty {
  font-family: var(--mono);
  color: var(--text-3);
  font-size: 1.1rem;
}

.dash-demo-image-slot-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dash-demo-video-wrap {
  min-height: 120px;
}

.dash-demo-image-slots[hidden],
.dash-demo-video-wrap[hidden] {
  display: none !important;
}

.dash-demo-preview-media {
  display: block;
  width: 100%;
  max-height: 280px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #000;
  object-fit: contain;
}

.dash-demo-preview-media[hidden] {
  display: none !important;
}

.dash-demo-thumb-row {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dash-demo-thumb-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--elevated);
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-3);
}

.dash-demo-thumb-pill.is-main {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.1);
}

.dash-demo-preview-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.dash-demo-status {
  margin-top: 14px !important;
}

@media (max-width: 780px) {
  .dash-demo-image-slots {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.dash-create-review-demo {
  margin-bottom: 16px;
}

.dash-create-review-demo-media {
  display: block;
  width: 100%;
  max-height: 200px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #000;
  object-fit: contain;
}

.dash-create-review-demo-media[hidden] {
  display: none !important;
}

.modal-steps-bar--4 {
  flex-wrap: wrap;
  gap: 12px 10px;
  margin-bottom: 44px;
}

.modal-step-label {
  white-space: nowrap;
}

@media (max-width: 700px) {
  .modal-steps-bar--4 .modal-step-label {
    display: none;
  }
}

@media (max-width: 1080px) {
  .dash-create-prompt-workspace {
    grid-template-columns: 1fr;
  }
  .dash-create-live-preview {
    position: static;
  }
}

@media (max-width: 640px) {
  .dash-create-prompt-page {
    padding: 24px 16px 48px;
  }
  .dash-create-prompt-workspace {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .dash-create-live-preview {
    position: static;
    order: -1;
  }
  .dash-create-prompt-inner {
    padding: 20px 0 12px;
  }
  .dash-create-subcard {
    padding: 22px 18px;
  }
}

.dash-create-prompt-body.modal-textarea.code {
  min-height: 220px;
}

.dash-create-prompt-body-xl.modal-textarea.code {
  min-height: 320px;
}

.dash-create-review-card {
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  margin-bottom: 28px;
}

.dash-create-review-examples {
  margin-bottom: 14px;
}

.dash-create-review-examples-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
  margin-bottom: 8px;
}

.dash-create-review-pre {
  margin: 0 0 10px;
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 140px;
  overflow: auto;
}

.dash-topic-field {
  margin-top: 18px;
  padding-top: 8px;
}

.dash-topic-field-intro {
  margin-top: 0;
  margin-bottom: 18px !important;
}

.dash-topic-chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 14px 18px;
}

.dash-topic-other-row {
  margin-top: 18px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.dash-topic-chip--other {
  font-weight: 500;
  color: var(--text);
}

.dash-topic-other-wrap {
  margin-top: 16px;
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.dash-topic-other-wrap .modal-label {
  margin-bottom: 8px;
}

.dash-topic-other-wrap .modal-input {
  margin-bottom: 6px;
}

.dash-topic-chip {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-2);
  cursor: pointer;
  line-height: 1.35;
}

.dash-topic-chip input {
  margin-top: 3px;
  accent-color: var(--purple);
  flex-shrink: 0;
}

.dash-topic-chip span {
  flex: 1;
}

.dash-create-review-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.dash-topic-pill {
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
}

/* ── Prompt Detail Drawer ─────────────────── */
.dash-drawer-overlay {
  position: fixed; inset: 0;
  z-index: 90;
  pointer-events: none;
}
.dash-drawer-overlay.open { pointer-events: auto; }
.dash-drawer-overlay.open .dash-drawer-backdrop {
  opacity: 1;
}
.dash-drawer-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.dash-drawer {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: min(760px, 92vw);
  background: rgba(12, 12, 18, 0.88);
  -webkit-backdrop-filter: blur(22px);
  backdrop-filter: blur(22px);
  border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -24px 0 72px rgba(0, 0, 0, 0.55);
}
.dash-drawer-overlay.open .dash-drawer {
  transform: translateX(0);
}

.dash-drawer-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.dash-drawer-title-row {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px;
}
.dash-drawer-name {
  font-family: var(--mono);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}
.dash-drawer-meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px;
}

.dash-drawer-tabs {
  display: flex; gap: 2px; padding: 0 22px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  overflow-x: auto;
}
.dash-drawer-tab {
  padding: 12px 14px;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-3);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color var(--transition);
  background: none; border-top: none; border-left: none; border-right: none;
  font-family: var(--font);
}
.dash-drawer-tab:hover { color: var(--text-2); }
.dash-drawer-tab.active { color: var(--text); border-bottom-color: var(--purple-light); }

.dash-drawer-body {
  flex: 1; overflow-y: auto; padding: 22px;
}

.drawer-tab-pane { display: none; }
.drawer-tab-pane.active { display: block; }

.drawer-section { margin-bottom: 24px; }
.drawer-section-label {
  font-family: var(--mono);
  font-size: 0.67rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
  margin-bottom: 10px;
}

.drawer-variable-list { display: flex; flex-direction: column; gap: 6px; }
.drawer-variable {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px;
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.82rem;
}
.drawer-var-name { font-family: var(--mono); color: var(--cyan); }
.drawer-var-type { font-family: var(--mono); font-size: 0.72rem; color: var(--text-3); }
.drawer-var-required { font-family: var(--mono); font-size: 0.68rem; color: var(--orange); background: rgba(240,136,62,0.1); border-radius: 3px; padding: 1px 5px; }
.drawer-var-optional { font-family: var(--mono); font-size: 0.68rem; color: var(--text-3); }

.drawer-output-preview {
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.8;
  color: var(--text-2);
}
.drawer-output-preview .bullet::before {
  content: '▸ ';
  color: var(--purple-light);
}
.drawer-code-block {
  margin: 0;
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--text-2);
  white-space: pre-wrap;
  word-break: break-word;
}

.version-list { display: flex; flex-direction: column; gap: 8px; }
.version-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.version-tag {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  min-width: 60px;
}
.version-msg { flex: 1; font-size: 0.82rem; color: var(--text-2); }
.version-date { font-family: var(--mono); font-size: 0.7rem; color: var(--text-3); }
.version-current { background: var(--purple-dim); border-color: rgba(124,58,237,0.25); }
.version-current .version-tag { color: var(--purple-light); }

.test-result-bar { margin-bottom: 16px; }
.test-bar-nums {
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 0.72rem; margin-bottom: 6px;
}
.test-bar-nums .pass { color: var(--green); }
.test-bar-nums .fail { color: var(--red); }
.test-progress { height: 7px; border-radius: 99px; background: var(--elevated); overflow: hidden; }
.test-progress-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--green), #34d399); }

.test-list { display: flex; flex-direction: column; gap: 6px; }
.test-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px;
  border-radius: 6px; border: 1px solid var(--border);
  font-size: 0.8rem;
}
.test-item.pass { background: rgba(63,185,80,0.04); border-color: rgba(63,185,80,0.15); }
.test-item.fail { background: rgba(248,81,73,0.04); border-color: rgba(248,81,73,0.15); }
.test-icon { flex-shrink: 0; margin-top: 1px; }
.test-model { font-family: var(--mono); font-size: 0.7rem; color: var(--text-3); margin-top: 2px; }

.install-block {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 14px;
  position: relative;
}
.install-block pre {
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.7;
  overflow-x: auto;
  color: var(--text-2);
  margin: 0;
}
.install-copy-btn {
  position: absolute; top: 10px; right: 10px;
  display: flex; align-items: center; gap: 5px;
  font-family: var(--mono); font-size: 0.68rem;
  background: var(--elevated); border: 1px solid var(--border);
  border-radius: 5px; padding: 3px 9px; color: var(--text-3);
  cursor: pointer; transition: var(--transition);
}
.install-copy-btn:hover { color: var(--text); border-color: var(--border-light); }

.repo-form-card {
  border: 1px solid var(--border);
  background: var(--elevated);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.repo-form-input,
.repo-form-textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.82rem;
  font-family: var(--font);
  outline: none;
}
.repo-form-input:focus,
.repo-form-textarea:focus {
  border-color: var(--purple-light);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
}
.repo-form-textarea {
  resize: vertical;
  min-height: 80px;
}
.repo-form-textarea--mono {
  font-family: var(--mono);
  font-size: 0.78rem;
}
.repo-form-btn {
  align-self: flex-start;
  font-size: 0.78rem;
  padding: 8px 12px;
}
.repo-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.repo-row {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--elevated);
  padding: 10px 12px;
}
.repo-row--compact { padding: 9px 11px; }
.repo-row-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.repo-row h4 {
  margin: 0 0 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}
.repo-row p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-2);
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}
.repo-meta {
  margin-top: 7px;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-3);
}
.repo-empty {
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  font-size: 0.78rem;
  color: var(--text-3);
  background: rgba(148, 163, 184, 0.04);
}
.repo-pill {
  font-family: var(--mono);
  font-size: 0.66rem;
  border-radius: 999px;
  padding: 2px 8px;
  border: 1px solid transparent;
}
.repo-pill--green {
  color: #34d399;
  border-color: rgba(52,211,153,0.35);
  background: rgba(52,211,153,0.12);
}
.repo-pill--gray {
  color: var(--text-3);
  border-color: var(--border);
  background: rgba(148,163,184,0.08);
}
.repo-num {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-3);
}

.drawer-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  display: flex; gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  flex-shrink: 0;
}
.drawer-footer > .btn {
  min-height: 38px;
}
#promptDrawer .drawer-footer #drawerDownloadBtn,
#promptDrawer .drawer-footer #drawerEditBtn,
#promptDrawer .drawer-footer #drawerRunBtn {
  flex: 1 1 170px;
}
#promptDrawer .drawer-footer .btn[onclick="closeDrawer()"] {
  flex: 0 0 auto;
}

/* ── Toast / notification ─────────────────── */
.dash-toast-wrap {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 200; pointer-events: none;
}
.dash-toast {
  background: var(--elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 11px 16px;
  font-size: 0.84rem;
  color: var(--text);
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  animation: toastIn 0.25s ease both;
  pointer-events: auto;
  max-width: 320px;
}
.dash-toast.success svg { color: var(--green); }
.dash-toast.error   svg { color: var(--red);   }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Loading ──────────────────────────────── */
.dash-loading {
  position: fixed; inset: 0;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  z-index: 300;
  transition: opacity 0.3s ease;
}
.dash-loading.hidden { opacity: 0; pointer-events: none; }
.dash-loading-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.dash-loading-spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--purple-light);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.public-dev-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  margin: 8px 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(20, 20, 20, 0.95), rgba(0, 0, 0, 0.98));
}
.public-dev-loading-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.public-dev-loading-text {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-2);
}

/* ── Responsive ───────────────────────────── */
@media (max-width: 900px) {
  .dash-stats-row { grid-template-columns: repeat(2, 1fr); }
  .dash-two-col { grid-template-columns: 1fr; gap: 24px; }
  .dash-home-side-stack { gap: 22px; }
  .dash-drawer { width: min(100%, 96vw); }
}
@media (max-width: 640px) {
  .dash-content { padding: 24px 18px 44px; }
  .dash-sidebar { width: 64px; }
  .dash-sidebar-callout { display: none; }
  .dash-nav-label,
  .dash-logo-text,
  .dash-nav-section-text,
  .dash-user-meta,
  .dash-plan-pill { display: none; }
  .dash-nav-section { display: none; }
  .dash-nav-item { justify-content: center; padding: 10px; position: relative; }
  .dash-nav-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    margin-left: 0;
    transform: scale(0.85);
  }
  .dash-stats-row { grid-template-columns: 1fr 1fr; }
  .modal-row { grid-template-columns: 1fr; }
  .model-compat-grid { grid-template-columns: 1fr 1fr; }
  .discover-filters-top {
    flex-direction: column;
  }
  .discover-clear {
    width: 100%;
    min-height: 38px;
  }
  .discover-filters-row .discover-select {
    max-width: none;
    flex: 1 1 100%;
  }
  .drawer-footer {
    padding: 12px 14px;
    gap: 8px;
  }
  .drawer-footer > .btn,
  #promptDrawer .drawer-footer #drawerDownloadBtn,
  #promptDrawer .drawer-footer #drawerEditBtn,
  #promptDrawer .drawer-footer #drawerRunBtn {
    flex: 1 1 100%;
    width: 100%;
  }
}

.dash-toolbar-search--grow input {
  padding: 10px 14px 10px 38px;
  font-size: 0.92rem;
  min-height: 42px;
}
.dash-toolbar-search--grow svg {
  left: 13px;
}

/* =============================================
   OVERVIEW SECTIONS / DEVELOPERS
   ============================================= */
.dash-scroll-section {
  scroll-margin-top: 64px;
  margin-bottom: 32px;
}
#view-overview .dash-scroll-section:last-of-type {
  margin-bottom: 0;
}

#view-overview .dash-creators-head,
#view-overview .dash-creators-row {
  display: none;
}

/* ── Home overview (minimal) + changelog column ─────────────── */
.dash-overview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  align-items: start;
  max-width: min(1100px, 100%);
  margin-inline: auto;
}
.dash-overview-primary {
  min-width: 0;
}

.dash-page-hero {
  margin-bottom: 28px;
}
.dash-page-hero--minimal .dash-page-hero-title {
  font-family: var(--heading-font);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 6px;
  line-height: 1.2;
}
.dash-page-hero--minimal .dash-page-hero-sub {
  margin: 0 0 10px;
  max-width: 40rem;
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--text-2);
}
.dash-home-meta {
  margin: 0;
  font-size: 0.76rem;
  color: var(--text-3);
}

.dash-changelog-panel {
  position: sticky;
  top: 64px;
  padding: 12px 14px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}
.dash-changelog-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 2px;
}
.dash-changelog-sub {
  margin: 0 0 18px;
  font-size: 0.72rem;
  color: var(--text-3);
}
.dash-changelog-list {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}
.dash-changelog-list::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--border);
  border-radius: 1px;
}
.dash-changelog-item {
  position: relative;
  display: flex;
  gap: 12px;
  padding: 0 0 22px 0;
  margin: 0;
}
.dash-changelog-item:last-child {
  padding-bottom: 6px;
}
.dash-changelog-dot {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--text-3);
  z-index: 1;
}
.dash-changelog-body {
  min-width: 0;
}
.dash-changelog-time {
  display: block;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 3px;
}
.dash-changelog-text {
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-2);
}
.dash-changelog-text .kbd {
  display: inline-block;
  padding: 0 5px;
  border-radius: 4px;
  border: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text);
  background: var(--elevated);
}
.dash-changelog-footer {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 8px 0 0;
  border: none;
  border-top: 1px solid var(--border);
  background: none;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--purple);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}
.dash-changelog-footer:hover {
  text-decoration: underline;
  color: var(--purple-hover);
}

.dash-link {
  color: var(--purple);
  text-decoration: none;
}
.dash-link:hover {
  text-decoration: underline;
  color: var(--purple-hover);
}

@media (max-width: 1100px) {
  .dash-overview-layout {
    grid-template-columns: 1fr;
  }
  .dash-changelog-panel {
    position: relative;
    top: auto;
  }
}

#view-overview .dash-stats-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dash-body .btn-primary {
  background: #238636;
  border-color: rgba(46, 160, 67, 0.55);
  color: #fff;
  box-shadow: none;
}
.dash-body .btn-primary:hover {
  background: #2ea043;
  border-color: rgba(46, 160, 67, 0.8);
  box-shadow: none;
  transform: none;
}

/* ── Developer directory ─────────────────── */
.dev-directory-header {
  margin-bottom: 18px;
}
.dev-directory-title {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 8px;
}
.dev-directory-lede {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--text-2);
  max-width: 44rem;
}
.dev-directory-toolbar {
  margin-bottom: 12px;
}
.dev-directory-search {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(520px, 100%);
  padding: 0 14px;
  min-height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.dev-directory-search:focus-within {
  border-color: var(--purple);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--purple) 30%, transparent);
}
.dev-directory-search svg {
  flex-shrink: 0;
  color: var(--text-3);
}
.dev-directory-search input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 0.86rem;
  padding: 10px 4px 10px 0;
  outline: none;
  font-family: var(--font);
}
.dev-directory-search input::placeholder {
  color: var(--text-3);
}
.dev-directory-hint {
  font-size: 0.78rem;
  color: var(--text-3);
  margin: 0 0 20px;
  max-width: 44rem;
  line-height: 1.5;
}
.dev-directory-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 20px;
  font-size: 0.88rem;
  color: var(--text-3);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.dev-directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
  padding-bottom: 40px;
}

.dev-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.dev-card:hover {
  border-color: var(--border-light);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 12px 36px rgba(0, 0, 0, 0.28);
}

.dev-card-top {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--border);
}
.dev-card-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--heading-font);
  font-weight: 700;
  font-size: 1.18rem;
  letter-spacing: 0.02em;
  color: var(--text);
  background: linear-gradient(135deg, color-mix(in srgb, var(--purple) 28%, var(--elevated)) 0%, var(--elevated) 100%);
  border: 1px solid rgba(167, 139, 250, 0.22);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.32), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  overflow: hidden;
  position: relative;
}
.dev-card-avatar--logo {
  background: radial-gradient(circle at 30% 30%, rgba(167, 139, 250, 0.32) 0%, rgba(15, 22, 38, 0.95) 70%);
}
.dev-card-avatar-logo {
  width: 46px;
  height: 46px;
  object-fit: contain;
  display: block;
}
.dev-card-avatar--photo { padding: 0; background: var(--elevated); }
.dev-card-avatar-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.dev-card-headtext {
  min-width: 0;
}
.dev-card-name {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 1.04rem;
  font-weight: 650;
  color: var(--text);
  margin: 0 0 5px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.dev-card-verified {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
}
.dev-card-verified svg { display: block; }
.dev-card-verified .dav-burst {
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35));
}
.dev-card-handle {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--purple);
}

.dev-card-stats {
  display: flex;
  gap: 0;
  margin: 0;
  padding: 0 18px;
  border-bottom: 1px solid var(--border);
}
.dev-card-stat {
  flex: 1;
  padding: 10px 12px;
  text-align: center;
  border-right: 1px solid var(--border);
}
.dev-card-stat:last-child {
  border-right: none;
}
.dev-card-stat-label {
  display: block;
  margin-bottom: 2px;
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}
.dev-card-stat-value {
  display: block;
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.dev-card-rows {
  padding: 12px 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dev-card-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.78rem;
  line-height: 1.4;
}
.dev-card-label {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}
.dev-card-value {
  text-align: right;
  color: var(--text-2);
  min-width: 0;
}
.dev-card-value--mono {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-2);
}

.dev-card-actions {
  display: flex;
  gap: 10px;
  padding: 14px 18px 16px;
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 55%, transparent);
}
.dev-card-btn {
  flex: 1;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.dev-card-btn--ghost {
  background: transparent;
  color: var(--text-2);
}
.dev-card-btn--ghost:hover {
  color: var(--text);
  border-color: var(--border-light);
  background: var(--elevated);
}
.dev-card-btn--primary {
  background: #238636;
  border-color: rgba(46, 160, 67, 0.55);
  color: #fff;
}
.dev-card-btn--primary:hover {
  background: #2ea043;
  border-color: rgba(46, 160, 67, 0.85);
}

@media (max-width: 640px) {
  .dev-directory-grid { grid-template-columns: 1fr; }
  .dev-directory-search {
    max-width: none;
  }
}

/* =============================================
   PUBLIC PROFILE — GitHub-style hub (Edit / Preview)
   ============================================= */
.mono { font-family: var(--mono); font-size: 0.9em; }

.profile-layout {
  display: block;
  max-width: 1180px;
  margin: 0 auto;
}

.profile-hub {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.profile-hub-top {
  margin-bottom: 12px;
}

.profile-hub-tabs {
  display: inline-flex;
  padding: 4px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  gap: 4px;
}

.profile-hub-tab {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 8px 18px;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.profile-hub-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.profile-hub-tab.active {
  color: var(--text);
  background: var(--surface);
  border-color: var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.profile-hub-lede {
  margin: 8px 0 0;
  font-size: 0.8rem;
  color: var(--text-2);
  line-height: 1.5;
  max-width: 48rem;
}

.profile-tab-panel[hidden] {
  display: none !important;
}

.profile-tab-panel--edit:not([hidden]) {
  display: block;
}

.profile-tab-panel--preview:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.profile-gh-shell {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.profile-side-nav {
  position: sticky;
  top: 72px;
  padding: 14px 14px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
}

.profile-side-nav-title {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-3);
  margin-bottom: 10px;
}

.profile-side-nav-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-side-link {
  display: block;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 0.82rem;
  color: var(--text-2);
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.12s ease, color 0.12s ease;
}

.profile-side-link:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.profile-side-nav-footer {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-side-save {
  width: 100%;
  justify-content: center;
  font-size: 0.8rem !important;
  padding: 8px 12px !important;
}

.profile-main-col {
  display: flex;
  flex-direction: column;
  gap: 11px;
  min-width: 0;
}

.profile-sec {
  overflow: hidden;
}

.profile-sec--muted {
  background: rgba(0, 0, 0, 0.15);
}

/* Donations — white card only (rest of dashboard unchanged) */
.profile-sec--donations-light {
  background: #ffffff !important;
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.profile-sec--donations-light:hover {
  border-color: rgba(15, 23, 42, 0.14);
}

.profile-sec-head--donations {
  padding-top: 18px;
}

.profile-donations-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.profile-sec--donations-light .profile-sec-title {
  color: #0f172a;
}

.profile-sec--donations-light .profile-sec-desc {
  color: #475569;
}

.profile-sec--donations-light .profile-sec-desc strong {
  color: #0f172a;
}

.profile-donations-paypal-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.profile-donations-paypal-logo {
  display: block;
  flex-shrink: 0;
  width: 92px;
  height: auto;
}

.profile-donations-paypal-logo--modal {
  width: 84px;
}

.profile-sec--donations-light .profile-label--row span {
  color: #0f172a;
}

.profile-donations-hint {
  color: #64748b !important;
}

.profile-donations-edit-link {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
  color: #0070ba;
  text-decoration: underline;
}

.profile-donations-edit-link:hover {
  color: #003087;
}

.profile-sec-head {
  padding: 11px 14px 0;
}

.profile-sec-title {
  margin: 0;
  font-size: 0.94rem;
  font-weight: 650;
  color: var(--text);
  letter-spacing: -0.02em;
}

.profile-sec-desc {
  margin: 6px 0 0;
  font-size: 0.74rem;
  color: var(--text-3);
  line-height: 1.45;
}

.profile-form {
  padding: 9px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.profile-form--tight {
  padding-top: 7px;
}

.profile-avatar-url-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px 20px;
  margin-bottom: 6px;
}

.profile-avatar-url-fields {
  flex: 1 1 220px;
  min-width: 0;
}

.profile-avatar-url-fields .profile-label {
  margin-top: 0;
}

.profile-url-hint {
  margin: 6px 0 0;
  font-size: 0.72rem;
  color: var(--text-3);
  line-height: 1.45;
}

.profile-avatar-url-status {
  margin: 6px 0 0;
  min-height: 1.2em;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-3);
  line-height: 1.4;
}

.profile-avatar-url-status--bad {
  color: #f0883e;
}

.profile-avatar-url-thumb-wrap {
  flex-shrink: 0;
  padding-top: 22px;
}

.profile-avatar-url-thumb {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 3px solid var(--border);
  background: linear-gradient(135deg, var(--purple), var(--cyan));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--heading-font);
  font-weight: 800;
  font-size: 1.05rem;
  color: #fff;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.profile-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-2);
  margin-top: 10px;
  margin-bottom: 4px;
}

.profile-label:first-of-type { margin-top: 0; }

.profile-label--row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
  cursor: pointer;
  font-weight: 500;
  color: var(--text);
}

.profile-label--row input {
  margin-top: 3px;
  accent-color: var(--purple);
}

.profile-char-hint {
  font-weight: 400;
  color: var(--text-3);
  font-size: 0.72rem;
}

.profile-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.5;
  font-size: 0.88rem;
}

.profile-textarea--sm { min-height: 88px; }

.profile-textarea--readme {
  min-height: 280px;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.45;
}

.profile-readme-meta {
  font-size: 0.72rem;
  color: var(--text-3);
  font-family: var(--mono);
  margin-top: 6px;
}

.profile-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.profile-form-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 4px;
}

.profile-form-actions--footer {
  margin-top: 0;
  padding: 16px 20px 20px;
}

.profile-save-hint {
  font-size: 0.78rem;
  color: var(--green);
  font-family: var(--mono);
}

/* —— Preview tab (large) —— */
.profile-preview-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.profile-preview-toolbar-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-left: auto;
}

.profile-publish-live-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #86efac;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.28);
}

.profile-publish-live-badge--toolbar {
  align-self: center;
}

.profile-preview-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
}

.profile-preview-sync-note {
  font-size: 0.76rem !important;
  opacity: 0.85;
  cursor: default;
}

.profile-preview-page-wrap {
  display: flex;
  justify-content: center;
  padding: 8px 0 24px;
}

.profile-preview-page {
  width: 100%;
  max-width: 920px;
}
.profile-preview-page--standalone {
  margin: 0 auto;
  padding: 0 8px 40px;
  display: grid;
  gap: 12px;
}

.profile-preview-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.profile-preview-card--large {
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  background: linear-gradient(180deg, rgba(11,17,26,0.96) 0%, rgba(10,14,22,0.96) 100%);
  box-shadow: 0 26px 60px rgba(0,0,0,0.48), 0 0 0 1px rgba(124,58,237,0.06) inset;
  backdrop-filter: blur(8px);
}

.profile-preview-card--jonarix-platform {
  border-color: rgba(255, 255, 255, 0.09);
  background: linear-gradient(180deg, rgba(16, 18, 24, 0.98) 0%, rgba(12, 14, 19, 0.99) 100%);
  box-shadow:
    0 24px 56px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.public-dev-profile-wrap--jonarix .public-dev-submenu {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(10, 12, 18, 0.85);
}

.public-dev-profile-wrap--jonarix .public-dev-submenu-btn:hover {
  border-color: rgba(148, 163, 184, 0.35);
  color: var(--text);
}

.public-dev-profile-wrap--jonarix .public-dev-submenu-btn.is-active {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(148, 163, 184, 0.45);
  color: #f8fafc;
  box-shadow: none;
}

.profile-badge--jonarix-official {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #cbd5e1;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.public-dev-profile-wrap--jonarix .public-dev-verified {
  filter: none;
  opacity: 0.92;
}

.public-dev-profile-wrap--jonarix .public-dev-url-copy:hover {
  border-color: rgba(148, 163, 184, 0.35);
  color: var(--text);
}

.profile-preview-card--jonarix-platform .profile-chip {
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

.profile-preview-card--jonarix-platform .profile-preview-link {
  color: #94a3b8;
}

.profile-preview-card--jonarix-platform .profile-preview-link:hover {
  color: #e2e8f0;
}

.profile-preview-avatar--brand-muted {
  background: linear-gradient(168deg, #2f3542 0%, #1f232c 52%, #16191f 100%) !important;
  color: #f1f5f9 !important;
  font-weight: 600;
  letter-spacing: -0.02em;
  border-color: rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4) !important;
}

.profile-preview-card--jonarix-platform .profile-preview-avatar--large:not(.profile-preview-avatar--photo) {
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.42) !important;
}

.public-dev-submenu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(12,16,24,0.72);
  backdrop-filter: blur(8px);
}

.public-dev-submenu-btn {
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
  color: var(--text-2);
  border-radius: 9px;
  padding: 7px 11px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.public-dev-submenu-btn:hover {
  border-color: rgba(167,139,250,0.45);
  color: var(--text);
}

.public-dev-submenu-btn.is-active {
  background: linear-gradient(135deg, rgba(124,58,237,0.22) 0%, rgba(6,182,212,0.14) 100%);
  border-color: rgba(167,139,250,0.55);
  color: #fff;
}

.public-dev-submenu-btn[data-count]:not([data-count="0"])::after {
  content: ' ' attr(data-count);
  margin-left: 6px;
  color: var(--text-3);
  font-family: var(--mono);
  font-weight: 500;
}

.public-dev-submenu-btn[data-empty="1"] {
  opacity: 0.75;
}

.profile-preview-banner {
  height: 88px;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.22) 0%, rgba(46, 160, 67, 0.12) 50%, var(--surface) 100%);
  opacity: 0.98;
}

.profile-preview-banner--large {
  height: 168px;
}

.profile-preview-body {
  display: flex;
  gap: 16px;
  padding: 0 18px 16px;
  margin-top: -40px;
  position: relative;
}

.profile-preview-body--large {
  gap: 30px;
  padding: 0 32px 28px;
  margin-top: -84px;
}

.profile-preview-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 4px solid var(--surface);
  background: linear-gradient(135deg, var(--purple), var(--cyan));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--heading-font);
  font-weight: 800;
  font-size: 1.35rem;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.profile-preview-avatar--large {
  width: 168px;
  height: 168px;
  font-size: 2.4rem;
  border-width: 6px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45), 0 0 0 2px rgba(255, 255, 255, 0.22);
}

.profile-preview-avatar--photo {
  padding: 0;
  overflow: hidden;
  background: var(--elevated) !important;
}

.profile-preview-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-preview-main {
  flex: 1;
  min-width: 0;
  padding-top: 44px;
}

.profile-preview-main--large {
  padding-top: 86px;
}

.profile-preview-names {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  margin-bottom: 4px;
}

.profile-preview-names--large {
  gap: 10px 14px;
}

.profile-preview-display {
  font-family: var(--heading-font);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.profile-preview-display--large {
  font-size: 1.85rem;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.public-dev-display-name { display: inline-block; }
.public-dev-verified {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.55));
}
.public-dev-verified svg { display: block; }
.public-dev-verified .dav-burst {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
}

.profile-preview-handle {
  font-family: var(--mono);
  font-size: 0.88rem;
  color: var(--text-3);
}

.profile-preview-pronouns {
  font-size: 0.82rem;
  color: var(--text-3);
}

.public-dev-url-row {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.public-dev-url {
  font-size: 0.72rem;
  color: var(--text-3);
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
}

.public-dev-url-copy {
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
  color: var(--text-2);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.72rem;
  cursor: pointer;
  transition: var(--transition);
}

.public-dev-url-copy:hover {
  border-color: rgba(167,139,250,0.45);
  color: var(--text);
}

.profile-preview-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.profile-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--mono);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.profile-badge--open {
  background: rgba(46, 160, 67, 0.18);
  color: #3fb950;
  border: 1px solid rgba(46, 160, 67, 0.35);
}

.profile-preview-tagline {
  margin: 6px 0 0;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.45;
}

.profile-preview-tagline--large {
  font-size: 1.05rem;
  max-width: 40rem;
}

.profile-preview-meta {
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--text-2);
  line-height: 1.45;
}

.profile-preview-meta--large {
  font-size: 0.88rem;
}

.profile-preview-focus {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.profile-chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-family: var(--mono);
  color: var(--profile-accent, var(--cyan));
  background: color-mix(in srgb, var(--profile-accent, var(--cyan)) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--profile-accent, var(--cyan)) 32%, transparent);
}

.profile-preview-card .profile-preview-link {
  color: var(--profile-accent, var(--cyan));
}

.profile-preview-bio {
  margin: 10px 0 0;
  font-size: 0.86rem;
  color: var(--text-2);
  line-height: 1.55;
  max-width: 36rem;
}

.profile-preview-bio--large {
  font-size: 0.92rem;
  max-width: 48rem;
}

.profile-preview-avail {
  margin: 10px 0 0;
  font-size: 0.84rem;
  color: var(--text-2);
  line-height: 1.55;
  padding: 10px 12px;
  border-radius: 8px;
  border-left: 3px solid var(--profile-accent, var(--purple));
  background: color-mix(in srgb, var(--profile-accent, var(--purple)) 12%, transparent);
  max-width: 48rem;
}

.profile-preview-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 12px;
}

.profile-preview-links--large {
  gap: 12px 18px;
  margin-top: 14px;
}

.profile-preview-link {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--cyan);
  text-decoration: none;
}

.profile-preview-link:hover { text-decoration: underline; }

.profile-preview-discord {
  font-size: 0.8rem;
  color: var(--text-2);
  font-family: var(--mono);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px dashed var(--border);
}

.profile-preview-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.profile-preview-stats--large {
  gap: 18px 28px;
  margin-top: 18px;
  padding-top: 16px;
}

.profile-preview-stat {
  font-size: 0.8rem;
  color: var(--text-2);
  min-width: 140px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.09);
  background: rgba(255,255,255,0.02);
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}

.profile-preview-stat strong {
  font-family: var(--heading-font);
  color: var(--text);
  font-size: 1rem;
  margin-right: 4px;
}

.profile-preview-stat em {
  font-style: normal;
  font-size: 0.66rem;
  font-family: var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

.profile-preview-readme-wrap {
  border-top: 1px solid var(--border);
  padding: 16px 18px 20px;
  background: rgba(0, 0, 0, 0.12);
}

.profile-preview-readme-wrap--large {
  padding: 22px 28px 28px;
}

.profile-preview-readme-title {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  margin-bottom: 10px;
}

.profile-preview-readme {
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--text);
  word-break: break-word;
}

.profile-preview-readme--large {
  font-size: 0.92rem;
  line-height: 1.6;
}

.profile-readme-h2 {
  font-size: 1.05rem;
  font-weight: 650;
  margin: 18px 0 8px;
  color: var(--text);
  letter-spacing: -0.02em;
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
}

.profile-readme-h2:first-child { margin-top: 0; }

.profile-readme-h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 14px 0 6px;
  color: var(--text);
}

.profile-readme-line {
  margin: 2px 0;
}

.profile-preview-readme--empty,
.profile-preview-placeholder {
  color: var(--text-3);
  font-style: italic;
}

.profile-preview-readme strong { color: var(--text); }
.profile-preview-readme em { color: var(--text-2); }

.profile-preview-footnote {
  margin: 4px 0 0;
  font-size: 0.78rem;
  color: var(--text-3);
  line-height: 1.45;
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}

.profile-no-handle {
  margin-bottom: 20px;
}

@media (max-width: 900px) {
  .profile-gh-shell {
    grid-template-columns: 1fr;
  }
  .profile-side-nav {
    position: static;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: start;
  }
  .profile-side-nav-list {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .profile-side-link {
    padding: 6px 10px;
  }
  .profile-side-nav-footer {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
  }
  .profile-side-save {
    width: auto;
  }
}

@media (max-width: 640px) {
  .profile-form-row {
    grid-template-columns: 1fr;
  }
  .profile-preview-body--large {
    flex-direction: column;
    align-items: flex-start;
  }
  .profile-preview-main--large {
    padding-top: 8px;
  }
  .profile-showcase-cards {
    grid-template-columns: 1fr;
  }
}

/* Appearance editor, showcase picker, donation preview */
.profile-theme-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.profile-theme-field .profile-label { margin-top: 0; }

.profile-color-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.profile-color-row input[type="color"] {
  width: 48px;
  height: 36px;
  padding: 2px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
}

.profile-color-hex {
  font-size: 0.78rem;
  color: var(--text-3);
}

.profile-mini-hint {
  margin: 6px 0 0;
  font-size: 0.72rem;
  color: var(--text-3);
}

.profile-theme-reset {
  margin-top: 12px;
  font-size: 0.8rem !important;
  align-self: flex-start;
}

.profile-showcase-picker {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-showcase-empty {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-3);
  line-height: 1.5;
}

.profile-showcase-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.profile-showcase-row:hover {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.06);
}

.profile-showcase-row input {
  margin-top: 4px;
  accent-color: var(--purple);
}

.profile-showcase-row-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.profile-showcase-name {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
}

.profile-showcase-meta {
  font-size: 0.76rem;
  color: var(--text-3);
  font-family: var(--mono);
}

.profile-donate-fee-card {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(46, 160, 67, 0.06);
}

.profile-donate-fee-title {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 8px;
}

.profile-donate-fee-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-2);
  padding: 4px 0;
}

.profile-donate-fee-row strong {
  font-family: var(--mono);
  color: var(--text);
}

.profile-preview-strip {
  padding: 0 28px 20px;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.08);
}

.profile-showcase-strip-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}

.profile-showcase-strip-title {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--profile-accent, var(--cyan));
}

.profile-showcase-strip-sub {
  font-size: 0.76rem;
  color: var(--text-3);
  font-family: var(--mono);
}

.profile-showcase-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.public-works-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px 20px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.public-works-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.public-works-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  flex-shrink: 0;
  box-sizing: border-box;
}

.public-works-avatar--photo {
  display: block;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.public-works-avatar--initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--heading-font);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--profile-accent, #6366f1) 72%, #1e293b),
    #111827
  );
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.public-works-avatar--initials.public-works-avatar--muted {
  background: linear-gradient(168deg, #2f3542 0%, #1f232c 52%, #16191f 100%);
  color: #f1f5f9;
}

.public-works-identity-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.public-works-identity-name {
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.public-works-identity-handle {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-3);
}

.public-works-strip-meta {
  margin-bottom: 0;
  flex: 1 1 200px;
  justify-content: flex-end;
}

.public-works-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 14px;
  margin-top: 2px;
}

@media (max-width: 1180px) {
  .public-works-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .public-works-grid {
    grid-template-columns: 1fr;
  }
  .public-works-strip-meta {
    flex-basis: 100%;
    justify-content: flex-start;
  }
}

.public-works-grid .discover-card {
  box-shadow: 0 1px 2px rgba(0,0,0,0.4), 0 3px 12px rgba(0,0,0,0.25);
}

.public-works-grid .discover-card:hover {
  transform: translateY(-2px);
}

.public-works-grid .discover-card-body {
  padding: 12px 14px 14px;
  gap: 8px;
}

.public-works-grid .discover-card-name {
  font-size: 0.78rem;
}

.public-works-grid .discover-card-author-row {
  font-size: 0.66rem;
  gap: 6px;
}

.public-works-grid .discover-card-actions {
  gap: 5px;
  margin-top: 0;
}

.public-works-grid .discover-icon-btn {
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  gap: 2px;
}

.public-works-grid .discover-icon-btn svg {
  width: 14px;
  height: 14px;
}

.public-works-grid .discover-icon-btn-count {
  font-size: 0.65rem;
}

.public-works-grid .discover-card-dev-link {
  font-size: 0.65rem;
  padding: 4px 8px;
}

.public-works-grid .discover-card-taxonomy {
  margin-top: 6px;
  gap: 4px;
}

.public-works-grid .discover-card-cat,
.public-works-grid .discover-card-topic {
  font-size: 0.6rem;
  padding: 2px 6px;
}

.public-works-grid .discover-card-footer {
  gap: 8px;
}

.public-works-grid .dash-model-tag {
  font-size: 0.58rem;
  padding: 2px 6px;
}

.public-works-card-wrap {
  position: relative;
}

.public-works-pin-ribbon {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 4;
  pointer-events: none;
}

.profile-showcase-mini {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color 0.15s ease, transform 0.15s ease;
  cursor: pointer;
}

.profile-showcase-mini:hover {
  border-color: color-mix(in srgb, var(--profile-accent, var(--purple)) 45%, var(--border));
  transform: translateY(-1px);
}

.profile-showcase-mini-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.profile-showcase-mini-name {
  font-weight: 650;
  font-size: 0.88rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-showcase-mini-desc {
  margin: 0 0 10px;
  font-size: 0.78rem;
  color: var(--text-2);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.profile-showcase-mini-models {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.profile-donate-panel {
  padding: 4px 0 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.profile-donate-panel-head {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

.profile-donate-panel-title {
  font-family: var(--heading-font);
  font-weight: 700;
  font-size: 1.04rem;
  color: var(--text);
}

.profile-donate-panel-badge {
  display: none;
}

.profile-donate-blurb {
  margin: 0 0 10px;
  font-size: 0.94rem;
  color: var(--text-2);
  line-height: 1.5;
}

.profile-donate-blurb--muted {
  font-style: italic;
  color: var(--text-3);
}

.profile-donate-provider {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.profile-donate-paypal-logo {
  width: 36px;
  height: auto;
  border-radius: 5px;
  background: #fff;
}

.profile-donate-provider-text {
  font-size: 0.84rem;
  color: var(--text-2);
}

.profile-donate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.profile-donate-amount-input {
  min-height: 40px;
  width: 190px;
  max-width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.84rem;
  font-family: inherit;
  outline: none;
}

.profile-donate-amount-input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 1px rgba(46, 160, 67, 0.35);
}

.profile-donate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid rgba(46, 160, 67, 0.75);
  background: linear-gradient(180deg, #2ea043 0%, #238636 100%);
  color: #fff;
  font-size: 0.84rem;
  font-weight: 650;
  font-family: var(--font);
  cursor: pointer;
  box-shadow: 0 5px 12px rgba(22, 101, 52, 0.3);
  transition: transform 0.12s ease, box-shadow 0.15s ease, border-color 0.12s ease;
}

.profile-donate-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(46, 160, 67, 1);
  box-shadow: 0 8px 16px rgba(22, 101, 52, 0.36);
}

.profile-donate-help {
  margin: 8px 0 0;
  font-size: 0.76rem;
  color: var(--text-3);
}

.profile-donate-amt {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--profile-accent, var(--purple)) 18%, var(--surface));
  color: var(--text);
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease;
}

.profile-donate-amt:hover {
  transform: translateY(-1px);
  border-color: var(--profile-accent, var(--purple));
}

.profile-donate-amt-usd {
  font-family: var(--heading-font);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--profile-accent, var(--cyan));
}

.profile-donate-amt-sub {
  font-size: 0.62rem;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
}

.profile-donate-legal {
  margin: 12px 0 0;
  font-size: 0.72rem;
  color: var(--text-3);
  line-height: 1.45;
}

@media (max-width: 640px) {
  .profile-donate-provider {
    margin-bottom: 10px;
  }
  .profile-donate-btn {
    width: auto;
  }
}

@media (max-width: 720px) {
  .profile-theme-grid {
    grid-template-columns: 1fr;
  }
}

/* =============================================
   GUIDED TOUR
   ============================================= */
.tour-overlay {
  position: fixed; inset: 0;
  z-index: 500;
  pointer-events: none;
  display: none;
}
.tour-overlay.active { display: block; pointer-events: auto; }

.tour-spotlight {
  position: fixed;
  border-radius: 10px;
  box-shadow:
    0 0 0 4px rgba(167,139,250,0.45),
    0 0 0 9999px rgba(4,5,10,0.78);
  transition: top 0.18s ease, left 0.18s ease, width 0.18s ease, height 0.18s ease, opacity 0.2s ease;
  pointer-events: none;
  z-index: 501;
  border: 2px solid var(--purple-light);
  opacity: 0;
  animation: jnx-tour-pulse 2.2s ease-in-out infinite;
}

@keyframes jnx-tour-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(167,139,250,0.45), 0 0 0 9999px rgba(4,5,10,0.78); }
  50%      { box-shadow: 0 0 0 7px rgba(167,139,250,0.65), 0 0 0 9999px rgba(4,5,10,0.78); }
}

.tour-tooltip {
  position: fixed;
  display: none;
  width: min(400px, calc(100vw - 24px));
  max-height: min(76vh, 560px);
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(20,18,30,0.98) 0%, rgba(14,12,22,0.98) 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 18px 18px 14px;
  box-shadow: 0 28px 80px rgba(0,0,0,0.65), 0 0 0 1px rgba(167,139,250,0.06) inset, 0 0 40px rgba(124,58,237,0.08);
  z-index: 502;
  transition: top 0.32s cubic-bezier(0.4,0,0.2,1), left 0.32s cubic-bezier(0.4,0,0.2,1);
  scrollbar-width: thin;
  scrollbar-color: rgba(167,139,250,0.35) transparent;
}
.tour-tooltip::-webkit-scrollbar { width: 6px; }
.tour-tooltip::-webkit-scrollbar-thumb { background: rgba(167,139,250,0.35); border-radius: 3px; }
.tour-tooltip::-webkit-scrollbar-track { background: transparent; }
.tour-tooltip::before {
  content: '';
  position: absolute;
  width: 10px; height: 10px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  transform: rotate(45deg);
}
.tour-tooltip.arrow-left::before   { left: -6px; top: 20px; border-right: none; border-top: none; }
.tour-tooltip.arrow-right::before  { right: -6px; top: 20px; border-left: none; border-bottom: none; }
.tour-tooltip.arrow-top::before    { top: -6px; left: 24px; border-bottom: none; border-right: none; }
.tour-tooltip.arrow-bottom::before { bottom: -6px; left: 24px; border-top: none; border-left: none; }

/* progress bar at top of card */
.tour-progress-bar {
  position: relative;
  height: 3px;
  background: rgba(255,255,255,0.06);
  border-radius: 999px;
  overflow: hidden;
  margin: -4px -2px 14px;
}
.tour-progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: linear-gradient(90deg, var(--purple) 0%, var(--purple-light) 60%, var(--cyan) 100%);
  border-radius: 999px;
  transition: width 0.35s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 0 12px rgba(167,139,250,0.5);
}

.tour-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.tour-step-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  flex: 1;
}
.tour-section-badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--cyan);
  background: rgba(6,182,212,0.12);
  border: 1px solid rgba(6,182,212,0.32);
  padding: 3px 9px;
  border-radius: 999px;
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tour-step-counter {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-3);
}

.tour-voice-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.tour-voice-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 9px;
  color: var(--text-2);
  cursor: pointer;
  padding: 0;
  transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.18s;
}
.tour-voice-icon-btn:hover {
  background: rgba(167,139,250,0.16);
  border-color: rgba(167,139,250,0.4);
  color: var(--purple-light);
  transform: translateY(-1px);
}
.tour-voice-icon-btn:active { transform: translateY(0); }
#tourVoiceBtn.is-speaking {
  background: rgba(167,139,250,0.18);
  border-color: rgba(167,139,250,0.5);
  color: var(--purple-light);
  animation: jnx-voice-pulse 1.6s ease-in-out infinite;
}
@keyframes jnx-voice-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(167,139,250,0.5); }
  50%      { box-shadow: 0 0 0 6px rgba(167,139,250,0); }
}

.tour-title {
  font-family: var(--heading-font);
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.012em;
  margin: 0 0 10px;
  line-height: 1.3;
}
.tour-body {
  font-size: 0.86rem;
  color: var(--text-2);
  line-height: 1.65;
  margin: 0 0 14px;
}

.tour-example {
  margin: 0 0 12px;
  background: linear-gradient(180deg, rgba(124,58,237,0.1) 0%, rgba(124,58,237,0.04) 100%);
  border: 1px solid rgba(167,139,250,0.22);
  border-left: 3px solid var(--purple-light);
  border-radius: 10px;
  padding: 11px 13px 12px;
}
.tour-example-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--purple-light);
  margin-bottom: 7px;
}
.tour-example-body {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text);
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

.tour-tip {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 14px;
  padding: 10px 12px;
  background: rgba(6,182,212,0.08);
  border: 1px solid rgba(6,182,212,0.22);
  border-radius: 10px;
  color: var(--text-2);
  font-size: 0.8rem;
  line-height: 1.55;
}
.tour-tip svg {
  color: var(--cyan);
  flex-shrink: 0;
  margin-top: 1px;
}
.tour-tip-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.68rem;
  background: rgba(6,182,212,0.1);
  color: var(--cyan);
  border: 1px solid rgba(6,182,212,0.2);
  border-radius: 4px;
  padding: 1px 6px;
  margin-bottom: 10px;
}

.tour-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.tour-btns { display: inline-flex; gap: 6px; align-items: center; }
.tour-skip-btn {
  font-size: 0.78rem; color: var(--text-3);
  background: none; border: none; cursor: pointer;
  font-family: var(--font);
  padding: 6px 4px;
  transition: color 0.18s;
}
.tour-skip-btn:hover { color: var(--text-2); }

.tour-nav-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 9px;
  padding: 7px 12px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.18s, border-color 0.18s, transform 0.18s, opacity 0.18s;
}
.tour-nav-btn:disabled { opacity: 0.55; cursor: wait; }
.tour-nav-btn--prev {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.1);
  color: var(--text-2);
  padding: 7px 9px;
}
.tour-nav-btn--prev:hover { background: rgba(255,255,255,0.08); color: var(--text); }
.tour-nav-btn--next {
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-light) 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(124,58,237,0.35);
}
.tour-nav-btn--next:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(124,58,237,0.45); }
.tour-nav-btn--next:active:not(:disabled) { transform: translateY(0); }

@media (max-width: 780px) {
  .tour-tooltip {
    width: calc(100vw - 16px);
    max-height: 70vh;
    padding: 14px 14px 12px;
    border-radius: 14px;
  }
  .tour-title { font-size: 1rem; }
  .tour-body  { font-size: 0.82rem; }
  .tour-example-body { font-size: 0.74rem; }
}

/* Welcome / Done modal */
.tour-modal-overlay {
  position: fixed; inset: 0;
  z-index: 510;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(4,5,10,0.82);
  backdrop-filter: blur(6px);
  padding: 24px;
}
.tour-modal-overlay.open { display: flex; }
.tour-modal-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  width: 100%; max-width: 460px;
  text-align: center;
  box-shadow: 0 32px 100px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04) inset;
  animation: fadeUp 0.35s ease both;
}
.tour-modal-icon {
  width: 60px; height: 60px;
  border-radius: 16px;
  background: var(--purple-dim);
  border: 1px solid rgba(124,58,237,0.3);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 22px;
  color: var(--purple-light);
}
.tour-modal-card h3 {
  font-family: var(--heading-font);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.tour-modal-card p {
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.8;
  margin-bottom: 28px;
}
.tour-modal-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
  text-align: left;
}
.tour-modal-feature {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 14px;
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  color: var(--text-2);
}
.tour-modal-feature svg { flex-shrink: 0; margin-top: 1px; color: var(--purple-light); }
.tour-modal-feature strong { display: block; color: var(--text); font-weight: 600; margin-bottom: 1px; }
.tour-modal-actions { display: flex; flex-direction: column; gap: 8px; }

/* =============================================
   HELP SECTION
   ============================================= */
.help-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  align-items: start;
}

.help-sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  position: sticky;
  top: 0;
}
.help-sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 0.855rem;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  border-left: 2px solid transparent;
  transition: var(--transition);
  background: none; border-top: none; border-right: none; border-bottom: none;
  width: 100%; text-align: left;
  font-family: var(--font);
}
.help-sidebar-item:hover { color: var(--text); background: rgba(255,255,255,0.025); }
.help-sidebar-item.active { color: var(--purple-light); border-left-color: var(--purple-light); background: var(--purple-dim); }
.help-sidebar-item svg { opacity: 0.6; flex-shrink: 0; }
.help-sidebar-divider { height: 1px; background: var(--border); margin: 4px 0; }

.help-main { display: flex; flex-direction: column; gap: 20px; }

.help-search-bar {
  position: relative;
  margin-bottom: 4px;
}
.help-search-bar svg {
  position: absolute; left: 13px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-3); pointer-events: none;
}
.help-search-bar input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px 11px 40px;
  color: var(--text);
  font-size: 0.9rem;
  font-family: var(--font);
  outline: none;
  transition: var(--transition);
}
.help-search-bar input::placeholder { color: var(--text-3); }
.help-search-bar input:focus { border-color: var(--purple); background: rgba(124,58,237,0.04); box-shadow: 0 0 0 3px var(--purple-dim); }

.help-section-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.help-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text);
}
.help-section-title svg { color: var(--purple-light); }

.help-accordion-item {
  border-bottom: 1px solid var(--border);
}
.help-accordion-item:last-child { border-bottom: none; }

.help-accordion-trigger {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 13px 18px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  background: none; border: none;
  width: 100%; text-align: left;
  font-family: var(--font);
  transition: color var(--transition), background var(--transition);
}
.help-accordion-trigger:hover { color: var(--text); background: rgba(255,255,255,0.025); }
/* Chevron pinned right; avoids splitting titles that contain <code> (flex + space-between broke those rows). */
.help-accordion-chevron {
  flex-shrink: 0;
  margin-left: auto;
  color: var(--text-3);
  transition: transform 0.2s;
}
.help-accordion-item.open .help-accordion-trigger { color: var(--text); }
.help-accordion-item.open .help-accordion-chevron { transform: rotate(180deg); color: var(--purple-light); }

.help-accordion-body {
  display: none;
  padding: 0 18px 16px;
  font-size: 0.855rem;
  color: var(--text-2);
  line-height: 1.8;
  border-top: 1px solid var(--border);
  background: rgba(255,255,255,0.01);
}
/* JS toggles .open on .help-accordion-item — keep body visibility in sync */
.help-accordion-item.open .help-accordion-body { display: block; }
.help-accordion-body.open { display: block; }
.help-accordion-body p  { margin-bottom: 10px; }
.help-accordion-body p:last-child { margin-bottom: 0; }
.help-accordion-body code {
  font-family: var(--mono);
  font-size: 0.82em;
  color: var(--cyan);
  background: rgba(6,182,212,0.08);
  padding: 1px 5px;
  border-radius: 3px;
}
.help-accordion-body strong { color: var(--text); font-weight: 600; }
.help-accordion-body .help-code-block {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-2);
  margin: 10px 0;
  overflow-x: auto;
  line-height: 1.7;
}
.help-accordion-body ul {
  padding-left: 20px;
  margin: 8px 0;
}
.help-accordion-body ul li { margin-bottom: 5px; }

.help-badge-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }

.help-shortcut-table { width: 100%; border-collapse: collapse; margin-top: 6px; }
.help-shortcut-table td { padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 0.84rem; }
.help-shortcut-table tr:last-child td { border-bottom: none; }
.help-shortcut-table td:first-child { color: var(--text-2); }
.help-shortcut-table td:last-child { text-align: right; }
.kbd {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-2);
  background: var(--elevated);
  border: 1px solid var(--border-light);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 2px 7px;
}

.help-cta-card {
  background: linear-gradient(135deg, rgba(124,58,237,0.12) 0%, rgba(6,182,212,0.06) 100%);
  border: 1px solid rgba(124,58,237,0.2);
  border-radius: var(--radius);
  padding: 24px 22px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.help-cta-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: var(--purple-dim);
  border: 1px solid rgba(124,58,237,0.25);
  display: flex; align-items: center; justify-content: center;
  color: var(--purple-light);
  flex-shrink: 0;
}
.help-cta-card h4 { font-size: 0.95rem; font-weight: 600; color: var(--text); margin-bottom: 5px; }
.help-cta-card p  { font-size: 0.84rem; color: var(--text-2); line-height: 1.65; margin-bottom: 14px; }

.help-quick-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.help-quick-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}
.help-quick-link:hover { color: var(--text); border-color: var(--border-light); background: rgba(255,255,255,0.04); }
.help-quick-link svg { color: var(--purple-light); flex-shrink: 0; }

/* ── In-dashboard pricing (aligned with marketing pricing.html) ──────────── */
.dash-modal.dash-modal--sm {
  max-width: 460px;
}

/* Donation setup modal — white card + readable controls */
.dash-modal.dash-modal--donations-light {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.18);
}

.dash-modal.dash-modal--donate-inline {
  width: min(520px, 92vw);
  max-width: 520px;
  height: min(86vh, 720px);
  padding: 0;
  overflow: hidden;
}

.dash-inline-donate-body {
  height: calc(100% - 62px);
  background: #fff;
}

#inlineDonateFrame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #fff;
}

.dash-modal-header--donations {
  background: #ffffff;
  border-bottom-color: rgba(15, 23, 42, 0.1);
  align-items: flex-start;
}

.dash-modal-header--donations .dash-modal-donations-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 16px;
  flex: 1;
  min-width: 0;
}

.dash-modal-header--donations h3 {
  color: #0f172a;
  margin: 0;
}

.dash-modal-close--donations {
  border-color: rgba(15, 23, 42, 0.15);
  background: #f8fafc;
  color: #475569;
}

.dash-modal-close--donations:hover {
  color: #0f172a;
  background: #f1f5f9;
}

.dash-modal-body--donations {
  background: #ffffff;
}

.dash-modal-lede--donations {
  font-size: 0.86rem;
  color: #475569;
  line-height: 1.55;
  margin: 0 0 14px;
}

.modal-label-muted {
  color: #64748b;
  font-weight: 400;
  font-size: 0.78rem;
}

.modal-input--donations,
.modal-textarea--donations {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.18);
  color: #0f172a;
}

.modal-input--donations:focus,
.modal-textarea--donations:focus {
  border-color: #0070ba;
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 112, 186, 0.15);
}

.modal-hint--donations {
  color: #64748b !important;
}

.modal-footer--donations {
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  background: #fafafa;
}

.btn--donations-cancel {
  border: 1px solid rgba(15, 23, 42, 0.2);
  color: #334155;
}

.dash-modal-body--donations .modal-label {
  color: #0f172a;
}

.dash-pricing-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.dash-pricing-surface {
  position: relative;
  overflow: hidden;
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(22px, 3vw, 32px) clamp(18px, 2.5vw, 28px) clamp(18px, 2.5vw, 26px);
}

.dash-pricing-deco {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 75% 55% at 50% -30%, rgba(255, 255, 255, 0.14), transparent 52%);
  opacity: 1;
}

.dash-pricing-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 1.8vw, 20px);
  align-items: stretch;
}

@media (max-width: 1200px) {
  .dash-pricing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .dash-pricing-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
  }
}

.dash-pricing-card {
  position: relative;
  background: rgba(22, 27, 34, 0.85);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 20px 20px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.dash-pricing-card:hover {
  border-color: var(--border-light);
}

.dash-pricing-card--current {
  border-color: color-mix(in srgb, var(--green) 42%, var(--border));
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--green) 22%, transparent),
    0 16px 40px rgba(0, 0, 0, 0.28);
}

.dash-pricing-card--featured {
  border-color: color-mix(in srgb, var(--purple-light) 38%, var(--border));
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.07) 0%,
    rgba(255, 255, 255, 0.06) 38%,
    rgba(22, 27, 34, 0.92) 58%
  );
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}

.dash-pricing-card--featured.dash-pricing-card--current {
  border-color: color-mix(in srgb, var(--green) 48%, var(--purple-light));
}

.dash-pricing-ribbon {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #c4b5fd;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(167, 139, 250, 0.35);
  padding: 5px 10px;
  border-radius: 99px;
}

.dash-pricing-card-head {
  margin-bottom: 14px;
}

.dash-pricing-card--featured .dash-pricing-card-head {
  padding-right: 88px;
}

.dash-pricing-name {
  font-family: var(--heading-font);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 10px;
  letter-spacing: -0.02em;
}

.dash-pricing-price {
  margin: 0;
  line-height: 1.15;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 8px;
}

.dash-pricing-price--stack {
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.dash-pricing-num {
  font-family: var(--heading-font);
  font-size: clamp(1.5rem, 2vw + 1rem, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}

.dash-pricing-num--lg {
  font-size: clamp(1.35rem, 1.5vw + 1rem, 1.65rem);
}

.dash-pricing-unit {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-3);
  line-height: 1.35;
}

.dash-pricing-unit--inline {
  display: inline;
  margin: 0;
}

.dash-pricing-price--stack .dash-pricing-unit {
  margin: 0;
}

.dash-pricing-feat-label {
  font-size: 0.72rem;
  font-weight: 600;
  font-style: italic;
  letter-spacing: 0.04em;
  color: var(--text-2);
  margin: 0 0 10px;
}

.dash-pricing-list {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  flex: 1 1 auto;
}

.dash-pricing-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 0;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--text-2);
  border-bottom: 1px solid rgba(48, 54, 61, 0.85);
}

.dash-pricing-list li:last-child {
  border-bottom: none;
}

.dash-pricing-li-check {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--green);
  opacity: 0.95;
}

.dash-pricing-li-check svg {
  display: block;
}

.dash-pricing-footer-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 44px;
}

.dash-pricing-cta {
  width: 100%;
  min-height: 44px;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 600;
}

.dash-pricing-cta--link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dash-pricing-cta--muted {
  opacity: 0.65;
  cursor: default;
}

.dash-pricing-cta--current:not(:disabled) {
  cursor: default;
}

.dash-pricing-cta--current {
  border: 1px solid rgba(63, 185, 80, 0.45) !important;
  color: var(--green) !important;
  background: rgba(63, 185, 80, 0.08) !important;
}

.dash-pricing-foot {
  position: relative;
  z-index: 1;
  margin: 24px 0 0;
  padding-top: 4px;
  font-size: 0.82rem;
  color: var(--text-3);
  text-align: center;
  line-height: 1.55;
}

.dash-pricing-foot a {
  color: var(--purple-light);
  text-decoration: none;
}

.dash-pricing-foot a:hover {
  text-decoration: underline;
}

/* Enforce hidden CTAs in pricing card footers (some browsers ignore [hidden] on flex children). */
.dash-pricing-footer-actions > [hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Billing history (Plans & billing view) */
.dash-billing-panel {
  margin-top: 28px;
  padding: 22px 24px 24px;
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 1200px;
}

.dash-billing-panel-head {
  margin-bottom: 18px;
}

.dash-billing-panel-title {
  margin: 0 0 6px;
  font-size: 1.02rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--text);
}

.dash-billing-panel-desc {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-3);
  line-height: 1.55;
  max-width: 70ch;
}

.dash-billing-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
}

.dash-billing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.dash-billing-table caption {
  caption-side: top;
  text-align: left;
}

.dash-billing-table th,
.dash-billing-table td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.dash-billing-table th {
  font-weight: 600;
  color: var(--text-2);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(255,255,255,0.02);
}

.dash-billing-table tbody tr:last-child td {
  border-bottom: none;
}

.dash-billing-table td {
  color: var(--text-2);
}

.billing-doc-link {
  color: var(--purple-light);
  text-decoration: none;
  font-weight: 500;
}

.billing-doc-link:hover {
  text-decoration: underline;
}

.billing-cell-muted {
  color: var(--text-3);
}

.billing-status {
  text-transform: capitalize;
  font-size: 0.78rem;
}

.dash-billing-empty {
  margin: 0;
  padding: 20px 16px;
  font-size: 0.84rem;
  color: var(--text-3);
  text-align: center;
  line-height: 1.55;
}

@media (max-width: 900px) {
  .help-layout { grid-template-columns: 1fr; }
  .help-sidebar { position: static; display: flex; overflow-x: auto; }
  .help-sidebar-item { flex-shrink: 0; border-left: none; border-bottom: 2px solid transparent; }
  .help-sidebar-item.active { border-bottom-color: var(--purple-light); border-left: none; }
  .help-sidebar-divider { display: none; }
  .help-quick-links { grid-template-columns: 1fr; }
}

/* ── Changelog (What's New) ──────────────────────────────────────────────── */
.changelog-entry {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.changelog-entry:last-child { border-bottom: none; }
.changelog-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.changelog-version {
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--mono, monospace);
  color: var(--text);
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 7px;
}
.changelog-date {
  font-size: 0.78rem;
  color: var(--text-3);
}
.changelog-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 100px;
}
.changelog-badge--feature { background: rgba(63,185,80,0.15); color: #3fb950; }
.changelog-badge--fix     { background: rgba(210,153,34,0.15);  color: #d29922; }
.changelog-badge--ui      { background: rgba(88,166,255,0.15);  color: #58a6ff; }
.changelog-title {
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}
.changelog-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.changelog-list li {
  font-size: 0.84rem;
  color: var(--text-2);
  line-height: 1.6;
  padding-left: 16px;
  position: relative;
}
.changelog-list li::before {
  content: '·';
  position: absolute;
  left: 4px;
  color: var(--text-3);
}

/* ── MFA setup modal (TOTP) ───────────────────────────────────────────────── */
.mfa-setup-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(1, 4, 9, 0.72);
  backdrop-filter: blur(4px);
}

.mfa-setup-overlay[hidden] {
  display: none !important;
}

.mfa-setup-modal {
  width: 100%;
  max-width: 420px;
  max-height: min(90vh, 640px);
  overflow: auto;
  padding: 22px 24px 20px;
}

.mfa-setup-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.mfa-setup-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

.mfa-setup-close {
  flex-shrink: 0;
}

.mfa-setup-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mfa-setup-lede {
  margin: 0 0 6px;
  font-size: 0.84rem;
  color: var(--text-2);
  line-height: 1.55;
}

.mfa-qr-wrap {
  display: flex;
  justify-content: center;
  margin: 8px 0 4px;
}

.mfa-qr-img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #fff;
  padding: 8px;
}

.mfa-secret-text {
  display: block;
  font-size: 0.78rem;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--elevated);
  border: 1px solid var(--border);
  color: var(--text-2);
  word-break: break-all;
  margin-bottom: 4px;
}

.mfa-setup-oauth {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.mfa-setup-actions {
  margin-top: 8px;
}

.mfa-setup-err {
  margin-top: 12px;
  padding: 10px 12px;
  font-size: 0.8rem;
  color: #f85149;
  background: rgba(248,81,73,0.08);
  border: 1px solid rgba(248,81,73,0.25);
  border-radius: var(--radius-sm);
}

.profile-embed-ta {
  font-size: 0.76rem;
  line-height: 1.45;
  resize: vertical;
  min-height: 108px;
}

/* ── Bank (tips & withdrawals) ───────────────────────────────────────── */
.dash-bank-layout {
  max-width: min(1120px, 100%);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dash-bank-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.88fr);
  gap: 18px 20px;
  align-items: stretch;
}

.dash-bank-tables-span {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
  align-items: stretch;
}

@media (max-width: 980px) {
  .dash-bank-main-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .dash-bank-tables-span {
    grid-template-columns: 1fr;
  }
}

.dash-bank-card {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.dash-bank-top {
  display: grid;
  gap: 18px 20px;
  grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.1fr);
  align-items: stretch;
  margin-bottom: 0;
}

@media (max-width: 960px) {
  .dash-bank-top {
    grid-template-columns: 1fr;
  }
}

.dash-bank-alert {
  display: flex;
  align-items: center;
  min-height: 0;
}

.dash-bank-inline-msg {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--text-2);
}

.dash-bank-link {
  color: var(--purple);
  text-decoration: none;
}

.dash-bank-link:hover {
  text-decoration: underline;
}

.dash-bank-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 640px) {
  .dash-bank-kpis {
    grid-template-columns: 1fr;
  }
}

.dash-bank-kpi {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 14px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--elevated);
}

.dash-bank-kpi-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
}

.dash-bank-kpi-val {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.dash-bank-kpi-val--accent {
  color: var(--green);
}

.dash-bank-chart-card {
  min-width: 0;
  min-height: 280px;
}

.dash-bank-section-title {
  margin: 0 0 12px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.dash-bank-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.dash-bank-section-head .dash-bank-section-title {
  margin: 0;
}

.dash-bank-export-btn {
  min-height: 32px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.74rem;
  border-color: var(--border-light);
  flex-shrink: 0;
}

.dash-bank-export-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

@media (max-width: 640px) {
  .dash-bank-section-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

.dash-bank-chart-wrap {
  min-height: 200px;
  height: 220px;
  display: flex;
  align-items: stretch;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

#bankChartCanvas {
  display: block;
  width: 100%;
  height: 220px;
  min-height: 200px;
  vertical-align: middle;
}

.dash-bank-chart-foot {
  margin: 10px 0 0;
  font-size: 0.72rem;
  color: var(--text-3);
  line-height: 1.45;
}

.dash-bank-withdraw-card {
  align-self: stretch;
  min-height: 280px;
}

.dash-bank-payout-legend {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  margin-bottom: 8px;
}

.dash-bank-payout-block {
  margin: 4px 0 16px;
  padding: 14px 0 16px;
  border: none;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: transparent;
}

.dash-bank-payout-micro {
  margin: 0 0 12px;
  font-size: 0.78rem;
  color: var(--text-2);
  line-height: 1.5;
}

.dash-bank-payout-label {
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 6px;
}

.dash-bank-payout-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.dash-bank-payout-input {
  flex: 1;
  min-width: 200px;
  max-width: 100%;
}

.dash-bank-hint--payout {
  margin-top: 8px;
}

.dash-bank-sub {
  margin: 0 0 4px;
  font-size: 0.8rem;
  color: var(--text-2);
  line-height: 1.55;
}

.dash-bank-withdraw-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin-top: auto;
  padding-top: 4px;
}

.dash-bank-withdraw-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-2);
}

.dash-bank-withdraw-input {
  max-width: 160px;
}

.dash-bank-hint {
  margin: 10px 0 0;
  font-size: 0.74rem;
  color: var(--text-3);
  line-height: 1.45;
}

.dash-bank-table-card {
  min-width: 0;
  min-height: 220px;
}

.dash-bank-table-wrap {
  flex: 1;
  min-height: 160px;
  max-height: 320px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.12);
}

.dash-bank-table .dash-table-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.dash-bank-empty {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-3);
  padding: 20px 12px !important;
}

/* ── Create dashboard — app prototype (public/App Prototype.png) ─────────── */
.dash-app-prototype-shell {
  padding: 0;
  overflow: hidden;
}
.dash-app-prototype-shell + .dash-app-prototype-shell {
  margin-top: 18px;
}
.dash-app-prototype-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(255, 255, 255, 0.12) 0%, transparent 52%),
    linear-gradient(180deg, rgba(12, 14, 22, 0.5) 0%, rgba(6, 8, 14, 0.96) 100%);
  padding: clamp(14px, 3vw, 32px);
  min-height: min(72vh, 780px);
}
.dash-app-prototype-inner.dash-app-prototype-inner--compact {
  min-height: min(56vh, 640px);
}
.dash-app-prototype-img {
  display: block;
  width: 100%;
  height: auto;
  max-width: min(1120px, 100%);
  margin: 0 auto;
  border-radius: 14px;
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.07) inset;
}

/* ── Buy the team a coffee (floating sticker + sheet) ─────────────────────── */
body.coffee-sheet-open {
  overflow: hidden;
}

.coffee-sticker-fab {
  position: fixed;
  z-index: 98;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  width: 84px;
  height: 84px;
  padding: 0;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.45));
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.coffee-sticker-fab:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}
.coffee-sticker-fab:focus-visible {
  outline: 2px solid rgba(167, 139, 250, 0.85);
  outline-offset: 2px;
}
.coffee-sticker-cup {
  display: block;
  width: 78px;
  height: 78px;
}
#coffeeFabStop1,
#coffeeFabStop2,
#coffeeFabStop3 {
  animation-duration: 100s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}
#coffeeFabStop1 { animation-name: coffeeFabStopTopColors; }
#coffeeFabStop2 { animation-name: coffeeFabStopMidColors; }
#coffeeFabStop3 { animation-name: coffeeFabStopBottomColors; }
.coffee-sticker-steam {
  transform-origin: center;
  filter: blur(0.2px);
  stroke-dasharray: 12 18;
  animation: coffeeSteamRise 2.4s ease-in-out infinite, coffeeSteamFlow 2.4s linear infinite;
}
.coffee-sticker-steam-1 {
  animation-delay: 0s;
}
.coffee-sticker-steam-2 {
  animation-delay: 0.45s;
}
.coffee-sticker-steam-3 {
  animation-delay: 0.9s;
}
@keyframes coffeeSteamRise {
  0%, 100% {
    opacity: 0.2;
    transform: translate(0.2px, 2.8px) scaleY(0.88);
  }
  40% {
    opacity: 0.95;
    transform: translate(-0.3px, -1.4px) scaleY(1.05);
  }
  75% {
    opacity: 0.42;
    transform: translate(0.3px, -3.8px) scaleY(1.16);
  }
}
@keyframes coffeeSteamFlow {
  from { stroke-dashoffset: 20; }
  to { stroke-dashoffset: -20; }
}
@keyframes coffeeFabStopTopColors {
  0%, 9.999% { stop-color: #ffffff; }
  10%, 19.999% { stop-color: #dbeafe; }
  20%, 29.999% { stop-color: #fee2e2; }
  30%, 39.999% { stop-color: #dcfce7; }
  40%, 49.999% { stop-color: #fce7f3; }
  50%, 59.999% { stop-color: #fef3c7; }
  60%, 69.999% { stop-color: #e0e7ff; }
  70%, 79.999% { stop-color: #cffafe; }
  80%, 89.999% { stop-color: #ede9fe; }
  90%, 100% { stop-color: #f5d0fe; }
}
@keyframes coffeeFabStopMidColors {
  0%, 9.999% { stop-color: #e5e7eb; }
  10%, 19.999% { stop-color: #2563eb; }
  20%, 29.999% { stop-color: #dc2626; }
  30%, 39.999% { stop-color: #16a34a; }
  40%, 49.999% { stop-color: #ec4899; }
  50%, 59.999% { stop-color: #d97706; }
  60%, 69.999% { stop-color: #4f46e5; }
  70%, 79.999% { stop-color: #0891b2; }
  80%, 89.999% { stop-color: #7c3aed; }
  90%, 100% { stop-color: #db2777; }
}
@keyframes coffeeFabStopBottomColors {
  0%, 9.999% { stop-color: #94a3b8; }
  10%, 19.999% { stop-color: #1e3a8a; }
  20%, 29.999% { stop-color: #7f1d1d; }
  30%, 39.999% { stop-color: #14532d; }
  40%, 49.999% { stop-color: #9d174d; }
  50%, 59.999% { stop-color: #78350f; }
  60%, 69.999% { stop-color: #312e81; }
  70%, 79.999% { stop-color: #164e63; }
  80%, 89.999% { stop-color: #4c1d95; }
  90%, 100% { stop-color: #831843; }
}

.coffee-sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s;
}
.coffee-sheet-overlay.open {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}
.coffee-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 6, 12, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.28s ease;
}
.coffee-sheet-overlay.open .coffee-sheet-backdrop {
  opacity: 1;
}

.coffee-sheet-panel {
  position: relative;
  width: 100%;
  max-width: 428px;
  max-height: min(88vh, 640px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 18px 18px 14px 14px;
  background: #ffffff;
  border: 1px solid #dbe3ef;
  box-shadow:
    0 -8px 38px rgba(7, 14, 28, 0.26),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
  transform: translateY(10px) scale(0.98);
  transition: transform 0.24s ease;
}
.coffee-sheet-overlay.open .coffee-sheet-panel {
  transform: translateY(0) scale(1);
}
.coffee-sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 99px;
  background: #d4dbe7;
  margin: 10px auto 0;
  flex-shrink: 0;
}
.coffee-sheet-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 14px 16px 10px;
  border-bottom: 1px solid #e8edf4;
}
.coffee-sheet-hero {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border: 1px solid #e7edf6;
}
.coffee-sheet-hero-cup {
  display: block;
  transform: scale(0.82);
}
.coffee-sheet-head-copy h2 {
  margin: 0 0 6px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.25;
  color: #111827;
}
.coffee-sheet-lede {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.45;
  color: #4b5563;
}
.coffee-sheet-close {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid #d5deea;
  background: #f8fafd;
  color: #64748b;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.coffee-sheet-close:hover {
  background: #eef3f9;
  color: #1f2937;
}
.coffee-sheet-close:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.45);
  outline-offset: 2px;
}

.coffee-sheet-body {
  padding: 12px 16px 18px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
.coffee-sheet-label {
  margin: 0 0 10px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #6b7280;
}

.coffee-pay-method {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #dce5f2;
  border-radius: 10px;
  padding: 4px;
  background: #f8fafd;
  margin-bottom: 10px;
}
.coffee-pay-method-btn {
  border: 1px solid transparent;
  background: transparent;
  color: #334155;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}
.coffee-pay-method-btn:hover {
  background: #eef3fb;
}
.coffee-pay-method-btn.is-active {
  background: #ffffff;
  border-color: #bfd0e8;
}

.coffee-qty-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid #dce5f2;
  border-radius: 12px;
  background: #f8fafd;
  margin-bottom: 10px;
}
.coffee-qty-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #dce5f2;
  font-size: 1rem;
}
.coffee-qty-times {
  color: #9ca3af;
  font-size: 1rem;
  font-weight: 700;
}
.coffee-preset-grid {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 8px;
  padding-bottom: 2px;
  flex: 1;
}
.coffee-preset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #dce5f2;
  background: #ffffff;
  color: #374151;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.18s, background 0.18s;
}
.coffee-preset:hover {
  border-color: #b7c9e8;
  background: #f2f7ff;
}
.coffee-preset.is-active {
  border-color: #ff8a8a;
  background: #ff6262;
  color: #ffffff;
  box-shadow: none;
}
.coffee-preset:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.45);
  outline-offset: 2px;
}
.coffee-preset--team {
  min-width: 66px;
}
.coffee-preset-title {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #4b5563;
}
.coffee-preset-price {
  font-size: 2rem;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.02em;
}
.coffee-preset-note {
  font-size: 0.78rem;
  color: #6b7280;
  line-height: 1.35;
}
.coffee-preset--wide {
  width: 100%;
  margin-top: 8px;
}

.coffee-custom-block {
  display: none;
}
.coffee-custom-field {
  display: none;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}
.coffee-custom-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #6b7280;
}
.coffee-custom-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #d6e0ed;
  background: #ffffff;
  color: #111827;
  font-size: 1rem;
  font-weight: 600;
}
.coffee-custom-input:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
}

.coffee-sheet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
  margin-top: 12px;
}
.coffee-sheet-actions .btn {
  min-height: 40px;
  font-weight: 700;
}
#coffeeDismissBtn {
  min-width: 140px;
  background: #ffffff;
  color: #1f2937;
  border: 1px solid #94a3b8;
}
#coffeeDismissBtn:hover {
  background: #f8fafc;
  border-color: #64748b;
}
#coffeeDismissBtn:disabled {
  opacity: 0.6;
}
.coffee-continue-btn {
  min-width: 150px;
  background: #111827;
  border-color: #111827;
  color: #ffffff;
  font-size: 0.9rem;
}
.coffee-continue-btn:hover {
  background: #0b1220;
  border-color: #0b1220;
}
.coffee-sheet-footnote {
  margin: 10px 0 0;
  font-size: 0.64rem;
  line-height: 1.45;
  color: #6b7280;
  text-align: center;
}

/* Ensure hidden attribute wins over any display rule in this file */
[hidden] { display: none !important; }

/* Community catalog: icon-rail app nav + room for split view */
.dash-layout:has(#view-discover.active) .dash-sidebar {
  width: 64px;
}
.dash-layout:has(#view-discover.active) .dash-sidebar-callout {
  display: none;
}
.dash-layout:has(#view-discover.active) .dash-nav-label,
.dash-layout:has(#view-discover.active) .dash-logo-text,
.dash-layout:has(#view-discover.active) .dash-nav-section-text,
.dash-layout:has(#view-discover.active) .dash-user-meta,
.dash-layout:has(#view-discover.active) .dash-plan-pill {
  display: none;
}
.dash-layout:has(#view-discover.active) .dash-nav-section {
  display: none;
}
.dash-layout:has(#view-discover.active) .dash-nav-item {
  justify-content: center;
  padding: 10px;
  position: relative;
}
.dash-layout:has(#view-discover.active) .dash-nav-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  margin-left: 0;
  transform: scale(0.85);
}

/* Community catalog active: trap scroll inside catalog columns (no whole-page drift) */
.dash-body:has(#view-discover.active) {
  overflow: hidden;
}

.dash-body:has(#view-discover.active) .dash-layout {
  height: 100vh;
  min-height: 0;
  max-height: 100vh;
  overflow: hidden;
}

.dash-body:has(#view-discover.active) .dash-main {
  min-height: 0;
  overflow: hidden;
}

/* ── 3-panel Community Catalog (Discover view) ─────────────────── */
.dash-content:has(#view-discover.active) {
  padding: 0;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

#view-discover.dash-view.active {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

/* ── Discover mode tab bar ─────────────────────────────────────────────────── */
.dsc-mode-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 16px 0;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--bg);
}
.dsc-mode-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: none;
  background: transparent;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-3);
  cursor: pointer;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.dsc-mode-tab:hover { color: var(--text-2); background: var(--elevated); }
.dsc-mode-tab--active { color: var(--text); border-bottom-color: var(--purple); }

.dsc-layout {
  display: grid;
  /* Filters (narrow) · prompt list (wider rail) · detail (takes rest) */
  grid-template-columns: minmax(148px, 188px) minmax(280px, min(480px, 38vw)) 1fr;
  grid-template-rows: minmax(0, 1fr);
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.dsc-layout > .dsc-left,
.dsc-layout > .dsc-right,
.dsc-layout > .dsc-detail {
  min-height: 0;
}
.dsc-left {
  grid-column: 1;
  grid-row: 1;
  border-right: 1px solid var(--border);
  overflow: hidden;
  overflow-x: hidden;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}

.dsc-left-search {
  flex-shrink: 0;
}

.dsc-left-search .discover-search {
  min-width: 0;
  border-radius: var(--radius-sm);
}

.dsc-left-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dsc-left-section--cats {
  flex: 1;
  min-height: 0;
  gap: 4px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dsc-left-label {
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 0;
  flex-shrink: 0;
}

.dsc-left-clear-cat {
  font-size: 0.67rem;
  font-weight: 600;
  background: none;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  transition: color var(--transition);
}
.dsc-left-clear-cat:hover { color: var(--text); }

.dsc-left-section .discover-select {
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  padding: 6px 30px 6px 10px;
}

/* Category nav */
.dsc-cat-nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  min-height: 0;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(148,156,188,.3) transparent;
}

.dsc-cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 5px 8px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.77rem;
  color: var(--text-2);
  transition: background var(--transition), color var(--transition);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
  min-width: 0;
}
.dsc-cat-item span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
}
.dsc-cat-item:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.dsc-cat-item--active { background: rgba(255,255,255,0.08); color: var(--text); font-weight: 600; }

.dsc-cat-item-count {
  font-size: 0.66rem;
  color: var(--text-3);
  flex-shrink: 0;
}
.dsc-cat-item--active .dsc-cat-item-count { color: var(--text-2); }

/* Center detail panel (right column of split) — scroll inner body only */
.dsc-detail {
  grid-column: 3;
  grid-row: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-right: none;
}

.dsc-detail-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 0;
  gap: 12px;
  color: var(--text-3);
  font-size: 0.85rem;
  padding: 40px 24px;
}
.dsc-detail-empty p { margin: 0; }

.dsc-detail-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(148,156,188,.3) transparent;
}

.dsc-detail-card {
  flex: 0 0 auto;
  padding: 0 20px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dsc-detail-card .discover-preview-frame {
  /* Larger detail preview so canvas demos (Dot Grid, motion pack) read clearly */
  flex: 0 0 auto;
  width: 100%;
  height: clamp(280px, 48vh, 560px);
  min-height: 0;
  aspect-ratio: unset;
  border-radius: 8px;
  overflow: hidden;
  cursor: default;
}

/* Catalog detail: dot/orb-style previews ship extra chrome padding for landing;
   pull UI up so the live canvas fills the slot without a dead band on top. */
.dsc-detail-card .dot-grid-ui {
  padding: 8px 12px 12px;
}
.dsc-detail-card .orb-ui {
  padding: 8px 12px 12px;
}
.dsc-detail-card .light-rays-ui {
  padding: 8px 10px 10px;
}

.dsc-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dsc-detail-title {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  letter-spacing: -0.02em;
}

.dsc-detail-author {
  font-size: 0.77rem;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  flex-wrap: wrap;
}

.dsc-detail-desc {
  font-size: 0.84rem;
  color: var(--text-2);
  line-height: 1.65;
  margin: 0;
}

.dsc-detail-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dsc-detail-open-btn {
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid var(--border-light);
  background: var(--elevated);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background var(--transition), border-color var(--transition);
}
.dsc-detail-open-btn:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.2);
}

.dsc-detail-models {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

/* ── Catalog comments ──────────────────────────────────────────────────────── */
.dsc-comments-section {
  margin-top: 18px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.dsc-comments-head { margin-bottom: 12px; }
.dsc-comments-title { font-size: 0.84rem; font-weight: 600; color: var(--text); }
.dsc-comments-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.dsc-comment {
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
}
.dsc-comment-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.dsc-comment-author { font-size: 0.78rem; font-weight: 600; color: var(--text); }
.dsc-comment-time  { font-size: 0.73rem; color: var(--text-3); }
.dsc-comment-body  { font-size: 0.84rem; color: var(--text-2); line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.dsc-comment-form { display: flex; flex-direction: column; gap: 8px; }
.dsc-comment-input {
  width: 100%;
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.84rem;
  font-family: var(--font);
  padding: 9px 12px;
  resize: vertical;
  outline: none;
  transition: border-color var(--transition);
  box-sizing: border-box;
}
.dsc-comment-input:focus { border-color: var(--purple); }

/* Prompt list rail (between filters and detail) */
.dsc-right {
  grid-column: 2;
  grid-row: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  min-height: 0;
}

.dsc-right-head {
  padding: 11px 16px 10px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
}

.dsc-right-count {
  font-size: 0.76rem;
  color: var(--text-2);
  font-weight: 500;
}

.dsc-prompt-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(148,156,188,.3) transparent;
}

.dsc-list-empty {
  padding: 20px 14px;
  font-size: 0.78rem;
  color: var(--text-3);
}

.dsc-list-item {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background var(--transition);
  position: relative;
}
.dsc-list-item:hover { background: rgba(255,255,255,0.03); }
.dsc-list-item--active { background: rgba(255,255,255,0.06); }
.dsc-list-item--active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--text-2);
}

.dsc-list-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.dsc-list-name {
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text);
  white-space: normal;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  line-height: 1.35;
}
.dsc-list-item--active .dsc-list-name { color: #fff; }

@media (max-width: 900px) {
  /* Stacked catalog: allow page scroll; inner locks fight mobile Safari */
  .dash-body:has(#view-discover.active) {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
  .dash-body:has(#view-discover.active) .dash-layout {
    height: auto;
    max-height: none;
    min-height: 100vh;
    overflow: visible;
  }
  .dash-body:has(#view-discover.active) .dash-main {
    overflow: visible;
  }

  .dsc-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    overflow: auto;
  }
  .dsc-left,
  .dsc-detail,
  .dsc-right {
    grid-column: auto;
    grid-row: auto;
  }
  .dsc-left {
    overflow: visible;
    min-height: unset;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .dsc-left-section--cats {
    overflow: visible;
    min-height: unset;
    flex: 0 0 auto;
  }
  .dsc-cat-nav {
    overflow: visible;
    flex: 0 0 auto;
  }
  .dsc-detail-content {
    overflow: visible;
  }
  .dsc-detail { border-right: none; border-bottom: 1px solid var(--border); min-height: 300px; }
  .dsc-right { min-height: 200px; border-right: none; }
}

@media (prefers-reduced-motion: reduce) {
  .coffee-sticker-fab,
  .coffee-sheet-overlay,
  .coffee-sheet-backdrop,
  .coffee-sheet-panel {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
  .coffee-sticker-steam {
    animation: none !important;
  }
  .coffee-sticker-cup {
    animation: none !important;
  }
  #coffeeFabStop1,
  #coffeeFabStop2,
  #coffeeFabStop3 {
    animation: none !important;
  }
}

/* ── Per-prompt analytics modal ──────────────────────────────── */
.analytics-overlay {
  position: fixed; inset: 0; z-index: 1200;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.72);
  animation: fadeIn 0.15s ease;
}
.analytics-modal {
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: min(760px, 96vw);
  max-height: 88vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.analytics-modal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.analytics-modal-title {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.analytics-modal-close {
  background: none;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.analytics-modal-close:hover { color: var(--text); background: var(--border); }
.analytics-modal-body {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.analytics-stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.analytics-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.analytics-stat-label {
  font-size: 0.72rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.analytics-stat-value {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text);
  font-family: var(--mono);
  line-height: 1;
}
.analytics-stat-sub {
  font-size: 0.72rem;
  color: var(--text-3);
  margin-top: 2px;
}
.analytics-chart-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.analytics-chart-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-2);
}
.analytics-bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 80px;
  padding: 0 2px;
}
.analytics-bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  gap: 4px;
  height: 100%;
  justify-content: flex-end;
}
.analytics-bar {
  width: 100%;
  background: var(--cyan);
  border-radius: 3px 3px 0 0;
  min-height: 2px;
  opacity: 0.8;
  transition: opacity 0.15s;
}
.analytics-bar:hover { opacity: 1; }
.analytics-bar-label {
  font-size: 0.6rem;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  text-align: center;
}
.analytics-empty {
  text-align: center;
  color: var(--text-3);
  font-size: 0.82rem;
  padding: 24px 0;
}
.analytics-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 0.78rem;
  color: var(--text-3);
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.analytics-meta-item strong { color: var(--text-2); font-weight: 500; }

/* ── Version diff viewer modal ───────────────────────────────── */
.diff-overlay {
  position: fixed; inset: 0; z-index: 1200;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.72);
  animation: fadeIn 0.15s ease;
}
.diff-modal {
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: min(860px, 97vw);
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.diff-modal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.diff-modal-title {
  flex: 1;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}
.diff-modal-close {
  background: none; border: none;
  color: var(--text-3); cursor: pointer;
  padding: 4px; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
}
.diff-modal-close:hover { color: var(--text); background: var(--border); }
.diff-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  flex-wrap: wrap;
}
.diff-controls label { font-size: 0.78rem; color: var(--text-2); white-space: nowrap; }
.diff-controls select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text);
  font-size: 0.78rem;
  padding: 5px 8px;
  cursor: pointer;
}
.diff-controls select:focus { outline: 2px solid var(--cyan); outline-offset: 1px; }
.diff-run-btn {
  background: var(--cyan);
  color: #000;
  border: none;
  border-radius: 5px;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 14px;
  cursor: pointer;
  margin-left: auto;
}
.diff-run-btn:hover { opacity: 0.88; }
.diff-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  font-family: var(--mono);
  font-size: 0.79rem;
  line-height: 1.65;
}
.diff-hunk { margin-bottom: 4px; }
.diff-line { display: flex; gap: 8px; padding: 1px 6px; border-radius: 3px; }
.diff-line--add { background: rgba(57, 211, 83, 0.12); color: var(--green); }
.diff-line--remove { background: rgba(248, 81, 73, 0.12); color: #f85149; }
.diff-line--context { color: var(--text-3); }
.diff-line-num { min-width: 30px; text-align: right; color: var(--text-3); opacity: 0.5; user-select: none; }
.diff-line-sign { min-width: 12px; user-select: none; }
.diff-line-text { flex: 1; white-space: pre-wrap; word-break: break-all; }
.diff-loading { text-align: center; color: var(--text-3); font-size: 0.82rem; padding: 32px; font-family: var(--font); }
.diff-no-change { text-align: center; color: var(--text-3); font-size: 0.82rem; padding: 24px; font-family: var(--font); }

/* ── Visual variables editor ─────────────────────────────────── */
.var-editor-row {
  display: grid;
  grid-template-columns: 1fr 90px 60px 1fr;
  gap: 6px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 5px;
}
.var-editor-name {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--cyan);
  font-weight: 500;
}
.var-editor-select {
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-2);
  font-size: 0.74rem;
  padding: 4px 6px;
  cursor: pointer;
  width: 100%;
}
.var-editor-select:focus { outline: 2px solid var(--cyan); outline-offset: 1px; }
.var-editor-required {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  color: var(--text-3);
  justify-content: center;
  cursor: pointer;
}
.var-editor-required input[type="checkbox"] { accent-color: var(--cyan); cursor: pointer; }
.var-editor-default {
  font-size: 0.78rem;
}
.var-editor-desc {
  font-size: 0.78rem;
  grid-column: 1 / -1;
  margin-top: 2px;
}
.var-editor-del {
  background: none;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 3px;
  display: flex;
  align-items: center;
}
.var-editor-del:hover { color: #f85149; background: rgba(248,81,73,0.08); }

/* ── Prompt playground modal ─────────────────────────────────── */
.playground-overlay {
  position: fixed; inset: 0; z-index: 1200;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.75);
  animation: fadeIn 0.15s ease;
}
.playground-modal {
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: min(940px, 97vw);
  max-height: 90vh;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
}
.playground-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.playground-title {
  flex: 1;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}
.playground-close {
  background: none; border: none; color: var(--text-3); cursor: pointer;
  padding: 4px; border-radius: 4px; display: flex; align-items: center;
}
.playground-close:hover { color: var(--text); background: var(--border); }
.playground-body {
  display: grid;
  grid-template-columns: 320px 1fr;
  overflow: hidden;
}
.playground-left {
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.playground-section-title {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.playground-var-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.playground-var-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--cyan);
  font-family: var(--mono);
}
.playground-var-sub {
  font-size: 0.7rem;
  color: var(--text-3);
  margin-bottom: 2px;
}
.playground-var-input {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text);
  font-size: 0.82rem;
  padding: 6px 10px;
  width: 100%;
  resize: vertical;
}
.playground-var-input:focus { outline: 2px solid var(--cyan); outline-offset: 1px; border-color: transparent; }
.playground-right {
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.playground-preview-label {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.playground-preview {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px 16px;
  font-size: 0.83rem;
  line-height: 1.7;
  color: var(--text-2);
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 240px;
}
.playground-preview mark {
  background: rgba(57, 211, 83, 0.2);
  color: var(--cyan);
  border-radius: 2px;
  padding: 0 2px;
}
.playground-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.playground-empty-vars {
  font-size: 0.8rem;
  color: var(--text-3);
  padding: 12px 0;
}
@media (max-width: 640px) {
  .playground-body { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .playground-left { border-right: none; border-bottom: 1px solid var(--border); max-height: 220px; }
}

/* ── Team management ─────────────────────────────────────────── */
.team-member-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 7px; margin-bottom: 6px;
}
.team-member-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--border); display: flex; align-items: center;
  justify-content: center; font-size: 0.8rem; font-weight: 600;
  color: var(--text-2); flex-shrink: 0; overflow: hidden;
}
.team-member-info { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.team-member-name { font-size: 0.84rem; font-weight: 500; color: var(--text); }
.team-member-email { font-size: 0.74rem; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-member-badge { font-size: 0.7rem; font-weight: 600; padding: 2px 8px; border-radius: 20px; background: var(--purple-dim); color: var(--purple); flex-shrink: 0; }
.team-member-badge--pending { background: rgba(234,179,8,0.1); color: #ca8a04; }
.team-member-remove { background: none; border: none; color: var(--text-3); cursor: pointer; padding: 3px; border-radius: 3px; display: flex; align-items: center; flex-shrink: 0; }
.team-member-remove:hover { color: #f85149; background: rgba(248,81,73,0.08); }

/* ── Tip jar modal ───────────────────────────────────────────── */
.tip-overlay {
  position: fixed; inset: 0; z-index: 1200;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.72);
  animation: fadeIn 0.15s ease;
}
.tip-modal {
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: min(420px, 96vw);
  padding: 28px 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.tip-head { display: flex; align-items: flex-start; gap: 14px; }
.tip-icon {
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(57,211,83,0.12);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.tip-title { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.tip-sub { font-size: 0.8rem; color: var(--text-3); line-height: 1.5; }
.tip-amounts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.tip-amount-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text-2);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 10px 6px;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.1s, background 0.1s;
}
.tip-amount-btn:hover, .tip-amount-btn.is-selected {
  border-color: var(--cyan);
  background: rgba(57,211,83,0.08);
  color: var(--text);
}
.tip-custom-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.tip-custom-label { font-size: 0.78rem; color: var(--text-3); white-space: nowrap; }
.tip-custom-input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text);
  font-size: 0.88rem;
  padding: 7px 10px;
}
.tip-custom-input:focus { outline: 2px solid var(--cyan); outline-offset: 1px; border-color: transparent; }
.tip-note-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text);
  font-size: 0.82rem;
  padding: 7px 10px;
  resize: none;
}
.tip-note-input:focus { outline: 2px solid var(--cyan); outline-offset: 1px; border-color: transparent; }
.tip-footer { display: flex; gap: 10px; justify-content: flex-end; }
.tip-send-btn {
  background: var(--cyan);
  color: #000;
  border: none;
  border-radius: 6px;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 9px 22px;
  cursor: pointer;
}
.tip-send-btn:hover { opacity: 0.88; }
.tip-cancel-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-2);
  font-size: 0.84rem;
  padding: 9px 16px;
  cursor: pointer;
}
.tip-cancel-btn:hover { background: var(--border); }

/* ── Launch promo banner (pricing view) ─────────────────────── */
.dash-pricing-promo-banner {
  background: linear-gradient(135deg, #1a0a2e 0%, #0a1a0a 50%, #0a0a1a 100%);
  border: 1px solid rgba(124, 58, 237, 0.4);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.75rem;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}
.dash-pricing-promo-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 80% at 10% 50%, rgba(124,58,237,0.12), transparent 60%),
              radial-gradient(ellipse 60% 80% at 90% 50%, rgba(63,185,80,0.07), transparent 60%);
  pointer-events: none;
}
.dash-pricing-promo-inner {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
}
.dash-pricing-promo-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #000;
  background: linear-gradient(135deg, #a78bfa, #3fb950);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}
.dash-pricing-promo-text {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  flex: 1;
  min-width: 180px;
}
.dash-pricing-promo-sub {
  font-size: 0.8125rem;
  color: var(--text-2);
  width: 100%;
  margin-top: -0.25rem;
}

/* ── Dashboard mobile responsiveness ─────────────────────────────────────── */
.dash-mob-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border: none;
  background: rgba(255,255,255,0.06);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-2);
  margin-right: 6px;
  transition: background 0.12s, color 0.12s;
}
.dash-mob-toggle:hover { background: rgba(255,255,255,0.1); color: var(--text); }
.dash-mob-toggle svg { pointer-events: none; }

.dash-mob-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 49;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

@media (max-width: 768px) {
  .dash-mob-toggle { display: inline-flex; }

  .dash-mob-backdrop {
    display: block;
  }
  .dash-layout--mob-open .dash-mob-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .dash-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 24px rgba(0,0,0,0.45);
  }
  .dash-layout--mob-open .dash-sidebar {
    transform: translateX(0);
  }

  .dash-main {
    width: 100%;
    min-width: 0;
  }

  .dash-topbar {
    padding: 0 12px;
    gap: 6px;
  }

  .dash-search {
    max-width: 160px;
    flex: 1;
  }

  .dash-topbar-spacer { display: none; }

  .dash-stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .dash-overview-grid {
    grid-template-columns: 1fr;
  }

  .dash-page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}
