/* Composer and message list share one bounded visible viewport. */
html body #modal-overlay.fs-chat-modal {top:var(--fs-chat-vv-top,0px);bottom:auto;height:var(--fs-chat-vv-height,100dvh);align-items:center;padding:12px 0;}
html body #modal-overlay.fs-chat-modal .bottom-sheet {display:flex;flex-direction:column;min-height:0;height:min(720px,100%);max-height:100%;padding-bottom:0;margin:0 12px;overflow:hidden;}
html body #modal-overlay.fs-chat-modal .bottom-sheet-header {flex:0 0 auto;}
html body #modal-overlay.fs-chat-modal #modal-body {flex:1;min-height:0;max-height:none;overflow:hidden;padding:12px 16px calc(10px + var(--fs-chat-safe,0px));}
html body #modal-overlay.fs-chat-modal #modal-body>div {height:100%;min-height:0;grid-template-rows:minmax(0,1fr) auto;}
html body #modal-overlay.fs-chat-modal #admin-parent-thread-list {min-height:0;max-height:none!important;overflow:auto;overscroll-behavior:contain;align-content:start;}
html body #modal-overlay.fs-chat-modal #admin-parent-reply-text {width:100%;min-height:64px;height:76px;max-height:120px;resize:none;font-size:16px;padding:10px 12px;}
html body #modal-overlay.fs-chat-modal .bottom-sheet-footer {display:none;}
html body #modal-overlay.fs-chat-modal #admin-parent-reply-send {min-height:44px;}
@media(max-width:768px) {
 html body.fs-parent-chat #page-messages>.page-header {min-height:0!important;height:48px;padding:8px 14px!important;margin:0!important;}
 html body.fs-parent-chat #page-messages>.page-header h1 {font-size:20px!important;line-height:1.3;}
 html body.fs-parent-chat #page-messages>.page-header p {display:none;}
 html body.fs-parent-chat #page-messages .messages-thread-card {position:fixed;top:var(--fs-parent-chat-top);left:12px;right:12px;width:auto;height:var(--fs-parent-chat-height);min-height:0!important;max-height:none;margin:0;padding:12px!important;z-index:60;}
 html body.fs-parent-chat #page-messages .messages-compose {padding-top:8px;gap:8px;}
 html body.fs-parent-chat #page-messages .messages-compose textarea {height:64px;min-height:64px!important;max-height:96px;resize:none;}
 html body.fs-parent-chat #page-messages .messages-bubbles {padding:4px!important;overscroll-behavior:contain;overflow-anchor:none;}
 html body.fs-parent-chat.fs-chat-keyboard #bottom-nav {visibility:hidden;pointer-events:none;}
 html body.fs-parent-chat.fs-chat-keyboard #page-messages>.page-header {visibility:hidden;}
 html body #modal-overlay.fs-chat-modal {padding:8px 0;}
 html body #modal-overlay.fs-chat-modal .bottom-sheet {border-radius:18px;margin:0 8px;}
 html body #modal-overlay.fs-chat-modal .bottom-sheet-header {padding:12px 16px;}
 html body #modal-overlay.fs-chat-modal #modal-title {font-size:17px;}
 html body #modal-overlay.fs-chat-modal #admin-parent-reply-text {height:64px;}
}
html body #hub-support-thread:has(#hub-support-reply) {display:flex;flex-direction:column;min-height:0;height:var(--fs-support-chat-height,620px);max-height:var(--fs-support-chat-height,620px);overflow:hidden;}
html body #hub-support-thread>.hub-message-list {flex:1;min-height:0;max-height:none;align-content:start;overscroll-behavior:contain;}
html body #hub-support-reply {flex:0 0 auto;}
html body #hub-support-answer {height:76px;min-height:64px;max-height:100px;resize:none;}
@media(max-height:550px) {html body #modal-overlay.fs-chat-modal .bottom-sheet-header {padding:8px 14px;}html body #modal-overlay.fs-chat-modal #modal-body>div {gap:8px!important;}}

/* Parent chat owns a stable frame below the header; the title never sits behind a bubble. */
@media(max-width:768px){
 html body.fs-parent-chat #page-messages.active{position:fixed!important;top:var(--fs-parent-chat-top)!important;left:12px;right:12px;width:auto!important;height:var(--fs-parent-chat-height)!important;min-height:0!important;margin:0!important;padding:0!important;display:flex!important;flex-direction:column;gap:12px;overflow:hidden;z-index:60}
 html body.fs-parent-chat #page-messages>.page-header{position:static!important;flex:0 0 auto;height:auto!important;min-height:40px!important;padding:7px 8px!important;margin:0!important;visibility:visible!important;transform:none!important;background:linear-gradient(110deg,#315d63,#4c777b)!important;border-radius:12px;border:1px solid #bba46b70}
 html body.fs-parent-chat #page-messages>.page-header h1{margin:0!important;color:#faf6e8!important}
 html body.fs-parent-chat #messages-page-content{flex:1;min-height:0;display:flex;flex-direction:column}
 html body.fs-parent-chat #page-messages .messages-thread-card{position:static!important;top:auto!important;left:auto!important;right:auto!important;flex:1;min-height:0!important;height:100%!important;width:100%!important;padding:12px!important;margin:0!important;overflow:hidden;transform:none!important}
 html body.fs-parent-chat #messages-thread-panel{display:flex!important;flex-direction:column;height:100%;min-height:0;gap:8px}
 html body.fs-parent-chat #page-messages .messages-bubbles{flex:1;min-height:0!important;max-height:none!important;height:auto!important;overflow-y:auto!important;margin:0!important;scroll-padding-bottom:8px}
 html body.fs-parent-chat #page-messages .messages-compose{flex:0 0 auto;margin:0!important;padding-top:10px!important;border-top:1px solid #c2cec4;display:flex;flex-direction:column;gap:8px}
 html body.fs-parent-chat #page-messages .messages-compose textarea{width:100%!important;font-size:16px!important;line-height:1.5!important;height:80px;min-height:80px!important;max-height:120px;padding:12px!important;box-sizing:border-box}
 html body.fs-parent-chat.fs-chat-keyboard #page-messages .messages-compose textarea{height:96px;min-height:80px!important;max-height:32dvh}
 html body.fs-parent-chat #page-messages .messages-compose-actions{display:flex;justify-content:flex-end;flex:0 0 auto}
 html body.fs-parent-chat #messages-compose-send{min-height:44px!important;position:static!important;transform:none!important;margin:0!important}
 html body.fs-parent-chat.fs-chat-keyboard #bottom-nav{display:none!important;visibility:hidden!important;pointer-events:none!important}
 html body.fs-parent-chat #main{overflow:hidden!important}
}

/* An unfocused or dismissed keyboard never locks the entire messages page. */
html body .messages-compose [hidden]{display:none!important}
html body .messages-compose-editor{display:flex;flex-direction:column;gap:10px;min-height:0}
html body .messages-compose-open{min-height:44px}
html body #messages-compose-close{min-height:44px}
html body .messages-compose-actions{gap:10px;flex-wrap:wrap}
@media(max-width:768px){
 html body.fs-parent-chat:not(.fs-chat-keyboard) #page-messages.active{position:relative!important;top:auto!important;left:auto!important;right:auto!important;height:auto!important;width:100%!important;overflow:visible!important;z-index:auto!important}
 html body.fs-parent-chat:not(.fs-chat-keyboard) #main{overflow:visible!important}
 html body.fs-parent-chat:not(.fs-chat-keyboard) #messages-page-content{flex:0 0 auto}
 html body.fs-parent-chat:not(.fs-chat-keyboard) #page-messages .messages-thread-card{height:clamp(260px,calc(100dvh - 200px),760px)!important;flex:none}
 html body.fs-parent-chat #page-messages .messages-compose-actions{justify-content:space-between}
 html body.fs-parent-chat.fs-chat-keyboard #page-messages .messages-compose textarea{height:60px;min-height:48px!important;max-height:25dvh}
 html body.fs-parent-chat.fs-chat-keyboard #page-messages .messages-compose{max-height:75%;overflow-y:auto}
 html body.fs-parent-chat.fs-chat-keyboard #page-messages>.page-header{min-height:28px!important;padding:4px 8px!important}
 html body.fs-parent-chat.fs-chat-keyboard #page-messages{gap:6px}
}

.learning-progress-note summary,.pc-about summary{cursor:pointer;color:#35665f;font-weight:700;font-size:13px;padding:9px 0}.learning-result-help,.pc-about>div{font-size:14px;line-height:1.65;color:#405c5d}.pc-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;flex-wrap:wrap}.pc-heading h3{margin:8px 0 14px}.pc-about{max-width:100%}.pc-about[open]{flex-basis:100%}.pc-about>div{background:#fffdf5;border:1px solid #c7d5cc;border-radius:12px;padding:14px}.learning-result-help p,.pc-about p{margin:8px 0}
