/* STRIDE web content layer (2026-09-24). Loads after workspace.css and
   stride-kit.css. Per-surface styling for chat content: reactions, replies
   and threads, the phone message action sheet and the sign-in people picker.
   Link-preview anatomy lives beside its renderer in index.html (E4 slice).
   Tokens only; dark (Graphite) first; ember is earned, never a selection. */

/* ---------------------------------------------------------------------
   Attachments: images, galleries, video, files (T0, radius 12, borderless)
   --------------------------------------------------------------------- */
:root :is(#chatTool, #roomChatPanel) .scout-chat-files {
  gap: 4px;
  max-width: min(440px, 100%);
}
:root :is(#chatTool, #roomChatPanel) .scout-chat-msg--user .scout-chat-files { align-self: flex-end; align-items: flex-end; }
:root :is(#chatTool, #roomChatPanel) .scout-chat-msg:not(.scout-chat-msg--user) .scout-chat-files { align-self: flex-start; align-items: flex-start; }

/* one image: its own shape inside 360 × 360 */
:root :is(#chatTool, #roomChatPanel) .scout-chat-file--image {
  position: relative;
  display: block;
  width: fit-content;
  max-width: min(360px, 100%);
  min-height: 0;
  max-height: 360px;
  padding: 0;
  border: 0;
  border-radius: var(--stride-radius-surface, 12px);
  background: var(--surface-3);
  box-shadow: none;
  overflow: hidden;
  cursor: zoom-in;
  transition: transform var(--dur-fast) var(--ease);
}
:root :is(#chatTool, #roomChatPanel) .scout-chat-file--image:active { transform: scale(0.98); }
:root :is(#chatTool, #roomChatPanel) .scout-chat-file--image:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
:root :is(#chatTool, #roomChatPanel) .scout-chat-file--sized {
  --chat-media-max-h: 360px;
  --chat-media-max-w: min(360px, calc(100vw - 96px));
  width: min(calc(var(--chat-media-max-h) * var(--media-aspect)), var(--chat-media-max-w));
  max-width: 100%;
  max-height: none;
  aspect-ratio: var(--media-aspect);
}
:root :is(#chatTool, #roomChatPanel) .scout-chat-file__thumb {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 360px;
  border: 0;
  border-radius: 0;
  object-fit: cover;
  outline: 0;
}
:root :is(#chatTool, #roomChatPanel) .scout-chat-file--sized .scout-chat-file__thumb { width: 100%; height: 100%; max-height: none; }
/* white art keeps an edge on the canvas without a border */
:root :is(#chatTool, #roomChatPanel) .scout-chat-file--image.is-loading { background: var(--surface-3); animation: none; }
@media (prefers-reduced-motion: no-preference) {
  :root :is(#chatTool, #roomChatPanel) .scout-chat-file--image.is-loading:not(.scout-chat-file--gif-held) {
    animation: stride-content-pulse 1.4s var(--ease) infinite alternate;
  }
}
@keyframes stride-content-pulse { from { opacity: 1; } to { opacity: 0.6; } }
:root :is(#chatTool, #roomChatPanel) .scout-chat-file--image.is-loading:not(.scout-chat-file--sized) { min-width: 240px; min-height: 180px; }
:root :is(#chatTool, #roomChatPanel) .scout-chat-file--image.is-broken {
  min-width: 200px;
  min-height: 120px;
  display: grid;
  place-items: center;
  background: var(--surface-3);
  cursor: default;
}
:root :is(#chatTool, #roomChatPanel) .scout-chat-file--image.is-broken .scout-chat-file__thumb { display: none; }
:root :is(#chatTool, #roomChatPanel) .scout-chat-file--image.is-broken::before {
  content: "Image unavailable";
  color: var(--text-3);
  font: 500 12px/16px var(--font-sans);
}

/* expand: an icon on media glass, on hover or focus only */
:root :is(#chatTool, #roomChatPanel) .scout-chat-file--image .scout-chat-image__expand {
  position: absolute;
  top: 8px;
  right: 8px;
  bottom: auto;
  z-index: 2;
  width: 32px;
  height: 32px;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 999px;
  background: var(--glass-media);
  color: #fff;
  box-shadow: none;
  opacity: 0;
  transform: none;
  transition: opacity var(--dur-fast) var(--ease);
  pointer-events: none;
}
@media (hover: hover) {
  :root :is(#chatTool, #roomChatPanel) .scout-chat-file--image:hover .scout-chat-image__expand { opacity: 1; }
}
:root :is(#chatTool, #roomChatPanel) .scout-chat-file--image:focus-visible .scout-chat-image__expand { opacity: 1; }
:root :is(#chatTool, #roomChatPanel) .scout-chat-file--image.is-loading .scout-chat-image__expand,
:root :is(#chatTool, #roomChatPanel) .scout-chat-file--image.is-broken .scout-chat-image__expand { display: none; }
:root :is(#chatTool, #roomChatPanel) .scout-chat-file__tag {
  position: absolute;
  top: 8px;
  inset-inline-start: 8px;
  z-index: 2;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--glass-media);
  color: #fff;
  font: 600 12px/16px var(--font-sans);
  pointer-events: none;
}
:root :is(#chatTool, #roomChatPanel) .scout-chat-file__gif-play {
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 0;
  background: color-mix(in srgb, #000 36%, transparent);
  font: 500 12px/16px var(--font-sans);
}

/* gallery: 2–9 seats on a 6-column grid, gap 2, one outer radius */
:root :is(#chatTool, #roomChatPanel) .scout-chat-gallery {
  width: 360px;
  max-width: 100%;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 2px;
  overflow: hidden;
  border-radius: var(--stride-radius-surface, 12px);
}
:root :is(#chatTool, #roomChatPanel) .scout-chat-gallery .scout-chat-gallery__cell {
  grid-column: span var(--gallery-span, 2);
  width: 100%;
  max-width: none;
  max-height: none;
  aspect-ratio: 1;
  border-radius: 0;
}
:root :is(#chatTool, #roomChatPanel) .scout-chat-gallery .scout-chat-gallery__cell[data-span="6"] { aspect-ratio: 2 / 1; }
:root :is(#chatTool, #roomChatPanel) .scout-chat-gallery .scout-chat-gallery__cell .scout-chat-file__thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
}
:root :is(#chatTool, #roomChatPanel) .scout-chat-gallery .scout-chat-gallery__cell.is-loading:not(.scout-chat-file--sized) { min-width: 0; min-height: 0; }
:root :is(#chatTool, #roomChatPanel) .scout-chat-gallery__more {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  background: var(--scrim, rgba(0, 0, 0, 0.64));
  color: #fff;
  font: 600 22px/1 var(--font-sans);
  font-variant-numeric: tabular-nums;
}

/* video: poster frame at its aspect, native controls, caption under */
:root :is(#chatTool, #roomChatPanel) .scout-chat-file--video {
  width: min(360px, 100%);
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: var(--stride-radius-surface, 12px);
  background: var(--surface-3);
  box-shadow: none;
}
:root :is(#chatTool, #roomChatPanel) .scout-chat-file__video { max-height: 360px; background: var(--bg-stage, #000); }
:root :is(#chatTool, #roomChatPanel) .scout-chat-file__caption { padding: 8px 12px 10px; gap: 0; }

/* file row card: type tile 40 · name · size · open */
:root :is(#chatTool, #roomChatPanel) .scout-chat-file:not(.scout-chat-file--image):not(.scout-chat-file--video) {
  width: min(360px, 100%);
  min-height: 60px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--stride-radius-surface, 12px);
  background: var(--surface-3);
  box-shadow: none;
  text-align: start;
  transition: background-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
@media (hover: hover) {
  :root :is(#chatTool, #roomChatPanel) a.scout-chat-file--link:hover { background: color-mix(in srgb, var(--text-1) 6%, var(--surface-3)); border-color: transparent; }
}
:root :is(#chatTool, #roomChatPanel) a.scout-chat-file--link:active { transform: scale(0.98); }
:root :is(#chatTool, #roomChatPanel) .scout-chat-file__icon {
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--stride-radius-control, 8px);
  background: color-mix(in srgb, var(--text-1) 8%, transparent);
  color: var(--text-2);
}
:root :is(#chatTool, #roomChatPanel) .scout-chat-file__type {
  color: var(--text-1);
  font: 600 12px/1 var(--font-sans);
  letter-spacing: 0.02em;
}
:root :is(#chatTool, #roomChatPanel) .scout-chat-file__body { min-width: 0; flex: 1; gap: 2px; }
:root :is(#chatTool, #roomChatPanel) .scout-chat-file__name {
  max-width: 100%;
  color: var(--text-1);
  font: 600 14px/1.35 var(--font-sans);
  letter-spacing: 0;
}
:root :is(#chatTool, #roomChatPanel) .scout-chat-file__meta {
  color: var(--text-3);
  font: 500 12px/16px var(--font-mono);
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
:root :is(#chatTool, #roomChatPanel) .scout-chat-file__action {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-left: auto;
  color: var(--text-2);
}
:root :is(#chatTool, #roomChatPanel) .scout-chat-file--expired { opacity: 0.72; }

/* lightbox: T3 over a 90% scrim, glass controls on media */
.scout-chat-image-viewer::backdrop {
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
}
.scout-chat-image-viewer__frame { width: 100vw; height: 100dvh; padding: 72px 72px 48px; box-sizing: border-box; }
.scout-chat-image-viewer__image {
  border-radius: var(--stride-radius-surface, 12px);
  outline: 0;
  box-shadow: var(--shadow-3);
  transform-origin: center;
}
.scout-chat-image-viewer__close,
.scout-chat-image-viewer__download,
.scout-chat-image-viewer__step {
  position: fixed;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--glass-media, rgba(28, 28, 32, 0.84));
  color: #fff;
  box-shadow: none;
  cursor: pointer;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: background-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.scout-chat-image-viewer__close { top: max(16px, env(safe-area-inset-top)); right: max(16px, env(safe-area-inset-right)); }
.scout-chat-image-viewer__download { top: max(16px, env(safe-area-inset-top)); right: calc(max(16px, env(safe-area-inset-right)) + 52px); }
.scout-chat-image-viewer__step { top: 50%; transform: translateY(-50%); }
.scout-chat-image-viewer__step--prev { left: max(16px, env(safe-area-inset-left)); }
.scout-chat-image-viewer__step--next { right: max(16px, env(safe-area-inset-right)); }
.scout-chat-image-viewer__step[hidden], .scout-chat-image-viewer__counter[hidden] { display: none; }
@media (hover: hover) {
  .scout-chat-image-viewer__close:hover,
  .scout-chat-image-viewer__download:hover,
  .scout-chat-image-viewer__step:hover { background: color-mix(in srgb, #fff 18%, var(--glass-media, rgba(28, 28, 32, 0.84))); }
}
.scout-chat-image-viewer__close:active,
.scout-chat-image-viewer__download:active { transform: scale(0.92); }
.scout-chat-image-viewer__step:active { transform: translateY(-50%) scale(0.92); }
.scout-chat-image-viewer__close:focus-visible,
.scout-chat-image-viewer__download:focus-visible,
.scout-chat-image-viewer__step:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.scout-chat-image-viewer__counter {
  position: fixed;
  top: max(28px, calc(env(safe-area-inset-top) + 12px));
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.86);
  font: 500 12px/16px var(--font-mono);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 640px) {
  .scout-chat-image-viewer__frame { padding: 64px 0 24px; }
  .scout-chat-image-viewer__step { top: auto; bottom: max(16px, env(safe-area-inset-bottom)); transform: none; }
  .scout-chat-image-viewer__step:active { transform: scale(0.92); }
}
:root :is(#chatTool, #roomChatPanel) .scout-chat-file--video { align-items: stretch; }
:root :is(#chatTool, #roomChatPanel) .scout-chat-file__caption { align-self: stretch; }

/* ---------------------------------------------------------------------
   Message decorations: reply quote, edited, sources, reactions, hover bar,
   thread entry. `:root #appShell #chatTool` outranks the E4 slice without
   !important. Phone (≤640) shows quotes, pills, sources and "Edited"; its
   actions live in the long-press sheet instead of a hover bar.
   --------------------------------------------------------------------- */
:root #appShell #chatTool .scout-chat-msg { position: relative; }
:root #appShell #chatTool .scout-chat-msg.is-flashing::before {
  content: "";
  position: absolute;
  inset: -4px -8px;
  z-index: -1;
  border-radius: var(--stride-radius-surface, 12px);
  background: color-mix(in srgb, var(--text-1) 6%, transparent);
  animation: stride-flash 1.2s var(--ease) forwards;
  pointer-events: none;
}
@keyframes stride-flash { 0%, 50% { opacity: 1; } 100% { opacity: 0; } }

/* reply quote: [face 16] Author · one line — no accent bar, no fill */
:root #appShell #chatTool .desktop-chat-reply {
  order: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  width: auto;
  max-width: min(440px, 100%);
  min-height: 24px;
  margin-bottom: 2px;
  padding: 2px 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--text-2);
  font: 400 14px/20px var(--font-sans);
  text-align: start;
  cursor: pointer;
}
:root #appShell #chatTool .scout-chat-msg--user .desktop-chat-reply { align-self: flex-end; }
@media (hover: hover) {
  :root #appShell #chatTool .desktop-chat-reply:hover { color: var(--text-1); background: none; }
}
:root #appShell #chatTool .desktop-chat-reply:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 6px; }
:root #appShell #chatTool .desktop-chat-reply__avatar {
  flex: none;
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--text-1);
  font: 600 7px/1 var(--font-sans);
}
:root #appShell #chatTool .desktop-chat-reply__avatar img { width: 100%; height: 100%; object-fit: cover; }
:root #appShell #chatTool .desktop-chat-reply__author {
  flex: none;
  color: inherit;
  font: 600 14px/20px var(--font-sans);
  letter-spacing: 0;
}
:root #appShell #chatTool .desktop-chat-reply__text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: inherit;
}

/* "Edited": a quiet label after the body, on every width */
:root #appShell #chatTool .desktop-chat-state {
  position: static;
  order: 3;
  display: inline-flex;
  min-height: 16px;
  margin-top: 2px;
  padding: 0;
  opacity: 1;
  transform: none;
  pointer-events: auto;
  color: var(--text-3);
  font: 500 12px/16px var(--font-sans);
  letter-spacing: 0;
}
:root #appShell #chatTool .scout-chat-msg--user .desktop-chat-state { align-self: flex-end; }

/* sources: neutral chips, no ring */
:root #appShell #chatTool .desktop-chat-sources { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
:root #appShell #chatTool .desktop-chat-source {
  min-width: 0;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text-1) 8%, transparent);
  box-shadow: none;
  color: var(--text-2);
  font: 500 12px/16px var(--font-sans);
}
@media (hover: hover) {
  :root #appShell #chatTool .desktop-chat-source:hover { background: color-mix(in srgb, var(--text-1) 14%, transparent); color: var(--text-1); box-shadow: none; }
}

/* the one interaction surface: pills in flow under the message */
:root #appShell #chatTool .desktop-chat-interactions,
:root #appShell #chatTool .desktop-chat-interactions[data-has-reactions] {
  position: static;
  order: 4;
  display: flex;
  align-items: center;
  align-self: flex-start;
  gap: 4px;
  margin: 0;
  padding: 0;
  background: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
:root #appShell #chatTool .scout-chat-msg--user .desktop-chat-interactions { align-self: flex-end; }
:root #appShell #chatTool .desktop-chat-interactions[data-has-reactions="true"] { margin-top: 6px; }
:root #appShell #chatTool .desktop-chat-reactions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

/* reaction pill: neutral fill; yours a stronger neutral + text-1. No ember,
   no ring. 16px emoji + 12px sans count. */
:root #appShell #chatTool :is(.desktop-chat-reactions button, .chat-context-card__reaction),
:root #appShell #chatTool .desktop-chat-interactions[data-has-reactions="true"] .desktop-chat-reactions button {
  position: relative;
  min-width: 0;
  height: 28px;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 10px 0 8px;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text-1) 8%, transparent);
  box-shadow: none;
  color: var(--text-2);
  font: 600 12px/1 var(--font-sans);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
:root #appShell #chatTool :is(.desktop-chat-reactions button, .chat-context-card__reaction)[aria-pressed="true"],
:root #appShell #chatTool .desktop-chat-interactions[data-has-reactions="true"] .desktop-chat-reactions button[aria-pressed="true"] {
  background: color-mix(in srgb, var(--text-1) 18%, transparent);
  box-shadow: none;
  color: var(--text-1);
}
@media (hover: hover) {
  :root #appShell #chatTool :is(.desktop-chat-reactions button, .chat-context-card__reaction):hover {
    background: color-mix(in srgb, var(--text-1) 14%, transparent);
    color: var(--text-1);
    box-shadow: none;
  }
  :root #appShell #chatTool :is(.desktop-chat-reactions button, .chat-context-card__reaction)[aria-pressed="true"]:hover {
    background: color-mix(in srgb, var(--text-1) 22%, transparent);
  }
}
:root #appShell #chatTool :is(.desktop-chat-reactions button, .chat-context-card__reaction):active { transform: scale(0.94); }
:root #appShell #chatTool :is(.desktop-chat-reactions button, .chat-context-card__reaction)[hidden] { display: none; }
:root #appShell #chatTool .desktop-chat-reactions[hidden] { display: none; }
:root #appShell #chatTool .reaction-pill__emoji { font-size: 16px; line-height: 1; }
:root #appShell #chatTool .reaction-pill__count { display: inline-block; min-width: 1ch; }
:root #appShell #chatTool .reaction-pill__count.is-rolling-up { animation: stride-count-up var(--dur-med, 220ms) var(--ease); }
:root #appShell #chatTool .reaction-pill__count.is-rolling-down { animation: stride-count-down var(--dur-med, 220ms) var(--ease); }
@keyframes stride-count-up { from { transform: translateY(60%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes stride-count-down { from { transform: translateY(-60%); opacity: 0; } to { transform: none; opacity: 1; } }
:root #appShell #chatTool :is(.desktop-chat-reactions button, .desktop-chat-quick-reaction, .reaction-picker__emoji).is-popping {
  animation: stride-reaction-land 320ms cubic-bezier(0.2, 0, 0, 1);
}
@keyframes stride-reaction-land { 0% { transform: scale(0.6); } 55% { transform: scale(1.15); } 100% { transform: scale(1); } }
/* who reacted: a T2 tooltip after a beat (never on touch) */
@media (hover: hover) {
  :root #appShell #chatTool :is(.desktop-chat-reactions button, .chat-context-card__reaction)[data-reactors]::after {
    content: attr(data-reactors);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    z-index: 30;
    max-width: 240px;
    padding: 6px 10px;
    border-radius: var(--stride-radius-control, 8px);
    background: var(--popover-glass-fill);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    backdrop-filter: blur(24px) saturate(1.4);
    box-shadow: var(--popover-shadow);
    color: var(--text-1);
    font: 500 12px/16px var(--font-sans);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0;
    transform: translate(-50%, 2px);
    transition: opacity 120ms var(--ease) 0s, transform 120ms var(--ease) 0s;
    pointer-events: none;
  }
  :root #appShell #chatTool :is(.desktop-chat-reactions button, .chat-context-card__reaction)[data-reactors]:hover::after {
    opacity: 1;
    transform: translate(-50%, 0);
    transition-delay: 400ms;
  }
}

/* hover bar: a floating T2 glass pill at the row's top edge (web, hover) */
@media (min-width: 641px) and (hover: hover) {
  :root #appShell #chatTool .desktop-chat-actions,
  :root #appShell #chatTool .desktop-chat-interactions[data-has-reactions] .desktop-chat-actions {
    position: absolute;
    top: -20px;
    right: 8px;
    left: auto;
    z-index: 12;
    height: 40px;
    max-width: none;
    display: inline-flex;
    align-items: center;
    gap: 0;
    padding: 2px;
    overflow: visible;
    border-radius: 999px;
    background: var(--popover-glass-fill);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    backdrop-filter: blur(24px) saturate(1.4);
    box-shadow: var(--popover-shadow);
    opacity: 0;
    transform: translateY(4px);
    pointer-events: none;
    transition: opacity var(--dur-fast) var(--ease) 0s, transform var(--dur-fast) var(--ease) 0s;
  }
  :root #appShell #chatTool .scout-chat-msg:hover .desktop-chat-actions,
  :root #appShell #chatTool .scout-chat-msg:focus-within .desktop-chat-actions,
  :root #appShell #chatTool .desktop-chat-interactions:focus-within .desktop-chat-actions {
    opacity: 1;
    transform: none;
    pointer-events: auto;
    transition-delay: 50ms;
  }
  :root #appShell #chatTool .scout-chat-msg:has(.desktop-chat-reaction-picker.is-open) { z-index: 20; }
}
:root #appShell #chatTool .desktop-chat-actions button,
:root #appShell #chatTool .desktop-chat-reaction-picker > button,
:root #appShell #chatTool .desktop-chat-quick-reaction {
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  color: var(--text-2);
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
:root #appShell #chatTool .desktop-chat-quick-reaction { font-size: 20px; line-height: 1; }
@media (hover: hover) {
  :root #appShell #chatTool :is(.desktop-chat-actions button, .desktop-chat-quick-reaction):hover {
    background: color-mix(in srgb, var(--text-1) 10%, transparent);
    color: var(--text-1);
    box-shadow: none;
  }
}
:root #appShell #chatTool .desktop-chat-quick-reaction[aria-pressed="true"] { background: color-mix(in srgb, var(--text-1) 16%, transparent); }
:root #appShell #chatTool :is(.desktop-chat-actions button, .desktop-chat-quick-reaction):active { transform: scale(0.92); }
:root #appShell #chatTool .desktop-chat-actions button .chat-action-mark { width: 20px; height: 20px; }
:root #appShell #chatTool .desktop-chat-quick-reactions,
:root #appShell #chatTool .desktop-chat-reaction-picker { display: inline-flex; align-items: center; gap: 0; position: relative; }
:root #appShell #chatTool .desktop-chat-actions__divider { width: 4px; height: 20px; flex: none; }

/* the reaction panel: T2 glass, radius 20, search + recents + all */
:root #appShell :is(#chatTool, #chatContextRail) .desktop-chat-reaction-picker__menu.reaction-picker,
:root #appShell #chatTool .desktop-chat-reaction-picker__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  bottom: auto;
  z-index: 40;
  width: 296px;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 0;
  border-radius: var(--stride-radius-sheet, 20px);
  background: var(--popover-glass-fill);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  backdrop-filter: blur(24px) saturate(1.4);
  box-shadow: var(--popover-shadow);
  transform-origin: top right;
  opacity: 1;
  transform: none;
  transition: opacity var(--dur-med, 220ms) var(--ease), transform var(--dur-med, 220ms) var(--ease), display var(--dur-med, 220ms) allow-discrete;
}
:root #appShell #chatTool .desktop-chat-reaction-picker__menu.is-above { top: auto; bottom: calc(100% + 8px); transform-origin: bottom right; }
@starting-style {
  :root #appShell #chatTool .desktop-chat-reaction-picker__menu:not([hidden]) { opacity: 0; transform: scale(0.96); }
}
:root #appShell #chatTool .desktop-chat-reaction-picker__menu[hidden] { display: none; opacity: 0; transform: scale(0.96); pointer-events: none; }
:root #appShell #chatTool .reaction-picker__search {
  width: 100%;
  height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text-1) 8%, transparent);
  color: var(--text-1);
  font: 400 16px/1 var(--font-sans);
  outline: none;
}
:root #appShell #chatTool .reaction-picker__search::placeholder { color: var(--text-3); }
:root #appShell #chatTool .reaction-picker__search:focus-visible { box-shadow: inset 0 0 0 2px var(--ring); }
:root #appShell #chatTool .reaction-picker__label { color: var(--text-3); font: 500 12px/16px var(--font-sans); padding: 0 2px; }
:root #appShell #chatTool .reaction-picker__label[hidden],
:root #appShell #chatTool .reaction-picker__grid[hidden],
:root #appShell #chatTool .reaction-picker__empty[hidden] { display: none; }
:root #appShell #chatTool .reaction-picker__grid { display: grid; grid-template-columns: repeat(7, 36px); gap: 4px; justify-content: space-between; }
:root #appShell #chatTool .reaction-picker__emoji {
  width: 36px;
  height: 36px;
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: var(--stride-radius-control, 8px);
  background: transparent;
  box-shadow: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
