@charset "UTF-8";
:root{color-scheme:dark;--bg:#0c1017;--panel:#131922;--line:#242d3c;--muted:#8794a9;--text:#edf3fc;--accent:#b8f36b;--green:#52d4ab;--red:#f27e91}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:14px/1.6 system-ui,-apple-system,"Segoe UI",sans-serif}button,input,select{font:inherit}button{cursor:pointer;color:inherit;background:none;border:0}button:disabled{cursor:not-allowed;opacity:.5}button:focus-visible,a:focus-visible{outline:2px solid var(--accent);outline-offset:4px}input:focus,select:focus{outline:1px solid var(--accent);border-color:var(--accent)}[hidden]{display:none!important}header{height:82px;padding:0 4%;display:flex;align-items:center;gap:44px;border-bottom:1px solid var(--line);background:#10151e}.brand{display:flex;align-items:center;gap:10px;color:var(--text);font-size:19px;letter-spacing:1px;text-decoration:none;font-weight:800}.brand-sub{font-size:10px;color:var(--muted);letter-spacing:2px}.logo{background:var(--accent);color:#172116;transform:skew(-9deg);padding:0 10px;font-size:29px;border-radius:7px}nav{display:flex;align-self:stretch;gap:28px}.nav{font-weight:600;color:var(--muted);position:relative}.nav.active{color:var(--accent)}.nav.active:after{content:"";height:3px;background:var(--accent);position:absolute;bottom:0;left:0;right:0}.user-actions{display:flex;align-items:center;gap:22px;margin-left:auto}.network{color:var(--green);font-size:12px}.outline{border:1px solid var(--line);border-radius:7px;padding:8px 16px}.outline:hover{border-color:var(--muted)}main{max-width:1512px;margin:auto;padding:24px 4%}.notice{display:flex;align-items:center;gap:10px;background:#18211d;border:1px solid #2d3c30;border-radius:8px;padding:10px 15px;color:#bbd4be;font-size:12px}.notice button{margin-left:auto;color:var(--accent);white-space:nowrap}.dot{height:6px;width:6px;border-radius:100%;background:var(--accent);flex-shrink:0}.page-heading{display:flex;align-items:center;justify-content:space-between;margin:30px 0 22px}.eyebrow{font-size:10px;letter-spacing:2.5px;color:var(--accent);font-weight:700;margin:0 0 5px}h1{font-size:28px;letter-spacing:-.7px;margin:0;display:flex;align-items:center;gap:14px}h2{font-size:16px;margin:0}h3{font-size:15px}.badge{display:inline-block;font-size:10px;color:var(--muted);border:1px solid var(--line);padding:3px 8px;border-radius:5px;letter-spacing:.5px;font-weight:500}.muted,small,label,.form-note{color:var(--muted)}small{font-size:11px}.card{background:var(--panel);border:1px solid var(--line);border-radius:10px;overflow:hidden}.ticker{display:flex;align-items:center;justify-content:space-between;padding:22px 24px;margin-bottom:18px;gap:24px}.ticker label{display:block;font-size:11px;margin-bottom:6px}.ticker strong{font-size:20px;font-weight:500}.pair{display:flex;align-items:center;gap:12px}.pair h2{font-size:18px}.coin{background:#b8f36b20;border:1px solid #b8f36b40;color:var(--accent);display:grid;place-items:center;height:42px;width:42px;border-radius:50%;font-size:23px;font-weight:700}.terminal{display:grid;grid-template-columns:minmax(300px,1.5fr) minmax(220px,.85fr) minmax(260px,1fr);gap:18px}.panel-title{display:flex;align-items:center;justify-content:space-between;padding:17px 20px;border-bottom:1px solid var(--line);gap:8px}.panel-title h2{font-size:14px}.chart-empty{position:relative;height:272px;display:grid;place-items:center}.chart-grid{position:absolute;inset:0;background-image:linear-gradient(#242d3c55 1px,transparent 1px),linear-gradient(90deg,#242d3c55 1px,transparent 1px);background-size:58px 48px;mask-image:linear-gradient(transparent,#000,transparent)}.empty-copy{position:relative;text-align:center}.empty-copy h3{margin:10px 0 5px}.empty-copy p{font-size:12px;color:var(--muted)}.empty-icon{font-size:30px;color:#5c6b82}.empty{padding:45px 20px;text-align:center;color:var(--muted);font-size:12px}.empty.compact{padding:27px}.book-head,.book-row{display:grid;grid-template-columns:40px 1fr 1fr;gap:6px;padding:7px 17px;font-size:11px;font-variant-numeric:tabular-nums}.book-head{color:var(--muted);padding-top:14px}.book-head span:not(:first-child),.book-row span:not(:first-child){text-align:right}.book-row{padding-top:6px;padding-bottom:6px}.ask{color:var(--red)}.bid{color:var(--green)}.book-row span:last-child{color:#bec9d9}.mid-price{padding:9px 17px;margin:5px 0;border-block:1px solid var(--line);display:flex;align-items:center;justify-content:space-between}.mid-price strong{font-size:24px}.book-note{color:var(--muted);font-size:11px;text-align:center;margin:8px}.order-panel form{padding:0 20px 16px}.segmented{display:flex;background:#0c1118;margin:20px;border-radius:7px;padding:4px}.segmented button{width:50%;padding:7px;border-radius:4px;color:var(--muted)}.segmented .active.buy{background:#52d4ab22;color:var(--green)}.segmented .active.sell{background:#f27e9122;color:var(--red)}label{display:flex;justify-content:space-between;font-size:12px;margin:17px 0 7px}input,select{width:100%;background:#0e141d;border:1px solid #303a4b;color:var(--text);border-radius:6px;padding:11px 12px;min-height:44px}input::placeholder{color:#536179}.summary-line{display:flex;justify-content:space-between;margin-top:18px;font-size:12px;gap:8px}.summary-line>span:first-child{color:var(--muted)}.form-note{font-size:11px;margin:16px 0}.primary{background:var(--accent);color:#14220b;border-radius:6px;padding:11px 20px;font-weight:700}.full{display:block;width:100%;margin-top:12px}.orders,.records{margin-top:20px}.tabs{display:flex;gap:24px}.tabs button{padding:0;color:var(--muted)}.tabs button.active{color:var(--accent)}.table-scroll{overflow-x:auto}table{width:100%;border-collapse:collapse;white-space:nowrap;text-align:left;font-size:12px}th{color:var(--muted);font-weight:400;padding:14px 20px;border-bottom:1px solid var(--line)}td{padding:19px 20px;border-bottom:1px solid #242d3c66}td[colspan]{text-align:center;color:var(--muted);padding:40px}td button{color:var(--accent);margin-right:14px}.fund-grid{display:grid;grid-template-columns:1.2fr 1fr;gap:24px;max-width:1040px}.form-card,.instructions{padding:28px 32px}.network-box{padding:12px;border:1px solid #b8f36b44;border-radius:6px;background:#b8f36b08}.address-placeholder{text-align:center;border:1px dashed var(--line);border-radius:8px;padding:24px 12px;margin-top:10px}.address-placeholder p{color:var(--muted);font-size:12px}.instructions{background:linear-gradient(140deg,#1a2420,#131922 60%)}.instructions p{font-size:13px;color:var(--muted);line-height:1.9}.step{font-size:12px;color:var(--accent);display:block;margin:18px 0 7px;letter-spacing:2px}.step:first-child{margin-top:0}.instructions h2{font-size:15px}hr{border:0;border-top:1px solid var(--line);margin:26px 0}.timeline{padding-left:20px;color:var(--muted)}.timeline li{padding:10px 0}.identity{display:flex;justify-content:space-between;align-items:center;padding:30px}.identity h2{font-size:30px;letter-spacing:3px;margin-top:8px}.identity p{color:var(--muted);font-size:12px}.row-actions{display:flex;gap:12px}footer{display:flex;justify-content:space-between;gap:15px;font-size:10px;color:#66748b;padding:28px 0 10px;letter-spacing:.8px}dialog{width:420px;max-width:calc(100vw - 32px);border:1px solid #384458;border-radius:14px;background:#151c27;color:var(--text);padding:32px;box-shadow:0 20px 90px #0008}dialog::backdrop{background:#050a13b8;backdrop-filter:blur(5px)}dialog h2{font-size:25px;margin:10px 0}dialog .muted{font-size:12px}.close{position:absolute;right:15px;top:10px;font-size:25px;color:var(--muted)}.text-button{width:100%;color:var(--accent);font-size:12px;margin-top:20px}.error{color:var(--red);font-size:12px;min-height:20px}.uid-display{background:#0c1118;padding:14px;text-align:center;font:700 29px monospace;letter-spacing:5px;color:var(--accent);border-radius:6px;margin:20px 0}#register-success p{color:var(--muted);font-size:12px}#toast{position:fixed;bottom:28px;left:50%;transform:translateX(-50%);background:#283529;border:1px solid #507c48;border-radius:8px;padding:12px 25px;z-index:20;max-width:90vw}.inline-message{font-size:12px;color:var(--muted)}@media(min-width:1600px){main{padding-inline:32px}}@media(max-width:1100px){header{gap:24px}.brand-sub{display:none}.terminal{grid-template-columns:1fr 1fr}.market-panel{grid-column:1/-1}.chart-empty{height:200px}.ticker{flex-wrap:wrap}.ticker>div:last-child{display:none}.network{display:none}}@media(max-width:650px){header{height:auto;min-height:112px;flex-wrap:wrap;gap:10px;padding:14px 5% 0}.brand{font-size:16px}.user-actions{gap:0}nav{order:3;width:100%;height:42px;justify-content:space-between;gap:20px}.nav{flex:1}main{padding:16px 4%}.notice{font-size:11px;align-items:flex-start}.page-heading{margin:22px 0 16px}.page-heading>.muted{display:none}h1{font-size:24px}.terminal{grid-template-columns:1fr}.market-panel{grid-column:auto}.book-panel{order:1}.order-panel{order:2}.ticker{padding:16px;gap:20px}.ticker>.pair{width:100%}.ticker>div:nth-last-child(2){display:none}.ticker strong{font-size:18px}.chart-empty{height:160px}.fund-grid{grid-template-columns:1fr}.form-card,.instructions{padding:22px}.identity{align-items:flex-start;flex-direction:column;gap:15px}.row-actions{flex-wrap:wrap}footer{flex-wrap:wrap;font-size:9px}.panel-title{padding:15px}.book-row{padding-block:8px}dialog{padding:26px}.notice button{font-size:11px;padding:0}.ticker small{font-size:10px}}

#language{width:auto;min-height:34px;padding:5px 8px;font-size:12px}.code-row{display:flex;gap:8px}.code-row input{min-width:0}.code-row button{flex-shrink:0;font-size:12px}@media(max-width:650px){#language{max-width:72px}.user-actions{gap:4px}.user-actions .outline{padding:6px 8px;font-size:11px}#wallet-switch{padding-inline:6px}}

#deposit-address{display:block;overflow-wrap:anywhere;padding:12px;font-size:12px}.record-line{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:12px 0;border-bottom:1px solid var(--line);text-align:left}.record-line span:last-child{overflow-wrap:anywhere;max-width:100%}

.service-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-top:20px}.service-card{padding:18px 22px;display:flex;flex-direction:column;gap:6px}.service-card>span{color:var(--muted);font-size:12px}.service-card strong{font-size:17px;font-weight:600}.admin-link{color:var(--accent);text-decoration:none}.admin-link:hover{text-decoration:underline}@media(max-width:650px){.service-grid{gap:8px}.service-card{padding:12px}.service-card strong{font-size:13px}.service-card small{font-size:10px}}
body[data-page="trade"] .service-details,body[data-page="account"] .service-details,body[data-page="security"] .service-details{display:none}

