/* ─────────────────────────────────────────────────────────
   MOKSHA AI · Nano Banana 2 Studio
   Light gold-foil design system
───────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300&family=Inter:wght@300;400;500;600&display=swap');

/* ── Tokens ── */
:root {
  --gold-1:      #7a5c1a;
  --gold-2:      #b08928;
  --gold-3:      #cfa840;
  --gold-4:      #e2c96a;
  --gold-5:      #f0dfaa;
  --gold-6:      #faf4e4;
  --gold-foil:   linear-gradient(110deg, #7a5c1a 0%, #cfa840 30%, #f0e090 52%, #cfa840 72%, #7a5c1a 100%);
  --gold-btn:    linear-gradient(135deg, #b08928 0%, #d4a83a 40%, #e8c860 60%, #c09030 100%);
  --gold-glow:   0 6px 32px rgba(176, 137, 40, 0.22);

  --bg:          #f6f3ec;
  --surface:     #ffffff;
  --surface-2:   #fdfaf4;
  --border:      rgba(176, 137, 40, 0.14);
  --border-mid:  rgba(176, 137, 40, 0.28);
  --border-str:  rgba(176, 137, 40, 0.5);

  --text-1:      #1c1608;
  --text-2:      #5c4920;
  --text-3:      #9c8454;
  --text-4:      #c8b07a;

  --radius:      10px;
  --radius-sm:   6px;
  --radius-lg:   14px;
  --sidebar-w:   364px;
  --header-h:    56px;

  --font-brand:  'Cormorant Garamond', Georgia, serif;
  --font-ui:     'Inter', -apple-system, sans-serif;
}

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

body {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--text-1);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── API Banner ── */
.api-banner {
  background: #fff8ec;
  border-bottom: 1px solid rgba(200, 140, 30, 0.35);
  color: #7a5010;
  font-size: 12.5px;
  padding: 9px 24px;
  text-align: center;
}
.api-banner code {
  font-family: monospace;
  background: rgba(200,140,30,0.12);
  padding: 1px 5px;
  border-radius: 3px;
}

/* ── Header ── */
.header {
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border-mid);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 16px rgba(176, 137, 40, 0.07);
}

.brand { display: flex; align-items: baseline; gap: 10px; }

.brand-name {
  font-family: var(--font-brand);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.06em;
  background: var(--gold-foil);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-sep {
  color: var(--gold-4);
  font-size: 16px;
  font-weight: 300;
}

.brand-sub {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-3);
  letter-spacing: 0.04em;
}

.model-tag {
  font-size: 11px;
  color: var(--text-3);
  background: var(--gold-6);
  border: 1px solid var(--border-mid);
  border-radius: 20px;
  padding: 3px 10px;
  letter-spacing: 0.03em;
}

/* ── Workspace ── */
.workspace {
  display: flex;
  height: calc(100vh - var(--header-h));
  overflow: hidden;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border-mid);
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
  padding: 20px 22px 28px;
  gap: 16px;
}

/* ── Control Groups ── */
.ctrl-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.ctrl-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 6px;
}

.label-tag {
  font-size: 9.5px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0.03em;
  color: var(--text-4);
  background: var(--gold-6);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1px 7px;
}

.ctrl-badge {
  font-size: 10px;
  font-weight: 600;
  background: var(--gold-5);
  color: var(--gold-1);
  border-radius: 10px;
  padding: 1px 7px;
  letter-spacing: 0;
  text-transform: none;
}

/* ── Prompt ── */
.prompt-input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius);
  padding: 11px 13px;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--text-1);
  line-height: 1.55;
  resize: vertical;
  min-height: 100px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.prompt-input::placeholder { color: var(--text-4); }
.prompt-input:focus {
  outline: none;
  border-color: var(--gold-3);
  box-shadow: 0 0 0 3px rgba(207, 168, 64, 0.1);
}

.prompt-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ghost-btn {
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--text-3);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.ghost-btn:hover { color: var(--gold-1); background: var(--gold-6); }

.hint {
  font-size: 10.5px;
  color: var(--text-4);
  letter-spacing: 0.02em;
}

