  /* ---- the shell: the rail, the main column, the places, the group switcher, the title bar, the widths, a module's side ---- */
  #app { display: flex; height: 100vh; height: 100dvh; }
  /* ---- the rail (left) ---- */
  #rail { flex: none; background: var(--rail); display: flex; flex-direction: column; }
  .brand { padding: 0 10px 30px; }
  .brand .logo { font-family: var(--display); font-style: italic; font-size: 25px; font-weight: 500; letter-spacing: -0.01em; color: var(--ink); }
  /* ---- main column ---- */
  #main { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; }
  #scroller { flex: 1; overflow-y: auto; position: relative; }
  #mainInner { max-width: 720px; margin: 0 auto; padding: 54px 32px 32px; }
  #pageFoot { flex: none; padding: 0 32px; }
  body.project-open #pageFoot { padding: 12px 32px calc(24px + env(safe-area-inset-bottom)); background: linear-gradient(to bottom, transparent, var(--paper) 30%); }
  /* the right column's switch (Today · Chat; a module's side with kit 4), at the top of whichever the column shows */
  #sideSwitchWrap[hidden] { display: none; }
  #sideSwitch { display: flex; gap: 4px; padding: 4px; background: var(--paper); border: var(--bw) var(--bs) var(--line); border-radius: var(--r-lg); }
  #sideSwitch button { flex: 1 1 0; min-width: 0; min-height: 36px; border: 0; background: none; border-radius: var(--r-md); font: inherit; font-size: 13.5px; color: var(--ink-soft); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 4px 10px; }
  #sideSwitch button:hover { color: var(--ink); background: var(--hover-wash); }
  #sideSwitch button[aria-pressed="true"] { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-field); }
  /* the old top bar for narrow windows and phones, hidden (#topbar): the menu on the left, Today on the right. */
  #topbar { display: none; }
  .icon-btn { background: none; border: var(--bw) var(--bs) var(--field-border); border-radius: var(--r-md); min-width: 44px; min-height: 44px; padding: 0 12px; font-size: 15px; color: var(--ink-soft); }
  .icon-btn:hover { background: var(--hover-wash-strong); color: var(--ink); }
  #topTitle { flex: 1; text-align: center; font-family: var(--display); font-style: italic; font-size: 19px; color: var(--ink); }
  @media (max-width: 600px) {
    /* "body" so it outranks the base .drawer-head rule further down, which would reset the top inset. */
    body .drawer-head { padding-top: calc(16px + env(safe-area-inset-top)); }
  }
  @media (pointer: coarse) {
    .nav-item, .icon-btn { min-height: 44px; }
  }
  /* the blocks; one in the right panel keeps its look; an empty Modules shows its note while editing. */
  .nav-block { display: flex; flex-direction: column; gap: 3px; }
  .nav-block[hidden] { display: none; }
  .brand .group-name { margin: 0; font-size: 25px; overflow-wrap: anywhere; }
  /* the scrim behind the side panels and sheets, and the panels' heads */
  #drawerScrim { position: fixed; inset: 0; background: var(--scrim); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 20; }
  body.connect-open #drawerScrim { opacity: 1; pointer-events: auto; }
  .drawer-head { position: sticky; top: 0; background: var(--paper); z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; padding: 22px 22px 14px; border-bottom: var(--bw) var(--bs) var(--line); box-shadow: var(--titlebar-paper); }
  .drawer-head h1 { font-family: var(--display); font-weight: 500; font-size: 24px; margin: 0; }
  .drawer-head .sub { font-size: 11.5px; color: var(--muted); margin-top: 4px; line-height: 1.45; }
  .nav, #rail, #connectPanel, #todayPanel, #scroller { overscroll-behavior: contain; }
  @media (max-width: 1100px) {
    #topbar { display: flex; align-items: center; gap: 8px; padding: calc(8px + env(safe-area-inset-top)) 12px 8px; border-bottom: var(--bw) var(--bs) var(--line); background: var(--paper); }
    #menuBtn { visibility: hidden; }
    body:not(.today-on) #todayBtn { visibility: hidden; }
  }
  @media (max-width: 820px) {
    #menuBtn { visibility: visible; }
    .nav-item { min-height: 44px; }
    #mainInner, #chatInner { padding: 22px 16px 24px; }
    #pageFoot { padding-left: 16px; padding-right: 16px; }
    body.project-open #pageFoot { padding: 10px 16px calc(16px + env(safe-area-inset-bottom)); }
  }
  /* on a phone, a bar of five places at the bottom and the group switcher's shell at the top replace the two drawers.
     Today (the right panel) and You (the menu) are full-width pages between them, the right panel's sections as cards. */
  #groupSwitch, #places, #todayPageEmpty, .tp-slot[hidden] { display: none; }
  .gs-item { position: relative; flex: none; width: 36px; height: 36px; border-radius: var(--r-round); border: 2px solid var(--line-strong); background: var(--card); color: var(--ink); font-weight: 600; font-size: 14px; cursor: pointer; padding: 0; display: inline-grid; place-items: center; }
  .gs-item.g1 { border-color: var(--accent); } .gs-item.g2 { border-color: var(--ok-text); } .gs-item.g3 { border-color: var(--danger); }
  .gs-item.g4 { border-style: dashed; border-color: var(--accent); } .gs-item.g5 { border-style: dashed; border-color: var(--ok-text); }
  .gs-item[aria-current="true"] { background: var(--accent-soft); color: var(--accent-text); box-shadow: 0 0 0 2px var(--accent); }
  .gs-item img { display: block; width: 100%; height: 100%; border-radius: var(--r-round); object-fit: cover; }
  .gs-item.has-pic { background-size: cover; background-position: center; background-repeat: no-repeat; background-clip: padding-box; } /* the picture follows the inner curve */
  .gs-badge { position: absolute; top: -3px; right: -3px; width: 11px; height: 11px; border-radius: var(--r-round); background: var(--accent); border: 2px solid var(--paper); }
  /* who's on: a filled dot for Active, a ring for Away (the words say which too); on a group, someone else in it is on. */
  .on-dot { display: inline-block; flex: none; width: 10px; height: 10px; box-sizing: content-box; border-radius: var(--r-round); background: var(--status-active); border: 2px solid var(--paper); }
  .on-dot[data-on="away"] { background: var(--paper); box-shadow: inset 0 0 0 2px var(--status-away); }
  .gs-status { position: absolute; bottom: -2px; right: -2px; }
  .gs-pill .gs-status { bottom: -1px; right: auto; left: 25px; }
  .gs-badge[hidden], .gs-status[hidden], .on-dot[hidden] { display: none; }
  /* the five places, at every width; each width's block sets their size (a phone's bar along the bottom, the slim rail's column). */
  .place { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; background: none; color: var(--ink-soft); font: inherit; font-size: 11.5px; cursor: pointer; padding: 6px 2px; }
  .place svg { width: 22px; height: 22px; }
  .place[aria-current="page"] { color: var(--accent-text); font-weight: 600; }
  .place[aria-current="page"] svg { stroke-width: 2.3; }
  @media (max-width: 820px) {
    #app { padding-top: calc(var(--switch-h, 52px) + env(safe-area-inset-top)); padding-bottom: calc(var(--places-h, 60px) + env(safe-area-inset-bottom)); }
    #topbar { display: none; }
    #groupSwitch { display: flex; align-items: center; gap: 8px; position: fixed; top: 0; left: 0; right: 0; z-index: 23; min-height: calc(var(--switch-h, 52px) + env(safe-area-inset-top)); height: calc(var(--switch-h, 52px) + env(safe-area-inset-top)); padding: calc(7px + env(safe-area-inset-top)) 16px 7px; background: var(--paper); border-bottom: var(--bw) var(--bs) var(--line); overflow: visible; scrollbar-width: none; }
    #places { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 23; min-height: calc(var(--places-h, 60px) + env(safe-area-inset-bottom)); padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); background: var(--paper); border-top: var(--bw) var(--bs) var(--line); }
    .place { flex: 1; min-width: 0; min-height: 44px; }
    /* Today and You are pages, not slide-outs: no scrim, no slide, the whole width between the switcher and the bar. */
    #rail, body.today-on #todayPanel, #todayPanel { position: fixed; top: calc(var(--switch-h, 52px) + env(safe-area-inset-top)); bottom: calc(var(--places-h, 60px) + env(safe-area-inset-bottom)); left: 0; right: 0; width: auto; max-width: none; transform: none; box-shadow: none; border: 0; z-index: 21; overflow-y: auto; transition: none; visibility: hidden; }
    #rail { display: flex; padding: 18px 16px 24px; }
    body.rail-open #rail, body.today-open #todayPanel, body.today-on.today-open #todayPanel { visibility: visible; transform: none; transition: none; }
    body.rail-open #drawerScrim, body.today-open #drawerScrim { opacity: 0; pointer-events: none; }
  }
  #topCalChatBtn.has-new, #sideChatBtn.has-new { position: relative; }
  #topCalChatBtn.has-new::after { position: absolute; top: 4px; right: 4px; }
  #sideChatBtn.has-new::after { position: absolute; top: 3px; right: 3px; }
  .pull-refresh { position: fixed; z-index: 40; left: 50%; top: calc(var(--switch-h, 52px) + env(safe-area-inset-top) + 8px); transform: translateX(-50%); padding: 6px 14px; border-radius: var(--r-pill); background: var(--card); color: var(--ink); border: var(--bw) var(--bs) var(--line-strong); box-shadow: var(--shadow-panel); font-size: 13px; }
  .pull-refresh[hidden] { display: none; }
  @media (max-width: 820px) {
    #rail .brand, #groupTabs, #rail .group-links { display: none; }
    body.groups-sheet-open #drawerScrim { opacity: 1; pointer-events: auto; z-index: 24; }
    body.project-open #pageFoot { padding-bottom: 12px; }
  }
  /* a computer has one layout: a slim rail on the left (the groups and Your groups above, the five places below), the
     page in the middle, Today on the right from 1101px. You (the menu) and, when pressed, Today are pages in the middle
     (Today then takes the right too). */
  @media (min-width: 821px) {
    #app { padding-left: var(--slim-w, 76px); }
    #topbar { display: none; }
    #groupSwitch { display: flex; flex-direction: column; align-items: center; gap: 10px; position: fixed; top: 0; left: 0; bottom: 0; width: var(--slim-w, 76px); z-index: 23; padding: 16px 0 340px; overflow-y: auto; scrollbar-width: none; background: var(--rail); border-right: var(--bw) var(--bs) var(--line); }
    #places { display: flex; flex-direction: column; position: fixed; left: 0; bottom: 0; width: var(--slim-w, 76px); z-index: 24; padding: 8px 0 12px; }
    .place { flex: none; width: 100%; min-height: 60px; }
    .place:hover { background: var(--hover-wash); }
    #rail { position: fixed; top: var(--title-h); bottom: 0; left: var(--slim-w, 76px); right: 0; z-index: 21; visibility: hidden; overflow-y: auto; padding: 26px 40px 24px; background: var(--paper); }
    body.rail-open #rail { visibility: visible; transition: none; }
    #rail .brand, #groupTabs, #rail .group-links { display: none; }
    body.rail-open #drawerScrim, body.today-open #drawerScrim { opacity: 0; pointer-events: none; }
    body.groups-sheet-open #drawerScrim { opacity: 1; pointer-events: auto; z-index: 22; }
  }
  @media (min-width: 1101px) { body.today-on:not(.today-open) #rail { right: var(--side-width); } } /* You beside Today */
  /* a short window (a phone on its side, a short computer window): the five places are smaller
     (44px each) and the groups scroll in the room above them, so neither covers the other. */
  @media (min-width: 821px) and (max-height: 560px) {
    #places { padding: 4px 0 6px; }
    .place { min-height: 44px; gap: 1px; font-size: 10.5px; padding: 2px; }
    .place svg { width: 20px; height: 20px; }
    #groupSwitch { padding: 10px 0 0; bottom: 230px; border-bottom: var(--bw) var(--bs) var(--line); }
  }
  /* every page centered between the rail and the right column. Reading pages stop at 720px (#mainInner); You and the
     wide pages (body.page-wide, CC.pageWide) fill the middle up to 1600px (--page-max); Today pressed lays its cards in
     up to four columns of 300 to 440px, centered, no wider than that either (one column while its layout is edited).
     The right column is 360px, 420px from 1600px wide, whether it holds Today or Chat beside Today. */
  @media (min-width: 821px) {
    #rail > * { width: 100%; max-width: 1600px; margin-left: auto; margin-right: auto; } /* You a wide page */
    body.page-wide #mainInner { max-width: 1600px; }
  }
  /* the top bar. On a phone #groupSwitch holds the pill (the open group, or a + with no group), or Back and the page's
     title (shown once the page's own heading has scrolled away), and the place's actions at the right; the circles are
     the computer rail's (no Home, a + at the end). Modern's bars are frosted and its open place is a soft pill. Theme
     tokens only. */
  #topBack, #groupPill, .gs-title, .gs-actions { display: none; }
  .gs-pill { position: relative; flex: 0 1 auto; min-width: 0; max-width: 64%; min-height: 40px; display: inline-flex; align-items: center; gap: 8px; padding: 3px 12px 3px 3px; border: var(--bw) var(--bs) var(--line); border-radius: var(--r-pill); background: var(--card); color: var(--ink); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; box-shadow: var(--shadow-field); }
  .gs-mark { flex: none; width: 32px; height: 32px; border-radius: var(--r-round); border: 2px solid var(--line-strong); background: var(--card); color: var(--ink); font-weight: 600; font-size: 13px; display: inline-grid; place-items: center; overflow: hidden; }
  .gs-mark.g1 { border-color: var(--accent); } .gs-mark.g2 { border-color: var(--ok-text); } .gs-mark.g3 { border-color: var(--danger); }
  .gs-mark.g4 { border-style: dashed; border-color: var(--accent); } .gs-mark.g5 { border-style: dashed; border-color: var(--ok-text); }
  .gs-mark img { display: block; width: 100%; height: 100%; object-fit: cover; }
  /* in the pill the picture follows the pill's end (its radius less the pill's padding and border), in any Look */
  .gs-pill .gs-mark { border-radius: max(0px, calc(var(--r-pill) - 4px)); }
  .gs-mark[data-mark]::before { content: attr(data-mark); }
  .gs-pill-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .gs-pill svg { flex: none; width: 16px; height: 16px; color: var(--ink-soft); }
  .gs-pill.add { width: 40px; height: 40px; padding: 0; justify-content: center; border-style: dashed; border-color: var(--accent); box-shadow: none; }
  .gs-pill.add svg { width: 20px; height: 20px; color: var(--accent-text); }
  .gs-pill .gs-badge { top: -2px; right: -2px; }
  .gs-back, .gs-action { flex: none; width: 40px; height: 40px; border-radius: var(--r-round); border: 0; background: none; color: var(--ink); padding: 0; place-items: center; cursor: pointer; }
  @media (hover: hover) { .gs-back:hover, .gs-action:hover, .tb-group:hover { background: var(--hover-wash); } } /* not sticky after a tap */
  /* every gear has one pressed look, a circle as well as the color, so "on" doesn't rest on color alone; after the hover above so a pressed gear stays pressed under the pointer */
  .top-gear .gear-svg { width: 20px; height: 20px; stroke-width: 1.6; }
  .top-gear[aria-pressed="true"], .tp-head-gear[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-text); }
  .gs-back svg, .gs-action svg { width: 22px; height: 22px; }
  .gs-title { flex: 1 1 auto; min-width: 0; font-family: var(--display); font-weight: 500; font-size: 17px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .gs-actions { margin-left: auto; align-items: center; gap: 4px; }
  @media (max-width: 820px) {
    .gs-groups { display: none; }
    #groupPill { display: inline-flex; }
    body.top-back #groupPill { display: none; }
    body.top-back #topBack { display: inline-grid; }
    body.top-back #groupSwitch .gs-title { display: block; } /* from the start, not once the heading has scrolled away */
    .gs-actions { display: flex; }
    #topShopBtn { display: none; }
    body.top-apps #topShopBtn { display: inline-grid; }
    #appsGearBtn { display: none; } /* Apps' gear, before the bag */
    body.top-apps #appsGearBtn { display: inline-grid; }
    #topCalChatBtn { display: none; } /* the Calendar's chat button, Chat as a sheet (body.side-sheet: a page where Chat would sit beside first) */
    body.side-sheet #topCalChatBtn { display: inline-grid; } /* on every page but Chat */
    .gs-actions .chat-bar-tools { margin: 0; }
    body:not(.top-chat) .gs-actions .chat-bar-tools { display: none; } /* on Chat only */
    .gs-actions .chat-say-btn { min-height: 44px; height: 44px; padding: 0 12px; font-size: 14px; white-space: nowrap; }
    /* the bar stays 52px (the pages below start at its edge): the 40px and 44px buttons reach into its own padding */
    .gs-pill, .gs-back, .gs-action { margin-block: -2px; }
    .gs-actions .chat-say-btn, .gs-actions .chat-more { margin-block: -4px; }
    .gs-actions .tp-head-gear { flex: none; margin-block: -4px; } /* Today's gear beside the chat button */
    .gs-actions .tp-head-gear .gear-svg { width: 20px; height: 20px; }
    :root[data-look="modern"] #groupSwitch, :root[data-look="modern"] #places { background: color-mix(in srgb, var(--paper) 86%, transparent); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); }
  }
  @media (min-width: 821px) {
    .gs-groups { display: contents; }
  }
  :root[data-look="modern"] .place[aria-current="page"] svg { box-sizing: content-box; padding: 3px 14px; border-radius: var(--r-pill); background: var(--accent-soft); }
  @media (max-width: 1100px) {
    body.chat-sheet-open #drawerScrim { opacity: 1; pointer-events: auto; z-index: 25; }
  }
  /* the computer's title bar (821px and wider, a phone on its side too). At the top of the middle, the right column
     running the whole height beside it: on a place the open group at the left and the place's title and buttons at the
     right (Apps: the Shop's bag; Chat: What can I say? and "⋯"; 821 to 1100px: the chat icon); on a page with Back, Back
     and the page's title at the left. The phone's own Back, title and buttons move into it (placeTopParts). The pages'
     own big headings are hidden from view on a computer (still read out and focusable), since the bar names the page.
     Theme tokens only. */
  #titleBar { display: none; }
  @media (min-width: 821px) {
    #titleBar { display: flex; align-items: center; gap: 10px; position: fixed; top: 0; left: var(--slim-w, 76px); right: 0; height: var(--title-h); box-sizing: border-box; z-index: 19; padding: 0 16px 0 24px; background: var(--paper); border-bottom: var(--bw) var(--bs) var(--line); } /* under the scrim (20) and the drawers */
    body.chat-beside #titleBar { right: var(--chat-beside-w, var(--side-width)); }
    #main { padding-top: var(--title-h); }
    body.appearance-editing #titleBar { display: none; }
    body.appearance-editing #main { padding-top: 0; }
    #titleBar #topBack { display: none; }
    body.top-back #titleBar #topBack { display: inline-grid; margin-left: -8px; }
    /* the open group is a button, like the phone's pill: it opens Your groups (Members and settings). */
    .tb-group { position: relative; display: inline-flex; align-items: center; gap: 8px; flex: 0 1 auto; min-width: 0; max-width: 45%; min-height: 40px; margin-left: -6px; padding: 4px 10px 4px 4px; border: 0; border-radius: var(--r-pill); background: none; font: inherit; font-size: 14px; color: var(--ink-soft); cursor: pointer; }
    .tb-group[hidden], body.top-back .tb-group { display: none; }
    .tb-group .gs-mark { width: 28px; height: 28px; font-size: 12px; }
    .tb-group-name { min-width: 0; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .tb-group svg { flex: none; width: 16px; height: 16px; color: var(--ink-soft); }
    .tb-group .gs-badge { top: 0; right: 0; }
    .tb-group .gs-status { bottom: 1px; right: auto; left: 24px; }
    .tb-group[aria-expanded="true"] { background: var(--hover-wash); }
    /* on a place the name sits at the far right with its buttons just before it, so it never moves when buttons come
       and go; a page with Back keeps its name beside Back on the left, its buttons at the right. */
    #titleBar .gs-title { display: block; flex: 0 1 auto; order: 2; text-align: right; font-size: 19px; font-weight: 500; }
    body.top-back #titleBar .gs-title { flex: 1 1 auto; order: 0; text-align: left; }
    #titleBar .gs-actions { display: flex; order: 1; margin-left: auto; }
    #titleBar .gs-actions .tp-head-gear { flex: none; width: 40px; height: 40px; } /* Today's gear before "Today" */
    #titleBar .gs-actions .tp-head-gear .gear-svg { width: 20px; height: 20px; }
    #titleBar #topShopBtn, #titleBar #topCalChatBtn { display: none; }
    body.top-apps #titleBar #topShopBtn { display: inline-grid; }
    #titleBar #appsGearBtn { display: none; }
    body.top-apps #titleBar #appsGearBtn { display: inline-grid; }
    #titleBar .chat-bar-tools { margin: 0; }
    body:not(.top-chat) #titleBar .chat-bar-tools { display: none; } /* on Chat only */
    #topCalChatBtn[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-text); }
    #mainInner { padding-top: 24px; }
  }
  /* the bar names the page, so the pages' own big headings (and their plain eyebrows) are hidden from view, not from
     screen readers or focus. The eyebrows that carry a name stay (a module's on its page, the group on a member's, a
     project's domain); a project keeps Shared, its links and its tabs; Main Chat keeps its greeting. On a phone held
     upright too (the top bar names a page opened with Back from the start; the five places keep the pill). Your profile's
     and You's pages' headings, the Projects page's, Chat's head while a chat is open, and the group chat's heading in Chat
     too. (.sr-only says the same for the markup; a few hidden only at one width say it in their width's block.) */
  #jnTitle, #shTitle, #grTitle, #sayTitle, #calTitle, #rpTitle, #gpTitle, #mbTitle, #appsTitle, #todosTitle, #inboxTitle, #rememberTitle, #mpTitle, #msTitle, #vwTitle, #ppName,
  #prTitle, #lkTitle, #tmTitle, #hpTitle, #cnTitle, #suTitle, #projectsLabel, body.has-chat #pageHead, #chatGroupHost #gpChatTitle,
  .pp-head > .eyebrow:not(#mpModule):not(#mbGroup):not(#ppDomain), body.today-open #todayPanel .tp-title, body.chat-here:not(.chat-beside) .chat-bar-title { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
  /* 821 to 1100px: Chat beside is a 320px column, opened and closed by the chat icon at the bar's top right (every
     page but Chat), the page squeezed beside it; it stays open from page to page until it's closed. */
  @media (min-width: 821px) and (max-width: 1100px) {
    body.side-sheet #titleBar #topCalChatBtn { display: inline-grid; }
    body.chat-beside:not(.today-open) #app { padding-right: var(--chat-beside-w); }
    body.chat-beside.today-open #todayPanel, body.chat-beside.today-on.today-open #todayPanel { right: var(--chat-beside-w); border-right: var(--bw) var(--bs) var(--line); }
    body.chat-beside #rail { right: var(--chat-beside-w); }
    body.chat-beside #chatPanel { background-image: var(--bg-right, none); background-size: cover; background-position: center; }
  }
  @media (min-width: 1101px) { body.today-on:not(.today-open):not(.chat-beside) #titleBar { right: var(--side-width); } } /* beside Today's column */
  /* a module's side and its chat. The side (#sidePanel) is the right column beside its page from 821px
     (body.side-beside: from 1101px the switch's choice, shown first; at 821 to 1100px the title bar's button puts it in
     Chat's place), a sheet from the top bar's button on a phone (body.side-sheet-open). The button (#topSideBtn) carries
     the side's title, on a phone and at 821 to 1100px (body.side-btn). The module's chat is Chat's third choice
     (body.chat-module), drawn as the group chat is. Theme tokens only. */
  #sidePanel, #sideSheetHead { display: none; }
  #sideSheetClose { display: none; }
  #sideScroller { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0 18px 20px; }
  #sidePanelTitle { flex: 1 1 auto; min-width: 0; margin: 0; font-family: var(--display); font-weight: 500; font-size: 22px; line-height: 1.2; color: var(--ink); text-shadow: var(--heading-shadow); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #topSideBtn { display: none; width: auto; max-width: 9.5em; padding: 0 12px; border: var(--bw) var(--bs) var(--line); border-radius: var(--r-pill); background: var(--card); font: inherit; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #topSideBtn[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-text); border-color: var(--accent); }
  body.side-btn #topSideBtn { display: inline-block; }
  @media (min-width: 821px) {
    body.side-beside #sidePanel { display: flex; flex-direction: column; flex: none; position: fixed; top: 0; bottom: 0; right: 0; width: var(--chat-beside-w, var(--side-width)); z-index: 5; background: var(--rail); border-left: var(--bw) var(--bs) var(--line); }
    body.side-beside #sideSheetHead { display: flex; align-items: center; min-height: 40px; padding: 14px 18px 8px; }
    body.side-beside:not(.today-open) #todayPanel { display: none; }
    body.side-beside:not(.today-open) #app { padding-right: var(--chat-beside-w, var(--side-width)); }
    body.side-beside #titleBar { right: var(--chat-beside-w, var(--side-width)); }
    body.side-beside #sidePanel > #sideSwitchWrap { padding: 14px 18px 8px; overflow: hidden; scrollbar-gutter: stable; }
    body.side-beside #sideScroller { scrollbar-gutter: stable; }
  }
  @media (min-width: 1101px) { body.side-beside #sideSheetHead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; } } /* the switch names it */
  @media (min-width: 821px) and (max-width: 1100px) { body.side-beside #rail { right: var(--chat-beside-w); } }
  @media (max-width: 820px) {
    body.side-sheet-open #sidePanel { display: flex; flex-direction: column; position: fixed; left: 0; right: 0; bottom: 0; height: 64%; max-height: 88%; z-index: 26; background: var(--paper); border-radius: var(--r-lg) var(--r-lg) 0 0; box-shadow: var(--shadow-panel); }
    body.side-sheet-open #sideSheetHead { display: flex; align-items: center; gap: 8px; position: relative; padding: 14px 16px 6px; } /* no grab handle */
    body.side-sheet-open #sideSheetClose { display: inline-block; }
    body.side-sheet-open #sideScroller { padding: 0 16px calc(16px + env(safe-area-inset-bottom)); }
    body.side-sheet-open #drawerScrim { opacity: 1; pointer-events: auto; z-index: 25; }
  }
  @media (max-width: 820px) and (max-height: 560px) { body.side-sheet-open #sidePanel { top: 0; height: auto; max-height: none; border-top-left-radius: 0; border-top-right-radius: 0; } body.side-sheet-open #sideSheetHead { padding-top: 10px; } }
  /* ---- the notice: what was just done, with Undo or Open; at the top, under the title bar (a phone: the group switcher),
     above the page and below a question or the tour. Theme tokens only. ---- */
  .cc-notice { position: fixed; z-index: 30; top: calc(var(--title-h, 0px) + 12px); left: 50%; transform: translateX(-50%); width: min(480px, calc(100vw - 32px)); box-sizing: border-box; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; padding: 10px 8px 10px 16px; background: var(--card); color: var(--ink); border: var(--bw) var(--bs) var(--line); border-left: 4px solid var(--accent); border-radius: var(--r-md); box-shadow: var(--shadow-dialog); }
  .cc-notice[hidden] { display: none; }
  .cc-notice-text { flex: 1 1 200px; margin: 0; font-size: 14.5px; line-height: 1.4; overflow-wrap: anywhere; }
  .cc-notice-buttons { display: flex; gap: 6px; }
  .cc-notice-buttons:empty { display: none; }
  .cc-notice-buttons .chip { border-radius: var(--r-pill); padding: 6px 14px; font-size: 14px; min-height: 40px; font-family: var(--sans); cursor: pointer; }
  .cc-notice-close { flex: none; width: 40px; height: 40px; border: none; background: none; color: var(--muted); font-size: 20px; line-height: 1; border-radius: var(--r-round); padding: 0; }
  @media (max-width: 820px) {
    .cc-notice { top: calc(var(--switch-h, 52px) + env(safe-area-inset-top) + 8px); left: 16px; right: 16px; width: auto; transform: none; }
  }