@media (hover: hover) {
  :root #appShell #chatTool .reaction-picker__emoji:hover { background: color-mix(in srgb, var(--text-1) 10%, transparent); }
}
:root #appShell #chatTool .reaction-picker__emoji[aria-pressed="true"] { background: color-mix(in srgb, var(--text-1) 16%, transparent); }
:root #appShell #chatTool .reaction-picker__emoji:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }
:root #appShell #chatTool .reaction-picker__emoji:active { transform: scale(0.9); }
:root #appShell #chatTool .reaction-picker__empty { padding: 8px 2px; color: var(--text-3); font: 500 12px/16px var(--font-sans); }

/* thread entry: faces 24 + "3 replies · 2h ago" + chevron, a ghost pill */
:root #appShell #chatTool .desktop-chat-thread-summary {
  order: 5;
  align-self: flex-start;
  height: 32px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding: 0 10px 0 4px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-1);
}
@media (hover: hover) {
  :root #appShell #chatTool .desktop-chat-thread-summary:hover { background: color-mix(in srgb, var(--text-1) 6%, transparent); color: var(--text-1); }
  :root #appShell #chatTool .desktop-chat-thread-summary:hover .desktop-chat-thread-summary__chevron { opacity: 1; transform: none; }
}
:root #appShell #chatTool .desktop-chat-thread-summary__avatars { min-width: 0; display: inline-flex; padding-left: 0; }
:root #appShell #chatTool .desktop-chat-thread-summary__avatar {
  width: 24px;
  height: 24px;
  margin-left: -6px;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--text-1);
  font: 600 10px/1 var(--font-sans);
  box-shadow: 0 0 0 2px var(--surface-1);
}
:root #appShell #chatTool .desktop-chat-thread-summary__avatar:first-child { margin-left: 0; }
:root #appShell #chatTool .desktop-chat-thread-summary__avatar img { outline: 0; }
:root #appShell #chatTool .desktop-chat-thread-summary__copy { display: inline-flex; align-items: baseline; gap: 4px; }
:root #appShell #chatTool .desktop-chat-thread-summary__count { color: var(--text-1); font: 600 14px/20px var(--font-sans); }
:root #appShell #chatTool .desktop-chat-thread-summary__latest { color: var(--text-3); font: 500 12px/16px var(--font-sans); }
:root #appShell #chatTool .desktop-chat-thread-summary__chevron {
  color: var(--text-3);
  opacity: 0;
  transform: translateX(-2px);
  transition: opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}

