/* R3H compact portal shell; R3F design tokens and app routes remain intact. */
html, body { max-width: 100%; overflow-x: clip; }
body.admin { --jdw-rail-width: 54px; }
.admin .topbar { height: 52px; padding-right: 20px; }
.workspace-main {
  width: auto; max-width: 1280px; min-width: 0;
  margin: 0 64px 0 190px; padding: 15px 21px 25px;
}
.admin .footer { max-width: 1280px; margin-right: 64px; padding: 8px 14px 12px; }
.sidebar { padding-top: 14px; padding-bottom: 11px; }
.side-brand { margin-bottom: 16px; }
.side-caption { margin-bottom: 5px; }
.projects-caption { margin-top: 13px; }
.external-caption { margin-top: 11px; }
.side-nav { gap: 2px; }
.side-link { height: 33px; }
.side-project { height: 29px; }
.side-bottom { padding-top: 10px; }
.page-heading { align-items: center; margin-bottom: 10px; }
.page-heading h1 { font-size: 22px; margin: 2px 0 1px; }
.page-heading p { line-height: 1.35; }
.eyebrow { font-size: 9px; letter-spacing: 1.2px; }
.overview-banner { min-height: 92px; padding: 15px 20px; border-radius: 11px; }
.overview-banner h2 { font-size: 19px; margin: 4px 0 2px; }
.overview-banner p { line-height: 1.3; }
.overview-art { font-size: 48px; }
.home-context { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 10px; color: #6e899b; padding: 7px 2px 0; }
.home-context > span:last-child { margin-left: auto; color: #8499a9; }
.section-head { margin: 12px 0 7px; }
.section-apps { margin-top: 10px; }
.section-head h2 { margin-top: 2px; font-size: 17px; }
.section-head > p { font-size: 10px; }
.private-strip { margin-bottom: 9px; gap: 8px; }
.private-app { min-height: 58px; padding: 8px 11px; gap: 9px; }
.private-app strong { margin-bottom: 2px; }
.app-icon { width: 34px; height: 34px; font-size: 20px; border-radius: 10px; }
.search-toolbar { margin-bottom: 8px; padding: 5px 8px 5px 10px; gap: 8px; }
.search-toolbar input { padding: 7px 9px; min-height: 33px; }
.toolbar-link { padding: 7px 8px 7px 12px; }
.apps-grid { gap: 8px; }
.app-row { min-height: 64px; padding: 9px 11px; gap: 9px; }
.app-copy strong { margin-bottom: 2px; }
.tag { font-size: 9px; padding: 3px 6px; }
.bottom-note { margin-top: 8px; padding: 9px 12px; gap: 8px; }
.bottom-note span { line-height: 1.3; }
.studio-lead { min-height: 83px; padding: 13px 17px; margin-bottom: 9px; }
.studio-lead h2 { margin: 3px 0 3px; font-size: 18px; }
.studio-mark { font-size: 42px; }
.studio-tabs { margin-bottom: 8px; }
.studio-tab { padding: 9px 13px; }
.studio-panel { padding: 13px 15px; min-height: 0; }
.studio-filter { margin: 10px 0; gap: 8px; }
.studio-filter input { padding: 7px 10px; min-height: 33px; }
.studio-chip { padding: 6px 10px; }
.emoji-grid { gap: 6px; }
.emoji-tile { min-height: 67px; padding: 8px 2px 6px; gap: 5px; }
.emoji-symbol { font-size: 23px; }
.studio-feedback { margin-top: 8px; }
.studio-steps, .template-grid { margin: 11px 0; }
.studio-steps > div { padding: 11px; gap: 6px; }
.studio-note { padding: 10px 12px; }
.link-manager { padding: 13px 15px; }
.link-manager-heading { margin-bottom: 9px; }
.link-manager-heading h2 { font-size: 17px; }
.link-manager-fixed, .link-manager-row { min-height: 49px; padding: 7px 9px; }
.link-manager-row input[type=url] { padding: 7px 9px; min-height: 34px; }
.link-manager-row .mini-button { padding: 8px 12px; }
.link-manager-footnote { padding: 9px 11px; }
.security-overview { margin-bottom: 9px; }
.security-overview > div { padding: 10px 14px; }
.security-overview small { margin-bottom: 3px; }
.security-overview strong { font-size: 15px; }
.security-grid { gap: 9px; }
.panel { padding: 13px 15px; }
.panel-heading { margin-bottom: 9px; }
.detail-list { gap: 9px; }
.panel-footnote { margin-top: 10px; padding: 9px; }
.device-row { padding: 8px 0; }
.admin-mini-nav { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin-bottom: 9px; }
.admin-mini-nav > * { min-width: 0; display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--border); background: #fff; border-radius: 9px; padding: 10px 12px; }
.admin-mini-nav a:hover { background: #f5fbfd; border-color: #b3d5dd; }
.admin-mini-nav strong { color: #294c64; font-size: 12px; }
.admin-mini-nav small { color: #8499aa; font-size: 10px; }
.admin-mini-nav > span { background: #f9fbfc; }

/* Authentication/session moves into a real top-right MY menu. */
.account-menu { position: relative; white-space: nowrap; }
.account-menu > summary { list-style: none; min-height: 35px; display: flex; gap: 8px; align-items: center; padding: 0 10px; color: #31556b; background: #f4f9fc; border: 1px solid #d9e5ee; border-radius: 8px; cursor: pointer; font-size: 11px; }
.account-menu > summary::-webkit-details-marker { display: none; }
.account-menu > summary strong { font-size: 12px; color: #143954; }
.account-menu > summary > span:last-child { color: #7c9cae; }
.account-menu[open] > summary { background: #eaf5fa; border-color: #99c1d1; }
.account-menu .top-session { min-width: 73px; text-align: right; color: #598097; font-variant-numeric: tabular-nums; }
.top-session.session-warning { color: #b75e42; font-weight: 750; }
.account-popover { position: absolute; top: calc(100% + 7px); right: 0; z-index: 60; width: 258px; max-width: calc(100vw - 20px); border: 1px solid #d5e4ec; border-radius: 12px; background: #fff; box-shadow: 0 12px 35px #1938512d; padding: 7px; }
.account-intro { display: flex; flex-direction: column; gap: 4px; padding: 10px 9px 12px; border-bottom: 1px solid #e4edf3; margin-bottom: 4px; }
.account-intro strong { font-size: 13px; color: #214963; }
.account-intro small { font-size: 10px; color: #8195a8; }
.account-popover > a { display: block; padding: 10px 9px; border-radius: 7px; color: #496e84; font-size: 12px; }
.account-popover > a:hover { background: #eff7fb; }
.account-popover .logout-form { border-top: 1px solid #e8eef3; padding: 7px 3px 2px; }
.account-popover .logout-button { display: block; text-align: left; width: 100%; border: 0; padding: 9px 7px; }

/* Independent, fixed tools; opening a drawer never increases document width. */
.jdw-quick-rail { position: fixed; right: 0; top: 39%; z-index: 43; width: 50px; display: flex; flex-direction: column; background: white; border: 1px solid #d6e4ec; border-right: 0; border-radius: 11px 0 0 11px; box-shadow: 0 5px 18px #15385112; overflow: hidden; }
.jdw-quick-rail button { border: 0; min-height: 52px; width: 100%; padding: 8px 2px; background: white; color: #2f617b; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 1px; }
.jdw-quick-rail button + button { border-top: 1px solid #e5eef3; }
.jdw-quick-rail button > span { font-size: 18px; }
.jdw-quick-rail button > strong { font-size: 10px; }
.jdw-quick-rail button:hover, .jdw-quick-rail button[aria-expanded=true] { background: #e8f5f9; color: #164a65; }
.jdw-drawer-backdrop { position: fixed; inset: 0; z-index: 44; background: #0f2d446b; }
.jdw-right-drawer { position: fixed; z-index: 45; top: 0; right: 0; bottom: 0; height: 100dvh; width: min(410px, calc(100vw - 16px)); background: #fff; border-left: 1px solid #cfdee8; box-shadow: -12px 0 40px #0d26383d; overflow-x: hidden; overflow-y: auto; transform: translateX(100%); transition: transform .22s ease; padding: 0 18px 25px; }
.jdw-right-drawer.is-open { transform: translateX(0); }
.jdw-drawer-header { position: sticky; top: 0; z-index: 1; background: #fff; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e0eaf0; padding: 17px 0 12px; gap: 12px; }
.jdw-drawer-header h2 { margin: 3px 0 0; color: #22465c; font-size: 20px; }
.jdw-drawer-actions { display: flex; align-items: center; gap: 5px; }
.jdw-drawer-actions > button:not(.jdw-drawer-close) { background: #f1f6f9; color: #5d7b90; font-weight: 750; font-size: 11px; border: 1px solid #dbe7ed; border-radius: 7px; height: 31px; min-width: 40px; }
.jdw-drawer-actions > button[aria-expanded=true] { background: #1f5c76; color: #fff; border-color: #1f5c76; }
.jdw-drawer-close { width: 36px; height: 36px; border: 1px solid #d9e5ec; border-radius: 8px; background: #f7fafc; font-size: 22px; color: #557387; }
body.jdw-drawer-active { overflow: hidden; }
.jdw-drawer-lead { font-size: 12px; margin: 13px 0; color: #7891a3; }
.jdw-quick-links { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.jdw-quick-links a { min-width: 0; min-height: 80px; padding: 12px 10px; display: grid; grid-template-columns: 28px minmax(0,1fr); gap: 3px 5px; align-items: center; border: 1px solid #dce6ee; border-radius: 10px; }
.jdw-quick-links a:hover { background: #f2fafc; border-color: #9cc6d0; }
.jdw-quick-links a > span { font-size: 19px; grid-row: span 2; }
.jdw-quick-links strong { color: #284b62; font-size: 12px; white-space: nowrap; }
.jdw-quick-links small { color: #879cab; font-size: 10px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.jdw-drawer-note { background: #f3f8fb; color: #708ca1; font-size: 11px; border-radius: 8px; padding: 10px 12px; margin-top: 13px; }
.jdw-360-current { border: 1px solid #d8e5ed; border-radius: 10px; padding: 13px; display: flex; flex-direction: column; gap: 5px; }
.jdw-360-current small { font-size: 10px; color: #8ba1af; }
.jdw-360-current strong { font-size: 17px; color: #234a65; }
.jdw-360-current span { font-size: 11px; color: #6c8aa0; }
.jdw-drawer-subtitle { margin: 16px 0 7px; color: #28506a; font-size: 13px; }
.jdw-360-list { border: 1px solid #dde8ef; border-radius: 10px; overflow: hidden; }
.jdw-360-list a { display: flex; gap: 9px; align-items: center; padding: 10px 11px; }
.jdw-360-list a + a { border-top: 1px solid #eaf0f4; }
.jdw-360-list a:hover { background: #f7fbfd; }
.jdw-360-list a > span { color: #5294aa; font-size: 13px; }
.jdw-360-list a > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.jdw-360-list strong { color: #315a71; font-size: 12px; }
.jdw-360-list small { color: #90a1ac; font-size: 10px; }
.jdw-360-list b { color: #64849a; background: #eef4f7; border-radius: 10px; padding: 3px 6px; font-size: 9px; white-space: nowrap; }

@media (max-width: 1100px) {
  .workspace-main { margin-left: 190px; margin-right: 55px; padding-left: 16px; padding-right: 15px; }
  .admin .footer { margin-right: 55px; }
  .apps-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .section-head > p { max-width: 50%; text-align: right; }
}
@media (max-width: 760px) {
  .workspace-main { margin-left: 160px; margin-right: 48px; padding: 13px 12px 23px; }
  .admin .footer { margin-right: 48px; }
  .apps-grid, .private-strip { grid-template-columns: 1fr; }
  .admin-mini-nav { grid-template-columns: 1fr; }
  .account-menu .top-session { min-width: 0; }
  .jdw-quick-rail { width: 44px; }
  .jdw-quick-rail button { min-height: 47px; }
}
@media (max-width: 580px) {
  .workspace-main { margin: 0; padding: 12px 12px 24px; }
  .admin .footer { margin: 0; padding-right: 50px; }
  .admin .topbar { padding: 0 11px; }
  .mobile-nav { display: none; }
  .account-menu > summary { padding: 0 7px; gap: 5px; }
  .account-popover { right: 0; }
  .page-heading { margin-bottom: 9px; }
  .page-heading h1 { font-size: 21px; }
  .overview-banner { min-height: 84px; padding: 12px 15px; }
  .overview-banner h2 { font-size: 17px; }
  .overview-banner p { font-size: 10px; }
  .home-context > span:last-child { display: none; }
  .section-head { gap: 4px; }
  .section-head > p { max-width: none; text-align: left; }
  .private-strip { gap: 7px; }
  .private-app { min-height: 62px; }
  .apps-grid { grid-template-columns: 1fr; }
  .app-row { min-height: 60px; }
  .tag { max-width: 95px; overflow: hidden; text-overflow: ellipsis; }
  .jdw-quick-rail { top: auto; bottom: 92px; width: 43px; }
  .jdw-quick-rail button { min-height: 44px; }
  .jdw-right-drawer { width: min(410px, calc(100vw - 8px)); padding: 0 14px 18px; }
  .studio-panel { padding: 11px; }
  .emoji-grid { gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .jdw-right-drawer { transition: none; }
}
