/* GENESIS Messenger · CHATGPT-WEB PARITY LAYER styles (USER-DIRECTED).
   Apple-neutral surfaces per the restored visual contract:
   raised panels, token borders, pill geometry, SF stack, quiet shadows.
   All interactive states keyboard-safe; reduced-motion respected. */

/* ---------- shared popover ---------- */
.gm-parity-pop {
  position: absolute;
  z-index: 90;
  min-width: 260px;
  max-width: min(420px, calc(100vw - 16px));
  max-height: min(440px, calc(100vh - 32px));
  overflow: auto;
  background: var(--gm-raised, #242426);
  border: 1px solid var(--gm-border, #3a3a3c);
  border-radius: 14px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .38);
  padding: 6px;
  font: 13px/1.35 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  color: var(--gm-text, #f5f5f7);
}
.gm-parity-pop-head {
  padding: 7px 10px 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--gm-muted, #98989d);
}
.gm-parity-pop-body { display: flex; flex-direction: column; gap: 1px; }
.gm-parity-pop[hidden] { display: none; }

/* ---------- shared menu item ---------- */
.gm-parity-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
}
.gm-parity-item:hover:not([disabled]),
.gm-parity-item:focus-visible {
  background: var(--gm-hover, #2c2c2e);
  outline: none;
}
.gm-parity-item:focus-visible { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--gm-accent, #0a84ff) 65%, transparent); }
.gm-parity-item[disabled] { cursor: default; opacity: .55; }
.gm-parity-item-icon { flex: 0 0 auto; width: 20px; text-align: center; opacity: .9; }
.gm-parity-item-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.gm-parity-item-label { font-weight: 590; }
.gm-parity-item-desc { font-size: 11.5px; color: var(--gm-muted, #98989d); }
.gm-parity-item-cat {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--gm-muted, #98989d);
  margin-top: 2px;
}

/* ---------- files in chat ---------- */
.gm-parity-files-convo {
  padding: 2px 10px 6px;
  font-size: 12px;
  color: var(--gm-muted, #98989d);
  border-bottom: 1px solid var(--gm-border-subtle, #2c2c2e);
  margin-bottom: 4px;
}
.gm-parity-files-empty { padding: 8px 10px 10px; margin: 0; font-size: 12.5px; color: var(--gm-muted, #98989d); }
.gm-parity-files-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.gm-parity-file { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 9px; }
.gm-parity-file:hover { background: var(--gm-hover, #2c2c2e); }
.gm-parity-file-meta { display: flex; flex-direction: column; min-width: 0; }
.gm-parity-file-name { font-weight: 590; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-parity-file-desc { font-size: 11.5px; color: var(--gm-muted, #98989d); }

/* ---------- rich composer ---------- */
.gm-rich-host { display: grid; gap: 6px; }
.gm-rich-composer { display: grid; gap: 8px; }
.gm-rich-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 2px;
}
.gm-rich-btn {
  min-width: 30px;
  height: 28px;
  padding: 0 7px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--gm-text, #f5f5f7);
  font: 12.5px/1 -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  cursor: pointer;
}
.gm-rich-btn:hover:not([disabled]) { background: var(--gm-hover, #2c2c2e); }
.gm-rich-btn:focus-visible { outline: 2px solid var(--gm-accent, #0a84ff); outline-offset: 1px; }
.gm-rich-btn[disabled] { opacity: .4; cursor: default; }
.gm-rich-btn[aria-pressed="true"] { background: color-mix(in srgb, var(--gm-accent, #0a84ff) 26%, transparent); color: var(--gm-text); }

.gm-rich-editor {
  min-height: 64px;
  max-height: 240px;
  overflow-y: auto;
  padding: 11px 12px;
  border: 1px solid var(--gm-border, #3a3a3c);
  border-radius: 12px;
  background: var(--gm-raised, #1c1c1e);
  color: var(--gm-text, #f5f5f7);
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  outline: none;
  white-space: pre-wrap;
  word-break: break-word;
}
.gm-rich-editor:focus { border-color: color-mix(in srgb, var(--gm-accent, #0a84ff) 55%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gm-accent, #0a84ff) 18%, transparent); }
.gm-rich-editor:empty::before,
.gm-rich-editor[data-empty="true"]::before {
  content: attr(data-placeholder);
  color: var(--gm-muted, #98989d);
  pointer-events: none;
}
.gm-rich-editor pre {
  background: var(--gm-surface, #141416);
  border: 1px solid var(--gm-border-subtle, #2c2c2e);
  border-radius: 9px;
  padding: 9px 11px;
  overflow-x: auto;
  font: 12.5px/1.5 ui-monospace, "SF Mono", Menlo, monospace;
  margin: 6px 0;
}
.gm-rich-editor code { font: 12.5px/1.4 ui-monospace, "SF Mono", Menlo, monospace; background: var(--gm-surface, #141416); border-radius: 5px; padding: 1.5px 5px; }
.gm-rich-editor pre code { background: transparent; padding: 0; }
.gm-rich-editor blockquote { margin: 6px 0; padding: 2px 0 2px 12px; border-left: 3px solid var(--gm-border, #3a3a3c); color: var(--gm-muted, #b9b9be); }
.gm-rich-editor ul, .gm-rich-editor ol { margin: 6px 0; padding-left: 24px; }
.gm-rich-editor h3 { font-size: 17px; font-weight: 650; letter-spacing: -.01em; margin: 8px 0 2px; }
.gm-rich-editor h4 { font-size: 15px; font-weight: 650; margin: 6px 0 2px; }
.gm-rich-editor a { color: var(--gm-accent, #0a84ff); }

.gm-rich-tools-wrap { display: flex; }
.gm-rich-plus {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--gm-border, #3a3a3c);
  background: var(--gm-raised, #242426);
  color: var(--gm-text, #f5f5f7);
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.gm-rich-plus:hover:not([disabled]) { background: var(--gm-hover, #2c2c2e); }
.gm-rich-plus:focus-visible { outline: 2px solid var(--gm-accent, #0a84ff); outline-offset: 2px; }
.gm-rich-plus[disabled] { opacity: .4; cursor: default; }

.gm-tools-pop { padding: 8px; }
.gm-tools-search {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 6px;
  padding: 8px 11px;
  border: 1px solid var(--gm-border, #3a3a3c);
  border-radius: 9px;
  background: var(--gm-surface, #141416);
  color: var(--gm-text, #f5f5f7);
  font: 13px -apple-system, BlinkMacSystemFont, sans-serif;
}
.gm-tools-search:focus { outline: 2px solid var(--gm-accent, #0a84ff); outline-offset: 0; }
.gm-tools-list { display: flex; flex-direction: column; gap: 1px; max-height: 320px; overflow-y: auto; }

/* ---------- attachment chips ---------- */
.gm-rich-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.gm-rich-chips[hidden] { display: none; }
.gm-rich-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px 5px 10px;
  border: 1px solid var(--gm-border, #3a3a3c);
  border-radius: 9px;
  background: var(--gm-raised, #242426);
  font-size: 12px;
  max-width: 260px;
}
.gm-rich-chip-name { font-weight: 590; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-rich-chip-meta { color: var(--gm-muted, #98989d); font-size: 11px; flex: 0 0 auto; }
.gm-rich-chip-remove {
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: var(--gm-hover, #2c2c2e);
  color: var(--gm-text, #f5f5f7);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}
.gm-rich-chip-remove:hover { background: color-mix(in srgb, #ff453a 30%, var(--gm-hover, #2c2c2e)); }
.gm-rich-chip-remove:focus-visible { outline: 2px solid var(--gm-accent, #0a84ff); outline-offset: 1px; }

/* header "…" button inherits .gm-header-actions button pill geometry — no
   extra rule needed; keep the icon centered. */
#gmChatActions { font-size: 15px; }

/* ---------- P1 navigation parity ---------- */
.gm-nav-item .gm-nav-why {
  display: block;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--gm-muted, #98989d);
  opacity: .85;
}
.gm-nav-item[disabled] { cursor: default; }

/* ---------- global drop overlay ---------- */
.gm-drop-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--gm-surface, #141416) 55%, transparent);
  backdrop-filter: blur(2px);
  pointer-events: none; /* never blocks the underlying UI or drop delivery */
}
.gm-drop-overlay[hidden] { display: none; }
.gm-drop-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 26px 40px;
  border: 2px dashed color-mix(in srgb, var(--gm-accent, #0a84ff) 65%, transparent);
  border-radius: 18px;
  background: color-mix(in srgb, var(--gm-raised, #242426) 92%, transparent);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .45);
  font: 14px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  color: var(--gm-text, #f5f5f7);
}
.gm-drop-overlay[data-state="drag-over"] .gm-drop-card { border-color: var(--gm-accent, #0a84ff); background: color-mix(in srgb, var(--gm-accent, #0a84ff) 10%, var(--gm-raised, #242426)); }
.gm-drop-overlay[data-state="drop-accepted"] .gm-drop-card { border-style: solid; border-color: #30d158; }
.gm-drop-icon { font-size: 26px; color: var(--gm-accent, #0a84ff); }
.gm-drop-text { font-weight: 650; }
.gm-drop-hint { font-size: 11.5px; color: var(--gm-muted, #98989d); }

/* ---------- reduced motion: parity layer adds none of its own; keep any
   inherited transitions calm ---------- */
@media (prefers-reduced-motion: reduce) {
  .gm-parity-pop, .gm-rich-btn, .gm-rich-plus, .gm-rich-editor, .gm-rich-chip { transition: none !important; }
}

/* ---------- narrow viewport ---------- */
@media (max-width: 720px) {
  .gm-parity-pop { max-width: calc(100vw - 20px); }
  .gm-rich-toolbar { gap: 1px; }
  .gm-rich-btn { min-width: 27px; }
}

/* ============================================================================
   CHATGPT-GRAMMAR RECONSTRUCTION (interface pass, 2026-09-17)
   Goal: ChatGPT-like product shell with Genesis inside — conversation canvas
   + one integrated composer dominate; operational chrome demoted; sidebar
   flattened to quiet rows; boxed surfaces unboxed. Loads LAST, so these rules
   compose over the legacy layer without deleting any working capability.
   ========================================================================== */

/* --- CANVAS: the conversation owns the viewport --- */
.messenger-app .gm-conversation {
  border-top-left-radius: 0;
  border: 0;
  background: var(--gm-surface);
}
.gm-orientation { padding: 10px 30px 0; }
.gm-conversation-header {
  padding: 6px 30px 8px;
  border-bottom-color: color-mix(in srgb, var(--gm-border-subtle) 70%, transparent);
  min-height: 0;
}
.gm-conversation-header h1 { font-size: 1.05rem; font-weight: 650; letter-spacing: -.01em; }
.gm-project { margin: 0 0 1px; font-size: .7rem; letter-spacing: .02em; }
/* demote standing status (date + Live Sync) into one quiet inline strip */
.gm-orientation-date { display: inline; font-weight: 500; letter-spacing: .03em; }
.gm-orientation .gm-live-sync,
.gm-orientation [data-gm-live-sync] { display: inline-flex; }
/* unbox the unavailable-transcript notice */
.gm-transcript-unavailable {
  margin: 34px auto 0;
  border: 0;
  background: transparent;
  max-width: 30rem;
  text-align: center;
  color: var(--gm-muted);
}
.gm-transcript-unavailable strong { display: block; font-weight: 650; color: var(--gm-secondary); }
.gm-transcript-unavailable[data-severity="error"] strong { color: var(--gm-danger); }
.gm-messages { padding: 18px 30px 8px; }
/* message column: readable ChatGPT-like measure */
.gm-messages .message { max-width: 46rem; }
.gm-empty, .gm-error { text-align: center; }
.gm-transcript-footer { padding: 0 30px 6px; }

/* --- SIDEBAR: quiet rows, not boxed cards --- */
.gm-sidebar { padding: 14px 12px 10px; }
.gm-brand-row { padding: 2px 6px 8px; }
.gm-mark { width: 30px; height: 30px; font-size: 17px; border-color: transparent; }
.gm-brand { font-family: var(--gm-font-sans); }
.gm-search-wrap { background: transparent; border-color: transparent; padding: 4px 8px; border-radius: 10px; }
.gm-search-wrap:focus-within { background: color-mix(in srgb, var(--gm-sidebar-text) 7%, transparent); }
.gm-search-wrap input::placeholder { color: var(--gm-sidebar-faint); }
.gm-fresh-start.gm-new-chat { border: 0; background: transparent; color: var(--gm-sidebar-text); }
.gm-fresh-start.gm-new-chat:hover { background: color-mix(in srgb, var(--gm-sidebar-text) 8%, transparent); }
.gm-current-conversation { border: 0; background: transparent; padding: 6px 12px; }
.gm-current-conversation strong { font-size: .8rem; font-weight: 650; }
.gm-roster-head { padding: 2px 12px 0; }
.conversation { border: 0; padding: 7px 12px; }
.conversation .gm-row-meta { display: none; }
.conversation:hover .gm-row-meta, .conversation.active .gm-row-meta { display: block; }
.conversation.active .gm-row-title::after { content: ""; }
.gm-group.gm-project > .gm-group-toggle { padding: 7px 10px; font-size: .78rem; }
.gm-group .gm-group-items { margin-left: 0; padding-left: 16px; }
.gm-group-count { background: transparent; padding: 0 2px; }
/* demote the gm-nav-why sublabels to a tooltip (title already set) */
.gm-nav-item .gm-nav-why { display: none; }

/* --- COMPOSER: ONE integrated rounded surface --- */
.messenger-app .messenger-composer {
  margin: 0 auto 18px !important;
  width: min(760px, calc(100% - 48px)) !important;
  padding: 10px 10px 8px !important;
  border: 1px solid var(--gm-border) !important;
  border-radius: 24px !important;
  background: var(--gm-raised) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .18) !important;
}
.messenger-app .messenger-composer:focus-within {
  border-color: color-mix(in srgb, var(--gm-accent) 45%, transparent) !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .18), 0 0 0 3px color-mix(in srgb, var(--gm-accent) 16%, transparent) !important;
}
/* legacy grid internals become an integrated stack; the old actions row
   merges into the bottom control row */
.messenger-app .messenger-composer-actions {
  grid-column: auto !important;
  border-top: 0 !important;
  padding-top: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  min-height: 34px;
}
.messenger-app .messenger-composer-actions button {
  padding: 7px 14px !important;
  min-height: 30px;
}
/* rich host: editor area above, + button joins the bottom row */
.gm-rich-host { display: contents; }
.gm-rich-composer { display: flex !important; flex-direction: column; gap: 6px; }
.gm-rich-toolbar {
  /* contextual bubble: floats ABOVE the selection inside the composer pill,
     never reflows the editor content */
  position: absolute;
  left: 50%;
  top: -50px;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--gm-border);
  border-radius: 12px;
  background: var(--gm-surface-2, var(--gm-raised));
  box-shadow: 0 10px 30px rgba(0, 0, 0, .28);
}
.messenger-app .messenger-composer { position: relative !important; }
.gm-rich-toolbar[hidden] { display: none !important; }
.gm-rich-btn { min-width: 28px; height: 26px; border-radius: 7px; border: 0; background: transparent; color: var(--gm-secondary); font-size: 12px; font-weight: 650; cursor: pointer; }
.gm-rich-btn:hover { background: var(--gm-hover); color: var(--gm-text); }
.gm-rich-btn[aria-pressed="true"] { background: var(--gm-accent-soft); color: var(--gm-accent-strong); }
.gm-rich-tools-wrap { order: 3; margin-top: -32px; align-self: flex-start; padding-left: 2px; }
.gm-rich-plus { width: 30px; height: 30px; border: 0; background: transparent; color: var(--gm-secondary); font-size: 18px; }
.gm-rich-plus:hover:not([disabled]) { background: var(--gm-hover); }
/* editor text: transparent reading surface inside the pill */
.gm-rich-editor { border: 0 !important; background: transparent !important; min-height: 52px; max-height: 220px; overflow-y: auto; padding: 2px 4px 0 !important; box-shadow: none !important; }
.gm-rich-editor:focus { box-shadow: none !important; border: 0 !important; }
/* plain-mode textarea: same integrated geometry */
.messenger-app .messenger-composer textarea {
  min-height: 52px !important;
  border: 0 !important;
  background: transparent !important;
  padding: 2px 4px 0 !important;
}
/* attachment chips live INSIDE the pill (order between editor and controls) */
.gm-rich-chips { order: 2; padding: 0 4px; }
.gm-rich-chip { background: var(--gm-surface-2, var(--gm-raised)); }
/* status line sits inside the pill, quiet */
.messenger-app .messenger-composer-actions span { font-size: .72rem !important; }
/* spacer so the + and the send cluster don't overlap when status is long */
.messenger-app .messenger-composer-actions span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.messenger-app .messenger-composer-actions button { flex: 0 0 auto; }

/* --- TOOLS POPOVER: ChatGPT menu grammar --- */
.gm-tools-pop { width: 340px; padding: 6px; }
.gm-tools-pop .gm-tools-list { max-height: 330px; }
.gm-tools-search {
  order: 2;
  margin: 6px 2px 2px;
  border-top: 0;
  background: var(--gm-surface, #141416);
  border-radius: 9px;
}
.gm-parity-pop .gm-parity-item { padding: 9px 10px; border-radius: 10px; }
.gm-parity-pop .gm-parity-item-icon { font-size: 15px; width: 22px; text-align: center; }
.gm-parity-pop .gm-parity-item-label { font-size: 13.5px; font-weight: 590; }
.gm-parity-pop .gm-parity-item-desc { font-size: 12px; color: var(--gm-muted); }
.gm-parity-pop .gm-parity-item-cat { font-size: 10px; }
.gm-parity-item--destructive .gm-parity-item-label,
.gm-parity-item--destructive .gm-parity-item-icon { color: var(--gm-danger) !important; }
.gm-parity-item--destructive .gm-parity-item-desc { color: color-mix(in srgb, var(--gm-danger) 70%, var(--gm-muted)) !important; }

/* --- CHROME DEMOTION: menus, pills, floating cards --- */
.gm-app-menu button { padding: 3px 10px; font-size: .78rem; }
.gm-app-menu { min-height: 28px; }
.gm-header-actions button, .gm-open-source { min-height: 30px !important; height: 30px !important; }
.gm-header-actions .gm-action-label { display: none !important; }
/* Live Work: never a standing card over the conversation — collapsed by
   default via JS below; the toggle remains available */
.gm-live-work-bar { gap: 8px; }
.gm-live-work { width: auto; max-width: min(480px, calc(100vw - 48px)); }
.gm-live-activity[data-mode="compact"] { top: 96px; }

/* --- NARROW --- */
@media (max-width: 720px) {
  .messenger-app .messenger-composer { width: calc(100% - 24px) !important; margin-bottom: 12px !important; }
  .gm-conversation-header { padding: 4px 18px 6px; }
  .gm-messages { padding: 12px 18px 6px; }
  .gm-orientation { padding: 8px 18px 0; }
}

/* NOTE: Live Work default-collapsed state is set by JS (setCollapsed(true,false))
   on init below — CSS alone cannot express the one-time default. */

/* ============================================================
   CHATGPT SIDEBAR · LITERAL RECONSTRUCTION (reference-measured)
   Source: .freebuff/reference/chatgpt-web/chatgpt-web-ui-reference.json
   Sidebar w260 · rows w248 x6 · nav 40h r10 14px · sections 16px muted
   pad 6/16 h32 · conversations 40h · radius 10/8 · black canvas.
   ============================================================ */
:root { --gm-sidebar-width: 260px; }
.gm-sidebar-body { display:flex; flex-direction:column; flex:1 1 auto; min-height:0; overflow:hidden; }
.gm-sidebar {
  width: 260px; min-width: 260px; min-height: 0; overflow: hidden;
  background: rgb(0,0,0); border-right: 1px solid rgba(255,255,255,0.05);
  padding: 8px 6px 10px; display: flex; flex-direction: column; gap: 0;
}
/* brand row: h48 16px/24px + two 40×40 r8 icon buttons; v3: full word always visible */
.gm-brand { white-space:nowrap; overflow:visible; text-overflow:clip; } /* Genesis-brand-v3 */
.gm-brand-row { display:flex; align-items:center; justify-content:space-between; gap:2px; padding:4px 2px 8px; min-height:48px; }
.gm-brand { font-size:16px; line-height:24px; font-weight:700; letter-spacing:-0.2px; color:#fff; padding:0 8px; white-space:nowrap; overflow:visible; text-overflow:clip; } /* Genesis-brand-v3 */
.gm-brand-actions { display:flex; align-items:center; gap:2px; }
.gm-brand-icon { width:40px; height:40px; border-radius:8px; border:0; background:transparent; color:rgb(175,175,175); font-size:17px; line-height:24px; display:flex; align-items:center; justify-content:center; cursor:pointer; padding:0; }
.gm-brand-icon:hover { background:rgba(255,255,255,0.06); color:#fff; }
.gm-brand-icon:focus-visible { outline:2px solid var(--gm-accent,#0a84ff); outline-offset:1px; }
/* secondary roots (reference: Health slot below the project hierarchy) —
   quieter label than primary projects, same row geometry */
.gm-roster .gm-group.gm-secondary .gm-group-title { color:rgb(255,255,255); font-weight:400; }
.gm-roster .gm-group.gm-secondary .gm-folder-icon { color:rgb(175,175,175); }
/* root-chat reveal: compact ⋯ More divider (reference has no root-chat region) */
.gm-more-divider { display:flex; align-items:center; margin:4px 6px 2px; }
.gm-more-chats { display:flex; align-items:center; gap:6px; width:100%; height:40px; border:0; border-radius:10px; background:transparent; color:rgb(175,175,175); font-size:14px; line-height:20px; padding:6px 10px; text-align:left; cursor:pointer; }
.gm-more-chats:hover { background:rgba(255,255,255,0.06); color:#fff; }
/* search row: hidden by default (reference has no persistent search bar);
   revealed in-flow by brand ⌕ click or ⌘K, hides again on blur if empty */
.gm-search-wrap { display:none; align-items:center; margin:0 0 2px; border:0; background:transparent; padding:0; position:relative; }
.gm-search-wrap[data-search-open] { display:flex; }
.gm-search-wrap .gm-ic { position:absolute; left:10px; color:rgb(175,175,175); pointer-events:none; }
.gm-search-wrap input { width:100%; height:40px; border-radius:10px; border:0; background:rgba(255,255,255,0.055); color:#fff; font-size:14px; line-height:20px; padding:6px 10px 6px 34px; margin:0 0; }
.gm-search-wrap:focus-within input { background:rgba(255,255,255,0.09); outline:none; }
.gm-search-wrap::before { content:'⌕'; position:absolute; margin-left:12px; color:rgb(175,175,175); font-size:15px; pointer-events:none; }
.gm-search-wrap { position:relative; }
.gm-search-wrap input::placeholder { color:rgb(175,175,175); }
.gm-fresh-start.gm-new-chat { flex:none; width:calc(100% - 0px); height:40px; border-radius:10px; border:0; background:transparent; color:#fff; font-size:14px; line-height:20px; display:flex; align-items:center; gap:6px; padding:6px 10px; margin:0; }
.gm-fresh-start.gm-new-chat:hover { background:rgba(255,255,255,0.06); }
/* top nav rows: h40 r10 14px/20px gap 6 (reference Library/Scheduled/Plugins) */
.gm-nav { display:flex; flex-direction:column; gap:0; margin:0; padding:0; }
.gm-nav .gm-nav-item { display:flex; align-items:center; gap:6px; width:100%; height:40px; border-radius:10px; border:0; background:transparent; color:#fff; font-size:14px; line-height:20px; padding:6px 10px; margin:0; text-align:left; }
.gm-nav .gm-nav-item:hover:not([disabled]) { background:rgba(255,255,255,0.06); }
.gm-nav .gm-nav-item.active { background:rgba(255,255,255,0.08); }
.gm-nav .gm-nav-item[disabled] { color:rgb(140,140,140); cursor:not-allowed; }
.gm-nav .gm-nav-item .gm-nav-why { display:none; }
/* More row (⋯ More) closes the nav set, pad-bottom 12 like reference */
.gm-sidebar-divider { display:flex; align-items:center; min-height:40px; border-bottom:0; margin:0 0 4px; padding:0 0 12px; }
.gm-sidebar-divider::before { display:none; }
.gm-more-row { display:flex; align-items:center; gap:6px; width:100%; height:40px; border-radius:10px; padding:6px 10px; color:#fff; font-size:14px; line-height:20px; }
/* coherent 16px icon column for every nav-class row */
.gm-ic { width:20px; height:20px; display:inline-flex; align-items:center; justify-content:center; flex:none; color:inherit; }
.gm-ic svg { display:block; }
/* bridge: ONE compact status row (never a prose block in primary navigation) */
.gm-live-bridge { display:flex; align-items:center; justify-content:center; min-height:16px; margin:0; padding:0; border-radius:0; background:transparent; }
.gm-live-bridge .gm-live-bridge-status { display:inline-block; width:8px; height:8px; border-radius:50%; background:rgb(142,142,147); cursor:help; }
.gm-live-bridge[data-bridge-state="connected_local"] .gm-live-bridge-status,
.gm-live-bridge[data-bridge-state="connected_preview"] .gm-live-bridge-status { background:rgb(48,209,88); }
.gm-live-bridge[data-bridge-state="not_connected"] .gm-live-bridge-status { background:rgb(255,159,10); }
.gm-live-bridge .gm-live-bridge-action { display:none !important; }
/* section headers: 16px/24px muted, pad 6px 16px, h32 */
.gm-section-row { display:flex; align-items:center; min-height:32px; padding:6px 16px; color:rgb(175,175,175); font-size:16px; line-height:24px; font-weight:400; }
/* roster container: no boxes */
.gm-roster { display:block !important; flex:1 1 auto; min-height:0; overflow-y:auto; overflow-x:hidden; padding:0 0 8px; scrollbar-width:thin; }
.gm-roster .gm-group-items { display:block !important; width:100%; }
.gm-roster .gm-group { margin:0; padding:0; border:0; background:transparent; }
/* project rows: visually STRONGER than chats (reference: 56h hit geometry with
   40h visual chrome, brighter 16px label, SVG folder glyph, hover fills row) */
.gm-roster .gm-group-toggle { display:flex; align-items:center; gap:10px; width:100%; min-height:56px; border:0; border-radius:10px; background:transparent; color:#fff; font-size:16px; line-height:24px; font-weight:400; padding:8px 10px; margin:0; text-align:left; }
.gm-roster .gm-group-toggle:hover { background:rgba(255,255,255,0.06); }
.gm-roster .gm-folder-icon { width:20px; height:20px; display:inline-flex; align-items:center; justify-content:center; flex:none; color:rgb(255,255,255); }
.gm-roster .gm-folder-icon svg { width:16px; height:16px; }
.gm-roster .gm-group-caret, .gm-roster .gm-group-count { display:none !important; }
/* conversation rows: h40 r10, title-only, quiet; selected = subtle fill */
.gm-roster .conversation { display:flex; align-items:center; width:100%; min-height:40px; border:0; border-radius:10px; background:transparent; color:#fff; font-size:14px; line-height:20px; padding:6px 10px; margin:0 0; text-align:left; gap:6px; }
.gm-roster .conversation:hover { background:rgba(255,255,255,0.05); }
.gm-roster .conversation.active { background:rgba(255,255,255,0.085); }
.gm-roster .conversation .gm-row-title { flex:1 1 auto; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:400; }
.gm-roster .conversation .gm-row-meta { display:none; }
.gm-roster .conversation .gm-pin { opacity:0; transition:opacity .12s ease; }
.gm-roster .conversation:hover .gm-pin, .gm-roster .conversation .gm-pin.pinned, .gm-roster .conversation .gm-pin:focus-visible { opacity:1; }
/* nested chats under an expanded project: ChatGPT-style indent */
.gm-project .gm-group-items:not([hidden]) .conversation { margin-left:30px; width:calc(100% - 30px); }
.gm-project .gm-group-items .gm-show-more { margin-left:30px; width:calc(100% - 30px); }
.gm-group-items[data-section="pinned"] .conversation, .gm-group-items[data-section="root"] .conversation { margin-left:0; width:100%; }
/* Show more: h40 r10 14px muted, text aligned under nested titles */
.gm-show-more { display:flex; align-items:center; min-height:40px; border:0; border-radius:10px; background:transparent; color:rgb(175,175,175); font-size:14px; line-height:20px; padding:6px 10px 6px 36px; margin:0; width:100%; text-align:left; cursor:pointer; }
.gm-show-more:hover { background:rgba(255,255,255,0.06); color:#fff; }
/* More row hover matches nav rows */
.gm-sidebar-divider:hover .gm-more-row { background:rgba(255,255,255,0.06); }
/* footer: avatar + account + quiet truthful status, pinned to the bottom */
.gm-sidebar-footer { display:flex; align-items:center; gap:8px; padding:10px 6px 2px; border-top:0; margin-top:auto; flex:none; }
.gm-sidebar-footer ~ .gm-live-bridge, .gm-live-bridge:has(~ .gm-sidebar-footer) { display:none; }
/* non-text bridge dot rides above the footer, right-aligned, tiny */
.gm-sidebar-body > .gm-live-bridge { display:flex; justify-content:flex-end; padding:0 10px 2px; }
.gm-sidebar-body > .gm-live-bridge[hidden] { display:none; }
.gm-account { display:flex; align-items:center; gap:10px; flex:1 1 auto; min-width:0; }
.gm-account-avatar { width:32px; height:32px; border-radius:50%; background:var(--gm-accent-soft,#5b4bc4); color:#fff; font-size:12px; font-weight:600; display:flex; align-items:center; justify-content:center; flex:none; }
.gm-account-id { display:flex; flex-direction:column; min-width:0; }
.gm-account-id strong { font-size:14px; line-height:20px; font-weight:500; color:#fff; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.gm-account-role { font-size:12px; line-height:16px; color:rgb(175,175,175); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.gm-sidebar-footer .gm-status { font-size:11px; color:rgb(175,175,175); max-width:64px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.gm-sidebar-footer .gm-status:empty { display:none; }
.gm-sidebar-footer .gm-refresh { width:32px; height:32px; border-radius:8px; border:0; background:transparent; color:rgb(175,175,175); font-size:14px; }
.gm-sidebar-footer .gm-refresh:hover { background:rgba(255,255,255,0.06); color:#fff; }
/* legacy current-conversation card: demoted (canvas header owns identity) */
.gm-current-conversation { display:none !important; }
/* resize separator stays an absolutely positioned edge handle (base CSS relies
   on the old non-flex layout; in the flex body it would consume a layout row) */
.gm-sidebar-resize { position:absolute !important; height:100% !important; flex:none !important; }
/* collapsed sidebar: off-canvas drawer, conversation stays primary */
.gm-sidebar { transition:margin-left .18s ease; }
html[data-gm-sidebar="collapsed"] .gm-sidebar { margin-left:-260px; }
html[data-gm-sidebar="collapsed"] .gm-shell { grid-template-columns:0 minmax(0,1fr); }
html[data-gm-sidebar="collapsed"] #gmSidebarReopen { display:flex; }
#gmSidebarReopen { display:none; position:absolute; top:8px; left:8px; z-index:30; width:40px; height:40px; border-radius:8px; border:0; background:transparent; align-items:center; justify-content:center; color:rgb(175,175,175); font-size:17px; cursor:pointer; }
#gmSidebarReopen:hover { background:rgba(255,255,255,0.06); color:#fff; }
#gmSidebarReopen:focus-visible { outline:2px solid var(--gm-accent,#0a84ff); }
.gm-main { position:relative; }