/* phone: the decorations the timeline needs; actions move to the sheet */
@media (max-width: 640px) {
  :root #appShell #chatTool .desktop-chat-reply { display: flex; }
  :root #appShell #chatTool .desktop-chat-state { display: inline-flex; }
  :root #appShell #chatTool .desktop-chat-sources { display: flex; }
  :root #appShell #chatTool .desktop-chat-interactions { display: flex; }
  :root #appShell #chatTool .desktop-chat-interactions[data-has-reactions="false"] { display: none; }
  :root #appShell #chatTool .desktop-chat-actions,
  :root #appShell #chatTool .desktop-chat-thread-summary { display: none; }
  :root #appShell #chatTool .scout-chat-msg > .scout-chat-msg__delete { display: none; }
  :root #appShell #chatTool :is(.desktop-chat-reactions button) { height: 32px; min-height: 32px; }
  :root #appShell #chatTool .scout-chat-msg { -webkit-touch-callout: none; }
  :root #appShell #chatTool .scout-chat-msg.is-pressing { transform: scale(0.98); transition: transform 220ms var(--ease); }
}
@media (prefers-reduced-motion: reduce) {
  :root #appShell #chatTool :is(.reaction-pill__count, .desktop-chat-reactions button, .desktop-chat-quick-reaction, .reaction-picker__emoji) { animation: none; }
  :root #appShell #chatTool .scout-chat-msg.is-flashing::before { animation: stride-flash 1.2s linear forwards; }
}
/* zero counts never paint (outranks the pill display rules above) */
:root #appShell #chatTool .desktop-chat-interactions[data-has-reactions] .desktop-chat-reactions button[hidden],
:root #appShell #chatTool .chat-context-card__reactions .chat-context-card__reaction[hidden] { display: none; }
/* a backdrop filter inside the glass bar cannot blur the page behind it,
   so the panel carries the opaque end of the float fill */
