/* ==========================================================================
   AI Studio Platform — White Luxury Design System (Apple / Linear Porcelain)
   ========================================================================== */

:root {
  /* Canvas & Neutral Hierarchy */
  --bg-canvas: #FBFBFC;                /* Crisp porcelain background */
  --bg-subtle: #F4F4F6;                /* Subtle secondary surface */
  --card-bg: #FFFFFF;                  /* Pure white card surface */
  --card-border: rgba(0, 0, 0, 0.07);  /* 1px razor hairline */
  --card-border-hover: rgba(0, 0, 0, 0.15);
  
  /* Ink Typography (High-Contrast Deep Zinc) */
  --text-main: #09090b;                /* Deep ink zinc */
  --text-muted: #71717a;               /* Neutral mid-gray */
  --text-subtle: #a1a1aa;              /* Soft placeholder/caption */
  
  /* Brand Accents (90/10 Restraint: Monochrome Base with Purposeful Accents) */
  --primary: #18181b;                  /* Executive Ink Primary */
  --primary-hover: #000000;
  --primary-glow: rgba(0, 0, 0, 0.06);
  --accent-blue: #0284c7;              /* Apple Blue */
  --accent-blue-subtle: rgba(2, 132, 199, 0.08);
  --success: #10b981;                  /* Emerald */
  --success-subtle: rgba(16, 185, 129, 0.08);
  --warning: #d97706;                  /* Warm Amber */
  --warning-subtle: rgba(217, 119, 6, 0.08);
  --error: #e11d48;                    /* Rose */
  --error-subtle: rgba(225, 29, 72, 0.08);
  
  /* Terminal & Code Sandbox (Dark Contrast Inset) */
  --terminal-bg: #0c0d12;
  --terminal-border: rgba(255, 255, 255, 0.08);
  --terminal-text: #f4f4f5;

  /* Typography Stacks */
  --font-fa: 'Vazirmatn', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-en: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, monospace;

  /* Micro-Elevation & Specular Geometry */
  --shadow-card: 0 1px 3px 0 rgba(0, 0, 0, 0.03), 0 1px 2px -1px rgba(0, 0, 0, 0.02), inset 0 1px 0 0 rgba(255, 255, 255, 1);
  --shadow-elevated: 0 10px 25px -5px rgba(0, 0, 0, 0.04), 0 8px 10px -6px rgba(0, 0, 0, 0.02);
  --shadow-modal: 0 20px 40px -8px rgba(0, 0, 0, 0.08);

  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

/* Base Styles & Typography */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  background-color: var(--bg-canvas);
  color: var(--text-main);
  font-family: var(--font-fa);
  min-height: 100vh;
  direction: rtl;
  overflow-x: hidden;
  max-width: 100vw;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.tabular {
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
}

.tab-text-mobile {
  display: none;
}

.tab-text-desktop {
  display: inline;
}

/* App Wrapper */
.app-container {
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 20px 60px 20px;
  overflow-x: hidden;
}

/* -------------------------------------------------------------------------- */
/* Header & Segmented Navigation                                               */
/* -------------------------------------------------------------------------- */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: nowrap;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.logo-icon svg {
  width: 22px;
  height: 22px;
}

.logo-title {
  font-family: var(--font-en);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.logo-subtitle {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* Segmented Tabs Control */
.nav-tabs {
  display: flex;
  background: var(--bg-subtle);
  padding: 4px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0, 0, 0, 0.05);
  gap: 4px;
}

.nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-fa);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 140ms ease;
  white-space: nowrap;
}

.nav-tab:hover {
  color: var(--text-main);
}

.nav-tab.active {
  background: #ffffff;
  color: var(--text-main);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.tab-icon {
  font-size: 15px;
}

.header-badges {
  display: flex;
  align-items: center;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--success-subtle);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
}

/* -------------------------------------------------------------------------- */
/* Card Primitives & Structural Grids                                         */
/* -------------------------------------------------------------------------- */
.glass-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  padding: 26px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.glass-card:hover {
  border-color: var(--card-border-hover);
}

.card-header {
  margin-bottom: 20px;
}

.card-header.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
  text-wrap: balance;
}

.card-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.6;
}

.icon-wrap {
  font-size: 18px;
}

.main-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* -------------------------------------------------------------------------- */
/* Form Controls & Inputs                                                     */
/* -------------------------------------------------------------------------- */
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.text-input, .select-input {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-main);
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.text-input:focus, .select-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.08);
}

.text-input::placeholder {
  color: var(--text-subtle);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 120ms cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.10);
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
}

.btn-secondary {
  background: #ffffff;
  color: var(--text-main);
  border-color: rgba(0, 0, 0, 0.10);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
  border-color: rgba(0, 0, 0, 0.16);
}

.btn-success {
  background: var(--success);
  color: #ffffff;
}

.btn-success:hover {
  background: #059669;
}

.btn-danger {
  background: var(--error-subtle);
  color: var(--error);
  border-color: rgba(225, 29, 72, 0.2);
}

.btn-danger:hover {
  background: var(--error);
  color: #ffffff;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-block {
  width: 100%;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-sm);
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.10);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.btn-icon:hover {
  color: var(--text-main);
  background: var(--bg-subtle);
}

/* -------------------------------------------------------------------------- */
/* Dropzone & Upload Progress                                                 */
/* -------------------------------------------------------------------------- */
.dropzone {
  position: relative;
  border: 1.5px dashed rgba(0, 0, 0, 0.14);
  border-radius: var(--radius-lg);
  background: var(--bg-subtle);
  padding: 44px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 160ms ease;
}

.dropzone:hover, .dropzone.drag-over {
  border-color: var(--primary);
  background: rgba(24, 24, 27, 0.02);
}

.file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.upload-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px auto;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.upload-icon {
  width: 24px;
  height: 24px;
  color: var(--text-main);
}

.dropzone-primary-text {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.dropzone-secondary-text {
  font-size: 13px;
  color: var(--text-muted);
}

.browse-btn {
  color: var(--accent-blue);
  text-decoration: underline;
  cursor: pointer;
}

.dropzone-tags {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.tag {
  font-size: 11.5px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 9999px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.07);
  color: var(--text-muted);
}

/* Progress Bar */
.progress-container {
  margin-top: 18px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: var(--radius-md);
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}

.progress-bar-bg {
  width: 100%;
  height: 8px;
  background: var(--bg-subtle);
  border-radius: 9999px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--primary);
  width: 0%;
  border-radius: 9999px;
  transition: width 150ms ease;
}

/* -------------------------------------------------------------------------- */
/* Terminal & Build Logs (Refined Dark Box for Pristine Code Contrast)       */
/* -------------------------------------------------------------------------- */
.terminal-section {
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.terminal-header {
  background: #18181b;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.terminal-title {
  font-family: var(--font-en);
  font-size: 12.5px;
  font-weight: 600;
  color: #d4d4d8;
  direction: ltr;
}

.terminal-body {
  background: #09090b;
  color: #ededed;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.7;
  padding: 18px;
  max-height: 340px;
  overflow-y: auto;
  direction: ltr;
  text-align: left;
}

.terminal-line {
  margin-bottom: 4px;
  word-break: break-all;
}

/* Deployment Result Card */
.deployment-result {
  background: #ffffff;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding: 24px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.result-icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--success-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.result-info {
  flex: 1;
}

.result-info h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.result-subtext {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.link-box {
  display: flex;
  gap: 10px;
  align-items: center;
}

.link-box input {
  flex: 1;
  background: var(--bg-subtle);
  border: 1px solid rgba(0, 0, 0, 0.10);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-main);
  direction: ltr;
}

/* -------------------------------------------------------------------------- */
/* Deployments List Grid                                                      */
/* -------------------------------------------------------------------------- */
.deployments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 8px;
}

.deployment-card {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: all 140ms ease;
}

.deployment-card:hover {
  border-color: rgba(0, 0, 0, 0.16);
  box-shadow: var(--shadow-elevated);
}

.deployment-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.deploy-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.deploy-badge {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.deploy-meta h4 {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 3px;
  word-break: break-all;
}

.deploy-subinfo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-muted);
}

.deploy-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.project-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.project-card-header h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}

.project-id-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.api-key-chip {
  display: block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-main);
  background: var(--bg-subtle);
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  word-break: break-all;
}

.project-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.badge-tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono);
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

/* -------------------------------------------------------------------------- */
/* Database & Micro-BaaS View                                                 */
/* -------------------------------------------------------------------------- */
.main-db-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.auth-card {
  max-width: 440px;
  margin: 40px auto;
}

.auth-header {
  text-align: center;
  margin-bottom: 24px;
}

.auth-icon {
  font-size: 36px;
  margin-bottom: 10px;
}

.auth-tabs {
  display: flex;
  background: var(--bg-subtle);
  padding: 4px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.auth-tab-btn {
  flex: 1;
  padding: 8px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
}

.auth-tab-btn.active {
  background: #ffffff;
  color: var(--text-main);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.auth-form .form-group {
  margin-bottom: 16px;
}

.auth-msg {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 12.5px;
  margin-bottom: 16px;
  font-weight: 500;
}

.profile-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.profile-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar-box {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.profile-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quota-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 9999px;
  background: var(--bg-subtle);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--text-muted);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.project-card {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: all 140ms ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.project-card:hover {
  border-color: rgba(0, 0, 0, 0.16);
  box-shadow: var(--shadow-elevated);
}

.project-inner-tabs {
  display: flex;
  background: var(--bg-subtle);
  padding: 4px;
  border-radius: var(--radius-lg);
  gap: 4px;
  margin: 18px 0;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.inner-tab {
  flex: 1;
  padding: 8px 14px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 120ms ease;
}

.inner-tab.active {
  background: #ffffff;
  color: var(--text-main);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.code-preview {
  background: #09090b;
  color: #a7f3d0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 18px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  direction: ltr;
  text-align: left;
  line-height: 1.6;
}

/* -------------------------------------------------------------------------- */
/* Visual Data Explorer & Table                                               */
/* -------------------------------------------------------------------------- */
.explorer-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-md);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th {
  background: var(--bg-subtle);
  padding: 12px 14px;
  text-align: right;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  color: var(--text-main);
}

.data-table tr:hover td {
  background: rgba(0, 0, 0, 0.015);
}

/* -------------------------------------------------------------------------- */
/* Dedicated Layout Classes                                                   */
/* -------------------------------------------------------------------------- */
.agent-grid-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 16px;
}

.analytics-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

/* -------------------------------------------------------------------------- */
/* Theme Picker & 30 Modular Features Configurator                            */
/* -------------------------------------------------------------------------- */
.theme-active-pill {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 9999px;
  background: var(--bg-subtle);
  border: 1px solid var(--card-border);
  color: var(--text-main);
}

.theme-picker-grid {
  display: flex;
  overflow-x: auto;
  gap: 8px;
  padding: 4px 4px 10px 4px;
  scrollbar-width: thin;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.theme-card {
  flex: 0 0 auto;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--card-border);
  border-radius: 9999px;
  cursor: pointer;
  transition: all 140ms ease;
  font-family: inherit;
  outline: none;
  scroll-snap-align: start;
}

.theme-card:hover {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.25);
  transform: translateY(-1px);
}

.theme-card.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.theme-card.active .theme-card-name {
  color: #ffffff;
}

.theme-swatch {
  display: flex;
  gap: 3px;
  align-items: center;
}

.swatch-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.theme-card-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
}

/* Feature Configurator */
.feature-count-badge {
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 9999px;
  background: var(--accent-blue-subtle);
  color: var(--accent-blue);
  border: 1px solid rgba(2, 132, 199, 0.2);
}

.preset-pill-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-preset {
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--card-border);
  background: var(--bg-subtle);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 120ms ease;
  font-family: inherit;
}

.btn-preset:hover {
  color: var(--text-main);
  border-color: rgba(0, 0, 0, 0.2);
}

.btn-preset.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.feat-cat-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}

.feat-cat-tab {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--card-border);
  background: #ffffff;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 120ms ease;
  font-family: inherit;
}

.feat-cat-tab:hover {
  color: var(--text-main);
  background: var(--bg-subtle);
}

.feat-cat-tab.active {
  background: var(--bg-subtle);
  color: var(--text-main);
  border-color: rgba(0, 0, 0, 0.25);
  font-weight: 700;
}

.features-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 10px;
}

.feature-check-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 120ms ease;
  user-select: none;
}

.feature-check-card:hover {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.15);
}

.feature-check-card:has(input:checked) {
  background: #ffffff;
  border-color: var(--accent-blue);
  box-shadow: 0 1px 4px rgba(2, 132, 199, 0.08);
}

.feature-check-card input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 3px;
  accent-color: var(--primary);
  cursor: pointer;
}

.check-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.feat-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
}

