@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@800;900&display=swap");

html.yuedu-auth-loading,
html.yuedu-auth-locked {
  min-height: 100%;
  background: #f5f7fb;
}

html.yuedu-auth-loading body > :not(.yuedu-auth-root),
html.yuedu-auth-locked body > :not(.yuedu-auth-root) {
  visibility: hidden !important;
  pointer-events: none !important;
}

.yuedu-auth-root {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 24px;
  padding-top: max(24px, env(safe-area-inset-top, 0px));
  padding-bottom: max(24px, env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
  min-height: 100%;
  background:
    radial-gradient(circle at 16% 8%, rgba(38, 166, 154, 0.18), transparent 30%),
    radial-gradient(circle at 88% 22%, rgba(255, 193, 7, 0.16), transparent 28%),
    linear-gradient(135deg, #f7fbff 0%, #eef4f8 44%, #f8f3ea 100%);
  color: #17324d;
  font-family: "DM Sans", "LXGW WenKai", "Microsoft YaHei", Arial, sans-serif;
}

.yuedu-auth-root button {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  font-family: inherit;
  line-height: 1.2;
}

.yuedu-auth-card {
  width: min(420px, 100%);
  margin: auto;
  flex-shrink: 0;
  border: 1px solid rgba(23, 50, 77, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 64px rgba(42, 58, 74, 0.16);
  overflow: hidden;
}

.yuedu-filing {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 10px;
  color: #748395;
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
}

.yuedu-filing--auth {
  width: min(680px, 100%);
  margin: 18px auto 0;
  flex-shrink: 0;
}

.yuedu-filing a {
  color: inherit;
  text-decoration: none;
}

.yuedu-filing a:hover,
.yuedu-filing a:focus-visible {
  color: #315d78;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.yuedu-filing__separator {
  color: #a8b2bd;
}

.yuedu-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 6px;
  background: linear-gradient(180deg, #eef3f7 0%, #e4ecf2 100%);
  border-bottom: 1px solid rgba(23, 50, 77, 0.08);
}

.yuedu-auth-tab {
  position: relative;
  min-height: 48px;
  border: none !important;
  border-radius: 10px;
  background: transparent;
  color: #6d7f92;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.15s ease;
}

.yuedu-auth-tab:hover:not(.is-active) {
  color: #3f5569;
  background: rgba(255, 255, 255, 0.55);
}

.yuedu-auth-tab.is-active {
  background: #fff;
  color: #1a6b64;
  font-weight: 700;
  box-shadow:
    0 2px 10px rgba(28, 111, 104, 0.14),
    0 1px 3px rgba(23, 50, 77, 0.08);
}

.yuedu-auth-tab.is-active::after {
  content: "";
  position: absolute;
  left: 22%;
  right: 22%;
  bottom: 7px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2a9d8f, #1c6f68);
}

.yuedu-auth-head {
  padding: 20px 24px 4px;
}

.yuedu-auth-field[data-activate-field][hidden] {
  display: none !important;
}

.yuedu-auth-aux-section[hidden] {
  display: none !important;
}

.yuedu-auth-aux-section {
  display: grid;
  gap: 10px;
  margin-top: 2px;
  padding: 14px 14px 12px;
  border-radius: 12px;
  background: #f6faf9;
  border: 1px dashed rgba(28, 111, 104, 0.18);
}

.yuedu-auth-aux-title {
  margin: 0;
  color: #6d8f8a;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.yuedu-auth-field--aux span {
  color: #5f8f88;
  font-weight: 600;
}

.yuedu-auth-field--aux input {
  background: #fcfefd;
  border-color: rgba(28, 111, 104, 0.12);
}

.yuedu-auth-field-hint {
  color: #7a9290;
  font-size: 12px;
  line-height: 1.55;
}

.yuedu-auth-reset-lead {
  margin: 0;
  color: #17324d;
  font-size: 15px;
  font-weight: 700;
}

.yuedu-email-security-note {
  color: #6d8f8a !important;
  font-size: 12px !important;
}

.yuedu-auth-links[data-login-only][hidden] {
  display: none !important;
}

.yuedu-auth-kicker {
  margin: 0 0 6px;
  color: #3b7f7a;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.yuedu-auth-note {
  margin: 0;
  color: #5f7184;
  font-size: 14px;
  line-height: 1.65;
}

.yuedu-auth-form {
  display: grid;
  gap: 14px;
  padding: 16px 24px 24px;
}

.yuedu-auth-field {
  display: grid;
  gap: 7px;
}

.yuedu-auth-field span {
  color: #334b63;
  font-size: 13px;
  font-weight: 700;
}

.yuedu-auth-field input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(23, 50, 77, 0.14);
  border-radius: 10px;
  padding: 12px 14px;
  background: #fff;
  color: #17324d;
  font: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.yuedu-auth-field input:focus {
  border-color: #2f8c83;
  box-shadow: 0 0 0 3px rgba(47, 140, 131, 0.14);
}

.yuedu-auth-password-wrap {
  position: relative;
}

.yuedu-auth-password-wrap input {
  padding-right: 44px;
}

.yuedu-auth-password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #6b8a9e;
  cursor: pointer;
  transform: translateY(-50%);
  transition: color 0.15s ease, background 0.15s ease;
}

.yuedu-auth-password-toggle:hover {
  color: #2f8c83;
  background: rgba(47, 140, 131, 0.08);
}

.yuedu-auth-password-toggle svg {
  display: block;
  width: 20px;
  height: 20px;
}

.yuedu-auth-password-toggle__eye-closed {
  display: none;
}

.yuedu-auth-password-toggle:not(.is-visible) .yuedu-auth-password-toggle__eye-open {
  display: none;
}

.yuedu-auth-password-toggle:not(.is-visible) .yuedu-auth-password-toggle__eye-closed {
  display: block;
}

.yuedu-auth-actions {
  margin-top: 4px;
}

.yuedu-auth-button {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 10px;
  padding: 0 16px;
  background: linear-gradient(180deg, #22857c 0%, #1c6f68 100%);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(28, 111, 104, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.yuedu-auth-button:hover:not([disabled]) {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(28, 111, 104, 0.32);
}

.yuedu-auth-button:active:not([disabled]) {
  transform: translateY(0);
}

.yuedu-auth-button[disabled] {
  cursor: progress;
  opacity: 0.68;
}

.yuedu-auth-links {
  display: flex;
  justify-content: flex-end;
  margin-top: -4px;
}

.yuedu-auth-links--field {
  margin-top: 6px;
  margin-bottom: 0;
}

.yuedu-auth-card.is-reset .yuedu-auth-tabs {
  display: none;
}

.yuedu-auth-reset[hidden] {
  display: none !important;
}

.yuedu-auth-form[data-login-form][hidden] {
  display: none !important;
}

.yuedu-auth-link {
  border: 0;
  background: transparent;
  color: #1c6f68;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.yuedu-auth-link:hover {
  color: #15584f;
}

.yuedu-auth-button--ghost {
  background: #edf5f4;
  color: #1c6f68;
  box-shadow: none;
}

.yuedu-auth-button--ghost:hover:not([disabled]) {
  box-shadow: none;
  background: #dcefec;
}

.yuedu-auth-notice {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2147483001;
  max-width: min(92vw, 520px);
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(28, 111, 104, 0.96);
  color: #fff;
  font: 13px/1.5 "DM Sans", "LXGW WenKai", "Microsoft YaHei", Arial, sans-serif;
  box-shadow: 0 10px 30px rgba(28, 111, 104, 0.28);
  transition: opacity 0.3s ease;
}

.yuedu-auth-notice.is-hide {
  opacity: 0;
}

.yuedu-auth-modal-root {
  position: fixed;
  inset: 0;
  z-index: 2147483002;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(23, 50, 77, 0.38);
}

.yuedu-auth-modal {
  width: min(420px, 100%);
  border: 1px solid rgba(23, 50, 77, 0.1);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 64px rgba(42, 58, 74, 0.2);
  overflow: hidden;
}

.yuedu-auth-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 10px;
  border-bottom: 1px solid rgba(23, 50, 77, 0.08);
}

.yuedu-auth-modal__title {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
  color: #17324d;
}

.yuedu-auth-modal__close {
  border: 0;
  background: transparent;
  color: #6d7f92;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.yuedu-auth-modal__form {
  display: grid;
  gap: 14px;
  padding: 16px 20px 20px;
}

.yuedu-auth-modal__note {
  margin: 0;
  color: #5f7184;
  font-size: 13px;
  line-height: 1.65;
}

.yuedu-auth-modal__actions {
  display: grid;
  gap: 10px;
}

.yuedu-auth-userbar__email,
.yuedu-auth-userbar__email-badge {
  flex: 0 0 auto;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 3px 9px;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.yuedu-auth-userbar__email-badge.is-unbound,
.yuedu-auth-userbar__email.is-unbound {
  background: #f3f7f6;
  border-color: rgba(95, 113, 132, 0.18);
  color: #6b7f90;
}

.yuedu-auth-userbar__email-badge.is-pending,
.yuedu-auth-userbar__email.is-pending {
  background: #fff7eb;
  border-color: rgba(184, 106, 18, 0.22);
  color: #b86a12;
}

.yuedu-auth-userbar__email-badge.is-verified,
.yuedu-auth-userbar__email.is-verified {
  background: #edf8f1;
  border-color: rgba(31, 122, 82, 0.2);
  color: #1f7a52;
}

.yuedu-auth-userbar__email-badge:hover,
.yuedu-auth-userbar__email:hover {
  filter: brightness(0.98);
}

.yuedu-email-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.yuedu-email-status-badge__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.yuedu-email-status-badge.is-unbound {
  background: #f3f7f6;
  border-color: rgba(95, 113, 132, 0.16);
  color: #5f7184;
}

.yuedu-email-status-badge.is-pending {
  background: #fff7eb;
  border-color: rgba(184, 106, 18, 0.18);
  color: #b86a12;
}

.yuedu-email-status-badge.is-verified {
  background: #edf8f1;
  border-color: rgba(31, 122, 82, 0.18);
  color: #1f7a52;
}

.yuedu-email-display {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f7faf9;
  border: 1px solid rgba(28, 111, 104, 0.1);
}

.yuedu-email-display.is-empty .yuedu-email-display__value {
  color: #8a9aa8;
  font-weight: 600;
}

.yuedu-email-display__label {
  color: #7a9290;
  font-size: 12px;
  font-weight: 600;
}

.yuedu-email-display__value {
  color: #17324d;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.yuedu-email-settings .yuedu-email-cancel-change {
  justify-self: center;
  margin-top: -2px;
}

.yuedu-auth-alert {
  min-height: 20px;
  color: #b43b35;
  font-size: 13px;
  line-height: 1.55;
}

.yuedu-auth-userbar {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: min(100%, 320px);
  padding: 6px 8px 6px 6px;
  border: 1px solid rgba(23, 50, 77, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 2px 10px rgba(44, 58, 74, 0.06);
  color: #334b63;
  font: 12px/1.25 "DM Sans", "LXGW WenKai", "Microsoft YaHei", Arial, sans-serif;
}

.yuedu-auth-userbar--floating {
  position: fixed;
  top: 14px;
  right: 18px;
  z-index: 1200;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 28px rgba(44, 58, 74, 0.12);
}

.yuedu-auth-userbar--inline {
  flex-shrink: 0;
}

header.article-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

header.article-head .article-head__title,
header.article-head h1:not(.article-head__title) {
  margin: 0;
  flex: 1 1 12rem;
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 0.72rem;
  row-gap: 0;
  align-items: center;
  font-size: inherit;
  font-weight: inherit;
  line-height: 1.28;
}

header.article-head .article-head__unit {
  grid-row: 1 / span 2;
  align-self: center;
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.68rem;
  border-radius: 999px;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #2f5f88;
  background: linear-gradient(135deg, #d4ebfc 0%, #e6daf8 100%);
  border: 1px solid rgba(88, 168, 222, 0.28);
  box-shadow: 0 1px 4px rgba(88, 168, 222, 0.12);
  white-space: nowrap;
}

header.article-head .article-head__body {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  min-width: 0;
}

header.article-head .article-head__body--sticker {
  position: relative;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: visible;
}

header.article-head .article-head__body--sticker::before,
header.article-head .article-head__body--sticker::after {
  display: none;
}

header.article-head .article-head__en {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.12em 0.34em;
  line-height: 1.18;
}

header.article-head .article-head__word {
  display: inline-block;
  font-family: "Nunito", "DM Sans", system-ui, sans-serif;
  font-size: clamp(1.32rem, 2.75vw, 1.82rem);
  font-weight: 900;
  letter-spacing: -0.015em;
  -webkit-text-stroke: 0;
  paint-order: normal;
  text-shadow: none;
}

header.article-head .article-head__word--c1 { color: #2478b8; }
header.article-head .article-head__word--c2 { color: #24855a; }
header.article-head .article-head__word--c3 { color: #6b4fa8; }
header.article-head .article-head__word--c4 { color: #9a7420; }
header.article-head .article-head__word--c5 { color: #b85a28; }
header.article-head .article-head__word--c6 { color: #b84268; }

header.article-head .article-head__zh {
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: clamp(1.12rem, 2.2vw, 1.32rem);
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: 0.06em;
  color: #5d4037;
}

header.article-head .article-head__aside,
header.article-head .article-head__aside.yuedu-page-toolbar,
.yuedu-page-toolbar {
  margin-left: auto !important;
  margin-top: 0.18rem;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 0.75rem !important;
  flex-shrink: 0 !important;
  flex-wrap: nowrap !important;
}

@media (min-width: 821px) {
  .layout.is-vocab-collapsed {
    grid-template-columns: 1fr;
  }

  .layout.is-vocab-collapsed > .vocab,
  .layout.is-vocab-collapsed > #vocab-panel {
    display: none !important;
  }
}

@media (max-width: 720px) {
  header.article-head {
    margin-bottom: 0.6rem;
    gap: 0.45rem 0.65rem;
  }

  header.article-head .article-head__title,
  header.article-head h1:not(.article-head__title) {
    column-gap: 0.55rem;
  }

  header.article-head .article-head__unit {
    font-size: 0.72rem;
    padding: 0.22rem 0.58rem;
  }

  header.article-head .article-head__word {
    font-size: clamp(1.18rem, 5.5vw, 1.48rem);
  }

  header.article-head .article-head__zh {
    font-size: clamp(1.05rem, 4.8vw, 1.22rem);
  }

  header.article-head .article-head__aside,
  header.article-head .article-head__aside.yuedu-page-toolbar {
    margin-top: 0;
  }
}

header.article-head .article-head__aside .yuedu-auth-userbar {
  margin-left: 0;
}

.yuedu-page-toolbar--standalone {
  width: 100%;
  margin-bottom: 0.75rem;
}

.article-head__aside.has-auth-userbar,
.yuedu-page-toolbar.has-auth-userbar {
  align-items: center !important;
}

.yuedu-auth-userbar__avatar {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(145deg, #d8ece9 0%, #b8ddd7 100%);
  color: #1c6f68;
}

.yuedu-auth-userbar__meta,
.yuedu-auth-userbar__main {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.yuedu-auth-userbar__main {
  flex: 1 1 auto;
  padding-right: 2px;
}

.yuedu-auth-userbar__label {
  color: #1c6f68;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.yuedu-auth-userbar__phone {
  color: #17324d;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.yuedu-auth-userbar__logout {
  flex: 0 0 auto;
  border: 1px solid rgba(23, 50, 77, 0.12);
  border-radius: 999px;
  padding: 4px 9px;
  background: transparent;
  color: #7a8b9a;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.yuedu-auth-userbar__logout:hover {
  background: #f6f8fa;
  border-color: rgba(23, 50, 77, 0.18);
  color: #5f7184;
}

@media (max-width: 640px) {
  .yuedu-auth-userbar--floating {
    top: 10px;
    right: 10px;
    gap: 6px;
    padding: 5px 7px 5px 5px;
    max-width: calc(100vw - 20px);
  }

  .yuedu-auth-userbar {
    gap: 6px;
    padding: 5px 7px 5px 5px;
    max-width: min(100%, calc(100vw - 20px));
  }

  .yuedu-auth-userbar__label {
    display: none;
  }

  .yuedu-auth-userbar__phone {
    font-size: 12px;
  }

  .yuedu-auth-userbar__avatar {
    width: 30px;
    height: 30px;
  }

  .yuedu-auth-userbar__email-badge,
  .yuedu-auth-userbar__email {
    padding: 3px 7px;
    font-size: 10px;
  }

  .yuedu-auth-userbar__logout {
    padding: 4px 7px;
    font-size: 10px;
  }
}

@media (max-width: 520px) {
  .yuedu-auth-root {
    padding: 14px;
  }

  .yuedu-auth-head,
  .yuedu-auth-form {
    padding-left: 18px;
    padding-right: 18px;
  }

  .yuedu-auth-tab {
    min-height: 44px;
    font-size: 14px;
  }

  .yuedu-filing {
    gap: 2px 8px;
    font-size: 11px;
  }
}

/* Article English typography */
#article-main .block--en,
#article-main .block--en p {
  font-family: "Times New Roman", Times, "Noto Serif", "Songti SC", serif;
  font-size: clamp(1.05rem, 1.75vw, 1.15rem);
  font-weight: 400;
  line-height: 1.88;
  letter-spacing: 0.012em;
  color: #1a1816;
  text-align: justify;
  hyphens: auto;
  -webkit-font-smoothing: antialiased;
}

#article-main .block--en .core-gloss__en {
  font-family: inherit;
  font-weight: 600;
}

#article-main .core-gloss__zh {
  font-family: "LXGW WenKai", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body:not(.zh-hidden) #article-main .block--en p {
  line-height: 2.05;
}