/* ── Drop Zone ── */
.drop-zone {
  border: 1.5px dashed var(--border-str);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 18px 14px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--gold-3);
  background: var(--gold-6);
}

.drop-content { display: flex; flex-direction: column; align-items: center; gap: 5px; }

.drop-arrow {
  width: 30px; height: 30px;
  border: 1.5px solid var(--border-str);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  color: var(--text-3);
  margin-bottom: 2px;
}

.drop-text { font-size: 12.5px; color: var(--text-2); }
.drop-sub  { font-size: 11px;   color: var(--text-4); }

.link-btn {
  background: none; border: none; cursor: pointer;
  color: var(--gold-2); font-size: 12.5px; font-family: var(--font-ui);
  text-decoration: underline; text-underline-offset: 2px;
  padding: 0;
}
.link-btn:hover { color: var(--gold-1); }

.drop-preview {
  max-width: 100%; max-height: 120px;
  border-radius: 7px; object-fit: contain;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

/* ── Reference image thumbnails ── */
.ref-thumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ref-thumb {
  position: relative;
  max-width: 120px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1.5px solid var(--border-mid);
  flex-shrink: 0;
}

.ref-thumb img {
  width: 100%;
  height: auto;
  display: block;
}

.ref-thumb-remove {
  position: absolute;
  top: 2px; right: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: rgba(30,20,10,0.7);
  color: white;
  border: none;
  font-size: 9px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
  transition: background 0.15s;
}
.ref-thumb-remove:hover { background: rgba(160,40,40,0.85); }

.clear-ref-btn {
  font-size: 11px; color: #b04040;
  background: none; border: none; cursor: pointer;
  font-family: var(--font-ui);
  text-align: left; padding: 0;
  transition: color 0.15s;
}
.clear-ref-btn:hover { color: #8a2020; }

/* ── Divider ── */
.rule {
  height: 1px;
  background: var(--border);
  margin: 2px 0;
}

/* ── Aspect Ratio ── */
.aspect-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.aspect-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 6px;
  background: var(--surface-2);
  border: 1.5px solid var(--border-mid);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--text-2);
  transition: all 0.15s;
  min-height: 66px;
}
.aspect-btn:hover {
  border-color: var(--gold-3);
  background: var(--gold-6);
}
.aspect-btn.active {
  border-color: var(--gold-2);
  background: var(--gold-6);
  color: var(--gold-1);
  box-shadow: inset 0 0 0 1px rgba(176,137,40,0.15);
}

.asp-box {
  border: 1.5px solid currentColor;
  border-radius: 2px;
  opacity: 0.7;
  transition: opacity 0.15s;
}
.aspect-btn.active .asp-box { opacity: 1; }

/* ── Pills ── */
.pill-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.pill {
  padding: 5px 14px;
  border: 1.5px solid var(--border-mid);
  border-radius: 20px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 12px;
  font-family: var(--font-ui);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.pill:hover { border-color: var(--gold-3); color: var(--gold-1); }
.pill.active {
  background: var(--gold-5);
  border-color: var(--gold-2);
  color: var(--gold-1);
  font-weight: 600;
}

/* ── Stepper ── */
.stepper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.step-btn {
  width: 32px; height: 32px;
  border: 1.5px solid var(--border-mid);
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.15s;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-ui);
}
.step-btn:hover {
  border-color: var(--gold-3);
  background: var(--gold-6);
  color: var(--gold-1);
}

.step-val {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-1);
  min-width: 28px;
  text-align: center;
  font-family: var(--font-brand);
}

/* ── Seed ── */
.seed-row { display: flex; gap: 8px; align-items: center; }

.seed-input {
  flex: 1;
  background: var(--surface-2);
  border: 1.5px solid var(--border-mid);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--text-1);
  transition: border-color 0.15s;
}
.seed-input::placeholder { color: var(--text-4); }
.seed-input:focus { outline: none; border-color: var(--gold-3); }

.dice-btn {
  width: 34px; height: 34px;
  border: 1.5px solid var(--border-mid);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: 16px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}
