/* No platform-native scrollbar chrome inside the game, including nested panes. */
#game,#game *{scrollbar-width:none!important;scrollbar-color:auto!important}
#game::-webkit-scrollbar,#game *::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}
#game-scrollbars{position:fixed;inset:0;z-index:100;pointer-events:none;user-select:none;-webkit-user-select:none}
.game-scrollbar{position:absolute;pointer-events:auto;touch-action:none;background:#090e0bdd;border:1px solid #65594070;border-radius:2px;cursor:pointer}
.game-scrollbar[hidden]{display:none}
.game-scrollbar-y{width:calc(10px * var(--rail-scale,1))}.game-scrollbar-x{height:calc(10px * var(--rail-scale,1))}
.game-scroll-thumb{display:block;position:absolute;left:0;top:0;background:#8d805f;border:1px solid #b9a77c;box-shadow:inset 1px 0 #c7b58d40,inset -1px 0 #302b22;border-radius:1px;pointer-events:auto}
.game-scrollbar-y .game-scroll-thumb{width:100%;min-height:calc(26px * var(--rail-scale,1))}.game-scrollbar-x .game-scroll-thumb{height:100%;min-width:calc(26px * var(--rail-scale,1))}
.game-scroll-thumb::after{content:'';position:absolute;inset:45% 2px;border-top:1px solid #332f25;border-bottom:1px solid #c5b58c80;height:3px}
.game-scrollbar-x .game-scroll-thumb::after{inset:2px 45%;height:auto;width:3px;border:0;border-left:1px solid #332f25;border-right:1px solid #c5b58c80}
.game-scrollbar:hover .game-scroll-thumb,.game-scrollbar.dragging .game-scroll-thumb{background:#b09b6f}
.game-scrollbar:focus-visible{outline:1px solid #d7c18e;outline-offset:2px}
/* Space for the in-game rail where old native bars supplied a gutter. */
#game .inv-grid-scroll.game-scroll-host,#game .community-scroll.game-scroll-host,#game .npc-choices.game-scroll-host{padding-right:15px}
#game #chat-log.game-scroll-host{padding-right:14px}
/* Overlay rails occupy the final 12 logical pixels. Reserve a separate reading
   gutter even before the rail appears; text/buttons must never run beneath it. */
#game #modal .region-atlas .atlas-detail{padding-inline-end:24px;overscroll-behavior:contain;scroll-padding-block:12px}
body.gamepad #game #modal .region-atlas .atlas-detail{padding-inline-end:calc(16px * var(--inverse-ui-scale))}