:root #appShell :is(#chatTool, #chatContextRail) .desktop-chat-reaction-picker__menu.reaction-picker { background: var(--surface-1); }
:root[data-theme="dark"] #appShell :is(#chatTool, #chatContextRail) .desktop-chat-reaction-picker__menu.reaction-picker { background: var(--surface-3); }

/* ---------------------------------------------------------------------
   Composer reply chip: [↩] Replying to Joel · one line · ×  (no accent bar)
   --------------------------------------------------------------------- */
:root #appShell .scout-followup-chip.scout-followup-chip--reply {
  width: 100%;
  min-height: 40px;
  gap: 8px;
  padding: 4px 4px 4px 12px;
  border: 0;
  border-radius: var(--stride-radius-surface, 12px);
  background: color-mix(in srgb, var(--text-1) 6%, transparent);
  color: var(--text-1);
}
:root #appShell .scout-followup-chip--reply .scout-followup-chip__icon { flex: none; color: var(--text-3); }
:root #appShell .scout-followup-chip--reply .scout-followup-chip__label { flex: none; font: 600 12px/16px var(--font-sans); letter-spacing: 0; }
:root #appShell .scout-followup-chip--reply .scout-followup-chip__excerpt {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-2);
  font: 400 14px/20px var(--font-sans);
}
:root #appShell .scout-followup-chip--reply .scout-followup-chip__clear {
  flex: none;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
}
@media (hover: hover) {
  :root #appShell .scout-followup-chip--reply .scout-followup-chip__clear:hover { background: color-mix(in srgb, var(--text-1) 10%, transparent); color: var(--text-1); }
}

