/* One primary scroll plane, not a scroll bar in every list/card. */
:root{--cabinet-ui-scale:1}
html{scrollbar-gutter:auto}
body.cabinet-compact{overflow-x:clip}
.cabinet-compact :is(.inventory-grid,.market-list,.bag-scroll,.bag-item-list,
 .portrait-grid,.guild-roster-list,.guild-candidates,.v2-skill-masterysteps ul){
 max-height:none;overflow-y:visible;overflow-x:visible;scrollbar-gutter:auto;
 overscroll-behavior:auto;
}
.cabinet-compact #guildContent :is(.guild-emblem-gallery,.guild-motto-list,.guild-activity-events){
 max-height:none;overflow-y:visible;overflow-x:visible;scrollbar-gutter:auto;
 overscroll-behavior:auto;
}
/* The item dialog needs one scrollable body, not a second scrollbar for its actions. */
@media (min-height:640px){
 .cabinet-compact .item-preview-actions{max-height:none;overflow-y:visible}
}
/* Preserve only genuinely bounded interfaces: modal content, search directories,
   dropdowns, and the VK tab itself. They must remain reachable. */
.cabinet-compact :is(.inventory-grid,.market-list,.bag-scroll,.bag-item-list){padding-right:0}
.cabinet-compact .inventory-grid::-webkit-scrollbar{display:none}

/* Settings are readable and keyboard operable on phones, PCs and VK. */
.cabinet-interface-settings{display:grid;gap:11px}
.cabinet-interface-settings h3{margin:4px 0 0;font-size:1.1rem}
.cabinet-interface-settings p{margin:0;color:var(--ui-muted);line-height:1.55}
.cabinet-interface-scale-field{display:grid;grid-template-columns:minmax(0,1fr) minmax(110px,160px);align-items:center;gap:12px}
.cabinet-interface-scale-field>span{font-weight:650}
.cabinet-interface-scale-field select{width:100%;min-width:0}
.cabinet-interface-settings #interfaceScaleStatus{color:var(--ui-accent);min-height:1.3em}
@media(max-width:390px){.cabinet-interface-scale-field{grid-template-columns:minmax(0,1fr)}}

/* Recipe cards and stock bags: preserve one recipe per line without nested scroll. */
.resource-use-text{white-space:pre-line;line-height:1.55;overflow-wrap:anywhere}
.item-resource-purpose{font-weight:700;color:var(--ui-accent,inherit);margin-bottom:6px}

/* Reduce vertical chrome; keep VK's own back button/outer frame untouched. */
@media (min-width:721px){
 body.cabinet-compact > main.shell{padding-top:12px;padding-bottom:34px}
 body.cabinet-compact .topbar{gap:8px 12px;padding-bottom:10px}
 body.cabinet-compact .cabinet-brand{font-size:17px;line-height:1.25}
 body.cabinet-compact .topbar > nav.tabs > button{min-height:38px;padding:6px 5px;font-size:12px;gap:5px}
 body.cabinet-compact .topbar > nav.tabs .ui-icon{width:17px;height:17px}
 body.cabinet-compact .topbar .cabinet-more > summary{min-height:36px;padding:6px 1px;font-size:12px}
 body.cabinet-compact .page-heading{min-height:0;margin:12px 0 10px}
 body.cabinet-compact .page-heading h1{font-size:24px;line-height:1.3}
 body.cabinet-compact .cabinet-section-help{padding:8px 11px;margin-bottom:10px}
 body.cabinet-compact .cabinet-help-brief{font-size:12px;line-height:1.4;margin-bottom:4px}
 body.cabinet-compact .cabinet-help-details > summary{font-size:12px;min-height:24px}
 body.cabinet-compact .profile-sections{gap:18px;margin:0 0 12px}
 body.cabinet-compact .profile-sections > button{min-height:36px!important;padding:6px 2px!important;font-size:13px!important}
}
