:root {
  --bg: #08090b;
  --panel: #101216;
  --panel-2: #15181e;
  --line: #272b33;
  --muted: #939aa7;
  --text: #f5f7fa;
  --red: #ee2034;
  --red-2: #ff3b4e;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body { overflow: hidden; }
button, textarea, input { font: inherit; }
button { color: inherit; }
.topbar { height: 64px; display:flex; align-items:center; justify-content:space-between; padding:0 26px; border-bottom:1px solid #20232a; background:#0c0e11; }
.brand { display:flex; align-items:center; gap:11px; font-weight:900; letter-spacing:.08em; font-size:14px; }
.brand-mark { width:31px; height:31px; border-radius:8px; display:grid; place-items:center; background:var(--red); font-size:19px; font-style:italic; }
.prototype-pill { border:1px solid #333844; color:#aeb5c2; padding:7px 10px; border-radius:999px; font-size:10px; letter-spacing:.12em; font-weight:800; }
.workspace { height:calc(100vh - 64px); display:grid; grid-template-columns: 460px 1fr; }
.controls-panel { overflow:auto; padding:30px 28px 50px; background:#0c0e11; border-right:1px solid #20232a; }
.controls-panel::-webkit-scrollbar { width:8px; }
.controls-panel::-webkit-scrollbar-thumb { background:#2d323a; border-radius:20px; }
.eyebrow { color:var(--red-2); font-size:11px; font-weight:900; letter-spacing:.16em; margin-bottom:10px; }
h1 { margin:0; line-height:.94; font-size:44px; letter-spacing:-.045em; }
h1 span { color:#6f7580; }
.intro { color:#a2a9b5; line-height:1.55; font-size:14px; margin:18px 0 26px; max-width:385px; }
.step-card { border-top:1px solid #252931; padding:22px 0; }
.step-heading { display:flex; gap:12px; align-items:flex-start; margin-bottom:14px; }
.step-number { background:#20242b; border:1px solid #323741; color:#fff; flex:0 0 auto; width:27px; height:27px; display:grid; place-items:center; border-radius:8px; font-size:12px; font-weight:800; }
.step-heading strong { display:block; font-size:14px; }
.step-heading small { display:block; color:#747c89; margin-top:3px; font-size:11px; }
.upload-zone { display:block; min-height:100px; border:1px dashed #3a414b; border-radius:13px; background:#12151a; padding:16px; cursor:pointer; transition:.2s; }
.upload-zone:hover, .upload-zone.drag { border-color:#e13444; background:#171317; }
#uploadEmpty { min-height:67px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; color:#8e96a3; font-size:12px; }
#uploadEmpty b { color:#f1f3f6; }
.upload-icon { color:#ff5060; font-size:22px; line-height:1; }
.upload-preview { display:grid; grid-template-columns:58px 1fr auto; align-items:center; gap:12px; }
.upload-preview img { width:58px; height:58px; object-fit:contain; border-radius:9px; background:white; padding:5px; }
.upload-preview span { font-size:12px; overflow:hidden; text-overflow:ellipsis; }
.hidden { display:none !important; }
.text-button { border:0; background:none; color:#ff5a69; cursor:pointer; font-size:11px; }
textarea { width:100%; resize:vertical; min-height:108px; color:#eef1f6; background:#12151a; border:1px solid #30353f; border-radius:12px; padding:13px 14px; outline:none; font-size:13px; line-height:1.5; }
textarea:focus { border-color:#6b343c; box-shadow:0 0 0 3px rgba(238,32,52,.08); }
.chips { display:flex; flex-wrap:wrap; gap:7px; margin:10px 0 13px; }
.chips button, .toolbar-actions button { border:1px solid #30353d; background:#15181d; border-radius:999px; padding:7px 10px; font-size:10px; cursor:pointer; color:#aab1bc; }
.chips button:hover, .toolbar-actions button:hover { border-color:#545b67; color:white; }
.generate-button { width:100%; border:0; background:linear-gradient(135deg,#e91d31,#ff3f4f); border-radius:11px; padding:13px 15px; font-weight:900; font-size:13px; cursor:pointer; box-shadow:0 10px 30px rgba(238,32,52,.18); }
.generate-button:active { transform:translateY(1px); }
.generate-button span { margin-right:6px; }
.prototype-note { color:#656d79; font-size:10px; line-height:1.45; margin-top:9px; }
.concept-grid { display:grid; grid-template-columns:1fr 1fr; gap:9px; }
.concept-card { position:relative; aspect-ratio:1.08; border-radius:10px; border:1px solid #292e36; overflow:hidden; background:#060708; cursor:pointer; padding:0; }
.concept-card img { width:100%; height:100%; object-fit:cover; display:block; }
.concept-card .concept-caption { position:absolute; left:0; right:0; bottom:0; padding:22px 9px 8px; background:linear-gradient(transparent,rgba(0,0,0,.82)); text-align:left; font-size:10px; font-weight:800; }
.concept-card.selected { border-color:#ff4454; box-shadow:0 0 0 2px rgba(238,32,52,.25); }
.concept-card.selected::after { content:"✓"; position:absolute; top:7px; right:7px; width:21px; height:21px; border-radius:50%; display:grid; place-items:center; background:#e92034; font-weight:900; font-size:11px; }
.viewer-panel { min-width:0; position:relative; display:grid; grid-template-rows:auto 1fr auto; background:radial-gradient(circle at 50% 42%, #20242a 0, #13161a 42%, #0d0f12 80%); }
.viewer-toolbar { min-height:70px; display:flex; justify-content:space-between; align-items:center; padding:0 24px; border-bottom:1px solid rgba(255,255,255,.06); }
.viewer-title { font-size:11px; font-weight:900; letter-spacing:.13em; }
.viewer-subtitle { color:#747c87; font-size:11px; margin-top:4px; }
.toolbar-actions { display:flex; gap:7px; }
.viewer { position:relative; min-height:0; overflow:hidden; }
.viewer canvas { display:block; width:100%; height:100%; }
.loading-state { position:absolute; inset:0; z-index:5; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:7px; color:#e7eaf0; pointer-events:none; }
.loading-state span { color:#707783; font-size:11px; }
.spinner { width:31px; height:31px; border:3px solid #30353d; border-top-color:#e92a3d; border-radius:50%; animation:spin .8s linear infinite; margin-bottom:6px; }
@keyframes spin { to { transform:rotate(360deg); } }
.drag-tip { position:absolute; z-index:3; bottom:18px; left:50%; transform:translateX(-50%); background:rgba(8,9,11,.72); backdrop-filter:blur(10px); border:1px solid #2d323a; color:#8f97a3; border-radius:999px; padding:8px 13px; font-size:10px; pointer-events:none; }
.viewer-footer { height:44px; border-top:1px solid rgba(255,255,255,.06); display:flex; align-items:center; justify-content:space-between; padding:0 20px; color:#747c86; font-size:10px; }
.status { display:flex; align-items:center; gap:7px; }
.status-dot { width:7px; height:7px; border-radius:50%; background:#31cd6f; box-shadow:0 0 10px rgba(49,205,111,.5); }
@media (max-width: 900px) {
  body { overflow:auto; }
  .topbar { position:sticky; top:0; z-index:20; }
  .workspace { height:auto; display:flex; flex-direction:column-reverse; }
  .viewer-panel { height:64vh; min-height:500px; position:sticky; top:64px; z-index:5; }
  .controls-panel { border-right:0; border-top:1px solid #20232a; overflow:visible; padding:25px 20px 60px; position:relative; z-index:7; }
  h1 { font-size:39px; }
  .viewer-toolbar { padding:0 14px; }
  .toolbar-actions button:nth-child(3) { display:none; }
  .mobile-hint { display:none; }
}
