:root {
  --background: 0 0% 0%;
  --foreground: 0 0% 100%;
  --primary: 135 100% 50%;
  --secondary: 0 0% 100%;
  --muted: 135 18% 22%;
  --destructive: 0 84% 58%;
  --border: 135 100% 50%;
  --card: 0 0% 4%;
  --shadow-sm: 0 6px 18px rgba(0,255,65,.12);
  --shadow-md: 0 14px 38px rgba(0,255,65,.18);
  --shadow-lg: 0 24px 80px rgba(0,255,65,.22);
  --transition-fast: 140ms ease;
  --transition-smooth: 260ms cubic-bezier(.2,.8,.2,1);
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
}
.dark { --background: 0 0% 0%; --foreground: 0 0% 100%; --primary: 135 100% 50%; --secondary: 0 0% 96%; --muted: 135 22% 16%; --destructive: 0 88% 60%; --border: 135 100% 45%; --card: 0 0% 5%; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body, #root { width: 100%; min-height: 100%; margin: 0; background: hsl(var(--background)); color: hsl(var(--foreground)); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif; overflow: hidden; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled, input:disabled { opacity: .55; cursor: not-allowed; }
.app-shell { position: fixed; inset: 0; background: #000; }
.synapse-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; touch-action: none; }
.screen-shell { position: relative; z-index: 1; height: 100dvh; padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)); display: grid; grid-template-rows: auto 1fr auto; gap: 10px; }
.glass { background: linear-gradient(145deg, rgba(5,18,8,.72), rgba(0,0,0,.56)); border: 1px solid rgba(0,255,65,.24); box-shadow: var(--shadow-sm); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.header-card { border-radius: var(--radius-lg); padding: 12px 13px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.header-main { min-width: 0; }
.eyebrow { color: hsl(var(--primary)); font-size: 10px; letter-spacing: .16em; font-weight: 900; }
h1 { margin: 2px 0 0; font-size: 18px; line-height: 1.05; }
.auth-zone { display: grid; justify-items: end; gap: 6px; flex: 0 0 auto; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; border: 1px solid rgba(0,255,65,.28); color: hsl(var(--primary)); border-radius: 999px; padding: 7px 9px; font-size: 11px; white-space: nowrap; background: rgba(0,255,65,.08); }
.status-pill span { width: 7px; height: 7px; border-radius: 50%; background: hsl(var(--primary)); box-shadow: 0 0 14px #00ff41; }
.auth-chip, .slide-chip { max-width: 132px; min-height: 30px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(255,255,255,.16); color: #fff; background: rgba(0,0,0,.58); border-radius: 999px; padding: 5px 9px; font-size: 11px; font-weight: 900; }
.slide-chip { border-color: rgba(0,255,65,.45); color: #000; background: hsl(var(--primary)); box-shadow: 0 0 18px rgba(0,255,65,.25); }
.auth-chip img { width: 20px; height: 20px; border-radius: 50%; }
.auth-chip b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-error { margin-top: 4px; color: #ff9a9a; font-size: 11px; line-height: 1.2; }
.main-panel { min-height: 0; }
.chat-layout { height: 100%; display: grid; grid-template-rows: auto auto auto 1fr auto auto; gap: 10px; }
.memory-strip { border-radius: 999px; padding: 7px 8px 7px 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; color: hsl(var(--primary)); font-size: 12px; font-weight: 900; }
.memory-strip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.memory-strip button { border: 1px solid rgba(0,255,65,.24); background: rgba(0,0,0,.5); color: #fff; border-radius: 999px; padding: 6px 10px; font-size: 11px; }
.world-strip { border-radius: 18px; padding: 9px 11px; display: grid; gap: 3px; border-color: rgba(255,255,255,.16); }
.world-strip strong { color: #fff; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.world-strip span { color: rgba(255,255,255,.76); font-size: 12px; line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.inline-error { border: 1px solid rgba(255,80,80,.45); background: rgba(120,0,0,.32); color: #fff; border-radius: 16px; padding: 9px 11px; font-size: 12px; }
.chat-window { min-height: 0; overflow: auto; border-radius: var(--radius-lg); padding: 12px; display: flex; flex-direction: column; gap: 10px; scrollbar-width: none; }
.chat-window::-webkit-scrollbar { display: none; }
.msg { max-width: 88%; border-radius: 18px; padding: 11px 12px; border: 1px solid rgba(255,255,255,.12); animation: rise .22s ease both; white-space: pre-wrap; }
.msg.user { align-self: flex-end; background: rgba(255,255,255,.92); color: #000; }
.msg.core { align-self: flex-start; background: rgba(0,255,65,.1); color: #fff; border-color: rgba(0,255,65,.24); }
.msg-role { font-size: 10px; font-weight: 900; letter-spacing: .12em; opacity: .72; margin-bottom: 4px; text-transform: uppercase; }
.msg p { margin: 0; line-height: 1.42; font-size: 14px; }
.thinking { display: inline-flex; align-items: center; gap: 6px; color: hsl(var(--primary)); font-size: 12px; padding: 8px; }
.thinking i { width: 6px; height: 6px; border-radius: 50%; background: hsl(var(--primary)); animation: pulse 800ms infinite alternate; }
.thinking i:nth-child(2) { animation-delay: 120ms; } .thinking i:nth-child(3) { animation-delay: 240ms; }
.starter-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 1px; scrollbar-width: none; }
.starter-row::-webkit-scrollbar { display: none; }
.starter-row button { flex: 0 0 auto; border: 1px solid rgba(0,255,65,.22); background: rgba(0,0,0,.58); color: hsl(var(--foreground)); border-radius: 999px; padding: 9px 11px; font-size: 12px; transition: var(--transition-fast); }
.starter-row button:active { transform: scale(.96); background: rgba(0,255,65,.14); }
.composer { display: grid; grid-template-columns: 1fr auto; gap: 8px; border-radius: var(--radius-lg); padding: 8px; }
input { min-width: 0; border: 1px solid rgba(255,255,255,.1); background: rgba(0,0,0,.62); color: #fff; border-radius: 16px; padding: 12px; outline: none; }
input:focus { border-color: hsl(var(--primary)); box-shadow: 0 0 0 3px rgba(0,255,65,.12); }
.composer button, .primary-action, .mini-form button { border: 0; border-radius: 16px; padding: 0 15px; color: #000; background: hsl(var(--primary)); font-weight: 900; box-shadow: 0 0 22px rgba(0,255,65,.28); }
.bottom-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px; border-radius: var(--radius-lg); }
.nav-btn { border: 1px solid rgba(0,255,65,.15); border-radius: 16px; padding: 12px 8px; background: rgba(0,0,0,.58); color: hsl(var(--foreground)); font-weight: 800; transition: var(--transition-smooth); }
.nav-btn.active { background: hsl(var(--primary)); color: #000; box-shadow: 0 0 28px rgba(0,255,65,.35); }
.multi-grid { height: 100%; overflow: auto; display: grid; gap: 10px; padding-bottom: 2px; scrollbar-width: none; }
.multi-grid::-webkit-scrollbar { display: none; }
.tool-card { border-radius: var(--radius-lg); padding: 14px; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-top h2 { margin: 0; font-size: 18px; }
.card-top span { color: hsl(var(--primary)); background: rgba(0,255,65,.1); border: 1px solid rgba(0,255,65,.22); padding: 6px 9px; border-radius: 999px; font-size: 11px; font-weight: 900; }
.tool-card p { color: rgba(255,255,255,.72); line-height: 1.45; font-size: 13px; }
.file-drop { display: grid; place-items: center; gap: 6px; min-height: 105px; border: 1px dashed rgba(0,255,65,.44); border-radius: 20px; background: rgba(0,255,65,.06); text-align: center; padding: 12px; margin: 12px 0; }
.file-drop.compact { min-height: 84px; }
.file-drop input { display: none; }
.file-drop strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-drop small, .stage { color: rgba(255,255,255,.68); font-size: 12px; }
.primary-action { width: 100%; height: 46px; margin-bottom: 11px; }
.progress { height: 9px; background: rgba(255,255,255,.1); border-radius: 999px; overflow: hidden; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, #00ff41, #fff); transition: width var(--transition-smooth); }
.stage { margin-top: 8px; }
.art-frame { border-radius: 20px; overflow: hidden; border: 1px solid rgba(0,255,65,.25); background: #000; box-shadow: inset 0 0 30px rgba(0,255,65,.08); }
.art-frame img { display: block; width: 100%; aspect-ratio: 16/11; object-fit: cover; }
.mini-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 10px; }
.mini-form.one { grid-template-columns: 1fr; }
.mini-form button { min-height: 44px; }
.analysis-box { min-height: 70px; margin-top: 10px; padding: 10px; border: 1px solid rgba(0,255,65,.18); border-radius: 16px; background: rgba(0,0,0,.42); color: rgba(255,255,255,.82); font-size: 13px; line-height: 1.45; white-space: pre-wrap; }
.options-screen { height: 100%; overflow: auto; display: grid; gap: 10px; align-content: start; scrollbar-width: none; }
.options-screen::-webkit-scrollbar { display: none; }
.options-hero { border-radius: var(--radius-lg); padding: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.options-hero h2 { margin: 2px 0 4px; font-size: 20px; }
.options-hero p { margin: 0; color: rgba(255,255,255,.72); font-size: 13px; line-height: 1.35; }
.options-hero button { border: 0; border-radius: 999px; padding: 10px 13px; color: #000; background: hsl(var(--primary)); font-weight: 900; }
.options-list { display: grid; gap: 10px; padding-bottom: 2px; }
.option-group { border-radius: var(--radius-lg); padding: 12px; display: grid; gap: 8px; }
.option-group h3 { margin: 0 0 2px; color: hsl(var(--primary)); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
.option-row { width: 100%; min-height: 66px; border: 1px solid rgba(255,255,255,.12); border-radius: 18px; padding: 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; background: rgba(0,0,0,.48); color: #fff; }
.option-row span { min-width: 0; display: grid; gap: 3px; }
.option-row b { font-size: 14px; }
.option-row small { color: rgba(255,255,255,.68); font-size: 12px; line-height: 1.3; }
.option-row i { flex: 0 0 auto; color: #000; background: hsl(var(--primary)); border-radius: 999px; padding: 7px 9px; font-size: 11px; font-style: normal; font-weight: 900; }
.toast-stack { position: fixed; left: 12px; right: 12px; bottom: 86px; z-index: 5; display: grid; gap: 8px; pointer-events: none; }
.toast { justify-self: center; max-width: 420px; border-radius: 999px; padding: 10px 14px; color: #000; background: #00ff41; font-weight: 900; box-shadow: var(--shadow-md); }
@keyframes pulse { from { opacity: .25; transform: translateY(0); } to { opacity: 1; transform: translateY(-3px); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (min-width: 720px) { .screen-shell { max-width: 980px; margin: 0 auto; padding: 18px; } .multi-grid { grid-template-columns: 1fr 1fr; align-items: start; } h1 { font-size: 22px; } .msg { max-width: 72%; } }
@media (max-width: 390px) { .header-card { align-items: flex-start; } .auth-chip, .slide-chip { max-width: 104px; } .eyebrow { font-size: 9px; } h1 { font-size: 16px; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } .glass { backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px); } }