/* ================================================================
   PIXELMIND AI — Design System v2
   Clean, editorial dark UI. Restrained. Human.
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ── Reset ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: #0a0a0a;
  color: #e2e2e2;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── Design Tokens ───────────────────────────────────────────── */
:root {
  /* --- Backgrounds --- */
  --bg-base:      #0a0a0a;
  --bg-surface:   #111111;
  --bg-elevated:  #161616;
  --bg-raised:    #1c1c1c;

  /* --- Borders --- */
  --border:       #1e1e1e;
  --border-2:     #282828;
  --border-3:     #333333;

  /* --- Text --- */
  --text-primary:   #e2e2e2;
  --text-secondary: #888888;
  --text-muted:     #444444;
  --text-accent:    #9d8fff;

  /* --- Single Accent (indigo) --- */
  --accent:        #6d5fff;
  --accent-hover:  #7f73ff;
  --accent-dim:    rgba(109, 95, 255, 0.09);
  --accent-border: rgba(109, 95, 255, 0.22);

  /* --- Status --- */
  --success: #22c55e;
  --error:   #ef4444;
  --warning: #f59e0b;

  /* --- Font --- */
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;

  /* --- Type Scale --- */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;
  --text-5xl:  3rem;
  --text-6xl:  clamp(2.5rem, 6vw, 3.75rem);
  --text-7xl:  clamp(3rem, 8vw, 5rem);

  /* --- Spacing (8px base) --- */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* --- Radius --- */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   10px;
  --radius-xl:   14px;
  --radius-2xl:  20px;
  --radius-full: 9999px;

  /* --- Shadows --- */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.5);
  --shadow-md:  0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.5);
  --shadow-xl:  0 20px 60px rgba(0,0,0,0.6);
  --shadow-glow: 0 0 20px rgba(109,95,255,0.12);

  /* --- Transitions --- */
  --transition-fast: 120ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;

  /* --- Legacy aliases (keep for backward compat) --- */
  --glass-bg:      var(--bg-surface);
  --glass-border:  var(--border);
  --glass-hover:   var(--bg-elevated);
  --primary-400:   var(--text-accent);
  --primary-500:   var(--accent);
  --primary-600:   var(--accent);
  --grad-primary:  linear-gradient(135deg, var(--accent), #a855f7);
  --accent-pink:   #d946ef;
  --accent-cyan:   #22d3ee;
  --accent-amber:  #f59e0b;
}

/* ── No blob backgrounds ─────────────────────────────────────── */
/* The "floating blobs" pattern is removed — clean bg instead */
.page-bg { display: none; }

/* ── Typography ──────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}

p { color: var(--text-secondary); line-height: 1.7; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ── Layout ──────────────────────────────────────────────────── */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.section { padding: var(--space-24) 0; }

.text-center { text-align: center; }
.w-full      { width: 100%; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-5); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }

@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .section { padding: var(--space-16) 0; }
  .container { padding: 0 var(--space-4); }
}

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  transition: border-color var(--transition-base), background var(--transition-base);
}

.card:hover { border-color: var(--border-2); }

/* Alias */
.glass { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-xl); }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 10px var(--space-5);
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
  letter-spacing: -0.01em;
}

.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Primary */
.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-2);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--border-3);
}

/* Outline */
.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-2);
}
.btn-outline:hover:not(:disabled) {
  background: var(--bg-elevated);
  border-color: var(--border-3);
}

/* Sizes */
.btn-sm { padding: var(--space-2) var(--space-3); font-size: var(--text-xs); }
.btn-lg { padding: 12px var(--space-8); font-size: var(--text-base); border-radius: var(--radius-lg); }

/* Loading */
.btn-loading { pointer-events: none; opacity: 0.65; }
.btn-loading::after {
  content: '';
  position: absolute;
  right: var(--space-4);
  width: 13px; height: 13px;
  border: 2px solid rgba(255,255,255,0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* ── Badge ───────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.badge-purple {
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  color: var(--text-accent);
}
.badge-pink {
  background: rgba(217, 70, 239, 0.07);
  border: 1px solid rgba(217, 70, 239, 0.18);
  color: #d946ef;
}
.badge-amber {
  background: rgba(245, 158, 11, 0.07);
  border: 1px solid rgba(245, 158, 11, 0.18);
  color: #f59e0b;
}

/* ── Avatar ──────────────────────────────────────────────────── */
.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: var(--text-sm);
  color: #fff;
  flex-shrink: 0;
  letter-spacing: 0;
}

/* ── Navigation ──────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0 var(--space-6);
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10,10,10,0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.nav-logo-icon {
  width: 26px; height: 26px;
  border-radius: 6px;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  color: #fff;
  font-weight: 800;
  flex-shrink: 0;
}

.nav-logo-text { color: var(--text-primary); }

.nav-links { display: flex; gap: var(--space-6); list-style: none; }
.nav-links a {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
  letter-spacing: -0.01em;
}
.nav-links a:hover { color: var(--text-primary); }

.nav-actions { display: flex; align-items: center; gap: var(--space-2); }

@media (max-width: 640px) { .nav-links { display: none; } }

/* ── Spinner ─────────────────────────────────────────────────── */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.12);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  flex-shrink: 0;
}

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