.feat-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Footer */
.app-footer {
  margin-top: 48px;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ==========================================================================
   Mobile-First Anti-Slop Responsive System (320px – 768px Viewports)
   ========================================================================== */
@media (max-width: 768px) {
  :root {
    --radius-xl: 18px;
    --radius-lg: 14px;
    --radius-md: 10px;
  }

  /* Viewport Safe Areas & Bottom Floating Navigation Offset */
  .app-container {
    padding: 12px 12px 100px 12px;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  /* Header Compact Mode */
  .app-header {
    padding: 12px 14px;
    margin-bottom: 16px;
    border-radius: var(--radius-lg);
    width: 100%;
    box-sizing: border-box;
  }

  .logo-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
  }

  .logo-title {
    font-size: 15px;
    white-space: nowrap;
  }

  .logo-subtitle {
    display: none; /* Prevent vertical overflow on small screens */
  }

  .header-badges {
    display: none; /* Merged into compact header */
  }

  /* Responsive Tab Text Switching */
  .tab-text-desktop {
    display: none;
  }

  .tab-text-mobile {
    display: inline;
  }

  /* Floating Ergonomic Pill Navigation Bar (Thumb Docked 30% Zone) */
  .nav-tabs {
    position: fixed;
    bottom: 14px;
    left: 12px;
    right: 12px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 9999px;
    padding: 4px;
    display: flex;
    box-shadow: 0 12px 36px -4px rgba(0, 0, 0, 0.14), 0 4px 12px -2px rgba(0, 0, 0, 0.08);
    box-sizing: border-box;
    gap: 4px;
  }

  .nav-tab {
    flex: 1;
    min-width: 0;
    padding: 9px 4px;
    font-size: 11.5px;
    font-weight: 600;
    justify-content: center;
    border-radius: 9999px;
    white-space: nowrap;
    gap: 4px;
  }

  .nav-tab.active {
    background: #18181b;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  }

  /* Glass Card Padding & Typography */
  .glass-card {
    padding: 18px 14px;
    border-radius: var(--radius-lg);
  }

  .card-title {
    font-size: 15.5px;
  }

  /* Inputs: 16px font-size to prevent iOS auto-zoom */
  .text-input, .select-input {
    font-size: 16px !important;
    padding: 12px 14px;
    min-height: 48px;
  }

  .btn {
    min-height: 46px;
    font-size: 13.5px;
  }

  /* Dropzone Mobile */
  .dropzone {
    padding: 28px 12px;
  }

  .dropzone-primary-text {
    font-size: 13.5px;
  }

  /* Terminal Mobile */
  .terminal-body {
    padding: 12px;
    font-size: 11.5px;
    max-height: 260px;
  }

  /* Deployment Result Mobile */
  .deployment-result {
    flex-direction: column;
    padding: 16px;
    gap: 12px;
  }

  .link-box {
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }

  .link-box input, .link-box .btn, .link-box a {
    width: 100%;
    text-align: center;
  }

  /* Deployments Grid & Cards Mobile */
  .deployments-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .deployment-card {
    padding: 14px;
  }

  .deploy-actions {
    flex-direction: column;
    width: 100%;
    gap: 6px;
  }

  .deploy-actions .btn {
    width: 100%;
  }

  /* AI Architect Mobile Layout (1 Column Stack) */
  .agent-grid-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Database View Mobile */
  .profile-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .profile-actions {
    width: 100%;
    justify-content: space-between;
  }

  .profile-actions .btn {
    flex: 1;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .project-card-actions {
    flex-direction: column;
  }

  .project-card-actions .btn {
    width: 100%;
  }

  /* Project Detail Header Mobile */
  .detail-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .detail-header-actions {
    width: 100%;
    display: flex;
    gap: 8px;
  }

  .detail-header-actions .btn {
    flex: 1;
  }

  /* Inner Tabs Mobile (Horizontal Scrollable Strip) */
  .project-inner-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    padding: 4px;
  }

  .inner-tab {
    flex: none;
    padding: 8px 12px;
    font-size: 12px;
  }

  /* Analytics Grid 2x2 on Mobile */
  .analytics-stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  /* Table Mobile Scroll */
  .table-responsive {
    -webkit-overflow-scrolling: touch;
  }

  .data-table th, .data-table td {
    padding: 10px 8px;
    font-size: 11.5px;
  }

  .explorer-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .explorer-actions {
    display: flex;
    flex-direction: column;
    width: 100%;
  }

  .explorer-actions .btn {
    width: 100%;
  }

  /* Studio Theme & Features Mobile */
  .theme-picker-grid {
    display: flex;
    overflow-x: auto;
    gap: 6px;
    padding-bottom: 6px;
  }

  .theme-card {
    padding: 6px 10px;
    gap: 6px;
  }

  .theme-card-name {
    font-size: 11px;
    white-space: nowrap;
  }

  .features-checkbox-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .preset-pill-group {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }

  .btn-preset {
    flex-shrink: 0;
  }
}

/* ==========================================================================
   My Platforms (پلتفرم‌های من) — Porcelain Hub Styling
   ========================================================================== */

/* Streamlined Header Bar */
.platforms-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}

.platforms-title-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.platforms-title-row-top {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.platform-scope-tabs {
  display: inline-flex;
  align-items: center;
  background: var(--bg-subtle, #f4f4f5);
  padding: 3px;
  border-radius: 12px;
  border: 1px solid var(--card-border, #e4e4e7);
  gap: 3px;
}

.scope-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: var(--text-muted, #71717a);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 140ms ease;
  font-family: inherit;
}

.scope-tab-btn:hover {
  color: var(--text-main, #18181b);
}

.scope-tab-btn.active {
  background: #ffffff;
  color: var(--text-main, #18181b);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.scope-count-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.06);
  color: inherit;
}

.scope-tab-btn.active .scope-count-pill {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

.platforms-title-block .card-title {
  font-size: 19px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.platforms-count-badge {
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 9999px;
  background: var(--bg-subtle);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
}

.platforms-telemetry-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.telemetry-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.telemetry-separator {
  color: var(--card-border);
  font-size: 10px;
}

.status-badge-ok {
  color: var(--success);
  font-weight: 600;
}

.btn-create-platform {
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-md);
}

/* Platforms Toolbar */
.platforms-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 240px;
}

.filter-pills-row {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.filter-pill {
  padding: 6px 14px;
  border-radius: 9999px;
  border: 1px solid var(--card-border);
  background: #ffffff;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 120ms ease;
  white-space: nowrap;
}

.filter-pill:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
}

.filter-pill.active {
  background: #18181b;
  color: #ffffff;
  border-color: #18181b;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

/* Platforms Grid */
.platforms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 16px;
}

.platform-card {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 140ms cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  gap: 14px;
}

.platform-card:hover {
  border-color: rgba(0, 0, 0, 0.14);
  box-shadow: var(--shadow-elevated);
  transform: translateY(-2px);
}

.platform-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.platform-avatar {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}

.platform-title-block {
  flex: 1;
  min-width: 0;
}

.platform-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.platform-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
  line-height: 1.35;
}

.btn-more-menu {
  background: transparent;
  border: none;
  color: var(--text-subtle);
  font-size: 15px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all 120ms ease;
  letter-spacing: 2px;
  line-height: 1;
}

.btn-more-menu:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
}

.search-icon-symbol {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  pointer-events: none;
  opacity: 0.6;
}

.search-input-wrap .text-input {
  padding-right: 36px !important;
}

.platform-meta {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  line-height: 1.4;
}

.platform-meta-date {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  direction: rtl;
}

.meta-sep {
  color: var(--card-border);
  font-size: 8px;
}

.platform-sub-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-muted);
  padding-top: 10px;
  margin-top: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.04);
  flex-wrap: wrap;
}

.platform-theme-badge,
.platform-feat-badge,
.platform-records-badge {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary, #64748b);
  white-space: nowrap;
}

.platform-records-badge {
  color: #059669;
  font-weight: 600;
}

.platform-status-dot-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--success);
  font-weight: 600;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
  animation: pulseEmerald 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
  display: inline-block;
  flex-shrink: 0;
}

@keyframes pulseEmerald {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 5px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.platform-actions-row {
  display: flex;
  gap: 8px;
  width: 100%;
  padding-top: 12px;
  border-top: 1px solid var(--card-border);
  align-items: center;
}

.platform-btn-main {
  flex: 1;
  min-height: 40px;
  font-size: 12.5px;
  font-weight: 600;
  background: #18181b;
  color: #ffffff !important;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
  transition: all 140ms ease;
  border: 1px solid #18181b;
}

.platform-btn-main:hover {
  background: #09090b;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.platform-btn-modular {
  flex: 1;
  min-height: 40px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #059669 !important;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: all 140ms cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  font-family: inherit;
}

.platform-btn-modular:hover {
  background: #10b981;
  color: #ffffff !important;
  border-color: #10b981;
  transform: translateY(-1px);
  box-shadow: 0 3px 12px rgba(16, 185, 129, 0.28);
}

.platform-btn-db {
  min-height: 40px;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 600;
  background: #ffffff;
  border: 1px solid var(--card-border);
  color: var(--text-main);
  border-radius: var(--radius-md);
  justify-content: center;
  cursor: pointer;
}
  border-radius: var(--radius-md);
  justify-content: center;
}

/* Dropdown Context Menu */
.platform-dropdown-menu {
  position: absolute;
  top: 44px;
  left: 16px;
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-modal);
  padding: 5px;
  min-width: 170px;
  z-index: 100;
  animation: modalFadeIn 120ms ease-out;
}

.dropdown-item {
  width: 100%;
  text-align: right;
  padding: 8px 10px;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-main);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background 100ms ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dropdown-item:hover {
  background: var(--bg-subtle);
}

.dropdown-item.text-danger {
  color: var(--error);
}

.dropdown-item.text-danger:hover {
  background: var(--error-subtle);
}

.dropdown-divider {
  height: 1px;
  background: var(--card-border);
  margin: 4px 0;
}

/* Modal Overlay & Card */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 20px;
}

.modal-card {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.35), 0 0 1px rgba(0, 0, 0, 0.15);
  width: 100%;
  max-width: 440px;
  padding: 24px;
  animation: modalFadeIn 180ms ease-out;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.modal-close {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--text-subtle);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
}

.modal-close:hover {
  color: var(--text-main);
  background: var(--bg-subtle);
}

