/* ═══ PulsePredict — Polymarket Light Theme Clone ═══ */
:root{
  --bg:#f7f7f8;--card:#fff;--border:#e5e7eb;--border2:#d1d5db;
  --txt:#1a1a2e;--txt2:#6b7280;--txt3:#9ca3af;
  --blue:#1652f0;--blue-bg:rgba(22,82,240,.08);
  --green:#00875a;--green-bg:#e7f5ec;
  --red:#dc3545;--red-bg:#fdeaed;
  --font:'Inter',system-ui,sans-serif;--mono:'JetBrains Mono',monospace;
}
*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}
html{font-size:16px;-webkit-font-smoothing:antialiased}
body{font-family:var(--font);background:var(--bg);color:var(--txt);min-height:100vh}
button{cursor:pointer;border:none;background:none;font-family:inherit;color:inherit}
a{color:inherit;text-decoration:none} input{font-family:inherit}
::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:var(--border2);border-radius:3px}
.hidden{display:none!important}

/* Worm-inspired market shell */
:root{
  --worm-bg:#f4f1ea;
  --worm-ink:#15130f;
  --worm-soft:#ebe6da;
  --worm-line:#ddd5c6;
  --worm-yellow:#f4c542;
  --worm-green:#0d9f6e;
}
body{background:var(--worm-bg);color:var(--worm-ink)}
.hdr{height:54px;background:rgba(244,241,234,.92);backdrop-filter:blur(14px);border-bottom:1px solid var(--worm-line)}
.hdr-in{max-width:1480px}
.logo-txt{font-size:16px;letter-spacing:0;color:#17130d}
.hdr-links{display:none}
.hdr-search input{background:#fff7e8;border-color:var(--worm-line);border-radius:999px}
.hdr-search input:focus{border-color:#111;box-shadow:none}
.hdr-search kbd{background:#e5dccb;color:#776d5f}
.btn-create,.btn-dep{border-radius:999px}
.btn-create{background:#fff;border:1px solid var(--worm-line);color:#17130d}
.btn-dep{background:#111;color:#fff}
.hdr-ic,.hdr-avatar,.hdr-bal{display:none}
.catnav{top:54px;background:rgba(244,241,234,.92);backdrop-filter:blur(12px);border-bottom:1px solid var(--worm-line)}
.catnav-in{max-width:1480px}
.cat-row1{gap:6px;padding:8px 0}
.ct{border:1px solid transparent;border-radius:999px;padding:8px 13px;color:#5f584d;font-weight:700}
.ct.active{background:#111;color:#fff;border-color:#111}
.ct:not(.active):hover{background:#fff;border-color:var(--worm-line)}
.worm-layout{max-width:1480px;display:grid;grid-template-columns:210px minmax(0,1fr)340px;gap:18px;padding:18px 20px}
.worm-side,.worm-trade{position:sticky;top:118px;align-self:start}
.worm-side{height:calc(100vh - 136px);display:flex;flex-direction:column;gap:8px}
.worm-brand{display:flex;align-items:center;gap:10px;font-weight:900;font-size:18px;margin-bottom:10px}
.worm-brand img{width:34px;height:34px;object-fit:contain}
.worm-connect,.worm-open{height:42px;border-radius:999px;background:#111;color:#fff;font-weight:800}
.worm-side-title{margin-top:12px;font-size:12px;text-transform:uppercase;color:#8a8173;font-weight:900;letter-spacing:.08em}
.worm-side-title.muted{margin-top:auto}
.worm-side-link,.worm-doc{height:38px;border-radius:10px;padding:0 12px;display:flex;align-items:center;color:#5b544a;font-weight:800;text-align:left}
.worm-side-link.active,.worm-side-link:hover,.worm-doc:hover{background:#fff;color:#111;box-shadow:inset 0 0 0 1px var(--worm-line)}
.worm-feed{min-width:0}
.worm-feed-head{display:flex;align-items:end;justify-content:space-between;margin-bottom:12px}
.worm-feed-head p{font-size:12px;text-transform:uppercase;letter-spacing:.08em;color:#8a8173;font-weight:900}
.worm-feed-head h1{font-size:28px;line-height:1;font-weight:950;letter-spacing:0}
.worm-online{display:flex;align-items:center;gap:7px;font-size:12px;font-weight:800;color:#5e564b}
.worm-online span{width:8px;height:8px;border-radius:50%;background:var(--worm-green);box-shadow:0 0 0 4px rgba(13,159,110,.12)}
.grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.mc{border-color:var(--worm-line);border-radius:8px;background:#fffdf8;padding:12px;box-shadow:0 1px 0 rgba(0,0,0,.03)}
.mc:hover{transform:translateY(-1px);box-shadow:0 12px 28px rgba(44,35,20,.1);border-color:#c8bca9}
.mc-hd{margin-bottom:10px;align-items:center}
.mc-img,.mc-ph{width:34px;height:34px;border-radius:9px}
.mc-t{font-size:14px;font-weight:900;line-height:1.25;color:#17130d;-webkit-line-clamp:2}
.mc-rows{gap:4px;max-height:164px;margin-bottom:10px}
.mc-row{height:30px;background:#f5efe3;border:1px solid #ebe2d4;border-radius:7px;padding:0 5px 0 9px}
.mc-rn{font-size:12px;color:#352f27;font-weight:750}
.mc-rp{font-size:12px;min-width:42px;color:#111}
.mc-si,.mc-no{border-radius:6px;font-size:10px;font-weight:900;padding:5px 8px}
.mc-si{background:#dff7e7;color:#08784f}
.mc-no{background:#ffe2df;color:#b72b2b}
.mc-ft{border-top:1px solid #eee5d8;color:#7f7464;font-weight:800}
.mc-fl::before{content:"wormwtf · ";font-family:var(--font);color:#9b9184}
.mc-fr::after{content:"3 x";display:inline-flex;align-items:center;height:22px;border-radius:999px;background:#111;color:#fff;padding:0 8px;font-size:11px;font-weight:900}
.worm-trade-card{background:#fffdf8;border:1px solid var(--worm-line);border-radius:8px;padding:18px;box-shadow:0 12px 30px rgba(44,35,20,.08)}
.worm-stack{height:74px;position:relative;margin-bottom:14px}
.worm-stack .dot{position:absolute;width:54px;height:54px;border-radius:14px;border:2px solid #111;background:var(--worm-yellow)}
.worm-stack .a{left:0;top:10px;background:#ffdd55}.worm-stack .b{left:42px;top:0;background:#f97316}.worm-stack .c{left:84px;top:12px;background:#22c55e}.worm-stack .d{left:126px;top:4px;background:#60a5fa}
.worm-trade-card h2{font-size:22px;line-height:1.05;margin-bottom:8px;letter-spacing:0}
.worm-trade-card p{font-size:13px;color:#655d52;line-height:1.4;margin-bottom:16px}
.worm-pick-row{display:flex;justify-content:space-between;align-items:center;padding:10px 0;border-top:1px solid #eee5d8;border-bottom:1px solid #eee5d8;margin-bottom:14px;font-weight:900}
#worm-pick-prob{font-size:28px;color:#111}
#worm-pick-vol{font-size:12px;color:#817668}
.worm-leverage{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-bottom:12px}
.worm-leverage button{height:34px;border:1px solid var(--worm-line);background:#fff;border-radius:7px;font-weight:900}
.worm-leverage .active{background:#111;color:#fff;border-color:#111}
.worm-amount{margin-bottom:12px}
.worm-amount label{display:block;font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:#8a8173;font-weight:900;margin-bottom:6px}
.worm-amount input{width:100%;height:44px;border-radius:8px;border:1px solid var(--worm-line);background:#f7f0e3;padding:0 12px;font:800 18px var(--mono);color:#111}
.status-bar{color:#7c7265}
.sk-card{border-color:var(--worm-line);border-radius:8px;background:#fffdf8}
@media(max-width:1180px){.worm-layout{grid-template-columns:170px minmax(0,1fr)}.worm-trade{display:none}.grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:820px){.worm-layout{display:block;padding:14px}.worm-side{display:none}.grid{grid-template-columns:1fr}.worm-feed-head h1{font-size:24px}.hdr-search{max-width:none}.logo-txt{display:none}}

/* ═══ HEADER ═══ */
.hdr{position:sticky;top:0;z-index:100;background:#fff;border-bottom:1px solid var(--border);height:56px}
.hdr-in{max-width:1360px;margin:0 auto;height:100%;display:flex;align-items:center;gap:16px;padding:0 20px}
.logo{display:flex;align-items:center;gap:8px;flex-shrink:0}
.logo-img{height:28px;width:auto;object-fit:contain;flex-shrink:0}
.logo-txt{font-size:18px;font-weight:800;color:var(--txt);letter-spacing:-.5px}
.hdr-links{display:flex;align-items:center;gap:20px;margin-left:16px;margin-right:16px}
.hl{font-size:13px;font-weight:700;color:var(--txt2);text-transform:uppercase;letter-spacing:0.5px;transition:color 0.15s}
.hl:hover{color:var(--txt)}
.hl.active{color:var(--txt)}
.hl-live{display:flex;align-items:center;gap:6px}
.hl-live-dot{width:7px;height:7px;border-radius:50%;background:var(--red);display:inline-block;animation:blink 1.5s infinite}
.hl-live-num{color:var(--red);font-weight:800}
.hdr-search{position:relative;flex:1;max-width:400px}
.hdr-search svg{position:absolute;left:14px;top:50%;transform:translateY(-50%)}
.hdr-search input{width:100%;padding:9px 40px 9px 40px;background:#f3f4f6;border:1px solid transparent;border-radius:24px;font-size:13px;color:var(--txt);outline:none;transition:all .2s}
.hdr-search input::placeholder{color:var(--txt3)}
.hdr-search input:focus{background:#fff;border-color:var(--blue);box-shadow:0 0 0 3px rgba(22,82,240,.1)}
.hdr-search kbd{position:absolute;right:12px;top:50%;transform:translateY(-50%);font-size:11px;color:var(--txt3);background:#e5e7eb;padding:2px 8px;border-radius:4px;font-family:var(--font)}
.hdr-r{display:flex;align-items:center;gap:12px;margin-left:auto;flex-shrink:0}
.hdr-bal{display:flex;flex-direction:column;align-items:center;gap:0}
.bal-l{font-size:9px;color:var(--txt3);font-weight:500;text-transform:uppercase;letter-spacing:.5px}
.bal-v{font-size:13px;font-weight:700;font-family:var(--mono);color:var(--txt)}
.btn-create{padding:8px 16px;border-radius:8px;background:var(--blue-bg);color:var(--blue);font-size:13px;font-weight:700;border:1px solid rgba(22,82,240,.2);transition:all .15s}
.btn-create:hover{background:rgba(22,82,240,.12);border-color:rgba(22,82,240,.35)}
.btn-dep{padding:8px 20px;border-radius:8px;background:var(--blue);color:#fff;font-size:13px;font-weight:700;transition:opacity .15s}
.btn-dep:hover{opacity:.85}
.hdr-ic{width:36px;height:36px;display:flex;align-items:center;justify-content:center;border-radius:8px;transition:background .15s}
.hdr-ic:hover{background:#f3f4f6}
.hdr-avatar{width:36px;height:36px;border-radius:50%;background:linear-gradient(135deg,#a78bfa,#f472b6);display:flex;align-items:center;justify-content:center}
.hdr-avatar:hover{opacity:.85}

/* ═══ CATEGORY NAV ═══ */
.catnav{position:sticky;top:56px;z-index:90;background:#fff;border-bottom:1px solid var(--border)}
.catnav-in{max-width:1360px;margin:0 auto;padding:0 20px}
.cat-row1{display:flex;gap:0;overflow-x:auto;scrollbar-width:none;padding:0}
.cat-row1::-webkit-scrollbar{display:none}
.ct{padding:10px 14px;font-size:13px;font-weight:500;white-space:nowrap;color:var(--txt2);border-bottom:2px solid transparent;transition:all .15s}
.ct:hover{color:var(--txt)}
.ct.active{color:var(--blue);border-bottom-color:var(--blue);font-weight:600}
.cat-row2{display:flex;align-items:center;gap:12px;padding:8px 0}
.cat-title{font-size:15px;font-weight:800;white-space:nowrap;color:var(--txt)}
.cat-pills{display:flex;gap:6px;flex:1;overflow-x:auto;scrollbar-width:none;padding:2px 0}
.cat-pills::-webkit-scrollbar{display:none}
.pill{padding:5px 14px;border-radius:20px;font-size:12px;font-weight:500;white-space:nowrap;border:1px solid var(--border);color:var(--txt2);background:#fff;transition:all .15s}
.pill:hover{border-color:var(--border2);color:var(--txt)}
.pill.active{background:var(--blue);color:#fff;border-color:var(--blue)}
.cat-vw{display:flex;gap:2px;flex-shrink:0;margin-left:auto}
.vw-btn{width:32px;height:32px;display:flex;align-items:center;justify-content:center;border-radius:6px;color:var(--txt3);transition:all .15s}
.vw-btn:hover{color:var(--txt);background:#f3f4f6}
.vw-btn.active{color:var(--blue)}

/* ═══ MAIN ═══ */
.main{min-height:60vh}
.main-in{max-width:1360px;margin:0 auto;padding:16px 20px}
.status-bar{display:flex;align-items:center;gap:8px;padding:12px 0;font-size:11px;color:var(--txt3)}
.live-dot{width:6px;height:6px;border-radius:50%;background:var(--green);animation:blink 2s infinite}
@keyframes blink{0%,100%{opacity:1}50%{opacity:.3}}

/* ═══ SKELETON ═══ */
.sk-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}
.sk-card{background:#fff;border:1px solid var(--border);border-radius:12px;padding:20px;display:flex;flex-direction:column;gap:12px}
.sk-bar{height:14px;border-radius:6px;background:linear-gradient(90deg,#f3f4f6 0%,#e5e7eb 40%,#f3f4f6 60%);background-size:200% 100%;animation:shm 1.5s infinite}
.w50{width:50%}.w60{width:60%}.w70{width:70%}.w80{width:80%}
@keyframes shm{0%{background-position:200% 0}100%{background-position:-200% 0}}

/* ═══ ERROR ═══ */
.err{text-align:center;padding:80px 20px}.err-i{font-size:48px;margin-bottom:16px}
.err h3{font-size:18px;margin-bottom:8px}.err p{font-size:13px;color:var(--txt2);margin-bottom:20px}
.btn-retry{padding:10px 28px;border-radius:8px;background:var(--blue-bg);color:var(--blue);font-size:13px;font-weight:600}
.btn-retry:hover{background:rgba(22,82,240,.15)}

/* ═══ CARDS GRID ═══ */
.grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}

/* ═══ MARKET CARD — exact Polymarket style ═══ */
.mc{background:#fff;border:1px solid var(--border);border-radius:12px;padding:16px;cursor:pointer;transition:all .2s;animation:cin .3s ease backwards}
.mc:hover{box-shadow:0 4px 16px rgba(0,0,0,.08);border-color:var(--border2)}
@keyframes cin{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.mc:nth-child(1){animation-delay:0ms}.mc:nth-child(2){animation-delay:30ms}.mc:nth-child(3){animation-delay:60ms}.mc:nth-child(4){animation-delay:90ms}
.mc:nth-child(5){animation-delay:120ms}.mc:nth-child(6){animation-delay:150ms}.mc:nth-child(7){animation-delay:180ms}.mc:nth-child(8){animation-delay:210ms}

.mc-hd{display:flex;align-items:flex-start;gap:10px;margin-bottom:14px}
.mc-img{width:32px;height:32px;border-radius:50%;object-fit:cover;flex-shrink:0;background:#f3f4f6}
.mc-ph{width:32px;height:32px;border-radius:50%;background:#e5e7eb;display:flex;align-items:center;justify-content:center;font-size:14px;flex-shrink:0}
.mc-t{font-size:14px;font-weight:600;line-height:1.4;color:var(--txt);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}

.mc-rows{display:flex;flex-direction:column;gap:5px;margin-bottom:12px;max-height:105px;overflow-y:auto;padding-right:4px}
.mc-rows::-webkit-scrollbar{width:4px}
.mc-rows::-webkit-scrollbar-track{background:transparent}
.mc-rows::-webkit-scrollbar-thumb{background:var(--border2);border-radius:2px}
.mc-row{display:flex;align-items:center;gap:6px}
.mc-rn{flex:1;font-size:12px;color:var(--txt2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mc-rp{font-size:13px;font-weight:700;font-family:var(--mono);min-width:38px;text-align:right;color:var(--txt)}
.mc-si,.mc-no{padding:4px 10px;border-radius:6px;font-size:11px;font-weight:600;transition:all .12s}
.mc-si{background:var(--green-bg);color:var(--green)}
.mc-si:hover{background:#d1eddb}
.mc-no{background:var(--red-bg);color:var(--red)}
.mc-no:hover{background:#f9d0d5}

.mc-ft{display:flex;align-items:center;justify-content:space-between;font-size:11px;color:var(--txt3);padding-top:10px;border-top:1px solid #f3f4f6}
.mc-fl{display:flex;align-items:center;gap:4px;font-family:var(--mono);font-weight:500}
.mc-fr{display:flex;align-items:center;gap:8px}
.mc-fr svg{width:14px;height:14px;color:var(--txt3);cursor:pointer;transition:color .15s}
.mc-fr svg:hover{color:var(--txt)}

/* ═══ DETAIL VIEW ═══ */
.detail{min-height:100vh;background:var(--bg)}
.detail-in{max-width:1360px;margin:0 auto;padding:0 20px 60px}
.dv-back{display:flex;align-items:center;gap:6px;font-size:13px;font-weight:500;color:var(--txt2);padding:14px 0;transition:color .15s}
.dv-back:hover{color:var(--blue)}
.dv-body{display:grid;grid-template-columns:1fr 340px;gap:24px;align-items:flex-start}
.dv-left{min-width:0}
.dv-hdr{display:flex;align-items:flex-start;gap:14px;margin-bottom:10px}
.dv-img{width:48px;height:48px;border-radius:50%;object-fit:cover;background:#f3f4f6;flex-shrink:0;border:1px solid var(--border)}
.dv-title{font-size:22px;font-weight:800;line-height:1.35;color:var(--txt)}
.dv-meta{display:flex;align-items:center;gap:12px;margin-bottom:20px}
.dv-vol{font-size:14px;font-weight:600;font-family:var(--mono);color:var(--txt)}
.dv-badge{padding:3px 12px;border-radius:20px;background:var(--blue-bg);color:var(--blue);font-size:11px;font-weight:600}
.dv-chart-card{background:#fff;border:1px solid var(--border);border-radius:12px;overflow:hidden;margin-bottom:20px}
.dv-chart-head{display:flex;gap:0;border-bottom:1px solid var(--border);padding:0 16px}
.dv-cht{padding:10px 16px;font-size:12px;font-weight:600;color:var(--txt2);border-bottom:2px solid transparent}
.dv-cht.active{color:var(--blue);border-bottom-color:var(--blue)}
.dv-chart-card canvas{width:100%;height:300px;display:block;padding:12px 16px}
.dv-periods{display:flex;justify-content:flex-end;gap:4px;padding:8px 16px;border-top:1px solid #f3f4f6}
.per{padding:4px 12px;border-radius:6px;font-size:11px;font-weight:600;color:var(--txt3);transition:all .15s}
.per:hover{color:var(--txt);background:#f3f4f6}
.per.active{background:var(--blue-bg);color:var(--blue)}
.dv-outcomes-hd{font-size:14px;font-weight:700;margin-bottom:10px;color:var(--txt)}
.dv-outcomes{display:flex;flex-direction:column;gap:4px;margin-bottom:20px;max-height:400px;overflow-y:auto;padding-right:6px}
.dv-outcomes::-webkit-scrollbar{width:4px}
.dv-outcomes::-webkit-scrollbar-track{background:transparent}
.dv-outcomes::-webkit-scrollbar-thumb{background:var(--border2);border-radius:2px}
.dv-or{display:flex;align-items:center;gap:8px;padding:10px 14px;border-radius:10px;background:#fff;border:1px solid var(--border);cursor:pointer;transition:all .15s}
.dv-or:hover{border-color:var(--border2);box-shadow:0 2px 8px rgba(0,0,0,.04)}
.dv-or.sel{border-color:var(--blue);background:rgba(22,82,240,.03)}
.dv-or-img{width:24px;height:24px;border-radius:50%;object-fit:cover;background:#f3f4f6;flex-shrink:0}
.dv-or-n{flex:1;font-size:13px;font-weight:500;color:var(--txt)}
.dv-or-p{font-size:14px;font-weight:700;font-family:var(--mono);color:var(--blue)}
.dv-or-si,.dv-or-no{padding:5px 12px;border-radius:6px;font-size:11px;font-weight:600}
.dv-or-si{background:var(--green-bg);color:var(--green)}.dv-or-si:hover{background:#d1eddb}
.dv-or-no{background:var(--red-bg);color:var(--red)}.dv-or-no:hover{background:#f9d0d5}
.dv-desc{font-size:13px;line-height:1.7;color:var(--txt2);background:#fff;border:1px solid var(--border);border-radius:12px;padding:16px}

/* ═══ TRADE PANEL ═══ */
.dv-right{position:sticky;top:calc(56px + 16px);align-self:flex-start}
.trade-panel{background:#fff;border:1px solid var(--border);border-radius:12px;padding:20px}
.tp-name{font-size:15px;font-weight:700;margin-bottom:14px;text-align:center;color:var(--txt)}
.tp-dir{display:flex;gap:8px;margin-bottom:16px}
.tp-yes,.tp-no{flex:1;padding:14px;border-radius:10px;font-size:14px;font-weight:700;display:flex;align-items:center;justify-content:center;gap:8px;border:2px solid transparent;transition:all .15s}
.tp-yes{background:var(--green-bg);color:var(--green)}
.tp-yes.active{border-color:var(--green);box-shadow:0 0 12px rgba(0,135,90,.12)}
.tp-yes span{font-family:var(--mono);font-weight:800}
.tp-no{background:var(--red-bg);color:var(--red)}
.tp-no.active{border-color:var(--red);box-shadow:0 0 12px rgba(220,53,69,.12)}
.tp-no span{font-family:var(--mono);font-weight:800}
.tp-amts{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:16px}
.tp-a{flex:1;min-width:48px;padding:7px 0;text-align:center;border-radius:8px;font-size:11px;font-weight:600;font-family:var(--mono);border:1px solid var(--border);color:var(--txt2);transition:all .15s}
.tp-a:hover{color:var(--txt);background:#f9fafb;border-color:var(--border2)}
.tp-a.active{color:var(--blue);background:var(--blue-bg);border-color:var(--blue)}
.tp-inp-sec{margin-bottom:16px}
.tp-lbl{display:block;font-size:11px;font-weight:600;color:var(--txt3);margin-bottom:6px;text-transform:uppercase;letter-spacing:.5px}
.tp-inp-w{position:relative}
.tp-\${position:absolute;left:14px;top:50%;transform:translateY(-50%);font-size:16px;font-weight:600;color:var(--txt3)}
.tp-inp{width:100%;padding:12px 14px 12px 28px;background:#f9fafb;border:1px solid var(--border);border-radius:10px;font-size:18px;font-weight:700;font-family:var(--mono);color:var(--txt);outline:none}
.tp-inp:focus{border-color:var(--blue);box-shadow:0 0 0 3px rgba(22,82,240,.08)}
.tp-sum{margin-bottom:16px;padding:14px;border-radius:10px;background:#f9fafb;border:1px solid #f3f4f6}
.tp-r{display:flex;justify-content:space-between;padding:5px 0;font-size:12px;color:var(--txt2)}
.tp-r span:last-child{font-weight:600;font-family:var(--mono);color:var(--txt)}
.tp-rh{border-top:1px solid var(--border);margin-top:6px;padding-top:8px}
.grn{color:var(--green)!important}.redd{color:var(--red)!important}
.tp-submit{width:100%;padding:14px;border-radius:10px;font-size:15px;font-weight:700;color:#fff;transition:all .15s}
.tp-submit.yes-m{background:var(--green);box-shadow:0 4px 16px rgba(0,135,90,.2)}
.tp-submit.no-m{background:var(--red);box-shadow:0 4px 16px rgba(220,53,69,.2)}
.tp-submit:hover{opacity:.9;transform:translateY(-1px)}

/* ═══ TOAST ═══ */
.toasts{position:fixed;bottom:20px;right:20px;z-index:600;display:flex;flex-direction:column;gap:8px}
.toast{padding:12px 20px;background:#fff;border:1px solid var(--border);border-radius:10px;box-shadow:0 8px 32px rgba(0,0,0,.12);font-size:13px;font-weight:500;max-width:380px;animation:tin .25s ease}
.toast.ok{border-left:3px solid var(--green)}.toast.er{border-left:3px solid var(--red)}.toast.inf{border-left:3px solid var(--blue)}
@keyframes tin{from{opacity:0;transform:translateX(16px)}to{opacity:1;transform:none}}

/* ═══ ORDER BOOK (LIBRO DE ÓRDENES) ═══ */
.ob-section {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 20px;
}
.ob-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}
.ob-hdr h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--txt);
}
.ob-spread {
  font-size: 12px;
  font-family: var(--mono);
  font-weight: 700;
  color: var(--txt2);
  background: var(--bg);
  padding: 4px 10px;
  border-radius: 6px;
}
.ob-tables {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.ob-table-w {
  display: flex;
  flex-direction: column;
}
.ob-t-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}
.ob-th {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  font-size: 10px;
  font-weight: 600;
  color: var(--txt3);
  text-transform: uppercase;
  padding-bottom: 6px;
  border-bottom: 1px solid #f3f4f6;
  margin-bottom: 8px;
}
.ob-bids-w .ob-th {
  text-align: right;
}
.ob-bids-w .ob-th span:first-child {
  text-align: left;
}
.ob-bids-w .ob-th span:nth-child(2) {
  text-align: right;
}
.ob-asks-w .ob-th {
  text-align: left;
}
.ob-asks-w .ob-th span:last-child {
  text-align: right;
}
.ob-asks-w .ob-th span:nth-child(2) {
  text-align: left;
}

.ob-rows {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 140px;
}
.ob-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  font-size: 12px;
  font-family: var(--mono);
  padding: 4px 0;
  position: relative;
  overflow: hidden;
}
.ob-row-bg {
  position: absolute;
  top: 0;
  bottom: 0;
  opacity: 0.07;
  z-index: 1;
  transition: width 0.3s ease;
}
.ob-bids-w .ob-row-bg {
  background: var(--green);
  right: 0;
}
.ob-asks-w .ob-row-bg {
  background: var(--red);
  left: 0;
}
.ob-row span {
  z-index: 2;
}
.ob-bids-w .ob-row {
  text-align: right;
}
.ob-bids-w .ob-row span:first-child {
  text-align: left;
  color: var(--txt2);
}
.ob-bids-w .ob-row span:nth-child(2) {
  text-align: right;
  color: var(--txt);
}
.ob-bids-w .ob-row span:nth-child(3) {
  text-align: right;
  color: var(--green);
  font-weight: 700;
}
.ob-asks-w .ob-row {
  text-align: left;
}
.ob-asks-w .ob-row span:first-child {
  text-align: left;
  color: var(--red);
  font-weight: 700;
}
.ob-asks-w .ob-row span:nth-child(2) {
  text-align: left;
  color: var(--txt);
}
.ob-asks-w .ob-row span:nth-child(3) {
  text-align: right;
  color: var(--txt2);
}

/* ═══ OPEN ORDERS (ÓRDENES ABIERTAS) ═══ */
.oo-section {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}
.oo-hdr {
  font-size: 14px;
  font-weight: 700;
  color: var(--txt);
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}
.oo-table {
  display: flex;
  flex-direction: column;
}
.oo-th {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 60px;
  font-size: 10px;
  font-weight: 600;
  color: var(--txt3);
  text-transform: uppercase;
  padding-bottom: 6px;
  border-bottom: 1px solid #f3f4f6;
  margin-bottom: 6px;
}
.oo-th span:nth-child(2), .oo-th span:nth-child(3), .oo-th span:nth-child(4) {
  text-align: right;
}
.oo-rows {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.oo-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 60px;
  font-size: 12px;
  font-family: var(--mono);
  padding: 6px 0;
  align-items: center;
  border-bottom: 1px solid #f9fafb;
}
.oo-row span:nth-child(2), .oo-row span:nth-child(3), .oo-row span:nth-child(4) {
  text-align: right;
}
.oo-row span:first-child.grn {
  color: var(--green);
  font-weight: 600;
}
.oo-row span:first-child.redd {
  color: var(--red);
  font-weight: 600;
}
.oo-cancel {
  text-align: right;
  color: var(--red);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  background: none;
  border: none;
}
.oo-cancel:hover {
  text-decoration: underline;
}

/* ═══ ADVANCED TRADE PANEL CONTROLS ═══ */
/* Buy/Sell Tabs */
.tp-tabs {
  display: flex;
  background: var(--bg);
  padding: 3px;
  border-radius: 8px;
  margin-bottom: 12px;
}
.tp-tab {
  flex: 1;
  padding: 8px 0;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  border-radius: 6px;
  color: var(--txt2);
  transition: all 0.15s;
}
.tp-tab.active {
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
#tpt-buy.active {
  color: var(--blue);
}
#tpt-sell.active {
  color: var(--red);
}

/* Market/Limit Tabs */
.tp-subtabs {
  display: flex;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
  padding: 0 4px;
}
.tp-subtab {
  padding: 6px 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--txt2);
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
}
.tp-subtab:hover {
  color: var(--txt);
}
.tp-subtab.active {
  color: var(--txt);
  border-bottom-color: var(--txt);
}

/* Limit Price Controller */
.tp-limit-price-sec {
  margin-bottom: 16px;
}
.tp-price-ctrl {
  display: flex;
  align-items: center;
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.tp-price-btn {
  width: 44px;
  height: 44px;
  font-size: 18px;
  font-weight: 600;
  color: var(--txt2);
  background: #f3f4f6;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tp-price-btn:hover {
  background: #e5e7eb;
}
.tp-price-input-w {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tp-price-inp {
  width: 100%;
  border: none;
  background: transparent;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--txt);
  outline: none;
  padding: 0 20px 0 10px;
}
/* hide arrows */
.tp-price-inp::-webkit-outer-spin-button,
.tp-price-inp::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.tp-cents {
  position: absolute;
  right: 32%;
  font-size: 16px;
  font-weight: 700;
  color: var(--txt);
  pointer-events: none;
}

/* Portfolio Position Holding Info */
.tp-holding-info {
  font-size: 12px;
  font-weight: 600;
  color: var(--txt2);
  background: rgba(22,82,240,0.05);
  border: 1px solid rgba(22,82,240,0.1);
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
  text-align: center;
}
.tp-holding-info span {
  font-family: var(--mono);
  color: var(--blue);
  font-weight: 700;
}

/* Responsive updates for Order Book */
@media(max-width:1200px){
  .grid,.sk-grid{grid-template-columns:repeat(3,1fr)}
}
@media(max-width:900px){
  .grid,.sk-grid{grid-template-columns:repeat(2,1fr)}
  .dv-body{grid-template-columns:1fr}
  .dv-right{position:static}
  .ob-tables{grid-template-columns:1fr}
}
@media(max-width:640px){
  .grid,.sk-grid{grid-template-columns:1fr}
  .hdr-bal{display:none}
  .logo-txt{display:none}
  .hdr-search{max-width:200px}
}

/* ═══ HEADER CREATE BUTTON ═══ */
.btn-create {
  padding: 8px 16px;
  border-radius: 8px;
  background: #fff;
  border: 1.5px solid var(--blue);
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  transition: all .15s ease-in-out;
  margin-right: 4px;
}
.btn-create:hover {
  background: var(--blue-bg);
  transform: translateY(-0.5px);
}

/* ═══ MODAL CREAR MERCADO ═══ */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(5px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease-out forwards;
}
.modal-card {
  background: #fff;
  border-radius: 16px;
  width: 90%;
  max-width: 520px;
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
  animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  overflow: hidden;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal-hd {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-hd h2 {
  font-size: 16px;
  font-weight: 800;
  color: var(--txt);
}
.modal-close {
  font-size: 22px;
  color: var(--txt3);
  cursor: pointer;
  transition: color 0.15s;
}
.modal-close:hover {
  color: var(--txt);
}

/* Modal Tabs */
.modal-tabs {
  display: flex;
  background: #f3f4f6;
  border-bottom: 1px solid var(--border);
}
.modal-tab {
  flex: 1;
  text-align: center;
  padding: 12px 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--txt2);
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
}
.modal-tab:hover {
  color: var(--txt);
}
.modal-tab.active {
  background: #fff;
  color: var(--blue);
  border-bottom-color: var(--blue);
}

.modal-bd {
  padding: 20px;
  max-height: 70vh;
  overflow-y: auto;
}

/* Form controls */
.form-group {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.form-group label {
  font-size: 11px;
  font-weight: 700;
  color: var(--txt2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-group input[type="text"],
.form-group input[type="url"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  background: #f9fafb;
  color: var(--txt);
  transition: all 0.15s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(22,82,240,0.08);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.cm-range-w {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cm-range-w input[type="range"] {
  flex: 1;
  accent-color: var(--blue);
  height: 5px;
  border-radius: 3px;
}
.cm-range-w span {
  font-size: 13px;
  font-weight: 700;
  font-family: var(--mono);
  min-width: 32px;
  text-align: right;
}

/* Submit buttons */
.cm-submit {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  background: var(--blue);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(22,82,240,0.15);
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.cm-submit:hover {
  opacity: 0.95;
  transform: translateY(-0.5px);
}
#btn-ai-generate {
  background: linear-gradient(135deg, #7c3aed, #1652f0);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.2);
}
#btn-ai-generate:hover {
  opacity: 0.95;
}

/* ═══ AI LOADING OVERLAY ═══ */
.ai-loader-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(26, 26, 46, 0.7);
  backdrop-filter: blur(8px);
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.25s ease-out;
}
.ai-loader-card {
  background: #fff;
  border-radius: 20px;
  padding: 30px;
  width: 90%;
  max-width: 360px;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
  border: 1px solid rgba(124, 58, 237, 0.15);
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.ai-sphere {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #a78bfa, #7c3aed 60%, #1652f0);
  margin: 0 auto 20px;
  position: relative;
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.4);
  animation: spherePulse 2s infinite ease-in-out;
}
.ai-glow {
  position: absolute;
  top: -10%; left: -10%; right: -10%; bottom: -10%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,58,237,0.3) 0%, rgba(22,82,240,0) 70%);
  z-index: -1;
  animation: glowPulse 2s infinite ease-in-out;
}
@keyframes spherePulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 20px rgba(124, 58, 237, 0.4); }
  50% { transform: scale(1.08); box-shadow: 0 0 35px rgba(124, 58, 237, 0.7), 0 0 20px rgba(22, 82, 240, 0.5); }
}
@keyframes glowPulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.3); opacity: 0.9; }
}

.ai-loader-card h3 {
  font-size: 15px;
  font-weight: 800;
  color: var(--txt);
  margin-bottom: 8px;
}
.ai-loader-card p {
  font-size: 12px;
  color: var(--txt2);
  line-height: 1.5;
}

/* Custom market badges */
.mc-custom-badge {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--blue);
  background: var(--blue-bg);
  border: 1px solid rgba(22,82,240,0.15);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: auto;
  display: inline-block;
}
.mc-ai-badge {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  color: #7c3aed;
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: auto;
  display: inline-block;
}

/* ═══ LIVE VIEW (SPORTS LIST) ═══ */
.live-view { max-width: 1360px; margin: 0 auto; padding: 20px; display: flex; gap: 40px; align-items: flex-start; }
.lv-sidebar { width: 220px; flex-shrink: 0; display: flex; flex-direction: column; }
.lv-sb-title { font-size: 13px; font-weight: 700; color: var(--txt); margin-bottom: 12px; }
.lv-sb-link { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; font-size: 13px; color: var(--txt2); text-decoration: none; border-radius: 6px; font-weight: 500; }
.lv-sb-link:hover { background: var(--bg); color: var(--txt); }
.lv-sb-link.active { color: var(--green); }
.lv-sb-link span { color: var(--txt3); font-size: 11px; }

.lv-main { flex: 1; min-width: 0; }
.lv-hdr { font-size: 24px; font-weight: 800; color: var(--txt); text-transform: uppercase; margin-bottom: 24px; letter-spacing: -0.5px; }
.lv-count { color: var(--red); }
.lv-body { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
@media(max-width: 900px) { .lv-body { grid-template-columns: 1fr; } }
.lv-left { display: flex; flex-direction: column; gap: 16px; }

/* Live View Card */
.lvc { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 16px; transition: border-color 0.2s; cursor: pointer; }
.lvc:hover { border-color: var(--border2); }
.lvc-hd { margin-bottom: 16px; }
.lvc-cat { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; color: var(--txt3); text-transform: uppercase; margin-bottom: 8px; }
.lvc-cat img { width: 20px; height: 20px; border-radius: 4px; }
.lvc-title { font-size: 15px; font-weight: 700; color: var(--txt); margin-bottom: 4px; }
.lvc-live { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: var(--red); text-transform: uppercase; letter-spacing: 0.5px; }
.lvc-rows { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.lvc-row { display: flex; align-items: center; gap: 12px; }
.lvc-timg { width: 24px; height: 24px; object-fit: contain; }
.lvc-name { flex: 1; font-size: 14px; font-weight: 500; color: var(--txt); padding-bottom: 4px; border-bottom: 2px solid var(--border); }
.lvc-score { font-family: var(--mono); font-size: 14px; font-weight: 700; background: var(--bg); padding: 4px 8px; border-radius: 6px; border: 1px solid var(--border); }
.lvc-prob { width: 60px; text-align: center; padding: 4px 0; border-radius: 16px; border: 1px solid var(--green); color: var(--green); font-weight: 700; font-family: var(--mono); font-size: 13px; }
.lvc-ft { display: flex; justify-content: space-between; font-size: 11px; color: var(--txt3); padding-top: 12px; border-top: 1px solid var(--border); }

/* ═══ CHART OPTIONS MENU (Kalshi Style) ═══ */
.dv-chart-card { position: relative; }
.btn-chart-opts { background: none; border: none; color: var(--txt3); cursor: pointer; padding: 4px; display: flex; align-items: center; justify-content: center; border-radius: 4px; transition: color 0.15s, background 0.15s; }
.btn-chart-opts:hover { color: var(--txt); background: var(--bg); }
.chart-menu-pop { position: absolute; bottom: 50px; right: 20px; width: 300px; background: #1a1a2e; border-radius: 12px; box-shadow: 0 8px 32px rgba(0,0,0,0.3); z-index: 100; border: 1px solid rgba(255,255,255,0.1); display: flex; flex-direction: column; overflow: hidden; animation: popUp 0.2s ease-out; }
@keyframes popUp { from { opacity: 0; transform: translateY(10px) scale(0.95); } to { opacity: 1; transform: none; } }
.cmp-hdr { padding: 16px; font-size: 13px; font-weight: 700; color: #fff; border-bottom: 1px solid rgba(255,255,255,0.05); }
.cmp-list { display: flex; flex-direction: column; max-height: 280px; overflow-y: auto; padding: 8px; }
.cmp-list::-webkit-scrollbar { width: 6px; }
.cmp-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 3px; }
.cmp-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 8px; cursor: pointer; transition: background 0.15s; }
.cmp-item:hover { background: rgba(255,255,255,0.05); }
.cmp-item.active { background: rgba(255,255,255,0.08); }
.cmp-cbox { width: 16px; height: 16px; border-radius: 3px; border: 2px solid rgba(255,255,255,0.4); display: flex; align-items: center; justify-content: center; transition: all 0.15s; }
.cmp-item.active .cmp-cbox { border-color: var(--chk-color, #f59e0b); background: var(--chk-color, #f59e0b); }
.cmp-cbox svg { width: 12px; height: 12px; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; fill: none; opacity: 0; }
.cmp-item.active .cmp-cbox svg { opacity: 1; }
.cmp-name { flex: 1; font-size: 14px; font-weight: 600; color: rgba(255,255,255,0.9); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmp-pct { font-size: 14px; font-weight: 700; color: #fff; font-family: var(--mono); }


/* ═══ COMMENTS (IDEAS) ═══ */
.dv-comments-sec { margin-top: 40px; border-top: 1px solid var(--border); padding-top: 24px; }
.dvc-hdr { font-size: 18px; font-weight: 700; margin-bottom: 16px; }
.dvc-input-w { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 12px; margin-bottom: 24px; }
.dvc-input-w textarea { width: 100%; border: none; outline: none; resize: none; font-family: var(--font); font-size: 14px; color: var(--txt); height: 60px; }
.dvc-actions { display: flex; justify-content: flex-end; margin-top: 8px; }
.btn-dvc-post { background: var(--txt); color: #fff; border: none; padding: 6px 16px; border-radius: 6px; font-weight: 600; cursor: pointer; transition: opacity 0.15s; }
.btn-dvc-post:hover { opacity: 0.8; }
.dvc-list { display: flex; flex-direction: column; gap: 20px; }
.dvc-item { display: flex; gap: 12px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.dvc-avatar { width: 36px; height: 36px; border-radius: 50%; background: #e5e7eb; overflow: hidden; display: flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; }
.dvc-content { flex: 1; }
.dvc-chdr { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.dvc-name { font-weight: 600; font-size: 13px; color: var(--txt); }
.dvc-time { font-size: 11px; color: var(--txt3); }
.dvc-dir { font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 4px; text-transform: uppercase; }
.dvc-dir.yes { background: var(--green-bg); color: var(--green); }
.dvc-dir.no { background: var(--red-bg); color: var(--red); }
.dvc-text { font-size: 14px; color: var(--txt2); line-height: 1.4; word-break: break-word; }

/* Final Worm fidelity pass */
body{
  background:#f6f2ea;
  color:#17130d;
  overflow-y:scroll;
}
.hdr,.catnav{display:none}
.main-in.worm-layout{
  max-width:1280px;
  grid-template-columns:178px minmax(520px,720px)310px;
  gap:26px;
  padding:20px 22px 40px;
  align-items:start;
}
.worm-side,.worm-trade{top:20px}
.worm-side{height:calc(100vh - 40px);padding:4px 0}
.worm-brand{
  display:flex;
  align-items:center;
  gap:8px;
  margin:0 0 18px;
  color:#17130d;
}
.worm-mark{
  width:34px;
  height:34px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:50% 45% 52% 48%;
  background:#17130d;
  color:#f5f1e8;
  font-size:23px;
  font-weight:950;
  line-height:1;
  transform:rotate(-8deg);
  animation:wormWiggle 5s ease-in-out infinite;
}
.worm-word{
  display:block!important;
  font-size:23px;
  font-weight:950;
  letter-spacing:-.02em;
}
@keyframes wormWiggle{
  0%,90%,100%{transform:rotate(-8deg) translateY(0)}
  93%{transform:rotate(5deg) translateY(-2px)}
  96%{transform:rotate(-12deg) translateY(1px)}
}
.worm-connect{
  min-width:104px;
  width:max-content;
  padding:0 16px;
  height:42px;
  background:#15120d;
  box-shadow:0 2px 0 rgba(0,0,0,.18);
  transition:transform .16s ease, box-shadow .16s ease;
}
.worm-connect.connected,.btn-dep.connected{
  background:#17130d;
  color:#fff;
}
.worm-connect.connected::before{
  content:"";
  display:inline-block;
  width:7px;
  height:7px;
  margin-right:7px;
  border-radius:50%;
  background:#9ee6b2;
  box-shadow:0 0 0 3px rgba(158,230,178,.16);
}
.worm-connect:hover,.worm-open:hover{transform:translateY(-2px);box-shadow:0 8px 18px rgba(0,0,0,.16)}
.worm-side-title{
  margin-top:24px;
  margin-bottom:10px;
  color:#16120d;
  font-size:16px;
  text-transform:none;
  letter-spacing:0;
}
.worm-side-title.muted{
  margin-top:auto;
  color:#1b7e55;
}
.worm-side-link,.worm-doc{
  width:132px;
  height:32px;
  padding:0;
  border-radius:0;
  background:transparent!important;
  box-shadow:none!important;
  font-size:14px;
  font-weight:700;
  color:#82786b;
}
.worm-side-link.active,.worm-side-link:hover,.worm-doc:hover{color:#17130d}
.worm-doc{color:#82786b}
.worm-socials{
  display:flex;
  gap:8px;
  margin-top:12px;
}
.worm-socials a{
  width:24px;
  height:24px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  background:#17130d;
  color:#f5f1e8;
  font-size:11px;
  font-weight:900;
  transition:transform .16s ease, opacity .16s ease;
}
.worm-socials a:hover{transform:translateY(-2px);opacity:.82}
.worm-copy{
  margin-top:8px;
  color:#8b8173;
  font-size:12px;
  font-weight:800;
}
.worm-feed-head{
  align-items:center;
  margin:4px 0 18px;
}
.worm-feed-head h1{
  font-size:24px;
  font-weight:900;
}
.worm-online{
  color:#2f7d55;
  font-size:14px;
  font-weight:800;
}
.worm-online span{
  width:9px;
  height:9px;
  animation:wormBlink 1.7s ease-in-out infinite;
}
@keyframes wormBlink{50%{opacity:.35;transform:scale(.85)}}
.worm-top-tabs,.worm-cats{
  display:flex;
  flex-wrap:wrap;
  gap:16px;
  margin-bottom:14px;
}
.worm-top-tabs{gap:18px}
.worm-cats{gap:15px;margin-bottom:18px}
.worm-tab,.worm-cat{
  padding:0;
  height:22px;
  border-radius:0;
  background:transparent;
  color:#7f7669;
  font-weight:800;
  font-size:14px;
  transition:color .15s ease, transform .15s ease;
}
.worm-tab.active,.worm-cat.active,.worm-tab:hover,.worm-cat:hover{
  color:#17130d;
  transform:translateY(-1px);
}
.worm-tab.active::after,.worm-cat.active::after{
  content:"";
  display:block;
  height:2px;
  margin-top:2px;
  border-radius:999px;
  background:#17130d;
  animation:tabIn .18s ease both;
}
@keyframes tabIn{from{transform:scaleX(.35);opacity:.4}to{transform:scaleX(1);opacity:1}}
.worm-feed-search{
  height:42px;
  display:grid;
  grid-template-columns:1fr 24px;
  align-items:center;
  border-top:1px solid #e3dacd;
  border-bottom:1px solid #e3dacd;
  margin:0 0 12px;
}
.worm-feed-search input{
  min-width:0;
  border:0;
  outline:0;
  background:transparent;
  color:#17130d;
  font:800 14px var(--font);
}
.worm-feed-search input::placeholder{color:#9a9082}
.worm-feed-search span{
  color:#9a9082;
  font-size:12px;
  font-weight:950;
  text-align:right;
}
.grid{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.mc{
  width:100%;
  border:1px solid #e3dacd;
  border-radius:10px;
  background:#fffdfa;
  padding:12px 14px 11px;
  cursor:pointer;
  box-shadow:0 1px 0 rgba(0,0,0,.035);
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
  animation:wormIn .34s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes wormIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.mc:nth-child(1){animation-delay:.02s}.mc:nth-child(2){animation-delay:.04s}.mc:nth-child(3){animation-delay:.06s}
.mc:nth-child(4){animation-delay:.08s}.mc:nth-child(5){animation-delay:.1s}.mc:nth-child(6){animation-delay:.12s}
.mc:nth-child(7){animation-delay:.14s}.mc:nth-child(8){animation-delay:.16s}.mc:nth-child(n+9){animation-delay:.18s}
.mc:hover,.mc.is-picked{
  background:#fffdf7;
  border-color:#cfc0aa;
  box-shadow:0 12px 28px rgba(35,25,12,.1);
  transform:translateY(-2px) scale(1.002);
}
.mc-hd{
  align-items:flex-start;
  gap:10px;
  margin-bottom:10px;
}
.mc-img,.mc-ph{
  width:34px;
  height:34px;
  border-radius:50%;
  border:1px solid #e4d8c8;
  background:#eee2cf;
  color:#15120d;
  font-weight:900;
  display:flex;
  align-items:center;
  justify-content:center;
  object-fit:cover;
}
.mc-headcopy{min-width:0;flex:1}
.mc-meta{
  margin-bottom:2px;
  font-size:12px;
  color:#8d8274;
  font-weight:800;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.mc-t{
  font-size:15px;
  line-height:1.25;
  font-weight:900;
  letter-spacing:0;
  color:#17130d;
  display:block;
}
.mc-rows{
  max-height:260px;
  overflow:hidden;
  gap:0;
  margin:3px 0 9px;
}
.mc-row{
  width:100%;
  min-height:27px;
  display:grid;
  grid-template-columns:minmax(120px,1fr) 48px;
  align-items:center;
  gap:12px;
  border:0;
  border-radius:6px;
  padding:0 7px 0 7px;
  background:transparent;
  text-align:left;
  position:relative;
  overflow:hidden;
  transition:background .14s ease, transform .14s ease;
}
.mc-row::before{
  content:"";
  position:absolute;
  inset:3px auto 3px 0;
  width:var(--pct,0%);
  border-radius:5px;
  background:#f0e8dc;
  transform-origin:left;
  animation:wormGrow .55s ease both;
  z-index:0;
}
.mc-row > *{position:relative;z-index:1}
.mc-row:hover{
  background:#f3eadc;
  transform:translateX(2px);
}
.mc-row.is-selected{
  background:#17130d;
  color:#fff;
  animation:selectedTick .28s ease;
}
.mc-row.is-selected .mc-rn,
.mc-row.is-selected .mc-rp{color:#fff}
.mc-row.is-selected::before{background:#31291f}
@keyframes selectedTick{
  45%{transform:translateX(4px) scale(1.012)}
}
.mc-rn{
  padding-left:2px;
  font-size:14px;
  font-weight:700;
  color:#221d17;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.mc-rp{
  min-width:0;
  text-align:right;
  font-size:14px;
  font-family:var(--font);
  font-weight:900;
  color:#17130d;
}
@keyframes wormGrow{from{transform:scaleX(0)}to{transform:scaleX(1)}}
.mc-ft{
  padding-top:8px;
  border-top:0;
  color:#8b806f;
  font-size:12px;
}
.mc-fl{
  font-family:var(--font);
  font-weight:800;
  gap:0;
}
.mc-fl::before{content:""}
.mc-fr span{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:24px;
  min-width:42px;
  border-radius:999px;
  background:#18140f;
  color:#fff;
  font-size:12px;
  font-weight:900;
}
.mc-fr::after{content:none}
.worm-trade-card{
  border:0;
  background:transparent;
  box-shadow:none;
  padding:0;
}
.worm-stack{
  height:86px;
  margin:0 0 12px;
  display:flex;
  align-items:center;
  position:relative;
}
.worm-avatar{
  width:64px;
  height:64px;
  margin-left:-14px;
  border-radius:50%;
  border:3px solid #f5f1e8;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:950;
  font-size:18px;
  color:#15120d;
  box-shadow:0 8px 18px rgba(35,25,12,.12);
  transform:rotate(var(--r,0deg));
}
.worm-avatar:first-child{margin-left:0}
.av1{background:#f6c942;--r:-9deg}.av2{background:#f97316;--r:7deg}.av3{background:#2fc177;--r:-4deg}.av4{background:#74a7ff;--r:10deg;font-size:15px}
.worm-stack.pulse .worm-avatar{animation:avatarPop .38s ease both}
.worm-stack.pulse .av2{animation-delay:.04s}.worm-stack.pulse .av3{animation-delay:.08s}.worm-stack.pulse .av4{animation-delay:.12s}
@keyframes avatarPop{50%{transform:translateY(-8px) scale(1.06) rotate(var(--r,0deg))}}
.worm-trade-card h2{
  font-size:28px;
  line-height:1.03;
  font-weight:950;
  max-width:250px;
  margin-bottom:12px;
}
.worm-trade-card p{
  max-width:270px;
  color:#7d7366;
  font-size:14px;
  font-weight:700;
}
.worm-selected-outcome{
  display:inline-flex;
  align-items:center;
  max-width:270px;
  min-height:30px;
  margin:0 0 10px;
  padding:5px 10px;
  border-radius:999px;
  background:#17130d;
  color:#fff;
  font-size:12px;
  font-weight:950;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.worm-pick-row{
  max-width:270px;
  border-color:#dfd4c4;
}
.worm-leverage,.worm-amount,.worm-open{max-width:270px}
.worm-position{
  max-width:270px;
  margin:0 0 12px;
  padding:10px 0;
  border-top:1px solid #dfd4c4;
  border-bottom:1px solid #dfd4c4;
}
.worm-position div{
  height:25px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  font-size:12px;
}
.worm-position span{
  color:#817668;
  font-weight:800;
}
.worm-position b{
  color:#17130d;
  font-family:var(--mono);
  font-size:12px;
}
.worm-position div:last-child b{color:#16784f}
.worm-open{
  width:100%;
  height:46px;
  background:#15120d;
  color:#fff;
  border-radius:999px;
  font-weight:900;
  transition:transform .16s ease, box-shadow .16s ease;
}
.worm-amount input{background:#fffaf0}
.worm-trade-card.filled .worm-open{animation:confirmFill .55s ease}
@keyframes confirmFill{
  0%{transform:scale(1);background:#15120d}
  35%{transform:scale(1.035);background:#16784f}
  100%{transform:scale(1);background:#15120d}
}
.worm-open-positions{
  max-width:270px;
  margin-top:18px;
}
.worm-op-head{
  color:#17130d;
  font-size:13px;
  font-weight:900;
  margin-bottom:8px;
}
.worm-op-list{
  display:flex;
  flex-direction:column;
  gap:7px;
}
.worm-op-empty{
  color:#8b8173;
  font-size:12px;
  font-weight:800;
}
.worm-op{
  display:grid;
  grid-template-columns:1fr 38px;
  gap:8px;
  align-items:center;
  padding:8px 0;
  border-top:1px solid #dfd4c4;
  animation:wormIn .22s ease both;
}
.worm-op strong{
  display:block;
  color:#17130d;
  font-size:12px;
  font-weight:950;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.worm-op span{
  display:block;
  color:#817668;
  font-size:11px;
  font-weight:750;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.worm-op b{
  display:flex;
  align-items:center;
  justify-content:center;
  height:24px;
  border-radius:999px;
  background:#17130d;
  color:#fff;
  font-size:11px;
}
.worm-mobile-trade{
  display:none;
  position:fixed;
  left:12px;
  right:12px;
  bottom:12px;
  z-index:520;
  grid-template-columns:1fr 92px;
  gap:10px;
  align-items:center;
  padding:10px 10px 10px 12px;
  border:1px solid #d8cbb7;
  border-radius:18px;
  background:rgba(255,250,240,.94);
  backdrop-filter:blur(14px);
  box-shadow:0 14px 34px rgba(35,25,12,.18);
}
.worm-mobile-trade strong{
  display:block;
  color:#17130d;
  font-size:13px;
  font-weight:950;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.worm-mobile-trade span{
  display:block;
  color:#817668;
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.worm-mobile-trade button{
  height:40px;
  border-radius:999px;
  background:#17130d;
  color:#fff;
  font-size:12px;
  font-weight:950;
}

/* Worm-like market detail page */
.market-page{background:#f6f2ea}
.market-shell{
  max-width:1280px;
  margin:0 auto;
  display:grid;
  grid-template-columns:178px minmax(0,760px)310px;
  gap:26px;
  padding:20px 22px 44px;
}
.market-side{position:sticky;top:20px}
.market-back{margin-top:22px}
.market-detail{min-width:0}
.market-backline{
  display:inline-block;
  margin:0 0 16px;
  color:#887f73;
  font-size:15px;
  font-weight:900;
}
.market-hero{
  display:grid;
  grid-template-columns:48px 1fr;
  gap:12px;
  align-items:start;
  margin-bottom:18px;
  padding-bottom:18px;
  border-bottom:1px solid #e3dacd;
}
.market-icon{
  width:48px;
  height:48px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#17130d;
  color:#fff;
  font-weight:950;
  font-size:24px;
}
.market-hero h1{
  font-size:30px;
  line-height:1.05;
  font-weight:950;
  margin:0 0 12px;
}
.market-stats{
  display:flex;
  flex-wrap:wrap;
  gap:16px;
}
.market-stats span{
  display:flex;
  flex-direction:column;
  gap:2px;
}
.market-stats b{
  color:#887f73;
  font-size:11px;
  font-weight:900;
}
.market-stats strong{
  color:#17130d;
  font-size:13px;
  font-weight:950;
}
.market-byline{
  margin-bottom:14px;
  color:#81776a;
  font-size:13px;
  font-weight:800;
}
.market-byline a{color:#17130d;font-weight:950}
.market-byline span{margin-left:10px}
.market-outcomes{
  display:flex;
  flex-direction:column;
  gap:0;
  border-top:1px solid #e3dacd;
}
.market-outcome{
  display:grid;
  grid-template-columns:38px minmax(120px,1fr) 84px 84px 64px;
  gap:10px;
  align-items:center;
  min-height:58px;
  padding:8px 10px;
  border:0;
  border-bottom:1px solid #e3dacd;
  border-radius:0;
  background:transparent;
  text-align:left;
  transition:transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.market-outcome:hover,.market-outcome.active{
  transform:translateX(2px);
  box-shadow:none;
  background:#fffdfa;
}
.market-outcome-icon{
  width:34px;
  height:34px;
  border-radius:50%;
  background:#efe6d8;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:950;
}
.market-outcome strong{font-size:15px;font-weight:950;color:#17130d}
.market-outcome span{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:32px;
  border-radius:999px;
  font-size:12px;
  font-weight:950;
  color:#17130d;
}
.market-outcome .yes-price{background:#f0e8dc}
.market-outcome .no-price{background:#eee7dc;color:#5f564b}
.market-outcome em{
  font-style:normal;
  color:#887f73;
  font-size:12px;
  font-weight:900;
  text-align:right;
}
.market-tabs,.market-periods{
  display:flex;
  gap:18px;
  margin-top:24px;
}
.market-tabs button,.market-periods button{
  color:#81776a;
  font-size:13px;
  font-weight:900;
}
.market-tabs .active,.market-periods .active{color:#17130d}
.market-tab-panel{
  margin-top:14px;
  border-top:1px solid #e3dacd;
}
.market-chart-wrap{
  margin-top:18px;
  border-top:1px solid #e3dacd;
  border-bottom:1px solid #e3dacd;
  padding:12px 0;
}
.market-chart-wrap canvas{
  width:100%;
  height:220px;
  display:block;
  border-radius:10px;
}
.market-feed-item{
  display:grid;
  grid-template-columns:128px 1fr auto;
  gap:10px;
  align-items:center;
  min-height:46px;
  border-bottom:1px solid #e3dacd;
  color:#17130d;
  font-size:13px;
}
.market-feed-item b{
  font-weight:950;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.market-feed-item span{
  color:#5f564b;
  font-weight:800;
}
.market-feed-item em{
  font-style:normal;
  color:#887f73;
  font-size:12px;
  font-weight:900;
}
.market-comment{
  margin-top:18px;
  border:1px solid #e3dacd;
  border-radius:12px;
  background:#fffdfa;
  padding:12px;
  transition:border-color .16s ease, box-shadow .16s ease;
}
.market-comment:focus-within{
  border-color:#cfc2b2;
  box-shadow:0 10px 24px rgba(35,25,12,.06);
}
.market-comment textarea{
  width:100%;
  height:68px;
  resize:none;
  border:0;
  outline:0;
  background:transparent;
  font:700 14px var(--font);
  color:#17130d;
}
.market-comment button{
  display:block;
  margin-left:auto;
  height:32px;
  padding:0 16px;
  border-radius:999px;
  background:#17130d;
  color:#fff;
  font-weight:900;
}
#market-open.filled{animation:confirmFill .55s ease}
.market-trade{position:sticky;top:20px;align-self:start}
.portfolio-shell{grid-template-columns:178px minmax(0,820px)}
.portfolio-detail h1{
  font-size:30px;
  line-height:1;
  margin:4px 0 18px;
  font-weight:950;
}
.portfolio-summary{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:0;
  border-top:1px solid #e3dacd;
  border-bottom:1px solid #e3dacd;
  margin-bottom:18px;
}
.portfolio-summary div{
  padding:14px 16px 14px 0;
  display:flex;
  flex-direction:column;
  gap:4px;
}
.portfolio-summary span{
  color:#887f73;
  font-size:12px;
  font-weight:900;
}
.portfolio-summary b{
  color:#17130d;
  font-size:20px;
  font-weight:950;
  font-family:var(--mono);
}
.portfolio-list{
  border-top:1px solid #e3dacd;
}
.portfolio-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) 48px 110px 80px 62px;
  gap:12px;
  align-items:center;
  min-height:58px;
  border-bottom:1px solid #e3dacd;
}
.portfolio-row strong{
  display:block;
  color:#17130d;
  font-size:14px;
  font-weight:950;
}
.portfolio-row span{
  display:block;
  color:#887f73;
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.portfolio-row span a{
  color:#887f73;
}
.portfolio-row span a:hover{
  color:#17130d;
}
.portfolio-row b{
  display:flex;
  align-items:center;
  justify-content:center;
  height:26px;
  border-radius:999px;
  background:#17130d;
  color:#fff;
  font-size:12px;
}
.portfolio-row em,.portfolio-row i{
  color:#5f564b;
  font-style:normal;
  font-size:12px;
  font-weight:900;
  text-align:right;
}
.portfolio-close{
  height:28px;
  border-radius:999px;
  background:#efe6d8;
  color:#17130d;
  font-size:11px;
  font-weight:950;
}
.portfolio-close:hover{background:#17130d;color:#fff}
.portfolio-empty{
  padding:26px 0;
  color:#887f73;
  font-size:13px;
  font-weight:800;
}
@media(max-width:1120px){
  .market-shell{grid-template-columns:156px minmax(0,1fr)}
  .market-trade{display:none}
}
@media(max-width:760px){
  .market-shell{display:block;padding:16px}
  .market-side{display:none}
  .market-outcome{grid-template-columns:34px minmax(80px,1fr) 64px 64px;gap:8px}
  .market-outcome em{display:none}
  .market-hero h1{font-size:24px}
  .portfolio-summary{grid-template-columns:1fr}
  .portfolio-row{grid-template-columns:minmax(0,1fr) 44px 56px;gap:8px}
  .portfolio-row em,.portfolio-row i{display:none}
}
.status-bar{font-size:12px;padding:15px 0 0}
.sk-grid{display:flex;flex-direction:column;gap:12px}
.sk-card{height:112px;border-radius:10px}
@media(max-width:1120px){
  .main-in.worm-layout{grid-template-columns:156px minmax(0,1fr);max-width:980px}
  .worm-trade{display:none}
  .worm-mobile-trade{display:grid}
}
@media(max-width:760px){
  .main-in.worm-layout{display:block;padding:16px}
  .main{padding-bottom:82px}
  .worm-side{display:none}
  .worm-feed-head h1{font-size:23px}
  .worm-top-tabs,.worm-cats{gap:12px}
  .mc-row{grid-template-columns:minmax(90px,1fr) 72px 40px}
  .mc-t{font-size:14px}
}

/* Worm palette lock: keep old exchange styles from leaking through */
:root{
  --worm-paper:#f6f2ea;
  --worm-card:#fffdfa;
  --worm-ink:#17130d;
  --worm-muted:#887f73;
  --worm-rule:#e3dacd;
  --worm-soft:#f0e8dc;
}
body,
.market-page{
  background:var(--worm-paper)!important;
  color:var(--worm-ink)!important;
}
.worm-feed,
.market-detail,
.portfolio-detail{
  color:var(--worm-ink);
}
.mc,
.market-outcome:hover,
.market-outcome.active,
.market-comment,
.worm-mobile-trade{
  background:var(--worm-card)!important;
}
.mc,
.market-comment,
.worm-mobile-trade{
  border-color:var(--worm-rule)!important;
}
.worm-tab,
.worm-cat,
.worm-side-link,
.worm-doc,
.market-tabs button,
.market-periods button{
  color:var(--worm-muted);
}
.worm-tab.active,
.worm-cat.active,
.worm-side-link.active,
.worm-doc.active,
.market-tabs .active,
.market-periods .active{
  color:var(--worm-ink)!important;
}
.worm-connect,
.worm-open,
#market-open,
.market-comment button,
.worm-mobile-trade button{
  background:var(--worm-ink)!important;
  color:#fff!important;
}
.worm-leverage button.active,
.portfolio-row b,
.mc-fr span{
  background:var(--worm-ink)!important;
  color:#fff!important;
}
.market-outcome .yes-price,
.market-outcome .no-price,
.portfolio-close,
.mc-row::before{
  background:var(--worm-soft);
}
.toast{
  background:var(--worm-card)!important;
  border-color:var(--worm-rule)!important;
  color:var(--worm-ink)!important;
}

/* Radical dark Worm home */
body:has(.dark-home){
  background:#121212!important;
  color:#f4f4f4!important;
}
.dark-topbar{
  position:sticky;
  top:0;
  z-index:50;
  height:52px;
  max-width:1200px;
  margin:0 auto;
  display:grid;
  grid-template-columns:90px minmax(260px,420px) 1fr;
  align-items:center;
  gap:18px;
  padding:0 16px;
  background:#121212;
}
.dark-logo span{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:40px;
  height:34px;
  color:#fff;
  font-size:30px;
  font-weight:950;
  transform:rotate(-10deg);
}
.dark-search{
  height:36px;
  display:grid;
  grid-template-columns:1fr 22px;
  align-items:center;
  padding:0 12px 0 16px;
  border-radius:999px;
  background:#202020;
  border:1px solid #2b2b2b;
}
.dark-search input{
  border:0;
  outline:0;
  background:transparent;
  color:#fff;
  font:800 13px var(--font);
}
.dark-search input::placeholder{color:#7b7b82}
.dark-search b{color:#fff;text-align:right}
.dark-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
}
.dark-actions a{
  color:#8d8d95;
  font-weight:850;
  font-size:13px;
}
.dark-actions .btn-dep{
  height:38px;
  padding:0 24px;
  border-radius:999px;
  background:#171717!important;
  border:1px solid #333;
  color:#fff!important;
}
.dark-actions .btn-dep.connected{
  min-width:118px;
  display:inline-flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:1px;
  padding:0 14px;
  background:#202021!important;
}
.dark-actions .btn-dep.connected span{
  font-size:12px;
  font-weight:950;
}
.dark-actions .btn-dep.connected b{
  font-size:10px;
  color:#26d980;
}
.catnav{display:none!important}
.main:has(.dark-home){background:#121212}
.dark-home{
  max-width:1200px;
  margin:0 auto;
  padding:8px 16px 60px;
}
.dark-home .worm-feed{width:100%}
.dark-home .worm-feed-head{
  height:36px;
  margin:0 0 8px;
  display:flex;
  justify-content:center;
  gap:22px;
}
.dark-home .worm-online,
.dark-home .worm-tab,
.dark-home .worm-cat{
  color:#8b8b92;
  font-size:14px;
  font-weight:900;
}
.dark-home .worm-tab.active,
.dark-home .worm-cat.active,
.dark-home .worm-online{
  color:#fff!important;
}
.dark-nav{
  display:flex;
  align-items:center;
  gap:24px;
}
.dark-hero{
  min-height:258px;
  position:relative;
  overflow:hidden;
  display:grid;
  grid-template-columns:1fr 290px 290px;
  gap:12px;
  align-items:end;
  padding:20px 24px;
  border-radius:0 0 24px 24px;
  background:
    radial-gradient(circle at 46% 46%, #ff3d0a 0 24%, transparent 25%),
    radial-gradient(circle at 20% 86%, #3148ff 0 24%, transparent 25%),
    linear-gradient(135deg,#7b00ff 0 32%,#ff3d0a 32% 100%);
}
.hero-copy{
  align-self:stretch;
  display:flex;
  flex-direction:column;
  justify-content:center;
  color:#fff;
  z-index:1;
}
.hero-copy h1{font-size:24px;font-weight:950;margin:0 0 6px}
.hero-copy p{font-size:18px;font-weight:850;color:rgba(255,255,255,.7);margin:0 0 18px}
.hero-clock{display:flex;gap:8px;margin-bottom:24px}
.hero-clock b{
  width:60px;
  height:66px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  border-radius:8px;
  background:rgba(255,255,255,.1);
  border:1px solid rgba(255,255,255,.12);
  font-size:23px;
}
.hero-clock span{font-size:11px;color:rgba(255,255,255,.7)}
.hero-btn{
  width:max-content;
  height:54px;
  display:inline-flex;
  align-items:center;
  padding:0 28px;
  border-radius:999px;
  background:#0f0f10;
  color:#fff;
  font-weight:950;
}
.hero-match{
  min-height:202px;
  padding:28px 22px 18px;
  border-radius:0 0 18px 18px;
  background:#1f1f20;
  color:#fff;
  z-index:1;
}
.hero-match div:not(.hero-picks){
  display:flex;
  justify-content:space-between;
  margin-bottom:18px;
}
.hero-match strong{font-size:16px}
.hero-match span{font-weight:950;color:#a5b3c1}
.hero-picks{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px;margin:28px 0 12px}
.hero-picks button{
  height:40px;
  border-radius:999px;
  border:1px solid #4b4b4d;
  color:#d5d5d7;
  font-weight:950;
}
.hero-match small{color:#aaa;font-weight:850}
.hero-match em{float:right;color:#8d8d95;font-size:20px;font-style:normal;font-weight:950}
.dark-home .grid{
  display:grid;
  grid-template-columns:1fr 1fr 1.15fr;
  gap:16px;
  margin-top:24px;
}
.dark-card{
  min-height:224px;
  background:#202020!important;
  border:1px solid #262626!important;
  border-radius:18px!important;
  color:#fff!important;
  padding:22px!important;
  box-shadow:none!important;
}
.dark-card:nth-child(1){
  background:
    linear-gradient(rgba(0,0,0,.35),rgba(0,0,0,.75)),
    url('/worm-worldcup-hero.png') center/cover!important;
}
.dark-card .mc-meta,
.dark-card .mc-fl{color:#8d8d95!important}
.dark-card .mc-t{color:#fff!important;font-size:17px!important}
.dark-card .mc-ph{
  background:#ff9814!important;
  color:#fff!important;
  border:0!important;
}
.dark-card .mc-row{
  grid-template-columns:minmax(80px,1fr) 46px;
  color:#fff!important;
  min-height:38px;
}
.dark-card .mc-row::before{background:#2f2f30!important}
.dark-card .mc-rn,.dark-card .mc-rp{color:#fff!important}
.dark-card .mc-fr span{
  background:transparent!important;
  color:#8d8d95!important;
  font-size:22px;
}
.dark-card:hover{
  transform:translateY(-4px)!important;
  border-color:#3a3a3c!important;
}
.worm-trade,.worm-mobile-trade{display:none!important}
@media(max-width:900px){
  .dark-topbar{grid-template-columns:44px 1fr auto}
  .dark-actions a{display:none}
  .dark-hero{grid-template-columns:1fr;min-height:auto}
  .hero-match.second{display:none}
  .dark-home .grid{grid-template-columns:1fr}
}

/* Full Worm dark parity */
body:has(.dark-home),
body.market-page{
  background:#101010!important;
  color:#f6f6f6!important;
}
body:has(.dark-home) .topbar,
body:has(.dark-home) .catnav,
body.market-page .topbar,
body.market-page .catnav{
  display:none!important;
}
.dark-topbar{
  background:#101010;
  border-bottom:1px solid rgba(255,255,255,.04);
}
.dark-logo span{
  color:#f7f7f7;
  text-shadow:0 0 18px rgba(255,255,255,.25);
}
.dark-search{
  max-width:420px;
  justify-self:center;
  background:#1d1d1e;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04);
}
.dark-home{
  padding-top:0;
}
.dark-home .worm-feed-head{
  justify-content:center;
  flex-wrap:wrap;
  height:auto;
  min-height:38px;
  border-bottom:1px solid #232323;
}
.dark-nav{
  gap:20px;
  overflow-x:auto;
  scrollbar-width:none;
}
.dark-nav::-webkit-scrollbar{display:none}
.dark-home .worm-online span{
  width:7px;
  height:7px;
  display:inline-block;
  margin-right:7px;
  border-radius:999px;
  background:#fff;
}
.dark-home .worm-tab,
.dark-home .worm-cat,
.dark-home .worm-online{
  background:transparent!important;
  border:0!important;
  padding:8px 0!important;
}
.dark-home .worm-tab.active,
.dark-home .worm-cat.active{
  box-shadow:inset 0 -2px #fff;
}
.dark-hero{
  min-height:272px;
  border-radius:0 0 28px 28px;
  box-shadow:inset 0 -1px 0 rgba(255,255,255,.08);
}
.hero-match{
  border:1px solid rgba(255,255,255,.08);
  box-shadow:0 18px 50px rgba(0,0,0,.28);
}
.dark-home .grid{
  align-items:stretch;
}
.dark-card{
  position:relative;
  min-height:198px;
  border-radius:18px!important;
  background:#1d1d1e!important;
  animation:wormCardIn .58s cubic-bezier(.2,.8,.2,1) both;
  animation-delay:calc(var(--stagger,0) * 42ms);
  will-change:transform,opacity;
}
.dark-card:nth-child(2) .mc-ph{background:#ff9f18!important}
.dark-card:nth-child(3) .mc-ph{background:#7f4dff!important}
.dark-card:nth-child(4) .mc-ph{background:#23c978!important}
.dark-card:nth-child(5) .mc-ph{background:#ff4f4f!important}
.dark-card:nth-child(2){
  background:
    radial-gradient(circle at 16% 18%, rgba(255,159,24,.34), transparent 28%),
    linear-gradient(145deg,#202020,#171717)!important;
}
.dark-card:nth-child(3){
  background:
    radial-gradient(circle at 82% 12%, rgba(127,77,255,.35), transparent 30%),
    linear-gradient(145deg,#202020,#171717)!important;
}
.dark-card:nth-child(4){
  background:
    radial-gradient(circle at 20% 20%, rgba(35,201,120,.28), transparent 28%),
    linear-gradient(145deg,#202020,#171717)!important;
}
.dark-card:nth-child(5){
  background:
    radial-gradient(circle at 82% 22%, rgba(255,79,79,.28), transparent 30%),
    linear-gradient(145deg,#202020,#171717)!important;
}
.dark-card:nth-child(6){
  background:
    radial-gradient(circle at 18% 22%, rgba(96,165,255,.25), transparent 28%),
    linear-gradient(145deg,#202020,#171717)!important;
}
.dark-card::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  border-radius:inherit;
  background:linear-gradient(180deg,rgba(255,255,255,.055),transparent 38%);
}
.dark-card > *{
  position:relative;
  z-index:1;
}
.dark-card:nth-child(n+7){
  min-height:184px;
}
.dark-card .mc-hero{gap:14px!important}
.dark-card .mc-row{
  border-top:1px solid rgba(255,255,255,.06);
  padding:8px 0!important;
  transition:transform .18s ease,color .18s ease,background .18s ease;
}
.mc-pulse{
  display:grid;
  gap:5px;
  margin:14px 0 10px;
}
.mc-pulse i{
  width:100%;
  height:5px;
  position:relative;
  overflow:hidden;
  border-radius:999px;
  background:#2a2a2c;
}
.mc-pulse i::before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:var(--w,40%);
  border-radius:inherit;
  background:linear-gradient(90deg,var(--c,#26d980),color-mix(in srgb,var(--c,#26d980) 35%,#fff));
  box-shadow:0 0 16px color-mix(in srgb,var(--c,#26d980) 55%,transparent);
}
.dark-card:nth-child(n+4) .mc-pulse i:nth-child(n+7){
  display:none;
}
.dark-card .mc-row::before{
  display:none!important;
}
.dark-card .mc-row:hover{
  transform:translateX(6px);
}
.dark-card .mc-row:hover .mc-rp{
  color:#26d980!important;
}
.dark-card:hover .mc-pulse i::before{
  animation:pulseGlow 1.3s ease-in-out infinite alternate;
}
.dark-card .mc-rp{
  text-align:right;
  font-size:16px!important;
  font-weight:950!important;
}
.dark-card .mc-fl{
  margin-top:18px!important;
  border-top:1px solid rgba(255,255,255,.06);
  padding-top:12px!important;
}
.dark-card .mc-fr span{
  line-height:1;
}

body.market-page{
  --worm-ink:#f6f6f6;
  --worm-muted:#8c8c93;
  --worm-card:#1b1b1c;
  --worm-soft:#262626;
  --worm-rule:#2d2d2f;
  min-height:100vh;
}
.market-shell,
.portfolio-shell{
  max-width:1200px;
  min-height:100vh;
  background:#101010!important;
  grid-template-columns:116px minmax(0, 660px) 328px;
  gap:22px;
}
.worm-side,
.market-side{
  background:#101010!important;
  color:#f6f6f6!important;
}
.worm-mark,
.market-side .worm-mark{
  background:#f6f6f6!important;
  color:#111!important;
  box-shadow:0 0 22px rgba(255,255,255,.18);
}
.worm-word,
.market-detail h1,
.portfolio-detail h1{
  color:#f6f6f6!important;
}
.worm-doc,
.market-backline,
.market-byline,
.market-byline a,
.market-stats b,
.market-feed-item span,
.market-feed-item em,
.portfolio-row span,
.worm-copy,
.worm-side-title{
  color:#8c8c93!important;
}
.worm-doc.active,
.worm-doc:hover{
  color:#fff!important;
}
.market-detail,
.portfolio-detail{
  padding-top:28px;
}
.market-hero{
  border-bottom:1px solid #2d2d2f!important;
  padding-bottom:22px;
}
.market-icon{
  background:#1f1f20!important;
  border:1px solid #303033!important;
  color:#fff!important;
}
.market-stats strong,
.portfolio-summary b,
.portfolio-row strong{
  color:#fff!important;
}
.market-outcomes{
  margin-top:18px;
}
.market-outcome{
  min-height:48px;
  background:#171717!important;
  border:1px solid #2b2b2d!important;
  color:#fff!important;
  border-radius:14px!important;
  box-shadow:inset 3px 0 var(--outcome,#26d980);
}
.market-outcome:hover,
.market-outcome.active{
  background:#202021!important;
  border-color:#454548!important;
}
.market-outcome strong,
.market-outcome span{
  color:#f6f6f6!important;
}
.market-outcome-icon{
  background:var(--outcome,#262626)!important;
  color:#fff!important;
  border-color:#363638!important;
}
.market-outcome .yes-price{
  background:color-mix(in srgb, var(--outcome,#16c784) 72%, #ffffff 0%)!important;
  color:#07120b!important;
}
.market-outcome .no-price{
  background:#2a2a2c!important;
  color:#f6f6f6!important;
}
.market-outcome em{
  color:#8c8c93!important;
}
.market-tabs,
.market-periods{
  border-color:#2d2d2f!important;
}
.market-tabs button,
.market-periods button{
  color:#8c8c93!important;
  background:transparent!important;
}
.market-tabs button.active,
.market-periods button.active{
  color:#fff!important;
}
.market-tab-panel,
.market-chart-wrap,
.market-comment,
.portfolio-summary,
.portfolio-list{
  background:#151515!important;
  border:1px solid #2a2a2c!important;
  border-radius:16px!important;
}
.market-chart-wrap{
  padding:14px!important;
}
.market-chart-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.market-chart-head strong{
  color:#fff;
  font-size:14px;
  font-weight:950;
}
.market-chart-head span{
  color:#8c8c93;
  font-size:12px;
  font-weight:800;
}
.market-chart-wrap canvas{
  width:100%;
  height:auto;
  display:block;
  border-radius:12px;
  background:#121212;
}
.market-chart-legend{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:12px;
}
.market-chart-legend button{
  min-height:32px;
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:0 10px;
  border:1px solid #2f2f31;
  border-radius:999px;
  background:#101010;
  color:#8c8c93;
  font-weight:850;
  font-size:12px;
}
.market-chart-legend button.active{
  color:#fff;
  border-color:#5a5a5d;
  background:#202021;
}
.market-chart-legend i{
  width:8px;
  height:8px;
  border-radius:999px;
}
.market-chart-legend b{
  color:#fff;
}
.market-feed-item,
.portfolio-row{
  background:#151515!important;
  border-color:#2a2a2c!important;
  color:#fff!important;
}
.market-feed-item b{
  color:#fff!important;
}
.market-comment textarea{
  background:#101010!important;
  color:#fff!important;
  border-color:#2a2a2c!important;
}
.market-comment textarea::placeholder{
  color:#73737a!important;
}
.market-trade{
  display:block!important;
  position:sticky;
  top:22px;
  height:max-content;
  padding-top:28px;
}
.market-trade .worm-trade-card{
  background:#1d1d1e!important;
  border:1px solid #2d2d2f!important;
  border-radius:24px!important;
  color:#fff!important;
  box-shadow:0 24px 60px rgba(0,0,0,.24)!important;
}
.market-trade .worm-trade-card h2,
.market-trade .worm-trade-card p,
.market-trade .worm-pick-row span,
.market-trade .worm-position b{
  color:#fff!important;
}
.market-trade .worm-selected-outcome{
  background:#101010!important;
  color:#fff!important;
}
.wallet-status{
  min-height:42px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin:14px 0;
  padding:10px 12px;
  border:1px solid #303033;
  border-radius:14px;
  background:#111;
  color:#fff;
}
.wallet-status span{
  color:#8c8c93;
  font-size:11px;
  font-weight:950;
  text-transform:uppercase;
}
.wallet-status b{
  position:relative;
  color:#f4f4f4;
  font-size:12px;
  font-weight:950;
}
.wallet-status.connected b{
  padding-left:14px;
  color:#26d980;
}
.wallet-status.connected b::before{
  content:"";
  position:absolute;
  left:0;
  top:50%;
  width:7px;
  height:7px;
  border-radius:999px;
  background:#26d980;
  transform:translateY(-50%);
  box-shadow:0 0 12px rgba(38,217,128,.85);
}
.market-trade .worm-leverage button{
  background:#151515!important;
  border-color:#343436!important;
  color:#fff!important;
}
.market-trade .worm-leverage button.active,
.market-comment button,
#market-open,
.worm-connect{
  background:#f4f4f4!important;
  color:#101010!important;
}
.worm-connect.connected{
  display:inline-flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:1px;
  line-height:1;
  background:#202021!important;
  color:#fff!important;
  border:1px solid #343436!important;
}
.worm-connect.connected span{
  font-size:12px;
  font-weight:950;
}
.worm-connect.connected b{
  font-size:10px;
  color:#26d980;
}
.worm-connect.connected,
.dark-actions .btn-dep.connected{
  position:relative!important;
  min-width:124px;
  padding-left:24px!important;
}
.worm-connect.connected::before,
.dark-actions .btn-dep.connected::before{
  content:"";
  position:absolute;
  left:12px;
  top:50%;
  width:7px;
  height:7px;
  border-radius:999px;
  background:#26d980;
  transform:translateY(-50%);
  box-shadow:0 0 12px rgba(38,217,128,.85);
}
.market-trade .worm-amount input{
  background:#101010!important;
  border-color:#343436!important;
  color:#fff!important;
}
.market-trade .worm-position{
  border-color:#303033!important;
}
.market-trade .worm-position span,
.market-trade .worm-amount label{
  color:#8c8c93!important;
}
.portfolio-close{
  background:#262626!important;
  color:#fff!important;
}
.portfolio-empty{
  display:grid!important;
  gap:6px!important;
  padding:20px!important;
  color:#8c8c93!important;
  font-size:13px!important;
  font-weight:850!important;
}
.portfolio-empty strong{
  color:#fff;
  font-size:18px;
}
.portfolio-empty span{
  color:#8c8c93;
}
.portfolio-suggestions{
  display:grid;
  gap:10px;
  padding:0 14px 14px;
}
.portfolio-suggestions a{
  min-height:58px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:8px 12px;
  padding:14px;
  border:1px solid #2a2a2c;
  border-radius:14px;
  background:
    radial-gradient(circle at 92% 12%, rgba(38,217,128,.22), transparent 32%),
    #171717;
  color:#fff;
}
.portfolio-suggestions a:nth-child(2){
  background:
    radial-gradient(circle at 92% 12%, rgba(255,159,24,.24), transparent 32%),
    #171717;
}
.portfolio-suggestions a:nth-child(3){
  background:
    radial-gradient(circle at 92% 12%, rgba(96,165,255,.24), transparent 32%),
    #171717;
}
.portfolio-suggestions b{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.portfolio-suggestions span{
  grid-column:1;
  color:#9b9ba1;
  font-size:12px;
  font-weight:850;
}
.portfolio-suggestions em{
  grid-row:1 / span 2;
  grid-column:2;
  color:#fff;
  font-style:normal;
  font-size:20px;
  font-weight:950;
}
@media(max-width:1000px){
  .market-shell,
  .portfolio-shell{
    grid-template-columns:1fr;
    padding:0 16px 48px;
  }
  .market-side{
    position:static;
    flex-direction:row;
    height:auto;
    width:100%;
    padding:16px 0;
    gap:14px;
  }
  .market-trade{
    position:static;
    padding-top:0;
  }
}

.worm-trade-card,
.market-trade .worm-trade-card{
  animation:tradePanelIn .7s cubic-bezier(.2,.8,.2,1) both;
}
.worm-open,
#market-open,
.market-chart-legend button,
.worm-leverage button{
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}
.worm-open:hover,
#market-open:hover,
.market-chart-legend button:hover,
.worm-leverage button:hover{
  transform:translateY(-2px);
}
@keyframes wormCardIn{
  from{opacity:0;transform:translateY(22px) scale(.985)}
  to{opacity:1;transform:translateY(0) scale(1)}
}
@keyframes tradePanelIn{
  from{opacity:0;transform:translateY(18px) scale(.98)}
  to{opacity:1;transform:translateY(0) scale(1)}
}
@keyframes pulseGlow{
  from{filter:saturate(1);opacity:.72}
  to{filter:saturate(1.35);opacity:1}
}
@media (prefers-reduced-motion: reduce){
  .dark-card,
  .worm-trade-card,
  .market-trade .worm-trade-card,
  .dark-card .mc-pulse i::before{
    animation:none!important;
    transition:none!important;
  }
}
