/* Bitcovex mobile-first pages — light and dark themes share every rule, only tokens differ. */
:root{
  --bg:#f5f7fa; --card:#fff; --soft:#f3f5f7; --soft2:#e6e8eb; --text:#000; --muted:#7f838a; --faint:#a1a5ab;
  --line:#eef0f2; --border:#d9dce0; --accent:#ff9c2e; --accent-text:#f29229; --accent-soft:#fff4e6; --on-accent:#000;
  --green:#20b26c; --red:#ef454a; --head:#16171a; --head-text:#fff; --shadow:0 4px 24px rgba(0,0,0,.06);
  color-scheme:light;
}
html[data-theme="dark"]{
  --bg:#0b0c0e; --card:#121316; --soft:#1f2126; --soft2:#2a2c32; --text:#eaecef; --muted:#8b9096; --faint:#6b7078;
  --line:#222429; --border:#34363d; --accent-text:#ff9c2e; --accent-soft:#2b2115; --head:#121316; --head-text:#fff;
  --shadow:none; color-scheme:dark;
}
*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
html,body{background:var(--bg);color:var(--text);font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;font-size:14px;line-height:1.4}
body{min-height:100vh}
a{color:inherit;text-decoration:none}
button,input,select{font:inherit;color:inherit}
button{background:none;border:0;cursor:pointer}
button:disabled{cursor:not-allowed;opacity:.55}
svg{display:block}
.wrap{max-width:560px;margin:0 auto;background:var(--card);min-height:100vh;display:flex;flex-direction:column}
.hidden{display:none!important}
.muted{color:var(--muted)}

/* header */
.hd{height:56px;display:flex;align-items:center;gap:6px;padding:0 12px 0 16px;background:var(--head);color:var(--head-text);position:sticky;top:0;z-index:20}
.logo{margin-right:auto;display:flex}
.logo img{width:30px;height:30px;display:block}
.hd-nav,.hd-login{display:none}
.hd-account{display:flex;align-items:center;gap:16px}
.icon-btn{width:36px;height:36px;display:grid;place-items:center;border-radius:50%;color:inherit}
.pill-cta{background:var(--accent);color:var(--on-accent);font-weight:600;border-radius:100px;padding:6px 18px;height:32px;display:inline-flex;align-items:center}

/* top tabs */
.tabs{display:flex;gap:20px;padding:0 16px;border-bottom:1px solid var(--line);overflow-x:auto;scrollbar-width:none;background:var(--card)}
.tabs::-webkit-scrollbar{display:none}
.tabs a{white-space:nowrap;color:var(--muted);padding:14px 0 12px;border-bottom:2px solid transparent}
.tabs a.on{color:var(--accent-text);font-weight:700;border-bottom-color:var(--accent)}

