:root {
  --paper: #f3efe6;
  --paper-deep: #ebe4d6;
  --surface: #faf7f1;
  --ink: #1c1916;
  --ink-soft: #4a453f;
  --muted: #7a7369;
  --line: rgba(28, 25, 22, 0.1);
  --navy: #1b3344;
  --navy-deep: #122432;
  --copper: #a66b3c;
  --gold: #c4a574;
  --cream: #e8dcc4;
  --shadow: 0 18px 40px rgba(18, 36, 50, 0.08);
  --radius: 16px;
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "Songti SC", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --max: 1120px;
  --header-h: 64px;
  --bottom-nav: 64px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.wrap {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  display: flex;
  align-items: center;
  backdrop-filter: blur(16px);
  background: rgba(243, 239, 230, 0.86);
  border-bottom: 1px solid var(--line);
}

.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0.28em;
  font-weight: 600;
}

.nav-desk {
  display: flex;
  gap: 28px;
  font-size: 14px;
  color: var(--ink-soft);
}

.nav-desk a {
  position: relative;
  padding: 6px 0;
}

.nav-desk a.is-active,
.nav-desk a:hover {
  color: var(--ink);
}

.nav-desk a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--copper);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--ink-soft);
}

.icon-btn:hover {
  background: rgba(28, 25, 22, 0.06);
  color: var(--ink);
}

.btn-ghost {
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink-soft);
}

.btn-ghost:hover {
  border-color: var(--ink);
  color: var(--ink);
}

/* Hero */
.hero {
  padding: 88px 0 56px;
  text-align: center;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.32em;
  color: var(--muted);
  text-transform: uppercase;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(56px, 11vw, 112px);
  letter-spacing: 0.22em;
  font-weight: 600;
  line-height: 1;
  margin: 22px 0 8px 18px;
}

.hero .tagline {
  margin-top: 22px;
  color: var(--ink-soft);
  font-size: 16px;
}

.hero-rule {
  width: 48px;
  height: 1px;
  margin: 28px auto 0;
  background: var(--gold);
}

/* Categories */
.cats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding-bottom: 56px;
}

.chip {
  height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink-soft);
  background: transparent;
}

.chip:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--surface);
}

/* Sections */
.section {
  padding: 12px 0 48px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-head h2 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
}

.more {
  font-size: 13px;
  color: var(--muted);
}

.more:hover {
  color: var(--copper);
}

/* Cards */
.grid {
  display: grid;
  gap: 18px;
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.cover {
  position: relative;
  height: 168px;
  padding: 18px;
  color: #f7f1e6;
  overflow: hidden;
}

.cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.28)),
    repeating-linear-gradient(-45deg, transparent 0 18px, rgba(255, 255, 255, 0.04) 18px 19px);
  pointer-events: none;
}

.cover .kicker,
.cover .title,
.cover .by {
  position: relative;
  z-index: 1;
}

.cover .kicker {
  font-size: 11px;
  letter-spacing: 0.18em;
  opacity: 0.72;
}

.cover .title {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.35;
  margin-top: 10px;
  max-width: 90%;
}

.cover .by {
  position: absolute;
  left: 18px;
  bottom: 16px;
  font-size: 12px;
  opacity: 0.8;
}

