[hidden] { display: none !important; }
:root {
  --bg: #04100e;
  --glass: rgba(10, 22, 24, 0.86);
  --glass2: rgba(12, 26, 28, 0.94);
  --line: rgba(151, 252, 228, 0.13);
  --line2: rgba(151, 252, 228, 0.3);
  --mint: #97fce4;
  --teal: #50d2c1;
  --text: #eefcf8;
  --muted: #8ba19e;
  --green: #4fe3a8;
  --red: #ed7088;
  --amber: #f5c86a;
  --sans: Inter, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--text); font: 14px/1.45 var(--sans); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--mint); }
#world { position: fixed; inset: 0; }
#world canvas { display: block; }

/* 3D-projected labels */
#tags { position: fixed; inset: 0; pointer-events: none; z-index: 2; overflow: hidden; }
.tag { position: absolute; transform: translate(-50%, -100%); white-space: nowrap; pointer-events: auto; cursor: pointer; }
.tag .name { display: inline-block; padding: 2px 7px; border-radius: 6px; background: rgba(4, 16, 14, 0.85); border: 1px solid var(--line2); font: 700 10px var(--sans); letter-spacing: .6px; }
.tag .name i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }
.tag .bub { position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); max-width: 230px; width: max-content; padding: 6px 10px; border-radius: 10px; background: #eafff9; color: #062521; font: 500 12px/1.35 var(--sans); white-space: normal; box-shadow: 0 6px 20px rgba(0,0,0,.35); opacity: 0; transition: opacity .25s; pointer-events: none; }
.tag .bub::after { content: ""; position: absolute; left: 50%; top: 100%; transform: translateX(-50%); border: 6px solid transparent; border-top-color: #eafff9; }
.tag.talk .bub { opacity: 1; }
.tag.bld .lbl { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 7px; border-radius: 9px; background: rgba(8, 20, 22, .9); border: 1px solid var(--line2); box-shadow: 0 8px 24px rgba(0,0,0,.4); position: relative; }
.tag.bld .lbl::after { content: ""; position: absolute; left: 50%; top: 100%; transform: translateX(-50%); border: 6px solid transparent; border-top-color: rgba(151,252,228,.3); }
.tag.bld i { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; background: var(--mint); color: #04201b; font: 800 12px var(--sans); font-style: normal; }
.tag.bld b { display: block; font: 800 12px var(--sans); letter-spacing: 1.4px; text-transform: uppercase; }
.tag.bld small { display: block; font-size: 10px; color: var(--muted); }
.tag.bld:hover .lbl { border-color: var(--mint); }

.loading { position: fixed; inset: 0; z-index: 20; display: grid; place-content: center; justify-items: center; gap: 14px; background: var(--bg); transition: opacity .6s; }
.loading img { width: 120px; animation: bob 1.6s ease-in-out infinite; }
.loading span { font: 600 13px var(--mono); letter-spacing: 2px; color: var(--mint); text-transform: uppercase; }
.loading.done { opacity: 0; pointer-events: none; }
@keyframes bob { 50% { transform: translateY(-8px); } }

/* header */
.top { position: fixed; z-index: 5; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 14px; padding: 10px 14px; background: linear-gradient(180deg, rgba(4,16,14,.9), rgba(4,16,14,0)); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand img { width: 38px; height: 38px; border-radius: 9px; }
.brand b { font: 800 18px var(--sans); letter-spacing: 3px; }
.ca { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--glass); backdrop-filter: blur(10px); font-size: 12px; min-width: 0; }
.ca span { color: var(--mint); font-weight: 700; }
.ca code { font: 12px var(--mono); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.ca button { border: 0; background: rgba(151,252,228,.12); color: var(--mint); border-radius: 6px; padding: 3px 9px; font-size: 11px; font-weight: 700; cursor: pointer; }
nav { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.pill, .ico { border: 1px solid var(--line2); background: var(--glass); backdrop-filter: blur(10px); color: var(--text); padding: 9px 15px; border-radius: 10px; font-weight: 700; font-size: 13px; text-decoration: none; cursor: pointer; white-space: nowrap; }
.ico { padding: 9px 12px; }
.pill:hover, .ico:hover { border-color: var(--mint); }
.pill.mint { background: var(--mint); color: #04201b; border-color: var(--mint); }
.pill.ghost { background: transparent; }

/* shared card look */
.hero, .feed, .stats, .dir, .panel { border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(14px); box-shadow: 0 16px 50px rgba(0,0,0,.45); }
.mini { margin-left: auto; border: 1px solid var(--line); background: transparent; color: var(--muted); width: 26px; height: 26px; border-radius: 7px; cursor: pointer; font-size: 12px; line-height: 1; }
.mini:hover { color: var(--mint); border-color: var(--mint); }

/* hero */
.hero { position: fixed; z-index: 4; left: 14px; top: 70px; width: 372px; padding: 18px 20px 20px; border-radius: 12px; border-top: 3px solid var(--mint); }
.kick { display: flex; align-items: center; font: 600 12px var(--mono); letter-spacing: 3px; color: var(--muted); text-transform: uppercase; }
.dots { display: flex; gap: 6px; margin: 14px 0 12px; }
.dots i { width: 21px; height: 21px; border-radius: 50%; display: grid; place-items: center; font: 700 11px var(--sans); font-style: normal; color: #04201b; }
.dots i:nth-child(1) { background: var(--mint); } .dots i:nth-child(2) { background: var(--amber); } .dots i:nth-child(3) { background: var(--red); } .dots i:nth-child(4) { background: #b79bff; }
.hero h1 { margin: 0; font: 800 29px/1.1 var(--sans); letter-spacing: -.8px; }
.hero p { margin: 10px 0 16px; color: #b9cbc8; font-size: 13.5px; }

/* feed */
.feed { position: fixed; z-index: 4; left: 14px; bottom: 14px; width: 340px; height: min(360px, calc(100vh - 470px)); min-height: 180px; border-radius: 12px; display: flex; flex-direction: column; overflow: hidden; }
.feed.min { height: auto; min-height: 0; }
.feed.min .flist { display: none; }
.fhead, .shead { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.fhead .m { width: 34px; height: 34px; border-radius: 8px; background: var(--mint); color: #04201b; display: grid; place-items: center; font: 800 17px var(--sans); }
.fhead b, .shead b { display: block; font-size: 13.5px; }
.fhead small, .shead small { display: block; font-size: 11px; color: var(--muted); }
.flist { flex: 1; overflow: auto; padding: 4px 14px; }
.flist::-webkit-scrollbar, .pbody::-webkit-scrollbar { width: 6px; } .flist::-webkit-scrollbar-thumb, .pbody::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 3px; }
.ev { display: grid; grid-template-columns: 78px 1fr; gap: 8px; padding: 9px 0; border-bottom: 1px solid rgba(151,252,228,.07); animation: pop .35s; }
.ev time { font: 600 11px var(--mono); color: var(--mint); }
.ev time::after { content: " ■"; color: var(--muted); font-size: 8px; vertical-align: 1px; }
.ev em { display: block; font: 600 10px var(--mono); letter-spacing: 1.5px; color: var(--muted); font-style: normal; }
.ev span { font-size: 12.5px; color: #d6e6e3; }
.ev.job { background: linear-gradient(90deg, rgba(151,252,228,.1), transparent); }
.ev.job em, .ev.launch em { color: var(--mint); }
.ev.whale em { color: #7cc7ff; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } }

/* directory */
.dir { position: fixed; z-index: 4; right: 14px; top: 70px; width: 232px; border-radius: 12px; padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.agent { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: center; padding: 7px 8px; border: 1px solid transparent; border-radius: 9px; background: transparent; cursor: pointer; text-align: left; transition: background .2s, border-color .2s; }
.agent:hover, .agent.on { background: rgba(151,252,228,.06); border-color: var(--line2); }
.agent .av { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font: 800 11px var(--mono); color: #04201b; }
.agent b { display: block; font-size: 12px; letter-spacing: .8px; }
.agent small { display: block; font-size: 10.5px; color: var(--muted); line-height: 1.25; }
.agent .live { display: block; margin-top: 1px; font: 10.5px var(--mono); color: var(--mint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* camera controls */
.camctl { position: fixed; z-index: 4; right: 254px; top: 70px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; background: var(--glass); overflow: hidden; }
.camctl button { width: 34px; height: 32px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 15px; }
.camctl button:hover { color: var(--mint); background: rgba(151,252,228,.06); }

/* stats */
.stats { position: fixed; z-index: 4; right: 14px; bottom: 14px; width: 280px; border-radius: 12px; overflow: hidden; }
.shead img { width: 30px; height: 30px; border-radius: 7px; }
.clock { padding: 10px 14px 8px; font: 700 13px var(--sans); display: flex; align-items: center; gap: 8px; }
.clock span { font-family: var(--mono); color: var(--muted); font-weight: 600; }
.live-dot { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 10px var(--mint); animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.cells { display: grid; grid-template-columns: 1fr 1fr; margin: 0 12px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.cells div { padding: 8px 10px; border-bottom: 1px solid var(--line); }
.cells div:nth-child(odd) { border-right: 1px solid var(--line); }
.cells div:nth-last-child(-n+2) { border-bottom: 0; }
.cells small { display: block; font: 600 9.5px var(--mono); letter-spacing: 1.6px; color: var(--muted); text-transform: uppercase; }
.cells b { font: 700 15px var(--mono); }
#spark { display: block; width: calc(100% - 24px); height: 40px; margin: 10px 12px 12px; }
.stats.min .clock, .stats.min .cells, .stats.min #spark { display: none; }

/* agent panel */
body.open .dir, body.open .stats, body.open .camctl { display: none; }
.panel { position: fixed; z-index: 6; right: 14px; top: 70px; bottom: 14px; width: min(440px, calc(100vw - 28px)); display: flex; flex-direction: column; border-color: var(--line2); border-radius: 14px; background: var(--glass2); animation: slide .3s ease; }
@keyframes slide { from { opacity: 0; transform: translateX(20px); } }
.phead { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.who { display: flex; gap: 10px; align-items: center; }
.who i { width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 12px currentColor; }
.who b { display: block; font: 800 18px var(--sans); letter-spacing: 2px; }
.who small { color: var(--muted); font-size: 12px; }
.x { border: 0; background: rgba(255,255,255,.06); width: 32px; height: 32px; border-radius: 9px; cursor: pointer; }
.pbody { flex: 1; overflow: auto; padding: 14px 16px 18px; }
.intro { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.tabs { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.tabs button { border: 1px solid var(--line); background: transparent; border-radius: 8px; padding: 5px 11px; font-size: 12px; cursor: pointer; color: var(--muted); }
.tabs button.on { border-color: var(--mint); color: var(--mint); background: rgba(151,252,228,.08); }
table { width: 100%; border-collapse: collapse; font: 12px var(--mono); }
th { text-align: right; font: 600 10.5px var(--mono); letter-spacing: 1px; text-transform: uppercase; color: var(--muted); padding: 6px 4px; border-bottom: 1px solid var(--line); position: sticky; top: -14px; background: var(--glass2); }
td { text-align: right; padding: 7px 4px; border-bottom: 1px solid rgba(151,252,228,.06); }
th:first-child, td:first-child { text-align: left; }
td:first-child { font-family: var(--sans); font-weight: 600; }
tr.click { cursor: pointer; } tr.click:hover td { background: rgba(151,252,228,.05); }
.up { color: var(--green); } .dn { color: var(--red); } .mut { color: var(--muted); }
.card { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 10px; background: rgba(4,16,14,.5); }
.card h4 { margin: 0 0 8px; font: 700 15px var(--sans); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
label.f { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--muted); }
.f input, .f select, .f textarea, .inp { width: 100%; padding: 9px 11px; border-radius: 8px; border: 1px solid var(--line); background: rgba(0,0,0,.3); outline: none; font-size: 13px; }
.f input:focus, .f select:focus, .f textarea:focus, .inp:focus { border-color: var(--mint); }
.f select option, .inp option { background: #0c1f1c; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { flex: 1; border: 0; background: transparent; padding: 8px; cursor: pointer; font-weight: 600; color: var(--muted); }
.seg button.on { background: rgba(151,252,228,.12); color: var(--mint); }
.seg button.on.long { background: rgba(79,227,168,.15); color: var(--green); }
.seg button.on.short { background: rgba(237,112,136,.15); color: var(--red); }
.btn { border: 0; background: var(--mint); color: #04201b; padding: 10px 16px; border-radius: 8px; font-weight: 700; cursor: pointer; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.alt { background: rgba(151,252,228,.06); color: var(--text); border: 1px solid var(--line2); }
.btn.sm { padding: 5px 10px; font-size: 12px; }
.row { display: flex; gap: 8px; align-items: center; }
.big { font: 600 26px var(--mono); }
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; font-size: 13px; border-bottom: 1px dashed rgba(151,252,228,.08); }
.kv span:first-child { color: var(--muted); }
.kv span:last-child { font-family: var(--mono); text-align: right; }
.note { font-size: 11px; color: var(--muted); margin: 8px 0 0; }
.wfeed { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow: auto; }
.wfeed div { display: flex; justify-content: space-between; gap: 8px; font: 12px var(--mono); padding: 6px 8px; border-radius: 8px; background: rgba(0,0,0,.25); animation: pop .3s; }
.ideas { display: flex; flex-direction: column; gap: 8px; }
.idea { text-align: left; border: 1px solid var(--line); background: rgba(0,0,0,.25); border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.idea:hover { border-color: var(--mint); }
.idea b { font-size: 14px; } .idea b em { color: var(--mint); font-style: normal; font-family: var(--mono); font-size: 12px; margin-left: 6px; }
.idea p { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.steps { display: flex; gap: 4px; margin-bottom: 12px; }
.steps span { flex: 1; text-align: center; padding: 6px 0; font-size: 11px; font-weight: 600; border-radius: 7px; background: rgba(255,255,255,.04); color: var(--muted); }
.steps span.on { background: rgba(151,252,228,.14); color: var(--mint); }
.steps span.done { color: var(--green); }
.kit { display: grid; grid-template-columns: 108px 1fr; gap: 12px; align-items: start; }
.kit canvas { width: 108px; height: 108px; border-radius: 14px; border: 1px solid var(--line2); }
.tweet { font-size: 12px; padding: 8px 54px 8px 10px; border-radius: 8px; background: rgba(0,0,0,.25); margin-top: 6px; position: relative; }
.tweet button { position: absolute; right: 6px; top: 6px; border: 0; background: rgba(151,252,228,.1); color: var(--mint); border-radius: 6px; font-size: 10px; padding: 2px 6px; cursor: pointer; }
.chat { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.msg { max-width: 88%; padding: 8px 11px; border-radius: 10px; font-size: 13px; white-space: pre-wrap; }
.msg.me { align-self: flex-end; background: var(--mint); color: #04201b; }
.msg.bot { align-self: flex-start; background: rgba(255,255,255,.06); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.chips button { border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 4px 10px; font-size: 11px; cursor: pointer; color: var(--muted); }
.chips button:hover { color: var(--mint); border-color: var(--mint); }
.job { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px; background: rgba(0,0,0,.2); }
.job .av { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font: 800 11px var(--mono); color: #04201b; background: var(--mint); }
.job b { font-size: 12.5px; display: block; }
.job small { font-size: 11px; color: var(--muted); display: block; }
.job.done { opacity: .55; }
.job.done .av { background: var(--muted); }
.job button { border: 0; background: rgba(255,255,255,.06); color: var(--muted); border-radius: 6px; padding: 4px 8px; cursor: pointer; font-size: 11px; }

.hint { position: fixed; z-index: 3; left: 50%; bottom: 18px; transform: translateX(-50%); padding: 8px 15px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); font-size: 12px; color: var(--muted); transition: opacity .4s; pointer-events: none; }

@media (max-width: 1280px) { .pill.ghost { display: none; } .ca code { max-width: 130px; } }
@media (max-width: 1100px) { .hero { width: 320px; } .hero h1 { font-size: 25px; } .feed { width: 300px; } }
@media (max-width: 860px) {
  .ca, .pill.ghost, #buyLink, .camctl, .stats, .hint { display: none !important; }
  .top { gap: 8px; }
  .brand b { font-size: 15px; letter-spacing: 2px; }
  .pill { padding: 8px 11px; font-size: 12px; }
  .hero { left: 10px; right: 10px; width: auto; top: 62px; padding: 14px 16px; }
  .hero h1 { font-size: 22px; } .hero p { font-size: 12.5px; margin: 8px 0 12px; } .dots { margin: 8px 0; }
  .feed { left: 10px; right: 10px; width: auto; bottom: 74px; height: 150px; min-height: 0; }
  .dir { top: auto; bottom: 10px; left: 10px; right: 10px; width: auto; flex-direction: row; overflow-x: auto; padding: 5px; }
  .agent { min-width: 140px; }
  .agent .live { display: none; }
  .panel { top: auto; bottom: 10px; right: 10px; left: 10px; width: auto; height: 70vh; }
  body.open .feed, body.open .hero { display: none; }
}
@media (max-width: 420px) { #walletBtn { display: none; } }
