/* Mobile layouts share the existing pages, account state and order handlers. */
.mobile-dock,.mobile-contract-tabs,.mobile-menu-shade{display:none}
@media(max-width:760px){
  html{scroll-padding-top:72px}
  body{overflow-x:hidden}
  body:has(.mobile-dock){padding-bottom:calc(74px + env(safe-area-inset-bottom))}
  .mobile-dock{position:fixed;z-index:90;left:0;right:0;bottom:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));min-height:66px;padding:6px 7px calc(6px + env(safe-area-inset-bottom));border-top:1px solid #38584e;background:#0b1718f7;box-shadow:0 -12px 35px #0008;backdrop-filter:blur(18px)}
  .mobile-dock a,.mobile-dock button{display:grid;justify-items:center;align-content:center;gap:3px;min-width:0;min-height:54px;padding:4px 2px;border:0;border-radius:11px;background:transparent;color:#99aca8;text-decoration:none;font:700 12px/1.2 system-ui,sans-serif;cursor:pointer}
  .mobile-dock-icon{display:grid;place-items:center;width:26px;height:26px}
  .mobile-dock-icon svg{display:block;width:23px;height:23px}
  .mobile-dock .active{background:#1a3932;color:#b9f5d1}
  .mobile-dock .active svg{filter:drop-shadow(0 0 6px #81e6ae80)}
  .mobile-menu-shade{position:fixed;z-index:94;inset:64px 0 0;background:#020a0bd1}
  body.mobile-menu-open .mobile-menu-shade{display:block}
  body.mobile-menu-open{overflow:hidden}
  body[data-page=account] .account-dashboard{width:calc(100% - 28px);padding:80px 0 20px}
  body[data-page=account] .account-heading{margin-bottom:14px}
  body[data-page=account] .account-heading .eyebrow{display:none}
  body[data-page=account] .account-heading h1{font-size:27px;letter-spacing:-.7px;margin:0 0 3px}
  body[data-page=account] .account-heading p{font-size:12px;line-height:1.4}
  body[data-page=account] .account-rail{display:none;position:fixed;z-index:95;top:64px;left:0;bottom:calc(66px + env(safe-area-inset-bottom));width:min(350px,86vw);max-height:none;overflow-y:auto;margin:0;padding:18px 14px;border-radius:0 18px 18px 0;box-shadow:18px 0 45px #0009}
  body[data-page=account].mobile-menu-open .account-rail{display:block}
  body[data-page=account] .account-dashboard-grid{display:block}
  body[data-page=account] .account-dashboard-main{gap:12px}
  body[data-page=account] .account-profile-banner{display:grid;grid-template-columns:45px minmax(0,1fr);gap:10px;padding:13px 15px}
  body[data-page=account] .account-avatar{width:45px;height:45px;border-radius:12px}
  body[data-page=account] .account-avatar img{width:35px;height:35px}
  body[data-page=account] .account-profile-details .eyebrow,body[data-page=account] .account-profile-details small,body[data-page=account] .account-banner-link{display:none}
  body[data-page=account] .account-profile-details h2{font-size:16px;margin:0 0 2px}
  body[data-page=account] .account-profile-details p{font-size:11px}
  body[data-page=account] .account-summary-card,body[data-page=account] .account-mini-card,body[data-page=account] .account-detail-panel{padding:17px}
  body[data-page=account] .account-summary-row{padding:12px 0 14px;gap:7px}
  body[data-page=account] .account-balances{gap:14px;margin-top:5px}
  body[data-page=account] .account-balance strong{font-size:23px;letter-spacing:-.6px}
  body[data-page=account] .account-balance span{font-size:11px}
  body[data-page=account] .account-balance-actions{gap:7px}
  body[data-page=account] .account-balance-actions a{min-height:48px;display:grid;place-items:center;padding:7px 4px;font-size:12px}
  body[data-page=account] .account-shortcuts{padding:15px}
  body[data-page=account] .account-shortcuts>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-top:10px}
  body[data-page=account] .account-shortcuts a{display:grid;place-items:center;min-height:40px;border:1px solid #31534a;border-radius:9px;background:#132a28;text-align:center;font-size:11px}
  body[data-page=account] .account-content>.deposit-main .subtitle{font-size:12px;line-height:1.5;margin-bottom:14px}
  body[data-page=account] .account-content>.deposit-main h1{font-size:26px}
  .deposit-main{width:calc(100% - 28px);padding:81px 0 calc(78px + env(safe-area-inset-bottom))}
  .deposit-main .deposit-card,.deposit-main .deposit-caution{padding:16px;margin-bottom:12px}
  .deposit-main .deposit-card h2{font-size:19px;margin:7px 0 13px}
  .deposit-main .subtitle{font-size:12px;margin-bottom:14px}
  .deposit-main #walletBalances{padding:12px 14px}
  .deposit-main #walletBalances>.eyebrow{font-size:9px}
  .deposit-main .fund-balances{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-top:8px}
  .deposit-main .fund-balances>div{min-width:0;padding:9px 7px}
  .deposit-main .fund-balances strong{font-size:16px;margin:3px 0;overflow-wrap:anywhere}
  .deposit-main .fund-balances small{font-size:9px}
  .deposit-main .deposit-address-card{display:flex;flex-direction:column}
  .deposit-main .deposit-address-card .deposit-qr-zone{order:5;justify-content:center;min-height:0;margin:12px 0 3px}
  .deposit-main .deposit-address-card .deposit-qr{width:min(224px,75vw)}
  .deposit-main .deposit-address-card .deposit-network-list{order:3}
  .deposit-main .deposit-address-card #addressResult{order:4;margin-top:12px;padding:14px}
  .deposit-main .deposit-network-list button{min-width:0;flex:1;padding:10px}
  .deposit-main .fund-form input,.deposit-main .fund-form select{min-height:46px;font-size:16px}
  .deposit-main .fund-form button[type=submit]{width:100%;min-height:48px;font-size:14px}
  .deposit-main .convert-rate-card{padding:15px}
  .deposit-main .fund-history-details summary{padding:15px}
  .cxm-service-footer{padding-bottom:calc(84px + env(safe-area-inset-bottom))}
  body[data-page=auth] .auth-shell{width:calc(100% - 28px);min-height:0;display:block;padding:78px 0 30px}
  body[data-page=auth] .auth-visual{min-height:0;padding:2px 2px 12px;background:none}
  body[data-page=auth] .auth-visual .eyebrow{font-size:9px}
  body[data-page=auth] .auth-visual h1{font-size:23px;line-height:1.14;letter-spacing:-.6px;margin:5px 0}
  body[data-page=auth] .auth-visual p{font-size:12px;line-height:1.4;margin:0}
  body[data-page=auth] .auth-card{padding:18px;border-radius:15px}
  body[data-page=auth] .auth-card-head h2{font-size:22px;margin:4px 0}
  body[data-page=auth] .auth-card-head p{font-size:11px}
  body[data-page=auth] .auth-tabs{margin:14px 0 12px}
  body[data-page=auth] .auth-tabs button{height:40px;font-size:13px}
  body[data-page=auth] .auth-card form{gap:10px}
  body[data-page=auth] .auth-card label{font-size:12px}
  body[data-page=auth] .auth-card input,body[data-page=auth] .auth-card select{height:47px;font-size:16px}
  body[data-page=auth] .auth-card .primary-button{height:48px;font-size:14px}
  body[data-page=auth] .auth-divider{margin:12px 0 9px}
  body.mobile-contract .contract-shell{padding:64px 0 calc(78px + env(safe-area-inset-bottom))}
  body.mobile-contract .contract-heading{padding:12px 16px 5px;margin:0}
  body.mobile-contract .contract-heading .eyebrow,body.mobile-contract .contract-heading p{display:none}
  body.mobile-contract .contract-heading h1{font-size:23px;margin:0}
  body.mobile-contract .contract-quote{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px;padding:10px 16px;min-height:0}
  body.mobile-contract .contract-quote .symbol-picker select{width:100%;min-height:44px}
  body.mobile-contract .contract-quote .quote-main{justify-items:end}
  body.mobile-contract .contract-quote .quote-main strong{font-size:20px}
  body.mobile-contract .contract-modes{grid-column:1/-1;order:3;margin:4px 0 0;padding:3px;border:1px solid #304a43;border-radius:10px}
  body.mobile-contract .mobile-contract-tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:5px;padding:7px 12px;background:#0b151d;border-bottom:1px solid #34463f}
  body.mobile-contract .mobile-contract-tabs button{min-height:43px;border:0;border-radius:9px;background:#172831;color:#abc1b9;font:700 13px system-ui,sans-serif}
  body.mobile-contract .mobile-contract-tabs button.active{background:#255640;color:#e2ffe9}
  body.mobile-contract .contract-grid{display:block;min-height:0}
  body.mobile-contract .chart-panel{border:0}
  body.mobile-contract .contract-form{margin:0;padding:10px 16px 20px;border:0}
  body.mobile-contract .contract-book,body.mobile-contract .contract-pairs{display:none}
  body.mobile-contract[data-mobile-panel=chart] .contract-book{display:flex;border-top:1px solid #303a47}
  body.mobile-contract[data-mobile-panel=trade] .chart-panel{display:none}
  body.mobile-contract[data-mobile-panel=positions] .contract-form,body.mobile-contract[data-mobile-panel=chart] .contract-form{display:none}
  body.mobile-contract[data-mobile-panel=positions] .chart-panel>.panel-top,body.mobile-contract[data-mobile-panel=positions] .contract-chart,body.mobile-contract[data-mobile-panel=positions] .chart-caption{display:none}
  body.mobile-contract[data-mobile-panel=chart] .positions-panel{display:none}
  body.mobile-contract .contract-chart{height:min(55vh,340px)}
  body.mobile-contract .form-heading{display:flex;justify-content:space-between;align-items:center;padding:5px 0 9px}
  body.mobile-contract .form-heading b{font-size:16px}
  body.mobile-contract .delivery-facts{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding-bottom:8px;margin-bottom:9px}
  body.mobile-contract .delivery-facts>div:nth-child(3),body.mobile-contract .delivery-facts>div:nth-child(4){display:none}
  body.mobile-contract .side-switch{margin:9px 0;gap:7px}
  body.mobile-contract .side-switch button{min-height:48px;font-size:15px}
  body.mobile-contract .field{margin-bottom:10px}
  body.mobile-contract .field>span{margin-bottom:5px}
  body.mobile-contract .input-shell,body.mobile-contract .field select{height:48px}
  body.mobile-contract .input-shell input{font-size:16px}
  body.mobile-contract .amount-presets{margin:0 0 10px}
  body.mobile-contract .duration-grid button{min-height:42px}
  body.mobile-contract .order-preview{padding:10px 0 0}
  body.mobile-contract .order-preview>div{margin-bottom:7px;font-size:12px}
  body.mobile-contract #openButton{min-height:50px;font-size:15px}
  body.mobile-contract .positions-heading{padding:14px;display:block}
  body.mobile-contract .positions-list{min-height:100px}
  body.mobile-contract .position-card{padding:14px}
  body.mobile-contract .contract-dialog{width:100%;max-width:none;max-height:85dvh;margin:auto 0 0;padding:20px 18px calc(22px + env(safe-area-inset-bottom));border-radius:20px 20px 0 0}
}
@media(max-width:380px){body.mobile-contract .contract-quote .quote-main strong{font-size:17px}.deposit-main .fund-balances strong{font-size:14px}}
