:root {
  --ink: #183b32;
  --paper: #f5f0e6;
  --paper-deep: #ebe3d5;
  --accent: #c7543e;
  --muted: #78776f;
}

* { box-sizing: border-box; }

html { background: var(--ink); }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 18%, rgba(255,255,255,.45), transparent 22%),
    repeating-linear-gradient(0deg, rgba(23,63,53,.018) 0, rgba(23,63,53,.018) 1px, transparent 1px, transparent 4px),
    var(--paper);
  font-family: "DM Sans", "Noto Sans SC", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 120px rgba(47, 40, 29, .08);
}

.page-shell {
  width: min(1180px, calc(100% - 64px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 34px 0 28px;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(23,63,53,.34);
  font-size: 12px;
  letter-spacing: .15em;
}

.brand { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 11px; font-weight: 600; }
.brand-mark { display: grid; place-items: center; width: 31px; height: 31px; border: 1px solid var(--ink); border-radius: 50%; font-family: "Playfair Display", serif; letter-spacing: 0; }
.date { color: var(--muted); font-size: 10px; font-weight: 600; }

.hero { flex: 1; padding: clamp(42px, 7vh, 78px) 0 34px; }
.eyebrow { display: flex; align-items: center; gap: 12px; font-size: 10px; letter-spacing: .22em; font-weight: 600; color: var(--accent); }
.eyebrow span { width: 30px; height: 1px; background: var(--accent); }
.lesson-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, .65fr); gap: clamp(50px, 8vw, 110px); margin-top: 32px; align-items: start; }
.edition { font-size: 10px; letter-spacing: .14em; color: var(--muted); margin-bottom: 30px; }

blockquote {
  max-width: 770px;
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 500;
  font-size: clamp(47px, 6.5vw, 88px);
  line-height: .98;
  letter-spacing: -.045em;
  text-wrap: balance;
}

.phonetic { margin: 27px 0 24px; color: var(--muted); font-size: 14px; letter-spacing: .04em; }
.listen { appearance: none; border: 0; background: var(--ink); color: var(--paper); border-radius: 999px; padding: 10px 18px 10px 10px; display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font: 500 12px "DM Sans", sans-serif; transition: transform .2s, background .2s; }
.listen:hover { transform: translateY(-2px); background: #0c2f27; }
.listen:focus-visible { outline: 3px solid rgba(199,84,62,.36); outline-offset: 4px; }
.play-icon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); background: var(--paper); }
.sound-bars { height: 18px; display: none; gap: 3px; align-items: center; }
.sound-bars i { width: 2px; height: 30%; background: currentColor; animation: bounce .7s infinite alternate ease-in-out; }
.sound-bars i:nth-child(2) { animation-delay: .15s; height: 75%; }.sound-bars i:nth-child(3) { animation-delay: .3s; height: 50%; }.sound-bars i:nth-child(4) { animation-delay: .45s; height: 90%; }
.listen.playing .sound-bars { display: flex; }.listen.playing .play-icon { display: none; }
@keyframes bounce { to { height: 100%; } }

