/* Scoped to the chat release; editorial pages retain their existing styles. */
body.chat-release { --bg: #fdfdfb; --bg-soft:#f3f3f0; --bg-elev:#fff; --text:#252622; --text-soft:#62645e; --text-faint:#73766f; --accent:#5276ac; --accent-hover:#416394; --accent-soft:#edf2f8; --border:#e7e8e3; --user-bubble:#f0f1ed; --user-bubble-text:#252622; --col:780px; padding-left:260px; }
html.dark body.chat-release { --bg:#20211f; --bg-soft:#282a27; --bg-elev:#292b28; --text:#eeefea; --text-soft:#b9bcb4; --text-faint:#a1a59b; --accent:#9ab8e2; --accent-hover:#bdd0eb; --accent-soft:#2d3845; --border:#3b3e37; --user-bubble:#333630; --user-bubble-text:#eeefea; }
.chat-release header { border:0; background:var(--bg); backdrop-filter:none; }
.chat-topbar { height:68px; display:flex; align-items:center; gap:13px; padding:12px 24px; font-size:17px; font-weight:600; }
.topbar-ai {color:var(--text-soft); font-weight:400;}
.topbar-note { margin-left:auto; font-size:12px; font-weight:400; color:var(--text-faint); }
#chat-sidebar { position:fixed; inset:0 auto 0 0; z-index:70; width:260px; padding:22px 16px 12px; background:var(--bg-soft); border-right:1px solid var(--border); display:flex; flex-direction:column; gap:18px; }
.sidebar-brand {display:flex; align-items:center; gap:4px; margin-bottom:8px;}
.sidebar-brand .brand-name {font-size:17px; font-weight:600;}
.sidebar-brand .site-logo {width:30px; height:30px;}
#sidebar-close {font-size:24px; width:30px; flex-shrink:0;}
#chat-sidebar .new-chat-btn {border:1px solid var(--border); border-radius:10px; padding:11px 13px; font-size:14px; gap:10px; box-shadow:none;}
#chat-search {width:100%; min-height:40px; border:1px solid var(--border); border-radius:9px; background:transparent; padding:9px 11px; font:inherit; font-size:12px; color:var(--text);}
.chat-release #history-panel {position:static; display:block; width:100%; max-height:none; flex:1; min-height:40px; overflow:auto; padding:0; border:0; border-radius:0; box-shadow:none; background:transparent;}
.chat-release .history-heading {font-size:10px; padding:4px 10px 12px; letter-spacing:.08em;}
.chat-release .history-empty {font-size:12px; text-align:left; padding:8px 10px;}
.chat-release .history-open {padding:10px; font-size:12px;}
.chat-release .history-date {display:none;}
.chat-release .history-del {width:30px;height:32px;}
.sidebar-bottom {flex-shrink:0;}
.local-note {font-size:10px; color:var(--text-faint); margin:0 10px 16px;}
#chat-sidebar nav#site-nav {position:static; display:flex; flex-direction:column; align-items:stretch; gap:1px; padding:10px 0; min-width:0; border:0; border-top:1px solid var(--border); border-radius:0; background:transparent; box-shadow:none;}
#chat-sidebar nav#site-nav a {font-size:12px; padding:8px 10px; border-radius:8px; display:flex; justify-content:space-between;}
.sidebar-footer {display:flex;align-items:center; justify-content:space-between;padding:0 10px;font-size:11px;}
.sidebar-footer a {color:var(--text-faint);text-decoration:none;}
.sidebar-footer button {font-size:22px;}
body.sidebar-closed {padding-left:0;}
.sidebar-closed #chat-sidebar {visibility:hidden;transform:translateX(-100%);}
#sidebar-backdrop {display:none;}
.chat-release #chat {padding:35px 28px 48px;gap:30px;}
.chat-release .welcome-message {padding:0; width:100%;}
.chat-release.welcome-state #chat-main {display:flex;flex-direction:column;}
.chat-release.welcome-state #chat {width:100%;margin:auto; padding:30px 16px 90px;}
.chat-release .welcome-message h2 {font-size:clamp(25px,3vw,34px); font-weight:500;letter-spacing:-.035em;line-height:1.25;margin:0 0 14px;}
.chat-release .welcome-message > p {max-width:100%;font-size:14px;margin:0 auto 28px;}
.chat-release #composer {padding:12px 24px calc(14px + env(safe-area-inset-bottom));}
.chat-release .welcome-message #composer {padding:0; background:none; text-align:left;}
.chat-release #composer-form {display:grid;grid-template-columns:1fr 40px;gap:8px;padding:17px 16px 12px;border-radius:22px;box-shadow:0 3px 14px #00000004;}
.chat-release #composer-form:focus-within {box-shadow:0 0 0 2px var(--accent-soft);border-color:var(--accent);}
.chat-release #query {grid-column:1 / -1; width:100%;min-height:30px;font-size:16px;padding:0 2px;}
.chat-release #bible-version {justify-self:start;max-width:240px;background:transparent;text-align:left;padding:8px 3px;font-size:11px;appearance:auto;}
.chat-release #bible-version:focus-visible {outline:2px solid var(--accent);}
.chat-release #send-btn {width:34px;height:34px;align-self:end;justify-self:end;}
.chat-release #composer-hint {font-size:11px;margin-top:10px;line-height:1.5;color:var(--text-faint);}
.chat-release .welcome-examples {display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin-top:24px;}
.chat-release .example-btn {font-size:12px;padding:9px 14px;border-radius:999px;box-shadow:none;background:transparent;}
.chat-release .message.user {border-radius:18px;padding:12px 18px;font-size:15px;}
.chat-release .message.ai {font-size:16px;line-height:1.85;overflow-wrap:anywhere;}
.chat-release .message.ai p {margin:.85em 0;}
.chat-release .message.ai h2 {font-size:19px;line-height:1.4;margin-top:1.6em;}
.chat-release .message.ai pre {overflow:auto;}
.chat-release .msg-content {overflow-x:auto;}
.chat-release .copy-btn {color:var(--text-soft);min-height:36px;}
.chat-release .follow-up-label {font-size:10px;letter-spacing:.08em;}
.chat-release .follow-up-btn {font-size:12px;color:var(--text-soft);border-color:var(--border);padding:8px 12px;}
.chat-release details.verse-block {background:transparent;border:1px solid var(--border);border-radius:12px;}
.chat-release details.verse-block summary {padding:12px 15px;font-size:13px;color:var(--accent);font-weight:500;}
.chat-release .verse-icon {display:none;}
.chat-release details.verse-block[open] {background:var(--bg-soft);}
.chat-release details.verse-block .verse-text {padding:0 16px 12px;font-size:15px;color:var(--text);}
.verse-controls {padding:0 16px 14px;display:flex;align-items:center;flex-wrap:wrap;gap:16px; font-size:11px;}
.chapter-button {background:none;color:var(--accent);border:0;padding:6px 0;font:inherit;cursor:pointer;min-height:32px;}
.chapter-button:disabled {opacity:.6;cursor:wait;}
.verse-controls a {color:var(--text-soft);text-decoration:none;}
.chapter-content {border-top:1px solid var(--border);padding:8px 18px 18px;max-height:380px;overflow:auto;font-size:15px;}
.chapter-content .v {font-size:10px;vertical-align:super;color:var(--accent);margin-right:4px;}
@media (max-width:760px) {
 body.chat-release {padding-left:0;}
 .chat-topbar {height:58px;padding:10px 14px;}
 .topbar-note {display:none;}
 #chat-sidebar {width:min(290px,85vw);padding-top:18px;}
 body:not(.sidebar-closed) #sidebar-backdrop {display:block;position:fixed;inset:0;background:#0006;border:0;z-index:65;}
 .chat-release #chat {padding:24px 18px 30px;}
 .chat-release.welcome-state #chat {padding:24px 18px 50px;}
 .chat-release .welcome-message > p {font-size:13px;max-width:280px;}
 .chat-release #composer {padding:10px 12px calc(10px + env(safe-area-inset-bottom));}
 .chat-release .welcome-examples {gap:7px;margin-top:20px;}
 .chat-release .example-btn {font-size:11px;padding:8px 11px;}
 .chat-release #bible-version {max-width:220px;}
 .chat-release .message.ai {font-size:15px;}
 #chat-sidebar .new-chat-btn span {display:inline;}
}
@media (max-height:540px) {.chat-release.welcome-state #chat {margin:0 auto;padding-bottom:20px;} .chat-release .welcome-message h2 {font-size:24px;}}