/* ---------------------------------------------------------------------
   Phone long-press action sheet (.msg-sheet): T3 glass from the bottom
   --------------------------------------------------------------------- */
.msg-sheet { position: fixed; inset: 0; z-index: 2147483000; display: grid; align-items: end; }
.msg-sheet__scrim {
  position: absolute;
  inset: 0;
  background: var(--scrim, rgba(0, 0, 0, 0.64));
  animation: msg-sheet-fade var(--dur-slow, 320ms) var(--ease) both;
}
.msg-sheet__panel {
  position: relative;
  margin: 0 8px max(8px, env(safe-area-inset-bottom));
  max-height: calc(100dvh - 48px);
  overflow: auto;
  display: grid;
  gap: 12px;
  padding: 8px 12px 12px;
  border-radius: var(--stride-radius-sheet, 20px);
  background: var(--popover-glass-fill);
  -webkit-backdrop-filter: blur(32px) saturate(1.4);
  backdrop-filter: blur(32px) saturate(1.4);
  box-shadow: var(--shadow-3);
  color: var(--text-1);
  animation: msg-sheet-rise var(--dur-slow, 320ms) cubic-bezier(0.2, 0, 0, 1) both;
}
.msg-sheet.is-closing .msg-sheet__panel { animation: msg-sheet-sink 220ms cubic-bezier(0.3, 0, 1, 1) both; }
.msg-sheet.is-closing .msg-sheet__scrim { animation: msg-sheet-fade 220ms linear reverse both; }
@keyframes msg-sheet-rise { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes msg-sheet-sink { from { transform: none; opacity: 1; } to { transform: translateY(24px); opacity: 0; } }
@keyframes msg-sheet-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .msg-sheet__panel, .msg-sheet__scrim { animation: msg-sheet-fade 120ms linear both; }
}
@media (prefers-reduced-transparency: reduce) {
  .msg-sheet__panel { background: var(--surface-1); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
.msg-sheet__grip { justify-self: center; width: 36px; height: 4px; border-radius: 999px; background: color-mix(in srgb, var(--text-1) 20%, transparent); }
.msg-sheet__head { display: grid; gap: 2px; padding: 0 4px; }
.msg-sheet__preview-author { color: var(--text-3); font: 500 12px/16px var(--font-sans); }
.msg-sheet__preview {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text-2);
  font: 400 14px/20px var(--font-sans);
  overflow-wrap: anywhere;
}
.msg-sheet__reactions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text-1) 6%, transparent);
}
.msg-sheet__reaction {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-1);
  font-size: 26px;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease);
}
.msg-sheet__reaction[aria-pressed="true"] { background: color-mix(in srgb, var(--text-1) 16%, transparent); }
.msg-sheet__reaction:active { transform: scale(0.92); }
.msg-sheet__reaction--more { background: color-mix(in srgb, var(--text-1) 10%, transparent); color: var(--text-2); }
.msg-sheet__reaction:focus-visible, .msg-sheet__action:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }
.msg-sheet__actions { display: grid; }
.msg-sheet__panel.is-picking .msg-sheet__actions { display: none; }
.msg-sheet__action {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--stride-radius-surface, 12px);
  background: transparent;
  color: var(--text-1);
  font: 500 16px/1.2 var(--font-sans);
  text-align: start;
  -webkit-tap-highlight-color: transparent;
}
.msg-sheet__action svg { flex: none; color: var(--text-2); }
.msg-sheet__action:active { background: color-mix(in srgb, var(--text-1) 10%, transparent); }
.msg-sheet__action[data-danger="true"], .msg-sheet__action[data-danger="true"] svg { color: var(--danger); }
/* the full reaction picker, inline in the sheet */
.msg-sheet .reaction-picker { display: grid; gap: 8px; }
.msg-sheet .reaction-picker[hidden] { display: none; }
.msg-sheet .reaction-picker__search {
  width: 100%;
  height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text-1) 8%, transparent);
  color: var(--text-1);
  font: 400 16px/1 var(--font-sans);
  outline: none;
}
.msg-sheet .reaction-picker__label { color: var(--text-3); font: 500 12px/16px var(--font-sans); padding: 0 4px; }
.msg-sheet .reaction-picker__label[hidden], .msg-sheet .reaction-picker__grid[hidden], .msg-sheet .reaction-picker__empty[hidden] { display: none; }
.msg-sheet .reaction-picker__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.msg-sheet .reaction-picker__emoji {
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--stride-radius-control, 8px);
  background: transparent;
  font-size: 26px;
  line-height: 1;
}
.msg-sheet .reaction-picker__emoji[aria-pressed="true"] { background: color-mix(in srgb, var(--text-1) 16%, transparent); }
.msg-sheet .reaction-picker__empty { padding: 8px 4px; color: var(--text-3); font: 500 12px/16px var(--font-sans); }
.msg-sheet__panel:focus { outline: none; }