.note-card { border-top: 3px solid var(--ink); display: grid; grid-template-columns: 42px 1fr; gap: 18px; padding-top: 19px; }
.note-number { font-family: "Playfair Display", serif; font-style: italic; font-size: 22px; color: var(--accent); }
.label { font-size: 9px; letter-spacing: .18em; font-weight: 600; margin: 0 0 10px; color: var(--muted); }
.meaning { font: 500 21px/1.55 "Noto Sans SC", sans-serif; margin: 0; }
.usage { font: 300 14px/1.9 "Noto Sans SC", sans-serif; margin: 0; color: #4e5b56; }
.rule { height: 1px; background: rgba(23,63,53,.2); margin: 27px 0; }

.example-strip { border-top: 1px solid rgba(23,63,53,.3); margin-top: clamp(52px, 8vh, 82px); padding-top: 18px; display: grid; grid-template-columns: 170px 1fr; }
.dialogue { margin: 0; font-family: "Playfair Display", serif; font-size: clamp(17px, 2vw, 23px); display: flex; gap: 30px; flex-wrap: wrap; }
.dialogue span:last-child { color: var(--accent); font-style: italic; }
.archive { padding: 78px 0 68px; border-top: 1px solid rgba(23,63,53,.34); }
.archive-head { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 32px; }
.archive h2 { margin: 0; font: 500 clamp(38px, 5vw, 58px)/1 "Playfair Display", serif; letter-spacing: -.03em; }
.archive-head > p { max-width: 360px; margin: 0; color: var(--muted); font: 300 13px/1.8 "Noto Sans SC", sans-serif; text-align: right; }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(23,63,53,.24); border-left: 1px solid rgba(23,63,53,.24); }
.archive-card { min-height: 280px; padding: 24px; border-right: 1px solid rgba(23,63,53,.24); border-bottom: 1px solid rgba(23,63,53,.24); display: flex; flex-direction: column; background: rgba(255,255,255,.08); transition: background .2s, transform .2s; }
.archive-card:hover { background: rgba(255,255,255,.32); }
.card-meta { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 9px; letter-spacing: .14em; }
.card-listen { width: 31px; height: 31px; display: grid; place-items: center; border: 1px solid rgba(23,63,53,.35); background: transparent; color: var(--ink); border-radius: 50%; cursor: pointer; transition: background .2s, color .2s; }
.card-listen:hover, .card-listen.playing { background: var(--ink); color: var(--paper); }
.archive-card h3 { margin: 34px 0 17px; font: 500 27px/1.08 "Playfair Display", serif; letter-spacing: -.025em; text-wrap: balance; }
.card-meaning { margin: auto 0 0; padding-top: 24px; color: #4e5b56; font: 300 13px/1.7 "Noto Sans SC", sans-serif; border-top: 1px solid rgba(23,63,53,.15); }
.load-more { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 17px 2px 0; color: var(--ink); background: transparent; border: 0; font: 600 9px "DM Sans", sans-serif; letter-spacing: .18em; cursor: pointer; }
.load-more span { font-size: 16px; transition: transform .2s; }.load-more:hover span { transform: translateY(3px); }
footer { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid rgba(23,63,53,.34); padding: 20px 0 0; font-size: 10px; letter-spacing: .1em; color: var(--muted); }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 8px; }
.hint { font-family: "Noto Sans SC", sans-serif; letter-spacing: .08em; }
.corner-stamp { position: fixed; right: 18px; bottom: 18px; color: rgba(23,63,53,.22); font: 500 9px/1.3 "DM Sans", sans-serif; letter-spacing: .16em; writing-mode: vertical-rl; }
.corner-stamp span { font-size: 7px; }

@media (max-width: 760px) {
  .page-shell { width: min(100% - 36px, 640px); padding-top: 22px; }
  .topbar { padding-bottom: 13px; }
  .brand { font-size: 10px; }.date { font-size: 8px; }
  .hero { padding-top: 38px; }
  .lesson-grid { grid-template-columns: 1fr; gap: 54px; margin-top: 24px; }
  blockquote { font-size: clamp(46px, 14vw, 66px); }
  .phonetic { font-size: 12px; line-height: 1.6; }
  .note-card { grid-template-columns: 34px 1fr; }
  .example-strip { grid-template-columns: 1fr; gap: 7px; margin-top: 48px; }
  .dialogue { flex-direction: column; gap: 8px; }
  .archive { padding: 58px 0 48px; }
  .archive-head { align-items: start; flex-direction: column; gap: 15px; }
  .archive-head > p { text-align: left; }
  .card-grid { grid-template-columns: 1fr; }
  .archive-card { min-height: 235px; }
  footer { margin-top: 30px; }.hint { display: none; }.corner-stamp { display: none; }
}

@media (min-width: 761px) and (max-width: 1000px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }

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