/* Scoped practice layout for Echo, Speech and Stories. Runtime state owns visibility. */
body.mtp-listening-page { background: #081521 !important; color: #edf5fb; }
.echo-practice-shell, .speech-practice-shell { width: min(1180px, calc(100% - 40px)); padding: 24px 0 48px; }
.mtp-listening-page .listening-intro { text-align: left; margin: 0 0 24px; }
.mtp-listening-page .listening-intro h1 { font-family: var(--mtp-font-sans); font-size: clamp(1.75rem, 3vw, 2.25rem); line-height: 1.15; letter-spacing: -.025em; margin: 4px 0 12px; }
.mtp-listening-page .listening-intro p { max-width: 65ch; margin: 0; font-size: 1rem; line-height: 1.55; color: #b9cad8 !important; }
.listening-back { display: inline-flex; align-items: center; min-height: 44px; color: #65deed; font-size: .9375rem; text-decoration: underline; text-underline-offset: .2em; }
.echo-practice-shell .listening-intro > .flex { justify-content: flex-start; gap: 24px; margin-top: 8px; }
.echo-practice-shell .listening-intro > .flex a { display: inline-flex; align-items: center; min-height: 44px; color: #65deed; font-size: .9375rem; }
.echo-practice-shell #academy-coach-anchor:empty, .mtp-stories-shell #academy-coach-anchor:empty { display: none; }
.echo-practice-shell .hidden, .speech-practice-shell .hidden { display: none !important; }
.listening-guest { border: 0; border-bottom: 1px solid #304253; background: transparent; padding: 0 0 16px; margin-bottom: 20px; border-radius: 0; }
.listening-guest p { color: #b9cad8; font-size: .9375rem; line-height: 1.55; margin: 0; }
.listening-guest a { color: #65deed; }
.listening-details { border: 1px solid #304253; border-radius: 8px; padding: 0 16px; margin: 0 0 20px; min-width: 0; }
.listening-details > summary { min-height: 48px; padding: 12px 0; color: #65deed; font-weight: 600; cursor: pointer; }
.listening-details[open] > summary { border-bottom: 1px solid #304253; margin-bottom: 16px; }
.echo-practice-shell :is(button, select), .speech-practice-shell :is(button, select) { min-height: 44px; }
.echo-practice-shell input:not([type=checkbox]):not([type=radio]):not([type=range]), .speech-practice-shell input:not([type=checkbox]):not([type=radio]):not([type=range]) { min-height: 44px; }
.echo-practice-shell :is(input, select, textarea), .speech-practice-shell :is(input, select, textarea) { max-width: 100%; caret-color: #65deed; }
.echo-practice-shell ::selection, .speech-practice-shell ::selection { background: #65deed; color: #071a25; }
.echo-practice-shell :is(button, a, input, select, textarea, summary):focus-visible,
.speech-practice-shell :is(button, a, input, select, textarea, summary):focus-visible,
.mtp-stories-shell .listening-back:focus-visible { outline: 3px solid #65deed; outline-offset: 3px; }
.echo-essential-setup { display: grid; grid-template-columns: 1.25fr 1fr; gap: 20px; margin-bottom: 20px; align-items: start; }
.echo-essential-setup > div { min-width: 0; padding: 16px; border: 1px solid #304253; background: #101f2d; border-radius: 8px; }
.echo-essential-setup h3 { font-size: 1rem; margin: 0 0 12px; }
.echo-mode-selector { display: flex; flex-wrap: wrap; flex-direction: row; gap: 8px; }
.echo-mode-selector .mode-btn { width: auto; flex: 1 1 auto; min-height: 44px; margin: 0; padding: 8px 12px; border-radius: 6px; font-size: .9375rem; }
.echo-mode-selector .mode-btn.active { background: #65deed; color: #071a25; border-color: #65deed; }
.echo-essential-setup #hardware-status { color: #b9cad8; font-size: .875rem; text-align: left; }
.echo-layout { display: flex; flex-direction: column; gap: 24px; }
.echo-training { min-width: 0; }
.echo-session-bar { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: end; }
.echo-duration { display: flex; align-items: center; gap: 8px; }
.echo-duration label { color: #b9cad8; font-size: .9375rem; }
.echo-session-controls { display: flex; flex-wrap: wrap; gap: 8px; }
.echo-session-controls .control-btn { min-height: 44px; padding: 10px 18px; font-size: 1rem; border-radius: 6px; }
.echo-session-controls .btn-start { background: #65deed; color: #071a25; }
.echo-session-controls .btn-start:hover:not(:disabled) { background: #8ce8f2; }
.echo-session-controls .btn-start.active { background: #a1323c; color: #fff; }
.echo-session-controls .btn-danger { background: #a1323c; color: #fff; }
.echo-session-controls .btn-info, .echo-session-controls .btn-submit { background: #075b86; color: #fff; }
.echo-training .prompt-card { min-height: 100px; padding: 20px; background: #101f2d; border: 1px solid #304253; box-shadow: none; border-radius: 8px; }
.echo-training .prompt-text { font-size: clamp(1.25rem, 3vw, 1.75rem); line-height: 1.3; }
.echo-training > div { border-color: #304253; background-color: #101f2d; }
.echo-advanced > aside { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding-bottom: 16px; }
.echo-advanced > aside > * { margin-top: 0 !important; min-width: 0; }
.speech-practice-panel { background: #101f2d; box-shadow: none; border: 1px solid #304253; border-radius: 8px; padding: 20px; }
.speech-practice-panel .speech-display { min-height: 100px; padding: 20px; box-shadow: none; font-size: clamp(1.25rem, 3vw, 2rem); }
.speech-practice-shell #speechDisplay { background: #081521 !important; border: 1px solid #304253 !important; border-radius: 8px !important; }
.speech-practice-shell #speechDisplay > .text-gray-400 { color: #b9cad8 !important; font-size: 1.125rem; font-weight: 500; }
.speech-practice-panel .section-header { margin-bottom: 16px; }
.speech-practice-shell #startSessionBtn { background: #65deed; color: #071a25; }
.speech-practice-shell #startSessionBtn:hover { background: #8ce8f2; }
.speech-practice-shell #stopSessionBtn, .speech-practice-shell #confirmIncorrectBtn { background: #a1323c; color: #fff; }
.speech-practice-shell #confirmCorrectBtn { background: #126344; color: #fff; }
.speech-practice-shell #repeatBtn, .speech-practice-shell #nextBtn { background: #075b86; color: #fff; }
.speech-practice-shell .trainer-ios-promo { margin-top: 32px; }
.speech-practice-shell .cw-speech-access-status { min-height: 6rem; }
.mtp-stories-shell .listening-intro p { margin-left: 0; }
.mtp-stories-shell .mtp-stories-quick-grid .mtp-control { min-height: 44px; font-size: 1rem; }
.mtp-stories-shell .mtp-stories-quick-grid label > span { font-size: .875rem; }
.mtp-stories-shell .mtp-stories-more-settings { min-height: 44px; display: inline-flex; align-items: center; }
@media (max-width: 800px) {
    .echo-essential-setup { grid-template-columns: 1fr; gap: 12px; }
    .echo-essential-setup > div { padding: 12px; }
    .echo-essential-setup > div:nth-child(2) > .space-y-3 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
    .echo-essential-setup > div:nth-child(2) > .space-y-3 > * { margin-top: 0; }
    .echo-essential-setup #hardware-status, .echo-essential-setup #input-display-container, .echo-essential-setup #vband-settings-container { grid-column: 1 / -1; }
    .echo-advanced > aside { grid-template-columns: 1fr; }
    .echo-session-bar { gap: 12px; }
    .echo-session-controls .control-btn { padding: 10px 14px; }
    .speech-practice-panel { padding: 16px; }
    .mtp-stories-shell { width: calc(100% - 32px); }
    .mtp-stories-shell .mtp-stories-practice .section-header { flex-direction: column; align-items: flex-start; gap: 8px; }
}
@media (max-width: 460px) {
    .mtp-stories-shell .mtp-stories-quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mtp-stories-shell .mtp-stories-session-actions { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
    .echo-practice-shell *, .speech-practice-shell * { transition: none !important; animation: none !important; }
}
