@import url("./full-reading-fonts.css");

:root {
  color-scheme: light;
  --bg: #fffbeb;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-strong: rgba(255, 255, 255, 0.98);
  --line: rgba(120, 84, 42, 0.18);
  --text: #0f172a;
  --muted: #64748b;
  --primary: #d97706;
  --secondary: #f59e0b;
  --blue: #2563eb;
  --green: #15803d;
  --red: #dc2626;
  --shadow: 0 18px 46px rgba(88, 63, 28, 0.14);
  --focus: 0 0 0 3px rgba(37, 99, 235, 0.22);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  min-height: 100dvh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 14% 10%, rgba(245, 158, 11, 0.22), transparent 28%),
    radial-gradient(circle at 84% 14%, rgba(37, 99, 235, 0.16), transparent 26%),
    linear-gradient(180deg, #fff7d6, #fffbeb 44%, #f8fafc);
  color: var(--text);
}

.is-monitor-mode {
  --bg: #eef6ff;
  --panel: rgba(255, 255, 255, 0.58);
  --panel-strong: rgba(255, 255, 255, 0.72);
  --primary: #2563eb;
  --secondary: #0f766e;
  --line: rgba(226, 232, 240, 0.42);
  --shadow: 0 24px 70px rgba(8, 18, 34, 0.20);
}

body:has(.is-monitor-mode) {
  background:
    linear-gradient(180deg, rgba(6, 12, 24, 0.34), rgba(7, 18, 30, 0.18) 44%, rgba(7, 18, 30, 0.42)),
    var(--passage-artwork),
    linear-gradient(180deg, #e8f3ff, #f8fafc);
  background-attachment: fixed, fixed, fixed;
  background-position: center;
  background-size: cover;
}

body.speaking-modal-open,
body.pronunciation-review-open,
body.word-review-practice-open {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
select:focus-visible,
textarea:focus-visible,
input:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

a {
  color: inherit;
  text-decoration: none;
}

.full-reading-app {
  position: relative;
  isolation: isolate;
  min-height: 100dvh;
  padding: 0 12px 30px;
}

.full-reading-app::before,
.full-reading-app::after {
  content: "";
  position: fixed;
  z-index: -1;
  pointer-events: none;
}

.full-reading-app::before {
  inset: auto auto 0 -40px;
  width: min(34vw, 420px);
  height: min(56vh, 560px);
  opacity: 0;
}

.full-reading-app::after {
  inset: 78px -60px auto auto;
  width: min(32vw, 380px);
  height: min(46vh, 430px);
  opacity: 0;
}

.is-monitor-mode.full-reading-app::before,
.is-monitor-mode.full-reading-app::after {
  opacity: 0.18;
  filter: blur(0.2px) saturate(1.08);
  background:
    radial-gradient(ellipse at 36% 84%, rgba(72, 187, 120, 0.36) 0 4%, transparent 5%),
    radial-gradient(ellipse at 28% 72%, rgba(125, 211, 162, 0.24) 0 6%, transparent 7%),
    radial-gradient(ellipse at 52% 62%, rgba(94, 234, 212, 0.20) 0 5%, transparent 6%),
    radial-gradient(ellipse at 42% 46%, rgba(255, 212, 178, 0.18) 0 3%, transparent 4%),
    linear-gradient(118deg, transparent 36%, rgba(80, 196, 152, 0.24) 37% 38%, transparent 39%),
    linear-gradient(100deg, transparent 44%, rgba(120, 220, 180, 0.20) 45% 46%, transparent 47%);
  transform-origin: bottom center;
  animation: reading-botanical-sway 8s ease-in-out infinite alternate;
}

.is-monitor-mode.full-reading-app::after {
  opacity: 0.14;
  transform-origin: top center;
  transform: scaleX(-1);
  animation-name: reading-botanical-sway-right;
  animation-duration: 9.5s;
}

.ambient-reading-decor {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.ambient-reading-decor span {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 232, 174, 0.72);
  box-shadow: 0 0 22px rgba(255, 232, 174, 0.42);
  opacity: 0.52;
  animation: reading-float-petal 12s ease-in-out infinite;
}

.ambient-reading-decor span:nth-child(1) {
  left: 9%;
  top: 22%;
  animation-duration: 13s;
}

.ambient-reading-decor span:nth-child(2) {
  left: 18%;
  top: 76%;
  width: 7px;
  height: 7px;
  background: rgba(125, 211, 162, 0.66);
  animation-delay: -5s;
}

.ambient-reading-decor span:nth-child(3) {
  right: 12%;
  top: 18%;
  width: 10px;
  height: 10px;
  background: rgba(147, 197, 253, 0.72);
  animation-delay: -2s;
  animation-duration: 15s;
}

.ambient-reading-decor span:nth-child(4) {
  right: 18%;
  top: 68%;
  width: 8px;
  height: 8px;
  background: rgba(94, 234, 212, 0.62);
  animation-delay: -7s;
}

.ambient-reading-decor span:nth-child(5) {
  left: 47%;
  top: 12%;
  width: 6px;
  height: 6px;
  animation-delay: -9s;
  animation-duration: 16s;
}

.ambient-reading-decor span:nth-child(6) {
  left: 70%;
  top: 82%;
  width: 7px;
  height: 7px;
  background: rgba(255, 212, 178, 0.62);
  animation-delay: -4s;
  animation-duration: 14s;
}

.full-reading-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 -12px;
  padding: 10px 18px;
  border-bottom: 1px solid rgba(120, 84, 42, 0.14);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
}

.is-monitor-mode .full-reading-topbar {
  border-bottom-color: rgba(226, 232, 240, 0.28);
  background: rgba(248, 251, 255, 0.42);
  box-shadow: 0 10px 34px rgba(7, 18, 30, 0.08);
}

.is-monitor-mode .full-reading-topbar {
  position: static;
  min-height: 50px;
  padding: 7px 18px;
}

.is-monitor-mode .brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 10px;
}

.is-monitor-mode .brand strong {
  font-size: 15px;
}

.is-monitor-mode .brand small {
  display: none;
}

.brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.42), transparent 42%),
    linear-gradient(135deg, var(--primary), var(--blue));
  box-shadow: 0 12px 24px rgba(120, 84, 42, 0.18);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 18px;
  line-height: 1.15;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.top-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.passage-switcher {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: #334155;
  padding: 0 10px;
  font-weight: 850;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.is-monitor-mode .passage-switcher,
.is-monitor-mode .top-actions a,
.is-monitor-mode .top-actions button,
.is-monitor-mode .monitor-actions button,
.is-monitor-mode .now-actions button,
.is-monitor-mode .reading-tools button {
  border-color: rgba(226, 232, 240, 0.44);
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 8px 22px rgba(8, 18, 34, 0.06);
}

.is-monitor-mode .passage-switcher,
.is-monitor-mode .top-actions a,
.is-monitor-mode .top-actions button,
.is-monitor-mode .monitor-actions button {
  min-height: 38px;
}

.is-monitor-mode .top-actions a,
.is-monitor-mode .top-actions button {
  padding: 0 12px;
}

.passage-switcher:focus-within {
  box-shadow: var(--focus);
}

.passage-switcher span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.passage-switcher select {
  min-width: 210px;
  max-width: 300px;
  min-height: 36px;
  border: 0;
  background: transparent;
  color: #1f2937;
  font-weight: 900;
}

.is-monitor-mode .passage-switcher select {
  min-height: 32px;
  min-width: min(280px, 28vw);
  max-width: 340px;
  text-overflow: ellipsis;
}

.top-actions a,
.top-actions button,
.monitor-actions button,
.now-actions button,
.primary-action,
.reading-tools button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: #334155;
  padding: 0 14px;
  font-weight: 850;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, opacity 160ms ease;
}

.top-actions a:hover,
.top-actions button:hover:not(:disabled),
.monitor-actions button:hover:not(:disabled),
.passage-switcher:hover,
.now-actions button:hover:not(:disabled),
.primary-action:hover:not(:disabled),
.reading-tools button:hover:not(:disabled) {
  border-color: rgba(37, 99, 235, 0.35);
  background: #eff6ff;
}

.top-actions a:hover,
.top-actions button:hover:not(:disabled),
.monitor-actions button:hover:not(:disabled),
.now-actions button:hover:not(:disabled),
.primary-action:hover:not(:disabled),
.reading-tools button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.top-actions .pronunciation-review-top-button,
.is-monitor-mode .top-actions .pronunciation-review-top-button {
  min-height: 44px;
  border-color: rgba(15, 118, 110, 0.34);
  background: rgba(240, 253, 250, 0.88);
  color: #0f766e;
}

.top-actions .pronunciation-review-top-button:hover:not(:disabled),
.is-monitor-mode .top-actions .pronunciation-review-top-button:hover:not(:disabled) {
  border-color: rgba(15, 118, 110, 0.54);
  background: rgba(204, 251, 241, 0.94);
}

.primary-action,
.monitor-actions .primary-action,
.now-actions .primary-action {
  border-color: rgba(217, 119, 6, 0.42);
  background: linear-gradient(135deg, #d97706, #f59e0b);
  color: #fff;
  box-shadow: 0 12px 24px rgba(217, 119, 6, 0.20);
}

.is-monitor-mode .primary-action,
.is-monitor-mode .now-actions .primary-action {
  border-color: rgba(37, 99, 235, 0.42);
  background: linear-gradient(135deg, #2563eb, #0f766e);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

.top-actions button.is-on {
  border-color: rgba(21, 128, 61, 0.35);
  background: #ecfdf5;
  color: #166534;
}

.top-actions button.is-active,
.monitor-actions button.is-active,
.now-actions button.is-active,
.speaking-mode-toggle.is-active {
  border-color: rgba(37, 99, 235, 0.40);
  background: rgba(239, 246, 255, 0.78);
  color: #1d4ed8;
}

.is-monitor-mode .top-actions button.is-on {
  border-color: rgba(20, 184, 166, 0.36);
  background: rgba(236, 253, 245, 0.78);
}

.is-monitor-mode .top-actions button.is-active,
.is-monitor-mode .monitor-actions button.is-active,
.is-monitor-mode .now-actions button.is-active,
.is-monitor-mode .speaking-mode-toggle.is-active {
  border-color: rgba(20, 184, 166, 0.42);
  background: rgba(204, 251, 241, 0.68);
  color: #0f766e;
}

.reader-shell {
  width: min(1480px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 380px);
  gap: 18px;
  padding-top: 18px;
  align-items: start;
}

.monitor-banner {
  width: min(1480px, 100%);
  margin: 18px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(239, 246, 255, 0.88)),
    radial-gradient(circle at 100% 0, rgba(15, 118, 110, 0.14), transparent 32%);
  box-shadow: var(--shadow);
  padding: 18px;
}

.is-monitor-mode .monitor-banner {
  border-color: rgba(226, 232, 240, 0.42);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.58), rgba(229, 246, 255, 0.40)),
    radial-gradient(circle at 100% 0, rgba(45, 212, 191, 0.20), transparent 36%);
  backdrop-filter: blur(18px) saturate(1.15);
  box-shadow: 0 26px 76px rgba(8, 18, 34, 0.18);
}

.monitor-banner h1 {
  margin: 5px 0 6px;
  color: #0f172a;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.06;
  overflow-wrap: break-word;
  text-wrap: balance;
}

.monitor-banner span {
  display: block;
  color: #475569;
  font-size: 15px;
  font-weight: 760;
  line-height: 1.55;
}

.monitor-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.monitor-start-button {
  min-width: 156px;
}

.is-monitor-mode .monitor-banner {
  min-height: 72px;
  padding: 12px 16px;
}

.is-monitor-mode .monitor-banner .mode-label {
  font-size: 11px;
}

.is-monitor-mode .monitor-banner h1 {
  margin: 3px 0 2px;
  font-size: clamp(22px, 2.2vw, 32px);
  line-height: 1.12;
}

.is-monitor-mode .monitor-banner span {
  display: none;
}

.is-monitor-mode .monitor-start-button {
  min-height: 44px;
}

.passage-panel,
.now-card,
.score-card,
.pronunciation-focus-panel,
.vocabulary-panel,
.review-panel,
.comprehension-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(15px);
}

.is-monitor-mode .passage-panel,
.is-monitor-mode .now-card,
.is-monitor-mode .score-card,
.is-monitor-mode .pronunciation-focus-panel,
.is-monitor-mode .vocabulary-panel,
.is-monitor-mode .review-panel,
.is-monitor-mode .comprehension-panel {
  border-color: rgba(226, 232, 240, 0.42);
  background: rgba(255, 255, 255, 0.54);
  backdrop-filter: blur(20px) saturate(1.18);
  box-shadow: 0 26px 78px rgba(8, 18, 34, 0.16);
}

.passage-panel {
  min-width: 0;
  padding: 18px;
}

.passage-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 124px;
  gap: 16px;
  align-items: center;
  border: 1px solid rgba(217, 119, 6, 0.20);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 247, 214, 0.88)),
    radial-gradient(circle at 95% 0, rgba(37, 99, 235, 0.12), transparent 34%);
  padding: 18px;
}

.is-monitor-mode .passage-hero {
  grid-template-columns: minmax(300px, 0.68fr) minmax(340px, 1fr);
  gap: clamp(18px, 3vw, 34px);
  align-items: stretch;
  min-height: 360px;
  border-color: rgba(255, 255, 255, 0.50);
  background:
    radial-gradient(circle at 18% 14%, rgba(255, 255, 255, 0.78), transparent 25%),
    radial-gradient(circle at 86% 12%, rgba(125, 211, 252, 0.28), transparent 32%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.66), rgba(226, 246, 255, 0.32) 42%, rgba(12, 33, 59, 0.18));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42), 0 26px 72px rgba(8, 18, 34, 0.18);
}

.is-monitor-mode .passage-hero::before,
.is-monitor-mode .passage-hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.is-monitor-mode .passage-hero::before {
  inset: 0;
  background:
    radial-gradient(circle at 62% 64%, rgba(255, 238, 169, 0.42), transparent 17%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.04) 48%, rgba(6, 18, 36, 0.22));
  mix-blend-mode: screen;
  opacity: 0.72;
}

.is-monitor-mode .passage-hero::after {
  inset: auto 0 0;
  height: 42%;
  background:
    linear-gradient(180deg, transparent, rgba(8, 26, 39, 0.22) 28%, rgba(7, 19, 28, 0.48)),
    radial-gradient(ellipse at 74% 100%, rgba(20, 184, 166, 0.26), transparent 28%);
  opacity: 0.78;
}

.passage-copy {
  position: relative;
  z-index: 3;
  min-width: 0;
}

.is-monitor-mode .passage-copy {
  align-self: center;
  display: grid;
  align-content: center;
  min-height: 220px;
  max-width: 100%;
  text-shadow: 0 1px 18px rgba(255, 255, 255, 0.50);
}

.mode-label {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.passage-hero h1 {
  margin: 6px 0 6px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1;
  max-width: 100%;
  overflow-wrap: break-word;
  hyphens: auto;
  text-wrap: balance;
}

.is-monitor-mode .passage-hero h1 {
  font-size: clamp(34px, 4.4vw, 62px);
  line-height: 1.02;
}

#passageSubtitle {
  margin: 0;
  color: #475569;
  font-size: 17px;
  font-weight: 760;
}

.passage-source {
  width: fit-content;
  max-width: 100%;
  margin: 12px 0 0;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
  color: #334155;
  padding: 7px 11px;
  font-size: 13px;
  font-weight: 860;
  line-height: 1.35;
  overflow-wrap: anywhere;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.is-monitor-mode .passage-source {
  border-color: rgba(226, 232, 240, 0.44);
  background: rgba(255, 255, 255, 0.38);
  color: rgba(15, 23, 42, 0.84);
  backdrop-filter: blur(12px);
}

.reading-scene-frame {
  position: relative;
  z-index: 2;
  min-height: 300px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(151, 210, 232, 0.92), rgba(31, 78, 115, 0.82) 48%, rgba(6, 18, 28, 0.90)),
    var(--passage-artwork);
  box-shadow: 0 24px 54px rgba(8, 18, 34, 0.24), inset 0 0 0 1px rgba(255, 255, 255, 0.34);
}

.reading-scene-frame::before,
.reading-scene-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.reading-scene-frame::before {
  background:
    radial-gradient(circle at 48% 50%, rgba(255, 244, 180, 0.62), transparent 19%),
    radial-gradient(circle at 14% 16%, rgba(45, 212, 191, 0.30), transparent 29%),
    radial-gradient(circle at 86% 16%, rgba(59, 130, 246, 0.30), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.20), transparent 42%, rgba(5, 15, 26, 0.32));
  mix-blend-mode: screen;
}

.reading-scene-frame::after {
  top: auto;
  height: 38%;
  background:
    linear-gradient(177deg, transparent 0 22%, rgba(11, 31, 40, 0.94) 23% 52%, rgba(7, 19, 28, 0.96) 53%),
    radial-gradient(ellipse at 20% 100%, rgba(45, 212, 191, 0.28), transparent 25%),
    radial-gradient(ellipse at 88% 100%, rgba(34, 197, 94, 0.22), transparent 22%);
  opacity: 0.92;
}

.passage-hero img {
  width: 124px;
  height: 124px;
  object-fit: cover;
  border: 1px solid rgba(120, 84, 42, 0.18);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 28px rgba(88, 63, 28, 0.13);
}

.full-reading-app:not(.is-monitor-mode) .passage-hero.has-book-source {
  grid-template-columns: minmax(0, 1fr) 150px;
}

.full-reading-app:not(.is-monitor-mode) .passage-hero > img.is-book-topic {
  width: 132px;
  height: 176px;
  justify-self: end;
  object-fit: contain;
  border-color: rgba(15, 23, 42, 0.14);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(241, 245, 249, 0.84));
  padding: 6px;
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.18);
}

.reading-scene-frame img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  filter: saturate(1.18) contrast(0.98);
  opacity: 0.82;
}

.reading-scene-frame.is-book-topic {
  background:
    linear-gradient(180deg, rgba(235, 245, 248, 0.50), rgba(20, 45, 66, 0.28)),
    var(--passage-artwork),
    linear-gradient(180deg, rgba(151, 210, 232, 0.76), rgba(6, 18, 28, 0.84));
  background-size: cover, cover, cover;
  background-position: center;
}

.reading-scene-frame.is-book-topic::before {
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 0.30), transparent 24%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.14), transparent 44%, rgba(5, 15, 26, 0.24));
  mix-blend-mode: screen;
}

.reading-scene-frame.is-book-topic::after {
  opacity: 0.68;
}

.reading-scene-frame.is-book-topic img {
  inset: 22px auto 22px 50%;
  width: auto;
  max-width: min(58%, 292px);
  height: calc(100% - 44px);
  object-fit: contain;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 22px 48px rgba(2, 6, 23, 0.32);
  opacity: 0.96;
  transform: translateX(-50%);
}

.passage-hero img.is-topic-image-loading,
.reading-scene-frame.is-topic-image-loading img {
  opacity: 0.72;
}

.reading-scene-frame.is-topic-image-loading::before {
  animation: topic-image-breathe 1.5s ease-in-out infinite alternate;
}

.is-monitor-mode .passage-hero img {
  border-color: transparent;
  box-shadow: none;
}

.reading-scene-motion,
.speaking-motion {
  position: absolute;
  pointer-events: none;
}

.reading-scene-motion svg,
.speaking-motion svg,
.speaking-title-motion svg {
  width: 100% !important;
  height: 100% !important;
  overflow: visible;
}

.reading-scene-clouds {
  z-index: 2;
  inset: 2% 3% auto;
  height: 34%;
  opacity: 0.52;
  filter: blur(0.3px);
}

.reading-scene-fireflies {
  z-index: 4;
  inset: 18% 8% 18%;
  opacity: 0.54;
  mix-blend-mode: screen;
}

.reading-scene-seeds {
  z-index: 6;
  right: 5%;
  bottom: 18%;
  width: 32%;
  height: 46%;
  opacity: 0.62;
  filter: drop-shadow(0 0 9px rgba(255, 255, 255, 0.36));
}

.reading-scene-reeds {
  z-index: 7;
  left: -6%;
  bottom: -7%;
  width: 30%;
  height: 58%;
  opacity: 0.76;
  filter: saturate(1.08);
}

.reading-scene-grass {
  z-index: 8;
  left: 8%;
  right: 8%;
  bottom: -13%;
  height: 43%;
  opacity: 0.84;
  filter: drop-shadow(0 -8px 18px rgba(20, 184, 166, 0.16));
}

.reading-scene-flowers {
  z-index: 9;
  right: -3%;
  bottom: -10%;
  width: 28%;
  height: 42%;
  opacity: 0.82;
  filter: saturate(1.10);
}

.is-monitor-mode .reading-scene-clouds {
  height: 28%;
  opacity: 0.34;
}

.is-monitor-mode .reading-scene-fireflies {
  inset: 20% 12% 24%;
  opacity: 0.34;
}

.is-monitor-mode .reading-scene-seeds {
  right: 7%;
  bottom: 22%;
  width: 24%;
  height: 36%;
  opacity: 0.42;
}

.is-monitor-mode .reading-scene-reeds {
  left: -2%;
  bottom: -10%;
  width: 18%;
  height: 40%;
  opacity: 0.36;
}

.is-monitor-mode .reading-scene-grass {
  left: 16%;
  right: 16%;
  bottom: -18%;
  height: 30%;
  opacity: 0.42;
}

.is-monitor-mode .reading-scene-flowers {
  right: 1%;
  bottom: -8%;
  width: 16%;
  height: 28%;
  opacity: 0.46;
}

.overall-progress {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  border: 1px solid rgba(120, 84, 42, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  padding: 12px;
}

.is-monitor-mode .overall-progress {
  border-color: rgba(226, 232, 240, 0.42);
  background: rgba(255, 255, 255, 0.46);
}

.overall-progress > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.overall-progress span,
.overall-progress strong {
  font-size: 14px;
}

.overall-progress span {
  color: var(--muted);
  font-weight: 900;
}

.overall-progress strong {
  color: #334155;
  font-weight: 900;
}

.overall-track,
.reading-meter {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.13);
}

.overall-track span,
.reading-meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--blue), var(--primary));
  transition: width 180ms ease;
}

.sentence-stream {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.section-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  color: #6b4b2e;
  font-size: 13px;
  font-weight: 950;
  text-transform: uppercase;
}

.is-monitor-mode .section-divider {
  color: rgba(226, 232, 240, 0.92);
  text-shadow: 0 2px 12px rgba(8, 18, 34, 0.30);
}

.is-monitor-mode .section-divider::after {
  background: rgba(226, 232, 240, 0.32);
}

.section-divider:first-child {
  margin-top: 0;
}

.section-divider::after {
  content: "";
  min-width: 24px;
  height: 1px;
  flex: 1;
  background: rgba(120, 84, 42, 0.18);
}

.section-divider span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.sentence-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  text-align: left;
  border: 1px solid rgba(120, 84, 42, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.66);
  padding: 12px;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.is-monitor-mode .sentence-item {
  border-color: rgba(226, 232, 240, 0.38);
  background: rgba(255, 255, 255, 0.48);
}

.sentence-item.is-current {
  border-color: rgba(217, 119, 6, 0.42);
  background:
    linear-gradient(180deg, rgba(255, 248, 225, 0.96), rgba(255, 255, 255, 0.82));
  box-shadow: 0 14px 30px rgba(217, 119, 6, 0.13);
  transform: translateY(-1px);
}

.is-monitor-mode .sentence-item.is-current {
  border-color: rgba(37, 99, 235, 0.42);
  background:
    linear-gradient(180deg, rgba(239, 246, 255, 0.72), rgba(255, 255, 255, 0.48));
  box-shadow: 0 16px 42px rgba(37, 99, 235, 0.16);
}

.sentence-item.is-passed {
  border-color: rgba(21, 128, 61, 0.28);
  background: rgba(236, 253, 245, 0.72);
}

.is-monitor-mode .sentence-item.is-passed {
  border-color: rgba(21, 128, 61, 0.30);
  background: rgba(236, 253, 245, 0.52);
}

.sentence-number {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #fff7ed;
  color: #92400e;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.sentence-item.is-passed .sentence-number {
  background: #dcfce7;
  color: #166534;
}

.sentence-text {
  min-width: 0;
  color: #1e293b;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.45;
}

.sentence-score {
  justify-self: end;
  min-width: 68px;
  min-height: 32px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #475569;
  font-size: 13px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.sentence-item.is-passed .sentence-score {
  color: #166534;
}

.practice-panel {
  position: sticky;
  top: 84px;
  display: grid;
  gap: 14px;
}

.reader-shell > .review-panel,
.reader-shell > .comprehension-panel {
  grid-column: 1 / -1;
  width: min(1080px, 100%);
  justify-self: center;
  scroll-margin-top: 96px;
}

.reader-shell > .review-panel {
  padding: 28px;
}

.reader-shell > .comprehension-panel {
  gap: 24px;
  padding: 34px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(239, 246, 255, 0.70)),
    radial-gradient(circle at 12% 0, rgba(245, 158, 11, 0.15), transparent 32%),
    radial-gradient(circle at 88% 4%, rgba(37, 99, 235, 0.14), transparent 34%);
}

.is-monitor-mode .reader-shell > .comprehension-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(239, 246, 255, 0.50)),
    radial-gradient(circle at 12% 0, rgba(245, 158, 11, 0.14), transparent 32%),
    radial-gradient(circle at 88% 4%, rgba(45, 212, 191, 0.12), transparent 34%);
}

.now-card,
.pronunciation-focus-panel,
.vocabulary-panel,
.review-panel,
.comprehension-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.now-card h2,
.pronunciation-focus-panel h2,
.vocabulary-panel h2,
.review-panel h2,
.comprehension-panel h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.15;
}

.reader-shell > .review-panel h2,
.reader-shell > .comprehension-panel h2 {
  font-size: 46px;
  line-height: 1.05;
  letter-spacing: 0;
}

.reader-shell > .review-panel .mode-label,
.reader-shell > .comprehension-panel .mode-label {
  justify-self: center;
}

#nowSentence {
  min-height: 96px;
  margin: 0;
  border: 1px solid rgba(217, 119, 6, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 248, 225, 0.94), rgba(255, 255, 255, 0.84));
  color: #111827;
  padding: 14px;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.4;
}

.is-monitor-mode #nowSentence {
  border-color: rgba(226, 232, 240, 0.44);
  background: rgba(255, 255, 255, 0.52);
}

.now-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
  gap: 10px;
}

.score-card {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
}

.score-card div {
  display: grid;
  gap: 4px;
  place-items: center;
  min-height: 92px;
  background: rgba(255, 255, 255, 0.58);
  padding: 10px 8px;
}

.is-monitor-mode .score-card div {
  background: rgba(255, 255, 255, 0.46);
}

.score-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.score-card strong {
  color: #0f172a;
  font-size: 30px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.pronunciation-focus-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.pronunciation-focus-head > div {
  min-width: 0;
}

.pronunciation-focus-head span {
  flex: 0 0 auto;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 999px;
  background: rgba(239, 246, 255, 0.72);
  color: #1d4ed8;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.pronunciation-focus-summary {
  margin: 0;
  border: 1px solid rgba(14, 116, 144, 0.14);
  border-radius: 8px;
  background: rgba(236, 254, 255, 0.50);
  color: #334155;
  padding: 11px 12px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
}

.is-monitor-mode .pronunciation-focus-summary {
  border-color: rgba(125, 211, 252, 0.22);
  background: rgba(236, 254, 255, 0.34);
}

.pronunciation-focus-list {
  display: grid;
  gap: 9px;
}

.pronunciation-focus-item {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 10px;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.20);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.56);
  padding: 10px;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.pronunciation-focus-item.is-selected {
  border-color: rgba(37, 99, 235, 0.36);
  background: rgba(239, 246, 255, 0.64);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.46);
}

.pronunciation-focus-select {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  cursor: pointer;
}

.pronunciation-focus-select input {
  width: 18px;
  height: 18px;
  margin: 3px 0 0;
  accent-color: var(--primary);
}

.pronunciation-focus-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.pronunciation-focus-main strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #172033;
  font-size: 17px;
  font-weight: 950;
  line-height: 1.18;
}

.pronunciation-focus-main small,
.pronunciation-focus-main em {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
  line-height: 1.35;
}

.pronunciation-focus-main em {
  color: #0f766e;
}

.pronunciation-focus-meaning {
  justify-self: end;
  max-width: 104px;
  border-radius: 999px;
  background: rgba(240, 253, 250, 0.78);
  color: #0f766e;
  padding: 6px 9px;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.pronunciation-focus-tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  grid-column: 1 / -1;
}

.pronunciation-focus-tools button {
  min-height: 44px;
  border-radius: 999px;
  padding: 0 12px;
  font-size: 12px;
}

.pronunciation-focus-example {
  grid-column: 1 / -1;
  margin: 0;
  border-left: 3px solid rgba(37, 99, 235, 0.28);
  border-radius: 6px;
  background: rgba(248, 250, 252, 0.66);
  color: #475569;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 760;
  line-height: 1.45;
}

.pronunciation-focus-actions {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
}

.pronunciation-focus-actions button {
  min-height: 44px;
  padding: 0 12px;
  font-size: 13px;
}

.pronunciation-focus-summary-row {
  display: grid;
  grid-template-columns: auto repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: center;
}

.pronunciation-focus-summary-row > span {
  color: #475569;
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.pronunciation-focus-summary-row > span strong {
  color: #0f766e;
  font-size: 18px;
}

.pronunciation-focus-summary-row button {
  min-height: 44px;
  padding: 0 16px;
}

.quick-test-inline-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(37, 99, 235, 0.32);
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 0 16px;
  font-weight: 850;
  text-decoration: none;
}

.quick-test-inline-link:hover {
  border-color: rgba(37, 99, 235, 0.52);
  background: #dbeafe;
}

.pronunciation-review {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: #f8fafc;
  opacity: 0;
  transition: opacity 160ms ease;
}

.pronunciation-review.is-open {
  opacity: 1;
}

.pronunciation-review-dialog {
  width: 100%;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  color: #0f172a;
  background:
    linear-gradient(180deg, rgba(240, 253, 250, 0.72), rgba(248, 250, 252, 0) 240px),
    #f8fafc;
  outline: none;
}

.pronunciation-review-header,
.pronunciation-review-filters,
.pronunciation-review-content,
.pronunciation-review-actions {
  padding-left: max(24px, env(safe-area-inset-left));
  padding-right: max(24px, env(safe-area-inset-right));
}

.pronunciation-review-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  padding-top: max(22px, env(safe-area-inset-top));
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(15, 118, 110, 0.14);
}

.pronunciation-review-header h2 {
  margin: 3px 0 5px;
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: 0;
}

.pronunciation-review-header p:last-child {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  font-weight: 800;
}

.pronunciation-review-close {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(100, 116, 139, 0.24);
  border-radius: 8px;
  background: #fff;
  color: #334155;
  padding: 0;
  font-size: 28px;
  line-height: 1;
}

.pronunciation-review-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-top: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.84);
}

.pronunciation-review-filters button {
  min-width: 72px;
  min-height: 44px;
  border: 1px solid rgba(100, 116, 139, 0.22);
  border-radius: 8px;
  background: #fff;
  color: #475569;
  padding: 0 16px;
  font-weight: 900;
  white-space: nowrap;
}

