/* ═══════════════════════════════════════════════════════════
   imaGEN Builder — style.css
   Dark DSLR Firmware Aesthetic
   Colors: #121212 · #FFBF00 · #007AFF
   Fonts: Orbitron · Rajdhani · Share Tech Mono
═══════════════════════════════════════════════════════════ */

/* ─── RESET & BASE ───────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --bg: #121212;
  --bg2: #1a1a1a;
  --bg3: #1f1f1f;
  --bg4: #252525;
  --amber: #FFBF00;
  --amber-dim: #cc9900;
  --amber-glow: rgba(255, 191, 0, 0.15);
  --blue: #007AFF;
  --blue-dim: #0055cc;
  --blue-glow: rgba(0, 122, 255, 0.15);
  --text: #e8e8e8;
  --text-dim: #888;
  --text-muted: #555;
  --border: #2a2a2a;
  --border-amber: rgba(255, 191, 0, 0.3);
  --border-blue: rgba(0, 122, 255, 0.3);
  --success: #00e676;
  --font-display: 'Orbitron', monospace;
  --font-ui: 'Rajdhani', sans-serif;
  --font-mono: 'Share Tech Mono', monospace;
  --radius: 6px;
  --radius-lg: 10px;
  --topbar-h: 52px;
  --steplabel-h: 36px;
  --bottomnav-h: 64px;
  --manifest-h: 48px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* ─── SCROLLBAR ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 3px; height: 3px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--amber-dim); border-radius: 2px; }

/* ─── BOOT SCREEN ────────────────────────────────────────── */
#boot-screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.boot-content {
  width: min(360px, 90vw);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.boot-logo {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.boot-logo-main {
  font-family: var(--font-display);
  font-size: clamp(32px, 8vw, 48px);
  font-weight: 900;
  color: var(--amber);
  letter-spacing: 6px;
  text-shadow: 0 0 30px rgba(255,191,0,0.5);
  animation: flicker 3s infinite;
}

.boot-logo-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 4px;
}

.boot-bar-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.boot-bar {
  flex: 1;
  height: 3px;
  background: var(--bg3);
  border-radius: 2px;
  overflow: hidden;
}

.boot-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--amber-dim), var(--amber));
  border-radius: 2px;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px var(--amber);
}

.boot-pct {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--amber);
  min-width: 36px;
  text-align: right;
}

.boot-log {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  min-height: 80px;
  line-height: 1.8;
}

.boot-log .log-line { color: var(--text-dim); }
.boot-log .log-line.ok { color: var(--success); }
.boot-log .log-line.amber { color: var(--amber); }

.boot-version {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 2px;
}

@keyframes flicker {
  0%, 95%, 100% { opacity: 1; }
  96% { opacity: 0.7; }
  97% { opacity: 1; }
  98% { opacity: 0.5; }
  99% { opacity: 1; }
}

/* ─── APP WRAPPER ────────────────────────────────────────── */
#app {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  overflow: hidden;
}

/* ─── TOPBAR ─────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}

.topbar::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--amber), transparent);
  opacity: 0.4;
}

.topbar-left {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex: 1;
}

.topbar-logo {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--amber);
  letter-spacing: 3px;
  text-shadow: 0 0 12px rgba(255,191,0,0.4);
}

.topbar-fw {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.topbar-center { flex: 2; display: flex; justify-content: center; }

.step-indicators {
  display: flex;
  align-items: center;
  gap: 0;
}

.step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s;
  position: relative;
}

.step-dot span {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
  transition: color 0.25s;
}

.step-dot.active {
  border-color: var(--amber);
  background: var(--amber-glow);
  box-shadow: 0 0 10px rgba(255,191,0,0.3);
}

.step-dot.active span { color: var(--amber); }

.step-dot.done {
  border-color: var(--success);
  background: rgba(0,230,118,0.1);
}

.step-dot.done span { color: var(--success); }

.step-line {
  width: 20px;
  height: 1px;
  background: var(--border);
}

.topbar-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.status-led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 6px var(--success);
  animation: pulse-led 2s infinite;
}

@keyframes pulse-led {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.status-txt {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--success);
  letter-spacing: 1px;
}

/* ─── STEP LABEL BAR ─────────────────────────────────────── */
.step-label-bar {
  height: var(--steplabel-h);
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  flex-shrink: 0;
}

.step-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--amber);
  letter-spacing: 2px;
}

.session-id {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 1px;
}

/* ─── MAIN CONTENT ───────────────────────────────────────── */
.main-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 14px;
  padding-bottom: calc(var(--manifest-h) + var(--bottomnav-h) + 16px + var(--safe-bottom));
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

/* ─── STEP PANELS ────────────────────────────────────────── */
.step-panel {
  display: none;
  flex-direction: column;
  gap: 12px;
  animation: fadeSlideIn 0.3s ease;
}

