/* LinguaMatrix public app shell — compact essentials + dual theme */
.linguaBrand{display:flex;align-items:center;gap:9px;color:inherit;text-decoration:none;min-width:0}.linguaBrand>img{width:34px;height:34px;border-radius:9px;flex:0 0 auto}.linguaBrand>span{min-width:0}.linguaBrand strong{display:block;font-size:17px;line-height:1.05}.linguaBrand small{display:block;color:var(--muted);font-size:11px;margin-top:4px;white-space:nowrap}.app{grid-template-rows:64px 54px minmax(0,1fr) 72px!important}.r3Quickbar{min-height:54px!important}.r3QuickbarInner{height:54px!important;padding:6px 14px!important;gap:8px!important;justify-content:flex-start}.rc1FeatureBtn{height:42px!important;min-height:42px!important;min-width:118px!important;padding:0 12px!important;font-size:13.5px!important}.rc1FeatureBtn#publicMoreBtn{min-width:96px!important}.topbar .iconBtn{flex:0 0 auto}.rc2HeaderTutorial{display:none!important}.controlRail{width:auto}.roleCard b,.intentCard b{font-size:15.5px!important}.roleCard small,.intentCard small{font-size:12px!important}.drawerGroup[data-public-hidden],.r1DrawerCore,.r2DrawerCore,.r3DrawerCore{display:none!important}
/* light theme overrides for hard-coded legacy surfaces */
html[data-theme="light"],html[data-theme="light"] body,body[data-theme="light"]{--bg:#f4f6fa;--panel:#fff;--panel2:#f3f5f8;--line:#d6dce7;--text:#1b2028;--muted:#687184;--soft:#313844;--yellow:#b17805;--green:#16864a;--teal:#177c7a;--violet:#6d58cf;--coral:#c7564a;background:#f4f6fa;color:#1b2028}.lightDummy{display:none}html[data-theme="light"] .topbar,html[data-theme="light"] .bottomDock,html[data-theme="light"] .r3Quickbar{background:#fff;border-color:#d6dce7}html[data-theme="light"] .iconBtn,html[data-theme="light"] .contextPill,html[data-theme="light"] .roleCard,html[data-theme="light"] .intentCard,html[data-theme="light"] .tuneButton,html[data-theme="light"] .levelBtn,html[data-theme="light"] .transformBtn,html[data-theme="light"] .microBtn,html[data-theme="light"] .drawer,html[data-theme="light"] .sheet,html[data-theme="light"] .choice,html[data-theme="light"] .infoCard,html[data-theme="light"] .r1LangChoice,html[data-theme="light"] .r1LearnCard,html[data-theme="light"] .r2Mode,html[data-theme="light"] .r2CoachCard,html[data-theme="light"] .r3Rewrite,html[data-theme="light"] .r3SpeechCard,html[data-theme="light"] .r3Setting,html[data-theme="light"] .rc1FeatureCard,html[data-theme="light"] .rc1Track,html[data-theme="light"] .rc2StatusCard{background:#fff!important;color:#1b2028!important;border-color:#d6dce7!important}html[data-theme="light"] .controlRail{background:#f7f8fb;border-color:#d6dce7}html[data-theme="light"] .stage{background:linear-gradient(160deg,#fff 0%,#f2f4f8 100%);border-color:#d6dce7}html[data-theme="light"] .roleCard.active,html[data-theme="light"] .intentCard.active,html[data-theme="light"] .choice.active,html[data-theme="light"] .rc2Pref.active{background:#fff8df!important;border-color:#c68b16!important}html[data-theme="light"] .drawerLink{color:#242a33}html[data-theme="light"] .drawerLink:hover{background:#eef1f6}html[data-theme="light"] .dockBtn{background:#fff;color:#697184}html[data-theme="light"] .dockBtn:hover,html[data-theme="light"] .dockBtn.active{background:#eef1f6;color:#1d2430}html[data-theme="light"] .hindiThought,html[data-theme="light"] .liveExpression,html[data-theme="light"] .choice b,html[data-theme="light"] .infoCard p{color:#202631!important}html[data-theme="light"] .kickerChip{background:#eef1f5;color:#4d5667;border-color:#d8dee8}html[data-theme="light"] .kickerChip.accent{background:#fff3c9;color:#6f5000;border-color:#e1bd5d}html[data-theme="light"] .bridgeTab{background:#fff;color:#5f6879;border-color:#d6dce7}html[data-theme="light"] .bridgeTab.active{background:#fff3c9;color:#2b313b;border-color:#c8921a}html[data-theme="light"] .notice{background:#fff;color:#1c222b;border-color:#d6dce7;box-shadow:0 10px 30px rgba(22,35,58,.14)}html[data-theme="light"] .sheetShade,html[data-theme="light"] .drawerShade{background:rgba(20,30,45,.28)}html[data-theme="light"] .visualCaption{background:rgba(255,255,255,.88);color:#1a2029;border-color:rgba(30,40,60,.14)}html[data-theme="light"] .visualCaption span{color:#596273}.publicMoreGrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.publicMoreCard{border:1px solid var(--line);background:#1b1f23;color:var(--text);border-radius:14px;padding:14px;text-align:left;min-height:92px}.publicMoreCard b{display:block;font-size:15px;margin-bottom:5px}.publicMoreCard span{display:block;color:var(--muted);font-size:13px;line-height:1.4}.publicMoreHint{margin-bottom:12px;color:var(--muted);font-size:13px;line-height:1.5}
@media(max-width:760px){.app{grid-template-rows:58px 50px minmax(0,1fr) 64px!important}.r3Quickbar{min-height:50px!important}.r3QuickbarInner{height:50px!important;padding:4px 8px!important;gap:6px!important}.rc1FeatureBtn{height:40px!important;min-height:40px!important;min-width:104px!important;font-size:12.5px!important;padding:0 9px!important}.linguaBrand small{display:none}.linguaBrand strong{font-size:16px}.linguaBrand>img{width:30px;height:30px}.topbar{gap:7px!important}.contextPill{display:none!important}.publicMoreGrid{grid-template-columns:1fr}.topbar .iconBtn{width:38px;height:38px}.topbar #favoriteBtn{display:none}}

/* Release hardening + entitlement-ready UI */
html,body{overscroll-behavior:none}.app button,.app a{touch-action:manipulation}.app :focus-visible{outline:3px solid #72a8ff;outline-offset:2px}.sheet{max-width:min(760px,calc(100vw - 24px))}.sheetBody{overscroll-behavior:contain}.premiumMark{display:inline-flex;align-items:center;border:1px solid #5f5198;border-radius:999px;padding:2px 6px;font-size:9px!important;letter-spacing:.06em;color:#d4c8ff!important;margin-left:6px;vertical-align:middle}.premiumGate{display:grid;gap:14px}.premiumGateHero{border:1px solid #554a83;background:linear-gradient(135deg,#211d33,#171a22);border-radius:18px;padding:18px}.premiumGateHero h3{font-size:21px;margin:4px 0 7px}.premiumGateHero p{font-size:14px;line-height:1.55;color:#c9cbd2;margin:0}.premiumGateList{display:grid;grid-template-columns:1fr 1fr;gap:8px}.premiumGateItem{border:1px solid var(--line);background:#191d21;border-radius:12px;padding:11px;font-size:13px}.premiumGateActions{display:flex;gap:8px;flex-wrap:wrap}.premiumGateActions a,.premiumGateActions button{min-height:42px;border-radius:11px;padding:0 14px;border:1px solid #3a4149;background:#1b2025;color:#fff;display:inline-flex;align-items:center;text-decoration:none;font-weight:750}.premiumGateActions .primary{background:#735bd7;border-color:#8a72eb}.r2Mode[data-premium-feature]:not([data-plan-allowed="true"])::after,.publicMoreCard[data-premium-feature]:not([data-plan-allowed="true"])::after{content:'PREMIUM';font-size:9px;letter-spacing:.05em;color:#d6caff;border:1px solid #5c4d91;border-radius:999px;padding:2px 6px;position:absolute;right:9px;top:9px}.r2Mode[data-premium-feature],.publicMoreCard[data-premium-feature]{position:relative}.planHint{font-size:11px;color:var(--muted);margin-left:auto;white-space:nowrap}@media(max-width:760px){.premiumGateList{grid-template-columns:1fr}.sheet{max-width:calc(100vw - 12px)}.r3QuickbarInner{padding-left:max(8px,env(safe-area-inset-left))!important;padding-right:max(8px,env(safe-area-inset-right))!important}.bottomDock{padding-bottom:env(safe-area-inset-bottom)}.planHint{display:none}}@media(prefers-reduced-motion:reduce){.app *{animation-duration:.01ms!important;transition-duration:.01ms!important}}


/* RC4.1 — scroll safety + premium visibility */
.expressionPane{
  overflow-y:auto!important;
  overflow-x:hidden!important;
  justify-content:flex-start!important;
  scrollbar-gutter:stable;
  overscroll-behavior:contain;
  padding-bottom:max(34px,clamp(22px,3vw,44px))!important;
  scrollbar-width:thin;
  scrollbar-color:#4d5660 transparent;
}
.expressionPane::-webkit-scrollbar{width:9px}
.expressionPane::-webkit-scrollbar-track{background:transparent}
.expressionPane::-webkit-scrollbar-thumb{background:#4d5660;border-radius:999px;border:2px solid transparent;background-clip:padding-box}
.expressionPane::-webkit-scrollbar-thumb:hover{background:#69737e;background-clip:padding-box}
.compareBox{flex:0 0 auto;margin-bottom:10px}
.stageWrap,.stage{min-height:0}
.lmPlanStatus{margin-left:auto;display:inline-flex;align-items:center;gap:7px;min-height:36px;border:1px solid #4d436f;border-radius:999px;padding:0 11px;color:#ded5ff;background:#1c1928;text-decoration:none;font-size:11.5px;font-weight:800;white-space:nowrap}
.lmPlanStatus strong{font-size:10px;letter-spacing:.07em}.lmPlanStatus span{color:#b8abc9;font-weight:650}.lmPlanStatus.premium{border-color:#5a705e;background:#17221b;color:#c8f0d3}.lmPlanStatus.premium span{color:#9fc2a8}
.lmLockBadge{display:inline-flex;align-items:center;gap:4px;margin-left:6px;border:1px solid #5b4f8d;border-radius:999px;padding:2px 6px;font-size:10px!important;line-height:1.2;letter-spacing:.04em;color:#dbd2ff!important;background:#211d30;vertical-align:middle;white-space:nowrap}
.lmLockedFeature{border-color:#4d436d!important;background:linear-gradient(145deg,#1b1d22,#1c1927)!important}
.lmLockedFeature::before{content:'🔒';position:absolute;right:10px;bottom:9px;font-size:12px;opacity:.9}
.levelBtn[data-premium-feature]:not([data-plan-allowed="true"]){position:relative;padding-right:28px!important;border-color:#51476e!important}
.levelBtn[data-premium-feature]:not([data-plan-allowed="true"])::after{content:'🔒';position:absolute;right:8px;top:50%;transform:translateY(-50%);font-size:11px}
.enrichChoice[data-premium-feature]:not([data-plan-allowed="true"]){position:relative;padding-right:82px!important;border-color:#51476e!important}
.enrichChoice[data-premium-feature]:not([data-plan-allowed="true"])::after{content:'PREMIUM';position:absolute;right:10px;top:10px;border:1px solid #5d5191;border-radius:999px;padding:3px 6px;font-size:10px;letter-spacing:.04em;color:#d9d0ff;background:#211d30}
.drawerLink[data-premium-feature]:not([data-plan-allowed="true"]){position:relative;padding-right:78px!important;border:1px solid #453d61!important}
.drawerLink[data-premium-feature]:not([data-plan-allowed="true"])::after{content:'🔒 PREMIUM';position:absolute;right:8px;top:50%;transform:translateY(-50%);font-size:9.5px;color:#d8ceff}
.rc1FeatureBtn[data-premium-feature]:not([data-plan-allowed="true"]){border-color:#51476e!important}
.rc1FeatureBtn[data-premium-feature]:not([data-plan-allowed="true"])::after{content:'🔒';font-size:11px;margin-left:1px}
.r2Mode[data-premium-feature]:not([data-plan-allowed="true"]){padding-right:88px!important;opacity:1!important;border-color:#51476e!important}
.r2Mode[data-premium-feature]:not([data-plan-allowed="true"])::after,.publicMoreCard[data-premium-feature]:not([data-plan-allowed="true"])::after{font-size:10px!important;padding:3px 7px!important}
html[data-theme="light"] .lmPlanStatus{background:#f3efff;color:#514092;border-color:#b9abe6}html[data-theme="light"] .lmPlanStatus span{color:#746b89}
html[data-theme="light"] .lmLockedFeature{background:#faf8ff!important;border-color:#c9bee9!important}
html[data-theme="light"] .lmLockBadge,html[data-theme="light"] .enrichChoice[data-premium-feature]:not([data-plan-allowed="true"])::after{background:#f1ecff;color:#5d4b9e!important;border-color:#b9abe6}
@media(max-width:1000px){.lmPlanStatus span{display:none}.lmPlanStatus{padding:0 9px}}
@media(max-width:760px){
  .expressionPane{overflow-y:auto!important;padding-bottom:32px!important;scrollbar-gutter:auto}
  .expressionPane::-webkit-scrollbar{width:6px}
  .lmPlanStatus{min-height:34px;font-size:10px;margin-left:2px}
  .lmPlanStatus strong{font-size:9px}
}

/* v1.2 one-time Fluency+ Preview */
.lmPlanStatus.preview{border-color:#8b74de;background:#211b36;color:#eadfff}.lmPlanStatus.preview span{color:#c8baff;font-variant-numeric:tabular-nums}.premiumMark.preview{border-color:#8b74de;background:#2a2147;color:#efe8ff!important}.premiumFine{font-size:12px!important;color:#aaa5bd!important;margin-top:9px!important}.premiumGateActions button.primary{background:#735bd7;border-color:#8a72eb;color:#fff}
html[data-theme="light"] .lmPlanStatus.preview{background:#eee8ff;color:#533f9b;border-color:#a893e6}html[data-theme="light"] .lmPlanStatus.preview span{color:#6b599c}
