:root {
  --paper: #f8f5ee;
  --paper-deep: #f2ecdf;
  --paper-soft: #fffdf8;
  --ink: #1a2924;
  --ink-2: #35443e;
  --muted: #81877f;
  --gold: #a98147;
  --gold-bright: #c29658;
  --gold-pale: #eadcc4;
  --line: rgba(36, 48, 43, 0.12);
  --line-strong: rgba(36, 48, 43, 0.24);
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --cn-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", STSong, SimSun, serif;
  --sans: "Aptos", "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  --shadow: 0 26px 80px rgba(22, 32, 28, 0.2);
  --header-height: 74px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 84% 2%, rgba(204, 174, 121, 0.15), transparent 26rem),
    radial-gradient(circle at 8% 45%, rgba(255, 253, 247, 0.8), transparent 34rem),
    var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

body.is-card-open {
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 500;
  padding: 10px 14px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: none;
}

.site-header {
  display: flex;
  align-items: center;
  gap: 34px;
  width: min(1540px, calc(100% - 56px));
  height: var(--header-height);
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--gold);
}

.brand-mark svg {
  width: 100%;
  height: 100%;
}

.brand-copy {
  display: grid;
  gap: 1px;
}

.brand-copy strong {
  font-family: var(--cn-serif);
  font-size: 16px;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.brand-copy small {
  color: var(--muted);
  font-size: 6.5px;
  letter-spacing: 0.21em;
}

.header-trail {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
}

.header-trail i {
  width: 26px;
  height: 1px;
  background: var(--gold-pale);
}

.header-trail strong {
  color: var(--ink-2);
  font-family: var(--cn-serif);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.header-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.header-note b {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: 0;
}

.edition-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(169, 129, 71, 0.1);
}

.back-site {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 7px 10px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.04em;
  transition:
    border-color 0.15s,
    color 0.15s;
}

.back-site:hover,
.back-site:focus-visible {
  border-color: var(--gold);
  color: var(--gold);
}

.mobile-nav-bar {
  display: none;
}

.site-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 44px;
  width: min(1540px, calc(100% - 56px));
  margin: 0 auto;
  padding: 28px 0 70px;
}

.catalog {
  position: sticky;
  top: 20px;
  align-self: start;
  max-height: calc(100vh - 40px);
  padding-right: 18px;
  overflow: auto;
  border-right: 1px solid var(--line);
  scrollbar-width: thin;
  scrollbar-color: rgba(169, 129, 71, 0.35) transparent;
}

.catalog::-webkit-scrollbar {
  width: 4px;
}

.catalog::-webkit-scrollbar-thumb {
  border-radius: 99px;
  background: rgba(169, 129, 71, 0.32);
}

.catalog-head {
  padding: 2px 0 16px;
  border-bottom: 1px solid var(--line);
}

.catalog-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 15px;
}

.catalog-title span {
  color: var(--gold);
  font-size: 8.5px;
  letter-spacing: 0.16em;
}

.catalog-title b {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
}

.catalog-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 7px;
  letter-spacing: 0.18em;
}

.catalog-loading {
  padding: 18px 2px;
  color: var(--muted);
  font-size: 11px;
}

.book-nav {
  padding: 3px 0 7px;
  border-bottom: 1px solid var(--line);
}

.book-nav summary {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 2px 10px 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--cn-serif);
  font-size: 13px;
  font-weight: 600;
}

.book-nav summary::-webkit-details-marker {
  display: none;
}

.book-nav summary::before {
  content: "+";
  width: 11px;
  color: var(--gold);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 400;
}

.book-nav[open] summary::before {
  content: "−";
}

.book-nav summary small {
  margin-left: auto;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 8px;
  font-weight: 400;
}

.book-nav-unit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 7px 7px 7px 18px;
  border: 0;
  border-left: 2px solid transparent;
  background: transparent;
  color: var(--ink-2);
  text-align: left;
  font-size: 11px;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s;
}

.book-nav-unit:hover {
  background: rgba(255, 253, 248, 0.8);
}

