.wordbook-page {
  --wb-ink: #17323a;
  --wb-deep: #173f43;
  --wb-teal: #176f68;
  --wb-mint: #dff3e9;
  --wb-blue: #dceaf4;
  --wb-coral: #df785f;
  --wb-yellow: #f5cf69;
  --wb-cream: #f8f4e9;
  --wb-paper: #fffdf7;
  --wb-line: #d8d6ca;
  min-height: calc(100vh - 80px);
  padding: 24px 0 72px;
  overflow-x: clip;
  color: var(--wb-ink);
  background:
    radial-gradient(circle at 8% 4%, #f5cf693b, transparent 23rem),
    radial-gradient(circle at 94% 19%, #176f681f, transparent 28rem),
    #f4f2eb;
}

/* WORD/SENTENCE FAVORITES · local-first, account-synced collection */
.wordbook-favorites-quick-entry {
  display: grid;
  grid-template-columns: 34px auto minmax(0, 1fr) 34px;
  align-items: center;
  gap: 12px;
  max-width: 1560px;
  margin: 12px auto 0;
  padding: 12px 16px;
  color: #173f3a;
  text-decoration: none;
  background: linear-gradient(115deg, #fff9e5, #f1f8f4);
  border: 1px solid rgba(42, 91, 82, 0.18);
  border-radius: 16px;
  box-shadow: 0 5px 0 rgba(42, 91, 82, 0.12);
}

.wordbook-favorites-quick-entry > span,
.wordbook-favorites-quick-entry > i {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: #39776c;
  color: #fff;
  font-style: normal;
}

.wordbook-favorites-quick-entry > b {
  font-size: 17px;
}

.wordbook-favorites-quick-entry > small {
  color: #61716d;
  font-size: 13px;
}

.wordbook-favorites-shell {
  display: grid;
  gap: 14px;
}

.wordbook-favorites-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  padding: 22px 24px;
  border: 1px solid rgba(37, 81, 74, 0.16);
  border-radius: 22px;
  background:
    radial-gradient(circle at 86% 12%, rgba(243, 207, 102, 0.3), transparent 31%),
    linear-gradient(125deg, #fffdf5, #eef7f3);
}

.wordbook-favorites-hero span {
  color: #9d722c;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.wordbook-favorites-hero h1 {
  margin: 6px 0;
  color: #163a37;
  font-size: clamp(25px, 2.6vw, 38px);
  line-height: 1.12;
}

.wordbook-favorites-hero p {
  max-width: 720px;
  margin: 0;
  color: #65716f;
  font-size: 14px;
}

.wordbook-favorites-counts {
  display: flex;
  gap: 8px;
}

.wordbook-favorites-counts article {
  display: grid;
  min-width: 78px;
  min-height: 70px;
  place-items: center;
  padding: 8px 14px;
  border: 1px solid rgba(37, 81, 74, 0.14);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.72);
}

.wordbook-favorites-counts b {
  color: #285f57;
  font-size: 25px;
  line-height: 1;
}

.wordbook-favorites-counts small {
  color: #6d7774;
}

.wordbook-favorite-kind-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  border-radius: 16px;
  background: #eaf1ee;
}

.wordbook-favorite-kind-tabs button {
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #62706d;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.wordbook-favorite-kind-tabs button b {
  display: inline-grid;
  min-width: 25px;
  min-height: 25px;
  margin-left: 7px;
  place-items: center;
  border-radius: 999px;
  background: rgba(40, 95, 87, 0.11);
}

.wordbook-favorite-kind-tabs button.is-active {
  color: #fff;
  background: #356f65;
  box-shadow: 0 4px 0 #234f48;
}

.wordbook-favorite-kind-tabs button.is-active b {
  background: rgba(255, 255, 255, 0.2);
}

.wordbook-sentence-review-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(43, 100, 90, 0.16);
  border-radius: 15px;
  background: linear-gradient(110deg, #f1f8f4, #fff9e8);
}

.wordbook-sentence-review-entry > span {
  display: grid;
  gap: 2px;
}

.wordbook-sentence-review-entry b {
  color: #285f57;
  font-size: 15px;
}

.wordbook-sentence-review-entry small {
  color: #76817e;
  font-size: 12px;
}

.wordbook-sentence-review-entry button {
  min-height: 38px;
  padding: 0 15px;
  cursor: pointer;
  border: 0;
  border-radius: 11px;
  color: #fff;
  background: #356f65;
  font-weight: 850;
}

.wordbook-sentence-review-card {
  display: grid;
  gap: 10px;
  padding: 22px;
  border: 1px solid rgba(37, 81, 74, 0.17);
  border-radius: 20px;
  background:
    radial-gradient(circle at 92% 8%, rgba(245, 207, 105, 0.24), transparent 28%),
    #fff;
  box-shadow: 0 10px 28px rgba(38, 65, 60, 0.08);
}

.wordbook-sentence-review-card > header,
.wordbook-sentence-review-card > footer,
.wordbook-sentence-review-audio {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wordbook-sentence-review-card > header {
  justify-content: space-between;
  color: #61716d;
  font-size: 12px;
}

.wordbook-sentence-review-card > header span {
  color: #9c712a;
  font-weight: 900;
}

.wordbook-sentence-review-card > small {
  color: #3f756b;
  font-weight: 850;
}

.wordbook-sentence-review-card h2 {
  margin: 1px 0;
  color: #173b38;
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.3;
}

.wordbook-sentence-review-card > p {
  margin: 0;
  color: #41756b;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
}

.wordbook-sentence-review-card blockquote {
  margin: 0;
  padding: 10px 12px;
  border-left: 3px solid #d6af55;
  border-radius: 0 10px 10px 0;
  background: #fff9e9;
  color: #5e625e;
}

.wordbook-sentence-review-card > footer {
  justify-content: flex-end;
  padding-top: 3px;
}

.wordbook-sentence-review-card > footer button,
.wordbook-sentence-review-card > footer a {
  min-height: 39px;
  padding: 0 14px;
  cursor: pointer;
  border: 1px solid #c8d4d0;
  border-radius: 11px;
  color: #315e57;
  background: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  line-height: 37px;
  text-decoration: none;
}

.wordbook-sentence-review-card > footer button.primary {
  border-color: #356f65;
  color: #fff;
  background: #356f65;
}

.wordbook-sentence-review-card > footer button:disabled {
  cursor: default;
  opacity: 0.42;
}

.wordbook-sentence-favorite-list,
.wordbook-favorite-word-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.wordbook-sentence-favorite-list > article,
.wordbook-favorite-word-list > article {
  min-width: 0;
  padding: 17px;
  border: 1px solid rgba(37, 81, 74, 0.16);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 7px 22px rgba(38, 65, 60, 0.07);
}

.wordbook-sentence-favorite-list > article > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.wordbook-sentence-favorite-list > article > header span {
  color: #9c712a;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.wordbook-sentence-favorite-list > article > header button,
.wordbook-favorite-word-list nav button {
  border: 0;
  background: transparent;
  color: #9b7028;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.wordbook-sentence-favorite-list h2 {
  margin: 12px 0 5px;
  color: #173b38;
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.35;
}

.wordbook-sentence-favorite-list > article > p {
  margin: 0;
  color: #3a6e65;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  line-height: 1.55;
}

.wordbook-sentence-favorite-list blockquote {
  margin: 12px 0;
  padding: 9px 11px;
  border-left: 3px solid #d6af55;
  border-radius: 0 10px 10px 0;
  background: #fff9e9;
  color: #5e625e;
  font-size: 14px;
}

.wordbook-sentence-favorite-list footer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid #edf0ee;
}

.wordbook-sentence-favorite-list footer > span {
  display: grid;
  min-width: 0;
}

.wordbook-sentence-favorite-list footer > span small,
.wordbook-sentence-favorite-list footer > span b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wordbook-sentence-favorite-list footer > span small {
  color: #7b8582;
  font-size: 10px;
}

.wordbook-sentence-favorite-list footer > span b {
  color: #344f4b;
  font-size: 12px;
}

.wordbook-sentence-favorite-list footer > a,
.wordbook-favorite-word-list nav a,
.wordbook-favorites-empty a {
  color: #2e685e;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.wordbook-sentence-audio-actions {
  display: flex;
  gap: 5px;
}

.wordbook-sentence-audio-actions .flashcard-audio-button {
  min-width: 70px;
  min-height: 35px;
  padding: 6px 9px;
  border-radius: 10px;
}

.wordbook-favorite-word-list > article {
  display: grid;
  grid-template-columns: auto minmax(120px, 0.7fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.wordbook-favorite-word-list > article > .flashcard-audio-button {
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
}

.wordbook-favorite-word-list > article > span {
  display: grid;
}

.wordbook-favorite-word-list > article > span em {
  color: #3e6760;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.wordbook-favorite-word-list > article > span b {
  color: #183c38;
  font-size: 21px;
}

.wordbook-favorite-word-list > article > span small,
.wordbook-favorite-word-list > article > p {
  color: #6b7774;
  font-size: 12px;
}

.wordbook-favorite-word-list nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wordbook-favorites-empty {
  grid-column: 1 / -1;
  display: grid;
  min-height: 210px;
  place-items: center;
  align-content: center;
  gap: 7px;
  padding: 24px;
  border: 1px dashed rgba(37, 81, 74, 0.26);
  border-radius: 18px;
  background: #fbfdfc;
  text-align: center;
}

.wordbook-favorites-empty b {
  color: #244e48;
  font-size: 20px;
}

.wordbook-favorites-empty p {
  max-width: 460px;
  margin: 0;
  color: #77817e;
  font-size: 13px;
}

html[data-finyue-device="mobile"] .wordbook-favorites-quick-entry {
  grid-template-columns: 32px minmax(0, 1fr) 32px;
  gap: 9px;
  margin: 8px 0 0;
  padding: 10px 11px;
}

html[data-finyue-device="mobile"]
  .wordbook-favorites-quick-entry
  > small {
  display: none;
}

html[data-finyue-device="mobile"] .wordbook-favorites-hero {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 14px;
  border-radius: 17px;
}

html[data-finyue-device="mobile"] .wordbook-favorites-hero h1 {
  margin: 4px 0;
  font-size: 23px;
}

html[data-finyue-device="mobile"] .wordbook-favorites-hero p {
  display: -webkit-box;
  overflow: hidden;
  font-size: 12px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

html[data-finyue-device="mobile"] .wordbook-favorites-counts article {
  min-width: 54px;
  min-height: 59px;
  padding: 6px;
}

html[data-finyue-device="mobile"] .wordbook-favorites-counts b {
  font-size: 21px;
}

html[data-finyue-device="mobile"] .wordbook-sentence-review-entry {
  gap: 9px;
  padding: 9px 10px;
}

html[data-finyue-device="mobile"] .wordbook-sentence-review-entry small {
  display: none;
}

html[data-finyue-device="mobile"] .wordbook-sentence-review-entry button {
  min-height: 36px;
  padding: 0 10px;
  font-size: 11px;
}

html[data-finyue-device="mobile"] .wordbook-sentence-review-card {
  gap: 7px;
  padding: 14px;
  border-radius: 16px;
}

html[data-finyue-device="mobile"] .wordbook-sentence-review-card h2 {
  font-size: 23px;
}

html[data-finyue-device="mobile"] .wordbook-sentence-review-card > footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

html[data-finyue-device="mobile"]
  .wordbook-sentence-review-card
  > footer
  .primary {
  grid-column: 1 / -1;
}

html[data-finyue-device="mobile"] .wordbook-sentence-favorite-list,
html[data-finyue-device="mobile"] .wordbook-favorite-word-list {
  grid-template-columns: minmax(0, 1fr);
  gap: 9px;
}

html[data-finyue-device="mobile"]
  .wordbook-sentence-favorite-list
  > article {
  padding: 13px;
  border-radius: 15px;
}

html[data-finyue-device="mobile"] .wordbook-sentence-favorite-list h2 {
  margin-top: 8px;
  font-size: 20px;
}

html[data-finyue-device="mobile"] .wordbook-sentence-favorite-list footer {
  grid-template-columns: minmax(0, 1fr) auto;
}

html[data-finyue-device="mobile"] .wordbook-sentence-audio-actions {
  grid-column: 1 / -1;
}

html[data-finyue-device="mobile"]
  .wordbook-sentence-audio-actions
  .flashcard-audio-button {
  flex: 1;
}

html[data-finyue-device="mobile"] .wordbook-favorite-word-list > article {
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 12px;
}

html[data-finyue-device="mobile"]
  .wordbook-favorite-word-list
  > article
  > p {
  grid-column: 2 / -1;
  margin: 0;
}

html[data-finyue-device="mobile"] .wordbook-favorite-word-list nav {
  grid-column: 2 / -1;
}

.wordbook-page *,
.wordbook-page *::before,
.wordbook-page *::after {
  box-sizing: border-box;
}

.wordbook-page button,
.wordbook-page input {
  font: inherit;
}

.wordbook-page button,
.wordbook-page a {
  -webkit-tap-highlight-color: transparent;
}

.wordbook-page .wordbook-app-shell {
  width: 1180px !important;
  min-width: 1180px !important;
  max-width: 1180px !important;
  margin-right: auto !important;
  margin-left: auto !important;
}

.wordbook-section-nav {
  position: sticky;
  z-index: 22;
  top: 78px;
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 56px;
  margin-bottom: 18px;
  padding: 6px;
  overflow-x: hidden;
  border: 1px solid #17323a29;
  border-radius: 16px;
  background: #fffdf7eb;
  box-shadow: 0 10px 30px #1e393c14;
  backdrop-filter: blur(16px);
}

.wordbook-section-nav a {
  display: grid;
  min-width: max-content;
  min-height: 44px;
  padding: 0 19px;
  place-items: center;
  border-radius: 11px;
  color: #607074;
  font-size: 15px;
  font-weight: 850;
}

.wordbook-section-nav a.is-active {
  color: #fff;
  background: var(--wb-deep);
  box-shadow: 0 8px 18px #173f432e;
}

.wordbook-entry-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 16px !important;
  margin-top: 0 !important;
}

.wordbook-entry-card {
  position: relative;
  min-width: 0;
  padding: 28px;
  overflow: hidden;
  border: 1px solid #17323a26;
  border-radius: 22px;
  background: #fffdf7;
  box-shadow: 0 13px 34px #283d3b12;
}

.wordbook-entry-card > span,
.wordbook-entry-copy > span {
  color: #176f68;
  letter-spacing: 0.12em;
  font-size: 11px;
  font-weight: 950;
}

.wordbook-entry-card h2 {
  margin: 8px 0 10px;
  font-family: inherit;
  font-size: 30px;
  font-weight: 500;
  line-height: 1.18;
}

.wordbook-entry-card > p,
.wordbook-entry-copy > p {
  margin: 0;
  color: #657579;
  font-size: 16px !important;
  line-height: 1.65;
}

.wordbook-entry-card > a,
.wordbook-entry-copy > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  margin-top: 22px;
  padding: 0 16px;
  border-radius: 11px;
  color: #fff;
  background: #173f43;
  font-size: 15px;
  font-weight: 900;
}

.wordbook-entry-card.is-checkin {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 45% 55%;
  min-height: 500px;
  padding: 0;
  color: #fff;
  border-color: #173f43;
  background: #173f43;
}

.wordbook-entry-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 42px;
}

.wordbook-entry-card.is-checkin .wordbook-entry-copy > span {
  color: #f5d77f;
}

.wordbook-entry-card.is-checkin h2 {
  margin-top: 12px;
  color: #fff;
  font-size: 46px;
  font-weight: 450;
}

.wordbook-entry-card.is-checkin p {
  color: #ffffffb8;
  font-size: 18px !important;
}

.wordbook-entry-card.is-checkin dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 28px 0 0;
}

.wordbook-entry-card.is-checkin dl div {
  display: grid;
  align-content: center;
  min-height: 72px;
  padding: 13px;
  border: 1px solid #ffffff29;
  border-radius: 12px;
  background: #ffffff12;
}

.wordbook-entry-card.is-checkin dt {
  color: #ffffff94;
  font-size: 11px;
}

.wordbook-entry-card.is-checkin dd {
  margin: 4px 0 0;
  font-size: 20px;
  font-weight: 950;
}

.wordbook-entry-meter {
  height: 8px;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 99px;
  background: #ffffff26;
}

.wordbook-entry-meter b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #f3ce6c;
}

