:root{--bg:#f8f8f4;--ink:#25332b;--sub:#758479;--line:#e8ede7;--card:#fff;--green:#53b965;--gd:#31974b;--pale:#e8f7e9;--yellow:#ffcc5a;--purple:#8b70d8;--red:#d96769;--shadow:0 10px 32px rgba(38,62,40,.055)}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:ui-rounded,-apple-system,BlinkMacSystemFont,'Noto Sans KR','Segoe UI',sans-serif;background:#e7eee9;color:var(--ink);font-size:14px}button,input,select{font:inherit}button{cursor:pointer;touch-action:manipulation}button:disabled{opacity:.4;cursor:not-allowed}button:focus-visible,input:focus-visible{outline:3px solid #a6a0e5;outline-offset:2px}.app{background:var(--bg);position:relative;width:min(100%,460px);height:100dvh;margin:auto;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 6px 50px #0000000d}@media(min-width:520px){body{padding:20px}.app{border:7px solid white;border-radius:32px;height:min(920px,calc(100dvh - 40px))}}
.top{height:67px;padding:15px 21px 9px;flex:none;display:flex;justify-content:space-between;align-items:center;background:#fff;z-index:2;border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;gap:8px}.brand-mark{font-size:28px;font-weight:1000;color:white;background:var(--green);height:38px;width:38px;line-height:34px;text-align:center;border-radius:13px;box-shadow:inset 0 -3px #2d9b4a}.brand-mark span{font-size:12px;color:#e9ffd8}.brand b{font-size:23px;letter-spacing:-.07em;display:block;line-height:21px}.brand small{font-size:8px;letter-spacing:.18em;color:#9daaa0;font-weight:900}.top-right{display:flex;align-items:center;gap:7px}.streak{font-weight:900;color:#cd8044;background:#fff5e6;padding:8px 10px;border-radius:13px;font-size:12px}.round-icon{width:38px;height:38px;border:0;background:#f0f4ef;color:#526958;border-radius:13px;font-size:19px;display:inline-grid;place-items:center}
.main{flex:1;min-height:0;overflow-y:auto;padding:21px 19px 28px;overscroll-behavior:contain}.bottom{display:flex;flex:none;padding:7px 5px calc(7px + env(safe-area-inset-bottom));border-top:1px solid var(--line);background:white;justify-content:space-between}.nav{background:none;border:0;flex:1;color:#a0aba3;display:flex;flex-direction:column;align-items:center;gap:3px;font-size:10px;font-weight:800;padding:5px 0}.navico{font-size:23px;line-height:25px;font-weight:700}.nav.on{color:var(--gd)}.eyebrow{font-size:10px;color:var(--gd);font-weight:1000;letter-spacing:.1em}.page-title{font-size:27px;line-height:1.3;letter-spacing:-.055em;margin:6px 0 8px;font-weight:1000}.muted{color:var(--sub);font-size:12px;line-height:1.7;margin:7px 0 11px}.card{background:var(--card);border:1px solid var(--line);border-radius:22px;padding:19px;box-shadow:var(--shadow);margin:13px 0}.hero{background:linear-gradient(120deg,#edfae9,#f2f7d9);border-radius:23px;padding:21px 18px 20px;position:relative;overflow:hidden}.hero h2{font-size:23px;margin:7px 0;letter-spacing:-.05em;max-width:70%}.hero p{margin:0;font-size:12px;color:#67816c;line-height:1.65;max-width:72%}.hero .flame{position:absolute;right:-6px;top:-13px;font-size:94px;transform:rotate(13deg);filter:drop-shadow(0 6px 2px #ffffffaa)}.avatar{width:62px;height:62px;border-radius:22px;background:#d9d4fa;display:flex;align-items:center;justify-content:center;box-shadow:inset 0 -4px #bbb0e5;flex-shrink:0}.avatar svg{width:58px;height:58px}.avatar.lg{width:90px;height:90px;border-radius:32px}.avatar.lg svg{width:84px;height:84px}.coach{display:flex;align-items:center;gap:12px;background:white;border:1px solid var(--line);border-radius:19px;padding:13px;margin:16px 0 12px}.coach p{margin:2px 0;font-size:12px;color:var(--sub);line-height:1.6}.coach strong{font-size:14px}.badge{display:inline-flex;align-items:center;border-radius:9px;background:var(--pale);padding:6px 9px;color:#3c9f50;font-size:10px;font-weight:900}.tag{background:#f0edfd;color:#8167bc}.bar{height:10px;border-radius:30px;background:#ebf0ea;overflow:hidden}.bar>div{height:100%;background:linear-gradient(90deg,#a2db62,var(--green));border-radius:inherit;transition:width .2s}.row{display:flex;align-items:center;justify-content:space-between;gap:10px}.small{font-size:11px;color:var(--sub);font-weight:700}.big-num{font-size:27px;font-weight:1000;letter-spacing:-.045em}.three{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:12px 0}.metric{padding:13px 7px;text-align:center;border:1px solid var(--line);border-radius:17px;background:white}.metric strong{display:block;font-size:24px}.metric span{font-size:10px;color:var(--sub)}.btn{border:0;border-radius:15px;padding:14px 17px;font-size:14px;font-weight:950;letter-spacing:-.015em;min-height:49px}.btn-primary{background:var(--green);color:white;box-shadow:inset 0 -4px var(--gd)}.btn-primary:active{transform:translateY(2px);box-shadow:inset 0 -2px var(--gd)}.btn-dark{background:var(--ink);color:white}.btn-outline{background:#fff;color:#496951;border:1.5px solid #dbe6da}.btn-soft{background:#e9f6e9;color:#328e48}.btn-purple{background:#ece6fc;color:#755bb4}.btn-red{background:#fff0ef;color:#b75354}.full{width:100%}.two{display:flex;gap:9px}.two>button{flex:1;min-width:0}.lesson-path{margin:15px 0}.path-item{width:100%;background:white;border:1px solid var(--line);border-radius:19px;display:flex;align-items:center;gap:12px;padding:13px;margin-bottom:9px;text-align:left}.path-dot{width:44px;height:44px;border-radius:15px;background:#eef4ee;display:grid;place-items:center;font-size:23px;color:#719b73;flex-shrink:0}.path-item.active{border-color:#b8e4b5;background:#f4fff2}.path-item.done .path-dot{background:#daf5de;color:#36a24d}.path-body{flex:1}.path-body strong{display:block;font-size:14px}.path-body small{display:block;color:var(--sub);margin-top:4px;font-size:11px}.path-end{font-size:18px;color:#9cad9d;font-weight:900}.headline{font-size:18px;font-weight:1000;letter-spacing:-.045em;margin:20px 0 7px}.divider{height:1px;background:var(--line);margin:13px 0}.center{text-align:center}.word{font-size:31px;line-height:1.25;font-weight:1000;letter-spacing:-.03em;overflow-wrap:anywhere}.word-meaning{font-size:17px;font-weight:750;color:#69776d;margin:13px 0}.big-question{font-size:22px;font-weight:950;line-height:1.4;letter-spacing:-.045em;margin:20px 0}.answer{border:2px solid #e6ede5;border-radius:16px;background:#fff;display:flex;align-items:center;gap:11px;padding:15px;margin:8px 0;width:100%;text-align:left;font-weight:850;min-height:57px}.answer .n{background:#f1f3f1;border-radius:9px;display:grid;place-items:center;width:29px;height:29px;flex-shrink:0;font-size:11px;color:#8d9d90}.answer.selected{border-color:var(--green);background:#f2fff3}.answer.bad{border-color:var(--red);background:#fff2f1}.feedback{background:#e9f7ea;border-radius:16px;color:#367c43;padding:13px 14px;margin:11px 0;line-height:1.7;font-weight:750;font-size:12px}.feedback.bad{color:#a65359;background:#fff0f0}.single-word{border:2px solid #e1e8de;padding:20px 11px;border-radius:20px;text-align:center;background:white;margin:17px 0}.speaker-button{background:#eff8ee;border:0;color:#368f4b;border-radius:14px;padding:12px 15px;font-size:14px;font-weight:900;margin:13px 0;display:inline-flex;align-items:center;gap:6px}.exercise-meta{font-size:11px;font-weight:900;color:#809485;display:flex;justify-content:space-between;align-items:center}.hint{font-size:12px;color:#88998b;line-height:1.6}.stack{display:flex;flex-direction:column;gap:10px}.chips{display:flex;flex-wrap:wrap;gap:9px;min-height:51px;padding:10px;border:1.5px dashed #cddccd;border-radius:17px;background:#f6faf5}.chip{border:1px solid #dde6db;background:#fff;border-radius:12px;padding:10px 13px;font-weight:800;box-shadow:0 3px #e9ede6}.chip.active{background:#e6f8e6;border-color:#8ccf8f}.writing{width:100%;padding:14px 13px;border:2px solid #dce7db;border-radius:15px;font-size:16px}.list-item{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:12px 0;border-bottom:1px solid var(--line)}.list-item strong{font-size:14px}.list-item small{display:block;color:#829286;margin-top:3px;font-size:12px}.tiny-btn{border:0;background:#e8f7e7;color:#308e47;font-weight:900;border-radius:10px;padding:8px 11px;font-size:11px}.tiny-btn.disabled{background:#eff1ef;color:#778178}.progress-squares{display:grid;grid-template-columns:repeat(7,1fr);gap:6px}.progress-squares span{height:31px;border-radius:9px;background:#eaf0e9}.progress-squares span.hit{background:#81cc8b}.success{color:#329d48}.fail{color:#d15a60}.speechbubble{background:white;border:1px solid #e7ebe7;border-radius:19px 19px 19px 5px;padding:15px;margin:10px 0 13px;line-height:1.65;max-width:95%}.speechbubble.me{margin-left:auto;background:#e6f5e5;border-color:#d1e9d0;border-radius:19px 19px 5px 19px}.speechbubble .tl{font-size:18px;font-weight:900}.speechbubble .ko{font-size:12px;color:#859086;margin-top:5px}.speechbubble .note{background:#f5f1fe;color:#766399;padding:10px 11px;border-radius:10px;margin-top:10px;font-size:12px}.speechbubble .mini-tools{display:flex;gap:7px;margin-top:10px}.messagebox{display:flex;gap:7px;margin:12px 0}.messagebox input{min-width:0;flex:1;border:1.5px solid #dfe9df;padding:13px;border-radius:13px;background:white}.messagebox .btn{min-width:58px;padding:12px}.mic{width:77px;height:77px;border-radius:50%;background:var(--green);color:white;border:none;font-size:32px;box-shadow:inset 0 -5px var(--gd),0 8px 26px #4fae6450}.mic.listening{background:#e86d75;box-shadow:0 0 0 13px #f7dadd}.chat-input-footer{text-align:center;background:#f5f8f3;padding:13px;border-radius:18px}.connection{display:flex;align-items:center;gap:8px;color:#a45b55;font-size:12px;font-weight:850;background:#fff0ec;padding:10px 11px;border-radius:12px;margin-bottom:10px}.connection.online{background:#e7f8e6;color:#378e4b}.dot{width:8px;height:8px;background:currentColor;border-radius:50%}.secondary-line{border:0;background:none;color:var(--gd);font-size:12px;text-decoration:underline;font-weight:900;padding:8px}.empty{padding:37px 16px;text-align:center;color:var(--sub);background:white;border-radius:19px;line-height:1.7}.notice{font-size:12px;line-height:1.65;padding:12px 13px;border-radius:13px;background:#fff7df;color:#886c3f}.scope{color:#9ea8a0;font-size:11px;line-height:1.5}
.overlay{display:none;position:absolute;inset:0;background:#1b2f2370;z-index:20;align-items:end}.overlay.open{display:flex}.sheet{height:min(92%,865px);width:100%;overflow:auto;border-radius:27px 27px 0 0;background:#fff;padding:23px 21px calc(24px + env(safe-area-inset-bottom))}.sheet-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.sheet-head h2{margin:2px 0;font-size:24px}.field-group{padding:16px 0;border-bottom:1px solid var(--line)}.field-group h3{font-size:15px;margin:0 0 12px}.field-group label{display:block;font-size:12px;color:#596c5d;font-weight:850;margin:11px 0}.field-group input:not([type=checkbox]):not([type=range]),.field-group select{width:100%;min-width:0;background:#fcfdfa;border:1.5px solid var(--line);border-radius:12px;padding:12px;margin-top:6px;color:#2e4032;font-size:13px}.fields{display:grid;grid-template-columns:1fr 1fr;gap:9px}.field-group input[type=range]{accent-color:var(--gd);display:block;width:100%;margin-top:9px}.switchline{display:flex!important;align-items:center;justify-content:space-between;gap:14px;border-bottom:1px solid #edf0ed;padding:10px 0;font-size:13px!important}.switchline small{display:block;font-size:11px;color:#98a49a;margin-top:3px}.switchline input{accent-color:var(--gd);width:19px;height:19px}.keyline{display:flex;gap:7px}.keyline input{flex:1}.keyline button{margin-top:6px;padding:10px 12px;min-height:42px}.learnlink{color:#38904d;text-decoration:underline;display:block;margin-top:10px;font-size:12px;font-weight:850}.privacy{font-size:11px;color:#8d7661;background:#fff6e9;border-radius:12px;padding:11px;line-height:1.65}.danger{display:block;width:100%;background:none;border:0;color:#a85b64;text-decoration:underline;font-size:12px;padding:17px}.placement-sheet{height:min(76%,690px)}.placement-card{border:2px solid #e8ede5;border-radius:23px;background:#fbfdfa;padding:26px 16px;text-align:center;margin:22px 0}.toast{position:absolute;left:50%;transform:translateX(-50%);bottom:105px;z-index:30;background:#28482e;color:#fff;padding:12px 17px;border-radius:14px;font-size:12px;line-height:1.45;min-width:160px;max-width:88%;text-align:center;box-shadow:0 6px 25px #162d1b55;display:none}@media(max-height:650px){.top{height:54px;padding-top:8px}.main{padding:14px 17px}}@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* v3.1 - inline answer and explanations */
.cloze-sentence{display:flex;flex-wrap:wrap;align-items:baseline;gap:5px 7px;background:#f7faf3;border:2px solid #e2eddc;border-radius:18px;padding:19px 13px;margin:16px 0 10px;font-size:21px;font-weight:900;line-height:2;letter-spacing:-.02em;white-space:pre-wrap;overflow-wrap:anywhere}
.cloze-input{display:inline-block;min-width:130px;max-width:100%;width:148px;flex:none;border:none;border-bottom:3px solid #58af69;border-radius:4px;text-align:center;background:#fffbe7;padding:8px 4px;font-size:19px;font-weight:850;color:#295538;outline:none;line-height:1.2;vertical-align:middle}
.cloze-input:focus{background:white;box-shadow:0 0 0 3px #afe6b6}
.sentence-meaning{color:#627d68;font-size:15px;font-weight:700;line-height:1.6;margin-top:15px}
.practice-tools{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
.feedback-panel{padding:16px;margin:16px 0 12px;background:#eef9ee;border:1.5px solid #baddba;border-radius:18px;line-height:1.65}
.feedback-panel.incorrect{background:#fff8f3;border-color:#f3c7b8}
.feedback-title{font-size:18px;font-weight:950;margin-bottom:10px;color:#267e36}.incorrect .feedback-title{color:#bc5554}
.feedback-line{display:flex;flex-direction:column;gap:3px;padding:7px 0;border-bottom:1px solid #0000000e}
.feedback-line small{font-size:11px;color:#8b847b;font-weight:800}
.feedback-line strong{font-size:18px;overflow-wrap:anywhere}
.feedback-line .answer-correct{color:#208443;font-size:21px}
.feedback-translation{color:#5e7364;font-size:13px;font-weight:750}
.feedback-reason{font-size:13px;color:#594e46;font-weight:650}
.feedback-ai{background:white;border-radius:12px;padding:13px;color:#5f508b;font-size:13px;line-height:1.7}
.feedback-pending{color:#86674d;font-size:12px}
.extra-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:13px}
.extra-card{background:#f5faf4;border:1.5px solid #dbe9d8;border-radius:16px;padding:16px 11px;min-height:104px;text-align:left;color:#2f653b}
.extra-card strong{display:block;font-size:14px;line-height:1.4}
.extra-card small{display:block;font-size:11px;color:#6c8e70;line-height:1.4;margin-top:5px}
@media(max-width:370px){.extra-grid{grid-template-columns:1fr}.cloze-input{width:128px;min-width:100px}}

/* v3.2 mobile-first composing and chat bubbles */
.chat-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:13px}.chat-head .avatar{flex-shrink:0}.chat-head .page-title{font-size:22px}.chat-mode{padding:14px;border-radius:16px;background:#e7f7e8;color:#2f7443;margin:9px 0 14px}.chat-mode b{display:block;font-size:13px}.chat-mode small{display:block;font-size:11px;line-height:1.5;margin-top:3px}.online-pill{border-radius:99px;padding:7px 9px;background:white;font-size:10px;font-weight:900;color:#31874a;white-space:nowrap;flex-shrink:0}
.chat-thread{margin-bottom:10px}.correction{background:#eaf5ff;border:1px solid #d1e7f5;border-radius:13px;padding:11px;margin-top:10px;line-height:1.6}.correction b{font-size:11px;display:block;color:#587796}.correction strong{display:block;font-size:15px;color:#2b658c}.correction small{display:block;font-size:12px;color:#5b7790;margin-top:3px}.vocab-list{border-top:1px solid #ddebe1;margin-top:12px;padding-top:9px}.vocab-list>b{font-size:12px;color:#4d7662}.vocab-note{background:#fbf8e9;border:1px solid #ede8d5;padding:10px 11px;border-radius:12px;margin-top:8px}.vocab-note strong{font-size:16px;color:#4f603b}.vocab-note p{font-size:12px;line-height:1.7;margin:7px 0}.vocab-note small{font-size:11px;color:#78775f}.vocab-note .mini-tools{flex-wrap:wrap}.lang-strip{display:flex;gap:5px;flex-wrap:wrap}.lang-strip .tiny-btn{font-size:10px;padding:8px 9px}.lang-strip .selected{background:#49b65f;color:white}.chat-input-footer{padding:12px 10px 14px}.chat-input-footer .row{align-items:center;gap:6px}.chat-input-footer .row .small{font-size:10px;flex-shrink:0}.chat-input-footer .mic{width:68px;height:68px}.messagebox input{font-size:16px}
.inline-check{border:none;border-radius:13px;background:#48b965;color:white;min-width:43px;height:42px;font-size:22px;font-weight:950;align-self:center;box-shadow:0 3px #328f47}.cloze-input{font-size:20px;min-height:49px}.cloze-sentence{align-items:center}.answer-inline-submit{position:sticky;bottom:0;z-index:2;box-shadow:0 5px 17px #407c4b25}.typing-indicator{padding:8px}
@media(max-width:390px){.chat-head .page-title{font-size:18px}.chat-head .eyebrow{font-size:8px}.chat-head p.muted{font-size:10px}.online-pill{font-size:9px}.cloze-input{width:132px;min-width:110px}}

/* v3.3: contextual glossary inside each Alice message */
.sentence-glossary{margin-top:13px;border:1px solid #dceadf;border-radius:16px;background:#fffef9;padding:11px 12px 6px}
.glossary-header{display:flex;justify-content:space-between;align-items:center;gap:6px}.glossary-header strong{color:#2a7045;font-size:14px}.glossary-header span{font-size:11px;color:#71917e}
.glossary-hint{font-size:11px;color:#6e8074;margin:5px 0 10px;line-height:1.45}
.gloss-item{padding:11px 0 10px;border-top:1px solid #edf0e9}.gloss-wordline{display:flex;align-items:baseline;flex-wrap:wrap;gap:5px 9px;line-height:1.5}.gloss-wordline strong{font-size:17px;color:#1f5c3f;overflow-wrap:anywhere}.gloss-wordline span{font-size:13px;color:#495b4b;font-weight:700}
.gloss-role{display:inline-block;border-radius:99px;background:#e5f2e7;padding:2px 7px;margin-top:4px;font-size:10px;font-weight:800;color:#39764d}
.gloss-why{font-size:12.5px;color:#455e4c;line-height:1.65;margin:7px 0}
.gloss-more{margin-top:8px}.gloss-more summary{cursor:pointer;display:inline-flex;align-items:center;min-height:32px;font-size:12px;font-weight:850;color:#357a52;list-style:none}.gloss-more summary::-webkit-details-marker{display:none}.gloss-more summary::before{content:'＋';margin-right:5px;font-weight:900}.gloss-more[open] summary::before{content:'−'}
.gloss-example{margin:3px 0 8px;font-size:13px;line-height:1.6;background:#eff8f0;padding:8px;border-radius:9px}.gloss-example b{display:block;color:#2b6741}.gloss-example span{font-size:12px;color:#5d745f}
.gloss-more .mini-tools{display:flex;flex-wrap:wrap;gap:6px;margin:5px 0 7px}.gloss-more .tiny-btn{font-size:11px}

/* Alice 3.4: unified learning path and always-on chat */
.quick-chat{margin:14px 0;background:linear-gradient(135deg,#fff4e5,#fffdf8);border:1.5px solid #f6dab3;border-radius:21px;padding:14px 13px}
.quick-chat small{display:block;font-size:10px;color:#987d5c;margin-top:3px}
.quick-chat .avatar{height:50px;width:50px;border-radius:17px;background:#f9debf;box-shadow:none}
.quick-chat .avatar svg{height:46px;width:46px}
.quick-chat .online-pill{font-size:9px;white-space:nowrap}
.btn-chat{margin-top:12px;background:#f4bd6c;color:#5d3b12;box-shadow:inset 0 -4px #dca14f}
.path-item.optional{border:1.5px dashed #f0c88c;background:#fffbf3}
.integrated-card{text-align:center}
.integrated-word{font-size:32px;letter-spacing:-.04em;line-height:1.3;margin:19px 0 6px;overflow-wrap:anywhere}
.integrated-meaning{color:#548265;font-size:18px;font-weight:800;margin:0 0 18px}
.integrated-example{background:#f5fbf0;border-radius:17px;text-align:left;padding:16px;margin-top:20px;display:flex;flex-direction:column;align-items:flex-start;gap:8px}
.integrated-example small{font-size:11px;color:#7f9786;font-weight:800}
.integrated-example strong{font-size:19px;line-height:1.5}
.integrated-example span{font-size:13px;color:#687e6d}
.integrated-example .tiny-btn{padding:8px 10px;margin-top:2px}
@media(max-width:360px){.quick-chat .online-pill{display:none}}

/* v3.5: natural Filipino slang mini-lessons. Compact, optional and contextual. */
.slang-daily{margin:10px 0 15px;border:1.5px solid #e9d2f8;border-radius:20px;background:#fbf6ff;padding:16px}
.slang-head{display:flex;align-items:center;justify-content:space-between;gap:10px;color:#83579f;font-size:12px;font-weight:850}
.slang-head small{font-size:10px;color:#9c83ad;text-align:right}
.slang-daily>strong{display:block;font-size:26px;line-height:1.3;margin-top:12px;color:#623e83}
.slang-daily>p{font-size:13px;line-height:1.65;margin:5px 0;color:#604a72}
.slang-daily .slang-standard{margin-top:10px;color:#65506c}.slang-daily .slang-standard b{font-size:15px;color:#5a4868}
.slang-daily .slang-usage{background:#f5ebfa;border-radius:10px;padding:9px 10px}
.slang-daily .mini-tools{display:flex;flex-wrap:wrap;gap:7px;margin-top:10px}
.slang-chat{background:#f7f0ff;border:1px solid #e7d4f7;padding:11px 12px;margin-top:9px;border-radius:14px;line-height:1.55}
.slang-chat>b{display:block;color:#6e4696;font-size:12px}.slang-chat>span{font-size:13px;color:#46345b}
.slang-chat p{font-size:12px;margin:6px 0 3px;color:#5a4667}.slang-chat small{font-size:11px;color:#796783}


/* v3.6: genuinely messenger-like chat surface, with accessible expandable study notes */
.main.chat-screen{padding:0;overflow:hidden;background:#f5f7f6}
.chat-layout{display:flex;flex-direction:column;height:100%;min-height:0}
.messenger-head{flex:0 0 auto;display:flex;align-items:center;gap:10px;padding:11px 15px;background:#fff;border-bottom:1px solid #e8eee8}
.messenger-head .avatar{width:43px;height:43px;border-radius:50%;box-shadow:none;background:#f8d6e0}
.messenger-head .avatar svg{width:40px;height:40px}
.messenger-head-text{min-width:0;flex:1}
.messenger-head-text strong{font-size:16px;display:block;font-weight:950;color:#263d35}
.messenger-head-text strong span{font-weight:650;color:#8c9892;font-size:12px}
.messenger-head-text small{display:block;margin-top:3px;font-size:11px;color:#50a66b}
.chat-help{width:32px;height:32px;border-radius:50%;border:1px solid #e3ece5;background:#f5faf5;font-size:15px;color:#62856b;font-weight:900}
.chat-log{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:15px 12px 16px;scrollbar-width:thin;scrollbar-color:#b5c9b6 transparent}
.chat-thread{display:flex;flex-direction:column;gap:12px;margin:0}
.chat-row{display:flex;align-items:flex-start;gap:7px;width:100%;min-width:0}
.chat-row.from-me{justify-content:flex-end}
.chat-avatar{width:28px;height:28px;border-radius:50%;background:#ffe3e5;display:grid;place-items:center;flex:0 0 28px;font-size:14px;margin-top:21px}
.bubble-column{display:flex;flex-direction:column;align-items:flex-start;min-width:0;max-width:83%}
.from-me .bubble-column{align-items:flex-end;max-width:77%}
.chat-sender{font-size:10px;color:#819087;font-weight:800;padding-left:7px;margin-bottom:4px}
.chat-layout .speechbubble{max-width:100%;width:max-content;min-width:70px;background:#fff;margin:0;padding:11px 12px;border-radius:16px 16px 16px 5px;box-shadow:0 1px 3px #102d1c0b;border:1px solid #e5eae5;overflow-wrap:anywhere}
.chat-layout .speechbubble.me{background:#d8f7bb;border-color:#c8edac;border-radius:16px 16px 5px 16px;margin-left:0}
.chat-layout .speechbubble .tl{font-size:15px;font-weight:750;letter-spacing:-.015em;line-height:1.52;white-space:pre-wrap}
.chat-layout .speechbubble.me .tl{font-size:15px;font-weight:650;color:#27482f}
.chat-layout .speechbubble .ko{font-size:11px;line-height:1.55;color:#7c897f;margin-top:6px;border-top:1px solid #f3f3ef;padding-top:5px}
.chat-bubble-actions{display:flex;align-items:center;gap:9px;padding:3px 5px 0}
.chat-small-action{border:none;background:transparent;padding:6px 3px;color:#607b68;font-size:11px;font-weight:850;min-height:25px}
.chat-small-action:active{color:#2e9b4d}
.chat-timestamp{color:#a3ada5;font-size:9px;margin-left:auto}
.chat-timestamp.from-me-time{padding:4px 5px 0}
.chat-extra{width:100%;margin-top:5px;background:#fcfefb;border:1px solid #e4ece4;border-radius:12px;overflow:hidden}
.chat-extra summary{cursor:pointer;list-style:none;padding:9px 10px;color:#597b64;font-size:11px;font-weight:900}
.chat-extra summary::-webkit-details-marker{display:none}
.chat-extra summary::before{content:'▸';margin-right:6px;color:#5ab871}
.chat-extra[open] summary::before{content:'▾'}
.chat-extra-body{padding:0 10px 11px}
.chat-extra-body .sentence-glossary{margin-top:8px;padding:8px 9px 3px}
.chat-extra-body .correction{margin-top:8px}
.chat-extra-body .note{font-size:11px;line-height:1.6;color:#6b6683}
.chat-offline{margin:15px auto 0;background:#fff8e8;border-radius:10px;padding:10px;text-align:center;font-size:11px;color:#987b42}
.chat-offline button{color:#2e8c53;background:none;border:0;text-decoration:underline;font-size:11px;font-weight:850}
.typing-bubble{background:#fff;border:1px solid #ebefeb;border-radius:15px 15px 15px 5px;padding:12px 16px;display:flex;gap:5px}
.typing-bubble span{height:7px;width:7px;border-radius:50%;background:#91bda1;animation:bouncing 1.1s infinite alternate}
.typing-bubble span:nth-child(2){animation-delay:.2s}.typing-bubble span:nth-child(3){animation-delay:.4s}
@keyframes bouncing{to{opacity:.25;transform:translateY(-3px)}}
.chat-composer{flex:0 0 auto;background:#fff;border-top:1px solid #e3ebe4;padding:7px 12px calc(9px + env(safe-area-inset-bottom))}
.chat-language{display:flex;align-items:center;gap:8px;justify-content:center}
.chat-language>span{color:#899e8c;white-space:nowrap;font-size:10px;font-weight:750}
.chat-language .lang-strip{flex-wrap:nowrap;gap:5px}
.chat-language .tiny-btn{padding:4px 9px;border-radius:30px;min-height:26px;font-size:10px}
.chat-send-row{display:flex;gap:9px;align-items:center;margin-top:6px}
.chat-send-row input{flex:1;min-width:0;font-size:16px;border:1px solid #e5ebe5;border-radius:23px;padding:12px 15px;background:#f7faf7;outline:none;line-height:1.3}
.chat-send-row input:focus{border-color:#72c47c;background:white}
.chat-mic,.chat-send{height:42px;width:42px;border:0;border-radius:50%;flex:none;display:grid;place-items:center;font-size:18px}
.chat-mic{background:#eaf6eb;color:#398a50}
.chat-mic.listening{background:#ffe5e8;outline:3px solid #f4c6c7}
.chat-send{background:#53b968;color:white;font-size:22px}
.chat-send:disabled,.chat-mic:disabled{opacity:.45}
.chat-layout .correction strong{font-size:14px}
@media(max-width:375px){.chat-log{padding-left:7px;padding-right:7px}.chat-row .bubble-column{max-width:84%}.chat-language .tiny-btn{padding-left:6px;padding-right:6px}.chat-language{gap:4px}}

/* v3.6: correct answers move on by themselves; wrong answers retain rich feedback */
.quick-correct{position:relative;outline:2px solid #89cc99;box-shadow:0 2px 12px #62ba771a}
.quick-correct-label{position:absolute;left:50%;bottom:10px;transform:translateX(-50%);z-index:4;background:#288c51;color:#fff;padding:9px 15px;border-radius:999px;font-size:13px;font-weight:900;white-space:nowrap;box-shadow:0 5px 18px #19633330;pointer-events:none}
.quick-correct input{background:#e7fae8;border-color:#84cb8b}
@media(prefers-reduced-motion:reduce){.typing-bubble span{animation:none!important}}