/* Responsive Overrides for Platforms View */
@media (max-width: 768px) {
  .app-container {
    padding: 10px 10px 140px 10px !important;
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  /* Section Card Mobile */
  #platformsView,
  #platformsView .glass-card,
  .platforms-section {
    padding: 14px 12px !important;
    border-radius: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  /* Header & Top CTA */
  .platforms-header-bar {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    margin-bottom: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .platforms-header-bar > div {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .platforms-header-bar h2.card-title {
    font-size: 16px !important;
    line-height: 1.3 !important;
    margin-bottom: 4px !important;
    white-space: normal !important;
    word-break: break-word !important;
  }

  .platforms-header-bar p.card-desc {
    font-size: 11.5px !important;
    line-height: 1.5 !important;
    color: var(--text-muted) !important;
    text-wrap: balance !important;
    white-space: normal !important;
  }

  #btnPlatformsCreateNew {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 48px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    justify-content: center !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12) !important;
    white-space: normal !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }

  /* Telemetry Strip Mobile */
  .platforms-telemetry-strip {
    font-size: 11px !important;
    padding: 8px 12px !important;
    border-radius: 10px !important;
    gap: 6px 10px !important;
    flex-wrap: wrap !important;
    margin-bottom: 12px !important;
    line-height: 1.5 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Search & Filter Toolbar Mobile */
  .platforms-toolbar {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    margin-bottom: 14px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .search-input-wrap {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  #searchPlatformsInput {
    height: 44px !important;
    font-size: 13.5px !important;
    padding: 0 14px 0 36px !important;
    border-radius: 12px !important;
    min-height: 44px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .filter-pills-row {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    padding: 2px 0 6px 0 !important;
    scrollbar-width: none !important;
    box-sizing: border-box !important;
  }

  .filter-pills-row::-webkit-scrollbar {
    display: none;
  }

  .filter-pill {
    flex-shrink: 0 !important;
    padding: 6px 12px !important;
    font-size: 11.5px !important;
    min-height: 34px !important;
    display: inline-flex !important;
    align-items: center !important;
    box-sizing: border-box !important;
  }

  /* Platform Cards Mobile - Decluttered White Porcelain */
  .platforms-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .platform-card {
    padding: 14px 12px !important;
    border-radius: 14px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    overflow: visible !important; /* Allow popover menu to anchor */
    position: relative !important;
  }

  .platform-card-header {
    display: flex !important;
    align-items: flex-start !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .platform-avatar {
    width: 36px !important;
    height: 36px !important;
    font-size: 15px !important;
    border-radius: 10px !important;
    flex-shrink: 0 !important;
  }

  .platform-title-block {
    flex: 1 !important;
    min-width: 0 !important;
    max-width: calc(100% - 46px) !important;
  }

  .platform-title-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 6px !important;
    width: 100% !important;
  }

  .platform-title {
    font-size: 13.5px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    white-space: normal !important;
    word-break: break-word !important;
    flex: 1 !important;
    min-width: 0 !important;
    color: var(--text-main) !important;
  }

  .btn-more-menu {
    width: 32px !important;
    height: 32px !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--text-muted) !important;
    flex-shrink: 0 !important;
  }

  .platform-sub-info {
    font-size: 11px !important;
    color: var(--text-muted) !important;
    margin-top: 4px !important;
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    max-width: 100% !important;
    line-height: 1.4 !important;
  }

  .platform-sub-info .info-sep {
    color: var(--card-border) !important;
    font-size: 10px !important;
  }

  .platform-status-indicator {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    font-weight: 600 !important;
  }

  .platform-status-indicator.online {
    color: var(--success) !important;
  }

  .platform-status-indicator.pending {
    color: #b45309 !important;
  }

  /* Action Buttons Mobile: 2 Clean Touch Targets (Primary + Secondary) */
  .platform-actions-row {
    display: flex !important;
    flex-direction: row !important;
    gap: 8px !important;
    margin-top: 4px !important;
    padding-top: 10px !important;
    border-top: 1px solid var(--card-border) !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .platform-btn-main {
    flex: 2 !important;
    min-height: 42px !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    justify-content: center !important;
    border-radius: 10px !important;
    background: #18181b !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
  }

  .platform-btn-db {
    flex: 1 !important;
    min-height: 42px !important;
    padding: 0 8px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    justify-content: center !important;
    border-radius: 10px !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    box-sizing: border-box !important;
    background: #ffffff !important;
    color: var(--text-main) !important;
    border: 1px solid var(--card-border) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
  }

  /* Popover Dropdown on Mobile */
  .platform-dropdown-menu {
    top: 46px !important;
    left: 8px !important;
    right: auto !important;
    min-width: 160px !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15) !important;
  }
}

/* ==========================================================================
   AI Studio Golden Prompt & Porcelain Preview Engine
   ========================================================================== */

.agent-result-container {
  background: var(--bg-subtle);
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  min-height: 440px;
}

.agent-result-header {
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.agent-empty-box,
.agent-loading-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 40px 16px;
}

.agent-success-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Synthesized Meta Card */
.synthesized-meta-card {
  padding: 12px 16px;
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.meta-label {
  color: var(--text-muted);
  font-size: 12px;
  margin-left: 4px;
}

.meta-name {
  color: var(--text-main);
  font-weight: 700;
  font-size: 13.5px;
}

.meta-sub-row {
  font-size: 12px;
}

.meta-collections {
  color: var(--accent-blue);
  font-weight: 600;
}

/* 3-Step Guided Roadmap */
.guided-steps-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  gap: 8px;
}

.guided-step {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.guided-step.active .step-num {
  background: #18181b;
  border-color: #18181b;
  color: #ffffff;
}

.step-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.step-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
}

.step-desc {
  font-size: 10.5px;
  color: var(--text-muted);
  white-space: nowrap;
}

.step-arrow {
  color: var(--text-subtle);
  font-size: 14px;
  user-select: none;
}

/* Hero Actions */
.agent-hero-actions {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.btn-copy-hero {
  flex: 1.4;
  min-height: 46px;
  font-size: 13.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #18181b;
  color: #ffffff;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  transition: all 140ms ease;
}

.btn-copy-hero:hover {
  background: #27272a;
  transform: translateY(-1px);
}

.btn-aistudio-hero {
  flex: 1;
  min-height: 46px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #ffffff;
  color: var(--text-main);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 140ms ease;
}

.btn-aistudio-hero:hover {
  background: var(--bg-subtle);
  border-color: rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

/* Porcelain RTL Readable Prompt Preview Card */
.ai-prompt-preview-card {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.85;
  color: var(--text-main);
  direction: rtl;
  text-align: right;
  max-height: 320px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.02);
}

.ai-prompt-preview-card pre,
.ai-prompt-preview-card code {
  direction: ltr;
  text-align: left;
  font-family: var(--font-mono);
  background: var(--bg-subtle);
  padding: 2px 6px;
  border-radius: 4px;
}

.agent-footer-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 6px;
  gap: 10px;
}

/* Deploy Tab Banners */
.deploy-active-project-banner {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.08) 0%, rgba(56, 189, 248, 0.04) 100%);
  border: 1px solid rgba(2, 132, 199, 0.25);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  animation: modalFadeIn 180ms ease-out;
}

.banner-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.banner-content {
  flex: 1;
  min-width: 0;
}

.banner-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 3px;
}

.banner-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  background: var(--accent-blue);
  color: #ffffff;
}

.banner-proj-name {
  font-size: 13.5px;
  color: var(--text-main);
}

.banner-subtext {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

.btn-banner-clear {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-subtle);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  line-height: 1;
}

.btn-banner-clear:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-main);
}

.deploy-auth-notice {
  background: #fffbeb;
  border: 1px solid rgba(217, 119, 6, 0.25);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.notice-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.notice-content {
  flex: 1;
  min-width: 200px;
}

.notice-content strong {
  font-size: 13px;
  color: #92400e;
  display: block;
  margin-bottom: 2px;
}

.notice-content p {
  font-size: 11.5px;
  color: #b45309;
  margin: 0;
}

/* Feature card text clipping defense */
.feature-check-card {
  min-width: 0;
}

.feature-check-card .check-info {
  min-width: 0;
  flex: 1;
}

.feature-check-card .feat-title {
  word-break: break-word;
  overflow-wrap: break-word;
}

@media (max-width: 768px) {
  .guided-steps-card {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .step-arrow {
    display: none;
  }
  .agent-hero-actions {
    flex-direction: column;
  }
  .agent-hero-actions .btn {
    width: 100%;
  }
  .deploy-auth-notice {
    flex-direction: column;
    align-items: stretch;
  }
  .deploy-auth-notice .btn {
    width: 100%;
  }
}

/* ==========================================================================
   Universal AI Studio & Infinite Remix Engine — Component Styles
   ========================================================================== */

/* 3-Step Guided Stepper Track */
.stepper-track-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  gap: 12px;
}

.stepper-step {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  opacity: 0.55;
  transition: opacity 140ms ease;
}

.stepper-step.active {
  opacity: 1;
}

.stepper-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 1.5px solid var(--card-border);
  color: var(--text-muted);
  font-weight: 800;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: var(--font-mono);
}

.stepper-step.active .stepper-circle {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
}

.stepper-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.stepper-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stepper-sub {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stepper-divider {
  width: 36px;
  height: 1px;
  background: var(--card-border);
  flex-shrink: 0;
}

/* Showcase Gallery Grid */
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.showcase-card {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 140ms ease;
  min-width: 0;
}

.showcase-card:hover {
  border-color: rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
}

.showcase-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.showcase-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--card-border);
}

.showcase-badge.badge-student { background: rgba(2, 132, 199, 0.08); color: #0284c7; border-color: rgba(2, 132, 199, 0.2); }
.showcase-badge.badge-partner { background: rgba(225, 29, 72, 0.08); color: #e11d48; border-color: rgba(225, 29, 72, 0.2); }
.showcase-badge.badge-lifestyle { background: rgba(217, 119, 6, 0.08); color: #d97706; border-color: rgba(217, 119, 6, 0.2); }
.showcase-badge.badge-business { background: rgba(16, 185, 129, 0.08); color: #10b981; border-color: rgba(16, 185, 129, 0.2); }
.showcase-badge.badge-education { background: rgba(99, 102, 241, 0.08); color: #6366f1; border-color: rgba(99, 102, 241, 0.2); }
.showcase-badge.badge-games { background: rgba(139, 92, 246, 0.08); color: #8b5cf6; border-color: rgba(139, 92, 246, 0.2); }

.showcase-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
  line-height: 1.4;
}

.showcase-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 12px;
  min-height: 38px;
}

.showcase-pills-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.showcase-pill {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.btn-remix-hero {
  width: 100%;
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--bg-subtle);
  color: var(--text-main);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 140ms ease;
}

.btn-remix-hero:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* Mega-Cluster Filter Pills */
.mega-cluster-pills-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.cluster-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 9999px;
  background: var(--bg-subtle);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: all 120ms ease;
  min-height: 36px;
}

.cluster-pill-btn:hover {
  background: #ffffff;
  color: var(--text-main);
  border-color: rgba(0, 0, 0, 0.2);
}

.cluster-pill-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.cluster-pill-btn[data-cluster="viral"] {
  border-color: rgba(236, 72, 153, 0.35);
  background: rgba(236, 72, 153, 0.04);
  color: #db2777;
}

.cluster-pill-btn[data-cluster="viral"].active {
  background: #db2777;
  color: #ffffff;
  border-color: #db2777;
}

/* 150 Categories Selection Grid */
.categories-30-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
  min-height: 52px;
  max-height: 240px;
  overflow-y: auto;
  padding: 4px 2px;
  scrollbar-width: thin;
}

.category-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  color: var(--text-main);
  cursor: pointer;
  text-align: right;
  font-family: inherit;
  transition: all 120ms ease;
  min-height: 48px;
}

.category-card:hover {
  background: #fafafa;
  border-color: rgba(0, 0, 0, 0.25);
  transform: translateY(-1px);
}

.category-card.active {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 1.5px var(--primary), 0 2px 6px rgba(0, 0, 0, 0.06);
  font-weight: 700;
}

.cat-card-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.cat-card-text {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cat-card-title {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cat-card-cluster {
  font-size: 9.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Active Category Banner */
.cat-active-banner-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fbfbfc;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin: 10px 0 14px 0;
  flex-wrap: wrap;
  gap: 10px;
}

.cat-active-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cat-active-icon {
  font-size: 26px;
  line-height: 1;
}

.cat-active-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
}

.cat-cluster-tag {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 9999px;
  background: #f4f4f5;
  color: #52525b;
  border: 1px solid #e4e4e7;
}

.cat-active-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

/* Custom AI Chips */
.custom-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f0fdf4;
  color: #166534;
  border: 1px solid rgba(22, 101, 52, 0.2);
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  animation: modalFadeIn 140ms ease-out;
}

.custom-chip-remove {
  background: none;
  border: none;
  color: #166534;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
  margin-right: 2px;
}

.custom-chip-remove:hover {
  color: #dc2626;
}

@media (max-width: 1200px) {
  .categories-30-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 900px) {
  .categories-30-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .stepper-track-card {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .stepper-divider {
    display: none;
  }
}

@media (max-width: 600px) {
  .categories-30-grid {
    grid-template-columns: repeat(2, 1fr);
    max-height: 280px;
  }
}

/* ==========================================================================
   Header Actions, Wallet Badge & Universal Auth / Store Modals
   Linear & Apple White Luxury Design Tokens (theme-white-porcelain)
   ========================================================================== */

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.system-status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  font-size: 11px;
  font-weight: 600;
  color: #10b981;
}

.system-status-indicator .status-indicator-text {
  font-size: 11px;
  color: #10b981;
}

/* Wallet Indicator Badge */
.wallet-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  font-size: 13px;
  color: var(--text-main);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: all 0.2s ease;
  cursor: pointer;
}

.wallet-badge:hover {
  border-color: var(--card-border-hover);
  background: #ffffff;
}

/* Guest Wallet Indicator State */
.wallet-badge.guest-wallet {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.12);
}

.wallet-badge.guest-wallet:hover {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.6);
  transform: translateY(-1px);
}

.wallet-guest-strip {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 700;
  color: #10b981;
}

.empty-platforms-guest-state {
  transition: all 0.25s ease;
}

.wallet-stat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.wallet-icon {
  font-size: 14px;
}

.wallet-value {
  font-weight: 700;
  color: var(--text-main);
  font-size: 13px;
}

.wallet-label {
  font-size: 11px;
  color: var(--text-muted);
}

.wallet-divider {
  width: 1px;
  height: 16px;
  background: rgba(0, 0, 0, 0.1);
}

.btn-charge {
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-charge:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

/* User Account Trigger Button */
.user-account-widget {
  position: relative;
}

.btn-auth-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 15px;
  border-radius: var(--radius-md);
  background: #ffffff;
  border: 1px solid var(--card-border);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.btn-auth-trigger:hover {
  background: var(--bg-subtle);
  border-color: var(--card-border-hover);
}

.btn-user-avatar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 8px;
  border-radius: var(--radius-md);
  background: #ffffff;
  border: 1px solid var(--card-border);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-user-avatar:hover {
  background: var(--bg-subtle);
}

.user-avatar-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.user-display-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chevron-icon {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
}

/* User Dropdown Popover */
.user-dropdown-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 200px;
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-modal);
  padding: 6px;
  z-index: 1000;
  animation: fadeIn 0.15s ease-out;
}

.dropdown-header {
  padding: 8px 10px;
}

.dropdown-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.dropdown-email {
  font-size: 11px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-divider {
  height: 1px;
  background: var(--card-border);
  margin: 4px 0;
}

.dropdown-item {
  width: 100%;
  text-align: right;
  padding: 8px 10px;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s ease;
}

.dropdown-item:hover {
  background: var(--bg-subtle);
}

.dropdown-item.text-danger {
  color: var(--error);
}

.dropdown-item.text-danger:hover {
  background: var(--error-subtle);
}

/* ==========================================================================
   Modals: Universal Auth Modal & Pricing Store Modal
   ========================================================================== */

.studio-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease-out;
}

