:root {
  --bg: #0e0e11;
  --surface: #16161a;
  --surface2: #1e1e24;
  --border: #2a2a33;
  --accent: #c8f04a;
  --text: #f0f0f0;
  --muted: #8b8b99;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Syne, sans-serif; }
.hidden { display: none !important; }
.gate { min-height: 100vh; display:flex; align-items:center; justify-content:center; color:var(--muted); }
#app { max-width: 480px; margin: 0 auto; padding-bottom: 90px; }
.topbar { padding: 14px; border-bottom: 1px solid var(--border); display:flex; justify-content:space-between; }
.tabs { display:flex; gap:8px; padding: 10px 14px; border-bottom:1px solid var(--border); }
.tab { background: var(--surface2); color: var(--muted); border:1px solid var(--border); border-radius:10px; padding:8px 12px; }
.tab.active { color: var(--accent); border-color: var(--accent); }
.panel { display:none; padding: 12px; }
.panel.active { display:block; }
.card { background: var(--surface); border:1px solid var(--border); border-radius: 14px; padding: 12px; margin-bottom: 12px; }
.model-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.model { background: var(--surface2); border:1px solid var(--border); border-radius:10px; padding:10px; cursor:pointer; }
.model.selected { border-color: var(--accent); }
.lora-row { display:grid; grid-template-columns:auto 1fr auto; gap:8px; align-items:center; background:var(--surface2); border:1px solid var(--border); border-radius:10px; padding:8px; margin-bottom:8px; }
input, textarea { width:100%; background:var(--surface2); color:var(--text); border:1px solid var(--border); border-radius:10px; padding:8px; }
.setting-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:8px; }
.sticky { position: fixed; bottom: 0; left:0; right:0; max-width:480px; margin:0 auto; background: linear-gradient(to top, var(--bg) 70%, transparent); padding:10px 12px; }
button { width:100%; padding:12px; border-radius:12px; border:none; font-weight:700; }
#generateBtn { background:var(--accent); color:#111; }
.secondary { margin-top:8px; background:var(--surface2); border:1px solid var(--border); color:var(--muted); }
.history-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.hist { background:var(--surface); border:1px solid var(--border); border-radius:10px; overflow:hidden; }
.hist img { width:100%; display:block; }
.hist .meta { padding:8px; font-size:12px; color:var(--muted); }