/* Shared mobile contract. Keep this stylesheet last in index.html. */
@media(max-width:900px){
 .form-grid,.metrics,.details-list,.section-grid,.item-grid,.boss-grid,.two-col,.comparison{min-width:0}
 .form-grid>*,.metrics>*,.details-list>*,.section-grid>*,.two-col>*,.comparison>*{min-width:0}
 .details-list{grid-template-columns:repeat(2,minmax(0,1fr))}
 .metric-label,.metric small,.details-list small,.details-list strong{overflow-wrap:anywhere}
}
@media(max-width:480px){.form-grid{grid-template-columns:minmax(0,1fr)}.forge-grid{grid-template-columns:minmax(0,1fr)}}
@media(max-width:650px){
 :root{scroll-padding-top:76px}
 html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
 body{overflow-x:clip}
 .shell{min-width:0;width:100%;margin-left:0}
 header{height:auto;min-height:62px;padding:8px max(12px,env(safe-area-inset-right)) 8px max(12px,env(safe-area-inset-left));gap:10px;position:sticky;top:0;z-index:15}
 #breadcrumb{min-width:0;flex:1;font-size:14px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .header-right{flex:none;gap:8px;margin-left:0}
 header .mobile-menu,header .avatar,.header-data-menu>summary{width:44px;height:44px;min-width:44px;display:grid;place-items:center;padding:0;box-sizing:border-box}
 main{padding:18px max(12px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))}
 .panel{padding:18px 16px;min-width:0;margin-bottom:18px}
 h1{font-size:27px;line-height:1.2}h2{font-size:22px;line-height:1.35}h3{font-size:18px;line-height:1.4}
 p,.sub,.mini{line-height:1.7;overflow-wrap:break-word}
 input:not([type=checkbox]):not([type=radio]),select,textarea,.select-trigger{font-size:16px!important;min-height:44px;max-width:100%;box-sizing:border-box}
 input[type=checkbox],input[type=radio]{width:22px;height:22px;flex:none;accent-color:#aeca90}
 .field{min-width:0}.field>span{line-height:1.5}.field small{line-height:1.6}
 .btn,.btn.small,.tab,.text-button,.select-menu button{min-height:44px;line-height:1.45;white-space:normal;touch-action:manipulation}
 .btn{padding:10px 14px}.text-button{padding-top:9px;padding-bottom:9px;display:inline-block;vertical-align:middle;max-width:100%;overflow-wrap:anywhere;text-align:left}
 .select-trigger{padding:9px 12px}.select-trigger>span{min-width:0;overflow-wrap:anywhere}.select-menu{overscroll-behavior:contain;-webkit-overflow-scrolling:touch;max-width:calc(100vw - 24px);box-sizing:border-box}
 .select-menu button{font-size:16px;padding:11px 12px;min-height:46px}
 .metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.metric{min-width:0;padding:15px 12px}.metric>strong{font-size:26px;line-height:1.4;overflow-wrap:anywhere}.metric-label{gap:7px;line-height:1.5}.metric-icon{width:26px;height:26px;flex:none}
 .details-list>div{padding:13px 11px;overflow-wrap:anywhere}.details-list strong{font-size:18px}
 .table-wrap{max-width:100%;min-width:0;overflow:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;scrollbar-width:thin;border-radius:9px}
 .table-wrap table{font-size:14px}th,td{padding:12px 10px;line-height:1.65}th{font-size:14px}
 .icon-label{max-width:100%;gap:7px;white-space:normal}.icon-label>span{min-width:0;overflow-wrap:break-word}.inline-icon{flex-shrink:0}
 .toolbar,.form-actions,.section-title,.row{min-width:0;flex-wrap:wrap;gap:10px}
 .toolbar>.custom-field,.toolbar>label{min-width:0}.toolbar>.btn{max-width:100%}
 .item-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.item-card{min-width:0}.item-body{padding:14px 12px}.item-body>strong{font-size:16px;line-height:1.5;overflow-wrap:anywhere}
 .item-body p,.item-body .item-meta{font-size:14px!important}.item-grid>.item-card .item-meta{gap:8px;flex-direction:column;align-items:flex-start}
 .item-art{height:125px}.item-art img{max-width:90%;max-height:105px}.item-art .pill{max-width:calc(100% - 16px);font-size:12px;padding:3px 6px}
 .boss-card{min-width:0}.boss-card .item-body{padding:14px 11px}.boss-card .item-meta{display:grid;grid-template-columns:minmax(0,1fr);justify-items:start;gap:8px;margin-top:12px}
 .boss-card .item-meta>span{display:block;max-width:100%}.boss-card .item-meta .icon-label{white-space:normal;gap:6px}.boss-card .item-meta .inline-icon{width:22px;height:22px;flex-basis:22px}.boss-card p{text-align:left}
 .forge-calibration{padding:16px 12px}.forge-calibration-controls .field{min-width:0;flex-basis:100%}.forge-calibration .details-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.forge-calibration .details-list .icon-label{align-items:flex-start}
 .achievement-card,.quest-card{min-width:0;padding:16px;gap:12px}.achievement-card>span,.quest-card>span{min-width:0}.achievement-card strong{line-height:1.5}.achievement-card img{border-radius:9px}
 .saved-inventory-tabs,.inventory-tabs{max-width:100%;flex-wrap:wrap;gap:8px}.saved-inventory-toolbar{min-width:0}
 .sidebar{width:min(310px,calc(100vw - 52px));padding:18px 14px max(16px,env(safe-area-inset-bottom));z-index:31;height:100dvh;box-sizing:border-box;overscroll-behavior:contain}
 .sidebar.open{box-shadow:none}.sidebar nav{min-height:0;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}.sidebar nav a{min-height:46px;padding:10px 12px;font-size:15px}
 .sidebar .brand{padding:0 45px 16px 0;font-size:14px}.sidebar-close{display:grid!important;position:absolute;right:12px;top:14px;width:44px;height:44px;place-items:center;border:1px solid #586a48;border-radius:12px;background:#26372a;color:#e0e8d5;font-size:25px;line-height:1}
 .mobile-nav-backdrop{position:fixed;inset:0;z-index:30;border:0;background:#0009;backdrop-filter:blur(3px);padding:0}
 body.mobile-nav-open{overflow:hidden}.header-data-options{right:0;max-width:calc(100vw - 24px)}.header-data-options button{min-height:46px;font-size:15px}
 dialog{width:calc(100% - 16px);max-width:none;max-height:calc(100dvh - 16px);margin:auto;padding:0;border-radius:18px;overflow:hidden}
 .modal-chrome{min-height:54px;padding:5px 8px;box-sizing:border-box}.modal-chrome .modal-close{width:44px;height:44px;flex-basis:44px;border-radius:12px}
 #detailContent{padding:6px 16px max(22px,env(safe-area-inset-bottom));max-height:calc(100dvh - 76px);overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;min-width:0}
 .modal-head,.node-info-head{gap:12px;align-items:center;min-width:0}.modal-head>div,.node-info-head>div{min-width:0}.modal-head h2,.node-info-head h2{font-size:22px;line-height:1.35;overflow-wrap:anywhere}.modal-head>img{width:70px;height:80px;object-fit:contain;flex:none}
 .node-personal{padding:16px;min-width:0}.node-personal .field,.gear-info-layout>.node-personal .field{max-width:none}.node-personal .btn{width:100%;min-width:0}.node-history-bar button{max-width:100%;white-space:normal}
 .node-info-layout,.gear-info-layout{grid-template-columns:minmax(0,1fr);gap:22px}.node-reference-title{flex-wrap:wrap;gap:10px}.gear-preview-stats .details-list{grid-template-columns:1fr}.gear-preview-stepper{gap:8px;flex-wrap:wrap}
 .stepper input,.preview-level input{min-height:44px}.stepper button,.preview-level button{min-width:44px;min-height:44px}
 .combat-section,.combat-candidate{padding:16px 12px}.combat-picker-list{grid-template-columns:minmax(0,1fr);max-height:330px}.combat-picker-tabs{flex-wrap:wrap;gap:7px}.combat-picker-tabs .btn{font-size:14px}
 .combat-target-grid,.combat-slot-counts,.combat-candidate-metrics,.combat-build-layout{grid-template-columns:minmax(0,1fr)}.combat-target-grid>label:first-child{grid-column:auto}.combat-build-layout>.combat-build-group{grid-column:auto}
 .combat-build-item{width:calc((100% - 20px)/3);min-width:75px;max-width:130px}.combat-build-item>span:last-child{overflow-wrap:anywhere}.combat-workbench-heading{flex-wrap:wrap;gap:12px}.combat-results-context{flex-wrap:wrap;gap:8px}
 .league-dashboard-tabs,.league-tabs{max-width:100%;flex-wrap:wrap}.league-choice-strip{max-width:100%;overflow:auto}.league-boss-picker{grid-template-columns:repeat(2,minmax(0,1fr))}
 .video-review-summary{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.video-import-panel{padding:18px 14px}.video-import-heading,.video-review-actions{flex-wrap:wrap;gap:12px}.video-skipped-grid{grid-template-columns:1fr}.video-review-filters{flex-wrap:wrap}
 .video-frame-preview img{max-width:100%;height:auto;max-height:65dvh;object-fit:contain}.content-notice-entry{padding:12px;gap:9px}.content-notice-inbox{grid-template-columns:minmax(0,1fr)}
 body[data-view=amulet] main{padding:10px 10px 24px}.tree-layout{display:flex;flex-direction:column;gap:8px}.tree-layout>.map-controls{position:static;order:0;align-self:stretch;justify-content:center;gap:3px;padding:4px}
 .map-controls button{width:44px;min-width:44px;height:44px}.map-controls #mapZoomValue{min-width:36px;height:44px;font-size:14px}.map-controls button#mapFit{min-width:76px;font-size:13px;padding:0 7px!important}
 .tree-layout>.map-page-progress{position:static;order:1;align-self:stretch;width:auto;min-width:0;display:grid;grid-template-columns:minmax(0,1fr) 112px;gap:5px 12px;padding:10px 12px;box-sizing:border-box}
 .map-page-progress>strong{font-size:14px;grid-column:1;grid-row:1}.map-page-progress>span{font-size:13px;grid-column:1;grid-row:2}.map-page-progress>.map-page-progress-track{grid-column:1;grid-row:3;margin:0}
 .map-page-progress>.map-cost-button{grid-column:2;grid-row:1/span 3;min-height:44px;margin:0;padding:8px;font-size:14px;gap:7px;border-left:1px solid #65744b}
 .tree-layout>#treeMap{order:2;min-height:360px!important;height:60dvh!important;max-height:650px}.tree-layout>.tree-detail{order:3}
 .amulet-topbar{gap:8px}.amulet-topbar>.tabs{width:100%;max-width:100%;flex-wrap:wrap!important;overflow:visible;gap:4px!important}.amulet-topbar .tab{flex:1 0 calc(25% - 4px);font-size:13px!important;min-height:44px;padding:8px 6px!important}
 #nodeSearch{min-height:46px!important;font-size:16px!important}.content-map-count{font-size:11px}.amulet-topbar .amulet-progress-compact{min-width:0;max-width:100%}
}
@media(max-width:380px){
 .metrics{grid-template-columns:minmax(0,1fr)}.metric{padding:14px}.metric>strong{font-size:27px}.metric-label{justify-content:space-between}
 .forge-calibration .details-list{grid-template-columns:1fr}.boss-grid{grid-template-columns:minmax(0,1fr)}.boss-art{height:160px}.boss-card .item-meta{grid-template-columns:repeat(2,minmax(0,1fr))}
 .item-grid{gap:8px}.item-body{padding:12px 10px}.item-art{height:110px}.item-art img{max-height:90px}.item-body>strong{font-size:15px}
 .details-list{grid-template-columns:minmax(0,1fr)}.comparison{grid-template-columns:1fr}.content-notice-entry{flex-wrap:wrap}.content-notice-entry>span:nth-child(2){flex-basis:calc(100% - 60px)}
}
@media(min-width:651px){.sidebar-close,.mobile-nav-backdrop{display:none!important}}
.mobile-gear-dock,.mobile-page-jumps,.mobile-result-jumps{display:none}
.modal-chrome .gear-export-button{margin-right:auto;min-height:44px;font-size:14px;padding:8px 13px}
#itemPosterDialog{width:min(820px,calc(100vw - 28px));height:calc(100dvh - 28px);max-height:calc(100dvh - 28px);padding:0;overflow:hidden;border:1px solid #5a6c4d;border-radius:18px;background:#16231c;color:#e6eddc}
#itemPosterDialog[open]{display:flex;flex-direction:column}
#itemPosterDialog::backdrop{background:#050a08d9}
.poster-preview-toolbar{display:flex;align-items:center;gap:12px;padding:12px 16px;border-bottom:1px solid #40513a;flex:none}
.poster-preview-toolbar strong{flex:1;min-width:0;font-size:16px;line-height:1.5}
.poster-preview-close{display:grid;place-items:center;flex:none;width:44px;height:44px;font:28px/1 system-ui;background:#33472e;color:#e1ebd5;border:0;border-radius:50%;cursor:pointer}
.poster-preview-close{padding:0;box-sizing:border-box;line-height:0}
.poster-preview-close svg{display:block;flex:none;width:20px;height:20px}
.gear-portrait-stack{display:flex;flex-direction:column;align-items:center;gap:12px;flex:0 0 120px;width:120px;align-self:flex-start}
.gear-portrait-stack>.gear-portrait{width:120px;height:120px;object-fit:contain}
.gear-portrait-stack>.gear-export-button{min-height:44px;padding:8px 12px;gap:8px;font-size:14px;margin:0}
.gear-export-button svg{display:block;flex:none}
.accessory-stars-preview input{appearance:textfield;text-align:center}
.accessory-stars-preview input::-webkit-inner-spin-button{appearance:none}
@media(max-width:650px){.gear-portrait-stack{width:84px;flex-basis:84px;gap:8px}.gear-portrait-stack>.gear-portrait{width:80px;height:86px}.gear-portrait-stack>.gear-export-button{padding:7px 10px;gap:6px;font-size:13px}.mobile-gear-stars{margin-top:6px}}
.poster-preview-image{min-height:0;overflow:auto;flex:1;padding:12px;text-align:center}
.poster-preview-image img{display:block;width:100%;height:auto;margin:auto;max-width:700px}
.poster-preview-actions{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;flex:none;padding:12px max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom));border-top:1px solid #40513a;background:#1e2e22}
.poster-preview-actions .btn{min-height:44px;text-decoration:none;display:inline-flex;justify-content:center;align-items:center;text-align:center}
@media(max-width:650px){
 dialog.mobile-gear-open{height:calc(100dvh - 16px)}
 dialog.mobile-gear-open>#detailContent{flex:1 1 auto;max-height:none;min-height:0}
 .mobile-gear-dock{display:block;flex:none;background:#223126;border-bottom:1px solid #526344;padding:6px 14px 10px}
 .mobile-gear-level{display:flex;align-items:center;justify-content:center;gap:9px}
 .mobile-gear-level label{font-size:14px;font-weight:700;margin-right:auto}
 .mobile-gear-level button{display:grid;place-items:center;width:44px;height:44px;border:1px solid #819567;border-radius:10px;background:#34472f;color:#e5efd9;font-size:23px;font-weight:700;line-height:1}
 .mobile-gear-level input{width:60px!important;flex:0 0 60px;min-width:0;text-align:center;padding:8px 3px;font-weight:700;appearance:textfield}
 .mobile-gear-level input::-webkit-inner-spin-button,.mobile-gear-level input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
 .mobile-gear-summary{font-size:14px;line-height:1.5;min-height:21px;margin:8px 0;color:#dfc3ed;font-weight:700}
 .mobile-gear-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
 .mobile-gear-tabs button,.mobile-page-jumps button,.mobile-result-jumps button{min-height:44px;border:1px solid #53694a;border-radius:9px;background:#1c2a21;color:#dae6cf;font:700 13px/1.4 system-ui,sans-serif;padding:7px 8px;touch-action:manipulation}
 .mobile-gear-tabs button[aria-selected=true]{background:#abc78b;color:#172119;border-color:#c6dda8}
 .mobile-gear-open .accessory-preview{display:none}
 .mobile-gear-open[data-gear-pane=effects] #gearResult,.mobile-gear-open[data-gear-pane=effects] .gear-info-layout>.node-personal{display:none}
 .mobile-gear-open[data-gear-pane=effects] #itemAbilities>.gear-target-summary,.mobile-gear-open[data-gear-pane=effects] #itemAbilities>.gear-preview-stats{display:none}
 .mobile-gear-open[data-gear-pane=cost] #itemAbilities,.mobile-gear-open[data-gear-pane=cost] .gear-section-title,.mobile-gear-open[data-gear-pane=cost] .gear-info-layout>.node-personal{display:none}
 .mobile-gear-open[data-gear-pane=cost] #itemAbilities{display:block}
 .mobile-gear-open[data-gear-pane=cost] #itemAbilities>.ability,.mobile-gear-open[data-gear-pane=cost] #itemAbilities>.gear-next-upgrade{display:none}
 .mobile-gear-open[data-gear-pane=progress] .gear-reference{display:none}
 .mobile-gear-open #gearResult{margin-top:0;padding-top:0;border-top:0}
 .mobile-gear-open .ability{scroll-margin-top:12px}
 .mobile-page-jumps,.mobile-result-jumps{display:flex;gap:7px;position:sticky;top:62px;z-index:11;padding:8px 0;margin:-4px 0 16px;background:#141e19;overflow:auto;scrollbar-width:thin;overscroll-behavior-x:contain}
 .mobile-page-jumps button,.mobile-result-jumps button{white-space:nowrap;flex:none}
 .mobile-page-jumps .mobile-profile-save{background:#b0cb93;color:#162317;border-color:#c8dda9}
 .mobile-result-jumps button{flex:1;white-space:normal;font-size:14px}
 body[data-view=profile] .panel,body[data-view=profile] h2,#statResult,#crResult,#enResult,#farmResult,#passValueResult,#shopChestResult{scroll-margin-top:130px}
}

.poster-preview-actions .poster-source-note{flex-basis:100%;margin:0;text-align:center;font-size:14px;line-height:1.5;color:#c8d4be}

@media(max-width:650px){
.mobile-gear-open[data-gear-pane=effects] .gear-planning,.mobile-gear-open[data-gear-pane=effects] .gear-full-plan{display:none}
.mobile-gear-open[data-gear-pane=cost] .gear-preview-inline{display:none}
.mobile-gear-open .gear-preview-inline{padding:4px 0 10px;font-size:15px}
.mobile-gear-open .gear-planning{margin-top:0}.mobile-gear-open .gear-full-plan{margin-top:12px}
.mythic-quick{padding:10px 12px;gap:8px}.mythic-quick>div>span{font-size:14px}.mythic-quick strong{font-size:24px}
}

@media(max-width:650px){.mobile-gear-open .gear-preview-tools{display:none}.gear-preview-changes{font-size:14px}}

/* Keep recognition evidence and before/after values together on a phone. */
@media(max-width:650px){
 .video-import-progress{grid-template-columns:minmax(0,1fr);gap:12px}
 .video-import-progress>button{grid-column:1;grid-row:auto;justify-self:start}
 .video-review-table{max-height:none;overflow:visible;background:transparent}
 .video-review-table table,.video-review-table tbody{display:block;min-width:0;width:100%;white-space:normal}
 .video-review-table thead{display:none}
 .video-review-table .video-group-title,.video-review-table .video-group-title th{display:block;background:transparent;padding:10px 0}
 .video-review-table tr[data-video-result]{position:relative;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:14px;margin-bottom:12px;border:1px solid #495b42;border-radius:12px;background:#223027}
 .video-review-table tr[data-video-result]>td{display:block;width:auto;min-width:0;padding:0;border:0}
 .video-review-table tr[data-video-result]>td:first-child{position:absolute;right:8px;top:8px;width:44px;height:44px;z-index:1}
 .video-review-table input[type=checkbox]{width:44px;height:44px;margin:0;cursor:pointer}
 .video-review-table tr[data-video-result]>td:nth-child(2){grid-column:1/-1;padding-right:38px}
 .video-review-table .video-field-name{min-width:0;gap:10px;font-size:16px;overflow-wrap:anywhere}
 .video-review-table td[data-label]:before{content:attr(data-label);display:block;font-size:14px;font-weight:600;color:#bdc8b6;margin-bottom:5px}
 .video-review-table td[data-label]{font-size:16px;overflow-wrap:anywhere}
 .video-review-table .video-frame-button{max-width:100%;min-height:44px}
 .video-review-table .video-frame-button img{height:65px;object-fit:contain}
}
/* Amulet node card on phones: tabs like the item card (levels / how to open / my progress). */
.node-mobile-tabs{display:none}
@media(max-width:650px){
 .node-mobile-tabs{display:grid;grid-template-columns:repeat(var(--tabs,3),minmax(0,1fr));gap:5px;position:sticky;top:-1px;z-index:4;margin:14px -4px 16px;padding:8px 4px;background:#1b2a20;border-bottom:1px solid #3f5135}
 .node-mobile-tabs button{min-height:44px;border:1px solid #53694a;border-radius:9px;background:#1c2a21;color:#dae6cf;font:700 13px/1.3 system-ui,sans-serif;padding:6px 6px;touch-action:manipulation}
 .node-mobile-tabs button[aria-selected=true]{background:#abc78b;color:#172119;border-color:#c6dda8}
 .node-popup[data-node-pane] .node-info-layout{display:block}
 .node-popup[data-node-pane=levels] .node-connections,.node-popup[data-node-pane=levels] .node-personal{display:none}
 .node-popup[data-node-pane=path] .node-reference>:not(.node-connections),.node-popup[data-node-pane=path] .node-personal{display:none}
 .node-popup[data-node-pane=progress] .node-reference{display:none}
}

/* Phone tabs: icons and "Мой персонаж" one-section-at-a-time. */
.tab-icon{width:22px;height:22px;object-fit:contain;flex:none}
.profile-jumps .btn,.node-mobile-tabs button,.mobile-gear-tabs button{display:inline-flex;align-items:center;justify-content:center;gap:6px;text-align:center}
@media(max-width:650px){
 .profile-jumps .btn,.node-mobile-tabs button,.mobile-gear-tabs button{flex-direction:column;gap:3px;line-height:1.2;padding:6px 3px;min-height:56px}
 #app[data-profile-pane=profileStats]>[data-profile-section]:not([data-profile-section=profileStats]),#app[data-profile-pane=profileAmulet]>[data-profile-section]:not([data-profile-section=profileAmulet]),#app[data-profile-pane=profileWorld]>[data-profile-section]:not([data-profile-section=profileWorld]),#app[data-profile-pane=profilePasses]>[data-profile-section]:not([data-profile-section=profilePasses]),#app[data-profile-pane=savedInventory]>[data-profile-section]:not([data-profile-section=savedInventory]){display:none}
 #app[data-profile-pane]>.profile-jumps{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}
 #app[data-profile-pane]>.profile-jumps .btn{padding:6px 2px;font-size:12px;min-height:58px}
 #app[data-profile-pane]>.profile-jumps .btn[aria-selected=true]{background:#abc78b;color:#172119;border-color:#c6dda8}
}
.btn>.tab-label-short{display:none}
@media(max-width:650px){#app[data-profile-pane]>.profile-jumps .btn>.tab-label-full{display:none}#app[data-profile-pane]>.profile-jumps .btn>.tab-label-short{display:inline}}
@media(max-width:650px){.mobile-result-jumps button{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;line-height:1.2;min-height:56px;padding:6px 3px}}
@media(max-width:360px){#app[data-profile-pane]>.profile-jumps .btn{font-size:11px;padding:6px 0}#app[data-profile-pane]>.profile-jumps{gap:4px}}
/* One label size for every phone tab bar; smaller on the narrowest screens so nothing is clipped. */
@media(max-width:650px){.profile-jumps .btn,.node-mobile-tabs button,.mobile-gear-tabs button,.mobile-result-jumps button{font-size:12px!important;overflow-wrap:normal;word-break:normal;hyphens:none}}
@media(max-width:360px){.profile-jumps .btn,.node-mobile-tabs button,.mobile-gear-tabs button,.mobile-result-jumps button{font-size:11px!important;padding-left:1px!important;padding-right:1px!important}}
/* Amulet on phones: map tabs, search, zoom, the map itself, then amulet level and map progress. */
@media(max-width:650px){.tree-layout>#mapControls{order:0}.tree-layout>#treeMap{order:2}.tree-layout>.amulet-xp-summary{order:3;width:100%;box-sizing:border-box}.tree-layout>.map-page-progress{order:4}.tree-layout>.tree-detail{order:5}}
/* Forge on phones: page tabs (overview / upgrades / gems) and 10-per-page lists. */
.page-tabs,.phone-pager[hidden]{display:none}
.pager-off{display:none!important}
@media(max-width:650px){
 .page-tabs{display:grid;grid-template-columns:repeat(var(--tabs,3),minmax(0,1fr));gap:5px;margin:0 0 14px}
 .page-tabs .btn{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-height:56px;padding:6px 3px;font-size:12px!important;line-height:1.2;width:100%;white-space:normal}
 .page-tabs .btn[aria-selected=true]{background:#abc78b;color:#172119;border-color:#c6dda8}
 #app[data-page-pane] .page-hidden{display:none!important}
 .phone-pager{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:12px 0 0}
 .phone-pager span{flex:1;text-align:center;font-size:14px;font-weight:600;color:#dae6cf;font-variant-numeric:tabular-nums}
 .phone-pager button{width:48px;height:44px;border:1px solid #6d8459;border-radius:10px;background:#2c3d2c;color:#eef5e4;font-size:24px;font-weight:700;line-height:1;display:grid;place-items:center}
 .phone-pager button:disabled{opacity:.35}
}
@media(max-width:360px){.page-tabs .btn{font-size:11px!important;padding:6px 1px}}
.page-tab-next{display:none}
@media(max-width:650px){.page-tab-next{display:flex;width:100%;min-height:48px;margin-top:16px;justify-content:center}}
/* Leagues on phones: the league picker comes first; heading, calendar link and intro text are on the menu/top bar already. */
@media(max-width:650px){.league-dashboard>.league-page-heading,.league-dashboard>.league-page-intro{display:none}}
@media(max-width:650px){#app[data-page-pane] .two-col[data-page-section]{display:block}}
@media(max-width:360px){.page-tabs.tabs-many .btn{font-size:10px!important;letter-spacing:-.1px}}
@media(max-width:650px){#app[data-page-pane] .ab-intro .ab-jumps{display:none}}
/* Crystal sub-tabs: plain text on desktop, compact square icon buttons on phones. */
.subsystem-tab .tab-icon,.subsystem-tab>.subsystem-label-short{display:none}
@media(max-width:650px){
 .subsystem-tabs{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;padding:6px!important}
 .subsystem-tab{display:inline-flex!important;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-height:56px;padding:6px 2px!important;font-size:12px!important;line-height:1.2;border:1px solid #53694a!important;border-radius:9px!important;background:#1c2a21;width:100%;min-width:0;white-space:nowrap}
 .subsystem-tab[aria-selected=true]{background:#abc78b!important;color:#172119!important;border-color:#c6dda8!important}
 .subsystem-tab .tab-icon{display:block}
 .subsystem-tab>.subsystem-label-full{display:none}
 .subsystem-tab>.subsystem-label-short{display:inline}
}
@media(max-width:360px){.subsystem-tab{font-size:10.5px!important}}
