.lesson-action-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:7px;
    padding-top:2px;
}
.lesson-action-grid.is-single{grid-template-columns:1fr;}
.lesson-action-grid .lesson-practice-cta{
    min-width:0;
    min-height:40px;
    padding:0 8px;
    gap:5px;
    font-size:.73rem;
}
.lesson-action-grid .lesson-practice-cta .cta-kicker{font-size:.58rem;white-space:nowrap;}
.lesson-action-grid .lesson-practice-cta .cta-title{gap:4px;white-space:nowrap;}
.lesson-speaking-cta{
    min-width:0;
    min-height:40px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:6px;
    padding:0 8px;
    border:1px solid rgba(255,255,255,.16);
    border-radius:14px;
    background:linear-gradient(135deg,#243b6b 0%,#31578b 58%,#0f8f74 100%);
    color:#fff;
    font:950 .72rem/1.25 inherit;
    cursor:pointer;
    box-shadow:0 12px 24px rgba(36,59,107,.20), inset 0 1px 0 rgba(255,255,255,.13);
    transition:transform .18s ease,box-shadow .18s ease,filter .18s ease;
    -webkit-tap-highlight-color:transparent;
}
.lesson-speaking-cta:hover{filter:brightness(1.03);box-shadow:0 14px 27px rgba(36,59,107,.24), inset 0 1px 0 rgba(255,255,255,.15);}
.lesson-speaking-cta:active{transform:translateY(1px);}
.lesson-speaking-cta:focus-visible{outline:3px solid rgba(49,87,139,.22);outline-offset:2px;}
.lesson-speaking-cta-icon{
    width:25px;height:25px;min-width:25px;border-radius:9px;
    display:grid;place-items:center;
    background:rgba(255,255,255,.15);color:#fff;font-size:.78rem;
    border:1px solid rgba(255,255,255,.16);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.13);
}

