/* UMBRA v2 · the console (/app, /m/<mint>), umbra tone */
.page-app { height: 100svh; overflow: hidden; }
.page-app .hdr { background: var(--page); }
.page-app .clock { background: var(--panel); }
.page-app .clock-ticks i.on { background: var(--ink); }
.wbtn .wdot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-4); }
.wbtn.on .wdot { background: var(--buy); }
.wbtn.on { background: var(--raised); color: var(--ink); border-color: var(--line-2); }

.con { height: calc(100svh - var(--hdr)); display: grid; grid-template-columns: 300px minmax(0, 1fr) 360px; gap: 1px; background: var(--line); }
.pane { background: var(--page); min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.ph { flex: none; height: 38px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; border-bottom: 1px solid var(--line); background: var(--panel); }
.ph-n { font-size: 11.5px; color: var(--ink-3); }
.pane .lab { color: var(--ink-3); }

/* markets rail */
.rail-s { flex: none; padding: 10px; border-bottom: 1px solid var(--line); }
.rail-s input { width: 100%; height: 32px; padding: 0 10px; background: var(--sunk); border: 1px solid var(--line-2); border-radius: var(--r); font-size: 13px; outline: 0; }
.rail-s input:focus { border-color: var(--acc); }
.rail-h, .mrow { display: grid; grid-template-columns: minmax(0, 1fr) 92px 54px; align-items: center; gap: 8px; padding: 0 14px; }
.rail-h { flex: none; height: 28px; border-bottom: 1px solid var(--line); }
.rail-h span { font: 400 9.5px/1 var(--f-m); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-4); }
.rail-h span:nth-child(n+2), .mrow > :nth-child(n+2) { text-align: right; }
.rail-list { flex: 1; overflow-y: auto; }
.mrow { height: 50px; border-bottom: 1px solid var(--line); cursor: pointer; position: relative; }
.mrow:hover { background: var(--panel); }
.mrow.on { background: var(--raised); }
.mrow.on::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--acc); }
.mr-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mr-img { width: 26px; height: 26px; border-radius: 50%; flex: none; background: var(--u3) center / cover no-repeat; box-shadow: inset 0 0 0 1px var(--line-2); }
.mr-id b { display: block; font: 500 13.5px/1.1 var(--f-t); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mr-id small { display: block; font-size: 11px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
.mrow .mono { font-size: 12px; color: var(--ink-2); }
.bdot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--buy); }
.bdot.out { background: var(--ink-4); }
.rail-foot { flex: none; border-top: 1px solid var(--line-2); padding: 10px 14px; display: grid; gap: 8px; background: var(--panel); }
.rf-row { display: flex; justify-content: space-between; align-items: baseline; }
.rf-row b { font: 500 13px/1 var(--f-m); }

