/* Stable glass: direct CSS transparency, never a sampled wallpaper bitmap.
   Restore the pre-PDF material base; retain 26px bubbles and directional highlights.
   No optical canvas, displacement, blur, scroll handlers, or background copies. */
body{
  --message-glass-fill:radial-gradient(ellipse at 6% 0%,rgba(255,255,255,.26),transparent 48%),radial-gradient(ellipse at 100% 100%,rgba(255,255,255,.12),transparent 44%),linear-gradient(150deg,rgba(255,255,255,.22),rgba(255,255,255,.10) 52%,rgba(255,255,255,.16));
  --message-glass-shadow:inset 0 1px 2px rgba(255,255,255,.36),inset 0 -1px 2px rgba(65,84,100,.055),0 4px 12px rgba(35,49,61,.055);
  --bubble-water-fill:radial-gradient(ellipse 125% 150% at -18% -42%,transparent 53%,rgba(63,86,105,.025) 59%,transparent 66%),var(--message-glass-fill);
  --bubble-water-shadow:inset 0 1px 2px rgba(255,255,255,.44),inset 0 -2px 4px rgba(65,84,100,.065),0 4px 12px rgba(35,49,61,.06);
}
body.theme-night{
  --message-glass-fill:radial-gradient(ellipse at 6% 0%,rgba(255,255,255,.10),transparent 48%),radial-gradient(ellipse at 100% 100%,rgba(205,221,238,.055),transparent 44%),linear-gradient(150deg,rgba(180,193,210,.18),rgba(160,179,200,.08) 52%,rgba(180,193,210,.13));
  --message-glass-shadow:inset 0 1px 2px rgba(255,255,255,.20),inset 0 -1px 2px rgba(0,0,0,.12),0 4px 12px rgba(0,0,0,.09);
  --bubble-water-fill:radial-gradient(ellipse 125% 150% at -18% -42%,transparent 53%,rgba(0,0,0,.045) 59%,transparent 66%),var(--message-glass-fill);
  --bubble-water-shadow:inset 0 1px 2px rgba(255,255,255,.27),inset 0 -2px 4px rgba(0,0,0,.15),0 4px 12px rgba(0,0,0,.10);
}
/* Native selectors cover existing and newly delivered content without a JS
   registry. Extra specificity outranks legacy group-input/important fill rules.
   Geometry, text, pointer behavior, stacking, and clipping remain untouched. */
html body #app#app :is(
  :is(#chat-messages,#detail-messages,#grp-msgs) .msg-bubble.v,
  #chat-messages .typing-bubble,
  :is(#chat-messages,#detail-messages,#grp-msgs) :is(.sys-card,.activity-recap),
  #view-history :is(.history-item,.hist-group-head,.history-clear-btn,.detail-back-btn),
  #reverie-tabs-row :is(.rdx-card,.rdx-pill,.rev-hero,.rev-mid,.rev-card,.rev-pill,#rev-btn-proposal,#rev-btn-fil,.rev-quick-access>summary),
  #view-console>.console-content>.console-card,
  #view-console>.console-content>.console-card:last-child .console-btn,
  #grp-members>.grp-member,
  .grp-chat-avatar,
  #grp-inputbar :is(#grp-input,.grp-btn,.grp-composer-tools>summary),
  #composer :is(#composer-input,#composer-extra-toggle,#send-btn),
  #composer-extra .heat-card,
  #composer-tools-popup,
  #top-tools-popup,
  #permission-prompt-msg :is(.pi-ui-card,.pi-ui-button,.pi-ui-input),
  /* Heart/recall surfaces are paired in chat-water-ui/water-ui.css. */
  #reverie-pulse-view .pulse-toolbelt
){
  background:var(--bubble-water-fill)!important;
  border-color:transparent!important;
  box-shadow:var(--bubble-water-shadow)!important;
  color:var(--message-glass-ink)!important;
  backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
  text-shadow:none!important;
}
/* New push bubbles retain their existing alignment, width, padding and scrolling. */
html body #app :is(#chat-messages,#detail-messages,#grp-msgs) :is(.sys-card,.activity-recap){border:1px solid transparent!important;border-radius:26px!important}
/* Pulse remains one bubble, with tappable controls and wrapped mobile explanation. */
#app #reverie-pulse-view .pulse-toolbelt{
  border:1px solid transparent;border-radius:26px;padding:10px 12px;gap:8px;
  background:var(--bubble-water-fill);box-shadow:var(--bubble-water-shadow);
  color:var(--message-glass-ink);backdrop-filter:none;-webkit-backdrop-filter:none;
  overflow:visible;flex-wrap:wrap;
}
#app #reverie-pulse-view .pulse-toolbelt button{min-height:40px;background:transparent;border-color:transparent;box-shadow:none;color:var(--message-glass-ink)}
#app #reverie-pulse-view .pulse-toolbelt button.primary{background:rgba(124,151,175,.12);font-weight:600}
#app #reverie-pulse-view .pulse-toolbelt .rev-tool-note{color:var(--message-glass-ink);opacity:.65}
@media(max-width:430px){#app #reverie-pulse-view .pulse-toolbelt .rev-tool-note{display:block;width:100%;margin-left:0;font-size:11px;white-space:normal}}
