/* Quiz: short instructions, visible progress, generous touch targets. */
/* Messages share one row: speaker identity at left, readable text across the remaining width. */
.character-window .character-messages{align-items:stretch;gap:7px;padding:12px 11px;scroll-padding-block:12px}.character-window .character-message{display:grid;grid-template-columns:minmax(64px,92px) minmax(0,1fr);align-items:start;column-gap:9px;row-gap:0;width:100%;max-width:none;margin:0;padding:8px 10px;border-radius:10px}.character-window .character-message.assistant,.character-window .character-message.user{border-radius:10px}.character-window .character-message-heading{display:flex;align-items:center;gap:5px;min-width:0;overflow-wrap:anywhere}.character-window .character-message-heading strong{font-size:10px;line-height:1.35}.character-window .character-message p{min-width:0;margin:0;white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;line-height:1.62}.chat-window-meta{align-items:center;flex-wrap:wrap}.character-window .chat-composer{max-height:min(42%,300px);padding:9px 11px}.character-window .chat-composer textarea{height:52px;min-height:46px;max-height:84px;padding:8px 10px;font-size:16px;line-height:1.5}.character-window .chat-suggestions{margin-bottom:6px}.character-window .chat-privacy{max-height:68px;overflow:auto}
@media(max-width:960px){body.chat-keyboard-condensed .site-header-wrap,body.chat-keyboard-condensed .site-notice-dock,body.chat-keyboard-condensed .site-news-band,body.chat-keyboard-condensed .chat-page-nav{display:none!important}body.chat-keyboard-condensed .character-detail{padding:0!important;margin:0!important;max-width:none!important}body.chat-keyboard-condensed .character-chat-layout{display:block!important;margin:0!important}body.chat-keyboard-condensed .chat-primary-column{width:100%!important;max-width:none!important}body.chat-keyboard-condensed .character-window.character-conversation{position:fixed!important;z-index:95!important;inset:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)!important;width:100vw!important;height:auto!important;max-width:none!important;max-height:none!important;min-height:0!important;margin:0!important;border-radius:0!important;scroll-margin:0!important;box-shadow:none!important}body.chat-keyboard-condensed .chat-window-header{padding:8px 12px}body.chat-keyboard-condensed .character-window .character-messages{flex:1 1 0;min-height:0}body.chat-keyboard-condensed .character-window .chat-composer{flex:0 0 auto;max-height:42%;padding-bottom:max(8px,env(safe-area-inset-bottom))}}

