/* Mobile adaptations keep the desktop layout and all theme tokens intact. */
.mobile-nav-scrim,.mobile-sidebar-close{display:none}
@media(max-width:900px){
  body:has(.sidebar.open){overflow:hidden}
  body .sidebar{width:min(300px,calc(100vw - 48px));height:100dvh;padding-top:max(22px,env(safe-area-inset-top));padding-bottom:max(20px,env(safe-area-inset-bottom));overflow-y:auto;overscroll-behavior:contain}
  body .sidebar .brand{padding-right:42px}
  body .mobile-sidebar-close{display:inline-flex;position:absolute;right:12px;top:max(14px,env(safe-area-inset-top));width:44px;height:44px}
  body .sidebar.open~.mobile-nav-scrim{display:block;position:fixed;inset:0;width:100%;height:100dvh;z-index:49;background:#0009;border:0;border-radius:0;cursor:pointer}
  body .sidebar nav a{min-height:48px;font-size:14px}
  body .mobile-menu{width:44px;height:44px;flex-shrink:0}
}
/* Compact phone layouts keep the desktop's hierarchy without oversized stacks. */
@media(max-width:650px){
  html{scroll-padding-top:68px}
  body .page-content{padding:16px 14px calc(24px + env(safe-area-inset-bottom))}
  body .page-heading{gap:12px;margin-bottom:16px;align-items:stretch}
  body .page-heading h1{font-size:24px;line-height:1.2;letter-spacing:-.6px}
  body .page-heading p{font-size:12px;line-height:1.5;margin-top:6px;max-width:none}
  body :is(.primary,.secondary,.danger,.icon-button){min-height:44px}
  body .icon-button{min-width:44px}
  body :is(input,select,textarea){font-size:16px;min-height:44px}
  body :is(button,a,input,select,summary){touch-action:manipulation}
  body :is(button,a,input,select,summary):focus-visible{outline:2px solid var(--accent);outline-offset:3px}
  body :is(.page-content,.workspace-main,.workspace-rail,.panel,.settings-panel,.workspace-panel){min-width:0}
  body .heading-actions{gap:8px;flex-wrap:wrap}
  body .heading-actions button{flex:1 1 auto;justify-content:center;font-size:12px;padding:8px 12px}
  body .page-content:has(.account-grid) .heading-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
  body .page-content:has(.account-grid) .heading-actions button{min-width:0;padding:7px 6px;font-size:11px;line-height:1.3}
  body .page-content:has(.account-grid) .heading-actions svg{display:none}
  body .topbar{position:sticky;top:0;z-index:30;padding-inline:10px;padding-top:env(safe-area-inset-top);height:calc(56px + env(safe-area-inset-top))}
  body .breadcrumb{font-size:13px;min-width:0}
  body .topbar .preview-tag{font-size:10px;max-width:125px;overflow:hidden;text-overflow:ellipsis}
  body .tools{display:grid;grid-template-columns:minmax(0,1fr) 118px;gap:8px;margin-bottom:14px;align-items:center}
  body .tools .search{max-width:none;width:100%;min-width:0;min-height:44px;flex-basis:auto;padding-inline:10px}
  body .tools .search input{min-width:0;width:100%;padding-inline:0}
  body .tools .filter-select{min-width:0;width:100%;font-size:12px;padding-inline:10px}
  body .account-grid{grid-template-columns:minmax(0,1fr);gap:12px}
  body .account-card{border-radius:16px}
  body .account-card .account-head{display:grid;grid-template-columns:40px minmax(0,1fr) auto 44px;padding:12px;gap:8px;align-items:center}
  body .account-head>div:nth-child(2){min-width:0}
  body .account-card .skin-wrap .skin{width:40px;height:40px;border-radius:9px}
  body .account-name{font-size:14px;line-height:1.35;overflow-wrap:anywhere}
  body .account-card .account-caption{font-size:10px;line-height:1.5;letter-spacing:0;text-transform:none;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  body .account-head .status-pill{margin:0;font-size:10px;padding:4px 7px;white-space:nowrap}
  body .account-head .account-remove{width:44px;height:44px;min-height:44px;padding:13px}
  body .account-card .account-body{padding:0 12px 10px}
  body .account-card .server-row{min-height:34px;padding:7px 9px;font-size:11px;gap:7px;border-radius:8px}
  body .account-card .server-row img{width:18px;height:18px}
  body .account-card .account-metrics{padding-top:10px;margin-top:10px;gap:12px}
  body .account-card .metric-label{font-size:11px;line-height:1.4;margin-bottom:4px}
  body .account-card .metric-value{font-size:18px;line-height:1.35}
  body .account-card .account-body .donut-metrics{padding-top:12px;gap:8px}
  body .account-card .donut-metrics small{font-size:11px;min-height:18px;gap:5px;margin-bottom:4px}
  body .account-card .donut-metrics img{width:15px;height:15px}
  body .account-card .donut-metrics strong{font-size:14px;line-height:1.4;letter-spacing:-.2px}
  body .account-card .donut-stats-meta{margin-top:7px;font-size:10px;line-height:1.5}
  body .account-card .offline-info{min-height:70px;padding-block:12px;font-size:12px;line-height:1.6}
  body .account-card .account-sessions{padding:0 12px 10px}
  body .account-sessions .session-choice{min-height:44px;font-size:11px}
  body .account-card .account-preference{padding:6px 12px;min-height:44px;font-size:12px}
  body .account-preference small{font-size:10px}
  body .switch{min-width:44px;min-height:28px}
  body .account-card .account-actions{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);padding:10px 12px;gap:8px}
  body .account-actions button{min-width:0;font-size:11px;line-height:1.3;padding:7px 6px;justify-content:center;gap:5px}
  body .account-actions button svg{width:13px;height:13px;flex:none}
  body .hero{min-height:0;padding:18px;gap:12px;border-radius:16px}
  body .hero h2{font-size:26px;line-height:1.2;letter-spacing:-.6px}
  body .hero-eyebrow{font-size:11px;margin-bottom:10px}
  body .hero-content p{font-size:12px;line-height:1.6}
  body .hero-status{font-size:11px}
  body .stats-row{gap:10px;margin-bottom:16px}
  body .stat{padding:14px;border-radius:14px}
  body .stat-top,body .stat-foot{font-size:11px;line-height:1.5}
  body .stat-number{font-size:26px;line-height:1.2;margin:10px 0 5px}
  body .panel-header{padding:14px}
  body .panel-header h2{font-size:14px}
  body .activity-list{padding-inline:14px}
  body .activity-item{font-size:12px;line-height:1.6;padding-block:12px}
  body .activity-time{font-size:10px}
  body .sellaxe-gallery{gap:12px}
  body .sellaxe-card{padding:16px;border-radius:16px;min-height:0}
  body .sellaxe-card-title h2{font-size:16px}
  body .sellaxe-card .sellaxe-card-description{font-size:12px;line-height:1.6;min-height:0;margin:12px 0}
  body .sellaxe-card-summary{padding-block:12px;gap:12px;min-height:0;margin-bottom:12px}
  body :is(.sellaxe-network,.sellaxe-card-summary span,.live-automation-status){font-size:11px;line-height:1.5}
  body .sellaxe-card-summary strong{font-size:13px}
  body .sellaxe-account-select select{font-size:14px;min-height:44px}
  body .sellaxe-card-footer{gap:8px;flex-wrap:wrap;padding-top:12px;min-height:0}
  body .sellaxe-card-footer button{font-size:12px;min-height:44px}
  body .settings-layout{gap:14px}
  body .settings-nav{gap:6px;scrollbar-width:thin}
  body .settings-nav button{font-size:12px;min-height:44px;padding:9px 12px}
  body .settings-panel{padding:16px;border-radius:16px}
  body .settings-panel h2{font-size:20px}
  body .settings-panel p,body .settings-panel label{font-size:13px;line-height:1.6}
  body .theme-options{gap:10px;grid-template-columns:repeat(2,minmax(0,1fr))}
  body .theme-preview{height:80px}
  body .theme-choice small{font-size:11px;line-height:1.5}
  body .theme-choice-label{font-size:12px}
  body .workspace-shell{width:calc(100% - 24px);padding:14px 0 calc(24px + env(safe-area-inset-bottom))}
  body .workspace-top{height:56px;min-height:56px;padding-inline:12px}
  body .workspace-top button{min-height:44px}
  body .workspace-hero{margin-bottom:14px}
  body .workspace-identity{gap:10px;margin-bottom:12px;flex-wrap:nowrap;min-width:0}
  body .workspace-identity>div:not(.workspace-player-status){min-width:0;flex:1}
  body .workspace-identity>.skin{width:40px;height:40px;flex:none}
  body .workspace-identity h1{font-size:22px;line-height:1.3;letter-spacing:-.5px;overflow-wrap:anywhere}
  body .workspace-identity p{font-size:11px;line-height:1.5;flex-wrap:wrap;overflow-wrap:anywhere}
  body .workspace-identity .workspace-eyebrow{font-size:9px;letter-spacing:.08em}
  body .workspace-player-status .status-pill{font-size:10px;white-space:nowrap}
  body .workspace-controls{gap:8px;flex-wrap:wrap}
  body .workspace-controls button{flex:1 1 auto;font-size:12px;min-height:44px;padding:8px 12px}
  body .session-selector{flex-wrap:nowrap;overflow-x:auto;gap:8px;padding-bottom:12px;margin-bottom:12px;scrollbar-width:thin}
  body .session-selector .session-choice,body .session-selector>.secondary{flex:0 0 auto;min-height:44px;font-size:11px}
  body .workspace-summary{margin-bottom:14px;border-radius:14px}
  body .workspace-summary .workspace-stat{padding:12px;gap:8px}
  body .workspace-stat small,body .workspace-summary>.donut-metrics small{font-size:11px}
  body .workspace-stat strong,body .workspace-stat .ping-value{font-size:19px}
  body .workspace-summary>.donut-metrics{gap:10px;padding:12px}
  body .workspace-summary>.donut-metrics strong{font-size:16px;overflow-wrap:anywhere}
  body .workspace-summary>.donut-metrics small{gap:5px;min-height:18px;margin-bottom:5px}
  body .workspace-summary>.donut-metrics img{width:16px;height:16px}
  body .workspace-tabs{gap:6px;margin-bottom:14px}
  body .workspace-tabs button{min-height:44px;font-size:13px;padding:9px 16px}
  body .workspace-body{gap:12px}
  body .workspace-panel{padding:14px;border-radius:14px}
  body .workspace-panel h3{font-size:14px}
  body .workspace-chat .workspace-section-title{padding:12px;gap:8px;flex-wrap:wrap}
  body .session-chat-actions{gap:8px;margin-left:auto}
  body .session-chat-clear{min-height:44px;font-size:11px;padding:8px 10px}
  body .chat-live-badge{font-size:11px}
  body .workspace-chat .command-description{padding:8px 12px;font-size:11px;line-height:1.5}
  body .workspace-chat .command-history.minecraft-chat{height:clamp(220px,40dvh,360px);min-height:220px;padding:10px}
  body .minecraft-chat-line{display:flex;align-items:baseline;gap:8px;margin-bottom:8px;overflow-wrap:anywhere}
  body .minecraft-chat-line time{flex:none;font-size:9px;line-height:1.6;min-width:0}
  body .minecraft-chat-line>span{min-width:0;font-size:12px;line-height:1.65}
  body .workspace-chat .command-form{padding:10px 10px 8px;gap:8px;grid-template-columns:minmax(0,1fr) 44px}
  body .workspace-chat .command-form input{height:44px;min-height:44px;font-size:16px}
  body .workspace-chat .command-form button{width:44px;min-width:44px;height:44px;flex-shrink:0}
  body .command-feedback{font-size:12px;line-height:1.5;overflow-wrap:anywhere}
  body .workspace-look>summary{min-height:44px;font-size:12px;align-items:center}
  body .workspace-connection .detail-list{font-size:12px}
  body .workspace-connection .detail-list>div{padding:9px 0}
  body .workspace-connection .detail-list strong{overflow-wrap:anywhere}
  body .player-widget-tabs button{min-height:44px;font-size:12px}
  body .workspace-inventory .inventory-live-grid{overflow-x:visible;padding-bottom:4px;min-width:0}
  body .workspace-inventory :is(.inventory-nine,.inventory-grid){min-width:0;max-width:100%;gap:3px;grid-template-columns:repeat(9,minmax(0,1fr))}
  body .workspace-inventory :is(.live-item-slot,.inv-slot){min-width:0;width:100%;min-height:0;aspect-ratio:1;border-radius:5px}
  body .workspace-inventory .inventory-equipment .live-item-slot{width:36px;height:36px}
  body .workspace-inventory .live-item-slot img{width:85%;height:85%}
  body .workspace-inventory .live-item-slot>small{top:2px;left:3px;font-size:8px}
  body .workspace-inventory .live-item-slot>span{font-size:10px;right:2px;bottom:1px}
  body .inventory-live-notice,body .inventory-hint{font-size:11px;line-height:1.6}
  body .inventory-context-actions{gap:8px;flex-wrap:wrap}
  body .inventory-context-actions button{min-height:44px;font-size:12px}
  body .inventory-hotbar-toolbar{flex-wrap:wrap;align-items:flex-start;gap:8px}
  body .inventory-hotbar-toolbar label{font-size:12px}
  body .inventory-hotbar-toolbar select{font-size:16px;min-height:44px}
  body .inventory-shortcuts{font-size:10px;gap:8px 12px;margin-top:14px}
  body dialog,body .sellaxe-dialog{width:calc(100vw - 16px);max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);margin:auto;padding:0;overflow:auto;border-radius:16px}
  body .modal-header{padding:12px 14px;position:sticky;top:0;background:var(--panel);z-index:2}
  body .modal-header h2{font-size:18px}
  body .modal-body,body .sellaxe-dialog .sellaxe-modal-body{padding:14px}
  body .modal-body p,body .modal-body label,body .modal-body small{font-size:12px;line-height:1.6}
  body .form-row{grid-template-columns:minmax(0,1fr);gap:12px}
  body .modal-footer,body .modal-actions{position:sticky;bottom:0;background:var(--panel);z-index:2;padding:10px 14px max(10px,env(safe-area-inset-bottom));gap:8px;flex-wrap:wrap}
  body :is(.modal-footer,.modal-actions) button{min-height:44px;flex:1 1 auto;justify-content:center}
  body .toast-stack{left:12px;right:12px;bottom:calc(12px + env(safe-area-inset-bottom));max-width:none;width:auto}
  body .toast{max-width:100%;font-size:12px;line-height:1.6;overflow-wrap:anywhere}
  body .server-table{display:block;width:100%;min-width:0}
  body .server-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
  body .server-table tbody{display:block}
  body .server-table tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;padding:14px;border-bottom:1px solid var(--border)}
  body .server-table td{display:block;min-width:0;padding:0!important;border:0;font-size:12px;overflow-wrap:anywhere}
  body .server-table td:nth-child(1),body .server-table td:nth-child(2),body .server-table td:last-child{grid-column:1/-1}
  body .server-table td:nth-child(n+2):not(:last-child):before{display:block;font-size:11px;color:var(--muted);margin-bottom:5px}
  body .server-table td:nth-child(2):before{content:'Address'}
  body .server-table td:nth-child(3):before{content:'Region'}
  body .server-table td:nth-child(4):before{content:'Public status'}
  body .server-table td:nth-child(5):before{content:'Our sessions'}
  body .server-table .row-actions{justify-content:flex-end;gap:8px}
  body .earnings-tracking{padding:14px;gap:12px;margin-bottom:14px}
  body .earnings-network{font-size:13px}
  body .earnings-tracking-copy p{font-size:11px;margin-top:5px}
  body .earnings-stats{gap:10px;margin-bottom:14px}
  body .earnings-stat{padding:13px 12px;border-radius:14px}
  body .earnings-stat>div{font-size:11px;margin-bottom:8px}
  body .earnings-stat>.earnings-money{font-size:18px}
  body .earnings-stat p{font-size:10px;margin-top:7px}
  body .earnings-players,body .earnings-detail-grid>.panel{padding:14px}
  body .earnings-player{padding:14px 0;gap:12px}
  body .earnings-player-name strong{font-size:13px}
  body .earnings-player-amount .earnings-money{font-size:13px}
  body .earnings-detail-grid{gap:14px}
  body .earnings-detail-grid li{padding:12px 0}
  body .earnings-detail-grid li strong{font-size:12px}
  body .earnings-detail-grid li small,body .earnings-detail-grid time{font-size:11px}
  body .earnings-footnote{font-size:11px;line-height:1.6;margin-top:16px}
  body .proxy-card{padding:16px}
  body .proxy-address{margin:14px 0;font-size:12px}
  body .live-gate-panel{padding:24px 20px;margin:12px}
  body .live-gate-panel h1{font-size:24px;line-height:1.3}
}
@media(max-width:380px){
  body .topbar .preview-tag{display:none}
  body .account-actions button svg{display:none}
  body .workspace-identity p{font-size:10px}
}
