:root {
  --paper: #f4efe5; --surface: #fcf9f2; --ink: #29261f; --muted: #6b6255;
  --rule: #c9bfaf; --accent: #913f2c; --active: #f0e0d4; --error: #8a2f25;
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  color: var(--ink); background: var(--paper); font-size: 16px; line-height: 1.6;
  font-synthesis: none; text-size-adjust: 100%; -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, select, input { font: inherit; color: inherit; }
button, select { cursor: pointer; }
button { border: 0; background: none; }
button:disabled, select:disabled { cursor: wait; opacity: .6; }
button, a, select, input { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
a { color: inherit; text-underline-offset: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 100; background: var(--surface); padding: 12px; }
.skip-link:focus { top: 16px; }
.library { max-width: 1144px; margin: auto; padding: 44px 32px max(24px, env(safe-area-inset-bottom)); }
.masthead { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-bottom: 20px; border-bottom: 2px solid var(--ink); }
h1 { font-family: "Songti SC", "STSong", Georgia, serif; font-size: 34px; line-height: 1.4; font-weight: 600; margin: 0; letter-spacing: .025em; }
.title-dot { padding: 0 .1em; }
.index-mark { margin: 0; color: var(--accent); font-size: 14px; white-space: nowrap; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 20px; }
.sort-field { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); }
select { background: var(--surface); border: 1px solid var(--rule); border-radius: 3px; padding: 8px 28px 8px 12px; min-height: 44px; font-size: 14px; color: var(--ink); }
.collection-count { margin: 0; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.filters { display: flex; flex-wrap: wrap; align-items: center; column-gap: 8px; row-gap: 4px; padding: 16px 0 18px; }
.filter { min-height: 44px; max-width: 100%; overflow-wrap: anywhere; padding: 8px 13px; border-radius: 3px; color: var(--muted); font-size: 14px; border: 1px solid transparent; transition: background-color 120ms linear, color 120ms linear; }
.filter[aria-pressed="true"] { color: var(--accent); background: var(--active); border-color: #ceac98; font-weight: 500; }
.filter:active, .outline-button:active { background: #e7d6c7; }
.list-heading { display: grid; grid-template-columns: 68px 1fr; column-gap: 24px; padding: 10px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); color: var(--muted); font-size: 14px; }
.video-list { list-style: none; padding: 0; margin: 0; scroll-margin-top: 16px; }
.video-row { padding: 24px 0; border-bottom: 1px solid var(--rule); }
.entry-head { display: grid; grid-template-columns: 68px 176px minmax(0,1fr); align-items: start; gap: 24px; }
.entry-date { display: flex; flex-direction: column; color: var(--muted); line-height: 1.7; font-size: 14px; font-variant-numeric: tabular-nums; }
.date-day { font-family: Georgia, "Times New Roman", serif; color: var(--accent); font-size: 22px; line-height: 1.35; }
.cover-button { display: block; position: relative; padding: 0; width: 100%; aspect-ratio: 16/9; border-radius: 2px; overflow: hidden; background: #ddd4c5; }
.cover-image { display: block; width: 100%; height: 100%; object-fit: cover; }
.cover-play { display: grid; place-items: center; position: absolute; width: 32px; height: 32px; right: 8px; bottom: 8px; color: #fff; border-radius: 50%; background: rgba(26,23,20,.78); }
.cover-play svg { width: 16px; height: 16px; margin-left: 2px; }
.cover-unavailable { position: absolute; inset: 0; display: grid; place-items: center; font-size: 14px; color: var(--muted); }
.entry-copy { min-width: 0; }
.entry-title { margin: -3px 0 8px; font-size: 18px; font-weight: 500; line-height: 1.6; overflow-wrap: anywhere; }
.title-button { display: block; text-align: left; padding: 0; line-height: inherit; font-weight: inherit; font-size: inherit; min-height: 44px; text-decoration: none; }
.entry-summary { margin: 0 0 12px; font-size: 16px; line-height: 1.75; color: var(--muted); overflow-wrap: anywhere; text-wrap: pretty; }
.entry-tags { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); font-size: 14px; }
.entry-tag { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.entry-tag::before { content: "#"; color: #8d7c67; margin-right: 2px; }
.entry-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 20px; margin-top: 2px; min-height: 44px; font-size: 14px; color: var(--muted); }
.duration { font-variant-numeric: tabular-nums; white-space: nowrap; }
.player-frame { width: 100%; aspect-ratio: 16/9; background: #171614; color: rgba(255,255,255,.9); }
.player-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; padding-top: 10px; font-size: 14px; }
.speed-field { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.speed-field select { padding-right: 24px; min-width: 78px; }
.text-button { font-size: 14px; color: var(--accent); padding: 8px 0; min-height: 44px; }
.playback-error { margin: 12px 0 0; color: var(--error); font-size: 14px; }
.playback-error button { text-decoration: underline; text-underline-offset: 4px; }
.empty-state, .error-state { text-align: center; padding: 64px 16px; border-bottom: 1px solid var(--rule); }
.empty-state h2, .error-state h2 { margin: 0 0 12px; font-size: 18px; line-height: 1.6; font-weight: 500; overflow-wrap: anywhere; }
.empty-state p, .error-state p { color: var(--muted); margin: 0 0 16px; font-size: 14px; }
.loading { color: var(--muted); text-align: center; padding: 48px 0; font-size: 14px; }
.outline-button { padding: 9px 16px; min-height: 44px; border: 1px solid var(--rule); border-radius: 3px; background: var(--surface); font-size: 14px; }
.page-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 28px; color: var(--muted); font-size: 14px; }
.page-footer a { min-height: 44px; display: inline-flex; align-items: flex-start; text-decoration: none; }
.art-video-player { font-family: inherit !important; font-size: 14px !important; }
.art-video-player [role="button"]:focus-visible, .art-video-player [role="slider"]:focus-visible { outline-color: #f4efe5; outline-offset: -2px; }
.art-video-player.art-fullscreen-web { height: 100dvh !important; }
.art-video-player .art-settings { max-height: min(310px,70vh); overflow-y: auto; }
.watch-page { max-width: 1144px; margin: auto; padding: 24px 32px max(40px,env(safe-area-inset-bottom)); }
.watch-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 16px; border-bottom: 2px solid var(--ink); }
.back-list { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; color: var(--accent); text-decoration: none; }
.watch-brand { font-family: "Songti SC", "STSong", Georgia, serif; font-size: 20px; font-weight: 600; text-decoration: none; }
.watch-heading { padding: 24px 0 18px; }
.watch-title { font: 500 24px/1.6 -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif; letter-spacing: 0; overflow-wrap: anywhere; }
.watch-meta { margin: 8px 0 0; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.watch-frame { max-height: 70dvh; }
.watch-details { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--rule); }
.watch-summary { max-width: 78ch; margin-top: 24px; }
.watch-summary h2 { margin: 0 0 10px; font-size: 16px; font-weight: 500; }
.watch-summary p { margin: 0; font-size: 16px; line-height: 1.85; overflow-wrap: anywhere; text-wrap: pretty; }
@media (max-width: 767px) { .entry-summary { display: none; } }
@media (hover: hover) and (pointer: fine) {
  .filter:hover, .outline-button:hover { background: var(--surface); color: var(--ink); }
  .filter[aria-pressed="true"]:hover { background: var(--active); color: var(--accent); }
  .title-button:hover, .text-button:hover, .page-footer a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
  .cover-button:hover .cover-play { background: var(--accent); }
  .back-list:hover, .watch-brand:hover { color: var(--accent); text-decoration: underline; }
}
@media (max-width: 640px) {
  .library { padding: 24px 16px max(20px,env(safe-area-inset-bottom)); }
  .masthead { padding-bottom: 16px; align-items: center; gap: 8px; }
  h1 { font-size: 28px; }
  .index-mark { font-size: 14px; }
  .toolbar { gap: 8px; padding-top: 16px; }
  .sort-field { gap: 8px; }
  .sort-field select { padding-left: 8px; padding-right: 18px; }
  .filters { padding-top: 12px; padding-bottom: 12px; column-gap: 2px; }
  .filter { padding: 8px 10px; }
  .list-heading { grid-template-columns: 46px 1fr; gap: 12px; }
  .date-prefix { display: none; }
  .video-row { padding: 20px 0; }
  .entry-head { grid-template-columns: 46px 80px minmax(0,1fr); gap: 12px; }
  .date-day { font-size: 18px; }
  .entry-title { font-size: 16px; margin-bottom: 6px; }
  .entry-tags { gap: 2px 8px; }
  .entry-meta { gap: 0 12px; }
  .cover-play { width: 24px; height: 24px; bottom: 4px; right: 4px; }
  .cover-play svg { width: 12px; height: 12px; }
  .player-tools { column-gap: 14px; }
  .page-footer { padding-top: 20px; }
  .watch-page { padding: 16px 16px max(28px,env(safe-area-inset-bottom)); }
  .watch-brand { font-size: 18px; }
  .watch-heading { padding: 20px 0 16px; }
  .watch-title { font-size: 20px; }
  .watch-details { margin-top: 18px; }
}
@media (max-width: 359px) {
  .index-mark { display: none; }
  .entry-head { grid-template-columns: 80px minmax(0,1fr); }
  .entry-date { grid-column: 1/-1; flex-direction: row; align-items: baseline; gap: 8px; }
  .entry-date .date-year { order: -1; }
  .list-heading { display: none; }
  .video-list { border-top: 1px solid var(--rule); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
