/* Side drawer navigation */
.topnav.slim { justify-content: space-between; }
.topnav.slim .navtitle { flex: 1; font-weight: 600; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fab { position: fixed; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 20; display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 20px 0 16px; border: 0; border-radius: 999px; background: var(--accent); color: var(--accent-text); font: inherit; font-weight: 600; box-shadow: 0 4px 16px rgba(0,0,0,.28); cursor: pointer; }
.fab { touch-action: none; user-select: none; -webkit-user-select: none; }
.fab.dragging { cursor: grabbing; opacity: .9; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.fab svg { width: 22px; height: 22px; }
.fab:focus-visible, .drawer button:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; }
.drawer-scrim { position: fixed; inset: 0; z-index: 30; background: rgba(0,0,0,.45); }
.drawer-scrim[hidden] { display: none; }
.drawer { position: fixed; z-index: 40; top: 0; bottom: 0; left: 0; width: min(82vw, 300px); display: flex; flex-direction: column; background: var(--card); border-right: 1px solid var(--line); box-shadow: 6px 0 24px rgba(0,0,0,.25); transform: translateX(-105%); visibility: hidden; transition: transform .22s ease, visibility 0s .22s; padding-bottom: env(safe-area-inset-bottom); }
.drawer.open { transform: none; visibility: visible; transition: transform .22s ease; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.drawer-close { width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent; color: var(--text); font-size: 1.8rem; line-height: 1; cursor: pointer; }
.drawer-list { flex: 1; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; }
.drawer-list button { text-align: left; min-height: 48px; padding: 0 14px; border: 0; border-radius: 10px; background: transparent; color: var(--text); font: inherit; cursor: pointer; }
.drawer-list button:hover, .drawer-list button:active { background: var(--soft); }
@media (prefers-reduced-motion: reduce) { .drawer, .drawer.open { transition: none; } }
@media (min-width: 1000px) {
  .fab, .drawer-scrim, .drawer-close { display: none; }
  .drawer { transform: none; visibility: visible; box-shadow: none; width: 220px; top: 57px; z-index: 4; }
  .drawer-head { border-bottom: 0; }
  .thememenu { right: 16px; }
}
.drawer-foot { padding: 8px; border-top: 1px solid var(--line); }
.drawer-foot button { width: 100%; min-height: 44px; padding: 0 14px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font: inherit; font-size: .88rem; text-align: left; cursor: pointer; }
@media (min-width: 1000px) { .drawer-foot { display: none; } }

/* Long grey lines (e.g. "Next meetings") must wrap instead of widening the page on phones */
br + .cw { white-space: normal; }
main { overflow-wrap: break-word; }
