/* ============ 字体 ============ */
@font-face {
  font-family: "Noto Serif Hebrew";
  src: url("../fonts/noto-serif-hebrew.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

/* ============ 变量 ============ */
:root {
  --bg: #f5eddf;
  --bg-deep: #ece0cc;
  --surface: #fffbf2;
  --surface-2: #f9f1e3;
  --ink: #2e261e;
  --muted: #7c6b58;
  --line: #ddcfb8;
  --wine: #7b2d26;
  --wine-dark: #5a1e19;
  --gold: #a97a33;
  --ok: #47663f;
  --shadow: 0 10px 30px rgba(74, 52, 30, 0.12);
  --radius: 14px;
  --serif: "Iowan Old Style", "Palatino Linotype", "Songti SC", "Noto Serif SC", "Source Han Serif SC", serif;
  --sans: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --hebrew: "Noto Serif Hebrew", "Times New Roman", serif;
}

[data-theme="dark"] {
  --bg: #171310;
  --bg-deep: #1f1a14;
  --surface: #241d16;
  --surface-2: #2c231a;
  --ink: #ece1d0;
  --muted: #a99882;
  --line: #3b2f23;
  --wine: #c9776a;
  --wine-dark: #e09a8e;
  --gold: #d2a35c;
  --ok: #8fbb7f;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

/* ============ 全局 ============ */
* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 0%, rgba(185, 140, 70, 0.10), transparent 45%),
    radial-gradient(circle at 90% 12%, rgba(123, 45, 38, 0.07), transparent 40%),
    var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.75;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--wine); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.3; margin: 0 0 0.5em; font-weight: 600; }
h1 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h2 { font-size: clamp(1.25rem, 2vw, 1.55rem); }
p { margin: 0 0 1em; }

.muted { color: var(--muted); }
.eyebrow {
  font-family: var(--sans);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--gold);
  margin-bottom: 0.5em;
}
.lead { font-size: 1.12rem; color: var(--ink); opacity: 0.92; }
.hint { font-size: 0.88rem; color: var(--muted); }
.link { font-family: var(--sans); font-size: 0.85rem; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--wine);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

/* ============ 头部 ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.65rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.brand { display: flex; align-items: center; gap: 0.7rem; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-hebrew {
  font-family: var(--hebrew);
  font-size: 1.9rem;
  color: var(--wine);
  line-height: 1;
}
.brand-text {
  display: flex;
  flex-direction: column;
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.brand-text small {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  margin-left: auto;
  font-family: var(--sans);
  font-size: 0.88rem;
}
.main-nav a {
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
  color: var(--muted);
}
.main-nav a:hover { background: var(--surface-2); text-decoration: none; color: var(--ink); }
.main-nav a.active { color: var(--wine); background: var(--surface); font-weight: 600; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0.5rem;
}
.user-chip {
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--muted);
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inline-form { display: inline; }

.icon-btn {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}
.icon-btn:hover { border-color: var(--wine); }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--sans);
  font-size: 0.92rem;
  line-height: 1.2;
  padding: 0.62rem 1.15rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
  text-decoration: none !important;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--wine); color: #fff8ee; }
.btn-primary:hover { background: var(--wine-dark); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--wine); color: var(--wine); }
.btn-small { padding: 0.38rem 0.8rem; font-size: 0.8rem; }
.btn-large { padding: 0.8rem 1.5rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ============ 提示条 ============ */
.flash-wrap {
  max-width: 1180px;
  margin: 0.75rem auto 0;
  padding: 0 1.25rem;
  width: 100%;
}
.flash {
  padding: 0.6rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  margin-bottom: 0.5rem;
  font-family: var(--sans);
  font-size: 0.88rem;
}
.flash-success { border-left: 4px solid var(--ok); }
.flash-error { border-left: 4px solid var(--wine); }
.flash-info { border-left: 4px solid var(--gold); }

/* ============ 主体 ============ */
.site-main {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.75rem 1.25rem 3rem;
  flex: 1;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
}
.page-head h1 { margin-bottom: 0.25rem; }
.head-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
}
.panel-head h2, .panel-head h3 { margin: 0; }

.badge {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  vertical-align: middle;
}
.badge-ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); }
.badge-muted { color: var(--muted); background: var(--surface-2); }

