
  /* ---------- Theme tokens ---------- */
  :root {
    --bg: #f7f6f3;
    --surface: #ffffff;
    --surface-2: #f0eee9;
    --text: #26241f;
    --muted: #73706a;
    --faint: #9a978f;
    --border: #e6e3dc;
    --hover: #ece9e3;
    --accent: #c2643f;
    --accent-text: #ffffff;
    --accent-soft: rgba(194, 100, 63, 0.12);
    --avatar-bg: #e7e4dd;
    --avatar-text: #5a5750;
    --danger: #b4452f;
    --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.06);
    --shadow-pop: 0 6px 28px rgba(0,0,0,.14);
    --radius: 14px;
    --ease: cubic-bezier(.4, 0, .2, 1);
    --sidebar-w: 84px;
    --sidebar-w-open: 300px;
  }
  [data-theme="dark"] {
    --bg: #1f1e1c;
    --surface: #262522;
    --surface-2: #2e2d2a;
    --text: #eceae4;
    --muted: #a3a09a;
    --faint: #7c7a74;
    --border: #37352f;
    --hover: #302f2b;
    --accent: #d2794f;
    --accent-text: #1f1e1c;
    --accent-soft: rgba(210, 121, 79, 0.18);
    --avatar-bg: #37352f;
    --avatar-text: #cfccc4;
    --danger: #e0795f;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.4);
    --shadow-pop: 0 8px 34px rgba(0,0,0,.5);
  }

  * { box-sizing: border-box; }
  html, body { height: 100%; }
  body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    transition: background .3s var(--ease), color .3s var(--ease);
  }
  button { font-family: inherit; cursor: pointer; }
  input, textarea, button { color: inherit; }
  ::selection { background: var(--accent-soft); }

  /* subtle scrollbars */
  *::-webkit-scrollbar { width: 10px; height: 10px; }
  *::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; border: 3px solid transparent; background-clip: padding-box; }
  *::-webkit-scrollbar-thumb:hover { background: var(--faint); background-clip: padding-box; }

  /* ---------- Layout ---------- */
  .app { display: flex; height: 100vh; overflow: hidden; }

  /* ---------- Sidebar ---------- */
  .sidebar {
    flex: 0 0 auto;
    width: var(--sidebar-w);
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 16px 16px;
    overflow: hidden;
    transition: width .28s var(--ease), background .3s var(--ease), border-color .3s var(--ease);
    z-index: 5;
  }
  /* expansion is driven purely by cursor position (hover) — a click/focus inside must not lock it open */
  .sidebar:hover { width: var(--sidebar-w-open); box-shadow: var(--shadow); }

  .sq {
    width: 40px; height: 40px; min-width: 40px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 15px;
    background: var(--avatar-bg); color: var(--avatar-text);
    transition: background .2s var(--ease), box-shadow .25s var(--ease), color .2s var(--ease), transform .15s var(--ease);
  }

  .sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 2px 0 14px 6px; }
  .brand-mark { background: var(--accent); color: var(--accent-text); }
  .brand-name {
    font-weight: 650; font-size: 15px; white-space: nowrap;
    opacity: 0; transform: translateX(-6px);
    transition: opacity .22s var(--ease), transform .22s var(--ease);
  }

  .new-meeting {
    display: flex; align-items: center; gap: 12px;
    background: transparent; border: none; padding: 0 0 0 6px; margin: 0 0 8px;
    width: 100%; text-align: left; border-radius: 12px;
  }
  .new-meeting .sq { border: 1px dashed var(--border); background: transparent; color: var(--muted); transition: background .2s var(--ease), box-shadow .25s var(--ease), color .2s var(--ease), transform .15s var(--ease), border-color .2s var(--ease); }
  .new-meeting:hover .sq {
    background: var(--accent-soft); color: var(--accent);
    border-style: solid; border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
    transform: scale(1.08);
  }
  .new-meeting:active .sq { transform: scale(1.0); }
  .rail-label {
    font-size: 14px; font-weight: 500; white-space: nowrap; color: var(--muted);
    opacity: 0; transform: translateX(-6px);
    transition: opacity .22s var(--ease), transform .22s var(--ease);
  }
  .new-meeting:hover .rail-label { color: var(--accent); }

  .meeting-list { flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; margin: 4px 0; padding: 0; scrollbar-width: thin; }
  .sidebar:not(:hover) .meeting-list { scrollbar-width: none; }
  .sidebar:not(:hover) .meeting-list::-webkit-scrollbar { width: 0; height: 0; }
  .meeting {
    display: flex; align-items: center; gap: 12px;
    padding: 6px; margin-bottom: 4px;
    border-radius: 14px; position: relative;
    transition: background .18s var(--ease);
    outline: none;
  }
  .meeting:hover { background: var(--hover); }
  .meeting.is-active { background: var(--accent-soft); }
  .meeting.is-active .avatar { box-shadow: 0 0 0 2px var(--accent); }
  .meeting:focus-visible { box-shadow: 0 0 0 2px var(--accent); }

  .meeting-name {
    flex: 1 1 auto; min-width: 0;
    border: 1px solid transparent; background: transparent;
    font-size: 14px; font-weight: 500; padding: 5px 7px; border-radius: 8px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    opacity: 0; transform: translateX(-6px);
    transition: opacity .22s var(--ease), transform .22s var(--ease), background .15s var(--ease), border-color .15s var(--ease);
  }
  .sidebar:hover .meeting-name { opacity: 1; transform: translateX(0); }
  .meeting-name:hover { background: var(--surface-2); }
  .meeting-name:focus { background: var(--surface); border-color: var(--border); cursor: text; }

  .meeting-del {
    opacity: 0; transition: opacity .2s var(--ease), background .15s var(--ease), color .15s var(--ease);
    pointer-events: none;
  }
  .sidebar:hover .meeting-del { opacity: .7; pointer-events: auto; }
  .meeting-del:hover { opacity: 1 !important; color: var(--danger); background: var(--surface-2); }

  /* reveal labels on expand */
  .sidebar:hover .brand-name,
  .sidebar:hover .rail-label {
    opacity: 1; transform: translateX(0);
  }

  .sidebar-footer { padding-top: 10px; border-top: 1px solid var(--border); margin-top: 4px; }

  /* "More meetings below" scroll hint — a chevron overlaid at the bottom of the meeting
     list, centred on the avatar column. A zero-height anchor sitting at the list/footer
     boundary lets the chevron be placed with CSS only; JS toggles .is-visible on real
     overflow. Additive & cleanly removable; does not affect the list or footer layout. */
  .scroll-hint { position: relative; height: 0; pointer-events: none; }
  .scroll-hint .ic {
    position: absolute; left: 50%; bottom: 6px; margin-left: -9px; /* centred on the sidebar's CURRENT width (the .scroll-hint anchor is full-width, so 50% tracks the hover expand/collapse); -9px = half the 18px icon. margin-left keeps transform free for the bob */
    color: var(--muted); opacity: 0; transition: opacity .25s var(--ease);
  }
  .scroll-hint.is-visible .ic { opacity: .9; animation: scrollHintBob 1.6s var(--ease) infinite; }
  @keyframes scrollHintBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }
  /* Aero: the bottom of the sidebar is the Luna glass/blue panel → white chevron + soft dark shadow */
  [data-skin="aero"] .scroll-hint .ic { color: #fff; filter: drop-shadow(0 1px 2px rgba(0, 30, 60, .55)); }
  .settings-btn {
    display: flex; align-items: center; gap: 12px;
    background: transparent; border: none; padding: 0 0 0 6px; width: 100%; text-align: left;
  }
  .settings-btn .sq { background: transparent; color: var(--muted); }
  .settings-btn:hover .sq { background: var(--hover); color: var(--text); }

  .ic { display: inline-flex; align-items: center; justify-content: center; }
  .ic svg { width: 18px; height: 18px; display: block; }
  .sq .ic svg { width: 20px; height: 20px; }

  /* ---------- Content ---------- */
  .content { flex: 1 1 auto; min-width: 0; height: 100%; display: flex; justify-content: center; }
  .content-inner {
    width: 100%; max-width: 1180px; padding: 22px 36px 0;
    display: flex; flex-direction: column; height: 100%; min-width: 0;
  }
  .workspace { display: flex; flex-direction: column; height: 100%; min-width: 0; }

  .meeting-header { padding: 6px 4px 14px; flex: 0 0 auto; }
  .meeting-title {
    font-family: ui-serif, Georgia, "Times New Roman", serif;
    font-size: 27px; font-weight: 600; margin: 0; letter-spacing: -.01em;
    line-height: 1.2; word-break: break-word;
  }
  .meeting-sub { color: var(--faint); font-size: 13px; margin-top: 5px; display: flex; gap: 7px; align-items: center; }

  .toolbar { flex: 0 0 auto; display: flex; flex-direction: column; gap: 10px; padding: 0 4px 12px; }
  .toolbar-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
  .search {
    flex: 1 1 220px; min-width: 160px; display: flex; align-items: center; gap: 8px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 0 12px;
    transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
  }
  .search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
  .search .ic { color: var(--faint); }
  .search-input { flex: 1; border: none; background: transparent; outline: none; padding: 9px 0; font-size: 14px; }
  .toolbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }

  .btn {
    display: inline-flex; align-items: center; gap: 7px;
    border: 1px solid var(--border); background: var(--surface); color: var(--text);
    padding: 8px 13px; border-radius: 10px; font-size: 13.5px; font-weight: 500;
    transition: background .16s var(--ease), border-color .16s var(--ease), transform .12s var(--ease), color .16s var(--ease);
    white-space: nowrap;
  }
  .btn:hover { background: var(--hover); }
  .btn:active { transform: translateY(1px); }
  .btn.ghost { background: transparent; }
  .btn.ghost:hover { background: var(--hover); }
  .btn.is-on { background: var(--accent-soft); border-color: transparent; color: var(--text); }
  .btn.is-on .ic { color: var(--accent); }
  .btn.small { padding: 6px 11px; font-size: 13px; }
  .btn.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
  .btn.primary:hover { filter: brightness(1.05); background: var(--accent); }
  .btn.danger { color: var(--danger); border-color: var(--border); }
  .btn.danger:hover { background: var(--accent-soft); }
  .btn .ic svg { width: 16px; height: 16px; }
  .btn .chev { color: var(--faint); }

  .icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 8px; border: none; background: transparent; color: var(--muted);
    transition: background .15s var(--ease), color .15s var(--ease);
  }
  .icon-btn:hover { background: var(--hover); color: var(--text); }
  .icon-btn.danger:hover { color: var(--danger); }
  .icon-btn.tiny { width: 26px; height: 26px; }
  .icon-btn.tiny svg { width: 15px; height: 15px; }

  .link-btn { background: none; border: none; color: var(--accent); font-size: 13px; padding: 2px 0; text-decoration: underline; }

  /* chips / filter */
  .chips { display: flex; gap: 7px; flex-wrap: wrap; }
  .chip {
    border: 1px solid var(--border); background: var(--surface); color: var(--muted);
    border-radius: 999px; padding: 4px 12px; font-size: 12.5px; font-weight: 500;
    transition: background .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
  }
  .chip:hover { background: var(--hover); color: var(--text); }
  .chip.is-on { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }

  /* notes */
  .notes-wrap { flex: 1 1 auto; overflow-y: auto; padding: 2px 4px 4px; }
  .notes { display: flex; flex-direction: column; gap: 10px; }
  .note {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 13px 15px; display: flex; flex-direction: column; gap: 9px;
    transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
  }
  .note:hover { border-color: var(--faint); }
  .note-text { white-space: pre-wrap; word-break: break-word; line-height: 1.55; font-size: 15px; }
  .note-tags { display: flex; gap: 6px; flex-wrap: wrap; }
  .note-tag {
    font-size: 11.5px; font-weight: 500; color: var(--muted);
    background: var(--surface-2); border-radius: 999px; padding: 2px 9px;
  }
  .note-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .note-meta { font-size: 12px; color: var(--faint); display: flex; gap: 6px; align-items: center; }
  .note-edited { font-style: italic; }
  .note-actions { display: flex; align-items: center; gap: 2px; opacity: .55; transition: opacity .18s var(--ease); }
  .note:hover .note-actions, .note:focus-within .note-actions { opacity: 1; }
  .note-actions .txt-btn {
    background: none; border: none; color: var(--muted); font-size: 12.5px; font-weight: 500;
    padding: 5px 8px; border-radius: 7px; transition: background .15s var(--ease), color .15s var(--ease);
  }
  .note-actions .txt-btn:hover { background: var(--hover); color: var(--text); }
  .note-actions .txt-btn.danger:hover { color: var(--danger); }

  .note--new { animation: noteIn .32s var(--ease); }
  @keyframes noteIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

  /* grouped-by-topic view */
  .note-group { animation: fadeIn .22s var(--ease); }
  .note-group + .note-group { margin-top: 8px; }
  .note-group-head {
    position: sticky; top: 0; z-index: 1;
    display: flex; align-items: baseline; gap: 8px;
    padding: 4px 2px 10px; background: var(--bg);
  }
  .note-group-title { font-size: 13px; font-weight: 600; letter-spacing: .01em; color: var(--text); word-break: break-word; }
  .note-group-title.is-faint { color: var(--muted); font-weight: 500; font-style: italic; }
  .note-group-count { font-size: 11.5px; font-weight: 600; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 1px 8px; }
  .note-group-notes { display: flex; flex-direction: column; gap: 10px; }

  .note-edit { display: flex; flex-direction: column; gap: 9px; }
  .note-edit-input {
    width: 100%; resize: vertical; min-height: 70px; border: 1px solid var(--border); border-radius: 10px;
    padding: 10px 12px; font-size: 15px; line-height: 1.55; background: var(--bg); outline: none;
    transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
  }
  .note-edit-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
  .note-edit-actions { display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
  .note-edit-hint { margin-right: auto; font-size: 12px; color: var(--faint); }

  /* empty states */
  .empty { text-align: center; color: var(--muted); padding: 36px 16px; }
  .empty h3 { margin: 0 0 6px; font-size: 16px; font-weight: 600; color: var(--text); }
  .empty p { margin: 0; font-size: 14px; }

  .global-empty {
    flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; gap: 14px; color: var(--muted);
  }
  .global-empty .ge-mark { width: 56px; height: 56px; border-radius: 18px; background: var(--accent); color: var(--accent-text); display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; }
  .global-empty h2 { margin: 4px 0 0; font-size: 19px; color: var(--text); font-weight: 600; }
  .global-empty p { margin: 0; max-width: 340px; }

  /* composer */
  .composer-wrap { flex: 0 0 auto; padding: 14px 0 22px; }
  .composer {
    display: flex; align-items: flex-end; gap: 10px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
    padding: 8px 8px 8px 16px; box-shadow: var(--shadow);
    transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
  }
  .composer:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow); }
  .composer textarea {
    flex: 1; border: none; outline: none; resize: none; background: transparent;
    font-size: 15px; line-height: 1.55; padding: 8px 0; max-height: 200px; overflow-y: auto;
  }
  .send-btn {
    flex: 0 0 auto; width: 38px; height: 38px; border-radius: 12px; border: none;
    background: var(--accent); color: var(--accent-text); display: flex; align-items: center; justify-content: center;
    transition: filter .15s var(--ease), opacity .15s var(--ease), transform .12s var(--ease);
  }
  .send-btn:hover { filter: brightness(1.06); }
  .send-btn:active { transform: translateY(1px) scale(.97); }
  .send-btn:disabled { opacity: .4; cursor: default; }

  /* ---------- Popover / menu ---------- */
  .popover {
    position: fixed; z-index: 60; background: var(--surface); border: 1px solid var(--border);
    border-radius: 12px; box-shadow: var(--shadow-pop); padding: 8px; min-width: 230px; max-width: 300px;
    animation: popIn .14s var(--ease);
  }
  @keyframes popIn { from { opacity: 0; transform: translateY(-4px) scale(.99); } to { opacity: 1; transform: none; } }
  .menu-title { font-size: 12px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: .04em; padding: 4px 8px 8px; }
  .menu-empty { font-size: 13px; color: var(--muted); padding: 6px 8px; }
  .topic-list { display: flex; flex-direction: column; max-height: 240px; overflow-y: auto; }
  .topic-row {
    display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 8px; cursor: pointer;
    transition: background .14s var(--ease);
  }
  .topic-row:hover { background: var(--hover); }
  .topic-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); flex: 0 0 auto; cursor: pointer; }
  .topic-row .topic-name { flex: 1; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .menu-item {
    display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
    background: none; border: none; padding: 8px; border-radius: 8px; font-size: 14px;
    transition: background .14s var(--ease);
  }
  .menu-item:hover { background: var(--hover); }
  .menu-item .ic { color: var(--muted); }
  .add-topic { display: flex; gap: 6px; margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--border); }
  .add-topic input,
  .topic-edit-input {
    flex: 1; min-width: 0; border: 1px solid var(--border); border-radius: 8px; padding: 7px 9px; font-size: 13.5px;
    background: var(--bg); outline: none; transition: border-color .15s var(--ease);
  }
  .add-topic input:focus,
  .topic-edit-input:focus { border-color: var(--accent); }

  /* ---------- Modal ---------- */
  .modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.32); z-index: 80;
    display: flex; align-items: center; justify-content: center; padding: 20px;
    animation: fadeIn .16s var(--ease);
    overflow-y: auto;   /* fenêtre plus haute que l'écran (téléphone) : on fait défiler le fond */
  }
  [data-theme="dark"] .modal-overlay { background: rgba(0,0,0,.55); }
  @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
  .modal {
    background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
    box-shadow: var(--shadow-pop); width: 100%; max-width: 380px; padding: 22px;
    animation: modalIn .2s var(--ease);
    margin: auto;       /* centrée comme avant, mais son haut reste atteignable quand elle déborde */
  }
  @keyframes modalIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
  .modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
  .modal h2 { margin: 0; font-size: 17px; font-weight: 600; }
  .modal p { margin: 6px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
  .modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

  .settings-section { margin-top: 18px; }
  .settings-section:first-of-type { margin-top: 8px; }
  .settings-label { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 9px; display: flex; align-items: center; justify-content: space-between; }
  .segmented { display: flex; flex-wrap: wrap; background: var(--surface-2); border-radius: 10px; padding: 3px; gap: 3px; }
  .segmented button {
    border: none; background: transparent; padding: 7px 16px; border-radius: 8px; font-size: 13.5px; font-weight: 500; color: var(--muted);
    transition: background .16s var(--ease), color .16s var(--ease);
  }
  .segmented button.is-on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
  .segmented button:disabled { cursor: default; opacity: .5; box-shadow: none; }
  .settings-empty { font-size: 13px; color: var(--muted); line-height: 1.5; padding: 2px 2px 0; }

  /* Paramètres → Icône de l'appli (section construite par app-icon.js) */
  .appicon-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .appicon-opt {
    display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 7px 2px 6px; min-width: 0;
    background: transparent; border: 1px solid transparent; border-radius: 12px;
    transition: background .15s var(--ease), border-color .15s var(--ease);
  }
  .appicon-opt:hover { background: var(--hover); }
  .appicon-opt[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); }
  .appicon-opt:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
  .appicon-pic {
    position: relative; width: 42px; height: 42px; border-radius: 10px; overflow: hidden; flex: none;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
  }
  .appicon-pic img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
  .appicon-pic.is-auto img + img { clip-path: polygon(100% 0, 100% 100%, 0 100%); }   /* moitié Tuile, moitié Aero */
  .appicon-name { font-size: 11px; line-height: 1.2; text-align: center; color: var(--muted); overflow-wrap: break-word; }
  .appicon-opt[aria-pressed="true"] .appicon-name { color: var(--text); font-weight: 600; }
  .appicon-note { margin-top: 8px; font-size: 12px; }
  @media (max-width: 400px) { .appicon-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
  /* Le carré « N » (barre latérale, écran de connexion) montre l'icône choisie ; sans JS il garde son « N » */
  html.has-appicon .brand-mark,
  html.has-appicon[data-skin="aero"] .sidebar .brand-mark { background: var(--appicon) center / cover no-repeat; color: transparent; }
  html.has-appicon[data-skin="aero"] .sidebar .brand-mark { box-shadow: 0 1px 3px rgba(0,30,80,.3); }

  .row-between { display: flex; align-items: center; justify-content: space-between; }
  .switch { position: relative; display: inline-block; width: 44px; height: 25px; flex: 0 0 auto; }
  .switch input { opacity: 0; width: 0; height: 0; }
  .switch .track { position: absolute; inset: 0; background: var(--border); border-radius: 999px; transition: background .2s var(--ease); }
  .switch .thumb { position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s var(--ease); }
  .switch input:checked + .track { background: var(--accent); }
  .switch input:checked + .track .thumb { transform: translateX(19px); }

  :focus-visible { outline: none; }
  .btn:focus-visible, .icon-btn:focus-visible, .chip:focus-visible, .menu-item:focus-visible, .segmented button:focus-visible, .send-btn:focus-visible {
    box-shadow: 0 0 0 3px var(--accent-soft); border-color: var(--accent);
  }

  @media (prefers-reduced-motion: reduce) {
    * { transition-duration: .001ms !important; animation-duration: .001ms !important; }
  }

  @media (max-width: 640px) {
    .content-inner { padding: 18px 16px 0; }
    .meeting-title { font-size: 23px; }
  }

  /* ============================================================
   *  Frutiger Aero skin — opt-in via <html data-skin="aero">
   *  Self-contained (CSS/SVG only). The Minimal theme is untouched:
   *  every rule below is scoped under [data-skin="aero"].
   * ============================================================ */

  /* ---- Aero palette: day sky (light) ---- */
  [data-skin="aero"] {
    --bg: #2a86d6;
    --surface: rgba(255,255,255,0.58);
    --surface-2: rgba(255,255,255,0.42);
    --text: #0c2c4d;
    --muted: #2c5a7e;
    --faint: #5a7f9c;
    --border: rgba(255,255,255,0.65);
    --hover: rgba(255,255,255,0.55);
    --accent: #1f8ce6;                 /* Luna blue */
    --accent-text: #ffffff;
    --accent-soft: rgba(31,140,230,0.18);
    --avatar-bg: rgba(255,255,255,0.55);
    --avatar-text: #0c3a63;
    --danger: #e23b3b;
    --shadow: 0 1px 2px rgba(10,40,70,.10), 0 10px 30px rgba(10,40,70,.18);
    --shadow-pop: 0 10px 40px rgba(10,40,70,.30);
    /* sky gradient stops */
    --aero-sky-top: #1f5fc0;            /* deep blue */
    --aero-sky-mid: #6fd0ff;            /* bright cyan */
    --aero-sky-bot: #cdeeae;            /* soft green */
    --aero-hill:    #7ec850;            /* sunny green-hill glow */
    --aero-glass-edge: rgba(255,255,255,0.85);
    --aero-glow: rgba(60,180,255,0.55);
    /* OPTIONAL real background image:
       Drop your OWN / licensed file into ./assets (next to this HTML) and set, e.g.:
         --aero-bg-image: url('assets/sky.jpg');
       Leave it as 'none' to use the built-in CSS sky.
       Do NOT use copyrighted wallpapers/stock photos — supply your own. */
    --aero-bg-image: url('assets/Aero.png');
  }

  /* ---- Aero palette: night sky (dark) ---- */
  [data-skin="aero"][data-theme="dark"] {
    --bg: #04111f;
    --surface: rgba(14,40,66,0.52);
    --surface-2: rgba(14,40,66,0.40);
    --text: #f2f8ff;
    --muted: #b7d6ee;
    --faint: #93b6d4;
    --border: rgba(150,200,255,0.30);
    --hover: rgba(120,180,255,0.18);
    --accent: #3aa0ff;
    --accent-text: #04111f;
    --accent-soft: rgba(58,160,255,0.22);
    --avatar-bg: rgba(120,180,255,0.22);
    --avatar-text: #e7f3ff;
    --danger: #ff6b5e;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 34px rgba(0,0,0,.5);
    --shadow-pop: 0 12px 44px rgba(0,0,0,.6);
    --aero-sky-top: #02060f;
    --aero-sky-mid: #0a2a4d;
    --aero-sky-bot: #0e3a44;
    --aero-hill: #12506a;
    --aero-glass-edge: rgba(150,200,255,0.35);
    --aero-glow: rgba(60,160,255,0.50);
  }

  /* ---- An administrator's username, wherever it is rendered ----
   *  public.admins is readable by every authenticated user, so each page knows WHO the
   *  moderators are and marks their name with this one class. Decoration only: RLS is
   *  the real enforcement, and a page that cannot load the list simply marks nobody.
   *  No new colour token — this is the same --danger already used for destructive
   *  actions, re-shaded per skin where the panel behind it demands it. */
  .is-admin-name { font-weight: 700; color: var(--danger); }

  /*  Minimal, dark: the selected row is an --accent-soft tint over a dark surface, where
   *  the flat token measured 3.98:1. Lifted toward white until it clears AA. */
  [data-theme="dark"]:not([data-skin="aero"]) .meeting.is-active .is-admin-name {
    color: color-mix(in srgb, var(--danger) 82%, #fff);
  }

  /*  Aero's content area is a bright PHOTOGRAPH (assets/Aero.png), not glass over a flat
   *  colour: author lines and the conversation title sit straight on it, where the flat
   *  --danger measures ~1.6:1. Darkened until it clears AA over every part of that
   *  photo a name was actually measured against (4.86:1 at worst). */
  [data-skin="aero"] .is-admin-name { color: color-mix(in srgb, var(--danger) 40%, #000); }

  /*  The dark variant. NOT because the backdrop goes dark — it does not: the night
   *  palette redefines the sky gradient but never --aero-bg-image, so Aero dark shows
   *  that same bright photo (checked on a screenshot, not assumed). It is because the
   *  night palette's --danger is a lighter coral, so the same 58% lands too pale on that
   *  photo. Mixed further toward black instead (5.02:1 at worst). */
  [data-skin="aero"][data-theme="dark"] .is-admin-name {
    color: color-mix(in srgb, var(--danger) 30%, #000);
  }

  /*  The Luna rail is the exception: an opaque blue gradient (#4ea2ec -> #1b4593), dark
   *  enough that a dark red vanishes into it. It takes a LIGHT red plus the same halo the
   *  rail already gives its white names. Measured honestly: no red reaches 4.5:1 across
   *  the WHOLE gradient — pure white, which the rail already uses, is itself 4.49:1 there
   *  — but this shade clears AA on every row a username can actually occupy.
   *  These two come last on purpose: they tie with the Aero-dark rule above on
   *  specificity, so source order is what makes the rail win inside the rail. */
  [data-skin="aero"] .sidebar .is-admin-name {
    color: color-mix(in srgb, var(--danger) 12%, #fff);
    text-shadow: 0 1px 1px rgba(0,30,80,.55);
  }
  /*  ...except the selected row, which the skin paints pale: there the dark red wins. */
  [data-skin="aero"] .sidebar .meeting.is-active .is-admin-name {
    color: color-mix(in srgb, var(--danger) 30%, #000);
    text-shadow: none;
  }
  [data-skin="aero"][data-theme="dark"] .sidebar .meeting.is-active .is-admin-name {
    color: color-mix(in srgb, var(--danger) 22%, #000);
  }

  /* ---- Background layers (hidden in Minimal → zero cost there) ---- */
  .aero-bg { display: none; }
  [data-skin="aero"] .aero-bg {
    display: block; position: fixed; inset: 0; z-index: 0;
    overflow: hidden; pointer-events: none;
  }
  [data-skin="aero"] .app { position: relative; z-index: 1; background: transparent; }

  .aero-sky {
    position: absolute; inset: 0;
    background-color: var(--aero-sky-mid);
    background-image:
      var(--aero-bg-image),
      linear-gradient(to bottom, var(--aero-sky-top) 0%, var(--aero-sky-mid) 48%, var(--aero-sky-bot) 100%);
    background-size: cover, cover;
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
  }
  .aero-hill {           /* soft sunlit green horizon */
    position: absolute; left: -10%; right: -10%; bottom: -18%; height: 55%;
    background: radial-gradient(60% 100% at 50% 100%, var(--aero-hill) 0%, rgba(255,255,255,0) 70%);
    opacity: .8; filter: blur(6px);
  }
  .aero-bloom {          /* corner light bloom / lens flare */
    position: absolute; top: -14%; right: -8%; width: 60vw; height: 60vw;
    background: radial-gradient(circle at 50% 50%, rgba(255,255,255,.85) 0%, rgba(255,255,255,.35) 16%, rgba(255,255,255,0) 60%);
    mix-blend-mode: screen; opacity: .85;
    animation: aeroBloom 14s ease-in-out infinite alternate;
  }
  @keyframes aeroBloom { from { opacity: .6; transform: scale(.96); } to { opacity: .95; transform: scale(1.04); } }

  /* drifting bubbles + bokeh orbs — transform/opacity only (compositor-friendly) */
  .aero-orbs { position: absolute; inset: 0; }
  .aero-orbs span {
    position: absolute; bottom: -12%; width: 60px; height: 60px; border-radius: 50%;
    background:
      radial-gradient(circle at 32% 28%, rgba(255,255,255,.9) 0%, rgba(255,255,255,.25) 22%, rgba(255,255,255,0) 46%),
      radial-gradient(circle at 50% 50%, rgba(180,235,255,.30) 0%, rgba(120,200,255,.12) 60%, rgba(120,200,255,0) 76%);
    box-shadow: inset 0 0 14px rgba(255,255,255,.45);
    will-change: transform, opacity; animation: aeroFloat linear infinite;
  }
  @keyframes aeroFloat {
    0%   { transform: translate3d(0,0,0) scale(.9); opacity: 0; }
    10%  { opacity: .9; }
    50%  { transform: translate3d(24px,-55vh,0) scale(1.05); opacity: .8; }
    90%  { opacity: .55; }
    100% { transform: translate3d(-10px,-115vh,0) scale(1.15); opacity: 0; }
  }
  .aero-orbs span:nth-child(1){ left:6%;  width:38px;  height:38px;  animation-duration:26s; animation-delay:-2s; }
  .aero-orbs span:nth-child(2){ left:16%; width:70px;  height:70px;  animation-duration:34s; animation-delay:-12s; }
  .aero-orbs span:nth-child(3){ left:24%; width:24px;  height:24px;  animation-duration:22s; animation-delay:-6s; }
  .aero-orbs span:nth-child(4){ left:33%; width:90px;  height:90px;  animation-duration:40s; animation-delay:-20s; filter:blur(3px); opacity:.7; }
  .aero-orbs span:nth-child(5){ left:42%; width:46px;  height:46px;  animation-duration:30s; animation-delay:-4s; }
  .aero-orbs span:nth-child(6){ left:51%; width:30px;  height:30px;  animation-duration:24s; animation-delay:-15s; }
  .aero-orbs span:nth-child(7){ left:59%; width:64px;  height:64px;  animation-duration:36s; animation-delay:-9s; }
  .aero-orbs span:nth-child(8){ left:67%; width:120px; height:120px; animation-duration:46s; animation-delay:-26s; filter:blur(5px); opacity:.55; }
  .aero-orbs span:nth-child(9){ left:74%; width:34px;  height:34px;  animation-duration:27s; animation-delay:-3s; }
  .aero-orbs span:nth-child(10){left:82%; width:54px;  height:54px;  animation-duration:32s; animation-delay:-18s; }
  .aero-orbs span:nth-child(11){left:89%; width:26px;  height:26px;  animation-duration:21s; animation-delay:-7s; }
  .aero-orbs span:nth-child(12){left:95%; width:80px;  height:80px;  animation-duration:42s; animation-delay:-23s; filter:blur(4px); opacity:.6; }
  .aero-orbs span:nth-child(13){left:38%; width:18px;  height:18px;  animation-duration:19s; animation-delay:-11s; }
  .aero-orbs span:nth-child(14){left:71%; width:20px;  height:20px;  animation-duration:20s; animation-delay:-1s; }

  /* ---- Frosted aqua-glass panels ---- */
  [data-skin="aero"] .sidebar,
  [data-skin="aero"] .note,
  [data-skin="aero"] .composer,
  [data-skin="aero"] .popover,
  [data-skin="aero"] .modal,
  [data-skin="aero"] .search {
    -webkit-backdrop-filter: blur(14px) saturate(1.5);
    backdrop-filter: blur(14px) saturate(1.5);
    background: var(--surface);
    border: 1px solid var(--aero-glass-edge);
    position: relative;
  }
  [data-skin="aero"] .sidebar { box-shadow: 1px 0 0 rgba(255,255,255,.35), 0 8px 30px rgba(10,40,70,.18); }
  [data-skin="aero"] .note,
  [data-skin="aero"] .composer { box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 6px 18px rgba(10,40,70,.18); }
  /* glossy highlight along the top edge of glass panels */
  [data-skin="aero"] .sidebar::before,
  [data-skin="aero"] .note::before,
  [data-skin="aero"] .composer::before,
  [data-skin="aero"] .popover::before,
  [data-skin="aero"] .modal::before {
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: 45%;
    border-radius: inherit; pointer-events: none; opacity: .9;
    background: linear-gradient(to bottom, rgba(255,255,255,.45), rgba(255,255,255,0));
  }
  [data-skin="aero"] .sidebar > *,
  [data-skin="aero"] .note > *,
  [data-skin="aero"] .composer > *,
  [data-skin="aero"] .popover > *,
  [data-skin="aero"] .modal > * { position: relative; z-index: 1; }

  /* sticky topic-group header → compact, LEFT-ALIGNED green Aero "gel pill" that hugs the
     topic name + count (echoes the XP-green sidebar footer / Aero "eco" palette). The pill
     is opaque, so notes scrolling behind it stay clean — no full-width bar needed. Stays
     sticky (block-level fit-content). Aero only, light + dark; Minimal + grouping logic
     untouched; cleanly removable. */
  [data-skin="aero"] .note-group-head {
    width: -moz-fit-content; width: fit-content; max-width: 100%;
    align-items: center; gap: 7px;
    padding: 5px 12px; margin-bottom: 8px;
    border-radius: 11px;
    color: #fff; border: 1px solid rgba(255,255,255,.55);
    text-shadow: 0 1px 1px rgba(0,40,80,.35);
    background:
      linear-gradient(to bottom, rgba(255,255,255,.6), rgba(255,255,255,.06) 49%, rgba(255,255,255,0) 51%, rgba(255,255,255,.2)),
      linear-gradient(to bottom, #86c25a 0%, #5fa235 55%, #4f8f2a 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 2px 7px rgba(10,40,30,.3), 0 0 10px rgba(70,170,60,.3);
  }
  /* title + count read white on the green gel; the count chip is a darker inset translucent chip */
  [data-skin="aero"] .note-group-head .note-group-title { color: #fff; }
  [data-skin="aero"] .note-group-head .note-group-count {
    color: #fff; background: rgba(0,40,20,.30);
    box-shadow: inset 0 1px 1px rgba(0,30,15,.4); text-shadow: 0 1px 1px rgba(0,40,30,.45);
  }
  /* "No topic" group → neutral, visually-secondary pill (not strong green); stays italic via base .is-faint */
  [data-skin="aero"] .note-group-head:has(.note-group-title.is-faint) {
    background:
      linear-gradient(to bottom, rgba(255,255,255,.5), rgba(255,255,255,.05) 49%, rgba(255,255,255,0) 51%, rgba(255,255,255,.16)),
      linear-gradient(to bottom, rgba(150,168,178,.62), rgba(108,128,138,.56));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 2px 6px rgba(10,40,70,.22);
  }
  [data-skin="aero"] .note-group-head:has(.note-group-title.is-faint) .note-group-count { background: rgba(10,25,40,.24); }

  /* editable inputs need a light surface (not the sky) for contrast */
  [data-skin="aero"] .note-edit-input,
  [data-skin="aero"] .add-topic input,
  [data-skin="aero"] .topic-edit-input {
    background: rgba(255,255,255,.62); color: var(--text);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  }
  [data-skin="aero"][data-theme="dark"] .note-edit-input,
  [data-skin="aero"][data-theme="dark"] .add-topic input,
  [data-skin="aero"][data-theme="dark"] .topic-edit-input { background: rgba(14,40,66,.6); }

  /* ---- Glossy "gel" buttons ---- */
  [data-skin="aero"] .btn,
  [data-skin="aero"] .send-btn,
  [data-skin="aero"] .chip,
  [data-skin="aero"] .segmented button {
    position: relative; overflow: hidden;
    border: 1px solid rgba(255,255,255,.6);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.85), inset 0 -8px 12px rgba(0,40,80,.10), 0 2px 6px rgba(10,40,70,.22);
  }
  /* white/glass gel: default + ghost buttons, chips, segmented */
  [data-skin="aero"] .btn,
  [data-skin="aero"] .chip,
  [data-skin="aero"] .segmented button {
    color: var(--text);
    background: linear-gradient(to bottom, rgba(255,255,255,.92), rgba(255,255,255,.4) 49%, rgba(255,255,255,.12) 51%, rgba(255,255,255,.5));
  }
  [data-skin="aero"][data-theme="dark"] .btn,
  [data-skin="aero"][data-theme="dark"] .chip,
  [data-skin="aero"][data-theme="dark"] .segmented button {
    color: var(--text);
    background: linear-gradient(to bottom, rgba(150,200,255,.32), rgba(120,170,230,.10) 49%, rgba(120,170,230,.03) 51%, rgba(150,200,255,.16));
  }
  [data-skin="aero"] .segmented { background: rgba(255,255,255,.22); }
  /* a disabled sound selector reads as greyed even under the Aero gel treatment */
  [data-skin="aero"] .segmented button:disabled { box-shadow: none; }
  /* colored gel: primary / send / active toggles */
  [data-skin="aero"] .btn.primary,
  [data-skin="aero"] .send-btn {
    color: #fff; border-color: rgba(255,255,255,.55); text-shadow: 0 1px 1px rgba(0,40,80,.35);
    background:
      linear-gradient(to bottom, rgba(255,255,255,.6), rgba(255,255,255,.06) 49%, rgba(255,255,255,0) 51%, rgba(255,255,255,.2)),
      linear-gradient(to bottom, #5bb6ff, #1577dd);
  }
  [data-skin="aero"] .btn.danger {
    color: #fff; border-color: rgba(255,255,255,.5);
    background:
      linear-gradient(to bottom, rgba(255,255,255,.55), rgba(255,255,255,.05) 49%, rgba(255,255,255,0) 51%, rgba(255,255,255,.15)),
      linear-gradient(to bottom, #ff7a6e, #e0392c);
  }
  [data-skin="aero"] .chip.is-on,
  [data-skin="aero"] .btn.is-on,
  [data-skin="aero"] .segmented button.is-on {
    color: #fff; border-color: rgba(255,255,255,.5);
    background:
      linear-gradient(to bottom, rgba(255,255,255,.55), rgba(255,255,255,.05) 49%, rgba(255,255,255,0) 51%, rgba(255,255,255,.18)),
      linear-gradient(to bottom, #7ee06a, #3aab2f);     /* "go" green */
    box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 0 12px rgba(70,200,90,.45);
  }
  [data-skin="aero"] .btn.is-on .ic { color: #fff; }
  [data-skin="aero"] .btn:hover,
  [data-skin="aero"] .send-btn:hover { filter: brightness(1.06) saturate(1.1); }

  /* ---- Active meeting: brighter aqua glow ---- */
  [data-skin="aero"] .meeting:hover { background: rgba(255,255,255,.32); }
  [data-skin="aero"][data-theme="dark"] .meeting:hover { background: rgba(120,180,255,.16); }
  [data-skin="aero"] .meeting.is-active {
    background: linear-gradient(to bottom, rgba(255,255,255,.5), rgba(120,200,255,.22));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 0 0 1px rgba(255,255,255,.5), 0 0 18px var(--aero-glow);
  }
  [data-skin="aero"] .meeting.is-active .avatar { box-shadow: 0 0 0 2px rgba(255,255,255,.8), 0 0 14px var(--aero-glow); }

  /* ---- Readability: text sitting directly over the busy sky ---- */
  [data-skin="aero"] .meeting-title,
  [data-skin="aero"] .meeting-sub,
  [data-skin="aero"] .global-empty,
  [data-skin="aero"] .empty { text-shadow: 0 1px 2px rgba(255,255,255,.6); }
  [data-skin="aero"] .meeting-title { text-shadow: 0 1px 0 rgba(255,255,255,.6), 0 2px 12px rgba(255,255,255,.4); }
  [data-skin="aero"][data-theme="dark"] .meeting-title,
  [data-skin="aero"][data-theme="dark"] .meeting-sub,
  [data-skin="aero"][data-theme="dark"] .global-empty,
  [data-skin="aero"][data-theme="dark"] .empty { text-shadow: 0 1px 4px rgba(0,0,0,.6); }

  /* respect reduced-motion: stop drifting orbs/bloom cleanly (no fast-loop flicker) */
  @media (prefers-reduced-motion: reduce) {
    [data-skin="aero"] .aero-orbs span,
    [data-skin="aero"] .aero-bloom { animation: none !important; }
    [data-skin="aero"] .aero-orbs span { opacity: 0; }
  }

  /* ============================================================
   *  Calendar overlay (Month / Week / Day) — both themes
   * ============================================================ */
  .content { position: relative; }                 /* positioning context for the overlay */
  .cal-overlay {
    position: absolute; inset: 0; z-index: 30;
    display: none; flex-direction: column;
    background: var(--bg); overflow: hidden;
  }
  .cal-topbar {
    flex: 0 0 auto; display: flex; align-items: center; gap: 12px;
    padding: 12px 18px; border-bottom: 1px solid var(--border); flex-wrap: wrap;
  }
  .cal-topbar-left { display: flex; align-items: center; gap: 10px; }
  .cal-topbar-mid { display: flex; align-items: center; gap: 8px; flex: 1 1 auto; min-width: 0; }
  .cal-topbar-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
  .cal-title { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: capitalize; }
  .cal-tz { font-size: 12px; color: var(--faint); white-space: nowrap; }
  .cal-views button { min-width: 62px; }

  .cal-body { flex: 1 1 auto; overflow: auto; min-height: 0; }
  /* ---- Week / Day shared hourly time grid ---- */
  .cal-grid { display: flex; flex-direction: column; height: 100%; min-height: 0; }
  .cal-grid-head { display: flex; flex: 0 0 auto; border-bottom: 1px solid var(--border); }
  .cal-grid-corner { flex: 0 0 56px; }
  .cal-grid-dayhead { flex: 1 1 0; min-width: 0; padding: 8px 6px; text-align: center; font-size: 12.5px; font-weight: 600; color: var(--muted); border-left: 1px solid var(--border); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: capitalize; }
  .cal-grid-dayhead.is-today { color: var(--accent); }
  .cal-grid-dayhead.is-clickable { cursor: pointer; transition: background .15s var(--ease); }
  .cal-grid-dayhead.is-clickable:hover { background: var(--hover); }
  .cal-grid-scroll { flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; min-height: 0; }
  .cal-grid-body { display: flex; position: relative; }
  .cal-grid-gutter { flex: 0 0 56px; }
  .cal-hour-label { height: 48px; box-sizing: border-box; font-size: 11px; color: var(--faint); text-align: right; padding: 1px 8px 0 0; }
  .cal-grid-canvas { flex: 1 1 auto; display: flex; }
  .cal-grid-col { flex: 1 1 0; min-width: 0; position: relative; border-left: 1px solid var(--border); background-image: repeating-linear-gradient(to bottom, var(--border) 0, var(--border) 1px, transparent 1px, transparent 48px); }
  .cal-grid-col:first-child { border-left: none; }
  .cal-block { position: absolute; box-sizing: border-box; border-radius: 7px; padding: 2px 6px; overflow: hidden; cursor: pointer; background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); transition: filter .15s var(--ease); }
  .cal-block:hover { filter: brightness(.97); }
  .cal-block.is-active { box-shadow: inset 0 0 0 2px var(--accent); }
  .cal-block-time { font-size: 11px; font-weight: 600; color: var(--accent); line-height: 1.3; }
  .cal-block-name { font-size: 11.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; }
  .cal-now { position: absolute; left: 0; right: 0; height: 0; border-top: 2px solid var(--danger); z-index: 3; pointer-events: none; }
  .cal-now::before { content: ""; position: absolute; left: -3px; top: -5px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
  /* meeting details modal */
  .cal-details { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
  .cal-details-row { font-size: 14px; color: var(--text); }
  .cal-details-time { color: var(--muted); }
  .modal-actions .spacer { flex: 1 1 auto; }

  /* ---- Month view ---- */
  .cal-month { display: flex; flex-direction: column; height: 100%; min-height: 540px; }
  .cal-weekday-row { display: grid; grid-template-columns: repeat(7, 1fr); flex: 0 0 auto; }
  .cal-weekday { padding: 8px 10px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: capitalize; border-bottom: 1px solid var(--border); }
  .cal-month-grid { display: grid; grid-template-columns: repeat(7, 1fr); grid-auto-rows: 1fr; flex: 1 1 auto; min-height: 0; }
  .cal-day {
    border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
    padding: 4px 5px; min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 3px;
    cursor: pointer; transition: background .15s var(--ease);
  }
  .cal-day:nth-child(7n) { border-right: none; }
  .cal-day:hover { background: var(--hover); }
  .cal-day.is-other { opacity: .5; }
  .cal-day-num { font-size: 12.5px; font-weight: 600; color: var(--muted); display: flex; flex: 0 0 auto; }
  .cal-day.is-today .cal-day-num span {
    background: var(--accent); color: var(--accent-text);
    min-width: 22px; height: 22px; padding: 0 4px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
  }
  .cal-day-events { display: flex; flex-direction: column; gap: 3px; overflow: hidden; }
  .cal-chip {
    display: flex; align-items: center; gap: 5px; width: 100%; text-align: left;
    border: none; border-radius: 6px; padding: 2px 6px; font-size: 12px; line-height: 1.4;
    background: var(--accent-soft); color: var(--text); white-space: nowrap; overflow: hidden;
    transition: filter .15s var(--ease), box-shadow .15s var(--ease);
  }
  .cal-chip:hover { filter: brightness(.97); }
  .cal-chip.is-active { box-shadow: inset 0 0 0 1px var(--accent); }
  .cal-chip-time { font-weight: 600; color: var(--accent); flex: 0 0 auto; }
  .cal-chip-name { overflow: hidden; text-overflow: ellipsis; }

  /* ---- meeting form (rendered in a popover) ---- */
  .cal-form { display: flex; flex-direction: column; gap: 11px; min-width: 250px; }
  .cal-field { display: flex; flex-direction: column; gap: 5px; }
  .cal-field-label { font-size: 12px; font-weight: 600; color: var(--muted); }
  .cal-field-controls { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
  .cal-input {
    border: 1px solid var(--border); background: var(--bg); color: var(--text);
    border-radius: 8px; padding: 7px 9px; font-size: 13.5px; outline: none; font-family: inherit;
    transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
  }
  .cal-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
  .cal-form .cal-field-controls > input[type="text"],
  .cal-form .cal-field-controls > input[type="date"] { flex: 1 1 100%; }
  .cal-sel { flex: 0 0 auto; }
  .cal-colon { color: var(--muted); font-weight: 600; }
  .cal-endout { font-size: 12px; color: var(--faint); margin-left: auto; }

  /* ---- Aero variants ---- */
  [data-skin="aero"] .cal-overlay {
    background: var(--surface);
    -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
  }
  [data-skin="aero"] .cal-topbar,
  [data-skin="aero"] .cal-weekday,
  [data-skin="aero"] .cal-day { border-color: var(--aero-glass-edge); }
  [data-skin="aero"] .cal-day:hover { background: rgba(255,255,255,.30); }
  [data-skin="aero"][data-theme="dark"] .cal-day:hover { background: rgba(120,180,255,.16); }
  [data-skin="aero"] .cal-chip {
    background: linear-gradient(to bottom, rgba(255,255,255,.55), rgba(120,200,255,.28));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 1px 3px rgba(10,40,70,.18);
  }
  [data-skin="aero"][data-theme="dark"] .cal-chip {
    background: linear-gradient(to bottom, rgba(120,180,255,.30), rgba(58,160,255,.16));
  }
  [data-skin="aero"] .cal-input { background: rgba(255,255,255,.62); }
  [data-skin="aero"][data-theme="dark"] .cal-input { background: rgba(14,40,66,.6); }
  [data-skin="aero"] .cal-grid-head,
  [data-skin="aero"] .cal-grid-dayhead,
  [data-skin="aero"] .cal-grid-col { border-color: var(--aero-glass-edge); }
  [data-skin="aero"] .cal-grid-col { background-image: repeating-linear-gradient(to bottom, var(--aero-glass-edge) 0, var(--aero-glass-edge) 1px, transparent 1px, transparent 48px); }
  [data-skin="aero"] .cal-grid-dayhead.is-clickable:hover { background: rgba(255,255,255,.30); }
  [data-skin="aero"][data-theme="dark"] .cal-grid-dayhead.is-clickable:hover { background: rgba(120,180,255,.16); }
  [data-skin="aero"] .cal-block { background: linear-gradient(to bottom, rgba(255,255,255,.6), rgba(120,200,255,.32)); box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 1px 3px rgba(10,40,70,.2); }
  [data-skin="aero"][data-theme="dark"] .cal-block { background: linear-gradient(to bottom, rgba(120,180,255,.32), rgba(58,160,255,.18)); }

  /* ============================================================
   *  Windows XP "Luna" sidebar — Aero skin ONLY, scoped to .sidebar.
   *  Pure CSS gradients (scale with the collapsing width). Minimal theme
   *  and the rest of Aero are untouched.
   * ============================================================ */
  [data-skin="aero"] .sidebar {
    /* Optional: drop your OWN / licensed texture into ./assets and set, e.g.:
         --aero-sidebar-image: url('assets/luna-sidebar.png');
       Leave as 'none' to use the built-in CSS Luna gradient. */
    --aero-sidebar-image: none;
    -webkit-backdrop-filter: none; backdrop-filter: none;
    background-color: #2453a6;
    background-image:
      var(--aero-sidebar-image),
      /* top gloss sheen */
      linear-gradient(to bottom, rgba(255,255,255,.40) 0%, rgba(255,255,255,.06) 12%, rgba(255,255,255,0) 24%),
      /* faint brushed texture */
      repeating-linear-gradient(to bottom, rgba(255,255,255,.035) 0px, rgba(255,255,255,.035) 1px, rgba(0,0,0,.025) 2px, rgba(0,0,0,.025) 3px),
      /* main Luna blue: sky-blue top → deep royal blue */
      linear-gradient(to bottom, #4ea2ec 0%, #2f73c8 24%, #2358ac 58%, #1b4593 100%);
    background-repeat: no-repeat;
    background-size: cover, auto, auto, auto;
    border: none;
    box-shadow: inset -1px 0 0 rgba(255,255,255,.18), inset 1px 0 0 rgba(255,255,255,.25), 2px 0 14px rgba(10,40,90,.30);
  }
  [data-skin="aero"] .sidebar::before { display: none; }   /* drop the generic glass top-gloss */

  /* Top header band (N / app name) — lighter XP user-header blue */
  [data-skin="aero"] .sidebar-brand {
    margin: -16px -16px 10px; padding: 14px 16px 12px 22px;   /* left:22px centers the N in the 84px rail + aligns it with the avatar column */
    background: linear-gradient(to bottom, #6fb2f2 0%, #4a8ddd 60%, #3f82d6 100%);
    border-bottom: 1px solid rgba(255,255,255,.5);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.55), inset 0 -2px 5px rgba(0,30,80,.18);
  }
  /* Bottom zone (Calendrier / Paramètres) — XP green system strip */
  [data-skin="aero"] .sidebar-footer {
    margin: 10px -16px -16px; padding: 12px 16px 14px;
    background: linear-gradient(to bottom, #86c25a 0%, #5fa235 55%, #4f8f2a 100%);
    border-top: 1px solid rgba(255,255,255,.55);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
  }

  /* Foreground legibility on the saturated blue/green */
  [data-skin="aero"] .sidebar .brand-name,
  [data-skin="aero"] .sidebar .rail-label,
  [data-skin="aero"] .sidebar .meeting-name {
    color: #ffffff; text-shadow: 0 1px 1px rgba(0,30,80,.4);
  }
  [data-skin="aero"] .sidebar .meeting-name::placeholder { color: rgba(255,255,255,.7); }
  [data-skin="aero"] .sidebar .meeting-name:hover { background: rgba(255,255,255,.16); }
  [data-skin="aero"] .sidebar .meeting-name:focus { background: rgba(255,255,255,.96); color: #1b4593; text-shadow: none; border-color: rgba(255,255,255,.85); }
  [data-skin="aero"] .sidebar .meeting-del { color: rgba(255,255,255,.85); }
  [data-skin="aero"] .sidebar .meeting-del:hover { color: #fff; background: rgba(255,255,255,.2); }

  /* Aero ONLY: hide the meetings-history scrollbar in every state (incl. sidebar:hover)
     while keeping scroll fully functional — wheel/trackpad still scroll the list.
     Same specificity as the base .sidebar:not(:hover) rule but later in source, so it wins. */
  [data-skin="aero"] .sidebar .meeting-list {
    overflow-y: auto;            /* keep overflow/scroll behavior intact */
    scrollbar-width: none;       /* Firefox */
    -ms-overflow-style: none;    /* old Edge / IE */
  }
  [data-skin="aero"] .sidebar .meeting-list::-webkit-scrollbar {
    width: 0; height: 0; display: none;   /* WebKit / Chrome / Safari */
  }

  /* Glossy white avatar/header tiles so the letter stays dark + legible on blue */
  [data-skin="aero"] .sidebar .avatar,
  [data-skin="aero"] .sidebar .brand-mark {
    background: linear-gradient(to bottom, rgba(255,255,255,.98), rgba(222,236,255,.86));
    color: #1b4593;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 1px 2px rgba(0,30,80,.3);
  }
  /* "+" tile and footer icons → white on the panel */
  [data-skin="aero"] .sidebar .new-meeting .sq {
    background: rgba(255,255,255,.12); border: 1px dashed rgba(255,255,255,.6); color: #fff;
  }
  [data-skin="aero"] .sidebar .new-meeting:hover .sq {
    background: rgba(255,255,255,.22); border-style: solid; border-color: #fff; color: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.18);
  }
  [data-skin="aero"] .sidebar-footer .settings-btn .sq { background: rgba(255,255,255,.14); color: #fff; }
  [data-skin="aero"] .sidebar-footer .settings-btn:hover .sq { background: rgba(255,255,255,.28); color: #fff; }

  /* Hover / active selection — readable on the blue panel, white text kept */
  [data-skin="aero"] .sidebar .meeting:hover { background: rgba(255,255,255,.16); }
  [data-skin="aero"] .sidebar .meeting.is-active {
    background: linear-gradient(to bottom, rgba(255,255,255,.42), rgba(255,255,255,.14));
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.75), 0 0 12px rgba(120,190,255,.5);
  }
  [data-skin="aero"] .sidebar .meeting.is-active .avatar { box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 0 0 2px rgba(255,255,255,.9); }

  /* Aero footer: space out + gel-style the Calendrier / Paramètres buttons */
  [data-skin="aero"] .sidebar-footer { display: flex; flex-direction: column; gap: 8px; }
  [data-skin="aero"] .sidebar-footer .settings-btn {
    padding: 7px 6px; border-radius: 10px;   /* 6px sides center the 40px icon tile in the collapsed pill (aligns with avatar column) */
    background: linear-gradient(to bottom, rgba(255,255,255,.32), rgba(255,255,255,.10) 50%, rgba(255,255,255,.04) 51%, rgba(255,255,255,.14));
    border: 1px solid rgba(255,255,255,.45);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 1px 3px rgba(0,40,20,.22);
    transition: background .16s var(--ease), box-shadow .16s var(--ease), transform .12s var(--ease);
  }
  [data-skin="aero"] .sidebar-footer .settings-btn:hover {
    background: linear-gradient(to bottom, rgba(255,255,255,.5), rgba(255,255,255,.16) 50%, rgba(255,255,255,.08) 51%, rgba(255,255,255,.24));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 0 12px rgba(255,255,255,.4), 0 1px 4px rgba(0,40,20,.25);
  }
  [data-skin="aero"] .sidebar-footer .settings-btn:active { transform: translateY(1px); box-shadow: inset 0 2px 5px rgba(0,40,20,.3); }
  [data-skin="aero"] .sidebar-footer .settings-btn:focus-visible { box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 0 0 3px rgba(255,255,255,.4); }

  /* Aero : recherche, zone de saisie, date et état vide → texte blanc.
     Cible tout le skin Aero (clair + sombre). À placer en fin de <style>. */
  [data-skin="aero"] .meeting-sub,
  [data-skin="aero"] .empty,
  [data-skin="aero"] .empty h3 {
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .55);
  }

  /* EXCEPTION — .search et .composer sont des SURFACES D'ÉCRITURE, pas du texte posé sur
     le ciel. En blanc elles étaient illisibles en Aero clair : le panneau est
     --surface rgba(255,255,255,.58) par-dessus le fond clair assets/Aero.png, donc du
     blanc sur du blanc (contraste mesuré 1,03:1 sur les zones de nuage). Elles suivent
     désormais la convention déjà appliquée à tous les autres champs Aero
     (.cal-input, .note-edit-input, .add-topic input) : un panneau assez opaque + var(--text).
     Après correction : 12,7–14,0:1 en clair, 7,9–8,9:1 en sombre. */
  [data-skin="aero"] .composer,
  [data-skin="aero"] .search { background: rgba(255, 255, 255, .78); }
  [data-skin="aero"][data-theme="dark"] .composer,
  [data-skin="aero"][data-theme="dark"] .search { background: rgba(14, 40, 66, .88); }
  /* En sombre, le reflet blanc du haut délavait encore le texte (4,5:1) : on l'atténue sur
     le composeur uniquement — tout le reste du skin garde son verre intact. */
  [data-skin="aero"][data-theme="dark"] .composer::before { opacity: .25; }
  [data-skin="aero"] .search-input,
  [data-skin="aero"] .composer textarea {
    color: var(--text);
    text-shadow: none;
  }
  [data-skin="aero"] .search-input::placeholder,
  [data-skin="aero"] .composer textarea::placeholder {
    color: var(--muted);
  }

  /* Aero: popovers must stay viewport-positioned (JS sets top/left in screen coords).
     The Aero glass rule sets position:relative on .popover, which broke this. */
  [data-skin="aero"] .popover { position: fixed; }

  /* ============================================================
   *  Auth gate (login / signup) — shown before the app when logged out.
   *  Reuses .modal (glass card), .cal-input (fields) and .btn styles, so it
   *  matches Minimal + Aero, light + dark with no extra theming needed.
   * ============================================================ */
  .auth-screen {
    position: fixed; inset: 0; z-index: 100;
    display: flex; align-items: center; justify-content: center;
    padding: 24px; overflow-y: auto;
    background: var(--bg);
    animation: fadeIn .2s var(--ease);
  }
  /* Aero: paint the same sky so the app behind is fully covered
     (the app's .aero-bg layer sits at z-index 0, below .app, so a transparent
     overlay would let the app show through — we repaint the sky here instead). */
  [data-skin="aero"] .auth-screen {
    background-color: var(--aero-sky-mid);
    background-image:
      var(--aero-bg-image),
      linear-gradient(to bottom, var(--aero-sky-top) 0%, var(--aero-sky-mid) 48%, var(--aero-sky-bot) 100%);
    background-size: cover, cover; background-position: center, center; background-repeat: no-repeat, no-repeat;
  }
  .auth-card { max-width: 360px; }
  .auth-brand { display: flex; align-items: center; gap: 12px; }
  .auth-title { font-weight: 650; font-size: 17px; }
  .auth-subtitle { color: var(--muted); font-size: 14px; margin: 4px 0 18px; }
  .auth-form { display: flex; flex-direction: column; gap: 12px; }
  .auth-field { display: flex; flex-direction: column; gap: 5px; }
  .auth-label { font-size: 12px; font-weight: 600; color: var(--muted); }
  .auth-input { width: 100%; }
  .auth-submit { width: 100%; justify-content: center; margin-top: 4px; padding: 10px 13px; }
  .auth-msg { font-size: 13px; line-height: 1.45; border-radius: 9px; padding: 9px 11px; }
  .auth-msg.is-error { color: var(--danger); background: var(--accent-soft); }
  .auth-msg.is-ok { color: var(--text); background: var(--surface-2); }
  .auth-switch { margin-top: 16px; text-align: center; }


  /* ============================================================
   *  Brand as a link (back-to-home on notes.html; home logo on index.html).
   *  Keeps the .sidebar-brand look — just strips default anchor styling.
   * ============================================================ */
  a.sidebar-brand { text-decoration: none; color: inherit; cursor: pointer; }
  a.sidebar-brand:hover .brand-mark { filter: brightness(1.04); }
  a.sidebar-brand:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-soft); border-radius: 12px; }

  /* ============================================================
   *  Cloud data layer — loading overlay + sync-error toast (notes.html).
   *  Themed via the same tokens, so it matches Minimal + Aero, light + dark.
   * ============================================================ */
  .app-loading {
    position: fixed; inset: 0; z-index: 90;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg);
    animation: fadeIn .18s var(--ease);
  }
  [data-skin="aero"] .app-loading {            /* let the Aero sky show through, like the auth gate */
    background-color: var(--aero-sky-mid);
    background-image:
      var(--aero-bg-image),
      linear-gradient(to bottom, var(--aero-sky-top) 0%, var(--aero-sky-mid) 48%, var(--aero-sky-bot) 100%);
    background-size: cover, cover; background-position: center, center; background-repeat: no-repeat, no-repeat;
  }
  .app-loading-card {
    display: flex; flex-direction: column; align-items: center; gap: 14px;
    padding: 26px 30px; max-width: 320px; text-align: center;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  }
  [data-skin="aero"] .app-loading-card {
    -webkit-backdrop-filter: blur(14px) saturate(1.5); backdrop-filter: blur(14px) saturate(1.5);
    border-color: var(--aero-glass-edge);
  }
  .app-spinner {
    width: 34px; height: 34px; border-radius: 50%;
    border: 3px solid var(--border); border-top-color: var(--accent);
    animation: appspin .8s linear infinite;
  }
  @keyframes appspin { to { transform: rotate(360deg); } }
  .app-loading-text { color: var(--muted); font-size: 14px; line-height: 1.5; }

  .toast-host {
    position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%);
    z-index: 120; display: flex; flex-direction: column; gap: 8px; pointer-events: none; max-width: 92vw;
  }
  .toast {
    background: var(--danger); color: #fff; padding: 10px 16px; border-radius: 10px;
    box-shadow: var(--shadow-pop); font-size: 13.5px; line-height: 1.45; pointer-events: auto;
    animation: fadeIn .16s var(--ease);
  }

  @media (prefers-reduced-motion: reduce) {
    .app-spinner { animation-duration: .001ms; }
  }

  /* ============================================================
   *  Account widget (top-right) + account menu
   * ------------------------------------------------------------
   *  Shared by both pages (the hub and the notes app). Additive and cleanly
   *  removable: deleting this block + the JS that builds `.account-widget`
   *  leaves both pages exactly as they were. The dropdown itself reuses the
   *  existing .popover / .menu-item styling (incl. the Aero glass treatment),
   *  so only the chip, the menu header, the separator and the disabled/“soon”
   *  states need styling here.
   * ============================================================ */
  .account-widget {
    position: fixed; top: 12px; right: 16px; z-index: 45;
    display: inline-flex; align-items: center; gap: 8px;
    max-width: 230px; padding: 5px 10px 5px 6px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
    box-shadow: var(--shadow); color: var(--text);
    transition: background .15s var(--ease), border-color .15s var(--ease), box-shadow .15s var(--ease), transform .12s var(--ease);
  }
  .account-signup { padding: 8px 16px; font: 600 .86rem/1 var(--font, inherit); cursor: pointer; white-space: nowrap; }   /* « Créer un compte » : même pastille, avec du texte */
  .account-widget:hover { border-color: var(--faint); box-shadow: var(--shadow-pop); }
  .account-widget:active { transform: translateY(1px); }
  .account-widget:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow); }

  /* the avatar — a round chip. Default is a generic silhouette (the JS draws a
     'user' icon inside); a per-user <img> can be dropped in later with no CSS change. */
  .account-avatar {
    width: 30px; height: 30px; min-width: 30px; border-radius: 999px;
    display: flex; align-items: center; justify-content: center; overflow: hidden;
    background: var(--avatar-bg); color: var(--avatar-text);
  }
  .account-avatar svg { width: 18px; height: 18px; }
  .account-avatar img { width: 100%; height: 100%; object-fit: cover; }
  .account-name { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .account-caret { color: var(--faint); display: flex; flex: 0 0 auto; }
  .account-caret svg { width: 16px; height: 16px; }

  /* dropdown header (avatar + “signed in as @name”) */
  .account-menu-head { display: flex; align-items: center; gap: 10px; padding: 4px 6px 10px; }
  .account-avatar-lg { width: 38px; height: 38px; min-width: 38px; }
  .account-avatar-lg svg { width: 22px; height: 22px; }
  .account-menu-id { min-width: 0; }
  .account-menu-label { font-size: 11.5px; color: var(--faint); }
  .account-menu-name { font-size: 14px; font-weight: 650; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  /* menu rows: separator, the flexible label, the danger (logout) row, and the
     disabled “coming soon” rows with their badge */
  .menu-sep { height: 1px; background: var(--border); margin: 6px 4px; }
  .menu-item-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .menu-item.danger { color: var(--danger); }
  .menu-item.danger .ic { color: var(--danger); }
  .menu-item.is-soon, .menu-item:disabled { color: var(--faint); cursor: default; }
  .menu-item.is-soon .ic, .menu-item:disabled .ic { color: var(--faint); }
  .menu-item.is-soon:hover, .menu-item:disabled:hover { background: none; }
  .menu-badge {
    margin-left: auto; flex: 0 0 auto; font-size: 10.5px; font-weight: 600; letter-spacing: .02em;
    color: var(--muted); background: var(--surface-2); border: 1px solid var(--border);
    border-radius: 999px; padding: 1px 8px;
  }

  /* keep each page's top content clear of the fixed widget while logged in.
     The notes header title is left-aligned, so reserve room on its right; the hub
     title is centered and its top-right is empty, so it needs nothing. */
  body.has-account .meeting-header { padding-right: 150px; }

  @media (max-width: 640px) {
    .account-widget { max-width: none; padding: 5px; }
    .account-widget.account-signup { padding: 7px 12px; font-size: .8rem; }
    .account-name, .account-caret { display: none; }   /* avatar-only on small screens; name still in the menu */
    body.has-account .meeting-header { padding-right: 46px; }
  }

  /* ---- Aero: glossy “gel” chip + badge (the dropdown inherits .popover glass) ---- */
  [data-skin="aero"] .account-widget {
    -webkit-backdrop-filter: blur(14px) saturate(1.5); backdrop-filter: blur(14px) saturate(1.5);
    background: var(--surface); border: 1px solid var(--aero-glass-edge);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 6px 18px rgba(10,40,70,.18);
  }
  [data-skin="aero"] .account-widget:hover { filter: brightness(1.02) saturate(1.05); }
  [data-skin="aero"] .account-avatar {
    background: linear-gradient(to bottom, rgba(255,255,255,.6), rgba(120,200,255,.32));
    color: #1577dd; box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 1px 3px rgba(10,40,70,.2);
  }
  [data-skin="aero"][data-theme="dark"] .account-avatar {
    background: linear-gradient(to bottom, rgba(120,180,255,.32), rgba(58,160,255,.18)); color: #cfeaff;
  }
  [data-skin="aero"] .menu-badge {
    color: #fff; border-color: rgba(255,255,255,.55);
    background: linear-gradient(to bottom, rgba(150,168,178,.62), rgba(108,128,138,.56));
    text-shadow: 0 1px 1px rgba(0,40,80,.35);
  }

  /* ---- Account switcher rows (inside the .popover; reuses .menu-item / .icon-btn / .menu-badge) ---- */
  .acct-switch-list { display: flex; flex-direction: column; max-height: 280px; overflow-y: auto; }
  .acct-row { display: flex; align-items: center; gap: 2px; }
  .acct-row .menu-item { flex: 1; min-width: 0; }                 /* the selectable part fills the row */
  .acct-row .acct-forget { flex: 0 0 auto; }                      /* the remove "x" sits at the end */
  .acct-forget:hover { color: var(--danger); }
  /* the row avatar keeps its own colour (don't let .menu-item .ic mute it — incl. the Aero blue gel) */
  .acct-row .account-avatar .ic { color: inherit; }

  /* ---- Avatar picker (inside .popover, so it inherits the Aero glass surface for free) ---- */
  .avatar-grid {
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px;
    padding: 4px 2px 2px; max-height: 300px; overflow-y: auto;
  }
  .avatar-cell {
    position: relative; width: 100%; aspect-ratio: 1 / 1; padding: 0;
    border: 1px solid var(--border); border-radius: 999px; background: var(--surface-2);
    overflow: hidden; cursor: pointer;
    transition: transform .12s var(--ease), box-shadow .15s var(--ease), border-color .15s var(--ease);
  }
  .avatar-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .avatar-cell:hover { transform: translateY(-1px); border-color: var(--faint); }
  .avatar-cell:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
  /* selected state — an accent ring, clearly visible in Minimal + Aero, light + dark */
  .avatar-cell.is-selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
