/* Mobile reader chrome: two balanced rails, a compact header and a calm story. */
.reader-story-arrowbar,.reader-story-scrim,.reader-rail-caption,.reader-feed-arrows{display:none}
@media(max-width:760px){
 html[data-reader-skin] body.real-mode{--header:108px;--mobile-rail:52px}
 html[data-reader-skin] body.real-mode .topbar{grid-template-columns:repeat(6,minmax(44px,1fr));grid-template-rows:56px 44px;height:var(--header);padding:4px 6px;gap:0}
 html[data-reader-skin] body.real-mode .topbar>.brand-identity{grid-column:1/4;grid-row:1;max-width:205px;height:54px}
 html[data-reader-skin] body.real-mode .topbar .brand-identity .brand{height:54px}
 html[data-reader-skin] body.real-mode .topbar>.header-intelligence{grid-column:4/6;grid-row:1;width:52px;max-width:52px;height:44px}
 html[data-reader-skin] body.real-mode .topbar>.account-menu{grid-column:6;grid-row:1}
 html[data-reader-skin] body.real-mode .topbar>.reader-tools>[data-text-size=decrease]{grid-column:3;grid-row:2}
 html[data-reader-skin] body.real-mode .topbar>.reader-tools>[data-text-size=increase]{grid-column:4;grid-row:2}
 html[data-reader-skin] body.real-mode .topbar>.mobile-search{grid-column:5;grid-row:2}
 html[data-reader-skin] body.real-mode .topbar>.reader-appearance{grid-column:6;grid-row:2}
 .real-mode .mobile-rail-visibility{width:52px;min-height:58px;flex-direction:column;gap:2px}
 .real-mode .mobile-rail-visibility>span{position:static;width:auto;height:auto;clip-path:none;overflow:visible;font:calc(10px * var(--ui-text-scale,1))/1.1 system-ui,sans-serif;color:var(--muted)}
 .real-mode .sidebar{top:calc(var(--header) + 58px)}
 .real-mode .sidebar{width:52px}
 .real-mode .sidebar.open{width:min(300px,90vw)}
 .real-mode .sidebar:not(.open) :is(nav button,nav a,.sidebar-bottom>button){display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;width:52px;height:auto;min-height:58px;padding:3px 1px;line-height:1.1;text-align:center}
 .real-mode .sidebar:not(.open) :is(nav button,nav a,.sidebar-bottom>button) svg{width:20px;height:20px;flex:none}
 .real-mode .sidebar:not(.open) .reader-rail-caption{display:block;max-width:50px;font:calc(9.5px * var(--ui-text-scale,1))/1.12 system-ui,sans-serif;letter-spacing:-.02em;color:inherit;overflow-wrap:normal;word-break:normal;hyphens:none}
 .real-mode .sidebar:not(.open) .mobile-rail-tools :is([data-action=menu],.mobile-plus-shortcut){width:52px;min-height:58px;height:auto;gap:3px}
 .real-mode .sidebar:not(.open) .mobile-rail-tools :is([data-action=menu],.mobile-plus-shortcut)>span{font:calc(9.5px * var(--ui-text-scale,1))/1.12 system-ui,sans-serif;white-space:nowrap}
 .real-mode .mobile-rail-visibility{width:52px}
 .real-mode .mobile-install-shortcut{width:52px}
 body.real-mode>#reader-market-rail{width:52px}
 body.real-mode>#reader-market-rail .market-mobile-minimize{width:52px;min-height:58px;flex:0 0 58px;flex-direction:column;gap:2px;padding:3px 1px}
 body.real-mode>#reader-market-rail .reader-side-shortcuts button{width:52px;min-width:52px;min-height:58px}
 body.real-mode>#reader-market-rail .market-icon-list .market-icon{width:52px;min-width:52px;height:58px;min-height:58px;max-height:none;flex:0 0 58px}
 body.real-mode>#reader-market-rail :is(.reader-side-shortcuts button,.market-icon-list button){display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:3px 1px}
 body.real-mode>#reader-market-rail .reader-rail-caption{display:block;max-width:50px;font:calc(9.5px * var(--ui-text-scale,1))/1.1 system-ui,sans-serif;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 body.real-mode>#reader-market-rail .market-icon-list img{width:23px;height:23px;flex:none}
 body.real-mode .sidebar:not(.open) .mobile-install-shortcut>span{display:block;max-width:50px;font:calc(9.5px * var(--ui-text-scale,1))/1.1 system-ui,sans-serif;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 body.real-mode .sidebar:not(.open) .mobile-install-shortcut{flex-direction:column;gap:2px;align-items:center;justify-content:center;width:52px}
 body.real-mode #right-panel.open[data-panel=markets] .market-quote-scroll{max-width:100%;overflow-x:auto}
 body.real-mode #right-panel.open[data-panel=markets] .market-quote-scroll iframe.market-compact-frame{display:block;min-width:0;width:100%;max-width:100%;height:780px}
 /* Once the feed itself is being read, leave only two small return arrows. */
 body.real-mode.reader-feed-scrolling .terminal{padding-left:0}
 body.real-mode.reader-feed-scrolling #main-panel{padding-right:0!important}
 body.real-mode.reader-feed-scrolling .feed-controls,body.real-mode.reader-feed-scrolling .feed-controls>.toolbar{position:static}
 body.real-mode.reader-feed-scrolling .sidebar:not(.open),body.real-mode.reader-feed-scrolling .mobile-rail-visibility,body.real-mode.reader-feed-scrolling>#reader-market-rail{visibility:hidden;pointer-events:none}
 body.real-mode.reader-feed-scrolling .reader-feed-arrows{display:flex;position:fixed;top:var(--header);left:0;right:0;z-index:54;justify-content:space-between;pointer-events:none;background:var(--panel);border-bottom:1px solid var(--line)}
 body.real-mode.reader-feed-scrolling .reader-feed-arrows button{display:grid;place-items:center;width:52px;height:44px;pointer-events:auto;border:1px solid var(--line);background:var(--panel);color:var(--blue);font:26px/1 system-ui,sans-serif}
 /* The Help action owns its own row; labels can wrap inside the tile. */
 html[data-reader-skin] body.real-mode .launcher-grid{grid-auto-rows:minmax(var(--launcher-cell,148px),auto);gap:6px;padding:8px}
 html[data-reader-skin] body.real-mode .launcher-entry{display:grid;grid-template-rows:minmax(100px,auto) 44px;align-content:start;gap:4px;min-height:148px}
 html[data-reader-skin] body.real-mode .launcher-entry>.launcher-tile{display:flex;flex:initial;min-height:100px;width:100%;padding:6px 2px;justify-content:center;gap:5px}
 html[data-reader-skin] body.real-mode .launcher-entry>.launcher-help{height:44px;min-height:44px;padding:2px;align-self:end}
 html[data-reader-skin] body.real-mode .launcher-label{max-width:100%;line-height:1.2;overflow:visible;overflow-wrap:normal;word-break:normal;hyphens:none}
 html[data-reader-skin] body.real-mode .launcher-glyph{width:min(var(--launcher-icon,40px),40px);height:min(var(--launcher-icon,40px),40px)}
 /* Story reading takes the whole canvas; arrows explicitly restore each side. */
 body.real-mode:has(#right-panel.open[data-panel=story]) .sidebar:not(.story-side-open){visibility:hidden;pointer-events:none}
 body.real-mode #right-panel.open[data-panel=story]>.panel-controls{display:flex;flex-direction:column;flex:none;overflow:visible}
 body.real-mode #right-panel.open[data-panel=story] .reader-story-arrowbar{display:flex;align-items:center;justify-content:space-between;min-height:44px;border-bottom:1px solid var(--line);background:var(--panel)}
 body.real-mode #right-panel.open[data-panel=story] .reader-story-arrowbar button{display:grid;place-items:center;min-width:52px;min-height:44px;color:var(--blue);font:26px/1 system-ui,sans-serif}
 html[data-reader-skin] body.real-mode #right-panel.open[data-panel=story] .reader-panel-workspace{min-height:0;flex:1}
 body.real-mode:has(#right-panel.open[data-panel=story]):not(.story-market-hidden)>#reader-market-rail[data-market-view=mini]{visibility:visible;pointer-events:auto}
 .reader-story-scrim:not([hidden]){display:block;position:fixed;inset:var(--header) 0 0;z-index:118;background:#0009}
 body.real-mode .sidebar.open.story-side-open{display:flex;visibility:visible;pointer-events:auto;top:var(--header);left:0;right:auto;width:min(300px,90vw);padding:8px 8px calc(56px + env(safe-area-inset-bottom,0px));z-index:119;contain:none;overflow-y:auto}
 body.real-mode .sidebar.open.story-side-open :is(nav button,nav a,.sidebar-bottom>button){min-width:0;width:100%;white-space:normal;overflow-wrap:normal;word-break:normal}
 body.real-mode .sidebar.open.story-side-open .reader-rail-caption{display:none}
 body.real-mode .sidebar.open.story-side-open .mobile-install-shortcut{width:min(300px,90vw);z-index:120}
}

/* All four mobile workspaces share one full-height frame and tab geometry. */
@media(max-width:760px){
 html[data-reader-skin] body.real-mode .terminal>#right-panel.open{top:var(--header);bottom:0;left:0;right:0;width:100%;height:auto;max-width:none;border-top:0;box-shadow:none;background:var(--panel)}
 html[data-reader-skin] body.real-mode #right-panel.open>.panel-controls{display:flex;flex-direction:column;background:var(--raised)}
 html[data-reader-skin] body.real-mode #right-panel.open .panel-tabs{display:grid;grid-template-columns:minmax(0,1.4fr) repeat(3,minmax(0,1fr)) 44px;grid-auto-rows:minmax(44px,auto);width:100%;height:auto;min-height:44px;padding:0 3px;gap:0}
 html[data-reader-skin] body.real-mode #right-panel.open .panel-tabs>[data-panel]{grid-column:auto;grid-row:1;display:flex;align-items:center;justify-content:center;min-width:0;min-height:44px;height:auto;padding:4px 2px;font-size:calc(10px * var(--ui-text-scale,1));line-height:1.18;white-space:normal;overflow-wrap:normal;word-break:normal;text-align:center}
 html[data-reader-skin] body.real-mode #right-panel.open .panel-tabs>.panel-close{grid-column:5;grid-row:1;width:44px;min-height:44px;height:auto;margin:0}
 html[data-reader-skin] body.real-mode #right-panel.open #panel-content{background:var(--bg)}
 body.real-mode #right-panel.open[data-panel=story] .reader-story-arrowbar{height:44px;min-height:44px;border-top:1px solid var(--line);border-bottom:0}
 body.real-mode #right-panel.open[data-panel=story] .reader-story-arrowbar button{width:52px;min-height:44px}
 body.real-mode #right-panel.open[data-panel=story] .story-reporting :is(.story-back,.story-close){display:none}
 body.real-mode #right-panel.open[data-panel=story] .story-reporting .detail-top{justify-content:center;min-height:44px;padding:0 8px;gap:8px;border-bottom:1px solid var(--line)}
 body.real-mode .topbar>.search-wrap.open{display:flex;position:fixed;top:var(--header);left:var(--mobile-rail);right:var(--mobile-rail);width:auto;min-width:0;max-width:none;height:48px;margin:0;padding:0 10px;z-index:90;border-radius:0;border:1px solid var(--blue);background:var(--panel);box-shadow:0 4px 14px #0006}
 body.real-mode .topbar>.search-wrap.open input{min-width:0;width:100%;font-size:calc(16px * var(--ui-text-scale,1));text-overflow:ellipsis}
 body.real-mode .topbar>.search-wrap.open kbd{display:none}
}
@media(max-width:375px){
 html[data-reader-skin] body.real-mode #right-panel.open .panel-tabs{grid-template-columns:minmax(0,1.4fr) minmax(0,1fr) 44px;grid-auto-rows:minmax(44px,auto)}
 html[data-reader-skin] body.real-mode #right-panel.open .panel-tabs>[data-panel]:nth-child(-n+2){grid-row:1}
 html[data-reader-skin] body.real-mode #right-panel.open .panel-tabs>[data-panel]:nth-child(n+3){grid-row:2}
 html[data-reader-skin] body.real-mode #right-panel.open .panel-tabs>.panel-close{grid-column:3;grid-row:1/3}
}

@media(max-width:760px){
 body.real-mode:has(#right-panel.open[data-panel=story]):not(.story-market-hidden) #right-panel{right:52px;width:calc(100% - 52px)}
}