.studio-modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.studio-modal-card {
  width: 100%;
  max-width: 520px;
  background: #ffffff !important;
  background-color: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.35), 0 0 1px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  transform: scale(0.97) translateY(6px);
  transition: transform 0.15s ease-out;
  direction: rtl;
  position: relative;
  z-index: 100000;
}

.studio-modal-backdrop.active .studio-modal-card {
  transform: scale(1) translateY(0);
}

.modal-header-luxury {
  padding: 24px 24px 16px 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid var(--card-border);
}

.modal-title-group h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.modal-title-group p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.btn-modal-close {
  background: var(--bg-subtle);
  border: 1px solid var(--card-border);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-modal-close:hover {
  color: var(--text-main);
  background: #e4e4e7;
}

.modal-body-luxury {
  padding: 24px;
}

/* Auth Segmented Switch */
.auth-segmented-nav {
  display: flex;
  background: var(--bg-subtle);
  padding: 4px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  gap: 4px;
}

.auth-nav-btn {
  flex: 1;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-nav-btn.active {
  background: #ffffff;
  color: var(--text-main);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Form Groups */
.auth-form-group {
  margin-bottom: 16px;
}

.auth-form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.auth-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input {
  width: 100%;
  padding: 12px 14px;
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 14px;
  color: var(--text-main);
  outline: none;
  transition: all 0.2s ease;
}

.auth-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.08);
}

.auth-input.font-mono {
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
}

.btn-primary-action {
  width: 100%;
  padding: 13px 20px;
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.btn-primary-action:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

.btn-primary-action:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.auth-alert-box {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  margin-bottom: 16px;
  display: none;
}

.auth-alert-box.error {
  display: block;
  background: var(--error-subtle);
  color: var(--error);
  border: 1px solid rgba(225, 29, 72, 0.2);
}

.auth-alert-box.success {
  display: block;
  background: var(--success-subtle);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Pricing Grid in Modal */
.pricing-modal-card {
  max-width: 860px;
}

.pricing-balance-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--text-main);
  border: 1px solid var(--card-border);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.pricing-card {
  background: #ffffff !important;
  background-color: #ffffff !important;
  opacity: 1 !important;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s ease;
  position: relative;
}

.pricing-card:hover {
  border-color: rgba(0, 0, 0, 0.25);
  transform: translateY(-2px);
  box-shadow: var(--shadow-elevated);
}

.pricing-card.featured {
  border: 2px solid var(--primary);
  background: #fafafa !important;
  background-color: #fafafa !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.pricing-badge-popular {
  position: absolute;
  top: -12px;
  right: 18px;
  background: var(--primary);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.02em;
}

.pricing-card-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
}

.pricing-card-coins {
  font-size: 22px;
  font-weight: 900;
  color: var(--text-main);
  margin: 12px 0 6px 0;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.pricing-card-coins span {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.pricing-card-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-blue);
  margin-bottom: 16px;
}

.pricing-features {
  list-style: none;
  border-top: 1px solid var(--card-border);
  padding-top: 14px;
  margin-bottom: 20px;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pricing-features li::before {
  content: "✓";
  color: var(--success);
  font-weight: bold;
}

.btn-buy-package {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-buy-package:hover {
  background: #e4e4e7;
}

.pricing-card.featured .btn-buy-package {
  background: var(--primary);
  color: #ffffff;
  border: none;
}

.pricing-card.featured .btn-buy-package:hover {
  background: var(--primary-hover);
}

.pricing-guarantee-footer {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  padding-top: 10px;
  border-top: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

@media (max-width: 768px) {
  .pricing-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .app-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .header-actions {
    justify-content: space-between;
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
  }
  .studio-modal-card {
    width: 94%;
    max-height: 92vh;
    margin: auto;
  }
  .modal-header-luxury,
  .modal-body-luxury {
    padding: 16px;
  }
  .pricing-balance-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* ==========================================================================
   SPLIT WORKSPACE: Live Preview & Conversational Agent Layout
   ========================================================================== */
.split-workspace-box {
  width: 100%;
  margin-top: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.workspace-header {
  padding: 12px 18px;
  background: #ffffff;
  border: 1px solid var(--card-border, #e2e8f0);
  border-bottom: 1px solid var(--card-border, #e2e8f0);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.status-pulse-live {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10b981;
  display: inline-block;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
  animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.ws-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.workspace-split-body {
  display: grid;
  grid-template-columns: 380px 1fr;
  border: 1px solid var(--card-border, #e2e8f0);
  border-top: none;
  background: #ffffff;
  min-height: 600px;
}

.workspace-chat-pane {
  border-left: 1px solid var(--card-border, #e2e8f0);
  display: flex;
  flex-direction: column;
  background: #fafafa;
  position: relative;
}

.quick-chips-bar {
  padding: 8px 12px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  background: #ffffff;
  scrollbar-width: thin;
}

.quick-chips-bar::-webkit-scrollbar {
  height: 4px;
}

.quick-chips-bar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.chip-btn {
  white-space: nowrap;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.chip-btn:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
  transform: translateY(-1px);
}

.workspace-chat-history {
  flex: 1;
  padding: 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 460px;
  scrollbar-width: thin;
}

.workspace-chat-input-bar {
  padding: 10px 12px;
  background: #ffffff;
  border-top: 1px solid var(--card-border, #e2e8f0);
}

.workspace-preview-pane {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #ffffff;
}

#wsIframeWrapper {
  flex: 1;
  width: 100%;
  height: 100%;
  position: relative;
  min-height: 540px;
}

#workspaceLiveIframe {
  width: 100%;
  height: 100%;
  min-height: 540px;
  border: none;
  display: block;
}

#wsIframeLoader {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(2px);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  z-index: 10;
}

#wsDataExplorerDrawer {
  border-top: 1px solid var(--card-border, #e2e8f0);
  background: #ffffff;
  max-height: 300px;
  overflow-y: auto;
}

@media (max-width: 900px) {
  .workspace-split-body {
    grid-template-columns: 1fr;
  }
  .workspace-chat-pane {
    border-left: none;
    border-bottom: 1px solid var(--card-border, #e2e8f0);
  }
  #workspaceLiveIframe,
  #wsIframeWrapper {
    min-height: 480px;
  }
}

/* ==========================================================================
   Dana Visual Data Studio (کاوشگر بصری داده‌ها و گرید هوشمند)
   ========================================================================== */
#contentExplorer .data-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}

#contentExplorer .data-table thead th {
  background: rgba(15, 23, 42, 0.85);
  color: #94a3b8;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

#contentExplorer .data-table tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 12.5px;
  color: #f1f5f9;
  vertical-align: middle;
}

#contentExplorer .data-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.record-json-badge {
  display: inline-block;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: monospace;
  font-size: 11px;
  background: rgba(15, 23, 42, 0.6);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.2);
  padding: 3px 8px;
  border-radius: 6px;
}

#recordModalOverlay,
#aiSeedModalOverlay {
  animation: fadeInModal 150ms ease-out;
}

@keyframes fadeInModal {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.chip-prompt {
  font-size: 11px !important;
  padding: 4px 10px !important;
  border-radius: 9999px !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: var(--text-muted) !important;
  cursor: pointer;
  transition: all 120ms ease;
}

.chip-prompt:hover {
  background: rgba(168, 85, 247, 0.15) !important;
  border-color: rgba(168, 85, 247, 0.4) !important;
  color: #c084fc !important;
  transform: translateY(-1px);
}

/* ==========================================================================
   Dana Visual Media Studio (Asset & Media Hub)
   ========================================================================== */

.media-dropzone:hover,
.media-dropzone.dragover {
  border-color: var(--accent-blue) !important;
  background: rgba(2, 132, 199, 0.06) !important;
  transform: translateY(-1px);
}

.media-filter-btn {
  background: #ffffff;
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 120ms ease;
}

.media-filter-btn:hover {
  border-color: rgba(0, 0, 0, 0.15);
  color: var(--text-main);
}

.media-filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.media-card {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.media-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-elevated);
  border-color: var(--card-border-hover);
}

.media-card-thumb-wrap {
  width: 100%;
  height: 160px;
  background: var(--bg-subtle);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
}

.media-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 200ms ease;
}

.media-card:hover .media-card-img {
  transform: scale(1.03);
}

.media-card-icon-preview {
  font-size: 42px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text-muted);
}

.media-card-type-chip {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 8px;
  font-size: 10.5px;
  font-weight: 700;
  border-radius: 6px;
  backdrop-filter: blur(6px);
  text-transform: uppercase;
}

.chip-img { background: rgba(16, 185, 129, 0.9); color: #ffffff; }
.chip-video { background: rgba(139, 92, 246, 0.9); color: #ffffff; }
.chip-audio { background: rgba(2, 132, 199, 0.9); color: #ffffff; }
.chip-doc { background: rgba(217, 119, 6, 0.9); color: #ffffff; }

.media-card-dims-chip {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.65);
  color: #ffffff;
  padding: 2px 6px;
  font-size: 10px;
  font-family: var(--font-mono);
  border-radius: 4px;
}

.media-card-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.media-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  direction: ltr;
  text-align: right;
  margin-bottom: 6px;
}

.media-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.media-size-info {
  display: flex;
  align-items: center;
  gap: 6px;
}

.media-size-orig {
  text-decoration: line-through;
  color: var(--text-subtle);
  font-size: 10.5px;
}

.media-size-opt {
  font-weight: 700;
  color: var(--accent-blue);
  font-family: var(--font-mono);
}

.media-savings-pill {
  background: var(--success-subtle);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono);
}

.media-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  border-top: 1px solid var(--card-border);
  padding-top: 10px;
}

.media-btn-action {
  font-size: 11px;
  padding: 5px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
}

#mediaPreviewModalOverlay {
  animation: fadeInModal 150ms ease-out;
}




/* ==========================================================================
   PROGRESSIVE MODULAR STUDIO & COIN ECONOMY (LEGO CANVAS & SUPERPOWERS)
   ========================================================================== */

.modular-studio-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 1040px;
  margin: 0 auto;
  width: 100%;
}

.modular-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 20px;
  padding: 36px 32px;
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.05), 0 2px 6px rgba(0, 0, 0, 0.02);
  position: relative;
}

@media (max-width: 640px) {
  .modular-card {
    padding: 24px 16px;
    border-radius: 16px;
  }
}

.modular-hero-banner {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 32px auto;
}

.modular-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 9999px;
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 700;
  color: #2563eb;
  margin-bottom: 16px;
}

.modular-title {
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  line-height: 1.35;
}

.modular-subtitle {
  font-size: 14.5px;
  color: #64748b;
  line-height: 1.65;
  margin: 0;
}

.modular-input-card {
  background: #f8fafc;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  padding: 24px;
  max-width: 760px;
  margin: 0 auto;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.modular-input-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 10px;
}

.modular-input-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

@media (max-width: 640px) {
  .modular-input-row {
    flex-direction: column;
    align-items: stretch;
  }
}

.modular-text-input {
  flex: 1;
  height: 48px;
  min-height: 48px;
  border-radius: 12px;
  font-size: 13.5px;
  padding: 0 16px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: all 0.15s ease;
}

.modular-text-input:focus {
  border-color: #2563eb;
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.modular-action-btn {
  height: 48px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #0f172a;
  color: #ffffff;
  border: 1px solid #0f172a;
  cursor: pointer;
  transition: all 0.15s ease;
}

.modular-action-btn:hover {
  background: #1e293b;
  transform: translateY(-1px);
}

.modular-hints {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
  align-items: center;
}

.hint-tag {
  cursor: pointer;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.hint-tag:hover {
  background: #f1f5f9;
  border-color: rgba(0, 0, 0, 0.18);
  color: #0f172a;
  transform: translateY(-1px);
}

.modular-loading-state {
  text-align: center;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: #64748b;
  font-size: 14px;
}

.spinner-modern {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(0, 0, 0, 0.08);
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.modular-results-area {
  margin-top: 32px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding-top: 28px;
}

.modular-steps-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #f8fafc;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 9999px;
  padding: 6px 16px;
  margin: 0 auto 28px auto;
  max-width: fit-content;
  direction: rtl;
}

@media (max-width: 640px) {
  .modular-steps-nav {
    gap: 6px;
    padding: 6px 10px;
    width: 100%;
    justify-content: space-between;
  }
}

.step-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 9999px;
  transition: all 0.15s ease;
}

.step-nav-item.active {
  color: #0f172a;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.step-num {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #0f172a;
  font-size: 10.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono, monospace);
}

.step-nav-item.active .step-num {
  background: #0f172a;
  color: #ffffff;
}

.step-nav-sep {
  color: #cbd5e1;
  font-size: 11px;
}

