/* Shared responsive layer, loaded after native and theme styles. CSS pixels,
   not device names, determine the layout in either orientation. */
html{ -webkit-text-size-adjust:100%;text-size-adjust:100%;scroll-padding-block:20px 100px }
body{min-width:0}
.workspace.shell-menu-open .shell-launcher-content nav{display:block}
.product-frame{min-width:0;max-width:100%}
.responsive-section-toggle{display:none}
.responsive-table-scroll{max-width:100%;min-width:0;overflow-x:auto;overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch}
.responsive-table-scroll:focus-visible{outline:2px solid var(--gs-accent);outline-offset:-2px}
.fx-table-scroll,.server-table-wrap{max-width:100%;min-width:0;-webkit-overflow-scrolling:touch}
:is(.server-panels,.fx-dashboard-panels,.premium-main,.settings-workspace,.tab-content){min-width:0}
:is(.server-chart,.chart-card,.chart-container,.chart-wrap) :is(canvas,svg){max-width:100%}
:is(input,select,textarea){scroll-margin-block:100px}
@media(max-width:1100px){
 .responsive-section-toggle{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:46px;margin:0 0 14px;padding:11px 14px;text-align:left;white-space:normal;background:var(--gs-surface);color:var(--gs-text);border:1px solid var(--gs-border);border-radius:10px;font-size:13px}
 .responsive-section-toggle::after{content:'⌄';flex-shrink:0;font-size:20px}
 .responsive-section-toggle[aria-expanded=true]::after{content:'⌃'}
 [data-mobile-collapsible]:not([data-mobile-open=true]){display:none!important}
 [data-mobile-collapsible][data-mobile-open=true]{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 12px;position:static!important;border-right:0!important;border-bottom:1px solid var(--gs-border);padding:0 0 18px!important;margin-bottom:20px}
 [data-mobile-collapsible]>:is(.eyebrow,.fx-eyebrow,h2,p){grid-column:1/-1}
 .server-layout,.fx-dashboard-layout,.fx-maintenance-layout{display:block!important}
 .server-page{padding:24px}
 .server-nav button,.fx-maintenance-nav button,.fx-dashboard-nav .dash-tab-btn{min-height:44px!important;white-space:normal!important}
 body:has(.gs-product-header) .premium-shell{display:block!important;padding:0 24px 30px!important}
 body:has(.gs-product-header) .premium-sidebar{width:100%!important;padding:0 0 18px!important;border-right:0!important;border-radius:0!important;margin-bottom:20px}
 body:has(.gs-product-header):not(.gs-spot-menu-open) .premium-sidebar{display:none!important}
 body:has(.gs-product-header).gs-spot-menu-open .premium-sidebar{display:flex!important}
 .gs-mobile-menu-toggle{display:block!important;min-height:44px;width:100%;text-align:left;font-size:13px;padding:10px 12px!important}
 .gs-spot-navigation{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px!important}
 body:has(.gs-product-header) .sidebar-exchange-filters{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;width:100%}
 .gs-spot-lead{padding:24px 24px 20px!important}
 .gs-spot-lead #overview-summary{grid-template-columns:repeat(3,minmax(0,1fr))!important}
 .gs-product-header{position:static!important;flex-wrap:wrap;gap:10px;padding:12px 24px}
 .gs-product-nav{flex:1;justify-content:flex-end}
 body[data-product=futures] :is(.content,.wrap,main.fx-page){padding-inline:24px!important}
 .settings-workspace{display:block!important;--settings-rail:0px}
 .settings-workspace>.settings-navigation.tabs{display:none!important}
 .settings-mobile-select{display:block!important;width:100%;min-height:44px;flex-basis:100%}
 .settings-intro{flex-wrap:wrap}
 .settings-search{flex-basis:100%;min-width:0}
 .settings-workspace .settings-savebar{left:16px!important;right:16px!important;max-width:none!important}
 :is(.overview-main-grid,.overview-content-grid){grid-template-columns:minmax(0,1fr)!important}
 .overview-drawer{position:static!important;min-width:0;max-width:100%}
 .fx-component-grid,.fx-restored-tools{grid-template-columns:repeat(2,minmax(0,1fr))}
 .settings-workspace .fx-setting-card .fields{gap:18px;padding:20px!important}
}
@media(max-width:900px){
 .server-chart-grid,.server-grid{grid-template-columns:minmax(0,1fr)!important}
 .server-metrics{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .chart-wide{grid-column:1!important}
 .backup-settings-grid,.backup-options,.appearance-schemes,.server-mail-form,.server-mail-fields,.telegram-settings-grid{grid-template-columns:minmax(0,1fr)!important}
 .server-history-heading,.fx-section-heading,.fx-page-heading{flex-wrap:wrap;gap:14px}
 .server-time-form{grid-template-columns:minmax(0,1fr)!important}
 .server-time-form select{width:100%;min-width:0}
 .settings-save-note{min-width:0}
 .settings-save-state{overflow-wrap:anywhere}
 .fx-maintenance-layout,.settings-workspace{gap:18px}
}
@media(max-width:600px){
 /* Keep the entire phone width for content; the product launcher opens as a sheet. */
 body.workspace{--shell-rail:0px}
 .workspace>.shell-main{margin-left:0!important;width:100%;height:100dvh;min-height:0}
 .workspace>.shell-launcher{inset:auto auto max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));width:60px;height:60px;padding:4px;gap:0;overflow:hidden;border:1px solid var(--gs-border);border-radius:14px;box-shadow:0 6px 24px #0003}
 .workspace:not(.shell-menu-open)>.shell-launcher :is(.shell-launcher-content,.sidebar-bottom){display:none}
 .workspace:not(.shell-menu-open) .shell-launcher-toggle{display:flex;flex-direction:column;justify-content:center;gap:2px;height:50px;padding:3px!important;border:0}
 .workspace:not(.shell-menu-open) .shell-launcher-toggle::after{content:'Меню';font-size:10px;line-height:1.2;color:var(--gs-text)}
 .workspace.shell-menu-open>.shell-launcher{inset:max(12px,env(safe-area-inset-top)) auto max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));width:min(320px,calc(100vw - 24px));height:auto;max-height:calc(100dvh - 24px);gap:14px;padding:12px;overflow:auto}
 .shell-menu-open .shell-launcher-toggle{min-height:48px}
 .shell-menu-open .shell-launcher-link{min-height:48px!important;height:auto!important}
 .shell-menu-backdrop{inset:0!important}
 .workspace .shell-header{display:flex!important;flex-wrap:wrap;padding:10px 14px;gap:6px 12px;min-height:64px;align-items:center}
 .shell-header h1{font-size:18px;margin:0}
 .shell-header .eyebrow{font-size:8px;margin:0 0 2px;letter-spacing:1px}
 .shell-header .product-badge{font-size:9px;padding:4px 7px;margin-left:auto}
 .workspace-clock{width:100%;display:flex!important;justify-content:space-between;gap:10px;margin:0!important}
 .workspace-clock>div{min-width:0}
 .workspace-clock small{font-size:9px!important}
 .workspace-clock time{font-size:10px!important;white-space:normal}
 body:is([data-product=spot],[data-product=futures]){padding-bottom:calc(92px + env(safe-area-inset-bottom))!important}
 .server-page,.page-content{padding:18px 14px calc(92px + env(safe-area-inset-bottom))!important}
 .gs-product-header{padding:10px 14px;gap:10px}
 .gs-product-brand{font-size:13px}
 .gs-product-icon{width:32px;height:32px}
 .gs-product-nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;flex-basis:100%;gap:4px}
 .gs-product-nav button{min-height:44px;white-space:normal!important;text-align:center!important;font-size:12px!important;padding:9px 6px!important}
 .gs-spot-lead{padding:18px 14px 14px!important}
 body:has(.gs-product-header) .premium-shell{padding:0 14px 24px!important}
 .gs-spot-lead #overview-summary{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
 .gs-spot-lead .overview-kpi-card{padding:13px!important;min-height:112px}
 .gs-spot-lead .overview-kpi-card__value{font-size:25px!important}
 .gs-spot-lead .overview-kpi-card__header{font-size:11px;white-space:normal}
 .gs-spot-lead #overview-summary>.overview-kpi-card:last-of-type{grid-column:1/-1!important}
 .overview-system-strip{flex-wrap:wrap!important;gap:8px!important;max-height:none!important;padding:12px!important}
 .overview-system-strip>*,.overview-kpi-card>*{min-width:0}
 .topbar{align-items:flex-start!important;flex-wrap:wrap!important;gap:14px}
 .topbar-actions{display:flex!important;flex-wrap:wrap;gap:8px!important;width:100%}
 .topbar-actions :is(button,.btn),#spot-manual-refresh{min-height:44px!important;max-width:100%;white-space:normal}
 .topbar-actions :is(.icon-button,.icon-btn){min-width:44px}
 #trading-toggle-btn{flex:1}
 .gs-spot-navigation{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
 .gs-menu-group:last-child{grid-column:1/-1}
 .gs-menu-group .tab{min-height:44px!important}
 body:has(.gs-product-header) .sidebar-exchange-filters{grid-template-columns:repeat(2,minmax(0,1fr))}
 .sidebar-exchange-filter[data-exchange-filter=all]{grid-column:1/-1}
 .gs-overview-explore{padding:12px;gap:8px}
 .gs-overview-explore h2{width:100%}
 .gs-overview-explore button{min-height:44px;flex:1;white-space:normal}
 .overview-best-grid,.overview-insights-grid{grid-template-columns:minmax(0,1fr)!important}
 .opportunity-ticker{padding-inline:8px;gap:7px;max-height:none;min-height:44px}
 .opportunity-ticker-label{max-width:95px;white-space:normal;font-size:10px;line-height:1.3}
 body[data-product=futures] :is(.content,.wrap,main.fx-page){padding-inline:14px!important;min-width:0}
 body[data-product=futures] :is(.header,.topbar){position:static!important;flex-wrap:wrap;padding:10px 14px!important}
 .futures-product-nav{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;gap:4px!important}
 .futures-product-nav a{min-height:44px;display:flex;align-items:center;justify-content:center;white-space:normal!important;text-align:center;padding:9px!important;font-size:12px!important}
 body[data-product=futures] :is(.grid4,.balance-grid,.pnl-grid,.fx-metrics){grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
 body[data-product=futures] :is(.bal-card,.pnl-card,.fx-metric){padding:14px!important;min-height:110px!important}
 body[data-product=futures] :is(.bal-val,.pnl-val,.fx-metric>strong){font-size:24px!important;overflow-wrap:anywhere}
 .fx-component-grid,.fx-restored-tools,.fx-filterbar,.settings-workspace .fx-setting-card .fields{grid-template-columns:minmax(0,1fr)!important}
 .settings-workspace .fx-setting-card .fields{padding:16px!important}
 .settings-search-results{width:100%!important;max-height:55dvh}
 .settings-workspace .settings-savebar{position:sticky!important;bottom:8px!important;left:auto!important;right:auto!important;width:100%;margin-top:20px;flex-wrap:wrap;padding:12px!important;max-height:none;z-index:50}
 .settings-savebar button{min-height:44px}
 #settings-list :is(.params-row,.pair-effective-values){grid-template-columns:minmax(0,1fr)!important}
 #settings-list .pair-example-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
 #settings-list .pair-editor-helper{flex-wrap:wrap}
 #settings-list .pair-editor-helper input{min-width:0;max-width:100%;width:100%}
 #settings-list .setting-header{display:grid!important;grid-template-columns:20px minmax(0,1fr) 44px 44px!important;gap:8px!important;padding:14px!important;align-items:center}
 #settings-list .setting-chevron{grid-column:1;grid-row:1/3}
 #settings-list .setting-title{grid-column:2/-1;grid-row:1;min-width:0;white-space:normal}
 #settings-list .setting-price{grid-column:2;grid-row:2;min-width:0;white-space:normal}
 #settings-list .setting-status{grid-column:2;grid-row:3;justify-self:start}
 #settings-list .setting-header>button{width:44px!important;min-height:44px;padding:0!important;grid-column:3;grid-row:2}
 #settings-list .setting-header>button:last-child{grid-column:4}
 #settings-list .setting-body{padding:14px!important}
 :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea){font-size:16px!important;max-width:100%;min-width:0}
 :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),select){min-height:44px}
 :is(.settings-form-card,.param-card,.param-block,.setting-card,.setting-group){min-width:0;max-width:100%;overflow-wrap:anywhere}
 :is(.modal-content,.modal-card,.accum-modal__card,.settings-leave-dialog){width:calc(100% - 24px)!important;min-width:0!important;max-width:560px!important;max-height:calc(100dvh - 24px)!important;overflow:auto!important;box-sizing:border-box}
 :is(.modal-footer,.modal-actions,.settings-leave-actions){display:flex;flex-wrap:wrap;gap:8px}
 :is(.modal-footer,.modal-actions,.settings-leave-actions) button{min-height:44px;flex:1;white-space:normal}
 .server-heading{flex-wrap:wrap;gap:12px}
 .server-heading h2{font-size:24px}
 .server-resource{padding:14px;min-height:170px}
 .server-resource-head{flex-wrap:wrap;margin-bottom:12px}
 .server-resource strong{font-size:24px}
 .server-resource--uptime strong{font-size:20px}
 .server-resource-head h4{overflow-wrap:anywhere;font-size:11px}
 .server-resource-tag{display:none}
 .server-card,.server-chart{padding:16px}
 .chart-heading{flex-wrap:wrap;gap:8px}
 .server-details{display:block}
 .server-details dt{margin-top:12px;font-weight:650}
 .server-details dd{margin:4px 0 14px;overflow-wrap:anywhere}
 .component-actions{min-width:0;gap:8px}
 .component-actions button{min-height:44px;flex:1}
 .autostart-choices,.notice-form fieldset,.appearance-schemes{grid-template-columns:minmax(0,1fr)!important}
 .server-control-panel .server-card p{min-height:0}
 .server-control-panel button,.backup-actions button,.server-periods button{min-height:44px!important;white-space:normal}
 .backup-actions{flex-wrap:wrap}
 .backup-form fieldset{min-width:0}
 .appearance-schemes button{grid-template-columns:40px minmax(0,1fr);min-width:0}
 .notice-launch{right:12px;bottom:max(16px,env(safe-area-inset-bottom));min-height:48px;max-width:calc(100vw - 100px);padding:10px 13px}
 .notice-feed{right:12px;bottom:80px;max-height:calc(100dvh - 160px);width:calc(100vw - 24px)}
 .notice-toasts{right:12px;top:max(12px,env(safe-area-inset-top));width:calc(100vw - 24px)}
 .notice-toast button{min-height:44px;min-width:44px}
 .parameter-help-popover{max-width:calc(100vw - 24px)!important}
 .login-page{padding:12px;align-items:flex-start;min-height:100dvh}
 .login-suite{width:100%!important;max-width:480px!important;margin:auto}
 .login-art{padding:18px}
 .login-panel{padding:22px 18px}
 .login-panel form{gap:16px}
 .login-panel input{font-size:16px!important}
 .page-content .surface{padding:18px}
 .user-form{grid-template-columns:1fr!important;min-width:0}
 /* Phone cards keep every column and every native handler. Expanded rows remain separate. */
 table[data-mobile-cards]{display:block!important;min-width:0!important;width:100%!important;table-layout:auto}
 table[data-mobile-cards]>thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 table[data-mobile-cards]>tbody{display:grid;gap:12px}
 table[data-mobile-cards]>tbody>tr[data-mobile-row]{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;border:1px solid var(--gs-border);border-radius:12px;overflow:hidden;background:var(--gs-surface)}
 table[data-mobile-cards]>tbody>tr[data-mobile-row]>td{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:7px;min-width:0!important;width:auto!important;max-width:100%;padding:12px!important;white-space:normal!important;overflow-wrap:anywhere;text-align:left!important;border:0;border-bottom:1px solid var(--gs-border);box-sizing:border-box}
 table[data-mobile-cards] td[data-cell-label]::before{content:attr(data-cell-label);display:block;color:var(--gs-muted);font-size:10px;line-height:1.4;letter-spacing:.03em}
 table[data-mobile-cards]>tbody>tr[data-mobile-row]>td:first-child{grid-column:1/-1}
 table[data-mobile-cards]>tbody>tr[data-mobile-row]>td:last-child{grid-column:1/-1;display:flex;flex-direction:row;align-items:center;justify-content:flex-end;flex-wrap:wrap;border-bottom:0}
 table[data-mobile-cards]>tbody>tr[data-mobile-row]>td:last-child::before{margin-right:auto}
 table[data-mobile-cards]>tbody>tr:not([data-mobile-row]){display:block;min-width:0}
 table[data-mobile-cards]>tbody>tr:not([data-mobile-row])>td{display:block;max-width:100%;white-space:normal}
 #tab-dashboard :is(.overview-row-pause,.overview-row-menu){width:44px!important;min-width:44px!important;max-width:44px;height:44px!important;min-height:44px!important}
}
@media(max-width:360px){
 .gs-spot-lead #overview-summary,.server-metrics,body[data-product=futures] :is(.grid4,.balance-grid,.pnl-grid){grid-template-columns:minmax(0,1fr)!important}
 .gs-spot-navigation,[data-mobile-collapsible][data-mobile-open=true]{grid-template-columns:minmax(0,1fr)!important}
}
@media(prefers-reduced-motion:reduce){.responsive-section-toggle{transition:none}}
@media(pointer:coarse){
 button,a,input,select,summary{touch-action:manipulation}
 .parameter-help-trigger{min-width:32px;min-height:32px}
 input:is([type=checkbox],[type=radio]){min-width:20px;min-height:20px}
}