.dice-btn:hover { border-color: var(--gold-3); background: var(--gold-6); }

/* ── Slider ── */
.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--gold-3) 0%, var(--gold-3) 50%, var(--border-mid) 50%, var(--border-mid) 100%);
  outline: none;
  cursor: pointer;
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--gold-2);
  box-shadow: 0 1px 6px rgba(176,137,40,0.35);
  border: 2px solid white;
  cursor: pointer;
}
.slider::-moz-range-thumb {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--gold-2);
  box-shadow: 0 1px 6px rgba(176,137,40,0.35);
  border: 2px solid white;
  cursor: pointer;
}

.slider-ends {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-4);
  margin-top: 2px;
}

/* ── Toggle ── */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 13px;
}

.toggle-label { font-size: 12.5px; font-weight: 500; color: var(--text-1); }
.toggle-desc  { font-size: 11px; color: var(--text-3); margin-top: 2px; }

.toggle {
  width: 40px; height: 22px;
  border-radius: 11px;
  background: var(--border-mid);
  border: none;
  cursor: pointer;
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}
.toggle::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: white;
  top: 3px; left: 3px;
  transition: left 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.toggle.on { background: var(--gold-3); }
.toggle.on::after { left: 21px; }

/* ── Generate Button ── */
.generate-btn {
  width: 100%;
  padding: 13px 20px;
  background: var(--gold-btn);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--gold-glow);
  transition: opacity 0.15s, transform 0.1s, box-shadow 0.15s;
  position: relative;
  overflow: hidden;
  margin-top: 4px;
}
.generate-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.18) 50%, transparent 60%);
  transform: translateX(-100%);
  transition: transform 0.45s;
}
.generate-btn:hover::before { transform: translateX(100%); }
.generate-btn:hover  { box-shadow: 0 8px 40px rgba(176, 137, 40, 0.35); }
.generate-btn:active { transform: scale(0.985); }
.generate-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.generate-icon { font-size: 16px; }

/* ── Gallery Panel ── */
.gallery-panel {
  flex: 1;
  overflow: hidden;   /* inner views handle their own scrolling */
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

/* ── Panel Tabs ── */
.panel-tabs {
  display: flex;
  padding: 0 24px;
  border-bottom: 1px solid var(--border-mid);
  background: var(--surface);
  flex-shrink: 0;
}

.panel-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 13px 16px;
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-3);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  display: flex;
  align-items: center;
  gap: 7px;
}
.panel-tab:hover { color: var(--text-2); }
.panel-tab.active {
  color: var(--gold-1);
  border-bottom-color: var(--gold-2);
}

.lib-count {
  font-size: 10px;
  font-weight: 600;
  background: var(--gold-5);
  color: var(--gold-1);
  border-radius: 10px;
  padding: 1px 7px;
  min-width: 18px;
  text-align: center;
}

/* ── Generate view ── */
#generateView {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

/* ── Library view ── */
#libraryView {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  min-height: 0;
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}

.lib-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  animation: fadeUp 0.25s ease both;
}
.lib-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-str);
  box-shadow: 0 6px 24px rgba(176,137,40,0.12);
}
.lib-card img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  background: var(--bg);
}
.lib-card-info {
  padding: 8px 10px 10px;
  border-top: 1px solid var(--border);
}
.lib-prompt {
  font-size: 11.5px;
  color: var(--text-2);
  line-height: 1.4;
  margin-bottom: 4px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.lib-meta {
  font-size: 10px;
  color: var(--text-4);
}
.lib-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 80px 24px;
  color: var(--text-3);
  font-size: 13px;
  text-align: center;
}
.lib-loading {
  grid-column: 1 / -1;
  padding: 60px 24px;
  text-align: center;
  color: var(--text-4);
  font-size: 13px;
}

/* ── Status Bar ── */
.status-bar {
  padding: 10px 24px;
  font-size: 12.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 10;
}

