:root {
  color-scheme: light;
  --paper: #f7f6ef;
  --white: #fffef9;
  --ink: #20362b;
  --muted: #5b6c60;
  --green: #28543e;
  --dark: #183a2d;
  --line: #e5e8dc;
  --soft-green: #e4eee0;
  --yellow: #f9d977;
  --radius: 24px;
  font-family: 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  font-size: 16px;
  color: var(--ink);
  background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #9b6c24; outline-offset: 3px; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
img, video { display: block; max-width: 100%; }
[tabindex='-1']:focus { outline: none; }
[data-icon] { display: inline-grid; place-items: center; flex: 0 0 auto; vertical-align: middle; }
[data-icon] svg { width: 1.18em; height: 1.18em; display: block; }
.shell { width: min(100% - 88px, 1200px); margin-inline: auto; }
.skip { position: fixed; z-index: 20; top: 10px; left: 10px; transform: translateY(-160%); padding: .7rem 1rem; background: var(--white); border-radius: 8px; }
.skip:focus { transform: none; }
.site-header { background: var(--white); border-bottom: 1px solid #ebe9df; }
.header-inner { width: min(100% - 88px, 1200px); margin-inline: auto; min-height: 76px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.brand { justify-self: start; display: inline-flex; align-items: center; gap: 11px; font-size: 19px; font-weight: 800; line-height: 1; white-space: nowrap; letter-spacing: -.04em; }
.brand small { display: block; margin-top: 6px; font: 750 9px/1 system-ui, sans-serif; letter-spacing: .2em; color: #597361; }
.brand-mark { width: 42px; height: 42px; border-radius: 13px; color: #fff1c1; background: #2f5b44; font-size: 23px; }
.main-nav, .header-actions { display: flex; align-items: center; gap: 7px; }
.main-nav a, .search-button, .desktop-admin { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 11px; padding: 10px 12px; font-size: 14px; font-weight: 700; white-space: nowrap; }
.main-nav a { min-height: 42px; color: #546558; }
.main-nav a:hover, .desktop-admin:hover { background: #eff2e9; }
.main-nav a[aria-current='page'] { color: #27533f; background: #e7f0e4; }
.header-actions { justify-content: flex-end; }
.search-button { min-height: 39px; color: #526458; background: #f7f8f1; border: 1px solid #e7eae1; }
.search-button:hover { background: #edf2e8; }
kbd { font: 12px/1.3 ui-monospace, monospace; background: var(--white); border: 1px solid #e2e7dd; padding: 1px 5px; border-radius: 4px; }
.desktop-admin { font-size: 17px; color: #617365; }
main.shell { padding-block: 32px 68px; min-height: calc(100dvh - 150px); }
.loading { margin-top: 35px; color: var(--muted); }
.hero { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); min-height: 412px; overflow: hidden; isolation: isolate; position: relative; background: #173b2e; border-radius: 30px; color: #fff8db; }
.hero::after { content: ''; position: absolute; inset: 10px; border: 1px solid #fff1be1c; border-radius: 23px; pointer-events: none; z-index: 2; }
.hero-content { position: relative; z-index: 2; padding: 41px 0 38px 49px; align-self: center; }
.hero-art { position: absolute; inset: 0 0 0 35%; z-index: -1; background: radial-gradient(ellipse at 64% 50%, #477143, transparent 67%); }
.hero-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #173b2e 0%, #173b2e00 28%), linear-gradient(0deg, #173b2e4d, transparent 20%, transparent 83%, #173b2e28); }
.hero-art picture { display: contents; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 53%; }
.day-label { display: inline-flex; align-items: center; gap: 7px; border-radius: 99px; padding: 7px 12px; color: #fbe394; background: #456049; font-size: 13px; font-weight: 750; }
.hero-wordline { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 17px; margin-top: 9px; }
.hero h1 { color: #fff4ce; font: 850 clamp(68px, 9vw, 115px)/.94 'Trebuchet MS', 'Avenir Next', sans-serif; letter-spacing: -.082em; }
.hero-ipa { font-size: 20px; font-weight: 550; color: #dbdfc3; letter-spacing: .015em; }
.hero-audio { width: 35px; height: 35px; border: 1px solid #f9ecbd4d; background: #f8efbb16; color: #ffe091; border-radius: 50%; font-size: 16px; align-self: center; margin-left: -7px; }
.hero-audio:hover { background: #fff0bd36; }
.hero-meaning { display: flex; align-items: center; gap: 12px; margin-top: 17px; font-size: 24px; font-weight: 760; }
.hero-meaning span { background: #ffffff14; color: #d6e2cc; padding: 4px 8px; border: 1px solid #e1edcf30; border-radius: 6px; font-size: 12px; font-weight: 650; }
.hero-example { color: #e0e6cc; margin-top: 10px; font-size: 17px; }
.hero-action { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 24px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 9px 15px; border: 1px solid transparent; border-radius: 11px; background: var(--green); color: #fffef4; font-size: 15px; font-weight: 750; line-height: 1.3; }
.button:hover { background: #37654c; }
.button:disabled { opacity: .6; cursor: wait; }
.button.gold { background: var(--yellow); color: #263924; padding-inline: 16px; }
.button.gold:hover { background: #ffe59a; }
.button.subtle { background: #eef2e9; color: var(--green); border-color: #e4e9df; }
.button.subtle:hover, .button.subtle[aria-pressed='true'] { background: #dcebdc; }
.button.outline { background: var(--white); color: var(--green); border-color: #dee7da; }
.button.outline:hover { background: #eef5e9; }
.button.ghost { color: #f3f0d3; background: transparent; border-color: #f6efd549; }
.button.ghost:hover, .button.ghost[aria-pressed='true'] { background: #ffffff19; }
.section { margin-top: 40px; }
.section-head { display: flex; gap: 14px; justify-content: space-between; align-items: end; margin-bottom: 17px; }
.section-head h2, .page-head h1 { font-weight: 850; letter-spacing: -.055em; }
.section-head h2 { font-size: clamp(25px, 3vw, 32px); }
.section-head p, .page-head p { color: var(--muted); margin-top: 5px; line-height: 1.55; }
.section-link { display: inline-flex; gap: 7px; align-items: center; font-weight: 750; color: #36634a; white-space: nowrap; padding: 8px 0; }
.section-link:hover { text-decoration: underline; }
.word-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.word-card { min-width: 0; position: relative; isolation: isolate; display: flex; align-items: center; min-height: 124px; background: var(--card-bg, #edf1e6); border: 1px solid var(--card-line, #e3e8db); border-radius: 18px; padding: 14px; transition: transform .18s, border-color .18s; }
.word-card:hover { transform: translateY(-3px); border-color: #7c9679; }
.theme-peach { --card-bg: #f8e9e2; --card-line: #f0dfd5; --emoji-bg: #f6d9cb; }
.theme-lilac { --card-bg: #f0e9f9; --card-line: #e8def3; --emoji-bg: #e6d9f3; }
.theme-mint { --card-bg: #e8f0e2; --card-line: #e0eadb; --emoji-bg: #d5e6d0; }
.theme-blue { --card-bg: #e4eef6; --card-line: #dce8ef; --emoji-bg: #cfdfed; }
.theme-yellow { --card-bg: #f8efd9; --card-line: #f2e9d3; --emoji-bg: #f1e1b5; }
.word-emoji { flex: 0 0 auto; display: grid; place-items: center; border-radius: 15px; width: 61px; height: 61px; font-size: 31px; background: var(--emoji-bg, #e2e7d9); margin-right: 12px; }
.word-card h3 { font: 800 clamp(19px, 2.3vw, 28px)/1.1 'Trebuchet MS', 'Avenir Next', sans-serif; letter-spacing: -.045em; overflow-wrap: anywhere; }
.word-card p { font-size: 14px; color: #4f6254; margin-top: 4px; overflow-wrap: anywhere; }
.word-card .clip-badge { position: absolute; top: 10px; right: 10px; font-size: 12px; color: #415b48; opacity: .9; }
.word-card .learned-marker { color: #2c683f; font-size: 13px; margin-top: 3px; }
.book-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.book-card { min-height: 143px; border: 1px solid var(--line); background: var(--white); border-radius: 18px; display: flex; gap: 12px; align-items: center; padding: 14px; transition: transform .18s, border-color .18s; }
.book-card:hover { transform: translateY(-3px); border-color: #9aac96; }
.book-cover { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: #34543f; width: 55px; height: 74px; border-radius: 7px 10px 10px 7px; border-left: 5px solid #0002; background: var(--emoji-bg, #dce9d5); box-shadow: 0 3px 0 #0000000e; font-weight: 800; font-size: 12px; }
.book-cover [data-icon] { font-size: 21px; }
.book-card h3 { font-size: 16px; margin-bottom: 5px; }
.book-caption, .book-edition { display: block; font-size: 13px; color: var(--muted); }
.book-edition { margin-top: 5px; }
.site-footer { border-top: 1px solid #e8e8dc; color: #58705d; }
.footer-inner { min-height: 65px; display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.footer-inner a:hover { text-decoration: underline; }
.page-head { margin: 5px 0 23px; }
.page-head h1 { font-size: clamp(34px, 5vw, 50px); }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 16px; color: #55725d; font-size: 14px; }
.breadcrumb a:hover { text-decoration: underline; }
.filterbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; align-items: center; }
.chip { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; border: 1px solid #dce5d8; background: var(--white); color: #4f6656; border-radius: 10px; padding: 6px 11px; font-size: 14px; font-weight: 700; }
.chip:hover, .chip[aria-pressed='true'], .chip[aria-current='true'] { background: #deebdd; color: #254e36; border-color: #cbdcc9; }
.filter-select { margin-left: auto; }
.empty { background: var(--white); border: 1px dashed #cedbc9; border-radius: 19px; color: var(--muted); padding: 25px; line-height: 1.6; }
.empty h3 { color: var(--ink); margin-bottom: 4px; }
.empty .button { margin-top: 12px; }
.source-note { margin-top: 20px; color: var(--muted); line-height: 1.55; font-size: 14px; }
.source-note a, .panel a.external { text-decoration: underline; text-underline-offset: 3px; }
.book-unit { margin-bottom: 25px; }
.unit-title { font-size: 23px; margin-bottom: 12px; }
.edition-note { margin-bottom: 18px; padding: 13px 15px; border: 1px solid #e4e5d5; border-radius: 13px; background: #fbf7e8; }
.edition-note p { margin-top: 5px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.edition-note a { text-decoration: underline; text-underline-offset: 3px; }
.book-coverage { display: flex; flex-wrap: wrap; gap: 8px; margin: -6px 0 16px; }
.book-coverage span { padding: 7px 10px; border: 1px solid #e3e7d9; border-radius: 9px; background: var(--white); color: #49624f; font-size: 14px; }
.book-coverage [data-icon] { color: #37714f; }
.book-coverage span[data-icon] { padding: 0; border: 0; background: transparent; }
.unit-heading { display: flex; align-items: baseline; flex-wrap: wrap; justify-content: space-between; gap: 5px 10px; margin-bottom: 10px; }
.unit-heading .unit-title { margin-bottom: 0; }
.unit-heading > span { color: var(--muted); font-size: 14px; }
.detail-grid { display: grid; align-items: start; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 18px; }
.detail-column { display: grid; gap: 15px; min-width: 0; }
.panel { min-width: 0; padding: 22px; border: 1px solid var(--line); background: var(--white); border-radius: 19px; }
.panel h2 { font-size: 22px; letter-spacing: -.03em; margin-bottom: 12px; }
.panel h2 [data-icon] { color: #497758; margin-right: 3px; }
.panel p { line-height: 1.7; }
.panel p + p { margin-top: 6px; }
.panel .muted, .muted { color: var(--muted); }
.lexical-card { background: var(--card-bg, #e9f1e4); border-color: var(--card-line, #e0eadb); }
.lexical-top { display: flex; gap: 12px; align-items: center; }
.lexical-top .word-emoji { width: 57px; height: 57px; font-size: 29px; margin: 0; }
.lexical-top h1 { font: 850 clamp(42px, 7vw, 76px)/1.03 'Trebuchet MS', 'Avenir Next', sans-serif; letter-spacing: -.06em; overflow-wrap: anywhere; }
.lexical-pronunciation { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.lexical-pronunciation .ipa { margin-right: 6px; }
.pronunciation-note { color: var(--muted); font-size: 14px; }
.parent-source { display: inline-flex; align-items: center; justify-self: start; align-self: start; gap: 6px; color: #56705c; font-size: 14px; padding: 5px 2px; }
.parent-source:hover { text-decoration: underline; }
.word-sequence { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 15px; }
.word-sequence a:only-child { margin-left: auto; }
.lexical-card .meaning { margin-top: 13px; font-size: 21px; font-weight: 800; }
.lexical-card .meaning small { display: inline-block; margin-right: 7px; color: #4f6654; font-size: 14px; }
.lexical-card .intro { margin-top: 6px; }
.word-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.example-line { font-size: 20px; font-weight: 750; }
.example-line button { margin-left: 4px; }
.quiz-options { display: grid; gap: 7px; margin-top: 10px; }
.quiz-option { justify-content: flex-start; }
.quiz-option.correct { background: #ddefd9; color: #215137; border-color: #adceab; }
.quiz-option.wrong { background: #f8e6dd; color: #863d28; border-color: #e9cbbd; }
.quiz-feedback { margin-top: 10px; color: #325c40; }
.video-panel { overflow: hidden; }
.word-media { display: grid; gap: 15px; min-width: 0; }
.source-clips { display: grid; gap: 11px; }
.source-clip { border: 1px solid var(--line); border-radius: 12px; background: #f7f8f0; padding: 12px; }
.source-clip h3 { font-size: 16px; }
.source-clip p.source-credit { margin: 4px 0; color: var(--muted); font-size: 13px; }
.source-clip p.source-clip-note { color: var(--muted); font-size: 14px; }
.source-clip p.source-memory { color: var(--ink); font-size: 14px; }
.source-details { margin-top: 12px; }
.source-details summary { cursor: pointer; color: var(--green); font-size: 14px; font-weight: 700; }
.source-details .source-clips { margin-top: 10px; }
.source-clip-actions { margin-top: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.douyin-player { margin-bottom: 12px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; }
.douyin-player-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 7px; background: #f3f5ec; color: var(--muted); font-size: 14px; }
.douyin-player iframe { display: block; width: 100%; height: min(500px, 70vh); border: 0; background: #172820; }
.video-panel video { width: 100%; max-height: 440px; background: #17372b; border-radius: 12px; }
.video-stage { position: relative; overflow: hidden; border-radius: 12px; background: #17372b; }
.video-placeholder { min-height: 150px; color: var(--muted); }
.media-feedback { color: var(--muted); margin-bottom: 12px; }
.video-cover { position: absolute; inset: 0; display: grid; align-items: end; justify-items: center; isolation: isolate; }
.video-cover > img, .video-cover-fallback { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: contain; }
.video-cover::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, #0c1f17d9, transparent 63%); }
.video-cover-actions { padding: 12px; text-align: center; color: #fffef4; }
.video-status { margin: 0 0 5px; font-size: 14px; font-weight: 700; }
.video-meta { margin-top: 12px; }
.video-meta h3 { margin-bottom: 3px; font-size: 17px; }
.video-meta p { color: var(--muted); font-size: 14px; }
.video-list { display: grid; gap: 8px; margin-top: 13px; }
.video-row { display: grid; grid-template-columns: auto 1fr; text-align: left; gap: 10px; align-items: center; font-weight: 700; }
.video-row small { display: block; color: var(--muted); font-size: 13px; font-weight: 550; margin-top: 3px; }
.manage-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.manage-grid form { display: grid; gap: 10px; }
.manage-grid label { display: grid; gap: 5px; font-size: 14px; color: #415648; font-weight: 700; }
.manage-grid input:not([type='checkbox']), .manage-grid textarea, .filter-select { width: 100%; padding: 9px 11px; min-height: 42px; min-width: 0; border: 1px solid #d7e0d3; color: var(--ink); border-radius: 8px; background: #fffefa; }
.manage-grid textarea { min-height: 123px; resize: vertical; font: 13px/1.5 ui-monospace, monospace; }
.manage-grid input[type='file'] { font-size: 13px; }
.manage-grid label.confirm { display: flex; align-items: start; }
.manage-grid .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-select { width: auto; }
.form-feedback { margin-top: 5px; color: #396343; font-size: 14px; }
.form-feedback.error { color: #8a3c27; }
.toast { position: fixed; z-index: 10; bottom: 24px; left: 50%; transform: translateX(-50%); max-width: calc(100vw - 28px); width: max-content; border-radius: 10px; color: #fff9e9; background: #244a36; padding: 10px 16px; box-shadow: 0 6px 25px #17291c29; }
.search-dialog { color: var(--ink); padding: 19px; width: min(95vw, 560px); max-height: 77dvh; border: 1px solid var(--line); border-radius: 18px; background: var(--white); box-shadow: 0 15px 80px #14352042; }
.search-dialog::backdrop { background: #10271c65; }
.search-dialog-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 13px; }
.search-dialog h2 { font-size: 22px; }
.icon-button { display: inline-grid; place-items: center; min-width: 35px; min-height: 35px; color: var(--green); background: #edf2e8; border: none; border-radius: 8px; vertical-align: middle; }
.icon-button:hover { background: #dceadc; }
.search-field { display: flex; align-items: center; gap: 7px; border: 1px solid #cad9c9; border-radius: 10px; padding-left: 10px; }
.search-field input { flex: 1; min-width: 0; padding: 10px; border: 0; background: transparent; color: var(--ink); border-radius: 10px; }
.search-results { margin-top: 12px; }
.search-result { display: flex; align-items: center; gap: 10px; padding: 8px 9px; border-radius: 8px; }
.search-result:hover { background: #edf4ea; }
.search-result strong { min-width: 82px; }
.search-result span { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
@media (max-width: 1020px) {
  .word-grid, .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .word-card { min-height: 104px; }
  .hero { min-height: 380px; }
  .hero-content { padding-left: 36px; }
}
@media (max-width: 760px) {
  .shell, .header-inner { width: calc(100% - 30px); }
  .header-inner { grid-template-columns: 1fr 1fr; gap: 4px; padding-top: 9px; }
  .brand { font-size: 17px; }
  .brand-mark { width: 35px; height: 35px; border-radius: 10px; }
  .main-nav { grid-row: 2; grid-column: 1 / -1; justify-content: space-between; gap: 3px; padding-block: 5px 7px; }
  .main-nav a { flex: 1; padding-inline: 5px; }
  .header-actions { grid-column: 2; grid-row: 1; }
  .desktop-admin, .search-button kbd { display: none; }
  main.shell { padding-block: 18px 34px; }
  .hero { min-height: 480px; display: flex; flex-direction: column; border-radius: 21px; }
  .hero::after { inset: 7px; border-radius: 16px; }
  .hero-content { padding: 27px 19px 18px; align-self: stretch; }
  .hero h1 { font-size: 74px; }
  .hero-meaning { margin-top: 12px; }
  .hero-example { margin-top: 5px; }
  .hero-action { margin-top: 15px; }
  .hero-art { inset: 42% 0 0; }
  .hero-art::after { background: linear-gradient(180deg, #173b2e, #173b2e00 31%); }
  .hero-art img { object-position: 59% 58%; }
  .section { margin-top: 29px; }
  .section-head { align-items: start; }
  .section-head p { font-size: 14px; }
  .section-link { font-size: 14px; }
  .word-grid, .book-grid { gap: 8px; }
  .word-card, .book-card { padding: 9px; border-radius: 13px; }
  .word-card { min-height: 90px; }
  .word-card .word-emoji { width: 39px; height: 43px; border-radius: 10px; margin-right: 7px; font-size: 22px; }
  .word-card p { font-size: 13px; }
  .word-card .clip-badge { top: 6px; right: 6px; }
  .book-card { gap: 6px; min-height: 105px; }
  .book-cover { width: 40px; height: 57px; }
  .book-card h3 { font-size: 14px; }
  .book-caption, .book-edition { font-size: 12px; }
  .detail-grid, .manage-grid { grid-template-columns: 1fr; }
  .detail-grid { gap: 12px; }
  .detail-column { gap: 12px; }
  .detail-content { display: contents; }
  .lexical-card { grid-row: 1; }
  .detail-video { grid-row: 2; }
  .panel { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
.learned-total { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; color: #465f48; border: 1px solid #e1e9d9; background: #edf2e6; padding: 6px 10px; border-radius: 99px; white-space: nowrap; font-size: 14px; font-weight: 750; }
.learned-total [data-icon] { color: #676724; }
.manage-grid form { margin-top: 14px; }
.library-summary { border-top: 1px solid var(--line); margin-top: 17px; padding-top: 12px; color: var(--muted); font-size: 14px; }
.candidate-search { max-width: 400px; margin-bottom: 10px; }
.candidate-list { display: grid; }
.candidate-row { min-width: 0; display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.candidate-row h3 { font-size: 16px; }
.candidate-row p { margin-top: 3px; font-size: 14px; color: var(--muted); }
.candidate-row p.candidate-meta { font-size: 13px; }
.candidate-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
@media (max-width: 570px) {
  .candidate-row { grid-template-columns: 1fr; }
  .candidate-actions { justify-content: flex-start; }
}
