/* v112: owned app documents remove the theme's spacer/header structurally. */
body.linguataal-app-document{margin:0!important;padding:0!important;min-height:100dvh;background:var(--lai-bg,#f5f7fb)}
#linguataal-document-main{display:flow-root;margin:0;padding:0;max-width:none;width:100%;min-width:0}
/* Brand area is a full-width flat band, never a capsule or overlay on the image.
   The supplied navy lettering needs a light surface; artwork pixels stay original. */
body .linguaai-sidebar .sidebar-logo{box-sizing:border-box;align-self:stretch;background:#e8edf6!important;border-radius:0!important;box-shadow:none!important;padding:18px 12px!important;min-width:0}
body .linguaai-sidebar .sidebar-logo a{min-width:0;max-width:100%;flex:1;background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important}
body .linguaai-sidebar .sidebar-logo-img{display:block!important;max-width:100%!important;width:100%!important;height:auto!important;max-height:none!important;object-fit:contain;filter:none!important;mix-blend-mode:normal!important;background:transparent!important;border-radius:0!important;opacity:1!important}
body .linguaai-sidebar .sidebar-logo::before,body .linguaai-sidebar .sidebar-logo::after{content:none!important}
/* Seven days stay vertical; task and focus share one flexible column. */
.lai-profile-v2 .roadmap-day-card.lai-roadmap-day{grid-template-columns:minmax(0,1fr) auto!important;gap:7px 16px!important;padding:16px 18px!important;background:var(--lai-surface-solid,#fff)!important;align-items:start!important;border-inline-start:3px solid #8173d8!important}
.lai-profile-v2 .lai-roadmap-day-main{grid-column:1;grid-row:1}
.lai-profile-v2 .lai-roadmap-day-label{display:inline-block;margin-bottom:6px;padding:3px 8px;border-radius:6px;background:#eeebff;color:#504191;font-size:.75rem;font-weight:750}
.lai-profile-v2 .lai-roadmap-task-label{color:var(--lai-text-heading,#172033);overflow-wrap:anywhere}
.lai-profile-v2 .lai-roadmap-focus{grid-column:1;color:var(--lai-text-muted,#536078);line-height:1.55}
.lai-profile-v2 .lai-roadmap-actions{grid-column:2;grid-row:1 / span 2;align-self:center;flex-direction:column;gap:9px}
.lai-profile-v2 .lai-roadmap-minutes{color:var(--lai-text-muted,#536078)}
.lai-profile-v2 .lai-roadmap-start{padding:8px 13px;border:1px solid #d9d2f4;border-radius:9px;background:#f1edff;color:#4e3d94}
#linguaai-vocab-v2 .vocab-stats-bar{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:16px 0}
#linguaai-vocab-v2 .vocab-stats-bar .stat-item{min-width:0;padding:14px 10px;background:var(--lai-surface-solid,#fff);border:1px solid var(--lai-border,#e1e6ef);border-radius:14px;box-shadow:none;backdrop-filter:none}
#linguaai-vocab-v2 .vocab-stats-bar .stat-num{background:none;-webkit-text-fill-color:currentColor;color:var(--lai-text-heading,#172033);font-size:1.6rem;line-height:1.25;font-variant-numeric:tabular-nums}
#linguaai-vocab-v2 .vocab-stats-bar .stat-label{display:block;color:var(--lai-text-muted,#536078);font-size:.78rem;text-transform:none;letter-spacing:0;overflow-wrap:anywhere}
#linguaai-vocab-v2 #loading-text{margin:0;width:100%}
#linguaai-vocab-v2 .vocab-session-summary{box-sizing:border-box;max-width:540px;margin:0 auto;padding:28px 22px;text-align:center;border:1px solid var(--lai-border,#e1e6ef);border-radius:22px;background:var(--lai-surface-solid,#fff);color:var(--lai-text-heading,#172033)}
#linguaai-vocab-v2 .vocab-session-summary-icon{display:grid;place-items:center;margin:0 auto 14px;width:48px;height:48px;border-radius:50%;background:#e2f6ed;color:#176644;font-size:1.65rem}
#linguaai-vocab-v2 .vocab-session-summary h2{margin:0 0 10px;color:inherit;font-size:1.3rem;line-height:1.35}
#linguaai-vocab-v2 .vocab-session-summary p{margin:0 0 20px;color:var(--lai-text-muted,#536078);font-size:.95rem;line-height:1.6}
#linguaai-vocab-v2 .vocab-session-restart{min-height:44px;padding:11px 20px;background:#5b4bd8;color:#fff;border:0;border-radius:11px;font:inherit;font-weight:750;cursor:pointer;white-space:normal}
#linguaai-vocab-v2 .vocab-session-restart:focus-visible{outline:3px solid #a79cf1;outline-offset:3px}
@media(max-width:600px){
 #linguaai-vocab-v2 .vocab-stats-bar{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .lai-profile-v2 .roadmap-day-card.lai-roadmap-day{grid-template-columns:minmax(0,1fr)!important;padding:14px!important}
 .lai-profile-v2 .lai-roadmap-actions{grid-column:1;grid-row:auto;flex-direction:row;justify-content:space-between!important;width:100%}
}

/* v114 critical QA — one final owner for shell continuity and learner-facing contrast. */
html:has(body.linguataal-app-document),
html:has(body.linguataal-app-document).wp-toolbar{
 margin-top:0!important;padding-top:0!important;min-height:100%;background:#293149!important
}
body.linguataal-app-document,
body.linguataal-app-document.admin-bar{
 margin:0!important;padding:0!important;min-height:100dvh;background:#293149!important
}
body.linguataal-app-document #wpadminbar{display:none!important}
body.linguataal-app-document #linguataal-document-main{min-height:100dvh;background:#293149!important}
body.linguataal-app-document .linguaai-sidebar{top:0!important;height:100dvh!important}
body.linguataal-app-document .linguaai-topbar{top:15px!important}

/* Topbar status pills remain legible on every module, not only Dashboard. */
html[data-lai-theme="dark"] body.linguataal-app-document .linguaai-topbar .topbar-badge,
html[data-lai-theme="system"] body.linguataal-app-document .linguaai-topbar .topbar-badge{
 background:#fff!important;border-color:#e3e7ef!important;color:#263148!important;opacity:1!important;
 box-shadow:0 2px 8px rgba(11,18,35,.08)!important
}
html[data-lai-theme="dark"] body.linguataal-app-document .linguaai-topbar .topbar-badge :is(span,strong,small),
html[data-lai-theme="system"] body.linguataal-app-document .linguaai-topbar .topbar-badge :is(span,strong,small){color:#344054!important;opacity:1!important}

/* Grammar introduction: compact hierarchy instead of five disconnected white bars. */
#linguaai-grammar .linguaai-header{
 min-height:0!important;margin:0 0 10px!important;padding:17px 20px!important;border:1px solid #e1e5ee!important;
 border-radius:18px!important;background:linear-gradient(135deg,#fff 0%,#f7f5ff 100%)!important;
 box-shadow:0 9px 24px rgba(15,23,42,.05)!important
}
#linguaai-grammar .linguaai-header-content h1{margin:0 0 4px!important;font-size:clamp(1.22rem,2vw,1.48rem)!important;line-height:1.25!important}
#linguaai-grammar .linguaai-header-content p{margin:0!important;font-size:.86rem!important;line-height:1.45!important}
#linguaai-grammar .grammar-context-contract{margin:0 0 10px!important;padding:9px 13px!important;border-radius:12px!important;box-shadow:none!important}
#linguaai-grammar .grammar-level-selector{gap:9px!important;margin:0 0 10px!important}
#linguaai-grammar .grammar-level-selector .level-tab-btn{min-height:48px!important;border-radius:13px!important;box-shadow:0 3px 10px rgba(15,23,42,.035)!important}
#linguaai-grammar .grammar-cefr-guide{margin:0 0 16px!important;padding:12px 15px!important;border-inline-start:4px solid #7564dd!important;border-radius:13px!important;box-shadow:none!important}
#linguaai-grammar .grammar-cefr-guide>div>div:first-child{width:32px!important;height:32px!important;border-radius:9px!important;font-size:.72rem!important}

/* Stories/Dialogues headings sit on the dark shell; never inherit muted card text. */
html[data-lai-theme="dark"] :is(#linguaai-stories,#linguaai-dialogues) .progression-level-heading,
html[data-lai-theme="system"] :is(#linguaai-stories,#linguaai-dialogues) .progression-level-heading{
 color:#f8f9fc!important;border-bottom-color:#515b75!important;opacity:1!important
}
html[data-lai-theme="dark"] :is(#linguaai-stories,#linguaai-dialogues) .progression-level-heading :is(strong,span),
html[data-lai-theme="system"] :is(#linguaai-stories,#linguaai-dialogues) .progression-level-heading :is(strong,span){color:#f8f9fc!important;opacity:1!important}
html[data-lai-theme="dark"] :is(#linguaai-stories,#linguaai-dialogues) .progression-level-heading small,
html[data-lai-theme="system"] :is(#linguaai-stories,#linguaai-dialogues) .progression-level-heading small{color:#d5dbea!important;opacity:1!important}
html[data-lai-theme="dark"] :is(#linguaai-stories,#linguaai-dialogues) .progression-level-heading.is-locked,
html[data-lai-theme="system"] :is(#linguaai-stories,#linguaai-dialogues) .progression-level-heading.is-locked{opacity:.86!important}

/* Sentence Practice: clearer hierarchy and restrained motion, without mascot imagery. */
#linguaai-sentence-practice.lai-sentence-v2{max-width:980px!important;padding-top:26px!important}
#linguaai-sentence-practice .sp-duo-topbar{max-width:900px!important;padding:11px!important;border-color:#dce1eb!important;box-shadow:0 10px 28px rgba(15,23,42,.08)!important}
#linguaai-sentence-practice .sp-duo-stat{background:#f7f8fc!important;border-color:#dfe3ec!important;color:#4b556b!important}
#linguaai-sentence-practice .sp-duo-stat strong{color:#20283b!important;font-size:1.08rem!important}
#linguaai-sentence-practice .sp-duo-stat small{color:#596579!important;font-size:.76rem!important}
#linguaai-sentence-practice .sp-emma-guide-card{
 max-width:900px!important;grid-template-columns:minmax(0,1fr)!important;min-height:0!important;padding:19px 22px!important;
 background:linear-gradient(120deg,#fff 0%,#f1eeff 100%)!important;border-color:#cfc8f3!important;
 box-shadow:0 12px 30px rgba(57,44,130,.10)!important
}
#linguaai-sentence-practice .sp-emma-guide-visual{display:none!important;background-image:none!important}
#linguaai-sentence-practice .sp-emma-guide-card .sp-mascot-bubble{color:#2f3548!important;font-weight:680!important}
#linguaai-sentence-practice #sp-practice-box{border-color:#d7dce8!important;box-shadow:0 22px 55px rgba(18,25,45,.12)!important}
#linguaai-sentence-practice #sp-practice-box #sp-question-instruction{color:#596579!important;font-size:.84rem!important}
#linguaai-sentence-practice #sp-practice-box .sp-hint-help{color:#667085!important;font-size:.82rem!important}
#linguaai-sentence-practice #sp-practice-box .sp-answer-area{border-color:#bdc5d5!important;background:#fff!important}
/* Feedback must remain readable after dark/system theme inheritance. */
#linguaai-sentence-practice #sp-practice-box .sp-feedback-banner.wrong,
#linguaai-sentence-practice #sp-practice-box .sp-feedback-banner.wrong :is(.sp-feedback-text,#sp-feedback-title,#sp-feedback-sub){
 color:#7f1d1d!important;opacity:1!important;-webkit-text-fill-color:#7f1d1d!important
}
#linguaai-sentence-practice #sp-practice-box .sp-feedback-banner.wrong #sp-feedback-title{font-weight:850!important}
#linguaai-sentence-practice #sp-practice-box .sp-feedback-banner.wrong #sp-feedback-sub{color:#8f2d25!important;font-weight:650!important}
#linguaai-sentence-practice #sp-practice-box .sp-feedback-character{display:none;width:86px;height:86px;object-fit:contain;flex:0 0 86px;filter:drop-shadow(0 9px 12px rgba(73,49,164,.17))}
#linguaai-sentence-practice #sp-practice-box .sp-feedback-banner{position:relative;isolation:isolate}
#linguaai-sentence-practice #sp-practice-box .sp-feedback-banner.correct .sp-feedback-character-success{display:block;animation:spSuccessThumbsUp .82s cubic-bezier(.18,.86,.32,1.18) both,spSuccessSettle 1.5s ease-in-out .82s 1 both}
#linguaai-sentence-practice #sp-practice-box .sp-feedback-banner.wrong .sp-feedback-character-retry{display:block;animation:spTryAgainEnter .48s cubic-bezier(.2,.85,.3,1.2) both,spTryAgainBreathe 2.8s ease-in-out .48s infinite}
#linguaai-sentence-practice #sp-practice-box .sp-feedback-banner.correct .sp-feedback-icon,
#linguaai-sentence-practice #sp-practice-box .sp-feedback-banner.wrong .sp-feedback-icon{display:none!important}
@keyframes spSuccessThumbsUp{0%{opacity:0;transform:translateY(18px) scale(.72) rotate(-4deg)}48%{opacity:1;transform:translateY(-9px) scale(1.09) rotate(2.5deg)}72%{transform:translateY(2px) scale(.98) rotate(-1deg)}100%{opacity:1;transform:translateY(0) scale(1) rotate(0)}}
@keyframes spSuccessSettle{0%,100%{transform:translateY(0) scale(1)}45%{transform:translateY(-2px) scale(1.018)}}
#linguaai-sentence-practice #sp-practice-box .sp-success-burst{display:none;position:absolute;z-index:2;left:58px;top:48%;width:1px;height:1px;pointer-events:none}
#linguaai-sentence-practice #sp-practice-box .sp-feedback-banner.correct .sp-success-burst{display:block}
#linguaai-sentence-practice #sp-practice-box .sp-success-burst i{--dx:0px;--dy:-48px;--c:#6d5dfc;position:absolute;width:8px;height:8px;border-radius:3px;background:var(--c);opacity:0;transform:translate(-50%,-50%) scale(.2);animation:spSuccessParticle .78s cubic-bezier(.15,.72,.3,1) .2s both}
#linguaai-sentence-practice #sp-practice-box .sp-success-burst i:nth-child(1){--dx:-42px;--dy:-31px;--c:#7c3aed}
#linguaai-sentence-practice #sp-practice-box .sp-success-burst i:nth-child(2){--dx:-23px;--dy:-52px;--c:#2dd4bf;animation-delay:.25s}
#linguaai-sentence-practice #sp-practice-box .sp-success-burst i:nth-child(3){--dx:5px;--dy:-58px;--c:#fbbf24}
#linguaai-sentence-practice #sp-practice-box .sp-success-burst i:nth-child(4){--dx:34px;--dy:-43px;--c:#60a5fa;animation-delay:.28s}
#linguaai-sentence-practice #sp-practice-box .sp-success-burst i:nth-child(5){--dx:47px;--dy:-10px;--c:#f59e0b}
#linguaai-sentence-practice #sp-practice-box .sp-success-burst i:nth-child(6){--dx:-45px;--dy:8px;--c:#14b8a6;animation-delay:.3s}
#linguaai-sentence-practice #sp-practice-box .sp-success-burst i:nth-child(7){--dx:30px;--dy:18px;--c:#8b5cf6;animation-delay:.23s}
@keyframes spSuccessParticle{0%{opacity:0;transform:translate(-50%,-50%) scale(.2) rotate(0)}24%{opacity:1}100%{opacity:0;transform:translate(calc(-50% + var(--dx)),calc(-50% + var(--dy))) scale(1) rotate(150deg)}}
@keyframes spTryAgainEnter{0%{opacity:0;transform:translateY(12px) scale(.78) rotate(-4deg)}70%{opacity:1;transform:translateY(-3px) scale(1.04) rotate(1deg)}100%{opacity:1;transform:none}}
@keyframes spTryAgainBreathe{0%,100%{transform:translateY(0) scale(1)}50%{transform:translateY(-3px) scale(1.025)}}

/* v119: one approved Emma identity across feedback, Mentor and AI Chat. */
.lai-mentor-v2 .lai-mentor-emma-hero{position:relative!important;overflow:hidden!important;padding-right:245px!important;min-height:310px!important}
.lai-mentor-v2 .lai-emma-mentor-character{position:absolute;right:18px;bottom:0;width:225px;height:285px;object-fit:contain;object-position:center bottom;filter:drop-shadow(0 15px 22px rgba(41,35,79,.14));pointer-events:none}
.lai-emma-v2 .emma-stage .lai-emma-chat-character{position:absolute;z-index:1;bottom:0;left:50%;width:225px;height:255px;object-fit:contain;object-position:center bottom;transform:translateX(-50%);filter:drop-shadow(0 16px 22px rgba(12,18,40,.30));transition:transform .25s ease,filter .25s ease}
.lai-emma-v2 .emma-stage .lai-voice-orb{position:absolute!important;z-index:2!important;bottom:14px!important;right:18px!important;transform:scale(.72)!important;transform-origin:right bottom!important}
.lai-emma-v2 .emma-stage[data-state="listening"] .lai-emma-chat-character{animation:laiEmmaListenV119 2.2s ease-in-out infinite}
.lai-emma-v2 .emma-stage[data-state="thinking"] .lai-emma-chat-character{animation:laiEmmaThinkV119 2.4s ease-in-out infinite}
.lai-emma-v2 .emma-stage[data-state="speaking"] .lai-emma-chat-character{animation:laiEmmaSpeakV119 .85s ease-in-out infinite alternate;filter:drop-shadow(0 18px 26px rgba(62,73,180,.34))}
@keyframes laiEmmaListenV119{0%,100%{transform:translateX(-50%) translateY(0)}50%{transform:translateX(-50%) translateY(-3px)}}
@keyframes laiEmmaThinkV119{0%,100%{transform:translateX(-50%) rotate(0)}50%{transform:translateX(-50%) rotate(-1.2deg)}}
@keyframes laiEmmaSpeakV119{from{transform:translateX(-50%) translateY(0) scale(1)}to{transform:translateX(-50%) translateY(-2px) scale(1.012)}}
#linguaai-sentence-practice #sp-practice-box .sp-ai-explain-wrap .sp-static-explanation{
 color:#3f4757!important;opacity:1!important;-webkit-text-fill-color:#3f4757!important;font-weight:620!important;line-height:1.65!important
}
#linguaai-sentence-practice #sp-practice-box .sp-ai-explain-wrap .sp-ai-explanation-result{
 color:#283548!important;opacity:1!important;-webkit-text-fill-color:#283548!important
}
#linguaai-sentence-practice .sp-checkpoint-card,
#linguaai-sentence-practice .sp-activity-card{transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease!important}
#linguaai-sentence-practice .sp-activity-card:not(.status-locked):hover{transform:translateY(-2px)!important;border-color:#afa4ec!important;box-shadow:0 8px 19px rgba(61,49,136,.10)!important}

/* Verbs: preserve the flow, but restore hierarchy and contrast on mobile cards. */
.lai-module-verbs .lai-verbs-simple .lv-hero{
 position:relative!important;overflow:hidden!important;border-color:#d9d5f2!important;
 background:linear-gradient(145deg,#fff 0%,#f6f3ff 100%)!important;box-shadow:0 14px 34px rgba(38,32,91,.10)!important
}
.lai-module-verbs .lai-verbs-simple .lv-hero::before{
 content:"";position:absolute;inset:0 auto 0 0;width:5px;background:linear-gradient(180deg,#7457e8,#4f46e5)
}
.lai-module-verbs .lai-verbs-simple .lv-kicker{
 display:inline-flex!important;width:max-content;max-width:100%;margin:0 0 11px!important;padding:6px 9px!important;
 border:1px solid #dcd5ff!important;border-radius:999px!important;background:#f1edff!important;
 color:#5742c5!important;opacity:1!important;-webkit-text-fill-color:#5742c5!important;font-size:.72rem!important;line-height:1.2!important
}
.lai-module-verbs .lai-verbs-simple .lv-hero h1{color:#1d2435!important}
.lai-module-verbs .lai-verbs-simple .lv-hero p{color:#596579!important}
.lai-module-verbs .lai-verbs-simple .lv-overall{background:#222a42!important;box-shadow:0 9px 22px rgba(21,28,49,.18)!important}
.lai-module-verbs .lai-verbs-simple .lv-today-route{
 border-color:#dce1ec!important;background:linear-gradient(180deg,#fff 0%,#fbfcff 100%)!important;
 box-shadow:0 11px 28px rgba(15,23,42,.075)!important
}
.lai-module-verbs .lai-verbs-simple .lv-route-copy h2{color:#20283a!important}
.lai-module-verbs .lai-verbs-simple .lv-route-copy p{color:#556176!important}
.lai-module-verbs .lai-verbs-simple .lv-route-steps span{
 border-color:#dce2ed!important;background:#f7f8fc!important;color:#536078!important;box-shadow:0 2px 7px rgba(15,23,42,.035)!important
}
.lai-module-verbs .lai-verbs-simple .lv-route-steps span b{color:#28354c!important}

@media(max-width:860px){
 body.linguataal-app-document .linguaai-topbar{top:8px!important}
 #linguaai-grammar .linguaai-header{padding:15px 16px!important}
}
@media(max-width:600px){
 #linguaai-sentence-practice .sp-emma-guide-card{padding:16px!important}
 #linguaai-grammar .grammar-level-selector .level-tab-btn{min-height:46px!important}
 .lai-module-verbs .lai-verbs-simple .lv-hero{padding:25px 22px 23px!important}
 .lai-module-verbs .lai-verbs-simple .lv-today-route{padding:21px 18px!important;border-radius:20px!important}
 .lai-module-verbs .lai-verbs-simple .lv-route-steps{gap:9px!important}
 .lai-module-verbs .lai-verbs-simple .lv-route-steps span{min-height:44px!important;padding:9px 8px!important}
 #linguaai-sentence-practice #sp-practice-box .sp-feedback-banner.wrong{align-items:center!important;gap:13px!important}
 #linguaai-sentence-practice #sp-practice-box .sp-feedback-character{width:72px;height:72px;flex-basis:72px}
 .lai-mentor-v2 .lai-mentor-emma-hero{padding-right:18px!important;padding-bottom:205px!important}
 .lai-mentor-v2 .lai-emma-mentor-character{right:50%;transform:translateX(50%);width:185px;height:205px}
 .lai-emma-v2 .emma-stage .lai-emma-chat-character{width:205px;height:230px}
}
@media(prefers-reduced-motion:reduce){
 #linguaai-sentence-practice .sp-checkpoint-card,#linguaai-sentence-practice .sp-activity-card{transition:none!important}
 #linguaai-sentence-practice #sp-practice-box .sp-feedback-character{animation:none!important}
 #linguaai-sentence-practice #sp-practice-box .sp-success-burst i{animation:none!important;display:none!important}
 .lai-emma-v2 .emma-stage .lai-emma-chat-character{animation:none!important}
}

/* v122: front-facing, readable AI conversation stage. */
.lai-emma-v2 .chat-workspace-layout{grid-template-columns:minmax(330px,390px) minmax(0,1fr)!important;gap:24px!important}
.lai-emma-v2 .chat-workspace-left{max-width:390px!important}
.lai-emma-v2 .chat-workspace-left .avatar-card{padding:16px!important;border-radius:24px!important;border:1px solid #e1e5ee!important;background:linear-gradient(180deg,#fff 0%,#fbfbff 100%)!important;box-shadow:0 18px 44px rgba(28,35,62,.12)!important;overflow:hidden!important}
.lai-emma-v2 .lai-voice-only-stage{height:350px!important;min-height:350px!important;margin:0 0 12px!important;border:1px solid #dedaf1!important;border-radius:20px!important;overflow:hidden!important;background:radial-gradient(circle at 50% 30%,#463676 0%,#211a40 46%,#11152c 100%)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.12),0 12px 30px rgba(46,39,92,.16)!important}
.lai-emma-v2 .emma-stage .lai-emma-chat-character{display:block!important;position:absolute!important;z-index:1!important;left:50%!important;bottom:-7px!important;width:254px!important;height:360px!important;object-fit:contain!important;object-position:center bottom!important;transform:translateX(-50%)!important;filter:drop-shadow(0 18px 24px rgba(0,0,0,.24))!important;will-change:transform,filter!important}
.lai-emma-v2 .emma-stage[data-state="idle"] .lai-emma-chat-character{animation:laiEmmaFrontBreathe 4.2s ease-in-out infinite!important}
.lai-emma-v2 .emma-stage[data-state="listening"] .lai-emma-chat-character{animation:laiEmmaFrontListen 1.8s ease-in-out infinite!important}
.lai-emma-v2 .emma-stage[data-state="thinking"] .lai-emma-chat-character{animation:laiEmmaFrontThink 2.1s ease-in-out infinite!important}
.lai-emma-v2 .emma-stage[data-state="speaking"] .lai-emma-chat-character{animation:laiEmmaFrontSpeak .46s ease-in-out infinite alternate!important;filter:drop-shadow(0 18px 30px rgba(128,116,255,.38)) saturate(1.06)!important}
.lai-emma-v2 .lai-voice-orb{display:none!important}
.lai-emma-v2 .emma-stage-label{display:flex!important;z-index:5!important;left:14px!important;right:auto!important;top:14px!important;bottom:auto!important;width:auto!important;padding:7px 11px!important;border-radius:999px!important;flex-direction:row!important;align-items:center!important;gap:6px!important;background:rgba(14,18,39,.66)!important;border:1px solid rgba(255,255,255,.16)!important;backdrop-filter:blur(10px)!important;color:#fff!important;box-shadow:0 6px 16px rgba(0,0,0,.14)!important}
.lai-emma-v2 .emma-stage-label strong{color:#fff!important;font-size:.74rem!important}
.lai-emma-v2 .emma-stage-label span{color:#d7d4ee!important;font-size:.66rem!important}
.lai-emma-v2 .emma-audio-pulse{position:absolute!important;z-index:6!important;top:auto!important;right:auto!important;left:50%!important;bottom:14px!important;transform:translateX(-50%)!important;height:38px!important;min-width:112px!important;padding:7px 15px!important;display:flex!important;justify-content:center!important;gap:5px!important;border-radius:999px!important;background:rgba(15,20,44,.78)!important;border:1px solid rgba(255,255,255,.2)!important;backdrop-filter:blur(10px)!important;box-shadow:0 8px 20px rgba(0,0,0,.24)!important}
.lai-emma-v2 .emma-audio-pulse i{width:4px!important;min-height:7px!important;background:#a99cff!important;box-shadow:0 0 9px rgba(169,156,255,.5)!important}
.lai-emma-v2 .emma-stage[data-state="speaking"] .emma-audio-pulse{border-color:rgba(147,197,253,.7)!important;box-shadow:0 0 0 5px rgba(96,165,250,.11),0 10px 24px rgba(0,0,0,.26)!important}
.lai-emma-v2 .emma-stage[data-state="speaking"] .emma-audio-pulse i{background:#93c5fd!important;animation:laiEmmaVoiceBar .44s ease-in-out infinite alternate!important}
.lai-emma-v2 .emma-stage[data-state="speaking"] .emma-audio-pulse i:nth-child(2),.lai-emma-v2 .emma-stage[data-state="speaking"] .emma-audio-pulse i:nth-child(4){animation-delay:.12s!important}
.lai-emma-v2 .emma-stage[data-state="speaking"] .emma-audio-pulse i:nth-child(3){animation-delay:.22s!important}
.lai-emma-v2 .emma-speech-rings{display:none;position:absolute;z-index:4;left:66%;top:39%;width:10px;height:10px;pointer-events:none}
.lai-emma-v2 .emma-stage[data-state="speaking"] .emma-speech-rings{display:block}
.lai-emma-v2 .emma-speech-rings i{position:absolute;inset:0;border:2px solid rgba(147,197,253,.9);border-left-color:transparent;border-bottom-color:transparent;border-radius:50%;opacity:0;transform:rotate(45deg) scale(.35);animation:laiEmmaSpeechRing 1.25s ease-out infinite}
.lai-emma-v2 .emma-speech-rings i:nth-child(2){animation-delay:.35s}.lai-emma-v2 .emma-speech-rings i:nth-child(3){animation-delay:.7s}
.lai-emma-v2 #chat-avatar-status-overlay{min-height:44px!important;background:#f5f7ff!important;color:#343b55!important;border:1px solid #dfe3f2!important;border-radius:14px!important;box-shadow:none!important;font-size:.86rem!important}
.lai-emma-v2 #avatar-status-text{color:#343b55!important;font-weight:780!important}
.lai-emma-v2 .emma-stage[data-state="speaking"]~#chat-avatar-status-overlay{background:#eef5ff!important;border-color:#bfd7ff!important;box-shadow:0 8px 20px rgba(59,130,246,.1)!important}
@keyframes laiEmmaFrontBreathe{0%,100%{transform:translateX(-50%) translateY(0) scale(1)}50%{transform:translateX(-50%) translateY(-2px) scale(1.006)}}
@keyframes laiEmmaFrontListen{0%,100%{transform:translateX(-50%) translateY(0)}50%{transform:translateX(-50%) translateY(-4px)}}
@keyframes laiEmmaFrontThink{0%,100%{transform:translateX(-50%) rotate(0)}50%{transform:translateX(-50%) rotate(-.65deg)}}
@keyframes laiEmmaFrontSpeak{from{transform:translateX(-50%) translateY(0) scale(1)}to{transform:translateX(-50%) translateY(-3px) scale(1.012)}}
@keyframes laiEmmaVoiceBar{from{height:8px}to{height:28px}}
@keyframes laiEmmaSpeechRing{0%{opacity:.9;transform:rotate(45deg) scale(.35)}100%{opacity:0;transform:rotate(45deg) scale(3.4)}}
@media(max-width:900px){.lai-emma-v2 .chat-workspace-layout{grid-template-columns:1fr!important}.lai-emma-v2 .chat-workspace-left{max-width:100%!important}}
@media(max-width:600px){.lai-emma-v2 .lai-voice-only-stage{height:320px!important;min-height:320px!important}.lai-emma-v2 .emma-stage .lai-emma-chat-character{width:226px!important;height:326px!important}.lai-emma-v2 .emma-speech-rings{left:65%;top:40%}}
@media(max-width:360px){.lai-emma-v2 .lai-voice-only-stage{height:292px!important;min-height:292px!important}.lai-emma-v2 .emma-stage .lai-emma-chat-character{width:205px!important;height:300px!important}.lai-emma-v2 .emma-stage-label span{display:none!important}}
@media(prefers-reduced-motion:reduce){.lai-emma-v2 .emma-stage .lai-emma-chat-character,.lai-emma-v2 .emma-speech-rings i,.lai-emma-v2 .emma-audio-pulse i{animation:none!important}.lai-emma-v2 .emma-speech-rings{display:none!important}}

/* v123: Sentence Practice feedback quality, hierarchy and speaker alignment. */
#linguaai-sentence-practice #sp-practice-box .sp-feedback-banner.correct,
#linguaai-sentence-practice #sp-practice-box .sp-feedback-banner.wrong{display:flex;align-items:center!important;gap:20px!important;min-height:148px!important;padding:14px 20px!important}
#linguaai-sentence-practice #sp-practice-box .sp-feedback-character{width:124px!important;height:124px!important;flex:0 0 124px!important;object-fit:contain!important;object-position:center!important;image-rendering:auto!important;filter:drop-shadow(0 12px 18px rgba(68,49,142,.18))!important}
#linguaai-sentence-practice #sp-practice-box .sp-feedback-text{flex:1 1 auto!important;min-width:0!important;text-align:left!important;align-self:center!important}
[dir="rtl"] #linguaai-sentence-practice #sp-practice-box .sp-feedback-text{text-align:right!important}
#linguaai-sentence-practice #sp-practice-box #sp-feedback-title{color:#20283a!important;opacity:1!important;-webkit-text-fill-color:#20283a!important;font-size:1.08rem!important;line-height:1.3!important;font-weight:900!important}
#linguaai-sentence-practice #sp-practice-box #sp-feedback-sub{color:#3f495d!important;opacity:1!important;-webkit-text-fill-color:#3f495d!important;font-size:.96rem!important;line-height:1.55!important;font-weight:680!important}
#linguaai-sentence-practice #sp-practice-box .sp-feedback-banner.correct #sp-feedback-title{color:#145c45!important;-webkit-text-fill-color:#145c45!important}
#linguaai-sentence-practice #sp-practice-box .sp-feedback-banner.correct #sp-feedback-sub{color:#25634f!important;-webkit-text-fill-color:#25634f!important}
#linguaai-sentence-practice #sp-practice-box .sp-feedback-banner.wrong #sp-feedback-title{color:#7f1d1d!important;-webkit-text-fill-color:#7f1d1d!important}
#linguaai-sentence-practice #sp-practice-box .sp-feedback-banner.wrong #sp-feedback-sub{color:#87362f!important;-webkit-text-fill-color:#87362f!important}
#linguaai-sentence-practice #sp-practice-box .sp-feedback-banner:not(.correct):not(.wrong) :is(#sp-feedback-title,#sp-feedback-sub,.sp-feedback-text){color:#78350f!important;opacity:1!important;-webkit-text-fill-color:#78350f!important}
#linguaai-sentence-practice #sp-practice-box .sp-feedback-text .sp-ai-explain-wrap{width:100%!important;margin:12px 0 0!important;padding:12px 14px!important;border:1px solid rgba(127,29,29,.13)!important;border-radius:13px!important;background:rgba(255,255,255,.58)!important;box-shadow:none!important}
#linguaai-sentence-practice #sp-practice-box .sp-feedback-text .sp-static-explanation{margin:0 0 10px!important;color:#394357!important;opacity:1!important;-webkit-text-fill-color:#394357!important;font-size:.92rem!important;line-height:1.58!important;font-weight:680!important}
#linguaai-sentence-practice #sp-practice-box .sp-feedback-text .sp-ai-explanation-result{margin-top:10px!important;color:#253247!important;opacity:1!important;-webkit-text-fill-color:#253247!important;font-size:.92rem!important;line-height:1.58!important;font-weight:620!important}
#linguaai-sentence-practice #sp-practice-box .sp-hint-help,#linguaai-sentence-practice #sp-practice-box #sp-native-hint{color:#626b7e!important;opacity:1!important;-webkit-text-fill-color:#626b7e!important;font-weight:650!important}
#linguaai-sentence-practice #sp-practice-box .sp-audio-btn{position:relative!important;display:grid!important;place-items:center!important;padding:0!important;line-height:0!important;overflow:visible!important;border:1px solid #b8aef8!important;background:linear-gradient(145deg,#fff 5%,#eeeaff 100%)!important;color:#5845d6!important;box-shadow:0 7px 18px rgba(88,69,214,.18),inset 0 1px 0 #fff!important}
#linguaai-sentence-practice #sp-practice-box .sp-audio-btn svg{display:block!important;width:22px!important;height:22px!important;fill:currentColor!important;transform:translateX(1px)!important}
#linguaai-sentence-practice #sp-practice-box .sp-audio-btn:hover{color:#fff!important;background:linear-gradient(145deg,#7666eb,#5544ce)!important;border-color:#5544ce!important;box-shadow:0 9px 22px rgba(88,69,214,.28)!important}
#linguaai-sentence-practice #sp-practice-box .sp-audio-btn.is-playing{color:#fff!important;background:linear-gradient(145deg,#7666eb,#5544ce)!important;border-color:#5544ce!important;animation:spSpeakerLive 1.15s ease-out infinite!important}
@keyframes spSpeakerLive{0%{box-shadow:0 0 0 0 rgba(103,86,222,.34),0 7px 18px rgba(88,69,214,.2)}70%{box-shadow:0 0 0 9px rgba(103,86,222,0),0 9px 22px rgba(88,69,214,.25)}100%{box-shadow:0 0 0 0 rgba(103,86,222,0),0 7px 18px rgba(88,69,214,.2)}}
@media(max-width:600px){#linguaai-sentence-practice #sp-practice-box .sp-feedback-banner.correct,#linguaai-sentence-practice #sp-practice-box .sp-feedback-banner.wrong{gap:13px!important;min-height:124px!important;padding:12px!important}#linguaai-sentence-practice #sp-practice-box .sp-feedback-character{width:96px!important;height:96px!important;flex-basis:96px!important}#linguaai-sentence-practice #sp-practice-box #sp-feedback-title{font-size:1rem!important}#linguaai-sentence-practice #sp-practice-box #sp-feedback-sub{font-size:.88rem!important;line-height:1.48!important}}
@media(max-width:360px){#linguaai-sentence-practice #sp-practice-box .sp-feedback-banner.correct,#linguaai-sentence-practice #sp-practice-box .sp-feedback-banner.wrong{align-items:flex-start!important;gap:10px!important}#linguaai-sentence-practice #sp-practice-box .sp-feedback-character{width:82px!important;height:82px!important;flex-basis:82px!important}}
@media(prefers-reduced-motion:reduce){#linguaai-sentence-practice #sp-practice-box .sp-audio-btn.is-playing{animation:none!important}}