/* ---------------------------------------------------------------------
   Thread pane: the parent pinned on top, replies in the open timeline
   style, faces as circles (32), one hairline edge when docked
   --------------------------------------------------------------------- */
:root #appShell #chatTool .chat-context-card__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  box-shadow: none;
  background: var(--surface-3);
  color: var(--text-1);
  font: 600 12px/1 var(--font-sans);
}
:root #appShell #chatTool .chat-context-card__avatar img { border-radius: 50%; outline: 0; }
:root #appShell #chatTool .chat-context-rail__parent {
  background: color-mix(in srgb, var(--text-1) 3%, var(--surface-1));
  border: 0;
  box-shadow: none;
}
:root #appShell #chatTool .chat-context-rail { box-shadow: none; }

/* ---------------------------------------------------------------------
   Sign-in people picker (#loginPeople) inside the glass login card.
   Faces are calm monograms (40/48); the chosen one gets a neutral solid
   ring + a slight lift — never ember. The password field unfolds once a
   person is chosen.
   --------------------------------------------------------------------- */
.login-card .login-people-field { gap: 0; }
.login-card .login-people__select {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  pointer-events: none;
}
.login-people { display: grid; gap: 8px; min-width: 0; }
.login-people__row {
  display: flex;
  gap: 4px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 4px 0;
}
.login-people__person {
  flex: none;
  width: 56px;
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 4px 0 2px;
  border: 0;
  border-radius: var(--stride-radius-surface, 12px);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.login-people__face {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--login-field-fill, var(--surface-3));
  color: var(--text-1);
  font: 600 18px/1 var(--font-sans);
  letter-spacing: 0;
  box-shadow: 0 0 0 0 transparent;
  transition: box-shadow var(--dur-fast) var(--ease), transform var(--dur-med, 220ms) cubic-bezier(0.2, 0, 0, 1), background-color var(--dur-fast) var(--ease);
}
.login-people__name {
  max-width: 56px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-2);
  font: 500 12px/16px var(--font-sans);
}
@media (hover: hover) {
  .login-people__person:hover .login-people__face { background: color-mix(in srgb, var(--text-1) 14%, var(--login-field-fill, var(--surface-3))); }
}
.login-people__person:active .login-people__face { transform: scale(0.96); }
.login-people__person[aria-checked="true"] .login-people__face {
  transform: scale(1.06);
  box-shadow: 0 0 0 2px var(--login-card-fill-solid, var(--surface-1)), 0 0 0 4px var(--text-1);
}
.login-people__person[aria-checked="true"] .login-people__name { color: var(--text-1); font-weight: 600; }
.login-people__person:focus { outline: none; }
.login-people__person:focus-visible .login-people__face { outline: 2px solid var(--ring); outline-offset: 6px; }
/* phones: one scrollable row that snaps face by face */
@media (max-width: 640px) {
  .login-people__row {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    margin-inline: -24px;
    padding-inline: 20px;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 20px, #000 calc(100% - 20px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 20px, #000 calc(100% - 20px), transparent 100%);
  }
  .login-people__row::-webkit-scrollbar { display: none; }
  .login-people__person { scroll-snap-align: center; width: 60px; }
  .login-people__face { width: 44px; height: 44px; font-size: 16px; }
}
/* remembered on this device: one face, the name, "Not you?" */
.login-people--compact { display: block; }
.login-people__who { display: flex; align-items: center; gap: 12px; padding: 4px 0; }
.login-people__who .login-people__face { box-shadow: none; transform: none; }
.login-people__who-copy { display: grid; justify-items: start; gap: 0; min-width: 0; }
.login-people__who-name { color: var(--text-1); font: 600 17px/1.3 var(--font-sans); }
.login-people__not-you {
  min-height: 32px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-2);
  font: 500 14px/20px var(--font-sans);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.login-people__not-you:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 4px; }