.pronunciation-review-filters button[aria-pressed="true"] {
  border-color: #0f766e;
  background: #0f766e;
  color: #fff;
}

.pronunciation-review-content {
  min-height: 0;
  overflow-y: auto;
  padding-top: 22px;
  padding-bottom: 28px;
}

.pronunciation-review-grid {
  width: min(1280px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.pronunciation-review-grid .pronunciation-focus-item {
  align-content: start;
  border-color: rgba(100, 116, 139, 0.20);
  background: #fff;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.pronunciation-review-grid .pronunciation-focus-item.is-selected {
  border-color: rgba(15, 118, 110, 0.48);
  background: #f0fdfa;
}

.pronunciation-review-grid .pronunciation-focus-item.is-default {
  border-left: 4px solid #d97706;
}

.pronunciation-review-grid .pronunciation-focus-item.is-default .pronunciation-focus-main small {
  color: #9a3412;
}

.pronunciation-review-grid .pronunciation-focus-item.is-default.is-selected {
  border-left-color: #0f766e;
}

.pronunciation-review-grid .pronunciation-focus-main strong {
  font-size: 20px;
}

.pronunciation-review-grid .pronunciation-focus-example {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.pronunciation-review-empty {
  grid-column: 1 / -1;
  min-height: 260px;
  display: grid;
  place-content: center;
  gap: 8px;
  text-align: center;
  color: #64748b;
}

.pronunciation-review-empty strong {
  color: #334155;
  font-size: 20px;
}

.pronunciation-review-empty p {
  margin: 0;
  line-height: 1.6;
}

.pronunciation-review-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding-top: 14px;
  padding-bottom: max(14px, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(100, 116, 139, 0.18);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -10px 30px rgba(15, 23, 42, 0.06);
}

.pronunciation-review-actions .review-feedback {
  min-height: 20px;
  margin: 0;
}

.pronunciation-review-actions > div {
  display: flex;
  gap: 10px;
}

.pronunciation-review-actions button {
  min-height: 46px;
  padding: 0 18px;
}

@media (max-width: 980px) {
  .pronunciation-review-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .pronunciation-focus-summary-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pronunciation-focus-summary-row > span { grid-column: 1 / -1; }

  .pronunciation-review-header,
  .pronunciation-review-filters,
  .pronunciation-review-content,
  .pronunciation-review-actions {
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
  }

  .pronunciation-review-header {
    padding-top: max(14px, env(safe-area-inset-top));
    padding-bottom: 12px;
  }

  .pronunciation-review-header h2 {
    font-size: 25px;
  }

  .pronunciation-review-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .pronunciation-review-content {
    padding-top: 14px;
    padding-bottom: 18px;
  }

  .pronunciation-review-actions {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .pronunciation-review-actions .review-feedback:empty {
    display: none;
  }

  .pronunciation-review-actions > div {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .pronunciation-review-actions .primary-action {
    grid-column: 1 / -1;
    grid-row: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pronunciation-review {
    transition: none;
  }
}

.word-review-practice {
  position: fixed;
  inset: 0;
  z-index: 130;
  background: #eef6ff;
  opacity: 0;
  transition: opacity 160ms ease;
}

.word-review-practice.is-open {
  opacity: 1;
}

.word-review-practice-dialog {
  width: 100%;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 5px minmax(0, 1fr);
  color: #0f172a;
  background:
    linear-gradient(180deg, rgba(219, 234, 254, 0.92), rgba(240, 253, 250, 0.72) 44%, #f8fafc 100%);
  outline: none;
}

.word-review-practice-header {
  min-height: 96px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 48px;
  gap: 20px;
  align-items: center;
  padding:
    max(18px, env(safe-area-inset-top))
    max(24px, env(safe-area-inset-right))
    16px
    max(24px, env(safe-area-inset-left));
  border-bottom: 1px solid rgba(37, 99, 235, 0.14);
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(12px) saturate(1.05);
}

.word-review-practice-header h2 {
  margin: 3px 0 0;
  font-size: 30px;
  line-height: 1.08;
  letter-spacing: 0;
}

.word-review-practice-header > strong {
  min-width: 84px;
  color: #1d4ed8;
  text-align: center;
  font-size: 18px;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.word-review-practice-close {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(71, 85, 105, 0.22);
  border-radius: 8px;
  background: #fff;
  color: #334155;
  padding: 0;
  font-size: 30px;
  line-height: 1;
}

.word-review-practice-progress {
  overflow: hidden;
  background: rgba(148, 163, 184, 0.22);
}

.word-review-practice-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #0f766e, #f59e0b);
  transition: width 220ms ease;
}

.word-review-practice-stage {
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-rows: minmax(150px, auto) auto auto auto auto;
  justify-items: center;
  align-content: center;
  gap: 24px;
  padding:
    36px
    max(24px, env(safe-area-inset-right))
    max(28px, env(safe-area-inset-bottom))
    max(24px, env(safe-area-inset-left));
}

.word-review-practice-stage.is-wrong {
  animation: word-review-practice-shake 240ms ease;
}

.word-review-practice-sentence {
  width: min(1120px, 100%);
  min-height: 150px;
  display: grid;
  place-items: center;
  margin: 0;
  border-top: 2px solid rgba(245, 158, 11, 0.54);
  border-bottom: 2px solid rgba(245, 158, 11, 0.54);
  background: rgba(255, 251, 235, 0.84);
  color: #172033;
  padding: 26px 34px;
  text-align: center;
  font-size: 38px;
  font-weight: 900;
  line-height: 1.42;
  letter-spacing: 0;
  text-wrap: balance;
}

.word-review-practice-blank {
  color: #9a3412;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 950;
  white-space: nowrap;
}

.word-review-practice-meaning {
  min-height: 24px;
  margin: -10px 0 0;
  color: #475569;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.5;
  text-align: center;
}

.word-review-practice-slots,
.word-review-practice-tiles {
  width: min(1080px, 100%);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.word-review-practice-slot,
.word-review-practice-tile {
  flex: 0 0 auto;
  width: 58px;
  height: 66px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  padding: 0;
  font-size: 30px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0;
}

.word-review-practice-slot {
  border: 2px solid rgba(37, 99, 235, 0.34);
  background: rgba(255, 255, 255, 0.68);
  color: #1d4ed8;
}

.word-review-practice-slot.is-filled {
  border-color: #2563eb;
  background: #fff;
}

.word-review-practice-slot:disabled {
  cursor: default;
  opacity: 1;
}

.word-review-practice-tile {
  border: 2px solid rgba(15, 118, 110, 0.54);
  background: #0f766e;
  color: #fff;
  box-shadow: 0 4px 0 #115e59;
  cursor: pointer;
  transition: transform 120ms ease, background 160ms ease, opacity 160ms ease;
}

.word-review-practice-tile:hover:not(:disabled) {
  background: #0d9488;
  transform: translateY(-2px);
}

.word-review-practice-tile:active:not(:disabled) {
  transform: translateY(2px) scale(0.97);
  box-shadow: 0 1px 0 #115e59;
}

.word-review-practice-tile.is-used,
.word-review-practice-tile:disabled {
  cursor: default;
  opacity: 0.18;
  transform: none;
}

.word-review-practice-feedback {
  min-height: 26px;
  margin: 0;
  color: #475569;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.5;
  text-align: center;
}

.word-review-practice-feedback.is-good {
  color: #15803d;
}

.word-review-practice-feedback.is-bad {
  color: #b91c1c;
}

.word-review-practice-actions,
.word-review-practice-complete > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.word-review-practice-actions button,
.word-review-practice-complete button {
  min-width: 132px;
  min-height: 48px;
  border: 1px solid rgba(71, 85, 105, 0.24);
  border-radius: 8px;
  background: #fff;
  color: #334155;
  padding: 0 18px;
  font-weight: 900;
  cursor: pointer;
}

.word-review-practice-actions .primary-action,
.word-review-practice-complete .primary-action {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
}

.word-review-practice-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.word-review-practice button:focus-visible {
  outline: 3px solid #f59e0b;
  outline-offset: 3px;
}

.word-review-practice-complete {
  min-height: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  padding:
    40px
    max(24px, env(safe-area-inset-right))
    max(40px, env(safe-area-inset-bottom))
    max(24px, env(safe-area-inset-left));
  text-align: center;
}

.word-review-practice-complete[hidden] {
  display: none !important;
}

.word-review-practice-complete-mark {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #dcfce7;
  color: #15803d;
  font-size: 48px;
  font-weight: 950;
}

.word-review-practice-complete h2 {
  margin: 0;
  font-size: 42px;
  line-height: 1.08;
  letter-spacing: 0;
}

.word-review-practice-complete > p:not(.mode-label) {
  max-width: 38ch;
  margin: 0 0 10px;
  color: #475569;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.55;
}

@keyframes word-review-practice-shake {
  0%, 100% { transform: translateX(0); }
  30% { transform: translateX(-7px); }
  70% { transform: translateX(7px); }
}

@media (max-width: 700px) {
  .word-review-practice-header {
    min-height: 82px;
    grid-template-columns: minmax(0, 1fr) auto 44px;
    gap: 10px;
    padding:
      max(12px, env(safe-area-inset-top))
      max(14px, env(safe-area-inset-right))
      12px
      max(14px, env(safe-area-inset-left));
  }

  .word-review-practice-header h2 {
    font-size: 24px;
  }

  .word-review-practice-header > strong {
    min-width: 58px;
    font-size: 15px;
  }

  .word-review-practice-close {
    width: 44px;
    height: 44px;
    font-size: 26px;
  }

  .word-review-practice-stage {
    grid-template-rows: minmax(128px, auto) auto auto auto auto;
    align-content: start;
    gap: 18px;
    padding:
      22px
      max(14px, env(safe-area-inset-right))
      max(20px, env(safe-area-inset-bottom))
      max(14px, env(safe-area-inset-left));
  }

  .word-review-practice-sentence {
    min-height: 128px;
    padding: 20px 14px;
    font-size: 25px;
    line-height: 1.42;
  }

  .word-review-practice-meaning {
    font-size: 15px;
  }

  .word-review-practice-slots,
  .word-review-practice-tiles {
    gap: 7px;
  }

  .word-review-practice-slot,
  .word-review-practice-tile {
    width: 44px;
    height: 52px;
    font-size: 23px;
  }

  .word-review-practice-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .word-review-practice-actions button {
    min-width: 0;
  }

  .word-review-practice-actions .primary-action {
    grid-column: 1 / -1;
  }

  .word-review-practice-complete h2 {
    font-size: 34px;
  }

  .word-review-practice-complete > div {
    width: 100%;
  }

  .word-review-practice-complete button {
    flex: 1 1 150px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .word-review-practice,
  .word-review-practice-progress span,
  .word-review-practice-tile {
    transition: none;
  }

  .word-review-practice-stage.is-wrong {
    animation: none;
  }
}

.vocabulary-list {
  display: grid;
  gap: 8px;
}

.vocabulary-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(120, 84, 42, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  padding: 10px;
}

.vocabulary-word {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.vocabulary-word strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #172033;
  font-size: 15px;
  font-weight: 950;
  line-height: 1.25;
}

.vocabulary-word span {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
}

.vocabulary-meaning {
  justify-self: end;
  min-width: 44px;
  border-radius: 999px;
  background: #fff7ed;
  color: #92400e;
  padding: 6px 9px;
  text-align: center;
  font-size: 13px;
  font-weight: 950;
  white-space: nowrap;
}

.review-form {
  display: grid;
  gap: 10px;
}

.reader-shell > .review-panel .review-form {
  width: min(860px, 100%);
  justify-self: center;
  gap: 16px;
}

.review-item {
  display: grid;
  gap: 7px;
}

.review-item label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #334155;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.35;
}

.reader-shell > .review-panel .review-item {
  gap: 10px;
}

.reader-shell > .review-panel .review-item label {
  font-size: 18px;
}

.review-prompt {
  min-width: 0;
  overflow-wrap: anywhere;
}

.review-answer-hint {
  flex: 0 0 auto;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 999px;
  background: rgba(239, 246, 255, 0.72);
  color: #1d4ed8;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.reader-shell > .review-panel .review-answer-hint {
  font-size: 14px;
  padding: 6px 10px;
}

.review-item input {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(120, 84, 42, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: #0f172a;
  padding: 0 12px;
  font-weight: 800;
}

.reader-shell > .review-panel .review-item input {
  min-height: 58px;
  font-size: 22px;
}

.review-item.is-correct input {
  border-color: rgba(21, 128, 61, 0.32);
  background: #ecfdf5;
}

.review-item.is-wrong input {
  border-color: rgba(220, 38, 38, 0.36);
  background: #fef2f2;
}

.review-feedback {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
}

.review-feedback.is-good {
  color: var(--green);
}

.review-feedback.is-bad {
  color: var(--red);
}

.comprehension-summary {
  margin: 0;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 8px;
  background: rgba(239, 246, 255, 0.58);
  color: #334155;
  padding: 12px;
  font-size: 14px;
  font-weight: 760;
  line-height: 1.55;
}

.reader-shell > .comprehension-panel .comprehension-summary {
  width: min(900px, 100%);
  justify-self: center;
  padding: 18px 22px;
  color: #172033;
  font-size: 20px;
  line-height: 1.75;
  text-align: left;
}

.is-monitor-mode .comprehension-summary {
  border-color: rgba(147, 197, 253, 0.24);
  background: rgba(239, 246, 255, 0.42);
}

.comprehension-form {
  display: grid;
  gap: 12px;
}

.reader-shell > .comprehension-panel .comprehension-form {
  width: min(940px, 100%);
  justify-self: center;
  gap: 24px;
}

.comprehension-question {
  min-width: 0;
  display: grid;
  gap: 10px;
  margin: 0;
  border: 1px solid rgba(120, 84, 42, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  padding: 12px;
}

.reader-shell > .comprehension-panel .comprehension-question {
  gap: 18px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.74);
  text-align: left;
}

.is-monitor-mode .comprehension-question {
  border-color: rgba(226, 232, 240, 0.42);
  background: rgba(255, 255, 255, 0.42);
}

.comprehension-question legend {
  display: grid;
  gap: 8px;
  padding: 0 2px;
  color: #172033;
  font-size: 15px;
  font-weight: 950;
  line-height: 1.42;
}

.comprehension-question-index {
  width: fit-content;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 999px;
  background: rgba(239, 246, 255, 0.82);
  color: #1d4ed8;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.comprehension-question-text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.reader-shell > .comprehension-panel .comprehension-question legend {
  gap: 12px;
  margin-bottom: 2px;
}

.reader-shell > .comprehension-panel .comprehension-question-index {
  padding: 6px 12px;
  font-size: 14px;
}

.reader-shell > .comprehension-panel .comprehension-question-text {
  font-size: 30px;
  line-height: 1.28;
}

.comprehension-options {
  display: grid;
  gap: 8px;
}

.reader-shell > .comprehension-panel .comprehension-options {
  gap: 14px;
}

.comprehension-option {
  position: relative;
  min-height: 44px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.66);
  color: #334155;
  padding: 10px;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.reader-shell > .comprehension-panel .comprehension-option {
  min-height: 72px;
  gap: 16px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.78);
}

.comprehension-option:hover {
  border-color: rgba(37, 99, 235, 0.28);
  background: rgba(239, 246, 255, 0.66);
}

.comprehension-option:focus-within {
  outline: 3px solid rgba(37, 99, 235, 0.24);
  outline-offset: 2px;
}

.comprehension-option input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  accent-color: var(--primary);
  cursor: pointer;
}

.comprehension-option-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(37, 99, 235, 0.20);
  border-radius: 999px;
  background: rgba(239, 246, 255, 0.92);
  color: #1d4ed8;
  font-size: 16px;
  font-weight: 950;
}

.reader-shell > .comprehension-panel .comprehension-option-mark {
  width: 44px;
  height: 44px;
  font-size: 20px;
}

.comprehension-option-text {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
}

.reader-shell > .comprehension-panel .comprehension-option-text {
  color: #172033;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.42;
}

.comprehension-option.is-selected {
  border-color: rgba(37, 99, 235, 0.40);
  background: rgba(239, 246, 255, 0.78);
}

.comprehension-option.is-selected .comprehension-option-mark {
  border-color: rgba(37, 99, 235, 0.78);
  background: #2563eb;
  color: #ffffff;
}

.comprehension-question.is-correct,
.comprehension-option.is-correct {
  border-color: rgba(21, 128, 61, 0.34);
  background: rgba(236, 253, 245, 0.76);
}

.comprehension-option.is-correct .comprehension-option-mark {
  border-color: rgba(21, 128, 61, 0.60);
  background: #15803d;
  color: #ffffff;
}

.comprehension-question.is-wrong,
.comprehension-option.is-wrong {
  border-color: rgba(220, 38, 38, 0.34);
  background: rgba(254, 242, 242, 0.80);
}

.comprehension-option.is-wrong .comprehension-option-mark {
  border-color: rgba(220, 38, 38, 0.60);
  background: #dc2626;
  color: #ffffff;
}

.comprehension-option.is-correct .comprehension-option-text {
  color: #166534;
}

.comprehension-option.is-wrong .comprehension-option-text {
  color: #991b1b;
}

.comprehension-explanation {
  margin: 0;
  border-left: 3px solid rgba(37, 99, 235, 0.36);
  border-radius: 6px;
  background: rgba(248, 250, 252, 0.76);
  color: #475569;
  padding: 9px 10px;
  font-size: 13px;
  font-weight: 760;
  line-height: 1.5;
}

.reader-shell > .comprehension-panel .comprehension-explanation {
  padding: 14px 16px;
  font-size: 17px;
  line-height: 1.6;
}

.reader-shell > .comprehension-panel #checkComprehension,
.reader-shell > .review-panel #checkReview {
  justify-self: center;
  min-width: 220px;
  min-height: 56px;
  padding: 0 26px;
  font-size: 18px;
}

.reader-shell > .comprehension-panel .review-feedback,
.reader-shell > .review-panel .review-feedback {
  justify-self: center;
  font-size: 18px;
  text-align: center;
}

.speaking-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

.speaking-modal.is-visual-reading-mode {
  place-items: start center;
  align-items: start;
  overflow: auto;
}

.speaking-modal.is-visual-reading-mode .speaking-modal-dialog {
  transform-origin: top center;
}

.speaking-modal[hidden] {
  display: none !important;
}

.speaking-modal-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 44%, rgba(255, 255, 255, 0.16), transparent 34%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.44), rgba(20, 28, 43, 0.18) 50%, rgba(10, 22, 45, 0.46)),
    var(--passage-artwork),
    linear-gradient(180deg, #111827, #020617);
  background-size: cover;
  background-position: center;
  filter: saturate(1.04);
  backdrop-filter: blur(4px);
}

.speaking-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(1420px, 100%);
  max-height: calc(100dvh - 32px);
  min-height: min(760px, calc(100dvh - 32px));
  display: grid;
  align-content: start;
  gap: 16px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 8px;
  background: transparent;
  backdrop-filter: blur(14px) saturate(1.08);
  box-shadow: 0 34px 96px rgba(0, 0, 0, 0.46), inset 0 0 0 1px rgba(255, 255, 255, 0.40);
  padding: 24px;
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  transition: opacity 220ms ease, transform 220ms ease;
}

.speaking-ambient-scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}

.speaking-ambient-scene::before,
.speaking-ambient-scene::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.speaking-ambient-scene::before {
  inset: 8% 4% auto;
  height: 38%;
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 244, 180, 0.20), transparent 21%),
    radial-gradient(circle at 16% 42%, rgba(45, 212, 191, 0.10), transparent 28%),
    radial-gradient(circle at 84% 38%, rgba(59, 130, 246, 0.12), transparent 30%);
  mix-blend-mode: screen;
}

.speaking-ambient-scene::after {
  inset: auto 0 0;
  height: 30%;
  background:
    radial-gradient(ellipse at 4% 100%, rgba(6, 18, 28, 0.34), transparent 24%),
    radial-gradient(ellipse at 96% 100%, rgba(6, 18, 28, 0.34), transparent 24%),
    linear-gradient(180deg, transparent, rgba(11, 31, 40, 0.20));
}

.speaking-modal-top,
.speaking-stage-board,
.reading-assessment-row,
.speaking-modal-dialog > .reading-feedback {
  position: relative;
  z-index: 2;
}

.speaking-motion-fireflies {
  inset: 12% 8% 24%;
  opacity: 0.20;
  mix-blend-mode: screen;
}

.speaking-motion-mist {
  top: 7%;
  left: 8%;
  right: 8%;
  height: 18%;
  opacity: 0.20;
  mix-blend-mode: screen;
}

.speaking-motion-wave {
  top: 32px;
  left: 50%;
  width: min(190px, 22vw);
  height: 58px;
  opacity: 0;
  transform: translateX(-50%) translateY(-4px);
  transition: opacity 220ms ease, transform 220ms ease;
  filter: drop-shadow(0 10px 18px rgba(14, 116, 144, 0.16));
}

.speaking-motion-pulse {
  top: 86px;
  right: 8%;
  width: min(112px, 11vw);
  height: min(96px, 10vw);
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 220ms ease, transform 220ms ease;
  filter: drop-shadow(0 0 18px rgba(37, 99, 235, 0.18));
}

.reading-is-listening .speaking-motion-wave,
.reading-is-listening .speaking-motion-pulse {
  opacity: 0.24;
}

.reading-is-listening .speaking-motion-wave {
  transform: translateX(-50%) translateY(0);
}

.reading-is-listening .speaking-motion-pulse {
  transform: scale(1);
}

.speaking-motion-check {
  top: 90px;
  right: 17%;
  width: min(118px, 12vw);
  height: min(96px, 10vw);
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 180ms ease, transform 180ms ease;
  filter: drop-shadow(0 14px 26px rgba(15, 118, 110, 0.18));
}

.reading-is-good .speaking-motion-check {
  opacity: 0.32;
  transform: scale(1);
}

.speaking-modal.is-open .speaking-modal-dialog {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.speaking-modal-top {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  padding: 18px 18px 16px;
  text-shadow: 0 2px 14px rgba(2, 6, 23, 0.92), 0 1px 2px rgba(2, 6, 23, 0.92);
  box-shadow: none;
  backdrop-filter: blur(12px) saturate(1.06);
}

.speaking-modal-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 0 auto;
}

.speaking-caption-controls {
  display: contents;
}

.speaking-mode-toggle {
  min-width: 92px;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.speaking-mode-picker {
  display: inline-flex;
}

select.speaking-mode-toggle {
  cursor: pointer;
}

.speaking-mode-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.18);
}

.speaking-guided-reading-toggle {
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.94);
  padding: 0 12px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.speaking-guided-reading-toggle:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.44);
  background: rgba(255, 255, 255, 0.18);
}

.speaking-guided-reading-toggle.is-active {
  border-color: rgba(134, 239, 172, 0.58);
  background: rgba(20, 83, 45, 0.58);
  color: #f0fdf4;
  font-weight: 900;
  box-shadow: 0 0 0 1px rgba(134, 239, 172, 0.2);
}

.speaking-guided-reading-toggle:focus-visible {
  outline: 2px solid #f8fafc;
  outline-offset: 2px;
}

.speaking-modal-heading {
  min-width: 0;
  display: flex;
  gap: 12px;
  align-items: center;
}

.speaking-title-motion {
  position: relative;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  opacity: 0.86;
  filter: drop-shadow(0 0 14px rgba(125, 211, 252, 0.28));
}

.speaking-modal-heading > div {
  min-width: 0;
}

.reading-target-label {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.speaking-modal-top h2 {
  margin: 5px 0 4px;
  font-size: 30px;
  line-height: 1.1;
}

.speaking-modal-top small {
  width: fit-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.94);
  padding: 7px 12px;
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
  overflow-wrap: anywhere;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 10px 24px rgba(2, 6, 23, 0.12);
}

.speaking-segment-count {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  white-space: nowrap;
}

.speaking-segment-count b {
  font-size: clamp(26px, 3vw, 38px);
  line-height: 0.9;
}

.speaking-segment-count em {
  font-style: normal;
  opacity: 0.72;
}

.speaking-segment-section {
  min-width: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.72em;
  line-height: 1.2;
}

.speaking-modal-close {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  color: #fff;
  font-size: 30px;
  line-height: 1;
  font-weight: 700;
}

.speaking-visual-stage {
  position: relative;
  z-index: 2;
  min-height: 280px;
  height: clamp(300px, 42dvh, 480px);
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 8px;
  background: rgba(10, 18, 32, 0.48);
  box-shadow: 0 20px 56px rgba(2, 6, 23, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.speaking-visual-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.04), rgba(2, 6, 23, 0.16) 48%, rgba(2, 6, 23, 0.58)),
    radial-gradient(circle at 16% 10%, rgba(255, 255, 255, 0.20), transparent 24%);
}

.speaking-visual-stage img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: var(--speaking-visual-object-fit, cover);
  filter: saturate(1.06) contrast(1.02);
}

.speaking-modal-dialog.is-visual-reading-mode .speaking-visual-stage img {
  position: absolute;
  top: 0;
  left: 50%;
  width: 100vw;
  max-width: none;
  height: 100dvh;
  transform: translateX(-50%);
  object-position: center top !important;
}

.speaking-visual-caption {
  display: none;
}

.speaking-visual-caption {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  z-index: 2;
  display: grid;
  gap: 5px;
  max-width: min(680px, calc(100% - 36px));
  color: #fff;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.42);
}

.speaking-visual-height-control {
  position: absolute;
  top: 76px;
  right: 18px;
  z-index: 7;
  width: 156px;
  min-width: 0;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.28);
  padding: 6px 8px 6px 10px;
  color: #fff;
  opacity: 0.56;
  box-shadow: 0 10px 26px rgba(2, 6, 23, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px) saturate(1.12);
  transition: opacity 160ms ease, background 160ms ease, border-color 160ms ease;
}

.speaking-visual-height-control:hover,
.speaking-visual-height-control:focus-within {
  border-color: rgba(255, 255, 255, 0.36);
  background: rgba(2, 6, 23, 0.42);
  opacity: 1;
}

.speaking-visual-height-control input {
  flex: 1 1 auto;
  min-width: 0;
  height: 18px;
  margin: 0;
  accent-color: #e0f2fe;
  cursor: pointer;
}

.speaking-visual-height-control input::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.88), rgba(147, 197, 253, 0.76));
}

.speaking-visual-height-control input::-webkit-slider-thumb {
  width: 16px;
  height: 16px;
  margin-top: -6px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  background: #172033;
  box-shadow: 0 4px 14px rgba(2, 6, 23, 0.34);
  -webkit-appearance: none;
}

.speaking-visual-height-control input::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.88), rgba(147, 197, 253, 0.76));
}

.speaking-visual-height-control input::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  background: #172033;
  box-shadow: 0 4px 14px rgba(2, 6, 23, 0.34);
}

.speaking-visual-height-control output {
  min-width: 30px;
  color: rgba(255, 255, 255, 0.90);
  font-size: 10.5px;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.speaking-visual-caption span {
  color: rgba(255, 255, 255, 0.74);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.speaking-visual-caption strong {
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.speaking-visual-caption small {
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  font-weight: 780;
  line-height: 1.35;
}

.speaking-visual-motion {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  mix-blend-mode: screen;
}

.speaking-visual-motion-mist {
  top: 6%;
  left: 8%;
  right: 8%;
  height: 18%;
  opacity: 0.18;
}

.speaking-visual-motion-seeds {
  right: 4%;
  bottom: 4%;
  width: 24%;
  height: 32%;
  opacity: 0.18;
}

.speaking-modal-dialog.is-visual-reading-mode {
  min-height: min(860px, calc(100dvh - 32px));
  gap: 12px;
  padding: 18px;
  background: transparent;
  backdrop-filter: blur(10px) saturate(1.06);
}

.speaking-modal-dialog.is-visual-reading-mode .speaking-modal-top {
  align-items: center;
  padding: 12px 14px;
  background: rgba(8, 17, 31, 0.50);
}

.speaking-modal-dialog.is-visual-reading-mode .reading-target-label {
  display: none;
}

.speaking-modal-dialog.is-visual-reading-mode .speaking-modal-top h2 {
  margin-top: 0;
  font-size: clamp(20px, 2.2vw, 28px);
}

.speaking-modal-dialog.is-visual-reading-mode .speaking-modal-top small {
  margin-top: 5px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.10);
  font-size: clamp(16px, 1.7vw, 22px);
}

.speaking-modal-dialog.is-visual-reading-mode .speaking-segment-count b {
  font-size: clamp(22px, 2.4vw, 30px);
}

.speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual {
  --visual-modal-pad: 14px;
  --visual-modal-outer-pad: max(16px, env(safe-area-inset-left));
  --visual-modal-bleed: var(--visual-modal-pad);
  --visual-stage-height: clamp(320px, 50dvh, 560px);
  width: calc(100% + (var(--visual-modal-outer-pad) * 2));
  margin-inline: calc(var(--visual-modal-outer-pad) * -1);
  margin-block-start: calc(var(--visual-modal-outer-pad) * -1);
  max-height: calc(100dvh - 24px);
  min-height: min(900px, calc(100dvh - 24px));
  gap: 8px;
  padding: var(--visual-modal-pad);
  padding-top: 0;
  border-color: rgba(255, 255, 255, 0.30);
  background: transparent;
  backdrop-filter: blur(4px) saturate(1.02);
  box-shadow: 0 34px 96px rgba(0, 0, 0, 0.44), inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .speaking-modal-top {
  position: absolute;
  top: calc(var(--visual-modal-pad) + 12px);
  left: calc(var(--visual-modal-pad) + 14px);
  right: calc(var(--visual-modal-pad) + 14px);
  z-index: 6;
  align-items: flex-start;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  backdrop-filter: none;
  pointer-events: none;
}

.speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .speaking-modal-heading,
.speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .speaking-modal-actions {
  pointer-events: auto;
}

.speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .speaking-modal-heading {
  max-width: min(720px, calc(100% - 300px));
  gap: 0;
}

.speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .speaking-title-motion,
.speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .reading-target-label,
.speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .speaking-modal-top h2 {
  display: none;
}

.speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .speaking-modal-top small {
  max-width: min(680px, calc(100vw - 320px));
  flex-wrap: nowrap;
  margin: 0;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(2, 6, 23, 0.38);
  color: rgba(255, 255, 255, 0.94);
  padding: 8px 13px;
  font-size: clamp(14px, 1.15vw, 18px);
  line-height: 1.2;
  box-shadow: 0 10px 26px rgba(2, 6, 23, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px) saturate(1.12);
  overflow: hidden;
}

.speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .speaking-segment-count {
  gap: 2px;
}

.speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .speaking-segment-count b {
  font-size: clamp(17px, 1.45vw, 22px);
}

.speaking-segment-divider {
  color: rgba(255, 255, 255, 0.74);
  font-weight: 950;
}

.speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .speaking-segment-section {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(13px, 1.1vw, 17px);
}

.speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .speaking-mode-toggle,
.speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .speaking-guided-reading-toggle,
.speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .speaking-modal-close {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(2, 6, 23, 0.34);
  color: #fff;
  box-shadow: 0 10px 26px rgba(2, 6, 23, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px) saturate(1.12);
}

.speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .speaking-mode-toggle {
  min-width: 86px;
  min-height: 44px;
}

.speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .speaking-guided-reading-toggle {
  min-height: 44px;
}

.speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .speaking-guided-reading-toggle.is-active {
  border-color: rgba(134, 239, 172, 0.62);
  background: rgba(20, 83, 45, 0.62);
  color: #f0fdf4;
}

.speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .speaking-visual-stage {
  height: var(--visual-stage-height);
  min-height: 0;
  width: calc(100% + (var(--visual-modal-bleed) * 2));
  margin-inline: calc(var(--visual-modal-bleed) * -1);
  border-radius: 10px;
  border-color: rgba(255, 255, 255, 0.30);
  box-shadow: 0 24px 64px rgba(2, 6, 23, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  isolation: isolate;
}

.speaking-modal.is-visual-reading-mode .speaking-modal-backdrop {
  background-position: center top;
}

.speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .speaking-visual-stage::after {
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.44), rgba(2, 6, 23, 0.08) 26%, rgba(2, 6, 23, 0.14) 60%, rgba(2, 6, 23, 0.62)),
    radial-gradient(circle at 16% 10%, rgba(255, 255, 255, 0.16), transparent 24%);
}

.speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .speaking-visual-caption {
  left: 24px;
  right: 410px;
  bottom: 22px;
  max-width: min(760px, calc(100% - 448px));
  gap: 6px;
}

.speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .speaking-visual-caption span {
  display: none;
}

.speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .speaking-visual-caption strong {
  font-size: clamp(28px, 3.4vw, 46px);
  line-height: 1.02;
}

.speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .speaking-visual-caption small {
  max-width: 62ch;
  font-size: clamp(13px, 1.1vw, 16px);
}

.speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .speaking-panel-head {
  position: absolute;
  top: calc(var(--visual-modal-pad) + var(--visual-stage-height) - 76px);
  right: calc(var(--visual-modal-pad) + 22px);
  z-index: 6;
  min-height: 54px;
  width: auto;
  max-width: min(360px, calc(100% - 56px));
  border-color: rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.38);
  color: #fff;
  padding: 8px 10px 8px 16px;
  box-shadow: 0 14px 34px rgba(2, 6, 23, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px) saturate(1.12);
}

.speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .speaking-stage-label {
  color: rgba(255, 255, 255, 0.70);
}

.speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .speaking-panel-head strong {
  border-color: rgba(255, 255, 255, 0.20);
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.92);
}

.speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .speaking-panel-head strong.is-good {
  border-color: rgba(134, 239, 172, 0.36);
  background: rgba(21, 128, 61, 0.62);
  color: #fff;
}

.speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .speaking-panel-head strong.is-bad {
  border-color: rgba(254, 202, 202, 0.34);
  background: rgba(153, 27, 27, 0.58);
  color: #fff;
}

.speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .speaking-panel-head strong.is-listening {
  border-color: rgba(255, 255, 255, 0.28);
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.92), rgba(37, 99, 235, 0.92));
}

.speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .speaking-stage-board {
  position: static;
  gap: 8px;
}

.speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual textarea {
  min-height: 50px;
  height: 50px;
  max-height: 80px;
  overflow-y: auto;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 18px;
  line-height: 1.35;
  backdrop-filter: blur(4px) saturate(1.02);
}

.speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .reading-assessment-row {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(4px) saturate(1.02);
}

.speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual > .reading-feedback {
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.10);
  opacity: 1;
  backdrop-filter: blur(3px) saturate(1.02);
}

.speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual > .reading-feedback.is-good {
  background: rgba(236, 253, 245, 0.16);
}

.speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual > .reading-feedback.is-bad {
  background: rgba(254, 242, 242, 0.18);
}

.speaking-stage-board {
  display: grid;
  gap: 14px;
}

.speaking-focus-stage {
  display: contents;
}

.speaking-immersive-score {
  display: none;
}

.speaking-immersive-translation,
.speaking-immersive-word-scores,
.speaking-immersive-bgm,
.speaking-immersive-shortcut-hints {
  display: none;
}

.speaking-immersive-hud,
.speaking-voice-reception {
  display: none;
}

.speaking-modal-dialog.is-visual-reading-mode .speaking-stage-board {
  gap: 10px;
}

.speaking-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(120, 84, 42, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.50);
  padding: 10px 12px;
}

.speaking-modal-dialog .speaking-panel-head {
  border-color: rgba(226, 232, 240, 0.42);
  background: rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(10px) saturate(1.06);
}

.speaking-stage-label {
  margin: 0;
  color: #596274;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.speaking-panel-head strong {
  min-height: 30px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(120, 84, 42, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: #475569;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.speaking-panel-head strong.is-good {
  border-color: rgba(21, 128, 61, 0.34);
  background: rgba(220, 252, 231, 0.82);
  color: #166534;
}

.speaking-panel-head strong.is-bad {
  border-color: rgba(220, 38, 38, 0.34);
  background: rgba(254, 242, 242, 0.82);
  color: #991b1b;
}

.speaking-panel-head strong.is-listening {
  border-color: rgba(220, 38, 38, 0.34);
  background: linear-gradient(135deg, var(--red), var(--primary));
  color: #fff;
  box-shadow: 0 0 0 7px rgba(220, 38, 38, 0.10);
}

.speaking-panel-head strong.is-restart-ready,
.speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .speaking-panel-head strong.is-restart-ready {
  border-color: rgba(22, 163, 74, 0.36);
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.96), rgba(37, 99, 235, 0.92));
  color: #fff;
  box-shadow: 0 0 0 7px rgba(22, 163, 74, 0.13);
}

.reading-target {
  position: relative;
  isolation: isolate;
  margin: 0;
  border: 1px solid rgba(217, 119, 6, 0.22);
  border-radius: 8px;
  background: transparent;
  color: #111827;
  padding: 32px 34px;
  font-size: clamp(34px, 4.4vw, 54px);
  font-weight: 900;
  line-height: 1.28;
  overflow-wrap: anywhere;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.92), 0 0 12px rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.54), 0 16px 34px rgba(50, 40, 28, 0.10);
  backdrop-filter: blur(8px) saturate(1.06);
}

.speaking-target-line {
  paint-order: stroke fill;
  -webkit-text-stroke: 0.8px rgba(255, 255, 255, 0.88);
  text-shadow:
    0 1px 2px rgba(255, 255, 255, 0.98),
    0 0 8px rgba(255, 255, 255, 0.94),
    0 0 18px rgba(255, 255, 255, 0.78);
}

.speaking-ready-countdown {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  min-width: 0;
  border-radius: inherit;
  background: radial-gradient(
    circle at center,
    rgba(15, 23, 42, 0.48) 0,
    rgba(15, 23, 42, 0.34) 38%,
    rgba(15, 23, 42, 0.18) 76%,
    rgba(15, 23, 42, 0.10) 100%
  );
  color: #fff;
  text-align: center;
  text-shadow: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(2px) saturate(0.88);
}

.speaking-ready-countdown[hidden] {
  display: none !important;
}

.speaking-ready-countdown-label {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.34);
  color: rgba(255, 255, 255, 0.90);
  padding: 4px 10px;
  font-size: clamp(13px, 1.2vw, 17px);
  font-weight: 800;
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(6px);
}

.speaking-ready-countdown-value {
  display: grid;
  place-items: center;
  width: min(104px, 27vw);
  min-height: min(104px, 27vw);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.62);
  color: #fff;
  font-size: clamp(58px, 8vw, 96px);
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 0 4px 18px rgba(2, 6, 23, 0.72);
  box-shadow: 0 14px 34px rgba(2, 6, 23, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px) saturate(0.90);
  transform: scale(1);
  opacity: 1;
}

.speaking-ready-countdown.is-go .speaking-ready-countdown-value {
  width: auto;
  min-width: min(168px, 46vw);
  min-height: min(88px, 24vw);
  padding: 0 24px;
  color: #bbf7d0;
  font-size: clamp(42px, 6vw, 74px);
}

.speaking-ready-countdown.is-preparing .speaking-ready-countdown-value {
  width: auto;
  min-width: min(168px, 46vw);
  min-height: min(88px, 24vw);
  padding: 0 24px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(42px, 6vw, 68px);
}

.speaking-ready-countdown-value.is-ticking {
  animation: speaking-ready-countdown-tick 520ms ease-out both;
}

@keyframes speaking-ready-countdown-tick {
  0% {
    opacity: 0;
    transform: scale(0.78);
  }
  35% {
    opacity: 1;
    transform: scale(1.06);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.speaking-modal-dialog.is-visual-reading-mode .reading-target {
  border-color: rgba(255, 255, 255, 0.40);
  background: transparent;
  padding: 22px 26px;
  font-size: clamp(30px, 3.8vw, 48px);
  line-height: 1.22;
  box-shadow: 0 16px 38px rgba(2, 6, 23, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.52);
}

.reading-target.has-reading-hint {
  display: grid;
  gap: 12px;
}

.speaking-evaluation-hint {
  justify-self: start;
  border: 1px solid rgba(37, 99, 235, 0.20);
  border-radius: 999px;
  background: rgba(239, 246, 255, 0.62);
  color: #1e3a8a;
  padding: 7px 12px;
  font-size: 15px;
  font-weight: 850;
  line-height: 1.25;
}

.speaking-translation-hint {
  margin: 2px 0 4px;
  border: 1px solid rgba(147, 197, 253, 0.24);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.40);
  color: rgba(255, 255, 255, 0.90);
  padding: 14px 16px;
  font-size: clamp(18px, 1.45vw, 22px);
  font-weight: 800;
  line-height: 1.65;
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(12px) saturate(1.08);
  transition: opacity 180ms ease, transform 180ms ease;
}

.speaking-translation-hint[hidden] {
  display: none !important;
}

.speaking-modal-dialog.is-visual-reading-mode .speaking-translation-hint {
  margin-top: 0;
  background: rgba(8, 17, 31, 0.34);
}

.now-translation-hint {
  margin: 4px 0 2px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 8px;
  background: rgba(239, 246, 255, 0.56);
  color: #1e3a8a;
  padding: 12px 14px;
  font-size: clamp(16px, 1.15vw, 18px);
  font-weight: 800;
  line-height: 1.6;
}

.now-translation-hint[hidden] {
  display: none !important;
}

.speaking-target-word.is-weak {
  border-radius: 6px;
  background: rgba(254, 226, 226, 0.88);
  color: #991b1b;
  box-shadow: 0 0 0 3px rgba(254, 226, 226, 0.72);
}

.speaking-modal-dialog.is-immersive-reading-mode .speaking-target-word.is-weak {
  background: transparent;
  box-shadow: none;
}

.speaking-modal-dialog textarea {
  width: 100%;
  min-height: 104px;
  resize: vertical;
  border: 1px solid rgba(120, 84, 42, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.44);
  color: #172033;
  padding: 12px 14px;
  font: 760 20px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  box-shadow: inset 0 2px 12px rgba(50, 40, 28, 0.05);
  backdrop-filter: blur(10px) saturate(1.04);
}

.speaking-modal-dialog.is-visual-reading-mode textarea {
  min-height: 76px;
  background: rgba(255, 255, 255, 0.34);
}

.reading-review {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(217, 119, 6, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 250, 235, 0.48), rgba(255, 255, 255, 0.38));
  padding: 12px;
  backdrop-filter: blur(12px);
}

.reading-assessment-row {
  display: grid;
  gap: 10px;
}

.reading-tools {
  display: grid;
  grid-template-columns: repeat(5, minmax(112px, auto)) minmax(160px, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(217, 119, 6, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.34);
  padding: 12px;
  backdrop-filter: blur(12px);
}

.speaking-modal-dialog.is-visual-reading-mode .reading-tools {
  background: rgba(255, 255, 255, 0.26);
  padding: 10px;
}

.speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .reading-assessment-row {
  grid-template-columns: minmax(340px, max-content) minmax(440px, 1fr);
  grid-template-areas:
    "metrics tools"
    "words words";
  gap: 8px 10px;
  align-items: stretch;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  padding: 10px;
  backdrop-filter: blur(4px) saturate(1.02);
}

.speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .reading-assessment-row .reading-review,
.speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .reading-assessment-row .tencent-score-map {
  display: contents;
}

.speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .reading-assessment-row .reading-review[hidden] {
  display: none;
}

.speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .reading-assessment-row .tencent-score-metrics {
  grid-area: metrics;
  align-self: stretch;
}

.speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .reading-assessment-row .tencent-score-section {
  grid-area: words;
  min-width: 0;
}

.speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .reading-assessment-row .reading-tools {
  grid-area: tools;
  grid-template-columns: repeat(5, minmax(86px, 1fr));
  align-self: stretch;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  backdrop-filter: none;
}

.speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .reading-tools button {
  border-color: rgba(255, 255, 255, 0.30);
  background: rgba(255, 255, 255, 0.52);
  backdrop-filter: blur(3px) saturate(1.02);
}

.speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .reading-tools button:first-child {
  background: rgba(220, 252, 231, 0.46);
}

.speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .reading-tools button:first-child.is-continuous {
  background: rgba(255, 247, 237, 0.46);
}

.speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .tencent-score-metric,
.speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .tencent-word-score {
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(4px) saturate(1.02);
}

.speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .reading-assessment-row .reading-review[hidden] + .reading-tools {
  grid-area: 1 / 1 / auto / -1;
}

.speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .reading-assessment-row .reading-meter {
  grid-column: 1 / -1;
  height: 8px;
}

.speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .reading-assessment-row .tencent-score-metric {
  min-width: 82px;
  padding: 8px 10px;
}

.speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .reading-assessment-row .tencent-score-metric strong {
  font-size: 22px;
}

.reading-tools button {
  white-space: nowrap;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.reading-tools button:first-child {
  border-color: rgba(21, 128, 61, 0.38);
  background: rgba(220, 252, 231, 0.66);
  color: #166534;
}

.reading-tools button:first-child.is-continuous {
  border-color: rgba(217, 119, 6, 0.42);
  background: rgba(255, 247, 237, 0.66);
  color: #92400e;
}

.reading-tools button:first-child.is-listening {
  border-color: rgba(220, 38, 38, 0.6);
  background: linear-gradient(135deg, var(--red), var(--primary));
  color: #fff;
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.16), 0 0 0 8px rgba(220, 38, 38, 0.10);
  animation: reading-listen-pulse 1.25s ease-in-out infinite;
}

.reading-tools button:disabled,
.monitor-actions button:disabled,
.primary-action:disabled,
.now-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
}

.reading-tools #restartSpeakingListen.is-restarting,
.reading-tools #restartSpeakingListen.is-ready,
.reading-tools #restartSpeakingListen.is-error {
  opacity: 1;
}

.reading-tools #restartSpeakingListen.is-restarting {
  border-color: rgba(37, 99, 235, 0.46);
  background: linear-gradient(135deg, rgba(219, 234, 254, 0.92), rgba(224, 242, 254, 0.88));
  color: #1d4ed8;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.18), 0 0 0 7px rgba(37, 99, 235, 0.10);
  animation: restart-listen-button-pulse 760ms ease-in-out infinite;
}

.reading-tools #restartSpeakingListen.is-ready {
  border-color: rgba(22, 163, 74, 0.48);
  background: linear-gradient(135deg, rgba(220, 252, 231, 0.96), rgba(219, 234, 254, 0.90));
  color: #166534;
  box-shadow: 0 0 0 1px rgba(22, 163, 74, 0.16), 0 0 0 8px rgba(22, 163, 74, 0.12);
}

.reading-tools #restartSpeakingListen.is-error {
  border-color: rgba(220, 38, 38, 0.46);
  background: rgba(254, 242, 242, 0.92);
  color: #991b1b;
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.14), 0 0 0 8px rgba(220, 38, 38, 0.10);
}

.reading-tools #restartSpeakingListen.is-restarting:disabled {
  cursor: wait;
  opacity: 1;
}

@keyframes restart-listen-button-pulse {
  0%, 100% {
    transform: translateY(0);
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.18), 0 0 0 5px rgba(37, 99, 235, 0.08);
  }
  50% {
    transform: translateY(-1px);
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.22), 0 0 0 10px rgba(37, 99, 235, 0.14);
  }
}

@keyframes reading-listen-pulse {
  0%, 100% {
    transform: translateY(0);
    box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.16), 0 0 0 6px rgba(220, 38, 38, 0.10);
  }
  50% {
    transform: translateY(-1px);
    box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.22), 0 0 0 12px rgba(220, 38, 38, 0.14);
  }
}

@keyframes reading-botanical-sway {
  0% {
    transform: rotate(-1deg) translate3d(0, 0, 0);
  }
  100% {
    transform: rotate(2deg) translate3d(8px, -6px, 0);
  }
}

@keyframes reading-botanical-sway-right {
  0% {
    transform: scaleX(-1) rotate(-1deg) translate3d(0, 0, 0);
  }
  100% {
    transform: scaleX(-1) rotate(2deg) translate3d(8px, -6px, 0);
  }
}

@keyframes reading-float-petal {
  0%, 100% {
    opacity: 0.22;
    transform: translate3d(0, 0, 0) scale(0.82);
  }
  45% {
    opacity: 0.72;
    transform: translate3d(18px, -38px, 0) scale(1);
  }
  72% {
    opacity: 0.46;
    transform: translate3d(-12px, -62px, 0) scale(0.92);
  }
}

@keyframes topic-image-breathe {
  from {
    opacity: 0.46;
  }
  to {
    opacity: 0.82;
  }
}

.reading-feedback {
  margin: 0;
  border-left: 4px solid rgba(37, 99, 235, 0.42);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.34);
  padding: 10px 12px;
  color: #3d4859;
  font-size: 15px;
  font-weight: 800;
  backdrop-filter: blur(10px) saturate(1.04);
}

.reading-feedback.is-good {
  border-left-color: rgba(21, 128, 61, 0.7);
  background: rgba(236, 253, 245, 0.54);
  color: #166534;
}

.reading-feedback.is-bad {
  border-left-color: rgba(220, 38, 38, 0.7);
  background: rgba(254, 242, 242, 0.56);
  color: #991b1b;
}

.tencent-score-map {
  display: grid;
  gap: 14px;
}

.tencent-score-metrics,
.tencent-word-score-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}

.tencent-score-metric,
.tencent-word-score {
  border: 1px solid rgba(120, 84, 42, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 248, 226, 0.60), rgba(246, 226, 178, 0.42));
  color: #172033;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(8px) saturate(1.04);
}

.tencent-score-metric {
  min-width: 92px;
  display: grid;
  gap: 4px;
  place-items: center;
  padding: 10px;
}

.tencent-score-metric span,
.tencent-score-heading {
  color: #6b4b2e;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.tencent-score-metric strong {
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}

.tencent-score-heading {
  margin-bottom: 6px;
}

.tencent-word-score-shell {
  flex: 1 1 132px;
  min-width: 132px;
  max-width: 220px;
  display: grid;
  gap: 6px;
  align-content: start;
}

.tencent-word-score-shell.is-audio-hit-area {
  cursor: pointer;
  touch-action: manipulation;
}

.tencent-word-score {
  appearance: none;
  margin: 0;
  width: 100%;
  min-width: 0;
  min-height: 82px;
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  gap: 8px;
  padding: 10px;
  font-size: 12px;
  font-family: inherit;
  font-weight: 850;
  text-align: left;
}

.tencent-word-score.is-playable {
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.tencent-word-score.is-playable:hover:not(:disabled) {
  border-color: rgba(37, 99, 235, 0.52);
  box-shadow: 0 8px 20px rgba(30, 64, 175, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.82);
  filter: brightness(1.025);
}

.tencent-word-score.is-playable:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.58);
  outline-offset: 3px;
}

.tencent-word-score.is-playable:disabled {
  cursor: wait;
  opacity: 0.58;
}

.tencent-word-score.is-playable.is-audio-loading,
.tencent-word-score.is-playable.is-audio-playing {
  border-color: rgba(37, 99, 235, 0.72);
  box-shadow: 0 0 0 3px rgba(219, 234, 254, 0.84), inset 0 1px 0 rgba(255, 255, 255, 0.82);
  opacity: 1;
}

.tencent-word-top {
  min-width: 0;
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: space-between;
}

.tencent-word-actions {
  flex: 0 0 auto;
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.tencent-word-listen-cue {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(37, 99, 235, 0.24);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  color: #1d4ed8;
  font-size: 11px;
  line-height: 1;
}

.tencent-word-score.is-audio-priority .tencent-word-listen-cue {
  border-color: rgba(185, 28, 28, 0.32);
  color: #991b1b;
}

.tencent-word-score.is-audio-playing .tencent-word-listen-cue {
  background: #1d4ed8;
  color: #ffffff;
}

.tencent-word-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 950;
}

.tencent-word-value {
  display: inline-grid;
  min-width: 42px;
  height: 32px;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  font-size: 16px;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.tencent-phone-strip {
  display: inline-flex;
  gap: 3px;
  align-items: center;
}

.tencent-phone-strip i {
  flex: 1 1 auto;
  min-width: 5px;
  height: 18px;
  border-radius: 999px;
  background: rgba(120, 84, 42, 0.18);
}

.tencent-word-bar {
  display: block;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(120, 84, 42, 0.16);
}

.tencent-word-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #15803d, #2563eb, #d97706);
}

.tencent-score-metric.is-high,
.tencent-word-score.is-high,
.tencent-phone-strip i.is-high {
  border-color: rgba(21, 128, 61, 0.34);
  background: linear-gradient(180deg, rgba(236, 253, 245, 0.66), rgba(187, 247, 208, 0.48));
}

.tencent-score-metric.is-ok,
.tencent-word-score.is-ok,
.tencent-phone-strip i.is-ok {
  border-color: rgba(21, 128, 61, 0.24);
  background: linear-gradient(180deg, rgba(240, 253, 244, 0.66), rgba(220, 252, 231, 0.48));
}

.tencent-score-metric.is-warn,
.tencent-word-score.is-warn,
.tencent-phone-strip i.is-warn {
  border-color: rgba(217, 119, 6, 0.34);
  background: linear-gradient(180deg, rgba(255, 247, 217, 0.68), rgba(253, 230, 138, 0.50));
}

.tencent-score-metric.is-low,
.tencent-word-score.is-low,
.tencent-phone-strip i.is-low {
  border-color: rgba(220, 38, 38, 0.34);
  background: linear-gradient(180deg, rgba(254, 242, 242, 0.70), rgba(254, 202, 202, 0.48));
}

.tencent-word-score.is-exempt {
  border-color: rgba(14, 116, 144, 0.28);
  background: linear-gradient(180deg, rgba(236, 254, 255, 0.72), rgba(207, 250, 254, 0.52));
}

.tencent-word-score.is-exempt .tencent-word-value {
  min-width: 50px;
  color: #0e7490;
}

.tencent-word-exempt-note {
  color: #0f6175;
  font-size: 11px;
  font-weight: 850;
}

.tencent-word-translation {
  min-height: 18px;
  color: #7c3f16;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.tencent-word-translation.is-loading {
  color: #64748b;
  font-weight: 700;
}

.tencent-word-score-shell.is-radar-marked .tencent-word-score {
  border-color: rgba(21, 128, 61, 0.48);
}

.tencent-score-metric.is-unknown,
.tencent-word-score.is-unknown {
  color: var(--muted);
}

.speaking-modal.is-immersive-reading-mode {
  display: block;
  overflow: hidden;
  padding: 0;
}

.speaking-modal.is-immersive-reading-mode .speaking-modal-backdrop {
  background: var(--passage-artwork), linear-gradient(180deg, #e8edf0, #cdd4d7);
  background-position: center;
  background-size: cover;
  filter: none;
  backdrop-filter: none;
}

.appreciate-artwork-fade {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  pointer-events: none;
  animation: appreciate-artwork-dissolve 800ms ease-in-out forwards;
}

@keyframes appreciate-artwork-dissolve {
  from { opacity: 1; }
  to { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .appreciate-artwork-fade { animation-duration: 1ms; }
}

.speaking-modal-dialog.is-immersive-reading-mode {
  width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  max-height: none;
  display: block;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
  backdrop-filter: none;
  transform: none;
  transition: opacity 180ms ease;
}

.speaking-modal.is-open .speaking-modal-dialog.is-immersive-reading-mode {
  transform: none;
}

.speaking-modal-dialog.is-immersive-reading-mode .speaking-ambient-scene,
.speaking-modal-dialog.is-immersive-reading-mode .speaking-modal-heading,
.speaking-modal-dialog.is-immersive-reading-mode .speaking-visual-stage,
.speaking-modal-dialog.is-immersive-reading-mode .speaking-stage-label,
.speaking-modal-dialog.is-immersive-reading-mode .speaking-translation-hint,
.speaking-modal-dialog.is-immersive-reading-mode textarea,
.speaking-modal-dialog.is-immersive-reading-mode .reading-review,
.speaking-modal-dialog.is-immersive-reading-mode .reading-meter {
  display: none !important;
}

.speaking-modal-dialog.is-immersive-reading-mode .speaking-modal-top {
  position: fixed;
  z-index: 12;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  width: auto;
  display: block;
  border: 0;
  background: transparent;
  padding: 0;
  text-shadow: none;
  box-shadow: none;
  backdrop-filter: none;
}

/* Immersive reading keeps the image dominant while giving the sentence an editorial reading rhythm. */
.speaking-modal-dialog.is-immersive-reading-mode .speaking-modal-top,
.speaking-modal-dialog.is-immersive-reading-mode .speaking-immersive-hud,
.speaking-modal-dialog.is-immersive-reading-mode .speaking-panel-head,
.speaking-modal-dialog.is-immersive-reading-mode > .reading-feedback {
  opacity: 0.9;
}

.speaking-modal-dialog.is-immersive-reading-mode .speaking-modal-top {
  opacity: 0.78;
}

.speaking-modal-dialog.is-immersive-reading-mode .speaking-modal-actions {
  gap: 6px;
}

.speaking-modal-dialog.is-immersive-reading-mode .speaking-modal-actions #xboxGamepadBadge {
  position: static;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(15, 23, 42, 0.23);
  color: #fff;
  opacity: 0.48;
}

.speaking-modal-dialog.is-immersive-reading-mode .speaking-modal-actions #xboxGamepadBadge:is(:hover, :focus-visible) {
  opacity: 1;
}

.speaking-modal-dialog.is-immersive-reading-mode .speaking-modal-actions #xboxGamepadBadge[data-connection="connected"] {
  color: #bbf7d0;
}

.speaking-modal-dialog.is-immersive-reading-mode .speaking-immersive-hud {
  position: fixed;
  z-index: 12;
  top: max(16px, env(safe-area-inset-top));
  left: max(16px, env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  pointer-events: none;
}

.speaking-modal-dialog.is-immersive-reading-mode .speaking-immersive-progress {
  min-width: 44px;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.30);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.30);
  color: rgba(255, 255, 255, 0.96);
  padding: 0 8px;
  font-size: 14px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-shadow: 0 1px 8px rgba(2, 6, 23, 0.82);
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.12);
}

.speaking-modal-dialog.is-immersive-reading-mode .speaking-immersive-bgm {
  position: fixed;
  z-index: 13;
  left: max(16px, env(safe-area-inset-left));
  bottom: max(16px, env(safe-area-inset-bottom));
  display: block;
  pointer-events: auto;
}

.speaking-immersive-bgm-menu {
  width: 54px;
  height: 44px;
  display: grid;
  place-items: center;
  gap: 1px;
  border: 1px solid rgba(255, 255, 255, 0.30);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.34);
  color: rgba(255, 255, 255, 0.94);
  padding: 0;
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.16);
  backdrop-filter: blur(8px);
  cursor: pointer;
  font: inherit;
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.speaking-immersive-bgm-menu > span:first-child {
  font-size: 16px;
  line-height: 0.8;
}

.speaking-immersive-bgm-menu:hover,
.speaking-immersive-bgm-menu:focus-visible {
  border-color: rgba(255, 255, 255, 0.58);
  background: rgba(15, 23, 42, 0.56);
  transform: translateY(-1px);
}

.speaking-immersive-bgm-menu:focus-visible,
.speaking-immersive-bgm-popover button:focus-visible,
.speaking-immersive-bgm-popover input:focus-visible {
  outline: 2px solid #f8fafc;
  outline-offset: 2px;
}

.speaking-immersive-bgm-menu.is-active {
  border-color: rgba(134, 239, 172, 0.62);
  background: rgba(20, 83, 45, 0.62);
  color: #f0fdf4;
}

.speaking-immersive-bgm-popover {
  position: absolute;
  left: 0;
  bottom: 52px;
  width: min(260px, calc(100vw - 32px));
  display: grid;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.78);
  color: #f8fafc;
  padding: 12px;
  box-shadow: 0 18px 42px rgba(2, 6, 23, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px) saturate(1.12);
}

.speaking-immersive-bgm-popover[hidden] {
  display: none !important;
}

.speaking-immersive-bgm-head,
.speaking-immersive-bgm-track,
.speaking-immersive-bgm-volume > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.speaking-immersive-bgm-head {
  min-height: 28px;
}

.speaking-immersive-bgm-head > strong {
  font-size: 13px;
  font-weight: 850;
}

.speaking-immersive-bgm-head button,
.speaking-immersive-bgm-track {
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  padding: 0 10px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

.speaking-immersive-bgm-head button {
  min-width: 62px;
}

.speaking-immersive-bgm-head button:hover {
  border-color: rgba(255, 255, 255, 0.52);
  background: rgba(255, 255, 255, 0.20);
}

.speaking-immersive-bgm-head button.is-on {
  border-color: rgba(134, 239, 172, 0.58);
  background: rgba(20, 83, 45, 0.58);
  color: #dcfce7;
}

.speaking-immersive-bgm-track {
  width: 100%;
  margin: 0;
  cursor: default;
  text-align: left;
}

.speaking-immersive-bgm-track > strong {
  min-width: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.92);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.speaking-immersive-bgm-volume {
  display: grid;
  gap: 7px;
}

.speaking-immersive-bgm-volume > span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
  font-weight: 800;
}

.speaking-immersive-bgm-volume output {
  color: rgba(255, 255, 255, 0.96);
  font-variant-numeric: tabular-nums;
}

.speaking-immersive-bgm-volume input[type="range"] {
  width: 100%;
  accent-color: #86efac;
}

.speaking-modal-dialog.is-immersive-reading-mode .speaking-voice-reception {
  --voice-bar-1: 0.28;
  --voice-bar-2: 0.34;
  --voice-bar-3: 0.24;
  --voice-bar-4: 0.32;
  width: 56px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.32);
  color: rgba(255, 255, 255, 0.48);
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.10);
  opacity: 0.74;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease, opacity 180ms ease;
}

.speaking-modal-dialog.is-immersive-reading-mode .speaking-voice-bar {
  width: 4px;
  height: 26px;
  border-radius: 999px;
  background: currentColor;
  transform-origin: center;
  transition: transform 100ms ease-out, opacity 160ms ease;
}

.speaking-modal-dialog.is-immersive-reading-mode .speaking-voice-bar-1 {
  transform: scaleY(var(--voice-bar-1));
}

.speaking-modal-dialog.is-immersive-reading-mode .speaking-voice-bar-2 {
  transform: scaleY(var(--voice-bar-2));
}

