:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
  color: #202124;
  background: #f5f6f8;
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.75; }
a { color: #b4232a; text-underline-offset: 3px; }
.page { width: min(860px, calc(100% - 32px)); margin: 36px auto 72px; }
.card { background: #fff; border: 1px solid #e1e4e8; border-radius: 12px; padding: clamp(24px, 5vw, 52px); box-shadow: 0 10px 35px rgba(20, 24, 32, .06); }
.eyebrow { margin: 0 0 8px; color: #b4232a; font-size: 13px; font-weight: 700; letter-spacing: .08em; }
h1 { margin: 0; font-size: clamp(28px, 5vw, 42px); line-height: 1.25; }
h2 { margin-top: 2em; padding-bottom: .28em; border-bottom: 1px solid #eceff2; }
h3 { margin-top: 1.7em; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 18px 0 34px; color: #68707a; font-size: 14px; }
.video-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: -16px 0 34px; }
.video-button, .video-close { border: 0; border-radius: 7px; cursor: pointer; font: inherit; font-weight: 700; }
.video-button { padding: 9px 14px; color: #fff; background: #b4232a; }
.video-button:hover { background: #961c22; }
/* 已发布的旧笔记也隐藏原视频跳转入口。 */
.video-link, .video-toolbar a { display: none; }
.video-dock { margin: 0 0 34px; overflow: hidden; border: 1px solid #d7dce2; border-radius: 10px; background: #15181c; }
.video-toolbar { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 10px 7px 14px; color: #fff; background: #20242a; font-size: 13px; }
.video-close { padding: 5px 9px; color: #e8ebee; background: #373d45; }
.video-close:hover { background: #4a525c; }
.video-frame { aspect-ratio: 16 / 9; }
.video-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.note { overflow-wrap: anywhere; }
.note img { max-width: 100%; }
.note pre { overflow-x: auto; padding: 16px; border-radius: 8px; background: #181b20; color: #eef1f4; }
.note code { font-family: "SFMono-Regular", Consolas, monospace; font-size: .9em; }
.note :not(pre) > code { padding: .15em .35em; border-radius: 4px; background: #f0f2f4; color: #9e1f26; }
.note blockquote { margin-left: 0; padding-left: 16px; border-left: 3px solid #cfd4da; color: #555d66; }
.note table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.note th, .note td { padding: 8px 12px; border: 1px solid #dfe3e8; text-align: left; }
.transcript { margin-top: 42px; border: 1px solid #dfe3e8; border-radius: 9px; background: #fafbfc; }
.transcript summary { cursor: pointer; padding: 14px 16px; font-weight: 700; }
.transcript pre { margin: 0; padding: 0 16px 18px; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; color: #4d545c; }
.home { min-height: calc(100vh - 108px); display: grid; place-items: center; text-align: center; }
.home p { color: #68707a; }
body.video-playing { height: 100dvh; overflow: hidden; }
.video-playing .page { height: 100%; margin: 0 auto; }
.video-playing .card { height: 100%; display: flex; flex-direction: column; overflow: hidden; padding: 0; border-radius: 0; }
.video-playing .video-dock { flex: none; margin: 0; border: 0; border-radius: 0; }
.video-playing .video-frame { width: min(100%, 640px, calc(40dvh * 16 / 9)); margin: 0 auto; }
.video-playing .note-reader { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: clamp(24px, 5vw, 52px); }
.video-playing .video-actions { display: none; }
@media (max-width: 560px) { .page { margin-top: 16px; } .card { border-radius: 9px; } }
@media (max-width: 560px) { .video-playing .page { width: 100%; margin: 0; } }