.modular-section-header {
  margin-bottom: 20px;
  direction: rtl;
  text-align: right;
}

.modular-section-header h3 {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modular-section-header p {
  font-size: 13px;
  color: #64748b;
  margin: 0;
}

.modular-name-picker-row {
  background: #f8fafc;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  padding: 14px 18px;
  margin: 0 0 24px 0;
  display: flex;
  align-items: center;
  gap: 14px;
  direction: rtl;
}

@media (max-width: 640px) {
  .modular-name-picker-row {
    flex-direction: column;
    align-items: stretch;
  }
}

.modular-name-picker-row label {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  white-space: nowrap;
}

.modular-name-picker-row input {
  flex: 1;
  height: 42px;
  border-radius: 10px;
  padding: 0 14px;
  font-size: 13.5px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #ffffff;
  color: #0f172a;
  transition: all 0.15s ease;
}

.modular-name-picker-row input:focus {
  border-color: #2563eb;
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.archetypes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  direction: rtl;
  text-align: right;
  width: 100%;
}

.archetype-card {
  position: relative;
  background: #ffffff;
  border: 1.5px solid rgba(0, 0, 0, 0.07);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  direction: rtl;
  text-align: right;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  cursor: pointer;
}

.archetype-card:hover {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 12px 28px -6px rgba(0, 0, 0, 0.07);
  transform: translateY(-2px);
}

.archetype-card.is-selected {
  border-color: #2563eb !important;
  background: rgba(37, 99, 235, 0.02) !important;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.22), 0 8px 24px -4px rgba(37, 99, 235, 0.12) !important;
}

.archetype-card.recommended {
  border-color: rgba(16, 185, 129, 0.3);
}

.archetype-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.1);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.archetype-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 16px;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.archetype-title {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.archetype-desc {
  font-size: 13px;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.archetype-btn-submit {
  height: 44px;
  min-height: 44px;
  width: 100%;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #0f172a;
  color: #ffffff;
  border: 1px solid #0f172a;
  cursor: pointer;
  transition: all 0.15s ease;
}

.archetype-btn-submit:hover {
  background: #1e293b;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

/* --- AI MATCHED CATEGORY BANNER --- */
.matched-category-banner {
  background: #f8fafc;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 16px;
  padding: 18px 22px;
  margin-bottom: 28px;
  direction: rtl;
  text-align: right;
  position: relative;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.04);
}

.matched-cat-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #2563eb;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.18);
  padding: 3px 10px;
  border-radius: 9999px;
  margin-bottom: 10px;
}

.matched-cat-content {
  display: flex;
  align-items: center;
  gap: 14px;
}

.matched-cat-icon {
  font-size: 32px;
  line-height: 1;
}

.matched-cat-text {
  flex: 1;
}

.matched-cat-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.matched-cat-title-row h4 {
  font-size: 16.5px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.matched-cat-text p {
  font-size: 13px;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

/* --- AI SPECIALIZED TOOLS (900 CATALOG) --- */
.badge-tools-count {
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.08);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

/* --- SELECTION TOOLBARS --- */
.tools-selection-actions-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tools-btn-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-tool-select-all,
.btn-tool-deselect-all {
  background: #f8fafc;
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #334155;
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 32px;
}

.btn-tool-select-all:hover {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.25);
  color: #2563eb;
}

.btn-tool-deselect-all:hover {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.25);
  color: #dc2626;
}

.specialized-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 14px;
  direction: rtl;
  text-align: right;
}

.specialized-tool-card {
  background: #ffffff;
  border: 1.5px solid rgba(0, 0, 0, 0.07);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  direction: rtl;
  text-align: right;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  cursor: pointer;
  position: relative;
  user-select: none;
}

.specialized-tool-card:hover {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.06);
  transform: translateY(-1px);
}

.specialized-tool-card.is-selected {
  border-color: #2563eb;
  background: rgba(37, 99, 235, 0.02);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2), 0 4px 14px rgba(37, 99, 235, 0.08);
}

.tool-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.tool-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.tool-checkbox-custom {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border-radius: 6px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: transparent;
  transition: all 0.15s ease;
}

.specialized-tool-card.is-selected .tool-checkbox-custom {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

.tool-icon {
  font-size: 20px;
}

.tool-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.tool-cat-pill {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 9999px;
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid rgba(0, 0, 0, 0.06);
  white-space: nowrap;
}

.tool-desc {
  font-size: 12.5px;
  color: #64748b;
  line-height: 1.55;
  margin-bottom: 12px;
}

.tool-reason-box {
  background: #fffbeb;
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  color: #92400e;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.tool-reason-box strong {
  color: #b45309;
  white-space: nowrap;
}

/* --- RECOMMENDED LEGO COMMERCE BLOCKS --- */
.recommended-lego-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 14px;
  direction: rtl;
  text-align: right;
}

.recommended-lego-card {
  background: #ffffff;
  border: 1.5px solid rgba(0, 0, 0, 0.07);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  direction: rtl;
  text-align: right;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  position: relative;
  user-select: none;
}

.recommended-lego-card:hover {
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.06);
  transform: translateY(-1px);
}

.recommended-lego-card.is-selected {
  border-color: #059669;
  background: rgba(16, 185, 129, 0.02);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2), 0 4px 14px rgba(16, 185, 129, 0.08);
}

.recommended-lego-card.is-selected .tool-checkbox-custom {
  background: #059669;
  border-color: #059669;
  color: #ffffff;
}

.rec-lego-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.rec-lego-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rec-lego-coin-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 9999px;
  background: rgba(245, 158, 11, 0.1);
  color: #b45309;
}

.rec-lego-desc {
  font-size: 12.5px;
  color: #64748b;
  line-height: 1.55;
  margin-bottom: 10px;
}

.rec-lego-reason {
  font-size: 11.5px;
  color: #047857;
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.18);
  border-radius: 6px;
  padding: 6px 10px;
  line-height: 1.45;
}

/* --- FLOATING MODULAR LAUNCH BAR --- */
.modular-launch-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 980px;
  z-index: 1000;
  margin: 0;
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 0, 0, 0.09);
  border-radius: 18px;
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  direction: rtl;
  text-align: right;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

#modularArchetypesArea {
  padding-bottom: 110px;
}

.launch-bar-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.launch-bar-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.launch-bar-icon {
  font-size: 20px;
}

.launch-bar-title {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
}

.launch-bar-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: #64748b;
  flex-wrap: wrap;
}

.meta-dot {
  color: #cbd5e1;
}

.meta-free-coins {
  color: #b45309;
  font-weight: 700;
  background: rgba(245, 158, 11, 0.1);
  padding: 2px 8px;
  border-radius: 6px;
}

.btn-launch-project {
  min-height: 46px;
  padding: 10px 22px;
  font-size: 13.5px;
  font-weight: 700;
  border-radius: 12px;
  background: #0f172a;
  color: #ffffff !important;
  border: 1px solid #0f172a;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.2);
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-launch-project:hover {
  background: #1e293b;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.3);
}

.btn-launch-project:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Archetype Card Active Selection */
.archetype-card.is-selected {
  border-color: #2563eb !important;
  background: rgba(37, 99, 235, 0.02) !important;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.22), 0 8px 24px -4px rgba(37, 99, 235, 0.12) !important;
}

/* --- CANVAS VIEW STYLES --- */
.modular-canvas-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  margin-bottom: 24px;
}

.canvas-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.canvas-project-name {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
  margin: 0;
}

.badge-status-online {
  background: rgba(16, 185, 129, 0.08);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 9999px;
  padding: 4px 12px;
  font-size: 11.5px;
  font-weight: 700;
}

.project-id-chip {
  background: #f1f5f9;
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  color: #64748b;
}

.canvas-project-meta {
  font-size: 13px;
  color: #64748b;
  margin: 4px 0 0 0;
}

.active-superpowers-bar {
  background: #f8fafc;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  padding: 18px 22px;
  margin-bottom: 26px;
}

.active-powers-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 12px;
}

.active-chips-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.active-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 9999px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  color: #047857;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  min-height: 36px;
}

.catalog-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 18px;
}

.catalog-title {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 4px 0;
}

.catalog-subtitle {
  font-size: 13px;
  color: #64748b;
  margin: 0;
}

.catalog-balance-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 9999px;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 700;
  color: #b45309;
}

.modular-filter-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 22px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.modular-filter-bar::-webkit-scrollbar {
  display: none;
}

.modular-filter-chip {
  height: 38px;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 9999px;
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #ffffff;
  color: #64748b;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.modular-filter-chip:hover {
  border-color: rgba(0, 0, 0, 0.2);
  color: #0f172a;
  background: #f8fafc;
}

.modular-filter-chip.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.15);
}

.modular-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.superpower-card {
  background: #ffffff;
  border: 1.5px solid rgba(0, 0, 0, 0.07);
  border-radius: 16px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.superpower-card:hover {
  border-color: rgba(0, 0, 0, 0.2);
  box-shadow: 0 10px 24px -6px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.superpower-card.is-installed {
  background: rgba(16, 185, 129, 0.015);
  border-color: rgba(16, 185, 129, 0.25);
}

.card-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.card-icon-badge {
  font-size: 22px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.card-price-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 700;
  color: #b45309;
}

.card-title-text {
  font-size: 15.5px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 6px;
}

.card-benefit-text {
  font-size: 13px;
  color: #64748b;
  line-height: 1.55;
  margin-bottom: 18px;
  flex-grow: 1;
}

.card-btn-action {
  height: 42px;
  min-height: 42px;
  width: 100%;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.card-btn-action.btn-installed {
  background: rgba(16, 185, 129, 0.08);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.3);
  cursor: default;
}

.card-btn-action.btn-add {
  background: #0f172a;
  color: #ffffff;
  border: 1px solid #0f172a;
}

.card-btn-action.btn-add:hover {
  background: #1e293b;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

/* --- DELIVERY MODAL STYLES --- */
.modular-delivery-card {
  border-radius: var(--radius-xl);
}

.delivery-success-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  color: #047857;
  margin-bottom: 8px;
}

/* --- LIVE APP READY CARD IN DELIVERY MODAL --- */
.delivery-live-app-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(37, 99, 235, 0.05) 100%), #ffffff;
  border: 1.5px solid rgba(16, 185, 129, 0.4);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 20px;
  direction: rtl;
  text-align: right;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.09);
}

.live-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.live-status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 800;
  color: #047857;
}

.live-dot-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: livePulse 1.8s infinite;
  display: inline-block;
}

@keyframes livePulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.live-fast-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
}

.live-card-text {
  font-size: 13px;
  color: var(--text-muted, #475569);
  line-height: 1.5;
  margin: 0 0 14px 0;
}

.live-url-box {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.live-url-text {
  color: #38bdf8;
  font-size: 13px;
  direction: ltr;
  text-align: left;
  word-break: break-all;
  text-decoration: none;
  font-weight: 600;
}

.live-url-text:hover {
  text-decoration: underline;
}

.btn-launch-live {
  min-height: 48px;
  width: 100%;
  border-radius: 12px;
  background: #16a34a;
  color: #ffffff !important;
  font-size: 15px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35);
  transition: all 0.2s ease;
}

.btn-launch-live:hover {
  background: #15803d;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(22, 163, 74, 0.45);
}

.launch-arrow {
  font-size: 16px;
  transition: transform 0.2s ease;
}

.btn-launch-live:hover .launch-arrow {
  transform: translate(-3px, -3px);
}

.delivery-coin-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background: var(--bg-subtle);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 10px 18px;
  margin-bottom: 16px;
  font-size: 13px;
}

.coin-status-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.coin-status-divider {
  width: 1px;
  height: 18px;
  background: var(--card-border);
}

.text-danger { color: #dc2626 !important; }
.text-success { color: #16a34a !important; }

.delivery-quick-guide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(2, 132, 199, 0.05);
  border: 1px solid rgba(2, 132, 199, 0.2);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 18px;
  gap: 8px;
}

@media (max-width: 640px) {
  .delivery-quick-guide {
    flex-direction: column;
    align-items: stretch;
  }
  .guide-arrow {
    display: none;
  }
}

.guide-step {
  display: flex;
  align-items: center;
  gap: 8px;
}

.step-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-blue);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

.step-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
}

.guide-arrow {
  color: var(--accent-blue);
  font-weight: 700;
  font-size: 14px;
}

.delivery-prompt-box {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
}

.prompt-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #161b22;
  padding: 8px 14px;
  border-bottom: 1px solid #30363d;
  color: #8b949e;
  font-size: 12px;
  font-weight: 600;
}

.btn-copy-inline {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: #c9d1d9;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-copy-inline:hover {
  background: rgba(255,255,255,0.15);
  color: #ffffff;
}

.delivery-prompt-code {
  color: #e6edf3;
  padding: 16px;
  font-size: 12.5px;
  line-height: 1.6;
  max-height: 220px;
  overflow-y: auto;
  margin: 0;
  direction: ltr;
  text-align: left;
  white-space: pre-wrap;
  font-family: var(--font-mono);
}

