/* 6.13 — expand the existing wooden sidebar; leave the recorded tutorial skin
   and controls intact. One document scroller, no sidebar or journal scroll trap. */
.sidebar613-markets{display:none;}
#game-hud.sidebar613-enabled .hide-info,
#game-hud.sidebar613-enabled .sidebar-rope,
#game-hud.sidebar613-enabled .region-track,
#game-hud.sidebar613-enabled .shop-grid{display:none!important;}
#game-hud.sidebar613-enabled .sidebar-shell{
 display:block!important;position:absolute;right:auto;bottom:auto;height:auto;max-height:none;
 overflow:visible;visibility:visible!important;opacity:0;transform:translate3d(100vw,0,0);
 transition:none!important;pointer-events:auto;touch-action:pan-y;z-index:2;
 font-size:clamp(12px,.84vw,17px);
}
#game-hud.sidebar613-enabled .game-sidebar{
 position:relative;inset:auto;width:100%;height:auto;max-height:none;
 overflow:visible;overscroll-behavior:auto;touch-action:pan-y;padding:0;
 display:flex;flex-direction:column;gap:10px;scrollbar-width:auto;
}
#game-hud.sidebar613-enabled .game-sidebar>.painted-panel{
 flex:0 0 auto;min-height:0;height:auto;max-height:none;padding:8px 10px;
}
#game-hud.sidebar613-enabled .game-sidebar h2{margin-bottom:8px;}
#game-hud.sidebar613-enabled .ranch-summary{padding:8px 2px;}
#game-hud.sidebar613-enabled .ranch-summary:first-child{padding-top:0;}
#game-hud.sidebar613-enabled .player-stats{gap:5px 8px;margin:7px 0;}
#game-hud.sidebar613-enabled .player-name small{display:block;}
#game-hud.sidebar613-enabled .fortune-button{min-height:30px;padding:5px 12px;}
#game-hud.sidebar613-enabled .sidebar613-markets{display:block;}
#game-hud.sidebar613-enabled .sidebar613-market{padding:10px 0;border-top:1px solid #9a7d4b55;}
#game-hud.sidebar613-enabled .sidebar613-market:first-child{border-top:0;padding-top:2px;}
#game-hud.sidebar613-enabled .sidebar613-market h3{display:flex;align-items:center;gap:7px;font-size:1em;margin:0 0 6px;}
.sidebar613-section-icon{width:24px;height:26px;flex:0 0 auto;}
.sidebar613-market h3 small{margin-left:auto;font:700 .85em 'Trebuchet MS',sans-serif;opacity:.7;}
#game-hud.sidebar613-enabled .sidebar613-empty{font-size:.88em;line-height:1.4;margin:2px 0;color:#736148;}
.sidebar613-row{display:flex;align-items:center;gap:8px;min-height:49px;padding:5px 0;border-top:1px solid #9a7d4b22;}
.sidebar613-row:first-of-type{border-top:0;}
.sidebar613-icon{width:34px;height:38px;flex:0 0 auto;}
.sidebar613-item{flex:1;min-width:0;font-size:.9em;}
.sidebar613-item strong{display:block;overflow-wrap:anywhere;}
.sidebar613-item small{display:block;margin-top:3px;font-size:.85em;line-height:1.3;color:#78654b;overflow-wrap:anywhere;}
#game-hud.sidebar613-enabled .sidebar613-action{flex:0 0 auto;white-space:nowrap;min-height:34px;padding:8px 12px;font-size:.83em;}
#game-hud.sidebar613-enabled .sidebar613-vault-stats{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:5px;font-size:.9em;}
.sidebar613-health{height:6px;border-radius:4px;background:#81663c44;margin:8px 0 6px;overflow:hidden;}
.sidebar613-health span{display:block;height:100%;background:linear-gradient(90deg,#c75d41,#d7ad47);border-radius:4px;}
#game-hud.sidebar613-enabled .sidebar613-links{font-size:.8em;color:#736148;margin:5px 0;line-height:1.4;}
#game-hud.sidebar613-enabled .utility-links{padding-top:4px;}
#game-hud.sidebar613-enabled .game-log-panel{display:block;}
#game-hud.sidebar613-enabled #game-log{overflow:visible;height:auto;max-height:none;font-size:.85em;gap:5px;touch-action:pan-y;}
#game-hud.sidebar613-enabled #game-log li{padding-bottom:5px;}
#game-hud.sidebar613-enabled .battle-chart-panel{flex:0 0 auto;}
#game-hud.sidebar613-enabled .sidebar-ivy{pointer-events:none;}
#game-hud.sidebar613-enabled .sidebar613-stacked{font-size:14px;}
#game-hud.sidebar613-enabled .sidebar613-stacked .player-stats{grid-template-columns:repeat(2,minmax(0,1fr));}

/* 6.17: absent in world view, then a 95–100% right-edge slide on the player-card layer.
   Hiding also removes offscreen hit targets and horizontal scroll contribution. */
#game-hud.sidebar613-enabled .sidebar-shell[hidden]{display:none!important;}
#game-hud.sidebar613-enabled .sidebar-shell[aria-hidden="true"]{visibility:hidden!important;pointer-events:none!important;}
#game-hud.sidebar613-enabled .sidebar-shell[inert],
#game-hud.sidebar613-enabled .sidebar-shell[inert] *{pointer-events:none!important;}
.sidebar617-art-pair{display:inline-flex;align-items:center;gap:4px;flex:0 0 auto;}
.sidebar617-type{display:inline-flex;align-items:center;justify-content:center;}
.sidebar617-type-icon{width:22px;height:28px;flex:0 0 auto;}

/* Shared lower edge: extend the chart's frame only if left-hand content needs
   more room. Tables/text retain their natural size and top alignment. */
#game-hud.sidebar613-enabled .game-sidebar>.battle-chart-panel{flex:1 0 auto;}