.transcript-segment{position:relative;padding-right:40px;}
.lesson-segment-controls{
    position:absolute;
    top:7px;
    right:7px;
    display:flex;
    flex-direction:row;
    align-items:center;
    justify-content:flex-end;
    gap:3px;
    direction:ltr;
    z-index:2;
}
.lesson-segment-play,.lesson-segment-mic{
    width:25px;height:25px;min-width:25px;
    padding:0;
    border:1px solid rgba(15,143,116,.16);
    border-radius:9px;
    background:rgba(248,252,251,.98);
    color:#0f8f74;
    font:900 .68rem/1 inherit;
    place-items:center;
    cursor:pointer;
    box-shadow:0 4px 10px rgba(15,143,116,.07);
    -webkit-tap-highlight-color:transparent;
}
.lesson-segment-play{display:grid;font-size:.61rem;}
.lesson-segment-mic{display:none;}
.lesson-speaking-repeat-mode .lesson-segment-mic{display:grid;}
.lesson-speaking-repeat-mode .transcript-segment{padding-right:68px;}
.lesson-speaking-repeat-mode .transcript-en{font-size:.87rem;line-height:1.56;}
.lesson-speaking-repeat-mode .transcript-fa{font-size:.76rem;line-height:1.62;}
.lesson-segment-play:hover,.lesson-segment-play:focus-visible,.lesson-segment-mic:focus-visible{outline:3px solid rgba(15,143,116,.15);outline-offset:2px;}
.lesson-segment-play.is-playing{background:#0f8f74;color:#fff;border-color:#0f8f74;box-shadow:0 5px 12px rgba(15,143,116,.15);}
.lesson-segment-play[disabled]{opacity:.42;cursor:not-allowed;box-shadow:none;}
.lesson-segment-mic.is-busy{opacity:.58;cursor:wait;}
.lesson-segment-mic.is-listening{background:#0f8f74;color:#fff;}

/* Shadowing is intentionally a visually distinct lesson mode. */
.lesson-panel--text{grid-template-rows:auto minmax(0,1fr) auto auto;}
.lesson-shadow-status{
    position:sticky;top:3px;z-index:9;
    width:min(96%,446px);
    margin:0 auto 5px;
    min-height:48px;
    padding:8px 10px;
    display:grid;grid-template-columns:10px minmax(0,1fr) auto;gap:10px;align-items:center;
    border:1px solid rgba(151,166,239,.38);border-radius:16px;
    background:linear-gradient(135deg,rgba(34,51,103,.98) 0%,rgba(60,76,151,.98) 58%,rgba(72,86,162,.98) 100%);
    box-shadow:0 14px 28px rgba(38,52,113,.23),inset 0 1px 0 rgba(255,255,255,.12);
    backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);
    direction:rtl;text-align:right;
}
.lesson-shadow-status[hidden]{display:none!important;}
.lesson-shadow-status-pulse,.lesson-shadow-summary-pulse{
    width:9px;height:9px;border-radius:999px;background:#9eafff;
    box-shadow:0 0 0 0 rgba(158,175,255,.34);
    animation:lessonShadowPulse 2.7s ease-in-out infinite;
}
.lesson-shadow-status-copy,.lesson-shadow-summary-copy{display:grid;gap:1px;min-width:0;align-self:center;}
.lesson-shadow-status-copy strong{font-size:.67rem;color:#fff;font-weight:950;line-height:1.45;}
.lesson-shadow-status-copy small{font-size:.61rem;color:rgba(238,242,255,.84);font-weight:760;line-height:1.55;transition:opacity .24s ease,transform .24s ease;}
.lesson-shadow-status-copy small.is-changing{opacity:.10;transform:translateY(2px);}
.lesson-shadow-rate-picker{position:relative;display:grid;align-items:center;justify-items:end;}
.lesson-shadow-status-rate{
    min-width:55px;height:32px;padding:0 9px;border-radius:10px;
    border:1px solid rgba(255,255,255,.26);background:rgba(255,255,255,.96);
    display:flex;align-items:center;justify-content:center;gap:5px;
    color:#35447f;font:950 .62rem/1 inherit;cursor:pointer;
    box-shadow:0 5px 12px rgba(18,27,70,.16);-webkit-tap-highlight-color:transparent;
}
.lesson-shadow-status-rate:focus-visible{outline:3px solid rgba(203,213,255,.38);outline-offset:2px;}
.lesson-shadow-status-rate-chevron{font-size:.66rem;line-height:1;transition:transform .16s ease;transform:translateY(-1px);}
.lesson-shadow-status-rate[aria-expanded="true"] .lesson-shadow-status-rate-chevron{transform:rotate(180deg) translateY(1px);}
.lesson-shadow-rate-menu{
    position:absolute;z-index:15;top:calc(100% + 6px);left:0;
    width:148px;padding:6px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;
    border:1px solid rgba(72,86,162,.20);border-radius:13px;background:rgba(255,255,255,.99);
    box-shadow:0 16px 34px rgba(28,39,91,.24);direction:ltr;
}
.lesson-shadow-rate-menu[hidden]{display:none!important;}
.lesson-shadow-rate-menu button{
    min-height:31px;border:1px solid #e3e7f3;border-radius:9px;background:#f8f9fe;color:#46527b;
    font:900 .59rem/1 inherit;cursor:pointer;
}
.lesson-shadow-rate-menu button.is-active{border-color:#5e70ce;background:#5366c2;color:#fff;box-shadow:0 5px 10px rgba(67,84,153,.18);}
.lesson-shadow-status.is-paused .lesson-shadow-status-pulse{animation:none;background:#c5ccdf;box-shadow:none;}
.lesson-shadow-status.is-paused{border-color:rgba(132,145,186,.34);background:linear-gradient(135deg,rgba(61,72,105,.97),rgba(80,91,126,.97));box-shadow:0 10px 22px rgba(15,23,42,.14);}

.lesson-speaking-shadow-mode .transcript-segment{
    border-color:rgba(210,139,57,.22);
    background:linear-gradient(135deg,#fff7e9 0%,#fffbf3 72%,#fff 100%);
    box-shadow:0 8px 18px rgba(166,101,30,.055);
}
.lesson-speaking-shadow-mode .transcript-segment .transcript-speaker{color:#a26a2b;}
.lesson-speaking-shadow-mode .transcript-segment .transcript-en{color:#553a22;}
.lesson-speaking-shadow-mode .transcript-segment .transcript-fa{color:#876a4b;}
.lesson-speaking-shadow-mode .transcript-segment.is-active{
    border-color:rgba(214,133,38,.62);
    background:linear-gradient(135deg,#ffe7bd 0%,#fff2d9 56%,#fffaf1 100%);
    box-shadow:0 14px 27px rgba(177,103,25,.18),inset 0 0 0 1px rgba(230,151,53,.13);
}
.lesson-speaking-shadow-mode .transcript-segment.is-active .transcript-en{color:#7c4616;font-weight:950;}
.lesson-speaking-shadow-mode .transcript-segment.is-active .transcript-fa{color:#9a5d24;font-weight:800;}

.lesson-shadow-summary{
    width:100%;display:grid;grid-template-columns:9px minmax(0,1fr) auto;gap:8px;align-items:center;
    padding:8px 10px;border:1px solid rgba(79,99,181,.18);border-radius:14px;
    background:linear-gradient(135deg,#eef3ff,#fbfcff);
    direction:rtl;text-align:right;box-shadow:0 8px 18px rgba(67,84,153,.07);
}
.lesson-shadow-summary-copy strong{font-size:.67rem;color:#3e4e9b;font-weight:950;line-height:1.5;}
.lesson-shadow-summary-copy small{font-size:.60rem;color:#718094;font-weight:760;line-height:1.55;}
.lesson-shadow-summary-rate{min-width:38px;height:27px;padding:0 7px;border-radius:9px;background:#fff;border:1px solid rgba(79,99,181,.16);display:flex;align-items:center;justify-content:center;color:#44527f;font-size:.61rem;font-weight:950;line-height:1;}

@keyframes lessonShadowPulse{
    0%,100%{box-shadow:0 0 0 0 rgba(97,117,212,.22);opacity:.78;}
    50%{box-shadow:0 0 0 6px rgba(97,117,212,0);opacity:1;}
}

.lesson-speaking-studio{
    position:fixed;inset:0;z-index:1200;
    display:grid;place-items:end center;
    padding:16px 12px calc(16px + env(safe-area-inset-bottom,0px));
    background:rgba(15,23,42,.28);
    backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);
}
.lesson-speaking-studio[hidden]{display:none!important;}
.lesson-speaking-sheet{
    width:min(520px,100%);
    max-height:min(82dvh,720px);
    overflow:auto;
    overscroll-behavior:contain;
    border:1px solid rgba(15,143,116,.12);
    border-radius:25px;
    background:#fff;
    box-shadow:0 24px 64px rgba(15,23,42,.22);
    padding:15px;
    animation:lessonSpeakingIn .18s ease-out both;
}
.lesson-speaking-sheet-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px;}
.lesson-speaking-sheet-title{display:grid;gap:2px;min-width:0;}
.lesson-speaking-sheet-title strong{font-size:.98rem;color:#18243a;font-weight:950;line-height:1.5;}
.lesson-speaking-sheet-title span{font-size:.68rem;color:#768296;font-weight:750;line-height:1.7;}
.lesson-speaking-close{
    width:34px;height:34px;min-width:34px;border:0;border-radius:11px;
    background:#f2f5f7;color:#607086;font:900 1rem/1 inherit;cursor:pointer;
}
.lesson-speaking-panel[hidden]{display:none!important;}
.lesson-speaking-mode-list{display:grid;gap:8px;}
.lesson-speaking-mode{
    width:100%;min-height:66px;
    display:grid;grid-template-columns:39px minmax(0,1fr) auto;align-items:center;gap:10px;
    padding:9px 10px;border:1px solid #e5ebef;border-radius:17px;background:#fff;
    color:#18243a;text-align:right;font-family:inherit;cursor:pointer;
    -webkit-tap-highlight-color:transparent;
}
.lesson-speaking-mode:hover,.lesson-speaking-mode:focus-visible{border-color:rgba(15,143,116,.28);background:#f8fcfb;}
.lesson-speaking-mode[disabled]{opacity:.58;cursor:not-allowed;background:#f8fafb;}
.lesson-speaking-mode-icon{width:39px;height:39px;border-radius:13px;display:grid;place-items:center;background:#eff9f6;color:#0f8f74;font-size:.96rem;}
.lesson-speaking-mode-copy{display:grid;gap:2px;min-width:0;}
.lesson-speaking-mode-copy strong{font-size:.79rem;font-weight:950;line-height:1.45;}
.lesson-speaking-mode-copy span{font-size:.65rem;color:#748195;font-weight:720;line-height:1.65;}
.lesson-speaking-mode-arrow{color:#a0aaba;font-size:1rem;}

.lesson-speaking-setup{display:grid;gap:11px;}
.lesson-speaking-technique-head{
    display:grid;grid-template-columns:40px minmax(0,1fr) auto;gap:9px;align-items:start;
    padding:11px;border-radius:17px;background:linear-gradient(135deg,#eef9f6,#fbfefd);
    border:1px solid rgba(15,143,116,.10);
}
.lesson-speaking-technique-icon{width:40px;height:40px;border-radius:13px;display:grid;place-items:center;background:#fff;color:#0f8f74;font-size:.96rem;box-shadow:0 6px 14px rgba(15,143,116,.08);}
.lesson-speaking-technique-head>div{min-width:0;display:grid;gap:2px;}
.lesson-speaking-technique-head strong{color:#0f7967;font-size:.84rem;font-weight:950;line-height:1.55;}
.lesson-speaking-technique-head p{margin:0;color:#637083;font-size:.69rem;font-weight:730;line-height:1.82;}
.lesson-speaking-help{
    min-height:28px;padding:0 8px;border:1px solid rgba(15,143,116,.15);border-radius:10px;
    background:rgba(255,255,255,.88);color:#0f8f74;font:900 .60rem/1 inherit;cursor:pointer;white-space:nowrap;
}
.lesson-speaking-focus{
    display:grid;grid-template-columns:29px minmax(0,1fr);gap:8px;align-items:center;
    padding:9px 10px;border-radius:13px;background:#f8fafb;border:1px solid #edf1f3;
}
.lesson-speaking-focus>span{width:29px;height:29px;border-radius:10px;display:grid;place-items:center;background:#eaf7f3;color:#0f8f74;font-weight:950;}
.lesson-speaking-focus>div{display:grid;gap:1px;}
.lesson-speaking-focus strong{font-size:.69rem;color:#3d4c61;font-weight:900;line-height:1.6;}
.lesson-speaking-focus small{font-size:.62rem;color:#7a8798;font-weight:700;line-height:1.65;}
.lesson-speaking-field{display:grid;gap:7px;}
.lesson-speaking-field-label{display:flex;align-items:center;justify-content:space-between;gap:8px;}
.lesson-speaking-field-label strong{font-size:.68rem;color:#425166;font-weight:900;}
.lesson-speaking-field-label span{font-size:.59rem;color:#8a95a4;font-weight:700;}
.lesson-speaking-speed-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;}
.lesson-speaking-speed{
    min-width:0;height:35px;border-radius:11px;border:1px solid #e2e8ec;background:#fff;color:#536276;font:900 .68rem/1 inherit;cursor:pointer;
}
.lesson-speaking-speed.is-active{border-color:rgba(15,143,116,.30);background:#eaf7f3;color:#0f7967;box-shadow:inset 0 0 0 1px rgba(15,143,116,.05);}
.lesson-speaking-repeat-preview{
    position:relative;display:grid;grid-template-columns:32px minmax(0,1fr);gap:9px;align-items:center;
    padding:10px;border:1px solid #e7ecef;border-radius:14px;background:#fbfcfd;direction:ltr;text-align:left;
}
.lesson-speaking-repeat-preview-mic{width:32px;height:32px;border-radius:10px;display:grid;place-items:center;background:#eaf7f3;color:#0f8f74;font-size:.80rem;}
.lesson-speaking-repeat-preview>div{display:grid;gap:3px;min-width:0;}
.lesson-speaking-repeat-preview strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#24344e;font-size:.72rem;font-weight:850;line-height:1.5;}
.lesson-speaking-repeat-preview small{direction:rtl;text-align:right;color:#7d8999;font-size:.60rem;font-weight:700;line-height:1.6;}
.lesson-speaking-actions{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;margin-top:1px;}
.lesson-speaking-primary,.lesson-speaking-secondary{
    min-height:42px;border-radius:13px;font:900 .72rem/1 inherit;cursor:pointer;padding:0 13px;
}
.lesson-speaking-primary{border:0;background:linear-gradient(135deg,#0f8f74,#18b69a);color:#fff;box-shadow:0 9px 18px rgba(15,143,116,.15);}
.lesson-speaking-primary[disabled]{opacity:.52;cursor:not-allowed;box-shadow:none;}
.lesson-speaking-secondary{border:1px solid #e3e8ed;background:#f8fafb;color:#5b697d;}

.lesson-speaking-role-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
.lesson-speaking-role{
    min-height:58px;border:1px solid #e3e9ed;border-radius:15px;background:#fff;color:#24344e;font-family:inherit;cursor:pointer;padding:9px;display:grid;gap:3px;text-align:center;
}
.lesson-speaking-role strong{font-size:.78rem;font-weight:950;direction:ltr;}
.lesson-speaking-role span{font-size:.60rem;color:#8290a2;font-weight:760;}
.lesson-speaking-role.is-active{border-color:rgba(15,143,116,.32);background:#eff9f6;color:#0f7967;box-shadow:inset 0 0 0 1px rgba(15,143,116,.05);}

/* Active conversation toolbox: deliberately distinct from both role colors. */
.lesson-role-status{
    position:relative;z-index:10;
    width:100%;margin:2px 0 1px;min-height:68px;padding:10px 11px;
    display:grid;grid-template-columns:10px minmax(0,1fr) auto;gap:10px;align-items:center;
    border:1px solid rgba(145,158,226,.34);border-radius:17px;
    background:linear-gradient(135deg,#202f5f 0%,#314681 56%,#465aa5 100%);
    box-shadow:0 14px 28px rgba(30,45,99,.22),inset 0 1px 0 rgba(255,255,255,.11);
    direction:rtl;text-align:right;overflow:visible;
}
.lesson-role-status[hidden]{display:none!important;}
.lesson-role-status-dot{width:9px;height:9px;border-radius:999px;background:#aebaff;box-shadow:0 0 0 5px rgba(174,186,255,.12);}
.lesson-role-status-copy{min-width:0;display:grid;gap:2px;align-content:center;}
.lesson-role-status-copy strong{font-size:.75rem;font-weight:950;color:#fff;line-height:1.45;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.lesson-role-status-copy small{font-size:.63rem;font-weight:760;color:rgba(240,243,255,.82);line-height:1.55;white-space:normal;}
.lesson-role-status-actions{display:flex;align-items:center;justify-content:flex-end;gap:6px;direction:rtl;}
.lesson-role-status-count{min-width:40px;height:30px;padding:0 7px;border-radius:10px;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.17);display:grid;place-items:center;color:#fff;font-size:.58rem;font-weight:950;}
.lesson-role-status-next,.lesson-role-status-close{height:32px;border-radius:10px;font-family:inherit;font-weight:950;cursor:pointer;-webkit-tap-highlight-color:transparent;}
.lesson-role-status-next{min-width:60px;padding:0 12px;border:0;background:#fff;color:#324783;font-size:.62rem;box-shadow:0 6px 14px rgba(15,23,42,.16);}
.lesson-role-status-next:active{transform:translateY(1px);}
.lesson-role-status-close{width:32px;padding:0;border:1px solid rgba(255,255,255,.18);background:rgba(255,255,255,.10);color:#eef1ff;font-size:.92rem;line-height:1;}
.lesson-role-status-next[hidden]{display:none!important;}
.lesson-role-status.is-peer-turn{border-color:rgba(167,178,235,.36);background:linear-gradient(135deg,#232f59 0%,#35487f 58%,#4b5da0 100%);box-shadow:0 14px 28px rgba(30,45,99,.22),inset 0 1px 0 rgba(255,255,255,.11);}
.lesson-role-status.is-peer-turn .lesson-role-status-dot{background:#c9b8ff;box-shadow:0 0 0 5px rgba(201,184,255,.12);}
.lesson-role-status.is-peer-turn .lesson-role-status-copy strong{color:#fff;}
.lesson-role-status.is-peer-turn .lesson-role-status-count{border-color:rgba(255,255,255,.17);}
.lesson-role-status.is-complete{border-color:rgba(141,160,236,.34);background:linear-gradient(135deg,#253466,#3d5296 58%,#5669b8 100%);box-shadow:0 14px 28px rgba(30,45,99,.22);}
.lesson-role-status.is-complete .lesson-role-status-dot{background:#b8c4ff;box-shadow:0 0 0 5px rgba(184,196,255,.12);}
.lesson-role-status.is-complete .lesson-role-status-copy strong{color:#fff;}
.lesson-role-status.is-complete .lesson-role-status-next{background:#fff;color:#3d5296;}

.lesson-speaking-roleplay-mode .transcript-segment.is-role-user{
    border-color:rgba(15,143,116,.20);
    background:linear-gradient(135deg,#eff9f6 0%,#fbfefd 72%,#fff 100%);
}
.lesson-speaking-roleplay-mode .transcript-segment.is-role-peer{
    border-color:rgba(204,132,53,.20);
    background:linear-gradient(135deg,#fff8ec 0%,#fffdf8 72%,#fff 100%);
}
.lesson-speaking-roleplay-mode .transcript-segment.is-role-peer .transcript-speaker{color:#a26724;}
.lesson-speaking-roleplay-mode .transcript-segment.is-role-user .transcript-speaker{color:#0f8f74;}
.lesson-speaking-roleplay-mode .transcript-segment.is-role-current.is-role-user{
    border-color:rgba(15,143,116,.48);
    box-shadow:0 12px 24px rgba(15,143,116,.14),inset 0 0 0 1px rgba(23,179,159,.09);
}
.lesson-speaking-roleplay-mode .transcript-segment.is-role-current.is-role-peer{
    border-color:rgba(204,132,53,.48);
    box-shadow:0 12px 24px rgba(176,106,35,.13),inset 0 0 0 1px rgba(217,144,63,.08);
}
.lesson-speaking-roleplay-mode .transcript-segment.is-role-current .transcript-en{color:#18243a;font-weight:950;}
.lesson-speaking-roleplay-mode .transcript-segment.is-role-current.is-role-peer .transcript-en{color:#7e4c18;}
.lesson-speaking-roleplay-mode .transcript-segment.is-role-current.is-role-user .transcript-en{color:#0b6f60;}
.lesson-speaking-roleplay-mode .transcript-segment.is-role-current.is-role-user{padding-right:68px;}
.lesson-speaking-roleplay-mode .transcript-segment.is-role-current.is-role-user .lesson-segment-mic{display:grid;}
.lesson-speaking-roleplay-mode .transcript-segment.is-role-current.is-role-user .lesson-segment-play,
.lesson-speaking-roleplay-mode .transcript-segment.is-role-current.is-role-user .lesson-segment-mic{
    border-color:rgba(15,143,116,.28);background:#fff;box-shadow:0 5px 12px rgba(15,143,116,.10);
}

.lesson-speaking-complete{text-align:center;display:grid;gap:11px;padding:6px 0 2px;}
.lesson-speaking-complete-icon{width:54px;height:54px;margin:auto;border-radius:18px;background:#eaf7f3;color:#0f8f74;display:grid;place-items:center;font-size:1.35rem;}
.lesson-speaking-complete h3{margin:0;color:#18243a;font-size:.94rem;font-weight:950;}
.lesson-speaking-complete p{margin:0;color:#667589;font-size:.72rem;font-weight:730;line-height:1.85;}
.lesson-speaking-selfcheck{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;}
.lesson-speaking-selfcheck button{min-height:38px;padding:5px;border:1px solid #e3e9ed;border-radius:12px;background:#fff;color:#607086;font:850 .61rem/1.5 inherit;cursor:pointer;}
.lesson-speaking-selfcheck button.is-active{background:#eff9f6;border-color:rgba(15,143,116,.25);color:#0f7967;}
.lesson-speaking-selfcheck-feedback{min-height:20px;color:#0f7967;font-size:.66rem;font-weight:800;line-height:1.7;}

.lesson-speaking-toast{
    position:fixed;z-index:1450;left:50%;bottom:calc(92px + env(safe-area-inset-bottom,0px));transform:translate(-50%,10px);
    max-width:min(88vw,360px);padding:9px 13px;border-radius:999px;background:rgba(15,23,42,.90);color:#fff;
    font-size:.66rem;font-weight:800;line-height:1.5;text-align:center;opacity:0;pointer-events:none;transition:.18s ease;
}
.lesson-speaking-toast.is-visible{opacity:1;transform:translate(-50%,0);}

/* Technique micro-tours deliberately mirror the existing Zabanisa page tours,
   but remain local to Speaking Studio so they can be replayed independently. */
.lesson-speaking-tour{
    position:fixed;inset:0;z-index:1400;pointer-events:auto;direction:rtl;
}
.lesson-speaking-tour[hidden]{display:none!important;}
.lesson-speaking-tour-spotlight{
    position:fixed;border:2px solid rgba(255,255,255,.95);border-radius:20px;background:rgba(255,255,255,.02);
    box-shadow:0 0 0 9999px rgba(8,13,26,.30),0 0 0 8px rgba(23,179,159,.18),0 14px 34px rgba(15,23,42,.14);
    pointer-events:none;transition:top .18s ease,left .18s ease,width .18s ease,height .18s ease;
}
.lesson-speaking-tour-card{
    position:fixed;width:min(330px,calc(100vw - 24px));padding:14px;border-radius:24px;
    border:1px solid rgba(226,232,240,.98);background:linear-gradient(145deg,rgba(255,255,255,.99),rgba(248,250,252,.98));color:#18243a;
    box-shadow:0 24px 58px rgba(15,23,42,.24);z-index:1;
}
.lesson-speaking-tour-head{display:flex;align-items:flex-start;gap:10px;margin-bottom:8px;}
.lesson-speaking-tour-number{width:34px;height:34px;min-width:34px;border-radius:999px;background:linear-gradient(135deg,#17b39f,#243b6b);color:#fff;display:grid;place-items:center;font-size:.72rem;font-weight:950;box-shadow:0 8px 18px rgba(36,59,107,.16);}
.lesson-speaking-tour-title-wrap{display:grid;gap:1px;min-width:0;flex:1;}
.lesson-speaking-tour-title{margin:0;color:#1d325c;font-size:.88rem;font-weight:950;line-height:1.55;}
.lesson-speaking-tour-count{color:#7b8797;font-size:.62rem;font-weight:800;}
.lesson-speaking-tour-body{margin:0;color:#526176;font-size:.76rem;font-weight:730;line-height:1.9;}
.lesson-speaking-tour-actions{display:flex;align-items:center;gap:7px;margin-top:12px;}
.lesson-speaking-tour-btn{min-height:38px;padding:0 12px;border-radius:13px;border:1px solid #e2e8ed;background:#fff;color:#647286;font:900 .68rem/1 inherit;cursor:pointer;}
.lesson-speaking-tour-btn.is-primary{margin-right:auto;border:0;background:linear-gradient(135deg,#17b39f,#0f8f74);color:#fff;min-width:82px;box-shadow:0 9px 18px rgba(15,143,116,.16);}
.lesson-speaking-tour-btn[disabled]{opacity:.42;cursor:default;}
.lesson-speaking-tour-dots{display:flex;justify-content:center;gap:4px;margin-top:8px;}
.lesson-speaking-tour-dot{width:5px;height:5px;border-radius:999px;background:#d8e0e5;}
.lesson-speaking-tour-dot.is-active{width:15px;background:#17b39f;}

@keyframes lessonSpeakingIn{from{opacity:0;transform:translateY(18px) scale(.985)}to{opacity:1;transform:none}}
@media(min-width:760px){
    .lesson-speaking-studio{place-items:center;}
    .lesson-speaking-sheet{padding:18px;}
    .lesson-speaking-toast{bottom:28px;}
}
@media(max-width:390px){
    .lesson-action-grid{gap:5px;}
    .lesson-action-grid .lesson-practice-cta,.lesson-speaking-cta{padding-inline:6px;font-size:.66rem;}
    .lesson-action-grid .lesson-practice-cta .cta-kicker{font-size:.53rem;}
    .lesson-speaking-cta-icon{width:23px;height:23px;min-width:23px;font-size:.70rem;}
    .lesson-speaking-technique-head{grid-template-columns:36px minmax(0,1fr);}
    .lesson-speaking-technique-icon{width:36px;height:36px;}
    .lesson-speaking-help{grid-column:2;justify-self:start;margin-top:2px;}
    .lesson-speaking-role-list{grid-template-columns:1fr 1fr;}
    .lesson-speaking-selfcheck{grid-template-columns:1fr;}
}
@media(prefers-reduced-motion:reduce){
    .lesson-speaking-sheet{animation:none;}
    .lesson-speaking-toast,.lesson-speaking-tour-spotlight,.lesson-shadow-status-copy small{transition:none;}
    .lesson-shadow-status-pulse,.lesson-shadow-summary-pulse{animation:none;}
}
