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

:root {
  --text: #242424;
  --text2: #6b6b6b;
  --text3: #b3b3b3;
  --border: #f2f2f2;
  --accent: #c9885c;
  --bg: #fff;
}

::selection { background: rgba(201, 136, 92, 0.15); }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Noto Sans TC", "PingFang TC", "Hiragino Sans", "Microsoft JhengHei", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* Layout */
.wrap { max-width: 728px; width: 100%; margin: 0 auto; padding: 0 24px; }

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(180%) blur(20px);
  background: rgba(255,255,255,0.72);
}
header .wrap { height: 57px; display: flex; align-items: center; justify-content: space-between; }
.site-name { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.site-name:hover { color: var(--accent); }

/* Main */
main { flex: 1; }
main > .wrap { padding-top: 52px; padding-bottom: 80px; }

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 48px 24px;
  text-align: center;
  font-size: 13px;
  color: var(--text3);
  letter-spacing: 0.02em;
}

/* ─── Index ─── */
.questions a {
  display: flex;
  align-items: baseline;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  transition: all 0.2s ease;
}
.questions a:hover {
  padding-left: 6px;
  color: var(--text);
}
.questions a:hover .num { color: var(--accent); }
.num {
  width: 28px;
  text-align: right;
  margin-right: 16px;
  flex-shrink: 0;
  font-size: 14px;
  color: var(--text3);
  font-variant-numeric: tabular-nums;
  transition: color 0.2s;
}
.questions .title {
  font-size: 18px;
  line-height: 1.7;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* ─── Article ─── */
.back {
  display: inline-block;
  font-size: 14px;
  color: var(--text2);
  margin-bottom: 32px;
  letter-spacing: 0.01em;
  transition: color 0.15s;
}
.back:hover { color: var(--accent); }

article h1 {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  word-break: keep-all;
}

.article-meta {
  font-size: 14px;
  color: var(--text2);
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

audio {
  width: 100%;
  height: 40px;
  border-radius: 20px;
  margin-bottom: 48px;
}

/* Prose — Medium-style Chinese reading */
.prose {
  font-size: 20px;
  line-height: 2;
  letter-spacing: 0.03em;
  overflow-wrap: break-word;
  word-break: break-all;
}
.prose p { margin-bottom: 2em; }
.prose p:last-child { margin-bottom: 0; }

.prose blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 20px;
  margin: 2em 0;
  color: var(--text2);
  font-style: normal;
}

.prose h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 2.5em 0 0.8em;
  line-height: 1.4;
}
.prose h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 2em 0 0.5em;
  line-height: 1.5;
}
.prose strong { font-weight: 700; }

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(201,136,92,0.3);
  text-decoration-thickness: 1.5px;
  transition: text-decoration-color 0.2s;
}
.prose a:hover { text-decoration-color: var(--accent); }

.prose ul, .prose ol { padding-left: 1.5em; margin-bottom: 2em; }
.prose li { margin-bottom: 0.6em; }

.prose hr {
  border: none;
  text-align: center;
  margin: 3em 0;
}
.prose hr::before {
  content: "···";
  color: var(--text3);
  letter-spacing: 1em;
  font-size: 20px;
}

/* Article nav */
.article-nav {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  font-size: 15px;
  line-height: 1.5;
}
.article-nav a {
  color: var(--text2);
  max-width: 45%;
  transition: color 0.15s;
}
.article-nav a:hover { color: var(--accent); }
.article-nav .next { margin-left: auto; text-align: right; }

/* YouTube */
.video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin-bottom: 48px;
  border-radius: 8px;
}
.video-wrap iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}

/* Responsive */
@media (max-width: 600px) {
  article h1 { font-size: 26px; }
  .prose { font-size: 18px; }
  main > .wrap { padding-top: 36px; padding-bottom: 60px; }
}