.book-nav-unit.is-active {
  border-left-color: var(--gold);
  background: rgba(169, 129, 71, 0.09);
  color: var(--ink);
}

.book-nav-unit small {
  color: var(--muted);
  font-size: 8px;
}

.book-nav-unit span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-pending {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 2px 12px 18px;
  color: var(--muted);
  font-size: 11px;
  border-bottom: 1px solid var(--line);
}

.nav-pending span:last-child {
  padding: 2px 6px;
  border: 1px solid var(--line);
  font-size: 7px;
  letter-spacing: 0.08em;
}

.catalog-note {
  margin-top: 18px;
  padding: 11px 12px;
  border: 1px solid rgba(169, 129, 71, 0.25);
  background: rgba(255, 253, 248, 0.52);
}

.catalog-note-label {
  color: var(--gold);
  font-size: 7px;
  letter-spacing: 0.16em;
}

.catalog-note p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.7;
}

.catalog-scrim {
  display: none;
}

.content {
  min-width: 0;
  max-width: 1180px;
}

.loading-state {
  display: grid;
  place-items: center;
  min-height: 55vh;
  color: var(--muted);
  font-family: var(--cn-serif);
  font-size: 13px;
}

.loading-rule {
  width: 86px;
  height: 1px;
  overflow: hidden;
  background: var(--gold-pale);
}

.loading-rule::after {
  content: "";
  display: block;
  width: 42px;
  height: 1px;
  background: var(--gold);
  animation: loadingSweep 1.2s infinite ease-in-out;
}

@keyframes loadingSweep {
  from {
    transform: translateX(-42px);
  }
  to {
    transform: translateX(86px);
  }
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 2px 0 23px;
  color: var(--muted);
  font-size: 9px;
}

.breadcrumb span[aria-hidden="true"] {
  color: var(--gold);
  opacity: 0.5;
}

.breadcrumb .current {
  color: var(--ink-2);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 36px;
  align-items: end;
  min-height: 210px;
  padding: 18px 0 30px;
  border-bottom: 1px solid var(--line);
}

.hero::before {
  content: "";
  position: absolute;
  top: -18px;
  right: 4px;
  width: 146px;
  height: 146px;
  border: 1px solid rgba(169, 129, 71, 0.12);
  border-radius: 50%;
  pointer-events: none;
}

.hero-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 13px;
  color: var(--gold);
  font-family: var(--serif);
  font-size: 8.5px;
  letter-spacing: 0.22em;
}

.hero-kicker::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--gold);
}

