.chat-lobby,.chat-room{max-width:740px;margin:auto}.chat-lobby h1{font-size:clamp(32px,7vw,46px);line-height:1.13;letter-spacing:-1.4px;margin:12px 0 16px}.chat-intro{color:#69766f;font-size:16px;line-height:1.65}.chat-level-row{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:28px 0 20px;padding:13px 0;border-top:1px solid #e2e6df;border-bottom:1px solid #e2e6df}.chat-level-row label{margin:0;font-size:13px;color:#68756d}.chat-level-row select{width:auto;max-width:70%;margin:0;padding:9px 12px;background:#fff;border:1px solid #d8e1d9;border-radius:12px;color:#174d42;font:inherit;font-size:13px}.chat-personas{display:grid;gap:12px}.chat-persona{display:flex;align-items:center;gap:17px;text-align:left;padding:20px;background:#fff;border:1px solid #e3e8df;border-radius:20px;color:#243e34;box-shadow:0 3px 12px #18392b03;width:100%;transition:transform .15s,border-color .15s}.chat-persona:hover{border-color:#8da99a;transform:translateY(-2px)}.chat-avatar{width:72px;height:82px;flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;position:relative;border-radius:30px 30px 18px 18px;font:42px Georgia,serif;overflow:hidden;color:#345d4b;background:#e0eadf}.chat-avatar:before{content:'';position:absolute;width:70px;height:70px;border:1px solid currentColor;opacity:.12;border-radius:50%;top:-20px;right:-22px}.chat-avatar i{position:absolute;width:40px;height:3px;background:currentColor;opacity:.15;bottom:12px;border-radius:100%}.chat-avatar.rose{background:#f5e4df;color:#9f625c}.chat-avatar.blue{background:#e0ebef;color:#507d92}.chat-avatar.ochre{background:#f4ead6;color:#957535}.chat-avatar.lilac{background:#ebe4f0;color:#81648f}.chat-avatar.small{width:42px;height:46px;border-radius:18px 18px 12px 12px;font-size:27px}.chat-avatar.small i{display:none}.chat-persona-info{display:flex;flex:1;flex-direction:column;gap:8px;min-width:0}.chat-persona-info>strong{font-size:20px;display:flex;align-items:baseline;gap:9px;flex-wrap:wrap}.chat-persona-info small{font-size:12px;font-weight:500;color:#7a867e}.chat-persona-info>span{font-size:13px;line-height:1.5;color:#6a766e}.chat-persona-info em{font-size:10px;font-style:normal;color:#8b968f}.chat-card-arrow{align-self:flex-start;font-size:19px;color:#8b9c8d}.chat-footnote{margin:24px 0 12px;padding:20px;background:#efeee5;border-radius:18px}.chat-ai-label{font-size:10px;letter-spacing:1.5px;color:#597466}.chat-footnote p,.chat-footnote a{font-size:11px;line-height:1.7;color:#788178}.chat-footnote a{color:#456c5b}.chat-room-top{display:flex;align-items:center;gap:12px;padding-bottom:18px;border-bottom:1px solid #e1e7dc}.chat-room-top h1{font-size:23px;margin:0}.chat-room-top>div{flex:1}.chat-room-top>div>span{font-size:11px;color:#7d887e}.chat-back,.chat-reset{background:transparent;border:0;color:#486f5d;padding:8px;font-size:23px}.chat-reset{font-size:11px}.chat-audio-setting{padding:14px 0;color:#6c7e70;display:flex;flex-wrap:wrap;justify-content:space-between;gap:7px}.chat-audio-setting label{display:flex;align-items:center;gap:7px;font-size:11px;margin:0}.chat-audio-setting input{width:15px;height:15px;margin:0;accent-color:#285f48}.chat-audio-setting>span{font-size:10px}.chat-welcome{text-align:center;padding:38px 20px;background:#eeefe5;border-radius:22px;margin-top:12px}.chat-welcome .chat-arabic{font-size:30px}.chat-welcome>p:not(.chat-arabic){font-size:13px;color:#748071;line-height:1.6}.chat-welcome>button{margin-top:15px}.chat-messages{display:flex;flex-direction:column;gap:22px;padding:15px 0}.chat-user{align-self:flex-end;max-width:86%;padding:14px 18px;border-radius:18px 18px 4px 18px;background:#245e49;color:#fff;white-space:pre-wrap;overflow-wrap:anywhere;font-size:15px;line-height:1.65}.chat-answer{align-self:flex-start;width:min(94%,600px)}.chat-bubble{background:#fff;border:1px solid #e0e6dc;padding:20px;border-radius:4px 20px 20px 20px}.chat-arabic{font-family:Georgia,'Times New Roman',serif;font-size:27px;line-height:1.95;margin:0 0 16px;overflow-wrap:anywhere;color:#244b3a;white-space:pre-wrap}.chat-listen{background:#eef3eb;border:0;border-radius:30px;padding:9px 13px;color:#356147;font-size:11px;cursor:pointer}.chat-translation{margin-top:14px;border-top:1px solid #eef0e9;padding-top:13px}.chat-translation summary,.chat-hint summary{font-size:12px;color:#6a7c6c;cursor:pointer}.chat-translation p,.chat-hint p,.chat-correction p{font-size:13px;line-height:1.75;white-space:pre-wrap;overflow-wrap:anywhere}.chat-correction{padding:14px 17px;background:#f4eddc;border-radius:13px;margin-top:10px;color:#806838}.chat-correction strong{font-size:11px}.chat-correction p{margin:5px 0 0}.chat-hint{padding:14px 16px;border:1px dashed #cddacb;border-radius:13px;margin-top:10px}.chat-hint p[lang=ar]{font-size:23px}.chat-vocabulary{display:flex;flex-wrap:wrap;gap:7px;margin-top:12px}.chat-vocabulary>span{width:100%;font-size:10px;color:#899286;margin:0 0 2px}.chat-vocabulary button{display:grid;grid-template-columns:1fr auto;align-items:center;gap:3px 12px;background:#f1f4eb;border:1px solid #dfe7d7;border-radius:12px;padding:9px 12px;text-align:left;color:#355c41;max-width:100%}.chat-vocabulary button>span{font-size:20px;grid-row:1}.chat-vocabulary small{font-size:10px;grid-row:2;overflow-wrap:anywhere}.chat-vocabulary b{grid-column:2;grid-row:1/3;font-weight:400}.chat-thinking{display:flex;align-items:center;gap:5px;color:#718373;font-size:11px}.chat-thinking i{width:5px;height:5px;background:#7a9c83;border-radius:50%;animation:chatPulse 1s infinite alternate}.chat-thinking i:nth-child(2){animation-delay:.2s}.chat-thinking i:nth-child(3){animation-delay:.4s}.chat-thinking span{margin-left:7px}.chat-composer{position:sticky;bottom:calc(78px + env(safe-area-inset-bottom));display:grid;grid-template-columns:1fr 46px;gap:8px 10px;padding:12px;background:#f7f8f0f5;border:1px solid #dce5d4;border-radius:19px;box-shadow:0 8px 30px #243b2c12;backdrop-filter:blur(12px);margin-top:12px}.chat-composer textarea{font:inherit;font-size:14px;line-height:1.6;resize:vertical;max-height:140px;min-height:58px;width:100%;border:0;background:transparent;outline-offset:4px;padding:5px;box-sizing:border-box;margin:0}.chat-composer button{width:42px;height:42px;border-radius:50%;align-self:center;padding:0;font-size:23px}.chat-composer small{grid-column:1/-1;font-size:9px;color:#8b9587}.chat-error:empty,.chat-voice-error:empty{display:none}.chat-error,.chat-voice-error,.chat-notice{font-size:12px;line-height:1.7;background:#f6ecdf;border-radius:12px;color:#886442;padding:12px 16px;overflow-wrap:anywhere}.chat-access{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}.chat-access a{font-size:11px;text-decoration:none}.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}nav{grid-template-columns:repeat(6,1fr)}nav button span{font-size:10px}button:disabled{cursor:default}@keyframes chatPulse{to{opacity:.25;transform:translateY(-3px)}}@media(max-width:400px){.chat-persona{padding:16px 13px;gap:12px}.chat-avatar{width:57px;height:70px}.chat-persona-info>strong{font-size:18px}.chat-persona-info>span{font-size:12px}nav button span{font-size:9px}.chat-bubble{padding:17px}.chat-arabic{font-size:25px}}@media(prefers-reduced-motion:reduce){.chat-thinking i{animation:none}.chat-persona{transition:none}}
.chat-home-link{display:flex;align-items:center;gap:15px;text-align:left;width:100%;border:1px solid #d7e3d0;background:#ecf1df;color:#355c43;border-radius:19px;padding:18px 20px;margin:18px 0}.chat-home-link>span:first-child{font-size:25px}.chat-home-link>span:nth-child(2){flex:1;display:flex;flex-direction:column;gap:4px}.chat-home-link strong{font-size:14px}.chat-home-link small{font-size:11px;color:#7c8b71}.chat-home-link b{font-size:20px;font-weight:400}

.chat-avatar.copper{background:#eddfcb;color:#9b6840}.chat-provider{display:block;font-size:9px;color:#8b9784;margin:0 0 9px;letter-spacing:.4px}
.chat-lobby h1{font-size:clamp(29px,6vw,38px);letter-spacing:-1px}.chat-intro{font-size:14px;margin-bottom:20px}.chat-persona{padding:16px;gap:14px}.chat-avatar{width:58px;height:66px;font-size:34px}.chat-persona-info{gap:5px}.chat-persona-info>strong{font-size:18px}.chat-footnote{padding:14px 0;background:none;border-radius:0;color:#778478}.chat-footnote>summary{font-size:11px;cursor:pointer}.chat-footnote>p{margin:12px 0}.chat-room-top{position:relative}.chat-options{position:relative;flex:none}.chat-options>summary{list-style:none;cursor:pointer;display:grid;place-items:center;width:44px;height:44px;border-radius:50%;font-size:29px;color:#486f5d}.chat-options>summary::-webkit-details-marker{display:none}.chat-options[open]>summary{background:#e9eee4}.chat-options-menu{position:absolute;right:0;top:50px;z-index:25;width:min(280px,calc(100vw - 40px));padding:18px;background:#fff;border:1px solid #dce4d7;border-radius:17px;box-shadow:0 12px 36px #174d421c}.chat-auto-voice{display:flex;align-items:center;gap:9px;margin:0 0 20px;font-size:12px}.chat-auto-voice input{width:17px;height:17px;accent-color:#174d42}.chat-options-menu .voice-language-label{display:block;margin:0;font-size:12px}.chat-options-menu .voice-language-label select{display:block;width:100%;max-width:100%;margin-top:9px;font-size:13px}.chat-options-menu .chat-reset{font-size:12px;margin-top:12px;padding:10px 0}.chat-welcome{background:transparent;padding:28px 8px 20px;margin:0}.chat-messages{gap:18px;padding:20px 0}.chat-word-list{margin-top:10px}.chat-word-list>summary,.chat-correction>summary{font-size:12px;cursor:pointer;color:#6a7c6c}.chat-correction{padding:10px 14px}.chat-bubble{padding:18px}.chat-arabic{margin-bottom:12px}.chat-composer{grid-template-columns:minmax(0,1fr) 44px 44px;align-items:center;padding:8px;gap:6px;bottom:calc(82px + max(env(safe-area-inset-bottom),var(--kalima-safe-bottom,0px)))}.chat-composer textarea{grid-column:1;grid-row:1;min-height:44px;font-size:16px;padding:9px 8px;resize:none}.chat-composer>button[type=submit]{grid-column:3;grid-row:1;width:44px;height:44px}.chat-composer .chat-voice-panel{display:contents}.chat-composer .chat-voice-panel .voice-record{grid-column:2;grid-row:1;width:44px;height:44px;min-height:44px;padding:0;border-radius:50%;border:0;background:#e8eee2;color:#386749}.chat-composer .chat-voice-panel .voice-record.recording{background:#fae1d9;color:#aa4f3c}.chat-composer .chat-voice-panel .voice-record svg{width:20px;height:23px}.chat-composer .chat-voice-panel .voice-status{grid-column:1/-1;font-size:11px;margin:0;padding:0 6px 4px}.chat-composer .chat-voice-panel .voice-cancel{grid-column:1/-1;justify-self:start;width:auto;height:auto;padding:5px 8px;font-size:11px}.chat-options>summary:focus-visible{outline:3px solid #a8c982;outline-offset:2px}