/* ============ 首页 ============ */
.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: center;
  padding: 2rem 0 2.5rem;
}
.hero h1 { font-size: clamp(2rem, 4.4vw, 3.3rem); }
.hero-note { font-size: 0.85rem; color: var(--muted); font-family: var(--sans); }
.hero-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; margin: 1.4rem 0 0.6rem; }

.hero-card {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  position: relative;
}
.scroll-card {
  background: linear-gradient(160deg, var(--surface), var(--surface-2));
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 2rem 1.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  transform: rotate(-2deg);
}
.scroll-card.small { padding: 1.2rem 1.1rem; transform: rotate(4deg) translateY(2.4rem); }
.hebrew-xl { font-family: var(--hebrew); font-size: clamp(2.4rem, 5vw, 3.6rem); color: var(--wine); }
.hebrew-lg { font-family: var(--hebrew); font-size: clamp(1.5rem, 2.6vw, 2.1rem); color: var(--wine); }
.translit { font-family: var(--sans); font-size: 0.8rem; letter-spacing: 0.12em; color: var(--muted); }
.gloss { font-size: 0.92rem; }

.section { margin: 3rem 0; }
.section-title {
  font-size: 1.4rem;
  margin-bottom: 1.2rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
  box-shadow: var(--shadow);
}
.feature-card h3 { margin: 0.5rem 0 0.4rem; }
.feature-card p { font-size: 0.92rem; color: var(--muted); }
.feature-card.is-planned { opacity: 0.72; }
.unit-num {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  color: var(--gold);
  text-transform: uppercase;
}

.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
}
.how-item { padding: 0.4rem 0; }
.how-index {
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--gold);
  letter-spacing: 0.15em;
}
.how-item h3 { margin: 0.3rem 0 0.4rem; font-size: 1.1rem; }
.how-item p { font-size: 0.9rem; color: var(--muted); }

.closing {
  text-align: center;
  padding: 2.2rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.closing blockquote { margin: 0 0 1rem; }
.closing .btn { margin-top: 0.6rem; }

/* ============ 表单 ============ */
.auth-shell {
  display: flex;
  justify-content: center;
  padding: 2.5rem 0;
}
.auth-card {
  width: min(430px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 2.1rem;
}
.auth-card h1 { margin-bottom: 1.1rem; }
.stack-form { display: flex; flex-direction: column; gap: 0.9rem; }
.stack-form label { display: flex; flex-direction: column; gap: 0.3rem; }
.stack-form label span {
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}
input, select, textarea {
  font-family: var(--sans);
  font-size: 0.95rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--wine) 45%, transparent);
  outline-offset: 1px;
}
.auth-alt { font-size: 0.88rem; color: var(--muted); margin-top: 1rem; margin-bottom: 0; }