.hero h1 {
  max-width: 780px;
  margin: 0;
  font-family: var(--cn-serif);
  font-size: clamp(38px, 5vw, 64px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.hero h1 span {
  display: block;
  margin-top: 8px;
  color: var(--gold);
  font-family: var(--serif);
  font-size: 0.25em;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-intro {
  max-width: 720px;
  margin: 17px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.9;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 24px;
  padding-bottom: 4px;
}

.hero-meta div {
  display: grid;
  gap: 3px;
}

.hero-meta b {
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 500;
  line-height: 1;
}

.hero-meta span {
  color: var(--muted);
  font-size: 7px;
  letter-spacing: 0.14em;
}

.search-dock {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 0 14px;
  border-bottom: 1px solid rgba(23, 35, 31, 0.07);
  background: rgba(248, 245, 238, 0.94);
  backdrop-filter: blur(12px);
}

.search-copy {
  display: grid;
  flex-shrink: 0;
  gap: 3px;
}

.search-copy span {
  color: var(--gold);
  font-size: 7.5px;
  letter-spacing: 0.2em;
}

.search-copy small {
  color: var(--muted);
  font-size: 9px;
}

.search-shell {
  position: relative;
  width: min(590px, 100%);
  flex-shrink: 0;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 6px 12px 6px 7px;
  border: 1px solid rgba(169, 129, 71, 0.55);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(20, 31, 26, 0.11);
}

.search-orb {
  display: grid;
  place-items: center;
  width: 41px;
  height: 41px;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(140deg, #b28449, #d8b776);
  color: #fff;
}

.search-orb svg {
  width: 18px;
  height: 18px;
}

.search-field input {
  flex: 1;
  min-width: 0;
  padding: 3px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
}

.search-field input::placeholder {
  color: #969a94;
}

.search-total {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(169, 129, 71, 0.1);
  color: var(--gold);
  font-size: 8px;
  white-space: nowrap;
}

.search-clear {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--paper-deep);
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
}

.search-results {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  width: min(590px, calc(100vw - 24px));
  max-height: min(440px, calc(100vh - 150px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
}

.search-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 16px;
  width: 100%;
  padding: 11px 15px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.search-result:hover,
.search-result:focus-visible {
  background: var(--paper-deep);
}

.search-result-word {
  font-family: var(--serif);
  font-size: 17px;
}

.search-result-meaning {
  color: var(--ink-2);
  font-size: 11px;
  line-height: 1.5;
}

.search-result-side {
  display: grid;
  justify-items: end;
  gap: 2px;
}

.search-result-pos {
  color: var(--gold);
  font-size: 8px;
}

.search-result-loc {
  color: var(--muted);
  font-size: 7.5px;
  white-space: nowrap;
}

.search-empty,
.search-more {
  padding: 18px;
  color: var(--muted);
  text-align: center;
  font-size: 10px;
}

.list-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--gold);
}

.list-heading span {
  font-size: 7.5px;
  letter-spacing: 0.24em;
}

.list-heading b {
  color: var(--muted);
  font-size: 7.5px;
  font-weight: 400;
  letter-spacing: 0.12em;
}

.book-section {
  padding-top: 48px;
}

.book-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ink);
}

.book-kicker {
  color: var(--gold);
  font-family: var(--serif);
  font-size: 8px;
  letter-spacing: 0.15em;
}

.book-head h2 {
  margin: 0;
  font-family: var(--cn-serif);
  font-size: 29px;
  font-weight: 600;
  line-height: 1.2;
}

.book-en {
  color: var(--muted);
  font-family: var(--serif);
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.book-count {
  margin-left: auto;
  color: var(--muted);
  font-size: 9px;
}

.unit-section {
  scroll-margin-top: 92px;
}

.unit-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 29px 0 9px;
  border-bottom: 1px solid var(--line-strong);
}

.unit-head small {
  display: block;
  margin-bottom: 3px;
  color: var(--gold);
  font-size: 7.5px;
  letter-spacing: 0.14em;
}

.unit-head h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 500;
  line-height: 1.2;
}

.unit-count {
  color: var(--muted);
  font-size: 8.5px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.word-row {
  --thumb-width: clamp(170px, 15vw, 236px);
  display: grid;
  grid-template-columns: 48px minmax(0, 470px) var(--thumb-width);
  align-items: center;
  column-gap: 17px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 100px;
  transition: background 0.16s;
}

.word-row:hover {
  background: rgba(255, 253, 249, 0.62);
}

.word-row.is-flash {
  background: rgba(169, 129, 71, 0.14);
  animation: rowFlash 1.5s ease-out;
}

@keyframes rowFlash {
  from {
    background: rgba(169, 129, 71, 0.2);
  }
  to {
    background: transparent;
  }
}

.note-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(169, 129, 71, 0.55);
  border-radius: 50%;
  background: transparent;
  color: var(--gold);
  font-family: var(--cn-serif);
  font-size: 12px;
  cursor: pointer;
  transition:
    background 0.15s,
    transform 0.15s;
}

.note-button:hover,
.note-button:focus-visible {
  background: rgba(169, 129, 71, 0.12);
  transform: translateY(-1px);
}

.word-main {
  min-width: 0;
}

.word-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 7px 11px;
}

.word-button {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(21px, 2vw, 26px);
  line-height: 1.32;
  text-align: left;
  cursor: help;
}

.word-button .paren {
  color: rgba(125, 132, 124, 0.72);
  font-weight: 400;
}

.word-button .paren:first-child {
  margin-right: 4px;
}

