@charset "UTF-8";
.agent-home{margin:18px 0 34px;padding:25px 30px;display:grid;grid-template-columns:minmax(0,1fr) 255px;gap:30px;align-items:center;border:1px solid #cfded1;border-radius:22px;background:linear-gradient(115deg,#eaf4ed 0%,#f8f7e9 70%,#e9eee6 100%);box-shadow:0 12px 32px #163e3210}.agent-home .eyebrow{color:#20756b;font-size:11px;letter-spacing:.16em}.agent-home h2{font-size:clamp(22px,2.2vw,31px);line-height:1.3;color:#183f39;margin:8px 0}.agent-home p{margin:0;max-width:680px;font-size:14px;line-height:1.8;color:#60776e}.agent-home-cta{display:grid;justify-items:center;gap:9px}.agent-home-cta>span{width:56px;height:56px;display:grid;place-items:center;border-radius:18px;background:#fff9da;color:#b68b37;font-size:31px;box-shadow:0 6px 20px #896f2924}.agent-home-cta button{width:100%;display:flex;justify-content:space-between;align-items:center;border:0;border-radius:12px;padding:14px 17px;background:#17695c;color:white;font-size:15px;font-weight:700;font-family:inherit;cursor:pointer}.agent-home-cta button:hover{background:#115447}.agent-home-cta small{color:#738477;font-size:11px}
.agent-launcher{position:fixed;right:23px;bottom:24px;z-index:80;padding:12px 17px;border:1px solid #c9daca;border-radius:999px;background:#12675d;color:#fff;box-shadow:0 10px 30px #0e4f4560;font-size:14px;font-weight:700;font-family:inherit;cursor:pointer}.agent-launcher:hover{background:#0e5148}.agent-launcher span{color:#ffe3a2;margin-right:5px}.agent-shade{position:fixed;inset:0;z-index:89;background:#112d2b62;backdrop-filter:blur(2px)}.agent-drawer{position:fixed;inset:0 0 0 auto;z-index:90;width:min(430px,100vw);display:flex;flex-direction:column;background:#f8faf5;box-shadow:-18px 0 50px #152f2b38;color:#21413b}.agent-drawer-head{padding:22px 23px 13px;display:flex;justify-content:space-between;align-items:start;gap:15px;border-bottom:1px solid #dce7dc;background:linear-gradient(120deg,#e5f2e9,#f8f6e9)}.agent-drawer-head .eyebrow{font-size:10px;color:#387669;letter-spacing:.1em}.agent-drawer-head h2{font-size:22px;margin:5px 0}.agent-close{border:0;background:#fff;border-radius:50%;width:36px;height:36px;font-size:26px;color:#4f6e63;cursor:pointer}.agent-drawer-tools{display:flex;justify-content:space-between;align-items:center;padding:11px 20px;gap:10px;border-bottom:1px solid #e2eae0}.agent-drawer-tools label{font-size:11px;color:#668076}.agent-age{margin-left:7px;padding:7px;border:1px solid #cadacf;border-radius:7px;background:white;color:#264d42}.agent-clear{border:0;background:transparent;color:#527d6a;font-size:11px;cursor:pointer}.agent-status{padding:0 20px;color:#83633c;font-size:12px;line-height:1.5}.agent-status:not(:empty){padding-top:10px}.agent-messages{flex:1;min-height:0;overflow:auto;padding:18px 19px 10px;display:flex;flex-direction:column;gap:14px}.agent-bubble{max-width:95%;padding:12px 15px;border-radius:15px;font-size:13px;line-height:1.75;white-space:pre-wrap;overflow-wrap:anywhere}.agent-bubble.user{align-self:flex-end;background:#17695c;color:#fff;border-bottom-right-radius:4px}.agent-bubble.assistant{align-self:flex-start;background:#fff;border:1px solid #dbe7dc;border-bottom-left-radius:4px;box-shadow:0 2px 9px #163b2f0c}.agent-bubble a{color:#0b685a;text-decoration:underline}.agent-bubble small{display:block;color:#7b8f82;margin-bottom:3px;font-size:10px;font-weight:700}.agent-bubble.user small{color:#dcefe8}.agent-resources{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}.agent-resources a{display:inline-block;padding:4px 8px;border-radius:7px;background:#eef5ee;color:#245a4e!important;font-size:11px;text-decoration:none}.agent-suggestions{display:flex;gap:7px;overflow-x:auto;padding:8px 18px 10px}.agent-suggestions button{flex-shrink:0;border:1px solid #cbdccc;background:#f0f6ec;color:#2f6d55;padding:7px 10px;border-radius:999px;font-size:11px;cursor:pointer}.agent-form{display:flex;align-items:end;gap:8px;padding:10px 17px;background:#fff;border-top:1px solid #dce7dc}.agent-form textarea{flex:1;min-width:0;resize:none;border:1px solid #c8dbcc;border-radius:11px;padding:11px;font-size:13px;line-height:1.5;font-family:inherit;color:#244439}.agent-form button{flex:none;border:0;border-radius:10px;background:#17695c;color:#fff;padding:12px 14px;font-size:12px;font-weight:700;font-family:inherit;cursor:pointer}.agent-form button:disabled{opacity:.5}.agent-note{padding:0 18px 11px;margin:0;background:#fff;color:#89988d;font-size:10px;line-height:1.5}
.agent-settings-page{max-width:920px;margin:20px auto 60px}.agent-settings-head{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:24px}.agent-settings-head h1{font-size:32px;margin:7px 0}.agent-settings-head p{color:#687e70;font-size:14px}.agent-settings-form{padding:28px;border:1px solid #d6e4d5;border-radius:18px;background:#fff;box-shadow:0 10px 28px #163b2a0b;display:grid;gap:20px}.agent-settings-form label{display:grid;gap:7px;color:#32584a;font-size:13px}.agent-settings-form input:not([type=checkbox]),.agent-settings-form select,.agent-settings-form textarea{width:100%;padding:11px;border:1px solid #cbdacc;border-radius:9px;background:#fbfdfa;font-size:13px;line-height:1.5;font-family:inherit;color:#244439}.agent-settings-form textarea{resize:vertical}.agent-settings-form small{font-size:11px;color:#829185;line-height:1.6}.agent-settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.agent-settings-form .agent-check{display:flex;align-items:center;gap:10px}.agent-settings-form .agent-check input{width:18px;height:18px}.agent-settings-form .agent-note{padding:0;background:transparent}
.agent-usage-panel{max-width:920px;margin:-42px auto 55px;padding:20px 28px;border:1px solid #d6e4d5;border-radius:16px;background:#f7faf5;color:#315649}.agent-usage-panel h2{margin:0 0 8px;font-size:20px}.agent-usage-panel p{font-size:14px;margin:0 0 6px}.agent-usage-panel small{font-size:11px;color:#778d7c}
@media(max-width:720px){.agent-home{grid-template-columns:1fr;margin:12px 0 26px;padding:20px;gap:18px}.agent-home-cta{justify-items:start}.agent-home-cta>span{display:none}.agent-home-cta button{min-width:220px}.agent-launcher{right:14px;bottom:15px;font-size:12px}.agent-drawer{width:100vw}.agent-settings-head{align-items:start;flex-direction:column}.agent-settings-grid{grid-template-columns:1fr}.agent-settings-form{padding:19px}.agent-drawer-head{padding:16px}.agent-drawer-tools{padding:10px}}

/* A wide, movable study window leaves the page usable while chatting. */
.agent-drawer{inset:auto;left:50%;top:50%;transform:translate(-50%,-50%);width:min(760px,calc(100vw - 40px));height:min(760px,calc(100dvh - 40px));max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);border:1px solid #c7dacd;border-radius:22px;overflow:hidden;box-shadow:0 28px 90px #123b3470}
.agent-drawer[hidden]{display:none}
.agent-drawer-head{cursor:grab;touch-action:none;user-select:none;padding:18px 24px 14px}
.agent-drawer-head:active{cursor:grabbing}
.agent-drawer-head .agent-close{cursor:pointer;flex:none}
.agent-drag-hint{display:inline-block;color:#779084;font-size:11px;letter-spacing:0;margin-top:2px}
.agent-messages{padding:22px 26px 16px;gap:18px}
.agent-bubble{max-width:min(86%,610px);font-size:15px;line-height:1.85;padding:14px 18px}
.agent-bubble.assistant{min-width:min(180px,80%)}
.agent-bubble a{font-weight:650;text-underline-offset:3px}
.agent-resources a{font-size:12px;padding:7px 10px;border:1px solid #d6e7d9}
.agent-form{padding:13px 22px}
.agent-form textarea{font-size:14px;max-height:130px;resize:vertical}
.agent-form button{font-size:14px;padding:13px 18px}
@media(max-width:720px){.agent-drawer{left:0!important;top:0!important;transform:none!important;width:100vw;height:100dvh;max-width:none;max-height:none;border:0;border-radius:0}.agent-drawer-head{cursor:default;touch-action:auto}.agent-drag-hint{display:none}.agent-bubble{max-width:96%;font-size:13px}.agent-messages{padding:16px}.agent-form{padding:10px}}

/* Keep the guide visible without pushing the periodic table below the first screen. */
.atlas-home .atlas-intro{padding:14px 0 10px}
.atlas-home .atlas-intro .eyebrow{margin-bottom:4px}
.atlas-home .atlas-intro h1{margin-bottom:4px;line-height:1.2}
.atlas-home .agent-home{display:flex;justify-content:space-between;align-items:center;gap:18px;margin:4px 0 12px;padding:10px 18px;border-radius:14px;box-shadow:none}
.atlas-home .agent-home-copy{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 12px}
.atlas-home .agent-home .eyebrow{font-size:10px;white-space:nowrap}
.atlas-home .agent-home h2{font-size:17px;line-height:1.25;margin:0;white-space:nowrap}
.atlas-home .agent-home p{font-size:11px;line-height:1.4;margin:0}
.atlas-home .agent-home-cta{display:flex;align-items:center;gap:9px;flex:none}
.atlas-home .agent-home-cta button{width:auto;gap:12px;padding:10px 14px;white-space:nowrap;font-size:12px}
.atlas-home .agent-home-cta small{white-space:nowrap}
.atlas-home .periodic-section{padding-top:12px;padding-bottom:8px}
.atlas-home .table-toolbar{margin-bottom:8px}
.atlas-home .periodic-table{grid-template-rows:16px repeat(7,52px) 8px repeat(2,52px);gap:4px}
.atlas-home .table-scroll{padding-bottom:4px}
.atlas-home .table-status{margin-top:6px}
.atlas-home .table-footnote{padding-top:5px}
.agent-title-row{display:flex;align-items:center;flex-wrap:wrap;gap:12px 24px;margin-bottom:16px}
.agent-title-row h1{margin:0!important}
.agent-title-open{display:inline-flex;align-items:center;gap:7px;flex:none;padding:10px 16px;border:1px solid #c6dccc;border-radius:999px;background:#17695c;color:#fff;font-family:inherit;font-size:14px;font-weight:700;cursor:pointer;box-shadow:0 6px 18px #17695c20}
.agent-title-open:hover,.agent-title-open:focus-visible{background:#0f5348}
.agent-title-open span{color:#ffe3a2}
.agent-drawer-actions{display:flex;align-items:center;flex-wrap:wrap;gap:7px}
.agent-voice-toggle,.agent-voice-stop{border:1px solid #cadccd;border-radius:8px;background:#eef5ed;color:#245b4c;padding:7px 9px;font-family:inherit;font-size:11px;font-weight:600;cursor:pointer;white-space:nowrap}
.agent-voice-toggle[aria-pressed="true"]{background:#d9ece1;border-color:#a9d0b8}
.agent-voice-toggle:disabled,.agent-voice-stop:disabled,.agent-mic:disabled{opacity:.5;cursor:not-allowed}
.agent-mic{flex:none;min-width:44px;min-height:44px;padding:6px;border:1px solid #bed5c7;border-radius:11px;background:#edf6ef;color:#17695c;font-family:inherit;font-size:24px;line-height:1;cursor:pointer}
.agent-mic[aria-pressed="true"]{background:#f9e4de;border-color:#e7a995;animation:agent-recording 1.3s ease-in-out infinite}
.agent-mic:hover{background:#deeee2}
@keyframes agent-recording{50%{box-shadow:0 0 0 6px #e7a99555}}
.agent-bubble-content{display:block}
.agent-read{display:inline-block;margin-top:10px;padding:3px 0;border:0;background:transparent;color:#17695c;font-family:inherit;font-size:11px;font-weight:600;cursor:pointer}
.agent-read:hover{text-decoration:underline}
@media(max-width:850px){.atlas-home .agent-home{align-items:flex-start;flex-direction:column}.atlas-home .agent-home-cta small{display:none}.agent-title-row{align-items:flex-start}.agent-title-open{padding:8px 12px;font-size:12px}}
@media(max-width:720px){.agent-drawer-tools{align-items:flex-start;flex-wrap:wrap}.agent-drawer-actions{width:100%}.agent-form{gap:5px}.agent-send{padding-left:10px!important;padding-right:10px!important}.atlas-home .periodic-table{grid-template-rows:18px repeat(7,62px) 12px repeat(2,62px);gap:5px}}
@media(min-width:1100px) and (max-height:950px){.atlas-home .periodic-table{grid-template-rows:16px repeat(7,44px) 8px repeat(2,44px)}.atlas-home .element-cell strong{font-size:19px;margin-top:7px}.atlas-home .element-name{font-size:10px}.atlas-home .atomic-number{top:3px}}
@media(min-width:1100px) and (max-height:800px){.kingdom-header{min-height:64px;padding-top:6px;padding-bottom:6px}.kingdom-brand>img{width:42px;height:42px}.kingdom-brand{font-size:17px}.kingdom-brand .brand-sub{font-size:8px;margin-top:2px}.kingdom-header nav a{padding:7px 14px}.atlas-home .atlas-intro{padding:7px 0 5px}.atlas-home .atlas-intro h1{font-size:27px}.atlas-home .atlas-intro p:last-child{font-size:11px}.atlas-home .music-shortcut{padding:7px 12px;min-width:250px}.atlas-home .music-shortcut-icon{width:32px;height:32px;font-size:19px}.atlas-home .music-shortcut strong{font-size:13px;margin-bottom:1px}.atlas-home .agent-home{margin:3px 0 7px;padding:6px 12px}.atlas-home .agent-home-cta button{padding:7px 11px}.atlas-home .periodic-section{padding-top:8px}.atlas-home .table-toolbar{margin-bottom:5px}.atlas-home .table-toolbar p{margin-top:2px}.atlas-home .filters{gap:4px}.atlas-home .filter{padding:4px 7px}.atlas-home .periodic-table{grid-template-rows:14px repeat(7,35px) 6px repeat(2,35px);gap:3px}.atlas-home .element-cell strong{font-size:16px;margin-top:5px}.atlas-home .element-name{font-size:9px}.atlas-home .atomic-number{font-size:7px;top:2px;left:3px}.atlas-home .table-note strong{font-size:17px}}

/* An invitation beside the character title opens an optional, movable study chat. */
.agent-title-invite{display:flex;align-items:center;flex-wrap:wrap;gap:10px;padding:5px 6px 5px 14px;border:1px solid #d4e5d7;border-radius:999px;background:#f0f7ee;color:#527568;font-size:12px}
.agent-audio{width:calc(100% - 36px);height:36px;margin:5px 18px 0;flex:none;accent-color:#17695c}
.agent-audio[hidden]{display:none}
.agent-title-invite .agent-title-open{box-shadow:none;padding:8px 13px}
.agent-capability{display:grid;gap:5px;padding:11px 22px;border-bottom:1px solid #dfe9df;background:#f1f7f0}
.agent-capability>div{display:flex;align-items:baseline;justify-content:space-between;gap:12px}
.agent-capability strong{font-size:12px;color:#214c3c}
.agent-capability .agent-quota{font-size:11px;color:#527367;text-align:right}
.agent-capability-switch{display:inline-flex;align-items:center;gap:9px;width:max-content;max-width:100%;font-size:14px;font-weight:700;color:#17695c;cursor:pointer}
.agent-capability-switch input{width:18px;height:18px;accent-color:#17695c}
.agent-capability small{font-size:11px;line-height:1.5;color:#6f8174}
.agent-capability[hidden]{display:none}
.agent-user-panel{max-width:920px;margin:0 auto 55px;padding:24px 28px;border:1px solid #d6e4d5;border-radius:16px;background:#fff;color:#315649}
.agent-user-panel h2{font-size:20px;margin:0 0 5px}.agent-user-panel p{font-size:12px;color:#718779;margin:0 0 16px}
.agent-user-table-wrap{overflow-x:auto}.agent-user-table{width:100%;border-collapse:collapse;font-size:12px}.agent-user-table th,.agent-user-table td{padding:10px 8px;border-top:1px solid #e2ebe2;text-align:left;white-space:nowrap}.agent-user-table th{color:#668273;font-weight:600}.agent-user-table input{width:86px;padding:7px;border:1px solid #cbdacc;border-radius:7px;font:inherit}.agent-user-table button{padding:7px 12px}
@media(max-width:720px){.agent-title-invite{border-radius:15px}.agent-capability{padding:9px 16px}.agent-capability>div{align-items:flex-start;flex-direction:column;gap:2px}.agent-capability .agent-quota{text-align:left}.agent-user-panel{padding:18px}}

/* A full-screen conversation is useful on classroom displays and Windows touchscreens. */
.agent-head-actions{display:flex;align-items:center;gap:9px;flex:none}
.agent-expand{min-height:36px;padding:7px 12px;border:1px solid #bbd1c1;border-radius:10px;background:#fff;color:#246255;font-family:inherit;font-size:12px;font-weight:600;line-height:1.2;cursor:pointer}
.agent-expand:hover,.agent-expand:focus-visible{background:#e8f4ec}
.agent-drawer.is-maximized{inset:0!important;left:0!important;top:0!important;transform:none!important;width:100vw;height:100dvh;max-width:none;max-height:none;border:0;border-radius:0}
.agent-drawer.is-maximized .agent-drawer-head{cursor:default;touch-action:auto}
.agent-drawer.is-maximized .agent-drag-hint{display:none}
.agent-drawer.is-maximized .agent-messages{width:min(100%,1120px);box-sizing:border-box;margin:0 auto}
.agent-drawer.is-maximized .agent-form{width:min(100%,1120px);box-sizing:border-box;margin:0 auto}
@media(any-pointer:coarse){.agent-close,.agent-expand,.agent-voice-toggle,.agent-voice-stop,.agent-clear,.agent-age,.agent-read,.agent-suggestions button,.agent-form button{min-height:44px}.agent-read{padding:10px 12px}.agent-capability-switch input{width:22px;height:22px}}

/* Keep the established character beside the conversation, including in full-screen mode. */
.agent-drawer{width:min(900px,calc(100vw - 40px))}
.agent-dialog-main{display:grid;grid-template-columns:minmax(0,1fr) 172px;grid-template-rows:minmax(0,1fr);flex:1;min-height:0;background:#f8faf5}
.agent-dialog-main .agent-messages{min-width:0;min-height:0}
.agent-character{min-width:0;min-height:0;overflow:hidden;display:flex;flex-direction:column;align-items:center;align-self:stretch;gap:8px;padding:14px 13px;border-left:1px solid #dce7dc;background:linear-gradient(160deg,#eff7ed,#f8f6e8);color:#55786a;text-align:center;font-size:12px;box-sizing:border-box}
.agent-character-frame{width:100%;height:min(310px,52vh);min-height:0;flex:0 1 310px;overflow:hidden;display:flex;align-items:center;justify-content:center;border:1px solid #d5e4d7;border-radius:16px;background:#fff}
.agent-character-frame img{width:100%;height:100%;object-fit:contain;object-position:center center}
.agent-character-frame strong{font-size:46px;color:#17695c}
.agent-king-art{position:relative;width:100%;height:100%;overflow:hidden}
.agent-king-art img{display:block;width:100%;height:100%;object-fit:contain;object-position:center}
.agent-drawer.is-maximized .agent-dialog-main{width:min(100%,1320px);box-sizing:border-box;margin:0 auto;grid-template-columns:minmax(0,1fr) 210px}
.agent-drawer.is-maximized .agent-character-frame{height:min(440px,58vh);flex-basis:440px}
@media(max-width:720px){.agent-dialog-main{grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr)}.agent-character{grid-row:1;flex-direction:row;justify-content:flex-start;gap:10px;min-height:76px;padding:6px 16px;border-left:0;border-bottom:1px solid #dce7dc;text-align:left}.agent-character-frame{width:62px;height:66px;min-height:0;flex:none;border-radius:11px}.agent-drawer.is-maximized .agent-dialog-main{grid-template-columns:1fr}.agent-drawer.is-maximized .agent-character-frame{height:66px}}

/* The voice player stays internal; live microphone levels are shown instead. */
.agent-audio{display:none!important}
.agent-listening{display:flex;align-items:center;gap:12px;flex:none;min-height:39px;padding:5px 22px;border-bottom:1px solid #dbe8df;background:#eaf5ef;color:#256456;font-size:12px}
.agent-listening[hidden]{display:none}
.agent-listening-label{font-weight:700;max-width:42%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.agent-waveform{width:160px;height:32px;flex:none}
.agent-mic-level{color:#608475}
.agent-dialog-main{overflow:hidden}
.agent-dialog-main .agent-messages{height:100%;box-sizing:border-box;overflow-y:auto;padding-bottom:48px;scroll-padding-bottom:48px;overscroll-behavior:contain}
.agent-suggestions{position:static;flex:none;border-top:1px solid #e1ebe2;background:#f8faf5}
@media(max-width:720px){.agent-listening{gap:7px;padding:4px 12px}.agent-waveform{width:96px}.agent-mic-level{font-size:10px}}

.reaction-tutor-invite{display:flex;align-items:center;justify-content:space-between;gap:22px;margin:18px 0 28px;padding:24px 30px;border:1px solid #c8dcd4;border-radius:20px;background:linear-gradient(115deg,#e8f5ee 0%,#f5f5e7 65%,#f7e6dc 100%)}
.reaction-tutor-invite .eyebrow{margin:0 0 6px;color:#17695c;font-size:10px;letter-spacing:.14em}
.reaction-tutor-invite h2{margin:0 0 6px;font-size:clamp(18px,2vw,25px);color:#173e36}
.reaction-tutor-invite p:last-child{margin:0;color:#58766a;font-size:13px;line-height:1.7}
.reaction-tutor-invite button{flex:none;border:0;border-radius:11px;padding:13px 18px;background:#17695c;color:#fff;font-family:inherit;font-size:13px;font-weight:700;cursor:pointer}
.reaction-tutor-invite button:hover{background:#105447}
.reaction-story-invite{max-width:820px;margin:8px auto 28px;padding:18px 22px}
.agent-reaction-root .agent-dialog-main,.agent-reaction-root .agent-drawer.is-maximized .agent-dialog-main{grid-template-columns:minmax(0,1fr)}
.agent-reaction-root .agent-bubble.assistant{max-width:min(94%,740px)}
.agent-reaction-root .agent-messages{font-variant-numeric:lining-nums}
.agent-resource-song{border:1px solid #a8d2b8;border-radius:7px;background:#e2f3e8;color:#115849;padding:7px 10px;font-family:inherit;font-size:12px;font-weight:700;cursor:pointer}
.agent-resource-song:hover{background:#cdebd7}
@media(max-width:720px){.reaction-tutor-invite{align-items:flex-start;flex-direction:column;padding:18px}.reaction-tutor-invite button{width:100%}}

/* Keep the scroll viewport inside its grid track, independent of portrait height. */
.agent-bubble{flex:0 0 auto;box-sizing:border-box}
.agent-drawer>.agent-drawer-head,.agent-drawer>.agent-drawer-tools,.agent-drawer>.agent-capability,.agent-drawer>.agent-status,.agent-drawer>.agent-form,.agent-drawer>.agent-note{flex-shrink:0}
.agent-form .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}
@media(max-width:720px){.agent-dialog-main{grid-template-rows:76px minmax(0,1fr)}.agent-character{min-height:0;height:76px;padding:5px 16px}.agent-character-frame,.agent-drawer.is-maximized .agent-character-frame{height:64px;flex:0 0 62px}.agent-reaction-root .agent-dialog-main{grid-template-rows:minmax(0,1fr)}}

/* Mobile-only chat shell. Desktop controls retain their original flex layout. */
.agent-options{display:contents}
.agent-options>.agent-drawer-tools,.agent-options>.agent-capability{flex-shrink:0}
.agent-mobile-avatar,.agent-mobile-name,.agent-mobile-subtitle,.agent-mobile-settings,
.agent-mobile-help,.agent-mobile-note,.agent-form .agent-mobile-stop{display:none}
@media(max-width:720px){
  html.agent-mobile-open,html.agent-mobile-open body{overflow:hidden;overscroll-behavior:none}
  html.agent-mobile-open body{position:fixed;top:var(--agent-page-top,0);width:100%}
  .agent-drawer,.agent-drawer.is-maximized{inset:auto!important;left:0!important;top:var(--agent-mobile-top,0px)!important;transform:none!important;width:100%;max-width:100%;height:var(--agent-mobile-height,100dvh);max-height:var(--agent-mobile-height,100dvh);border:0;border-radius:0;box-sizing:border-box;background:#f3f7f3}
  .agent-drawer-head{align-items:center;gap:10px;padding:calc(10px + env(safe-area-inset-top,0px)) 14px 10px;min-height:76px;box-sizing:border-box;cursor:default;flex:none;background:#f6faf5}
  .agent-mobile-avatar{display:flex;align-items:flex-start;justify-content:center;flex:none;width:46px;height:52px;overflow:hidden;border:1px solid #d4e4d7;border-radius:15px;background:#fff}
  .agent-mobile-avatar img{display:block;width:100%;height:auto;max-width:none;transform:scale(1.7);transform-origin:50% 10%}
  .agent-mobile-avatar span{align-self:center;font-size:27px;font-weight:700;color:#17695c}
  .agent-heading-copy{min-width:0;flex:1}
  .agent-drawer-head h2{margin:0;font-size:17px;line-height:1.4;letter-spacing:0}
  .agent-mobile-name{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .agent-mobile-subtitle{display:block;margin-top:3px;font-size:11px;color:#6b8878;line-height:1.4}
  .agent-drawer-head .eyebrow,.agent-desktop-name,.agent-drag-hint,.agent-expand{display:none}
  .agent-head-actions{gap:4px}
  .agent-mobile-settings{display:block;min-width:44px;min-height:44px;padding:0 6px;border:0;border-radius:12px;background:transparent;color:#386e5c;font-family:inherit;font-size:13px;font-weight:600;line-height:1.2;cursor:pointer}
  .agent-mobile-settings[aria-expanded="true"]{background:#dfede3}
  .agent-close{width:44px;height:44px;min-height:44px;background:transparent;font-size:28px}
  .agent-options{display:none;position:absolute;z-index:4;top:calc(76px + env(safe-area-inset-top,0px));left:10px;right:10px;max-height:calc(var(--agent-mobile-height,100dvh) - 105px - env(safe-area-inset-top,0px));overflow-y:auto;overscroll-behavior:contain;border:1px solid #c9dfd0;border-radius:18px;background:#fff;box-shadow:0 16px 50px #183f3933}
  .is-mobile-settings-open .agent-options{display:block}
  .agent-options .agent-drawer-tools{display:flex;flex-direction:column;gap:14px;padding:18px;align-items:stretch}
  .agent-drawer-tools label{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:13px}
  .agent-age{font-size:16px;min-height:44px;max-width:70%;margin:0;padding:8px}
  .agent-drawer-actions{display:flex;gap:8px;justify-content:space-between}
  .agent-voice-toggle,.agent-voice-stop,.agent-clear{min-height:44px;padding:8px;font-size:12px}
  .agent-capability{padding:16px 18px;gap:12px}
  .agent-capability strong{font-size:12px}
  .agent-capability>div{gap:5px}
  .agent-capability .agent-quota{font-size:12px;line-height:1.7}
  .agent-capability-switch{min-height:44px;font-size:15px}
  .agent-capability-switch input{width:22px;height:22px}
  .agent-capability small{font-size:12px;line-height:1.8}
  .agent-mobile-help{display:block;margin:0;padding:14px 18px;font-size:12px;line-height:1.8;color:#6b8175}
  .agent-mobile-done{display:block;width:100%;margin-top:14px;min-height:44px;border:0;border-radius:12px;background:#17695c;color:white;font:inherit;font-weight:700;text-align:center;cursor:pointer}
  .agent-status{flex:none;padding:7px 16px!important;font-size:11px;line-height:1.5;background:#edf4ed;color:#68816e;max-height:48px;overflow-y:auto;box-sizing:border-box}
  .agent-status:empty{display:none}
  .agent-dialog-main,.agent-drawer.is-maximized .agent-dialog-main,.agent-reaction-root .agent-dialog-main{width:100%;margin:0;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr);background:#f3f7f3}
  .agent-character{display:none}
  .agent-dialog-main .agent-messages,.agent-drawer.is-maximized .agent-messages{width:100%;margin:0;padding:20px 14px 24px;gap:18px;scroll-padding-bottom:24px;-webkit-overflow-scrolling:touch}
  .agent-bubble,.agent-reaction-root .agent-bubble.assistant{max-width:94%;font-size:16px;line-height:1.85;padding:13px 15px;border-radius:18px;box-shadow:none;min-width:0}
  .agent-bubble.user{max-width:88%;border-bottom-right-radius:5px}
  .agent-bubble.assistant{border-bottom-left-radius:5px;border-color:#dfe9df}
  .agent-bubble small{font-size:11px;margin-bottom:6px}
  .agent-read{min-height:40px;margin-top:4px;padding:6px 0;font-size:12px}
  .agent-resources a,.agent-resource-song{padding:10px;font-size:13px;line-height:1.6;box-sizing:border-box;min-height:42px}
  .agent-suggestions{padding:7px 12px;gap:7px;min-width:0;box-sizing:border-box;scrollbar-width:none;background:#f3f7f3;align-items:center}
  .agent-suggestions::-webkit-scrollbar{display:none}
  .agent-suggestions button{min-height:38px;padding:8px 12px;font-size:12px;background:#fff;border-color:#d9e6da}
  .agent-form,.agent-drawer.is-maximized .agent-form{display:grid;grid-template-columns:auto minmax(44px,1fr) auto;gap:8px;width:100%;margin:0;padding:10px 14px 6px;align-items:center;box-sizing:border-box;background:#fff}
  .agent-form textarea{grid-column:1/-1;box-sizing:border-box;width:100%;height:52px;min-height:52px;max-height:90px;resize:none;padding:12px 14px;font-size:16px;line-height:26px;border-radius:16px;background:#f5f8f4;border-color:#e0e8de;overflow-y:auto}
  .agent-form textarea:focus{outline:2px solid #79b49c;outline-offset:1px;background:#fff}
  .agent-form button{min-height:44px;padding:10px 12px!important;border-radius:13px;font-size:13px!important;line-height:1.3}
  .agent-form .agent-mic{background:#ecf5ed;color:#17695c;border:1px solid #d6e6d9}
  .agent-form .agent-mobile-stop{display:block;justify-self:start;color:#718176;background:transparent;padding:10px 4px!important}
  .agent-form .agent-send{min-width:70px;background:#17695c}
  .agent-note{display:none}
  .agent-mobile-note{display:block;flex:none;margin:0;padding:2px 12px calc(8px + env(safe-area-inset-bottom,0px));text-align:center;background:#fff;color:#8b9a8e;font-size:10px;line-height:1.5}
  .agent-listening{min-height:38px;padding:4px 14px;box-sizing:border-box;gap:8px}
  .agent-waveform{width:90px;max-width:30%}
  .agent-listening-label{font-size:12px;max-width:48%}
  .agent-mic-level{font-size:10px}
  .is-mobile-keyboard .agent-suggestions,.is-mobile-keyboard .agent-mobile-note{display:none}
  .agent-form[hidden],.agent-suggestions[hidden],.agent-capability[hidden]{display:none}
}
@media(max-width:360px){
  .agent-drawer-head{gap:8px;padding-left:10px;padding-right:8px}
  .agent-mobile-avatar{width:40px;height:46px}
  .agent-drawer-head h2{font-size:16px}
  .agent-form,.agent-drawer.is-maximized .agent-form{gap:6px;padding-left:10px;padding-right:10px}
}

/* Formula layout stays inside the message on narrow screens. */
.agent-bubble-content .katex-display{display:block;max-width:100%;overflow-x:auto;overflow-y:hidden;margin:12px 0;padding:8px 2px;text-align:left;white-space:normal}
.agent-bubble-content .katex-display>.katex{text-align:left;white-space:nowrap}
.agent-bubble-content .katex{font-size:1.05em;white-space:normal}
.agent-read-segment{border-radius:4px;box-decoration-break:clone;-webkit-box-decoration-break:clone}
.agent-read-segment.is-speaking{background:#fff0b9;color:#153f36;box-shadow:0 0 0 3px #fff0b9}
.agent-read-segment.is-speaking .katex-display{background:#fff0b9;border-radius:6px}
@media(prefers-contrast:more){.agent-read-segment.is-speaking{outline:2px solid #176b5b}}
/* Keep a prominent stop action outside the scrolling history on every screen. */
.agent-playback-bar{flex:none;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 20px;background:#fff5dd;border-block:1px solid #ead4a4;color:#6f542d;font-size:13px;line-height:1.4}
.agent-playback-bar[hidden]{display:none}
.agent-playback-stop{flex:none;min-height:44px;padding:10px 18px;border:0;border-radius:10px;background:#a63f32;color:#fff;font-family:inherit;font-size:15px;font-weight:700;line-height:1.3;cursor:pointer;white-space:nowrap}
.agent-playback-stop:hover{background:#853126}
.agent-playback-stop:focus-visible{outline:3px solid #17695c;outline-offset:3px}
@media(max-width:720px){.agent-playback-bar{padding:7px 12px;gap:8px;font-size:11px}.agent-playback-stop{padding:10px 14px;font-size:14px}}

.agent-form .agent-mic[aria-pressed="true"]{background:#f9e4de;color:#8c3325;border:1px solid #e7a995}
