/* Glasshouse content: standard CSS. Works in Safari, Chrome and the Glasshouse host. */
:root {
  color-scheme: light dark;
  /* Colors: UIKit semantic colors only (system-colors.css / the host's live palette). Messages' incoming bubble is
     secondarySystemFill over the background: #E9E9EB light, #262629 dark, and it follows elevation. */
  --bubble-in: var(--system-secondary-fill);
  --spring: linear(0, 0.0127, 0.0499 2.6%, 0.1938 5.6%, 0.4107 9.3%, 0.7417 15.1%, 0.8826 18.6%, 0.9779 22.3%, 1.0323 26.3%, 1.0539 30.4%, 1.0544 34.8%, 1.0408 39.7%, 1.0083 51.8%, 0.9963 63.3%, 0.9984 81%, 1);
  /* iMessage bubble tail (right side); mirrored for incoming. */
  --tail: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 17 21'%3E%3Cpath d='M0 0H11C11 10 12.5 17 17 21C12 21.4 7.5 20.6 4 18.6L0 21Z'/%3E%3C/svg%3E");
  /* Keyboard: env() in Chrome's VirtualKeyboard mode, --kb set on <html> by the Glasshouse host's polyfill, else 0. */
  --kb: 0px;
  --kb-inset: env(keyboard-inset-height, var(--kb));
  /* Messages' composer geometry (iOS 26.5, measured on the real entry view at 3x): the field rests 85 px = 28.33 pt above
     the screen bottom (5.67 pt inside a 34 pt bottom safe area) and sits 48 px = 16 pt above the keyboard's frame (UIKit's
     end frame and layout guide, 611.0 pt on this phone; the glass rim is its first 3 px), so its bottom edge is at
     max(keyboard + 16, rest). The composer starts moving once the keyboard passes --kb-attach (12 pt here); --kb-lift is
     how far it has moved. The host's keyboard bridge uses the same threshold. --kb-attach is exposed so script can read
     it (chat.js's scroll compensation). */
  --kb-attach: max(0px, env(safe-area-inset-bottom, 0px) - 22px);
  --kb-lift: max(0px, var(--kb-inset) - var(--kb-attach));
  --composer-h: 64px;
  /* The composer's field grows with its text until its top is 10 pt below the top chrome (Messages: the entry view grows
     to just under the header, then scrolls). With the host's native bar, env(safe-area-inset-top) includes the bar. */
  --chrome-top: calc(env(safe-area-inset-top, 0px) + 73px);
  font: -apple-system-body;               /* Dynamic Type on Apple platforms */
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-text-size-adjust: 100%;        /* no text autosizing */
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

html, body { margin: 0; background: var(--system-background); color: var(--system-label); }
body {
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;           /* no long-press callouts on chrome */
  touch-action: manipulation;            /* no double-tap zoom */
  min-height: 100dvh;
}
a { color: inherit; text-decoration: none; }
/* No element of the chat page may clip (overflow clip or hidden, contain: paint), and <html> takes the viewport's overflow:
   otherwise WebKit draws the fixed glass field (-apple-visual-effect) at most ~700 pt tall, bottom-anchored, with its text
   shifted down (iOS 26.5 sim; web/glass-tall.html draws 800 pt glass correctly, chat.html?draft=60 reproduces it), which
   capped the field below Messages' header height. The send animation's transforms are kept out of the scroll target by
   chat.js measuring the transcript's laid-out height (round 2 clipped <body> for that). */
html:has(> body.chat) { overflow-y: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
/* chat.js reads --kb-attach through this probe's ResizeObserver box (no style read in script). Not clipped (no element of
   the chat page may clip, see above), not painted, not hit-tested. */
.kb-attach-probe { position: fixed; left: 0; bottom: 0; width: 0; height: var(--kb-attach); visibility: hidden; pointer-events: none; }

/* ---- Corners: Apple continuous curve by default (web/continuous-corners.js; `--corner-curve: circular` opts out) ---- */
:root { --corner-curve: continuous; }

/* ---- Glass ---------------------------------------------------------------------------- */
.glass {
  background: color-mix(in srgb, var(--system-background) 62%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  backdrop-filter: blur(18px) saturate(180%);
  border: .5px solid color-mix(in srgb, var(--system-label) 14%, transparent);
  box-shadow: 0 4px 18px color-mix(in srgb, var(--system-black) 10%, transparent);
}
@supports (-apple-visual-effect: -apple-system-glass-material) {
  .glass {
    background: transparent;
    -webkit-backdrop-filter: none; backdrop-filter: none;
    border-color: transparent; box-shadow: none;
    -apple-visual-effect: -apple-system-glass-material;
  }
  /* The composer's field is sized by its content: the fallback's transparent 0.5 px border (one device pixel each side at
     3x) made it 40.67 pt where Messages' entry field is 40 (one line), everything in it 2 px high. */
  .field.glass { border-width: 0; }
}

/* ---- Web-only app bar (hidden when the host draws native chrome) ----------------------- */
.appbar {
  position: sticky; top: 0; z-index: 5;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: calc(env(safe-area-inset-top) + 8px) 12px 8px;
  border-radius: 0; border-width: 0 0 .5px;
}
.appbar h1 { grid-column: 2; margin: 0; font-size: 17px; font-weight: 600; }
.appbar .back { grid-column: 1; color: var(--system-blue); font-size: 17px; }
:root[data-host-chrome] .appbar, :root[data-host-chrome] .bar-menu { display: none; }
:root[data-host-chrome] { --chrome-top: env(safe-area-inset-top, 0px); }
.appbar .bar-side { display: flex; align-items: center; border-radius: 999px; min-height: 44px; }
.appbar .bar-side.leading { grid-column: 1; justify-self: start; }
.appbar .bar-side.trailing { grid-column: 3; justify-self: end; }
.appbar .round.bar-side { display: grid; place-items: center; width: 44px; height: 44px; justify-self: center; }
.appbar .sf.video { width: 25px; height: 19px; }   /* video is a wide glyph: sized by height, like SF */
.bar-btn { min-width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: none; color: var(--system-label);
  font: inherit; font-size: 17px; padding: 0 10px; text-decoration: none; }
.bar-btn .sf { --s: 20px; }
.bar-menu[popover] { margin: 0; inset: auto 12px auto auto; top: calc(env(safe-area-inset-top) + 60px); padding: 6px 0; list-style: none;
  border-radius: 22px; min-width: 250px; color: var(--system-label); }
.bar-menu li + li[data-group="tools"] { border-top: 8px solid var(--system-separator); }
.bar-menu button, .bar-menu a { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 16px;
  border: 0; background: none; color: inherit; font: inherit; font-size: 17px; text-decoration: none; }

/* Safari path: cross-document View Transitions stand in for the system bar morph. Each bar side's glass
   keeps one view-transition-name across pages, so its shape morphs; the symbols inside cross-fade with the
   0.2 scale + 10px blur measured in navlab, on the measured springs (navlab README, as linear()). */
@view-transition { navigation: auto; }
:root:not([data-host-chrome]) .appbar .bar-side.leading { view-transition-name: bar-leading; view-transition-class: bar-glass; }
:root:not([data-host-chrome]) .appbar .bar-side.trailing { view-transition-name: bar-trailing; view-transition-class: bar-glass; }
/* Titles are not shared: like the system bar they ride with their page (the root snapshot). */
:root {
  --ease-push: linear(0, 0.097, 0.282, 0.466, 0.619, 0.736, 0.821, 0.881, 0.921, 0.949, 0.967, 0.979, 0.986, 0.991, 0.995, 0.997, 0.998, 0.999, 0.999, 0.999, 1);
  --ease-glass: linear(0, 0.043, 0.146, 0.280, 0.423, 0.561, 0.685, 0.790, 0.874, 0.938, 0.984, 1.015, 1.034, 1.043, 1.046, 1.044, 1.039, 1.033, 1.027, 1.020, 1.014, 1.010, 1.006, 1.003, 1);
}
::view-transition-group(*.bar-glass) { animation-duration: 600ms; animation-timing-function: var(--ease-glass); animation-delay: 55ms; }
::view-transition-old(*.bar-glass) { animation: 200ms ease-in both bar-icon-out; }
::view-transition-new(*.bar-glass) { animation: 400ms var(--ease-push) 60ms both bar-icon-in; }
::view-transition-old(root) { animation: 500ms var(--ease-push) both page-out; }
::view-transition-new(root) { animation: 500ms var(--ease-push) both page-in; }
:root[data-nav="back"]::view-transition-old(root) { animation-name: page-in; animation-direction: reverse; z-index: 1; }
:root[data-nav="back"]::view-transition-new(root) { animation-name: page-out; animation-direction: reverse; }
@keyframes bar-icon-out { to { opacity: 0; scale: 0.2; filter: blur(10px); } }
@keyframes bar-icon-in { from { opacity: 0; scale: 0.2; filter: blur(10px); } }
@keyframes page-out { to { translate: -30% 0; filter: brightness(0.9); } }
@keyframes page-in { from { translate: 100% 0; } }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

/* ---- Conversation list ---------------------------------------------------------------- */
.list { list-style: none; margin: 0; padding: 0 0 24px; }
.row {
  display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: center;
  padding: 10px 16px 10px 12px; position: relative;
  transition: background-color .25s;
}
.row { -webkit-touch-callout: default; }   /* links keep their system long-press (preview + menu) */
/* Press highlight like UITableView: delayed, dropped as soon as the touch turns into a scroll. */
.row.pressed { background: var(--system-gray4); transition: none; }
.row .muted-mark { display: none; color: var(--system-secondary-label); font-size: 13px; margin: 0 auto 0 4px; }
.row.muted .muted-mark { display: inline; }
li.removing { overflow: hidden; transition: height .3s var(--spring), opacity .2s; opacity: 0; }
/* Shown inside a native context-menu preview: transcript only, like Messages. */
:root[data-host-presentation="preview"] .composer, :root[data-host-presentation="preview"] .jump { display: none; }
.row .meta { border-bottom: .5px solid var(--system-separator); padding-bottom: 10px; margin-bottom: -10px; min-width: 0; }
.row:last-child .meta { border-bottom: 0; }
.row .top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.row strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row time { color: var(--system-secondary-label); font-size: 15px; white-space: nowrap; }
.row time::after { content: " \203A"; font-size: 18px; opacity: .6; }
.row .preview {
  color: var(--system-secondary-label); font-size: 15px; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.row.unread::before {
  content: ""; position: absolute; left: 3px; top: 50%; width: 10px; height: 10px; margin-top: -5px;
  border-radius: 50%; background: var(--system-blue);
}
.avatar {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  color: var(--system-white); font-weight: 600; font-size: 20px; letter-spacing: .5px;
  background: linear-gradient(180deg, hsl(var(--hue) 60% 66%), hsl(var(--hue) 55% 48%));
}
a.chip { display: inline-block; }
.chip { padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--system-label); }

/* ---- SF Symbols as masks: _sf/<name>.svg (host-served from CoreUI, static export for Safari), tinted by currentColor ---- */
.sf {
  display: inline-block; flex: none; width: var(--s, 20px); height: var(--s, 20px);
  background-color: currentColor;
  -webkit-mask: var(--sf) center / contain no-repeat; mask: var(--sf) center / contain no-repeat;
}

/* ---- Chat ----------------------------------------------------------------------------- */
.chatbar { grid-template-columns: 44px 1fr 44px; padding-bottom: 4px; }
.chatbar .back { grid-column: 1; color: var(--system-label); width: 44px; height: 44px; }
.chatbar .who { grid-column: 2; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.chatbar .avatar { width: 40px; height: 40px; font-size: 15px; }
.chatbar .name { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 10px; }
.chatbar > .round:last-child { grid-column: 3; width: 44px; height: 44px; }

.log {
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 100dvh; box-sizing: border-box;
  padding: 12px 16px calc(var(--composer-h) + var(--kb-lift) + 8px + 1px / 3);   /* --composer-h includes the composer's bottom padding; 16 pt to the field's top */
  overflow-anchor: none;
}
.day { align-self: center; text-align: center; color: var(--system-secondary-label); font-size: 11px; line-height: 1.35; margin: 12px 0 10px; }
.day strong { font-weight: 600; }
.msg { display: flex; margin-top: 2px; max-width: 100%; transition: margin-top .35s var(--spring); }
.msg.me { justify-content: flex-end; }
.msg.gap { margin-top: 10px; }
.msg.reacted { margin-top: 24px; }
/* Messages' balloon max width (ChatKit, read at runtime with -ckbehavior: -[CKUIBehavior balloonMaxWidthForTranscriptWidth:
   marginInsets:...] = balloonMaxWidthPercent 0.85 x (transcript width - minTranscriptMarginInsets 16 + 16), 346.8 pt on a
   440 pt screen): 85 % of the row, which is the transcript inside its 16 pt margins. The tail is drawn inside ChatKit's
   balloon (balloonMaskTailWidth 0). */
.bubble {
  position: relative; max-width: 85%; box-sizing: border-box;
  padding: 7px 12px; border-radius: 18px;
  font-size: 17px; line-height: 22px;
  overflow-wrap: anywhere; white-space: pre-wrap;
  /* Fill composited over the background as two layers: opaque, so the tail overlap doesn't double the alpha. */
  background: linear-gradient(var(--bubble-in), var(--bubble-in)), var(--system-background); color: var(--system-label);
  /* WebKit's own long-press (selection, callout) is replaced by the context menu; "Select" re-enables it. */
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  transition: transform .35s var(--spring), filter .35s;
}
.me .bubble { background: var(--system-blue); color: var(--system-white); }
.bubble code { font: 15px ui-monospace, monospace; }
.tail .bubble::after {
  content: ""; position: absolute; bottom: 0; width: 17px; height: 21px; background: inherit;
  -webkit-mask: var(--tail) no-repeat; mask: var(--tail) no-repeat;
}
.me.tail .bubble { border-bottom-right-radius: 6px; }
.me.tail .bubble::after { right: -6px; }
.them.tail .bubble { border-bottom-left-radius: 6px; }
.them.tail .bubble::after { left: -6px; transform: scaleX(-1); }
.bubble.pressing { transform: scale(.955); }
.me .bubble.pressing { transform-origin: 100% 50%; }
.them .bubble.pressing { transform-origin: 0 50%; }
.selecting .bubble { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
.me .bubble::selection { background: color-mix(in srgb, var(--system-white) 35%, transparent); }
.receipt { align-self: flex-end; color: var(--system-secondary-label); font-size: 11px; font-weight: 500; margin: 3px 4px 0 0; }

/* Tapback badge */
.react {
  position: absolute; top: -25px; z-index: 1; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; font-size: 17px; line-height: 1; letter-spacing: 0;
  background: var(--system-blue); color: var(--system-white); box-shadow: 0 0 0 2.5px var(--system-background);
}
.them .react { right: -21px; }
.me .react { left: -21px; }
.react::before, .react::after { content: ""; position: absolute; border-radius: 50%; background: inherit; box-shadow: 0 0 0 2px var(--system-background); }
.react::before { width: 9px; height: 9px; bottom: -1px; }
.react::after { width: 4.5px; height: 4.5px; bottom: -6px; }
.them .react::before { left: 0; } .them .react::after { left: -4px; }
.me .react::before { right: 0; } .me .react::after { right: -4px; }
.react.text, .cm-tb.text { flex-direction: column; font-size: 8.5px; font-weight: 900; letter-spacing: .3px; line-height: .95; }
.react.text b, .cm-tb.text b { display: block; }

.enter { animation: pop .42s var(--spring) both; }
.me.enter { transform-origin: 100% 100%; }
.them.enter { transform-origin: 0 100%; }
@keyframes pop { from { transform: translateY(18px) scale(.86); opacity: 0; } 40% { opacity: 1; } }
.typing .bubble { display: flex; gap: 4px; padding: 13px 14px; }
.typing i { width: 8px; height: 8px; border-radius: 50%; background: var(--system-secondary-label); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 60%, 100% { opacity: .35; transform: none; } 30% { opacity: 1; transform: translateY(-2px); } }
.cursor::before { content: none; }

/* Composer */
:root { --keyboard-curve: linear(0, 0.021, 0.124, 0.271, 0.405, 0.533, 0.637, 0.729, 0.797, 0.849, 0.887, 0.917, 0.94, 0.955, 0.969, 0.977, 0.983, 0.988, 0.992, 0.994, 0.996, 0.997, 0.998, 0.999, 1); }
/* Messages' side margins follow the software keyboard (a hardware keyboard leaves them at 28): the host marks
   <html data-keyboard="visible"> when the keyboard starts to show and "hidden" when it starts to go. Without the host
   (Safari), focus is the closest signal. */
:root[data-keyboard="visible"] .composer,
:root:not([data-host-chrome]) .composer:focus-within { padding-left: 20px; padding-right: 20px; }
@media (prefers-reduced-motion: reduce) { .composer { transition: none; } }
.composer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; align-items: flex-end; gap: 12px;   /* field 80 pt from the edge at rest, 72 with the keyboard */
  /* Messages: 28 pt from the sides at rest (concentric with the bottom inset), 20 pt while the keyboard is up; the
     change rides the keyboard's own curve (sampled from the keyboard's show on device, 0.4 s). */
  /* Field 85 px above the screen edge at rest and 48 px above the keyboard's frame, between drawn edges as in Messages
     (3x): WebKit draws the glass edge one device pixel outside the box, so the box sits 16 pt above the attach line
     (round 5: 16.333 + 11.667 put the field one device pixel high with the keyboard up, the same at rest). */
  /* The field's extra 1/3 pt (121 px) is taken from the top padding: the composer stays a whole number of points tall, so the
     field's bottom keeps its row (48 px above the keyboard, 85 px at rest). */
  padding: calc(8px - 1px / 3) 28px calc(16px + var(--kb-attach));
  transform: translateY(calc(-1 * var(--kb-lift)));
  transition: padding-left .4s var(--keyboard-curve), padding-right .4s var(--keyboard-curve);
  will-change: transform;
}
.round {
  flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0; padding: 0;
  display: grid; place-items: center; color: var(--system-label); font: inherit;
}
.round .sf { --s: 19px; }
/* Messages' "+" (iOS 26.5 compose sheet, 3x, coverage-weighted): SF "plus" regular at 19 pt (15.27 pt glyph, 1.6 pt strokes;
   medium in a 19 px box drew 14.67 / 1.97). <sf-symbol> renders a symbol at its point size, as UIKit does. */
.plus sf-symbol { --s: 19px; color: var(--system-label); }
.field {
  /* 121 px at 3x (Messages' field: rows 1664-1784 with the keyboard up, the same bottom row as ours; 40 pt drew 1665-1784). */
  flex: 1; display: flex; align-items: flex-end; min-height: calc(121px / 3); border-radius: calc(121px / 6);
  padding: 2px 5px 2px 16px; box-sizing: border-box;
}
/* Messages' entry view (3x screenshots, iOS 26.5): 20 pt per line, 40 pt for one line, text 16.7 pt from the field's
   left edge; no extra tracking (SF's own tracking applies, as in UIKit). The field grows to 10 pt under the top chrome, as
   Messages' grows to its header: viewport - top chrome - 10 - field padding (4) - the composer's bottom padding - the
   keyboard lift. */
.field textarea {
  flex: 1; resize: none; border: 0; outline: none; background: transparent; color: var(--system-label);
  font: inherit; font-size: 17px; line-height: 20px; padding: 8px 0; margin: 0;
  max-height: calc(100dvh - var(--chrome-top) - 10px - 4px - 16px - var(--kb-attach) - var(--kb-lift));
  height: 36px; box-sizing: border-box; -webkit-user-select: text; user-select: text;
}
/* CSS Forms 4: the field takes its content's height (min one 20 pt line + padding, max as above); no script per keystroke. */
@supports (field-sizing: content) { .field textarea { field-sizing: content; height: auto; min-height: 36px; } }
.field textarea::placeholder { color: var(--system-secondary-label); }
.field .mic { --s: 19px; color: var(--system-secondary-label); margin: 0 7px 9px 6px; }
.composer.has-text .mic { display: none; }
/* Messages' send button (iOS 26.5 compose sheet, 3x): a 38 x 25 pt capsule, vertically centred in the field, its right edge
   6.33 pt inside the field's (ChatKit entryViewSendButtonCoverSpace 6.333), arrow 13.7 x 16 pt with a 2.33 pt stem. Its edges
   on Messages' rows (3x: 1686.5-1761.5, half a device pixel above the 121 px field's centre): bottom margin 5.5 + 1/3 above the
   field's 2 px padding; right margin 1.333 + the 5 px padding = 6.33. */
.send {
  flex: none; width: 38px; height: 25px; border-radius: 12.5px; border: 0; margin: 0 1.333px calc(5.5px + 1px / 3) 6px;
  background: var(--system-blue); color: var(--system-white); display: grid; place-items: center; padding: 0;
}
.send:disabled { display: none; }
.send sf-symbol { --s: 17px; color: var(--system-white); }
.jump {
  position: fixed; right: 16px; z-index: 9; width: 40px; height: 40px; border-radius: 50%;
  bottom: calc(var(--composer-h) + 10px);
  transform: translateY(calc(-1 * var(--kb-lift)));
  display: grid; place-items: center; border: 0; color: var(--system-label); padding: 0;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.jump.show { opacity: 1; pointer-events: auto; }
.jump .sf { --s: 17px; }


/* ---- Long-press context menu ----------------------------------------------------------- */
dialog.cm {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; background: transparent; overflow: hidden; outline: none;
  color: var(--system-label); -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
dialog.cm::backdrop { background: transparent; }
.cm-scrim {
  position: absolute; inset: 0; touch-action: none;
  background: transparent; -webkit-backdrop-filter: blur(0px); backdrop-filter: blur(0px);
  transition: background-color .35s, backdrop-filter .35s, -webkit-backdrop-filter .35s;
}
dialog.cm.open .cm-scrim {
  background: color-mix(in srgb, var(--system-background) 35%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.1); backdrop-filter: blur(14px) saturate(1.1);
}
.cm-preview { position: fixed; margin: 0; display: flex; filter: drop-shadow(0 10px 28px color-mix(in srgb, var(--system-black) 16%, transparent)); touch-action: none; }
.cm-preview .bubble { max-width: none; width: 100%; }
.cm-tapbacks { position: fixed; height: 52px; width: min(calc(100vw - 20px), 336px); border-radius: 26px; overflow: hidden; }
.cm-tb-scroll {
  display: flex; align-items: center; gap: 1px; height: 100%; box-sizing: border-box; padding: 0 7px;
  overflow-x: auto; scrollbar-width: none; touch-action: pan-x; overscroll-behavior: contain;
}
.cm-tb-scroll::-webkit-scrollbar { display: none; }
.cm-tb {
  flex: none; width: 41px; height: 41px; border-radius: 50%; border: 0; padding: 0; background: transparent;
  display: flex; align-items: center; justify-content: center; font-size: 25px; color: var(--system-label);
  transition: transform .25s var(--spring), background-color .2s;
}
.cm-tb.hl { transform: scale(1.22) translateY(-2px); }
.cm-tb.on { background: var(--system-blue); color: var(--system-white); }
.cm-tb.picker { color: var(--system-secondary-label); }
.cm-tb.picker .sf { --s: 24px; }
.cm-menu { position: fixed; width: 252px; border-radius: 26px; padding: 7px; display: flex; flex-direction: column; touch-action: none; box-sizing: border-box; }
.cm-menu.glass, .cm-tapbacks.glass { background-color: color-mix(in srgb, var(--system-tertiary-background) 42%, transparent); }
.cm-item {
  display: flex; align-items: center; gap: 13px; height: 44px; padding: 0 13px; border: 0; border-radius: 18px;
  background: transparent; color: var(--system-label); font: inherit; font-size: 17px; text-align: left;
  transition: background-color .12s;
}
.cm-item .sf { --s: 19px; }
.cm-item.hl { background: var(--system-tertiary-fill); }

@media (prefers-reduced-motion: reduce) {
  .enter, .typing i { animation: none; }
  .msg, .bubble, .cm-tb { transition: none; }
}

/* ---- <sf-symbol>: inline vector SF Symbols (see web/sf-symbol.js, docs/BUILTINS.md) ---- */
sf-symbol { display: inline-block; line-height: 0; font-size: var(--s, 17px); color: inherit; }
sf-symbol svg { overflow: visible; display: block; }
sf-symbol path { transform-box: view-box; }
sf-symbol[mode="hierarchical"] .sf-l1 { opacity: var(--sf-secondary, 0.5); }
sf-symbol[mode="hierarchical"] .sf-l2 { opacity: var(--sf-tertiary, 0.25); }
sf-symbol[mode="palette"] .sf-l1 { fill: var(--sf-palette-1, currentColor); }
sf-symbol[mode="palette"] .sf-l2 { fill: var(--sf-palette-2, currentColor); }
sf-symbol .sf-off { opacity: 0.25; }

/* Round 16 spike (Glasshouse -v7): two web views of this page. The transcript's composer keeps its box (its height pads the
   transcript) but is not drawn or focusable; the composer surface draws only the composer, on a transparent page. */
:root[data-host-surface="transcript"] .composer { visibility: hidden; }
:root[data-host-surface="composer"], :root[data-host-surface="composer"] body { background: transparent; }
:root[data-host-surface="composer"] .appbar, :root[data-host-surface="composer"] .log, :root[data-host-surface="composer"] .jump { display: none; }