/* ============ 仪表盘 ============ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.stat-label { font-family: var(--sans); font-size: 0.75rem; color: var(--muted); letter-spacing: 0.08em; }
.stat-value { font-size: 1.9rem; font-weight: 600; color: var(--wine); line-height: 1.2; }
.stat-value small { font-size: 0.85rem; color: var(--muted); font-weight: 400; }
.stat-sub { font-size: 0.78rem; color: var(--muted); }
.progress {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  margin-top: 0.45rem;
  overflow: hidden;
}
.progress span { display: block; height: 100%; background: var(--wine); border-radius: 999px; }

.chart {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.6rem;
  height: 190px;
  padding-top: 0.5rem;
}
.chart-col { display: flex; flex-direction: column; align-items: center; height: 100%; }
.chart-count { font-family: var(--sans); font-size: 0.72rem; color: var(--muted); }
.chart-bar-wrap {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0.2rem 0;
}
.chart-bar {
  width: min(46px, 72%);
  min-height: 3px;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, var(--gold), var(--wine));
}
.chart-label { font-family: var(--sans); font-size: 0.74rem; color: var(--muted); }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.meter-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.65rem; }
.meter-list li { display: grid; grid-template-columns: 4rem 1fr 2.2rem; align-items: center; gap: 0.7rem; font-family: var(--sans); font-size: 0.82rem; }
.meter-list strong { text-align: right; font-weight: 600; }
.meter { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.meter span { display: block; height: 100%; background: var(--gold); border-radius: 999px; }
.meter-2 span { background: var(--ok); }
.meter-3 span { background: var(--wine); }
.meter-4 span { background: #a24b3c; }

.unit-list { list-style: none; margin: 0; padding: 0; }
.unit-list li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.42rem 0;
  border-bottom: 1px dashed var(--line);
  font-family: var(--sans);
  font-size: 0.86rem;
}
.unit-list li:last-child { border-bottom: 0; }
.unit-dot {
  width: 1.55rem;
  height: 1.55rem;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  color: var(--muted);
  background: var(--surface-2);
}
.unit-list li.done .unit-dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.unit-name { flex: 1; }
.unit-state { color: var(--muted); font-size: 0.75rem; }

/* ============ 课程地图 ============ */
.course-list { list-style: none; margin: 0; padding: 0; }
.course-item {
  display: grid;
  grid-template-columns: 2.6rem 1fr;
  gap: 1rem;
  padding-bottom: 1.3rem;
  position: relative;
}
.course-marker {
  display: flex;
  justify-content: center;
}
.course-marker span {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--wine);
  box-shadow: var(--shadow);
}
.course-item.is-done .course-marker span { background: var(--ok); border-color: var(--ok); color: #fff; }
.course-item::before {
  content: "";
  position: absolute;
  left: 1.19rem;
  top: 2.5rem;
  bottom: 0;
  width: 1px;
  background: var(--line);
}
.course-item:last-child::before { display: none; }
.course-body {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  box-shadow: var(--shadow);
}
.course-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.course-head h2 { margin: 0; }
.course-sub { font-size: 0.86rem; color: var(--gold); font-family: var(--sans); margin: 0.2rem 0 0.6rem; }
.course-body p { font-size: 0.93rem; }
.course-item.is-planned .course-body { opacity: 0.85; }
.point-list { margin: 0.4rem 0 0.8rem; padding-left: 1.2rem; font-size: 0.9rem; }
.point-list li { margin-bottom: 0.2rem; }
.point-list.centered { display: inline-block; text-align: left; }
.source-note { font-size: 0.8rem; color: var(--muted); font-family: var(--sans); }
.course-actions { margin-top: 0.6rem; }

/* ============ 字母 ============ */
.letter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.8rem;
}
.letter-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem 0.7rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.letter-glyph {
  font-family: var(--hebrew);
  font-size: 2.7rem;
  color: var(--wine);
  line-height: 1.15;
}
.letter-name { font-family: var(--sans); font-size: 0.82rem; font-weight: 600; }
.letter-sound { font-size: 0.78rem; color: var(--muted); }
.letter-note { font-size: 0.72rem; color: var(--muted); font-family: var(--sans); }

.final-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.8rem;
}
.final-item {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.final-regular, .final-glyph { font-family: var(--hebrew); font-size: 2.1rem; color: var(--wine); }
.final-arrow { color: var(--gold); }
.final-name { font-family: var(--sans); font-size: 0.78rem; color: var(--muted); width: 100%; text-align: center; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.data-table th, .data-table td {
  text-align: left;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.data-table th {
  font-family: var(--sans);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 600;
}
.data-table tr:hover td { background: color-mix(in srgb, var(--gold) 6%, transparent); }
.hebrew-cell { font-family: var(--hebrew); font-size: 1.25rem; color: var(--wine); direction: rtl; unicode-bidi: isolate; }

.rule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}
.rule-card p { font-size: 0.9rem; }
.rule-card p:last-child { margin-bottom: 0; }

/* 自测 */
.quiz-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin: 0 0 0.8rem;
  background: var(--surface-2);
}
.quiz-item legend {
  font-weight: 600;
  padding: 0 0.35rem;
  font-size: 0.98rem;
}
.quiz-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--wine);
  color: #fff;
  font-family: var(--sans);
  font-size: 0.72rem;
  margin-right: 0.45rem;
}
.quiz-options { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.6rem; }
.quiz-option {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  cursor: pointer;
  font-size: 0.9rem;
}
.quiz-option input { accent-color: var(--wine); }
.quiz-option.is-correct { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 16%, transparent); }
.quiz-option.is-wrong { border-color: var(--wine); background: color-mix(in srgb, var(--wine) 12%, transparent); }
.quiz-explain { font-size: 0.85rem; color: var(--muted); margin: 0.6rem 0 0; padding-top: 0.5rem; border-top: 1px dashed var(--line); }
.quiz-actions { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; margin-top: 1rem; }
.quiz-score { font-family: var(--sans); font-weight: 600; color: var(--wine); }

