/* Guide styles are deliberately scoped; no page or application styles are replaced. */
.riwaq-guide{--guide-accent:#225d54;--guide-on-accent:#fffdf7;--guide-soft:var(--pale,#e5eee6);font-family:var(--sans,Inter,Arial,sans-serif);font-size:15px;line-height:1.65;color:var(--ink,#203d39)}
:root[data-theme='night'] .riwaq-guide{--guide-accent:#b6d7bf;--guide-on-accent:#142b2a}
.riwaq-guide button,.riwaq-guide textarea,.riwaq-guide summary{font:inherit}
.riwaq-guide button,.riwaq-guide textarea,.riwaq-guide summary,.riwaq-guide a{touch-action:manipulation}
.riwaq-guide button:focus-visible,.riwaq-guide textarea:focus-visible,.riwaq-guide summary:focus-visible,.riwaq-guide a:focus-visible,.riwaq-guide [tabindex]:focus-visible{outline:3px solid var(--gold,#a57b2c);outline-offset:3px}
.riwaq-guide button:disabled{cursor:default}
.guide-launcher{position:fixed;z-index:25;right:24px;bottom:max(24px,env(safe-area-inset-bottom));display:flex;align-items:center;gap:11px;min-height:56px;padding:13px 20px;border:1px solid var(--guide-accent);border-radius:100px;background:var(--guide-accent);color:var(--guide-on-accent);box-shadow:0 8px 30px #143d362b;font-size:13px!important;font-weight:600!important;transition:transform .18s,box-shadow .18s}
.guide-launcher:hover{transform:translateY(-2px);box-shadow:0 10px 35px #143d3640}
.guide-launcher:disabled{display:none}
.guide-launcher svg{flex-shrink:0}
.guide-dialog{position:fixed;inset:auto 24px 24px auto;margin:0;width:610px;max-width:calc(100vw - 48px);height:min(820px,calc(100dvh - 48px));max-height:none;padding:0;border:1px solid var(--line,#d8dcd9);border-radius:22px;overflow:hidden;background:var(--white,#fffdf7);color:var(--ink,#203d39);box-shadow:0 30px 100px #102b3452}
.guide-dialog::backdrop{background:#102b3429;backdrop-filter:blur(2px)}
.guide-workspace{display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden}
.guide-header{display:flex;align-items:center;gap:12px;padding:21px 23px 18px;flex-shrink:0;background:var(--white,#fffdf7);border-bottom:1px solid var(--line,#d8dcd9)}
.guide-brand-mark{width:48px;height:48px;display:grid;place-items:center;flex-shrink:0;background:#fffdf7;border-radius:12px;border:1px solid #e4e2d6}
.guide-brand-mark img{width:38px;height:38px;object-fit:contain}
.guide-heading{min-width:0}
.guide-heading h2{margin:0;font-family:var(--serif,Georgia,serif);font-size:26px;letter-spacing:-.035em;font-weight:400;line-height:1.18}
.guide-heading p{margin:3px 0 0;font-size:12px;color:var(--muted,#647181);line-height:1.5}
.guide-icon-button{display:grid;place-items:center;width:44px;height:44px;flex-shrink:0;padding:8px;border:1px solid transparent;border-radius:50%;background:transparent;color:var(--ink,#203d39)}
.guide-icon-button:hover{background:var(--guide-soft);border-color:var(--line,#d8dcd9)}
.guide-close{margin-left:auto}
.guide-utility{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 23px;border-bottom:1px solid var(--line,#d8dcd9);font-size:11px;flex-shrink:0;background:var(--paper,#f8f4ea)}
.guide-local-label{display:inline-flex;align-items:center;gap:7px;color:var(--muted,#647181)}
.guide-local-label>span{width:6px;height:6px;border-radius:50%;background:var(--guide-accent);flex-shrink:0}
.guide-text-button{padding:4px 0;border:0;background:transparent;color:var(--guide-accent);font-size:11px!important;min-height:32px;text-underline-offset:3px;white-space:nowrap}
.guide-text-button:hover{text-decoration:underline}
.guide-messages{flex:1;min-height:100px;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;padding:22px 23px 12px;scrollbar-width:thin;scrollbar-color:var(--line,#d8dcd9) transparent}
.guide-message{margin:0 0 18px;max-width:94%;width:fit-content;overflow-wrap:anywhere}
.guide-message[data-speaker='visitor']{margin-left:auto;max-width:88%}
.guide-message-label{display:block;margin:0 0 6px 2px;font-size:10px;font-weight:600;letter-spacing:.035em;color:var(--muted,#647181)}
.guide-message[data-speaker='visitor'] .guide-message-label{text-align:right;margin-right:2px}
.guide-message-content{padding:15px 18px;border:1px solid var(--line,#d8dcd9);border-radius:4px 17px 17px;background:var(--paper,#f8f4ea)}
.guide-message[data-speaker='visitor'] .guide-message-content{border-color:var(--guide-accent);border-radius:17px 4px 17px 17px;background:var(--guide-accent);color:var(--guide-on-accent)}
.guide-message-content p{margin:0 0 11px;font-size:14px;line-height:1.75;color:inherit;white-space:pre-wrap}
.guide-message-content p:last-child{margin-bottom:0}
.guide-message-note{font-size:11px!important;line-height:1.65!important;color:var(--muted,#647181)!important;border-top:1px solid var(--line,#d8dcd9);padding-top:10px;margin-top:12px!important}
.guide-message-links{display:flex;flex-wrap:wrap;gap:7px;margin-top:13px}
.guide-message-links a{display:inline-flex;align-items:center;gap:8px;min-height:39px;border:1px solid var(--line,#d8dcd9);border-radius:8px;padding:7px 10px;font-size:12px;font-weight:550;background:var(--white,#fffdf7);color:var(--guide-accent)}
.guide-message-links a:hover{border-color:var(--guide-accent);text-decoration:none;background:var(--guide-soft)}
.guide-evidence{margin-top:11px;font-size:11px;color:var(--muted,#647181)}
.guide-evidence summary{font-size:11px!important;cursor:pointer;list-style:revert;padding:3px 0}
.guide-evidence ul{padding-left:17px;margin:8px 0 0}
.guide-evidence li{padding:2px 0;overflow-wrap:anywhere}
.guide-suggestions{display:flex;flex-wrap:wrap;gap:7px;padding:5px 23px 9px;flex-shrink:0;max-height:116px;overflow-y:auto;overscroll-behavior:contain}
.guide-suggestions:empty{padding:0}
.guide-suggestion{padding:8px 11px;min-height:39px;background:transparent;color:var(--guide-accent);border:1px solid var(--line,#d8dcd9);border-radius:100px;text-align:left;font-size:11px!important;line-height:1.45!important;max-width:100%;overflow-wrap:anywhere;transition:background .15s,border-color .15s}
.guide-suggestion:hover{background:var(--guide-soft);border-color:var(--guide-accent)}
.guide-suggestion:disabled{opacity:.55}
.guide-status{min-height:0;padding:0 24px;color:var(--muted,#647181);font-size:11px;flex-shrink:0}
.guide-status:not(:empty){padding-block:3px 8px}
.guide-status[data-busy='true']::before{content:'';display:inline-block;width:6px;height:6px;margin-right:7px;border-radius:50%;background:var(--guide-accent)}
.guide-composer{padding:12px 23px 10px;border-top:1px solid var(--line,#d8dcd9);flex-shrink:0}
.guide-input-label{display:block;font-size:11px;font-weight:550;margin-bottom:7px;color:var(--ink,#203d39)}
.guide-input-wrap{display:flex;align-items:flex-end;padding:9px 9px 9px 12px;gap:9px;border:1px solid var(--line,#d8dcd9);border-radius:13px;background:var(--paper,#f8f4ea)}
.guide-input-wrap:focus-within{border-color:var(--guide-accent);box-shadow:0 0 0 1px var(--guide-accent)}
.riwaq-guide textarea{display:block;flex:1;min-width:0;width:100%;min-height:70px;max-height:170px;resize:none;border:0;border-radius:3px;padding:2px;background:transparent;color:var(--ink,#203d39);font-size:14px;line-height:1.6;overflow-y:auto;overflow-wrap:anywhere;outline:none!important}
.riwaq-guide textarea::placeholder{color:var(--muted,#647181);opacity:.9}
.guide-send{display:grid;place-items:center;flex-shrink:0;width:43px;height:43px;padding:8px;border:0;border-radius:10px;background:var(--guide-accent);color:var(--guide-on-accent)}
.guide-send:disabled{opacity:.35}
.guide-compose-meta{display:flex;justify-content:space-between;gap:8px;margin-top:6px;font-size:9px;color:var(--muted,#647181);line-height:1.5}
.guide-compose-meta>span:last-child{white-space:nowrap}
.guide-footer{flex-shrink:0;padding:0 23px 13px}
.guide-how{font-size:11px;position:relative}
.guide-how>summary{cursor:pointer;list-style:none;display:flex;align-items:center;justify-content:space-between;padding:7px 0;color:var(--muted,#647181);font-size:10px;min-height:30px}
.guide-how>summary::-webkit-details-marker{display:none}
.guide-how[open]>summary>span{transform:rotate(180deg)}
.guide-how-content{position:absolute;bottom:100%;left:0;right:0;z-index:3;max-height:min(360px,55dvh);overflow-y:auto;padding:17px 18px;border:1px solid var(--line,#d8dcd9);border-radius:12px;background:var(--white,#fffdf7);box-shadow:0 -9px 35px #143d3620}
.guide-how-content p{margin:0 0 10px;font-size:11px;line-height:1.8;color:var(--muted,#647181)}
.guide-native-option{padding-top:11px;border-top:1px solid var(--line,#d8dcd9)}
.guide-native-option>label{display:flex;gap:9px;align-items:center;min-height:37px;font-size:12px;color:var(--ink,#203d39)}
.guide-native-option input{width:17px;height:17px;accent-color:var(--guide-accent);flex-shrink:0}
.guide-native-option p{font-size:10px;margin:5px 0 0}
.guide-preview-note{margin:0;font-size:9px;line-height:1.6;color:var(--muted,#647181);text-align:center}
.guide-noscript{padding:20px 24px;margin:0;background:var(--guide-soft);font-size:12px}
.guide-noscript a{text-decoration:underline}
@media(min-width:701px) and (max-height:750px){.guide-dialog{height:calc(100dvh - 28px);bottom:14px;right:14px}.guide-header{padding-block:14px}.guide-utility{padding-block:5px}.guide-messages{padding-top:15px}.guide-composer{padding-block:8px}.guide-footer{padding-bottom:8px}.riwaq-guide textarea{min-height:52px}}
@media(max-width:700px){.guide-launcher{right:17px;bottom:max(17px,env(safe-area-inset-bottom));min-height:51px;padding:11px 15px;font-size:12px!important}.guide-dialog{inset:var(--guide-viewport-top,0) 0 auto;margin:0;width:100%;max-width:100%;height:var(--guide-viewport-height,100dvh);border:0;border-radius:0;max-height:none}.guide-header{padding:calc(15px + env(safe-area-inset-top)) 18px 14px;gap:10px}.guide-heading h2{font-size:25px}.guide-heading p{font-size:11px}.guide-brand-mark{width:43px;height:43px;border-radius:10px}.guide-brand-mark img{width:35px;height:35px}.guide-utility{padding:6px 18px;font-size:10px}.guide-text-button{font-size:10px!important}.guide-messages{padding:19px 17px 9px;min-height:70px}.guide-message{max-width:96%;margin-bottom:16px}.guide-message-content{padding:13px 15px}.guide-message-content p{font-size:14px;line-height:1.75}.guide-message-label{font-size:9px}.guide-suggestions{padding:3px 17px 9px;gap:6px;max-height:108px}.guide-suggestion{font-size:10px!important;padding:8px 10px;min-height:38px}.guide-status{padding-inline:18px}.guide-composer{padding:11px 17px 8px}.guide-input-label{font-size:10px}.riwaq-guide textarea{font-size:16px;min-height:72px;max-height:135px}.guide-send{width:43px;height:43px}.guide-compose-meta{font-size:8px}.guide-footer{padding:0 17px calc(9px + env(safe-area-inset-bottom))}.guide-how>summary{min-height:27px}.guide-preview-note{font-size:8px}.guide-how-content{max-height:50dvh}}
@media(max-width:700px) and (max-height:560px){.guide-header{padding-block:9px}.guide-header .guide-brand-mark{width:35px;height:35px}.guide-header .guide-brand-mark img{width:29px;height:29px}.guide-heading h2{font-size:22px}.guide-heading p,.guide-preview-note{display:none}.guide-utility{padding-block:0}.guide-suggestions{max-height:48px;flex-wrap:nowrap}.guide-suggestion{flex-shrink:0;max-width:85%}.guide-composer{padding-block:7px}.guide-input-label{display:none}.riwaq-guide textarea{min-height:43px;max-height:75px}.guide-compose-meta{display:none}.guide-input-wrap{padding-block:5px}.guide-footer{padding-bottom:max(4px,env(safe-area-inset-bottom))}.guide-how>summary{padding-block:2px;min-height:23px}}
/* visualViewport also shrinks with a mobile keyboard, without changing media queries. */
.guide-dialog[data-compact='true'] .guide-header{padding-block:9px}.guide-dialog[data-compact='true'] .guide-brand-mark{width:35px;height:35px}.guide-dialog[data-compact='true'] .guide-brand-mark img{width:29px;height:29px}.guide-dialog[data-compact='true'] .guide-heading h2{font-size:22px}.guide-dialog[data-compact='true'] .guide-heading p,.guide-dialog[data-compact='true'] .guide-preview-note,.guide-dialog[data-compact='true'] .guide-input-label,.guide-dialog[data-compact='true'] .guide-compose-meta{display:none}.guide-dialog[data-compact='true'] .guide-utility{padding-block:0}.guide-dialog[data-compact='true'] .guide-messages{min-height:35px;padding-top:12px}.guide-dialog[data-compact='true'] .guide-suggestions{max-height:45px;flex-wrap:nowrap}.guide-dialog[data-compact='true'] .guide-suggestion{flex-shrink:0;max-width:85%}.guide-dialog[data-compact='true'] .guide-composer{padding-block:7px}.guide-dialog[data-compact='true'] textarea{min-height:43px;max-height:75px}.guide-dialog[data-compact='true'] .guide-input-wrap{padding-block:5px}.guide-dialog[data-compact='true'] .guide-footer{padding-bottom:max(4px,env(safe-area-inset-bottom))}.guide-dialog[data-compact='true'] .guide-how>summary{padding-block:2px;min-height:23px}
@media(max-width:1000px) and (max-height:560px){.guide-dialog{inset:var(--guide-viewport-top,0) 0 auto;width:100%;max-width:100%;height:var(--guide-viewport-height,100dvh);border:0;border-radius:0}}
@media(max-width:360px){.guide-suggestions{flex-wrap:nowrap;max-height:49px;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin}.guide-suggestion{flex-shrink:0;max-width:88%}.guide-preview-note{display:none}}
@media(prefers-reduced-motion:reduce){.riwaq-guide *{scroll-behavior:auto!important;transition:none!important;animation:none!important}.guide-launcher:hover{transform:none}}
@media(forced-colors:active){.guide-launcher,.guide-send,.guide-message-content,.guide-suggestion{border:1px solid ButtonText}.guide-message[data-speaker='visitor'] .guide-message-content{background:Canvas;color:CanvasText}}