.delivery-actions-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-copy-hero {
  height: 48px;
  min-height: 44px;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

/* ==========================================================================
   HERO AI PROMPT BUILDER & SHOWCASE GALLERY (Apple / Linear Porcelain)
   ========================================================================== */

.hero-prompt-section {
  width: 100%;
  margin-bottom: 8px;
}

.hero-header-wrap {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 24px auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(2, 132, 199, 0.08);
  border: 1px solid rgba(2, 132, 199, 0.2);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-blue);
  margin-bottom: 14px;
}

.hero-headline {
  font-size: 32px;
  font-weight: 900;
  color: var(--text-main);
  line-height: 1.35;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  text-wrap: balance;
}

.hero-subline {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 620px;
  margin: 0 auto;
}

.hero-prompt-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  padding: 22px 26px;
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0,0,0,0.02);
  transition: all 0.25s ease;
  max-width: 920px;
  margin: 0 auto;
}

.hero-prompt-card:focus-within {
  border-color: rgba(24, 24, 27, 0.35);
  box-shadow: 0 20px 48px -12px rgba(0, 0, 0, 0.1), 0 0 0 4px rgba(24, 24, 27, 0.04);
}

.prompt-input-wrapper {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.hero-prompt-textarea {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-fa);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-main);
  resize: none;
  min-height: 80px;
  padding: 4px 0 12px 0;
  direction: rtl;
}

.hero-prompt-textarea::placeholder {
  color: var(--text-subtle);
  font-weight: 400;
}

.prompt-bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  flex-wrap: wrap;
  gap: 12px;
}

.prompt-bottom-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-subtle);
}

.hint-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
}

.btn-hero-generate {
  background: #18181b;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 12px 24px;
  font-size: 13.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
  min-height: 44px;
}

.btn-hero-generate:hover {
  background: #000000;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
}

.hero-chips-header {
  margin-top: 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-subtle);
}

.hero-quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.quick-chip {
  background: var(--bg-subtle);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.18s ease;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.quick-chip:hover {
  background: #18181b;
  color: #ffffff;
  border-color: #18181b;
  transform: translateY(-1px);
}

.hero-dev-drawer-link {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed rgba(0, 0, 0, 0.08);
  font-size: 12px;
  color: var(--text-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-toggle-zip {
  background: none;
  border: none;
  color: var(--accent-blue);
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  padding: 4px 6px;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.btn-toggle-zip:hover {
  background: var(--accent-blue-subtle);
}

/* ==========================================================================
   SEGMENTED INGRESS SWITCHER & FLUID FEATURE DOCKING (Apple/Linear Style)
   ========================================================================== */

.hero-ingress-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-subtle, #f4f4f5);
  padding: 5px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  width: fit-content;
  margin: 0 auto 20px auto;
}

.ingress-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 10px;
  border: none;
  background: transparent;
  font-family: var(--font-fa);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted, #71717a);
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.ingress-tab-btn:hover {
  color: var(--text-main, #18181b);
}

.ingress-tab-btn.active {
  background: #ffffff;
  color: #18181b;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.ingress-view {
  animation: ingressFade 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes ingressFade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Compact Inline Style Popover */
.inline-style-popover-wrap {
  position: relative;
  display: inline-block;
}

.btn-style-popover-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-subtle, #f4f4f5);
  border: 1px solid var(--card-border, #e4e4e7);
  border-radius: 10px;
  padding: 6px 12px;
  font-family: var(--font-fa);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-main, #18181b);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-style-popover-trigger:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.15);
}

.chevron-sm {
  font-size: 10px;
  opacity: 0.6;
}

.style-popover-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.04);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 170px;
}

.popover-title {
  font-size: 11px;
  font-weight: 700;
  color: #71717a;
  padding: 4px 8px 6px 8px;
  border-bottom: 1px solid #f4f4f5;
  margin-bottom: 4px;
}

.style-popover-menu .style-preset-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  font-family: var(--font-fa);
  font-size: 12px;
  font-weight: 600;
  color: #27272a;
  cursor: pointer;
  text-align: right;
  transition: all 0.15s ease;
}

.style-popover-menu .style-preset-btn:hover {
  background: #f4f4f5;
}

.style-popover-menu .style-preset-btn.active {
  background: #eff6ff;
  border-color: rgba(37, 99, 235, 0.25);
  color: #2563eb;
  font-weight: 700;
}

/* Studio Direct Ingress View */
.studio-direct-ingress-card {
  padding: 24px 20px;
  text-align: center;
}

.studio-direct-header {
  max-width: 580px;
  margin: 0 auto 20px auto;
}

.studio-badge-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  background: #6366f1;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-bottom: 12px;
}

.studio-direct-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main, #18181b);
  margin-bottom: 8px;
}

.studio-direct-desc {
  font-size: 13px;
  color: var(--text-muted, #71717a);
  line-height: 1.6;
}

.studio-direct-action-box {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

.btn-studio-direct-primary {
  background: #4f46e5;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 12px 28px;
  font-family: var(--font-fa);
  font-size: 13.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.25);
  transition: all 0.2s ease;
}

.btn-studio-direct-primary:hover {
  background: #4338ca;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.35);
}

/* ZIP Direct Ingress View */
.zip-direct-ingress-card {
  padding: 20px;
}

.zip-dropzone-box {
  border: 2px dashed rgba(0, 0, 0, 0.12);
  border-radius: 16px;
  padding: 32px 20px;
  text-align: center;
  background: rgba(0, 0, 0, 0.015);
  transition: all 0.2s ease;
}

.zip-dropzone-box:hover, .zip-dropzone-box.drag-over {
  border-color: rgba(37, 99, 235, 0.7);
  background: rgba(37, 99, 235, 0.05);
  transform: scale(1.005);
}

.zip-dropzone-icon {
  font-size: 36px;
  display: block;
  margin-bottom: 10px;
}

.zip-dropzone-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main, #18181b);
  margin-bottom: 6px;
}

.zip-dropzone-sub {
  font-size: 12px;
  color: var(--text-muted, #71717a);
  margin-bottom: 16px;
}

.btn-zip-select {
  background: #18181b;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 10px 22px;
  font-family: var(--font-fa);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-zip-select:hover {
  background: #000000;
}

/* Below Hero Templates Section */
.below-hero-templates-section {
  max-width: 920px;
  margin: 36px auto 0 auto;
  padding: 0 4px;
}

.templates-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 12px;
}

.templates-section-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.templates-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted, #71717a);
}

.btn-modular-customizer-link {
  background: none;
  border: none;
  color: var(--text-muted, #71717a);
  font-family: var(--font-fa);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.btn-modular-customizer-link:hover {
  color: #18181b;
  background: rgba(0, 0, 0, 0.04);
}

/* ==========================================================================
   HERO AUTONOMOUS BUILD PROGRESS & CUSTOMIZER LINK
   ========================================================================== */

.hero-build-progress-wrap {
  margin-top: 14px;
  padding: 14px 18px;
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.22);
  border-radius: 12px;
  animation: heroFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-build-steps-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 8px;
}

.build-step-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-subtle);
  transition: all 0.25s ease;
}

.build-step-item.active {
  color: #059669;
  font-weight: 700;
}

.build-step-item.completed {
  color: #059669;
  font-weight: 600;
}

.step-num-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-subtle);
  transition: all 0.25s ease;
  font-family: var(--font-fa);
}

.build-step-item.active .step-num-circle {
  background: #10b981;
  color: #ffffff;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
  animation: pulseCircle 1.2s infinite;
}

@keyframes pulseCircle {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.build-step-item.completed .step-num-circle {
  background: #10b981;
  color: #ffffff;
}

.step-divider-line {
  flex: 1;
  height: 2px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 2px;
}

.build-live-status-text {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  background: #ffffff;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.07);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.hero-customizer-shortcut {
  margin-top: 10px;
  display: flex;
  justify-content: center;
}

.btn-modular-customizer-link {
  background: none;
  border: none;
  color: var(--text-subtle);
  font-size: 12px;
  cursor: pointer;
  padding: 6px 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 6px;
  transition: all 0.15s ease;
  font-family: inherit;
}

.btn-modular-customizer-link:hover {
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.03);
}

.btn-hero-generate:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
}

/* ==========================================================================
   SHOWCASE GALLERY SECTION (Linear Porcelain Grid)
   ========================================================================== */

.showcase-gallery-section {
  width: 100%;
  margin-top: 28px;
  margin-bottom: 24px;
}

.gallery-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 16px;
}

.gallery-title-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gallery-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--warning);
  background: var(--warning-subtle);
  padding: 4px 10px;
  border-radius: 14px;
  width: fit-content;
  margin-bottom: 2px;
}

.gallery-title {
  font-size: 21px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.gallery-desc {
  font-size: 13px;
  color: var(--text-muted);
}

.gallery-filter-tabs {
  display: flex;
  gap: 5px;
  background: var(--bg-subtle);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  overflow-x: auto;
  max-width: 100%;
}

.filter-tab {
  background: none;
  border: none;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.filter-tab:hover {
  color: var(--text-main);
}

.filter-tab.active {
  background: #ffffff;
  color: var(--text-main);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.showcase-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 22px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  min-height: 240px;
}

.showcase-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px -6px rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.12);
}

.showcase-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.showcase-app-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.showcase-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.showcase-category-pill {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 3px 8px;
  border-radius: 6px;
}

.showcase-status-dot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: var(--success);
  background: var(--success-subtle);
  padding: 3px 8px;
  border-radius: 6px;
}

.showcase-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
  line-height: 1.4;
}

.showcase-summary {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.showcase-superpowers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}

.power-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 3px 8px;
  border-radius: 6px;
}

.showcase-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.btn-showcase-preview {
  flex: 1;
  height: 40px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #ffffff;
  color: var(--text-main);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn-showcase-preview:hover {
  background: var(--bg-subtle);
  border-color: rgba(0, 0, 0, 0.2);
}

.btn-showcase-remix {
  flex: 1.3;
  height: 40px;
  border: none;
  background: #18181b;
  color: #ffffff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-showcase-remix:hover {
  background: #000000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

@media (max-width: 768px) {
  .hero-headline {
    font-size: 24px;
  }
  .hero-prompt-card {
    padding: 16px 18px;
  }
  .prompt-bottom-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .btn-hero-generate {
    width: 100%;
    justify-content: center;
  }
  .showcase-grid {
    grid-template-columns: 1fr;
  }
  .gallery-header-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .gallery-filter-tabs {
    width: 100%;
    overflow-x: auto;
  }
}

/* ==========================================================================
   AI Intent Context Banner & Domain Recommendations (Modular Canvas)
   ========================================================================== */
.modular-ai-context-banner {
  margin: 16px 0 20px 0;
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(99, 102, 241, 0.05) 100%);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.05);
}

.ai-banner-content {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ai-banner-icon-box {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.ai-banner-text-wrap {
  flex: 1;
}

.ai-banner-tag-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

.ai-banner-badge {
  background: rgba(16, 185, 129, 0.18);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.35);
  font-size: 11px;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 6px;
}

.ai-banner-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main, #0f172a);
}

.ai-banner-cluster-pill {
  font-size: 11px;
  color: var(--text-muted, #64748b);
  background: rgba(0, 0, 0, 0.05);
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 600;
}

.ai-banner-desc {
  font-size: 12.5px;
  color: var(--text-muted, #475569);
  line-height: 1.6;
  margin: 0;
}

/* Canvas Specialized Tools Section (900-Catalog AI Selection) */
.canvas-specialized-tools-area {
  margin: 20px 0 24px 0;
  padding: 16px;
  background: var(--bg-card, #ffffff);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 14px;
}

.canvas-tools-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.tools-header-title {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-main, #1e293b);
  display: flex;
  align-items: center;
  gap: 8px;
}

.tools-count-badge {
  background: rgba(99, 102, 241, 0.12);
  color: #4f46e5;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 10px;
}

.tools-header-hint {
  font-size: 11.5px;
  color: var(--text-muted, #64748b);
}

.canvas-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}

.canvas-tool-chip-card {
  background: rgba(248, 250, 252, 0.85);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tool-chip-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.tool-chip-icon {
  font-size: 15px;
}

.tool-chip-title {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text-main, #1e293b);
  flex: 1;
}

.tool-chip-status {
  font-size: 10px;
  font-weight: 800;
  color: #059669;
  background: rgba(16, 185, 129, 0.12);
  padding: 1px 6px;
  border-radius: 4px;
}

.tool-chip-desc {
  font-size: 11.5px;
  color: var(--text-muted, #64748b);
  margin: 0;
  line-height: 1.5;
}

.tool-chip-reason {
  font-size: 11px;
  color: #4338ca;
  background: rgba(99, 102, 241, 0.08);
  border-radius: 6px;
  padding: 4px 7px;
  margin-top: 4px;
  display: flex;
  align-items: flex-start;
  gap: 4px;
  line-height: 1.45;
}

/* AI Recommended Superpower Cards in Catalog */
.superpower-card.is-ai-recommended {
  border: 1.5px solid rgba(16, 185, 129, 0.38) !important;
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.035) 0%, var(--bg-card, #ffffff) 100%) !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.08) !important;
}

.ai-superpower-rec-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(16, 185, 129, 0.14);
  color: #047857;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  margin-bottom: 8px;
  border: 1px solid rgba(16, 185, 129, 0.28);
}

.card-ai-reason {
  margin-top: 8px;
  padding: 6px 9px;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.07);
  border-right: 3px solid #10b981;
  font-size: 11.5px;
  color: #065f46;
  display: flex;
  align-items: flex-start;
  gap: 5px;
  line-height: 1.5;
}

.card-ai-reason .reason-icon {
  flex-shrink: 0;
}

.card-ai-reason .reason-text {
  font-weight: 500;
}

/* --- MINIMALIST 2-BUTTON DELIVERY MODAL (ZERO-SLOP UX) --- */
.delivery-minimal-body {
  padding: 24px 28px 20px;
}

.delivery-hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0 20px;
}

.btn-hero-action {
  height: 52px;
  min-height: 48px;
  border-radius: 14px;
  font-size: 15.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  box-sizing: border-box;
}

.btn-hero-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.2);
}