.speaking-modal-dialog.is-immersive-reading-mode .speaking-voice-bar-3 {
  transform: scaleY(var(--voice-bar-3));
}

.speaking-modal-dialog.is-immersive-reading-mode .speaking-voice-bar-4 {
  transform: scaleY(var(--voice-bar-4));
}

.speaking-modal-dialog.is-immersive-reading-mode .speaking-voice-reception.is-listening {
  border-color: rgba(186, 230, 253, 0.46);
  background: rgba(12, 74, 110, 0.44);
  color: rgba(224, 242, 254, 0.94);
  opacity: 1;
}

.speaking-modal-dialog.is-immersive-reading-mode .speaking-voice-reception.is-receiving {
  border-color: rgba(134, 239, 172, 0.56);
  background: rgba(20, 83, 45, 0.56);
  color: #f0fdf4;
}

.speaking-modal-dialog.is-immersive-reading-mode .speaking-mode-toggle,
.speaking-modal-dialog.is-immersive-reading-mode .speaking-guided-reading-toggle,
.speaking-modal-dialog.is-immersive-reading-mode .speaking-modal-close {
  min-height: 44px;
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(15, 23, 42, 0.34);
  color: #fff;
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.18);
  backdrop-filter: none;
}

.speaking-modal-dialog.is-immersive-reading-mode .speaking-mode-toggle {
  min-width: 104px;
}

.speaking-modal-dialog.is-immersive-reading-mode .speaking-guided-reading-toggle {
  min-height: 44px;
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(15, 23, 42, 0.23);
  box-shadow: 0 4px 14px rgba(2, 6, 23, 0.12);
}

.speaking-modal-dialog.is-immersive-reading-mode .speaking-mode-toggle,
.speaking-modal-dialog.is-immersive-reading-mode .speaking-guided-reading-toggle,
.speaking-modal-dialog.is-immersive-reading-mode .speaking-modal-close {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(15, 23, 42, 0.23);
  box-shadow: 0 4px 14px rgba(2, 6, 23, 0.12);
}

.speaking-modal-dialog.is-immersive-reading-mode .speaking-guided-reading-toggle.is-active {
  border-color: rgba(134, 239, 172, 0.62);
  background: rgba(20, 83, 45, 0.62);
  color: #f0fdf4;
}

.speaking-modal-dialog.is-immersive-reading-mode .speaking-mode-toggle {
  min-width: 96px;
}

.speaking-modal-dialog.is-immersive-reading-mode .speaking-stage-board {
  position: fixed;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  padding: 92px 28px calc(112px + var(--immersive-shortcut-space, 0px));
  pointer-events: none;
}

.speaking-modal-dialog.is-immersive-reading-mode .speaking-focus-stage {
  position: relative;
  width: min(1500px, 94vw);
  display: grid;
  justify-items: center;
  gap: 18px;
  transform: translateY(12px);
}

.speaking-modal-dialog.is-immersive-reading-mode .reading-target {
  width: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0 12px;
  color: #17202a;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 84px;
  font-weight: 560;
  line-height: 1.08;
  letter-spacing: 0;
  text-align: center;
  text-wrap: balance;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.42), 0 3px 18px rgba(2, 6, 23, 0.62);
  box-shadow: none;
  backdrop-filter: none;
  transition: color 300ms ease, text-shadow 300ms ease;
}

.speaking-modal-dialog.is-immersive-reading-mode.has-immersive-font-picker .reading-target {
  font-family: var(--immersive-reading-font-family, Georgia, "Times New Roman", serif);
}

.speaking-modal-dialog.is-immersive-reading-mode .speaking-target-line {
  -webkit-text-stroke: 0.45px rgba(255, 255, 255, 0.76);
  paint-order: stroke fill;
  text-shadow:
    0 1px 2px rgba(255, 255, 255, 0.98),
    0 0 10px rgba(255, 255, 255, 0.92),
    0 0 24px rgba(255, 255, 255, 0.68),
    0 3px 16px rgba(2, 6, 23, 0.58);
  transition: -webkit-text-stroke-color 300ms ease, text-shadow 300ms ease;
}

.speaking-modal-dialog.is-immersive-reading-mode .speaking-immersive-translation {
  display: block;
  width: min(920px, 86vw);
  margin: 0;
  color: #fff;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.08em;
  text-align: center;
  text-wrap: balance;
  text-shadow: 0 1px 2px rgba(2, 6, 23, 0.96), 0 0 4px rgba(2, 6, 23, 0.88), 0 3px 12px rgba(2, 6, 23, 0.86);
}

.speaking-modal-dialog.is-immersive-reading-mode .speaking-immersive-translation[hidden] {
  display: none !important;
}

.speaking-modal-dialog.is-immersive-reading-mode.is-immersive-caption-lower-left .speaking-focus-stage {
  position: fixed;
  z-index: 4;
  top: auto;
  right: auto;
  bottom: calc(236px + var(--immersive-shortcut-space, 0px));
  left: max(28px, env(safe-area-inset-left));
  width: min(1500px, 94vw);
  max-height: calc(100dvh - 260px - var(--immersive-shortcut-space, 0px));
  justify-items: start;
  transform: none;
  transition: bottom 640ms cubic-bezier(0.22, 1, 0.36, 1), max-height 640ms cubic-bezier(0.22, 1, 0.36, 1);
}

.speaking-modal-dialog.is-immersive-reading-mode.is-immersive-caption-lower-left:has(.speaking-immersive-word-scores:not([hidden])) .speaking-focus-stage {
  bottom: calc(236px + var(--immersive-shortcut-space, 0px));
  max-height: calc(100dvh - 260px - var(--immersive-shortcut-space, 0px));
}

.speaking-modal-dialog.is-immersive-reading-mode.is-immersive-caption-lower-left .reading-target,
.speaking-modal-dialog.is-immersive-reading-mode.is-immersive-caption-lower-left .speaking-immersive-translation {
  text-align: left;
}

.speaking-immersive-caption-meta {
  display: contents;
}

.speaking-modal-dialog.is-immersive-reading-mode.is-immersive-caption-lower-left .speaking-immersive-caption-meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  width: max-content;
  max-width: 100%;
  min-height: 48px;
}

.speaking-modal-dialog.is-immersive-reading-mode.is-immersive-caption-lower-left .speaking-immersive-caption-meta .speaking-immersive-translation {
  flex: 0 1 auto;
  width: auto;
  max-width: 100%;
  min-width: 0;
}

.speaking-modal-dialog.is-immersive-reading-mode.is-immersive-caption-lower-left .speaking-immersive-caption-meta .speaking-voice-reception,
.speaking-modal-dialog.is-immersive-reading-mode.is-immersive-caption-lower-left .speaking-immersive-caption-meta .speaking-immersive-score {
  flex: 0 0 auto;
}

.speaking-modal-dialog.is-immersive-reading-mode.is-immersive-caption-lower-left .speaking-immersive-caption-meta .speaking-voice-reception {
  order: 1;
}

.speaking-modal-dialog.is-immersive-reading-mode.is-immersive-caption-lower-left .speaking-immersive-caption-meta .speaking-immersive-score {
  order: 2;
}

.speaking-modal.is-immersive-artwork-dark .reading-target {
  color: #fff9ed;
  text-shadow: 0 3px 20px rgba(2, 6, 23, 0.92);
}

.speaking-modal.is-immersive-artwork-dark .speaking-target-line {
  -webkit-text-stroke: 0.6px rgba(2, 6, 23, 0.90);
  text-shadow:
    0 1px 2px rgba(2, 6, 23, 0.98),
    0 0 12px rgba(2, 6, 23, 0.92),
    0 0 28px rgba(2, 6, 23, 0.72),
    0 0 3px rgba(255, 249, 237, 0.26);
}

/* A dense inner halo and a wide, soft falloff keep image detail away from the letters. */
.speaking-modal-dialog.is-immersive-reading-mode.has-immersive-text-glow .speaking-target-line {
  -webkit-text-stroke: 0.8px rgba(255, 255, 255, 0.98);
  text-shadow:
    0 0 0.035em #fff,
    0 0 0.1em #fff,
    0 0 0.2em #fff,
    0 0 0.35em rgba(255, 255, 255, 0.98),
    0 0 0.35em rgba(255, 255, 255, 0.92),
    0 0 0.55em rgba(255, 255, 255, 0.84),
    0 0 0.8em rgba(255, 255, 255, 0.68);
}

.speaking-modal.is-immersive-artwork-dark .speaking-modal-dialog.is-immersive-reading-mode.has-immersive-text-glow .speaking-target-line {
  -webkit-text-stroke: 0.8px rgba(2, 6, 23, 0.98);
  text-shadow:
    0 0 0.035em #020617,
    0 0 0.1em #020617,
    0 0 0.2em #020617,
    0 0 0.35em rgba(2, 6, 23, 0.98),
    0 0 0.35em rgba(2, 6, 23, 0.92),
    0 0 0.55em rgba(2, 6, 23, 0.84),
    0 0 0.8em rgba(2, 6, 23, 0.68);
}

.speaking-modal-dialog.is-immersive-reading-mode.has-immersive-text-glow .speaking-immersive-translation {
  color: #fff;
  text-shadow:
    0 1px 2px #020617,
    0 0 5px #020617,
    0 0 12px rgba(2, 6, 23, 0.96),
    0 0 22px rgba(2, 6, 23, 0.88),
    0 0 34px rgba(2, 6, 23, 0.68);
}

.speaking-modal-dialog.is-immersive-reading-mode .speaking-ready-countdown {
  border-radius: 32px;
}

.speaking-modal-dialog.is-immersive-reading-mode .speaking-immersive-score:not([hidden]) {
  display: inline-grid;
  place-items: center;
  min-width: 64px;
  min-height: 44px;
  color: rgba(255, 255, 255, 0.96);
  font-size: 28px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-shadow: 0 2px 14px rgba(2, 6, 23, 0.92), 0 0 8px rgba(255, 255, 255, 0.46);
}

.speaking-modal-dialog.is-immersive-reading-mode .speaking-immersive-word-scores {
  position: fixed;
  z-index: 11;
  left: 50%;
  bottom: calc(max(78px, calc(env(safe-area-inset-bottom) + 68px)) + var(--immersive-shortcut-space, 0px));
  width: min(1520px, 92vw);
  display: flex;
  align-items: stretch;
  align-content: flex-start;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  max-height: calc(2 * 60px + 8px + 11px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 4px 2px 7px;
  transform: translateX(-50%);
  pointer-events: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.42) transparent;
}

.speaking-modal-dialog.is-immersive-reading-mode .speaking-immersive-word-scores[hidden] {
  display: none !important;
}

.speaking-immersive-word-score {
  flex: 0 0 auto;
  min-width: 142px;
  height: 60px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.62);
  color: #fff;
  padding: 9px 10px;
  box-shadow: 0 8px 22px rgba(2, 6, 23, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px) saturate(1.08);
}

.speaking-immersive-word-score.is-playable {
  appearance: none;
  width: auto;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.speaking-immersive-word-score.is-playable:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.58);
  background: rgba(15, 23, 42, 0.72);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.speaking-immersive-word-score.is-playable:focus-visible {
  outline: 2px solid #f8fafc;
  outline-offset: 2px;
}

.speaking-immersive-word-score.is-playable:disabled {
  cursor: wait;
  opacity: 0.78;
}

.speaking-immersive-word-score.is-playable.is-audio-loading,
.speaking-immersive-word-score.is-playable.is-audio-playing {
  border-color: rgba(191, 219, 254, 0.92);
  background: rgba(37, 99, 235, 0.58);
  opacity: 1;
}

.speaking-immersive-word-label {
  min-width: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.94);
  font-size: 20px;
  font-weight: 850;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.speaking-immersive-word-value {
  min-width: 38px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #172033;
  padding: 0 8px;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.speaking-immersive-word-score.is-high,
.speaking-immersive-word-score.is-ok {
  border-color: rgba(134, 239, 172, 0.54);
}

.speaking-immersive-word-score.is-warn {
  border-color: rgba(253, 230, 138, 0.62);
}

.speaking-immersive-word-score.is-low {
  border-color: rgba(252, 165, 165, 0.64);
}

.speaking-immersive-word-score.is-exempt {
  border-color: rgba(103, 232, 249, 0.52);
}

.speaking-immersive-word-score.is-low .speaking-immersive-word-value {
  color: #991b1b;
}

.speaking-immersive-word-score.is-warn .speaking-immersive-word-value {
  color: #92400e;
}

.speaking-immersive-word-score.is-exempt .speaking-immersive-word-value {
  min-width: 48px;
  color: #0e7490;
  font-size: 12px;
}

.speaking-modal-dialog.is-immersive-reading-mode .speaking-immersive-score.is-warn,
.speaking-modal-dialog.is-immersive-reading-mode .speaking-immersive-score.is-low {
  color: #fff7ed;
}

.speaking-modal-dialog.is-immersive-reading-mode .speaking-panel-head {
  position: fixed;
  z-index: 12;
  left: calc(max(16px, env(safe-area-inset-left)) + 62px);
  bottom: max(16px, env(safe-area-inset-bottom));
  display: block;
  border: 0;
  background: transparent;
  padding: 0;
  backdrop-filter: none;
  pointer-events: auto;
}

.speaking-modal-dialog.is-immersive-reading-mode .speaking-panel-head strong {
  min-height: 36px;
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(15, 23, 42, 0.34);
  color: #fff;
  padding: 0 12px;
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.16);
}

.speaking-modal-dialog.is-immersive-reading-mode .speaking-panel-head strong {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(15, 23, 42, 0.23);
  box-shadow: 0 4px 14px rgba(2, 6, 23, 0.10);
}

.speaking-modal-dialog.is-immersive-reading-mode .reading-assessment-row {
  position: static;
  display: block;
}

.speaking-modal-dialog.is-immersive-reading-mode .reading-tools {
  position: fixed;
  z-index: 12;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  width: auto;
  display: grid;
  grid-template-columns: repeat(5, minmax(72px, 88px));
  gap: 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
  backdrop-filter: none;
  transform: translateX(-50%);
  pointer-events: auto;
}

@media (min-width: 641px) and (hover: hover) and (pointer: fine) {
  .speaking-modal-dialog.is-immersive-reading-mode.has-immersive-font-picker:not(.is-appreciate-mode):has(.speaking-immersive-shortcut-hints) {
    --immersive-shortcut-space: 20px;
  }

  .speaking-modal-dialog.is-immersive-reading-mode.has-immersive-font-picker:not(.is-appreciate-mode) .speaking-immersive-shortcut-hints {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px 12px;
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
    font-weight: 400;
    line-height: 14px;
    text-shadow: 0 1px 3px rgba(2, 6, 23, 0.88);
    pointer-events: none;
  }
}

.speaking-immersive-shortcut-hints .speaking-shortcut-group {
  display: inline-flex;
  gap: 12px;
}

.speaking-immersive-shortcut-hints .speaking-shortcut-group > span {
  white-space: nowrap;
}

.speaking-immersive-shortcut-hints kbd {
  font: inherit;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.86);
}

.speaking-modal-dialog.is-immersive-reading-mode .reading-tools button {
  min-width: 0;
  min-height: 44px;
  border-color: rgba(255, 255, 255, 0.30);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.52);
  color: #273449;
  padding: 0 8px;
  font-size: 12px;
  box-shadow: 0 4px 14px rgba(2, 6, 23, 0.10);
  backdrop-filter: none;
}

.speaking-modal-dialog.is-immersive-reading-mode .reading-tools button:first-child {
  border-color: rgba(74, 222, 128, 0.48);
  background: rgba(220, 252, 231, 0.74);
  color: #166534;
}

.speaking-modal-dialog.is-immersive-reading-mode > .reading-feedback {
  position: fixed;
  z-index: 12;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  max-width: min(320px, 28vw);
  min-height: 36px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-left-width: 1px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.34);
  color: rgba(255, 255, 255, 0.94);
  padding: 0 12px;
  font-size: 12px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.16);
  backdrop-filter: none;
}

.speaking-modal-dialog.is-immersive-reading-mode > .reading-feedback {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(15, 23, 42, 0.23);
  box-shadow: 0 4px 14px rgba(2, 6, 23, 0.10);
}

.speaking-modal-dialog.is-immersive-reading-mode > .reading-feedback {
  font-size: 0;
}

.speaking-modal-dialog.is-immersive-reading-mode > .reading-feedback::after {
  content: attr(data-compact-status);
  font-size: 12px;
}

.speaking-modal-dialog.is-immersive-reading-mode > .reading-feedback.is-good {
  border-color: rgba(74, 222, 128, 0.42);
  background: rgba(20, 83, 45, 0.58);
  color: #f0fdf4;
}

.speaking-modal-dialog.is-immersive-reading-mode > .reading-feedback.is-bad {
  border-color: rgba(252, 165, 165, 0.48);
  background: rgba(127, 29, 29, 0.62);
  color: #fef2f2;
}

@media (max-width: 1120px) {
  .reader-shell {
    grid-template-columns: 1fr;
  }

  .practice-panel {
    position: static;
  }

  .is-monitor-mode .passage-hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .is-monitor-mode .passage-copy {
    min-height: 0;
  }

  .is-monitor-mode .reading-scene-frame {
    min-height: 280px;
  }

  .reading-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reading-tools .reading-meter {
    grid-column: 1 / -1;
  }

  .speaking-modal-dialog:not(.is-immersive-reading-mode) .reading-tools button:nth-of-type(5) {
    grid-column: 1 / -1;
    width: calc(50% - 5px);
    justify-self: center;
  }

  .speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .reading-assessment-row {
    grid-template-columns: 1fr;
    grid-template-areas:
      "metrics"
      "tools"
      "words";
  }

  .speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .reading-assessment-row .reading-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .speaking-modal-dialog.is-visual-reading-mode {
    min-height: calc(100dvh - 32px);
  }

  .speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual {
    --visual-stage-height: clamp(300px, 48dvh, 480px);
  }

  .speaking-visual-stage {
    height: clamp(240px, 36dvh, 380px);
  }
}

@media (max-width: 640px) {
  .speaking-visual-stage img {
    object-fit: var(--speaking-visual-mobile-object-fit, var(--speaking-visual-object-fit, cover));
  }

  .full-reading-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions {
    width: 100%;
    justify-content: stretch;
  }

  .passage-switcher {
    width: 100%;
  }

  .passage-switcher select {
    min-width: 0;
    max-width: none;
    flex: 1 1 auto;
  }

  .top-actions a,
  .top-actions button {
    flex: 1 1 auto;
  }

  .monitor-banner {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .monitor-actions {
    width: 100%;
    justify-content: stretch;
  }

  .monitor-actions button {
    flex: 1 1 auto;
  }

  .monitor-start-button {
    width: 100%;
  }

  .monitor-banner h1 {
    font-size: clamp(28px, 9vw, 36px);
    line-height: 1.08;
  }

  .is-monitor-mode .passage-hero {
    padding: 16px;
  }

  .is-monitor-mode .passage-hero h1 {
    font-size: clamp(32px, 11vw, 46px);
  }

  .passage-hero > img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .full-reading-app:not(.is-monitor-mode) .passage-hero.has-book-source {
    grid-template-columns: 1fr;
  }

  .full-reading-app:not(.is-monitor-mode) .passage-hero > img.is-book-topic {
    width: min(190px, 70vw);
    height: auto;
    aspect-ratio: 3 / 4;
    justify-self: start;
  }

  .reading-scene-frame {
    min-height: 220px;
  }

  .reading-scene-frame.is-book-topic img {
    top: 16px;
    bottom: 16px;
    max-width: min(64%, 220px);
    height: calc(100% - 32px);
  }

  .reading-scene-clouds {
    height: 28%;
  }

  .reading-scene-seeds {
    width: 34%;
    height: 42%;
  }

  .reading-scene-reeds {
    width: 30%;
    height: 44%;
  }

  .reading-scene-flowers {
    width: 28%;
    height: 34%;
  }

  .is-monitor-mode .reading-scene-reeds {
    width: 24%;
    height: 34%;
  }

  .is-monitor-mode .reading-scene-grass {
    height: 24%;
  }

  .is-monitor-mode .reading-scene-flowers {
    width: 22%;
    height: 26%;
  }

  .speaking-motion-wave {
    top: 24px;
    width: 128px;
    height: 44px;
  }

  .speaking-motion-pulse,
  .speaking-motion-check {
    width: 82px;
    height: 70px;
  }

  .speaking-motion-pulse {
    top: 78px;
    right: 3%;
  }

  .speaking-motion-check {
    top: 78px;
    right: 19%;
  }

  .sentence-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .sentence-score {
    grid-column: 2;
    justify-self: start;
  }

  .now-actions,
  .score-card {
    grid-template-columns: 1fr;
  }

  .pronunciation-focus-item {
    grid-template-columns: 1fr;
  }

  .pronunciation-focus-meaning {
    justify-self: start;
    max-width: none;
    white-space: normal;
  }

  .pronunciation-focus-actions {
    grid-template-columns: 1fr;
  }

  .vocabulary-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .vocabulary-meaning {
    justify-self: start;
    white-space: normal;
  }

  .reader-shell > .review-panel,
  .reader-shell > .comprehension-panel {
    padding: 18px;
  }

  .reader-shell > .review-panel h2,
  .reader-shell > .comprehension-panel h2 {
    font-size: 32px;
    line-height: 1.08;
  }

  .reader-shell > .comprehension-panel {
    gap: 18px;
  }

  .reader-shell > .comprehension-panel .comprehension-summary {
    padding: 14px;
    font-size: 17px;
    line-height: 1.65;
  }

  .reader-shell > .comprehension-panel .comprehension-form {
    gap: 18px;
  }

  .reader-shell > .comprehension-panel .comprehension-question {
    padding: 16px;
  }

  .reader-shell > .comprehension-panel .comprehension-question-text {
    font-size: 22px;
    line-height: 1.32;
  }

  .reader-shell > .comprehension-panel .comprehension-option {
    min-height: 64px;
    gap: 12px;
    padding: 14px;
  }

  .reader-shell > .comprehension-panel .comprehension-option-mark {
    width: 38px;
    height: 38px;
    font-size: 18px;
  }

  .reader-shell > .comprehension-panel .comprehension-option-text {
    font-size: 18px;
    line-height: 1.45;
  }

  .reader-shell > .review-panel .review-item label,
  .reader-shell > .comprehension-panel .review-feedback,
  .reader-shell > .review-panel .review-feedback {
    font-size: 16px;
  }

  .speaking-modal {
    padding: 10px;
  }

  .speaking-modal-dialog {
    min-height: calc(100dvh - 20px);
    padding: 14px;
  }

  .speaking-modal-top {
    padding: 14px;
    align-items: flex-start;
  }

  .speaking-title-motion {
    flex-basis: 34px;
    width: 34px;
    height: 34px;
  }

  .speaking-modal-dialog:not(.is-visual-reading-mode) .speaking-title-motion {
    display: none;
  }

  .speaking-modal-top h2 {
    font-size: 24px;
  }

  .speaking-modal-dialog:not(.is-visual-reading-mode) .speaking-modal-top small {
    width: 100%;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 6px;
    align-items: center;
    flex-wrap: nowrap;
    border-radius: 8px;
    padding: 6px 8px;
    font-size: 12px;
  }

  .speaking-modal-dialog:not(.is-visual-reading-mode) .speaking-segment-count {
    gap: 3px;
  }

  .speaking-modal-dialog:not(.is-visual-reading-mode) .speaking-segment-count b {
    font-size: 22px;
    line-height: 1;
  }

  .speaking-modal-dialog:not(.is-visual-reading-mode) .speaking-segment-section {
    overflow: hidden;
    color: rgba(255, 255, 255, 0.86);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .speaking-modal-actions {
    gap: 8px;
  }

  .speaking-mode-toggle {
    min-width: 78px;
    min-height: 42px;
    padding: 0 10px;
    font-size: 12px;
  }

  .speaking-visual-stage {
    min-height: 190px;
    height: min(34dvh, 280px);
  }

  .speaking-visual-caption {
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-width: calc(100% - 24px);
  }

  .speaking-visual-caption strong {
    font-size: 22px;
  }

  .speaking-visual-caption small {
    font-size: 12px;
  }

  .speaking-modal-dialog.is-visual-reading-mode {
    padding: 10px;
    gap: 10px;
  }

  .speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual {
    --visual-modal-pad: 10px;
    --visual-stage-height: min(40dvh, 320px);
    min-height: calc(100dvh - 20px);
    gap: 8px;
  }

  .speaking-modal-dialog.is-visual-reading-mode .speaking-modal-top {
    padding: 10px 12px;
  }

  .speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .speaking-modal-top {
    top: 20px;
    left: 20px;
    right: 20px;
    padding: 0;
  }

  .speaking-modal-dialog.is-visual-reading-mode .speaking-title-motion {
    display: none;
  }

  .speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .speaking-modal-heading {
    max-width: calc(100% - 216px);
  }

  .speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .speaking-modal-top small {
    max-width: calc(100vw - 168px);
    padding: 7px 10px;
    font-size: 13px;
  }

  .speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .speaking-segment-section {
    max-width: 138px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .speaking-mode-toggle {
    min-width: 76px;
    min-height: 40px;
    padding: 0 10px;
    font-size: 12px;
  }

  .speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .speaking-modal-close {
    width: 40px;
    height: 40px;
    font-size: 26px;
  }

  .speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .speaking-visual-height-control {
    top: 62px;
    right: 12px;
    width: min(148px, calc(100% - 42px));
    min-width: 0;
    min-height: 32px;
    padding: 6px 8px;
  }

  .speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .speaking-visual-height-control output {
    min-width: 28px;
    font-size: 10px;
  }

  .speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .speaking-visual-caption {
    left: 14px;
    right: 14px;
    bottom: 68px;
    max-width: calc(100% - 28px);
    gap: 3px;
  }

  .speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .speaking-visual-caption strong {
    font-size: clamp(20px, 6vw, 28px);
  }

  .speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .speaking-visual-caption small {
    display: none;
  }

  .speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .speaking-panel-head {
    top: calc(var(--visual-modal-pad) + var(--visual-stage-height) - 58px);
    right: 18px;
    min-height: 44px;
    max-width: calc(100% - 36px);
    padding: 6px 8px;
  }

  .speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .speaking-stage-label {
    font-size: 11px;
  }

  .speaking-modal-dialog.is-visual-reading-mode.has-speaking-visual .speaking-panel-head strong {
    min-height: 28px;
    padding: 0 10px;
    font-size: 12px;
  }

  .speaking-modal-dialog.is-visual-reading-mode textarea {
    min-height: 46px;
    height: 46px;
    font-size: 16px;
  }

  .speaking-modal-dialog.is-visual-reading-mode .reading-tools {
    gap: 8px;
    padding: 8px;
  }

  .reading-target {
    padding: 18px;
  }

  .speaking-modal-dialog.is-visual-reading-mode .reading-target {
    padding: 16px;
    font-size: clamp(26px, 8vw, 38px);
  }
}

/* Compact learning hub. Scoped to the overview so the monitor keeps its reading layout. */
.full-reading-app.is-reading-overview-page > .reader-shell {
  gap: 14px;
  padding-top: 14px;
}

.full-reading-app.is-reading-overview-page .passage-hero {
  grid-template-columns: minmax(0, 1fr) 104px;
  min-height: 0;
  gap: 18px;
  padding: 16px 20px;
}

.full-reading-app.is-reading-overview-page .passage-hero > img {
  width: 104px;
  height: 104px;
}

.full-reading-app.is-reading-overview-page .passage-hero h1 {
  font-size: 30px;
  line-height: 1.12;
}

.full-reading-app.is-reading-overview-page .passage-hero #passageSubtitle {
  margin-top: 5px;
  font-size: 15px;
}

.full-reading-app.is-reading-overview-page .overall-progress {
  min-height: 0;
  margin-top: 8px;
  padding: 10px 14px;
}

.full-reading-app.is-reading-overview-page .overview-task-hub {
  margin-top: 16px;
}

.full-reading-app.is-reading-overview-page .overview-section-head {
  align-items: center;
  margin-bottom: 10px;
}

.full-reading-app.is-reading-overview-page .overview-section-head h2 {
  font-size: 20px;
}

.full-reading-app.is-reading-overview-page .overview-reading-stats {
  justify-content: flex-end;
}

.full-reading-app.is-reading-overview-page .overview-reading-task {
  display: grid;
  grid-template-columns: minmax(170px, 0.72fr) minmax(0, 1.28fr);
  align-items: center;
  gap: 16px;
  border-top: 1px solid rgba(217, 119, 6, 0.3);
  border-bottom: 1px solid rgba(217, 119, 6, 0.3);
  background: rgba(255, 253, 247, 0.72);
  padding: 13px 16px;
}

.full-reading-app.is-reading-overview-page .overview-reading-heading h3 {
  margin: 2px 0 0;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.2;
}

.full-reading-app.is-reading-overview-page .overview-reading-heading > p {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.full-reading-app.is-reading-overview-page .overview-reading-task .overview-task-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.full-reading-app.is-reading-overview-page .overview-reading-task .overview-task-actions button {
  min-width: 0;
  min-height: 44px;
  border-color: rgba(148, 163, 184, 0.42);
  background: #fff;
  color: #1e293b;
  font-size: 14px;
  font-weight: 850;
  box-shadow: none;
}

.full-reading-app.is-reading-overview-page .overview-reading-task .overview-task-actions button:hover {
  border-color: rgba(37, 99, 235, 0.52);
  background: #eff6ff;
  color: #1d4ed8;
  transform: none;
}

.full-reading-app.is-reading-overview-page .overview-reading-task .overview-task-actions button:focus-visible,
.full-reading-app.is-reading-overview-page .overview-related-link:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.45);
  outline-offset: 2px;
}

.full-reading-app.is-reading-overview-page .overview-task-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.full-reading-app.is-reading-overview-page .overview-task-card {
  min-height: 148px;
  gap: 8px;
  border-radius: 6px;
  padding: 14px;
  box-shadow: none;
}

.full-reading-app.is-reading-overview-page .overview-task-card h3,
.full-reading-app.is-reading-overview-page .overview-ai-task strong {
  font-size: 18px;
}

.full-reading-app.is-reading-overview-page .overview-task-status,
.full-reading-app.is-reading-overview-page .overview-task-copy,
.full-reading-app.is-reading-overview-page .overview-ai-task small {
  font-size: 13px;
  line-height: 1.45;
}

.full-reading-app.is-reading-overview-page .overview-task-actions button,
.full-reading-app.is-reading-overview-page .overview-ai-cta {
  min-height: 44px;
}

.full-reading-app.is-reading-overview-page .overview-ai-cta {
  align-self: stretch;
  padding: 0 12px;
}

.full-reading-app.is-reading-overview-page .overview-related-content {
  margin-top: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.28);
  padding-top: 14px;
}

.full-reading-app.is-reading-overview-page .overview-related-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.full-reading-app.is-reading-overview-page .overview-related-head h2 {
  margin: 2px 0 0;
  color: #0f172a;
  font-size: 20px;
  line-height: 1.2;
}

.full-reading-app.is-reading-overview-page .overview-related-head > p {
  max-width: 420px;
  margin: 0;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  text-align: right;
}

