.home-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  padding: 18px;
  background:
    radial-gradient(circle at 22% 8%, rgba(255, 128, 30, 0.22), transparent 24%),
    radial-gradient(circle at 78% 14%, rgba(147, 93, 255, 0.24), transparent 28%),
    linear-gradient(180deg, #070a20 0%, #050615 100%);
  color: #fffaf1;
  font-family: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

.home-overlay.show {
  display: block;
}

.home-overlay * {
  box-sizing: border-box;
}

.home-overlay [hidden] {
  display: none !important;
}

.poster-overlay.show {
  z-index: 140;
}

.home-page {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  display: grid;
  grid-template-rows: 190px minmax(0, 1fr) 190px;
  gap: 16px;
}

.home-card {
  border: 1px solid rgba(126, 126, 180, 0.24);
  border-radius: 26px;
  background: rgba(18, 21, 52, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 18px 42px rgba(0, 0, 0, 0.24);
  overflow: hidden;
}

.home-close {
  position: fixed;
  right: 24px;
  top: 24px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.72);
  font-size: 22px;
  font-weight: 900;
}

.home-hero {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 330px;
  align-items: center;
  gap: 26px;
  padding: 28px 34px;
}

.home-avatar {
  width: 104px;
  height: 104px;
  border: 2px solid rgba(255, 137, 32, 0.45);
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.34), transparent 26%),
    linear-gradient(135deg, #ff8428, #9a5cff);
  color: #fff;
  font-size: 56px;
  font-weight: 950;
}

.home-nickname {
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fffaf1;
  font-size: 44px;
  font-weight: 950;
  line-height: 1;
  text-align: left;
}

.home-nickname-input {
  width: min(420px, 100%);
  min-height: 52px;
  border: 1px solid rgba(255, 137, 32, 0.38);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 32px;
  font-weight: 900;
  padding: 0 16px;
}

.home-identity p {
  margin: 14px 0 0;
  color: rgba(255, 250, 241, 0.72);
  font-size: 17px;
  font-weight: 800;
}

.home-goal {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
}

.home-goal-ring,
.home-rate-ring {
  --home-ring-color: #62ff7f;
  --home-ring-progress: 0deg;
  width: 126px;
  height: 126px;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #10132e 0 56%, transparent 57%),
    conic-gradient(var(--home-ring-color) var(--home-ring-progress), rgba(255, 255, 255, 0.11) 0);
}

.home-goal-ring strong,
.home-rate-ring strong {
  color: var(--home-ring-color);
  font-size: 34px;
  font-weight: 950;
  line-height: 1;
}

.home-goal-ring span,
.home-rate-ring span {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  font-weight: 850;
}

.home-goal-copy span {
  display: block;
  color: rgba(255, 250, 241, 0.74);
  font-size: 16px;
  font-weight: 900;
}

.home-goal-score {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 8px;
  white-space: nowrap;
}

.home-goal-score strong {
  color: #62ff7f;
  font-size: 38px;
  font-weight: 950;
  line-height: 1;
}

.home-goal-score em {
  color: rgba(255, 250, 241, 0.68);
  font-size: 24px;
  font-style: normal;
  font-weight: 900;
}

.home-goal-copy b {
  display: inline-block;
  margin-top: 8px;
  font-size: 18px;
  font-weight: 950;
}

.home-goal.over .home-goal-copy b {
  color: #38d7ff;
}

.home-goal.super-over .home-goal-copy b {
  color: #b45cff;
}

.home-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  min-height: 0;
}

.home-learn-card {
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.home-learn-card:hover,
.home-learn-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(255, 138, 36, 0.46);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 22px 48px rgba(255, 106, 26, 0.14);
  outline: none;
}

.metric-card,
.home-list-card {
  padding: 24px;
}

.metric-card {
  position: relative;
  padding-bottom: 52px;
}

.home-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.home-section-title span {
  color: #fffaf1;
  font-size: 24px;
  font-weight: 950;
}

.home-section-title small {
  color: rgba(255, 250, 241, 0.55);
  font-size: 14px;
  font-weight: 900;
}

.home-line-chart {
  width: 100%;
  height: calc(100% - 74px);
  min-height: 132px;
  overflow: visible;
}

.home-card-hint {
  margin: 8px 0 0;
  color: #ff8a24;
  font-size: 15px;
  font-weight: 950;
}

.home-card-theme {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 18px;
  margin: 0;
  color: #ff8a24;
  font-size: 17px;
  font-weight: 950;
  letter-spacing: 0;
}

.home-bars {
  height: calc(100% - 46px);
  min-height: 150px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: end;
  gap: 14px;
  padding-top: 20px;
}

.home-bars span {
  display: grid;
  grid-template-rows: min-content 1fr;
  align-items: end;
  justify-items: center;
  gap: 8px;
  min-height: 100%;
  color: rgba(255, 250, 241, 0.78);
  font-size: 14px;
  font-weight: 950;
}

.home-bars i {
  grid-row: 2;
  width: 100%;
  min-height: 8px;
  border-radius: 999px 999px 8px 8px;
  background: linear-gradient(180deg, #ffd35a, #ff9f21);
}

.home-bars b {
  grid-row: 1;
}

.metric-card .home-rate-ring {
  width: 152px;
  height: 152px;
  margin: 20px auto 0;
  --home-ring-color: #ff8a24;
}

.home-bottom {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  min-height: 0;
}

.home-word-preview {
  min-height: 86px;
  display: grid;
  gap: 8px;
  align-content: center;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.045);
  padding: 18px;
  color: rgba(255, 250, 241, 0.72);
  font-weight: 850;
}

.home-word-preview strong {
  color: #fffaf1;
  font-size: 28px;
  line-height: 1;
}

.home-word-preview span {
  color: rgba(255, 250, 241, 0.7);
  font-size: 15px;
}

.home-word-preview button,
.vocab-page-item button {
  justify-self: start;
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff6a1a, #ff9b30);
  color: #fff;
  font-weight: 950;
  padding: 0 16px;
}

.home-word-preview button:disabled,
.vocab-page-item button:disabled {
  opacity: 0.45;
  filter: grayscale(0.4);
}

.vocab-page {
  position: relative;
  width: min(960px, calc(100vw - 36px));
  height: calc(100vh - 36px);
  margin: 0 auto;
  padding: 28px;
}

