.learning-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 20px 0 24px;
}
.learning-stats > div {
  background: #edf3df;
  border: 1px solid #d0dfb6;
  border-radius: 12px;
  padding: 18px;
  display: grid;
  gap: 5px;
}
.learning-stats b {
  font-size: 26px;
  color: #31523d;
}
.learning-stats span {
  font-size: 12px;
  color: #728460;
}
.study-plan {
  max-width: 850px;
  margin: auto;
}
.study-plan > label {
  display: grid;
  gap: 9px;
  font-size: 13px;
  margin: 20px 0;
}
select,
textarea {
  font: inherit;
  color: inherit;
  background: #fafcf4;
  border: 1px solid #c4d3b4;
  border-radius: 8px;
  padding: 12px;
}
select {
  min-height: 44px;
}
textarea {
  width: 100%;
  resize: vertical;
}
fieldset {
  border: 0;
  padding: 0;
}
.method-choices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.method-choices legend {
  font-size: 13px;
  margin-bottom: 12px;
}
.method-choice {
  background: #f5f8ed;
  border: 1px solid #d4dfc3;
  border-radius: 10px;
  padding: 16px;
  display: grid;
  gap: 10px;
  cursor: pointer;
}
.method-choice:has(input:checked) {
  border-color: #628f54;
  background: #e5eecd;
}
.method-choice input {
  width: 18px;
  height: 18px;
  accent-color: #466d42;
}
.method-choice b {
  font-size: 14px;
}
.method-choice small {
  font-size: 11px;
  line-height: 1.8;
  color: #7d8e6c;
}
.study-plan > .tiny {
  margin-top: 16px;
  line-height: 1.8;
}
#study-free {
  display: block;
  margin: 16px 0 0;
  font-size: 11px;
}
#study-range-status {
  margin-bottom: 15px;
}
.study-tips {
  max-width: 850px;
  margin: 24px auto;
}
.study-tips h2 {
  font-size: 17px;
  margin-bottom: 12px;
}
.study-tips p {
  font-size: 13px;
  line-height: 1.9;
  color: #738662;
  margin: 12px 0;
}
.study-tips a {
  font-size: 13px;
  color: #446e42;
}
.study-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  margin: 12px auto;
  max-width: 750px;
}
.study-progress {
  height: 5px;
  background: #e3eacd;
  max-width: 750px;
  margin: 16px auto 26px;
  border-radius: 5px;
  overflow: hidden;
}
.study-progress i {
  display: block;
  height: 100%;
  background: #7c9c55;
  transition: width 0.2s;
}
.study-card {
  max-width: 750px;
  text-align: center;
  margin: 0 auto;
  padding: 38px;
  min-height: 390px;
}
.study-prompt {
  font-size: 34px;
  line-height: 1.4;
  margin: 24px 0 14px;
  overflow-wrap: anywhere;
}
.study-context {
  color: #7c8e6d;
  font-size: 15px;
  line-height: 1.9;
  margin-bottom: 28px;
}
#study-answer {
  display: grid;
  gap: 14px;
  max-width: 450px;
  margin: 20px auto;
}
#spelling {
  width: 100%;
  font:
    22px Georgia,
    serif;
  padding: 16px;
  border: 2px solid #bccfa2;
  border-radius: 10px;
  color: #244332;
  background: #fcfdf7;
  text-align: center;
}
.study-tools,
.study-actions {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.study-reveal,
.study-feedback {
  background: #f0f5e4;
  border: 1px solid #d0dfb7;
  border-radius: 12px;
  padding: 20px;
  margin: 22px 0;
  line-height: 1.9;
}
.study-feedback.incorrect {
  background: #fff5e6;
  border-color: #dfcaa4;
}
.study-feedback h2 {
  font-size: 28px;
  overflow-wrap: anywhere;
}
.study-feedback p,
.study-reveal p {
  font-size: 14px;
  margin: 8px 0;
  color: #627554;
}
.study-feedback small {
  font-size: 11px;
  color: #879273;
}
.study-favorite {
  display: block;
  margin: 25px auto 0;
}
.study-footnote {
  max-width: 750px;
  margin: 20px auto;
  text-align: center;
  font-size: 11px;
  line-height: 1.8;
  color: #8a9879;
}
.today-task {
  background: #f0f5e3;
  border: 1px solid #cbdcb2;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.today-task h2 {
  font-size: 17px;
  margin-bottom: 8px;
}
.today-task p {
  font-size: 12px;
  color: #7a8c66;
  line-height: 1.8;
}
.exam-note {
  font-size: 12px;
  color: #7d8f67;
  margin: 0 0 16px;
  line-height: 1.8;
}
.exam-note .text-btn {
  font-size: 12px;
}
.week-activity {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-top: 18px;
}
.week-activity > span {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 8px 0;
  font-size: 10px;
  background: #f4f6ed;
  border-radius: 7px;
  color: #a0ac8c;
}
.week-activity > span.active {
  background: #dfeac0;
  color: #59733e;
}
.week-activity small {
  font-size: 9px;
}
.migration-note {
  margin-top: 14px;
  line-height: 1.8;
  font-size: 10px;
  color: #879775;
}
.course-shelf {
  max-width: 850px;
  margin: 28px auto;
}
.startup-card {
  max-width: 600px;
  margin: 15vh auto;
  padding: 35px;
  background: #fff;
  border: 1px solid #dce5cd;
  border-radius: 14px;
  line-height: 1.9;
}
.startup-card [hidden] {
  display: none !important;
}
.startup-card > span {
  font-size: 15px;
  color: #668b4f;
}
.startup-card h1 {
  font-size: 25px;
  margin: 15px 0;
}
.startup-card p {
  font-size: 13px;
  color: #889975;
  margin-bottom: 20px;
}
.course-shelf-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px;
  background: #eaf1dc;
  border: 1px solid #c6d7ae;
  border-radius: 12px;
}
.course-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  background: #dde8bd;
  border: 1px solid #bacc8d;
  border-radius: 50%;
  font-size: 28px;
  color: #6b854c;
}
.course-shelf-card h3 {
  font-size: 18px;
  margin-bottom: 9px;
}
.course-shelf-card p {
  font-size: 12px;
  line-height: 1.8;
  color: #7e9169;
}
.course-shelf-card small {
  display: block;
  font-size: 10px;
  margin-top: 8px;
  color: #8c9d74;
}
.course-shelf-card .btn {
  white-space: nowrap;
  margin-left: auto;
}
.course-card {
  max-width: 850px;
  margin: 25px auto;
  padding: 36px;
}
.course-card h1 {
  font-size: 28px;
  line-height: 1.5;
  margin: 20px 0;
}
.course-card > .btn {
  margin-top: 24px;
}
.course-reading {
  font:
    19px/2.1 Georgia,
    serif;
  background: #fbfcf4;
  border-left: 4px solid #c2d687;
  padding: 22px;
  margin-top: 25px;
}
.course-reading mark {
  background: #e5edc3;
  color: #4b6635;
  border-radius: 3px;
  padding: 2px 3px;
}
.course-translation {
  font-size: 14px;
  line-height: 2;
  background: #f0f5e4;
  padding: 20px;
  border-radius: 8px;
  margin: 18px 0;
}
.course-target-list {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.course-target-list span {
  padding: 6px 10px;
  font-size: 11px;
  background: #edf3df;
  border-radius: 5px;
  color: #6b8550;
}
.target-phrase {
  font:
    26px/1.6 Georgia,
    serif;
  color: #4e7140;
  overflow-wrap: anywhere;
  margin: 16px 0;
}
.phrase-note {
  padding: 16px;
  background: #edf2df;
  border: 1px solid #d6e0c0;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.9;
  color: #758b5c;
}
.course-context {
  font:
    18px/1.9 Georgia,
    serif;
  color: #6e825b;
  margin: 20px 0;
}
.phrase-selected {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 78px;
  border: 2px dashed #c1d19f;
  background: #f8fbef;
  padding: 14px;
  border-radius: 9px;
  margin: 25px 0 20px;
}
.phrase-selected > span {
  font-size: 12px;
  color: #a1b186;
}
.phrase-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.phrase-chip {
  background: #eef3e2;
  border: 1px solid #c5d4ac;
  border-radius: 8px;
  padding: 12px 15px;
  font-size: 15px;
  box-shadow: 0 3px #dae3c9;
}
.phrase-chip small {
  display: inline-block;
  font-size: 9px;
  margin-right: 7px;
  color: #9cac83;
}
.phrase-chip.selected {
  background: #ddebc1;
  color: #4b6b35;
  box-shadow: none;
}
.course-note-label {
  display: block;
  margin: 20px 0 10px;
  font-size: 12px;
  color: #7f9268;
}
.phrase-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.phrase-summary article {
  background: #f3f7e9;
  border: 1px solid #d9e3c7;
  border-radius: 8px;
  padding: 18px;
}
.phrase-summary h3 {
  font:
    19px/1.6 Georgia,
    serif;
  color: #46683a;
}
.phrase-summary p {
  font-size: 13px;
  margin: 8px 0;
}
.phrase-summary small {
  font-size: 11px;
  line-height: 1.8;
  color: #8a9c74;
}
@media (max-width: 640px) {
  .course-shelf-card {
    flex-wrap: wrap;
    gap: 12px;
    padding: 18px;
  }
  .course-shelf-card > div {
    flex: 1;
    min-width: 150px;
  }
  .course-shelf-card .btn {
    width: 100%;
    justify-content: center;
  }
  .course-card {
    padding: 24px 18px;
  }
  .course-card h1 {
    font-size: 24px;
  }
  .course-reading {
    font-size: 17px;
    padding: 16px;
    line-height: 2;
  }
  .target-phrase {
    font-size: 22px;
  }
  .course-context {
    font-size: 16px;
  }
  .phrase-chip {
    font-size: 14px;
    padding: 10px 12px;
  }
  .phrase-summary {
    grid-template-columns: 1fr;
  }
}
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid #8fa955;
  outline-offset: 3px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.word-library {
  max-width: 1000px;
}
.library-context {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
.game-guide {
  grid-column: 1/-1;
  background: #f1f5e6;
  border: 1px solid #d5dfc4;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 12px;
}
.game-guide summary {
  cursor: pointer;
  color: #668351;
}
.game-guide p {
  line-height: 1.9;
  margin-top: 12px;
  color: #7f906c;
}
.library-context label {
  display: grid;
  gap: 8px;
  font-size: 11px;
}
.new-word-card > .tiny {
  margin: 15px 0;
  line-height: 1.8;
}
.library-tools {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
}
#word-search {
  min-width: 0;
  flex: 1;
  padding: 12px;
  border: 1px solid #c4d3b4;
  border-radius: 8px;
  font: inherit;
  background: #fafcf4;
  color: inherit;
}
.library-tools select {
  max-width: 190px;
}
.library-row {
  align-items: center;
  gap: 15px;
}
.word-detail-button {
  text-align: left;
  flex: 1;
  min-width: 0;
  background: none;
  padding: 8px 0;
  color: inherit;
}
.word-detail-button b {
  font-size: 18px;
}
.word-detail-button small {
  margin-left: 10px;
}
.word-detail-button p {
  overflow-wrap: anywhere;
}
.word-row-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.library-star {
  background: none;
  color: #8ca051;
  font-size: 23px;
  padding: 10px;
}
.word-dialog {
  margin: auto;
  width: min(620px, 94vw);
  max-height: 88dvh;
  overflow-y: auto;
  background: #fafcf3;
  color: #254533;
  padding: 30px;
  border: 2px solid #8aab68;
  border-radius: 14px;
  box-shadow: 0 20px 60px #18392c44;
}
.word-dialog::backdrop {
  background: #17372d88;
  backdrop-filter: blur(2px);
}
.dialog-close {
  float: right;
  font-size: 25px;
  padding: 0 10px;
  background: none;
  color: #7b9066;
}
.word-dialog h2 {
  font-size: 32px;
  margin: 20px 0 5px;
  overflow-wrap: anywhere;
}
.word-dialog h3 {
  font-size: 19px;
  margin: 18px 0;
}
.word-pronunciation {
  color: #81916e;
  font-size: 14px;
}
.word-example {
  background: #edf3de;
  padding: 18px;
  border-radius: 10px;
  line-height: 1.9;
  margin: 18px 0;
  font-size: 14px;
}
.word-example p {
  margin: 5px 0;
}
.detail-record {
  display: grid;
  gap: 7px;
  color: #879775;
  font-size: 12px;
  margin: 20px 0;
}
.word-dialog > label {
  display: block;
  font-size: 13px;
  margin: 16px 0 10px;
}
.settings-panel {
  max-width: 900px;
  margin: 0 auto 24px;
}
.settings-panel h2 {
  font-size: 18px;
  margin: 8px 0 18px;
}
.preference-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 20px 0 26px;
}
.preference-grid label {
  display: grid;
  align-content: start;
  gap: 10px;
  font-size: 12px;
}
.preference-grid input {
  width: 100%;
  min-width: 0;
  padding: 12px;
  border: 1px solid #c4d3b4;
  border-radius: 8px;
  background: #fafcf4;
  font: inherit;
  color: inherit;
}
.preference-grid small {
  font-size: 10px;
  line-height: 1.8;
  color: #869873;
}
.check-setting {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  margin: 20px 0;
}
.check-setting input {
  width: 18px;
  height: 18px;
  accent-color: #557a49;
}
.settings-description {
  font-size: 13px;
  line-height: 1.9;
  color: #788d65;
}
.quest-board {
  margin: 20px 0 28px;
}
.quest-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.quest-card {
  padding: 17px;
  background: #fffdf3;
  border: 1px solid #dfdfbc;
  border-radius: 11px;
}
.quest-card h3 {
  font-size: 14px;
  margin-bottom: 8px;
}
.quest-card p {
  font-size: 11px;
  color: #879270;
  line-height: 1.8;
  min-height: 36px;
}
.quest-progress {
  height: 4px;
  background: #ecefdc;
  border-radius: 4px;
  margin: 14px 0 10px;
  overflow: hidden;
}
.quest-progress i {
  height: 100%;
  display: block;
  background: #a6bd70;
}
.quest-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 5px;
}
.quest-footer span {
  font-size: 9px;
  color: #94a17a;
}
.quest-footer button {
  font-size: 11px;
  white-space: nowrap;
}
.quest-card.claimed {
  background: #f1f6e6;
  border-color: #ccdcb1;
}
.badge-board {
  margin: 30px 0;
}
.badge-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 12px 0;
}
.badge-card {
  padding: 20px 14px;
  text-align: center;
  border: 1px solid #dde5cf;
  border-radius: 12px;
  background: #f3f6ec;
  color: #a4b197;
}
.badge-icon {
  display: grid;
  place-items: center;
  font-size: 30px;
  width: 58px;
  height: 58px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: #e4eada;
  border: 2px solid #d8e0ca;
}
.badge-card h3 {
  font-size: 14px;
  margin-bottom: 9px;
}
.badge-card p {
  font-size: 11px;
  line-height: 1.8;
  min-height: 37px;
}
.badge-card small {
  display: block;
  margin-top: 10px;
  font-size: 10px;
}
.badge-card.earned {
  background: #fff9e3;
  color: #6c8053;
  border-color: #d0d69b;
}
.badge-card.earned .badge-icon {
  background: #efedbf;
  color: #9b9043;
  border-color: #d0c87e;
}
@media (max-width: 640px) {
  .quest-cards {
    grid-template-columns: 1fr;
    gap: 9px;
  }
  .quest-card p {
    min-height: 0;
  }
  .badge-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}