.login-people__sr-radio {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
/* more than eight people: a searchable list on the same glass */
.login-people__search {
  width: 100%;
  height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--login-field-fill, var(--surface-3));
  color: var(--text-1);
  font: 400 16px/1 var(--font-sans);
}
.login-people__search:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.login-people__list { display: grid; gap: 2px; max-height: 264px; overflow-y: auto; }
.login-people--list .login-people__person {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px;
  border-radius: var(--stride-radius-surface, 12px);
}
.login-people--list .login-people__face { width: 40px; height: 40px; font-size: 15px; }
.login-people--list .login-people__name { max-width: none; font: 500 16px/1.3 var(--font-sans); }
.login-people--list .login-people__person[aria-checked="true"] { background: color-mix(in srgb, var(--text-1) 10%, transparent); }
.login-people--list .login-people__person[aria-checked="true"] .login-people__face { transform: none; box-shadow: none; }
.login-people__empty { margin: 8px 4px; color: var(--text-2); font: 500 14px/20px var(--font-sans); }
/* the password unfolds after a person is chosen (sign-in mode only) */
#loginForm #passwordField:not([hidden]) {
  max-height: 64px;
  opacity: 1;
  transition: max-height var(--dur-slow, 320ms) cubic-bezier(0.2, 0, 0, 1), opacity var(--dur-med, 220ms) var(--ease), margin var(--dur-slow, 320ms) cubic-bezier(0.2, 0, 0, 1);
}
#loginForm[data-person="none"] #passwordField:not([hidden]) {
  max-height: 0;
  margin-top: -10px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .login-people__face, #loginForm #passwordField:not([hidden]) { transition: none; }
  .login-people__person[aria-checked="true"] .login-people__face { transform: none; }
}
/* coarse pointers at tablet widths keep the actions inline and ≥44 */
@media (min-width: 641px) and (hover: none) {
  :root #appShell #chatTool .desktop-chat-actions button,
  :root #appShell #chatTool .desktop-chat-reaction-picker > button,
  :root #appShell #chatTool .desktop-chat-quick-reaction { width: 44px; min-width: 44px; height: 44px; min-height: 44px; }
  :root #appShell #chatTool .desktop-chat-interactions { flex-wrap: wrap; }
}
/* the tooltip starts at its pill (never off the column) and reads on the
   opaque end of the float fill */