.word-button .paren:last-child {
  margin-left: 4px;
}

.word-button .dotted {
  border-bottom: 1px dashed rgba(169, 129, 71, 0.75);
  overflow-wrap: anywhere;
}

.word-button:hover .dotted,
.word-button:focus-visible .dotted {
  background: rgba(169, 129, 71, 0.12);
}

.word-pos {
  padding: 2px 6px;
  border: 1px solid rgba(169, 129, 71, 0.38);
  color: var(--gold);
  font-size: 7.5px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.speak-button {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(169, 129, 71, 0.08);
  color: var(--gold);
  cursor: pointer;
}

.speak-button svg {
  width: 13px;
  height: 13px;
}

.speak-button:hover,
.speak-button:focus-visible,
.speak-button.is-speaking {
  background: rgba(169, 129, 71, 0.18);
}

.word-meaning {
  display: inline-block;
  margin-top: 8px;
  padding: 3px 7px;
  background: #f0e7d6;
  color: var(--ink-2);
  font-family: var(--cn-serif);
  font-size: 16px;
  line-height: 1.65;
}

.word-thumb {
  position: relative;
  width: var(--thumb-width);
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.word-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 3px;
  filter: saturate(0.94);
  transform: scale(1);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.word-thumb:hover img,
.word-thumb:focus-visible img {
  transform: scale(1.035);
}

.image-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px dashed rgba(169, 129, 71, 0.42);
  background:
    linear-gradient(135deg, transparent 49.6%, rgba(169, 129, 71, 0.08) 50%, transparent 50.4%),
    var(--paper-deep);
  color: var(--muted);
  font-family: var(--cn-serif);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.row-number {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 0.2em;
  margin-top: 7px;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1;
  letter-spacing: 0.06em;
}

.row-number small {
  font-size: 0.58em;
  letter-spacing: 0.08em;
}

.page-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 48px;
  padding-top: 19px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
  line-height: 1.65;
}

.page-foot a {
  color: var(--gold);
  white-space: nowrap;
}

.card-dismiss {
  position: fixed;
  inset: 0;
  z-index: 180;
  background: transparent;
}

.word-card {
  position: fixed;
  z-index: 200;
  width: min(620px, calc(100vw - 24px));
  max-height: min(72vh, 650px);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  border: 1px solid #e2dacd;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 32px 90px rgba(18, 27, 23, 0.26);
  opacity: 0;
  transform: translateY(7px) scale(0.988);
  transition:
    opacity 0.17s,
    transform 0.17s;
}

.word-card.is-visible {
  opacity: 1;
  transform: none;
}

.word-card::-webkit-scrollbar {
  width: 8px;
}

.word-card::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(169, 129, 71, 0.54);
  background-clip: padding-box;
}

.card-head {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  padding: 9px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 249, 0.96);
  backdrop-filter: blur(14px);
}

.card-note {
  display: grid;
  place-items: center;
  width: 41px;
  height: 41px;
  flex-shrink: 0;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--gold);
  font-family: var(--cn-serif);
  font-size: 12px;
}

.card-head-word {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 22px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-head-pos {
  padding: 2px 6px;
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 8px;
  white-space: nowrap;
}

.card-head-location {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.07em;
  white-space: nowrap;
}

.card-close {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
}

.card-close:hover,
.card-close:focus-visible {
  background: var(--paper-deep);
  color: var(--ink);
}

.card-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 202px;
  gap: 20px;
  padding: 22px 22px 25px;
}

.card-copy {
  min-width: 0;
}

.card-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.card-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 38px;
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}

.card-pill {
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--paper-deep);
  color: var(--ink-2);
  font-size: 8.5px;
}

.card-audio-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 11px;
}

.card-audio {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--gold);
  font-size: 8.5px;
  cursor: pointer;
}

.card-audio svg {
  width: 13px;
  height: 13px;
}

.card-audio:hover,
.card-audio:focus-visible,
.card-audio.is-speaking {
  border-color: var(--gold);
  background: rgba(169, 129, 71, 0.07);
}