.settings-panel .tiny {
  line-height: 1.8;
}
.file-button {
  cursor: pointer;
}
.settings-panel .study-actions {
  justify-content: flex-start;
}
@media (max-width: 640px) {
  .library-tools {
    flex-direction: column;
  }
  .library-tools select {
    max-width: none;
  }
  .library-row {
    gap: 8px;
  }
  .word-row-actions {
    flex-direction: column;
    gap: 0;
  }
  .word-detail-button small {
    display: block;
    margin: 5px 0;
  }
  .word-detail-button p {
    font-size: 10px;
  }
  .word-dialog {
    padding: 24px 18px;
  }
  .word-dialog h2 {
    font-size: 27px;
  }
  .preference-grid {
    grid-template-columns: 1fr;
  }
}
body.reduce-motion *,
body.reduce-motion *::before,
body.reduce-motion *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
@media (max-width: 640px) {
  .rightcol {
    grid-template-columns: 1fr;
  }
  .learning-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 9px;
  }
  .learning-stats > div {
    padding: 14px;
  }
  .learning-stats b {
    font-size: 23px;
  }
  .method-choices {
    grid-template-columns: 1fr;
  }
  .method-choice {
    grid-template-columns: 20px 1fr;
    padding: 13px;
  }
  .method-choice small {
    grid-column: 2;
  }
  .study-card {
    padding: 25px 18px;
  }
  .study-prompt {
    font-size: 27px;
  }
  .study-header {
    font-size: 10px;
    gap: 8px;
  }
  .study-context {
    font-size: 13px;
  }
  .today-task {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
  }
  .study-actions {
    gap: 10px;
  }
  .nav {
    grid-template-columns: repeat(5, 1fr) !important;
  }
  .nav button {
    font-size: 9px !important;
  }
}