/* P2P list */
.title{font-size:14px;font-weight:600;padding:16px 16px 20px}
.row{display:flex;align-items:center;gap:8px}
.toolbar{padding:0 16px 12px;overflow-x:auto;scrollbar-width:none;border-bottom:1px solid var(--line)}
.seg{display:flex;background:var(--soft);border-radius:8px;padding:2px;flex:none}
.seg button{min-width:90px;height:32px;border-radius:7px;font-weight:600;color:var(--faint)}
.seg button.on.buy{background:var(--green);color:#fff}
.seg button.on.sell{background:var(--red);color:#fff}
.chip{height:32px;display:inline-flex;align-items:center;gap:6px;border:1px solid var(--border);border-radius:100px;padding:0 14px;font-size:12px;font-weight:600;white-space:nowrap;flex:none}
.filters{display:flex;align-items:center;gap:16px;padding:10px 16px;font-size:12px;color:var(--faint)}
.filters button{display:flex;align-items:center;gap:5px;color:var(--faint);font-size:12px;text-align:left;min-width:0}
.filters button.val{color:var(--text);font-weight:600}
.filters .asset{font-size:14px;color:var(--text)}
.filters .funnel{margin-left:auto;position:relative;color:var(--muted);padding-left:12px;border-left:1px solid var(--line)}
.badge{position:absolute;top:-7px;right:-8px;min-width:14px;height:14px;border-radius:8px;background:var(--accent);color:#000;font-size:9px;display:grid;place-items:center}
.caret::after{content:"";border:4px solid transparent;border-top-color:currentColor;margin-top:4px;display:inline-block;opacity:.8}
.coin{width:15px;height:15px;border-radius:50%;background:#26a17b;color:#fff;display:inline-grid;place-items:center;font-size:9px;font-weight:700;flex:none}
.coin.inr{background:#6d7cf6}.coin.lg{width:28px;height:28px;font-size:15px}
.sorts{display:flex;gap:12px;padding:0 16px 12px;overflow-x:auto;scrollbar-width:none}
.sorts button{white-space:nowrap;background:var(--soft);color:var(--muted);font-size:12px;font-weight:500;border-radius:4px;padding:4px 8px}
.sorts button.on{background:var(--accent-soft);color:var(--accent-text)}

.thead{display:none}
.ad{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"who who" "price price" "qty act" "pays act";column-gap:12px;padding:16px 14px;border-bottom:1px solid var(--line);font-size:12px}
.ad-who{grid-area:who;min-width:0}.ad>.price{grid-area:price}.ad-qty{grid-area:qty}.ad>.pays{grid-area:pays}.ad-act{grid-area:act;align-self:end}
.ad.best{grid-template-columns:1fr;grid-template-areas:"who" "price" "qty" "pays" "act";margin:4px 12px 8px;border:0;border-radius:14px;background:var(--soft);padding:16px;position:relative}
.ad.best .stats,.ad.best .time{display:none}
.ribbon{position:absolute;top:0;right:0;background:var(--accent-soft);color:var(--accent-text);font-size:12px;padding:3px 10px;border-radius:0 14px 0 10px}
.ad-top{display:flex;align-items:center;gap:6px;margin-bottom:8px;min-width:0}
.ad-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.badge-mark{display:inline-flex;flex:none}
.ava{width:20px;height:20px;border-radius:50%;background:var(--accent);color:#000;font-size:10px;font-weight:600;display:grid;place-items:center;position:relative;flex:none}
.ava.online::after{content:"";position:absolute;right:-1px;bottom:-1px;width:7px;height:7px;border-radius:50%;background:var(--green);border:1px solid var(--card)}
.ad-top .time{margin-left:auto;color:var(--muted);display:flex;align-items:center;gap:3px}
.stats{color:var(--muted);display:flex;gap:10px;margin-bottom:6px}
.stats span+span{border-left:1px solid var(--line);padding-left:10px}
.price{font-size:12px;margin-bottom:4px}
.price b{font-size:20px;font-weight:600;margin-left:4px}
.kv{color:var(--muted);margin-top:3px}.kv em{font-style:normal;color:var(--text);margin-left:3px}
.pays{display:flex;flex-wrap:wrap;gap:4px 14px;margin-top:6px;color:var(--muted)}
.pays span{border-left:2px solid var(--accent);padding-left:5px;line-height:1.1}
.trade{background:var(--green);color:#fff;font-weight:600;font-size:12px;border-radius:100px;height:40px;min-width:110px;padding:0 18px;display:inline-flex;align-items:center;justify-content:center;flex:none}
.trade.sell{background:var(--red)}
.trade.off{background:var(--soft2);color:var(--muted)}
.ad.best .trade{margin-top:14px}

.state{text-align:center;color:var(--muted);padding:56px 24px}
.state svg{margin:0 auto 14px}
.state button{margin-top:14px;color:var(--accent-text);font-weight:600}
.spin{width:28px;height:28px;border:3px solid var(--soft2);border-top-color:var(--accent);border-radius:50%;margin:0 auto;animation:sp .8s linear infinite}
@keyframes sp{to{transform:rotate(360deg)}}
.pager{display:flex;justify-content:center;gap:6px;padding:16px}
.pager button{min-width:30px;height:30px;border-radius:6px;color:var(--muted)}
.pager button.on{background:var(--accent-soft);color:var(--accent-text);font-weight:600}

/* info sections */
.info{background:var(--bg);padding:28px 16px}
.info h2{font-size:22px;margin-bottom:16px;text-align:center}
.card{background:var(--card);border-radius:14px;padding:16px;margin-bottom:12px}
.card h3{font-size:15px;margin-bottom:4px}
.card p{color:var(--muted)}
.num{width:26px;height:26px;border-radius:50%;background:var(--accent);color:#000;font-weight:700;display:grid;place-items:center;margin-bottom:10px}
details{background:var(--card);border-radius:12px;padding:14px 16px;margin-bottom:8px}
summary{cursor:pointer;font-weight:600}
details p{color:var(--muted);margin-top:8px}

/* panels and forms */
.page-bg{background:var(--bg);flex:1}
.panel{background:var(--card);border-radius:16px 16px 0 0;margin-top:24px;box-shadow:var(--shadow);padding:0 16px 28px}
.trap{display:grid;grid-template-columns:1fr 1fr;margin:0 -16px 24px;background:var(--soft2);border-radius:16px 16px 0 0;overflow:hidden}
.trap button{height:76px;font-size:28px;font-weight:700;color:var(--faint);position:relative}
.trap button.on{background:var(--card);color:var(--text)}
.trap button.on:first-child{border-radius:0 16px 0 0}
.trap button.on:last-child{border-radius:16px 0 0 0}
.field{background:var(--soft);border-radius:8px;display:flex;align-items:center;gap:8px;padding:8px 8px 8px 16px;margin-bottom:12px;border:1px solid transparent}
.field:focus-within{border-color:var(--accent)}
.field>label{flex:1;min-width:0;display:block;font-size:14px}
.field input{width:100%;background:transparent;border:0;outline:0;font-size:20px;font-weight:600;padding:8px 0 2px}
.field input::placeholder{color:var(--faint)}
.cur{background:var(--card);border-radius:8px;height:68px;min-width:132px;display:flex;align-items:center;justify-content:center;gap:8px;font-size:20px;font-weight:500}
.hint{color:var(--faint);font-size:14px;margin-bottom:12px;min-height:20px}
.hint.err{color:var(--red)}
.label{font-size:16px;font-weight:600;margin:8px 0 12px;display:block}
.method{width:100%;display:flex;align-items:center;gap:16px;border:1px solid var(--border);border-radius:10px;padding:22px 20px;text-align:left;font-weight:600;font-size:16px}
.method.sel{border-color:var(--accent);border-width:2px}
.method .p2p{width:40px;height:40px;border-radius:50%;background:var(--accent);color:#000;display:grid;place-items:center;font-size:12px;font-weight:900;font-style:italic;flex:none}
.method small{display:block;color:var(--faint);font-weight:400;font-size:12px;margin-top:2px}
.method .caret{margin-left:auto;color:var(--muted)}
.btn{width:100%;height:52px;border-radius:100px;background:var(--accent);color:var(--on-accent);font-size:16px;font-weight:600;display:flex;align-items:center;justify-content:center;margin-top:24px}
.btn.ghost{background:transparent;border:1px solid var(--border);color:var(--text);margin-top:12px}
.under{display:block;text-align:center;font-weight:600;font-size:15px;margin-top:24px}
.h-big{font-size:30px;font-weight:700;margin:32px 0 24px}

/* auth */
.auth-title{display:flex;align-items:center;justify-content:space-between;padding:16px;border-bottom:1px solid var(--line)}
.auth-title h1{font-size:18px;font-weight:600}
.auth-title a{color:var(--accent-text);font-weight:600}
.auth{padding:20px 16px 36px}
.auth .tab-one{font-weight:600;display:inline-block;padding-bottom:8px;border-bottom:2px solid var(--accent);margin-bottom:20px}
.input{display:flex;align-items:center;background:var(--soft);border-radius:6px;height:48px;padding:0 16px;margin-bottom:12px;border:1px solid transparent}
.input:focus-within{border-color:var(--accent)}
.input input{flex:1;min-width:0;background:transparent;border:0;outline:0;font-size:16px;font-weight:500}
.input button{color:var(--muted);font-size:12px;font-weight:600}
.msg{color:var(--red);font-size:13px;min-height:18px}
.msg.ok{color:var(--green)}
.terms{display:flex;gap:8px;align-items:flex-start;color:var(--muted);font-size:13px;margin-top:8px}
.terms input{accent-color:var(--accent);width:16px;height:16px;margin-top:1px;flex:none}
.terms a,.link{color:var(--accent-text);font-weight:600}
.auth .btn{margin-top:20px}
.fill{flex:1;background:var(--bg)}
.foot{background:var(--bg);text-align:center;color:var(--faint);font-size:11px;padding:24px 16px}
.foot a{margin:0 6px}
.fab{position:fixed;right:max(16px,calc(50vw - 264px));bottom:48px;width:44px;height:44px;border-radius:50%;background:var(--accent);color:#000;display:grid;place-items:center;z-index:10}

/* sheet + drawer */
.mask{position:fixed;inset:0;background:rgba(0,0,0,.55);z-index:50;display:flex;align-items:flex-end;justify-content:center}
.mask.side{align-items:stretch;justify-content:flex-end}
.sheet{background:var(--card);width:100%;max-width:560px;border-radius:16px 16px 0 0;max-height:75vh;overflow:auto;padding:8px 16px 24px}
.side .sheet{max-width:300px;border-radius:0;max-height:none;padding-top:12px}
.sheet-head{display:flex;justify-content:space-between;align-items:center;padding:8px 0;font-weight:700;font-size:16px}
.opt{width:100%;text-align:left;padding:14px 0;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;gap:12px}
.opt.on{color:var(--accent-text);font-weight:700}

/* slide-in menu: dark in both themes, like the header it hangs from */
html.locked,html.locked body{overflow:hidden}
#drawer{position:fixed;left:0;right:0;bottom:0;z-index:40}
.dr-mask{position:absolute;inset:0;background:rgba(0,0,0,.5);opacity:0;transition:opacity .3s ease}
.dr{position:absolute;top:0;bottom:0;right:0;width:100%;background:#121214;color:#fff;display:flex;flex-direction:column;overflow-y:auto;overscroll-behavior:contain;padding:62px 16px 32px 24px;transform:translate3d(100%,0,0);transition:transform .3s cubic-bezier(.22,.8,.28,1)}
#drawer.open .dr{transform:none}
#drawer.open .dr-mask{opacity:1}
.dr-x{position:absolute;top:5px;right:6px;width:36px;height:36px;display:grid;place-items:center;color:#adb1b8}
.dr-auth{display:flex;gap:16px;flex:none}
.dr-auth>*{flex:1;height:40px;border-radius:100px;display:flex;align-items:center;justify-content:center;font-weight:600}
.dr-auth .line{border:1px solid #404347}
.dr-auth .solid{background:var(--accent);color:#121214}
.dr nav{margin-top:16px;flex:none}
.dr-item{width:100%;height:48px;display:flex;align-items:center;justify-content:space-between;font-weight:600;text-align:left}
.dr-caret{border:4px solid transparent;border-top-color:#fff;border-bottom-width:0;transition:transform .28s ease}
.dr-sec.open .dr-caret{transform:rotate(180deg)}
.dr-sub{display:grid;grid-template-rows:0fr;visibility:hidden;transition:grid-template-rows .28s ease,visibility 0s .28s}
.dr-sec.open .dr-sub{grid-template-rows:1fr;visibility:visible;transition:grid-template-rows .28s ease}
.dr-sub>div{overflow:hidden;min-height:0}
.dr-sub a{display:flex;align-items:center;height:40px;padding-left:12px;font-weight:500;color:#adb1b8}
.dr hr{border:0;border-top:1px solid #2b2d32;margin:5px 0 2px -13px;flex:none}
.dr-row{display:flex;align-items:center;gap:13px;min-height:48px;width:100%;font-weight:600;text-align:left;margin-bottom:40px;flex:none}
.dr-toggle{margin-left:auto;width:36px;height:20px;border-radius:20px;background:#4a4d55;position:relative;transition:background .22s ease}
.dr-toggle::after{content:"";position:absolute;top:3px;left:3px;width:14px;height:14px;border-radius:50%;background:#fff;transition:transform .22s ease}
.dr-row[aria-checked=true] .dr-toggle{background:var(--accent)}
.dr-row[aria-checked=true] .dr-toggle::after{transform:translateX(16px)}
.dr-app{display:flex;align-items:center;justify-content:center;gap:10px;height:40px;flex:none;margin-top:auto;border:1px solid #34363d;border-radius:6px;font-weight:600}
@media (prefers-reduced-motion:reduce){.dr,.dr-mask,.dr-sub,.dr-caret{transition:none}}

.hero,.promo{display:none}

/* ---------- desktop ---------- */
@media (min-width:900px){
  .wrap{max-width:none}
  .fab{right:24px;bottom:28px}
  .hd{height:48px;padding:0 24px;gap:12px}
  .logo{margin-right:24px}
  .hd-nav{display:flex;gap:26px;margin-right:auto;font-weight:600}
  .hd-nav a:hover{color:var(--accent)}
  .hd-login{display:inline-block;font-weight:600}
  .dr{width:390px;padding-right:24px}
  .tabs{height:56px;gap:28px;padding:0 max(32px,calc(50% - 600px))}
  .tabs a{display:flex;align-items:center;padding:2px 0 0}
  main{width:100%}

  [data-page=p2p] main,[data-page=block] main{max-width:1264px;margin:0 auto;padding:0 32px;flex:1}
  .title{padding:24px 0 20px;font-size:16px}
  .toolbar{padding:0 0 16px;border:0}
  .toolbar #ordersBtn{margin-left:auto}
  .seg button{min-width:84px}
  .filters{padding:0 0 16px;gap:12px}
  .filters button{height:40px;min-width:180px;justify-content:space-between;background:var(--soft);border-radius:6px;padding:0 12px}
  .filters .asset{margin-right:8px}
  .filters .funnel{min-width:0;background:none;border:0;padding:0 14px}
  .sorts{padding:0 0 8px}
  .thead,.ad,.ad.best{display:grid;grid-template-columns:minmax(0,2.3fr) minmax(0,1.3fr) minmax(0,2fr) minmax(0,1.6fr) 120px;grid-template-areas:"who price qty pays act";column-gap:16px}
  .thead{color:var(--faint);font-size:12px;padding:12px;border-bottom:1px solid var(--line)}
  .ad{align-items:start;padding:20px 12px}
  .ad.best{margin:8px 0;background:none;border:1px solid var(--accent);border-radius:8px;padding:24px 11px 18px}
  .ad.best .stats{display:flex}
  .ad .time{display:none}
  .ribbon{border-radius:0 7px 0 10px}
  .ad-top{font-size:13px;font-weight:600}
  .ad>.price{margin:0}
  .ad-qty .kv:first-child{margin-top:0}
  .ad>.pays{margin:0;flex-direction:column;gap:6px}
  .ad-act{align-self:center;justify-self:end}
  .ad.best .trade{margin-top:0}
  .info{padding:48px max(32px,calc(50% - 600px))}
  .info .card{max-width:760px;margin-left:auto;margin-right:auto}
  .info details{max-width:760px;margin-left:auto;margin-right:auto}

  [data-page=buy] main,[data-page=deposit] main{display:grid;grid-template-columns:minmax(0,1fr) 480px;column-gap:64px;align-content:start;padding:32px max(32px,calc(50% - 600px)) 0}
  .hero{display:block;grid-column:1}
  .hero h1{font-size:40px;line-height:1.2;margin:8px 0 16px}
  .hero p{color:var(--muted);font-size:16px;max-width:520px}
  [data-page=buy] .panel,[data-page=deposit] .panel{grid-column:2;margin:0;border-radius:16px;align-self:start;margin-bottom:32px}
  [data-page=buy] .info{grid-column:1/-1;margin:0 calc(-1 * max(32px,calc(50% - 600px)))}
  .trap button{height:64px;font-size:24px}

  [data-page=login] .wrap,[data-page=signup] .wrap{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:48px auto auto 1fr auto;background:var(--bg)}
  [data-page=login] .hd,[data-page=signup] .hd{grid-column:1/-1}
  .promo{display:flex;flex-direction:column;justify-content:space-between;grid-column:1;grid-row:2/-1;background:var(--card);padding:56px}
  .promo h2{font-size:34px;line-height:1.25;font-weight:600;max-width:420px}
  .promo img{width:190px;height:190px;align-self:center}
  [data-theme=light] .promo img{filter:invert(1)}
  .promo ul{display:flex;gap:56px;list-style:none;color:var(--muted)}
  .promo b{display:block;font-size:26px;color:var(--text)}
  .auth-title,.auth{grid-column:2;width:min(480px,90%);justify-self:center;background:var(--card)}
  .auth-title{grid-row:2;margin-top:72px;border-radius:16px 16px 0 0}
  .auth{grid-row:3;border-radius:0 0 16px 16px}
  .fill{display:none}
  [data-page=login] .foot,[data-page=signup] .foot{grid-column:2;grid-row:5;background:transparent}
}

/* bottom tab bar on the phone P2P pages */
.bnav{position:fixed;left:0;right:0;bottom:0;z-index:25;max-width:560px;margin:0 auto;height:calc(56px + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom);display:grid;grid-template-columns:repeat(4,1fr);background:var(--card);border-top:1px solid var(--line)}
.bnav a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font-size:11px;font-weight:500;color:var(--muted)}
.bnav a.on{color:var(--text);font-weight:700}
.bnav img{width:20px;height:20px;object-fit:contain;filter:brightness(0);opacity:.45}
.bnav a.on img{opacity:1}
html[data-theme=dark] .bnav img{filter:brightness(0) invert(1)}
[data-page=p2p] .wrap,[data-page=block] .wrap{padding-bottom:calc(56px + env(safe-area-inset-bottom))}
[data-page=p2p] .fab,[data-page=block] .fab{bottom:76px}
@media (min-width:900px){.bnav{display:none}[data-page=p2p] .wrap,[data-page=block] .wrap{padding-bottom:0}[data-page=p2p] .fab,[data-page=block] .fab{bottom:28px}}

/* ad lists: the header scrolls away and only the One-Click / P2P / Block row stays */
[data-page=p2p] .hd,[data-page=block] .hd{position:relative}
[data-page=p2p] .tabs,[data-page=block] .tabs{position:sticky;top:0;z-index:20;flex:none;padding-top:env(safe-area-inset-top)}

/* orders */
.hd-deposit{background:var(--accent);color:var(--on-accent);font-weight:600;font-size:12px;border-radius:100px;height:28px;padding:0 14px;display:inline-flex;align-items:center}
.o-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 16px 4px}
.o-head h1{font-size:20px;font-weight:700}
.o-links{display:flex;gap:14px;font-size:12px;font-weight:600;color:var(--muted)}
.o-links a:hover{color:var(--accent-text)}
.o-tabs{display:flex;gap:24px;padding:0 16px;border-bottom:1px solid var(--line)}
.o-tabs button{display:flex;align-items:center;gap:6px;padding:12px 0 10px;font-size:15px;font-weight:600;color:var(--muted);border-bottom:2px solid transparent}
.o-tabs button.on{color:var(--text);border-bottom-color:var(--accent)}
.o-tabs i{font-style:normal;font-size:10px;min-width:16px;height:16px;border-radius:8px;padding:0 4px;background:var(--accent);color:#000;display:grid;place-items:center}
.o-filters{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;padding:12px 16px 4px}
.o-filters:empty{display:none}
.o-chips{display:flex;max-width:100%;overflow-x:auto;scrollbar-width:none;background:var(--soft2);border-radius:8px;padding:2px}
.o-chips button{white-space:nowrap;color:var(--muted);font-size:13px;font-weight:600;border-radius:6px;padding:6px 14px}
.o-chips button.on{background:var(--card);color:var(--text)}
.o-selects{display:flex;flex-wrap:wrap;gap:10px;width:100%}
.o-selects select,.o-dates{height:40px;background:var(--soft2);border:1px solid transparent;border-radius:6px;font-size:13px;font-weight:500}
.o-selects select{padding:0 10px;min-width:120px;cursor:pointer}
.o-selects select:focus-visible,.o-dates:focus-within{outline:0;border-color:var(--accent)}
.o-dates{display:flex;align-items:center;gap:6px;padding:0 10px;max-width:100%}
.o-dates input{min-width:0;width:130px;background:none;border:0;outline:0;font-size:13px}
.o-dates i{font-style:normal;color:var(--faint)}
.o-bar{display:flex;align-items:center;border-bottom:1px solid var(--line)}
.o-bar .o-tabs{flex:1;min-width:0;border:0}
.o-export{flex:none;margin-right:16px;font-size:13px;font-weight:500;color:var(--muted)}
.o-export:hover:enabled{color:var(--accent-text)}
.o-sub{display:none}
.o-thead{display:none}
.o-row{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"type status" "amt amt" "price price" "no no" "who who";gap:6px 12px;padding:16px;border-bottom:1px solid var(--line);font-size:12px}
.o-type{grid-area:type;font-size:14px;min-width:0}.o-type small{display:block;font-size:12px;color:var(--faint);margin-top:2px}
.o-type .buy{color:var(--green)}.o-type .sell{color:var(--red)}
.o-status{grid-area:status;justify-self:end;align-self:start;font-weight:600;white-space:nowrap}
.o-status.ok{color:var(--green)}.o-status.wait{color:var(--accent-text)}.o-status.off{color:var(--muted)}
.o-price,.o-amt,.o-no{display:flex;justify-content:space-between;gap:12px}
.o-price{grid-area:price}.o-amt{grid-area:amt}.o-no{grid-area:no;justify-content:flex-start;align-items:center}
.o-amt b{display:block;text-align:right;font-size:14px;font-weight:600}.o-amt small{display:block;text-align:right;color:var(--muted)}
.o-k{color:var(--muted)}
.o-no .o-k{margin-right:auto}
.o-ref{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.o-no button{color:var(--muted);flex:none}
.o-who{grid-area:who;display:flex;align-items:center;gap:8px;min-width:0;margin-top:4px}
.o-who a{margin-left:auto;border:1px solid var(--border);border-radius:100px;padding:4px 14px;font-weight:600}
.o-login{margin-top:16px}
.pager span{align-self:center;color:var(--muted);font-size:12px}
[data-page=orders] .wrap{padding-bottom:calc(56px + env(safe-area-inset-bottom))}
[data-page=orders] .fab{bottom:76px}
[data-page=orders] .fill{background:var(--bg)}
[data-page=orders] .wrap{background:var(--bg)}
.o-box .state{padding:72px 24px}
@media (min-width:900px){
  [data-page=orders] .wrap{padding-bottom:0}
  [data-page=orders] .fab{bottom:28px}
  [data-page=orders] main{max-width:1264px;margin:0 auto;padding:0 32px;min-height:420px}
  .o-head,.o-tabs,.o-filters{padding-left:0;padding-right:0}
  .o-head{padding-top:24px}
  .o-head h1{font-size:14px;font-weight:600}
  .o-links{display:none}
  .o-bar{margin-top:24px;border:0}
  .o-tabs button{font-size:16px}
  .o-export{margin-right:0;font-size:14px}
  .o-selects{width:auto;flex-basis:100%}
  .o-selects select{min-width:140px}
  [data-page=orders] .tabs{background:var(--card);padding-right:max(32px,calc(50% - 600px))}
  .o-sub{display:flex;align-items:stretch;gap:28px;margin-left:auto}
  .o-sub a,.o-sub button{display:flex;align-items:center;gap:6px;white-space:nowrap}
  .tabs .o-sub a{color:var(--accent-text);font-weight:600;border-bottom-color:var(--accent)}
  .o-sub button{color:var(--muted)}
  .o-box{border:1px solid var(--line);border-radius:12px;margin-top:2px;min-height:300px}
  .o-box .o-row:last-child{border-bottom:0}
  .o-thead,.o-row{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1.6fr) minmax(0,1fr) minmax(0,1.3fr) minmax(0,1.5fr) minmax(0,1.2fr);grid-template-areas:"type no price amt who status";column-gap:16px}
  .o-thead{color:var(--muted);font-size:12px;padding:16px 13px 10px}
  .o-thead span:last-child{text-align:right}
  .o-row{align-items:center;padding:16px 12px;font-size:13px}
  .o-status{align-self:center}
  .o-k{display:none}
  .o-price,.o-amt{justify-content:flex-start}
  .o-amt b,.o-amt small{text-align:left}
  .o-who{margin:0}
  .o-who a{margin-left:4px}
}

/* ---------- slide puzzle ---------- */
.cap-mask{position:fixed;inset:0;z-index:1000;background:rgba(0,0,0,.55);display:flex;align-items:center;justify-content:center;padding:16px}
.cap{--bar:var(--accent);position:relative;width:min(100%,380px);background:#34363c;color:#fff;border-radius:8px;border-top:6px solid var(--bar);padding:22px 22px 16px;box-shadow:0 18px 50px rgba(0,0,0,.4)}
.cap[data-state=success]{--bar:var(--green)}.cap[data-state=fail],.cap[data-state=error]{--bar:var(--red)}
.cap[data-state=fail]{animation:cap-shake .35s}
@keyframes cap-shake{20%,60%{transform:translateX(-8px)}40%,80%{transform:translateX(8px)}}
@media (prefers-reduced-motion:reduce){.cap[data-state=fail]{animation:none}}
.cap-title{text-align:center;font-size:17px;margin:0 0 18px}
.cap-stage{position:relative;width:100%;aspect-ratio:16/9;border-radius:6px;overflow:hidden;background:#22242a}
.cap-bg{display:block;width:100%;height:100%;user-select:none;-webkit-user-drag:none}
.cap-piece{position:absolute;left:0;top:0;height:100%;filter:drop-shadow(0 2px 5px rgba(0,0,0,.65));pointer-events:none}
.cap-wait{position:absolute;inset:0;display:none;align-items:center;justify-content:center;background:#22242a}
.cap[data-state=loading] .cap-wait{display:flex}
.cap-track{position:relative;height:24px;border-radius:12px;background:#4b4e56;margin:34px 0 22px}
.cap-fill{position:absolute;left:0;top:0;bottom:0;width:0;border-radius:12px;background:rgba(255,156,46,.35)}
.cap-handle{position:absolute;left:0;top:-21px;width:92px;height:66px;border-radius:33px;background:linear-gradient(#ffb866,#ff9c2e);color:#fff;display:flex;align-items:center;justify-content:center;box-shadow:0 6px 14px rgba(0,0,0,.35);cursor:grab;touch-action:none;border:0}
.cap[data-state=drag] .cap-handle{cursor:grabbing}
.cap[data-state=loading] .cap-handle,.cap[data-state=error] .cap-handle{opacity:.5}
.cap-msg{min-height:18px;text-align:center;font-size:13px;color:#d6d8dc;margin:0 0 6px}
.cap-tools{display:flex;gap:18px}.cap-tools button{color:#a9adb5;display:flex;padding:2px}
.cap-done{position:absolute;inset:0;display:none;flex-direction:column;align-items:center;justify-content:center;gap:10px;background:#34363c;border-radius:0 0 8px 8px;color:var(--green)}
.cap-done b{font-size:17px;font-weight:500}.cap-done span{font-size:13px;color:#d6d8dc}
.cap[data-state=success] .cap-done{display:flex}
