/* Stitch project 14610064947818493087 — adapted to the existing learning engine. */
@media screen {
  :root { --green: var(--ui-primary); --green-dark: var(--ui-primary-hover); --mint: var(--ui-leaf); --ink: var(--ui-ink); --muted: var(--ui-muted); --line: var(--ui-border); --bg: var(--ui-bg); --violet: var(--ui-purple); --violet-bg: var(--ui-purple-wash); }
  .app-header { height: 80px; padding: 16px 32px; gap: 24px; background: var(--ui-paper); border-color: var(--ui-border); }
  .brand { color: var(--ui-ink); font-size: 18px; letter-spacing: 0; }
  .brand-icon { background: var(--ui-leaf); color: var(--ui-primary); border-radius: 14px; }
  .brand-sub { font-size: 14px; letter-spacing: 0; color: var(--ui-muted); }
  .view-switch { border: 0; padding: 5px; border-radius: 14px; background: #edf3f0; }
  .view-switch a { min-height: 44px; padding: 9px 16px; font-size: 14px; border-radius: 10px; color: var(--ui-muted); }
  .view-switch a.active { color: var(--ui-primary); background: white; box-shadow: 0 2px 8px #19342e0b; }
  .view-switch a span { display: none; }
  .reader-account { display: inline-flex; gap: 8px; align-items: center; justify-content: center; min-height: 44px; padding: 8px 14px; border: 1px solid var(--ui-border); border-radius: 12px; color: var(--ui-primary); white-space: nowrap; }
  .reader-account svg { width: 20px; height: 20px; }
  .header-tools { gap: 10px; }
  .other-tools summary, .parent-settings { font-size: 14px; min-height: 44px; display: inline-flex; align-items: center; }
  .cloud-bar { background: var(--ui-leaf); padding: 8px 32px; font-size: 14px; color: var(--ui-primary); border: 0; }
  .cloud-bar button { font-size: 14px; min-height: 36px; font-weight: 700; }
  .app-layout { grid-template-columns: 232px minmax(0, 1fr); }
  .sidebar { padding: 30px 18px; border-color: var(--ui-border); background: white; }
  .book-info { padding: 0 12px 24px; }
  .book-info h2 { font-size: 23px; margin: 9px 0; }
  .book-info p, .eyebrow, .side-label, .unit-heading>span, .side-bottom { font-size: 14px; letter-spacing: 0; color: var(--ui-muted); }
  .unit-heading { margin: 20px 10px 16px; }
  .unit-heading h3 { font-size: 17px; line-height: 1.5; }
  .unit-heading p { font-size: 14px; }
  .lesson-menu { gap: 6px; }
  .lesson-item { min-height: 60px; padding: 12px; border-radius: 12px; }
  .lesson-item b { font-size: 15px; }
  .lesson-item small { font-size: 14px; }
  .lesson-item.active { background: var(--ui-leaf); color: var(--ui-primary); }
  .lesson-live { font-size: 12px; }
  .workspace { padding: 32px 32px 144px; max-width: 1500px; }
  .lesson-heading { margin-bottom: 24px; }
  .breadcrumb { font-size: 14px; }
  .lesson-heading h1 .readable-label { font-size: 32px; letter-spacing: -.02em; }
  .heading-page { font-size: 14px; border-radius: 8px; padding: 4px 10px; }
  .lesson-desc { color: var(--ui-muted); font-size: 15px; }
  .page-navigation select { min-height: 46px; border-radius: 12px; font-size: 15px; border-color: var(--ui-border); }
  .lesson-toolbar { border: 1px solid var(--ui-border); border-radius: 16px; padding: 12px 18px; background: white; margin-bottom: 18px; }
  .toolbar-options { gap: 14px; }
  .toolbar-options label { font-size: 14px; }
  .toolbar-options select { min-height: 40px; border-radius: 8px; font-size: 14px; }
  .mode-caption { font-size: 14px; color: var(--ui-muted); }
  .learning-shortcuts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 20px; }
  .learning-shortcuts .lesson-tools { display: contents; }
  .learning-shortcuts > button, .learning-shortcuts .lesson-tools > button { display: flex; align-items: center; gap: 12px; text-align: left; min-height: 78px; margin: 0; padding: 14px 16px; border-radius: 16px; background: white; border: 1px solid var(--ui-border); color: var(--ui-ink); box-shadow: none; }
  .learning-shortcuts .study-entry { background: var(--ui-leaf); border-color: #bed9ce; }
  .learning-shortcuts .exam-entry { background: var(--ui-purple-wash); color: var(--ui-purple); display: block; font-weight: 700; font-size: 16px; }
  .learning-shortcuts .exam-entry span { display: block; margin-top: 5px; font-size: 14px; color: var(--ui-muted); font-weight: 400; }
  .learning-shortcuts .study-entry strong { font-size: 16px; }
  .learning-shortcuts .study-entry small, .learning-shortcuts .lesson-tools small { font-size: 14px; color: var(--ui-muted); }
  .learning-shortcuts .study-entry-symbol { width: 36px; height: 36px; font-size: 22px; flex: 0 0 36px; background: white; border-radius: 11px; }
  .learning-shortcuts .study-entry-start { display: none; }
  .learning-shortcuts .entry-stars { display: none; }
  .learning-grid { grid-template-columns: minmax(0, 1fr) 310px; gap: 22px; }
  .reading-card { border: 1px solid var(--ui-border); border-radius: 22px; background: white; box-shadow: var(--ui-shadow); }
  .reading-card-head { min-height: 56px; padding: 12px 20px; border-color: var(--ui-border); font-size: 14px; }
  .reading-hint { font-size: 14px; color: var(--ui-muted); }
  .book-scroll { padding: 18px 18px 0; }
  .book-caption { padding: 16px 20px; font-size: 14px; color: var(--ui-muted); }
  .text-reading { padding: 24px; }
  .text-intro { font-size: 14px; color: var(--ui-muted); }
  .dialogue { border-color: var(--ui-border); padding: 22px 0; }
  .sentence-words { font-size: 26px; line-height: 1.85; color: var(--ui-ink); }
  .dialogue .translation { font-size: 16px; line-height: 1.8; color: var(--ui-muted); }
  .dialogue.active { background: var(--ui-leaf); border-radius: 14px; }
  .coach-column { gap: 16px; }
  .coach-card, .practice-card, .saved-summary { background: white; border: 1px solid var(--ui-border); border-radius: 20px; box-shadow: none; }
  .coach-card { padding: 22px; }
  .coach-card-head h2 { font-size: 18px; }
  .coach-card-head .small-tag { font-size: 12px; }
  .coach-tabs { padding: 5px; background: #edf3f0; border-radius: 12px; }
  .coach-tabs button { min-height: 44px; font-size: 15px; border-radius: 9px; }
  .coach-tabs button.active { background: white; color: var(--ui-primary); }
  .word-title h3 { color: var(--ui-primary); font-size: 40px; letter-spacing: -.025em; }
  .word-meaning { font-size: 18px; }
  .word-ipa, .sentence-word-ipa { color: var(--ui-purple); }
  .teach-block { background: var(--ui-bg); border-radius: 14px; padding: 16px; }
  .teach-block h4, .teach-block p, .usage-block .translation { font-size: 15px; line-height: 1.8; }
  .practice-card { padding: 22px; }
  .practice-card h3 { font-size: 18px; }
  .practice-card p, .practice-note, .saved-summary { font-size: 14px; }
  .practice-card>button { min-height: 48px; border-radius: 12px; background: var(--ui-primary); color: white; font-size: 16px; }
  .soft-button, .word-play, .sentence-actions button { border-radius: 12px; min-height: 44px; font-size: 14px; }
  .lesson-progress { border: 1px solid var(--ui-border); background: white; border-radius: 16px; margin-top: 22px; }
  .lesson-progress span, .lesson-progress small { font-size: 14px; }
  .player { left: 256px; right: 24px; bottom: 20px; min-height: 80px; padding: 12px 20px; gap: 16px; background: #fffffff5; border: 1px solid var(--ui-border); border-radius: 20px; box-shadow: 0 8px 32px #19342e14; }
  .player-now b { font-size: 15px; }
  .player-now small { font-size: 14px; color: var(--ui-muted); }
  .primary-play { min-height: 48px; border-radius: 14px; background: var(--ui-primary); color: white; }
  .player-extra button { min-height: 44px; border-radius: 10px; font-size: 14px; }
  .player-extra small { font-size: 12px; }
  .footer-speed label, .footer-speed select { font-size: 14px; }
  .choose-view { max-width: 920px; margin: 0 auto; padding: 64px 24px; }
  .choose-view>h1 { font-size: clamp(28px, 4vw, 42px); color: var(--ui-ink); letter-spacing: -.03em; }
  .choose-view>p { color: var(--ui-muted); font-size: 16px; }
  .choice-grid { gap: 24px; margin-top: 32px; }
  .choice-card { border-radius: 24px; border: 1px solid var(--ui-border); background: white; box-shadow: var(--ui-shadow); padding: 32px; }
  .choice-card h2 { font-size: 25px; }
  .choice-card p { font-size: 16px; }
  .choice-card b { border-radius: 12px; min-height: 48px; display: inline-flex; align-items: center; padding: 10px 20px; }
  .choice-book { background: var(--ui-leaf); }
  .choice-text { background: var(--ui-purple-wash); }
  .choice-letter { font-size: 14px; }
  .choice-footer, .choose-pet { font-size: 14px; }
  .comparison-heading { padding-block: 42px 26px; }
  .comparison-heading h1 { font-size: clamp(28px, 3vw, 40px); }
  .comparison-label { border-radius: 18px 18px 0 0; background: white; }
  .comparison-label small, .comparison-note { font-size: 14px; color: var(--ui-muted); }

  /* All learning overlays share the same shell, retaining their own workflows. */
  dialog:is(.record-dialog,.game-dialog,.wordbank-dialog,.settings-dialog,.pet-dialog,.pet-chat-dialog,.cloud-dialog,.phonics-dialog,.exam-dialog,.study-dialog,.install-dialog) { color: var(--ui-ink); border: 1px solid var(--ui-border); border-radius: 24px; background: var(--ui-bg); box-shadow: 0 24px 100px #19342e30; }
  dialog::backdrop { background: #19342e80; backdrop-filter: blur(5px); }
  .record-header, .exam-header, .study-header { background: white; border-bottom-color: var(--ui-border); padding: 22px 28px; }
  .record-header h2, .exam-header h2, .study-header h2 { font-size: 25px; line-height: 1.4; }
  .record-header .eyebrow, .exam-eyebrow, .study-kicker { color: var(--ui-muted); font-size: 14px; letter-spacing: 0; }
  :is(.record-header .icon-button,.exam-close,.study-close) { width: 44px; height: 44px; border-radius: 12px; background: var(--ui-bg); color: var(--ui-muted); }
  .cloud-tabs, .study-tabs, .challenge-mode-switch { background: white; border-bottom-color: var(--ui-border); }
  .cloud-tabs button, .study-tabs button, .challenge-mode-switch button { min-height: 48px; border-radius: 12px; font-size: 15px; color: var(--ui-muted); }
  .cloud-tabs button.active, .study-tabs button[aria-pressed=true], .challenge-mode-switch button[aria-current=true] { background: var(--ui-leaf); color: var(--ui-primary); }
  .cloud-primary, .record-main, .study-button.primary, .exam-content .exam-primary, .game-primary { background: var(--ui-primary); border-color: var(--ui-primary); color: white; border-radius: 12px; min-height: 48px; }
  .cloud-auth-form label, .cloud-auth-form input, .cloud-note, .cloud-help, .settings-content, .settings-content p { font-size: 15px; }
  .cloud-auth-form input, .word-search input, .pet-search input, .pet-name-form input, .pet-chat-form input { min-height: 48px; border: 1px solid var(--ui-border); border-radius: 12px; background: white; font-size: 16px; }
  .cloud-user-info, .cloud-recovery { background: white; border-radius: 18px; border-color: var(--ui-border); }
  .record-content { padding: 28px; }
  .record-reference { color: var(--ui-ink); font-size: 30px; line-height: 1.7; }
  .record-translation, .record-status, .record-steps { font-size: 15px; color: var(--ui-muted); }
  .record-ipa { color: var(--ui-purple); }
  .record-buttons button { border-radius: 12px; min-height: 48px; }
  .assessment-result { border-radius: 18px; background: white; border-color: var(--ui-border); }
  .bank-word { border-radius: 18px; border-color: var(--ui-border); box-shadow: none; background: white; }
  .bank-word-head h3 { color: var(--ui-primary); font-size: 26px; }
  .bank-meaning, .bank-example { font-size: 16px; }
  .bank-ipa { font-size: 17px; color: var(--ui-purple); }
  .bank-actions button { min-height: 44px; border-radius: 10px; font-size: 14px; }
  .phonics-content { background: var(--ui-bg); }
  #phonics-word { font-size: 36px; color: var(--ui-primary); }
  .phonics-content section { background: white; border-radius: 18px; padding: 20px; border: 1px solid var(--ui-border); }
  .phonics-hint, #phonics-status, #phonics-tip { font-size: 15px; line-height: 1.8; color: var(--ui-muted); }
  .phonics-parts button, .phonics-sounds button { border-radius: 14px; min-height: 56px; }
  .game-dialog, .game-content, .game-stage-tabs, .game-answer-actions { background: var(--ui-bg); }
  .game-stage-tabs { gap: 8px; }
  .game-stage-tabs button { min-height: 46px; font-size: 14px; border-radius: 12px; }
  .game-stage-tabs button.active { background: var(--ui-purple); border-color: var(--ui-purple); color: white; }
  .game-stage-tabs button:disabled { opacity: .8; color: #665a79; background: #f1edf7; }
  .game-options>button { background: white; border-color: var(--ui-border); border-radius: 16px; }
  .game-options>button.correct { background: var(--ui-leaf); border-color: var(--ui-primary); }
  .game-feedback, .game-auto-control, .game-question-top { font-size: 15px; }
  .study-hero { border-color: var(--ui-border); border-radius: 22px; background: white; padding: 28px; }
  .study-task-card { border-radius: 18px; border-color: var(--ui-border); box-shadow: none; }
  .study-task-card p, .study-prize, .study-note { font-size: 14px; }
  .study-task-icon { color: var(--ui-primary); background: var(--ui-leaf); }
  .study-task-card:nth-child(2) .study-task-icon { color: var(--ui-purple); background: var(--ui-purple-wash); }
  .study-task-card:nth-child(3) .study-task-icon { color: #754710; background: #fff1db; }
  .study-question, .study-reading, .study-record-card { border-radius: 20px; border-color: var(--ui-border); }
  .study-answer { background: white; border: 1px solid var(--ui-border); color: var(--ui-ink); border-radius: 14px; }
  .study-answer.answer-correct { background: var(--ui-leaf); border-color: var(--ui-primary); }
  .study-answer.answer-wrong { background: #fff1df; border-color: #b67c33; }
  .study-skill { font-size: 14px; }
  .exam-card { background: white; border-color: var(--ui-border); border-radius: 20px; }
  .exam-final { background: var(--ui-purple-wash); }
  .exam-content .exam-difficulty { border-radius: 16px; border-color: var(--ui-border); padding: 18px 14px; }
  .exam-content .exam-difficulty[aria-checked=true] { background: var(--ui-leaf); border-color: var(--ui-primary); padding: 17px 13px; }
  .exam-difficulty span, .exam-difficulty small, .exam-prize-preview small { font-size: 14px; color: var(--ui-muted); }
  .exam-prize-preview { background: var(--ui-bg); border-radius: 12px; }
  .exam-options button { background: white; border-radius: 16px; border-color: var(--ui-border); }
  .exam-options button[aria-pressed=true] { border-color: var(--ui-primary); background: var(--ui-leaf); color: var(--ui-primary); }
  .exam-hud { background: var(--ui-leaf); border-color: var(--ui-border); box-shadow: none; }
  .exam-honor-report { background: #fff7e8; border-color: #e9d5af; border-radius: 22px; }
  .exam-result h3 { color: var(--ui-primary); }
  .exam-question-actions { background: var(--ui-bg); }
  /* Keep the answer controls after the word tiles: a sticky bar can cover them. */
  .exam-dialog .exam-question-actions { position: static; }
  .exam-dialog .exam-content { scroll-padding-block: 24px; }
  .exam-exclusive-prize { background: var(--ui-purple-wash); border-color: #d6c9e7; border-radius: 16px; }
  .pet-dialog .record-header { background: white; }
  .pet-tabs button, .pet-filters button { min-height: 44px; font-size: 14px; border-radius: 12px; }
  .pet-choice { background: white; border: 1px solid var(--ui-border); border-radius: 18px; }
  .pet-choice small, .pet-note, .pet-next-look, .pet-preview-tip { font-size: 14px; line-height: 1.8; color: var(--ui-muted); }
  .pet-preview-pane { background: white; border: 1px solid var(--ui-border); border-radius: 20px; }
  .pet-random-box { background: #fff7e8; border-color: #ead7b7; border-radius: 18px; }
  .pet-random-box p { font-size: 14px; }
  .pet-random-box button { min-height: 48px; border-radius: 12px; }
  .pet-care button, .pet-name-form button, .pet-chat-open { min-height: 48px; border-radius: 12px; font-size: 15px; }
  .pet-chat-content { background: var(--ui-bg); }
  .pet-chat-intro { background: white; border-color: var(--ui-border); border-radius: 18px; }
  .pet-chat-messages { background: white; border: 1px solid var(--ui-border); border-radius: 18px; }
  .pet-chat-note, .pet-chat-intro p, .pet-chat-intro label { font-size: 14px; color: var(--ui-muted); line-height: 1.8; }
  .pet-chat-form button { min-height: 48px; border-radius: 12px; background: var(--ui-primary); color: white; }
  .pet-world-identity, .pet-world-utilities button, .pet-world-actions button { border-radius: 16px; }
  .pet-world-identity { background: #fffffff0; border: 1px solid #ffffff90; color: var(--ui-ink); backdrop-filter: blur(12px); }
  .pet-world-identity-row b { font-size: 21px; }
  .pet-world-meta { font-size: 14px; }
  .pet-world-actions button { min-height: 48px; font-size: 14px; }
  .pet-world-utilities button { font-size: 14px; min-height: 44px; }
  .pet-world-footer, .pet-world-status { font-size: 14px; }
  .role-practice { border: 1px solid var(--ui-border); border-radius: 16px; background: white; margin-bottom: 18px; padding: 0; }
  .role-practice-head { min-height: 56px; padding: 16px 18px; }
  .role-practice-head h2 { color: var(--ui-ink); font-size: 17px; }
  .role-practice-head span, .role-practice .translation { color: var(--ui-muted); font-size: 14px; }
  .role-practice button { border-radius: 11px; min-height: 44px; font-size: 14px; }
  .role-practice button[aria-pressed=true], .role-practice .role-primary { background: var(--ui-primary); color: white; }
  .role-practice #role-options, .role-practice #role-controls, .role-practice #role-output { margin: 0 18px 18px; }
  .book-current-sentence, .inline-word-card { background: var(--ui-leaf); border-color: var(--ui-border); border-radius: 16px; }
  .inline-word-heading strong { color: var(--ui-primary); }
  .inline-word-tip, .book-current-sentence>small { font-size: 14px; color: var(--ui-muted); }
  .inline-word-actions button { min-height: 44px; border-radius: 11px; font-size: 14px; }
  .push-settings { background: white; border-color: var(--ui-border); border-radius: 18px; padding: 20px; color: var(--ui-ink); }
  .push-actions button { border-color: var(--ui-border); border-radius: 11px; color: var(--ui-primary); background: white; min-height: 44px; }
  .push-actions [data-push-enable] { background: var(--ui-primary); color: white; border-color: var(--ui-primary); }
  .push-settings .push-help { color: var(--ui-muted); font-size: 14px; }
  .install-entry { background: var(--ui-leaf); border-color: var(--ui-border); border-radius: 16px; color: var(--ui-primary); }
  .install-entry small { font-size: 14px; color: var(--ui-muted); }
  .pet-feeding-banner { border-radius: 16px; }
  .pet-feeding-detail, .pet-world-feeding, .pet-feeding-rules p, .owned-pet-feeding { font-size: 14px; line-height: 1.7; }
  .pet-feeding-rules summary { min-height: 44px; font-size: 15px; }

  @media (min-width: 1101px) {
    .learning-shortcuts { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
    .learning-shortcuts > button, .learning-shortcuts .lesson-tools > button { min-height: 56px; padding: 10px 12px; gap: 8px; border-radius: 12px; font-size: 14px; }
    .learning-shortcuts .study-entry strong { font-size: 14px; }
    .learning-shortcuts .study-entry small, .learning-shortcuts .lesson-tools small, .learning-shortcuts .exam-entry span { display: none; }
    .learning-shortcuts .study-entry-symbol { width: 28px; height: 28px; font-size: 18px; flex-basis: 28px; }
    .learning-shortcuts .exam-entry { display: flex; align-items: center; font-size: 14px; }
    .learning-shortcuts .lesson-tools>button>span:first-child { width: 26px; height: 26px; flex: 0 0 26px; }
    .learning-shortcuts .lesson-tools>button svg { width: 18px; height: 18px; }
    .coach-column { position: sticky; top: 22px; }
    .pet-preview-pane { padding: 24px; }
    .study-main { max-width: 940px; margin-inline: auto; }
    .wordbank-grid { gap: 16px; }
  }
  @media (max-width: 1280px) and (min-width: 1101px) {
    .app-header { padding-inline: 22px; gap: 12px; }
    .view-switch a { padding-inline: 10px; }
    .workspace { padding-inline: 24px; }
    .learning-grid { grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; }
    .player-now { max-width: 220px; }
    .player-extra { display: none; }
  }
  @media (max-width: 1100px), (hover: none) and (pointer: coarse) {
    .app-header { min-height: 72px; height: auto; padding: max(12px, env(safe-area-inset-top)) 16px 12px; gap: 10px; }
    .brand { font-size: 16px; gap: 8px; }
    .brand-icon { width: 36px; height: 36px; border-radius: 11px; }
    .view-switch { margin-left: auto; padding: 4px; border-radius: 12px; }
    .view-switch a { padding: 8px 10px; min-height: 44px; font-size: 14px; }
    .reader-account { display: none; }
    .workspace { padding: 20px 20px calc(180px + env(safe-area-inset-bottom)); }
    .lesson-heading { margin-bottom: 16px; gap: 12px; }
    .lesson-heading h1 .readable-label { font-size: 27px; }
    .breadcrumb { font-size: 14px; }
    .lesson-heading>.page-navigation { max-width: 48%; }
    .lesson-toolbar { border-radius: 14px; padding: 10px 14px; }
    .toolbar-options { gap: 8px 12px; }
    .toolbar-options label { font-size: 14px; }
    .toolbar-options select { font-size: 14px; min-height: 40px; }
    .learning-shortcuts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-bottom: 16px; }
    .learning-shortcuts .lesson-tools { display: none; }
    .learning-shortcuts > button { min-height: 68px; padding: 12px; border-radius: 16px; gap: 10px; }
    .learning-shortcuts .study-entry small, .learning-shortcuts .exam-entry span { display: none; }
    .learning-shortcuts .exam-entry { font-size: 15px; display: flex; justify-content: center; text-align: center; }
    .learning-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .reading-card { border-radius: 20px; }
    .reading-card-head { padding: 8px 16px; min-height: 52px; }
    .book-scroll { padding: 10px 8px 0; }
    .text-reading { padding: 22px 18px; }
    .sentence-words { font-size: 25px; line-height: 1.9; }
    .coach-column { position: static; }
    .player { left: max(12px, calc((100vw - 850px)/2)); right: max(12px, calc((100vw - 850px)/2)); bottom: calc(76px + env(safe-area-inset-bottom)); min-height: 72px; gap: 6px; padding: 9px; border-radius: 18px; }
    .player .primary-play { min-width: 112px; font-size: 15px; min-height: 48px; }
    .player .icon-button { width: 40px; height: 48px; }
    .player .footer-speed select { min-height: 44px; min-width: 62px; }
    .mobile-nav { padding: 6px max(8px, calc((100vw - 850px)/2)) calc(6px + env(safe-area-inset-bottom)); min-height: 68px; border-color: var(--ui-border); }
    .mobile-nav button { min-height: 54px; font-size: 14px; color: var(--ui-muted); background: transparent; }
    .mobile-nav button:nth-child(2) { background: transparent; color: var(--ui-muted); }
    .mobile-nav button[aria-current=page] { background: var(--ui-leaf); color: var(--ui-primary); font-weight: 700; }
    dialog:is(.record-dialog,.game-dialog,.wordbank-dialog,.settings-dialog,.pet-dialog,.pet-chat-dialog,.cloud-dialog,.phonics-dialog,.exam-dialog,.study-dialog,.install-dialog) { border: 0; border-radius: 0; box-shadow: none; }
    .record-header, .exam-header, .study-header { padding: max(16px, env(safe-area-inset-top)) 20px 16px; }
    .record-header h2, .exam-header h2, .study-header h2 { font-size: 22px; }
    .record-header .eyebrow, .exam-eyebrow, .study-kicker { display: none; }
    .game-stage-tabs { top: 76px; }
    .game-options>button { min-height: 72px; }
    .exam-card { padding: 22px; }
    .exam-difficulties { gap: 8px; }
    .exam-difficulty span, .exam-difficulty small { font-size: 14px; }
    .study-scroll { padding: 20px 18px calc(28px + env(safe-area-inset-bottom)); }
    .study-hero { padding: 22px; }
    .study-task-card { padding: 18px 14px; }
    .study-task-card p, .study-task-card .study-prize { font-size: 14px; }
    .study-task-card .study-button { min-height: 48px; }
    .pet-content { padding: 20px 18px; }
    .pet-choice { padding: 16px 10px; }
    .pet-preview-pane { padding: 18px; }
    .cloud-content { padding: 24px 20px; }
    body.embedded .player { bottom: 10px; }
    body.embedded .workspace { padding-bottom: 100px; }
  }
  @media (max-width: 600px) {
    .app-header { flex-wrap: wrap; gap: 10px; padding-inline: 16px; }
    .brand { font-size: 16px; }
    .view-switch { width: 100%; order: 3; display: grid; grid-template-columns: 1fr 1fr; }
    .view-switch a { justify-content: center; padding: 8px; }
    .reader-account { display: inline-flex; margin-left: auto; min-width: 44px; min-height: 44px; padding: 10px; }
    .reader-account .reader-account-label { display: none; }
    .workspace { padding: 20px 16px calc(180px + env(safe-area-inset-bottom)); }
    .lesson-heading h1 .readable-label { font-size: 25px; }
    .lesson-heading>.page-navigation { width: 100%; max-width: none; }
    .lesson-heading>.page-navigation select { width: 100%; font-size: 16px; }
    .lesson-toolbar .role-control { display: none; }
    .lesson-toolbar .voice-control { flex: 1; }
    .toolbar-options { gap: 8px; }
    .learning-shortcuts .study-entry-symbol { display: none; }
    .learning-shortcuts .study-entry { justify-content: center; text-align: center; }
    .learning-shortcuts .study-entry strong { font-size: 15px; }
    .learning-shortcuts .exam-entry { font-size: 14px; }
    .choose-view { padding: 36px 18px; }
    .choice-grid { gap: 16px; margin-top: 24px; }
    .choice-card { padding: 24px; }
    .choice-card h2 { font-size: 23px; }
    .wordbank-grid { grid-template-columns: minmax(0, 1fr); }
    .bank-word { padding: 20px; }
    .record-content { padding: 24px 18px; }
    .record-reference { font-size: 27px; }
    .exam-difficulties { grid-template-columns: 1fr; }
    .exam-content .exam-difficulty { display: grid; grid-template-columns: 64px 1fr; padding: 14px; gap: 4px 12px; }
    .exam-content .exam-difficulty[aria-checked=true] { padding: 13px; }
    .exam-difficulty b { font-size: 18px; grid-row: 1 / 3; align-self: center; }
    .exam-difficulty small { grid-column: 2; }
    .exam-options { grid-template-columns: 1fr; }
    .exam-options button { min-height: 68px; }
    .exam-content { padding-inline: 18px; }
    .study-task-grid { display: grid; grid-template-columns: 1fr; }
    .study-task-card { grid-template-columns: 36px minmax(0, 1fr); gap: 6px 12px; }
    .study-task-card .study-button { grid-row: auto; grid-column: 2; width: 100%; margin-top: 6px; }
    .pet-world-hud { inset: 12px 12px auto; gap: 10px; }
    .pet-world-utilities { max-width: 100px; }
    .pet-world-bottom { left: 12px; right: 12px; }
    .pet-world-actions { gap: 7px; }
    .pet-world-actions button { font-size: 14px; padding-inline: 10px; }
  }
  @media (max-width: 360px) {
    .workspace { padding-inline: 12px; }
    .app-header { padding-inline: 12px; }
    .player { left: 8px; right: 8px; padding: 7px; gap: 2px; }
    .player .primary-play { min-width: 100px; padding-inline: 10px; font-size: 14px; }
    .player .icon-button { width: 32px; }
    .player .footer-speed select { min-width: 56px; font-size: 14px; padding-inline: 3px; }
    .record-header h2 { font-size: 20px; }
    .learning-shortcuts .exam-entry { font-size: 14px; padding-inline: 8px; }
    .pet-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
}
