.guest-chat-active{--guest-bg:#050c16;--guest-panel:#0a1425;--guest-text:#e9f2ff;--guest-muted:#96afcc;--guest-border:#244568;--guest-blue:#198bff;background:var(--guest-bg)}
.guest-chat-active[data-site-theme="day"]{--guest-bg:#f1f6fb;--guest-panel:#fff;--guest-text:#16324a;--guest-muted:#526e88;--guest-border:#bdcfe2;--guest-blue:#0871dd}
.guest-chat-shell{width:min(1060px,calc(100% - 36px));height:100dvh;min-height:420px;margin:0 auto;padding:10px 0 max(10px,env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:22px;color:var(--guest-text);font-family:inherit;box-sizing:border-box}
.guest-chat-shell *{box-sizing:border-box}.guest-chat-shell button,.guest-chat-shell textarea,.guest-chat-shell a{font:inherit}.guest-chat-shell button{cursor:pointer}.guest-chat-shell svg{width:24px;height:24px;flex-shrink:0}
.guest-topbar{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:60px;padding:10px 18px;border:1px solid var(--guest-border);border-radius:18px;background:var(--guest-bg);flex-shrink:0}
.guest-account{display:flex;align-items:center;gap:18px}.guest-all-tools,.guest-auth{display:inline-flex;align-items:center;gap:9px;background:none;border:0;color:var(--guest-text);font-size:13px!important;font-weight:750!important;text-decoration:none;padding:5px 0}.guest-all-tools svg{width:18px;height:18px;color:#92c9ff}.guest-auth span{color:var(--guest-blue)}
.guest-messages{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:none;padding-bottom:15px}
.guest-empty{min-height:306px;border:1px dashed var(--guest-border);border-radius:22px;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:36px 20px;color:var(--guest-muted)}
.guest-empty .guest-orb{width:76px;height:76px;color:#007fb6;margin-bottom:16px;stroke-width:.65;filter:drop-shadow(0 0 5px #00a4e533)}.guest-empty h1{font-size:18px;font-weight:450;line-height:1.5;margin:0}.guest-empty p{margin:0 0 16px;font-size:17px;line-height:1.5}
.guest-template{display:inline-flex;align-items:center;gap:10px;border:1px solid #315a86;border-radius:15px;padding:13px 20px;background:var(--guest-panel);color:var(--guest-text);font-size:13px!important;font-weight:750!important}.guest-template svg{width:17px;height:17px;color:#94c9ff}
.guest-compose{flex-shrink:0}.guest-tools-heading{display:flex;justify-content:flex-end;margin-bottom:3px}.guest-collapse{border:1px solid var(--guest-border);border-radius:12px 12px 0 12px;padding:8px 11px;background:var(--guest-panel);color:var(--guest-muted);font-size:11px!important}
.guest-tools{display:flex;align-items:stretch;gap:10px;overflow-x:auto;scrollbar-width:none;border:1px solid var(--guest-border);border-radius:20px;padding:12px 12px;background:var(--guest-panel)}.guest-tools[hidden]{display:none}.guest-tools::-webkit-scrollbar{display:none}
.guest-tool{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;min-width:70px;flex:0 0 auto;border:0;background:transparent;padding:3px 5px;color:var(--guest-text);font-size:11px!important;font-weight:700!important}.guest-tool svg{width:22px;height:22px;color:#7cb3ff}.guest-tool-0,.guest-tool-1{color:#fb6575}.guest-tool-0 svg,.guest-tool-1 svg,.guest-tool-3 svg{color:#fb6575}.guest-tool-4 svg{color:#ffbb53}.guest-tool-5 svg{color:#b9c9e8}.guest-tool-6 svg{color:#36d6c5}.guest-tool-7 svg{color:#9cafff}.guest-tool-8 svg{color:#c899ff}
.guest-tools-hint{text-align:center;color:var(--guest-muted);font-size:11px;font-style:italic;margin:6px 0 8px}.guest-form{display:flex;align-items:flex-end;gap:8px;margin:0}.guest-model{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;flex:0 0 74px;min-height:70px;padding:6px 3px;background:var(--guest-panel);color:var(--guest-text);border:1px solid var(--guest-border);border-radius:20px;font-size:10px!important;font-weight:700!important}.guest-model img{object-fit:contain;border-radius:10px}
.guest-input-wrap{display:flex;align-items:flex-end;gap:10px;padding:10px 12px;min-height:70px;border:1px solid #315d8c;border-radius:28px;background:var(--guest-panel);flex:1;min-width:0}.guest-input-wrap textarea{resize:none;flex:1;min-width:0;border:0;outline:none;background:transparent;color:var(--guest-text);line-height:26px;font-size:16px;max-height:140px;padding:10px 0;box-shadow:none}.guest-input-wrap textarea::placeholder{color:var(--guest-muted)}
.guest-attach,.guest-mic{width:32px;height:46px;border:0;background:none;color:var(--guest-text);display:grid;place-items:center;padding:0}.guest-send{flex:0 0 46px;width:46px;height:46px;padding:10px;border:1px solid #54aeff;border-radius:50%;background:var(--guest-blue);color:#fff;display:grid;place-items:center;box-shadow:0 3px 22px #1789ff33}.guest-send svg{width:25px;height:25px;fill:currentColor;stroke-width:.7}.guest-send:disabled{opacity:.45;cursor:default;box-shadow:none}
.guest-status{color:var(--guest-muted);font-size:11px;line-height:1.5;text-align:center;margin:8px 0 0;min-height:17px}
.guest-bubble{max-width:88%;width:fit-content;margin:18px 8px;padding:15px 19px;border:1px solid var(--guest-border);border-radius:18px;background:var(--guest-panel);font-size:15px;line-height:1.7;overflow-wrap:anywhere}.guest-bubble>strong{display:block;font-size:11px;color:var(--guest-muted);margin-bottom:7px}.guest-answer{white-space:pre-wrap}.guest-user{margin-left:auto;background:color-mix(in srgb,var(--guest-blue) 14%,var(--guest-panel))}
.guest-auth-dialog{position:fixed;inset:0;width:min(440px,calc(100vw - 32px));max-height:calc(100dvh - 40px);margin:auto;padding:32px;border:1px solid var(--guest-border);border-radius:23px;background:var(--guest-panel);color:var(--guest-text);box-shadow:0 25px 90px #0008}.guest-auth-dialog::backdrop{background:#020710b8;backdrop-filter:blur(6px)}.guest-auth-dialog h2{margin:0 24px 14px 0;font-size:23px}.guest-auth-dialog p{color:var(--guest-muted);line-height:1.65;font-size:15px}.guest-dialog-close{position:absolute;right:13px;top:9px;border:0;background:none;color:var(--guest-muted);font-size:29px!important}.guest-dialog-auth{display:block;margin:24px 0 13px;padding:13px;border-radius:13px;background:var(--guest-blue);color:white;text-align:center;text-decoration:none;font-weight:700}.guest-dialog-back{display:block;width:100%;border:0;background:none;color:var(--guest-muted);font-size:13px!important;padding:8px}
.guest-sr{position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden;white-space:nowrap}.guest-chat-shell :focus-visible{outline:2px solid #69b8ff;outline-offset:3px}.guest-chat-shell textarea:focus-visible{outline:none}
@media(max-width:600px){.guest-chat-shell{width:calc(100% - 20px);gap:14px;padding-top:7px}.guest-topbar{padding:9px 11px;gap:9px;border-radius:15px}.guest-account{gap:10px}.guest-all-tools,.guest-auth{font-size:11px!important}.guest-all-tools{gap:5px}.guest-account .site-theme-switch{transform:scale(.85);transform-origin:right center;margin-left:-12px}.guest-empty{min-height:270px;padding:25px 14px}.guest-empty h1,.guest-empty p{font-size:15px}.guest-empty .guest-orb{width:66px;height:66px}.guest-template{font-size:12px!important;padding:11px 16px}.guest-tools{padding:10px 5px;border-radius:17px;gap:3px}.guest-tool{min-width:66px;font-size:10px!important}.guest-model{flex-basis:62px;min-height:60px;border-radius:17px;font-size:9px!important}.guest-input-wrap{min-height:60px;border-radius:23px;padding:7px 8px;gap:5px}.guest-input-wrap textarea{font-size:15px;padding:8px 0}.guest-attach,.guest-mic{width:25px;height:42px}.guest-send{width:40px;height:40px;flex-basis:40px}.guest-form{gap:6px}.guest-status{font-size:10px}.guest-bubble{max-width:94%;margin-inline:1px}.guest-user{margin-left:auto}.guest-auth-dialog{padding:26px}.guest-topbar .site-theme-switch-option{font-size:10px!important}}
@media(max-width:370px){.guest-topbar{flex-wrap:wrap}.guest-account{margin-left:auto}.guest-mic{display:none}}
@media(max-width:600px){.guest-topbar .guest-all-tools,.guest-topbar .guest-auth{white-space:nowrap}.guest-topbar [data-site-theme-mount] .site-theme-switch{width:78px;transform:none;margin-left:0}.guest-topbar [data-site-theme-mount] .site-theme-switch-option b{display:none}}
html[data-site-theme="day"] .guest-chat-shell textarea{background:transparent!important}
.guest-model-dialog{position:fixed;inset:0;width:min(650px,calc(100vw - 28px));max-height:calc(100dvh - 32px);overflow:auto;margin:auto;padding:28px;border:1px solid var(--guest-border);border-radius:23px;background:var(--guest-panel);color:var(--guest-text);box-shadow:0 25px 90px #0008}
.guest-model-dialog::backdrop{background:#020710b8;backdrop-filter:blur(6px)}
.guest-model-dialog h2{margin:0 30px 10px 0;font-size:24px}.guest-model-dialog>p{font-size:14px;line-height:1.6;color:var(--guest-muted);margin:0 0 22px}
.guest-model-close{position:absolute;top:10px;right:14px;background:none;border:0;color:var(--guest-muted);font-size:28px!important}
.guest-model-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.guest-model-choice{position:relative;overflow:hidden;min-height:166px;padding:18px 10px;border:1px solid var(--guest-border);border-radius:17px;background:var(--guest-bg);color:var(--guest-text)}
.guest-model-choice-content{display:flex;flex-direction:column;align-items:center;gap:10px}.guest-model-choice img{object-fit:contain;border-radius:16px}.guest-model-choice strong{font-size:15px;line-height:1.3;order:-1}
.guest-model-choice.is-selected{border-color:#31b8bd;background:color-mix(in srgb,#31b8bd 9%,var(--guest-bg))}
.guest-model-selected{display:block;margin-top:10px;color:#5cdbcf;font-size:11px;font-weight:700}
.guest-model-choice.is-locked img{opacity:.3;filter:grayscale(.5)}
.guest-model-lock{position:absolute;inset:42px 0 0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:10px;background:color-mix(in srgb,var(--guest-bg) 54%,transparent)}
.guest-model-lock svg{width:31px;height:31px;filter:drop-shadow(0 3px 8px #0006)}.guest-model-lock span{font-size:12px;font-weight:750;line-height:1.45;text-align:center;text-shadow:0 1px 5px var(--guest-bg)}
.guest-model-choice:hover{border-color:#7a9ec4}.guest-model-choice:focus-visible,.guest-model-close:focus-visible{outline:2px solid #69b8ff;outline-offset:3px}
@media(max-width:520px){.guest-model-dialog{padding:23px 18px}.guest-model-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.guest-model-choice{min-height:158px}.guest-model-lock span{font-size:11px}}


/* Guest header sign-in action */
.guest-topbar .guest-auth{min-height:40px;padding:10px 16px;border:1px solid #54adff;border-radius:12px;background:linear-gradient(145deg,#238fff,#1165d5);color:#fff;box-shadow:0 5px 18px #1687ff26;white-space:nowrap;transition:background .18s ease,box-shadow .18s ease}
.guest-topbar .guest-auth span{color:#fff}
.guest-topbar .guest-auth:hover{background:linear-gradient(145deg,#43a1ff,#1978ed);color:#fff;box-shadow:0 6px 22px #1687ff40}
.guest-topbar .guest-auth:focus-visible{outline:2px solid #94ceff;outline-offset:3px}
@media(max-width:600px){.guest-topbar .guest-auth{min-height:36px;padding:9px 12px;border-radius:10px}}
@media(prefers-reduced-motion:reduce){.guest-topbar .guest-auth{transition:none}}

.guest-tool-icon{position:relative;display:inline-flex;padding:3px 5px 0 0}
.guest-tool-icon>svg{opacity:.5}
.guest-tool-lock{position:absolute;right:-4px;bottom:-3px;display:flex;align-items:center;justify-content:center;width:17px;height:17px;border-radius:50%;background:var(--guest-panel);border:1px solid var(--guest-border)}
.guest-tool-lock svg{width:12px;height:12px;color:var(--guest-text)}
.guest-tools-hint[hidden]{display:none}

/* Guest primary actions keep their contrast against shared day-theme controls. */
html[data-site-theme="day"] .guest-topbar .guest-auth,
html[data-site-theme="day"] .guest-topbar .guest-auth span,
html[data-site-theme="day"] .guest-chat-shell .guest-send{
    color:#fff!important;
}
html[data-site-theme="day"] .guest-topbar .guest-auth,
html[data-site-theme="day"] .guest-chat-shell .guest-send{
    background:#0969da!important;
    border-color:#0969da!important;
}
html[data-site-theme="day"] .guest-topbar .guest-auth:hover,
html[data-site-theme="day"] .guest-chat-shell .guest-send:not(:disabled):hover{
    background:#0759bc!important;
    border-color:#0759bc!important;
}
html[data-site-theme="day"] .guest-chat-shell .guest-send:disabled{
    background:#dce7f1!important;
    border-color:#c5d5e4!important;
    color:#688198!important;
    opacity:1!important;
    box-shadow:none;
}

.guest-messages::-webkit-scrollbar{display:none}
.guest-answer.markdown-enhanced{white-space:normal}
.guest-answer.markdown-enhanced strong{display:inline;font-size:inherit;margin:0;color:inherit}
.guest-bubble .md-code-block pre{margin:0;padding:13px 14px;border:0;border-radius:0;white-space:pre;overflow:auto;background:#050a13}
.guest-chat-active .guest-answer :is(.table-scroll,pre,.katex-display){scrollbar-width:none}
.guest-chat-active .guest-answer :is(.table-scroll,pre,.katex-display)::-webkit-scrollbar{display:none}