.full-reading-app.is-reading-overview-page .overview-related-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.full-reading-app.is-reading-overview-page .overview-related-link {
  min-width: 0;
  min-height: 56px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.7);
  color: #1e293b;
  padding: 8px 10px;
  text-decoration: none;
}

.full-reading-app.is-reading-overview-page .overview-related-link:hover {
  border-color: rgba(37, 99, 235, 0.38);
  background: #f8fbff;
}

.full-reading-app.is-reading-overview-page .overview-related-type {
  color: #2563eb;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.full-reading-app.is-reading-overview-page .overview-related-copy {
  min-width: 0;
}

.full-reading-app.is-reading-overview-page .overview-related-copy strong,
.full-reading-app.is-reading-overview-page .overview-related-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.full-reading-app.is-reading-overview-page .overview-related-copy strong {
  color: #0f172a;
  font-size: 14px;
}

.full-reading-app.is-reading-overview-page .overview-related-copy small {
  margin-top: 2px;
  color: #64748b;
  font-size: 12px;
  font-weight: 650;
}

.full-reading-app.is-reading-overview-page .overview-related-arrow {
  color: #64748b;
  font-weight: 900;
}

.full-reading-app.is-reading-overview-page .overview-directory {
  margin-top: 16px;
}

.full-reading-app.is-reading-overview-page .overview-directory > summary {
  min-height: 60px;
}

.full-reading-app.is-reading-overview-page .overview-directory > summary strong {
  font-size: 18px;
}

.full-reading-app.is-reading-overview-page .overview-current-sentence {
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(248, 250, 252, 0.78);
  padding: 12px 14px;
}

.full-reading-app.is-reading-overview-page .overview-current-sentence #nowTitle {
  color: #334155;
  font-size: 13px;
}

.full-reading-app.is-reading-overview-page .overview-current-sentence #nowSentence {
  margin: 4px 0 0;
  color: #0f172a;
  font-size: 16px;
  font-weight: 750;
  line-height: 1.45;
}

@media (max-width: 860px) {
  .full-reading-app.is-reading-overview-page .overview-reading-task {
    grid-template-columns: 1fr;
  }

  .full-reading-app.is-reading-overview-page .overview-related-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .full-reading-app.is-reading-overview-page .overview-related-head > p {
    max-width: none;
    text-align: left;
  }
}

@media (max-width: 640px) {
  .full-reading-app.is-reading-overview-page .passage-hero {
    grid-template-columns: minmax(0, 1fr) 84px;
    gap: 12px;
    padding: 14px;
  }

  .full-reading-app.is-reading-overview-page .passage-hero > img,
  .full-reading-app.is-reading-overview-page:not(.is-monitor-mode) .passage-hero > img.is-book-topic {
    width: 84px;
    height: 84px;
    max-height: none;
    aspect-ratio: 1;
    justify-self: end;
  }

  .full-reading-app.is-reading-overview-page .passage-hero h1 {
    font-size: 25px;
  }

  .full-reading-app.is-reading-overview-page .overview-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .full-reading-app.is-reading-overview-page .overview-reading-stats {
    justify-content: flex-start;
  }

  .full-reading-app.is-reading-overview-page .overview-reading-task .overview-task-actions {
    grid-template-columns: 1fr;
  }

  .full-reading-app.is-reading-overview-page .overview-task-grid,
  .full-reading-app.is-reading-overview-page .overview-related-list {
    grid-template-columns: 1fr;
  }

  .full-reading-app.is-reading-overview-page .overview-related-copy small {
    white-space: normal;
  }
}

/* Final overview compactness overrides. They intentionally follow the original overview block. */
.full-reading-app.is-reading-overview-page > .reader-shell {
  gap: 14px;
  padding-top: 14px;
}

.full-reading-app.is-reading-overview-page .passage-hero {
  grid-template-columns: minmax(0, 1fr) 104px;
  min-height: 0;
  gap: 18px;
  padding: 16px 20px;
}

.full-reading-app.is-reading-overview-page .passage-hero > img {
  width: 104px;
  height: 104px;
}

.full-reading-app.is-reading-overview-page .passage-hero h1 {
  font-size: 30px;
  line-height: 1.12;
}

.full-reading-app.is-reading-overview-page .passage-hero #passageSubtitle {
  margin-top: 5px;
  font-size: 15px;
}

.full-reading-app.is-reading-overview-page .overall-progress {
  min-height: 0;
  margin-top: 8px;
  padding: 10px 14px;
}

.full-reading-app.is-reading-overview-page .overview-task-hub {
  margin-top: 16px;
}

.full-reading-app.is-reading-overview-page .overview-section-head {
  align-items: center;
  margin-bottom: 10px;
}

.full-reading-app.is-reading-overview-page .overview-section-head h2 {
  font-size: 20px;
}

.full-reading-app.is-reading-overview-page .overview-reading-stats {
  justify-content: flex-end;
}

.full-reading-app.is-reading-overview-page .overview-reading-task {
  display: grid;
  grid-template-columns: minmax(170px, 0.72fr) minmax(0, 1.28fr);
  align-items: center;
  gap: 16px;
  border-top: 1px solid rgba(217, 119, 6, 0.3);
  border-bottom: 1px solid rgba(217, 119, 6, 0.3);
  background: rgba(255, 253, 247, 0.72);
  padding: 13px 16px;
}

.full-reading-app.is-reading-overview-page .overview-reading-heading h3 {
  margin: 2px 0 0;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.2;
}

.full-reading-app.is-reading-overview-page .overview-reading-heading > p {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.full-reading-app.is-reading-overview-page .overview-reading-task .overview-task-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.full-reading-app.is-reading-overview-page .overview-reading-task .overview-task-actions button {
  min-width: 0;
  min-height: 44px;
  border-color: rgba(148, 163, 184, 0.42);
  background: #fff;
  color: #1e293b;
  font-size: 14px;
  font-weight: 850;
  box-shadow: none;
}

.full-reading-app.is-reading-overview-page .overview-reading-task .overview-task-actions button:hover {
  border-color: rgba(37, 99, 235, 0.52);
  background: #eff6ff;
  color: #1d4ed8;
  transform: none;
}

.full-reading-app.is-reading-overview-page .overview-reading-task .overview-task-actions button:focus-visible,
.full-reading-app.is-reading-overview-page .overview-related-link:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.45);
  outline-offset: 2px;
}

.full-reading-app.is-reading-overview-page .overview-task-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.full-reading-app.is-reading-overview-page .overview-task-card {
  min-height: 148px;
  gap: 8px;
  border-radius: 6px;
  padding: 14px;
  box-shadow: none;
}

.full-reading-app.is-reading-overview-page .overview-task-card h3,
.full-reading-app.is-reading-overview-page .overview-ai-task strong {
  font-size: 18px;
}

.full-reading-app.is-reading-overview-page .overview-task-status,
.full-reading-app.is-reading-overview-page .overview-task-copy,
.full-reading-app.is-reading-overview-page .overview-ai-task small {
  font-size: 13px;
  line-height: 1.45;
}

.full-reading-app.is-reading-overview-page .overview-task-actions button,
.full-reading-app.is-reading-overview-page .overview-ai-cta {
  min-height: 44px;
}

.full-reading-app.is-reading-overview-page .overview-ai-cta {
  align-self: stretch;
  padding: 0 12px;
}

.full-reading-app.is-reading-overview-page .overview-related-content {
  margin-top: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.28);
  padding-top: 14px;
}

.full-reading-app.is-reading-overview-page .overview-related-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.full-reading-app.is-reading-overview-page .overview-related-head h2 {
  margin: 2px 0 0;
  color: #0f172a;
  font-size: 20px;
  line-height: 1.2;
}

.full-reading-app.is-reading-overview-page .overview-related-head > p {
  max-width: 420px;
  margin: 0;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  text-align: right;
}

.full-reading-app.is-reading-overview-page .overview-related-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.full-reading-app.is-reading-overview-page .overview-related-link {
  min-width: 0;
  min-height: 56px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.7);
  color: #1e293b;
  padding: 8px 10px;
  text-decoration: none;
}

.full-reading-app.is-reading-overview-page .overview-related-link:hover {
  border-color: rgba(37, 99, 235, 0.38);
  background: #f8fbff;
}

.full-reading-app.is-reading-overview-page .overview-related-type {
  color: #2563eb;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.full-reading-app.is-reading-overview-page .overview-related-copy {
  min-width: 0;
}

.full-reading-app.is-reading-overview-page .overview-related-copy strong,
.full-reading-app.is-reading-overview-page .overview-related-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.full-reading-app.is-reading-overview-page .overview-related-copy strong {
  color: #0f172a;
  font-size: 14px;
}

.full-reading-app.is-reading-overview-page .overview-related-copy small {
  margin-top: 2px;
  color: #64748b;
  font-size: 12px;
  font-weight: 650;
}

.full-reading-app.is-reading-overview-page .overview-related-arrow {
  color: #64748b;
  font-weight: 900;
}

.full-reading-app.is-reading-overview-page .overview-directory {
  margin-top: 16px;
}

.full-reading-app.is-reading-overview-page .overview-directory > summary {
  min-height: 60px;
}

.full-reading-app.is-reading-overview-page .overview-directory > summary strong {
  font-size: 18px;
}

.full-reading-app.is-reading-overview-page .overview-current-sentence {
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(248, 250, 252, 0.78);
  padding: 12px 14px;
}

.full-reading-app.is-reading-overview-page .overview-current-sentence #nowTitle {
  color: #334155;
  font-size: 13px;
}

.full-reading-app.is-reading-overview-page .overview-current-sentence #nowSentence {
  margin: 4px 0 0;
  color: #0f172a;
  font-size: 16px;
  font-weight: 750;
  line-height: 1.45;
}

@media (max-width: 860px) {
  .full-reading-app.is-reading-overview-page .overview-reading-task {
    grid-template-columns: 1fr;
  }

  .full-reading-app.is-reading-overview-page .overview-related-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .full-reading-app.is-reading-overview-page .overview-related-head > p {
    max-width: none;
    text-align: left;
  }
}

@media (max-width: 640px) {
  .full-reading-app.is-reading-overview-page .passage-hero {
    grid-template-columns: minmax(0, 1fr) 84px;
    gap: 12px;
    padding: 14px;
  }

  .full-reading-app.is-reading-overview-page .passage-hero > img,
  .full-reading-app.is-reading-overview-page:not(.is-monitor-mode) .passage-hero > img.is-book-topic {
    width: 84px;
    height: 84px;
    max-height: none;
    aspect-ratio: 1;
    justify-self: end;
  }

  .full-reading-app.is-reading-overview-page .passage-hero h1 {
    font-size: 25px;
  }

  .full-reading-app.is-reading-overview-page .overview-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .full-reading-app.is-reading-overview-page .overview-reading-stats {
    justify-content: flex-start;
  }

  .full-reading-app.is-reading-overview-page .overview-reading-task .overview-task-actions {
    grid-template-columns: 1fr;
  }

  .full-reading-app.is-reading-overview-page .overview-task-grid,
  .full-reading-app.is-reading-overview-page .overview-related-list {
    grid-template-columns: 1fr;
  }

  .full-reading-app.is-reading-overview-page .overview-related-copy small {
    white-space: normal;
  }
}

@media (max-width: 640px) {
  .speaking-modal-dialog.is-immersive-reading-mode .speaking-immersive-hud {
    top: max(10px, env(safe-area-inset-top));
    left: max(10px, env(safe-area-inset-left));
  }

  .speaking-modal-dialog.is-immersive-reading-mode .speaking-modal-top {
    top: max(10px, env(safe-area-inset-top));
    right: max(10px, env(safe-area-inset-right));
    max-width: calc(100vw - 76px);
  }

  .speaking-modal-dialog.is-immersive-reading-mode .speaking-modal-actions {
    flex-wrap: wrap;
    gap: 4px;
  }

  .speaking-modal-dialog.is-immersive-reading-mode .speaking-modal-actions #xboxGamepadBadge {
    order: 1;
  }

  .speaking-modal-dialog.is-immersive-reading-mode #readingFlowMode {
    width: 86px;
    min-width: 86px;
  }

  .speaking-modal-dialog.is-immersive-reading-mode.has-immersive-font-picker .speaking-caption-controls {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px;
    width: max-content;
    max-width: calc(100vw - 20px);
  }

  .speaking-modal-dialog.is-immersive-reading-mode.has-immersive-font-picker .speaking-stage-board {
    padding-top: calc(max(10px, env(safe-area-inset-top)) + 106px);
  }

  .speaking-modal-dialog.is-immersive-reading-mode .speaking-immersive-bgm {
    left: max(10px, env(safe-area-inset-left));
    bottom: calc(max(10px, env(safe-area-inset-bottom)) + 104px + var(--immersive-shortcut-space, 0px));
  }

  .speaking-modal-dialog.is-immersive-reading-mode .speaking-mode-toggle {
    min-width: 100px;
    min-height: 44px;
    padding: 0 8px;
    font-size: 12px;
  }

  .speaking-modal-dialog.is-immersive-reading-mode .speaking-guided-reading-toggle {
    min-height: 44px;
    padding: 0 10px;
    font-size: 12px;
  }

  .speaking-modal-dialog.is-immersive-reading-mode .speaking-modal-close {
    width: 44px;
    height: 44px;
    font-size: 26px;
  }

  .speaking-modal-dialog.is-immersive-reading-mode .speaking-stage-board {
    padding: 76px 16px calc(176px + var(--immersive-shortcut-space, 0px));
  }

  .speaking-modal-dialog.is-immersive-reading-mode .speaking-focus-stage {
    width: 100%;
    gap: 12px;
    transform: translateY(18px);
  }

  .speaking-modal-dialog.is-immersive-reading-mode.is-immersive-caption-lower-left .speaking-focus-stage {
    bottom: calc(256px + var(--immersive-shortcut-space, 0px));
    left: max(16px, env(safe-area-inset-left));
    width: min(90vw, 560px);
  }

  .speaking-modal-dialog.is-immersive-reading-mode.is-immersive-caption-lower-left:has(.speaking-immersive-word-scores:not([hidden])) .speaking-focus-stage {
    bottom: calc(256px + var(--immersive-shortcut-space, 0px));
  }

  .speaking-modal-dialog.is-immersive-reading-mode .reading-target {
    padding: 0;
    width: min(90vw, 560px);
    font-size: 42px;
    line-height: 1.12;
    font-weight: 500;
  }

  .speaking-modal-dialog.is-immersive-reading-mode .speaking-immersive-translation {
    width: min(90vw, 560px);
    font-size: 25px;
    line-height: 1.45;
  }

  .speaking-modal-dialog.is-immersive-reading-mode .speaking-immersive-score:not([hidden]) {
    min-width: 52px;
    min-height: 36px;
    font-size: 24px;
  }

  .speaking-modal-dialog.is-immersive-reading-mode .reading-tools {
    bottom: max(10px, env(safe-area-inset-bottom));
    width: min(340px, calc(100vw - 20px));
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
  }

  .speaking-modal-dialog.is-immersive-reading-mode .speaking-immersive-word-scores {
    bottom: calc(max(10px, env(safe-area-inset-bottom)) + 104px + var(--immersive-shortcut-space, 0px));
    width: min(92vw, 560px);
    gap: 6px;
    max-height: calc(2 * 54px + 6px + 11px);
  }

  .speaking-modal-dialog.is-immersive-reading-mode .speaking-immersive-word-score {
    min-width: 114px;
    height: 54px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
    padding: 8px 9px;
  }

  .speaking-modal-dialog.is-immersive-reading-mode .speaking-immersive-word-label {
    font-size: 17px;
  }

  .speaking-modal-dialog.is-immersive-reading-mode .speaking-immersive-word-value {
    min-width: 34px;
    height: 30px;
    font-size: 15px;
  }

  .speaking-modal-dialog.is-immersive-reading-mode .reading-tools button {
    grid-column: span 2;
    width: auto;
    justify-self: stretch;
    min-height: 44px;
    padding: 0 6px;
    font-size: 12px;
  }

  .speaking-modal-dialog.is-immersive-reading-mode .reading-tools button:nth-of-type(4) {
    grid-column: 2 / span 2;
  }

  .speaking-modal-dialog.is-immersive-reading-mode .reading-tools button:nth-of-type(5) {
    grid-column: 4 / span 2;
  }

  .speaking-modal-dialog.is-immersive-reading-mode .speaking-panel-head {
    left: calc(max(10px, env(safe-area-inset-left)) + 62px);
    bottom: calc(max(10px, env(safe-area-inset-bottom)) + 104px + var(--immersive-shortcut-space, 0px));
    max-width: calc(50vw - 16px);
  }

  .speaking-modal-dialog.is-immersive-reading-mode .speaking-panel-head strong {
    min-height: 34px;
    max-width: 100%;
    overflow: hidden;
    padding: 0 10px;
    font-size: 11px;
    text-overflow: ellipsis;
  }

  .speaking-modal-dialog.is-immersive-reading-mode > .reading-feedback {
    right: max(10px, env(safe-area-inset-right));
    bottom: calc(max(10px, env(safe-area-inset-bottom)) + 104px + var(--immersive-shortcut-space, 0px));
    max-width: calc(50vw - 16px);
    min-height: 34px;
    padding: 0 10px;
  }

  .speaking-modal-dialog.is-immersive-reading-mode > .reading-feedback::after {
    font-size: 11px;
  }
}

@media (max-width: 370px) {
  .speaking-modal-dialog.is-immersive-reading-mode.has-immersive-font-picker .speaking-stage-board {
    padding-top: calc(max(10px, env(safe-area-inset-top)) + 156px);
  }

  .speaking-modal-dialog.is-immersive-reading-mode.has-immersive-font-picker.is-keyword-reading-mode .speaking-stage-board {
    padding-top: calc(max(10px, env(safe-area-inset-top)) + 206px);
  }
}

@media (max-height: 560px) and (orientation: landscape) {
  .speaking-modal-dialog.is-immersive-reading-mode .speaking-stage-board {
    padding: 64px 18px calc(76px + var(--immersive-shortcut-space, 0px));
  }

  .speaking-modal-dialog.is-immersive-reading-mode.has-immersive-font-picker .speaking-caption-controls {
    position: static;
  }

  .speaking-modal-dialog.is-immersive-reading-mode.has-immersive-font-picker .speaking-stage-board {
    padding-top: 64px;
  }

  .speaking-modal-dialog.is-immersive-reading-mode .reading-target {
    font-size: 50px;
  }

  .speaking-modal-dialog.is-immersive-reading-mode .speaking-focus-stage {
    transform: translateY(18px);
  }

  .speaking-modal-dialog.is-immersive-reading-mode.is-immersive-caption-lower-left .speaking-focus-stage {
    bottom: calc(210px + var(--immersive-shortcut-space, 0px));
    left: max(18px, env(safe-area-inset-left));
  }

  .speaking-modal-dialog.is-immersive-reading-mode.is-immersive-caption-lower-left:has(.speaking-immersive-word-scores:not([hidden])) .speaking-focus-stage {
    bottom: calc(210px + var(--immersive-shortcut-space, 0px));
  }

  .speaking-modal-dialog.is-immersive-reading-mode .reading-tools {
    width: min(620px, calc(100vw - 220px));
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .speaking-modal-dialog.is-immersive-reading-mode .speaking-immersive-word-scores {
    bottom: calc(max(58px, calc(env(safe-area-inset-bottom) + 52px)) + var(--immersive-shortcut-space, 0px));
    width: min(66vw, 760px);
  }

  .speaking-modal-dialog.is-immersive-reading-mode .speaking-panel-head,
  .speaking-modal-dialog.is-immersive-reading-mode > .reading-feedback {
    bottom: max(10px, env(safe-area-inset-bottom));
  }
}

@media (max-height: 560px) and (orientation: landscape) and (min-width: 641px) and (hover: hover) and (pointer: fine) {
  .speaking-modal-dialog.is-immersive-reading-mode.has-immersive-font-picker:not(.is-appreciate-mode):has(.speaking-immersive-shortcut-hints) .speaking-immersive-word-scores {
    bottom: calc(max(66px, calc(env(safe-area-inset-bottom) + 60px)) + var(--immersive-shortcut-space));
  }
}

.speaking-modal-dialog.is-immersive-reading-mode.is-appreciate-mode .speaking-focus-stage {
  transition: opacity 420ms ease, bottom 640ms cubic-bezier(0.22, 1, 0.36, 1), max-height 640ms cubic-bezier(0.22, 1, 0.36, 1);
}

.speaking-modal-dialog.is-immersive-reading-mode.is-appreciate-mode.is-immersive-caption-lower-left .speaking-focus-stage {
  bottom: 104px;
  max-height: calc(100dvh - 128px);
}

@media (max-width: 640px) {
  .speaking-modal-dialog.is-immersive-reading-mode.is-appreciate-mode.is-immersive-caption-lower-left .speaking-focus-stage {
    bottom: 196px;
  }
}

@media (max-height: 560px) and (orientation: landscape) {
  .speaking-modal-dialog.is-immersive-reading-mode.is-appreciate-mode.is-immersive-caption-lower-left .speaking-focus-stage {
    bottom: 112px;
  }
}

.speaking-modal-dialog.is-immersive-reading-mode.is-appreciate-mode .speaking-focus-stage.is-appreciate-caption-out {
  opacity: 0;
}

.speaking-modal-dialog.is-immersive-reading-mode.is-appreciate-mode .reading-tools {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: max-content;
  grid-template-columns: none;
}

.speaking-modal-dialog.is-immersive-reading-mode.is-appreciate-mode .reading-tools button:nth-of-type(-n+3),
.speaking-modal-dialog.is-immersive-reading-mode.is-appreciate-mode .reading-meter,
.speaking-modal-dialog.is-immersive-reading-mode.is-appreciate-mode .speaking-voice-reception,
.speaking-modal-dialog.is-immersive-reading-mode.is-appreciate-mode .speaking-immersive-score,
.speaking-modal-dialog.is-immersive-reading-mode.is-appreciate-mode .speaking-immersive-word-scores,
.speaking-modal-dialog.is-immersive-reading-mode.is-appreciate-mode .speaking-ready-countdown {
  display: none;
}

.speaking-modal-dialog.is-immersive-reading-mode.is-appreciate-mode .reading-tools button:nth-of-type(n+4) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  grid-column: auto;
  width: auto;
  min-width: 72px;
  height: 36px;
  min-height: 36px;
  margin: 0;
  padding: 0 12px;
  line-height: 1;
  font-size: 13px;
}

.appreciate-hints {
  position: fixed;
  z-index: 12;
  left: 50%;
  bottom: calc(max(16px, env(safe-area-inset-bottom)) + 52px);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  width: max-content;
  max-width: calc(100vw - 24px);
  margin: 0;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.08em;
  pointer-events: none;
  text-shadow: 0 1px 8px rgba(2, 6, 23, 0.45);
}

.appreciate-hints > span {
  white-space: nowrap;
}

.appreciate-hints[hidden] {
  display: none;
}

.appreciate-font-hint {
  display: none;
}

.appreciate-caption-toggle[hidden] {
  display: none !important;
}

.speaking-modal-dialog.is-appreciate-mode .speaking-guided-reading-toggle,
.speaking-modal-dialog.is-appreciate-mode .speaking-mode-picker {
  display: none;
}

/* Reserve space for glosses while preserving the training score markup. */
.speaking-modal-dialog.is-keyword-reading-mode.has-appreciate-highlights:not(.is-immersive-reading-mode) .reading-target {
  line-height: 2.1;
}

.speaking-modal-dialog.is-keyword-reading-mode .appreciate-term-text {
  display: inline-block;
  max-width: 100%;
  white-space: normal;
}

.speaking-modal-dialog.is-keyword-reading-mode:not(.is-immersive-reading-mode) .speaking-modal-actions {
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .speaking-modal-dialog.is-keyword-reading-mode:not(.is-immersive-reading-mode) .speaking-modal-top {
    flex-direction: column;
    gap: 12px;
  }

  .speaking-modal-dialog.is-keyword-reading-mode:not(.is-immersive-reading-mode) .speaking-modal-actions {
    width: 100%;
    gap: 6px;
  }

  .speaking-modal-dialog.is-keyword-reading-mode.has-appreciate-highlights:not(.is-immersive-reading-mode) .reading-target {
    font-size: 26px;
  }

  .speaking-modal-dialog.is-keyword-reading-mode .appreciate-caption-toggle {
    min-height: 44px;
  }

  .speaking-modal-dialog.is-keyword-reading-mode.is-immersive-reading-mode .appreciate-caption-toggle {
    min-width: 108px;
  }

  .speaking-modal-dialog.is-keyword-reading-mode.is-immersive-reading-mode .speaking-font-toggle {
    width: 142px;
    max-width: 142px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

.speaking-modal-dialog .appreciate-caption-toggle {
  background: rgba(15, 23, 42, 0.14);
  border-color: rgba(255, 255, 255, 0.20);
  color: rgba(255, 255, 255, 0.80);
  font-weight: 600;
}

.speaking-modal-dialog .appreciate-caption-toggle[aria-pressed="true"] {
  background: rgba(15, 23, 42, 0.20);
  border-color: rgba(255, 255, 255, 0.28);
  color: rgba(255, 255, 255, 0.92);
}

.speaking-modal-dialog .appreciate-caption-toggle:hover {
  background: rgba(15, 23, 42, 0.28);
  border-color: rgba(255, 255, 255, 0.42);
}

.speaking-modal-dialog .appreciate-caption-toggle:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: 3px;
}

.speaking-modal-dialog.is-immersive-reading-mode.has-appreciate-highlights .reading-target {
  font-size: clamp(40px, 4.7vw, 72px);
  line-height: 1.65;
}

.speaking-modal-dialog .appreciate-term {
  position: relative;
  display: inline-block;
  max-width: 100%;
  vertical-align: baseline;
  line-height: 1.12;
  white-space: nowrap;
}

.speaking-modal-dialog .appreciate-term-text {
  border-radius: 0.14em;
  padding: 0.02em 0.055em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  transition: background-color 120ms ease, color 120ms ease;
}

.speaking-modal-dialog .appreciate-term.is-long-term .appreciate-term-text {
  display: inline-block;
  max-width: 100%;
  white-space: normal;
}

.speaking-modal-dialog .appreciate-term.is-revealed .appreciate-term-text {
  background: #ffe36b;
  color: #17202a;
  -webkit-text-stroke: 0;
  text-shadow: none;
}

.speaking-modal-dialog .appreciate-gloss {
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  padding: 2px 5px;
  border-radius: 3px;
  background: rgba(12, 20, 30, 0.82);
  color: #fff5c2;
  font-family: system-ui, sans-serif;
  font-size: clamp(12px, 0.24em, 17px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
  -webkit-text-stroke: 0;
  text-shadow: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.speaking-modal-dialog .appreciate-term.is-revealed .appreciate-gloss {
  opacity: 1;
}

@media (max-width: 640px) {
  .speaking-modal-dialog.is-immersive-reading-mode.has-appreciate-highlights .reading-target {
    font-size: clamp(26px, 7.4vw, 34px);
    line-height: 1.75;
  }

  .speaking-modal-dialog.has-appreciate-highlights .speaking-immersive-translation {
    font-size: 20px;
    line-height: 1.45;
  }

  .speaking-modal-dialog.is-immersive-reading-mode.is-appreciate-mode .reading-tools {
    max-width: calc(100vw - 20px);
    gap: 6px;
  }

  .speaking-modal-dialog.is-immersive-reading-mode.is-appreciate-mode .reading-tools button:nth-of-type(n+4) {
    min-width: 0;
    min-height: 44px;
    padding: 0 10px;
  }

  .speaking-modal-dialog.is-immersive-reading-mode.is-appreciate-mode .appreciate-caption-toggle {
    min-height: 44px;
    min-width: 108px;
  }
}

@media (max-height: 560px) and (orientation: landscape) {
  .speaking-modal-dialog.is-immersive-reading-mode.has-appreciate-highlights .reading-target {
    font-size: clamp(25px, 4.4vw, 44px);
    line-height: 1.7;
  }

  .speaking-modal-dialog.has-appreciate-highlights .speaking-immersive-translation {
    font-size: 20px;
  }
}

/* Give long annotated sentences room above the controls on short screens. */
@media (max-width: 640px) and (max-height: 680px) {
  .speaking-modal-dialog.is-immersive-reading-mode:has(.is-long-appreciate-caption) .reading-target {
    font-size: clamp(20px, 6.2vw, 24px);
    line-height: 1.85;
  }

  .speaking-modal-dialog.is-immersive-reading-mode:has(.is-long-appreciate-caption) .speaking-immersive-translation {
    font-size: 16px;
    line-height: 1.45;
  }

  .speaking-modal-dialog.is-immersive-reading-mode:has(.is-long-appreciate-caption) .speaking-focus-stage {
    gap: 10px;
    transform: none;
  }
}

@media (max-height: 560px) and (orientation: landscape) {
  .speaking-modal-dialog.is-immersive-reading-mode:has(.is-long-appreciate-caption) .reading-target {
    font-size: 24px;
    line-height: 1.75;
  }

  .speaking-modal-dialog.is-immersive-reading-mode:has(.is-long-appreciate-caption) .speaking-immersive-translation {
    font-size: 17px;
    line-height: 1.4;
  }

  .speaking-modal-dialog.is-immersive-reading-mode:has(.is-long-appreciate-caption) .speaking-focus-stage {
    gap: 12px;
    transform: none;
  }
}

@media (max-width: 640px) and (max-height: 680px), (max-height: 560px) and (orientation: landscape) {
  .speaking-modal-dialog.is-immersive-reading-mode:has(.is-long-appreciate-caption) .appreciate-gloss {
    top: calc(100% + 1px);
    padding: 0 3px;
    line-height: 1.1;
  }
}

/* Keep annotations clear of the training score tray and playback controls. */
@media (max-width: 640px) {
  .speaking-modal-dialog.is-keyword-reading-mode.has-appreciate-highlights:not(.is-immersive-reading-mode):has(.is-long-appreciate-caption) .reading-target {
    font-size: 26px;
  }

  .speaking-modal-dialog.is-keyword-reading-mode.is-immersive-reading-mode .speaking-immersive-word-scores {
    bottom: calc(max(10px, env(safe-area-inset-bottom)) + 156px + var(--immersive-shortcut-space, 0px));
  }

  .speaking-modal-dialog.is-keyword-reading-mode.is-immersive-reading-mode.has-appreciate-highlights .reading-target {
    line-height: 2.1;
  }

  .speaking-modal-dialog.is-keyword-reading-mode.is-immersive-reading-mode:has(.is-long-appreciate-caption):has(.speaking-immersive-word-scores:not([hidden])) .reading-target {
    font-size: clamp(22px, 6.4vw, 26px);
    line-height: 2.25;
  }

  .speaking-modal-dialog.is-keyword-reading-mode.is-immersive-reading-mode:has(.speaking-immersive-word-scores:not([hidden])) .speaking-focus-stage {
    position: fixed;
    top: 118px;
    bottom: calc(314px + var(--immersive-shortcut-space, 0px));
    left: 16px;
    width: calc(100vw - 32px);
    max-height: none;
    align-content: safe center;
    transform: none;
    overflow-y: auto;
    padding-bottom: 12px;
    pointer-events: auto;
  }
}

@media (max-width: 640px) and (max-height: 680px) {
  .speaking-modal-dialog.is-keyword-reading-mode.is-immersive-reading-mode .speaking-immersive-word-scores {
    max-height: 65px;
  }

  .speaking-modal-dialog.is-keyword-reading-mode.is-immersive-reading-mode:has(.speaking-immersive-word-scores:not([hidden])) .speaking-focus-stage {
    bottom: calc(238px + var(--immersive-shortcut-space, 0px));
  }

  .speaking-modal-dialog.is-keyword-reading-mode.is-immersive-reading-mode:has(.is-long-appreciate-caption):has(.speaking-immersive-word-scores:not([hidden])) .reading-target {
    font-size: 18px;
    line-height: 2.1;
  }

  .speaking-modal-dialog.is-keyword-reading-mode.is-immersive-reading-mode:has(.is-long-appreciate-caption):has(.speaking-immersive-word-scores:not([hidden])) .speaking-immersive-translation {
    font-size: 14px;
  }
}

@media (max-height: 560px) and (orientation: landscape) {
  .speaking-modal-dialog.is-keyword-reading-mode.is-immersive-reading-mode .speaking-immersive-word-scores {
    max-height: 71px;
  }

  .speaking-modal-dialog.is-keyword-reading-mode.is-immersive-reading-mode:has(.speaking-immersive-word-scores:not([hidden])) .speaking-focus-stage {
    position: fixed;
    top: 70px;
    bottom: calc(142px + var(--immersive-shortcut-space, 0px));
    left: 18px;
    width: calc(100vw - 36px);
    max-height: none;
    align-content: safe center;
    transform: none;
    overflow-y: auto;
    padding-bottom: 10px;
    pointer-events: auto;
  }
}

@media (max-width: 640px), (max-height: 560px) and (orientation: landscape) {
  .speaking-modal-dialog.is-keyword-reading-mode.is-immersive-reading-mode .speaking-immersive-caption-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    min-height: 0;
  }

  .speaking-modal-dialog.is-keyword-reading-mode.is-immersive-reading-mode .speaking-immersive-caption-meta .speaking-immersive-translation {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
  }

  .speaking-modal-dialog.is-keyword-reading-mode.is-immersive-reading-mode .speaking-immersive-caption-meta .speaking-voice-reception {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
  }

  .speaking-modal-dialog.is-keyword-reading-mode.is-immersive-reading-mode .speaking-immersive-caption-meta .speaking-immersive-score:not([hidden]) {
    flex: 0 0 auto;
    min-width: 32px;
    min-height: 30px;
    font-size: 20px;
  }
}

@media (max-height: 560px) and (orientation: landscape) {
  .speaking-modal-dialog.is-keyword-reading-mode.is-immersive-reading-mode:has(.is-long-appreciate-caption):has(.speaking-immersive-word-scores:not([hidden])) .reading-target {
    font-size: 22px;
    line-height: 1.95;
  }
}

@media (min-width: 641px) and (hover: hover) and (pointer: fine) {
  .appreciate-font-hint {
    display: inline;
  }
}

@media (prefers-reduced-motion: reduce) {
  .speaking-ready-countdown-value.is-ticking {
    animation: none !important;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}

.retell-panel {
  grid-column: 1 / -1;
  margin-top: 18px;
  padding: 20px 22px 24px;
  border-radius: 22px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.96), rgba(255, 255, 255, 0.98));
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.08);
}