#deposit-qr{display:block;width:222px;max-width:100%;height:auto;margin:12px auto;image-rendering:pixelated;background:white}#deposit-address{display:block;overflow-wrap:anywhere}#withdraw-all{float:right;margin:0 0 8px 8px;color:var(--accent)}

.brand-icon{width:42px;height:42px;object-fit:contain;border-radius:9px;flex-shrink:0}#user-open{white-space:nowrap;max-width:24ch;font-size:12px}

.transaction-id{display:inline-block;width:23ch;min-width:23ch;max-width:23ch;white-space:nowrap;overflow:hidden;vertical-align:middle;font-family:monospace;font-variant-numeric:tabular-nums;overflow-wrap:normal!important}.funding-record{display:grid;grid-template-columns:24ch 8ch minmax(14ch,1fr) 14ch 23ch;align-items:center;min-width:680px}#deposit-records,#withdraw-records{overflow-x:auto}.user-actions{gap:12px}#logout-top{white-space:nowrap;font-size:12px}

.deposit-warning{color:#ffcc80;background:#ffb74d12;border:1px solid #ffb74d55;border-radius:6px;padding:10px 12px;font-size:12px}

.account-menu{position:relative}.account-dropdown{position:absolute;right:0;top:calc(100% + 8px);min-width:150px;padding:6px;background:var(--panel);border:1px solid var(--line);border-radius:8px;box-shadow:0 8px 24px #0006;z-index:30}.account-dropdown button{display:block;width:100%;text-align:left;padding:10px 12px;border-radius:5px}.account-dropdown button:hover{background:var(--line)}

.decimal-input{position:relative}.decimal-input input{padding-right:44px}.decimal-arrows{position:absolute;top:1px;right:1px;bottom:1px;display:flex;flex-direction:column;width:36px;border-left:1px solid #303a4b}.decimal-arrows button{flex:1;min-height:22px;padding:0;font-size:10px;line-height:1;color:var(--muted)}.decimal-arrows button:hover{background:var(--line);color:var(--accent)}.decimal-arrows button+button{border-top:1px solid #303a4b}


/* Compact app screens: disclose details without hiding service failures. */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.service-details{margin-bottom:16px}.service-details>summary{cursor:pointer;list-style:none}.service-details>summary::-webkit-details-marker{display:none}.service-details>summary::after{content:"\2304";flex-shrink:0;font-size:18px}.service-details[open]>summary::after{content:"\2303"}.service-details .service-grid{margin-top:8px}.service-details summary:focus-visible,.instructions summary:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.instructions{align-self:start}.instructions>summary{cursor:pointer;font-weight:600}.instructions:not([open]){padding:14px 18px}.instructions[open]>summary{margin-bottom:16px}
@media(max-width:650px){
 header{position:static;padding-top:70px}header::before{content:"";position:fixed;inset:0 0 auto;height:70px;background:#10151e;border-bottom:1px solid var(--line);box-shadow:0 8px 20px #050a1366;z-index:39}header>.brand{position:fixed;top:14px;left:5%;z-index:40}header>.user-actions{position:fixed;top:14px;right:5%;z-index:40}nav{gap:4px}.nav{min-width:0;padding-inline:4px;font-size:12px}
 main{padding:12px}.service-details{margin-bottom:12px}.notice{padding:8px 10px;gap:6px;flex-wrap:wrap}.notice #service-status{flex:1;min-width:130px}.notice #realtime-status{font-size:10px}.notice button{min-height:32px}.service-grid{grid-template-columns:1fr}.service-card{display:grid;grid-template-columns:1fr auto;gap:2px 8px;padding:10px 12px}.service-card small{grid-column:1/-1}
 .ticker{padding:12px;gap:12px;margin-bottom:12px}.ticker strong{font-size:17px}.ticker label{margin-bottom:2px}.terminal{gap:12px}.order-panel{order:0}.book-panel{order:1}.market-panel{order:2}.panel-title{padding:10px 12px}.order-panel form{padding:0 12px 12px}.segmented{margin:12px}.chart-empty{height:140px}.empty{padding:24px 12px}.empty.compact{padding:16px 12px}.form-card,.identity{padding:16px}.fund-grid{gap:12px}.orders,.records{margin-top:12px}.summary-line{margin-top:12px}label{margin-top:12px}.form-note{margin:10px 0}.brand-sub,footer{display:none}
}

/* Spot terminal: book + order entry, orders, then optional chart. */
.ticker{padding:14px 18px}#page-trade .ticker>.pair{display:flex;width:100%}.ticker .pair h2{white-space:nowrap}.ticker #ticker-price{margin-left:auto;text-align:right}
.terminal{grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:stretch}.terminal>.book-panel{order:0;min-width:0}.terminal>.order-panel{order:1;min-width:0}.candle-panel{margin-top:12px}.candle-panel>summary{cursor:pointer;list-style:none}.candle-panel>summary::after{content:"+";font-size:20px}.candle-panel[open]>summary::after{content:"-"}.candle-panel>summary:focus-visible{outline:2px solid var(--accent);outline-offset:-3px}.candle-note{padding:0 12px;font-size:11px;color:var(--muted)}#candle-chart{display:block;width:100%;height:auto;max-height:320px}.candle-panel .chart-empty{height:140px}.order-panel>.panel-title{display:none}
@media(max-width:650px){
 .terminal{grid-template-columns:minmax(0,0.9fr) minmax(0,1.1fr);gap:8px}.book-panel .panel-title{padding:10px 8px}.book-panel .panel-title h2{font-size:12px}.book-panel .badge{display:none}.book-head,.book-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:4px;padding:5px 7px;font-size:10px}.book-head>span:first-child,.book-row>span:first-child{display:none}.book-head>span,.book-row>span{overflow-wrap:anywhere}.book-head>span:nth-child(2),.book-row>span:nth-child(2){text-align:left}.mid-price{padding:10px 7px;display:block}.mid-price strong{font-size:18px;overflow-wrap:anywhere}.mid-price small{display:block;font-size:9px}.book-note{font-size:10px;padding:0 4px}.order-panel .segmented{margin:8px;padding:3px}.segmented button{min-height:38px;padding:4px;font-size:12px}.order-panel form{padding:0 8px 10px}.order-panel label{font-size:11px;margin:9px 0 5px}.order-panel input,.order-panel select{padding:8px;font-size:12px;min-width:0}.order-panel .decimal-input input{padding-right:32px}.order-panel .decimal-arrows{width:28px}.order-panel .summary-line{font-size:10px;flex-wrap:wrap;gap:2px;margin-top:10px}.order-panel .form-note{font-size:10px;line-height:1.4;margin:8px 0}.order-panel .primary{padding:10px 4px;font-size:12px}.order-panel .inline-message{overflow-wrap:anywhere}.ticker{gap:8px;padding:9px 12px}.ticker .pair h2{font-size:15px}.ticker strong{font-size:15px}.ticker small{font-size:9px}.orders .tabs{gap:12px}.orders .tabs button{font-size:12px}.orders .panel-title{padding:12px}
}

.candle-panel .candle-actions{display:flex;align-items:center;gap:12px}.candle-actions button{color:var(--accent)}#candle-chart{height:330px;max-height:none;width:100%}.candle-state{padding:0 16px;color:var(--muted)}#candle-details{min-height:38px;font-variant-numeric:tabular-nums}.candle:focus{outline:none}.candle:focus>rect:first-child{fill:#ffffff0a}.candle-note{overflow-wrap:anywhere}@media(max-width:650px){#candle-chart{height:330px}.candle-note{font-size:11px}}

/* Deposit and withdrawal: keep the primary mobile task within one viewport. */
.fund-top-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}.fund-field{min-width:0}.fund-field label{margin-top:12px}.withdraw-amount-label{display:flex;align-items:flex-end;justify-content:space-between;gap:8px}.withdraw-amount-label label{margin-bottom:7px}#withdraw-all{float:none;margin:0;padding:5px 10px}.withdraw-summary{display:grid;grid-template-columns:1fr 1fr;gap:6px 18px;margin-top:12px}.withdraw-summary .summary-line{display:block;min-width:0;margin:0}.withdraw-summary .summary-line span{display:block;overflow-wrap:anywhere}.funding-records>summary{cursor:pointer;list-style:none}.funding-records>summary::-webkit-details-marker{display:none}.funding-records>summary::after{content:"+";font-size:19px}.funding-records[open]>summary::after{content:"-"}.funding-records>summary:focus-visible{outline:2px solid var(--accent);outline-offset:-3px}
@media(max-width:650px){
 body[data-page="deposit"] .service-details,body[data-page="withdraw"] .service-details{margin-bottom:8px}
 .funding-page .fund-grid{display:block;max-width:none}.funding-page .form-card{padding:12px}.funding-page .fund-title{display:none}.funding-page .fund-top-row{gap:8px}.funding-page label{margin:7px 0 4px;font-size:10px}.funding-page input,.funding-page select,.funding-page .network-box{min-height:38px;padding:7px 9px;font-size:12px}.funding-page .network-box{display:flex;align-items:center;line-height:1.25}.funding-page .deposit-warning{margin:5px 0;padding:6px 8px;font-size:10px}.funding-page .address-placeholder{margin-top:5px;padding:8px}.funding-page .address-placeholder h3{margin:3px 0;font-size:12px}.funding-page .address-placeholder p{margin:4px 0;font-size:10px}.funding-page #deposit-qr{width:128px;margin:5px auto}.funding-page #deposit-address{padding:7px;font-size:10px}.funding-page .full{min-height:38px;margin-top:7px;padding:8px 10px}.funding-page .withdraw-amount-label label{margin-bottom:4px}.funding-page #withdraw-all{min-height:30px;padding:3px 8px;font-size:10px}.funding-page .withdraw-summary{gap:3px 10px;margin-top:7px}.funding-page .withdraw-summary .summary-line{font-size:10px;line-height:1.35}.funding-page .form-note{margin:6px 0;font-size:9px;line-height:1.35}.funding-page .instructions,.funding-page .funding-records{margin-top:8px}.funding-page .instructions:not([open]){padding:9px 12px}.funding-page .instructions[open]{padding:12px}.funding-page .funding-records>summary{padding:9px 12px}.funding-page .funding-records>summary h2{font-size:12px}.funding-page .funding-records>summary .muted{font-size:10px}
}

.security-card{max-width:640px;margin:auto}.security-card form{margin-top:20px}.security-card button{margin-top:12px}.totp-secret{display:block;overflow-wrap:anywhere;user-select:all;margin:16px 0}#totp-qr canvas{max-width:100%;height:auto}#page-security[aria-busy="true"]{opacity:.75}
@media(max-width:650px){
 body:not(.admin-app) .terminal{grid-template-columns:minmax(0,1fr)}
 body:not(.admin-app) .order-panel{order:0}body:not(.admin-app) .book-panel{order:1}
 body:not(.admin-app) input,body:not(.admin-app) select{font-size:16px;min-height:44px}
 body:not(.admin-app) button{min-height:44px;font-size:14px}
 body:not(.admin-app) .form-note,body:not(.admin-app) label,body:not(.admin-app) .book-row,body:not(.admin-app) .summary-line{font-size:13px}
 body:not(.admin-app) .funding-page .deposit-warning{font-size:13px;padding:10px}
 body:not(.admin-app) .funding-page #deposit-address{font-size:13px;overflow-wrap:anywhere}
 body:not(.admin-app) .decimal-arrows button{min-height:22px}
}

/* Keep the native language picker and WebView change handlers. */
.language-control{position:relative;display:grid;place-items:center;width:44px;height:44px;flex-shrink:0;border:1px solid var(--line);border-radius:7px}.language-control svg,.icon-button svg{width:22px;height:22px;pointer-events:none}.language-control #language{position:absolute;inset:0;width:100%;height:100%;max-width:none;opacity:0;cursor:pointer}.language-control:focus-within{outline:2px solid var(--accent);outline-offset:4px}.language-control:hover{border-color:var(--muted)}.user-actions #wallet-switch{display:grid;place-items:center;width:44px;height:44px;padding:0;flex-shrink:0}

/* Chat shares the trading page runtime and stream. */
.chat-launcher{position:fixed;right:max(22px,env(safe-area-inset-right));bottom:max(24px,env(safe-area-inset-bottom));width:58px;height:58px;border-radius:50%;display:grid;place-items:center;background:#20bca4;color:#071d1b;border:1px solid #63dfc8;box-shadow:0 6px 24px #0006;z-index:40;padding:15px}.chat-launcher[hidden]{display:none}.chat-launcher svg{width:100%;height:100%}.chat-dialog{width:min(900px,calc(100vw - 40px));max-width:none;height:min(720px,calc(100dvh - 48px));max-height:none;padding:0;border:1px solid #34434c;border-radius:16px;background:#101b24;color:#e4edf3}.chat-dialog::backdrop{background:#0009}#chat-root{height:100%;display:flex;flex-direction:column}.chat-header{height:auto;position:static;display:flex;align-items:center;gap:14px;min-height:60px;padding:12px 18px;border-bottom:1px solid #34434c}.chat-header::before{display:none}.chat-header span{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;color:#a6bcc9}.chat-state{display:flex;align-items:center;gap:12px;padding:4px 16px;border-bottom:1px solid #34434c}#chat-root>.chat-status{flex:0 0 auto;min-height:0;max-height:84px;overflow:auto;overflow-wrap:anywhere;font-size:13px;margin:0;padding:8px 16px;border-bottom:1px solid #34434c}.chat-dialog button{min-height:40px}.chat-layout{display:grid;grid-template-columns:260px minmax(0,1fr);flex:1;min-height:0}.chat-sidebar{overflow:auto;border-right:1px solid #34434c;padding:10px}.chat-conversation{display:flex;gap:4px;margin-bottom:8px}.chat-conversation>button:first-child{flex:1;min-width:0;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-hide{font-size:12px;padding:4px}.chat-thread{display:flex;flex-direction:column;min-height:0;min-width:0}.chat-thread[hidden]{display:none}.chat-heading{display:flex;align-items:center;gap:12px;padding:10px 16px;border-bottom:1px solid #34434c}.chat-back{display:none}.chat-announcements{max-height:110px;overflow:auto;padding:0 16px;background:#22322d;overflow-wrap:anywhere}.chat-messages{flex:1;min-height:0;overflow:auto;padding:16px;overscroll-behavior:contain}.chat-message{width:fit-content;max-width:90%;margin-bottom:14px;padding:8px 12px;background:#23313c;border-radius:12px;overflow-wrap:anywhere}.chat-message.own{margin-left:auto;background:#17493e}.chat-message p{white-space:pre-wrap;margin:6px 0}.chat-message time{display:block;text-align:right;font-size:11px;color:#b4c5ce}.chat-message .chat-sender{padding:0;min-height:28px;border:0;background:transparent;color:#79d9ca;font-size:12px;text-align:left}.chat-composer{display:flex;gap:8px;padding:12px;border-top:1px solid #34434c}.chat-composer textarea{flex:1;min-width:0;resize:none;background:#172630;color:#edf5fa;border:1px solid #50616c;border-radius:8px;padding:10px;font:inherit}.chat-empty{color:#a6bcc9;text-align:center}#chat-root>p{padding:20px}#chat-root>button{margin:8px 20px}
@media(max-width:640px){.chat-launcher{width:54px;height:54px;right:16px;bottom:calc(20px + env(safe-area-inset-bottom))}.chat-dialog{width:100vw;height:100dvh;margin:0;border:0;border-radius:0}.chat-header{padding:10px 12px;padding-top:calc(10px + env(safe-area-inset-top))}.chat-layout{display:block;overflow:hidden}.chat-sidebar{height:100%;border:0}.chat-thread{height:100%}.chat-thread-open .chat-sidebar{display:none}#chat-root:not(.chat-thread-open) .chat-thread{display:none}.chat-back{display:block}.chat-composer{padding-bottom:calc(12px + env(safe-area-inset-bottom))}.chat-message{max-width:94%}}
.chat-packet-card{min-width:190px;background:#723d26;padding:12px;border-radius:8px}.chat-packet-card strong{color:#ffe3ad}.chat-packet-card button{display:block;width:100%;background:#b84f2c;border-radius:6px;margin:8px 0}.chat-packet-card small{display:block;color:#ffe3ad;overflow-wrap:anywhere}.chat-packet-form{padding:6px 12px;border-top:1px solid #34434c;max-height:min(340px,55%);overflow:auto;overscroll-behavior:contain;flex-shrink:0}.chat-packet-form summary{cursor:pointer;min-height:40px;display:list-item;line-height:40px;color:#f6bd80}.chat-packet-form form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:8px 0;align-items:stretch}.chat-packet-form label{display:flex;flex-direction:column;justify-content:space-between;gap:6px;min-width:0;margin:0;font-size:12px;line-height:1.4}.chat-packet-form input,.chat-packet-form select{width:100%;min-height:40px;background:#172630;color:#edf5fa;border:1px solid #50616c;border-radius:6px;padding:6px}.chat-packet-form form>small{align-self:center;line-height:1.4}.chat-packet-form form>button{background:#b84f2c;border-radius:6px}
.chat-conversation{border-radius:9px;transition:background-color .15s,color .15s}.chat-conversation.selected{background:#224b43;box-shadow:inset 3px 0 #63dfc8;color:#e5fff8}.chat-conversation>button:first-child{padding:10px 12px}.chat-conversation:not(.selected):hover{background:#20303a}.chat-icon-control{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;min-width:44px;min-height:44px;padding:10px;border-radius:8px}.chat-icon-control svg{width:22px;height:22px;pointer-events:none}.chat-header .chat-heading-icon{flex:0 0 28px;min-width:28px;padding:0;color:#79d9ca}.chat-composer .chat-icon-control{background:#235347;color:#b6f3db}.chat-packet-form summary.chat-icon-control{display:flex;width:44px;list-style:none;line-height:1}.chat-packet-form summary::marker{content:''}.chat-packet-form summary::-webkit-details-marker{display:none}.chat-packet-form[open] summary{background:#633b26}.chat-packet-card strong.chat-icon-control{padding:0;min-height:28px;min-width:28px}.chat-back.chat-icon-control{display:none}@media(max-width:640px){.chat-back.chat-icon-control{display:inline-flex}}

/* Only messages and the expanded packet form scroll; notices never stretch. */
.chat-dialog,.chat-layout{overflow:hidden}.chat-header,.chat-heading,.chat-composer{flex-shrink:0}.chat-packet-form summary{position:sticky;top:-6px;background:#101b24;z-index:1}.chat-packet-form input,.chat-packet-form select{min-width:0}.chat-packet-form form>.chat-icon-control{justify-self:start;width:44px}
@media(max-width:640px){.chat-packet-form{max-height:45%}.chat-packet-form form{grid-template-columns:minmax(0,1fr)}.chat-packet-form form>small{grid-column:1}.chat-packet-form form>.chat-icon-control{justify-self:end}}

.chat-conversation.fixed>button:first-child{display:flex;align-items:center;justify-content:flex-start;color:#a4e1d3}.chat-heading #chat-title.chat-icon-control{padding:0;min-width:28px;color:#a4e1d3}

.chat-packet-amount input{padding-right:44px;appearance:textfield;-moz-appearance:textfield}.chat-packet-amount input::-webkit-inner-spin-button,.chat-packet-amount input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.chat-packet-form .decimal-arrows button{min-height:0;padding:0;font-size:10px;line-height:1}

.chat-packet-form[open]>summary.chat-icon-control{display:none}.chat-packet-footer{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:12px}.chat-packet-footer>small{flex:1;min-width:0;line-height:1.4}.chat-packet-actions{display:flex;align-items:center;gap:8px;flex-shrink:0}.chat-packet-actions>.chat-icon-control{color:#f6bd80;background:#633b26}.chat-packet-send{min-height:44px;padding:8px 20px;background:#b84f2c;border-radius:8px}

/* Compact messages and a single-line composer that grows with its contents. */
.chat-messages{padding:10px 12px}.chat-message{margin-bottom:8px;padding:6px 10px;border-radius:9px}.chat-message p{margin:3px 0;line-height:1.4}.chat-message-meta{display:flex;align-items:center;gap:6px;line-height:18px}.chat-message-meta time{display:inline;text-align:left;white-space:nowrap}.chat-message-meta .chat-sender{min-height:0;line-height:18px}.chat-composer{align-items:flex-end;gap:6px;padding:8px}.chat-composer textarea{box-sizing:border-box;height:40px;min-height:40px;max-height:120px;line-height:22px;padding:8px;overflow-y:auto}.chat-composer .chat-icon-control{width:40px;min-width:40px;height:40px;min-height:40px;padding:9px}.chat-packet-form:not([open]){display:none}.chat-packet-form>summary.chat-icon-control{display:none}.chat-packet-form{padding:4px 10px}.chat-packet-form form{gap:8px;padding:4px 0}.chat-packet-form label{gap:4px}.chat-header{min-height:48px;padding:6px 12px}.chat-heading{gap:8px;padding:6px 12px}
@media(max-width:640px){.chat-header{padding-top:calc(6px + env(safe-area-inset-top))}.chat-composer{padding-bottom:calc(8px + env(safe-area-inset-bottom))}}

.account-profile{margin-top:16px;padding:16px 20px}.account-profile form{max-width:440px}.account-profile label{margin:0 0 6px}.account-name-row{display:flex;align-items:center;gap:8px}.account-name-row input{min-width:0;flex:1}.account-name-row button{min-height:44px;flex-shrink:0}.account-name-row svg{display:block;width:20px;height:20px}.account-profile .form-note{margin:8px 0 0}.account-profile [role=status]{font-size:12px;margin:8px 0 0;overflow-wrap:anywhere}

.record-time-compact{display:none}
@media(max-width:650px){.orders .order-pair,.record-time-full{display:none}.record-time-compact{display:inline;white-space:nowrap}}

/* App/TG expose the wallet return icon; standalone mobile Web keeps its layout. */
@media(max-width:650px){
 body.wallet-host:not(.admin-app) .terminal{grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:8px}
 body.wallet-host:not(.admin-app) .terminal .book-panel{order:0}
 body.wallet-host:not(.admin-app) .terminal .order-panel{order:1}
 body.wallet-host:not(.admin-app) .terminal .book-row{font-size:11px}
 body.wallet-host:not(.admin-app) .terminal .order-panel label,body.wallet-host:not(.admin-app) .terminal .summary-line{font-size:11px}
 body.wallet-host:not(.admin-app) .terminal .form-note{font-size:11px;overflow-wrap:anywhere}
 body.wallet-host:not(.admin-app) .terminal .order-panel input,body.wallet-host:not(.admin-app) .terminal .order-panel select{width:100%;font-size:16px;min-height:44px;padding-left:6px}
 body.wallet-host:not(.admin-app) .terminal .segmented button{font-size:13px;min-height:44px}
 body.wallet-host:not(.admin-app) .terminal .order-panel .primary{font-size:12px;overflow-wrap:anywhere}
}

@media(min-width:651px) and (max-width:900px){
 body.wallet-host>header{gap:12px;padding-inline:16px}
 body.wallet-host>header .brand{font-size:16px}
 body.wallet-host>header nav{gap:16px}
 body.wallet-host>header .user-actions{gap:8px}
}
@media(max-width:650px){body.wallet-host>header>.brand{font-size:0;letter-spacing:0;gap:0}}

/* App/TG pin the chart entry below the compact spot terminal. */
.wallet-host #page-trade{line-height:1.35;padding-bottom:calc(64px + env(safe-area-inset-bottom))}
.wallet-host .terminal .book-head,.wallet-host .terminal .book-row{padding-block:3px;line-height:1.3}
.wallet-host .terminal .mid-price{padding-block:7px}
.wallet-host .terminal .order-panel .segmented{margin-block:6px}
.wallet-host .terminal .order-panel form{padding-bottom:8px}
.wallet-host .terminal .order-panel label{margin-block:6px 3px;line-height:1.3}
.wallet-host .terminal .order-panel .summary-line{margin-top:6px;line-height:1.35}
.wallet-host .terminal .order-panel .form-note{margin-block:6px;line-height:1.3}
.wallet-host .terminal .order-panel .inline-message:empty{display:none}
.wallet-host .orders .panel-title{padding-block:8px}
.wallet-host .orders th,.wallet-host .orders td{padding-block:7px;line-height:1.35}
/* Full-width opaque dock: the entire half-height chart row is a button. */
.chart-icon-title svg{display:block;width:22px;height:22px}
.candle-toolbar{position:fixed;z-index:40;background:var(--panel)}
body.wallet-host{--trade-nav-height:48px;--candle-row-height:24px}
body.wallet-host>header{height:70px;min-height:70px;padding-block:0}
body.wallet-host>header>nav{position:fixed;inset:auto 0 0;z-index:40;height:calc(var(--trade-nav-height) + env(safe-area-inset-bottom));width:auto;display:flex;gap:0;padding:0 12px env(safe-area-inset-bottom);border-top:1px solid var(--line);background:var(--panel);margin:0}
body.wallet-host>header>nav .nav{flex:1;min-width:0;min-height:var(--trade-nav-height);font-size:12px;padding:0 4px}
body.wallet-host>header>nav .nav.active:after{top:0;bottom:auto}
body.wallet-host>main{padding-bottom:calc(var(--trade-nav-height) + env(safe-area-inset-bottom) + 12px)}
body.wallet-host #page-trade{padding-bottom:calc(var(--candle-row-height) + 12px)}
body.wallet-host .candle-toolbar{inset:auto 0 calc(var(--trade-nav-height) + env(safe-area-inset-bottom));height:var(--candle-row-height);min-height:0;margin:0;padding:0;border:0;border-top:1px solid var(--line);border-radius:0;box-shadow:none}
body.wallet-host #candle-open{display:flex;align-items:center;gap:6px;width:100%;height:100%;min-height:0;padding:0 12px;border:0;border-radius:0;line-height:1;font-size:10px;color:var(--muted)}
body.wallet-host #candle-open svg{width:14px;height:14px;color:var(--accent);flex-shrink:0}
body.wallet-host #candle-open .candle-plus{margin-left:auto;font-size:18px;color:var(--accent)}
body.candle-sheet-open{overflow:hidden}
dialog.candle-sheet{position:fixed;inset:auto 0 0;width:min(100%,900px);max-width:100%;height:min(80dvh,720px);max-height:90dvh;margin:0 auto;padding:0 0 env(safe-area-inset-bottom);border:1px solid var(--line);border-bottom:0;border-radius:18px 18px 0 0;background:var(--panel);overflow:hidden}
.candle-sheet[open]{display:flex;flex-direction:column;animation:candle-slide-up .2s ease-out}
.candle-sheet-handle{width:36px;height:4px;margin:8px auto 0;border-radius:4px;background:var(--muted);flex-shrink:0}
.candle-sheet-heading{display:flex;align-items:center;gap:8px;padding:0 12px;border-bottom:1px solid var(--line);flex-shrink:0}
.candle-sheet-heading h2{flex:1;font-size:16px;margin:8px 0}.candle-sheet-heading button{width:44px;height:44px;padding:0;font-size:24px;line-height:1}
.candle-sheet-body{min-height:0;overflow:auto;overscroll-behavior:contain;flex:1}.candle-sheet-body .panel-title{padding:8px 12px}.candle-sheet-body .empty.compact{padding:12px}.candle-sheet-body .candle-note{margin-block:8px}
@keyframes candle-slide-up{from{transform:translateY(100%)}to{transform:translateY(0)}}
@media(max-width:650px){.wallet-host .terminal .order-panel input,.wallet-host .terminal .order-panel select{min-height:40px;padding-block:5px}.wallet-host .terminal .segmented button{min-height:40px}.wallet-host .terminal .order-panel .primary{min-height:44px;padding-block:8px}}
@media(prefers-reduced-motion:reduce){.candle-sheet[open]{animation:none}}
/* Chat stays one control row above the bottom dock, on the same UI layer. */
body.wallet-host .chat-launcher{z-index:40;bottom:calc(var(--trade-nav-height) + var(--candle-row-height) + 12px + env(safe-area-inset-bottom))}
body.wallet-host .candle-sheet-heading button{font-size:24px}

/* Compact order records, with equally tall spot panels in their shared row. */
.wallet-host .terminal{align-items:stretch}
.wallet-host .terminal>.book-panel,.wallet-host .terminal>.order-panel{align-self:stretch}
.wallet-host .orders{margin-top:8px}
.wallet-host .orders .panel-title{padding:5px 8px}
.wallet-host .orders .tabs{gap:12px}
.wallet-host .orders .tabs button{min-height:28px;font-size:11px;line-height:1.2}
.wallet-host .orders th,.wallet-host .orders td{padding:4px 8px;font-size:11px;line-height:1.2}
.wallet-host .orders td[colspan]{padding:10px 8px}
.wallet-host .orders td button{min-height:28px;padding:0 6px;margin-right:4px;font-size:11px;line-height:1.2}