.card-place {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.05em;
}

.card-meaning {
  display: inline-block;
  margin-top: 19px;
  padding: 4px 9px;
  background: #f0e7d6;
  color: var(--ink);
  font-family: var(--cn-serif);
  font-size: 23px;
  line-height: 1.55;
}

.card-section {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.card-section h4 {
  margin: 0 0 7px;
  color: var(--gold);
  font-family: var(--sans);
  font-size: 7.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
}

.card-section p {
  margin: 0;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.92;
  overflow-wrap: anywhere;
}

.card-section .example-en {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.78;
}

.card-section .example-zh {
  margin-top: 7px;
  color: var(--muted);
  font-family: var(--cn-serif);
  font-size: 14px;
}

.target-en {
  border-bottom: 1px dashed rgba(169, 129, 71, 0.85);
  color: var(--ink);
}

.target-zh {
  padding: 0 2px;
  background: #f0e7d6;
  color: var(--ink-2);
}

.card-media {
  align-self: start;
  width: 100%;
  margin: 0;
}

.card-media img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 4px;
  filter: saturate(0.94);
}

.card-media .image-placeholder {
  aspect-ratio: 4 / 3;
}

.card-media figcaption {
  margin-top: 6px;
  color: var(--muted);
  text-align: right;
  font-size: 7px;
  letter-spacing: 0.13em;
}

@media (max-width: 1180px) {
  .site-shell {
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 30px;
  }

  .word-row {
    --thumb-width: 190px;
  }

  .search-copy {
    display: none;
  }

  .search-shell {
    width: min(680px, 100%);
    margin-left: auto;
  }
}

@media (max-width: 900px) {
  :root {
    --header-height: 66px;
  }

  .site-header {
    width: calc(100% - 32px);
    gap: 16px;
  }

  .header-trail {
    display: none;
  }

  .header-note {
    margin-left: auto;
  }

  .mobile-nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: calc(100% - 32px);
    margin: 0 auto;
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 9px;
  }

  .catalog-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border: 1px solid var(--line);
    background: rgba(255, 253, 248, 0.68);
    color: var(--ink-2);
    font-size: 10px;
    cursor: pointer;
  }

  .menu-lines {
    display: grid;
    gap: 3px;
    width: 13px;
  }

  .menu-lines i {
    display: block;
    height: 1px;
    background: var(--gold);
  }

  .site-shell {
    display: block;
    width: calc(100% - 32px);
    padding-top: 0;
  }

  .catalog {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 150;
    width: min(330px, calc(100vw - 46px));
    max-height: none;
    padding: 20px 18px 28px;
    border-right: 1px solid var(--line);
    background: var(--paper);
    box-shadow: 18px 0 50px rgba(19, 28, 24, 0.15);
    transform: translateX(-104%);
    transition: transform 0.22s ease;
  }

  .catalog.is-open {
    transform: none;
  }

  .catalog-scrim {
    position: fixed;
    inset: 0;
    z-index: 140;
    display: block;
    padding: 0;
    border: 0;
    background: rgba(18, 29, 24, 0.26);
    backdrop-filter: blur(2px);
  }

  .content {
    max-width: none;
  }

  .breadcrumb {
    padding-top: 20px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 22px;
  }

  .hero-meta {
    gap: 28px;
  }

  .search-dock {
    top: 0;
  }
}