.full-reading-app.is-retell-stage-active .reader-shell {
  width: min(1840px, calc(100vw - 24px));
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  padding-top: 8px;
}

.full-reading-app.is-retell-stage-active .practice-panel {
  display: none;
}

.full-reading-app.is-retell-stage-active .review-panel,
.full-reading-app.is-retell-stage-active .comprehension-panel,
.full-reading-app.is-retell-stage-active .monitor-banner,
.full-reading-app.is-retell-stage-active .passage-hero {
  display: none !important;
}

.full-reading-app.is-retell-stage-active .reader-shell > .retell-panel {
  width: 100%;
  min-height: calc(100dvh - 20px);
  max-height: calc(100dvh - 20px);
  justify-self: center;
  margin-top: 0;
  padding: 14px 18px 18px;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  scroll-margin-top: 18px;
  position: relative;
  z-index: 2;
}

.retell-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.retell-head h2 {
  margin: 6px 0 0;
  font-size: 1.45rem;
}

.full-reading-app.is-retell-stage-active .retell-head {
  align-items: center;
  margin-bottom: 6px;
  min-height: 38px;
}

.full-reading-app.is-retell-stage-active .retell-head .mode-label {
  display: none;
}

.full-reading-app.is-retell-stage-active .retell-head h2 {
  margin: 0;
  font-size: clamp(20px, 1.25vw, 25px);
  line-height: 1.15;
}

.retell-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: #334155;
  font-size: 0.92rem;
  font-weight: 700;
}

.full-reading-app.is-retell-stage-active .retell-status-pill {
  min-width: 82px;
  min-height: 36px;
  padding: 0 14px;
  font-size: 0.92rem;
}

.retell-status-pill.is-live {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.retell-status-pill.is-good {
  background: rgba(22, 163, 74, 0.14);
  color: #15803d;
}

.retell-status-pill.is-bad {
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
}

.retell-passage-hint {
  margin: 0 0 14px;
  color: #475569;
  line-height: 1.55;
}

.full-reading-app.is-retell-stage-active .retell-passage-hint {
  margin: 0 0 10px;
  font-size: 0.95rem;
  line-height: 1.35;
}

.retell-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(360px, 0.82fr);
  gap: 22px;
  align-items: stretch;
  min-height: 0;
}

.full-reading-app.is-retell-stage-active .retell-layout {
  flex: 1 1 auto;
  grid-template-columns: minmax(0, 1fr) minmax(520px, 1fr);
  gap: 18px;
}

.retell-progress-card,
.retell-points-card,
.retell-input-card {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.full-reading-app.is-retell-stage-active .retell-input-card,
.full-reading-app.is-retell-stage-active .retell-points-card {
  min-height: 0;
}

.full-reading-app.is-retell-stage-active .retell-input-card,
.full-reading-app.is-retell-stage-active .retell-points-card {
  display: flex;
  flex-direction: column;
}

.retell-progress-card {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.82);
}

.full-reading-app.is-retell-stage-active .retell-input-card > h3 {
  order: 1;
  margin-bottom: 8px;
}

.full-reading-app.is-retell-stage-active .retell-progress-card {
  order: 2;
  margin-bottom: 10px;
  padding: 10px 12px;
}

.retell-progress-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.retell-progress-top strong {
  font-size: 1.22rem;
  color: #1d4ed8;
}

.retell-progress-track {
  overflow: hidden;
  height: 9px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
}

.retell-progress-track span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #60a5fa, #2563eb);
  transition: width 0.35s ease;
}

.retell-score-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.retell-score-sources span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.13);
  color: #475569;
  padding: 4px 10px;
  font-size: 0.86rem;
  font-weight: 900;
}

.retell-score-sources .is-checking {
  background: rgba(219, 234, 254, 0.78);
  color: #1d4ed8;
}

.retell-score-sources .is-ok {
  background: rgba(220, 252, 231, 0.82);
  color: #166534;
}

.retell-score-sources .is-error {
  background: rgba(254, 242, 242, 0.88);
  color: #991b1b;
}

.retell-points-card h3,
.retell-input-card h3 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.retell-points-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.full-reading-app.is-retell-stage-active .retell-points-list {
  overflow-y: auto;
  padding-right: 4px;
  gap: 12px;
}

.retell-point {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.retell-point.is-covered {
  border-color: rgba(34, 197, 94, 0.28);
  background: rgba(240, 253, 244, 0.92);
}

.retell-point.is-semantic-covered {
  border-color: rgba(37, 99, 235, 0.28);
  background: rgba(239, 246, 255, 0.92);
}

.retell-point-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  color: #64748b;
  font-weight: 700;
}

.retell-point.is-covered .retell-point-mark {
  background: rgba(34, 197, 94, 0.18);
  color: #15803d;
}

.retell-point.is-semantic-covered .retell-point-mark {
  background: rgba(37, 99, 235, 0.16);
  color: #1d4ed8;
}

.retell-point-copy strong {
  display: block;
  line-height: 1.45;
}

.retell-point-copy small {
  display: block;
  margin-top: 4px;
  color: #64748b;
}

.full-reading-app.is-retell-stage-active .retell-points-card {
  padding: 18px 20px;
}

.full-reading-app.is-retell-stage-active .retell-points-card h3 {
  margin-bottom: 14px;
  font-size: clamp(18px, 1.1vw, 22px);
}

.full-reading-app.is-retell-stage-active .retell-point {
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 13px;
  padding: 14px 16px;
  border-radius: 16px;
}

.full-reading-app.is-retell-stage-active .retell-point-mark {
  width: 30px;
  height: 30px;
  font-size: 1.08rem;
}

.full-reading-app.is-retell-stage-active .retell-point-copy strong {
  font-size: clamp(19px, 1.2vw, 24px);
  line-height: 1.35;
}

.full-reading-app.is-retell-stage-active .retell-point-copy small {
  margin-top: 6px;
  font-size: clamp(14px, 0.95vw, 17px);
  line-height: 1.35;
}

.full-reading-app.is-retell-stage-active .retell-points-list:not(.is-complete) .retell-point.is-covered {
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 10px;
  padding: 9px 12px;
  opacity: 0.68;
}

.full-reading-app.is-retell-stage-active .retell-points-list:not(.is-complete) .retell-point.is-covered .retell-point-mark {
  width: 24px;
  height: 24px;
  font-size: 0.92rem;
}

.full-reading-app.is-retell-stage-active .retell-points-list:not(.is-complete) .retell-point.is-covered .retell-point-copy strong {
  font-size: 1rem;
  line-height: 1.35;
}

.full-reading-app.is-retell-stage-active .retell-points-list:not(.is-complete) .retell-point.is-covered .retell-point-copy small {
  margin-top: 3px;
  font-size: 0.82rem;
}

.full-reading-app.is-retell-stage-active .retell-points-list.has-medium-remaining .retell-point:not(.is-covered) .retell-point-copy strong {
  font-size: 1.45rem;
}

.full-reading-app.is-retell-stage-active .retell-points-list.has-medium-remaining .retell-point:not(.is-covered) .retell-point-copy small {
  font-size: 1rem;
}

.full-reading-app.is-retell-stage-active .retell-points-list.has-few-remaining .retell-point:not(.is-covered) {
  padding: 18px;
}

.full-reading-app.is-retell-stage-active .retell-points-list.has-few-remaining .retell-point:not(.is-covered) .retell-point-copy strong {
  font-size: 1.7rem;
  line-height: 1.3;
}

.full-reading-app.is-retell-stage-active .retell-points-list.has-few-remaining .retell-point:not(.is-covered) .retell-point-copy small {
  font-size: 1.08rem;
}

.full-reading-app.is-retell-stage-active .retell-points-list.has-one-remaining .retell-point:not(.is-covered) {
  padding: 22px 20px;
}

.full-reading-app.is-retell-stage-active .retell-points-list.has-one-remaining .retell-point:not(.is-covered) .retell-point-copy strong {
  font-size: 1.95rem;
  line-height: 1.28;
}

.full-reading-app.is-retell-stage-active .retell-points-list.has-one-remaining .retell-point:not(.is-covered) .retell-point-copy small {
  font-size: 1.15rem;
  line-height: 1.45;
}

.retell-input-card textarea {
  width: 100%;
  min-height: 280px;
  resize: vertical;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: #111827;
  font: 780 20px/1.58 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.full-reading-app.is-retell-stage-active .retell-input-card textarea {
  order: 4;
  flex: 0 0 clamp(76px, 10dvh, 112px);
  min-height: clamp(76px, 10dvh, 112px);
  max-height: clamp(76px, 10dvh, 112px);
  margin-top: 8px;
  resize: none;
  padding: 10px 12px;
  background: rgba(248, 250, 252, 0.74);
  color: #64748b;
  font-size: clamp(14px, 0.9vw, 17px);
  line-height: 1.42;
  font-weight: 760;
  box-shadow: inset 0 1px 6px rgba(15, 23, 42, 0.04);
}

.retell-hit-preview {
  margin-top: 10px;
  max-height: 132px;
  overflow-y: auto;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(34, 197, 94, 0.22);
  background: linear-gradient(180deg, rgba(240, 253, 244, 0.86), rgba(255, 255, 255, 0.88));
  color: #334155;
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.7;
}

.full-reading-app.is-retell-stage-active .retell-hit-preview {
  order: 3;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  margin-top: 0;
  padding: 16px 18px;
  font-size: clamp(24px, 1.7vw, 34px);
  line-height: 1.56;
  border-color: rgba(34, 197, 94, 0.28);
  background: linear-gradient(180deg, rgba(240, 253, 244, 0.92), rgba(255, 255, 255, 0.94));
}

.retell-hit-preview-label {
  margin-bottom: 6px;
  color: #15803d;
  font-size: 0.84rem;
  font-weight: 900;
}

.full-reading-app.is-retell-stage-active .retell-hit-preview-label {
  margin-bottom: 10px;
  font-size: clamp(14px, 0.9vw, 17px);
}

.retell-hit-preview-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.full-reading-app.is-retell-stage-active .retell-hit-preview-text {
  font-weight: 850;
}

.retell-hit-preview mark {
  padding: 1px 4px 2px;
  border-radius: 7px;
  background: rgba(34, 197, 94, 0.24);
  color: #14532d;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.full-reading-app.is-retell-stage-active .retell-hit-preview mark {
  padding: 2px 8px 3px;
  border-radius: 9px;
  background: rgba(34, 197, 94, 0.24);
  font-weight: 950;
}

.retell-hit-empty {
  color: #64748b;
  font-weight: 750;
}

.retell-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.full-reading-app.is-retell-stage-active .retell-actions {
  order: 5;
  margin-top: 10px;
}

.retell-actions button {
  min-width: 132px;
  min-height: 44px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  color: #334155;
  padding: 0 16px;
  font-weight: 850;
}

.retell-actions .primary-action {
  border-color: rgba(217, 119, 6, 0.42);
  background: linear-gradient(180deg, #fff7ed, #fed7aa);
  color: #92400e;
}

.retell-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.retell-feedback {
  margin: 12px 0 0;
  min-height: 1.4em;
  color: #475569;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.55;
}

.full-reading-app.is-retell-stage-active .retell-feedback {
  order: 6;
  margin-top: 10px;
}

.retell-feedback.is-good {
  color: #15803d;
}

.retell-feedback.is-bad {
  color: #b91c1c;
}

.topic-mission-entry {
  min-height: 76px;
  display: grid;
  align-content: center;
  gap: 3px;
  margin-top: 16px;
  border: 1px solid rgba(26, 101, 88, 0.28);
  border-radius: 8px;
  background: #e8f5ef;
  color: #173f38;
  padding: 14px 18px;
  text-decoration: none;
  transition: border-color 180ms ease, background 180ms ease;
}

.topic-mission-entry:hover {
  border-color: rgba(26, 101, 88, 0.5);
  background: #ddf0e7;
}

.topic-mission-entry:focus-visible {
  outline: 3px solid rgba(26, 101, 88, 0.3);
  outline-offset: 3px;
}

.topic-mission-entry span {
  color: #2a7466;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.topic-mission-entry strong {
  font-size: 18px;
}

.topic-mission-entry small {
  color: #4f6f68;
  font-size: 14px;
}

.topic-mission-entry.is-advanced {
  border-color: #8a5a12;
  background: #3b2a13;
}

.topic-mission-entry.is-advanced:hover {
  border-color: #c77f18;
  background: #4a3416;
}

.topic-mission-entry.is-advanced .mode-label,
.topic-mission-entry.is-advanced small {
  color: rgba(255, 242, 214, 0.78);
}

.topic-mission-entry.is-advanced .overview-task-number {
  background: rgba(255, 255, 255, 0.13);
  color: #ffdda0;
}

.retell-success-burst {
  position: absolute;
  inset: 0;
  z-index: 26;
  display: grid;
  place-items: center;
  padding: 28px;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 220ms ease, transform 220ms ease;
}

.retell-success-burst[hidden] {
  display: none !important;
}

.retell-success-burst.is-visible {
  opacity: 1;
  transform: scale(1);
}

.retell-success-burst.is-leaving {
  opacity: 0;
  transform: scale(0.99);
}

.retell-success-card {
  width: min(420px, 72vw);
  min-height: 280px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 10px;
  border: 1px solid rgba(251, 113, 133, 0.24);
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 10%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.56) 34%, rgba(255, 241, 242, 0.88)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(254, 226, 226, 0.92));
  color: #0f172a;
  text-align: center;
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.20), inset 0 1px 0 rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(16px) saturate(1.1);
}

.retell-success-animation {
  position: relative;
  width: min(260px, 56vw);
  height: 190px;
  display: grid;
  place-items: center;
  overflow: visible;
}

.retell-success-animation span:not(.retell-success-static-mark) {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 38px;
  height: 8px;
  border-radius: 999px;
  background: hsl(calc(var(--i) * 28deg), 78%, 70%);
  transform:
    translate(-50%, -50%)
    rotate(calc(var(--i) * 20deg))
    translateX(calc(34px + var(--i) * 4px));
  animation: retellSuccessSpark 900ms ease-out both;
  animation-delay: calc(var(--i) * 18ms);
}

.retell-success-static-mark {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.16);
  color: #15803d;
  font-size: 54px;
  font-weight: 950;
}

.retell-success-card strong {
  font-size: clamp(30px, 3.2vw, 46px);
  line-height: 1;
  font-weight: 950;
}

.retell-success-card > span {
  max-width: 26ch;
  color: #475569;
  font-size: clamp(15px, 1.05vw, 18px);
  font-weight: 850;
  line-height: 1.45;
}

@keyframes retellSuccessSpark {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.2) rotate(calc(var(--i) * 20deg)) translateX(0);
  }
  18% {
    opacity: 1;
  }
  70% {
    opacity: 0.92;
  }
  100% {
    opacity: 0;
    transform:
      translate(-50%, -50%)
      scale(1)
      rotate(calc(var(--i) * 20deg))
      translateX(calc(64px + var(--i) * 4px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .retell-success-burst {
    transition: none;
    transform: none;
  }

  .retell-success-animation span:not(.retell-success-static-mark) {
    animation: none;
  }
}

@media (max-width: 960px) {
  .retell-layout,
  .full-reading-app.is-retell-stage-active .retell-layout {
    grid-template-columns: 1fr;
  }
}

#chooseBgm {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.reading-bgm-open { overflow: hidden; }

.reading-bgm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(20, 28, 36, 0.42);
  backdrop-filter: blur(3px);
}

.reading-bgm-sheet {
  position: fixed;
  top: 72px;
  right: clamp(12px, 3vw, 32px);
  z-index: 81;
  width: min(590px, calc(100vw - 24px));
  max-height: calc(100dvh - 88px);
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(55, 65, 81, 0.22);
  border-radius: 8px;
  color: #17212b;
  background: rgba(250, 250, 249, 0.98);
  box-shadow: 0 30px 70px rgba(20, 28, 36, 0.28);
}

.reading-bgm-sheet[hidden], .reading-bgm-backdrop[hidden] { display: none; }

.reading-bgm-sheet > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid rgba(55, 65, 81, 0.12);
}