.page-export-button {
  position: absolute;
  right: 28px;
  bottom: 24px;
  min-width: 96px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff6a1a, #ff9b30);
  color: #fff;
  font-weight: 950;
  box-shadow: 0 16px 34px rgba(255, 106, 26, 0.24);
}

.vocab-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.vocab-page-head p {
  margin: 0 0 6px;
  color: #ff8a24;
  font-weight: 950;
  text-transform: uppercase;
}

.vocab-page-head h2 {
  margin: 0;
  color: #fffaf1;
  font-size: 40px;
}

.vocab-page-head > span {
  display: grid;
  place-items: center;
  min-width: 54px;
  height: 38px;
  border-radius: 999px;
  background: rgba(255, 138, 36, 0.16);
  color: #ff9b30;
  font-weight: 950;
}

.vocab-manual-form {
  flex: 1;
  max-width: 360px;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

.vocab-manual-form input {
  min-width: 0;
  width: 100%;
  height: 42px;
  border: 1px solid rgba(126, 126, 180, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: #fffaf1;
  font-size: 15px;
  font-weight: 850;
  padding: 0 16px;
}

.vocab-manual-form button {
  flex: 0 0 auto;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff6a1a, #ff9b30);
  color: #fff;
  font-weight: 950;
  padding: 0 18px;
}

.vocab-random-button {
  flex: 0 0 auto;
  height: 42px;
  border: 1px solid rgba(255, 138, 36, 0.36);
  border-radius: 999px;
  background: rgba(255, 138, 36, 0.14);
  color: #ffb14a;
  font-size: 15px;
  font-weight: 950;
  padding: 0 16px;
}

.vocab-random-button:hover,
.vocab-random-button:focus-visible {
  border-color: rgba(255, 138, 36, 0.7);
  background: rgba(255, 138, 36, 0.22);
  outline: none;
}

.vocab-manual-feedback {
  min-height: 24px;
  margin: -4px 0 16px;
  color: rgba(255, 250, 241, 0.62);
  font-size: 16px;
  font-weight: 850;
}

.vocab-manual-feedback.success {
  color: #62ff7f;
}

.vocab-manual-feedback.warn {
  color: #ffb14a;
}

.vocab-page-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  overflow: auto;
  max-height: calc(100% - 128px);
  padding: 0 4px 64px 0;
}

.vocab-page-list.empty {
  display: grid;
  place-items: center;
  color: rgba(255, 250, 241, 0.64);
  font-size: 22px;
  font-weight: 850;
}

.vocab-page-item {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 154px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.055);
  padding: 18px;
}

.vocab-library-item {
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.vocab-library-item:hover,
.vocab-library-item:focus-visible {
  transform: translateY(-2px);
  background: rgba(255, 138, 36, 0.1);
  outline: none;
}

.vocab-page-item strong {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fffaf1;
  font-size: 26px;
}

.vocab-page-item strong em {
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(98, 255, 127, 0.14);
  color: #62ff7f;
  font-size: 13px;
  font-style: normal;
  font-weight: 950;
  padding: 5px 9px;
}

.vocab-page-item span {
  color: rgba(255, 250, 241, 0.66);
  font-weight: 800;
}

.vocab-learn-page {
  width: min(880px, calc(100vw - 36px));
  min-height: min(620px, calc(100vh - 36px));
  margin: 0 auto;
  padding: 32px;
}

.vocab-learn-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.vocab-learn-head p {
  margin: 0 0 6px;
  color: #ff8a24;
  font-weight: 950;
  text-transform: uppercase;
}

.vocab-learn-head h2 {
  margin: 0;
  color: #fffaf1;
  font-size: 42px;
  line-height: 1;
}

.vocab-learn-head > span {
  display: grid;
  place-items: center;
  min-width: 82px;
  height: 42px;
  border-radius: 999px;
  background: rgba(98, 255, 127, 0.14);
  color: #62ff7f;
  font-weight: 950;
}

.vocab-learn-question {
  display: grid;
  gap: 16px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.055);
  padding: 28px;
}

.vocab-learn-question p {
  margin: 0;
  color: rgba(255, 250, 241, 0.66);
  font-weight: 850;
}

.vocab-learn-question strong {
  color: #fffaf1;
  font-size: 32px;
  line-height: 1.25;
}

.vocab-learn-question .sentence-line {
  display: block;
  margin: 0 0 14px;
  color: #fffaf1;
}

.vocab-learn-question .sentence-line:last-child {
  margin-bottom: 0;
}

.vocab-learn-question .sentence-line:nth-child(2) {
  color: #ff9b30;
}

.vocab-learn-question .sentence-line:nth-child(3) {
  color: #b45cff;
}

.inline-vocab-add {
  display: inline;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: 0;
  padding: 0 2px;
  cursor: pointer;
}

.inline-vocab-add:hover,
.inline-vocab-add:focus-visible {
  background: rgba(255, 138, 36, 0.18);
  color: #ffb14a;
  outline: 1px solid rgba(255, 138, 36, 0.42);
}

.vocab-learn-question label {
  color: #ff8a24;
  font-size: 22px;
  font-weight: 950;
}

.vocab-learn-form {
  display: flex;
  gap: 12px;
  margin-top: 22px;
}

.vocab-learn-form input {
  flex: 1;
  min-height: 54px;
  border: 1px solid rgba(126, 126, 180, 0.3);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.07);
  color: #fffaf1;
  font-size: 20px;
  font-weight: 850;
  padding: 0 18px;
}

.vocab-learn-form button {
  min-width: 112px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, #ff6a1a, #ff9b30);
  color: #fff;
  font-weight: 950;
}

.vocab-learn-feedback {
  margin: 18px 0 0;
  color: rgba(255, 250, 241, 0.72);
  font-size: 17px;
  font-weight: 850;
}

.vocab-learn-feedback.wrong {
  color: #ff6b6b;
}

.vocab-learn-feedback.correct {
  color: #62ff7f;
}

.review-date-item {
  cursor: pointer;
}

.review-date-item strong {
  color: #ff8a24;
}

.review-quiz-page {
  width: min(920px, calc(100vw - 36px));
  min-height: min(680px, calc(100vh - 36px));
  margin: 0 auto;
  padding: 32px;
}