.c-navy { background: linear-gradient(145deg, #1b3344, #2c5364); }
.c-copper { background: linear-gradient(145deg, #8a4b2a, #c4894e); }
.c-ink { background: linear-gradient(145deg, #2a2622, #4a4239); }
.c-forest { background: linear-gradient(145deg, #24382c, #4d6a52); }
.c-wine { background: linear-gradient(145deg, #5a2a2e, #8d4a46); }
.c-dusk { background: linear-gradient(145deg, #3a3d5c, #6d6a8d); }
.c-sand { background: linear-gradient(145deg, #8d6e4a, #c4a574); color: #231c14; }
.c-sand .kicker,
.c-sand .by { color: rgba(35, 28, 20, 0.7); }

.meta {
  padding: 14px 16px 16px;
}

.meta h3 {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
}

.meta p {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.meta .row {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 12px;
  color: var(--ink-soft);
}

.price,
.soon {
  color: var(--muted);
  font-weight: 500;
}

/* Horizontal audio / column cards */
.list-card {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 14px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  align-items: center;
}

.list-card:hover {
  box-shadow: var(--shadow);
}

.thumb {
  width: 88px;
  height: 88px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #f7f1e6;
  font-family: var(--serif);
  font-size: 15px;
  text-align: center;
  padding: 8px;
  line-height: 1.3;
}

.list-card > div:last-child {
  min-width: 0;
}

.list-card h3 {
  font-size: 15px;
  font-weight: 600;
}

.list-card p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.list-card .row {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--ink-soft);
}

.play {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  margin-left: auto;
  flex-shrink: 0;
  font-size: 10px;
}

.page-spacer {
  height: 48px;
}

/* Page title for inner pages */
.page-hero {
  padding: 48px 0 28px;
}

.page-hero h1 {
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 600;
}

.page-hero p {
  margin-top: 8px;
  color: var(--muted);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.filter {
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
  border: 1px solid transparent;
}

.filter.is-on,
.filter:hover {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

/* Mine */
.profile {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 28px;
  background: var(--navy);
  color: #f7f1e6;
  border-radius: 20px;
  margin-bottom: 24px;
}

.avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--gold), var(--copper));
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 22px;
  color: var(--navy-deep);
}

.profile h2 {
  font-family: var(--serif);
  font-size: 22px;
}

.profile p {
  opacity: 0.72;
  font-size: 13px;
  margin-top: 4px;
}

.menu {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  font-size: 14px;
}

.menu a span {
  color: var(--muted);
  font-size: 18px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 18px 0 28px;
}

.stat {
  text-align: center;
  padding: 18px 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.stat b {
  display: block;
  font-family: var(--serif);
  font-size: 22px;
}

.stat small {
  color: var(--muted);
  font-size: 12px;
}

/* Legal */
.legal {
  max-width: 720px;
  padding: 48px 0 80px;
}

.legal h1 {
  font-family: var(--serif);
  font-size: 32px;
  margin-bottom: 8px;
}

.legal .date {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 28px;
}

.legal h2 {
  font-family: var(--serif);
  font-size: 18px;
  margin: 28px 0 8px;
}

.legal p,
.legal li {
  color: var(--ink-soft);
  font-size: 14px;
}

.legal ul {
  padding-left: 18px;
}

.legal li + li {
  margin-top: 6px;
}

/* Footer */
.footer {
  border-top: 1px solid var(--line);
  padding: 36px 0 108px;
  color: var(--muted);
  font-size: 12px;
}

.footer .brand {
  font-family: var(--serif);
  color: var(--ink);
  letter-spacing: 0.24em;
  font-size: 14px;
  margin-bottom: 10px;
}

.footer a:hover {
  color: var(--ink);
}

.footer .links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 12px 0;
}

.beian {
  color: var(--muted);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(18, 36, 50, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: min(360px, calc(100% - 40px));
  background: var(--surface);
  border-radius: 18px;
  padding: 32px 28px 24px;
  text-align: center;
  box-shadow: var(--shadow);
}

.modal-card .mark {
  width: 42px;
  height: 42px;
  margin: 0 auto 14px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  display: grid;
  place-items: center;
  color: var(--copper);
  font-family: var(--serif);
}

.modal-card h3 {
  font-family: var(--serif);
  font-size: 20px;
}

.modal-card p {
  margin: 8px 0 20px;
  color: var(--muted);
  font-size: 13px;
}

.modal-card button {
  height: 40px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--navy);
  color: #f7f1e6;
  font-size: 13px;
}

/* Mobile nav */
.nav-mobile {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--bottom-nav);
  background: rgba(250, 247, 241, 0.94);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  z-index: 40;
  padding-bottom: env(safe-area-inset-bottom);
}

.nav-mobile a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
}

.nav-mobile a.is-active {
  color: var(--navy);
}

.nav-mobile svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .nav-desk { display: none; }
  .nav-mobile { display: flex; }
}

@media (max-width: 640px) {
  .wrap { width: min(var(--max), calc(100% - 28px)); }
  .hero { padding: 56px 0 36px; }
  .hero h1 { letter-spacing: 0.12em; margin-left: 8px; }
  .grid-4,
  .grid-3,
  .grid-2 { grid-template-columns: 1fr; }
  .menu { grid-template-columns: 1fr; }
  .cover { height: 148px; }
  .btn-ghost { display: none; }
}

.doc-page {
  padding: 28px 0 48px;
}

.back {
  display: inline-block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 18px;
}

.back:hover {
  color: var(--copper);
}

.doc-cover {
  border-radius: 20px;
  min-height: 180px;
  padding: 28px;
  color: #f7f1e6;
  margin-bottom: 20px;
}

.doc-cover .kicker {
  font-size: 11px;
  letter-spacing: 0.2em;
  opacity: 0.7;
}

.doc-cover h1 {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 40px);
  margin: 12px 0 8px;
  font-weight: 600;
}

.doc-cover p {
  opacity: 0.8;
  font-size: 14px;
}

.doc-lead {
  font-size: 16px;
  color: var(--ink-soft);
}

.doc-sub {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}

.player-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 22px 0 8px;
}

.btn-primary {
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--navy);
  color: #f7f1e6;
  font-size: 13px;
}

.player-bar .btn-ghost {
  display: inline-flex;
  align-items: center;
}

#speech-status {
  font-size: 12px;
  color: var(--muted);
}

.notice {
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0 24px;
}

.article {
  max-width: 720px;
}

.article h2 {
  font-family: var(--serif);
  font-size: 20px;
  margin: 28px 0 10px;
}

.article p {
  font-size: 16px;
  line-height: 1.9;
  color: var(--ink-soft);
  margin-bottom: 16px;
}

.reader {
  font-family: var(--serif);
}
