/* Chat split reader control; shared menu and speech behavior stay unchanged. */
#chat-app #chat-messages .chat-msg-actions .ss-reader-controls{--reader-btn-ink:#5c544d;--reader-btn-hover:#e8e4df;--reader-btn-active:#ded9d2;display:inline-flex;align-items:center;gap:0;margin-inline-start:8px;border:0;border-radius:8px;background:#f0ede9;color:var(--reader-btn-ink);box-shadow:none;vertical-align:middle}
#chat-app #chat-messages .chat-msg-actions .ss-reader-controls .ss-play,
#chat-app #chat-messages .chat-msg-actions .ss-reader-controls .ss-voice-caret,
#chat-app #chat-messages .chat-msg-actions .ss-reader-controls .ss-tts-stop{box-sizing:border-box;position:static!important;display:inline-flex;align-items:center;justify-content:center;min-width:40px;min-height:36px;width:auto;height:auto;margin:0;padding:0 10px;border:0!important;border-radius:0;background:transparent!important;color:inherit!important;opacity:1;transform:none;box-shadow:none;font:inherit;cursor:pointer}
#chat-app #chat-messages .chat-msg-actions .ss-reader-controls button:first-child{border-start-start-radius:8px;border-end-start-radius:8px}
#chat-app #chat-messages .chat-msg-actions .ss-reader-controls button:last-child{border-start-end-radius:8px;border-end-end-radius:8px}
#chat-app #chat-messages .chat-msg-actions .ss-reader-controls .ss-voice-caret{gap:9px;padding-inline:12px}
#chat-app #chat-messages .chat-msg-actions .ss-reader-controls .ss-tts-stop{border-inline-start:0!important}
#chat-app #chat-messages .chat-msg-actions .ss-reader-controls button::before{content:none!important}
#chat-app #chat-messages .chat-msg-actions .ss-reader-controls .ss-voice-name{display:inline;margin:0;color:inherit;font-size:14px;font-weight:600;line-height:1.3;cursor:inherit}
#chat-app #chat-messages .chat-msg-actions .ss-reader-controls .ss-voice-caret svg{width:14px;height:14px;stroke-width:2;flex:none}
#chat-app #chat-messages .chat-msg-actions .ss-reader-controls .ss-play svg{width:16px;height:16px}
#chat-app #chat-messages .chat-msg-actions .ss-reader-controls button:hover{background:var(--reader-btn-hover)!important}
#chat-app #chat-messages .chat-msg-actions .ss-reader-controls button:is(:active,:focus-visible,[aria-expanded=true],[aria-pressed=true]){background:var(--reader-btn-active)!important;outline:none!important}
#chat-app #chat-messages .chat-msg-actions .ss-reader-controls button:focus-visible{text-decoration:underline;text-underline-offset:3px;box-shadow:inset 0 -3px 0 var(--reader-btn-ink)!important}
[data-theme=dark] #chat-app #chat-messages .chat-msg-actions .ss-reader-controls{--reader-btn-ink:#e2ded8;--reader-btn-hover:#48443f;--reader-btn-active:#565049;background:#36332f!important;color:var(--reader-btn-ink)!important;box-shadow:none}
@media(pointer:coarse),(max-width:600px){#chat-app #chat-messages .chat-msg-actions .ss-reader-controls .ss-play,#chat-app #chat-messages .chat-msg-actions .ss-reader-controls .ss-voice-caret,#chat-app #chat-messages .chat-msg-actions .ss-reader-controls .ss-tts-stop{min-height:44px;min-width:44px}}
@media(forced-colors:active){#chat-app #chat-messages .chat-msg-actions .ss-reader-controls{border:1px solid ButtonText}#chat-app #chat-messages .chat-msg-actions .ss-reader-controls button:focus-visible{outline:2px solid Highlight!important;outline-offset:-3px}}

/* Generated by build-style.py from Writing integration.css and combined-ui.css.
   Edit the Writing design source, regenerate, then verify both surfaces.
   Chat owns only positioning, hidden states, touch targets and playback state. */
#chat-reader-selection { position:fixed; z-index:1100; display:flex; align-items:center; flex-wrap:wrap; font:inherit; }
#chat-reader-selection[hidden], #chat-reader-selection button[hidden] { display:none !important; }
#chat-reader-selection button { position:relative; display:inline-flex; min-height:40px; font:inherit; line-height:1; text-decoration:none; cursor:pointer; touch-action:manipulation; -webkit-tap-highlight-color:transparent; }
#chat-reader-selection button span { line-height:1; }
#chat-reader-selection svg { fill:none; stroke:currentColor; stroke-width:1.7; }
#chat-reader-selection .chat-reader-dictionary-action::before { content:''; position:absolute; inset-inline-start:-1px; top:11px; bottom:11px; border-inline-start:1px solid #d5cec3; }
#chat-reader-selection { width:max-content !important; max-width:calc(100vw - 16px); box-sizing:border-box; gap:0 !important; padding:4px !important; border:1px solid #e8dfd5 !important; border-radius:14px !important; background:#fffcf8 !important; box-shadow:0 6px 18px #46362712,0 1px 3px #46362708 !important; }
#chat-reader-selection { transform:none !important; transition:opacity .12s ease !important; }
#chat-reader-selection > button { align-items:center; justify-content:center; height:40px !important; width:auto !important; min-width:0 !important; flex:0 0 auto !important; padding:0 12px !important; margin:0 !important; gap:6px !important; border:0 !important; border-radius:9px !important; color:#343c38 !important; background:transparent !important; font-size:13px !important; white-space:nowrap; transform:none !important; box-shadow:none !important; transition:background-color .12s !important; }
#chat-reader-selection > button svg { width:18px !important; height:18px !important; flex-shrink:0; stroke-linecap:round; stroke-linejoin:round; color:inherit !important; }
#chat-reader-selection > button span { display:inline !important; font-size:13px !important; font-weight:500; }
#chat-reader-selection > button:hover { background:#e8eee5 !important; }
#chat-reader-selection > button:active { background:#d9e3d6 !important; }
#chat-reader-selection > button:focus-visible { outline:none !important; background:#dce7d9 !important; text-decoration:underline; text-underline-offset:4px; }
@media(max-width:380px) { #chat-reader-selection > button { padding:0 8px !important; } }
html[data-theme="dark"] #chat-reader-selection {
  --sk-review-paper:#34312c;
  --sk-review-inset:#403b35;
  --sk-review-line:#655e54;
  --sk-review-ink:#eee9df;
  --sk-review-muted:#c4bdb2;
  --sk-review-green:#b9d4c5;
  --sk-review-soft:#344b3e;
}
html[data-theme="dark"] #chat-reader-selection {background:var(--sk-review-paper)!important;border-color:var(--sk-review-line)!important}
html[data-theme="dark"] #chat-reader-selection > button {color:var(--sk-review-ink)!important}
html[data-theme="dark"] #chat-reader-selection > button:is(:hover,:focus-visible) {background:var(--sk-review-inset)!important}
/* Keep Chat's real touch targets at least 44px, without invisible overlap. */
@media(max-width:767px) { #chat-reader-selection > button { min-height:44px; min-width:44px !important; } }
@media(prefers-reduced-motion:reduce) { #chat-reader-selection, #chat-reader-selection > button { transition:none !important; } }
@media(forced-colors:active) { #chat-reader-selection { border-color:CanvasText !important; } #chat-reader-selection button:focus-visible { border:2px solid Highlight !important; } }
html[data-theme="dark"] .chat-reader-dictionary {
  --dv-paper: #292b27;
  --dv-ink: #eeeae1;
  --dv-muted: #c5bdb1;
  --dv-green: #b6d4c1;
  --dv-soft: #34483b;
  --dv-line: #53574f;
  --dv-hover: #3c4038;
}
/* Keep the hidden live region inside the viewport, not below the full-height chat. */
.chat-reader-dictionary .dv-sr { position: fixed; top: 0; left: 0; }

html[data-theme="dark"] .chat-reader-dictionary .dv-visible-forms,
html[data-theme="dark"] .chat-reader-dictionary [role="tabpanel"]:focus-visible { background: var(--dv-hover); }

/* Match Writing's native text selection, including dark and forced-colour modes. */
#chat-app { --sk-selection-bg: #cbdccd; --sk-selection-text: #243d30; }
[data-theme="dark"] #chat-app { --sk-selection-bg: #526d5a; --sk-selection-text: #fffaf0; }
#chat-app .chat-message .chat-bubble::selection,
#chat-app .chat-message .chat-bubble *::selection { background: var(--sk-selection-bg) !important; color: var(--sk-selection-text) !important; }
@media (forced-colors: active) {
  #chat-app { --sk-selection-bg: Highlight !important; --sk-selection-text: HighlightText !important; }
}