/* ── Skeleton ─────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-raised) 50%, var(--bg-elevated) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Form Elements ───────────────────────────────────────────── */
.input {
  width: 100%;
  padding: 10px var(--space-4);
  background: var(--bg-elevated);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: var(--text-sm);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.input::placeholder { color: var(--text-muted); }
.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
  letter-spacing: -0.01em;
}

.form-group { margin-bottom: var(--space-5); }

/* ── Gradient text — use sparingly ──────────────────────────── */
.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Animated gradient (hero headline only) */
.gradient-text-animated {
  background: linear-gradient(135deg, var(--accent) 0%, #a78bfa 50%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% auto;
  animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {
  0%   { background-position: 0% center; }
  50%  { background-position: 100% center; }
  100% { background-position: 0% center; }
}

/* ── Toast ───────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-width: 300px;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--bg-elevated);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
  animation: slideInToast 0.2s ease;
  line-height: 1.5;
}

@keyframes slideInToast {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: translateX(0); }
}

.toast-success { border-left: 2px solid var(--success); }
.toast-error   { border-left: 2px solid var(--error); }
.toast-warn    { border-left: 2px solid var(--warning); }
.toast-info    { border-left: 2px solid var(--accent); }

/* ── Modal ───────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  animation: fadeIn 0.2s ease;
}

.modal-overlay.hidden { display: none; }

.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-2xl);
  padding: var(--space-10);
  max-width: 440px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  animation: scaleIn 0.2s ease;
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Limit Modal ─────────────────────────────────────────────── */
.limit-modal-icon { font-size: 36px; margin-bottom: var(--space-5); }

.limit-modal-title {
  font-size: var(--text-2xl);
  font-weight: 800;
  margin-bottom: var(--space-3);
  letter-spacing: -0.04em;
}

.limit-modal-sub {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-6);
  font-size: var(--text-sm);
}

.limit-modal-actions { display: flex; flex-direction: column; gap: var(--space-3); }
.limit-usage-display { margin-bottom: var(--space-6); }
.limit-usage-circles { display: flex; gap: var(--space-2); margin-bottom: var(--space-3); }

.usage-dot {
  width: 36px; height: 5px;
  border-radius: var(--radius-full);
  background: var(--error);
  opacity: 0.8;
}

.limit-usage-text { font-size: 11px; color: var(--text-secondary); font-weight: 500; }

/* ── Usage Counter ───────────────────────────────────────────── */
.usage-counter {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--text-secondary);
  white-space: nowrap;
}

.usage-bar {
  width: 72px; height: 3px;
  background: var(--border-2);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.usage-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: var(--radius-full);
  transition: width var(--transition-slow);
}

.usage-bar-fill.danger { background: var(--error); }

/* ── Footer ──────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: var(--space-8) 0;
}

.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
}

/* ── Sidebar (App pages) ─────────────────────────────────────── */
/* Used by query.html and gallery.html */

.app-layout { display: flex; min-height: 100vh; position: relative; z-index: 1; }

.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: var(--space-5) 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0 var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  margin-bottom: var(--space-3);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--text-primary);
  letter-spacing: -0.02em;
  transition: opacity var(--transition-fast);
}
.sidebar-logo:hover { opacity: 0.8; }

.sidebar-logo-icon {
  width: 26px; height: 26px;
  border-radius: 6px;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  color: #fff;
  font-weight: 800;
  flex-shrink: 0;
}

.sidebar-logo-text { color: var(--text-primary); }

.sidebar-nav {
  flex: 1;
  padding: 0 var(--space-3);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-section-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: var(--space-4) var(--space-3) var(--space-2);
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 450;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition-fast);
  cursor: pointer;
  border: none;
  background: transparent;
  font-family: var(--font-family);
  width: 100%;
  text-align: left;
  letter-spacing: -0.01em;
}

.sidebar-item:hover { background: var(--bg-elevated); color: var(--text-primary); }
.sidebar-item.active { background: var(--accent-dim); color: var(--text-accent); border: 1px solid var(--accent-border); }

.sidebar-item-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; opacity: 0.8; }

.sidebar-bottom {
  padding: var(--space-4) var(--space-3) 0;
  border-top: 1px solid var(--border);
  margin-top: var(--space-4);
}

/* Sidebar Usage Panel */
.usage-panel {
  padding: var(--space-4);
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-lg);
  margin: var(--space-4) var(--space-3) 0;
}

