/* Little Blue character system: the existing blue / white palette, with restrained motion. */
:root{--character-blue:#2563eb;--character-border:#e0e9f8}
.paper-ui .panel,.paper-ui .question-card,.paper-ui .stat,.paper-ui .scoreboard,.paper-ui .review-row{border-radius:16px;border-color:var(--character-border)}
.paper-ui .button{border-radius:10px;transition:transform .18s,box-shadow .18s,background .18s}
.paper-ui .button.primary{box-shadow:0 5px 14px #2563eb18}.paper-ui .button:hover:not(:disabled){transform:translateY(-1px)}
.paper-ui .nav-item{border-radius:10px}.paper-ui .question-answer,.paper-ui .answer-input,.paper-ui .choice-option{border-radius:12px}
.mascot-art{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none;user-select:none}
.mascot-hero{position:relative;display:grid;grid-template-columns:minmax(0,1fr) 260px;align-items:center;min-height:248px;margin:0 0 25px;padding:32px 38px;border:1px solid #dbe7fc;border-radius:20px;background:linear-gradient(108deg,#eef5ff 0%,#f8fbff 66%,#eaf2ff 100%);overflow:hidden}
.mascot-hero-copy{position:relative;z-index:1;min-width:0}.mascot-hero h1{font-size:29px;font-weight:700;color:#203b66;line-height:1.5;margin:0 0 12px;letter-spacing:.3px;text-wrap:balance}.mascot-hero p{font-size:13px;line-height:1.9;color:#7084a3;margin:0;max-width:460px}
.hero-foot{display:flex;align-items:center;gap:10px 18px;flex-wrap:wrap;margin-top:23px}.hero-foot a{font-size:11px;color:#507ac2;text-decoration:none;white-space:nowrap}.hero-foot a:hover{text-decoration:underline}
.hero-pill{display:inline-flex;gap:7px;align-items:center;font-size:11px;background:#ffffffb8;color:#537bb2;padding:6px 10px;border:1px solid #dce9fc;border-radius:20px}.hero-pill i{width:5px;height:5px;border-radius:50%;background:#4b93e4}
.hero-character{position:relative;width:230px;height:210px;justify-self:end;align-self:end}.hero-character>.mascot-art{position:relative;z-index:1;animation:mascot-hello 1s ease-out both;filter:drop-shadow(0 10px 10px #3e6fc216)}
.character-orbit{position:absolute;inset:20px 4px 0;border-radius:50%;background:linear-gradient(140deg,#d7e8ff,#ffffffcc);border:1px solid #ffffff}
.hero-spark{position:absolute;z-index:2;color:#f3b447;font-size:28px}.spark-one{top:3px;left:15px}.spark-two{right:0;bottom:20px;color:#64a2f0}.character-note{position:absolute;top:8px;right:-9px;z-index:2;color:#3a73c8;background:white;padding:5px 11px;border-radius:10px 10px 10px 0;box-shadow:0 4px 15px #4e7dc115;font-size:10px;font-weight:700;transform:rotate(7deg)}
.character-avatar{position:relative;display:inline-flex;flex:0 0 auto;width:58px;height:58px;border-radius:50%;overflow:hidden;border:2px solid #fff;background:#e5f0ff;box-shadow:0 0 0 1px #dbe6f7;vertical-align:middle}.character-avatar .mascot-art{width:100%;height:100%;object-fit:cover;object-position:center 24%;transform:scale(1.1);transform-origin:center 28%}.character-avatar.mint{background:#e3f6ef}.character-avatar.gold{background:#fff2cd}.character-avatar.lavender{background:#eeeaff}.character-avatar.original-avatar .mascot-art{transform:scale(1.62);object-position:center 62%;transform-origin:50% 63%}.character-avatar.doctor .mascot-art{transform:scale(1.9);transform-origin:51% 52%}
.character-profile{padding:0!important;border:0!important;background:transparent!important;line-height:1;cursor:pointer;flex-shrink:0}.character-profile .character-avatar{width:37px;height:37px}.character-profile:hover .character-avatar{box-shadow:0 0 0 2px #8ab3ff}.profile>#profile-avatar{display:none}.profile>.sound-toggle{order:0;margin:0 0 0 7px}.profile>.outline-tag{display:none}
.motion-toggle{font:inherit;font-size:11px;color:#7084a6;border:1px solid #e1e8f4;border-radius:7px;min-height:36px;padding:5px 8px;white-space:nowrap;background:#fff;cursor:pointer}.motion-toggle[aria-pressed=false]{color:#98a1b0;background:#f9fafc}.topbar-right>.motion-toggle{display:none}.topbar-right>.character-profile{margin-right:2px}
.character-dialog{width:min(540px,calc(100vw - 28px));max-height:90dvh;border:1px solid #dce6f7;border-radius:20px;padding:26px;color:#24334d;box-shadow:0 20px 80px #15346f30;overflow:auto}.character-dialog::backdrop{background:#20395c55;backdrop-filter:blur(3px)}.character-dialog-heading{display:flex;gap:12px;justify-content:space-between;align-items:flex-start}.character-dialog-heading h2{font-size:22px;margin:0 0 8px}.character-dialog-heading p{font-size:13px;color:#8492a8;margin:0}.character-dialog-heading .eyebrow{display:block;font-size:9px}.character-close{width:34px;height:34px;border-radius:50%;border:0;background:#f0f5ff;color:#6884af;font-size:22px;cursor:pointer;flex-shrink:0}
.character-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:24px 0 18px}.character-grid>button{position:relative;border:1px solid #e2e9f5;border-radius:13px;background:#fafcff;display:flex;flex-direction:column;align-items:center;gap:13px;padding:18px 7px;cursor:pointer;color:#516888;min-width:0}.character-grid>button[aria-pressed=true]{border-color:#7eabff;background:#edf4ff}.character-grid strong{font-size:12px;font-weight:500}.character-grid .character-avatar{width:80px;height:80px}.avatar-check{display:none;position:absolute;right:6px;top:5px;color:#2563eb;font-weight:700}.character-grid [aria-pressed=true] .avatar-check{display:block}.character-showcase-link{display:block;padding:10px;font-size:12px;text-align:center;color:#527dc2;border-top:1px solid #eef2f8;text-decoration:none}
.player-card>.avatar,.score-player>.avatar{background:transparent!important;border:0!important;box-shadow:none!important;overflow:visible;display:grid;place-items:center}.player-card>.avatar .character-avatar{width:82px;height:82px}.score-player>.avatar .character-avatar{width:46px;height:46px}.player-card .avatar.empty{border:1px dashed #c6d8f4!important;background:#f6faff!important;color:#a8bddc}
.buddy-ready{display:flex;align-items:center;gap:15px;max-width:360px;margin:20px auto 0;text-align:left;background:#f3f7ff;border:1px solid #e2ebfb;border-radius:12px;padding:10px 15px}.buddy-ready>.mascot-art{width:64px;height:64px;flex-shrink:0}.buddy-ready strong{font-size:13px;color:#416b9c}.buddy-ready p{font-size:11px!important;margin:4px 0 0!important;color:#90a0b8!important;line-height:1.7}
.timer-stage .countdown-character{width:135px;height:135px;margin:0 auto 8px;animation:mascot-pop .8s both}.timer-stage .countdown-number{font-size:64px;font-weight:800;background:#eef5ff;border:1px solid #dbe8ff;width:96px;height:96px;line-height:94px;margin:14px auto;border-radius:50%;color:#2563eb}
.question-panel:has(.reveal){animation:panel-settle .45s ease-out}.reveal,.feedback{position:relative;border-radius:13px!important;min-height:145px;padding-right:138px!important;overflow:hidden}.feedback-character{position:absolute;right:13px;bottom:4px;width:110px;height:130px;pointer-events:none}.feedback-character>.mascot-art{height:107px}.feedback-character>span{display:block;text-align:center;font-size:11px;font-weight:600;color:#6883ad}.feedback-cheer{animation:mascot-cheer .8s both}.feedback-retry{animation:mascot-comeback .6s both}.reference,.reference-answer{overflow-wrap:anywhere}.choice-option.is-correct .choice-mark{animation:mascot-pop .5s}.paper-ui .reveal.wrong,.paper-ui .feedback:not(.correct){background:#fbf6ff;border-color:#e5dbf4;color:#666188}
.waiting-answer{position:relative;min-height:106px;padding-right:106px!important}.waiting-answer>.mascot-art{position:absolute;right:15px;bottom:0;width:86px;height:95px;animation:mascot-hello .7s both}
.mascot-result{position:relative;text-align:center;margin:-1px -1px 25px;padding:20px 20px 30px;background:radial-gradient(ellipse at 50% 25%,#fff2c9 0, #fffdf4 36%,#fff 75%);border-radius:16px;overflow:hidden}.mascot-result.result-loss{background:radial-gradient(ellipse at 50% 25%,#e9e8ff 0,#f8f8ff 36%,#fff 75%)}.mascot-result.result-draw{background:radial-gradient(ellipse at 50% 25%,#ddecff 0,#f4f9ff 36%,#fff 75%)}
.result-art-wrap{position:relative;width:300px;height:264px;margin:auto;max-width:100%}.result-character{position:relative;width:248px;height:248px;margin:auto;z-index:1;animation:mascot-cheer .95s both;filter:drop-shadow(0 10px 13px #8c753b12)}.result-loss .result-character{animation:mascot-comeback .9s both;width:225px;height:225px;margin-top:16px}.result-halo{position:absolute;inset:27px 41px;border-radius:50%;border:1px solid #fff;background:#ffffff75;box-shadow:0 0 0 17px #ffffff38}.result-ribbon{position:absolute;bottom:0;left:50%;transform:translateX(-50%) rotate(-3deg);z-index:2;padding:5px 29px;background:#ffc94c;border:3px solid #fff5cc;border-radius:8px;color:#885916;white-space:nowrap;font-size:19px;letter-spacing:2px;font-weight:800;box-shadow:0 4px 12px #c08d2019}.result-loss .result-ribbon{background:#ccdbf8;border-color:#eef4ff;color:#5275ad;font-size:16px}.result-draw .result-ribbon{background:#c5e8de;border-color:#eefaf5;color:#34886d;font-size:16px}
.result-copy{margin-top:23px}.result-eyebrow{font-size:11px;color:#b38a47;letter-spacing:2px}.result-loss .result-eyebrow{color:#8a83af}.result-draw .result-eyebrow{color:#628bad}.result-copy h1{font-size:28px;line-height:1.5;color:#273e61;margin:9px 0 10px;font-weight:700;text-wrap:balance}.result-copy p{font-size:13px;color:#7b8ca4;line-height:1.9;margin:0}.result-numbers{border-radius:13px;background:#f7faff;padding:18px}.session-summary>.mascot-result{margin-bottom:10px}.session-summary>.mascot-result .result-copy h1{font-size:25px}.summary-character{width:176px;height:176px;margin:0 auto 8px;animation:mascot-cheer .8s both}
.confetti{position:absolute;inset:-5px -70px 0;pointer-events:none;overflow:hidden}.confetti i{position:absolute;top:5%;left:var(--x);width:7px;height:12px;border-radius:2px;background:#79a6f7;opacity:0;animation:confetti-drop 2s ease-out both;animation-delay:calc(var(--i) * .045s)}.confetti i:nth-child(3n){background:#f3bd48}.confetti i:nth-child(3n+1){background:#77caba;width:6px;height:6px;border-radius:50%}
.reaction-hub{border:1px solid #e2eafa;background:#fafcff;border-radius:14px;padding:12px 15px;margin:18px 0 0}.reaction-heading{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;font-size:11px;color:#8a9cb6}.reaction-picker{margin-left:auto;max-width:100%}.reaction-picker>summary{cursor:pointer;display:flex;align-items:center;justify-content:flex-end;gap:6px;list-style:none;color:#537fbe;font-size:12px;min-height:30px;padding:1px 6px}.reaction-picker>summary::-webkit-details-marker{display:none}.reaction-picker[open]{width:100%}.reaction-heading:has(.reaction-picker[open]){flex-wrap:wrap}.reaction-picker[open]>summary{justify-content:flex-start}.reaction-picker p{font-size:10px;color:#9aa7bb;margin:6px 0 0}
.sticker-grid{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:8px;padding-top:9px}.sticker-grid button{display:grid;grid-template-rows:65px auto;gap:5px;padding:6px 3px;border:1px solid #e7edf8;border-radius:10px;background:#fff;color:#607d9f;font-size:10px;cursor:pointer;min-width:0}.sticker-grid button:hover{border-color:#8ab1f5;background:#f0f6ff}.sticker-grid button img{border-radius:5px}.sticker-grid button span{white-space:nowrap}.reaction-stage{display:grid;grid-template-columns:1fr 1fr;gap:10px;min-height:83px;margin-top:7px}.reaction-slot{display:flex;align-items:center;min-width:0}.reaction-slot:last-child{justify-content:flex-end}.reaction-placeholder{font-size:10px;color:#b0bdce;padding:15px}.reaction-bubble{display:flex;align-items:center;gap:10px;background:#fff;border:1px solid #e0eafa;border-radius:14px;padding:5px 12px 5px 5px;animation:reaction-enter .3s ease-out;max-width:100%;min-width:0}.reaction-bubble>.mascot-art{width:67px;height:67px;border-radius:8px;flex:0 0 auto}.reaction-bubble>div{min-width:0}.reaction-bubble small{display:block;font-size:10px;color:#91a2b8;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100px}.reaction-bubble strong{font-size:12px;font-weight:500;color:#5379ac}.reaction-hub+.game-rules{margin-top:16px}
.empty>.mascot-art,.empty-state>.mascot-art{width:130px;height:130px;margin:0 auto 16px}.character-subhead{display:flex;gap:17px;align-items:center;padding:16px 20px;border:1px solid #e0e9f8;border-radius:14px;background:#f5f9ff;margin-bottom:22px}.character-subhead img{width:67px;height:67px;flex-shrink:0}.character-subhead strong{display:block;font-size:14px;color:#4b6e9c}.character-subhead p{font-size:12px;color:#8a9cb8;margin:5px 0 0}
@keyframes mascot-hello{0%{opacity:0;transform:translateY(12px) rotate(-7deg)}60%{opacity:1;transform:translateY(-3px) rotate(3deg)}100%{opacity:1;transform:none}}
@keyframes mascot-cheer{0%{opacity:0;transform:translateY(16px) scale(.85)}50%{opacity:1;transform:translateY(-8px) scale(1.04)}75%{transform:translateY(2px)}100%{opacity:1;transform:none}}
@keyframes mascot-comeback{0%{opacity:0;transform:translateX(-7px) rotate(-4deg)}55%{opacity:1;transform:translateX(4px) rotate(3deg)}100%{opacity:1;transform:none}}
@keyframes mascot-pop{0%{transform:scale(.8);opacity:0}65%{transform:scale(1.12);opacity:1}100%{transform:scale(1);opacity:1}}
@keyframes panel-settle{from{transform:translateY(3px)}to{transform:none}}
@keyframes confetti-drop{0%{opacity:0;transform:translateY(-20px) rotate(var(--r))}12%{opacity:1}80%{opacity:.8}100%{opacity:0;transform:translateY(250px) rotate(calc(var(--r) + 200deg))}}
@keyframes reaction-enter{from{opacity:0;transform:translateY(7px) scale(.92)}to{opacity:1;transform:none}}
.motion-off *,.motion-off *::before,.motion-off *::after{animation:none!important;transition:none!important}.motion-off .confetti{display:none}.animations-paused *{animation-play-state:paused!important}
@media(max-width:1100px){.mascot-hero{grid-template-columns:minmax(0,1fr) 205px;padding:26px;min-height:222px}.hero-character{width:190px;height:190px}.mascot-hero h1{font-size:25px}.sticker-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:680px){
 .paper-ui .panel,.paper-ui .question-card,.paper-ui .stat,.paper-ui .scoreboard,.paper-ui .review-row{border-radius:13px}.paper-ui .topbar{min-height:50px;height:auto;padding-top:7px;padding-bottom:7px;gap:8px}.battle-ui .topbar>span{display:none}.battle-ui .profile{width:100%;gap:8px}.profile>#profile-name{margin-right:auto;max-width:100px;font-size:11px}.profile>.sound-toggle{margin-left:0}.profile>.character-profile{display:block}.character-profile .character-avatar{width:32px;height:32px}.motion-toggle{font-size:10px;min-height:33px;padding:5px 6px}.topbar-right .character-profile .character-avatar{width:28px;height:28px}.study-ui .topbar-right{gap:6px}.study-ui .topbar #account-role{display:none}.study-ui #account-name{max-width:58px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.account-bar>.motion-toggle{margin-left:6px}
 .mascot-hero{grid-template-columns:minmax(0,1fr) 112px;gap:4px;min-height:185px;padding:21px 16px;border-radius:16px;margin-bottom:19px;overflow:hidden}.mascot-hero h1{font-size:21px;line-height:1.55;margin:0 0 8px;letter-spacing:0}.mascot-hero .eyebrow{font-size:8px;letter-spacing:1.1px;margin-bottom:9px}.mascot-hero p{font-size:11px;line-height:1.8}.hero-character{width:118px;height:138px;margin-right:-6px;align-self:center}.character-note{top:0;right:2px;font-size:7px;padding:3px 6px}.character-orbit{inset:24px 0 8px}.hero-spark{font-size:18px}.spark-one{top:12px;left:6px}.hero-foot{margin-top:13px;gap:8px}.hero-foot a{font-size:10px}.hero-pill{display:none}.hero-character>.mascot-art{object-position:center bottom}
 .character-dialog{padding:22px 16px;border-radius:17px}.character-dialog-heading h2{font-size:19px}.character-dialog-heading p{font-size:12px}.character-grid{gap:8px;margin:20px 0 12px}.character-grid .character-avatar{width:67px;height:67px}.character-grid>button{gap:11px;padding:14px 5px}.character-grid strong{font-size:11px}
 .player-card>.avatar .character-avatar{width:66px;height:66px}.score-player>.avatar{display:grid;width:32px!important;height:32px!important;flex-shrink:0}.score-player>.avatar .character-avatar{width:30px;height:30px}.scoreboard{gap:8px!important}.score-player{flex-wrap:wrap!important;gap:6px!important}.score-player .name{font-size:11px;max-width:72px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.score-number{font-size:25px}.score-player .name small{font-size:9px}.score-player .score-number{margin-left:auto}.score-player.right .score-number{margin-left:0;margin-right:auto}.score-center{padding:0 1px}
 .buddy-ready{padding:8px 10px;gap:10px}.buddy-ready>.mascot-art{width:52px;height:52px}.buddy-ready strong{font-size:12px}.buddy-ready p{font-size:10px!important}.timer-stage .countdown-character{width:110px;height:110px}.timer-stage .countdown-number{width:78px;height:78px;line-height:76px;font-size:52px}.timer-stage h2{font-size:19px}
 .reveal,.feedback{padding-right:16px!important;min-height:0}.feedback-character{position:relative;float:right;right:auto;bottom:auto;width:75px;height:90px;margin:0 0 5px 9px}.feedback-character>.mascot-art{height:73px}.feedback-character>span{font-size:10px}.reveal .reference,.feedback .reference-answer{clear:both;padding-top:3px}.reveal>strong,.feedback>strong{font-size:14px}.waiting-answer{padding-right:80px!important;min-height:94px}.waiting-answer>.mascot-art{right:8px;width:64px;height:76px}.waiting-answer strong{font-size:13px}.waiting-answer p{font-size:11px}
 .mascot-result{padding:10px 4px 25px;margin:0 -3px 15px}.result-art-wrap{width:250px;height:230px}.result-character{width:218px;height:218px}.result-loss .result-character{width:197px;height:197px}.result-ribbon{font-size:17px;padding:4px 22px}.result-copy{margin-top:20px}.result-copy h1{font-size:23px}.result-copy p{font-size:12px}.result-eyebrow{font-size:10px;letter-spacing:1px}.result-numbers{padding:14px 6px}.result-numbers strong{font-size:27px}.session-summary>.mascot-result .result-copy h1{font-size:22px}
 .reaction-hub{padding:10px 9px;margin-top:14px}.reaction-heading{font-size:10px}.reaction-stage{gap:6px;min-height:77px}.reaction-bubble{gap:5px;padding:4px 6px 4px 3px;border-radius:10px}.reaction-bubble>.mascot-art{width:46px;height:56px}.reaction-bubble strong{font-size:10px}.reaction-bubble small{font-size:9px;max-width:70px}.reaction-placeholder{font-size:9px;padding:10px 6px}.sticker-grid{gap:6px;grid-template-columns:repeat(4,minmax(0,1fr))}.sticker-grid button{grid-template-rows:58px auto;font-size:9px}.character-subhead{padding:12px;gap:12px}.character-subhead img{width:52px;height:52px}.character-subhead strong{font-size:13px}.character-subhead p{font-size:11px}
}
@media(max-width:360px){.mascot-hero{grid-template-columns:minmax(0,1fr) 95px;padding:19px 13px}.hero-character{width:103px;height:128px}.mascot-hero h1{font-size:19px}.hero-foot a{font-size:9px}.character-grid .character-avatar{width:59px;height:59px}.profile>#profile-name{max-width:62px}.sound-toggle{font-size:10px}.score-player>.avatar{display:none}.reaction-bubble>.mascot-art{width:38px;height:48px}.reaction-bubble{gap:3px}.reaction-bubble strong{font-size:9px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}.confetti{display:none}}
/* Keep mobile names, portraits and score baselines aligned at every narrow breakpoint. */
@media(max-width:680px){
 .score-player{display:grid!important;grid-template-columns:32px minmax(0,1fr);gap:5px 7px!important;align-items:center}
 .score-player>.avatar{grid-row:1;grid-column:1;margin:0!important}
 .score-player .name{grid-row:1;grid-column:2;max-width:none;font-size:11px}
 .score-player .score-number{grid-row:2;grid-column:1 / 3;margin:4px 0 0!important;text-align:center;justify-self:center}
 .score-player.right{grid-template-columns:minmax(0,1fr) 32px}
 .score-player.right>.avatar{grid-column:2}.score-player.right .name{grid-column:1}
}
@media(max-width:360px){.score-player,.score-player.right{grid-template-columns:minmax(0,1fr)}.score-player>.avatar{display:none!important}.score-player .name,.score-player.right .name{grid-column:1;text-align:center}.score-player .score-number{grid-column:1}}

.heading-character-actions{display:flex;align-items:center;gap:18px;flex-shrink:0}.heading-character{width:83px;height:83px}.page-heading:has(.heading-character-actions){align-items:center}
@media(max-width:680px){.page-heading:has(.heading-character-actions){display:grid;grid-template-columns:minmax(0,1fr) 68px;gap:12px}.heading-character-actions{display:contents}.heading-character{width:68px;height:72px;grid-column:2;grid-row:1}.heading-character-actions>[data-filter-output],.heading-character-actions>.button{grid-column:1 / 3}.page-heading:has(.heading-character-actions) h1{font-size:21px}}

/* Room portraits reserve the same space on both sides; only your own is editable. */
.room-layout>.aside-stack{display:block}
.room-portrait{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;width:110px;max-width:100%;height:115px;margin:0 auto 9px;gap:7px;padding:0;border:0;background:transparent;color:#527dc2;font:inherit}
.room-portrait>.avatar{display:grid;place-items:center;width:82px;height:82px;margin:0!important;flex-shrink:0;border:0!important;background:transparent!important;box-shadow:none;overflow:visible}
.room-portrait .character-avatar{width:82px;height:82px}
.room-avatar-picker{cursor:pointer;border-radius:13px}
.room-avatar-picker:hover .character-avatar{box-shadow:0 0 0 2px #8ab3ff}
.room-avatar-picker:focus-visible{outline:2px solid #2563eb;outline-offset:5px}
.avatar-edit-label{font-size:11px;line-height:20px;white-space:nowrap}
.character-save-error{font-size:13px;line-height:1.6;color:#bb4141;margin:12px 0 0}
.character-grid>button:disabled{cursor:wait;opacity:.65}
@media(max-width:680px){.room-portrait{height:98px;margin-bottom:7px;gap:5px}.room-portrait>.avatar,.room-portrait .character-avatar{width:66px;height:66px}.avatar-edit-label{font-size:10px}}

@media(max-width:680px){.study-ui .mascot-hero p{white-space:nowrap}}
/* A larger avatar collection scrolls inside the picker, keeping its close button visible. */
.character-dialog{padding:0;overflow:hidden}
.character-dialog[open]{display:flex;flex-direction:column}
.character-dialog-heading{padding:24px;flex-shrink:0;background:#fff}
.character-groups{min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:0 24px 24px;scrollbar-gutter:stable}
.character-group h3{display:flex;align-items:center;gap:8px;font-size:14px;font-weight:600;margin:0;color:#3f5c84}
.character-group h3>span{font-size:11px;font-weight:400;color:#8193ad}
.character-group+.character-group{margin-top:22px}
.character-group .character-grid{margin:12px 0 0}
.character-grid strong{white-space:nowrap}
.character-dialog>.character-save-error:not([hidden]){flex-shrink:0;margin:0;padding:12px 24px;background:#fff5f5}
@media(max-width:680px){.character-dialog-heading{padding:20px 16px 18px}.character-groups{padding:0 16px 20px}.character-group h3{font-size:13px}}

/* Preferences occupy a single header control; the panel never adds a page row. */
.preferences-menu{position:relative;flex-shrink:0;text-align:left;color:#426594}
.preferences-menu>summary{display:flex;align-items:center;justify-content:center;gap:6px;min-width:42px;min-height:42px;padding:0 10px;box-sizing:border-box;border:1px solid transparent;border-radius:9px;font:inherit;font-size:12px;line-height:1;list-style:none;cursor:pointer;user-select:none;white-space:nowrap}
.preferences-menu>summary::-webkit-details-marker{display:none}
.preferences-menu>summary svg{width:19px;height:19px;flex-shrink:0}
.preferences-menu>summary:hover,.preferences-menu[open]>summary{color:#2563eb;background:#edf3ff;border-color:#dce7fb}
.preferences-menu>summary:focus-visible{outline:2px solid #6f9df5;outline-offset:2px}
.preferences-panel{position:absolute;right:0;top:calc(100% + 9px);z-index:70;width:min(284px,calc(100vw - 48px));box-sizing:border-box;padding:18px;background:#fff;border:1px solid #dce7f8;border-radius:15px;box-shadow:0 12px 35px #233c6b1a;white-space:normal}
.preferences-panel h2{margin:0 0 5px;font-size:14px;font-weight:600;color:#2a446d;line-height:1.5}
.preferences-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 0 0}
.preferences-row+.preferences-row{margin-top:14px;border-top:1px solid #edf1f8}
.preferences-row strong{display:block;font-size:13px;line-height:1.5;font-weight:500;color:#45618a}
.preferences-row p{margin:4px 0 0;font-size:11px;line-height:1.5;color:#8292aa}
.preferences-panel .preference-switch,.preference-switch{position:relative;display:inline-block;width:48px;min-width:48px;height:44px;min-height:44px;box-sizing:border-box;flex-shrink:0;margin:0;padding:0;border:0;border-radius:9px;background:transparent;cursor:pointer;vertical-align:middle;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.preference-switch::before{content:"";position:absolute;left:0;top:8px;width:48px;height:28px;border-radius:999px;background:#9aa8bc;transition:background-color .16s ease}
.preference-switch::after{content:"";position:absolute;left:4px;top:12px;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #24385729;transition:transform .16s ease}
.preference-switch[aria-checked=true]::before{background:#2563eb}
.preference-switch[aria-checked=true]::after{transform:translateX(20px)}
.preference-switch:disabled{opacity:.45;cursor:not-allowed}
.preference-switch:focus-visible{outline:2px solid #6f9df5;outline-offset:2px}
@media(prefers-reduced-motion:reduce){.preference-switch::before,.preference-switch::after{transition:none}}
.preferences-panel button:focus-visible{outline:2px solid #6f9df5;outline-offset:2px}
@media(max-width:680px){.preferences-menu>summary{width:42px;padding:0}.preferences-label{display:none}.study-ui .topbar>span{min-width:0}.study-ui .topbar-right{flex-shrink:0}.preferences-panel{top:calc(100% + 5px)}.study-ui .account-bar{min-height:30px}}