.review-quiz-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.review-quiz-head p {
  margin: 0 0 6px;
  color: #ff8a24;
  font-weight: 950;
  text-transform: uppercase;
}

.review-quiz-head h2 {
  margin: 0;
  color: #fffaf1;
  font-size: 38px;
  line-height: 1;
}

.review-quiz-head > span {
  display: grid;
  place-items: center;
  min-width: 72px;
  height: 40px;
  border-radius: 999px;
  background: rgba(154, 92, 255, 0.18);
  color: #c8a9ff;
  font-weight: 950;
}

.review-quiz-clues {
  min-height: 112px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.055);
  border: 2px solid rgba(168, 85, 247, 0.6);
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.18);
  padding: 24px;
}

.review-quiz-clues span {
  color: #fffaf1;
  font-size: 40px;
  font-weight: 950;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.review-quiz-clues b {
  color: #ffffff;
  font-size: 32px;
}

.review-quiz-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.review-quiz-options button {
  min-height: 86px;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid rgba(126, 126, 180, 0.28);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.055);
  color: #fffaf1;
  padding: 0 20px;
  text-align: left;
}

.review-quiz-options button span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 138, 36, 0.18);
  color: #ff8a24;
  font-weight: 950;
}

.review-quiz-options button strong {
  font-size: 26px;
  font-weight: 950;
}

.review-quiz-options button.correct {
  border-color: rgba(98, 255, 127, 0.75);
  background: rgba(98, 255, 127, 0.12);
}

.review-quiz-options button.wrong {
  border-color: rgba(255, 92, 92, 0.75);
  background: rgba(255, 92, 92, 0.12);
}

.review-quiz-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 24px;
}

.review-quiz-footer p {
  margin: 0;
  color: rgba(255, 250, 241, 0.72);
  font-size: 17px;
  font-weight: 850;
}

.review-quiz-footer button {
  min-width: 118px;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff6a1a, #ff9b30);
  color: #fff;
  font-weight: 950;
}

.export-panel {
  width: min(560px, calc(100vw - 36px));
  margin: 0 auto;
  padding: 30px;
}

.export-head p {
  margin: 0 0 8px;
  color: #ff8a24;
  font-weight: 950;
  text-transform: uppercase;
}

.export-head h2 {
  margin: 0;
  color: #fffaf1;
  font-size: 34px;
  line-height: 1.1;
}

.export-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 26px;
  max-height: 320px;
  overflow: auto;
  padding-right: 4px;
}

.export-options button {
  min-height: 58px;
  border: 1px solid rgba(126, 126, 180, 0.28);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  color: #fffaf1;
  font-size: 17px;
  font-weight: 950;
}

.export-options button:hover,
.export-options button:focus-visible {
  border-color: rgba(255, 138, 36, 0.58);
  background: rgba(255, 138, 36, 0.14);
  outline: none;
}

.export-options .random-export-option {
  border-color: rgba(151, 96, 255, 0.38);
  background: rgba(151, 96, 255, 0.14);
  color: #d8c7ff;
}

.export-options .random-export-option:hover,
.export-options .random-export-option:focus-visible {
  border-color: rgba(255, 138, 36, 0.58);
  background: linear-gradient(135deg, rgba(255, 106, 26, 0.18), rgba(151, 96, 255, 0.2));
}

.export-format-options {
  grid-template-columns: 1fr;
}

.export-format-options button[data-export-format] {
  min-height: 66px;
  border-color: rgba(255, 138, 36, 0.42);
  background: linear-gradient(135deg, rgba(255, 106, 26, 0.92), rgba(255, 151, 48, 0.86));
  color: #fff;
  box-shadow: 0 14px 34px rgba(255, 106, 26, 0.18);
}

.export-format-options button[data-export-format="pdf"] {
  border-color: rgba(151, 96, 255, 0.42);
  background: linear-gradient(135deg, rgba(126, 82, 255, 0.9), rgba(255, 106, 26, 0.78));
  box-shadow: 0 14px 34px rgba(126, 82, 255, 0.18);
}

.export-format-options .export-back-button {
  min-height: 46px;
  border: 0;
  background: transparent;
  color: rgba(255, 250, 241, 0.68);
  box-shadow: none;
}

.export-options.empty::after {
  content: "暂无日期记录，可选择全部导出空白模板。";
  grid-column: 1 / -1;
  color: rgba(255, 250, 241, 0.62);
  font-weight: 850;
}

.export-hint {
  margin: 18px 0 0;
  color: rgba(255, 250, 241, 0.62);
  font-weight: 850;
}

