/* ==========================================================================
   极简播客站 · 样式
   原则：无外部字体、无图片依赖、单列排版、克制的颜色、自动适配深色
   ========================================================================== */

:root {
  --bg: #fcfcfa;
  --fg: #1b1b19;
  --muted: #6d6d66;
  --line: #e7e7e0;
  --line-strong: #d5d5cb;
  --accent: #b4530a;
  --accent-soft: #f6ece2;
  --code-bg: #f4f4ef;
  --radius: 10px;
  --maxw: 46rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14140f;
    --fg: #e9e9e2;
    --muted: #9c9c92;
    --line: #2a2a24;
    --line-strong: #3a3a32;
    --accent: #e59a5e;
    --accent-soft: #2a2018;
    --code-bg: #1e1e18;
  }
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}


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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--bg);
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  z-index: 30;
}
.skip:focus { left: 12px; top: 12px; }

/* ---------- 布局 ---------- */

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 56px 22px 72px;
}

/* ---------- 头部 ---------- */

.site-head {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
}

.cover {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: var(--code-bg);
  flex: 0 0 auto;
  object-fit: cover;
}

.head-text { min-width: 0; }

.site-head h1 {
  margin: 0 0 6px;
  font-size: 26px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  font-weight: 650;
}

.tagline {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.65;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.links a {
  display: inline-block;
  font-size: 13px;
  line-height: 1;
  padding: 7px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--fg);
  text-decoration: none;
  transition: border-color .15s, background .15s, color .15s;
}
.links a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  text-decoration: none;
}

/* ---------- 列表标题 ---------- */

.list-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 34px 0 6px;
}

.list-head h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- 节目条目 ---------- */

.episodes {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ep {
  padding: 26px 0 24px;
  border-bottom: 1px solid var(--line);
}

.ep:first-child { padding-top: 18px; }

.ep-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.ep-no {
  display: inline-block;
  font-size: 11.5px;
  line-height: 1;
  padding: 4px 7px;
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent);
  letter-spacing: .03em;
}

.ep h3 {
  margin: 10px 0 8px;
  font-size: 19px;
  line-height: 1.45;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.ep-summary {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14.5px;
}

.ep-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.tag{
  font-size: 12px;
  color: var(--muted);
  background: var(--code-bg);
  border-radius: 4px;
  padding: 2px 6px;
  line-height: 1;
}

/* 按钮 */
.btn {
  font: inherit;
  font-size: 13.5px;
  line-height: 1;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.btn:active { transform: translateY(1px); }

.btn-play {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 550;
}
.btn-play svg { width: 13px; height: 13px; fill: currentColor; }
.btn-play:hover { background: var(--accent); color: var(--bg); border-color: var(--accent); }

.btn.is-playing { background: var(--accent); color: var(--bg); border-color: var(--accent); }

/* 笔记区 */
.notes-toggle[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }

.notes {
  margin-top: 18px;
  padding: 4px 0 0 16px;
  border-left: 2px solid var(--line-strong);
  animation: fade .18s ease-out;
}

@keyframes fade { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .notes { animation: none; }
}

/* ---------- 笔记正文排版 ---------- */

.notes > :first-child { margin-top: 0; }
.notes > :last-child { margin-bottom: 0; }

.notes p { margin: 0 0 14px; font-size: 15px; }
.notes h3,
.notes h4,
.notes h5,
.notes h6 {
  margin: 22px 0 10px;
  font-weight: 600;
  line-height: 1.4;
}
.notes h3 { font-size: 17px; }
.notes h4 { font-size: 16px; }
.notes h5 { font-size: 15px; color: var(--muted); }
.notes h6 { font-size: 14px; color: var(--muted); letter-spacing: .02em; }
.notes ul,
.notes ol { margin: 0 0 14px; padding-left: 22px; font-size: 15px; }
.notes li { margin: 5px 0; }

.notes blockquote {
  margin: 0 0 14px;
  padding: 2px 0 2px 14px;
  border-left: 3px solid var(--line-strong);
  color: var(--muted);
  font-size: 15px;
}

.notes hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 22px 0;
}

.notes img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 6px 0 14px;
  background: var(--code-bg);
}

.notes code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 13.5px;
  background: var(--code-bg);
  padding: 2px 5px;
  border-radius: 4px;
  word-break: break-word;
}

.notes pre.md-code {
  position: relative;
  margin: 0 0 16px;
  padding: 14px 15px;
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.65;
}

.notes pre.md-code code {
  background: none;
  padding: 0;
  font-size: 13px;
  white-space: pre;
}

.notes pre.md-code[data-lang]::before {
  content: attr(data-lang);
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--muted);
  text-transform: uppercase;
}

/* 表格 */
.notes .md-table {
  margin: 0 0 16px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.notes .md-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.notes .md-table th,
.notes .md-table td {
  text-align: left;
  padding: 9px 13px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.notes .md-table th {
  font-weight: 600;
  color: var(--fg);
  background: var(--code-bg);
}

.notes .md-table tr:last-child td { border-bottom: 0; }
.notes .md-table td { color: var(--muted); }

/* 嵌入区（小宇宙/B站/YouTube 等 iframe 占位） */
.embed {
  margin: 4px 0 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.embed iframe {
  display: block;
  width: 100%;
  border: 0;
}

/* ---------- 页脚 ---------- */

.site-foot {
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.site-foot p { margin: 0 0 6px; font-size: 13px; }

/* ---------- 小屏 ---------- */

@media (max-width: 560px) {
  .wrap { padding: 34px 18px 60px; }
  .site-head { gap: 14px; padding-bottom: 24px; }
  .cover { width: 58px; height: 58px; border-radius: 13px; }
  .site-head h1 { font-size: 22px; }
  .ep h3 { font-size: 17.5px; }
}

/* ---------- 打印 ---------- */

@media print {
  .ep-actions, .skip { display: none !important; }
  body { background: #fff; color: #000; }
  .notes { display: block !important; }
}