/* ============ 词汇 ============ */
.vocab-layout {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 1.25rem;
  align-items: start;
}
.flash-shell {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.2rem;
  min-height: 360px;
  display: flex;
  flex-direction: column;
}
.flash-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--sans);
  font-size: 0.76rem;
  color: var(--muted);
  margin-bottom: 0.8rem;
}
.flash-loading { color: var(--muted); font-family: var(--sans); font-size: 0.9rem; margin: auto; }
.flashcard {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  text-align: center;
  flex: 1;
}
.card-badge {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--gold);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
}
.card-face {
  font-family: var(--hebrew);
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  color: var(--wine);
  padding: 1.4rem 0.5rem 0.6rem;
  direction: rtl;
  unicode-bidi: isolate;
  min-height: 5.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-face.is-target { font-family: var(--serif); direction: ltr; color: var(--ink); font-size: clamp(1.5rem, 3.5vw, 2.1rem); }
.card-extra { max-width: 32rem; }
.card-extra p { margin-bottom: 0.3rem; }
.card-translit { font-family: var(--sans); font-size: 0.88rem; letter-spacing: 0.12em; color: var(--muted); }
.card-hebrew {
  font-family: var(--hebrew);
  font-size: 2rem;
  color: var(--wine);
  direction: rtl;
  margin-bottom: 0.2rem;
}
.card-gloss { font-size: 1.15rem; }
.card-pos, .card-root, .card-note { font-size: 0.85rem; color: var(--muted); }
.card-root { font-family: var(--hebrew); font-size: 1.05rem; direction: rtl; }
.grade-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.45rem;
  width: 100%;
  margin-top: 0.4rem;
}
.grade {
  font-family: var(--sans);
  font-size: 0.82rem;
  padding: 0.5rem 0.2rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.grade small { font-size: 0.66rem; color: var(--muted); }
.grade:hover { border-color: var(--wine); }
.grade-again:hover { background: color-mix(in srgb, var(--wine) 12%, transparent); }
.grade-good:hover { background: color-mix(in srgb, var(--ok) 12%, transparent); }
.card-feedback { font-family: var(--sans); font-size: 0.8rem; color: var(--ok); margin: 0.3rem 0 0; }
.flash-done { margin: auto; text-align: center; }
.flash-done h2 { margin-top: 0.3rem; }

.srs-card h2 { font-size: 1.15rem; }
.srs-card p { font-size: 0.88rem; }
.plain-list { margin: 0 0 0.8rem; padding-left: 1.1rem; font-size: 0.86rem; }
.plain-list li { margin-bottom: 0.25rem; }
.mini-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.8rem;
}
.mini-stats div {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.45rem 0.6rem;
  background: var(--surface-2);
  display: flex;
  justify-content: space-between;
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--muted);
}
.mini-stats strong { color: var(--wine); }

.search-input { max-width: 260px; }
.table-scroll { overflow-x: auto; }
.word-table { min-width: 820px; }
.word-table td { font-size: 0.86rem; }
.muted-cell { color: var(--muted); font-family: var(--sans); font-size: 0.78rem !important; }
.status {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.72rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}
.status-learning { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 40%, var(--line)); }
.status-familiar { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }
.status-mastered { color: #fff; background: var(--ok); border-color: var(--ok); }
.status-difficult { color: #fff; background: var(--wine); border-color: var(--wine); }
.due-now { color: var(--wine); font-weight: 600; }

/* ============ 经文 ============ */
.reading-note h2 { font-size: 1.1rem; }
.reading-note p { font-size: 0.9rem; margin-bottom: 0; }
.verse-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.2rem 1.4rem;
  margin-bottom: 1.1rem;
}
.verse-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.8rem; }
.verse-num {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--wine);
  color: #fff;
  font-family: var(--sans);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}