.status-bar.loading {
  background: #fffcf0;
  color: var(--gold-1);
  border-bottom-color: var(--border-mid);
}
.status-bar.success {
  background: #f2f9f4;
  color: #2d6e45;
  border-bottom-color: rgba(80, 160, 100, 0.2);
}
.status-bar.error {
  background: #fdf2f2;
  color: #a03030;
  border-bottom-color: rgba(180,80,80,0.2);
}

.spinner {
  width: 13px; height: 13px;
  border: 1.5px solid rgba(176,137,40,0.25);
  border-top-color: var(--gold-2);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Gallery Grid ── */
.gallery {
  flex: 1;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.img-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

/* ── Image Card ── */
.img-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  animation: fadeUp 0.35s ease both;
  cursor: pointer;
}
.img-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-str);
  box-shadow: 0 8px 28px rgba(176,137,40,0.12);
}

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

.img-card img {
  width: 100%;
  display: block;
  object-fit: cover;
  background: var(--bg);
}

.img-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-top: 1px solid var(--border);
}

.img-meta { font-size: 11px; color: var(--text-3); }

.dl-btn {
  font-size: 11px;
  font-family: var(--font-ui);
  font-weight: 500;
  color: var(--gold-1);
  background: var(--gold-6);
  border: 1px solid var(--border-mid);
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.15s;
}
.dl-btn:hover {
  background: var(--gold-5);
  border-color: var(--gold-2);
}

/* ── Empty State ── */
.empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  color: var(--text-3);
  padding: 60px 24px;
}

.empty-glyph {
  font-size: 40px;
  line-height: 1;
  color: var(--gold-4);
  margin-bottom: 4px;
}

.empty-title { font-size: 15px; font-weight: 500; color: var(--text-2); }
.empty-sub   { font-size: 12.5px; color: var(--text-3); }

/* ── Generation header ── */
.gen-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}
.gen-count { font-size: 13px; font-weight: 500; color: var(--text-2); }
.gen-meta  { font-size: 11px; color: var(--text-4); }

/* ── Pending batch ── */
.gen-pending {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-3);
}
.gen-error { color: #b05050; }

.spinner-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 1.5px solid rgba(176,137,40,0.25);
  border-top-color: var(--gold-2);
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

.img-card-skeleton {
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border: 1px solid var(--border);
}

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

/* ── Lightbox ── */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(20, 14, 4, 0.82);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}
.lightbox.open { display: flex; }

.lightbox-inner {
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.4);
  animation: lbIn 0.2s ease;
}
@keyframes lbIn {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}

#lightboxImg {
  max-height: 80vh;
  max-width: 85vw;
  object-fit: contain;
  display: block;
}

.lightbox-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.lightbox-meta { font-size: 11px; color: var(--text-3); }

.lightbox-actions { display: flex; gap: 8px; flex-shrink: 0; }

.lb-btn {
  font-size: 12px;
  font-family: var(--font-ui);
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1.5px solid var(--border-mid);
  background: var(--surface-2);
  color: var(--text-2);
  transition: all 0.15s;
}
.lb-btn:hover { border-color: var(--gold-3); color: var(--gold-1); background: var(--gold-6); }
.lb-close     { color: var(--text-3); }

/* ── Lightbox nav arrows ── */
.lb-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 52px; height: 52px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 50%;
  color: rgba(255,255,255,0.9);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, transform 0.1s;
  z-index: 1001;
  flex-shrink: 0;
}
.lb-nav:hover { background: rgba(255,255,255,0.22); }
.lb-nav:active { transform: translateY(-50%) scale(0.93); }
.lb-nav-prev { left: 20px; }
.lb-nav-next { right: 20px; }

/* ── Lightbox position counter ── */
.lightbox-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lightbox-pos {
  font-size: 11px;
  color: var(--text-4);
  font-weight: 500;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-str); border-radius: 10px; }

/* ── Responsive ── */
@media (max-width: 860px) {
  .workspace { flex-direction: column; height: auto; overflow: visible; }
  .sidebar { width: 100%; min-width: unset; border-right: none; border-bottom: 1px solid var(--border-mid); }
  .gallery-panel { height: auto; min-height: 60vh; }
  .brand-sub { display: none; }
}