@media (hover: hover) {
  :root #appShell #chatTool :is(.desktop-chat-reactions button, .chat-context-card__reaction)[data-reactors]::after {
    left: 0;
    transform: translateY(2px);
    background: var(--surface-1);
  }
  :root[data-theme="dark"] #appShell #chatTool :is(.desktop-chat-reactions button, .chat-context-card__reaction)[data-reactors]::after { background: var(--surface-3); }
  :root #appShell #chatTool :is(.desktop-chat-reactions button, .chat-context-card__reaction)[data-reactors]:hover::after { transform: none; }
  :root #appShell #chatTool .scout-chat-msg--user :is(.desktop-chat-reactions button)[data-reactors]::after { left: auto; right: 0; }
}

/* full emoji picker (any single emoji; data lazy-loads on first open) */
:root #appShell :is(#chatTool, #chatContextRail) .desktop-chat-reaction-picker__menu.reaction-picker.is-full { width: 336px; }
.reaction-picker__head { display: flex; align-items: center; gap: 8px; }
.reaction-picker__head .reaction-picker__search { flex: 1; min-width: 0; }
.reaction-picker__tone,
.reaction-picker__tone-option,
.reaction-picker__tab {
  flex: none;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease);
}
.reaction-picker__tone[hidden], .reaction-picker__tones[hidden], .reaction-picker__tabs[hidden] { display: none; }
@media (hover: hover) {
  .reaction-picker__tone:hover, .reaction-picker__tone-option:hover, .reaction-picker__tab:hover { background: color-mix(in srgb, var(--text-1) 10%, transparent); }
}
.reaction-picker__tone-option[aria-checked="true"], .reaction-picker__tab[aria-selected="true"] { background: color-mix(in srgb, var(--text-1) 14%, transparent); }
.reaction-picker__tone:focus-visible, .reaction-picker__tone-option:focus-visible, .reaction-picker__tab:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }
.reaction-picker__tones { display: flex; justify-content: space-between; padding: 2px; border-radius: 999px; background: color-mix(in srgb, var(--text-1) 6%, transparent); }
.reaction-picker__tabs { display: flex; justify-content: space-between; gap: 0; }
.reaction-picker__tab { width: 30px; height: 30px; font-size: 16px; filter: grayscale(1); opacity: 0.7; }
.reaction-picker__tab[aria-selected="true"] { filter: none; opacity: 1; }
.reaction-picker__scroll { display: grid; gap: 8px; max-height: 288px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.reaction-picker__section { display: grid; gap: 4px; }
.reaction-picker__section .reaction-picker__label {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 4px 2px;
  background: inherit;
}
:root #appShell #chatTool .reaction-picker.is-full .reaction-picker__grid { grid-template-columns: repeat(8, 36px); gap: 2px; justify-content: space-between; }
:root #appShell #chatTool .reaction-picker__section .reaction-picker__label { background: var(--surface-1); }
:root[data-theme="dark"] #appShell #chatTool .reaction-picker__section .reaction-picker__label { background: var(--surface-3); }
.msg-sheet .reaction-picker__head .reaction-picker__search { height: 44px; }
.msg-sheet .reaction-picker__tone, .msg-sheet .reaction-picker__tone-option { width: 44px; height: 44px; font-size: 24px; }
.msg-sheet .reaction-picker__tab { width: 34px; height: 34px; font-size: 18px; }
.msg-sheet .reaction-picker__scroll { max-height: min(360px, 48dvh); }
.msg-sheet .reaction-picker.is-full .reaction-picker__grid { grid-template-columns: repeat(8, 1fr); gap: 2px; }
.msg-sheet .reaction-picker__section .reaction-picker__label { background: var(--popover-glass-fill); }
