@font-face { font-family: YaYaReviewEnglish; src: url('./speaking/fonts/nunito.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: YaYaReviewBody; src: url('./speaking/fonts/nunito.woff2') format('woff2'); font-display: swap; }
.word-review-entry { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
.word-review-entry h2 { margin:0; }
.word-review-entry .button { padding:8px 13px; font-size:13px; }
.word-review-dialog { width:calc(100vw - 24px); max-width:none; height:calc(100dvh - 24px); max-height:none; margin:auto; padding:0; overflow:auto; border:1px solid #cddccc; border-radius:24px; color:#29434a; background:#f7f9f0; box-shadow:0 24px 80px rgba(24,54,38,.24); overscroll-behavior:contain; scrollbar-color:#a6c0ac #f7f9f0; }
.word-review-dialog::backdrop { background:rgba(22,43,33,.65); }
.word-review-dialog.is-expanded { width:100%; height:100dvh; border:0; border-radius:0; }
.word-review-dialog [hidden] { display:none !important; }
.word-review-dialog * { box-sizing:border-box; }
.word-review-dialog button, .word-review-dialog input { font:inherit; }
.word-review-dialog button { min-height:40px; padding:8px 13px; border:1px solid #bdcfb8; border-radius:9px; color:#3a6046; background:#fffef8; font-size:13px; font-weight:700; cursor:pointer; }
.word-review-dialog button:hover { border-color:#34734e; background:#eaf3e9; }
.word-review-dialog button:focus-visible, .word-review-dialog input:focus-visible { outline:3px solid #b26924; outline-offset:3px; }
.word-review-dialog button:disabled { opacity:.5; cursor:default; }
.word-review-dialog ::selection { color:#234b35; background:#cfdfbf; }
.wr-sheet { position:relative; min-height:100%; padding:22px 26px 24px; display:flex; flex-direction:column; gap:18px; font-family:YaYaReviewBody,'PingFang SC','Microsoft YaHei',sans-serif; }
.wr-sheet:fullscreen { width:100%; height:100%; overflow:auto; background:#f7f9f0; }
.wr-header { position:sticky; top:0; z-index:5; display:grid; grid-template-columns:1fr auto 1fr; gap:18px; align-items:center; padding-bottom:17px; border-bottom:1px solid #cddccc; background:#f7f9f0; }
.wr-heading { display:flex; align-items:center; gap:14px; white-space:nowrap; }
.wr-header h2 { margin:0; color:#28503a; font:750 24px/1.3 'PingFang SC','Microsoft YaHei',sans-serif; }
.wr-header p { margin:0; color:#577160; font-size:13px; line-height:1.5; }
.wr-modes { display:flex; gap:4px; padding:4px; border:1px solid #d8e1d0; border-radius:13px; background:#e9efe2; }
.word-review-dialog .wr-modes button { padding:10px 17px; border:0; border-radius:9px; background:transparent; font-size:15px; font-weight:750; white-space:nowrap; }
.word-review-dialog .wr-modes button[aria-pressed="true"] { color:#fff; background:#356b49; }
.wr-top-actions { display:flex; gap:10px; align-items:center; justify-content:flex-end; }
.wr-icon { display:inline-flex; flex-shrink:0; width:20px; height:20px; }
.wr-icon svg { width:100%; height:100%; }
.word-review-dialog .wr-select-button { display:flex; gap:8px; align-items:center; padding:11px 15px; border:1px solid #aec5ac; border-radius:11px; background:#eaf2e5; color:#315c3f; font-size:15px; white-space:nowrap; }
.wr-select-button .wr-icon { width:17px; height:17px; }
.word-review-dialog .wr-close, .word-review-dialog .wr-fullscreen { display:grid; place-items:center; flex:0 0 40px; min-width:40px; width:40px; height:44px; padding:0; background:transparent; border-color:transparent; }
.word-review-dialog .wr-close { border-color:#c8d8c3; background:#eef3e8; }
.wr-toolbar { display:flex; align-items:center; justify-content:space-between; min-height:34px; gap:14px; }
.wr-tools { display:flex; gap:9px; }
.wr-status { margin:0; color:#577160; font-size:14px; font-variant-numeric:tabular-nums; }
.wr-board { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); grid-auto-rows:max(218px,calc((100dvh - 270px)/2)); align-content:start; gap:14px; flex:1; }
.wr-card { min-width:0; border:1px solid #ceddc6; border-radius:17px; background:#fffdf4; }
.wr-card.is-revealed { border-color:#9ebd97; background:#fcfff5; }
.wr-face { display:grid; grid-template-rows:var(--wr-prompt-height,60px) minmax(var(--wr-answer-height,74px),1fr) minmax(44px,max-content); gap:6px; width:100%; height:100%; padding:14px 16px; }
.word-review-dialog .wr-word-button { display:flex; align-items:center; justify-content:center; gap:7px; width:100%; max-width:100%; min-height:44px; padding:0; border:0; border-radius:3px; background:transparent; color:#244c73; font:800 40px/1.35 YaYaReviewEnglish,var(--body); letter-spacing:0; text-decoration:none; }
.wr-word-button > span:not(.review-audio-icon) { min-width:0; overflow-wrap:anywhere; }
.wr-word-button .review-audio-icon { flex-basis:21px; width:21px; height:21px; margin-top:5px; }
.wr-prompt { color:#89512f; display:block; align-self:center; margin:0; max-height:100%; overflow:auto; font-size:30px; line-height:1.25; text-align:center; overflow-wrap:anywhere; }
.word-review-dialog .wr-answer { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px; min-width:0; min-height:0; width:100%; padding:8px 3px; overflow:auto; border:1px solid #eddbc4; border-radius:10px; background:#fff0db; color:#89512f; text-align:center; }
.wr-answer > * { flex-shrink:0; }
@supports (justify-content:safe center) { .word-review-dialog .wr-answer { justify-content:safe center; } }
.word-review-dialog .wr-reveal { border:1px dashed #b9cfac; background:#f1f4e6; color:#456345; font-size:15px; font-weight:700; }
.wr-answer-meta { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:center; gap:4px 8px; }
.wr-phonetic, .wr-pos { color:#77624f; font-size:14px; line-height:1.35; }
.wr-pos { font-size:13px; }
.wr-meaning { margin:0; color:#89512f; font-size:30px; font-weight:700; line-height:1.25; overflow-wrap:anywhere; }
.wr-card-actions { display:flex; align-items:center; justify-content:space-between; align-self:end; gap:4px; }
.wr-answer-actions { display:flex; flex:1; flex-wrap:wrap; justify-content:space-between; align-items:center; min-width:0; gap:0 4px; }
.word-review-dialog .wr-details, .word-review-dialog .wr-hide-answer { min-height:28px; padding:2px 0; border:0; border-radius:3px; background:transparent; color:#416b49; font-size:14px; font-weight:400; line-height:1.5; }
.word-review-dialog .wr-details { text-decoration:underline; text-underline-offset:3px; }
.word-review-dialog .wr-hide-answer { color:#526b58; }
.word-review-dialog .wr-hide-answer:hover { text-decoration:underline; text-underline-offset:3px; }
.wr-empty { grid-column:1/-1; padding:40px 20px; text-align:center; }
.wr-empty h3 { margin:0 0 12px; font-size:21px; }
.wr-empty p { color:#526b58; }
.wr-footer { display:flex; justify-content:space-between; gap:12px; margin:0; color:#566d57; font-size:13px; line-height:1.6; }
.wr-selection-backdrop { position:absolute; inset:92px 0 0; z-index:4; background:rgba(42,61,42,.16); border-radius:0 0 24px 24px; }
.wr-editor { position:absolute; top:calc(100% + 10px); right:64px; z-index:1; width:min(448px,calc(100vw - 80px)); max-height:calc(100dvh - 170px); overflow:auto; padding:22px; border:1px solid #adc3a3; border-radius:17px; background:#fffef7; box-shadow:0 16px 38px #263a2c26; scrollbar-color:#a6c0ac #fffef7; }
.wr-editor-header { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:6px; }
.wr-editor h3 { margin:0; color:#2c5138; font-size:21px; line-height:1.4; }
.wr-choice-count { color:#506b54; font-size:13px; }
.review-picker-heading-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; align-items:center; gap:0 6px; min-width:0; }
.review-picker-heading-actions > span { white-space:nowrap; }
.wr-editor .wr-editor-help { margin:0 0 18px; color:#516a55; font-size:13px; line-height:1.6; }
.wr-word-choices { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.wr-choice { display:flex; align-items:center; gap:6px; min-width:0; padding:4px 6px 4px 11px; border:1px solid #b5ceaa; border-radius:10px; color:#29434a; background:#eef5e6; }
.wr-choice:has(input:not(:checked)) { color:#566854; background:#fffdf7; border-color:#cfdac8; }
.wr-choice input { flex:0 0 18px; width:18px; height:18px; margin:0; accent-color:#356b49; }
.wr-choice span { min-width:0; overflow-wrap:anywhere; font:400 21px/1.3 YaYaReviewEnglish,var(--display); }
.wr-choice label, .unified-wordbook .wb-pick-option label { display:flex; flex:1; align-items:center; gap:8px; min-width:0; min-height:40px; cursor:pointer; }
.word-review-dialog .word-delete, .unified-wordbook .word-delete { flex:none; min-width:44px; min-height:44px; padding:0 6px; border:0; border-radius:7px; background:transparent; color:#526b58; font:400 13px/1.5 var(--body); white-space:nowrap; }
.word-review-dialog .word-delete:hover:not(:disabled), .unified-wordbook .word-delete:hover:not(:disabled) { background:#eaf3e9; color:#315c3f; }
.word-review-dialog .word-delete:focus-visible, .unified-wordbook .word-delete:focus-visible { outline:2px solid #526b58; outline-offset:1px; }
.unified-wordbook .word-delete:disabled { opacity:.5; cursor:default; }
.wr-editor-actions { display:flex; justify-content:space-between; align-items:center; margin-top:19px; padding-top:17px; border-top:1px solid #d9e3d2; }
.word-review-dialog .wr-primary { padding:11px 28px; border-color:#356b49; border-radius:10px; color:#fff; background:#356b49; font-size:14px; }
.word-review-dialog .wr-select-all { padding:8px 0; border:0; background:transparent; font-weight:400; }
.wr-editor .wr-editor-feedback, .unified-wordbook .wb-picker .wb-picker-feedback { margin:0 0 10px; color:#526b58; font-size:13px; line-height:1.6; }
.wr-editor-feedback:empty, .wb-picker-feedback:empty { margin:0 !important; }
.wr-delete-feedback { margin:0; color:#80493a; font-size:13px; }
.wr-delete-feedback:empty { position:absolute; }
.has-word-review, .has-word-review body { overflow:hidden; }
@media (max-width:1250px) {
  .wr-heading { display:block; }
  .wr-header h2 { font-size:23px; }
  .wr-header .wr-heading p { margin-top:3px; font-size:12px; }
  .wr-header { gap:14px; }
  .word-review-dialog .wr-modes button { padding-inline:12px; font-size:14px; }
  .wr-face { padding-inline:12px; }
  .word-review-dialog .wr-word-button { font-size:36px; }
  .wr-meaning, .wr-prompt { font-size:26px; }
}
@media (max-width:1000px) {
  .wr-header { grid-template-columns:1fr auto; }
  .wr-modes { grid-row:2; grid-column:1/-1; justify-self:start; }
  .wr-board { grid-template-columns:repeat(3,minmax(0,1fr)); grid-auto-rows:228px; }
  .wr-sheet { padding:18px; gap:14px; }
  .wr-editor { right:0; max-height:calc(100dvh - 220px); }
  .wr-footer { flex-wrap:wrap; }
}
@media (max-width:520px) {
  .word-review-dialog { width:100%; height:100dvh; border:0; border-radius:0; }
  .wr-sheet { padding:max(16px,env(safe-area-inset-top)) 16px max(20px,env(safe-area-inset-bottom)); }
  .wr-header { gap:10px; }
  .wr-header h2 { font-size:19px; }
  .wr-top-actions { gap:4px; }
  .word-review-dialog .wr-select-button { padding:9px; gap:5px; font-size:12px; }
  .word-review-dialog .wr-close, .word-review-dialog .wr-fullscreen { min-width:30px; width:30px; flex-basis:30px; height:40px; }
  .wr-select-button .wr-icon { width:14px; }
  .wr-board { grid-template-columns:repeat(2,minmax(0,1fr)); grid-auto-rows:240px; gap:10px; }
  .wr-face { --wr-prompt-height:44px; --wr-answer-height:96px; padding:12px; }
  .word-review-dialog .wr-word-button { font-size:30px; }
  .wr-meaning, .wr-prompt { font-size:24px; }
  .wr-phonetic { font-size:12px; } .wr-pos { font-size:12px; }
  .wr-toolbar { align-items:flex-start; flex-direction:column; gap:8px; }
  .wr-tools { gap:6px; }
  .word-review-dialog .wr-tools button { min-height:40px; padding-inline:10px; font-size:12px; }
  .word-review-dialog .wr-modes button { padding-inline:10px; }
  .word-review-dialog .wr-details, .word-review-dialog .wr-hide-answer { font-size:12px; }
  .wr-editor { left:0; right:0; width:auto; padding:16px; }
  .wr-word-choices { grid-template-columns:1fr; }
  .wr-footer span:last-child { display:none; }
}

/* Keep both desktop rows and the toolbar visible on shorter laptop windows. */
@media (min-width:1001px) and (max-height:730px) {
  .wr-sheet { gap:14px; }
  .wr-board { grid-auto-rows:max(208px,calc((100dvh - 270px)/2)); }
  .wr-face { --wr-prompt-height:54px; --wr-answer-height:70px; gap:5px; padding-block:12px; }
  .word-review-dialog .wr-word-button { line-height:1.25; }
  .wr-meaning, .wr-prompt { font-size:28px; }
  .word-review-dialog .wr-answer { gap:3px; padding-block:6px; }
  .word-review-dialog .wr-answer.is-english .wr-word-button { min-height:36px; font-size:30px; line-height:1.2; }
}

.lesson-review-help { margin: 16px 0 0; color: #42634e; font-size: 13px; line-height: 1.65; }
.lookup-review-add { width: 100%; margin-top: 9px; }
.lookup-review-add:disabled { opacity: .65; cursor: default; }
.lookup-review-help { margin: 10px 0 0; color: #526b58; font-size: 12px; line-height: 1.6; }
.wordbook-review-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 18px 0 8px; }
.wordbook-review-controls > span { color: #526b58; font-size: 13px; line-height: 1.6; }
.wordbook-review-controls[hidden], .wordbook-review-controls [hidden], .wordbook-review-choice[hidden] { display: none !important; }
.wordbook-review-choice { display: inline-flex; flex: 0 0 auto; gap: 7px; align-items: center; min-height: 36px; color: #315d45; font-size: 13px; cursor: pointer; }
.wordbook-review-choice input { width: 19px; height: 19px; margin: 0; accent-color: #376d49; cursor: pointer; }
.wordbook-review-choice input:focus-visible { outline: 3px solid #b26924; outline-offset: 3px; }
@media (max-width: 520px) {
  .wordbook-review-controls > span { flex-basis: 100%; }
}

.has-word-information, .has-word-information body { overflow: hidden; }
.word-info-dialog { position: fixed; inset: 0; width: min(480px, 100vw); max-width: none; height: 100dvh; max-height: none; margin: 0 0 0 auto; padding: 28px; overflow: auto; border: 0; border-radius: 0; color: #29434a; background: #fffdf7; box-shadow: -16px 0 50px rgba(24,54,38,.18); font-family: var(--body); overscroll-behavior: contain; scrollbar-color: #a6c0ac #fffdf7; }
.word-info-dialog::backdrop { background: rgba(22,43,33,.45); }
.word-info-dialog [hidden] { display: none !important; }
.wi-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 20px; border-bottom: 1px solid #d7e3d2; }
.wi-header h2 { margin: 0; font-size: 34px; line-height: 1.3; overflow-wrap: anywhere; }
.wi-phonetic { margin: 8px 0 0; color: #526b58; font-size: 15px; }
.word-info-dialog .wi-close { flex-shrink: 0; background: #edf3e7; font-size: 13px; }
.wi-audio { display: flex; gap: 10px; margin-top: 20px; }
.wi-status { min-height: 20px; color: #42634e; font-size: 13px; line-height: 1.6; }
.wi-meaning { margin-top: 24px; padding: 18px; border-radius: 12px; background: #edf3e7; }
.wi-label { color: #526b58; font-size: 14px; }
.wi-meaning p { margin: 8px 0 0; font-size: 24px; line-height: 1.5; }
.wi-context, .wi-phrases { margin-top: 28px; }
.word-info-dialog h3 { margin: 0 0 12px; font-size: 17px; }
.wi-sentence, .wi-phrase p { margin: 0; font-size: 18px; line-height: 1.65; overflow-wrap: anywhere; }
.wi-translation { color: #526b58; font-size: 15px; line-height: 1.65; }
.wi-phrase { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.wi-phrase button { flex-shrink: 0; }
.wi-source { margin-top: 28px; padding-top: 20px; border-top: 1px solid #d7e3d2; color: #526b58; font-size: 14px; line-height: 1.6; }
.wi-source a { color: #315d45; text-underline-offset: 4px; }
.wi-loading { color: #526b58; font-size: 13px; }
@media (max-width: 850px) { .wb-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 520px) {
  .wb-grid { grid-template-columns: minmax(0,1fr); gap: 14px; }
  .wb-card { padding: 20px; }
  .wb-tools button { flex: 1 1 auto; padding-inline: 10px; font-size: 13px; }
  .wb-mode-group > button { flex: 1; padding-inline: 10px; font-size: 14px; }
  .word-info-dialog { width: 100%; padding: max(22px,env(safe-area-inset-top)) 20px max(22px,env(safe-area-inset-bottom)); }
  .wi-header h2 { font-size: 30px; }
}
.wi-header > div { min-width: 0; }
.wi-meaning p { overflow-wrap: anywhere; }


.wb-word > span { min-width: 0; overflow-wrap: anywhere; }
.review-audio-icon { display: inline-flex; flex: 0 0 23px; width: 23px; height: 23px; color: #376d49; }
.review-audio-icon svg { width: 100%; height: 100%; }

/* First-lesson lookup and review: one course sense, separate dictionary senses. */
.lookup-actions { display: flex; gap: 10px; margin-top: 20px; align-items: stretch; }
.lookup-actions > button { flex: 1 1 0; min-width: 0; min-height: 44px; margin: 0; padding: 10px 12px; font-size: 14px; line-height: 1.5; }
.lookup-actions .lookup-review-add { width: auto; margin-top: 0; }
.lookup-sense-label { margin: 20px 0 8px; color: #526b58; font-size: 13px; font-weight: 650; }
.lookup-form-note { color: #526b58; font-size: 12px; line-height: 1.6; }
.lesson-dictionary .lookup-meaning { align-items: flex-start; margin-block: 8px; }
.lesson-dictionary .lookup-meaning strong { flex: 0 0 auto; }
.word-info-dialog.is-lesson-card { position: fixed; inset: 0; width: min(470px,calc(100vw - 32px)); height: fit-content; min-height: 0; max-height: calc(100dvh - 40px); margin: auto; padding: 24px; border: 0; border-radius: 22px; background: #fff; color: var(--ink); }
.word-info-dialog.is-lesson-card::backdrop { background: rgba(12,31,45,.48); }
.word-info-dialog.is-lesson-card header > div { min-width: 0; }
.word-info-dialog.is-lesson-card header h2 { overflow-wrap: anywhere; }
.word-info-dialog.is-lesson-card header button { display: grid; place-items: center; min-height: 44px; width: 44px; padding: 0; border: 0; border-radius: 50%; background: #fff3c8; }
.word-info-dialog.is-lesson-card .lookup-pronunciation { margin-top: 24px; }
.word-info-dialog.is-lesson-card .lookup-meaning { font-size: 17px; }
.word-info-dialog.is-lesson-card .lookup-actions .primary { color: #fff; border-color: var(--navy); background: var(--navy); }
.word-info-dialog.is-lesson-card .lookup-actions button:disabled { opacity: .65; cursor: default; }
.lesson-word-status { color: #526b58; font-size: 12px; line-height: 1.6; }
.wb-sense-label { display: block; margin-bottom: 8px; color: #526b58; font-size: 12px; }
@media (max-width: 520px) {
  .word-info-dialog.is-lesson-card { padding: 22px 20px; max-height: calc(100dvh - 24px); }
  .lookup-actions > button { padding-inline: 8px; font-size: 13px; }
}
.word-info-dialog.is-lesson-card header { position: sticky; top: 0; z-index: 1; padding-bottom: 8px; background: white; }

/* Shared language roles: readable continuous English, warm Chinese answers. */
.wr-word-button .review-audio-icon { color:#244c73; }
.word-review-dialog .wr-answer.is-english { background:#eef4fa; border-color:#d4e0ec; }
.wr-answer.is-english .wr-answer-meta { color:#586d80; }
.wr-answer.is-english .wr-phonetic, .wr-answer.is-english .wr-pos { color:inherit; }
.word-review-dialog .wr-answer.is-english { gap:3px; padding-block:6px; }
.word-review-dialog .wr-answer.is-english .wr-word-button { line-height:1.2; }
.wr-prompt { padding-block:3px; }
.wr-meaning.is-long, .wr-prompt.is-long { font-size:24px; }
@media (min-width:1360px) { .wr-meaning.is-long, .wr-prompt.is-long { font-size:28px; } }
@media (max-width:560px) { .wr-face:has(> .wr-prompt.is-long) { --wr-prompt-height:66px; --wr-answer-height:74px; } }
.wr-choice span { font-family:YaYaReviewEnglish,var(--body); font-weight:750; color:#244c73; }

/* Wide, card-first account wordbook. Course text and account data are unchanged. */
html[data-theme="spring"] .unified-wordbook { position:relative; width:calc(100% - 44px); max-width:none; min-height:calc(100dvh - 110px); margin:18px auto 24px; padding:22px 24px 24px; border:1px solid #cfddc9; border-radius:22px; background:#f7f9f0; color:#29434a; box-shadow:none; font-family:YaYaReviewBody,'PingFang SC','Microsoft YaHei',sans-serif; }
.unified-wordbook [hidden] { display:none !important; }
.unified-wordbook svg { width:20px; height:20px; flex-shrink:0; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.unified-wordbook button { min-height:40px; padding:8px 13px; border:1px solid #bdd0b7; border-radius:9px; color:#3b6247; background:#fffef8; font:700 13px/1.5 YaYaReviewBody,var(--body); cursor:pointer; }
.unified-wordbook button:hover { border-color:#356b49; }
.unified-wordbook button:disabled { opacity:.5; cursor:default; }
.unified-wordbook button:focus-visible, .unified-wordbook input:focus-visible, .unified-wordbook summary:focus-visible { outline:3px solid #b26924; outline-offset:3px; }
.unified-wordbook ::selection { color:#234b35; background:#cfdfbf; }
.unified-wordbook .wb-header { position:relative; display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:20px; padding-bottom:18px; border-bottom:1px solid #cfddc9; }
.unified-wordbook .unified-wordbook-heading { display:flex; align-items:baseline; gap:14px; min-width:0; }
.unified-wordbook .unified-wordbook-heading h1 { margin:0; color:#2b5239; font:750 28px/1.3 var(--body); white-space:nowrap; }
.unified-wordbook .unified-wordbook-heading p { margin:0; color:#566b5b; font-size:14px; line-height:1.5; }
.unified-wordbook .wb-mode-group { display:flex; gap:4px; padding:4px; border:1px solid #d8e1d0; border-radius:13px; background:#e9efe2; }
.unified-wordbook .wb-mode-group button { padding:10px 16px; border:0; border-radius:9px; background:transparent; font-size:15px; white-space:nowrap; }
.unified-wordbook .wb-mode-group button[aria-pressed="true"] { background:#356b49; color:white; }
.unified-wordbook .wb-top-actions { display:flex; justify-content:flex-end; align-items:center; gap:10px; }
.unified-wordbook .wb-pick-button { display:flex; align-items:center; gap:8px; padding:11px 15px; border-color:#afc5ac; border-radius:11px; background:#eaf2e5; color:#315c3f; font-size:14px; white-space:nowrap; }
.unified-wordbook .wb-pick-button svg { width:17px; height:17px; }
.unified-wordbook .wb-fullscreen { display:grid; place-items:center; min-width:38px; width:38px; height:40px; padding:0; border:0; background:transparent; }
.unified-wordbook .unified-wordbook-toolbar { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-top:18px; }
.unified-wordbook .unified-wordbook-filters { display:flex; align-items:center; gap:6px; }
.unified-wordbook .unified-wordbook-filters button { padding:9px 13px; border:0; background:transparent; font-size:14px; font-weight:650; white-space:nowrap; }
.unified-wordbook .unified-wordbook-filters button[aria-pressed="true"] { background:#e3edda; color:#2f563b; }
.unified-wordbook .unified-wordbook-filters button span { margin-left:7px; font-size:13px; font-weight:500; }
.unified-wordbook .unified-wordbook-search { display:flex; align-items:center; gap:8px; margin-left:auto; width:270px; min-width:220px; height:40px; padding:0 12px; border:1px solid #becfba; border-radius:10px; background:#fffef9; color:#5e7261; }
.unified-wordbook .unified-wordbook-search svg { width:17px; height:17px; }
.unified-wordbook .unified-wordbook-search input { min-width:0; width:100%; height:36px; padding:0; border:0; outline:0; background:transparent; color:#29434a; font:14px var(--body); caret-color:#356b49; }
.unified-wordbook .unified-wordbook-search:focus-within { outline:3px solid #b26924; outline-offset:3px; }
.unified-wordbook .unified-wordbook-search input::placeholder { color:#607263; }
.unified-wordbook .wb-tools { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.unified-wordbook .wb-tools button { min-height:40px; padding:9px 13px; font-size:13px; white-space:nowrap; }
.unified-wordbook .wb-result-row { display:flex; flex-wrap:wrap; align-items:center; gap:6px 12px; margin:16px 0 12px; color:#566b5b; font-size:13px; line-height:1.6; }
.unified-wordbook .unified-wordbook-result { margin:0; }
.unified-wordbook .wb-result-row button { min-height:26px; padding:0; border:0; background:transparent; font-size:13px; text-decoration:underline; text-underline-offset:3px; }
.unified-wordbook [data-wb-sort] { min-height:40px; max-width:100%; padding:6px 8px; border:1px solid #becfba; border-radius:10px; background:#fffef9; color:#315d45; font:650 13px var(--body); cursor:pointer; }
.unified-wordbook [data-wb-sort]:focus-visible { outline:3px solid #b26924; outline-offset:3px; }
.unified-wordbook .wb-audio-status { position:absolute; width:1px; height:1px; margin:0; padding:0; overflow:hidden; clip-path:inset(50%); }
.unified-wordbook .wb-audio-status[data-error="true"] { position:static; width:auto; height:auto; margin:10px 0; clip-path:none; color:#80502d; font-size:14px; }
.unified-wordbook .wb-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); align-items:stretch; gap:16px; }
.unified-wordbook .wb-card { position:relative; min-width:0; height:294px; display:grid; grid-template-rows:minmax(60px,auto) minmax(100px,1fr) 28px 38px; gap:8px; padding:16px 18px 10px; border:1px solid #cedac7; border-radius:17px; background:#fffdf7; }
.unified-wordbook .wb-card.is-revealed { border-color:#becdb5; background:#fffef8; }
.unified-wordbook .wb-card-footer { display:flex; align-items:center; justify-content:space-between; gap:4px; min-width:0; }
.unified-wordbook .wb-source { min-width:0; color:#5a705f; font-size:12px; line-height:1.35; text-wrap:balance; }
.unified-wordbook .wb-card-prompt { display:flex; align-items:center; justify-content:center; min-width:0; min-height:0; overflow:auto; }
.unified-wordbook .wb-word { display:flex; align-items:center; justify-content:center; gap:9px; min-width:0; width:100%; max-width:100%; min-height:54px; padding:2px 0; border:0; border-radius:3px; background:transparent; color:#244c73; font:800 40px/1.35 YaYaReviewEnglish,var(--body); letter-spacing:0; text-decoration:none; }
.unified-wordbook .wb-word:hover { color:#173d60; }
.unified-wordbook .wb-word > span { min-width:0; overflow-wrap:anywhere; }
.unified-wordbook .wb-word .review-audio-icon { width:22px; height:22px; margin-top:4px; flex:0 0 22px; color:#244c73; }
.unified-wordbook .is-long-word .wb-word { font-size:28px; line-height:1.1; }
.unified-wordbook .wb-card-answer, .unified-wordbook .wb-reveal { display:flex; flex-direction:column; align-items:center; justify-content:safe center; gap:6px; min-width:0; min-height:0; width:100%; padding:12px 6px; overflow:auto; border:1px solid #eddbc4; border-radius:11px; background:#fff0db; text-align:center; }
.unified-wordbook .wb-card-answer > * { flex-shrink:0; }
.unified-wordbook .wb-reveal { border:1px dashed #becbb2; background:#f1f3e6; color:#4d694b; font-size:15px; font-weight:650; }
.unified-wordbook .wb-answer-meta { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:center; gap:4px 8px; color:#77624f; font-size:14px; line-height:1.4; }
.unified-wordbook .wb-meaning { margin:0; color:#89512f; font-size:30px; font-weight:700; line-height:1.3; text-align:center; overflow-wrap:anywhere; }
.unified-wordbook .wb-card-answer.is-english { background:#eef4fa; border-color:#d4e0ec; }
.unified-wordbook .wb-card-answer.is-english .wb-answer-meta { color:#586d80; }
.unified-wordbook .wb-card-answer .wb-word { min-height:44px; font-size:34px; line-height:1.3; }
.unified-wordbook .is-long-word .wb-card-answer.is-english { padding-block:6px; }
.unified-wordbook .is-long-word .wb-card-answer .wb-word { font-size:24px; line-height:1.1; }
.unified-wordbook .wb-card-actions { display:flex; align-items:center; justify-content:space-between; align-self:end; gap:12px; min-height:28px; }
.unified-wordbook .wb-card-actions button { min-height:28px; padding:3px 0; border:0; border-radius:3px; background:transparent; font-size:13px; font-weight:400; line-height:1.6; }
.unified-wordbook .wb-details { text-decoration:underline; text-underline-offset:3px; }
.unified-wordbook .wb-card-actions .wb-hide-answer { margin-left:auto; color:#5c6e58; }
.unified-wordbook .wb-guide { margin:19px 0 0; color:#566d57; font-size:13px; line-height:1.6; }
.unified-wordbook .wb-picker { position:absolute; top:calc(100% + 10px); right:54px; z-index:8; width:min(430px,calc(100vw - 80px)); max-height:calc(100dvh - 200px); overflow:auto; padding:20px; border:1px solid #b3c7a9; border-radius:16px; background:#fffef8; box-shadow:0 16px 40px #29433424; scrollbar-color:#a6c0ac #fffef8; }
.unified-wordbook .wb-picker-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.unified-wordbook .wb-picker h2 { margin:0; color:#2e543b; font:700 20px/1.4 var(--body); }
.unified-wordbook [data-wb-pick-count] { color:#586d5c; font-size:12px; }
.unified-wordbook .wb-picker p { margin:8px 0 16px; color:#586d5c; font-size:13px; line-height:1.6; }
.unified-wordbook .wb-pick-choices { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.unified-wordbook .wb-pick-option { display:flex; align-items:center; gap:6px; min-width:0; padding:4px 6px 4px 11px; border:1px solid #bed1b2; border-radius:9px; background:#edf4e6; color:#244c73; font:750 20px/1.4 YaYaReviewEnglish,var(--body); }
.unified-wordbook .wb-pick-option input { flex:0 0 17px; width:17px; height:17px; margin:0; accent-color:#356b49; }
.unified-wordbook .wb-pick-option label > span { min-width:0; overflow-wrap:anywhere; }
.unified-wordbook .wb-pick-option small { display:block; color:#5a705f; font:12px/1.5 var(--body); }
.unified-wordbook .wb-picker-actions { display:flex; justify-content:flex-end; gap:12px; margin-top:17px; }
.unified-wordbook .wb-picker-actions button { min-height:40px; padding:10px 15px; border:0; background:transparent; font-size:14px; }
.unified-wordbook .wb-picker-actions [data-wb-pick-all] { margin-right:auto; min-width:44px; min-height:44px; padding-inline:0; font-weight:400; text-align:left; white-space:nowrap; }
.unified-wordbook .wb-picker-actions [data-wb-pick-all]:disabled { opacity:.5; cursor:default; }
.unified-wordbook .wb-picker-actions .wb-primary { padding-inline:24px; background:#356b49; color:white; }
html[data-theme="spring"] .unified-wordbook:fullscreen, html[data-theme="spring"] .unified-wordbook.wb-expanded { width:100%; height:100dvh; max-height:none; margin:0; padding:24px; border:0; border-radius:0; overflow:auto; background:#f7f9f0; scrollbar-color:#a6c0ac #f7f9f0; }
.unified-wordbook.wb-expanded { position:fixed; inset:0; z-index:90; }
.has-wordbook-expanded, .has-wordbook-expanded body { overflow:hidden; }
@media(max-width:1280px) {
  .unified-wordbook .wb-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:1200px) {
  .unified-wordbook .wb-header { grid-template-columns:1fr auto; gap:12px; }
  .unified-wordbook .wb-mode-group { grid-row:2; grid-column:1; justify-self:start; }
  .unified-wordbook .wb-top-actions { grid-row:2; grid-column:2; }
  .unified-wordbook .unified-wordbook-toolbar { flex-wrap:wrap; }
  .unified-wordbook .wb-tools { margin-left:auto; }
  .unified-wordbook .wb-card { padding:14px; }
  .unified-wordbook .wb-word { font-size:34px; }
  .unified-wordbook .wb-meaning { font-size:27px; }
}
@media(max-width:850px) {
  html[data-theme="spring"] .unified-wordbook { width:calc(100% - 24px); margin-block:12px; padding:18px; }
  .unified-wordbook .wb-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .unified-wordbook .unified-wordbook-toolbar { gap:12px; }
  .unified-wordbook .unified-wordbook-filters { width:100%; }
  .unified-wordbook .unified-wordbook-search { margin-left:0; flex:1; }
  .unified-wordbook .wb-tools { margin-left:0; }
  .unified-wordbook .wb-picker { right:0; }
}
@media(max-width:560px) {
  html[data-theme="spring"] .unified-wordbook { width:calc(100% - 16px); margin-block:8px; padding:14px; border-radius:16px; }
  .unified-wordbook .unified-wordbook-heading { gap:10px; flex-wrap:wrap; }
  .unified-wordbook .unified-wordbook-heading h1 { font-size:23px; }
  .unified-wordbook .unified-wordbook-heading p { font-size:12px; }
  .unified-wordbook .wb-header { gap:12px; }
  .unified-wordbook .wb-mode-group button { padding:9px; font-size:13px; }
  .unified-wordbook .wb-pick-button { padding:9px 12px; font-size:13px; }
  .unified-wordbook .wb-fullscreen { display:none; }
  .unified-wordbook .unified-wordbook-filters { gap:2px; }
  .unified-wordbook .unified-wordbook-filters button { padding:8px 10px; font-size:13px; }
  .unified-wordbook .unified-wordbook-search { width:100%; min-width:0; flex-basis:100%; }
  .unified-wordbook .wb-tools { width:100%; gap:5px; }
  .unified-wordbook .wb-tools button { flex:1; padding:9px 4px; font-size:12px; }
  .unified-wordbook [data-wb-sort] { padding-inline:4px; font-size:12px; }
  .unified-wordbook .wb-grid { gap:10px; }
  .unified-wordbook .wb-card { height:310px; grid-template-rows:70px minmax(100px,1fr) 28px 38px; padding:12px 12px 9px; }
  .unified-wordbook .wb-word { gap:6px; font-size:30px; line-height:1.3; }
  .unified-wordbook .is-long-word .wb-word { font-size:24px; }
  .unified-wordbook .wb-word .review-audio-icon { width:18px; height:18px; flex-basis:18px; }
  .unified-wordbook .wb-meaning { font-size:24px; }
  .unified-wordbook .wb-answer-meta { font-size:12px; }
  .unified-wordbook .wb-source { font-size:11px; }
  .unified-wordbook .wb-card-actions button { font-size:12px; }
  .unified-wordbook .wb-picker { left:0; right:0; width:auto; padding:16px; }
  .unified-wordbook .wb-pick-choices { grid-template-columns:1fr; }
}
@media(max-width:360px) {
  .unified-wordbook .wb-tools { gap:4px; }
  .unified-wordbook .wb-tools button, .unified-wordbook [data-wb-sort] { padding-inline:2px; }
}

.word-info-dialog button { min-height:42px; padding:8px 14px; border:1px solid #b8cdbb; border-radius:10px; color:#315d45; background:#fff; font:inherit; cursor:pointer; }
.word-info-dialog button:focus-visible, .word-info-dialog a:focus-visible { outline:3px solid #b26924; outline-offset:3px; }
.word-info-dialog.is-lesson-card header .lookup-word-play { display:block; width:auto; height:auto; min-height:44px; padding:0; border:0; border-radius:3px; background:transparent; color:#244c73; text-align:left; font:800 32px/1.3 YaYaReviewEnglish,var(--body); text-decoration:none; overflow-wrap:anywhere; }
.word-info-dialog.is-lesson-card .lookup-primary-meaning { align-items:baseline; }
.word-info-dialog.is-lesson-card .lookup-primary-meaning > span { color:#89512f; font-size:24px; line-height:1.45; font-weight:650; }
.word-info-dialog.is-lesson-card .lesson-dictionary { margin-top:18px; padding-top:10px; border-top:1px solid #d7e5dc; }
.word-info-dialog.is-lesson-card .lesson-dictionary > summary { min-height:44px; padding-block:10px; color:#315d45; font-size:14px; font-weight:650; cursor:pointer; }
.word-info-dialog.is-lesson-card .lesson-dictionary > summary:focus-visible { outline:3px solid #b26924; outline-offset:3px; }
.word-info-dialog.is-lesson-card .lesson-dictionary .lookup-meaning { line-height:1.6; }
.word-info-dialog.is-lesson-card .lookup-pronunciation button:disabled { opacity:.5; cursor:default; }
.lesson-word-status { margin:8px 0 0; color:#526b58; font-size:12px; line-height:1.6; }
.wr-audio-missing {color:#89512f;font-size:12px;}
.wr-word-button:disabled,.wb-word:disabled {opacity:.65;cursor:default;}
.word-info-dialog.is-lesson-card .lookup-actions button,.word-info-dialog.is-lesson-card .lookup-pronunciation button {min-height:44px;}
@media(max-width:560px) {
 .unified-wordbook .wb-header { grid-template-columns:minmax(0,1fr) auto; }
 .unified-wordbook .wb-top-actions { grid-row:1; grid-column:2; }
 .unified-wordbook .wb-mode-group { grid-row:2; grid-column:1/-1; justify-self:stretch; }
 .unified-wordbook .wb-mode-group button { flex:1; }
}
/* Longer expressions in the two complete reading series. */
.wr-board:has(.is-long-entry) { grid-auto-rows:max(240px,calc((100dvh - 270px)/2)); }
.word-review-dialog .wr-answer.is-english .wr-word-button { flex-shrink:0; padding-block:3px; }
.word-review-dialog .is-medium-entry .wr-answer.is-english .wr-word-button { font-size:clamp(22px,1.9vw,28px); line-height:1.1; }
.word-review-dialog .is-long-entry .wr-answer.is-english .wr-word-button { font-size:24px; line-height:1.1; }
@media(min-width:1001px) and (max-width:1250px) {
 .word-review-dialog .wr-card.is-long-entry .wr-word-button, .word-review-dialog .wr-card.is-long-entry .wr-answer.is-english .wr-word-button { font-size:20px; line-height:1.1; }
}
.word-review-dialog .is-long-entry .wr-word-button { font-size:24px; line-height:1.1; }
.word-review-dialog .is-medium-entry .wr-word-button { font-size:clamp(22px,1.9vw,28px); line-height:1.1; }
.word-review-dialog .is-long-entry .wr-answer-meta { gap:3px 5px; }
.word-review-dialog .is-long-entry .wr-phonetic, .word-review-dialog .is-long-entry .wr-pos, .wr-reference { font-size:12px; line-height:1.2; }
.wr-meaning.is-extended, .wr-prompt.is-extended { font-size:24px; }
.wr-heading { min-width:0; }
.wr-heading p { min-width:0; overflow:hidden; text-overflow:ellipsis; }
@media(max-width:560px) {
 .wr-board:has(.is-long-entry) { grid-auto-rows:240px; }
 .is-long-entry .wr-face { --wr-prompt-height:64px; --wr-answer-height:74px; }
 .is-medium-entry .wr-face { --wr-prompt-height:56px; --wr-answer-height:74px; }
 .word-review-dialog .is-long-entry .wr-word-button { font-size:18px; line-height:1.1; }
 .word-review-dialog .is-medium-entry .wr-word-button { font-size:22px; line-height:1.1; }
 .wr-face:has(>.wr-prompt.is-extended) { --wr-prompt-height:66px; --wr-answer-height:74px; }
 .unified-wordbook .is-medium-word .wb-word, .unified-wordbook .is-long-word .wb-word { font-size:22px; line-height:1.1; }
 .unified-wordbook .is-very-long-word .wb-word { font-size:18px; line-height:1.1; }
 .word-review-dialog .wr-answer.is-english .wr-word-button { font-size:26px; line-height:1.1; flex-shrink:0; padding-block:3px; }
 .word-review-dialog .is-medium-entry .wr-answer.is-english .wr-word-button { font-size:22px; }
  .word-review-dialog .is-long-entry .wr-answer.is-english .wr-word-button { font-size:18px; }
}
.word-review-dialog .wr-word-button > span:not(.review-audio-icon),.unified-wordbook .wb-word > span {overflow-wrap:normal;word-break:normal;}
.word-info-dialog.is-lesson-card header .lookup-word-play {overflow-wrap:normal;word-break:normal;}
.word-info-dialog.is-lesson-card header .lookup-word-play.is-long-word {font-size:clamp(22px,3.4vw,26px);}
@media(max-width:640px) {
 .word-review-dialog .wr-card.is-long-entry,.unified-wordbook .wb-card.is-long-word {grid-column:1 / -1;}
}