@media (max-width: 720px) {
  .brand-copy small,
  .header-note > span:not(.edition-dot) {
    display: none;
  }

  .back-site {
    padding: 6px 8px;
  }

  .brand-copy strong {
    font-size: 14px;
  }

  .header-note b {
    font-size: 18px;
  }

  .hero {
    padding-top: 8px;
  }

  .hero::before {
    width: 100px;
    height: 100px;
  }

  .hero h1 {
    font-size: 37px;
  }

  .hero-intro {
    font-size: 11px;
  }

  .search-dock {
    padding: 10px 0;
  }

  .search-field {
    min-height: 50px;
  }

  .search-orb {
    width: 38px;
    height: 38px;
  }

  .search-field input {
    font-size: 12px;
  }

  .book-section {
    padding-top: 38px;
  }

  .book-head {
    flex-wrap: wrap;
    gap: 5px 10px;
  }

  .book-head h2 {
    font-size: 25px;
  }

  .book-count {
    flex-basis: 100%;
    margin: 2px 0 0;
  }

  .unit-head h3 {
    font-size: 24px;
  }

  .word-row {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 0 13px;
    padding: 20px 0 22px;
  }

  .note-button {
    width: 34px;
    height: 34px;
    align-self: start;
  }

  .word-button {
    font-size: 22px;
  }

  .word-thumb {
    grid-column: 2;
    width: min(100%, 360px);
    margin-top: 15px;
  }

  .row-number {
    font-size: 15px;
  }

  .page-foot {
    align-items: flex-start;
    flex-direction: column;
  }

  .word-card {
    top: 50% !important;
    left: 50% !important;
    width: calc(100vw - 24px);
    max-height: min(82vh, 730px);
    transform: translate(-50%, calc(-50% + 8px)) scale(0.988);
  }

  .word-card.is-visible {
    transform: translate(-50%, -50%);
  }

  .card-dismiss {
    background: rgba(16, 26, 21, 0.28);
    backdrop-filter: blur(2px);
  }

  .card-head {
    padding: 8px 13px;
  }

  .card-note {
    width: 35px;
    height: 35px;
  }

  .card-head-word {
    font-size: 18px;
  }

  .card-head-location {
    display: none;
  }

  .card-body {
    display: flex;
    flex-direction: column;
    gap: 17px;
    padding: 18px 17px 22px;
  }

  .card-title {
    font-size: 33px;
  }

  .card-meaning {
    font-size: 20px;
  }

  .card-media {
    order: -1;
  }

  .card-media img,
  .card-media .image-placeholder {
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 480px) {
  .site-header,
  .mobile-nav-bar,
  .site-shell {
    width: calc(100% - 24px);
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .hero h1 {
    font-size: 32px;
    letter-spacing: -0.03em;
  }

  .hero-meta {
    gap: 20px;
  }

  .hero-meta b {
    font-size: 22px;
  }

  .search-copy {
    display: none;
  }

  .search-field {
    gap: 8px;
  }

  .search-total {
    display: none;
  }

  .search-result {
    grid-template-columns: minmax(0, 1fr);
  }

  .search-result-side {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .word-button {
    font-size: 20px;
  }

  .word-pos {
    font-size: 7px;
  }

  .word-meaning {
    font-size: 15px;
  }

  .card-title-row {
    gap: 6px;
  }

  .card-head-pos {
    display: none;
  }

  .card-section .example-en {
    font-size: 15px;
  }

  .card-section .example-zh {
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Shared main-site header */

:root {
  --header-height: 78px;
}

body.nav-open {
  overflow: hidden;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  display: block;
  width: 100%;
  height: var(--header-height);
  margin: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(248, 245, 238, 0.9);
  backdrop-filter: blur(18px) saturate(1.15);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  width: min(1480px, calc(100% - 80px));
  height: 100%;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}

.brand-mark {
  display: block;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(169, 129, 71, 0.5);
  border-radius: 50%;
  background: #fff;
  object-fit: cover;
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  font-family: var(--cn-serif);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.2;
}

.brand-copy em {
  color: var(--muted);
  font-family: var(--serif);
  font-size: 8.5px;
  font-style: normal;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.nav-item {
  position: relative;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 28px 11px;
  border: 0;
  background: none;
  color: var(--ink-2);
  font-size: 13px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: color 0.18s;
}

.nav-link:hover,
.nav-item.is-active .nav-link,
.nav-item.is-open .nav-link {
  color: var(--ink);
}

.nav-item.is-active .nav-link::after {
  content: "";
  position: absolute;
  bottom: 19px;
  left: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--gold);
  transform: translateX(-50%);
}

.chevron {
  width: 5px;
  height: 5px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  opacity: 0.62;
  transition: transform 0.18s;
}

.nav-item.is-open .chevron {
  transform: rotate(-135deg) translateY(-1px);
}

.nav-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  width: 258px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-soft);
  box-shadow: 0 22px 54px rgba(20, 31, 26, 0.16);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -5px);
  transition:
    opacity 0.18s,
    transform 0.18s,
    visibility 0.18s;
}

.nav-item.is-open .nav-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.nav-panel-link {
  display: grid;
  gap: 3px;
  padding: 12px;
  border-radius: 5px;
  transition: background 0.15s;
}

.nav-panel-link:hover {
  background: var(--paper-deep);
}

.nav-panel-link b {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.nav-panel-link small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.tu-chacha-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-right: 6px;
  padding: 8px 11px;
  border: 1px solid rgba(169, 129, 71, 0.4);
  border-radius: 999px;
  background: rgba(169, 129, 71, 0.08);
  box-shadow: 0 8px 22px rgba(169, 129, 71, 0.12);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  white-space: nowrap;
  transition:
    border-color 0.18s,
    background 0.18s,
    color 0.18s,
    box-shadow 0.18s;
}

.tu-chacha-link:hover,
.tu-chacha-link:focus-visible {
  border-color: var(--gold);
  background: var(--gold);
  box-shadow: 0 10px 28px rgba(169, 129, 71, 0.26);
  color: #fff;
}

.tu-chacha-spark {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow:
    0 0 0 3px rgba(169, 129, 71, 0.11),
    0 0 10px rgba(169, 129, 71, 0.22);
}

.header-action {
  flex-shrink: 0;
  margin-left: 7px;
  padding: 10px 18px;
  border: 1px solid var(--ink);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  transition:
    background 0.18s,
    color 0.18s;
}

.header-action:hover {
  background: var(--ink);
  color: var(--paper);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  width: 40px;
  height: 40px;
  margin-left: auto;
  padding: 0;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  width: 17px;
  height: 1px;
  background: var(--ink);
  transition:
    transform 0.18s,
    opacity 0.18s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.catalog {
  top: 98px;
  max-height: calc(100vh - 118px);
}

.search-dock {
  top: 78px;
}

.unit-section,
.word-row {
  scroll-margin-top: 162px;
}

@media (max-width: 980px) {
  :root {
    --header-height: 72px;
  }

  .site-header {
    width: 100%;
    height: 72px;
    margin: 0;
  }

  .header-inner {
    width: 100%;
    height: 72px;
    padding: 0 18px;
    gap: 14px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .brand-copy strong {
    font-size: 15px;
  }

  .brand-copy em {
    font-size: 7px;
  }

  .nav-toggle {
    display: flex;
  }

  .header-action {
    display: none;
  }

  .main-nav {
    position: fixed;
    top: 72px;
    right: 0;
    left: 0;
    display: grid;
    gap: 0;
    max-height: calc(100vh - 72px);
    margin: 0;
    padding: 10px 18px 22px;
    overflow: auto;
    border-top: 1px solid var(--line);
    background: var(--paper);
    box-shadow: 0 22px 48px rgba(20, 31, 26, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition:
      opacity 0.18s,
      transform 0.18s,
      visibility 0.18s;
  }

  .main-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .tu-chacha-link,
  .nav-link {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 16px 4px;
    border-bottom: 1px solid var(--line);
    font-size: 15px;
  }

  .tu-chacha-link {
    margin-right: 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--ink-2);
  }

  .nav-item.is-active .nav-link::after {
    top: 50%;
    right: 12px;
    bottom: auto;
    left: auto;
    transform: translateY(-50%);
  }

  .nav-panel {
    position: static;
    display: none;
    width: auto;
    padding: 0 0 8px 14px;
    border: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav-item.is-open .nav-panel {
    display: block;
  }

  .nav-panel-link {
    padding: 10px 8px;
  }

  .catalog {
    top: 0;
    max-height: none;
  }

  .search-dock {
    top: 72px;
  }

  .unit-section,
  .word-row {
    scroll-margin-top: 150px;
  }
}