.wordbook-entry-card.is-checkin
  .wordbook-entry-copy
  > a.wordbook-entry-primary-action {
  width: 100%;
  min-height: 70px;
  margin-top: 28px;
  padding: 0 22px;
  border: 2px solid #ffffff85;
  border-radius: 16px;
  color: #173f43;
  background: linear-gradient(#ffe58f, #f3c653);
  box-shadow:
    0 6px #b88722,
    0 15px 28px #04181933;
  font-size: 20px;
  font-weight: 950;
  transition:
    transform 0.16s,
    box-shadow 0.16s,
    filter 0.16s;
}

.wordbook-entry-card.is-checkin
  .wordbook-entry-copy
  > a.wordbook-entry-primary-action:hover {
  filter: brightness(1.035);
  transform: translateY(-3px);
  box-shadow:
    0 9px #b88722,
    0 20px 34px #0418193d;
}

.wordbook-entry-card.is-checkin
  .wordbook-entry-copy
  > a.wordbook-entry-primary-action
  > b {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #173f43;
}

.wordbook-entry-card.is-checkin figure {
  position: relative;
  min-width: 0;
  height: 500px;
  margin: 0;
  background: #d9e5df;
}

.wordbook-entry-card.is-checkin figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wordbook-entry-card.is-checkin figcaption {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  display: grid;
  gap: 3px;
  padding: 16px;
  border: 1px solid #ffffff47;
  border-radius: 14px;
  color: #fff;
  background: #133438e0;
  backdrop-filter: blur(10px);
}

.wordbook-entry-card.is-checkin figcaption b {
  font-size: 16px;
}

.wordbook-entry-card.is-checkin figcaption small {
  color: #ffffffad;
  font-size: 12px;
}

.wordbook-entry-card.is-review,
.wordbook-entry-card.is-library,
.wordbook-entry-card.is-professional {
  display: flex;
  flex-direction: column;
  min-height: 344px;
}

.wordbook-entry-card.is-review {
  background: linear-gradient(155deg, #fff9ec, #f3e5c7);
}

.wordbook-entry-card.is-library {
  background: linear-gradient(155deg, #f7fbf9, #e3efe9);
}

.wordbook-entry-card.is-professional {
  background: linear-gradient(155deg, #f7f9fb, #e4ebf0);
}

.wordbook-entry-card > strong {
  margin: 12px 0 7px;
  color: #173f43;
  letter-spacing: -0.04em;
  font-size: 46px;
}

.wordbook-entry-card > strong small {
  letter-spacing: 0;
  font-size: 14px;
}

.wordbook-entry-card.is-review > a,
.wordbook-entry-card.is-library > a {
  margin-top: auto;
}

.wordbook-entry-card.is-library > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 18px;
}

.wordbook-entry-card.is-library > div i {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  min-height: 63px;
  padding: 10px;
  border-radius: 10px;
  background: #ffffffb8;
  font-style: normal;
}

.wordbook-entry-card.is-library > div small {
  color: #6e7d79;
  font-size: 10px;
}

.wordbook-entry-card.is-library > div b {
  font-size: 22px;
}

.wordbook-entry-card.is-professional form {
  display: grid;
  gap: 8px;
  margin-top: auto;
}

.wordbook-entry-card.is-professional label,
.professional-wordbook-hero label,
.wordbook-personal-library label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid #b8c6c2;
  border-radius: 12px;
  background: #fff;
}

.wordbook-entry-card.is-professional input,
.professional-wordbook-hero input,
.wordbook-personal-library input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--wb-ink);
  background: transparent;
  font-size: 15px;
}

.wordbook-entry-card.is-professional form button,
.professional-wordbook-hero form > button {
  min-height: 48px;
  cursor: pointer;
  border: 0;
  border-radius: 11px;
  color: #fff;
  background: var(--wb-teal);
  font-size: 15px;
  font-weight: 900;
}

.wordbook-sync-note {
  margin: 18px 0 0;
  color: #71807e;
  text-align: center;
  font-size: 12px !important;
}

/* Flashcard session */
.flashcard-app-shell {
  --fc-ink: #18353b;
  --fc-teal: #176f68;
  --fc-deep: #173f43;
  --fc-yellow: #f3cf6c;
  --fc-green: #2b8c65;
  --fc-red: #b95c51;
  width: 1180px !important;
}

