.agent-help-launcher {
    position: fixed;
    left: 18px;
    bottom: 18px;
    z-index: 1500;
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    padding: 3px;
    border: 2px solid rgba(255, 255, 255, 0.96);
    border-radius: 50%;
    background: #526a7a;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.32);
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.agent-help-launcher img { display: block; width: 56px; height: 56px; border-radius: 50%; }
.agent-help-launcher:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 11px 28px rgba(0, 0, 0, 0.4); }
.agent-help-launcher:focus-visible, .agent-help-close:focus-visible, .agent-help-copy:focus-visible, .agent-help-manifest-link:focus-visible { outline: 3px solid #0879df; outline-offset: 3px; }
.agent-help-modal[hidden] { display: none; }
.agent-help-modal { position: fixed; inset: 0; z-index: 5000; display: grid; place-items: center; padding: 20px; background: rgba(17, 24, 39, 0.64); backdrop-filter: blur(5px); }
.agent-help-dialog { position: relative; box-sizing: border-box; width: min(590px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; padding: 30px; border: 1px solid rgba(82, 106, 122, 0.3); border-radius: 18px; background: #fff; color: #1f2937; box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32); text-align: left; }
.agent-help-dialog-icon { display: block; width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 50%; box-shadow: 0 6px 18px rgba(82, 106, 122, 0.3); }
.agent-help-dialog h2 { margin: 0 36px 10px; color: #293944; font-size: 1.45rem; line-height: 1.25; text-align: center; }
.agent-help-dialog p { margin: 0 0 16px; line-height: 1.55; }
.agent-help-close { position: absolute; top: 12px; right: 14px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: transparent; color: #64748b; font-size: 30px; line-height: 1; cursor: pointer; }
.agent-help-close:hover { background: #f1f5f9; color: #1f2937; }
.agent-help-prompt-label { display: block; margin-bottom: 7px; color: #334155; font-size: 0.86rem; font-weight: 700; }
.agent-help-prompt { display: block; box-sizing: border-box; width: 100%; min-height: 150px; padding: 14px; resize: vertical; border: 1px solid #cbd5e1; border-radius: 10px; background: #f8fafc; color: #172033; font: 0.92rem/1.5 Georgia, 'Times New Roman', serif; }
.agent-help-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 16px; }
.agent-help-copy { min-width: 150px; padding: 11px 20px; border: 1px solid #075f9f; border-radius: 9px; background: linear-gradient(135deg, #1689dc, #0866ad); color: #fff; font-weight: 700; cursor: pointer; box-shadow: 0 4px 12px rgba(8, 102, 173, 0.24); }
.agent-help-copy:hover { filter: brightness(1.06); }
.agent-help-manifest-link { color: #2f5f9d; font-size: 0.88rem; font-weight: 600; }
.agent-help-status { min-height: 1.35em; margin: 10px 0 0 !important; color: #16734b; font-size: 0.86rem; font-weight: 700; }
body.agent-help-open { overflow: hidden; }

@media (max-width: 560px) {
    .agent-help-launcher { left: 12px; bottom: 12px; width: 54px; height: 54px; }
    .agent-help-launcher img { width: 48px; height: 48px; }
    .agent-help-dialog { padding: 25px 20px 20px; }
    .agent-help-actions { align-items: stretch; flex-direction: column; }
    .agent-help-copy { width: 100%; }
    .agent-help-manifest-link { text-align: center; }
}

@media print { .agent-help-launcher, .agent-help-modal { display: none !important; } }

.agent-help-dialog details { margin: 1rem 0; }
.agent-help-dialog summary { cursor: pointer; font-weight: 600; }
.agent-help-dialog code, .agent-help-dialog a { overflow-wrap: anywhere; }

.agent-session-badge { position:fixed; left:88px; bottom:24px; z-index:1500; max-width:calc(100vw - 112px); padding:8px 12px; border-radius:12px; border:1px solid #206444; background:#ecfdf5; color:#175e3d; font-size:12px; cursor:pointer; }
.agent-session-badge[hidden] { display:none; }
#agentHelpStop { padding:10px; border:1px solid #9b3333; border-radius:8px; background:white; color:#872b2b; cursor:pointer; }
.agent-help-copy:disabled { opacity:.5; cursor:wait; }
@media print { .agent-session-badge { display:none !important; } }

/* Persistent launcher: green on state and a separate prompt/status control. */
.agent-help-launcher { width: 124px; border-radius: 32px; display:flex; justify-content:center; gap:7px; color:white; font:700 14px/1 system-ui,sans-serif; }
.agent-help-launcher img { width:44px; height:44px; }
.agent-help-launcher.listening { background:#15803d; border-color:#86efac; box-shadow:0 5px 20px #15803d55; }
.agent-help-launcher:disabled { opacity:.75; cursor:wait; }
.agent-listening-dot { display:none; width:8px; height:8px; border-radius:50%; background:#bbf7d0; }
.listening .agent-listening-dot { display:block; animation:agent-pulse 1.8s ease-in-out infinite; }
.agent-session-badge { left:154px; max-width:calc(100vw - 174px); }
@keyframes agent-pulse { 50% { opacity:.4; box-shadow:0 0 0 5px #86efac33; } }
@media (prefers-reduced-motion:reduce) { .listening .agent-listening-dot { animation:none; } }
@media (max-width:560px) { .agent-help-launcher { width:114px; height:54px; } .agent-help-launcher img { width:38px; height:38px; } .agent-session-badge { left:136px; bottom:18px; max-width:calc(100vw - 148px); font-size:11px; } }

.agent-prompt-button { position:fixed; left:154px; bottom:66px; z-index:1501; border:1px solid #86b69b; border-radius:8px; padding:5px 10px; background:#ecfdf5; color:#175e3d; cursor:pointer; }
.agent-copy-notice { position:fixed; left:18px; bottom:108px; z-index:6000; max-width:calc(100vw - 36px); box-sizing:border-box; padding:12px 16px; border-radius:10px; background:#175e3d; color:white; font:14px/1.4 system-ui,sans-serif; box-shadow:0 4px 18px #0005; }
.agent-prompt-button[hidden], .agent-copy-notice[hidden] { display:none; }
.agent-session-badge:disabled { opacity:1; cursor:default; }
@media(max-width:560px) { .agent-prompt-button { left:136px; bottom:72px; } }
@media print { .agent-prompt-button, .agent-copy-notice { display:none!important; } }