@media (max-width: 900px) {
  .home-overlay {
    overflow: auto;
    padding: 12px;
  }

  .home-page,
  .home-metrics,
  .home-bottom {
    display: grid;
    grid-template-columns: 1fr;
    height: auto;
  }

  .home-page {
    grid-template-rows: auto;
  }

  .home-hero {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .home-goal {
    grid-column: 1 / -1;
  }
}

/* Home profile polish: tighter goal, cleaner metrics, compact vocab-rate layout. */
.home-hero .home-goal {
  transform: translateY(-18px);
}

.home-hero .home-goal-ring {
  width: 116px;
  height: 116px;
}

.home-hero .home-goal-ring strong {
  font-size: 32px;
}

.home-hero .home-goal-ring span {
  margin-top: 4px;
  font-size: 12px;
}

.home-hero .home-goal-copy {
  transform: translateY(-10px);
}

.home-hero .home-goal-score {
  margin-top: 4px;
}

.home-hero .home-goal-score strong {
  font-size: 40px;
}

.home-hero .home-goal-score em {
  font-size: 28px;
}

.home-data-grid .home-wide-card > p {
  display: none !important;
}

.home-data-grid .home-wide-card {
  grid-template-columns: minmax(0, 1fr) 150px;
  align-items: center;
  min-height: 150px;
}

.home-data-grid .home-wide-card .home-data-head {
  align-self: center;
}

.home-data-grid .home-wide-card .home-data-head strong {
  margin-top: 16px !important;
}

.home-data-grid .home-wide-card .home-arc {
  position: static !important;
  justify-self: end;
  align-self: center;
  width: 138px !important;
  height: 78px !important;
  border-radius: 138px 138px 16px 16px !important;
  display: grid !important;
  place-items: end center !important;
  padding-bottom: 8px !important;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(9, 14, 29, 0.98) 0 54%, transparent 55%),
    conic-gradient(from 270deg at 50% 100%, #ff9828 0deg, #ff9828 0deg, rgba(255, 255, 255, 0.16) 0deg 180deg, transparent 180deg 360deg) !important;
  box-shadow: inset 0 -9px 0 rgba(255, 255, 255, 0.035) !important;
  transform: none !important;
}

.home-data-grid .home-wide-card .home-arc-purple {
  background:
    radial-gradient(ellipse at 50% 100%, rgba(9, 14, 29, 0.98) 0 54%, transparent 55%),
    conic-gradient(from 270deg at 50% 100%, #8b68ff 0deg, #8b68ff 0deg, rgba(255, 255, 255, 0.16) 0deg 180deg, transparent 180deg 360deg) !important;
}

.home-data-grid .home-wide-card .home-arc::after {
  font-size: 28px !important;
  line-height: 1;
}

.home-rate-card {
  min-height: 150px;
}

.home-rate-row {
  grid-template-columns: minmax(0, 1fr) 118px !important;
  gap: 14px !important;
  align-items: center !important;
}

.home-rate-ring {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  width: 112px !important;
  height: 112px !important;
}

.home-rate-ring strong {
  font-size: 26px !important;
}

.home-rate-legend {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  display: grid !important;
  gap: 10px !important;
  font-size: 17px !important;
}

.home-rate-legend span {
  display: grid !important;
  grid-template-columns: 14px auto max-content;
  align-items: center;
  gap: 8px !important;
}

.home-rate-legend b {
  margin-left: 8px;
  font-size: 17px !important;
  white-space: nowrap;
}

/* Home trend final: no rings, four-point line charts, goal aligned with avatar. */
.home-page {
  grid-template-rows: 176px 34px minmax(0, 1fr) 34px 138px !important;
  gap: 10px !important;
}

.home-hero {
  height: 176px !important;
  min-height: 176px !important;
  display: grid !important;
  grid-template-columns: 120px minmax(360px, 1fr) minmax(500px, 620px) !important;
  align-items: center !important;
  padding: 24px 92px 24px 42px !important;
  gap: 26px !important;
  overflow: hidden !important;
}

.home-avatar,
.home-identity,
.home-hero .home-goal,
.home-hero .home-goal-copy {
  transform: none !important;
}

.home-hero .home-goal {
  grid-column: 3 !important;
  align-self: center !important;
  justify-self: end !important;
  width: min(620px, 100%) !important;
  min-height: 118px !important;
  display: grid !important;
  grid-template-columns: 132px 1px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 28px !important;
  margin: 0 !important;
}

.home-hero .home-goal::before {
  grid-column: 2 !important;
  height: 116px !important;
  align-self: center !important;
}

.home-hero .home-goal-ring {
  grid-column: 1 !important;
  width: 118px !important;
  height: 118px !important;
  align-self: center !important;
  justify-self: center !important;
}

.home-hero .home-goal-copy {
  grid-column: 3 !important;
  align-self: center !important;
  justify-self: start !important;
}

.home-hero .home-goal-score strong {
  font-size: 42px !important;
}

.home-hero .home-goal-score em {
  font-size: 30px !important;
}

.home-data-grid .home-wide-card,
.home-data-grid .home-rate-card {
  display: grid !important;
  grid-template-columns: minmax(0, 0.86fr) minmax(180px, 0.72fr) !important;
  align-items: center !important;
  gap: 14px !important;
}

.home-data-grid .home-wide-card .home-arc,
.home-rate-card .home-rate-ring {
  position: static !important;
  justify-self: stretch !important;
  align-self: center !important;
  width: 100% !important;
  height: 104px !important;
  min-height: 104px !important;
  display: block !important;
  padding: 0 !important;
  border-radius: 0 !important;
  background: none !important;
  box-shadow: none !important;
  border: 0 !important;
  overflow: visible !important;
  transform: none !important;
}

.home-data-grid .home-wide-card .home-arc::after,
.home-rate-card .home-rate-ring::after,
.home-rate-card .home-rate-ring strong {
  content: none !important;
  display: none !important;
}

.home-mini-trend {
  width: 100% !important;
  height: 104px !important;
  display: block !important;
  overflow: visible !important;
}

.home-rate-row {
  display: grid !important;
  grid-template-columns: minmax(0, 0.86fr) minmax(180px, 0.72fr) !important;
  align-items: center !important;
  gap: 14px !important;
}

.home-rate-legend {
  grid-column: 1 !important;
  justify-self: stretch !important;
}

.home-rate-card .home-rate-ring {
  grid-column: 2 !important;
}

/* Rebuild requested home header + metric cards from the bottom layer. */
.home-hero {
  position: relative !important;
  display: grid !important;
  grid-template-columns: 120px minmax(0, 1fr) !important;
  height: 176px !important;
  min-height: 176px !important;
  align-items: center !important;
  padding: 24px 42px !important;
  gap: 26px !important;
  overflow: visible !important;
}

.home-avatar,
.home-identity {
  align-self: center !important;
}

.home-hero .home-goal {
  position: absolute !important;
  right: 112px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 520px !important;
  min-height: 128px !important;
  display: grid !important;
  grid-template-columns: 128px 1px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 24px !important;
  margin: 0 !important;
  z-index: 3 !important;
}

.home-hero .home-goal::before {
  content: "" !important;
  grid-column: 2 !important;
  width: 1px !important;
  height: 128px !important;
  background: rgba(255, 255, 255, 0.14) !important;
}

.home-hero .home-goal-ring {
  grid-column: 1 !important;
  width: 120px !important;
  height: 120px !important;
  align-self: center !important;
  justify-self: center !important;
}

.home-hero .home-goal-copy {
  grid-column: 3 !important;
  align-self: center !important;
  transform: none !important;
}

.home-data-grid .home-wide-card,
.home-data-grid .home-rate-card {
  display: grid !important;
  grid-template-columns: minmax(150px, 0.58fr) minmax(220px, 1fr) !important;
  align-items: center !important;
  gap: 16px !important;
  overflow: hidden !important;
}

.home-data-grid .home-wide-card .home-data-head {
  display: block !important;
  align-self: center !important;
}

.home-data-grid .home-wide-card .home-data-head i {
  display: none !important;
}

.home-data-grid .home-wide-card .home-data-head span,
.home-rate-card .home-section-title span {
  display: block !important;
  font-size: 24px !important;
  line-height: 1.18 !important;
}

.home-data-grid .home-wide-card .home-data-head strong,
.home-rate-card .home-section-title small,
.home-rate-card .home-rate-legend,
.home-rate-card .home-rate-ring strong,
.home-data-grid .home-wide-card > p {
  display: none !important;
}

.home-data-grid .home-wide-card .home-arc,
.home-rate-card .home-rate-ring {
  grid-column: 2 !important;
  justify-self: stretch !important;
  align-self: center !important;
  width: 100% !important;
  height: 118px !important;
  min-height: 118px !important;
  display: block !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
}

.home-rate-card .home-section-title {
  grid-column: 1 !important;
  margin: 0 !important;
}

.home-rate-card .home-rate-row {
  grid-column: 2 !important;
  display: block !important;
}

.home-mini-trend {
  width: 100% !important;
  height: 118px !important;
  display: block !important;
  overflow: visible !important;
}

/* Final reset: rebuild home hero and metric cards with stable grid flow. */
.home-hero.home-card {
  position: relative !important;
  height: 176px !important;
  min-height: 176px !important;
  display: grid !important;
  grid-template-columns: 118px minmax(360px, 1fr) 540px !important;
  grid-template-rows: 1fr !important;
  align-items: center !important;
  padding: 22px 72px 22px 42px !important;
  gap: 28px !important;
  overflow: hidden !important;
}

.home-hero.home-card .home-avatar {
  grid-column: 1 !important;
  align-self: center !important;
  justify-self: center !important;
  width: 104px !important;
  height: 104px !important;
  transform: none !important;
}

.home-hero.home-card .home-identity {
  grid-column: 2 !important;
  align-self: center !important;
  justify-self: start !important;
  transform: none !important;
}

.home-hero.home-card .home-goal {
  position: static !important;
  grid-column: 3 !important;
  align-self: center !important;
  justify-self: stretch !important;
  width: 100% !important;
  min-height: 124px !important;
  height: 124px !important;
  display: grid !important;
  grid-template-columns: 124px 1px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 24px !important;
  margin: 0 !important;
  transform: none !important;
  z-index: 1 !important;
}

.home-hero.home-card .home-goal::before {
  content: "" !important;
  grid-column: 2 !important;
  grid-row: 1 !important;
  width: 1px !important;
  height: 118px !important;
  align-self: center !important;
  background: rgba(255, 255, 255, 0.14) !important;
}

.home-hero.home-card .home-goal-ring {
  grid-column: 1 !important;
  grid-row: 1 !important;
  width: 116px !important;
  height: 116px !important;
  align-self: center !important;
  justify-self: center !important;
  transform: none !important;
}

.home-hero.home-card .home-goal-copy {
  grid-column: 3 !important;
  grid-row: 1 !important;
  align-self: center !important;
  justify-self: start !important;
  transform: none !important;
}

.home-grade-button {
  position: static !important;
  display: block !important;
  align-items: center !important;
  margin: 12px 0 0 !important;
  min-width: unset !important;
  height: 34px !important;
  padding: 0 14px !important;
  border: 1px solid rgba(255, 180, 74, 0.38) !important;
  border-radius: 999px !important;
  background: rgba(255, 147, 38, 0.14) !important;
  color: #ffd34d !important;
  font-size: 13px !important;
  font-weight: 850 !important;
  line-height: 34px !important;
  cursor: pointer !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18) !important;
  pointer-events: auto !important;
}

.home-grade-button:hover,
.home-grade-button:focus-visible {
  background: rgba(255, 147, 38, 0.22) !important;
  border-color: rgba(255, 211, 77, 0.58) !important;
  outline: none !important;
}

.grade-overlay.show {
  z-index: 180 !important;
}

.home-data-grid .home-wide-card,
.home-data-grid .home-rate-card {
  position: relative !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  align-items: stretch !important;
  gap: 8px !important;
  padding: 22px 26px 18px !important;
}

.home-data-grid .home-wide-card .home-data-head,
.home-rate-card .home-section-title {
  grid-row: 1 !important;
  display: block !important;
  align-self: start !important;
  justify-self: start !important;
  margin: 0 !important;
}

.home-data-grid .home-wide-card .home-data-head i,
.home-data-grid .home-wide-card .home-data-head strong,
.home-rate-card .home-section-title small,
.home-rate-card .home-rate-legend,
.home-rate-card .home-rate-ring strong,
.home-data-grid .home-wide-card > p {
  display: none !important;
}

.home-data-grid .home-wide-card .home-data-head span,
.home-rate-card .home-section-title span {
  display: block !important;
  max-width: none !important;
  color: #fffaf1 !important;
  font-size: 22px !important;
  line-height: 1.12 !important;
  font-weight: 950 !important;
  white-space: nowrap !important;
}

.home-data-grid .home-wide-card .home-arc,
.home-rate-card .home-rate-row {
  grid-row: 2 !important;
  align-self: center !important;
  justify-self: stretch !important;
  width: 100% !important;
  height: 112px !important;
  min-height: 112px !important;
  display: block !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
}

.home-rate-card .home-rate-ring {
  width: 100% !important;
  height: 112px !important;
  min-height: 112px !important;
  display: block !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

.home-mini-trend {
  width: 100% !important;
  height: 112px !important;
}

.vocab-learn-head p,
.review-quiz-head p {
  display: none !important;
}

/* Final compact metrics and review search polish. */
.home-data-grid .home-wide-card,
.home-data-grid .home-rate-card {
  padding: 16px 22px 14px !important;
}

.home-data-grid .home-wide-card .home-data-head,
.home-rate-card .home-section-title {
  align-self: start !important;
  justify-self: start !important;
  padding: 0 !important;
}

.home-data-grid .home-wide-card .home-data-head span,
.home-rate-card .home-section-title span {
  font-size: 19px !important;
  line-height: 1.05 !important;
}

.home-data-grid .home-wide-card .home-arc,
.home-rate-card .home-rate-row,
.home-rate-card .home-rate-ring {
  height: 132px !important;
  min-height: 132px !important;
}

.home-mini-trend {
  height: 132px !important;
}

.home-small-card .home-data-head.compact {
  display: block !important;
}

.home-small-card .home-data-head.compact i {
  display: none !important;
}

.home-small-card .home-data-head.compact span {
  display: block !important;
  font-size: 18px !important;
  line-height: 1.1 !important;
}

.review-search-form {
  width: min(360px, 32vw) !important;
}

/* Final requested cleanup: remove remaining English labels/icons and give 5-day charts more room. */
.vocab-page-head p,
.home-score-card .home-section-title small {
  display: none !important;
}

.home-data-grid .home-wide-card,
.home-data-grid .home-rate-card {
  grid-template-rows: 18px minmax(0, 1fr) !important;
  gap: 6px !important;
  padding: 14px 20px 12px !important;
}

.home-data-grid .home-wide-card .home-data-head span,
.home-rate-card .home-section-title span {
  font-size: 16px !important;
  line-height: 1 !important;
  font-weight: 850 !important;
  letter-spacing: 0 !important;
}

.home-data-grid .home-wide-card .home-arc,
.home-rate-card .home-rate-row,
.home-rate-card .home-rate-ring,
.home-mini-trend {
  height: 150px !important;
  min-height: 150px !important;
}

.home-small-card .home-data-head.compact i {
  display: none !important;
}

.home-small-card .home-data-head.compact span {
  font-size: 16px !important;
  font-weight: 850 !important;
}

.home-small-card .home-data-head.compact strong {
  font-size: 30px !important;
  line-height: 1 !important;
}

.review-search-form {
  width: min(390px, 36vw) !important;
}

/* Sentence multiple-choice study flow. */
.vocab-learn-form {
  display: none !important;
}

.vocab-learn-actions {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 22px;
}

.vocab-learn-actions[hidden],
.vocab-learn-options[hidden] {
  display: none !important;
}

.vocab-learn-actions button {
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 50%;
  color: #0e1020;
  font-size: 28px;
  font-weight: 950;
  cursor: pointer;
}

.vocab-know-button {
  background: #62ff7f;
  box-shadow: 0 14px 34px rgba(98, 255, 127, 0.22);
}

.vocab-hint-button {
  background: #ff9b30;
  box-shadow: 0 14px 34px rgba(255, 155, 48, 0.22);
}

.vocab-learn-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.vocab-learn-option-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
}

.vocab-learn-answer-option,
.vocab-learn-option-add {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  color: #fffaf1;
  font-weight: 950;
  cursor: pointer;
}

.vocab-learn-answer-option {
  min-height: 58px;
  background: rgba(255, 255, 255, 0.075);
  font-size: 20px;
}

.vocab-learn-option-add {
  min-width: 76px;
  background: rgba(255, 138, 36, 0.14);
  color: #ffb14a;
}

/* ── Daily Test Button ── */
.home-score-card {
  position: relative !important;
}
.home-test-button {
  position: static !important;
  align-self: flex-start !important;
  padding: 6px 18px !important;
  border-radius: 20px !important;
  border: 1.5px solid rgba(255, 180, 74, 0.5) !important;
  background: rgba(255, 140, 30, 0.16) !important;
  color: #ffb060 !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  cursor: pointer !important;
}
.home-test-button.done {
  opacity: 0.45 !important;
  cursor: default !important;
}
.home-test-button:not(.done):hover {
  background: rgba(255, 140, 30, 0.28) !important;
}

/* ── Daily Test Overlay ── */
.daily-test-overlay {
  display: none;
  position: fixed !important;
  inset: 0 !important;
  z-index: 120 !important;
  background: rgba(8, 12, 28, 0.96) !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}
.daily-test-overlay.show {
  display: flex !important;
}
.daily-test-header {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  display: flex !important;
  align-items: center !important;
  padding: 18px 24px !important;
  gap: 16px !important;
  border-bottom: 1px solid rgba(255,255,255,0.07) !important;
}
.daily-test-progress {
  font-size: 15px !important;
  font-weight: 700 !important;
  color: rgba(255,255,255,0.5) !important;
}
.daily-test-score-label {
  font-size: 15px !important;
  color: rgba(255,255,255,0.5) !important;
  margin-right: auto !important;
}
.daily-test-score-label b {
  color: #ffb060 !important;
  font-weight: 900 !important;
}
.daily-test-body {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 48px !important;
  padding: 24px !important;
}
.daily-test-word {
  font-size: clamp(48px, 10vw, 88px) !important;
  font-weight: 950 !important;
  color: #fffaf1 !important;
  letter-spacing: -0.02em !important;
}
.daily-test-actions {
  display: flex !important;
  gap: 24px !important;
}
.daily-test-btn {
  min-width: 140px !important;
  padding: 14px 28px !important;
  border-radius: 32px !important;
  font-size: 18px !important;
  font-weight: 850 !important;
  cursor: pointer !important;
  border: none !important;
}
.daily-test-btn--known {
  background: linear-gradient(135deg, #56f2c2, #2eb87c) !important;
  color: #0a1022 !important;
}
.daily-test-btn--unknown {
  background: rgba(255,255,255,0.08) !important;
  border: 1.5px solid rgba(255,255,255,0.15) !important;
  color: #fffaf1 !important;
}

/* ── Goal section v2: today = hero, total = secondary ── */
/* Override all previous .home-goal-score strong/em rules */
.home-hero .home-goal-score strong,
.home-hero.home-card .home-goal-score strong,
.home-goal-score strong {
  font-size: 17px !important;
  font-weight: 800 !important;
  color: rgba(255,250,241,0.65) !important;
}
.home-hero .home-goal-score em,
.home-hero.home-card .home-goal-score em,
.home-goal-score em {
  font-size: 13px !important;
  font-style: normal !important;
  color: rgba(255,250,241,0.38) !important;
  font-weight: 600 !important;
}
/* Today's hero number */
.home-goal-daily-hero strong {
  font-size: 30px !important;
  font-weight: 950 !important;
  color: rgba(255,250,241,0.97) !important;
  letter-spacing: -0.5px !important;
}
/* Remove translateY shift that pushes copy off-center */
.home-hero .home-goal-copy,
.home-hero.home-card .home-goal-copy {
  transform: none !important;
}

/* ══════════════════════════════════════════════
   Stat cards: accent color system
   ══════════════════════════════════════════════ */
#homeStatCardDays,
#homeStatCardWords,
#homeStatCardVocab {
  position: relative !important;
  overflow: hidden !important;
}

/* Top accent stripe */
#homeStatCardDays::before,
#homeStatCardWords::before,
#homeStatCardVocab::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
}
#homeStatCardDays::before   { background: #38d7ff; }
#homeStatCardWords::before  { background: #ffd34d; }
#homeStatCardVocab::before  { background: #ff6b9e; }

