#helpChatLauncher{display:flex;align-items:center;justify-content:center;flex:none;width:44px;height:44px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--ink,#17364d);cursor:pointer}
#helpChatLauncher:hover,#helpChatLauncher[aria-expanded=true]{background:var(--soft,#eee2d2)}
#helpChatLauncher svg{width:26px;height:26px;flex:none}
#helpChatLauncher:focus-visible,#helpChatPanel button:focus-visible,#helpChatPanel input:focus-visible{outline:3px solid #c59b4c;outline-offset:2px}
#helpChatPanel{position:fixed;right:max(16px,calc((100vw - 1080px)/2 + 28px));top:78px;z-index:96;display:flex;flex-direction:column;width:min(400px,calc(100vw - 24px));height:min(560px,calc(100dvh - 100px));min-height:0;overflow:hidden;border:1px solid var(--divider,#c7b998);border-radius:20px;background:var(--surface,#fffdf8);color:var(--ink,#17283e);box-shadow:0 22px 55px #10203940,0 3px 12px #10203918;font:14px/1.45 system-ui,sans-serif}
#helpChatPanel[hidden]{display:none}
#helpChatPanel header{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:none;padding:16px 18px;background:linear-gradient(125deg,#17364d,#24465a);color:#fff}
#helpChatPanel .help-heading{font-size:16px;line-height:1.35;font-weight:600;max-width:300px}
#helpChatPanel .help-close{display:grid;place-items:center;flex:none;width:36px;height:36px;border:0;border-radius:50%;background:#ffffff16;color:inherit;font-size:26px;line-height:1;cursor:pointer}
#helpChatPanel .help-close:hover{background:#ffffff2b}
#helpChatPanel .help-messages{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:18px 16px;display:flex;flex-direction:column;gap:10px;scrollbar-width:thin}
#helpChatPanel .help-message{margin:0;padding:11px 13px;border-radius:15px;max-width:94%;white-space:pre-wrap;overflow-wrap:anywhere;background:var(--soft,#eee2d2);color:var(--ink,#17283e)}
#helpChatPanel .help-message.user{align-self:end;background:#24495c;color:#fff;border-bottom-right-radius:5px}
#helpChatPanel .help-message.bot{align-self:start;border-bottom-left-radius:5px}
#helpChatPanel .help-topics-wrap{flex:none;padding:11px 14px 12px;border-top:1px solid var(--divider,#c7b998)}
#helpChatPanel .help-topics-heading{margin:0 2px 9px;color:var(--secondary,#655d53);font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase}
#helpChatPanel .help-topics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
#helpChatPanel .help-topics button{display:flex;align-items:center;min-width:0;min-height:39px;border:1px solid var(--divider,#c7b998);border-radius:11px;background:var(--paper,#fffdf8);color:inherit;padding:8px 10px;box-shadow:inset 3px 0 #c5a059;cursor:pointer;font:600 12px/1.25 system-ui,sans-serif;text-align:left;transition:background .15s,border-color .15s,transform .15s}
#helpChatPanel .help-topics button:hover{background:var(--soft,#eee2d2);border-color:#c5a059;transform:translateY(-1px)}
#helpChatPanel .help-topics button:active{transform:none}
#helpChatPanel .help-compose{display:flex;gap:8px;flex:none;padding:12px 14px 4px;border-top:1px solid var(--divider,#c7b998)}
#helpChatPanel .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
#helpChatPanel .help-compose input{flex:1;min-width:0;min-height:44px;border:1px solid var(--divider,#c7b998);border-radius:11px;background:var(--paper,#fff);color:inherit;padding:9px 12px;font:inherit}
#helpChatPanel .help-compose input:focus{border-color:#c5a059}
#helpChatPanel .help-compose button{min-width:62px;border:0;border-radius:11px;background:#17364d;color:#fff;font-weight:700;cursor:pointer}
#helpChatPanel .help-compose button:hover{background:#24495c}
#helpChatPanel .help-compose button:disabled{opacity:.6}
#helpChatPanel .help-support{align-self:start;flex:none;margin:7px 14px 12px;padding:4px 2px;border:0;background:transparent;color:var(--ink,#17364d);font:600 12px system-ui,sans-serif;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
@media(max-width:600px){#helpChatPanel{top:69px;right:12px;height:min(560px,calc(100dvh - 88px))}#helpChatPanel .help-topics button{min-height:42px}}
@media(max-width:600px){#helpChatPanel.help-typing{top:var(--chat-top,8px);height:var(--chat-height,calc(100dvh - 16px))}#helpChatPanel.help-typing .help-topics-wrap{display:none}}
@media(max-height:520px){#helpChatPanel{top:8px;height:calc(100dvh - 16px)}#helpChatPanel .help-messages{padding:8px 14px}#helpChatPanel .help-topics-wrap{padding-top:6px;padding-bottom:6px}#helpChatPanel .help-topics-heading{margin-bottom:4px}#helpChatPanel .help-topics button{min-height:32px;padding:4px 8px}#helpChatPanel .help-compose{padding-top:5px}}
@media(prefers-reduced-motion:reduce){#helpChatPanel .help-topics button{transition:none}}
body:has(#reader:not([hidden])) #helpChatLauncher,body:has(#reader:not([hidden])) #helpChatPanel{display:none}

/* Home-only PWA install action sits beside Mark in the top bar. */
#bookRoomInstallButton{display:inline-flex;align-items:center;justify-content:center;flex:none;gap:7px;min-height:39px;padding:8px 12px;border:1px solid #bda06c;border-radius:999px;background:linear-gradient(135deg,#fff8e8,#f1e1c1);color:#263e51;font:700 12px/1.2 system-ui,sans-serif;white-space:nowrap;box-shadow:0 2px 9px #9f774a22;cursor:pointer}
#bookRoomInstallButton:hover{background:#efdfc0;border-color:#ae8649}
#bookRoomInstallButton svg{flex:none}
#bookRoomInstallButton[hidden]{display:none!important}
#bookRoomInstallButton:focus-visible,#bookRoomInstallGuide button:focus-visible{outline:3px solid #c59b4c;outline-offset:3px}
#bookRoomInstallButton .install-mobile-label{display:none}
body[data-theme=dark] #bookRoomInstallButton{background:#2f3944;color:#f1d6a3;border-color:#806b48;box-shadow:none}
body[data-theme=dark] #bookRoomInstallButton:hover{background:#394650}
#bookRoomInstallGuide{width:min(410px,calc(100% - 30px));max-height:calc(100dvh - 36px);overflow:auto;border:1px solid #d8c7a7;border-radius:18px;background:var(--paper,#fffdf8);color:var(--ink,#182d41);box-shadow:0 24px 60px #101f3455;padding:22px 23px;margin:auto}
#bookRoomInstallGuide::backdrop{background:#142337ad;backdrop-filter:blur(3px)}
#bookRoomInstallGuide .install-guide-head{display:flex;gap:13px;align-items:center;margin-bottom:15px}
#bookRoomInstallGuide .install-guide-head>span{display:grid;place-items:center;width:45px;height:49px;border:1px solid #dac18e;border-radius:12px;background:#f7ead1;color:#8b652b;font-size:25px}
#bookRoomInstallGuide .install-guide-head small{font:800 10px/1.5 system-ui,sans-serif;letter-spacing:.14em;color:#ac8349}
#bookRoomInstallGuide h2{font:500 23px/1.2 Georgia,serif;margin:4px 0}
#bookRoomInstallGuide p{font:13px/1.55 system-ui,sans-serif;color:var(--secondary,#627081);margin:11px 0 14px}
#bookRoomInstallGuide ol{display:grid;gap:9px;padding-left:25px;margin:8px 0 22px;color:var(--ink,#182d41);font:13px/1.5 system-ui,sans-serif}
#bookRoomInstallGuide li{padding-left:5px}
#bookRoomInstallGuide li::marker{color:#ba8c4e;font-weight:800}
#bookRoomInstallGuide .install-guide-actions{display:flex;justify-content:flex-end}
#bookRoomInstallGuide .install-guide-close{min-height:42px;padding:10px 21px;border:0;border-radius:10px;background:#213b54;color:white;font:700 13px system-ui,sans-serif}
body:has(#reader:not([hidden])) #bookRoomInstallButton{display:none!important}
@media(max-width:600px){
  #bookRoomInstallButton{min-height:37px;padding:8px 9px;gap:5px;font-size:11px}
  #bookRoomInstallButton svg{width:17px;height:17px}
  #bookRoomInstallButton .install-desktop-label{display:none}
  #bookRoomInstallButton .install-mobile-label{display:inline}
  body .topbar:has(#bookRoomInstallButton:not([hidden])){gap:3px;padding-left:10px;padding-right:10px}
  body .topbar:has(#bookRoomInstallButton:not([hidden])) .wordmark .book-room-logo{width:clamp(112px,31vw,148px);height:42px}
  body .topbar:has(#bookRoomInstallButton:not([hidden])) #helpChatLauncher,body .topbar:has(#bookRoomInstallButton:not([hidden])) #themeToggle{width:39px;height:39px}
}
@media(max-width:380px){
  #bookRoomInstallButton{width:37px;height:37px;padding:0}
  #bookRoomInstallButton .install-mobile-label{display:none}
}
