#learningCoach{margin:24px 0 32px;background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);border:2px solid #cfe0f5;border-radius:20px;padding:30px;color:#172b45;box-shadow:0 10px 30px rgba(35,67,106,.07);font-family:inherit}
#learningCoach button,#learningCoach a{font:inherit}
#learningCoach button{cursor:pointer;min-height:44px;border:1px solid #ccd9e8;border-radius:10px;background:#fff;color:#203954;padding:11px 18px;font-weight:600;transition:all .15s}
#learningCoach button:hover:enabled{background:#edf4ff;border-color:#93c5fd;transform:translateY(-1px)}
#learningCoach button:disabled{cursor:default;opacity:.65}
#learningCoach button:focus-visible,#learningCoach a:focus-visible,.reference-tools input:focus-visible,.reference-tools select:focus-visible,[role=button]:focus-visible{outline:3px solid #2563eb;outline-offset:4px}

.coach-heading{display:flex;justify-content:space-between;gap:24px;align-items:center}
.coach-eyebrow{display:inline-block;font-size:12.5px;font-weight:700;letter-spacing:.04em;color:#1d4ed8;background:#eff6ff;padding:4px 10px;border-radius:20px;border:1px solid #bfdbfe}
.coach-heading h2{font-size:28px;line-height:1.35;margin:10px 0 6px;color:#142d4f}
.coach-heading p{color:#475569;font-size:14px;line-height:1.7;margin:0}
.coach-stats{display:flex;flex-direction:column;align-items:flex-end;gap:6px;white-space:nowrap;background:#f0f6ff;padding:12px 18px;border-radius:14px;border:1px solid #dbeafe}
.coach-stats strong{color:#2563eb;font-size:30px;line-height:1}
.coach-stats small{font-size:15px;font-weight:500;color:#64748b}
.coach-stats span{font-size:12px;color:#475569;font-weight:600}

.coach-tabs{display:flex;flex-wrap:wrap;gap:8px;border-bottom:1px solid #e5ecf4;padding:20px 0 16px;margin-bottom:22px;align-items:center}
.coach-tabs button[aria-pressed=true]{background:#2563eb!important;color:#fff!important;border-color:#2563eb!important;font-weight:700;box-shadow:0 4px 12px rgba(37,99,235,.22)}
.coach-tabs a.coach-tab-link{padding:10px 14px;color:#1e40af;font-size:13.5px;font-weight:600;text-decoration:none;border-radius:10px;background:#f0f7ff;border:1px solid #bfdbfe;transition:all .15s}
.coach-tabs a.coach-tab-link:hover{background:#dbeafe}
.coach-tabs a.highlight-link{background:#fef3c7;color:#92400e;border-color:#fcd34d}
.coach-tabs a.highlight-link:hover{background:#fde68a}

.coach-progress{height:7px;border-radius:7px;background:#e2e8f0;margin-bottom:24px;overflow:hidden}
.coach-progress span{display:block;height:100%;background:linear-gradient(90deg,#2563eb,#10b981);transition:width .25s}

.coach-lesson{display:grid;grid-template-columns:240px 1fr;gap:30px}
.coach-target{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:22px 16px;background:linear-gradient(180deg,#eff6ff 0%,#e0f2fe 100%);border:1px solid #bfdbfe;border-radius:16px;align-self:start;text-align:center}
.coach-symbol{font-size:64px;line-height:1.15;font-weight:800;font-family:"Lucida Sans Unicode","Arial Unicode MS",Arial,sans-serif;color:#1d4ed8}
.coach-word-box{display:flex;flex-direction:column;align-items:center;gap:4px}
.coach-word-box strong{font-size:26px;color:#0f172a}
.coach-word-ipa{font-size:14px;color:#475569;font-family:monospace}
.coach-word-zh{font-size:15px;font-weight:700;color:#0369a1;background:#fff;padding:2px 10px;border-radius:12px;border:1px solid #bae6fd}
.coach-vocal-tag{font-size:12px;font-weight:700;padding:4px 10px;border-radius:20px}
.coach-vocal-tag.voiced{background:#dcfce7;color:#166534;border:1px solid #86efac}
.coach-vocal-tag.voiceless{background:#f1f5f9;color:#334155;border:1px solid #cbd5e1}
.coach-throat-box{font-size:12px;line-height:1.5;color:#1e3a8a;background:rgba(255,255,255,.75);padding:8px 10px;border-radius:10px;border:1px dashed #93c5fd}

.coach-guide h3,.coach-listen h3,.coach-recall h3,.coach-complete h3{font-size:20px;margin:10px 0 8px;line-height:1.5;color:#0f172a}
.coach-phonics-banner{background:#f0fdf4;border:1px solid #bbf7d0;color:#166534;padding:10px 14px;border-radius:10px;font-size:14px;margin-bottom:12px;line-height:1.6}
.coach-kid-box{background:#fffbeb;border:1px solid #fde68a;border-left:4px solid #f59e0b;padding:12px 15px;border-radius:10px;font-size:15px;line-height:1.7;color:#78350f;margin-bottom:12px;font-weight:600}
.coach-kid-box.emphasis{box-shadow:0 4px 14px rgba(245,158,11,.12);font-size:16px}
.coach-cue{font-size:15.5px;line-height:1.75;margin:0 0 12px;color:#334155}
.coach-esl-box{background:#fef2f2;border:1px solid #fecaca;border-left:4px solid #ef4444;padding:11px 14px;border-radius:10px;font-size:13.5px;line-height:1.7;color:#991b1b;margin:10px 0}
.coach-contrast-tip{font-size:13.5px;background:#f8fafc;border-left:4px solid #6366f1;padding:10px 14px;line-height:1.7;color:#334155;border-radius:0 8px 8px 0;margin:10px 0}

.coach-actions{display:flex;gap:10px;flex-wrap:wrap;margin:14px 0}
.coach-primary{background:#2563eb!important;color:#fff!important;border-color:#2563eb!important}
.coach-primary:hover:enabled{background:#1d4ed8!important}

.coach-sentence-card{display:flex;align-items:center;justify-content:space-between;gap:14px;background:#f8fafc;border:1px solid #cbd5e1;border-radius:12px;padding:12px 16px;margin:14px 0;flex-wrap:wrap}
.sentence-text{display:flex;flex-direction:column;gap:3px}
.sentence-badge{font-size:11.5px;font-weight:700;color:#2563eb}
.sentence-text strong{font-size:16px;color:#0f172a}
.sentence-text span{font-size:13px;color:#475569}
.sentence-Btns{display:flex;gap:8px;flex-wrap:wrap}

.coach-more-words{margin:12px 0;font-size:13px;color:#475569}
.coach-more-words summary{cursor:pointer;font-weight:600;color:#1e40af;padding:6px 0}
.coach-word-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:8px;margin-top:8px}
.coach-mini-word{display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:8px 12px!important;text-align:left}
.coach-mini-word strong{font-size:15px;color:#1e3a8a}
.coach-mini-word small{font-size:11.5px;color:#64748b}
.coach-mini-word span{font-size:12px;color:#0369a1}

.coach-next{margin-top:16px;width:100%;background:#eff6ff!important;color:#1d4ed8!important;border:2px solid #93c5fd!important;font-size:15px!important;font-weight:700!important}
.coach-next:hover:enabled{background:#dbeafe!important}
.coach-feedback{font-size:14.5px;font-weight:600;line-height:1.7;color:#1e40af;margin:16px 0 0;min-height:25px;background:#f0f7ff;padding:8px 14px;border-radius:8px}
.coach-storage{border-top:1px solid #e2e8f0;padding-top:14px;margin:20px 0 0;font-size:12px;color:#64748b;line-height:1.7}

.coach-recall,.coach-listen,.coach-complete{max-width:720px;margin:0 auto;padding:8px 0}
.coach-options{display:flex;gap:12px;margin:20px 0;flex-wrap:wrap}
.coach-options button{flex:1;font-size:24px!important;min-width:120px;padding:16px!important}
.coach-options span{display:block;font-size:13px;margin-top:6px;font-weight:500;color:#475569}
.coach-correct{background:#dcfce7!important;border-color:#16a34a!important;color:#14532d!important}
.coach-wrong{background:#fee2e2!important;border-color:#ef4444!important;color:#7f1d1d!important}
.coach-back{margin-top:14px;font-size:13px!important}

.self-check-card{background:#f0fdf4;border:1px solid #86efac;border-radius:14px;padding:16px 20px;margin-top:14px}
.self-check-card h4{font-size:16px;color:#14532d;margin-bottom:6px}
.phonics-quiz-card{background:#eff6ff;border:2px solid #bfdbfe;border-radius:16px;padding:20px;text-align:center;margin:14px 0}
.phonics-quiz-word{font-size:40px;font-weight:800;color:#1e3a8a;letter-spacing:.5px}
.phonics-quiz-meta{display:flex;justify-content:center;gap:14px;margin-top:8px;flex-wrap:wrap;font-size:14.5px;color:#1e40af}
.phonics-meta-zh{background:#fff;padding:3px 12px;border-radius:20px;font-weight:700;border:1px solid #93c5fd}
.phonics-meta-letters{background:#fef3c7;color:#92400e;padding:3px 12px;border-radius:20px;border:1px solid #fde68a}
.coach-complete-links{display:flex;gap:14px;flex-wrap:wrap;margin-top:14px}
.coach-cta-link{display:inline-block;padding:10px 16px;background:#eff6ff;color:#1d4ed8;border:1px solid #93c5fd;border-radius:10px;font-weight:700;text-decoration:none}

/* Profile Quick Switch Bar & Panel */
.profile-quick-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;background:#eff6ff;border:1px solid #bfdbfe;border-radius:12px;padding:10px 16px;margin:16px 0 10px}
.profile-quick-left{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.profile-mode-pill{font-size:13px;font-weight:700;color:#1e3a8a}
.profile-star-pill{background:#fef3c7;color:#92400e;border:1px solid #fcd34d;padding:3px 10px;border-radius:20px;font-size:12.5px;font-weight:700}
.profile-quick-Switch{display:flex;gap:6px;flex-wrap:wrap}
.quick-lvl-btn{cursor:pointer;font:inherit;font-size:12.5px;font-weight:600;padding:6px 12px;border-radius:8px;border:1px solid #cbd5e1;background:#fff;color:#334155;transition:all .15s}
.quick-lvl-btn:hover{border-color:#2563eb;color:#1d4ed8}
.quick-lvl-btn.active{background:#2563eb;color:#fff;border-color:#2563eb}

.profile-panel{background:#f8fafc;border:1px solid #dbe4ef;border-radius:12px;padding:14px 18px;margin:10px 0 20px;color:#203954;font-size:14px}
.profile-panel summary{display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer;min-height:32px;font-weight:700}
.profile-panel summary small{font-weight:500;font-size:12px;color:#53667f}
.profile-form{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;padding:18px 0 10px}
.profile-form label{display:flex;flex-direction:column;gap:6px;font-size:12.5px;font-weight:600}
.profile-form input,.profile-form select{font:inherit;width:100%;box-sizing:border-box;padding:9px 10px;border:1px solid #c7d4e4;border-radius:8px;background:#fff;color:#203954;min-height:42px;font-weight:400}
.profile-form button,.profile-clear{font:inherit;cursor:pointer;border:1px solid #b8cce9;border-radius:8px;background:#fff;color:#214b88;padding:9px 14px;min-height:42px;font-weight:600}
.profile-form button{grid-column:1/-1;justify-self:start;background:#2563eb;color:#fff;border-color:#2563eb}
.profile-insight{font-size:13.5px;line-height:1.85;margin-top:8px}
.profile-privacy{font-size:12px;color:#53667f;line-height:1.7;margin-top:8px}
.profile-clear{font-size:12px;margin-top:8px}
.profile-message{font-size:13px;color:#16a34a;font-weight:600;margin-top:6px}
.profile-history{margin:12px 0}
.profile-history summary{font-size:13px;font-weight:600}
.profile-history ol{font-size:12.5px;padding-left:20px;line-height:1.9;color:#475569}

/* Enriched Reference Card Styles */
.chip-zh{font-size:11px;font-weight:500;color:#64748b;margin-left:3px}
.card-pedagogy-extra{margin-top:8px;display:flex;flex-direction:column;gap:5px;border-top:1px dashed #e2e8f0;padding-top:7px;font-size:11.5px;line-height:1.5}
.card-phonics-line{color:#166534;background:#f0fdf4;padding:4px 7px;border-radius:5px;border-left:2.5px solid #22c55e}
.card-kid-line{color:#92400e;background:#fffbeb;padding:4px 7px;border-radius:5px;border-left:2.5px solid #f59e0b}
.card-esl-line{color:#991b1b;background:#fef2f2;padding:4px 7px;border-radius:5px;border-left:2.5px solid #ef4444}
.card-sentence-line{display:flex;align-items:center;justify-content:space-between;gap:6px;background:#eff6ff;color:#1e3a8a;padding:5px 8px;border-radius:6px;border:1px solid #bfdbfe;cursor:pointer;transition:background .15s}
.card-sentence-line:hover{background:#dbeafe}
.card-sentence-line em{font-style:normal;color:#475569;font-size:11px}
.sentence-play-pill{background:#2563eb;color:#fff;font-size:10.5px;font-weight:700;padding:2px 7px;border-radius:10px;white-space:nowrap;flex-shrink:0}

.reference-tools{display:flex;flex-wrap:wrap;gap:12px;margin:20px 0;align-items:center}
.reference-tools input,.reference-tools select{min-height:44px;font:inherit;padding:10px 12px;border:1px solid #cbd5e1;border-radius:8px;color:#203954;background:#fff}
.reference-tools input{flex:1;min-width:180px}
.reference-tools span{font-size:13px;color:#64748b}
.reference-heading{cursor:pointer;font-size:19px;font-weight:700;color:#21436d;padding:18px 0}
.ipa-card[hidden],[hidden]{display:none!important}

@media(max-width:700px){
  #learningCoach{padding:20px 16px;border-radius:14px;margin-top:16px}
  .coach-heading{flex-direction:column;align-items:flex-start;gap:12px}
  .coach-stats{align-items:flex-start;width:100%}
  .coach-heading h2{font-size:22px}
  .coach-lesson{grid-template-columns:1fr;gap:20px}
  .coach-target{width:100%;padding:16px}
  .coach-symbol{font-size:52px}
  .coach-options button{font-size:20px!important}
  .profile-form{grid-template-columns:1fr}
  .profile-quick-bar{flex-direction:column;align-items:stretch}
  .profile-quick-Switch{width:100%}
  .quick-lvl-btn{flex:1;text-align:center}
}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}.coach-progress span,#learningCoach button{transition:none}}
@media print{#learningCoach,.reference-tools,.reference-heading,.profile-quick-bar,.profile-panel{display:none!important}#referenceLibrary>div{display:block!important}.ipa-card[hidden]{display:block!important}.card-esl-line,.card-sentence-line{display:none!important}}
