/* ---------- shell ---------- */
.app { --top: 68px; --side: 252px; }
.app .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 4px rgba(255,178,77,.14), 0 0 12px var(--amber); display: inline-block; }

.topbar {
  position: fixed; inset: 0 0 auto 0; height: var(--top); z-index: 40;
  display: flex; align-items: center; gap: 14px; padding: 0 20px;
  background: rgba(6,6,9,.78); backdrop-filter: blur(16px) saturate(140%); border-bottom: 1px solid var(--line);
}
.tb-menu { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); }
.tb-menu:hover { background: rgba(255,255,255,.05); color: var(--text); }
.topbar .brand { margin-right: 6px; }
.tb-ca { flex: none; }
.search {
  flex: 1; max-width: 420px; margin: 0 auto; height: 40px; display: flex; align-items: center; gap: 10px; padding: 0 12px 0 14px;
  border: 1px solid var(--line-2); border-radius: 999px; background: var(--bg-2); color: var(--dim); transition: border-color .2s;
}
.search:focus-within { border-color: #3d3a55; }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font-size: 14px; color: var(--text); }
.search input::placeholder { color: var(--dim); }
.search input::-webkit-search-cancel-button { display: none; }
.search kbd { font: 500 11px/1 ui-monospace, Menlo, monospace; color: var(--dim); border: 1px solid var(--line-2); border-radius: 6px; padding: 4px 6px; }
.tb-right { display: flex; align-items: center; gap: 10px; }
.tb-icon { width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center; border: 1px solid var(--line-2); color: var(--muted); }
.tb-icon:hover { color: var(--text); border-color: #3c3b4c; }
.tb-icon .icon { width: 16px; height: 16px; }
.ca-strip { display: none; }

/* ---------- sidebar ---------- */
.side {
  position: fixed; top: var(--top); bottom: 0; left: 0; width: var(--side); z-index: 30;
  display: flex; flex-direction: column; gap: 14px; padding: 16px 14px 18px; overflow-y: auto;
  border-right: 1px solid var(--line); background: var(--bg);
  transition: transform .35s var(--ease);
}
.side-nav { display: grid; gap: 2px; }
.side-nav a {
  display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 12px; border-radius: 12px;
  color: var(--muted); font-weight: 500; font-size: 14px; transition: background .2s, color .2s;
}
.side-nav a:hover { background: rgba(255,255,255,.035); color: var(--text); }
.side-nav a.on { background: linear-gradient(90deg, rgba(143,123,255,.14), rgba(143,123,255,.02)); color: var(--text); box-shadow: inset 2px 0 0 var(--violet); }
.side-block { border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 10px; }
.seg { display: flex; padding: 3px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.seg button { flex: 1; height: 30px; border-radius: 9px; font-size: 12.5px; font-weight: 500; color: var(--muted); transition: background .2s, color .2s; }
.seg button.on { background: var(--panel-2); color: var(--text); box-shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 2px 8px rgba(0,0,0,.4); }
.side-list { display: grid; gap: 4px; min-height: 60px; }
.side-list .empty { margin: 6px 4px; font-size: 12.5px; color: var(--dim); line-height: 1.5; }
.side-item { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 10px; font-size: 13px; text-align: left; }
.side-item:hover { background: rgba(255,255,255,.04); }
.side-item img, .side-item .ph { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; flex: none; }
.side-item small { display: block; color: var(--dim); font-size: 11.5px; }
.side-bottom { margin-top: auto; display: grid; gap: 12px; }
.side-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.side-actions .btn { height: 38px; padding: 0 10px; font-size: 13px; }
.side-actions .icon { width: 16px; height: 16px; }

.token-card {
  position: relative; padding: 14px; border-radius: 16px; overflow: hidden; isolation: isolate;
  background: radial-gradient(120% 90% at 0% 0%, rgba(143,123,255,.18), transparent 60%), radial-gradient(90% 80% at 100% 100%, rgba(255,178,77,.12), transparent 60%), var(--panel);
  border: 1px solid var(--line-2);
}
.tc-head { display: flex; align-items: center; gap: 10px; }
.tc-orb { width: 36px; height: 36px; flex: none; }
.tc-orb img { width: 100%; height: 100%; object-fit: contain; }
.tc-head b { display: block; font-size: 14px; }
.tc-head small { color: var(--muted); font-size: 11.5px; }
.tc-ca {
  margin: 12px 0 10px; display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 10px; border-radius: 10px;
  background: rgba(0,0,0,.35); border: 1px solid var(--line); font: 500 11px/1.3 ui-monospace, Menlo, monospace; color: var(--text);
}
.tc-ca span { flex: 1; min-width: 0; word-break: break-all; }
.tc-ca button { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; color: var(--muted); flex: none; }
.tc-ca button:hover { background: rgba(255,255,255,.06); color: var(--text); }
.tc-ca .icon { width: 15px; height: 15px; }
.tc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tc-row .btn { height: 36px; font-size: 13px; }
.side-links { display: flex; gap: 14px; padding: 2px 6px; font-size: 12.5px; color: var(--dim); }
.side-links a:hover { color: var(--text); }
.side-scrim { display: none; }

/* ---------- main ---------- */
.main { margin-left: var(--side); padding: calc(var(--top) + 18px) 28px 40px; min-width: 0; }
body.side-closed .side { transform: translateX(-100%); }
body.side-closed .main { margin-left: 0; }

/* launch panel */
.launch {
  position: relative; border-radius: 26px; overflow: hidden; isolation: isolate;
  border: 1px solid var(--line-2); padding: 0 24px 44px;
  background:
    radial-gradient(60% 55% at 50% 0%, rgba(143,123,255,.20), transparent 70%),
    radial-gradient(40% 40% at 80% 100%, rgba(255,178,77,.08), transparent 70%),
    linear-gradient(180deg, #0d0c14, #08080c);
}
.launch::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 44px 44px; -webkit-mask: radial-gradient(70% 70% at 50% 30%, #000, transparent 80%); mask: radial-gradient(70% 70% at 50% 30%, #000, transparent 80%);
}
.launch-orb { display: block; width: 260px; height: 220px; margin: 6px auto -10px; }
.launch-inner { max-width: 800px; margin: 0 auto; text-align: center; }
.launch-kicker { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.launch h1 { margin: 0; font-size: clamp(32px, 4vw, 52px); line-height: 1.04; letter-spacing: -.035em; font-weight: 700; }
.launch h1 span { color: var(--muted); }
.launch-sub { margin: 14px auto 26px; color: var(--muted); max-width: 520px; font-size: 15.5px; }

.prompt {
  position: relative; text-align: left; border-radius: 22px; padding: 16px 16px 12px 20px;
  background: rgba(10,10,15,.8); border: 1px solid var(--line-2);
  box-shadow: 0 30px 80px -40px rgba(143,123,255,.45), inset 0 1px 0 rgba(255,255,255,.04);
  transition: border-color .25s, box-shadow .25s;
}
.prompt:focus-within { border-color: #4a4370; box-shadow: 0 30px 90px -36px rgba(143,123,255,.65), inset 0 1px 0 rgba(255,255,255,.05); }
.prompt textarea { width: 100%; resize: none; border: 0; outline: 0; background: none; font-size: 16px; line-height: 1.55; min-height: 74px; }
.prompt textarea::placeholder { color: var(--dim); }
.prompt-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.prompt-hint { font-size: 12.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prompt-send { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: #f4f3f8; color: #0a0a0f; flex: none; transition: transform .2s var(--ease), opacity .2s; }
.prompt-send:hover { transform: translateY(-1px); }
.prompt-send .icon { width: 17px; height: 17px; stroke-width: 2; }

.chips { list-style: none; padding: 0; margin: 18px 0 30px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chips li {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 13px; border-radius: 999px;
  border: 1px solid var(--line-2); background: rgba(255,255,255,.02); font-size: 12.5px; color: #c9c7d6;
}
.chips .icon { width: 15px; height: 15px; color: var(--violet-2); }

.launch-btn {
  position: relative; display: inline-flex; align-items: center; gap: 16px; height: 58px; padding: 0 12px 0 28px; border-radius: 999px;
  color: #0b0a10; font-weight: 700; font-size: 15.5px; letter-spacing: -.01em;
  background: linear-gradient(180deg, #fbfaff, #e4e0f5);
  box-shadow: 0 0 0 1px rgba(255,255,255,.4) inset, 0 -3px 0 rgba(0,0,0,.12) inset, 0 18px 50px -14px rgba(160,140,255,.75), 0 0 0 6px rgba(143,123,255,.08);
  transition: transform .25s var(--ease), box-shadow .25s;
}
.launch-btn:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(255,255,255,.4) inset, 0 -3px 0 rgba(0,0,0,.12) inset, 0 24px 60px -12px rgba(160,140,255,.9), 0 0 0 8px rgba(143,123,255,.12); }
.eyes { display: inline-flex; gap: 5px; }
.eyes i {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; position: relative;
  background: radial-gradient(circle at 35% 30%, #fff, #d9d4ee 70%); box-shadow: inset 0 -2px 4px rgba(0,0,0,.18), 0 2px 6px rgba(60,40,140,.25);
}
.eyes b {
  width: 14px; height: 14px; border-radius: 50%; display: block;
  background: radial-gradient(circle at 35% 35%, #6b5cff 0 25%, #1a1430 30%);
  transform: translate(var(--ex, 0px), var(--ey, 0px)); transition: transform .08s linear;
}

/* filters */
.filters { display: flex; align-items: center; gap: 14px; margin: 26px 0 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.filters::-webkit-scrollbar { display: none; }
.chain {
  display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px 0 14px; border-radius: 999px; flex: none;
  border: 1px solid var(--line-2); background: var(--bg-2); font-size: 13.5px; font-weight: 500;
}
.chain .icon { width: 15px; height: 15px; color: var(--dim); }
.chain-dot { width: 18px; height: 18px; border-radius: 50%; background: conic-gradient(from 200deg, #c8ff3e, #69e05a, #c8ff3e); box-shadow: inset 0 0 0 4px #0b0b10; }
.filters-rule { width: 1px; height: 26px; background: var(--line-2); flex: none; }
.cats { display: flex; gap: 8px; }
.cats button {
  height: 40px; padding: 0 16px; border-radius: 999px; font-size: 13.5px; color: var(--muted); white-space: nowrap;
  border: 1px solid transparent; background: rgba(255,255,255,.025); transition: .2s;
}
.cats button:hover { color: var(--text); background: rgba(255,255,255,.05); }
.cats button.on { color: var(--text); border-color: #4a4370; background: rgba(143,123,255,.12); }
.example-note { margin: 4px 0 0; font-size: 12.5px; color: var(--dim); }
.example-note b { color: var(--muted); font-weight: 600; }

/* blocks */
.block { margin-top: 44px; }
.block-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.block-head h2 { margin: 0; font-size: 24px; letter-spacing: -.025em; font-weight: 700; }
.block-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.arrows, .view { display: flex; gap: 6px; }
.arrows button, .view button {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--muted);
  border: 1px solid var(--line-2); background: var(--bg-2);
}
.arrows button:hover, .view button:hover { color: var(--text); }
.view button.on { color: var(--text); border-color: #4a4370; background: rgba(143,123,255,.12); }
.arrows .icon, .view .icon { width: 16px; height: 16px; }

/* tall card */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: 232px; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px 2px 10px; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
.card {
  position: relative; aspect-ratio: 232 / 310; border-radius: 20px; overflow: hidden; isolation: isolate; cursor: pointer;
  background: var(--panel); border: 1px solid var(--line); text-align: left;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.card:hover { transform: translateY(-4px); border-color: transparent; box-shadow: 0 0 0 1px rgba(182,168,255,.55), 0 24px 50px -20px rgba(143,123,255,.55); }
.card > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .6s var(--ease); }
.card:hover > img { transform: scale(1.05); }
.card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0,0,0,.25) 0%, transparent 26%, transparent 42%, rgba(4,4,8,.86) 78%, rgba(4,4,8,.96)); }
.card .ph { position: absolute; inset: 0; z-index: -2; }
.card-top { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 6px; align-items: center; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 11px; font-weight: 600;
  background: rgba(8,8,12,.6); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.1); color: #e8e6f2; white-space: nowrap;
}
.pill i { font-style: normal; color: var(--muted); font-weight: 500; }
.pill.ex { color: #e9e4ff; }
.pill.draft { color: #ffd9a3; border-color: rgba(255,178,77,.35); }
.card-body { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 14px 12px; }
.card-name { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-name b { font-size: 19px; letter-spacing: -.02em; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.star { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: rgba(255,255,255,.7); flex: none; }
.star:hover { color: #fff; background: rgba(255,255,255,.08); }
.star.on { color: var(--amber); }
.star.on .icon { fill: var(--amber); }
.star .icon { width: 17px; height: 17px; }
.card-desc { margin: 4px 0 12px; font-size: 12.5px; line-height: 1.45; color: rgba(236,234,245,.78); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-act { display: flex; gap: 8px; justify-content: center; }
.card-act button {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: rgba(20,20,28,.72); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.12); transition: transform .2s var(--ease), background .2s;
}
.card-act button:hover { transform: translateY(-2px); background: rgba(40,40,56,.9); }
.card-act button.buy { background: #f4f3f8; color: #0a0a0f; border-color: transparent; }
.card-act .icon { width: 16px; height: 16px; }

.card-create {
  display: grid; place-items: center; align-content: center; gap: 14px; cursor: pointer; text-align: center;
  background: radial-gradient(80% 60% at 50% 40%, rgba(143,123,255,.14), transparent 70%), var(--panel);
  border: 1px dashed #36334a;
}
.card-create::after { display: none; }
.card-create:hover { border-style: solid; }
.cc-plus { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; border: 1px solid #4a4370; color: var(--violet-2); background: rgba(143,123,255,.08); }
.cc-plus .icon { width: 22px; height: 22px; }
.card-create b { font-size: 16px; }
.card-create span { font-size: 12.5px; color: var(--muted); max-width: 160px; }

/* latest list */
.latest { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 18px; }
.row-item { display: flex; gap: 14px; align-items: center; padding: 8px; border-radius: 16px; cursor: pointer; text-align: left; transition: background .2s; min-width: 0; }
.row-item:hover { background: rgba(255,255,255,.03); }
.row-item img, .row-item .ph { width: 76px; height: 92px; border-radius: 14px; object-fit: cover; flex: none; border: 1px solid var(--line); }
.row-item div { min-width: 0; }
.row-item b { display: block; font-size: 15px; letter-spacing: -.01em; }
.row-item p { margin: 3px 0 6px; font-size: 12.5px; color: var(--muted); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row-item small { font-size: 12px; color: var(--dim); }
.row-item small em { font-style: normal; color: var(--text); font-weight: 600; }

/* skilled */
.skilled { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.sk {
  position: relative; display: grid; grid-template-columns: 112px 1fr; min-height: 118px; border-radius: 18px; overflow: hidden; cursor: pointer; text-align: left;
  border: 1px solid var(--line); background: var(--panel); transition: border-color .25s, transform .25s var(--ease);
}
.sk:hover { border-color: #3d3a55; transform: translateY(-2px); }
.sk-img { position: relative; }
.sk-img img, .sk-img .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sk-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 55%, var(--panel)); }
.sk-body { padding: 14px 14px 12px 12px; display: flex; flex-direction: column; min-width: 0; }
.sk-body b { font-size: 15px; }
.sk-body p { margin: 3px 0 0; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sk-foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; padding-top: 10px; }
.sk-foot small { display: block; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.sk-foot em { font-style: normal; font-weight: 700; font-size: 15px; }
.sk-go { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(143,123,255,.16); color: var(--violet-2); border: 1px solid rgba(143,123,255,.35); }
.sk-go .icon { width: 15px; height: 15px; }
.sk-live { position: absolute; top: 10px; left: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 3px rgba(0,0,0,.4), 0 0 10px var(--amber); z-index: 2; }

/* create */
.create {
  margin-top: 56px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px); gap: 48px; align-items: start;
  padding: 40px; border-radius: 26px; border: 1px solid var(--line);
  background: radial-gradient(60% 80% at 100% 0%, rgba(143,123,255,.10), transparent 70%), var(--bg-2);
  scroll-margin-top: calc(var(--top) + 16px);
}
.create-copy h2 { margin: 10px 0 14px; font-size: clamp(28px, 3vw, 40px); line-height: 1.08; letter-spacing: -.03em; max-width: 520px; }
.create-copy > p:not(.micro) { color: var(--muted); max-width: 500px; margin: 0 0 26px; }
.feat { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 560px; }
.feat div { display: grid; grid-template-columns: 22px 1fr; column-gap: 12px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); }
.feat .icon { grid-row: span 2; color: var(--violet-2); margin-top: 1px; }
.feat b { font-size: 13.5px; }
.feat span { font-size: 12.5px; color: var(--muted); line-height: 1.45; }

.create-box { display: grid; gap: 16px; }
.seg-lg { width: 100%; max-width: 320px; margin: 0 auto; border-radius: 999px; }
.seg-lg button { height: 38px; border-radius: 999px; font-size: 14px; font-weight: 600; }
.seg-lg button.on { background: #f4f3f8; color: #0a0a0f; }
.create-form { display: grid; gap: 14px; }
.field { display: grid; gap: 7px; }
.field > span { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.field input, .field textarea, .field select {
  width: 100%; border-radius: 14px; border: 1px solid var(--line-2); background: var(--panel); padding: 12px 14px; font-size: 14.5px; outline: 0;
  transition: border-color .2s, box-shadow .2s; resize: vertical;
}
.field textarea { line-height: 1.55; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: #4a4370; box-shadow: 0 0 0 4px rgba(143,123,255,.1); }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.upload { position: relative; }
.upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload em { display: flex; align-items: center; gap: 8px; height: 47px; padding: 0 14px; border-radius: 14px; border: 1px dashed #3a3850; font-style: normal; font-size: 13px; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.upload .icon { width: 16px; height: 16px; flex: none; }
.launch-btn-wide { justify-content: center; width: 100%; padding-left: 24px; }
.form-note { margin: 0; text-align: center; font-size: 12px; color: var(--dim); }
.form-err { margin: 0; min-height: 18px; color: #ff9b8a; font-size: 13px; }

/* grid of live cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 14px; }
.grid .card { aspect-ratio: 178 / 270; }
.grid .card-name b { font-size: 16px; }
.grid .card-act button { width: 34px; height: 34px; }
.grid-empty { grid-column: 1 / -1; padding: 40px; text-align: center; color: var(--dim); border: 1px dashed var(--line-2); border-radius: 18px; }

/* placeholder art for agents without an image */
.ph { background: radial-gradient(70% 60% at 30% 25%, hsl(var(--h) 80% 70% / .55), transparent 60%), radial-gradient(70% 70% at 80% 90%, hsl(calc(var(--h) + 60) 80% 55% / .5), transparent 60%), #120f1c; display: grid; place-items: center; }
.ph span { font-weight: 800; font-size: 34px; letter-spacing: -.04em; color: rgba(255,255,255,.85); }

/* footer */
.foot { margin-top: 70px; padding-top: 28px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto auto; gap: 18px 28px; align-items: center; }
.foot-brand p { margin: 6px 0 0; color: var(--dim); font-size: 13px; }
.foot-links { display: flex; gap: 18px; font-size: 13px; color: var(--muted); }
.foot-links a:hover { color: var(--text); }
.foot-legal { grid-column: 1 / -1; margin: 0; font-size: 12px; color: var(--dim); }

/* drawer + modal */
.drawer, .modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; pointer-events: none; }
.drawer-scrim { position: absolute; inset: 0; background: rgba(3,3,6,.7); backdrop-filter: blur(6px); opacity: 0; transition: opacity .3s; }
.drawer.on, .modal.on { pointer-events: auto; }
.drawer.on .drawer-scrim, .modal.on .drawer-scrim { opacity: 1; }
.drawer-card, .modal-card {
  position: relative; width: min(860px, 100%); max-height: calc(100svh - 40px); overflow: auto; border-radius: 24px;
  background: var(--panel); border: 1px solid var(--line-2); box-shadow: 0 40px 120px -30px rgba(0,0,0,.9), 0 0 0 1px rgba(143,123,255,.08);
  opacity: 0; transform: translateY(16px) scale(.98); transition: .35s var(--ease);
}
.drawer.on .drawer-card, .modal.on .modal-card { opacity: 1; transform: none; }
.drawer-card { display: grid; grid-template-columns: 340px 1fr; }
.drawer-x { position: absolute; top: 12px; right: 12px; z-index: 2; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.45); color: var(--text); border: 1px solid var(--line-2); }
.dr-media { position: relative; min-height: 420px; background: #0c0b12; }
.dr-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dr-body { padding: 28px; display: flex; flex-direction: column; gap: 10px; }
.badge { align-self: flex-start; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; border: 1px solid #4a4370; color: var(--violet-2); background: rgba(143,123,255,.1); }
.dr-body h3 { margin: 4px 0 0; font-size: 30px; letter-spacing: -.03em; }
.dr-ticker { margin: 0; font: 600 13px/1 ui-monospace, Menlo, monospace; color: var(--amber); }
.dr-desc { margin: 4px 0 0; color: #cfcddb; line-height: 1.6; }
.dr-skills { display: flex; flex-wrap: wrap; gap: 6px; }
.dr-skills span { font-size: 12px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); }
.dr-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 6px; }
.dr-stats div { padding: 12px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); }
.dr-stats span { display: block; font-size: 11px; color: var(--dim); letter-spacing: .08em; text-transform: uppercase; }
.dr-stats b { font-size: 15px; }
.dr-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: auto; padding-top: 10px; }
.dr-actions .icon { width: 16px; height: 16px; }
.dr-note { margin: 0; font-size: 12.5px; color: var(--dim); min-height: 18px; }

.modal-card { width: min(560px, 100%); padding: 28px; display: grid; gap: 14px; }
.modal-card h3 { margin: -6px 0 4px; font-size: 26px; letter-spacing: -.03em; }
.rv-top { display: grid; grid-template-columns: 150px 1fr; gap: 16px; }
.rv-img { position: relative; aspect-ratio: 3 / 4; border-radius: 16px; overflow: hidden; border: 1px dashed #3a3850; background: radial-gradient(80% 60% at 50% 30%, rgba(143,123,255,.15), transparent 70%), var(--bg-2); cursor: pointer; display: grid; place-items: center; }
.rv-img input { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 2; }
.rv-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rv-img img:not([src]) { display: none; }
.rv-img span { display: grid; justify-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.rv-fields { display: grid; gap: 10px; }
.rv-actions { display: flex; justify-content: flex-end; gap: 8px; }

.tabbar { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  .latest, .skilled { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tb-ca span { max-width: 200px; }
}
@media (max-width: 1100px) {
  .side { transform: translateX(-100%); box-shadow: 30px 0 80px rgba(0,0,0,.6); }
  body.side-open .side { transform: none; }
  body.side-open .side-scrim { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(0,0,0,.5); }
  .main { margin-left: 0; }
  .create { grid-template-columns: 1fr; padding: 28px; }
  .latest, .skilled { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tb-ca { display: none; }
  .ca-strip {
    display: flex; position: fixed; top: var(--top); left: 0; right: 0; z-index: 35; align-items: center; gap: 8px; height: 36px; padding: 0 16px;
    background: rgba(9,9,13,.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
    font: 500 11.5px/1 ui-monospace, Menlo, monospace; color: var(--text);
  }
  .ca-strip b { font: 600 10.5px/1 "Inter", sans-serif; letter-spacing: .1em; color: var(--dim); }
  .ca-strip span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ca-strip button { width: 28px; height: 28px; display: grid; place-items: center; color: var(--muted); }
  .ca-strip .icon { width: 15px; height: 15px; }
  .main { padding-top: calc(var(--top) + 36px + 16px); }
  .side { top: calc(var(--top) + 36px); }
}
@media (max-width: 760px) {
  .app { --top: 60px; }
  .topbar { gap: 8px; padding: 0 12px; }
  .search { display: none; }
  .tb-menu { display: none; }
  .brand-word { font-size: 14px; }
  .tb-right { margin-left: auto; gap: 8px; }
  .tb-create { display: none; }
  .tb-right .btn-white { height: 36px; padding: 0 14px; font-size: 13px; }
  .tb-icon { width: 36px; height: 36px; }
  .main { padding: calc(var(--top) + 36px + 12px) 16px 110px; }
  .launch { padding: 0 16px 30px; border-radius: 22px; }
  .launch-orb { width: 200px; height: 170px; }
  .launch-sub { font-size: 14.5px; }
  .prompt { padding: 14px 12px 10px 14px; border-radius: 18px; }
  .prompt textarea { font-size: 15px; }
  .chips { gap: 6px; margin: 14px 0 22px; }
  .chips li { height: 30px; padding: 0 10px; font-size: 12px; }
  .chips li:nth-child(n+5) { display: none; }
  .launch-btn { height: 52px; font-size: 14.5px; padding-left: 20px; gap: 12px; }
  .eyes i { width: 30px; height: 30px; }
  .eyes b { width: 12px; height: 12px; }
  .rail { grid-auto-columns: 70%; }
  .latest { grid-template-columns: 1fr; }
  .skilled { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .create { padding: 22px 16px; gap: 28px; border-radius: 22px; }
  .feat { grid-template-columns: 1fr; }
  .row2 { grid-template-columns: 1fr; }
  .block-head h2 { font-size: 21px; }
  .foot { grid-template-columns: 1fr; }
  .foot .ca-chip span { font-size: 10.5px; }
  .drawer, .modal { padding: 0; place-items: end center; }
  .drawer-card, .modal-card { border-radius: 24px 24px 0 0; max-height: 92svh; }
  .drawer-card { grid-template-columns: 1fr; }
  .dr-media { min-height: 0; aspect-ratio: 4 / 3; }
  .dr-body { padding: 20px; }
  .rv-top { grid-template-columns: 110px 1fr; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 45;
    height: 64px; padding: 0 6px; border-radius: 20px; background: rgba(14,14,20,.88); backdrop-filter: blur(16px); border: 1px solid var(--line-2);
  }
  .tabbar a, .tabbar button { display: grid; justify-items: center; align-content: center; gap: 3px; font-size: 10.5px; color: var(--muted); }
  .tabbar .on { color: var(--text); }
  .tabbar .icon { width: 20px; height: 20px; }
  .tabbar .tab-create .icon { width: 44px; height: 44px; padding: 11px; border-radius: 14px; background: #f4f3f8; color: #0a0a0f; stroke-width: 2; }
}

/* ---------- launched agents ---------- */
.pill.live { color: #fff; border-color: rgba(182,168,255,.45); background: rgba(40,30,80,.65); }
.pill.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.card-prog { display: block; height: 3px; margin: 10px 2px 0; border-radius: 3px; background: rgba(255,255,255,.12); overflow: hidden; }
.card-prog i { display: block; height: 100%; min-width: 2%; background: var(--orb); border-radius: inherit; }
.bar { height: 8px; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; min-width: 1%; background: var(--orb); border-radius: inherit; transition: width .6s var(--ease); }
.dr-curve { display: grid; gap: 8px; padding: 12px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); }
.dr-curve-top { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.dr-curve-top b { color: var(--text); }
.dr-ca { display: flex; align-items: center; gap: 6px; font: 500 11.5px/1.3 ui-monospace, Menlo, monospace; color: var(--muted); }
.dr-ca code { flex: 1; min-width: 0; word-break: break-all; }
.dr-ca button { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); flex: none; }
.dr-ca button:hover { color: var(--text); background: rgba(255,255,255,.06); }
.dr-ca .icon { width: 15px; height: 15px; }
.dr-launch { margin-top: 4px; height: 52px; font-size: 14.5px; }
.dr-links { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; }
.dr-links a { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.dr-links a:hover { color: var(--text); }
.dr-links .icon { width: 14px; height: 14px; }

/* ---------- chat ---------- */
.chat { border: 1px solid var(--line); border-radius: 16px; background: var(--bg-2); overflow: hidden; }
.chat-log { max-height: 260px; min-height: 120px; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.chat-hint { margin: auto; color: var(--dim); font-size: 13px; }
.chat-msg { margin: 0; max-width: 85%; padding: 9px 12px; border-radius: 14px; font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; }
.chat-msg.user { align-self: flex-end; background: #f4f3f8; color: #0a0a0f; border-bottom-right-radius: 4px; }
.chat-msg.assistant { align-self: flex-start; background: var(--panel-2); border: 1px solid var(--line-2); border-bottom-left-radius: 4px; }
.chat-msg.typing { color: var(--muted); }
.chat-msg.error { align-self: flex-start; color: #ff9b8a; font-size: 12.5px; }
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.chat-form input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 14px; padding: 0 6px; }

/* ---------- review: AI face ---------- */
.rv-left { display: grid; gap: 8px; align-content: start; }
.rv-ai { height: 34px; padding: 0 10px; font-size: 12.5px; }
.rv-ai .icon { width: 14px; height: 14px; }

/* ---------- launch modal ---------- */
.lmodal .modal-card { gap: 12px; }
.lm-agent { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); }
.lm-agent img { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; }
.lm-agent b { display: block; font-size: 16px; }
.lm-agent small { font: 600 12px/1 ui-monospace, Menlo, monospace; color: var(--amber); }
.lm-noimg { padding: 12px; border-radius: 14px; border: 1px dashed #4a4370; font-size: 13px; color: var(--muted); display: grid; gap: 10px; }
.lm-noimg p { margin: 0; }
.lm-upload { position: relative; justify-self: start; height: 36px; font-size: 13px; }
.lm-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.lm-chips { display: flex; gap: 6px; margin-top: -4px; }
.lm-chips button { height: 30px; padding: 0 12px; border-radius: 999px; font-size: 12.5px; color: var(--muted); border: 1px solid var(--line-2); background: var(--bg-2); }
.lm-chips button:hover { color: var(--text); }
.lm-sum { display: grid; gap: 6px; padding: 12px 14px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); font-size: 13px; }
.lm-sum div { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); }
.lm-sum b { color: var(--text); font-weight: 600; }
.lm-steps { margin: 0; padding: 0 0 0 4px; list-style: none; display: grid; gap: 6px; font-size: 13px; color: var(--dim); }
.lm-steps li { display: flex; align-items: center; gap: 10px; }
.lm-steps li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; border: 1px solid currentColor; }
.lm-steps li.ok { color: var(--muted); }
.lm-steps li.ok::before { background: var(--violet-2); border-color: var(--violet-2); }
.lm-steps li.on { color: var(--text); }
.lm-steps li.on::before { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(255,178,77,.2); animation: pulse 1.4s infinite; }
.lm-go { height: 48px; font-size: 15px; }
.lm-go:disabled { opacity: .5; cursor: not-allowed; }
.lm-done { display: grid; gap: 10px; padding: 14px; border-radius: 14px; border: 1px solid rgba(182,168,255,.4); background: rgba(143,123,255,.08); }
.lm-done code { font: 500 12px/1.4 ui-monospace, Menlo, monospace; word-break: break-all; color: var(--muted); }
.lm-done-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- open-in-wallet sheet (phones without an injected wallet) ---------- */
.wsheet { position: fixed; inset: 0; z-index: 80; display: grid; place-items: end center; pointer-events: none; }
.wsheet-scrim { position: absolute; inset: 0; background: rgba(3,3,6,.7); opacity: 0; transition: opacity .3s; }
.wsheet-card { position: relative; width: min(460px, 100%); padding: 24px 20px calc(20px + env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0; background: var(--panel); border: 1px solid var(--line-2); display: grid; gap: 12px; transform: translateY(100%); transition: transform .35s var(--ease); }
.wsheet.on { pointer-events: auto; }
.wsheet.on .wsheet-scrim { opacity: 1; }
.wsheet.on .wsheet-card { transform: none; }
.wsheet-card h3 { margin: 0; font-size: 21px; letter-spacing: -.02em; }
.wsheet-note { margin: 0; color: var(--muted); font-size: 13.5px; }
.wsheet-list { display: grid; gap: 8px; }
.wsheet-list a { display: flex; align-items: center; height: 50px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--bg-2); font-weight: 600; }
.wsheet-list a:hover { border-color: #4a4370; }
@keyframes pulse { 50% { opacity: .55; } }