/* Subtle bg tint */
#homeStatCardDays   { background: linear-gradient(160deg, rgba(56,215,255,0.06) 0%, transparent 55%) !important; }
#homeStatCardWords  { background: linear-gradient(160deg, rgba(255,211,77, 0.06) 0%, transparent 55%) !important; }
#homeStatCardVocab  { background: linear-gradient(160deg, rgba(255,107,158,0.06) 0%, transparent 55%) !important; }

/* Icon badge — show it, give it a tinted pill */
#homeStatCardDays .home-data-head.compact,
#homeStatCardWords .home-data-head.compact,
#homeStatCardVocab .home-data-head.compact {
  display: flex !important;
  align-items: center !important;
  gap: 9px !important;
}
#homeStatCardDays .home-data-head.compact i,
#homeStatCardWords .home-data-head.compact i,
#homeStatCardVocab .home-data-head.compact i {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  border-radius: 10px !important;
  font-size: 17px !important;
  font-style: normal !important;
  flex-shrink: 0 !important;
}
/* Tighten title font inside stat cards */
#homeStatCardDays .home-data-head.compact span,
#homeStatCardWords .home-data-head.compact span,
#homeStatCardVocab .home-data-head.compact span {
  font-size: 13px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
#homeStatCardDays   .home-data-head.compact i { background: rgba(56,215,255,0.13) !important; }
#homeStatCardWords  .home-data-head.compact i { background: rgba(255,211,77, 0.13) !important; }
#homeStatCardVocab  .home-data-head.compact i { background: rgba(255,107,158,0.13) !important; }