.step-panel.active { display: flex; }

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

/* ─── PANEL BLOCK ────────────────────────────────────────── */
.panel-block {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

.panel-block::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--amber) 0%, transparent 60%);
  opacity: 0.5;
}

.panel-header {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  color: var(--amber);
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: var(--amber);
  color: var(--bg);
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 900;
  border-radius: 3px;
  flex-shrink: 0;
}

.mutex-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--blue);
  background: var(--blue-glow);
  border: 1px solid var(--border-blue);
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 1px;
}

.gen-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--success);
  background: rgba(0,230,118,0.1);
  border: 1px solid rgba(0,230,118,0.3);
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 1px;
  margin-left: auto;
}

/* ─── FIELD GROUP ────────────────────────────────────────── */
.field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 2px;
}

/* ─── CHIP GROUP ─────────────────────────────────────────── */
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.18s ease;
  letter-spacing: 0.5px;
  white-space: nowrap;
  user-select: none;
}

.chip:hover {
  border-color: var(--amber-dim);
  color: var(--text);
  background: var(--bg4);
}

.chip.active {
  background: var(--amber-glow);
  border-color: var(--amber);
  color: var(--amber);
  box-shadow: 0 0 8px rgba(255,191,0,0.15);
}

.chip:disabled {
  opacity: 0.25;
  cursor: not-allowed;
  pointer-events: none;
}

/* ─── POSE CARDS ─────────────────────────────────────────── */
.pose-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.pose-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  cursor: pointer;
  transition: all 0.18s;
  text-align: center;
  user-select: none;
}

.pose-card:hover { border-color: var(--amber-dim); background: var(--bg4); }

.pose-card.active-selected {
  background: var(--amber-glow);
  border-color: var(--amber);
  box-shadow: 0 0 8px rgba(255,191,0,0.15);
}

.pose-icon {
  font-size: 20px;
  color: var(--amber);
  margin-bottom: 4px;
  line-height: 1;
}

.pose-name {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  letter-spacing: 1px;
  margin-bottom: 2px;
}

.pose-desc {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
}

/* ─── VIBE CARDS ─────────────────────────────────────────── */
.vibe-cards {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vibe-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.18s;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  user-select: none;
}

.vibe-card:hover { border-color: var(--amber-dim); background: var(--bg4); }

.vibe-card.active {
  background: var(--amber-glow);
  border-color: var(--amber);
  box-shadow: 0 0 10px rgba(255,191,0,0.1);
}

.vibe-name {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  color: var(--amber);
  letter-spacing: 2px;
  white-space: nowrap;
}

.vibe-tags {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  text-align: right;
  line-height: 1.4;
}

/* ─── ENV CARDS ──────────────────────────────────────────── */
.env-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.env-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 12px;
  cursor: pointer;
  transition: all 0.18s;
  text-align: center;
  user-select: none;
}

.env-card:hover { border-color: var(--amber-dim); background: var(--bg4); }

.env-card.active {
  background: var(--amber-glow);
  border-color: var(--amber);
  box-shadow: 0 0 8px rgba(255,191,0,0.15);
}

.env-icon { font-size: 22px; margin-bottom: 4px; }

.env-name {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 2px;
}

.env-desc {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
}

/* ─── LOCATION INPUT ─────────────────────────────────────── */
.location-input {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  padding: 10px 12px;
  resize: none;
  outline: none;
  transition: border-color 0.18s;
  -webkit-appearance: none;
}

.location-input:focus { border-color: var(--amber); }

.location-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.hint-label {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
  letter-spacing: 1px;
  white-space: nowrap;
}

.hint-btn {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--blue);
  background: var(--blue-glow);
  border: 1px solid var(--border-blue);
  border-radius: 4px;
  padding: 3px 8px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.hint-btn:hover {
  background: rgba(0,122,255,0.25);
  border-color: var(--blue);
}

/* ─── F-STOP GRID ────────────────────────────────────────── */
.fstop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.fstop-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 8px;
  cursor: pointer;
  transition: all 0.18s;
  text-align: center;
  user-select: none;
}

.fstop-card:hover { border-color: var(--amber-dim); }

.fstop-card.active {
  background: var(--amber-glow);
  border-color: var(--amber);
  box-shadow: 0 0 8px rgba(255,191,0,0.15);
}

.fstop-val {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--amber);
  margin-bottom: 4px;
}

.fstop-desc {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
  line-height: 1.3;
}

/* ─── FILM CARDS ─────────────────────────────────────────── */
.film-cards {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.film-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.18s;
  display: flex;
  align-items: center;
  gap: 12px;
  user-select: none;
}

.film-card:hover { border-color: var(--amber-dim); background: var(--bg4); }

