:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color: #252f2b;
  background: #f7f5ef;
  font-synthesis: none;
  --green: #245a44;
  --muted: #657169;
  --line: #dedfd5;
}
.daily-push { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px 20px; margin: 0 0 34px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 12px; background: #fffefa; }
.daily-push-copy { min-width: 0; }
.daily-push-copy p { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.daily-push-actions { display: flex; flex-shrink: 0; gap: 8px; }
#enable-daily-push { padding: 11px 16px; border: 1px solid var(--green); border-radius: 8px; background: var(--green); color: #fff; font-size: 13px; }
#enable-daily-push:hover:not(:disabled) { background: #194331; }
#daily-push-status { grid-column: 1 / -1; min-width: 0; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
#daily-push-status:empty { display: none; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; }
main { max-width: 1140px; margin: 0 auto; padding: env(safe-area-inset-top, 0px) max(40px, env(safe-area-inset-right, 0px)) max(24px, env(safe-area-inset-bottom, 0px)) max(40px, env(safe-area-inset-left, 0px)); }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
button, a, input { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #ad6937; outline-offset: 4px; }
a { color: inherit; text-underline-offset: 3px; }
button { transition: background .15s ease; }
[hidden] { display: none !important; }
.site-header { display: flex; justify-content: space-between; align-items: center; min-height: 96px; border-bottom: 1px solid var(--line); gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 650; text-decoration: none; }
.brand span { display: grid; place-items: center; background: var(--green); color: #fff; width: 38px; height: 38px; border-radius: 12px; font-size: 23px; font-weight: 400; }
.personal-label { color: var(--muted); font-size: 13px; }
.intro { padding: 62px 0 43px; max-width: 710px; }
.eyebrow { color: var(--green); font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
h1 { margin: 18px 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(36px, 5vw, 54px); line-height: 1.12; letter-spacing: -.035em; font-weight: 400; }
.intro > p:not(.eyebrow) { color: var(--muted); font-size: 16px; line-height: 1.75; max-width: 560px; }
.progress-line { display: flex; align-items: center; gap: 16px; margin-top: 26px; font-size: 13px; color: var(--green); }
progress { width: 130px; height: 6px; border: 0; border-radius: 9px; overflow: hidden; background: #e0e4da; accent-color: var(--green); }
progress::-webkit-progress-bar { background: #e0e4da; }
progress::-webkit-progress-value { background: var(--green); border-radius: 9px; }
progress::-moz-progress-bar { background: var(--green); }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 23px 0; border-top: 1px solid var(--line); }
.view-switch { display: flex; gap: 6px; }
.view-switch button { border: 0; background: transparent; padding: 12px 16px; color: var(--muted); border-radius: 9px; font-size: 14px; }
.view-switch button[aria-pressed="true"] { background: var(--green); color: #fff; }
#known-count { padding-left: 6px; font-size: 12px; }
input { width: 285px; max-width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; background: #fffefa; color: inherit; font-size: 13px; }
.topics { display: flex; flex-wrap: wrap; gap: 8px; margin: 3px 0 30px; }
.topics button { padding: 8px 13px; background: transparent; border: 1px solid var(--line); border-radius: 30px; color: var(--muted); font-size: 12px; }
.topics button[aria-pressed="true"] { background: #e8eddf; border-color: #bacbad; color: #2e5036; }
.list-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 17px; }
h2 { font-size: 16px; font-weight: 600; margin: 0; }
#result-count { font-size: 12px; color: var(--muted); }
#message { color: #82512c; font-size: 14px; line-height: 1.6; }
#message:empty { display: none; }
.word-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.word-card { display: flex; flex-direction: column; padding: 23px; background: #fffefa; border: 1px solid var(--line); border-radius: 13px; min-height: 246px; }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.topic-label { font-size: 11px; color: var(--muted); letter-spacing: .02em; }
.audio { background: none; color: var(--green); border: none; padding: 6px 0 6px 10px; font-size: 12px; }
h3 { font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif; font-size: 36px; font-weight: 500; letter-spacing: .07em; margin: 25px 0 4px; overflow-wrap: anywhere; }
.pinyin { margin: 0 0 17px; color: var(--green); font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
.pinyin:empty { display: none; }
.reveal { align-self: flex-start; border: none; background: transparent; color: var(--muted); font-size: 13px; padding: 0 0 12px; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 5px; }
.meaning { font-size: 15px; line-height: 1.65; margin: 0 0 17px; }
.example { font-size: 17px; line-height: 1.7; margin: 0 0 6px; }
.translation { font-size: 12px; line-height: 1.65; margin: 0 0 18px; color: var(--muted); }
.mark { width: 100%; margin-top: auto; padding: 13px 0 0; text-align: left; color: var(--green); border: none; border-top: 1px solid #e8e9e0; background: transparent; font-size: 13px; }
.mark:hover, .audio:hover { color: #111; }
.more-row { display: flex; justify-content: center; margin: 30px 0 44px; }
.secondary { background: transparent; color: var(--green); border: 1px solid #bac7b9; border-radius: 8px; padding: 12px 23px; font-size: 13px; }
.secondary:hover { background: #e8eddf; }
.empty-state { grid-column: 1 / -1; padding: 45px 24px; margin: 0; border: 1px dashed #bdc8b8; border-radius: 12px; text-align: center; line-height: 1.8; color: var(--muted); }
footer { border-top: 1px solid var(--line); padding: 24px 0 30px; color: var(--muted); font-size: 11px; line-height: 1.8; }
footer p:first-child { font-family: Georgia, serif; color: var(--green); font-size: 17px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 900px) { .word-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px), (pointer: coarse) {
  button { min-height: 44px; }
  input { min-height: 48px; font-size: 16px; }
}
@media (max-width: 560px) {
  main { padding-inline: max(20px, env(safe-area-inset-left, 0px)) max(20px, env(safe-area-inset-right, 0px)); }
  .site-header { min-height: 72px; }
  .brand { gap: 10px; }
  .brand span { flex-shrink: 0; }
  .personal-label { display: none; }
  .intro { padding: 28px 0 24px; }
  .eyebrow { font-size: 11px; line-height: 1.5; }
  h1 { margin: 14px 0; }
  .intro > p:not(.eyebrow) { line-height: 1.6; }
  .toolbar { align-items: stretch; flex-direction: column; gap: 12px; padding: 20px 0; }
  .view-switch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .view-switch button { min-width: 0; padding: 10px 8px; }
  input, .search-label { width: 100%; min-width: 0; }
  .daily-push { grid-template-columns: minmax(0, 1fr); gap: 14px; margin-bottom: 24px; padding: 18px; }
  .daily-push-actions { width: 100%; }
  .daily-push-actions button { width: 100%; }
  #daily-push-status { font-size: 13px; }
  .topics { flex-wrap: nowrap; max-width: 100%; overflow-x: auto; padding: 4px 0; margin-bottom: 20px; }
  .topics button { flex: 0 0 auto; font-size: 13px; }
  .word-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .word-card { min-width: 0; padding: 20px; }
  .topic-label { font-size: 12px; line-height: 1.5; }
  .audio { min-width: 72px; padding: 10px 0 10px 12px; font-size: 14px; }
  .reveal { padding: 10px 0; font-size: 14px; }
  .mark { min-height: 48px; padding: 14px 0 0; font-size: 14px; }
  .meaning { font-size: 16px; overflow-wrap: anywhere; }
  .translation { font-size: 14px; overflow-wrap: anywhere; }
  .progress-line { flex-wrap: wrap; gap: 10px 16px; font-size: 14px; }
  .more-row { margin: 24px 0 32px; }
  footer { font-size: 12px; overflow-wrap: anywhere; }
}
@media (prefers-reduced-motion: reduce) { button { transition: none; } }