/* Accent-colored big number */
#homeStatCardDays   .home-data-head.compact strong { color: #38d7ff !important; }
#homeStatCardWords  .home-data-head.compact strong { color: #ffd34d !important; }
#homeStatCardVocab  .home-data-head.compact strong { color: #ff6b9e !important; }

/* Subtitle accent tint */
#homeStatCardDays   > p { color: rgba(56,215,255,0.65) !important; }
#homeStatCardWords  > p { color: rgba(255,211,77, 0.65) !important; }
#homeStatCardVocab  > p { color: rgba(255,107,158,0.65) !important; }

/* ── Stat cards v2: no icon, clean typography ── */
#homeStatCardDays .home-data-head.compact,
#homeStatCardWords .home-data-head.compact,
#homeStatCardVocab .home-data-head.compact {
  display: block !important;
}
/* Hide icon */
#homeStatCardDays .home-data-head.compact i,
#homeStatCardWords .home-data-head.compact i,
#homeStatCardVocab .home-data-head.compact i {
  display: none !important;
}
/* Label: white, clear, normal case */
#homeStatCardDays .home-data-head.compact span,
#homeStatCardWords .home-data-head.compact span,
#homeStatCardVocab .home-data-head.compact span {
  display: block !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  color: #fffaf1 !important;
  white-space: nowrap !important;
  overflow: visible !important;
  margin-bottom: 4px !important;
}
/* Number: large, accent color, tight tracking */
#homeStatCardDays .home-data-head.compact strong,
#homeStatCardWords .home-data-head.compact strong,
#homeStatCardVocab .home-data-head.compact strong {
  display: block !important;
  font-size: 44px !important;
  line-height: 1 !important;
  letter-spacing: -2px !important;
}
/* Unit (天/个): much smaller than the number */
#homeStatCardDays .home-data-head.compact strong em,
#homeStatCardWords .home-data-head.compact strong em,
#homeStatCardVocab .home-data-head.compact strong em {
  font-size: 0.42em !important;
  font-weight: 700 !important;
  font-style: normal !important;
  letter-spacing: 0 !important;
  margin-left: 2px !important;
  vertical-align: middle !important;
}
/* Subtitle: clearly readable */
#homeStatCardDays > p,
#homeStatCardWords > p,
#homeStatCardVocab > p {
  font-size: 14px !important;
  margin-top: 10px !important;
  font-weight: 700 !important;
}

