@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;600;700&family=Noto+Sans+SC:wght@300;400;500&family=Lora:ital,wght@0,400;0,600;1,400&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink:        #2b241c;
  --ink-2:      #5e4a38;
  --ink-3:      #75685d;
  --paper:      #fffaf3;
  --paper-2:    #fff3e3;
  --paper-3:    #ffe8cc;
  --red:        #f47c16;
  --red-light:  #fff0df;
  --gold:       #ff9a3d;
  --gold-light: #fff7ec;
  --teal:       #d86100;
  --teal-light: #fff3e3;
  --blue:       #8f4a13;
  --blue-light: #fff8ef;
  --border:     rgba(244,124,22,0.18);
  --r:          10px;
  --serif:      'Noto Serif SC', serif;
  --sans:       'Noto Sans SC', 'Lora', sans-serif;
  --shadow:     0 2px 12px rgba(169,85,12,0.12);
}

html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.75;
  min-height: 100vh;
}

/* ── NAV ── */
.topnav {
  position: sticky; top: 0; z-index: 200;
  background: rgba(255,250,243,0.96);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(169,85,12,0.04);
  backdrop-filter: blur(16px);
  display: flex; align-items: center;
  padding: 0 1.5rem; height: 66px; gap: 0;
}
.nav-logo {
  font-family: var(--serif); font-size: 17px; color: #fff;
  text-decoration: none; margin-right: 2rem; white-space: nowrap;
  display: flex; align-items: center; gap: 8px;
  border-radius: 8px;
}
.nav-logo img {
  display: block;
  width: 128px;
  height: 48px;
  object-fit: contain;
  object-position: left center;
}
.nav-logo-mark {
  width: 30px; height: 30px; border-radius: 6px;
  background: var(--red); display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: #fff; font-weight: 700;
}
.nav-links { display: flex; gap: 2px; overflow-x: auto; flex: 1; }
.nav-links a {
  white-space: nowrap; padding: 6px 12px; border-radius: 6px;
  font-size: 13px; color: var(--ink-3); text-decoration: none;
  transition: all 0.15s; font-weight: 300;
}
.nav-links a:hover { color: var(--red); background: var(--red-light); }
.nav-links a.active { color: #fff; background: var(--red); font-weight: 500; }

/* ── HERO BANNER ── */
.page-hero {
  background: var(--ink);
  color: #fff; padding: 3rem 2rem 2.5rem;
  position: relative; overflow: hidden;
}
.page-hero::after {
  content: attr(data-char);
  position: absolute; right: 1rem; top: 50%;
  transform: translateY(-50%);
  font-family: var(--serif); font-size: 12rem;
  color: rgba(255,255,255,0.04); line-height: 1;
  pointer-events: none;
}
.page-hero-inner { max-width: 900px; margin: 0 auto; position: relative; }
.page-label {
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--red); background: rgba(244,124,22,0.15);
  display: inline-block; padding: 3px 12px; border-radius: 20px;
  margin-bottom: 0.75rem; font-weight: 500;
}
.page-hero h1 {
  font-family: var(--serif); font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: 700; line-height: 1.2; margin-bottom: 0.5rem;
}
.page-hero p { font-size: 0.95rem; color: rgba(255,255,255,0.55); font-weight: 300; }

/* ── CONTENT WRAPPER ── */
.content-wrap { max-width: 900px; margin: 0 auto; padding: 2.5rem 1.5rem 4rem; }

/* ── SECTION LABELS ── */
.sec-label {
  font-size: 11px; font-weight: 500; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--red); margin-bottom: 0.4rem;
}
.sec-title {
  font-family: var(--serif); font-size: 1.3rem; font-weight: 700;
  color: var(--ink); margin-bottom: 1.2rem;
}
.section-block { margin-bottom: 3rem; }

/* ── CARD ── */
.card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--r); padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 1rem; }

/* ── BADGE ── */
.badge {
  display: inline-block; font-size: 11px; font-weight: 500;
  padding: 2px 10px; border-radius: 20px; letter-spacing: 0.04em;
}
.badge-red { background: var(--red); color: #fff; }
.badge-gold { background: var(--gold-light); color: var(--gold); border: 1px solid var(--gold); }
.badge-teal { background: var(--red-light); color: var(--red); }
.badge-blue { background: var(--blue-light); color: var(--blue); }
.badge-outline { border: 1px solid var(--border); color: var(--ink-3); }

/* ── BUTTONS ── */
.btn {
  display: inline-block; padding: 9px 22px; border-radius: 7px;
  font-family: var(--sans); font-size: 14px; font-weight: 500;
  cursor: pointer; border: none; text-decoration: none; transition: all 0.15s;
}
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: #d86100; transform: translateY(-1px); }
.btn-outline {
  background: transparent; color: var(--ink);
  border: 1.5px solid var(--border);
}
.btn-outline:hover { background: var(--paper-2); }

/* ── PINYIN ── */
.pinyin { font-style: italic; color: var(--gold); font-size: 0.9em; }

/* ── PAGE NAV FOOTER ── */
.page-footer-nav {
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid var(--border); padding-top: 2rem; margin-top: 2rem;
}
.page-footer-nav a {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--ink-2); text-decoration: none;
  padding: 8px 16px; border: 1px solid var(--border);
  border-radius: 7px; transition: all 0.15s;
}
.page-footer-nav a:hover { background: var(--paper-2); border-color: var(--red); color: var(--red); }

/* ── PROGRESS BAR ── */
.prog-dots { display: flex; gap: 6px; justify-content: center; margin: 1rem 0; }
.prog-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--paper-3); transition: background 0.2s;
}
.prog-dot.done { background: var(--red); }
.prog-dot.active { background: var(--red); width: 20px; border-radius: 4px; }

/* ── AUDIO BUTTON ── */
.audio-btn {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--gold-light); color: var(--gold);
  border: 1px solid rgba(255,154,61,0.3); border-radius: 20px;
  padding: 3px 12px; font-size: 12px; cursor: pointer;
  transition: all 0.15s; font-family: var(--sans);
}
.audio-btn:hover { background: var(--gold); color: #fff; border-color: var(--gold); }

/* ── NOTE BOX ── */
.note-box {
  border-left: 3px solid var(--gold); background: var(--gold-light);
  border-radius: 0 8px 8px 0; padding: 1rem 1.25rem; font-size: 14px;
  color: var(--ink-2); line-height: 1.8;
}
.tip-box {
  border-left: 3px solid var(--red); background: var(--red-light);
  border-radius: 0 8px 8px 0; padding: 1rem 1.25rem; font-size: 14px;
  color: var(--ink-2); line-height: 1.8;
}

/* animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.4s ease both; }