.flashcard-session-header {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  margin-bottom: 12px;
  padding: 10px 13px;
  border: 1px solid #d4d9d2;
  border-radius: 15px;
  background: #fffdf7f0;
}

.flashcard-session-header > a,
.flashcard-session-header nav button {
  display: grid;
  width: 46px;
  height: 46px;
  cursor: pointer;
  place-items: center;
  border: 1px solid #cbd1ca;
  border-radius: 11px;
  color: #596b6c;
  background: #fff;
  font-size: 20px;
  font-weight: 900;
}

.flashcard-session-header > div {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 16px;
  min-width: 0;
}

.flashcard-session-header > div > span {
  color: var(--fc-teal);
  font-size: 13px;
  font-weight: 950;
}

.flashcard-session-header > div > b {
  font-size: 17px;
}

.flashcard-session-header > div > small {
  grid-column: 1 / -1;
  color: #87938f;
  letter-spacing: 0.04em;
  font-size: 9px;
  font-weight: 800;
}

.flashcard-session-header > div > i {
  grid-column: 1 / -1;
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: #e2e6df;
}

.flashcard-session-header > div > i em {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--fc-teal), #7dbd95);
  transition: width 0.22s;
}

.flashcard-session-header nav {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
}

.flashcard-session-tools {
  position: relative;
}

.flashcard-session-tools > summary {
  display: grid;
  width: 46px;
  height: 46px;
  padding: 0;
  cursor: pointer;
  list-style: none;
  place-items: center;
  border: 1px solid #cbd1ca;
  border-radius: 11px;
  color: #596b6c;
  background: #fff;
  font-size: 20px;
  font-weight: 900;
  transition:
    color 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease;
}

.flashcard-session-tools > summary::-webkit-details-marker {
  display: none;
}

.flashcard-session-tools > summary::marker {
  content: "";
}

.flashcard-session-tools > summary:hover,
.flashcard-session-tools[open] > summary {
  color: #fff;
  border-color: var(--fc-deep);
  background: var(--fc-deep);
  box-shadow: 0 8px 18px #173f432e;
}

.flashcard-session-tools-menu {
  position: absolute;
  z-index: 60;
  top: calc(100% + 10px);
  right: 0;
  display: grid;
  width: 228px;
  padding: 7px;
  overflow: hidden;
  border: 1px solid #cdd7d1;
  border-radius: 15px;
  background: #fffdf7f7;
  box-shadow:
    0 18px 45px #173f4330,
    0 4px 12px #173f4317;
  backdrop-filter: blur(18px);
  animation: flashcard-tools-in 0.16s ease-out both;
}

.flashcard-session-tools:not([open]) > .flashcard-session-tools-menu {
  display: none;
}

.flashcard-session-tools-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 0 11px;
  border-radius: 10px;
  color: #2f4b4c;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.3;
}

.flashcard-session-tools-menu a::after {
  content: "\203A";
  flex: none;
  color: #7c8c88;
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
}

.flashcard-session-tools-menu a:hover,
.flashcard-session-tools-menu a:focus-visible {
  color: #174f4a;
  background: #e7f2ed;
}

@keyframes flashcard-tools-in {
  from {
    opacity: 0;
    transform: translateY(-5px) scale(0.98);
  }
}

.flashcard-session-header nav button.active {
  color: #8a5f0f;
  border-color: #e1bd64;
  background: #fff0bf;
}

.flashcard-session-header nav button.difficult {
  color: #fff;
  border-color: #9f5149;
  background: #9f5149;
  font-size: 14px;
}

.flashcard-session-header nav button.difficult.active {
  box-shadow: 0 0 0 3px #9f514938;
}

.flashcard-learning-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 640px;
  overflow: hidden;
  border: 1px solid #cfd5ce;
  border-radius: 24px;
  background: #fffdf7;
  box-shadow: 0 22px 55px #1e3a3a1f;
}

.flashcard-learning-card.is-answered {
  grid-template-columns: minmax(0, 1fr) 410px;
}

.flashcard-question {
  position: relative;
  display: grid;
  align-content: start;
  gap: 13px;
  min-width: 0;
  padding: 22px;
}

.flashcard-corner-audio {
  position: absolute;
  z-index: 8;
  top: 12px;
  right: 12px;
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  cursor: pointer;
  color: #fff;
  border: 1px solid #195d55;
  border-radius: 10px;
  background: #2f7469;
  box-shadow: 0 3px 0 #174d46;
}

.flashcard-corner-audio:hover {
  transform: translateY(-1px);
}

.flashcard-corner-audio:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #174d46;
}

.flashcard-corner-audio i {
  font-size: 11px;
  font-style: normal;
}

.flashcard-corner-audio span {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.flashcard-question > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
}

.flashcard-question > header small {
  color: var(--fc-teal);
  letter-spacing: 0.12em;
  font-size: 11px;
  font-weight: 950;
}

.flashcard-question > header h2 {
  margin: 0;
  font-family: inherit;
  font-size: 21px;
  font-weight: 500;
}

