html { overflow-y:scroll; scrollbar-gutter:stable; }
/* Shared workspace: optional content follows the board, never sizes it. */
body:not(.workspace-disabled):not(.legacy-layout), body:not(.workspace-disabled):not(.legacy-layout).mobile-layout { height:auto; min-height:100dvh; overflow-y:auto; box-sizing:border-box; }
body:not(.workspace-disabled):not(.legacy-layout) #market-layout { grid-template-columns:minmax(280px, 480px) minmax(300px, 1fr); grid-template-areas:'status status' 'farm side'; grid-template-rows:auto minmax(0, 1fr); height:auto; min-height:0; overflow:visible; align-items:start; flex:none; }
body:not(.workspace-disabled):not(.legacy-layout) #hud-profile-panel { grid-area:status; width:auto; margin:0; }
body:not(.workspace-disabled):not(.legacy-layout) #mobile-profile-row { display:flex; flex-direction:row; height:auto; align-items:center; gap:10px; overflow:visible; }
body:not(.workspace-disabled):not(.legacy-layout) .hud-profile-avatar { width:64px; height:64px; max-width:64px; object-fit:cover; flex:none; cursor:pointer; }
body:not(.workspace-disabled):not(.legacy-layout) #mobile-profile-side { display:grid; grid-template-columns:minmax(160px,1fr) minmax(150px,1fr); gap:4px 16px; width:auto; flex:1; overflow:visible; }
body:not(.workspace-disabled):not(.legacy-layout) #hud-top-stats { grid-column:1; display:flex; flex-wrap:wrap; gap:12px; border:0; box-shadow:none; margin:0; padding:0; min-height:24px; font-size:13px; }
body:not(.workspace-disabled):not(.legacy-layout) .profile-energy-info { grid-column:2; grid-row:1; padding:0; border:0; background:none; }
body:not(.workspace-disabled):not(.legacy-layout) .player-level-info { grid-column:1 / -1; display:flex; align-items:center; gap:10px; border:0; background:none; padding:0; }
body:not(.workspace-disabled):not(.legacy-layout) .player-xp-bar { width:100px; flex:none; }
body:not(.workspace-disabled):not(.legacy-layout) #mobile-chat-log { grid-column:1 / -1; height:20px; min-height:20px; }
body:not(.workspace-disabled):not(.legacy-layout) .profile-goals-info { display:none; }
body:not(.workspace-disabled):not(.legacy-layout) #farm-panel { display:flex; flex-direction:column; height:auto; max-height:none; overflow:visible; }
body:not(.workspace-disabled):not(.legacy-layout) #farm-title { order:0; }
body:not(.workspace-disabled):not(.legacy-layout) .farm-scenery { order:1; height:28px; flex:none; }
body:not(.workspace-disabled):not(.legacy-layout) #desktop-chat-log { order:2; height:22px; flex:none; }
body:not(.workspace-disabled):not(.legacy-layout) #grid-container { order:3; width:var(--grid-size); height:var(--grid-size); flex:none; margin:0 auto; }
body:not(.workspace-disabled):not(.legacy-layout) .farm-toolbar { order:4; flex:none; flex-wrap:wrap; height:auto; min-height:44px; }
body:not(.workspace-disabled):not(.legacy-layout) #chapter-farm-home { order:5; position:static; width:auto; height:auto; }
body:not(.workspace-disabled):not(.legacy-layout) #farm-notes { order:6; position:static; display:flex; flex-wrap:wrap; width:auto; height:auto; margin-top:6px; }
body:not(.workspace-disabled):not(.legacy-layout) #current-action { order:7; min-width:0; }
body:not(.workspace-disabled):not(.legacy-layout) #market { height: min(720px, calc(100dvh - 190px)); min-height:400px; overflow:hidden; }
body:not(.workspace-disabled):not(.legacy-layout) #market-header { max-height:55%; overflow-y:auto; padding:6px; }
body:not(.workspace-disabled):not(.legacy-layout) .market-tabs { position:sticky; top:0; z-index:2; background:var(--theme-surface); }
body:not(.workspace-disabled):not(.legacy-layout) #cooking-context { height:auto; max-height:none; overflow:visible; margin:4px 0; }
body:not(.workspace-disabled):not(.legacy-layout) #current-action .market-insight-grid { display:flex; flex-wrap:wrap; gap:6px 14px; }
body:not(.workspace-disabled):not(.legacy-layout) #current-action .market-insight-metric { border:0; box-shadow:none; background:none; padding:3px 0; min-width:90px; }
body:not(.workspace-disabled):not(.legacy-layout) #current-action .market-insight-metric .metric-value { font-size:14px; }
.active-commitment { border-left:3px solid var(--theme-accent); padding:7px; background:var(--theme-subtle-bg); font-size:13px; }
.active-commitment button { min-height:36px; }
.selection-names { font-size:12px; margin:5px 0; }
body:not(.workspace-disabled):not(.legacy-layout) #farm-action-dock, body:not(.workspace-disabled):not(.legacy-layout).mobile-layout #farm-action-dock.is-visible { display:none !important; }
body:not(.workspace-disabled):not(.legacy-layout) #rest-dock { left:auto; right:calc(18px + var(--safe-right)); bottom:calc(12px + var(--safe-bottom)); width:180px; height:44px; padding:0; }
body:not(.workspace-disabled):not(.legacy-layout) #next-day { width:100%; height:44px; min-height:44px; }
#game-options { position:relative; font-size:13px; }
#game-options > summary { cursor:pointer; padding:4px 8px; }
#game-options > div { display:none; }
#game-options[open] { z-index:110; }
#game-options[open] > div { display:block; background:var(--theme-surface); color:var(--theme-text); padding:8px; width:min(300px,70vw); }
#game-options[open] > .options-popup { position:absolute; right:0; top:100%; box-shadow:1px 1px 3px #222; }
#presentation-options .panel-title { display:none; }
#presentation-options button { display:block; min-height:44px; width:100%; margin:4px 0 !important; }
body:not(.workspace-disabled):not(.legacy-layout) .data-panel-layout { display:flex; flex-direction:column; }
body:not(.workspace-disabled):not(.legacy-layout) .data-summary-row { display:flex; flex-wrap:wrap; gap:6px; }
body:not(.workspace-disabled):not(.legacy-layout) .data-summary-card { padding:5px 8px; flex:1; }
body:not(.workspace-disabled):not(.legacy-layout) .data-summary-value { font-size:14px; }
body:not(.workspace-disabled):not(.legacy-layout) .data-series-list { display:flex; flex-wrap:wrap; max-height:200px; overflow:auto; }
body:not(.workspace-disabled):not(.legacy-layout) .data-series-button { flex:0 1 auto; min-height:36px; padding:4px 7px; }
body:not(.workspace-disabled):not(.legacy-layout) .data-series-icon-wrap { width:24px; height:24px; }
body:not(.workspace-disabled):not(.legacy-layout) .data-series-copy { font-size:11px; }
body:not(.workspace-disabled):not(.legacy-layout).mobile-layout #market-layout { display:flex; flex-direction:column; width:100%; margin:0; height:auto; overflow:visible; }
body:not(.workspace-disabled):not(.legacy-layout).mobile-layout #hud-profile-panel { width:100%; box-sizing:border-box; }
body:not(.workspace-disabled):not(.legacy-layout).mobile-layout #mobile-profile-side { grid-template-columns:1fr; }
body:not(.workspace-disabled):not(.legacy-layout).mobile-layout #hud-top-stats, body:not(.workspace-disabled):not(.legacy-layout).mobile-layout .profile-energy-info, body:not(.workspace-disabled):not(.legacy-layout).mobile-layout .player-level-info { grid-column:1; grid-row:auto; }
body:not(.workspace-disabled):not(.legacy-layout).mobile-layout .profile-energy-info { display:flex; align-items:center; gap:8px; }
body:not(.workspace-disabled):not(.legacy-layout).mobile-layout #energy-bar { flex:1; min-width:70px; }
body:not(.workspace-disabled):not(.legacy-layout).mobile-layout #desktop-roll-indicator { display:none; }
body:not(.workspace-disabled):not(.legacy-layout).mobile-layout #farm-panel { width:100%; box-sizing:border-box; }
body:not(.workspace-disabled):not(.legacy-layout).mobile-layout #current-action { width:100%; }
body:not(.workspace-disabled):not(.legacy-layout).mobile-layout #market { width:100%; height:auto; min-height:0; overflow:visible; }
body:not(.workspace-disabled):not(.legacy-layout).mobile-layout #market-header { max-height:none; overflow:visible; }
body:not(.workspace-disabled):not(.legacy-layout).mobile-layout #market-table-container, body:not(.workspace-disabled):not(.legacy-layout).mobile-layout #goals-panel, body:not(.workspace-disabled):not(.legacy-layout).mobile-layout #data-panel { width:100%; max-height:none; overflow:visible; box-sizing:border-box; }
body:not(.workspace-disabled):not(.legacy-layout).mobile-layout #rest-dock { display:block !important; left:auto; right:calc(8px + var(--safe-right)); width:100px; bottom:calc(8px + var(--safe-bottom)); }
body:not(.workspace-disabled):not(.legacy-layout).mobile-layout #mobile-bottom-tabs { left:8px; right:116px; bottom:calc(8px + var(--safe-bottom)); height:48px; }
body:not(.workspace-disabled):not(.legacy-layout).mobile-layout #mobile-bottom-tabs .tab-button { min-width:0; font-size:11px; padding:4px; }
body:not(.workspace-disabled):not(.legacy-layout).mobile-layout { padding-bottom:calc(76px + var(--safe-bottom)); }
body:not(.workspace-disabled):not(.legacy-layout).mobile-layout #desktop-chat-log { display:none; }
body:not(.workspace-disabled):not(.legacy-layout).mobile-layout .tool-button { flex:1 1 60px; min-width:60px; }
body:not(.workspace-disabled):not(.legacy-layout).mobile-layout .farm-scenery { display:none; }
body:not(.workspace-disabled):not(.legacy-layout).mobile-layout #current-action button, body:not(.workspace-disabled):not(.legacy-layout).mobile-layout #current-action select { min-height:44px; max-width:100%; }
body:not(.workspace-disabled):not(.legacy-layout).mobile-layout #current-action .market-insight-head { flex-wrap:wrap; }
body:not(.workspace-disabled):not(.legacy-layout).mobile-layout #current-action .market-insight-title { overflow-wrap:anywhere; }
body:not(.workspace-disabled):not(.legacy-layout).mobile-layout #current-action details[open] { position:relative; }
@media (max-width:360px) { body:not(.workspace-disabled):not(.legacy-layout).mobile-layout #mobile-bottom-tabs .tab-button { font-size:10px; } }

body:not(.workspace-disabled):not(.legacy-layout) #grid-container { max-width:none; max-height:none; width:var(--grid-size); height:var(--grid-size); }

body:not(.workspace-disabled):not(.legacy-layout) #farm-notes #guidance-panel { margin:0; padding:4px; }
body:not(.workspace-disabled):not(.legacy-layout) #farm-notes details { position:relative; }
body:not(.workspace-disabled):not(.legacy-layout) #farm-notes details[open] > .farm-note-content,
body:not(.workspace-disabled):not(.legacy-layout) #farm-notes details[open] > p { position:absolute; z-index:90; background:var(--theme-surface); color:var(--theme-text); padding:10px; width:min(320px,70vw); box-sizing:border-box; bottom:100%; left:0; box-shadow:1px 1px 4px #333; }
body:not(.workspace-disabled):not(.legacy-layout) .active-tool-summary { margin:4px 0; font-size:12px; }
body:not(.workspace-disabled):not(.legacy-layout) #messages-history-panel { position:fixed; inset:100px 12px 75px; z-index:100; max-width:600px; margin:auto; }

body:not(.workspace-disabled):not(.legacy-layout) #hud-profile-panel { height:96px; box-sizing:border-box; }
body:not(.workspace-disabled):not(.legacy-layout) .hud-profile-avatar.buy-mode-avatar { width:64px; height:64px; margin:0; }
body:not(.workspace-disabled):not(.legacy-layout) #desktop-chat-log { margin:0 0 6px; padding:0 6px; height:22px; min-height:22px; max-height:22px; box-sizing:border-box; }
body:not(.workspace-disabled):not(.legacy-layout).mobile-layout #hud-profile-panel { height:126px; }
body:not(.workspace-disabled):not(.legacy-layout).mobile-layout #market-insight-panel { display:block; }
body:not(.workspace-disabled):not(.legacy-layout).mobile-layout #current-action details[open] { position:fixed; inset:70px 12px 80px; z-index:200; overflow:auto; background:var(--theme-surface); padding:12px; box-shadow:0 0 0 100vmax #0007; }
body:not(.workspace-disabled):not(.legacy-layout).mobile-layout #current-action details[open] > summary { position:sticky; top:0; background:var(--theme-control-bg); padding:12px; }
body:not(.workspace-disabled):not(.legacy-layout).mobile-layout #current-action details[open] > summary::after { content:' - Close details'; }

body:not(.workspace-disabled):not(.legacy-layout) .data-compact-legend { height:62px; min-height:62px; overflow:auto; align-content:start; box-sizing:border-box; }
body:not(.workspace-disabled):not(.legacy-layout) .data-compact-legend .data-summary-card { flex:0 1 auto; }
body:not(.workspace-disabled):not(.legacy-layout).mobile-layout .player-xp-text { display:block; font-size:10px; }
body:not(.workspace-disabled):not(.legacy-layout).mobile-layout .player-xp-bar { display:block; width:50px; }
body:not(.workspace-disabled):not(.legacy-layout).mobile-layout #market-insight-panel-mobile-market { flex:none; }
body:not(.workspace-disabled):not(.legacy-layout).mobile-layout #market-insight-panel-mobile-market details[open] { position:fixed; inset:70px 12px 80px; z-index:200; overflow:auto; background:var(--theme-surface); padding:12px; box-shadow:0 0 0 100vmax #0007; }

