/* R18: one mobile header row, readable branding and device-aware app help. */
.r15-shell .r18-header-signout,.r15-shell .r18-drawer-tools{display:none}
.r15-shell .r18-app-help-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:12px}
.r15-shell .r18-app-help-actions button{font:inherit;font-size:.84rem;min-height:44px;padding:9px 13px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--ink);cursor:pointer}
.r15-shell .r18-app-help-actions button:hover{border-color:var(--brand);color:var(--brand)}
.r15-shell .r18-app-installed{padding:14px 16px;border:1px solid color-mix(in srgb,var(--brand) 25%,var(--line));border-radius:13px;background:color-mix(in srgb,var(--brand) 6%,var(--surface));color:var(--ink)}
.r15-shell .r16-app-status[data-r16-state=standalone],.r15-shell .r16-app-status[data-r16-state=confirmed],.r15-shell .r16-app-status[data-r16-state=related],.r15-shell .r16-app-status[data-r16-state=remembered]{border-color:var(--brand)}
@media(max-width:1023px){
 body.r15-shell{--header:66px}
 .r15-shell .r15-topbar{height:var(--header);display:block;padding:0}
 .r15-shell .topbar-inner{display:flex;flex-wrap:nowrap;align-items:center;height:100%;padding:0 14px;gap:10px!important}
 .r15-shell .r16-header-brand{flex:1 1 auto;min-width:0;gap:9px}
 .r15-shell .r15-brand{display:flex;flex:0 1 auto;min-width:0;gap:8px}
 .r15-shell .r15-brand .brand-mark{width:36px;height:36px;flex:0 0 36px;border-radius:10px;padding:3px}
 .r15-shell .r15-brand .brand-word{display:block;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:1rem;line-height:1.25;letter-spacing:-.025em}
 .r15-shell .r15-brand .brand-word small{display:none}
 .r15-shell .r15-top-actions{flex:0 0 auto;min-width:0;gap:7px!important}
 .r15-shell .r15-menu-toggle,.r15-shell .r15-header-bell{display:inline-flex;width:42px;height:44px;min-width:42px;min-height:44px}
 .r15-shell.public-layout .r15-header-bell{display:inline-flex}
 .r15-shell .r15-top-actions>.login-link{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:8px 12px;border:1px solid var(--brand);border-radius:11px;background:var(--brand);color:#fff;font-size:.81rem;font-weight:750;text-decoration:none;white-space:nowrap}
 .r15-shell .r15-top-actions>.signup-btn,.r15-shell .r15-top-actions>.theme-toggle,.r15-shell .r15-mobile-utilities{display:none!important}
 .r15-shell .r18-header-signout{display:block;margin:0;flex:0 0 auto}
 .r15-shell .r18-header-signout button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;width:auto;margin:0;padding:8px 10px;border:1px solid var(--line);border-radius:11px;background:var(--surface);color:var(--ink);font:inherit;font-size:.78rem;font-weight:750;white-space:nowrap;cursor:pointer}
 .r15-shell .r18-header-signout button:hover{color:var(--brand);border-color:var(--brand)}
 .r15-shell .r18-header-signout button span{display:inline}
 .r15-shell .r18-header-signout .em-icon{width:17px;height:17px;flex:0 0 17px}
 .r15-shell .r18-drawer-tools{display:flex;flex:0 0 auto;align-items:center;gap:8px;padding:0 0 14px;margin:0 0 13px;border-bottom:1px solid var(--r15-nav-line)}
 body.r15-shell .r15-sidebar .r18-drawer-tools .r15-language-switch,body.r15-shell .r15-sidebar .r18-drawer-theme{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:44px;flex:1 1 0;margin:0;padding:8px;border:1px solid var(--r15-nav-line);border-radius:10px;background:var(--r15-nav-hover);color:var(--r15-nav-ink)!important;font:inherit;font-size:.72rem;font-weight:750;white-space:nowrap;cursor:pointer}
 body.r15-shell .r15-sidebar .r18-drawer-tools .r15-language-globe{color:var(--r15-nav-ink)}
 .r15-shell .r18-drawer-theme .em-icon{width:17px;height:17px;flex:0 0 17px}
 body.r15-shell .r15-sidebar .r18-drawer-tools .r15-language-switch:hover,body.r15-shell .r15-sidebar .r18-drawer-theme:hover{background:var(--r15-nav-active);border-color:var(--r15-nav-active-ink)}
}
@media(max-width:650px){
 .r15-shell .r15-top-actions>.r15-panel-return,.r15-shell .r15-top-actions>.r15-account-menu{display:none}
 .r15-shell .r15-topbar .topbar-inner{padding:0 9px;gap:7px!important}
 .r15-shell .r16-header-brand{gap:7px}
 .r15-shell .r15-brand{gap:6px}
 .r15-shell .r15-top-actions{gap:4px!important}
 .r15-shell .r15-topbar .r15-menu-toggle,.r15-shell .r15-topbar .r15-header-bell{width:38px;min-width:38px;height:44px;min-height:44px}
 .r15-shell .r15-brand .brand-mark{width:32px;height:32px;flex-basis:32px}
 .r15-shell .r15-brand .brand-word{font-size:.95rem}
 .r15-shell .r18-header-signout button{padding:8px;font-size:.75rem}
 .r15-shell .r18-header-signout .em-icon{display:none}
}
/* Apply before deferred JS runs when the app is already open in its own window. */
@media(display-mode:standalone),(display-mode:minimal-ui),(display-mode:window-controls-overlay){
 .r15-topbar a[href="/install"],.r15-sidebar a[href="/install"],.em-footer a[href="/install"],.r15-panel-footer a[href="/install"],
 [data-r18-app-promotion],[data-r16-app-install],[data-r18-app-remember],[data-r18-app-reset]{display:none!important}
}
@media print{.r15-shell .r18-drawer-tools,.r15-shell .r18-header-signout{display:none!important}}