.film-card.active {
  background: var(--amber-glow);
  border-color: var(--amber);
  box-shadow: 0 0 8px rgba(255,191,0,0.1);
}

.film-swatch {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  flex-shrink: 0;
}

.portra { background: linear-gradient(135deg, #d4956a, #e8c49a, #c4785a); }
.velvia { background: linear-gradient(135deg, #2a7a4a, #6abf5e, #e8d44a); }
.polaroid { background: linear-gradient(135deg, #e8d8b0, #c8b88a, #a89870); opacity: 0.85; }
.ilford { background: linear-gradient(135deg, #1a1a1a, #888, #e8e8e8); }
.ektar { background: linear-gradient(135deg, #4a8ac4, #6ab0e8, #d44a4a); }
.cinestill { background: linear-gradient(135deg, #1a0a2a, #7a1a5a, #ff4a8a); }
.fujipro { background: linear-gradient(135deg, #c8dce8, #e8d4c8, #d4c8e0); }
.tmax { background: linear-gradient(135deg, #0a0a0a, #3a3a3a, #6a6a6a); }
.lomo { background: linear-gradient(135deg, #8a2a8a, #2a8a4a, #d4a020); }

.film-aesthetic {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--blue);
  letter-spacing: 0.5px;
  margin-top: 2px;
  opacity: 0.8;
}

.film-name {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 2px;
}

.film-desc {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
}

/* ─── RATIO GRID ─────────────────────────────────────────── */
.ratio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.ratio-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 8px;
  cursor: pointer;
  transition: all 0.18s;
  text-align: center;
  user-select: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.ratio-card:hover { border-color: var(--amber-dim); }

.ratio-card.active {
  background: var(--amber-glow);
  border-color: var(--amber);
  box-shadow: 0 0 8px rgba(255,191,0,0.15);
}

.ratio-vis {
  background: rgba(255,191,0,0.2);
  border: 1px solid rgba(255,191,0,0.4);
  border-radius: 2px;
}

.r1x1  { width: 28px; height: 28px; }
.r16x9 { width: 36px; height: 20px; }
.r9x16 { width: 18px; height: 32px; }
.r2x3  { width: 22px; height: 33px; }
.r3x2  { width: 33px; height: 22px; }
.r4x3  { width: 30px; height: 23px; }

.ratio-label {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  color: var(--amber);
}

.ratio-desc {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
}

/* ─── GRAIN SLIDER ───────────────────────────────────────── */
.slider-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.slider-end-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  min-width: 28px;
}

.grain-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 3px;
  background: var(--bg3);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.grain-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 8px rgba(255,191,0,0.5);
  cursor: pointer;
  border: 2px solid var(--bg);
  transition: box-shadow 0.15s;
}

.grain-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 8px rgba(255,191,0,0.5);
  cursor: pointer;
  border: 2px solid var(--bg);
}

.grain-slider::-webkit-slider-runnable-track {
  background: linear-gradient(to right, var(--amber) var(--grain-pct, 35%), var(--bg3) var(--grain-pct, 35%));
  height: 3px;
  border-radius: 2px;
}

.grain-tier {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--blue);
  letter-spacing: 1px;
  padding: 4px 8px;
  background: var(--blue-glow);
  border: 1px solid var(--border-blue);
  border-radius: 4px;
  display: inline-block;
  width: fit-content;
}

/* ─── OUTPUT / STEP 4 ────────────────────────────────────── */
.output-panel { gap: 14px; }

.prompt-sections {
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: var(--bg);
  border: 1px solid var(--border-amber);
  border-radius: var(--radius);
  overflow: hidden;
}

.prompt-section {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  animation: fadeSlideIn 0.3s ease;
}

.prompt-section:last-child { border-bottom: none; }

.prompt-section-label {
  font-family: var(--font-display);
  font-size: 8px;
  font-weight: 700;
  color: var(--amber-dim);
  letter-spacing: 2px;
  margin-bottom: 4px;
}

.prompt-section-text {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
  line-height: 1.7;
}

.output-actions {
  display: flex;
  gap: 8px;
}

.action-btn {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  border: none;
  border-radius: var(--radius);
  padding: 12px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.18s;
  flex: 1;
  justify-content: center;
}

.action-btn.primary {
  background: var(--amber);
  color: var(--bg);
}

.action-btn.primary:hover {
  background: #ffd040;
  box-shadow: 0 0 16px rgba(255,191,0,0.4);
}

.action-btn.secondary {
  background: var(--bg3);
  color: var(--blue);
  border: 1px solid var(--border-blue);
}

.action-btn.secondary:hover {
  background: var(--blue-glow);
  border-color: var(--blue);
}

.action-btn.small { font-size: 10px; padding: 8px 12px; flex: none; }

.btn-icon { font-size: 14px; }

.json-block {
  background: var(--bg);
  border: 1px solid var(--border-blue);
  border-radius: var(--radius);
  overflow: hidden;
  animation: fadeSlideIn 0.2s ease;
}

.json-header {
  background: var(--blue-glow);
  padding: 8px 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--blue);
  letter-spacing: 2px;
  border-bottom: 1px solid var(--border-blue);
}

.json-content {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  line-height: 1.6;
  padding: 12px 14px;
  overflow-x: auto;
  max-height: 260px;
  overflow-y: auto;
  white-space: pre;
}

/* ─── POST ACTIONS ───────────────────────────────────────── */
.post-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.post-btn {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.18s;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-align: left;
}

.post-btn:hover {
  border-color: var(--amber-dim);
  background: var(--bg4);
}

.post-btn > span:first-child {
  font-size: 18px;
  color: var(--amber);
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.post-btn-title {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  color: var(--amber);
  letter-spacing: 1px;
  margin-bottom: 2px;
}

.post-btn-desc {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
}

/* ─── MANIFEST BAR ───────────────────────────────────────── */
.manifest-bar {
  position: fixed;
  bottom: calc(var(--bottomnav-h) + var(--safe-bottom));
  left: 0;
  right: 0;
  background: var(--bg2);
  border-top: 1px solid var(--border-amber);
  z-index: 20;
}

.manifest-toggle {
  width: 100%;
  height: var(--manifest-h);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 10px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--amber);
}

.manifest-icon {
  font-size: 14px;
  color: var(--amber);
}

.manifest-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--amber);
  letter-spacing: 2px;
  flex: 1;
  text-align: left;
}

.manifest-chevron {
  font-size: 10px;
  color: var(--amber-dim);
  transition: transform 0.25s;
}

.manifest-chevron.open { transform: rotate(180deg); }

.manifest-content {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 12px 14px;
  max-height: 220px;
  overflow-y: auto;
  animation: fadeSlideIn 0.2s ease;
}

.manifest-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 16px;
}

.manifest-row {
  display: flex;
  gap: 6px;
  align-items: baseline;
}

.manifest-key {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
  white-space: nowrap;
  min-width: 80px;
}

.manifest-val {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.manifest-val.set { color: var(--amber); }

/* ─── BOTTOM NAV ─────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--bottomnav-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: var(--bg2);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 16px;
  padding-right: 16px;
  gap: 12px;
  z-index: 20;
}

.nav-btn {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  border: none;
  border-radius: var(--radius);
  padding: 10px 20px;
  cursor: pointer;
  transition: all 0.18s;
  min-width: 90px;
}

.back-btn {
  background: var(--bg3);
  color: var(--text-dim);
  border: 1px solid var(--border);
}

.back-btn:hover {
  border-color: var(--amber-dim);
  color: var(--amber);
}

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

.next-btn {
  background: var(--amber);
  color: var(--bg);
}

.next-btn:hover {
  background: #ffd040;
  box-shadow: 0 0 16px rgba(255,191,0,0.35);
}

.next-btn.generate {
  background: linear-gradient(135deg, var(--amber), #ff9000);
  animation: glow-pulse 2s infinite;
}

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 12px rgba(255,191,0,0.4); }
  50% { box-shadow: 0 0 24px rgba(255,191,0,0.7); }
}

.nav-center-info {
  flex: 1;
  text-align: center;
}

#nav-step-txt {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 2px;
}

/* ─── TOAST ──────────────────────────────────────────────── */
.toast {
  position: fixed;
  top: calc(var(--topbar-h) + var(--steplabel-h) + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: var(--bg4);
  border: 1px solid var(--amber);
  border-radius: var(--radius);
  padding: 10px 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--amber);
  letter-spacing: 1px;
  opacity: 0;
  pointer-events: none;
  z-index: 9000;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ─── RESPONSIVE TWEAKS ──────────────────────────────────── */
@media (max-width: 360px) {
  .fstop-grid { grid-template-columns: repeat(2, 1fr); }
  .pose-cards { grid-template-columns: 1fr 1fr; }
  .vibe-card { flex-direction: column; align-items: flex-start; }
  .vibe-tags { text-align: left; }
}

@media (min-width: 480px) {
  .main-content { padding: 16px 20px; padding-bottom: calc(var(--manifest-h) + var(--bottomnav-h) + 20px + var(--safe-bottom)); }
  .film-cards { display: grid; grid-template-columns: 1fr 1fr; }
  .env-cards { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 768px) {
  :root {
    --topbar-h: 58px;
    --bottomnav-h: 70px;
  }
  .main-content { max-width: 680px; margin: 0 auto; }
  .fstop-grid { grid-template-columns: repeat(6, 1fr); }
  .pose-cards { grid-template-columns: repeat(4, 1fr); }
  .ratio-grid { grid-template-columns: repeat(6, 1fr); }
}
