.companion-guide{position:fixed;right:max(16px,calc(env(safe-area-inset-right) + 12px));bottom:max(16px,calc(env(safe-area-inset-bottom) + 12px));z-index:19;display:flex;flex-direction:column;align-items:flex-end;gap:12px;pointer-events:none}
.companion-guide>*{pointer-events:auto}
.companion-launcher{display:inline-flex;align-items:center;gap:8px;min-height:52px;padding:12px 20px 12px 16px;border-radius:99px;border:1px solid #b98be8;background:#8150ca;color:#fff;font-size:.9rem;font-weight:700;box-shadow:0 12px 32px #0009}
.companion-launcher{max-width:min(320px,calc(100vw - 32px))}.companion-launcher svg{flex-shrink:0}.companion-launcher span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.companion-launcher:hover{background:#9462dc}
.companion-launcher[aria-expanded=true]{background:#3d2852}
.companion-panel{width:min(390px,calc(100vw - 32px));max-height:min(580px,calc(100dvh - 180px));display:flex;flex-direction:column;background:#1b1626;border:1px solid #6b527d;border-radius:18px;box-shadow:0 24px 70px #000b;color:var(--text);overflow:hidden}
.companion-panel>*{flex-shrink:0}.companion-panel-head{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 12px 10px 20px;border-bottom:1px solid var(--line)}
.companion-panel-head h2{min-width:0;font-size:1.1rem;letter-spacing:-.02em;overflow-wrap:anywhere}
[data-help-form] button{max-width:100%;overflow-wrap:anywhere}
.companion-close{width:44px;height:44px;flex-shrink:0;border-radius:10px;border:1px solid #6b527d;background:transparent;color:var(--text);font-size:1.5rem;line-height:1}
.companion-intro{padding:12px 20px 0;font-size:.82rem;line-height:1.55;overflow-wrap:anywhere}
.companion-choice{padding:12px 20px 0;font-size:.82rem}
.companion-choice select{min-height:44px;padding:8px 12px}
.companion-panel>.companion-log{flex:1 1 auto;min-height:72px;margin-top:12px;border-block:1px solid var(--line);overflow-y:auto;overscroll-behavior:contain;padding:14px 20px 4px;display:grid;gap:16px;align-content:start}
.companion-panel>.companion-log:empty{display:none}
.companion-entry{display:grid;gap:8px;font-size:.88rem;overflow-wrap:anywhere}
.companion-entry p{max-width:none;margin:0}
.companion-q{color:var(--text)}
.companion-a{border-left:3px solid var(--accent);padding-left:12px;color:var(--muted);display:grid;gap:6px;white-space:pre-line}
.companion-a strong{color:var(--accent);font-size:.78rem}
.companion-a ol{margin:0;padding-left:20px;white-space:normal}
.companion-a .text-link{min-height:36px}
.companion-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:end;padding:14px 20px 8px}
.companion-label{grid-column:1/-1;font-size:.8rem}
.companion-form textarea{min-height:48px;max-height:120px;resize:none;padding:10px 12px}
.companion-form .button{min-height:48px;padding:10px 18px}
.companion-foot{padding:0 20px 12px;font-size:.8rem}
.companion-foot .text-link{min-height:36px}
/* #1028: phones and tablets keep the compact button and reserve room for it, so page ends and focused fields stay visible. */
@media(max-width:1023px){.site-footer{padding-bottom:calc(96px + env(safe-area-inset-bottom))}html{scroll-padding-bottom:96px}}
@media(max-width:820px){.companion-launcher{width:56px;height:56px;padding:0;justify-content:center}.companion-launcher span{display:none}}
@media(max-width:600px){.companion-guide.is-open{left:max(8px,env(safe-area-inset-left));right:max(8px,env(safe-area-inset-right));bottom:max(8px,env(safe-area-inset-bottom))}.companion-guide.is-open .companion-launcher{display:none}.companion-panel{width:100%;max-height:calc(100dvh - 92px)}}
@media(max-height:520px){.companion-intro,.companion-foot{display:none}.companion-panel{max-height:calc(100dvh - 92px)}}
/* #958 gutter */
@media(min-width:1024px){.wrap{width:min(var(--max),calc(100% - 240px))}.site-footer{padding-bottom:104px}.companion-launcher{flex-direction:column;justify-content:center;gap:4px;width:96px;min-height:64px;padding:10px 6px;border-radius:16px;font-size:.72rem;line-height:1.2}.companion-launcher span{white-space:normal;text-align:center;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow-wrap:anywhere}}
/* #1268: full label on desktop; 1600px+ uses a pill sized to the gutter */
@media(min-width:1024px){.companion-launcher{width:auto;min-width:96px;max-width:104px}.companion-launcher span{-webkit-line-clamp:3}}
@media(min-width:1600px){.companion-launcher{flex-direction:row;gap:8px;max-width:min(320px,calc((100vw - var(--max,1200px))/2 - 32px));min-height:52px;padding:12px 20px 12px 16px;border-radius:99px;font-size:.9rem;line-height:1.25}.companion-launcher span{text-align:left;-webkit-line-clamp:2}}