.verse-audio { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.verse-audio audio { height: 34px; }
.rate-label { font-family: var(--sans); font-size: 0.76rem; color: var(--muted); display: inline-flex; align-items: center; gap: 0.3rem; }
.rate-label select { padding: 0.2rem 0.35rem; font-size: 0.78rem; }
.verse-hebrew {
  font-family: var(--hebrew);
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  line-height: 2;
  direction: rtl;
  text-align: right;
  margin: 0.6rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.55rem;
  justify-content: flex-start;
}
.word-chip {
  font-family: var(--hebrew);
  font-size: inherit;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px dashed transparent;
  padding: 0 0.05rem;
  cursor: pointer;
  line-height: 1.6;
}
.word-chip:hover, .word-chip.is-active {
  color: var(--wine);
  border-bottom-color: var(--gold);
  background: color-mix(in srgb, var(--gold) 10%, transparent);
  border-radius: 4px;
}
.verse-translit { font-family: var(--sans); font-size: 0.82rem; letter-spacing: 0.04em; color: var(--muted); direction: ltr; text-align: left; }
.word-detail {
  border-left: 3px solid var(--gold);
  background: var(--surface-2);
  border-radius: 0 10px 10px 0;
  padding: 0.8rem 1rem;
  margin: 0.7rem 0;
}
.wd-head { display: flex; align-items: baseline; gap: 0.7rem; flex-wrap: wrap; }
.wd-hebrew { font-family: var(--hebrew); font-size: 1.7rem; color: var(--wine); direction: rtl; }
.wd-translit { font-family: var(--sans); font-size: 0.82rem; color: var(--muted); letter-spacing: 0.1em; }
.word-detail p { margin: 0.25rem 0 0; font-size: 0.9rem; }
.wd-gloss { font-weight: 600; }
.wd-grammar { color: var(--muted); }
.verse-actions { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; margin-top: 0.8rem; }
.record-group { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.record-group audio { height: 32px; }
.record-status { font-size: 0.78rem; font-family: var(--sans); }
.verse-translation {
  margin-top: 0.7rem;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.verse-translation p { margin: 0; font-size: 0.95rem; }

/* ============ 文化 ============ */
.culture-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.1rem;
}
.culture-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.3rem 1.4rem;
  color: var(--ink);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.culture-card:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--gold); }
.culture-card h2 { margin: 0.3rem 0 0.2rem; font-size: 1.18rem; }
.culture-card p { font-size: 0.9rem; color: var(--muted); }
.culture-index { font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.16em; color: var(--gold); }
.culture-sub { font-family: var(--sans); font-size: 0.8rem; color: var(--wine); margin-bottom: 0.5rem !important; }

.breadcrumb {
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 1rem;
  display: flex;
  gap: 0.4rem;
}
.article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 2.2rem;
  max-width: 860px;
  margin: 0 auto;
}
.article-head { border-bottom: 1px solid var(--line); padding-bottom: 1.2rem; margin-bottom: 1.4rem; }
.article-section { margin-bottom: 1.6rem; }
.article-section h2 { font-size: 1.2rem; border-left: 3px solid var(--gold); padding-left: 0.6rem; }
.article-section p { font-size: 0.98rem; }
.related-words { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.6rem; }
.related-word {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  padding: 0.55rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.rw-hebrew { font-family: var(--hebrew); font-size: 1.5rem; color: var(--wine); direction: rtl; }
.rw-translit { font-family: var(--sans); font-size: 0.74rem; letter-spacing: 0.08em; color: var(--muted); }
.rw-gloss { font-size: 0.85rem; }
.article-foot { display: flex; justify-content: space-between; gap: 0.7rem; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 1.2rem; }

/* ============ 占位/错误 ============ */
.placeholder {
  max-width: 640px;
  margin: 3rem auto;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2.4rem 2rem;
}
.placeholder .hero-actions { justify-content: center; }

/* ============ 页脚 ============ */
.site-footer {
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-deep) 70%, transparent);
}
.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.2rem 1.25rem;
  font-size: 0.8rem;
  color: var(--muted);
  font-family: var(--sans);
}
.footer-inner p { margin: 0 0 0.2rem; }

/* ============ 响应式 ============ */
@media (max-width: 940px) {
  .hero { grid-template-columns: 1fr; }
  .hero-card { justify-content: flex-start; }
  .vocab-layout, .two-col { grid-template-columns: 1fr; }
  .article { padding: 1.5rem 1.3rem; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .header-inner { flex-wrap: wrap; gap: 0.5rem; }
  .main-nav { order: 3; width: 100%; margin-left: 0; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 0.2rem; }
  .main-nav a { white-space: nowrap; }
  .header-actions { margin-left: auto; }
  .chart { height: 160px; gap: 0.3rem; }
  .grade-bar { grid-template-columns: repeat(2, 1fr); }
  .verse-hebrew { line-height: 1.9; }
  .page-head { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