/* centre */
.coinbar { flex: none; height: 74px; display: grid; grid-template-columns: 220px minmax(0, 1fr) 210px; align-items: center; border-bottom: 1px solid var(--line); background: var(--panel); }
.cb-id { display: flex; align-items: center; gap: 12px; padding: 0 16px; min-width: 0; }
.cb-img { width: 38px; height: 38px; border-radius: 50%; flex: none; background: var(--u3) center / cover no-repeat; box-shadow: inset 0 0 0 1px var(--line-2); }
.cb-id b { display: block; font: 400 17px/1 var(--f-d); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb-id small { display: block; margin-top: 5px; font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb-cells { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); height: 100%; border-left: 1px solid var(--line); }
.cb-cells > div { display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 0 14px; border-right: 1px solid var(--line); min-width: 0; }
.cb-cells b { font: 500 14px/1 var(--f-m); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb-cells .lab { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb-pool { display: flex; align-items: center; gap: 10px; padding: 0 14px; min-width: 0; }
.cb-pool svg { width: 48px; height: 48px; flex: none; }
.cb-pool b { display: block; margin-top: 5px; font: 500 12px/1.25 var(--f-t); white-space: normal; }
.cb-pool > div { min-width: 0; }

.chart { flex: 1; min-height: 0; position: relative; }
.chart svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ch-legend { position: absolute; left: 14px; top: 12px; display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--ink-3); pointer-events: none; }
.ch-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ch-legend i { display: inline-block; width: 14px; height: 2px; }
.lg-price { background: var(--ink); } .lg-avg { background: repeating-linear-gradient(90deg, var(--ink-3) 0 3px, transparent 3px 6px); }
.lg-band { height: 8px !important; background: repeating-linear-gradient(45deg, rgba(236,238,242,.25) 0 1px, transparent 1px 4px); }
.lg-lim { background: var(--acc); } .lg-fill { width: 8px !important; height: 8px !important; border-radius: 50%; background: var(--acc); box-shadow: 0 0 0 2px var(--page), 0 0 0 3px var(--acc); }
.ch-read { position: absolute; right: 14px; top: 12px; font-size: 11.5px; color: var(--ink-2); pointer-events: none; }

.dock { flex: none; height: 268px; border-top: 1px solid var(--line-2); display: flex; flex-direction: column; background: var(--page); }
.tabs { flex: none; height: 38px; display: flex; border-bottom: 1px solid var(--line); background: var(--panel); }
.tabs button { padding: 0 16px; font: 500 13px/1 var(--f-t); color: var(--ink-3); border-right: 1px solid var(--line); }
.tabs button.on { color: var(--ink); box-shadow: inset 0 -2px 0 var(--acc); }
.tabs button .mono { color: var(--ink-3); margin-left: 4px; font-size: 11.5px; }
.dock-body { flex: 1; min-height: 0; overflow-y: auto; }
.trow { display: grid; align-items: center; gap: 10px; height: 36px; padding: 0 14px; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.trow > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow .tk-note { white-space: normal; padding: 6px 0; }
.trow:has(.tk-note) { height: auto; min-height: 36px; }
.trow.head { height: 30px; position: sticky; top: 0; background: var(--page); }
.trow.head > * { font: 400 9.5px/1 var(--f-m); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-4); }
.trow .mono { font-size: 12px; }
.trow a { color: var(--ink-2); } .trow a:hover { color: var(--acc); }
.t-orders { grid-template-columns: 120px 64px 70px minmax(0, 1fr) 110px 90px 64px; }
.t-feed { grid-template-columns: 90px 80px 60px 90px minmax(0, 1fr) 100px 120px; }
.t-house { grid-template-columns: 90px minmax(0, 1fr) 110px 60px; height: auto; min-height: 36px; padding-top: 7px; padding-bottom: 7px; }
.t-house > :nth-child(2) { white-space: normal; line-height: 1.35; }
.side-buy { color: var(--buy); } .side-sell { color: var(--sell); }
.st-pill { font: 400 10.5px/1 var(--f-m); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.st-pill.live { color: var(--acc); }
.empty { display: grid; place-items: center; height: 100%; min-height: 160px; padding: 20px; color: var(--ink-3); font-size: 13.5px; text-align: center; }
.empty .btn { margin-top: 12px; }
.xbtn { font-size: 12px; color: var(--ink-3); border: 1px solid var(--line-2); border-radius: var(--r); padding: 4px 8px; }
.xbtn:hover { color: var(--sell); border-color: var(--sell); }

/* right: ticket + vault */
.side { overflow-y: auto; }
.ticket, .vault { padding: 14px; display: grid; gap: 12px; border-bottom: 1px solid var(--line-2); }
.seg { display: grid; grid-template-columns: 1fr 1fr; height: 36px; border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; }
.seg button { font: 500 13.5px/1 var(--f-t); color: var(--ink-3); }
.seg button + button { border-left: 1px solid var(--line-2); }
.seg button.on { background: var(--raised); color: var(--ink); }
#tk-side button[data-s='buy'].on { box-shadow: inset 0 -2px 0 var(--buy); }
#tk-side button[data-s='sell'].on { box-shadow: inset 0 -2px 0 var(--sell); }
.fld { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto 40px; column-gap: 8px; row-gap: 7px; align-items: center; }
.fld .lab { grid-column: 1 / -1; }
.fld input, .fld select { height: 40px; min-width: 0; padding: 0 10px; background: var(--sunk); border: 1px solid var(--line-2); border-radius: var(--r); font: 500 15px/1 var(--f-m); outline: 0; }
.fld input:focus { border-color: var(--acc); }
.fld select { font-size: 13px; padding: 0 8px; }
.fld-u { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.chips button, .exp button { height: 28px; border: 1px solid var(--line-2); border-radius: var(--r); font: 400 12px/1 var(--f-m); color: var(--ink-2); }
.chips button:hover, .exp button:hover { border-color: var(--line-3); color: var(--ink); }
.exp { display: grid; grid-template-columns: auto repeat(3, 1fr); gap: 6px; align-items: center; }
.exp .lab { margin-right: 6px; }
.exp button.on { border-color: var(--ink); color: var(--ink); }
.lim-bar { position: relative; height: 22px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.lb-band { position: absolute; top: 3px; bottom: 3px; left: 25%; right: 25%; background: repeating-linear-gradient(45deg, rgba(236,238,242,.16) 0 1px, transparent 1px 4px); }
.lb-avg { position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: var(--ink-3); }
.lb-you { position: absolute; top: 2px; bottom: 2px; width: 3px; margin-left: -1px; background: var(--acc); box-shadow: 0 0 0 2px var(--page); transition: left var(--t-ui); }
.lim-cmp { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: -4px; }
.lim-cmp b { font: 500 13px/1 var(--f-m); color: var(--sell); white-space: nowrap; }
.lb-pub { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--sell); transition: left var(--t-ui); }
.lb-pub.is-hidden { display: none; }
.tk-warn { margin: 0; padding: 9px 11px; border: 1px solid rgba(255, 92, 105, .45); background: rgba(255, 92, 105, .08); border-radius: var(--r); font-size: 12.5px; line-height: 1.45; color: var(--ink); }
.tk-warn b { color: var(--sell); font-weight: 600; }
.chk { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; align-items: start; cursor: pointer; }
.chk input { appearance: none; width: 18px; height: 18px; margin: 1px 0 0; border: 1px solid var(--line-3); border-radius: var(--r); background: var(--sunk); display: grid; place-content: center; cursor: pointer; }
.chk input:checked { background: var(--acc); border-color: var(--acc); }
.chk input:checked::after { content: ''; width: 9px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.chk b { display: block; font: 500 13.5px/1.2 var(--f-t); }
.chk small { display: block; margin-top: 3px; font-size: 12px; line-height: 1.4; color: var(--ink-3); }
.t-int { grid-template-columns: 70px 120px minmax(0, 1fr) 100px; }
.int-side { display: inline-flex; align-items: center; gap: 7px; }
.int-side i { width: 7px; height: 7px; border-radius: 50%; background: var(--buy); }
.int-side.sell i { background: var(--sell); }
.int-bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.int-bar i { display: block; height: 100%; background: var(--ink-3); border-radius: 3px; }
.seal-prev { border: 1px solid var(--line-2); border-radius: var(--r); background: #000; }
.sp-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; height: 34px; padding: 0 12px; }
.sp-row + .sp-row { border-top: 1px solid var(--uline); }
.sp-row .mono { font-size: 12px; color: var(--l1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-hash { color: var(--acc-l) !important; letter-spacing: .03em; }
#tk-pool { color: var(--l1); }
#tk-pool em { font-style: normal; color: var(--sell-l); }
.tk-go { width: 100%; }
.tk-go.buy { background: var(--buy); border-color: var(--buy); color: #04140d; }
.tk-go.sell { background: var(--sell); border-color: var(--sell); color: #1a0306; }
.tk-go:disabled { opacity: .45; cursor: default; }
.tk-note { margin: 0; font-size: 12px; line-height: 1.45; color: var(--ink-3); }
.v-bal { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); }
.vb-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; height: 34px; padding: 0 10px; background: var(--panel); font-size: 12.5px; }
.vb-row .mono { font-size: 12px; text-align: right; }
.vb-row .mono.dim { color: var(--ink-3); }
.v-acts { display: grid; grid-template-columns: 80px 1fr; gap: 8px; }
.faucet { width: 100%; }

/* wallet modal + toasts */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: rgba(0, 0, 0, .62); }
.modal[hidden] { display: none; }
.mbox { width: min(400px, 100% - 32px); background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r); }
.mh { display: flex; justify-content: space-between; align-items: center; height: 48px; padding: 0 8px 0 16px; border-bottom: 1px solid var(--line); }
.wlist { padding: 8px; display: grid; gap: 6px; }
.wopt { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; align-items: center; height: 48px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r); text-align: left; font: 500 14px/1 var(--f-t); color: var(--ink); }
.wopt:hover { border-color: var(--line-3); background: var(--raised); }
.wopt img, .wopt svg { width: 28px; height: 28px; border-radius: 6px; }
.wopt span { font-size: 11.5px; color: var(--ink-3); }
.wlist .empty { display: block; min-height: 0; padding: 14px 12px; font-size: 13px; line-height: 1.55; text-align: center; }
.wlist .empty a { color: var(--acc); }
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 110; display: grid; gap: 8px; width: min(360px, 100% - 32px); }
.toast { display: grid; gap: 4px; padding: 12px 14px; background: var(--raised); border: 1px solid var(--line-2); border-left: 3px solid var(--ink-3); border-radius: var(--r); font-size: 13px; }
.toast b { font-weight: 600; } .toast span { color: var(--ink-2); } .toast a { color: var(--acc); }
.toast.ok { border-left-color: var(--buy); } .toast.err { border-left-color: var(--sell); }

@media (max-width: 1600px) { .con { grid-template-columns: 260px minmax(0, 1fr) 330px; } .cb-cells > div:nth-child(5) { display: none; } .cb-cells { grid-template-columns: repeat(4, minmax(0, 1fr)); } .coinbar { grid-template-columns: 190px minmax(0, 1fr) 180px; } }
@media (max-width: 1100px) {
  .page-app { height: auto; overflow: auto; }
  .con { height: auto; grid-template-columns: 1fr; }
  .rail { order: 2; } .rail-list { max-height: 360px; } .rail-foot { display: none; }
  .mid { order: 0; } .chart { height: 360px; flex: none; }
  .side { order: 1; overflow: visible; }
  .coinbar { height: auto; grid-template-columns: 1fr auto; } .cb-cells { grid-column: 1 / -1; grid-row: 2; grid-template-columns: repeat(2, minmax(0, 1fr)); border-left: 0; border-top: 1px solid var(--line); } .cb-cells > div { height: 52px; border-bottom: 1px solid var(--line); }
  .cb-cells > div:nth-child(5) { display: flex; } .cb-id { height: 64px; }
  .dock { height: 320px; }
}
@media (max-width: 720px) {
  .ch-legend { font-size: 10.5px; gap: 8px; right: 14px; } .ch-read { top: auto; bottom: 10px; }
  .t-orders { grid-template-columns: 90px 50px 60px minmax(0, 1fr) 54px; } .t-orders > :nth-child(5), .t-orders > :nth-child(6) { display: none; }
  .t-feed { grid-template-columns: 70px 60px 44px minmax(0, 1fr) 90px; } .t-feed > :nth-child(4), .t-feed > :nth-child(6) { display: none; }
  .t-house { grid-template-columns: 64px minmax(0, 1fr) 76px 40px; }
  .tabs button { padding: 0 12px; }
}