/* ── Wide-card charts: title on top row, chart spans full width below ── */
.home-data-grid .home-wide-card {
  display: grid !important;
  grid-template-columns: 1fr !important;
  grid-template-rows: 20px minmax(0, 1fr) !important;
  gap: 4px !important;
  align-items: stretch !important;
  overflow: hidden !important;
  min-height: 0 !important;
  height: 100% !important;
}
.home-data-grid .home-rate-card {
  display: grid !important;
  grid-template-columns: 1fr !important;
  grid-template-rows: 20px minmax(0, 1fr) !important;
  gap: 4px !important;
  align-items: stretch !important;
  overflow: hidden !important;
  min-height: 0 !important;
  height: 100% !important;
}
/* Force arc into row 2 col 1 (override any implicit placement) */
.home-data-grid .home-wide-card .home-arc,
.home-data-grid .home-rate-card .home-rate-ring {
  grid-column: 1 !important;
  grid-row: 2 !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  height: 100% !important;
  display: flex !important;
  align-items: stretch !important;
}
/* Force title into row 1 col 1 */
.home-data-grid .home-wide-card .home-data-head,
.home-data-grid .home-rate-card .home-section-title,
.home-data-grid .home-rate-card .home-data-head {
  grid-column: 1 !important;
  grid-row: 1 !important;
}
/* SVG fills its container fully */
.home-mini-trend {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  display: block !important;
  flex: 1 !important;
}

