/* Scoped enhancement: a stylesheet failure leaves the host page untouched. */
.sf-guide-style-probe { --sf-guide-ready: 1; }
.sf-guide, .sf-guide * { box-sizing: border-box; }
.sf-guide { --sf-ink: #252039; --sf-paper: #fff8f0; --sf-muted: #69616c; --sf-line: #e6d8d0; --sf-orange: #c64423; color: var(--sf-ink); font: 15px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.sf-guide [hidden] { display: none !important; }
.sf-guide button, .sf-guide textarea, .sf-guide input { font: inherit; }
.sf-guide button, .sf-guide a { touch-action: manipulation; }
.sf-guide button { cursor: pointer; min-height: 44px; }
.sf-guide button:disabled { cursor: not-allowed; opacity: .55; }
.sf-guide button:focus-visible, .sf-guide a:focus-visible, .sf-guide textarea:focus-visible, .sf-guide input:focus-visible { outline: 3px solid #92597f; outline-offset: 3px; }
.sf-guide-launcher { position: fixed; z-index: 1000; right: max(20px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom)); border: 1px solid #fff8f0; border-radius: 999px; background: #252039; color: #fff8f0; padding: 14px 22px; box-shadow: 0 7px 28px #2520392b; font-weight: 650 !important; max-width: calc(100vw - 32px); }
.sf-guide-launcher::before { content: '✦'; color: #ff9e75; margin-right: 10px; }
.sf-guide-launcher:hover { background: #3b2e4b; }
.sf-guide-dialog { position: fixed; inset: auto 16px 16px auto; margin: 0; padding: 0; border: 1px solid #d8c4d0; border-radius: 20px; width: min(440px, calc(100vw - 32px)); max-width: calc(100vw - 32px); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); background: var(--sf-paper); color: var(--sf-ink); box-shadow: 0 20px 80px #25203938; overflow: hidden; font: inherit; }
.sf-guide-dialog[open] { display: flex; flex-direction: column; }
.sf-guide-dialog:not([open]) { display: none; }
.sf-guide-dialog::backdrop { background: #25203966; }
.sf-guide-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex: none; padding: 18px 20px 16px; border-bottom: 1px solid var(--sf-line); background: #eee4f9; }
.sf-guide-eyebrow { margin: 0 0 5px; color: #65506e; font-size: 10px; line-height: 1.4; letter-spacing: .1em; font-weight: 700; }
.sf-guide-title { margin: 0; font: 600 23px/1.2 "Avenir Next", "Trebuchet MS", system-ui, sans-serif; letter-spacing: -.04em; }
.sf-guide-title:focus { outline: none; }
.sf-guide-body { padding: 20px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; overflow-wrap: anywhere; }
.sf-guide-intro { margin: 0 0 12px; font-size: 15px; line-height: 1.55; }
.sf-guide-boundary { padding: 12px 14px; background: #ffeadb; border: 1px solid #f0ceba; border-radius: 10px; font-size: 12px; line-height: 1.55; margin: 0 0 18px; }
.sf-guide-notice { font-size: 12px; line-height: 1.6; margin: 0 0 12px; color: #514956; }
.sf-guide-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.5; margin: 0 0 20px; cursor: pointer; }
.sf-guide-consent input { width: 18px; height: 18px; min-width: 18px; margin: 2px 0 0; accent-color: #5142a0; }
.sf-guide-label { display: block; font-size: 13px; font-weight: 650; margin: 0 0 7px; }
.sf-guide-input { display: block; width: 100%; min-height: 104px; max-height: 240px; resize: vertical; border: 1px solid #b8a6b7; border-radius: 10px; background: #fffefa; color: var(--sf-ink); padding: 12px; margin: 0; font-size: 16px !important; line-height: 1.5; }
.sf-guide-input[readonly] { background: #f3eae4; }
.sf-guide-count { color: var(--sf-muted); margin: 7px 0 12px; font-size: 11px; line-height: 1.5; }
.sf-guide-security { width: 100%; max-width: 100%; }
.sf-guide-security-status { color: #514956; font-size: 12px; line-height: 1.5; margin: 9px 0; }
.sf-guide-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.sf-guide-send { border: 0; border-radius: 999px; background: var(--sf-orange); color: #fff; padding: 12px 20px; font-size: 13px !important; font-weight: 650 !important; }
.sf-guide-send:hover:not(:disabled) { background: #a9361a; }
.sf-guide-quiet { background: transparent; border: 1px solid transparent; border-radius: 8px; color: var(--sf-ink); padding: 9px 10px; text-decoration: underline; text-underline-offset: 3px; font-size: 12px !important; }
.sf-guide-quiet:hover:not(:disabled) { background: #2520390a; }
.sf-guide-status { color: #514956; margin: 12px 0 0; font-size: 12px; line-height: 1.6; }
.sf-guide-links { display: flex; flex-wrap: wrap; gap: 5px 18px; margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--sf-line); }
.sf-guide-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: 12px; font-weight: 650; color: #672f33; text-decoration: underline; text-underline-offset: 4px; }
.sf-guide-transcript { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.sf-guide-transcript:empty { display: none; }
.sf-guide-message { border: 1px solid var(--sf-line); border-radius: 12px; padding: 12px 14px; max-width: 100%; }
.sf-guide-message strong { font-size: 11px; letter-spacing: .03em; }
.sf-guide-message p { margin: 6px 0 0; font-size: 13px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.sf-guide-message-user { background: #f1e9fc; margin-left: 18px; }
.sf-guide-message-assistant { background: #fffefa; margin-right: 10px; }
@media (max-width: 480px) {
  .sf-guide-launcher { right: max(14px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom)); padding: 12px 18px; font-size: 13px !important; }
  .sf-guide-dialog { inset: auto 8px max(8px, env(safe-area-inset-bottom)) auto; width: calc(100vw - 16px); max-width: calc(100vw - 16px); max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px - env(safe-area-inset-bottom)); border-radius: 16px; }
  .sf-guide-header { padding: 15px 16px; }
  .sf-guide-title { font-size: 22px; }
  .sf-guide-body { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) { .sf-guide, .sf-guide * { scroll-behavior: auto !important; } }

.sf-guide-attribution { margin: 4px 0 0; font-size: 11px; line-height: 1.5; color: var(--sf-muted); }
.sf-guide-attribution a { display: inline-flex; align-items: center; min-height: 44px; color: inherit; text-decoration: underline; text-underline-offset: 3px; }

.sf-guide-privacy-link { display: inline-flex; align-items: center; min-height: 44px; margin: 0 0 12px; color: #672f33; font-size: 13px; font-weight: 650; text-decoration: underline; text-underline-offset: 4px; }
