:root {
  color-scheme: light;
  --ink: #203930;
  --muted: #52665c;
  --green: #235b48;
  --dark: #163e34;
  --paper: #f7f7f0;
  --white: #fffefb;
  --line: #dce4d7;
  --soft: #edf4e9;
  --peach: #ffe6d6;
  --gold: #f5e9bb;
  --shadow: 0 6px 24px #2039300a;
  --reading: 1;
  font-family: "Noto Sans CJK SC", "Microsoft YaHei", "PingFang SC", "Source Sans 3", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; line-height: 1.55; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
h1,h2,h3,p { margin: 0; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid #aa560c; outline-offset: 3px; }
[hidden] { display: none !important; }
svg { width: 20px; height: 20px; flex: none; vertical-align: middle; }
.wrap { width: min(100% - 72px, 1280px); margin-inline: auto; }
.skip { position: fixed; top: 10px; left: 10px; padding: 10px 16px; background: white; z-index: 10; transform: translateY(-200%); }
.skip:focus { transform: none; }
.top { background: var(--white); border-bottom: 1px solid var(--line); }
.top-inner { min-height: 69px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 17px; font-weight: 760; }
.brand b { color: var(--green); margin-left: 2px; }
.brand-icon { display: grid; place-items: center; width: 39px; height: 39px; color: #f9f8e8; background: var(--green); border-radius: 12px; }
.brand-icon svg { width: 22px; height: 22px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 7px 14px; border: 1px solid transparent; border-radius: 10px; color: var(--ink); font-size: 14px; font-weight: 700; background: var(--soft); text-align: center; }
.button:hover { filter: brightness(.97); }
.button:disabled { opacity: .5; cursor: default; }
.button.outline { border-color: var(--line); background: var(--white); }
.button.primary { background: var(--green); color: white; border-color: var(--green); }
.button.text-button { background: transparent; padding-inline: 0; color: var(--green); }
.button.icon-button { width: 41px; padding: 5px; }
.button[aria-pressed="true"]:not(.primary) { background: #dcebd9; border-color: #a7c0a9; }
.hero { position: relative; isolation: isolate; overflow: hidden; margin: 28px 0 20px; padding: 39px 40px 38px; min-height: 255px; border-radius: 23px; background: var(--dark); color: #fffdf1; display: grid; grid-template-columns: minmax(0, 1fr) 275px; align-items: center; gap: 44px; }
.hero::after { content: ""; position: absolute; z-index: -1; width: 640px; height: 640px; right: -260px; bottom: -385px; border: 1px solid #b5ceb137; border-radius: 50%; box-shadow: 0 0 0 33px #b5ceb115,0 0 0 67px #b5ceb10c,0 0 0 102px #b5ceb107; }
.hero-eyebrow { font-size: 12px; font-weight: 760; color: #c3dcc6; letter-spacing: .12em; margin: 0 0 10px; }
.hero h1 { font-family: "Noto Serif CJK SC", "Songti SC", SimSun, Georgia, serif; font-size: clamp(30px, 4.2vw, 58px); letter-spacing: -.035em; line-height: 1.15; overflow-wrap: anywhere; }
.hero-description { color: #e0eae0; font-size: 15px; margin-top: 16px; max-width: 43em; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.hero-stats a { border: 1px solid #81a49780; border-radius: 8px; padding: 5px 10px; font-size: 12px; color: #e2eee2; }
.hero-stats a:hover { background: #ffffff18; }
.hero-stats b { color: white; font-variant-numeric: tabular-nums; margin-right: 5px; }
.hero-card { width: 100%; max-width: 250px; margin-right: 17px; position: relative; justify-self: center; display: grid; gap: 4px; border-radius: 15px; padding: 16px 19px 13px; color: #243f34; background: #f6edce; box-shadow: 6px 6px 0 #98ac8b, 12px 12px 0 #446c5c; transform: rotate(-4deg); transition: transform .18s; }
.hero-card:hover, .hero-card:focus-visible { transform: rotate(-1deg) translateY(-3px); }
.hero-card-label { font-size: 12px; letter-spacing: .06em; font-weight: 750; }
.hero-card-label > span { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #bd6541; margin-right: 4px; }
.hero-card strong { font: 700 47px/.98 "DM Serif Text", Georgia, serif; letter-spacing: -.045em; }
.hero-card-line { font-size: 13px; display: flex; gap: 8px; }
.hero-card-line s { color: #576c5f; text-decoration: none; }
.hero-card-cta { border-top: 1px solid #c3c8a9; padding-top: 7px; margin-top: 6px; font-size: 12px; font-weight: 750; display: flex; justify-content: space-between; }
.nav { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 20px; padding: 5px; border: 1px solid var(--line); border-radius: 13px; background: var(--white); }
.nav a { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 45px; flex: 1; padding: 6px 14px; font-size: 14px; font-weight: 720; border-radius: 8px; white-space: nowrap; color: var(--muted); }
.nav a:hover { background: var(--soft); }
.nav a[aria-current="page"] { color: #fffef6; background: var(--green); }
.nav svg { width: 17px; height: 17px; }

.browse { display: grid; grid-template-columns: minmax(305px, .93fr) minmax(0, 1.9fr); align-items: start; gap: 17px; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); min-width: 0; }
.filters { padding: 17px; border-bottom: 1px solid var(--line); }
.filter-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.filter-heading h2 { font-size: 17px; }
.count { color: var(--green); background: var(--soft); border-radius: 999px; padding: 2px 8px; white-space: nowrap; font-weight: 700; font-size: 12px; font-variant-numeric: tabular-nums; }
.search-box { position: relative; display: flex; align-items: center; }
.search-box svg { position: absolute; left: 11px; color: #48675a; pointer-events: none; width: 17px; height: 17px; }
.search-box input { background: #f8faf4; width: 100%; min-height: 42px; padding: 7px 10px 7px 35px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); font-size: 14px; }
.search-box input::placeholder { color: #63756b; opacity: 1; }
.filter-selects { display: flex; flex-wrap: wrap; margin-top: 8px; gap: 6px; }
select { min-height: 39px; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 4px 7px; font-size: 13px; }
.filter-selects select { flex: 1 0 0; min-width: 105px; }
.letters { display: grid; grid-template-columns: repeat(9,minmax(0,1fr)); gap: 4px; margin-top: 9px; }
.letters button { min-height: 29px; border-radius: 5px; border: 1px solid transparent; background: transparent; color: var(--muted); font: 700 12px/1 "Inter", system-ui, sans-serif; }
.letters button:hover { background: var(--soft); }
.letters button[aria-pressed="true"] { background: #dcebd9; color: #22523f; }
.letters button:disabled { opacity: .35; cursor: default; }
.letters button:first-child { font-family: inherit; }
.results { padding: 5px 9px; }
.term-row { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; width: 100%; background: none; border: 0; text-align: left; color: var(--ink); padding: 9px; border-radius: 8px; min-height: 60px; }
.term-row + .term-row { margin-top: 1px; }
.term-row:hover { background: #f1f5ec; }
.term-row[aria-current="true"] { background: #e9f1e4; box-shadow: inset 3px 0 var(--green); }
.row-term { min-width: 0; }
.row-term strong { display: block; font-size: 17px; overflow-wrap: anywhere; }
.row-term small { display: block; font-size: 12px; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.row-dot { display: block; border-radius: 100%; width: 8px; height: 8px; border: 1px solid #92a496; }
.row-dot.learning { background: #f4cd6a; border-color: #a37d27; }
.row-dot.review { background: #e69e81; border-color: #ad593b; }
.row-dot.known { background: #458167; border-color: #458167; }
.pagination { border-top: 1px solid var(--line); display: flex; gap: 6px; justify-content: space-between; align-items: center; padding: 10px 13px; color: var(--muted); font-size: 13px; }
.pagination .button { font-size: 12px; min-height: 35px; padding-inline: 9px; }
.empty { padding: 35px 19px; color: var(--muted); text-align: center; display: grid; justify-items: center; gap: 11px; }
.empty h3 { color: var(--ink); font-size: 18px; }
.detail { overflow: hidden; scroll-margin-top: 8px; }
.detail-head { padding: 23px 25px 17px; border-bottom: 1px solid var(--line); }
.detail-top { display: flex; gap: 10px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; border-radius: 999px; background: var(--soft); color: #255744; font-size: 11px; letter-spacing: .025em; font-weight: 750; padding: 3px 8px; }
.tag.warm { color: #704026; background: #f9ead9; }
.tag.review { color: #79472e; background: var(--peach); }
.tag.learning { color: #6c510a; background: var(--gold); }
.tag.none { color: var(--muted); background: #f1f3ec; }
.detail-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.detail-actions .button { min-height: 36px; font-size: 12px; }
.detail-title { font: 700 calc(clamp(36px, 5vw, 62px) * var(--reading))/1.07 "DM Serif Text", Georgia, serif; letter-spacing: -.035em; overflow-wrap: anywhere; margin-top: 10px; }
.pronunciation { color: #436455; font-size: calc(17px * var(--reading)); margin-top: 6px; overflow-wrap: anywhere; }
.detail-body { display: grid; gap: 18px; padding: 20px 25px 25px; font-size: calc(15px * var(--reading)); }
.detail-body h3 { font-size: calc(16px * var(--reading)); margin-bottom: 7px; }
.definition { line-height: 1.72; }
.pos { margin-right: 6px; font-weight: 720; color: var(--green); }
.details-note { color: var(--muted); font-size: 12px; }
.teach { background: #eff5eb; padding: 13px 15px; border-left: 3px solid #428368; border-radius: 0 9px 9px 0; }
.teach p { line-height: 1.68; }
.senses { display: grid; gap: 7px; }
.sense { padding: 12px 13px; border-radius: 10px; background: #f8faf4; border: 1px solid #e6ecdf; }
.sense h4 { font-size: 1em; margin: 0 0 4px; color: var(--green); }
.english { font-family: "Inter", system-ui, sans-serif; font-size: 1.06em; }
.sentence { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.translation { color: var(--muted); font-size: .89em; margin-top: 3px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { min-height: 35px; padding: 5px 9px; text-align: left; border: 1px solid var(--line); background: #f8faf5; border-radius: 7px; color: var(--ink); font-size: inherit; }
.pill[data-action] { cursor: pointer; }
.pill[data-action]:hover { background: var(--soft); }
.pill strong { color: var(--green); }
.status-bar { display: flex; gap: 6px; flex-wrap: wrap; }
.status-bar .button { min-height: 37px; padding-inline: 10px; }
.detail-footer { border-top: 1px solid var(--line); margin-top: 2px; padding-top: 12px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; }
.mobile-back { display: none; }
.projection-tools { display: none; }
body.projecting .hero { display: none; }
body.projecting .nav { margin-top: 12px; }
body.projecting .browse { grid-template-columns: minmax(0,1fr); }
body.projecting .browse .index-panel { display: none; }
body.projecting .projection-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
body.projecting .projection-tools input { max-width: 200px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; }
body.projecting .browse .detail { display: block; }
body.projecting .detail-body { gap: 26px; }
body.projecting .detail-head, body.projecting .detail-body { padding-inline: clamp(17px,4vw,50px); }

.activity { padding: 24px; min-height: 435px; }
.activity-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; align-items: start; }
.activity-head h2 { font-family: "Noto Serif CJK SC","Songti SC",SimSun,serif; font-size: 27px; line-height: 1.3; }
.activity-head p { color: var(--muted); margin-top: 5px; font-size: 14px; }
.activity-settings { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; }
.activity-settings label { display: grid; gap: 3px; font-size: 12px; font-weight: 700; }
.activity-settings select { min-width: 128px; }
.activity-core { width: min(100%, 780px); margin: 25px auto 4px; }
.activity-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 11px; font-size: 13px; color: var(--muted); }
.activity-meta progress { flex: 1; height: 8px; accent-color: var(--green); }
.flash-face { width: 100%; min-height: 247px; border: 1px solid #bdcdad; border-radius: 19px; background: #edf4e5; color: var(--ink); display: grid; gap: 9px; justify-items: center; align-content: center; padding: 19px; text-align: center; }
.flash-face.answer { background: #f8edd4; border-color: #e2cda8; }
.flash-word { font: 700 calc(clamp(26px, 5vw, 60px) * var(--reading))/1.12 "DM Serif Text", Georgia, serif; overflow-wrap: anywhere; max-width: 100%; }
.flash-meaning { font-size: calc(clamp(17px,3vw,27px) * var(--reading)); font-weight: 720; }
.flash-face small { font-size: 13px; color: var(--muted); }
.activity-controls { margin-top: 11px; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.activity-group { display: flex; gap: 6px; flex-wrap: wrap; }
.question { border: 1px solid #d7e6d5; padding: 16px 17px; border-radius: 12px; background: #eef5e9; }
.question p { font-size: calc(13px * var(--reading)); color: var(--muted); }
.question h3 { font-size: calc(clamp(18px, 3vw, 26px) * var(--reading)); margin-top: 5px; overflow-wrap: anywhere; }
.options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.option { min-height: 47px; justify-content: start; text-align: left; font-size: calc(14px * var(--reading)); font-weight: 550; }
.option:disabled { opacity: 1; }
.option.correct { background: #e9f4e6; border-color: #5d9473; }
.option.wrong { background: #fbece5; border-color: #c2866b; }
.choice-letter { flex: none; display: grid; place-items: center; width: 23px; height: 23px; border: 1px solid #cad7c7; border-radius: 6px; color: var(--green); font-size: .85em; font-weight: 750; }
.feedback { border-radius: 9px; padding: 10px 13px; background: #f2f5ed; }
.feedback strong { display: block; }
.report-items { display: grid; gap: 8px; list-style: none; padding: 0; }
.report-items li { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.report-items .reply { color: var(--muted); font-size: 14px; }
.footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 5px 12px; color: var(--muted); font-size: 12px; margin: 16px 0 27px; }
.footer .button { font-size: 12px; }
.loading { padding: 32px; color: var(--muted); }
dialog { width: min(100% - 30px, 610px); border: 1px solid var(--line); padding: 22px; border-radius: 15px; color: var(--ink); background: var(--white); box-shadow: 0 20px 80px #172d2560; }
dialog::backdrop { background: #172d2590; }
.dialog-head { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.dialog-head h2 { font-size: 20px; }
dialog p + p { margin-top: 9px; }
.toast { position: fixed; z-index: 5; bottom: 18px; left: 50%; width: max-content; max-width: calc(100% - 24px); transform: translateX(-50%); border-radius: 9px; background: #143c31; color: white; text-align: center; padding: 8px 15px; font-size: 13px; box-shadow: 0 4px 20px #1e332b35; }
.toast:empty { display: none; }
@media (max-width: 970px) {
  .wrap { width: min(100% - 38px,1280px); }
  .hero { padding: 28px; grid-template-columns: minmax(0,1fr) 210px; gap: 23px; min-height: 218px; }
  .hero-card { max-width: 200px; }
  .hero-card strong { font-size: 39px; }
  .browse { grid-template-columns: minmax(265px, .95fr) minmax(0, 1.65fr); gap: 12px; }
  .filters { padding: 12px; }
}
@media (max-width: 700px) {
  .wrap { width: calc(100% - 24px); }
  .top-inner { min-height: 57px; }
  .brand { font-size: 15px; gap: 7px; }
  .brand-icon { width: 34px; height: 34px; border-radius: 8px; }
  #projection { min-height: 37px; padding: 5px 8px; font-size: 12px; }
  #projection svg { width: 16px; height: 16px; }
  .hero { display: block; padding: 22px 17px 19px; margin: 12px 0; min-height: 0; border-radius: 15px; }
  .hero h1 { font-size: clamp(24px,7vw,39px); }
  .hero-description { font-size: 13px; margin-top: 10px; }
  .hero-stats { margin-top: 13px; gap: 5px; }
  .hero-stats a { font-size: 11px; padding-block: 3px; }
  .hero-card { display: none; }
  .nav { padding: 4px; gap: 4px; margin-bottom: 11px; }
  .nav a { min-height: 38px; padding: 4px 7px; font-size: 12px; gap: 4px; }
  .nav svg { width: 14px; height: 14px; }
  .browse { grid-template-columns: minmax(0,1fr); }
  .browse:not(.detail-open) .detail { display: none; }
  .browse.detail-open .index-panel { display: none; }
  .mobile-back { display: inline-flex; margin-bottom: 9px; min-height: 34px; }
  body.projecting .mobile-back { display: none; }
  .detail-head { padding: 15px; }
  .detail-body { padding: 15px; }
  .letters button { min-height: 34px; }
  .activity { padding: 15px; }
  .activity-head h2 { font-size: 22px; }
  .activity-head p { font-size: 13px; }
  .activity-settings select { min-width: 108px; }
  .options { grid-template-columns: 1fr; }
  .flash-face { min-height: 206px; }
}
@media (max-width: 390px) {
  .nav a { padding-inline: 5px; }
  .nav svg { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
.pill[href]:hover { background: var(--soft); border-color: #b7cab6; }
.button.playing { border-color: #4c8a6d; background: #dcebd9; }
.letters button:first-child { white-space: nowrap; padding-inline: 0; }