/* ── Rate-card stacked fix: rate-row is the direct grid child, must be col 1 row 2 ── */
.home-data-grid .home-rate-card .home-rate-row {
  grid-column: 1 !important;
  grid-row: 2 !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 100% !important;
  min-height: 0 !important;
  display: block !important;
  padding: 0 !important;
  margin: 0 !important;
}
/* Ring inside rate-row fills its container */
.home-data-grid .home-rate-card .home-rate-row .home-rate-ring {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  display: block !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

/* ── Test button: untested = red, tested = green ── */
.home-test-button:not(.done) {
  border-color: rgba(255, 80, 80, 0.5) !important;
  background: rgba(255, 70, 70, 0.12) !important;
  color: #ff7070 !important;
}
.home-test-button:not(.done):hover {
  background: rgba(255, 70, 70, 0.22) !important;
}
.home-test-button.done {
  border-color: rgba(56, 239, 142, 0.4) !important;
  background: rgba(56, 239, 142, 0.1) !important;
  color: #56ef8e !important;
  opacity: 1 !important;
  cursor: default !important;
}

/* ── 学习模式 compact: give height back to chart rows ── */
.home-mode-card {
  padding: 14px 16px !important;
  gap: 8px 14px !important;
}
.home-mode-card .home-mode-icon {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  font-size: 20px !important;
}
.home-mode-card h3 {
  font-size: 18px !important;
  margin: 0 0 4px !important;
}
.home-mode-card p {
  font-size: 12px !important;
  line-height: 1.3 !important;
}
.home-mode-card > button {
  height: 34px !important;
  font-size: 13px !important;
  min-width: 110px !important;
}

/* ══════════════════════════════════════════════
   v20: Hero alignment + SVG goal ring + edit affordance
   ══════════════════════════════════════════════ */

/* ① Fix hero inner vertical centering:
      without explicit rows the implicit row auto-sizes to tallest child (copy ≈ 149px),
      pushing align-items:center down ~12px below hero center.
      minmax(0,1fr) sets min=0 so the fr resolves to the container's 124px,
      not the content height.  Ring + copy then center at y=62 → y=88 from hero top. */
.home-hero.home-card .home-goal {
  grid-template-rows: minmax(0, 1fr) !important;
}

/* ② Goal ring: SVG now handles the ring + text — clear the CSS background */
#homeGoalRing {
  background: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  overflow: visible !important;
}
#homeGoalRing strong,
#homeGoalRing span {
  display: none !important;
}

/* ③ Avatar: show camera-icon overlay on hover */
#homeAvatarButton {
  position: relative !important;
  cursor: pointer !important;
  transition: transform 0.18s ease, box-shadow 0.18s ease !important;
}
#homeAvatarButton::after {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  border-radius: 50% !important;
  background:
    rgba(0, 0, 0, 0.44)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 3 7.17 5H4C2.9 5 2 5.9 2 7v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2h-3.17L15 3H9zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8a3 3 0 1 0 0 6 3 3 0 0 0 0-6z'/%3E%3C/svg%3E")
    no-repeat center / 28px !important;
  opacity: 0 !important;
  transition: opacity 0.2s ease !important;
  pointer-events: none !important;
}
#homeAvatarButton:hover {
  transform: scale(1.05) !important;
  box-shadow: 0 0 0 3px rgba(255, 147, 38, 0.55), 0 6px 20px rgba(0, 0, 0, 0.3) !important;
}
#homeAvatarButton:hover::after {
  opacity: 1 !important;
}

/* ④ Nickname: underline + subtle fade on hover to signal editability */
#homeNicknameButton {
  cursor: pointer !important;
  transition: opacity 0.16s !important;
}
#homeNicknameButton:hover {
  opacity: 0.8 !important;
  text-decoration: underline !important;
  text-decoration-color: rgba(255, 250, 241, 0.32) !important;
  text-underline-offset: 6px !important;
  text-decoration-thickness: 2px !important;
}

/* ══════════════════════════════════════════════
   v22: Avatar — clean clip + polished glow ring
   ══════════════════════════════════════════════ */

/* Remove hard CSS border; use layered box-shadow ring outside the clip boundary */
.home-avatar,
#homeAvatarButton {
  border: none !important;
  /* Zero out browser-default button padding so the img fills the full circle */
  padding: 0 !important;
  /* overflow:hidden turns border-radius into a perfect circular scissors-cut.
     The <img.avatar-photo> inside is then clipped to the exact circle edge
     with no aliasing artifacts from a stacked border. */
  overflow: hidden !important;
  /* Layered ring:
     layer 1 – crisp inner ring (2.5 px solid, warm orange)
     layer 2 – soft outer halo  (5 px, 12% opacity)
     layer 3 – depth shadow */
  box-shadow:
    0 0 0 2.5px rgba(255, 147, 38, 0.62),
    0 0 0 5.5px rgba(255, 147, 38, 0.13),
    0 8px 28px rgba(0, 0, 0, 0.36) !important;
}

/* Uploaded photo: fills the shape via object-fit — parent clips via overflow:hidden */
#homeAvatarButton .avatar-photo,
.home-avatar .avatar-photo,
.avatar .avatar-photo {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
  display: block !important;
  pointer-events: none !important;
  border-radius: 0 !important;
}

/* iOS Safari: overflow:hidden on <button> needs a stacking context to clip properly */
#homeAvatarButton {
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

/* Hover: expand ring + lift */
#homeAvatarButton:hover {
  transform: scale(1.05) !important;
  box-shadow:
    0 0 0 3px rgba(255, 147, 38, 0.82),
    0 0 0 7px rgba(255, 147, 38, 0.2),
    0 12px 36px rgba(0, 0, 0, 0.44) !important;
}

/* === Vocab bank card: position context for badge (overflow stays hidden for color bar) === */
.home-vocab-bank-card,
#homeStatCardVocab {
  position: relative !important;
  z-index: 2 !important;
}

/* === Vocab bank alert badge — inside top-right corner === */
.vocab-bank-alert {
  position: absolute;
  top: 7px;
  right: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ff3333;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 0 0 2.5px rgba(18, 21, 52, 0.9), 0 4px 12px rgba(255, 51, 51, 0.5);
  animation: vocab-alert-pulse 1.4s ease-in-out infinite;
  z-index: 2;
}
@keyframes vocab-alert-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.18); opacity: 0.82; }
}
/* Tint the whole card red when alert is showing */
.home-vocab-bank-card:has(#vocabBankAlert:not([hidden])) {
  border-color: rgba(255, 51, 51, 0.35) !important;
  box-shadow: 0 0 0 1px rgba(255, 51, 51, 0.18), 0 8px 24px rgba(255, 51, 51, 0.12) !important;
}