.flashcard-word-stage {
  display: grid;
  align-content: center;
  min-height: 214px;
  padding: 25px;
  place-items: center;
  gap: 7px;
  border: 1px solid #d5ded7;
  border-radius: 18px;
  color: #173f43;
  background:
    radial-gradient(circle at 18% 20%, #f3cf6c47, transparent 33%),
    linear-gradient(145deg, #f7fbf7, #e8f2ec);
  text-align: center;
}

.flashcard-word-stage > small {
  color: #33766b;
  letter-spacing: 0.13em;
  font-size: 10px;
  font-weight: 950;
}

.flashcard-word-stage > h1 {
  margin: 1px 0 0;
  letter-spacing: 0.02em;
  font-family: inherit;
  font-size: clamp(44px, 5vw, 68px);
  font-weight: 450;
  line-height: 1;
}

.flashcard-word-stage > p {
  margin: 0;
  color: #637875;
  font-size: 15px;
  font-weight: 850;
}

.flashcard-word-stage > p.flashcard-word-english {
  color: #385c5a;
  font-size: 14px;
  font-weight: 700;
}

.flashcard-course-source {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: #7b8884;
  font-size: 10px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Desktop home: reach the four useful entries without a long landing-page
   scroll. Mobile keeps its own touch-first composition below. */
@media (min-width: 933px) {
  .wordbook-page:has(.wordbook-home-v66) {
    padding-top: 14px;
  }

  .wordbook-home-v66 .wordbook-section-nav {
    min-height: 48px;
    margin-bottom: 12px;
    padding: 4px;
  }

  .wordbook-home-v66 .wordbook-section-nav a {
    min-height: 38px;
    padding: 0 16px;
    font-size: 13px;
  }

  .wordbook-home-v66 .wordbook-entry-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  .wordbook-home-v66 .wordbook-entry-card {
    padding: 22px;
    border-radius: 18px;
  }

  .wordbook-home-v66 .wordbook-entry-card h2 {
    margin: 6px 0 8px;
    font-size: 24px;
    line-height: 1.16;
  }

  .wordbook-home-v66 .wordbook-entry-card > p,
  .wordbook-home-v66 .wordbook-entry-copy > p {
    font-size: 14px !important;
    line-height: 1.45;
  }

  .wordbook-home-v66 .wordbook-entry-card.is-checkin {
    grid-column: span 8;
    grid-template-columns: 54% 46%;
    min-height: 350px;
  }

  .wordbook-home-v66 .wordbook-entry-card.is-checkin .wordbook-entry-copy {
    padding: 26px;
  }

  .wordbook-home-v66 .wordbook-entry-card.is-checkin h2 {
    margin-top: 8px;
    font-size: 36px;
  }

  .wordbook-home-v66 .wordbook-entry-card.is-checkin dl {
    gap: 7px;
    margin-top: 15px;
  }

  .wordbook-home-v66 .wordbook-entry-card.is-checkin dl div {
    min-height: 54px;
    padding: 9px 11px;
  }

  .wordbook-home-v66 .wordbook-entry-card.is-checkin dd {
    font-size: 16px;
  }

  .wordbook-home-v66 .wordbook-entry-card.is-checkin figure {
    height: 350px;
  }

  .wordbook-home-v66
    .wordbook-entry-card.is-checkin
    .wordbook-entry-copy
    > a.wordbook-entry-primary-action {
    min-height: 54px;
    margin-top: 16px;
    border-radius: 13px;
    font-size: 16px;
  }

  .wordbook-home-v66 .wordbook-entry-card.is-review {
    grid-column: span 4;
    min-height: 350px;
  }

  .wordbook-home-v66 .wordbook-entry-card.is-library,
  .wordbook-home-v66 .wordbook-entry-card.is-professional {
    grid-column: span 6;
    min-height: 250px;
  }

  .wordbook-home-v66 .wordbook-entry-card > strong {
    margin: 8px 0 5px;
    font-size: 34px;
  }

  .wordbook-home-v66 .wordbook-entry-card > a,
  .wordbook-home-v66 .wordbook-entry-copy > a {
    min-height: 42px;
    margin-top: 12px;
    font-size: 13px;
  }

  .wordbook-home-v66 .wordbook-entry-card.is-library > div {
    gap: 6px;
    margin-top: 10px;
  }

  .wordbook-home-v66 .wordbook-entry-card.is-library > div i {
    min-height: 46px;
    padding: 7px 9px;
  }

  .wordbook-home-v66 .wordbook-entry-card.is-library > div b {
    font-size: 18px;
  }

  .wordbook-home-v66 .wordbook-entry-card.is-professional label,
  .wordbook-home-v66 .wordbook-entry-card.is-professional form button {
    min-height: 42px;
  }
}

.flashcard-word-stage > nav {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

/* 2026-08-04 mobile wordbook readability floor. The four-choice layout stays
   above the fold, while labels and actions remain readable without zooming. */
@media (max-width: 932px) {
  html[data-finyue-device="mobile"] body .wordbook-page
    .flashcard-app-shell.is-study-session > .wordbook-section-nav a,
  html[data-finyue-device="mobile"] body .wordbook-page
    .is-study-session .flashcard-session-header > div > span,
  html[data-finyue-device="mobile"] body .wordbook-page
    .is-study-session .flashcard-question > header small,
  html[data-finyue-device="mobile"] body .wordbook-page
    .is-study-session .flashcard-meaning-prompt small,
  html[data-finyue-device="mobile"] body .wordbook-page
    .is-study-session :is(.flashcard-auto-audio-note, .flashcard-answer-panel small) {
    font-size: 14px !important;
    line-height: 1.4 !important;
  }

  html[data-finyue-device="mobile"] body .wordbook-page
    .is-study-session
    :is(
      .flashcard-session-header button,
      .flashcard-audio-button,
      .flashcard-listen-button,
      .flashcard-answer-panel button,
      .flashcard-answer-actions button,
      .flashcard-session-tools-menu a
    ) {
    font-size: 15px !important;
  }

  html[data-finyue-device="mobile"] body .wordbook-page
    .is-study-session .flashcard-image-heading h2,
  html[data-finyue-device="mobile"] body .wordbook-page
    .is-study-session .flashcard-meaning-prompt p {
    font-size: 16px !important;
    line-height: 1.4 !important;
  }

  html[data-finyue-device="mobile"] body .wordbook-page
    .is-study-session .flashcard-image-options button,
  html[data-finyue-device="mobile"] body .wordbook-page
    .is-study-session .flashcard-image-options button b,
  html[data-finyue-device="mobile"] body .wordbook-page
    .is-study-session .flashcard-asset-label :is(strong, small) {
    font-size: 15px !important;
    line-height: 1.3 !important;
  }
}

.flashcard-meaning-prompt {
  display: grid;
  align-content: center;
  min-height: 190px;
  padding: 24px 30px;
  gap: 7px;
  border: 1px solid #d5ded7;
  border-radius: 18px;
  color: #173f43;
  background:
    radial-gradient(circle at 86% 18%, #f3cf6c42, transparent 34%),
    linear-gradient(145deg, #f8fbf7, #e9f2ec);
}

.flashcard-meaning-prompt small {
  color: #327369;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.flashcard-meaning-prompt h1 {
  max-width: 900px;
  margin: 0 0 8px;
  font-family: inherit;
  font-size: clamp(22px, 2.25vw, 32px);
  font-weight: 800;
  line-height: 1.45;
}

.flashcard-meaning-prompt p {
  margin: 0;
  color: #4b625f;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.45;
}

.flashcard-audio-button {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 90px;
  min-height: 42px;
  padding: 0 9px;
  cursor: pointer;
  border: 1px solid #b9c8c2;
  border-radius: 9px;
  color: #1c645e;
  background: #fff;
  font-size: 11px;
  font-weight: 900;
}

.flashcard-audio-button i {
  font-size: 9px;
  font-style: normal;
}

.flashcard-listen-stage {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 11px;
  height: 245px;
  border-radius: 18px;
  color: #fff;
  background:
    radial-gradient(circle at 50% 35%, #f3cf6c38, transparent 45%),
    linear-gradient(145deg, #173d48, #1e6c66);
}

.flashcard-listen-stage > span {
  color: #f4d375;
  letter-spacing: 0.14em;
  font-size: 11px;
  font-weight: 950;
}

.flashcard-listen-button {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 7px;
  width: 174px;
  height: 174px;
  cursor: pointer;
  border: 1px solid #ffffff45;
  border-radius: 50%;
  color: #173f43;
  background: #f3cf6c;
  box-shadow: 0 16px 45px #071d213d;
}

.flashcard-listen-button i {
  font-size: 28px;
  font-style: normal;
}

.flashcard-listen-button span {
  font-size: 16px;
  font-weight: 900;
}

.flashcard-image-heading {
  margin-top: 2px;
}

.flashcard-image-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.flashcard-image-options button {
  position: relative;
  height: 196px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  border: 3px solid transparent;
  border-radius: 13px;
  background: #e7ece7;
}

.flashcard-image-options button:hover {
  border-color: #176f6875;
}

.flashcard-image-options button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.flashcard-image-options button i {
  position: absolute;
  top: 9px;
  left: 9px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: #143136db;
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
}

.flashcard-image-options button b {
  position: absolute;
  right: 8px;
  bottom: 8px;
  left: 8px;
  padding: 8px;
  border-radius: 8px;
  color: #fff;
  background: #143136e6;
  font-size: 13px;
}

.flashcard-asset-label {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  max-width: calc(100% - 56px);
  padding: 7px 10px;
  border: 1px solid #ffffffa8;
  border-radius: 9px;
  color: #fff;
  background: #123432e8;
  box-shadow: 0 4px 14px #0d25243d;
  text-align: right;
}

.flashcard-asset-label strong {
  overflow: hidden;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flashcard-asset-label small {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.flashcard-image-options button.correct {
  border-color: var(--fc-green);
  background: #e4f5eb;
}

.flashcard-image-options button.wrong {
  border-color: var(--fc-red);
  background: #fae8e3;
}

.flashcard-image-options.is-meaning button {
  display: grid;
  min-height: 154px;
  height: auto;
  padding: 48px 20px 22px;
  place-items: center;
  border-width: 2px;
  border-color: #c8d2cc;
  background:
    radial-gradient(circle at 92% 8%, #e1b85e1f, transparent 34%),
    linear-gradient(145deg, #fbfdf9, #edf3ee);
  text-align: left;
}

.flashcard-image-options.is-meaning button:hover {
  border-color: #176f68;
  transform: translateY(-2px);
}

.flashcard-meaning-copy {
  color: #213b38;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.65;
}

.flashcard-image-options.is-meaning button.correct {
  border-color: var(--fc-green);
  background: #e4f5eb;
}

.flashcard-image-options.is-meaning button.wrong {
  border-color: var(--fc-red);
  background: #fae8e3;
}

.flashcard-answer-panel {
  display: flex;
  min-width: 0;
  padding: 28px;
  flex-direction: column;
  border-left: 1px solid #d4d9d2;
  background: linear-gradient(155deg, #f8fbf8, #edf4ee);
  animation: flashcard-answer-in 0.2s both;
}

@keyframes flashcard-answer-in {
  from {
    opacity: 0;
    transform: translateX(12px);
  }
}

.flashcard-answer-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.flashcard-answer-panel > header span {
  padding: 7px 9px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 950;
}

.flashcard-answer-panel > header span.correct {
  color: #176445;
  background: #d9f0e2;
}

.flashcard-answer-panel > header span.wrong {
  color: #8a413a;
  background: #f6ded8;
}

.flashcard-answer-panel > header small {
  color: #798784;
  text-align: right;
  font-size: 9px;
}

.word-challenge-coach {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: 13px 0 0;
  padding: 8px 10px;
  border: 1px solid #d9e1db;
  border-radius: 13px;
  background: #ffffffc7;
}

.word-challenge-coach img {
  display: block;
  width: 62px;
  height: 62px;
  border-radius: 12px;
  object-fit: cover;
}

.word-challenge-coach figcaption {
  display: grid;
  gap: 3px;
}

.word-challenge-coach b {
  color: #245d55;
  font-size: 10px;
}

.word-challenge-coach span {
  color: #74817d;
  font-size: 9px;
  line-height: 1.45;
}

.word-challenge-coach.is-wrong {
  border-color: #ead2ca;
  background: #fff8f4;
}

.word-challenge-coach.is-wrong b {
  color: #8c5148;
}

.flashcard-answer-word {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  margin-top: 24px;
}

.flashcard-answer-word h2 {
  margin: 0;
  font-family: inherit;
  font-size: 42px;
  font-weight: 500;
  line-height: 1;
}

.flashcard-answer-word p {
  margin: 8px 0 2px;
  color: #49666a;
  font-size: 17px !important;
}

.flashcard-answer-word strong {
  color: #7a8584;
  font-size: 13px;
}

.flashcard-answer-word div > small {
  display: block;
  margin-top: 4px;
  color: #778783;
  font-size: 10px;
}

.flashcard-answer-word nav {
  display: grid;
  gap: 6px;
}

.flashcard-simple-meaning {
  margin: 25px 0 0;
  padding: 16px;
  border-radius: 12px;
  color: #314c4c;
  background: #fff;
  font-size: 16px !important;
  line-height: 1.6;
}

.flashcard-memory-tip {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding: 12px 13px;
  border-left: 4px solid #d6a739;
  border-radius: 8px;
  color: #334d49;
  background: #fff8df;
}

.flashcard-memory-tip b {
  font-size: 11px;
}

.flashcard-memory-tip span {
  font-size: 12px;
  line-height: 1.45;
}

.flashcard-memory-tip small {
  color: #7d6b3e;
  font-size: 10px;
}

.flashcard-answer-panel blockquote {
  margin: 12px 0 0;
  padding: 16px;
  border-left: 4px solid #f0c65a;
  border-radius: 0 11px 11px 0;
  background: #fff7df;
}

.flashcard-answer-panel blockquote b,
.flashcard-answer-panel blockquote span {
  display: block;
}

.flashcard-answer-panel blockquote b {
  font-size: 17px;
}

.flashcard-answer-panel blockquote span {
  margin-top: 5px;
  color: #6d7a78;
  font-size: 11px;
  line-height: 1.5;
}

.flashcard-answer-panel > footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: auto;
  padding-top: 18px;
}

.flashcard-answer-panel > footer button {
  min-height: 46px;
  padding: 0 9px;
  cursor: pointer;
  border: 1px solid #c5cec8;
  border-radius: 9px;
  color: #345352;
  background: #fff;
  font-size: 11px;
  font-weight: 900;
}

.flashcard-answer-panel > footer button.active {
  color: #8b5e0d;
  border-color: #dfbd66;
  background: #fff1c2;
}

.flashcard-answer-panel > footer button.primary {
  grid-column: 1 / -1;
  color: #fff;
  border-color: var(--fc-deep);
  background: var(--fc-deep);
  font-size: 15px;
}

.wordbook-study-loading,
.wordbook-study-empty,
.flashcard-session-complete {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 610px;
  padding: 48px;
  border: 1px solid var(--wb-line);
  border-radius: 24px;
  background: var(--wb-paper);
  box-shadow: 0 22px 55px #1e3a3a1a;
  text-align: center;
}

.wordbook-study-loading > span {
  width: 48px;
  height: 48px;
  border: 5px solid #dce4df;
  border-top-color: var(--wb-teal);
  border-radius: 50%;
  animation: wb-spin 0.8s linear infinite;
}

@keyframes wb-spin {
  to {
    transform: rotate(360deg);
  }
}

.wordbook-study-loading h1,
.wordbook-study-empty h1 {
  margin: 17px 0 8px;
  font-family: inherit;
  font-size: 32px;
  font-weight: 500;
}

.wordbook-study-loading p,
.wordbook-study-empty p {
  max-width: 620px;
  margin: 0;
  color: #6d7977;
  font-size: 16px !important;
  line-height: 1.7;
}

.wordbook-study-empty > span {
  display: grid;
  width: 80px;
  height: 80px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--wb-teal);
  font-size: 34px;
}

.wordbook-study-empty nav {
  display: flex;
  gap: 8px;
  margin-top: 22px;
}

.wordbook-study-empty nav a,
.flashcard-complete-actions a {
  display: grid;
  min-height: 48px;
  padding: 0 15px;
  place-items: center;
  border: 1px solid #bdc8c1;
  border-radius: 10px;
  color: #234947;
  background: #fff;
  font-size: 12px;
  font-weight: 900;
}

.flashcard-session-complete {
  background:
    radial-gradient(circle at 50% 0, #f3cf6c4d, transparent 18rem),
    #fffdf7;
}

.flashcard-session-complete > small {
  margin-top: 17px;
  color: #176f68;
  letter-spacing: 0.12em;
  font-size: 11px;
  font-weight: 950;
}

.flashcard-session-complete h1 {
  margin: 5px 0;
  font-family: inherit;
  font-size: 60px;
  font-weight: 500;
}

.flashcard-session-complete > p {
  max-width: 570px;
  margin: 0;
  color: #687775;
  font-size: 15px !important;
  line-height: 1.65;
}

.flashcard-complete-stats {
  display: grid;
  grid-template-columns: repeat(3, 150px);
  gap: 8px;
  margin-top: 22px;
}

.flashcard-complete-stats span {
  display: grid;
  align-content: center;
  min-height: 90px;
  padding: 13px;
  border-radius: 12px;
  background: #edf3ed;
}

.flashcard-complete-stats b {
  font-size: 30px;
}

.flashcard-complete-stats small {
  color: #6d7c79;
  font-size: 10px;
}

.flashcard-complete-actions {
  display: flex;
  gap: 8px;
  margin-top: 22px;
}

.flashcard-complete-actions a.primary {
  color: #fff;
  border-color: #173f43;
  background: #173f43;
}

/* My wordbook */
.wordbook-library-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 480px;
  align-items: center;
  gap: 34px;
  min-height: 222px;
  padding: 32px;
  border: 1px solid #17323a26;
  border-radius: 22px;
  color: #fff;
  background: linear-gradient(125deg, #173d42, #2f6a65);
  box-shadow: 0 13px 34px #283d3b12;
}

.wordbook-library-hero > div:first-child > span,
.wordbook-review-overview > header span,
.wordbook-personal-library > header > div > span,
.wordbook-my-packs > header > span,
.professional-wordbook-hero > div > span,
.professional-domain-section > header > span,
.professional-explorer-section > header > span {
  color: #f4d374;
  letter-spacing: 0.12em;
  font-size: 11px;
  font-weight: 950;
}

.wordbook-library-hero h1 {
  margin: 7px 0 12px;
  font-family: inherit;
  font-size: 52px;
  font-weight: 450;
  line-height: 1;
}

.wordbook-library-hero p {
  max-width: 650px;
  margin: 0;
  color: #ffffffbd;
  font-size: 16px !important;
  line-height: 1.7;
}

.wordbook-library-hero > div:last-child {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.wordbook-library-hero > div:last-child article {
  display: grid;
  align-content: center;
  min-height: 88px;
  padding: 13px;
  border: 1px solid #ffffff26;
  border-radius: 12px;
  background: #ffffff0f;
}

.wordbook-library-hero article small {
  color: #ffffff96;
  font-size: 11px;
}

.wordbook-library-hero article b {
  margin-top: 5px;
  color: #fff;
  font-size: 29px;
}

.wordbook-review-overview,
.wordbook-personal-library,
.wordbook-my-packs,
.professional-domain-section,
.professional-explorer-section {
  margin-top: 18px;
  padding: 27px;
  border: 1px solid #17323a26;
  border-radius: 22px;
  background: var(--wb-paper);
  box-shadow: 0 13px 34px #283d3b12;
}

.wordbook-review-overview > header,
.wordbook-personal-library > header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.wordbook-review-overview > header span,
.wordbook-personal-library > header > div > span,
.wordbook-my-packs > header > span,
.professional-domain-section > header > span,
.professional-explorer-section > header > span {
  color: var(--wb-teal);
}

.wordbook-review-overview h2,
.wordbook-personal-library h2,
.wordbook-my-packs h2,
.professional-domain-section h2,
.professional-explorer-section h2 {
  margin: 4px 0 0;
  font-family: inherit;
  font-size: 27px;
  font-weight: 500;
  line-height: 1.2;
}

.wordbook-review-overview > header > a {
  display: grid;
  min-height: 44px;
  padding: 0 14px;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: var(--wb-teal);
  font-size: 12px;
  font-weight: 900;
}

.wordbook-review-priorities {
  display: grid;
  grid-template-columns: repeat(3, 130px) repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.wordbook-review-priorities article,
.wordbook-review-priorities a {
  display: grid;
  align-content: center;
  min-height: 95px;
  padding: 12px;
  border: 1px solid #d2d6cf;
  border-radius: 12px;
  background: #eef4ef;
}

.wordbook-review-priorities article {
  grid-template-columns: auto auto;
  align-items: center;
  justify-content: start;
  gap: 8px;
  background: #f2e8d9;
}

.wordbook-review-priorities article i {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 8px;
  background: #fff;
  font-style: normal;
}

.wordbook-review-priorities article b {
  font-size: 23px;
}

.wordbook-review-priorities article small {
  grid-column: 1 / -1;
  padding-left: 40px;
  color: #7b7d76;
}

.wordbook-review-priorities a b {
  font-size: 13px;
}

.wordbook-review-priorities a small {
  margin-top: 4px;
  color: #75807e;
}

.wordbook-personal-library > header label {
  width: 300px;
}

.wordbook-library-tabs {
  display: flex;
  gap: 6px;
  margin-top: 16px;
}

.wordbook-library-tabs button {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  cursor: pointer;
  border: 1px solid #ccd2cc;
  border-radius: 9px;
  color: var(--wb-ink);
  background: #fff;
  font-weight: 850;
}

.wordbook-library-tabs button b {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: #eef1ec;
  font-size: 10px;
}

.wordbook-library-tabs button.is-active {
  color: #fff;
  border-color: var(--wb-deep);
  background: var(--wb-deep);
}

.wordbook-library-tabs button.is-active b {
  color: #173f43;
  background: #f3cf6c;
}

.wordbook-personal-rows {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.wordbook-personal-rows > article {
  display: grid;
  grid-template-columns:
    minmax(330px, 1.35fr) minmax(180px, 0.75fr) 150px
    150px auto;
  align-items: center;
  gap: 14px;
  min-height: 94px;
  padding: 14px;
  border: 1px solid #d3d6cf;
  border-radius: 13px;
  background: #fff;
}

.wordbook-personal-rows > article > div:not(.wordbook-personal-word) {
  display: grid;
}

.wordbook-personal-rows small {
  color: #75807e;
  font-size: 10px;
}

.wordbook-personal-rows b {
  font-size: 13px;
}

.wordbook-personal-word {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.wordbook-personal-word > span {
  display: grid;
}

.wordbook-personal-word > span b {
  font-size: 20px;
}

.wordbook-personal-word > button {
  min-height: 36px;
  padding: 0 9px;
  cursor: pointer;
  border: 1px solid #d8d5ca;
  border-radius: 99px;
  background: #fffdf7;
  font-size: 10px;
  font-weight: 800;
}

.wordbook-row-audio,
.term-audio-button {
  display: grid;
  width: 42px;
  height: 42px;
  cursor: pointer;
  place-items: center;
  border: 1px solid #ba9b3e;
  border-radius: 9px;
  color: #4f3a0d;
  background: #e0c65d;
}

.wordbook-row-audio span,
.term-audio-button span {
  display: none;
}

.wordbook-mastery-status {
  gap: 5px;
}

.wordbook-mastery-status i,
.wordbook-my-packs article > div > i {
  display: block;
  height: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: #e3e6df;
}

.wordbook-mastery-status i em,
.wordbook-my-packs article > div > i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--wb-teal);
}

.wordbook-personal-rows nav {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
}

.wordbook-personal-rows nav a,
.wordbook-personal-rows nav button {
  display: grid;
  min-height: 40px;
  padding: 0 9px;
  cursor: pointer;
  place-items: center;
  border: 1px solid #c7cec8;
  border-radius: 8px;
  color: var(--wb-deep);
  background: #fff;
  font-size: 11px;
  font-weight: 850;
}

.wordbook-personal-rows nav button {
  min-width: 40px;
  font-size: 18px;
}

.wordbook-personal-rows nav button.is-active {
  color: #a96d13;
  background: #fff3cf;
}

.wordbook-inline-empty {
  margin: 0;
  padding: 48px 20px;
  border: 1px dashed #c7cdc6;
  border-radius: 13px;
  color: #71807e;
  text-align: center;
}

.wordbook-my-packs > header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.wordbook-pack-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 18px;
}

.wordbook-pack-grid > article {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  min-height: 112px;
  padding: 10px;
  border: 1px solid var(--wb-line);
  border-radius: 13px;
  background: #fff;
}

.wordbook-pack-grid > article > img {
  width: 110px;
  height: 92px;
  border-radius: 9px;
  object-fit: cover;
}

.wordbook-pack-grid article > div {
  display: grid;
  min-width: 0;
}

.wordbook-pack-grid article span {
  color: var(--wb-teal);
  font-size: 9px;
  font-weight: 900;
}

.wordbook-pack-grid h3 {
  margin: 5px 0 5px;
  font-family: inherit;
  font-size: 18px;
  font-weight: 500;
}

.wordbook-pack-grid p {
  margin: 0 0 9px;
  color: #697575;
  font-size: 11px !important;
}

.wordbook-pack-grid article > a {
  display: grid;
  min-height: 42px;
  padding: 0 12px;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background: var(--wb-teal);
  font-size: 12px;
  font-weight: 850;
}

/* Professional wordbook */
.professional-wordbook-hero {
  display: grid;
  grid-template-columns: 1fr minmax(390px, 0.75fr);
  align-items: center;
  gap: 34px;
  padding: 34px;
  border: 1px solid #17323a26;
  border-radius: 22px;
  color: #fff;
  background: linear-gradient(125deg, #173a45, #295d66 58%, #7b6549);
  box-shadow: 0 13px 34px #283d3b12;
}

.professional-wordbook-hero > div > span {
  color: #f4d374;
}

.professional-wordbook-hero h1 {
  max-width: 690px;
  margin: 7px 0 12px;
  letter-spacing: -0.045em;
  font-family: inherit;
  font-size: 52px;
  font-weight: 450;
  line-height: 1.08;
}

.professional-wordbook-hero p {
  margin: 0;
  color: #ffffffb3;
  font-size: 16px !important;
  line-height: 1.7;
}

.professional-wordbook-hero form {
  padding: 18px;
  border: 1px solid #fff3;
  border-radius: 16px;
  background: #ffffff1a;
}

.professional-wordbook-hero form label {
  border: 0;
}

.professional-wordbook-hero form > button {
  width: 100%;
  margin-top: 8px;
  background: #e8bd57;
}

.professional-wordbook-hero form > small {
  display: block;
  margin-top: 9px;
  color: #fff9;
  font-size: 10px;
}

.professional-domain-section > header p {
  margin: 8px 0 0;
  color: #6d7977;
  font-size: 14px;
}

.wordbook-feature-buttons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px;
  padding-top: 18px;
}

.wordbook-feature-buttons > button {
  position: relative;
  display: grid;
  grid-template-rows: auto auto;
  grid-template-columns: 34px minmax(0, 1fr) 25px;
  align-items: center;
  gap: 3px 10px;
  min-height: 94px;
  padding: 17px 18px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid #c8c6c0;
  border-radius: 13px;
  color: #222938;
  background: linear-gradient(145deg, #fbfaf6, #f0eee8);
  box-shadow:
    0 8px 18px #1b202f0f,
    inset 0 1px #fff;
  text-align: left;
  transition:
    transform 0.18s,
    border-color 0.18s,
    box-shadow 0.18s;
}

.wordbook-feature-buttons > button:nth-child(4n + 2) {
  background: linear-gradient(145deg, #f8f4fb, #eee7f3);
}

.wordbook-feature-buttons > button:nth-child(4n + 3) {
  background: linear-gradient(145deg, #f2f8f5, #e5f0eb);
}

.wordbook-feature-buttons > button:nth-child(4n + 4) {
  background: linear-gradient(145deg, #faf5e9, #f1ead7);
}

.wordbook-feature-buttons > button span {
  grid-row: 1 / 3;
  color: #627590;
  letter-spacing: 0.08em;
  font-size: 12px;
  font-weight: 950;
}

.wordbook-feature-buttons > button b {
  align-self: end;
  font-size: 16px;
}

.wordbook-feature-buttons > button small {
  align-self: start;
  color: #71808d;
  font-size: 9px;
}

.wordbook-feature-buttons > button i {
  position: relative;
  z-index: 1;
  display: grid;
  grid-row: 1 / 3;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid #272f3f29;
  border-radius: 50%;
  color: #606a7b;
  background: #ffffff8c;
  font-size: 10px;
  font-style: normal;
}

.wordbook-feature-buttons > button:hover {
  border-color: #737d91;
  transform: translateY(-3px);
  box-shadow:
    0 14px 28px #1b202f1c,
    inset 0 1px #fff;
}

.wordbook-feature-buttons > button.is-active {
  color: #fff;
  border-color: #293451;
  background: linear-gradient(135deg, #23304d, #4c467d 62%, #875a80);
  box-shadow:
    0 16px 30px #29345138,
    inset 0 1px #ffffff2e;
}

.wordbook-feature-buttons > button.is-active span,
.wordbook-feature-buttons > button.is-active i {
  color: #f5d975;
}

.wordbook-feature-buttons > button.is-active small {
  color: #ffffffb8;
}

.professional-explorer-section > header {
  padding-bottom: 18px;
}

.professional-library-layout {
  display: grid;
  grid-template-columns: 225px minmax(0, 1fr);
  gap: 18px;
}

.professional-library-sidebar {
  align-self: start;
  overflow: hidden;
  border: 1px solid #d1d4ce;
  border-radius: 14px;
  background: #f2f3ee;
}

.professional-library-sidebar > span,
.professional-library-sidebar > b {
  display: block;
  padding: 0 16px;
}

.professional-library-sidebar > span {
  padding-top: 17px;
  color: var(--wb-teal);
  letter-spacing: 0.1em;
  font-size: 9px;
  font-weight: 950;
}

.professional-library-sidebar > b {
  margin-top: 5px;
  font-size: 13px;
}

.professional-library-sidebar > button {
  display: grid;
  grid-template-columns: 27px 1fr;
  align-items: center;
  width: 100%;
  min-height: 45px;
  padding: 0 15px;
  cursor: pointer;
  border: 0;
  border-top: 1px solid #d8dad4;
  color: #526362;
  background: transparent;
  text-align: left;
  font-size: 11px;
  font-weight: 800;
}

.professional-library-sidebar > b + button {
  display: block;
  margin-top: 16px;
  color: #fff;
  background: var(--wb-deep);
  text-align: center;
}

.professional-library-sidebar > button.is-active {
  color: #fff;
  background: var(--wb-teal);
}

.professional-library-sidebar > div {
  display: grid;
  padding: 18px 15px;
  border-top: 1px solid #d8dad4;
}

.professional-library-sidebar > div small,
.professional-library-sidebar > div span {
  color: #75807e;
  font-size: 9px;
}

.professional-library-sidebar > div strong {
  margin: 4px 0;
  font-size: 32px;
}

.professional-library-main > header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px 15px;
  margin-bottom: 10px;
}

.professional-library-main > header label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid #c8cec8;
  border-radius: 10px;
  background: #fff;
}

.professional-library-main > header input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}

.professional-library-main > header p {
  grid-column: 1 / -1;
  margin: 0;
  color: #6f7b78;
  font-size: 11px;
}

.professional-library-main > header > div {
  display: flex;
  gap: 5px;
}

.professional-library-main > header > div span {
  padding: 5px 7px;
  border-radius: 99px;
  color: #57716d;
  background: #edf2ee;
  font-size: 9px;
  font-weight: 850;
}

.wordbook-mini-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.wordbook-mini-pagination button {
  display: grid;
  width: 34px;
  height: 34px;
  cursor: pointer;
  place-items: center;
  border: 1px solid #c9cec8;
  border-radius: 8px;
  background: #fff;
}

.wordbook-mini-pagination button:disabled {
  opacity: 0.4;
}

.professional-term-table {
  display: grid;
  gap: 9px;
}

.professional-term-entry {
  display: grid;
  grid-template-columns: 42px 210px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  min-height: 210px;
  padding: 22px 20px;
  border: 1px solid #c2bfb5;
  border-radius: 9px;
  background: #fbfaf6;
  transition:
    border-color 0.18s,
    box-shadow 0.18s;
}

.professional-term-entry:hover {
  border-color: #7c8493;
  box-shadow: 0 10px 24px #15192512;
}

.professional-term-entry .term-index {
  color: #817c74;
  font-size: 12px;
  font-weight: 900;
}

.professional-term-name h2 {
  margin: 0;
  font-family: inherit;
  font-size: 28px;
  font-weight: 500;
}

.professional-term-name p {
  margin: 4px 0 12px;
  color: #6f7b78;
  font-size: 12px;
}

.professional-term-name > small {
  display: inline-block;
  padding: 5px 7px;
  border-radius: 99px;
  color: #6d571a;
  background: #f3e3aa;
  font-size: 8px;
  font-weight: 900;
}

.professional-term-name h3 {
  margin: 12px 0 0;
  font-family: inherit;
  font-size: 18px;
  font-weight: 650;
}

.professional-term-source,
.wordbook-course-source {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  margin-top: 8px;
  color: #397067;
  font-size: 11px;
  font-weight: 850;
  text-decoration: none;
}

.professional-term-detail {
  display: grid;
  gap: 10px;
}

.word-insight-trigger {
  display: flex;
  align-items: center;
  justify-self: start;
  gap: 6px;
  min-height: 35px;
  padding: 0 9px;
  cursor: pointer;
  border: 1px solid #d0d1ca;
  border-radius: 99px;
  background: #fff;
  font-size: 10px;
  font-weight: 850;
}

.word-insight-trigger small {
  color: #79807d;
  letter-spacing: 0.08em;
  font-size: 7px;
}

.professional-term-detail > p {
  margin: 0;
  color: #4e5d5b;
  font-size: 13px;
  line-height: 1.65;
}

.professional-term-detail > blockquote {
  display: grid;
  grid-template-columns: 25px 1fr;
  gap: 2px 8px;
  margin: 0;
  padding: 10px 12px;
  border-left: 3px solid #caa84a;
  border-radius: 0 8px 8px 0;
  background: #fff8e5;
}

.professional-term-detail > blockquote b {
  grid-row: 1 / 3;
  color: #7b5f11;
}

.professional-term-detail > blockquote span {
  font-size: 12px;
  font-weight: 800;
}

.professional-term-detail > blockquote small {
  color: #777d79;
  font-size: 10px;
}

.term-learning-path {
  display: grid;
  gap: 7px;
}

.term-learning-path > span {
  color: #637370;
  font-size: 9px;
  font-weight: 900;
}

.term-learning-path ul {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 150px;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.term-learning-path li {
  display: grid;
  min-height: 55px;
  padding: 9px;
  border: 1px solid #dadbd4;
  border-radius: 8px;
  background: #fff;
}

.term-learning-path li small {
  color: #7a827f;
  font-size: 8px;
}

.term-learning-path li b {
  margin-top: 4px;
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.related-knowledge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  padding: 0 11px;
  cursor: pointer;
  border: 1px solid #d7d7cf;
  border-radius: 8px;
  color: #526360;
  background: #f4f4ef;
  font-size: 9px;
}

.term-learning-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.term-learning-actions a,
.term-learning-actions button {
  display: grid;
  min-height: 38px;
  padding: 0 10px;
  cursor: pointer;
  place-items: center;
  border: 1px solid #c9cec8;
  border-radius: 8px;
  color: #31534f;
  background: #fff;
  font-size: 9px;
  font-weight: 850;
}

.term-learning-actions a {
  color: #fff;
  border-color: var(--wb-teal);
  background: var(--wb-teal);
}

.term-learning-actions button.is-active {
  color: #8b5e0d;
  background: #fff1c2;
}

.term-learning-actions .term-audio-button {
  width: 38px;
  min-height: 38px;
  padding: 0;
}

.professional-pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.professional-pagination button {
  min-height: 44px;
  cursor: pointer;
  border: 1px solid #c7cdc7;
  border-radius: 9px;
  background: #fff;
  font-weight: 800;
}

.professional-pagination button:last-child {
  color: #fff;
  border-color: var(--wb-deep);
  background: var(--wb-deep);
}

.professional-pagination button:disabled {
  opacity: 0.4;
}

.professional-pagination span {
  min-width: 80px;
  text-align: center;
  font-size: 12px;
}

/* Word insight modal */
.word-insight-backdrop {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 40px;
  background: #112a2db8;
  backdrop-filter: blur(9px);
}

.word-insight-panel {
  position: relative;
  inset: auto;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
  width: 650px;
  max-height: calc(100vh - 80px);
  padding: 24px;
  overflow-y: auto;
  border: 1px solid #ffffff82;
  border-radius: 22px;
  background: #fffdf7;
  box-shadow: 0 28px 90px #07171970;
}

.word-insight-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 13px;
  border-bottom: 1px solid #d6d8d1;
}

.word-insight-panel > header span {
  color: var(--wb-teal);
  letter-spacing: 0.1em;
  font-size: 10px;
  font-weight: 950;
}

.word-insight-panel > header button {
  display: grid;
  width: 38px;
  height: 38px;
  cursor: pointer;
  place-items: center;
  border: 1px solid #c9cec8;
  border-radius: 9px;
  background: #fff;
  font-size: 21px;
}

.word-insight-meaning {
  padding: 22px 0 10px;
}

.word-insight-meaning > small {
  display: inline-block;
  padding: 5px 8px;
  border-radius: 99px;
  color: #176f68;
  background: #e3f1eb;
  font-size: 9px;
  font-weight: 900;
}

.word-insight-meaning h2 {
  margin: 12px 0 4px;
  font-family: inherit;
  font-size: 46px;
  font-weight: 500;
}

.word-insight-meaning p {
  margin: 0;
  color: #607673;
  font-size: 15px;
}

.word-insight-meaning strong {
  display: block;
  margin-top: 8px;
  font-size: 18px;
}

.word-insight-meaning div {
  margin-top: 18px;
  padding: 17px;
  border-radius: 12px;
  background: #eef3ef;
  font-size: 15px;
  line-height: 1.7;
}

.word-insight-meaning .wordbook-course-source {
  margin-top: 11px;
}

.word-insight-example {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 5px 10px;
  margin: 10px 0 0;
  padding: 16px;
  border-left: 4px solid #e0b94e;
  border-radius: 0 11px 11px 0;
  background: #fff5d8;
}

.word-insight-example b {
  grid-row: 1 / 3;
  color: #785d13;
}

.word-insight-example span {
  font-weight: 850;
}

.word-insight-example small {
  color: #777b77;
}

.word-insight-actions {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}

.word-insight-actions > a {
  display: grid;
  flex: 1;
  min-height: 42px;
  padding: 0 12px;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background: var(--wb-deep);
  font-size: 12px;
  font-weight: 900;
}

.wordbook-action-message {
  position: fixed;
  z-index: 110;
  right: 24px;
  bottom: 24px;
  max-width: 420px;
  margin: 0;
  padding: 13px 16px;
  border: 1px solid #ffffff85;
  border-radius: 11px;
  color: #fff;
  background: #173f43ed;
  box-shadow: 0 16px 40px #1027293d;
  font-size: 12px;
}

/* Compact study canvas and persistent word-to-word navigation. */
.wordbook-page:has(.flashcard-app-shell.is-study-session) {
  padding-top: 12px;
}

.flashcard-app-shell.is-study-session > .wordbook-section-nav {
  min-height: 44px;
  margin-bottom: 8px;
  padding: 4px;
  border-radius: 14px;
}

.flashcard-app-shell.is-study-session > .wordbook-section-nav a {
  min-height: 34px;
  padding: 0 15px;
  font-size: 12px;
}

.is-study-session .flashcard-session-header {
  min-height: 60px;
  margin-bottom: 8px;
  padding: 6px 9px;
}

.is-study-session .flashcard-session-header > a,
.is-study-session .flashcard-session-header nav button {
  width: 40px;
  height: 40px;
}

.is-study-session .flashcard-session-tools > summary {
  width: 40px;
  height: 40px;
}

.is-study-session .flashcard-session-header > div {
  gap: 2px 12px;
}

.is-study-session .flashcard-session-header > div > small {
  font-size: 8px;
}

.is-study-session .flashcard-session-header > div > i {
  height: 6px;
}

.flashcard-session-frame {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: start;
  gap: 8px;
  min-width: 0;
}

.flashcard-session-frame .flashcard-learning-card {
  width: 100%;
  min-width: 0;
  min-height: 560px;
}

.flashcard-word-pager {
  position: sticky;
  z-index: 12;
  top: calc(50dvh - 34px);
  display: grid;
  width: 44px;
  height: 68px;
  margin-top: clamp(128px, 21vh, 190px);
  padding: 0;
  cursor: pointer;
  place-items: center;
  align-self: start;
  border: 1px solid #bfd0ca;
  border-bottom: 4px solid #adc1ba;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(155deg, #2e8275, #1e625a);
  box-shadow: 0 10px 24px #173f4329;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    opacity 0.16s ease;
}

.flashcard-word-pager:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 13px 28px #173f4338;
}

.flashcard-word-pager:active:not(:disabled) {
  transform: translateY(2px);
  border-bottom-width: 2px;
}

.flashcard-word-pager:focus-visible {
  outline: 3px solid #f3cf6c;
  outline-offset: 3px;
}

.flashcard-word-pager b {
  font-size: 34px;
  font-weight: 500;
  line-height: 1;
}

.flashcard-word-pager span {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.flashcard-word-pager:disabled {
  cursor: not-allowed;
  color: #8a9894;
  border-color: #d4dad7;
  border-bottom-color: #c9cfcc;
  background: #eef1ef;
  box-shadow: none;
  opacity: 0.55;
}

.is-study-session .flashcard-question {
  gap: 8px;
  padding: 14px;
}

.is-study-session .flashcard-corner-audio {
  top: 10px;
  right: 10px;
  width: 31px;
  height: 31px;
  border-radius: 9px;
}

.is-study-session .flashcard-word-stage {
  min-height: 154px;
  padding: 14px 18px;
}

.is-study-session .flashcard-word-stage > h1 {
  font-size: clamp(40px, 4.2vw, 58px);
}

.is-study-session .flashcard-listen-stage {
  height: 174px;
}

.is-study-session .flashcard-listen-button {
  width: 120px;
  height: 120px;
}

.is-study-session .flashcard-listen-button i {
  font-size: 23px;
}

.is-study-session .flashcard-image-heading {
  margin-top: 0;
}

.is-study-session .flashcard-image-heading h2 {
  margin: 0;
  font-size: 18px;
}

.is-study-session .flashcard-image-options button {
  height: 172px;
}

@media (max-width: 932px) {
  html[data-finyue-device="mobile"]
    body
    .wordbook-page:has(.flashcard-app-shell.is-study-session) {
    padding-top: 4px !important;
  }

  html[data-finyue-device="mobile"]
    body
    .wordbook-page
    .flashcard-app-shell.is-study-session
    > .wordbook-section-nav {
    min-height: 33px !important;
    margin: 0 0 4px !important;
    padding: 0 26px 2px 0 !important;
    gap: 4px !important;
  }

  html[data-finyue-device="mobile"]
    body
    .wordbook-page
    .flashcard-app-shell.is-study-session
    > .wordbook-section-nav
    a {
    min-height: 29px !important;
    padding: 0 9px !important;
    border-bottom-width: 2px !important;
    border-radius: 9px !important;
    font-size: 8px !important;
  }

  html[data-finyue-device="mobile"]
    body
    .wordbook-page
    .is-study-session
    .flashcard-session-header {
    min-height: 52px !important;
    margin-bottom: 4px !important;
    padding: 5px 6px !important;
    border-radius: 13px !important;
  }

  html[data-finyue-device="mobile"]
    body
    .wordbook-page
    .is-study-session
    .flashcard-session-header
    > a,
  html[data-finyue-device="mobile"]
    body
    .wordbook-page
    .is-study-session
    .flashcard-session-header
    nav
    button {
    width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
  }

  html[data-finyue-device="mobile"]
    body
    .wordbook-page
    .is-study-session
    .flashcard-session-header
    > div
    > span {
    font-size: 9px !important;
  }

  html[data-finyue-device="mobile"]
    body
    .wordbook-page
    .is-study-session
    .flashcard-session-header
    > div
    > i {
    height: 5px !important;
  }

  .flashcard-session-frame {
    grid-template-columns: 36px minmax(0, 1fr) 36px;
    gap: 4px;
  }

  .flashcard-word-pager {
    top: calc(50dvh - 29px);
    width: 36px;
    height: 58px;
    margin-top: 124px;
    border-bottom-width: 3px;
    border-radius: 13px;
  }

  .flashcard-word-pager b {
    font-size: 30px;
  }

  html[data-finyue-device="mobile"]
    body
    .wordbook-page
    .is-study-session
    .flashcard-question {
    gap: 5px !important;
    padding: 7px !important;
  }

  html[data-finyue-device="mobile"]
    body
    .wordbook-page
    .is-study-session
    .flashcard-word-stage {
    min-height: 104px !important;
    padding: 6px 8px !important;
    gap: 2px !important;
    border-radius: 13px !important;
  }

  html[data-finyue-device="mobile"]
    body
    .wordbook-page
    .is-study-session
    .flashcard-word-stage
    > h1 {
    font-size: clamp(34px, 9.5vw, 43px) !important;
  }

  html[data-finyue-device="mobile"]
    body
    .wordbook-page
    .is-study-session
    .flashcard-word-stage
    > nav {
    margin-top: 1px !important;
  }

  html[data-finyue-device="mobile"]
    body
    .wordbook-page
    .is-study-session
    .flashcard-audio-button {
    min-height: 32px !important;
  }

  html[data-finyue-device="mobile"]
    body
    .wordbook-page
    .is-study-session
    .flashcard-listen-stage {
    height: 118px !important;
    min-height: 118px !important;
  }

  html[data-finyue-device="mobile"]
    body
    .wordbook-page
    .is-study-session
    .flashcard-listen-button {
    width: 82px !important;
    height: 82px !important;
  }

  html[data-finyue-device="mobile"]
    body
    .wordbook-page
    .is-study-session
    .flashcard-image-heading {
    min-height: 25px !important;
  }

  html[data-finyue-device="mobile"]
    body
    .wordbook-page
    .is-study-session
    .flashcard-image-heading
    h2 {
    font-size: 10px !important;
  }

  html[data-finyue-device="mobile"]
    body
    .wordbook-page
    .is-study-session
    .flashcard-image-options {
    gap: 5px !important;
  }

  html[data-finyue-device="mobile"]
    body
    .wordbook-page
    .is-study-session
    .flashcard-image-options
    button {
    height: clamp(104px, 28vw, 118px) !important;
    border-radius: 12px !important;
  }
}

/* Cascade anchor for the final desktop density pass. Earlier compatibility
   sections intentionally remain above; these values are the release contract. */
@media (min-width: 933px) {
  .wordbook-page:has(.wordbook-home-v66) {
    padding-top: 8px;
  }

  .wordbook-home-v66 .wordbook-section-nav {
    min-height: 42px;
    margin-bottom: 8px;
  }

  .wordbook-home-v66 .wordbook-entry-grid {
    gap: 9px !important;
  }

  .wordbook-home-v66 .wordbook-entry-card {
    padding: 15px;
    border-radius: 16px;
  }

  .wordbook-home-v66 .wordbook-entry-card h2 {
    margin: 3px 0 5px;
    font-size: 21px;
  }

  .wordbook-home-v66 .wordbook-entry-card.is-checkin {
    grid-column: span 7;
    grid-template-columns: 56% 44%;
    min-height: 250px;
  }

  .wordbook-home-v66 .wordbook-entry-card.is-checkin .wordbook-entry-copy {
    padding: 16px 18px;
  }

  .wordbook-home-v66 .wordbook-entry-card.is-checkin h2 {
    margin-top: 4px;
    font-size: 30px;
  }

  .wordbook-home-v66 .wordbook-entry-card.is-checkin dl {
    margin-top: 9px;
  }

  .wordbook-home-v66 .wordbook-entry-card.is-checkin dl div {
    min-height: 42px;
    padding: 6px 9px;
  }

  .wordbook-home-v66 .wordbook-entry-card.is-checkin figure {
    height: 250px;
  }

  .wordbook-home-v66
    .wordbook-entry-card.is-checkin
    .wordbook-entry-copy
    > a.wordbook-entry-primary-action {
    min-height: 45px;
    margin-top: 9px;
  }

  .wordbook-home-v66 .wordbook-entry-card.is-review {
    grid-column: span 5;
    min-height: 250px;
  }

  .wordbook-home-v66 .wordbook-entry-card.is-library,
  .wordbook-home-v66 .wordbook-entry-card.is-professional {
    min-height: 174px;
  }

  .wordbook-home-v66 .wordbook-entry-card > strong {
    margin: 4px 0 2px;
    font-size: 28px;
  }

  .wordbook-home-v66 .wordbook-entry-card > a,
  .wordbook-home-v66 .wordbook-entry-copy > a {
    min-height: 38px;
    margin-top: 7px;
  }

  .wordbook-home-v66 .wordbook-entry-card.is-library > div {
    margin-top: 5px;
  }

  .wordbook-home-v66 .wordbook-entry-card.is-library > div i {
    min-height: 39px;
    padding: 5px 8px;
  }

  .wordbook-home-v66 .wordbook-entry-card.is-professional label,
  .wordbook-home-v66 .wordbook-entry-card.is-professional form button {
    min-height: 38px;
  }

  .wordbook-page:has(.flashcard-app-shell.is-study-session) {
    padding-top: 7px;
  }

  .flashcard-app-shell.is-study-session > .wordbook-section-nav {
    min-height: 40px;
    margin-bottom: 5px;
  }

  .is-study-session .flashcard-session-header {
    min-height: 54px;
    margin-bottom: 5px;
  }

  .flashcard-session-frame .flashcard-learning-card {
    min-height: 490px;
  }

  .is-study-session .flashcard-question {
    gap: 6px;
    padding: 10px 12px 12px;
  }

  .is-study-session .flashcard-word-stage {
    min-height: 126px;
    padding: 9px 16px;
  }

  .is-study-session .flashcard-image-options button {
    height: 148px;
  }
}

/* Meaning questions must not reveal the target word before an answer. Keep the
   definition readable while retaining the four-choice first-screen layout. */
@media (max-width: 932px) {
  html[data-finyue-device="mobile"]
    body
    .wordbook-page
    .flashcard-app-shell.is-study-session
    > .wordbook-section-nav
    a {
    font-size: 13px !important;
  }

  html[data-finyue-device="mobile"]
    body
    .wordbook-page
    .is-study-session
    .flashcard-question
    > header
    small {
    font-size: 13px !important;
  }

  html[data-finyue-device="mobile"]
    body
    .wordbook-page
    .is-study-session
    .flashcard-meaning-prompt {
    min-height: 132px !important;
    padding: 12px 14px !important;
    gap: 4px !important;
    border-radius: 13px !important;
  }

  html[data-finyue-device="mobile"]
    body
    .wordbook-page
    .is-study-session
    .flashcard-meaning-prompt
    small {
    font-size: 12px !important;
  }

  html[data-finyue-device="mobile"]
    body
    .wordbook-page
    .is-study-session
    .flashcard-meaning-prompt
    h1 {
    margin-bottom: 4px !important;
    font-size: clamp(18px, 5vw, 22px) !important;
    line-height: 1.35 !important;
  }

  html[data-finyue-device="mobile"]
    body
    .wordbook-page
    .is-study-session
    .flashcard-meaning-prompt
    p {
    font-size: 15px !important;
  }

  html[data-finyue-device="mobile"]
    body
    .wordbook-page
    .is-study-session
    .flashcard-image-heading
    h2 {
    font-size: 16px !important;
    line-height: 1.35 !important;
  }

  html[data-finyue-device="mobile"]
    body
    .wordbook-page
    .is-study-session
    .flashcard-image-options {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  html[data-finyue-device="mobile"]
    body
    .wordbook-page
    .is-study-session
    .flashcard-image-options.is-meaning
    button {
    min-height: 104px !important;
    height: auto !important;
    padding: 34px 10px 12px !important;
  }

  html[data-finyue-device="mobile"]
    body
    .wordbook-page
    .is-study-session
    .flashcard-meaning-copy {
    font-size: 18px !important;
    line-height: 1.35 !important;
  }
}

/* Final precedence: readable mobile wordbook metadata and actions. */
@media (max-width: 932px) {
  html[data-finyue-device="mobile"] body .wordbook-page
    .flashcard-app-shell.is-study-session > .wordbook-section-nav a,
  html[data-finyue-device="mobile"] body .wordbook-page
    .is-study-session .flashcard-session-header > div > span,
  html[data-finyue-device="mobile"] body .wordbook-page
    .is-study-session .flashcard-question > header small,
  html[data-finyue-device="mobile"] body .wordbook-page
    .is-study-session .flashcard-meaning-prompt small,
  html[data-finyue-device="mobile"] body .wordbook-page
    .is-study-session :is(.flashcard-auto-audio-note, .flashcard-answer-panel small) {
    font-size: 14px !important;
    line-height: 1.4 !important;
  }

  html[data-finyue-device="mobile"] body .wordbook-page
    .is-study-session
    :is(
      .flashcard-session-header button,
      .flashcard-audio-button,
      .flashcard-listen-button,
      .flashcard-answer-panel button,
      .flashcard-answer-actions button,
      .flashcard-session-tools-menu a,
      .flashcard-image-options button,
      .flashcard-image-options button b,
      .flashcard-asset-label strong,
      .flashcard-asset-label small
    ) {
    font-size: 15px !important;
    line-height: 1.3 !important;
  }

  html[data-finyue-device="mobile"] body .wordbook-page
    .is-study-session :is(.flashcard-image-heading h2, .flashcard-meaning-prompt p) {
    font-size: 16px !important;
    line-height: 1.4 !important;
  }
}

/* Pass 95: the wordbook home has no secondary navigation ribbon. The first
   two actions lead the page; library, saved phrases and professional lookup
   form one aligned utility row with bottom-anchored actions. */
.wordbook-home-v66 .wordbook-primary-entry-grid {
  grid-template-columns: minmax(0, 1fr) !important;
}

.wordbook-home-v66 .wordbook-primary-entry-grid > .wordbook-entry-card {
  grid-column: 1 / -1 !important;
}

.wordbook-home-v66 .wordbook-primary-entry-grid > .is-review {
  min-height: 230px;
}

.wordbook-home-v66 .wordbook-secondary-entry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.wordbook-home-v66 .wordbook-secondary-entry-grid > .wordbook-entry-card {
  display: flex;
  min-height: 315px;
  flex-direction: column;
}

.wordbook-home-v66 .wordbook-secondary-entry-grid > .wordbook-entry-card > :is(a, form) {
  margin-top: auto;
}

.wordbook-home-v66 .wordbook-secondary-entry-grid .is-favorites {
  border-color: #dbc78f;
  background: linear-gradient(145deg, #fffdf7, #fff7de);
}

.wordbook-home-v66 .wordbook-secondary-entry-grid .is-favorites > strong {
  margin: 8px 0 12px;
  color: #c18b27;
  font-size: 42px;
  line-height: 1;
}

.wordbook-home-v66 .wordbook-secondary-entry-grid .is-professional > form {
  width: 100%;
}

@media (max-width: 932px) {
  html[data-finyue-device="mobile"] body .wordbook-home-v66 .wordbook-secondary-entry-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    margin-top: 10px;
  }

  html[data-finyue-device="mobile"] body .wordbook-home-v66
    .wordbook-secondary-entry-grid > .wordbook-entry-card {
    min-height: 250px;
  }
}