.reading-bgm-sheet > header p,
.reading-bgm-sheet > header h2,
.reading-bgm-sheet > header small { margin: 0; }
.reading-bgm-sheet > header p { color: #66717d; font-size: 12px; font-weight: 800; }
.reading-bgm-sheet > header h2 { margin-top: 3px; font-size: 20px; }
.reading-bgm-sheet > header small { display: block; margin-top: 5px; color: #52606d; font-size: 12px; }
.reading-bgm-sheet button, .reading-bgm-sheet input { font: inherit; }

.reading-bgm-sheet > header button,
.reading-bgm-actions button {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid #d1d7dd;
  border-radius: 6px;
  color: #25313c;
  background: #fff;
  cursor: pointer;
  font-weight: 800;
}

.reading-bgm-tools {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(180px, 0.75fr);
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(55, 65, 81, 0.1);
}

.reading-bgm-tools label { min-width: 0; display: grid; gap: 8px; }
.reading-bgm-tools label > span { display: flex; justify-content: space-between; color: #66717d; font-size: 12px; font-weight: 800; }
.reading-bgm-tools input[type="search"] { width: 100%; min-height: 42px; padding: 0 11px; border: 1px solid #d1d7dd; border-radius: 6px; color: #17212b; background: #fff; }
.reading-bgm-tools input[type="range"] { width: 100%; accent-color: #0e7490; }

.reading-bgm-actions, .reading-bgm-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 18px;
  border-bottom: 1px solid rgba(55, 65, 81, 0.1);
}

.reading-bgm-actions small, .reading-bgm-list-head small { color: #66717d; font-size: 12px; line-height: 1.4; }
.reading-bgm-actions button:disabled { opacity: 0.44; cursor: not-allowed; }
.reading-bgm-list-head { align-items: baseline; border-bottom: 0; padding-bottom: 8px; }

.reading-bgm-list { min-height: 0; display: grid; align-content: start; gap: 8px; overflow: auto; padding: 0 18px 18px; }

.reading-bgm-option {
  min-height: 72px;
  width: 100%;
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  gap: 11px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #d9dee4;
  border-radius: 6px;
  color: #17212b;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.reading-bgm-option:hover { border-color: #68a7b6; background: #f4fbfc; }
.reading-bgm-option.is-selected { border-color: #0e7490; box-shadow: inset 0 0 0 1px rgba(14, 116, 144, 0.12); }
.reading-bgm-accent { background: var(--reading-bgm-accent, #0e7490); }
.reading-bgm-copy { min-width: 0; display: grid; align-content: center; gap: 4px; padding: 11px 0; }
.reading-bgm-copy strong, .reading-bgm-copy small { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.reading-bgm-copy strong { font-size: 14px; white-space: nowrap; }
.reading-bgm-copy small { color: #66717d; font-size: 12px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

.reading-bgm-badges { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 5px; padding: 10px 10px 10px 0; }
.reading-bgm-badges i { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border-radius: 999px; color: #0e5f73; background: #dff3f7; font-size: 11px; font-style: normal; font-weight: 800; white-space: nowrap; }
.reading-bgm-empty { padding: 28px 16px; border: 1px dashed #cbd2d9; color: #66717d; text-align: center; }

@media (max-width: 700px) {
  .reading-bgm-sheet { top: 8px; right: 8px; width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
  .reading-bgm-tools { grid-template-columns: 1fr; }
  .reading-bgm-actions { align-items: flex-start; flex-direction: column; }
  .reading-bgm-option { grid-template-columns: 8px minmax(0, 1fr); }
  .reading-bgm-badges { grid-column: 2; justify-content: flex-start; padding: 0 10px 10px 0; }
}

/* Full-page overview only. The monitor continues to use the base reading layout. */
.full-reading-app.is-reading-overview-page > .full-reading-topbar {
  gap: 24px;
  align-items: center;
}

.full-reading-app.is-reading-overview-page > .full-reading-topbar .top-actions {
  flex: 1 1 auto;
  flex-wrap: nowrap;
}

.full-reading-app.is-reading-overview-page .passage-switcher {
  flex: 1 1 420px;
  max-width: 620px;
}

.full-reading-app.is-reading-overview-page .passage-switcher select {
  width: 100%;
  min-width: 260px;
  max-width: none;
}

.full-reading-app.is-reading-overview-page .overview-library-link,
.full-reading-app.is-reading-overview-page .overview-more-menu > summary {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: #334155;
  padding: 0 16px;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

.full-reading-app.is-reading-overview-page .overview-more-menu {
  position: relative;
  flex: 0 0 auto;
}

.full-reading-app.is-reading-overview-page .overview-more-menu > summary {
  list-style: none;
}

.full-reading-app.is-reading-overview-page .overview-more-menu > summary::-webkit-details-marker {
  display: none;
}

.full-reading-app.is-reading-overview-page .overview-more-menu > summary::after {
  content: "+";
  margin-left: 8px;
  color: #64748b;
  font-size: 18px;
  line-height: 1;
}

.full-reading-app.is-reading-overview-page .overview-more-menu[open] > summary::after {
  content: "-";
}

.full-reading-app.is-reading-overview-page .overview-more-menu > summary:hover,
.full-reading-app.is-reading-overview-page .overview-more-menu[open] > summary {
  border-color: rgba(37, 99, 235, 0.35);
  background: #eff6ff;
}

.full-reading-app.is-reading-overview-page .overview-more-popover {
  position: absolute;
  z-index: 40;
  top: calc(100% + 8px);
  right: 0;
  width: 210px;
  display: grid;
  gap: 6px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.18);
}

.full-reading-app.is-reading-overview-page .overview-more-popover button,
.full-reading-app.is-reading-overview-page .overview-more-popover a {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #334155;
  padding: 0 12px;
  text-decoration: none;
  font-weight: 800;
  box-shadow: none;
}

.full-reading-app.is-reading-overview-page .overview-more-popover button:hover,
.full-reading-app.is-reading-overview-page .overview-more-popover a:hover {
  background: #f1f5f9;
  transform: none;
}

.full-reading-app.is-reading-overview-page .pass-score-setting {
  display: grid;
  gap: 6px;
  padding: 9px 10px 10px;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}

.full-reading-app.is-reading-overview-page .pass-score-setting-label {
  color: #334155;
  font-size: 12px;
  font-weight: 850;
}

.full-reading-app.is-reading-overview-page .pass-score-setting-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
}

.full-reading-app.is-reading-overview-page .pass-score-setting-controls input {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0 8px;
  color: #0f172a;
  background: #fff;
  font: inherit;
  font-weight: 750;
}

.full-reading-app.is-reading-overview-page .pass-score-setting-controls > span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.full-reading-app.is-reading-overview-page .pass-score-setting-controls button {
  grid-column: span 1;
  min-height: 36px;
  justify-content: center;
  padding: 0 8px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  font-size: 12px;
  white-space: nowrap;
}

.full-reading-app.is-reading-overview-page .pass-score-setting-controls button:last-child {
  grid-column: 1 / -1;
}

.full-reading-app.is-reading-overview-page .pass-score-setting small {
  color: #64748b;
  font-size: 11px;
  line-height: 1.35;
}

.full-reading-app.is-reading-overview-page > .reader-shell {
  width: min(1280px, 100%);
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  padding-top: 24px;
}

.full-reading-app.is-reading-overview-page > .reader-shell > .passage-panel {
  border: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.full-reading-app.is-reading-overview-page .passage-hero {
  grid-template-columns: minmax(0, 1fr) 168px;
  min-height: 218px;
  gap: 28px;
  padding: 28px 30px;
}

.full-reading-app.is-reading-overview-page .passage-hero > img {
  width: 168px;
  height: 168px;
  object-fit: cover;
}

.full-reading-app.is-reading-overview-page .passage-hero h1 {
  font-size: 50px;
  line-height: 1.04;
}

.full-reading-app.is-reading-overview-page .overall-progress {
  margin-top: 12px;
  background: rgba(255, 255, 255, 0.76);
}

.full-reading-app.is-reading-overview-page .overview-task-hub {
  margin-top: 32px;
}

.full-reading-app.is-reading-overview-page .overview-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 16px;
}

.full-reading-app.is-reading-overview-page .overview-section-head h2 {
  margin: 3px 0 0;
  color: #0f172a;
  font-size: 28px;
  line-height: 1.16;
}

.full-reading-app.is-reading-overview-page .overview-section-head > p {
  max-width: 420px;
  margin: 0;
  color: #64748b;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.55;
  text-align: right;
}

.full-reading-app.is-reading-overview-page .overview-task-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.full-reading-app.is-reading-overview-page .overview-task-card {
  min-width: 0;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: #0f172a;
  padding: 24px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  backdrop-filter: none;
  text-decoration: none;
}

.full-reading-app.is-reading-overview-page .overview-reading-task {
  border-color: rgba(217, 119, 6, 0.28);
  background: #fffdf7;
}

.full-reading-app.is-reading-overview-page .overview-retell-task {
  border-color: rgba(37, 99, 235, 0.22);
  background: #f8fbff;
}

.full-reading-app.is-reading-overview-page .pronunciation-focus-panel {
  border-color: rgba(15, 118, 110, 0.24);
  background: #f5fcfa;
}

.full-reading-app.is-reading-overview-page .overview-task-head {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.full-reading-app.is-reading-overview-page .overview-task-head > div {
  min-width: 0;
  flex: 1 1 auto;
}

.full-reading-app.is-reading-overview-page .overview-task-number {
  flex: 0 0 auto;
  min-width: 42px;
  min-height: 32px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.06);
  color: #475569;
  font-size: 13px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.full-reading-app.is-reading-overview-page .overview-task-card h3,
.full-reading-app.is-reading-overview-page .overview-ai-task strong {
  display: block;
  margin: 3px 0 0;
  color: inherit;
  font-size: 24px;
  font-weight: 900;
  line-height: 1.12;
}

.full-reading-app.is-reading-overview-page .overview-task-status {
  margin: 0;
  color: #334155;
  font-size: 17px;
  font-weight: 850;
  line-height: 1.45;
}

.full-reading-app.is-reading-overview-page .overview-task-copy {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.55;
}

.full-reading-app.is-reading-overview-page .overview-reading-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.full-reading-app.is-reading-overview-page .overview-reading-stats span {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 6px;
  background: #fff;
  color: #64748b;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.full-reading-app.is-reading-overview-page .overview-reading-stats strong {
  color: #0f172a;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.full-reading-app.is-reading-overview-page .overview-task-actions {
  margin-top: auto;
}

.full-reading-app.is-reading-overview-page .overview-reading-task .overview-task-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.full-reading-app.is-reading-overview-page .overview-task-actions button {
  min-height: 44px;
}

.full-reading-app.is-reading-overview-page .pronunciation-focus-head {
  align-items: flex-start;
}

.full-reading-app.is-reading-overview-page .pronunciation-focus-head > span:last-child {
  margin-left: auto;
}

.full-reading-app.is-reading-overview-page .pronunciation-focus-summary {
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 14px;
}

.full-reading-app.is-reading-overview-page .pronunciation-focus-summary-row {
  grid-template-columns: auto repeat(2, minmax(0, 1fr));
}

.full-reading-app.is-reading-overview-page .overview-ai-task {
  border-color: #164e63;
  background: #164e63;
  color: #f8fafc;
}

.full-reading-app.is-reading-overview-page .overview-ai-task:hover {
  border-color: #0e7490;
  background: #155e75;
}

.full-reading-app.is-reading-overview-page .overview-ai-task.is-advanced {
  border-color: #8a5a12;
  background: #3b2a13;
}

.full-reading-app.is-reading-overview-page .overview-ai-task.is-advanced:hover {
  border-color: #c77f18;
  background: #4a3416;
}

.full-reading-app.is-reading-overview-page .overview-ai-task.is-emotion {
  border-color: #7c3f58;
  background: #563344;
}

.full-reading-app.is-reading-overview-page .overview-ai-task.is-emotion:hover {
  border-color: #a85d78;
  background: #674052;
}

.full-reading-app.is-reading-overview-page .overview-ai-task.is-emotion .mode-label,
.full-reading-app.is-reading-overview-page .overview-ai-task.is-emotion small {
  color: #f8dce7;
}

.full-reading-app.is-reading-overview-page .overview-ai-task.is-emotion .overview-ai-cta {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
}

.full-reading-app.is-reading-overview-page .overview-ai-task .mode-label,
.full-reading-app.is-reading-overview-page .overview-ai-task small {
  color: rgba(240, 253, 250, 0.78);
}

.full-reading-app.is-reading-overview-page .overview-ai-task .overview-task-number {
  background: rgba(255, 255, 255, 0.13);
  color: #cffafe;
  font-size: 13px;
  text-transform: none;
}

.full-reading-app.is-reading-overview-page .overview-ai-task small {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.55;
}

.full-reading-app.is-reading-overview-page .overview-ai-cta {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  margin-top: auto;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.10);
  color: #fff;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 900;
  text-transform: none;
}

.full-reading-app.is-reading-overview-page .overview-directory {
  margin-top: 32px;
  border-top: 1px solid rgba(148, 163, 184, 0.28);
  border-bottom: 1px solid rgba(148, 163, 184, 0.28);
}

.full-reading-app.is-reading-overview-page .overview-directory > summary {
  min-height: 92px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 16px;
  align-items: center;
  list-style: none;
  cursor: pointer;
}

.full-reading-app.is-reading-overview-page .overview-directory > summary::-webkit-details-marker {
  display: none;
}

.full-reading-app.is-reading-overview-page .overview-directory > summary::after {
  content: "+";
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 8px;
  color: #475569;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}

.full-reading-app.is-reading-overview-page .overview-directory[open] > summary::after {
  content: "-";
}

.full-reading-app.is-reading-overview-page .overview-directory > summary small,
.full-reading-app.is-reading-overview-page .overview-directory > summary strong {
  display: block;
}

.full-reading-app.is-reading-overview-page .overview-directory > summary small {
  margin-bottom: 3px;
  color: #64748b;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.full-reading-app.is-reading-overview-page .overview-directory > summary strong {
  color: #0f172a;
  font-size: 22px;
}

.full-reading-app.is-reading-overview-page .overview-directory-meta {
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

.full-reading-app.is-reading-overview-page .overview-directory .sentence-stream {
  margin-top: 0;
  padding: 6px 0 24px;
}

.full-reading-app.is-reading-overview-page.is-retell-stage-active > .reader-shell > .passage-panel {
  display: none;
}

@media (max-width: 860px) {
  .full-reading-app.is-reading-overview-page > .full-reading-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .full-reading-app.is-reading-overview-page > .full-reading-topbar .top-actions {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .full-reading-app.is-reading-overview-page .passage-switcher {
    max-width: none;
  }

  .full-reading-app.is-reading-overview-page .overview-task-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .full-reading-app.is-reading-overview-page > .full-reading-topbar {
    gap: 14px;
  }

  .full-reading-app.is-reading-overview-page > .full-reading-topbar .top-actions {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .full-reading-app.is-reading-overview-page .passage-switcher {
    grid-column: 1 / -1;
    width: 100%;
  }

  .full-reading-app.is-reading-overview-page .passage-switcher select {
    min-width: 0;
  }

  .full-reading-app.is-reading-overview-page .overview-library-link,
  .full-reading-app.is-reading-overview-page .overview-more-menu,
  .full-reading-app.is-reading-overview-page .overview-more-menu > summary {
    width: 100%;
  }

  .full-reading-app.is-reading-overview-page .overview-more-popover {
    right: 0;
    width: min(260px, calc(100vw - 28px));
  }

  .full-reading-app.is-reading-overview-page > .reader-shell {
    padding-top: 14px;
  }

  .full-reading-app.is-reading-overview-page .passage-hero {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 18px;
    padding: 22px;
  }

  .full-reading-app.is-reading-overview-page .passage-hero > img,
  .full-reading-app.is-reading-overview-page:not(.is-monitor-mode) .passage-hero > img.is-book-topic {
    width: 100%;
    height: auto;
    max-height: 220px;
    aspect-ratio: 16 / 9;
    justify-self: stretch;
    object-fit: cover;
  }

  .full-reading-app.is-reading-overview-page .passage-hero h1 {
    font-size: 38px;
  }

  .full-reading-app.is-reading-overview-page .overview-section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .full-reading-app.is-reading-overview-page .overview-section-head > p {
    max-width: none;
    text-align: left;
  }

  .full-reading-app.is-reading-overview-page .overview-task-card {
    min-height: 0;
    padding: 20px;
  }

  .full-reading-app.is-reading-overview-page .overview-reading-task .overview-task-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .full-reading-app.is-reading-overview-page .overview-reading-task .overview-task-actions .primary-action {
    grid-column: 1 / -1;
  }

  .full-reading-app.is-reading-overview-page .pronunciation-focus-summary-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .full-reading-app.is-reading-overview-page .overview-directory > summary {
    min-height: 86px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }

  .full-reading-app.is-reading-overview-page .overview-directory-meta {
    grid-column: 1;
    text-align: left;
  }

  .full-reading-app.is-reading-overview-page .overview-directory > summary::after {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
}

/* Compact hub overrides placed after the overview's original responsive rules. */
.full-reading-app.is-reading-overview-page > .reader-shell { gap: 14px; padding-top: 14px; }
.full-reading-app.is-reading-overview-page .passage-hero { grid-template-columns: minmax(0, 1fr) 104px; min-height: 0; gap: 18px; padding: 16px 20px; }
.full-reading-app.is-reading-overview-page .passage-hero > img { width: 104px; height: 104px; }
.full-reading-app.is-reading-overview-page .passage-hero h1 { font-size: 30px; line-height: 1.12; }
.full-reading-app.is-reading-overview-page .passage-hero #passageSubtitle { margin-top: 5px; font-size: 15px; }
.full-reading-app.is-reading-overview-page .overall-progress { min-height: 0; margin-top: 8px; padding: 10px 14px; }
.full-reading-app.is-reading-overview-page .overview-task-hub { margin-top: 16px; }
.full-reading-app.is-reading-overview-page .overview-section-head { align-items: center; margin-bottom: 10px; }
.full-reading-app.is-reading-overview-page .overview-section-head h2 { font-size: 20px; }
.full-reading-app.is-reading-overview-page .overview-reading-stats { justify-content: flex-end; }
.full-reading-app.is-reading-overview-page .overview-reading-task { display: grid; grid-template-columns: minmax(170px, 0.72fr) minmax(0, 1.28fr); align-items: center; gap: 16px; border-top: 1px solid rgba(217, 119, 6, 0.3); border-bottom: 1px solid rgba(217, 119, 6, 0.3); background: rgba(255, 253, 247, 0.72); padding: 13px 16px; }
.full-reading-app.is-reading-overview-page .overview-reading-heading h3 { margin: 2px 0 0; color: #0f172a; font-size: 18px; line-height: 1.2; }
.full-reading-app.is-reading-overview-page .overview-reading-heading > p { margin: 5px 0 0; color: #64748b; font-size: 13px; font-weight: 700; line-height: 1.4; }
.full-reading-app.is-reading-overview-page .overview-reading-task .overview-task-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
.full-reading-app.is-reading-overview-page .overview-reading-task .overview-task-actions button { min-width: 0; min-height: 44px; border-color: rgba(148, 163, 184, 0.42); background: #fff; color: #1e293b; font-size: 14px; font-weight: 850; box-shadow: none; }
.full-reading-app.is-reading-overview-page .overview-reading-task .overview-task-actions button:hover { border-color: rgba(37, 99, 235, 0.52); background: #eff6ff; color: #1d4ed8; transform: none; }
.full-reading-app.is-reading-overview-page .overview-reading-task .overview-task-actions button:focus-visible,
.full-reading-app.is-reading-overview-page .overview-related-link:focus-visible { outline: 3px solid rgba(37, 99, 235, 0.45); outline-offset: 2px; }
.full-reading-app.is-reading-overview-page .overview-task-grid { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-top: 10px; }
.full-reading-app.is-reading-overview-page .overview-task-card { min-height: 148px; gap: 8px; border-radius: 6px; padding: 14px; box-shadow: none; }
.full-reading-app.is-reading-overview-page .overview-task-card h3,
.full-reading-app.is-reading-overview-page .overview-ai-task strong { font-size: 18px; }
.full-reading-app.is-reading-overview-page .overview-task-status,
.full-reading-app.is-reading-overview-page .overview-task-copy,
.full-reading-app.is-reading-overview-page .overview-ai-task small { font-size: 13px; line-height: 1.45; }
.full-reading-app.is-reading-overview-page .overview-task-actions button,
.full-reading-app.is-reading-overview-page .overview-ai-cta { min-height: 44px; }
.full-reading-app.is-reading-overview-page .overview-ai-cta { align-self: stretch; padding: 0 12px; }
.full-reading-app.is-reading-overview-page .overview-related-content { margin-top: 16px; border-top: 1px solid rgba(148, 163, 184, 0.28); padding-top: 14px; }
.full-reading-app.is-reading-overview-page .overview-related-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.full-reading-app.is-reading-overview-page .overview-related-head h2 { margin: 2px 0 0; color: #0f172a; font-size: 20px; line-height: 1.2; }
.full-reading-app.is-reading-overview-page .overview-related-head > p { max-width: 420px; margin: 0; color: #64748b; font-size: 13px; font-weight: 700; line-height: 1.45; text-align: right; }
.full-reading-app.is-reading-overview-page .overview-related-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px; margin-top: 10px; }
.full-reading-app.is-reading-overview-page .overview-related-link { min-width: 0; min-height: 56px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; border: 1px solid rgba(148, 163, 184, 0.26); border-radius: 6px; background: rgba(255, 255, 255, 0.7); color: #1e293b; padding: 8px 10px; text-decoration: none; }
.full-reading-app.is-reading-overview-page .overview-related-link:hover { border-color: rgba(37, 99, 235, 0.38); background: #f8fbff; }
.full-reading-app.is-reading-overview-page .overview-related-type { color: #2563eb; font-size: 11px; font-weight: 900; white-space: nowrap; }
.full-reading-app.is-reading-overview-page .overview-related-copy { min-width: 0; }
.full-reading-app.is-reading-overview-page .overview-related-copy strong,
.full-reading-app.is-reading-overview-page .overview-related-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.full-reading-app.is-reading-overview-page .overview-related-copy strong { color: #0f172a; font-size: 14px; }
.full-reading-app.is-reading-overview-page .overview-related-copy small { margin-top: 2px; color: #64748b; font-size: 12px; font-weight: 650; }
.full-reading-app.is-reading-overview-page .overview-related-arrow { color: #64748b; font-weight: 900; }
.full-reading-app.is-reading-overview-page .overview-directory { margin-top: 16px; }
.full-reading-app.is-reading-overview-page .overview-directory > summary { min-height: 60px; }
.full-reading-app.is-reading-overview-page .overview-directory > summary strong { font-size: 18px; }
.full-reading-app.is-reading-overview-page .overview-current-sentence { border-top: 1px solid rgba(148, 163, 184, 0.2); background: rgba(248, 250, 252, 0.78); padding: 12px 14px; }
.full-reading-app.is-reading-overview-page .overview-current-sentence #nowTitle { color: #334155; font-size: 13px; }
.full-reading-app.is-reading-overview-page .overview-current-sentence #nowSentence { margin: 4px 0 0; color: #0f172a; font-size: 16px; font-weight: 750; line-height: 1.45; }

@media (max-width: 860px) {
  .full-reading-app.is-reading-overview-page .overview-reading-task { grid-template-columns: 1fr; }
  .full-reading-app.is-reading-overview-page .overview-related-head { align-items: flex-start; flex-direction: column; gap: 6px; }
  .full-reading-app.is-reading-overview-page .overview-related-head > p { max-width: none; text-align: left; }
}

@media (max-width: 640px) {
  .full-reading-app.is-reading-overview-page .passage-hero { grid-template-columns: minmax(0, 1fr) 84px; gap: 12px; padding: 14px; }
  .full-reading-app.is-reading-overview-page .passage-hero > img,
  .full-reading-app.is-reading-overview-page:not(.is-monitor-mode) .passage-hero > img.is-book-topic { width: 84px; height: 84px; max-height: none; aspect-ratio: 1; justify-self: end; }
  .full-reading-app.is-reading-overview-page .passage-hero h1 { font-size: 25px; }
  .full-reading-app.is-reading-overview-page .overview-section-head { align-items: flex-start; flex-direction: column; }
  .full-reading-app.is-reading-overview-page .overview-reading-stats { justify-content: flex-start; }
  .full-reading-app.is-reading-overview-page .overview-reading-task .overview-task-actions { grid-template-columns: 1fr; }
  .full-reading-app.is-reading-overview-page .overview-task-grid,
  .full-reading-app.is-reading-overview-page .overview-related-list { grid-template-columns: 1fr; }
  .full-reading-app.is-reading-overview-page .overview-related-copy small { white-space: normal; }
}

@media (min-width: 861px) {
  .full-reading-app.is-reading-overview-page .passage-hero { grid-template-columns: minmax(0, 1fr) 72px; gap: 12px; padding: 8px 14px; }
  .full-reading-app.is-reading-overview-page .passage-hero > img { width: 72px; height: 72px; }
  .full-reading-app.is-reading-overview-page .passage-hero h1 { margin: 3px 0; font-size: 27px; }
  .full-reading-app.is-reading-overview-page .passage-source { margin-top: 4px; padding: 3px 8px; font-size: 11px; }
  .full-reading-app.is-reading-overview-page .overall-progress { gap: 4px; padding: 6px 12px; }
  .full-reading-app.is-reading-overview-page .overall-track { height: 8px; }
  .full-reading-app.is-reading-overview-page .overview-task-hub { margin-top: 10px; }
  .full-reading-app.is-reading-overview-page .overview-section-head { margin-bottom: 6px; }
  .full-reading-app.is-reading-overview-page .overview-reading-task { padding: 9px 12px; }
  .full-reading-app.is-reading-overview-page .overview-task-card { min-height: 110px; padding: 12px; }
  .full-reading-app.is-reading-overview-page .overview-related-list { grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); }
  .full-reading-app.is-reading-overview-page .overview-related-content { margin-top: 4px; padding-top: 6px; }
  .full-reading-app.is-reading-overview-page .overview-related-head { min-height: 28px; }
  .full-reading-app.is-reading-overview-page .overview-related-head .mode-label { display: none; }
  .full-reading-app.is-reading-overview-page .overview-related-head > p { display: none; }
  .full-reading-app.is-reading-overview-page .overview-directory { margin-top: 10px; }
}

.full-reading-app.is-reading-overview-page .overview-speech-works {
  margin-top: 16px;
  border-top: 1px solid rgba(20, 184, 166, 0.28);
  padding-top: 14px;
}

.full-reading-app.is-reading-overview-page .overview-speech-works-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.full-reading-app.is-reading-overview-page .overview-speech-works-head h2 {
  margin: 2px 0 0;
  color: #0f172a;
  font-size: 20px;
  line-height: 1.2;
}

.full-reading-app.is-reading-overview-page .overview-speech-works-head > p {
  max-width: 420px;
  margin: 0;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  text-align: right;
}

.full-reading-app.is-reading-overview-page .overview-speech-works-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.full-reading-app.is-reading-overview-page .overview-speech-work-card {
  position: relative;
  min-width: 0;
  min-height: 112px;
  display: grid;
  align-content: start;
  gap: 5px;
  border: 1px solid rgba(20, 184, 166, 0.3);
  border-radius: 7px;
  background: linear-gradient(135deg, rgba(240, 253, 250, 0.94), rgba(255, 255, 255, 0.78));
  color: #0f172a;
  padding: 11px 36px 11px 12px;
  text-decoration: none;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.full-reading-app.is-reading-overview-page .overview-speech-work-card:hover,
.full-reading-app.is-reading-overview-page .overview-speech-work-card:focus-visible {
  border-color: rgba(13, 148, 136, 0.62);
  background: #f0fdfa;
  transform: translateY(-1px);
}

.full-reading-app.is-reading-overview-page .overview-speech-work-meta {
  color: #0f766e;
  font-size: 10px;
  font-weight: 850;
  line-height: 1.25;
}

.full-reading-app.is-reading-overview-page .overview-speech-work-card strong,
.full-reading-app.is-reading-overview-page .overview-speech-work-card small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.full-reading-app.is-reading-overview-page .overview-speech-work-card strong {
  color: #0f172a;
  font-size: 15px;
  line-height: 1.25;
  white-space: nowrap;
}

.full-reading-app.is-reading-overview-page .overview-speech-work-card small {
  display: -webkit-box;
  color: #475569;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.full-reading-app.is-reading-overview-page .overview-speech-work-arrow {
  position: absolute;
  top: 50%;
  right: 12px;
  color: #0f766e;
  font-size: 18px;
  font-weight: 900;
  transform: translateY(-50%);
}

@media (max-width: 620px) {
  .full-reading-app.is-reading-overview-page .overview-speech-works-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .full-reading-app.is-reading-overview-page .overview-speech-works-head > p {
    text-align: left;
  }

  .full-reading-app.is-reading-overview-page .overview-speech-works-list {
    grid-template-columns: 1fr;
  }
}

.full-reading-app.is-reading-overview-page .reading-summary-panel {
  display: grid;
  gap: 14px;
  margin-top: 0;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  padding: 18px;
}

.full-reading-app.is-reading-overview-page .reading-summary-hero {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-width: 0;
}

.full-reading-app.is-reading-overview-page .reading-summary-trophy {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: linear-gradient(145deg, #fff7d6, #dbeafe);
  color: #d97706;
  font-size: 44px;
  line-height: 1;
}

.full-reading-app.is-reading-overview-page .reading-summary-panel.is-summary-pending .reading-summary-trophy {
  background: #f1f5f9;
  color: #94a3b8;
  font-size: 28px;
}

.full-reading-app.is-reading-overview-page .reading-summary-panel.is-summary-pending .reading-summary-scoreboard strong {
  color: #64748b;
}

.full-reading-app.is-reading-overview-page .reading-summary-trophy svg {
  width: 72px;
  height: 72px;
}

.full-reading-app.is-reading-overview-page .reading-summary-hero h2 {
  margin: 3px 0 0;
  color: #0f172a;
  font-size: 24px;
  line-height: 1.15;
}

.full-reading-app.is-reading-overview-page .reading-summary-hero p:last-child {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.full-reading-app.is-reading-overview-page .reading-summary-scoreboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.full-reading-app.is-reading-overview-page .reading-summary-scoreboard > div {
  display: grid;
  gap: 3px;
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 6px;
  background: rgba(248, 250, 252, 0.82);
  padding: 10px 12px;
}

.full-reading-app.is-reading-overview-page .reading-summary-scoreboard span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.full-reading-app.is-reading-overview-page .reading-summary-scoreboard strong {
  color: #0f766e;
  font-size: 26px;
  line-height: 1;
}

.full-reading-app.is-reading-overview-page .reading-summary-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.full-reading-app.is-reading-overview-page .reading-summary-section-head h3 {
  margin: 2px 0 0;
  color: #0f172a;
  font-size: 18px;
}

.full-reading-app.is-reading-overview-page .reading-summary-section-head button,
.full-reading-app.is-reading-overview-page .reading-summary-actions button {
  min-height: 44px;
  border: 1px solid rgba(37, 99, 235, 0.24);
  border-radius: 6px;
  background: #fff;
  color: #1d4ed8;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 850;
}

.full-reading-app.is-reading-overview-page .reading-summary-sentence-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 8px;
  max-height: 360px;
  margin: 8px 0 0;
  padding: 0;
  overflow: hidden;
  list-style: none;
}

.full-reading-app.is-reading-overview-page .reading-summary-panel:not(.is-scores-expanded) .reading-summary-sentence:nth-child(n + 5) {
  display: none;
}

.full-reading-app.is-reading-overview-page .reading-summary-panel.is-scores-expanded .reading-summary-sentence-list {
  max-height: none;
  overflow: visible;
}

.full-reading-app.is-reading-overview-page .reading-summary-sentence {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  min-height: 56px;
  border: 1px solid rgba(148, 163, 184, 0.20);
  border-radius: 6px;
  background: rgba(248, 250, 252, 0.66);
  padding: 7px 9px;
}

.full-reading-app.is-reading-overview-page .reading-summary-sentence-number {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.full-reading-app.is-reading-overview-page .reading-summary-sentence-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.full-reading-app.is-reading-overview-page .reading-summary-sentence-english,
.full-reading-app.is-reading-overview-page .reading-summary-sentence-translation,
.full-reading-app.is-reading-overview-page .reading-summary-sentence-meta {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.full-reading-app.is-reading-overview-page .reading-summary-sentence-english {
  color: #1e293b;
  font-size: 13px;
  font-weight: 800;
}

.full-reading-app.is-reading-overview-page .reading-summary-sentence-translation {
  color: #64748b;
  font-size: 11px;
  font-weight: 650;
}

.full-reading-app.is-reading-overview-page .reading-summary-sentence-meta {
  color: #94a3b8;
  font-size: 10px;
  font-weight: 750;
}

.full-reading-app.is-reading-overview-page .reading-summary-sentence-score {
  display: grid;
  place-items: center;
  min-width: 42px;
  height: 32px;
  border-radius: 6px;
  background: #dcfce7;
  color: #166534;
  font-size: 18px;
  line-height: 1;
}

.full-reading-app.is-reading-overview-page .reading-summary-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.full-reading-app.is-reading-overview-page .reading-summary-actions .primary-action {
  border-color: rgba(37, 99, 235, 0.32);
  background: #2563eb;
  color: #fff;
}

@media (max-width: 700px) {
  .full-reading-app.is-reading-overview-page .reading-summary-panel { padding: 14px; }
  .full-reading-app.is-reading-overview-page .reading-summary-hero { grid-template-columns: 62px minmax(0, 1fr); gap: 10px; }
  .full-reading-app.is-reading-overview-page .reading-summary-trophy { width: 62px; height: 62px; font-size: 34px; }
  .full-reading-app.is-reading-overview-page .reading-summary-trophy svg { width: 54px; height: 54px; }
  .full-reading-app.is-reading-overview-page .reading-summary-hero h2 { font-size: 20px; }
  .full-reading-app.is-reading-overview-page .reading-summary-scoreboard strong { font-size: 22px; }
  .full-reading-app.is-reading-overview-page .reading-summary-sentence-list { grid-template-columns: 1fr; max-height: 330px; }
  .full-reading-app.is-reading-overview-page .reading-summary-actions { justify-content: stretch; }
  .full-reading-app.is-reading-overview-page .reading-summary-actions button { flex: 1 1 150px; }
}

/* Keep the fixed result area visible without pushing the learning path far below the fold. */
.full-reading-app.is-reading-overview-page .reading-summary-panel {
  gap: 9px;
  padding: 12px;
}

.full-reading-app.is-reading-overview-page .reading-summary-hero {
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px;
}

.full-reading-app.is-reading-overview-page .reading-summary-trophy {
  width: 58px;
  height: 58px;
}

.full-reading-app.is-reading-overview-page .reading-summary-trophy svg {
  width: 50px;
  height: 50px;
}

.full-reading-app.is-reading-overview-page .reading-summary-hero h2 {
  font-size: 20px;
}

.full-reading-app.is-reading-overview-page .reading-summary-hero p:last-child {
  margin-top: 3px;
  font-size: 12px;
}

.full-reading-app.is-reading-overview-page .reading-summary-scoreboard {
  gap: 6px;
}

.full-reading-app.is-reading-overview-page .reading-summary-scoreboard > div {
  padding: 7px 9px;
}

.full-reading-app.is-reading-overview-page .reading-summary-scoreboard strong {
  font-size: 21px;
}

.full-reading-app.is-reading-overview-page .reading-summary-sentence-list {
  max-height: 222px;
  margin-top: 5px;
  gap: 5px 6px;
}

.full-reading-app.is-reading-overview-page .reading-summary-sentence {
  min-height: 48px;
  padding: 5px 7px;
}

.full-reading-app.is-reading-overview-page .reading-summary-sentence-english {
  font-size: 12px;
}

.full-reading-app.is-reading-overview-page .reading-summary-sentence-translation {
  font-size: 10px;
}

.full-reading-app.is-reading-overview-page .reading-summary-sentence-meta {
  font-size: 9px;
}

/* Final learning-path alignment: one visual system for the overview only. */
.full-reading-app.is-reading-overview-page .overview-task-hub {
  margin-top: 14px;
}

.full-reading-app.is-reading-overview-page .overview-section-head {
  min-height: 36px;
  align-items: center;
  margin-bottom: 8px;
}

.full-reading-app.is-reading-overview-page .overview-section-head h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.full-reading-app.is-reading-overview-page .overview-reading-stats {
  gap: 6px;
}

.full-reading-app.is-reading-overview-page .overview-reading-stats span {
  min-height: 30px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  padding: 0 9px;
}

.full-reading-app.is-reading-overview-page .overview-reading-task {
  grid-template-columns: minmax(190px, 0.86fr) minmax(0, 1.14fr);
  gap: 20px;
  border: 1px solid rgba(217, 119, 6, 0.24);
  border-radius: 8px;
  background: linear-gradient(105deg, rgba(255, 253, 247, 0.96), rgba(255, 255, 255, 0.84));
  padding: 14px 16px;
}

.full-reading-app.is-reading-overview-page .overview-reading-heading {
  min-width: 0;
}

.full-reading-app.is-reading-overview-page .overview-reading-heading h3 {
  margin: 2px 0 0;
  font-size: 18px;
  line-height: 1.2;
}

.full-reading-app.is-reading-overview-page .overview-reading-heading > p {
  max-width: 28em;
  margin: 5px 0 0;
  font-size: 12px;
  line-height: 1.45;
}

.full-reading-app.is-reading-overview-page .overview-reading-task .overview-task-actions {
  align-items: stretch;
  gap: 8px;
}

.full-reading-app.is-reading-overview-page .overview-reading-task .overview-task-actions button {
  min-height: 46px;
  border-radius: 6px;
  border-color: rgba(148, 163, 184, 0.38);
  background: #fff;
  color: #1e293b;
  font-size: 13px;
  font-weight: 850;
}

.full-reading-app.is-reading-overview-page .overview-reading-task .overview-task-actions button:hover {
  border-color: rgba(37, 99, 235, 0.48);
  background: #eff6ff;
  color: #1d4ed8;
}

.full-reading-app.is-reading-overview-page .overview-task-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 10px;
  margin-top: 10px;
}

.full-reading-app.is-reading-overview-page .overview-task-card {
  min-height: 154px;
  gap: 9px;
  border-radius: 8px;
  padding: 15px;
}

.full-reading-app.is-reading-overview-page .overview-task-card h3,
.full-reading-app.is-reading-overview-page .overview-ai-task strong {
  margin-top: 2px;
  font-size: 17px;
  line-height: 1.2;
}

.full-reading-app.is-reading-overview-page .overview-task-status,
.full-reading-app.is-reading-overview-page .overview-ai-task small {
  min-height: 38px;
  font-size: 12px;
  line-height: 1.45;
}

.full-reading-app.is-reading-overview-page .overview-task-actions button,
.full-reading-app.is-reading-overview-page .overview-ai-cta,
.full-reading-app.is-reading-overview-page .quick-test-inline-link {
  min-height: 44px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 850;
}

.full-reading-app.is-reading-overview-page .overview-retell-task .overview-task-actions button,
.full-reading-app.is-reading-overview-page .pronunciation-focus-summary-row button,
.full-reading-app.is-reading-overview-page .quick-test-inline-link {
  width: 100%;
}

.full-reading-app.is-reading-overview-page .overview-retell-task .overview-task-actions {
  display: block;
}

.full-reading-app.is-reading-overview-page .overview-retell-task .overview-task-actions button {
  border: 1px solid rgba(37, 99, 235, 0.22);
  background: #eff6ff;
  color: #1d4ed8;
}

.full-reading-app.is-reading-overview-page .overview-retell-task .overview-task-actions button:hover {
  border-color: rgba(37, 99, 235, 0.48);
  background: #dbeafe;
}

.full-reading-app.is-reading-overview-page .pronunciation-focus-summary-row {
  display: grid;
  grid-template-columns: minmax(56px, auto) minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 7px;
}

.full-reading-app.is-reading-overview-page .pronunciation-focus-summary-row > span {
  color: #0f766e;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.full-reading-app.is-reading-overview-page .pronunciation-focus-summary-row button,
.full-reading-app.is-reading-overview-page .quick-test-inline-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(15, 118, 110, 0.24);
  background: #ecfdf5;
  color: #0f766e;
  padding: 0 8px;
  text-decoration: none;
}

.full-reading-app.is-reading-overview-page .pronunciation-focus-summary-row button:hover,
.full-reading-app.is-reading-overview-page .quick-test-inline-link:hover {
  border-color: rgba(15, 118, 110, 0.48);
  background: #d1fae5;
}

.full-reading-app.is-reading-overview-page .overview-ai-cta {
  align-self: stretch;
  margin-top: auto;
  border-color: rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  padding: 0 12px;
}

.full-reading-app.is-reading-overview-page .overview-ai-task {
  border-color: #2b7182;
  background: #205c6e;
}

.full-reading-app.is-reading-overview-page .overview-ai-task:hover {
  border-color: #3b8a99;
  background: #276b7d;
}

.full-reading-app.is-reading-overview-page .overview-related-content {
  margin-top: 14px;
  border-top-color: rgba(148, 163, 184, 0.24);
  padding-top: 12px;
}

.full-reading-app.is-reading-overview-page .overview-related-head {
  align-items: center;
  gap: 14px;
}

.full-reading-app.is-reading-overview-page .overview-related-head h2 {
  margin: 0;
  font-size: 18px;
}

.full-reading-app.is-reading-overview-page .overview-related-head > p {
  max-width: 36em;
  font-size: 12px;
  line-height: 1.4;
}

.full-reading-app.is-reading-overview-page .overview-related-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 9px;
}

.full-reading-app.is-reading-overview-page .overview-related-link {
  min-height: 66px;
  grid-template-columns: minmax(58px, auto) minmax(0, 1fr) auto;
  gap: 9px;
  border-radius: 7px;
  padding: 9px 11px;
}

.full-reading-app.is-reading-overview-page .overview-related-copy strong {
  font-size: 13px;
}

.full-reading-app.is-reading-overview-page .overview-related-copy small {
  margin-top: 3px;
  font-size: 11px;
}

@media (max-width: 1020px) {
  .full-reading-app.is-reading-overview-page .overview-task-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .full-reading-app.is-reading-overview-page .overview-reading-task {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .full-reading-app.is-reading-overview-page .overview-task-grid,
  .full-reading-app.is-reading-overview-page .overview-related-list {
    grid-template-columns: 1fr;
  }

  .full-reading-app.is-reading-overview-page .overview-task-card {
    min-height: 148px;
  }
}

@media (max-width: 640px) {
  .full-reading-app.is-reading-overview-page .overview-section-head {
    align-items: flex-start;
    gap: 7px;
  }

  .full-reading-app.is-reading-overview-page .overview-reading-task {
    padding: 13px;
  }

  .full-reading-app.is-reading-overview-page .overview-reading-task .overview-task-actions {
    grid-template-columns: 1fr;
  }

  .full-reading-app.is-reading-overview-page .pronunciation-focus-summary-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .full-reading-app.is-reading-overview-page .pronunciation-focus-summary-row > span {
    grid-column: 1 / -1;
  }
}

/* Reduce overview copy to labels, scores, and actions. */
.full-reading-app.is-reading-overview-page .passage-hero #passageSubtitle,
.full-reading-app.is-reading-overview-page .reading-summary-hero p:last-child,
.full-reading-app.is-reading-overview-page .reading-summary-sentence-meta,
.full-reading-app.is-reading-overview-page .overview-reading-heading > p,
.full-reading-app.is-reading-overview-page .overview-retell-task .overview-task-status,
.full-reading-app.is-reading-overview-page .overview-ai-task small,
.full-reading-app.is-reading-overview-page .overview-related-copy small {
  display: none;
}

.full-reading-app.is-reading-overview-page #overviewTaskTitle {
  display: none;
}

.full-reading-app.is-reading-overview-page .overview-section-head {
  min-height: 24px;
}

.full-reading-app.is-reading-overview-page .overview-reading-task {
  grid-template-columns: minmax(150px, 0.62fr) minmax(0, 1.38fr);
}

.full-reading-app.is-reading-overview-page .overview-reading-heading h3 {
  font-size: 21px;
}

.full-reading-app.is-reading-overview-page .overview-task-card {
  gap: 7px;
}

.full-reading-app.is-reading-overview-page .overview-task-status {
  min-height: 0;
}

.full-reading-app.is-reading-overview-page .reading-summary-hero {
  align-items: center;
}

.full-reading-app.is-reading-overview-page .reading-summary-sentence {
  min-height: 44px;
}

.full-reading-app.is-reading-overview-page .overview-related-copy {
  align-self: center;
}

.full-reading-app.is-reading-overview-page .overview-reading-task {
  grid-template-columns: minmax(92px, 0.4fr) minmax(140px, 0.52fr) minmax(0, 1.38fr);
  align-items: stretch;
}

.full-reading-app.is-reading-overview-page .overview-listen-first {
  display: grid;
  align-content: center;
  justify-items: start;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid rgba(15, 107, 79, 0.28);
  border-radius: 12px;
  background: #ecfdf5;
  color: #065f46;
  text-decoration: none;
}

.full-reading-app.is-reading-overview-page .overview-listen-first .mode-label {
  margin: 0 0 2px;
  color: #047857;
}

.full-reading-app.is-reading-overview-page .overview-listen-first strong {
  font-size: 16px;
  font-weight: 850;
  line-height: 1.2;
}

.full-reading-app.is-reading-overview-page .overview-listen-first:hover {
  border-color: rgba(5, 150, 105, 0.55);
  background: #d1fae5;
}

@media (max-width: 900px) {
  .full-reading-app.is-reading-overview-page .overview-reading-task {
    grid-template-columns: 1fr;
  }
}

/* Poster overview: large cover, six entries, no sentence-score block. */
.full-reading-app.is-reading-overview-page .poster-hero {
  display: block;
  position: relative;
  height: min(52vh, 520px);
  min-height: 380px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 28px;
  background: #e7e0d4;
  box-shadow: 0 18px 40px rgba(88, 63, 28, 0.12);
}

.full-reading-app.is-reading-overview-page .poster-hero > img,
.full-reading-app.is-reading-overview-page .poster-hero > img.is-book-topic {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: 68% center;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.full-reading-app.is-reading-overview-page .poster-hero > img.is-book-topic {
  object-fit: contain;
  object-position: center;
  padding: 36px;
  background: #f3eee6;
}

.full-reading-app.is-reading-overview-page .poster-shade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  height: 48%;
  background: linear-gradient(180deg, transparent, rgba(20, 16, 12, 0.62));
  pointer-events: none;
}

.full-reading-app.is-reading-overview-page .poster-copy {
  position: absolute;
  left: 36px;
  right: 36px;
  bottom: 28px;
  z-index: 2;
  color: #fff;
}

.full-reading-app.is-reading-overview-page .poster-hero h1 {
  margin: 0 0 8px;
  color: #fff;
  font-family: Palatino, "Iowan Old Style", "Songti SC", serif;
  font-size: clamp(36px, 4.4vw, 60px);
  font-weight: 650;
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.full-reading-app.is-reading-overview-page #posterStatus {
  margin: 0;
  color: rgba(255, 255, 255, 0.94);
  font-size: 18px;
  font-weight: 650;
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}

.full-reading-app.is-reading-overview-page .poster-hero #passageMeta,
.full-reading-app.is-reading-overview-page .poster-hero #passageSubtitle,
.full-reading-app.is-reading-overview-page .poster-hero #passageTags,
.full-reading-app.is-reading-overview-page .poster-hero #passageSource,
.full-reading-app.is-reading-overview-page .reading-summary-panel,
.full-reading-app.is-reading-overview-page .overall-progress {
  display: none;
}

.full-reading-app.is-reading-overview-page .overview-icon-definitions {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.full-reading-app.is-reading-overview-page .poster-icon {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Keep the existing cover geometry; only the compact scores sit over it. */
.full-reading-app.is-reading-overview-page .poster-stats {
  position: absolute;
  z-index: 3;
  top: 18px;
  right: 18px;
  width: 244px;
  max-width: calc(100% - 36px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 12px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: rgba(18, 23, 20, 0.46);
  color: #fff;
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

.full-reading-app.is-reading-overview-page .poster-stats > div {
  min-height: 27px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.full-reading-app.is-reading-overview-page .poster-stats .poster-icon { width: 14px; height: 14px; }
.full-reading-app.is-reading-overview-page .poster-stats span { color: rgba(255, 255, 255, 0.9); font-size: 11px; }
.full-reading-app.is-reading-overview-page .poster-stats strong {
  margin-left: auto;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.full-reading-app.is-reading-overview-page .poster-meta {
  min-height: 46px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 8px 0;
  color: #78716c;
  font-size: 12px;
}

.full-reading-app.is-reading-overview-page .poster-meta strong { color: #292524; font-weight: 600; }
.full-reading-app.is-reading-overview-page .poster-tag-list { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.full-reading-app.is-reading-overview-page .poster-tag-list button {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border: 1px solid rgba(120, 84, 42, 0.14);
  border-radius: 999px;
  background: #fff;
  color: #292524;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.full-reading-app.is-reading-overview-page .poster-tag-list .poster-icon { width: 12px; height: 12px; color: #78716c; }
.full-reading-app.is-reading-overview-page .poster-tag-list button:hover { color: #2458d7; background: #f0f4ff; }
.full-reading-app.is-reading-overview-page .poster-no-tags { font-size: 12px; }

.full-reading-app.is-reading-overview-page .poster-dock {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  margin-top: 0;
}

.full-reading-app.is-reading-overview-page .poster-tile {
  min-width: 0;
  min-height: 184px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 10px;
  padding: 14px 12px;
  border: 1px solid rgba(120, 84, 42, 0.14);
  border-radius: 15px;
  background: #fff;
  color: #292524;
  font: inherit;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
  text-decoration: none;
  box-shadow: none;
}

.full-reading-app.is-reading-overview-page .poster-tile.is-group { cursor: default; }
.full-reading-app.is-reading-overview-page .poster-tile-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; min-height: 25px; }
.full-reading-app.is-reading-overview-page .poster-tile-heading .poster-icon { color: #78716c; }
.full-reading-app.is-reading-overview-page .poster-tile strong { font-size: inherit; font-weight: inherit; }
.full-reading-app.is-reading-overview-page .poster-tile-actions { width: 100%; display: flex; flex-direction: column; gap: 6px; }
.full-reading-app.is-reading-overview-page .poster-tile-actions button,
.full-reading-app.is-reading-overview-page .poster-tile-actions a {
  min-width: 0;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 5px;
  border: 1px solid rgba(120, 84, 42, 0.14);
  border-radius: 8px;
  background: #fff;
  color: #292524;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.full-reading-app.is-reading-overview-page .poster-tile-actions button:hover,
.full-reading-app.is-reading-overview-page .poster-tile-actions a:hover { background: #f5f4ed; color: #2458d7; }
.full-reading-app.is-reading-overview-page .poster-tile-actions button:disabled { background: #f5f4ef; color: #96938b; border-color: rgba(120, 84, 42, 0.1); cursor: default; }
.full-reading-app.is-reading-overview-page .poster-tile.is-read { background: #f0f4ff; }
.full-reading-app.is-reading-overview-page .poster-dock .poster-tile.is-challenge { background: #fff; border-color: rgba(120, 84, 42, 0.14); }
.full-reading-app.is-reading-overview-page .poster-dock .poster-tile.is-challenge .poster-tile-actions button { background: #fff; color: #292524; }
.full-reading-app.is-reading-overview-page .poster-tile.is-read .poster-tile-heading .poster-icon { color: #2458d7; }
.full-reading-app.is-reading-overview-page .poster-tile #openImmersiveReading { background: #2458d7; color: #fff; border-color: #2458d7; }
.full-reading-app.is-reading-overview-page .poster-tile #openImmersiveReading:hover { background: #1d4ed8; }
.full-reading-app.is-reading-overview-page #overviewRetellStatus,
.full-reading-app.is-reading-overview-page .poster-tile #pronunciationFocusCount,
.full-reading-app.is-reading-overview-page .poster-tile #topicLivingSentenceDescription { margin: 0; color: #78716c; font-size: 12px; font-weight: 400; }
.full-reading-app.is-reading-overview-page #overviewRetellStatus:empty { display: none; }
.full-reading-app.is-reading-overview-page .poster-tile a:focus-visible,
.full-reading-app.is-reading-overview-page .poster-tile button:focus-visible,
.full-reading-app.is-reading-overview-page .poster-tag-list button:focus-visible,
.full-reading-app.is-reading-overview-page .overview-tag-dialog :focus-visible { outline: 3px solid rgba(37, 99, 235, 0.45); outline-offset: 2px; }

.full-reading-app.is-reading-overview-page .poster-extra-dock { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.full-reading-app.is-reading-overview-page .poster-extra-dock:not(:has(> a:not([hidden]))) { display: none; }
.full-reading-app.is-reading-overview-page .poster-extra-dock .poster-tile { min-height: 44px; flex-direction: row; align-items: center; padding: 10px 14px; font-size: 14px; }

.full-reading-app.is-reading-overview-page .overview-resources { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 20px; margin-top: 14px; border-top: 1px solid rgba(120, 84, 42, 0.14); }
.full-reading-app.is-reading-overview-page .overview-resources:has(> [hidden]) { grid-template-columns: minmax(0, 1fr); }
.full-reading-app.is-reading-overview-page .overview-key-words,
.full-reading-app.is-reading-overview-page .overview-directory { display: block; min-width: 0; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.full-reading-app.is-reading-overview-page .overview-key-words > summary,
.full-reading-app.is-reading-overview-page .overview-directory > summary { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0; color: #292524; font-size: 12px; list-style: none; cursor: pointer; }
.full-reading-app.is-reading-overview-page .overview-key-words > summary::-webkit-details-marker { display: none; }
.full-reading-app.is-reading-overview-page .overview-key-words > summary strong,
.full-reading-app.is-reading-overview-page .overview-directory > summary strong { font-size: 12px; font-weight: 600; }
.full-reading-app.is-reading-overview-page .overview-key-words > summary > span,
.full-reading-app.is-reading-overview-page .overview-directory-meta { margin-left: auto; color: #78716c; font-size: 11px; font-weight: 400; white-space: normal; text-align: right; }
.full-reading-app.is-reading-overview-page .overview-directory > summary small { display: none; }
.full-reading-app.is-reading-overview-page .overview-key-words > summary::after,
.full-reading-app.is-reading-overview-page .overview-directory > summary::after { content: "+"; flex: none; width: auto; height: auto; border: 0; border-radius: 0; background: transparent; color: #78716c; font-size: 20px; font-weight: 400; box-shadow: none; }
.full-reading-app.is-reading-overview-page .overview-key-words[open] > summary::after,
.full-reading-app.is-reading-overview-page .overview-directory[open] > summary::after { content: "−"; }
.full-reading-app.is-reading-overview-page .overview-key-word-list { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0 12px; }
.full-reading-app.is-reading-overview-page .overview-key-word-list span { min-height: 28px; display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 6px; background: #f4f1ea; color: #292524; font-size: 12px; font-weight: 400; }

.full-reading-app.is-reading-overview-page .overview-quiz-toolbar { display: grid; grid-template-columns: minmax(64px, 1fr) auto minmax(64px, 1fr); align-items: center; gap: 8px; }
.full-reading-app.is-reading-overview-page .overview-quiz-toolbar .mode-label { grid-column: 2; margin: 0; }
.full-reading-app.is-reading-overview-page .overview-quiz-close { grid-column: 3; justify-self: end; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 6px 10px; border: 1px solid rgba(120, 84, 42, 0.16); border-radius: 8px; background: #fff; color: #57534e; font: inherit; font-size: 13px; white-space: nowrap; cursor: pointer; }
.full-reading-app.is-reading-overview-page .overview-quiz-close span { font-size: 20px; line-height: 1; }
.full-reading-app.is-reading-overview-page .overview-quiz-close:hover { border-color: rgba(37, 99, 235, 0.4); background: #eff6ff; color: #1d4ed8; }
.full-reading-app.is-reading-overview-page .overview-quiz-close.is-bottom { grid-column: auto; justify-self: center; min-width: 120px; }

body.overview-tag-dialog-open { overflow: hidden; }

.full-reading-app.is-reading-overview-page .overview-tag-dialog {
  width: min(960px, calc(100% - 48px));
  max-height: min(820px, calc(100dvh - 64px));
  padding: 24px;
  border: 1px solid rgba(120, 84, 42, 0.14);
  border-radius: 18px;
  background: #fff;
  color: #292524;
  box-shadow: 0 18px 46px rgba(20, 16, 12, 0.2);
  overflow: hidden;
}

.full-reading-app.is-reading-overview-page .overview-tag-dialog[open] { display: flex; flex-direction: column; }
.full-reading-app.is-reading-overview-page .overview-tag-dialog::backdrop { background: rgba(18, 24, 21, 0.5); }
.full-reading-app.is-reading-overview-page .overview-tag-dialog-head { flex: none; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.full-reading-app.is-reading-overview-page .overview-tag-dialog-head h2 { margin: 0 0 6px; font-size: 20px; line-height: 1.35; }
.full-reading-app.is-reading-overview-page .overview-tag-dialog-head p { margin: 0; color: #78716c; font-size: 12px; }
.full-reading-app.is-reading-overview-page #closeOverviewTagDialog { flex: none; width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border: 1px solid rgba(120, 84, 42, 0.14); border-radius: 9px; background: #fff; color: #292524; font: inherit; font-size: 24px; cursor: pointer; }
.full-reading-app.is-reading-overview-page .overview-tag-results { min-height: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: max-content; align-content: start; gap: 16px; padding: 3px 4px 5px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.full-reading-app.is-reading-overview-page .overview-tag-result { min-width: 0; display: flex; flex-direction: column; overflow: hidden; border: 1px solid rgba(120, 84, 42, 0.14); border-radius: 14px; background: #fff; color: #292524; text-decoration: none; box-shadow: 0 3px 12px rgba(55, 45, 30, 0.04); transition: border-color 180ms ease, box-shadow 180ms ease; }
.full-reading-app.is-reading-overview-page .overview-tag-result:hover { border-color: rgba(37, 88, 215, 0.35); box-shadow: 0 6px 18px rgba(55, 45, 30, 0.1); }
.full-reading-app.is-reading-overview-page .overview-tag-cover { position: relative; display: block; flex: none; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #edece3; }
.full-reading-app.is-reading-overview-page .overview-tag-cover img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; }
.full-reading-app.is-reading-overview-page .overview-tag-cover-fallback { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: linear-gradient(135deg, #ecece2, #dbe5de); color: #64756b; font-size: 12px; }
.full-reading-app.is-reading-overview-page .overview-tag-cover-fallback .poster-icon { width: 30px; height: 30px; stroke-width: 1.4; }
.full-reading-app.is-reading-overview-page .overview-tag-card-body { min-width: 0; display: flex; flex: 1; flex-direction: column; gap: 14px; padding: 14px; }
.full-reading-app.is-reading-overview-page .overview-tag-card-body strong { min-height: 2.7em; display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 15px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.full-reading-app.is-reading-overview-page .overview-tag-card-meta { display: flex; align-items: center; gap: 8px; margin-top: auto; }
.full-reading-app.is-reading-overview-page .overview-tag-difficulty { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 7px; border-radius: 6px; background: #f1f4ee; color: #51634e; font-size: 11px; font-weight: 600; }
.full-reading-app.is-reading-overview-page .overview-tag-result small { color: #78716c; font-size: 12px; }
.full-reading-app.is-reading-overview-page .overview-tag-card-meta > .poster-icon { margin-left: auto; color: #78716c; }
.full-reading-app.is-reading-overview-page .overview-tag-result:hover .overview-tag-card-meta > .poster-icon { color: #2458d7; }
.full-reading-app.is-reading-overview-page .overview-tag-empty { grid-column: 1 / -1; margin: 0; padding: 32px 0; color: #78716c; font-size: 14px; text-align: center; }

@media (max-width: 860px) {
  .full-reading-app.is-reading-overview-page .overview-tag-results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 480px) {
  .full-reading-app.is-reading-overview-page .overview-tag-dialog { width: calc(100% - 24px); max-height: calc(100dvh - 32px); }
  .full-reading-app.is-reading-overview-page .overview-tag-results { grid-template-columns: minmax(0, 1fr); gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .full-reading-app.is-reading-overview-page .overview-tag-result { transition: none; }
}

@media (max-width: 1100px) {
  .full-reading-app.is-reading-overview-page .poster-dock { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .full-reading-app.is-reading-overview-page .poster-hero {
    height: 280px;
    min-height: 240px;
    border-radius: 20px;
  }

  .full-reading-app.is-reading-overview-page .poster-copy {
    left: 18px;
    right: 18px;
    bottom: 16px;
  }

  .full-reading-app.is-reading-overview-page .poster-hero h1 {
    font-size: 30px;
  }

  .full-reading-app.is-reading-overview-page .poster-stats { top: 12px; right: 12px; width: 230px; max-width: calc(100% - 24px); padding: 8px 10px; gap: 4px 10px; }
  .full-reading-app.is-reading-overview-page .poster-meta { gap: 8px 12px; padding: 10px 0; }
  .full-reading-app.is-reading-overview-page .poster-tag-list { width: 100%; }
  .full-reading-app.is-reading-overview-page .poster-tag-list button { min-height: 36px; padding: 6px 11px; }
  .full-reading-app.is-reading-overview-page .poster-dock { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .full-reading-app.is-reading-overview-page .poster-tile { min-height: 180px; padding: 13px 11px; font-size: 17px; }
  .full-reading-app.is-reading-overview-page .poster-tile-actions button,
  .full-reading-app.is-reading-overview-page .poster-tile-actions a { min-height: 38px; font-size: 13px; }
  .full-reading-app.is-reading-overview-page .overview-resources { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .full-reading-app.is-reading-overview-page .overview-directory > summary { min-height: 44px; }
  .full-reading-app.is-reading-overview-page .overview-tag-dialog { padding: 16px; }
}

@media (pointer: coarse) {
  .full-reading-app.is-reading-overview-page .poster-tile-actions button,
  .full-reading-app.is-reading-overview-page .poster-tile-actions a,
  .full-reading-app.is-reading-overview-page .poster-tag-list button,
  .full-reading-app.is-reading-overview-page .overview-quiz-close,
  .full-reading-app.is-reading-overview-page #closeOverviewTagDialog { min-height: 44px; }
  .full-reading-app.is-reading-overview-page #closeOverviewTagDialog { width: 44px; }
}

/* A reading passage can offer a collection of related picture-talk activities. */
body.picture-talk-journey-open { overflow: hidden; }
.picture-talk-journey-dialog {
  width: min(960px, calc(100% - 40px));
  max-height: calc(100dvh - 48px);
  padding: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  color: #292524;
  box-shadow: var(--shadow);
}
.picture-talk-journey-dialog[open] { display: flex; flex-direction: column; }
.picture-talk-journey-dialog::backdrop { background: rgba(18, 24, 21, 0.5); }
.picture-talk-journey-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.picture-talk-journey-head h2 { margin: 4px 0 0; font-size: 24px; line-height: 1.4; }
.picture-talk-journey-kicker { margin: 0; color: #587568; font-size: 12px; }
#closePictureTalkJourney { flex: none; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: #292524; font: inherit; font-size: 26px; cursor: pointer; }
#pictureTalkJourneySummary { margin: 12px 0 0; color: #625e58; font-size: 14px; line-height: 1.65; }
.picture-talk-journey-progress { margin: 10px 0 18px; color: #326c55; font-size: 13px; }
.picture-talk-journey-cards { min-height: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: max-content; align-content: start; gap: 16px; padding: 3px 3px 6px; overflow-y: auto; overscroll-behavior: contain; }
.picture-talk-journey-card { min-width: 0; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; color: inherit; background: #fff; text-decoration: none; }
.picture-talk-journey-card:hover { border-color: #4b856c; }
.picture-talk-journey-card:focus-visible, .picture-talk-journey-dialog button:focus-visible { outline: 3px solid #457eac; outline-offset: 2px; }
.picture-talk-journey-card > img { display: block; flex: none; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: #efeee8; }
.picture-talk-journey-card-body { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 14px; }
.picture-talk-journey-card-meta { color: #76706a; font-size: 12px; }
.picture-talk-journey-card-meta.is-complete { color: #277550; }
.picture-talk-journey-card-body > strong { font-size: 16px; line-height: 1.45; }
.picture-talk-journey-card-body > p { flex: 1; margin: 0; color: #625e58; font-size: 13px; line-height: 1.65; }
.picture-talk-journey-card-action { margin-top: 4px; color: #326c55; font-size: 13px; font-weight: 600; }
@media (max-width: 860px) {
  .picture-talk-journey-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .picture-talk-journey-dialog { width: calc(100% - 24px); max-height: calc(100dvh - 24px); padding: 16px; }
  .picture-talk-journey-head h2 { font-size: 21px; }
  .picture-talk-journey-cards { grid-template-columns: minmax(0, 1fr); }
}

/* Fluent reading keeps assessment feedback outside the sentence layout. */
.fluent-review-hud {
  position: fixed;
  z-index: 25;
  top: 100px;
  right: 24px;
  width: 144px;
  max-height: 156px;
  overflow: auto;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 14px;
  background: rgba(17, 24, 39, .66);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .12);
  backdrop-filter: blur(12px);
}
.fluent-review-hud[hidden] { display: none; }
.fluent-review-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; }
.fluent-review-heading strong { font-size: 19px; font-variant-numeric: tabular-nums; }
.fluent-review-cells { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; }
.fluent-review-cells:not(:empty) { margin-top: 10px; }
.fluent-review-cell { display: block; aspect-ratio: 1; border-radius: 2px; background: #fb6b73; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); }
.speaking-modal-dialog.is-fluent-reading-mode.is-immersive-reading-mode .speaking-immersive-score:not([hidden]) {
  position: fixed;
  z-index: 24;
  top: 43%;
  right: 24px;
  left: auto;
  width: 112px;
  min-height: 100px;
  margin: 0;
  padding: 12px 8px;
  border-radius: 20px;
  background: rgba(17, 24, 39, .52);
  font-size: clamp(48px, 5.5vw, 76px);
  text-shadow: 0 2px 10px rgba(0, 0, 0, .4);
  transform: none;
  pointer-events: none;
}
.speaking-modal-dialog.is-fluent-reading-mode.is-immersive-reading-mode .speaking-focus-stage {
  width: min(1500px, calc(100vw - 200px));
  transform: translate(-32px, 12px);
}
.speaking-modal-dialog.is-fluent-reading-mode .speaking-ready-countdown {
  position: fixed;
  inset: auto;
  top: auto;
  bottom: 118px;
  left: 50%;
  width: auto;
  min-width: 160px;
  min-height: 0;
  padding: 10px 18px;
  border-radius: 24px;
  transform: translateX(-50%);
  pointer-events: none;
}
.speaking-modal-dialog.is-fluent-reading-mode .speaking-ready-countdown-value { font-size: 18px; }
.speaking-modal-dialog.is-fluent-reading-mode .speaking-ready-countdown.is-go .speaking-ready-countdown-label { display: none; }
.speaking-modal-dialog.is-fluent-reading-mode .speaking-ready-countdown.is-preparing .speaking-ready-countdown-value { display: none; }
@media (max-width: 700px) {
  .fluent-review-hud { top: 140px; right: 12px; width: 112px; max-height: 112px; padding: 8px; }
  .fluent-review-cells { grid-template-columns: repeat(6, 1fr); }
  .speaking-modal-dialog.is-fluent-reading-mode.is-immersive-reading-mode .speaking-focus-stage { width: 94vw; transform: translateY(12px); }
  .speaking-modal-dialog.is-fluent-reading-mode.is-immersive-reading-mode .speaking-immersive-score:not([hidden]) { top: 270px; right: 12px; width: 70px; min-height: 64px; font-size: 44px; }
}

/* The existing voice indicator is the fluent mode readiness signal. */
.speaking-modal-dialog.is-fluent-reading-mode.is-immersive-reading-mode .speaking-voice-reception:not(.is-listening) {
  color: rgba(255, 255, 255, .42);
  background: rgba(92, 92, 92, .38);
  border-color: rgba(255, 255, 255, .18);
  box-shadow: none;
  opacity: .65;
}
.speaking-modal-dialog.is-fluent-reading-mode.is-immersive-reading-mode .speaking-voice-reception.is-listening {
  color: #ecfeff;
  background: rgba(8, 110, 140, .78);
  border-color: rgba(165, 243, 252, .9);
  box-shadow: 0 0 0 3px rgba(103, 232, 249, .15), 0 0 22px rgba(103, 232, 249, .32);
  opacity: 1;
  animation: fluent-voice-ready 460ms cubic-bezier(.22, 1, .36, 1) both;
}
.speaking-modal-dialog.is-fluent-reading-mode.is-immersive-reading-mode .speaking-voice-reception.is-receiving {
  background: rgba(20, 110, 65, .8);
  border-color: #a7f3d0;
  color: #f0fdf4;
}
@keyframes fluent-voice-ready {
  0% { transform: translateY(0) scale(.9); }
  42% { transform: translateY(-8px) scale(1.12); }
  75% { transform: translateY(1px) scale(.98); }
  100% { transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .speaking-modal-dialog.is-fluent-reading-mode.is-immersive-reading-mode .speaking-voice-reception.is-listening { animation: none; }
}

/* Six artwork-aware caption anchors. Upper-center and lower-left retain the
   established geometry; the other anchors extend those two vertical bands. */
#speakingPanel[data-caption-measuring] :is(.speaking-focus-stage, .reading-target, .speaking-immersive-translation) {
  transition: none !important;
}
.speaking-modal-dialog.is-immersive-reading-mode[data-caption-position="upper-left"] .speaking-stage-board {
  justify-items: start;
}
.speaking-modal-dialog.is-immersive-reading-mode[data-caption-position="upper-right"] .speaking-stage-board {
  justify-items: end;
}
.speaking-modal-dialog.is-immersive-reading-mode[data-caption-position="upper-left"] .speaking-focus-stage {
  width: min(1100px, 72vw, var(--immersive-caption-left-width, 100vw));
}
.speaking-modal-dialog.is-immersive-reading-mode:is([data-caption-position="upper-right"], [data-caption-position="lower-right"]) .speaking-focus-stage {
  width: min(1100px, 72vw, var(--immersive-caption-right-width, 100vw));
}
.speaking-modal-dialog.is-immersive-reading-mode:is([data-caption-position="upper-left"], [data-caption-position="upper-right"]) .speaking-focus-stage {
  min-width: 0;
}
.speaking-modal-dialog.is-immersive-reading-mode[data-caption-position="lower-center"] .speaking-focus-stage {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  justify-items: center;
}
.speaking-modal-dialog.is-immersive-reading-mode[data-caption-position="lower-right"] .speaking-focus-stage {
  left: auto;
  right: max(28px, env(safe-area-inset-right));
  justify-items: end;
}
.speaking-modal-dialog.is-immersive-reading-mode:is([data-caption-position="upper-left"], [data-caption-position="upper-right"]) .speaking-immersive-translation {
  max-width: 100%;
}
.speaking-modal-dialog.is-immersive-reading-mode[data-caption-position$="-left"] :is(.reading-target, .speaking-immersive-translation) {
  text-align: left;
}
.speaking-modal-dialog.is-immersive-reading-mode[data-caption-position$="-right"] :is(.reading-target, .speaking-immersive-translation) {
  text-align: right;
}
.speaking-modal-dialog.is-immersive-reading-mode[data-caption-position="lower-center"] :is(.reading-target, .speaking-immersive-translation) {
  text-align: center;
}
.speaking-modal-dialog.is-immersive-reading-mode[data-caption-position="lower-center"] .speaking-immersive-caption-meta {
  justify-content: center;
}
.speaking-modal-dialog.is-immersive-reading-mode[data-caption-position="lower-right"] .speaking-immersive-caption-meta {
  justify-content: flex-end;
}
@media (max-width: 640px) {
  .speaking-modal-dialog.is-immersive-reading-mode[data-caption-position="upper-left"] .speaking-focus-stage {
    width: min(90vw, 560px, var(--immersive-caption-left-width, 100vw));
  }
  .speaking-modal-dialog.is-immersive-reading-mode:is([data-caption-position="upper-right"], [data-caption-position="lower-right"]) .speaking-focus-stage {
    width: min(90vw, 560px, var(--immersive-caption-right-width, 100vw));
  }
  .speaking-modal-dialog.is-immersive-reading-mode[data-caption-position="lower-right"] .speaking-focus-stage {
    right: max(16px, env(safe-area-inset-right));
  }
}
/* A translated sentence must not enlarge the grid's intrinsic column. */
.speaking-modal-dialog.is-immersive-reading-mode[data-caption-position] .speaking-focus-stage {
  grid-template-columns: minmax(0, 1fr);
}
.speaking-modal-dialog.is-immersive-reading-mode[data-caption-position] :is(.reading-target, .speaking-immersive-caption-meta) {
  min-width: 0;
  max-width: 100%;
}
@media (max-height: 560px) and (orientation: landscape) and (min-width: 641px) {
  .speaking-modal-dialog.is-immersive-reading-mode[data-caption-position="upper-left"] .speaking-focus-stage {
    width: min(1100px, calc(100vw - 56px), var(--immersive-caption-left-width, 100vw));
  }
  .speaking-modal-dialog.is-immersive-reading-mode:is([data-caption-position="upper-right"], [data-caption-position="lower-right"]) .speaking-focus-stage {
    width: min(1100px, calc(100vw - 56px), var(--immersive-caption-right-width, 100vw));
  }
}

/* Text-only copies move above the artwork; the live controls remain usable. */
.caption-relay-stage {
  position: fixed;
  inset: 0;
  z-index: 5;
  overflow: visible;
  pointer-events: none;
}
.caption-relay-layer {
  position: absolute;
  margin: 0;
  padding: 0;
  overflow: visible;
  pointer-events: none;
  transform-origin: center;
  will-change: transform, opacity;
}
#speakingPanel[data-caption-relay] .speaking-focus-stage :is(.reading-target, .speaking-immersive-translation) {
  opacity: 0 !important;
  pointer-events: none;
}