.btn-hero-action:active {
  transform: translateY(0);
}

.btn-hero-aistudio {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #ffffff !important;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.15);
}

.btn-hero-aistudio:hover {
  background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 8px 28px rgba(99, 102, 241, 0.25);
  color: #ffffff !important;
}

.hero-btn-arrow {
  margin-right: auto;
  font-size: 1.25rem;
  opacity: 0.8;
  transition: transform 0.2s ease;
}

.btn-hero-aistudio:hover .hero-btn-arrow {
  transform: translateX(-3px) translateY(-3px);
  opacity: 1;
}

.delivery-minimal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border-light, #e2e8f0);
}

.subtle-live-link {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--primary, #2563eb);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.subtle-live-link:hover {
  text-decoration: underline;
}

.btn-subtle-close {
  background: none;
  border: none;
  font-size: 12.5px;
  color: var(--text-muted, #64748b);
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn-subtle-close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-primary, #0f172a);
}

/* ==========================================================================
   MINIMAL DIRECT LAUNCH & DELIVERY SUCCESS CARD (ZERO-IFRAME)
   ========================================================================== */
.delivery-direct-success-card {
  max-width: 520px !important;
  width: 92vw !important;
  background: var(--bg-card, #ffffff) !important;
  border: 1px solid var(--card-border, rgba(226, 232, 240, 0.8)) !important;
  border-radius: 20px !important;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.04) !important;
  padding: 22px 24px !important;
  display: flex !important;
  flex-direction: column !important;
  animation: modalScaleIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
  position: relative !important;
}

[data-theme="dark"] .delivery-direct-success-card {
  background: #0f172a !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.7) !important;
}

.delivery-direct-body {
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  margin-top: 6px !important;
}

/* Golden Initial Prompt Section (For Google AI Studio) */
.delivery-golden-prompt-box {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  background: #f8fafc !important;
  border: 1px solid var(--card-border, rgba(0, 0, 0, 0.08)) !important;
  border-radius: 14px !important;
  padding: 12px 14px !important;
}

[data-theme="dark"] .delivery-golden-prompt-box {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

.golden-prompt-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

.golden-prompt-title {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: var(--text-main, #09090b) !important;
}

[data-theme="dark"] .golden-prompt-title {
  color: #f8fafc !important;
}

.golden-sparkle-dot {
  font-size: 15px !important;
}

.btn-subtle-aistudio {
  font-size: 11.5px !important;
  font-weight: 600 !important;
  color: var(--text-muted, #71717a) !important;
  background: #ffffff !important;
  border: 1px solid var(--card-border, rgba(0, 0, 0, 0.1)) !important;
  border-radius: 8px !important;
  padding: 4px 10px !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  transition: all 0.15s ease !important;
}

.btn-subtle-aistudio:hover {
  background: #f4f4f5 !important;
  color: var(--text-main, #09090b) !important;
}

[data-theme="dark"] .btn-subtle-aistudio {
  color: #cbd5e1 !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  background: #334155 !important;
}

.btn-copy-golden-prime {
  width: 100% !important;
  height: 42px !important;
  background: #ffffff !important;
  color: var(--text-main, #09090b) !important;
  border: 1px solid var(--card-border, rgba(0, 0, 0, 0.12)) !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  cursor: pointer !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
  transition: all 0.15s ease !important;
}

.btn-copy-golden-prime:hover {
  background: #f4f4f5 !important;
  transform: translateY(-0.5px) !important;
}

.btn-copy-golden-prime:active {
  transform: translateY(0.5px) !important;
}

.delivery-url-direct-box {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: #f8fafc !important;
  border: 1px solid var(--card-border, rgba(0, 0, 0, 0.08)) !important;
  border-radius: 12px !important;
  padding: 6px 10px !important;
}

[data-theme="dark"] .delivery-url-direct-box {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

.url-direct-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.delivery-url-direct-box .delivery-url-input {
  border: none !important;
  background: transparent !important;
  font-size: 12.5px !important;
  color: var(--text-main, #0f172a) !important;
  flex: 1 !important;
  outline: none !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
  direction: ltr !important;
}

[data-theme="dark"] .delivery-url-direct-box .delivery-url-input {
  color: #f1f5f9 !important;
}

.btn-copy-url-direct {
  background: #18181b !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 6px 14px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  white-space: nowrap !important;
  transition: all 0.15s ease !important;
  flex-shrink: 0 !important;
}

.btn-copy-url-direct:hover {
  background: #09090b !important;
}

[data-theme="dark"] .btn-copy-url-direct {
  background: #3b82f6 !important;
  color: #ffffff !important;
}

.btn-launch-live-prime {
  width: 100% !important;
  height: 48px !important;
  background: #18181b !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 12px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  text-decoration: none !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  cursor: pointer !important;
}

.btn-launch-live-prime:hover {
  transform: translateY(-1.5px) !important;
  background: #09090b !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25) !important;
  color: #ffffff !important;
}

.btn-launch-live-prime:active {
  transform: translateY(0.5px) !important;
}

.delivery-sub-actions-row {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

.btn-sub-pill {
  flex: 1 !important;
  min-width: 90px !important;
  height: 36px !important;
  background: var(--bg-subtle, #f1f5f9) !important;
  border: 1px solid var(--card-border, #e2e8f0) !important;
  color: var(--text-muted, #64748b) !important;
  border-radius: 10px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.btn-sub-pill:hover {
  background: var(--bg-card, #ffffff) !important;
  color: var(--text-main, #0f172a) !important;
  border-color: #cbd5e1 !important;
}

[data-theme="dark"] .btn-sub-pill {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #94a3b8 !important;
}

[data-theme="dark"] .btn-sub-pill:hover {
  background: #334155 !important;
  color: #f8fafc !important;
}

@media (max-width: 640px) {
  #evolutionDeliveryModal {
    align-items: flex-end !important;
    padding: 0 !important;
  }
  .delivery-direct-success-card {
    width: 100% !important;
    max-width: 100% !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    padding: 20px 16px calc(20px + env(safe-area-inset-bottom, 0px)) !important;
    margin: 0 !important;
    max-height: 85vh !important;
  }
}

.delivery-fullscreen-canvas {
  max-width: 520px !important;
  width: 92vw !important;
}

.delivery-header-luxury {
  padding-bottom: 12px !important;
  border-bottom: 1px solid var(--card-border) !important;
  margin-bottom: 12px !important;
}

.delivery-interactive-body {
  display: flex !important;
  flex-direction: column !important;
  overflow-y: auto !important;
  padding-right: 4px;
}

.delivery-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg-subtle, #f8fafc);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  border: 1px solid var(--card-border);
  flex-wrap: wrap;
}

.delivery-device-switcher {
  display: inline-flex;
  gap: 4px;
  background: #ffffff;
  padding: 3px;
  border-radius: 20px;
  border: 1px solid var(--card-border);
}

.device-switch-btn {
  padding: 4px 12px;
  border-radius: 16px;
  border: none;
  background: transparent;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.device-switch-btn.active {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.delivery-url-container {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  max-width: 480px;
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 3px 8px;
}

.delivery-url-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}

.delivery-url-input {
  border: none;
  background: transparent;
  font-size: 12px;
  color: var(--text-main);
  flex: 1;
  outline: none;
  text-overflow: ellipsis;
}

.btn-copy-url {
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  color: #2563eb;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.btn-copy-url:hover {
  background: #2563eb;
  color: #ffffff;
}

.btn-open-tab {
  font-size: 12px;
  font-weight: 700;
  color: #2563eb;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-open-tab:hover {
  text-decoration: underline;
}

.delivery-iframe-stage {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #0b0f17;
  border-radius: var(--radius-lg);
  padding: 14px;
  min-height: 480px;
  max-height: 56vh;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4);
}

.device-frame-shell {
  position: relative;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  background: #ffffff;
  display: flex;
  flex-direction: column;
}

.device-frame-shell.mobile-mode {
  width: 375px;
  height: 500px;
  border-radius: 36px;
  border: 8px solid #1e293b;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.device-frame-shell.desktop-mode {
  width: 100%;
  height: 500px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.device-speaker-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 16px;
  background: #1e293b;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
}

.notch-speaker {
  width: 36px;
  height: 3px;
  background: #475569;
  border-radius: 2px;
}

.notch-camera {
  width: 6px;
  height: 6px;
  background: #0284c7;
  border-radius: 50%;
}

.device-frame-shell.desktop-mode .device-speaker-notch {
  display: none;
}

.delivery-live-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  background: #ffffff;
}

.delivery-iframe-skeleton {
  position: absolute;
  inset: 0;
  background: #ffffff;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: opacity 0.3s ease;
}

.delivery-iframe-skeleton.loaded {
  opacity: 0;
  pointer-events: none;
  display: none !important;
}

.badge-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  display: inline-block;
}

.modal-badge-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.modal-badge-pill {
  font-size: 11px;
  font-weight: 700;
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.08);
  padding: 2px 8px;
  border-radius: 12px;
}

.delivery-actions-dock {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dock-primary-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-dock-action {
  flex: 1;
  min-width: 160px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  border-radius: var(--radius-md);
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-dock-action:hover {
  transform: translateY(-1px);
}

.delivery-qr-drawer {
  background: var(--bg-subtle, #f8fafc);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 14px;
  animation: fadeIn 0.25s ease;
}

.qr-drawer-content {
  display: flex;
  align-items: center;
  gap: 16px;
}

.qr-code-img-wrap {
  background: #ffffff;
  padding: 8px;
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-drawer-info strong {
  display: block;
  font-size: 14px;
  color: var(--text-main);
  margin-bottom: 4px;
}

.qr-drawer-info p {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ==========================================================================
   GOOGLE AI STUDIO CO-DEVELOPER & DIRECT DEPLOY HUB
   ========================================================================== */
.ai-studio-deploy-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(124, 58, 237, 0.08));
  border: 1px solid rgba(124, 58, 237, 0.22);
  border-radius: var(--radius-md, 12px);
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.ai-studio-strip-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ai-studio-strip-badge {
  background: #7c3aed;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
  letter-spacing: 0.2px;
}

.ai-studio-strip-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
}

.ai-studio-strip-desc {
  font-size: 11.5px;
  color: var(--text-muted);
}

.btn-open-ai-studio-hub {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #ffffff;
  border: none;
  padding: 7px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.25);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-open-ai-studio-hub:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35);
  filter: brightness(1.05);
}

/* Modal Dialog — Ultra-Minimalist Apple/Linear Architecture */
.ai-studio-modal-dialog {
  max-width: 660px;
  width: 92%;
  max-height: 88vh;
  overflow: hidden;
  border-radius: 22px;
  background: #ffffff;
  color: var(--text-main, #09090b);
  border: 1px solid var(--card-border, rgba(0, 0, 0, 0.08));
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
}

.ai-studio-minimal-header {
  padding: 16px 22px 14px;
  border-bottom: 1px solid var(--card-border, rgba(0, 0, 0, 0.06));
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
}

.ai-studio-minimal-header .modal-headline {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main, #09090b);
  margin: 3px 0 0 0;
}

.ai-studio-minimal-header .modal-badge-pill {
  font-size: 11px;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  padding: 2px 8px;
  border-radius: 6px;
}

.ai-studio-modal-body {
  padding: 16px 22px 24px;
  overflow-y: auto;
  flex: 1;
}

/* Compact Project Setup Card */
.ai-studio-project-setup-card {
  background: #f8fafc;
  border: 1px solid var(--card-border, rgba(0, 0, 0, 0.06));
  border-radius: 14px;
  padding: 10px 12px;
  margin-bottom: 14px;
  transition: all 0.2s ease;
}

.project-setup-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.project-setup-input {
  flex: 1;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--card-border, rgba(0, 0, 0, 0.1));
  background: #ffffff;
  color: var(--text-main, #09090b);
  font-size: 13px;
  transition: border-color 0.15s ease;
}

.project-setup-input:focus {
  outline: none;
  border-color: #18181b;
}

.btn-setup-project {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 10px;
  background: #18181b;
  color: #ffffff;
  border: none;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.btn-setup-project:hover {
  background: #09090b;
}

.btn-setup-project:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Active Project Status Bar */
.ai-studio-active-project-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 10px;
}

.active-bar-content {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.active-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #10b981;
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
}

.pulse-dot-green {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
  animation: pulseDot 1.5s infinite;
}

.active-project-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}

.active-project-meta strong {
  font-size: 13px;
  color: var(--text-main, #09090b);
}

.active-project-id {
  font-size: 11px;
  color: var(--text-muted, #71717a);
  background: rgba(0, 0, 0, 0.05);
  padding: 1px 6px;
  border-radius: 4px;
}

.collections-count-badge {
  font-size: 11px;
  font-weight: 600;
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  padding: 2px 6px;
  border-radius: 4px;
}

.btn-switch-project {
  background: #ffffff;
  border: 1px solid var(--card-border, rgba(0, 0, 0, 0.1));
  color: var(--text-main, #09090b);
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-switch-project:hover {
  background: #f4f4f5;
}

/* Loading state */
.project-setup-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #f8fafc;
  border-radius: 8px;
  font-size: 11.5px;
  color: var(--text-muted, #71717a);
  font-weight: 600;
}

.loading-spinner-sm {
  width: 13px;
  height: 13px;
  border: 2px solid rgba(0, 0, 0, 0.15);
  border-top-color: #18181b;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Segmented Tab Bar */
.ai-studio-tabs-bar {
  display: flex;
  gap: 3px;
  background: #f4f4f5;
  border: 1px solid var(--card-border, rgba(0, 0, 0, 0.06));
  border-radius: 12px;
  padding: 3px;
  margin-bottom: 14px;
}

.ai-studio-tab-btn {
  flex: 1;
  text-align: center;
  justify-content: center;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: var(--text-muted, #71717a);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.ai-studio-tab-btn:hover {
  color: var(--text-main, #09090b);
}

.ai-studio-tab-btn.active {
  background: #ffffff;
  color: var(--text-main, #09090b);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Tab 1: Instant Deploy Box */
.code-box-minimal {
  background: #f8fafc;
  border: 1px solid var(--card-border, rgba(0, 0, 0, 0.08));
  border-radius: 14px;
  overflow: hidden;
}

.code-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 14px;
  background: #ffffff;
  border-bottom: 1px solid var(--card-border, rgba(0, 0, 0, 0.06));
  font-size: 12px;
  color: var(--text-muted, #71717a);
}

.code-box-title {
  font-weight: 600;
}

.code-box-actions {
  display: flex;
  gap: 6px;
}

.btn-subtle-action {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--card-border, rgba(0, 0, 0, 0.1));
  background: #ffffff;
  color: var(--text-main, #09090b);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-subtle-action:hover {
  background: #f4f4f5;
}

.code-textarea {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text-main, #09090b);
  padding: 12px 14px;
  font-size: 12px;
  line-height: 1.5;
  resize: vertical;
  min-height: 140px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  direction: ltr;
  text-align: left;
}

.code-textarea:focus {
  outline: none;
}

.direct-deploy-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.deploy-status-row {
  font-size: 12px;
  color: var(--text-muted, #71717a);
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-submit-direct-deploy {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 12px;
  background: #18181b;
  color: #ffffff;
  border: none;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-submit-direct-deploy:hover {
  background: #09090b;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}

.btn-submit-direct-deploy:active {
  transform: translateY(0);
}

/* Tab 2: Minimalist Agent Action Cards */
.agent-actions-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.minimal-copy-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  transition: all 0.15s ease;
}

.minimal-copy-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.copy-card-badge {
  font-size: 10px;
  font-weight: 800;
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  padding: 1px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 2px;
}

.copy-card-text strong {
  font-size: 12.5px;
  color: #f8fafc;
  display: block;
}

.copy-card-text p {
  font-size: 11px;
  color: #94a3b8;
  margin: 1px 0 0;
}

.btn-copy-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 14px;
  border-radius: 8px;
  background: #10b981;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
}

.btn-copy-action:hover {
  filter: brightness(1.08);
}

.btn-copy-action.copied {
  background: #059669 !important;
}

.btn-copy-action.btn-sm {
  padding: 6px 12px;
  font-size: 11px;
}

/* Collapsible technical previews */
.minimal-code-details {
  margin-top: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.minimal-code-details summary {
  padding: 7px 12px;
  font-size: 11px;
  color: #94a3b8;
  cursor: pointer;
  font-weight: 600;
  user-select: none;
}

.minimal-code-details .code-spec-pre {
  margin: 0;
  padding: 10px;
  font-size: 11px;
  background: #06090e;
  color: #94a3b8;
  max-height: 110px;
  overflow-y: auto;
  direction: ltr;
  text-align: left;
  line-height: 1.4;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.tab-bottom-cta {
  margin-top: 12px;
}

.btn-launch-external {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #f8fafc;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  width: 100%;
  transition: all 0.15s ease;
}

.btn-launch-external:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Tab 3: Endpoint Inline Card */
.endpoint-inline-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 12px;
}

.endpoint-header-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.method-tag {
  background: #2563eb;
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
}

.endpoint-title {
  font-size: 11.5px;
  font-weight: 600;
  color: #cbd5e1;
}

.endpoint-input-row {
  display: flex;
  gap: 6px;
}

.endpoint-input-row input {
  flex: 1;
  padding: 7px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.3);
  color: #f8fafc;
  font-size: 11.5px;
  direction: ltr;
  text-align: left;
}

/* ==========================================================================
   MOBILE-FIRST BOTTOM SHEET & THUMB ERGONOMICS (Max 640px)
   ========================================================================== */
@media (max-width: 640px) {
  .ai-studio-modal-dialog {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 92dvh !important;
    max-height: 92dvh !important;
    border-radius: 22px 22px 0 0 !important;
    margin: 0 !important;
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-bottom: none !important;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.12) !important;
  }

  .ai-studio-modal-body {
    padding: 12px 14px 85px !important;
  }

  .project-setup-input-row {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .btn-setup-project {
    width: 100% !important;
    justify-content: center !important;
  }

  .minimal-copy-card {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .btn-copy-action {
    width: 100% !important;
  }

  .sticky-thumb-footer {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 8px)) !important;
    background: rgba(255, 255, 255, 0.96) !important;
    backdrop-filter: blur(14px) !important;
    border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
    z-index: 50 !important;
  }

  .deploy-status-row {
    display: none !important;
  }

  /* Evolution Delivery Modal Mobile Enhancements */
  .modular-delivery-card {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 94dvh !important;
    max-height: 94dvh !important;
    border-radius: 22px 22px 0 0 !important;
    margin: 0 !important;
  }

  .delivery-device-switcher {
    display: none !important;
  }

  #deviceSpeakerNotch {
    display: none !important;
  }

  .device-frame-shell {
    border: none !important;
    box-shadow: none !important;
    border-radius: 8px !important;
  }

  .dock-primary-actions {
    position: sticky !important;
    bottom: 0 !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(12px) !important;
    border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
    padding: 10px 0 calc(10px + env(safe-area-inset-bottom, 8px)) !important;
    z-index: 30 !important;
  }
}

/* ==========================================================================
   Google AI Studio Guide & Migration Hub Extensions
   ========================================================================== */
.btn-studio-guide-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(147, 51, 234, 0.12));
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: #3b82f6;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}
.btn-studio-guide-nav:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(147, 51, 234, 0.2));
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateY(-1px);
}
.guide-nav-icon {
  font-size: 13px;
}

.btn-studio-direct-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid var(--card-border, rgba(0, 0, 0, 0.1));
  color: var(--text-main, #09090b);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-studio-direct-secondary:hover {
  background: rgba(0, 0, 0, 0.08);
}

/* Stepper Row */
.studio-stepper-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border: 1px solid var(--card-border, rgba(0, 0, 0, 0.06));
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 12px;
  gap: 6px;
}
.stepper-item {
  display: flex;
  align-items: center;
  gap: 8px;
}
.stepper-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #3b82f6;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stepper-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.stepper-meta strong {
  font-size: 12px;
  color: var(--text-main, #09090b);
}
.stepper-meta span {
  font-size: 10.5px;
  color: var(--text-muted, #71717a);
}
.stepper-arrow {
  color: #a1a1aa;
  font-size: 13px;
  font-weight: 700;
}

/* Prompt Box */
.prompt-box-card {
  background: #ffffff;
  border: 1px solid var(--card-border, rgba(0, 0, 0, 0.08));
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  margin-bottom: 12px;
}
.prompt-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #fcfcfd;
  border-bottom: 1px solid var(--card-border, rgba(0, 0, 0, 0.06));
}
.prompt-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.badge-sparkle {
  font-size: 10.5px;
  font-weight: 800;
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.15), rgba(245, 158, 11, 0.2));
  color: #b45309;
  padding: 2px 7px;
  border-radius: 6px;
}
.prompt-target-note {
  font-size: 11px;
  color: var(--text-muted, #71717a);
}
.prompt-display-textarea {
  width: 100%;
  border: none;
  background: #f8fafc;
  color: var(--text-main, #09090b);
  padding: 12px 14px;
  font-size: 12px;
  line-height: 1.6;
  resize: vertical;
  min-height: 160px;
  max-height: 260px;
  font-family: inherit;
  direction: rtl;
  text-align: right;
}
.prompt-display-textarea:focus {
  outline: none;
}
.prompt-box-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: #ffffff;
  border-top: 1px solid var(--card-border, rgba(0, 0, 0, 0.06));
  flex-wrap: wrap;
}
.btn-primary-copy {
  flex: 1;
  min-width: 220px;
  padding: 11px 18px;
  font-size: 13px;
  background: linear-gradient(135deg, #10b981, #059669);
  border-radius: 10px;
}
.btn-launch-aistudio-direct {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #f4f4f5;
  color: var(--text-main, #18181b);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
}
.btn-launch-aistudio-direct:hover {
  background: #e4e4e7;
}

/* How It Works Banner */
.how-it-works-banner {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 12px;
  line-height: 1.5;
}
.banner-icon {
  font-size: 18px;
  flex-shrink: 0;
}
.banner-content strong {
  display: block;
  color: #1e40af;
  font-size: 12.5px;
  margin-bottom: 2px;
}
.banner-content p {
  margin: 0;
  color: #1e3a8a;
  font-size: 11.5px;
}
.banner-content code {
  background: rgba(255, 255, 255, 0.8);
  padding: 1px 5px;
  border-radius: 4px;
  color: #1d4ed8;
  font-weight: 700;
  font-size: 11px;
}

/* Tutorial Stack */
.tutorial-guide-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tutorial-card {
  background: #ffffff;
  border: 1px solid var(--card-border, rgba(0, 0, 0, 0.08));
  border-radius: 12px;
  padding: 12px 14px;
}
.tutorial-step-badge {
  font-size: 10px;
  font-weight: 800;
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 4px;
}
.tutorial-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main, #09090b);
  margin: 0 0 4px;
}
.tutorial-card-desc {
  font-size: 11.5px;
  color: var(--text-muted, #52525b);
  line-height: 1.5;
  margin: 0;
}

/* FAQ Box */
.faq-accordion-box {
  background: #f8fafc;
  border: 1px solid var(--card-border, rgba(0, 0, 0, 0.06));
  border-radius: 12px;
  padding: 10px 14px;
  margin-top: 4px;
}
.faq-box-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main, #09090b);
  margin-bottom: 8px;
}
.faq-item {
  border-top: 1px solid var(--card-border, rgba(0, 0, 0, 0.06));
  padding: 8px 0;
}
.faq-item:first-of-type {
  border-top: none;
}
.faq-item summary {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main, #18181b);
  cursor: pointer;
  user-select: none;
}
.faq-answer {
  font-size: 11.5px;
  color: var(--text-muted, #71717a);
  padding-top: 4px;
  line-height: 1.5;
}

/* ==========================================================================
   Fluid UI Feature Docking: Below-Hero Bento Inspiration Row & Serenity Pass
   ========================================================================== */
.btn-studio-guide-nav {
  display: none !important;
}

.below-hero-templates-section {
  width: 100%;
  max-width: 960px;
  margin: 24px auto 0 auto;
}

.hero-quick-chips.bento-row {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 14px !important;
  margin-top: 10px;
}

.bento-quick-card {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 12px 16px !important;
  background: #ffffff !important;
  border: 1px solid var(--card-border) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) !important;
  text-align: right !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  text-decoration: none !important;
}

.bento-quick-card:hover {
  border-color: rgba(24, 24, 27, 0.3) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.08) !important;
}

.bento-card-icon {
  font-size: 20px;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.bento-card-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  overflow: hidden;
}

.bento-card-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bento-card-desc {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 768px) {
  .hero-quick-chips.bento-row {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
}