.usage-panel-title { font-size: 10px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: var(--space-3); }
.usage-panel-count { font-size: var(--text-2xl); font-weight: 800; margin-bottom: var(--space-2); letter-spacing: -0.04em; }
.usage-panel-bar { height: 4px; background: var(--border-2); border-radius: var(--radius-full); overflow: hidden; margin-bottom: var(--space-2); }
.usage-panel-fill { height: 100%; background: var(--accent); border-radius: var(--radius-full); transition: width var(--transition-slow); }
.usage-panel-fill.danger { background: var(--error); }
.usage-panel-sub { font-size: 11px; color: var(--text-secondary); }

/* User Profile (Sidebar bottom) */
.user-profile {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
  cursor: pointer;
}
.user-profile:hover { background: var(--bg-elevated); }
.user-profile-info { flex: 1; overflow: hidden; min-width: 0; }
.user-profile-name { font-size: var(--text-sm); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.01em; }
.user-profile-email { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── App Main Content ─────────────────────────────────────────── */
.main-content { flex: 1; display: flex; flex-direction: column; min-width: 0; overflow-y: auto; }

.main-topbar {
  position: sticky; top: 0; z-index: 50;
  padding: var(--space-3) var(--space-6);
  background: rgba(10,10,10,0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
}

.topbar-title { font-size: var(--text-base); font-weight: 600; letter-spacing: -0.02em; }
.topbar-title span { color: var(--text-muted); font-weight: 400; font-size: var(--text-sm); }

/* ── Prompt Area ─────────────────────────────────────────────── */
.prompt-area { padding: var(--space-10) var(--space-8); }
.prompt-label { font-size: var(--text-2xl); font-weight: 700; margin-bottom: var(--space-2); letter-spacing: -0.03em; }
.prompt-hint { font-size: var(--text-sm); color: var(--text-secondary); margin-bottom: var(--space-6); }

.prompt-input-wrapper {
  background: var(--bg-surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.prompt-input-wrapper:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.prompt-textarea {
  width: 100%;
  padding: var(--space-5);
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: var(--text-base);
  resize: none;
  outline: none;
  line-height: 1.6;
  min-height: 100px;
}
.prompt-textarea::placeholder { color: var(--text-muted); }

.prompt-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-5);
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}

.prompt-meta { display: flex; align-items: center; gap: var(--space-3); }
.char-count { font-size: 11px; color: var(--text-muted); }

/* Example chips */
.example-prompts { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.example-chip {
  padding: var(--space-2) var(--space-3);
  background: var(--bg-elevated);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-full);
  font-size: 11px;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: var(--font-family);
  transition: all var(--transition-fast);
  white-space: nowrap;
  font-weight: 450;
}
.example-chip:hover { background: var(--bg-raised); color: var(--text-primary); border-color: var(--border-3); }

/* ── Gallery Area ────────────────────────────────────────────── */
.gallery-area { padding: var(--space-6) var(--space-8) var(--space-12); }
.gallery-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-6); }
.gallery-title { font-size: var(--text-xl); font-weight: 700; letter-spacing: -0.03em; }
.gallery-count { font-size: var(--text-sm); color: var(--text-muted); }

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-4);
}

/* Image Cards */
.image-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: border-color var(--transition-base);
  animation: cardIn 0.3s ease both;
}
.image-card:hover { border-color: var(--border-2); }

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

.image-card-img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.image-card-body { padding: var(--space-3) var(--space-4); }
.image-card-prompt {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: var(--space-3);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.5;
}

.image-card-actions { display: flex; gap: var(--space-2); }

/* Empty state */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-20) var(--space-8);
  text-align: center;
}
.empty-state-icon { font-size: 40px; margin-bottom: var(--space-5); opacity: 0.5; }
.empty-state-title { font-size: var(--text-lg); font-weight: 600; margin-bottom: var(--space-3); letter-spacing: -0.02em; }
.empty-state-desc { color: var(--text-secondary); font-size: var(--text-sm); max-width: 320px; }

/* ── Sidebar Mobile Toggle ───────────────────────────────────── */
.sidebar-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  padding: var(--space-2) var(--space-3);
  cursor: pointer;
  font-size: 16px;
  transition: all var(--transition-fast);
}
.sidebar-toggle:hover { background: var(--bg-elevated); color: var(--text-primary); }

@media (max-width: 768px) {
  .sidebar { display: none; }
  .sidebar.open { display: flex; position: fixed; z-index: 200; left: 0; top: 0; height: 100vh; width: 240px; }
  .sidebar-toggle { display: flex; }
  .prompt-area, .gallery-area { padding: var(--space-6) var(--space-4); }
  .main-topbar { padding: var(--space-3) var(--space-4); }
}