/* Slim, one-line section headers return room to the active quiz and chat. */
.quiz-page-head{margin:0 0 7px!important;padding:5px 0!important}.quiz-page-head .eyebrow{font-size:9px;line-height:1.2;letter-spacing:.11em}.quiz-page-head h1{font-size:clamp(22px,3vw,30px)!important;line-height:1.2!important;margin:2px 0!important}.quiz-page-head p{font-size:12px!important;line-height:1.45!important;margin:2px 0!important}
.character-window.character-conversation{width:100%;max-width:100%;margin:8px auto!important;height:min(860px,calc(var(--chat-vh,100dvh) - var(--chat-head-h,0px) - var(--chat-nav-h,50px) - 12px))}.chat-window-header{min-height:0;padding:5px 10px!important;gap:8px!important}.chat-window-header .character-avatar{width:32px!important;height:32px!important;flex-basis:32px!important}.chat-window-header>div{display:flex;align-items:center;gap:8px;min-width:0}.chat-window-header h2{font-size:14px!important;line-height:1.2!important;margin:0!important;white-space:nowrap}.chat-window-header .chat-about-toggle{font-size:9px!important;line-height:1.25!important;white-space:nowrap}.chat-window-header .chat-author-role{font-size:7px!important;line-height:1.2!important;letter-spacing:.02em}.chat-window-menu summary{padding:4px 6px!important;font-size:14px!important}.character-window .chat-window-meta{padding:3px 9px!important;gap:6px!important;font-size:8px!important;line-height:1.3!important}.character-window .chat-window-meta>*{min-width:0}.character-window .chat-window-meta .chat-language-prompt{font-size:8px!important;padding:2px 5px!important;line-height:1.2!important}
.character-window .chat-suggestion-label{display:block;margin:2px 0 1px!important;font-size:8px!important;line-height:1.2!important}.character-window .chat-suggestions{display:block!important;width:100%;max-width:100%;overflow:hidden!important;margin:0 auto 3px!important;padding:0!important}.character-window .chat-suggestions button{display:block;width:100%;max-width:100%!important;min-height:0;padding:4px 8px!important;font-size:9px!important;line-height:1.25!important;white-space:nowrap!important;overflow:hidden;text-overflow:ellipsis;text-align:left}
.character-window .character-messages{width:100%;box-sizing:border-box;align-items:stretch!important}.character-window .character-message{display:grid!important;grid-template-columns:minmax(56px,76px) minmax(0,1fr)!important;width:100%!important;max-width:100%!important;align-self:stretch!important;margin:0!important;box-sizing:border-box}.character-window .character-message.user{align-self:stretch!important;margin:0!important}.character-window .character-message p{min-width:0!important;max-width:none!important}
@media(max-width:650px){.quiz-page-head{padding:4px 0!important;margin-bottom:5px!important}.quiz-page-head h1{font-size:23px!important}.quiz-page-head p{font-size:11px!important}.character-window.character-conversation{height:calc(var(--chat-vh,100dvh) - var(--chat-head-h,0px) - var(--chat-nav-h,50px) - 6px);margin:4px auto!important}.chat-window-header{padding:4px 7px!important;gap:6px!important}.chat-window-header .character-avatar{width:27px!important;height:27px!important;flex-basis:27px!important}.chat-window-header>div{gap:5px}.chat-window-header h2{font-size:12px!important}.chat-window-header .chat-about-toggle{font-size:8px!important}.chat-window-header .chat-author-role{font-size:6px!important}.character-window .chat-window-meta{padding:2px 6px!important;gap:4px!important}.character-window .chat-suggestions button{font-size:8px!important;padding:3px 7px!important}.character-window .character-message{grid-template-columns:minmax(48px,64px) minmax(0,1fr)!important;column-gap:6px!important;padding:6px 7px!important}.character-window .character-message p{font-size:11px!important;line-height:1.48!important}}

.quiz-context{display:grid;gap:3px;margin:9px 0 12px;padding:9px 11px;border:1px solid var(--line);border-left:3px solid var(--accent);border-radius:8px;background:color-mix(in srgb,var(--soft) 55%,var(--surface));}.quiz-context>span{font-size:9px;font-weight:700;letter-spacing:.06em;color:var(--accent)}.quiz-context p{margin:0;font-size:12px;line-height:1.55;color:var(--ink)}@media(max-width:650px){.quiz-context{margin:7px 0 10px;padding:8px 9px}.quiz-context p{font-size:11px;line-height:1.5}}

/* Keep chat message identities compact: a character portrait or the reader's initial. */
.character-window .character-message{grid-template-columns:40px minmax(0,1fr)!important;column-gap:8px!important}
.character-window .character-message-heading{display:flex!important;align-items:center!important;justify-content:center!important;min-width:0!important;width:40px!important;overflow:hidden!important}
.character-window .character-message-heading strong,.character-window .character-message-heading .reader-rank-avatar{display:none!important}
.character-window .character-message-heading .character-avatar{width:32px!important;height:32px!important;flex:0 0 32px!important}
.character-user-initial{display:grid;place-items:center;flex:0 0 30px;width:30px;height:30px;border:1px solid var(--line);border-radius:50%;background:var(--soft);color:var(--accent);font:700 14px/1 var(--font);text-transform:uppercase}
@media(max-width:650px){.character-window .character-message{grid-template-columns:30px minmax(0,1fr)!important;column-gap:6px!important}.character-window .character-message-heading{width:30px!important}.character-window .character-message-heading .character-avatar{width:27px!important;height:27px!important;flex-basis:27px!important}.character-user-initial{width:25px;height:25px;flex-basis:25px;font-size:12px}}
