:root {
  color-scheme: light;
  --paper: #f8f4ed;
  --panel: #fffdf9;
  --ink: #25201e;
  --subtle: #655954;
  --line: #ded4c9;
  --red: #942d2b;
  --wine: #542022;
  --rose: #f4e5df;
  --gold: #e7c192;
  --title: "Noto Serif CJK SC", "Songti SC", "STSong", "SimSun", serif;
  --body: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
}
*, *::before, *::after { box-sizing: border-box }
body { margin: 0; min-width: 0 }
a, button, input, summary { -webkit-tap-highlight-color: transparent }
a { color: inherit; text-decoration: none }
button, input, textarea { font: inherit }
button, summary { cursor: pointer }
button { color: inherit }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}
[hidden] { display: none !important }
p, h1, h2, h3 { margin: 0 }
img { max-width: 100%; height: auto; display: block }
.wrap { width: min(1120px, calc(100% - 56px)); margin-inline: auto }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap }
.skip:focus { position: fixed; top: 8px; left: 12px; z-index: 10; background: var(--panel); color: var(--red); padding: 10px 14px }
.topbar { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 2 }
.top-inner, .brand, .topbar nav { display: flex; align-items: center }
.top-inner { min-height: 66px; justify-content: space-between; gap: 12px }
.brand { gap: 12px; font-size: 15px; font-weight: 750; white-space: nowrap; min-height: 44px }
.brand img { width: 72px; height: 42px; object-fit: contain }
.brand span { border-left: 1px solid var(--line); padding-left: 12px }
.topbar nav { gap: 5px; font-size: 15px }
.topbar nav a, .search-button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 13px;
  border-radius: 6px;
  white-space: nowrap;
}
.topbar nav a[aria-current], .topbar nav a:hover { color: var(--red); background: var(--rose) }
.search-button { gap: 9px; color: var(--red); border: 1px solid var(--line); background: var(--panel); margin-left: 7px }
.glass { width: 13px; height: 13px; border: 1.8px solid currentColor; border-radius: 50%; position: relative; margin-right: 3px }
.glass::after { content: ""; position: absolute; width: 6px; border-top: 1.8px solid; transform: rotate(46deg); right: -5px; bottom: -3px }
main { min-height: 68vh; padding-top: 34px }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  align-items: center;
  gap: 35px;
  background: var(--wine);
  color: #fff8ed;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 48px 53px;
  border-radius: 16px 16px 6px 6px;
}
.hero::before {
  content: "";
  pointer-events: none;
  position: absolute;
  z-index: -1;
  inset: 9px;
  border: 1px solid #a46d57;
  border-radius: 10px 10px 3px 3px;
}
.hero-label { color: var(--gold); font-size: 15px; font-weight: 700; letter-spacing: .09em; margin-bottom: 13px }
.hero h1 { font-family: var(--title); font-size: clamp(2.05rem, 4vw, 3.35rem); line-height: 1.22; font-weight: 800; letter-spacing: .015em; max-width: 13em }
.hero-sub { color: #f1dbce; margin: 15px 0 23px }
.hero-button { display: inline-flex; min-height: 44px; align-items: center; padding: 0 17px; background: var(--gold); color: #381d18; border-radius: 6px; font-weight: 750 }
.hero-button:hover { background: #f1d4ad }
.hero a:focus-visible { outline-color: var(--gold) }
.hero-graphic { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; color: var(--gold) }
.hero-graphic span { display: grid; place-items: center; font-family: var(--title); font-size: clamp(1rem, 2.7vw, 2.15rem); border: 1px solid #b77b60; border-radius: 4px; aspect-ratio: .81; background: #683133; }
.chapter-rule { grid-column: 1/-1; height: 5px; border-top: 1px solid #a46d57; border-bottom: 1px solid #a46d57; margin-block: 3px }
.home-main { display: grid; grid-template-columns: minmax(0, 1fr) 258px; align-items: start; gap: 25px; margin-top: 33px }
.home-schedule { min-width: 0 }
.section-heading { display: flex; align-items: baseline; flex-wrap: wrap; justify-content: space-between; column-gap: 12px; margin-bottom: 13px }
.section-heading h2, .quick-panel h2 { font-family: var(--title); font-weight: 800; font-size: 1.63rem }
.section-heading > span { color: var(--subtle); font-size: .9rem }
.phase-line { min-height: 60px; display: flex; gap: 12px; align-items: center; padding: 9px 13px; border: 1px solid var(--line); background: var(--panel); border-radius: 6px }
.phase-line > span:last-child { color: var(--subtle); margin-left: auto; font-size: .9rem }
.phase-mark { border-bottom: 2px solid #bd7a65; color: var(--red); min-width: 27px; font-size: .85rem; font-weight: 800; letter-spacing: .04em; text-align: center }
.course-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 12px 0 }
.course-grid a { display: flex; flex-direction: column; align-items: start; background: var(--panel); border: 1px solid var(--line); border-radius: 7px; padding: 12px 11px; min-height: 120px; gap: 11px }
.course-grid a:hover, .phase-line:hover { border-color: #b07261; background: #fff8f2 }
.course-seal { display: grid; place-items: center; width: 35px; height: 35px; border: 1px solid #c99a8b; border-radius: 5px; background: var(--rose); color: var(--wine); font: 700 1.27rem var(--title) }
.course-name { display: grid; gap: 2px; min-width: 0 }
.course-name > span { color: var(--subtle); font-size: .85rem }
.course-name strong { font-size: clamp(.87rem, 1.35vw, 1rem); line-height: 1.36; font-weight: 800 }
.closure-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px }
.closure-links .phase-line { min-height: 55px }
.quick-panel { background: #f4ebe1; border: 1px solid var(--line); padding: 15px 18px 6px; border-radius: 7px }
.quick-panel h2 { margin-bottom: 7px; font-size: 1.35rem }
.quick-panel a { display: grid; gap: 3px; border-top: 1px solid var(--line); padding: 12px 0 }
.quick-panel a:hover strong { text-decoration: underline; text-underline-offset: 4px }
.quick-panel strong { color: var(--wine) }
.quick-panel a span { color: var(--subtle); font-size: .89rem }
.footer { margin-top: 42px; padding: 12px 0 18px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--subtle); font-size: .88rem }
.footer button { padding: 0 3px; min-height: 44px; border: 0; background: transparent; color: var(--red); font-size: inherit }
.footer button:hover { text-decoration: underline }
.breadcrumbs { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; color: var(--subtle); font-size: .88rem; margin-bottom: 13px }
.breadcrumbs a { color: var(--red); min-height: 44px; display: inline-flex; align-items: center }
.day-head { display: flex; align-items: center; gap: 18px; border-bottom: 1px solid var(--line); padding-bottom: 20px }
.day-stamp { flex: 0 0 64px; height: 64px; display: grid; place-items: center; background: var(--wine); border-radius: 8px; color: var(--gold); font: 800 1.96rem var(--title) }
.day-kicker { color: var(--red); font-size: .9rem; font-weight: 750 }
.day-head h1, .tool-heading h1 { font: 800 clamp(2rem, 4vw, 2.85rem)/1.24 var(--title); margin: 2px 0 6px }
.day-head p:last-child { color: var(--subtle) }
.day-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0 24px }
.day-tabs a, .filter-row button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 0 12px; border-radius: 6px; color: var(--subtle); border: 1px solid var(--line); background: var(--panel); font-size: .9rem; white-space: nowrap }
.day-tabs a[aria-current], .filter-row button[aria-pressed="true"] { border-color: #bf8a79; background: var(--rose); color: var(--wine); font-weight: 750 }
.day-tabs a:hover, .filter-row button:hover, .time-links a:hover { color: var(--red); border-color: #b07261 }
.day-layout { display: grid; grid-template-columns: 218px minmax(0, 1fr); gap: 27px; align-items: start }
.time-index { background: var(--panel); border: 1px solid var(--line); border-radius: 7px; padding: 14px; position: sticky; top: 82px }
.time-index h2 { font-size: 1.08rem; margin: 0 0 10px }
.time-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px }
.time-links a { min-height: 44px; align-items: center; justify-content: center; display: flex; font-variant-numeric: tabular-nums; font-size: .9rem; font-weight: 700; border: 1px solid var(--line); border-radius: 5px; background: var(--paper); color: var(--wine) }
.time-links a[aria-current] { background: var(--wine); color: #fff; border-color: var(--wine) }
.recording-link { display: flex; min-height: 44px; align-items: center; font-size: .9rem; color: var(--red); margin-top: 5px }
.timeline { min-width: 0 }
.filter-row { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px }
.time-group { font-size: .9rem; color: var(--red); margin-top: 16px; margin-bottom: 7px; letter-spacing: .04em }
.task { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; margin-bottom: 7px; scroll-margin-top: 82px }
.task[open], .task:target { border-color: #bd8573 }
.task summary, .reference summary { padding: 10px 15px; display: flex; align-items: center; gap: 12px; min-height: 61px; list-style: none }
summary::-webkit-details-marker { display: none }
summary::marker { content: "" }
.task summary:hover, .reference summary:hover { background: #fbf1e9 }
.task-time { font-size: 1.04rem; font-variant-numeric: tabular-nums; color: var(--wine); font-weight: 780; min-width: 61px; flex-shrink: 0; }
.key-time { color: var(--red) }
.task-label { display: grid; gap: 2px; flex: 1 1 auto; overflow-wrap: anywhere }
.task-label > span { color: var(--subtle); font-size: .85rem }
.chevron { display: block; margin-left: auto; margin-right: 3px; border: solid var(--red); border-width: 0 1.6px 1.6px 0; width: 8px; height: 8px; transform: rotate(45deg); flex-shrink: 0 }
details[open] > summary .chevron { transform: rotate(225deg) }
.task-content, .reference-body { border-top: 1px solid var(--line); padding: 14px 15px }
.action-note { color: var(--subtle); margin-bottom: 10px; font-size: .91rem }
.action-note strong { color: var(--wine) }
.message { padding: 14px; min-width: 0; background: #faf1e7; border-radius: 6px }
.message.has-poster { display: grid; grid-template-columns: minmax(0,1fr) 137px; align-items: start; gap: 14px }
.message-text { white-space: pre-line; line-height: 1.75; overflow-wrap: anywhere }
mark { background: #f8dbb8; color: #63352a; border-radius: 2px }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px }
.primary, .plain { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 13px; border-radius: 6px; border: 1px solid transparent; background: var(--red); color: #fff; font-size: .9rem; font-weight: 710; text-align: center }
.plain { background: var(--panel); color: var(--wine); border-color: var(--line) }
.primary:hover { background: var(--wine) }
.plain:hover { border-color: #b07261 }
.asset-preview { display: grid; padding: 5px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; gap: 3px; color: var(--wine); text-align: left; font-size: .83rem }
.asset-preview img { aspect-ratio: 3/4; width: 100%; border-radius: 3px; object-fit: contain; background: var(--paper) }
.asset-preview span { padding: 7px 4px 3px }
.asset-preview:hover { border-color: #b07261 }
.video-asset { max-width: 620px; margin-top: 14px; padding: 11px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper) }
.video-header { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding-bottom: 8px }
.video-header h3 { font-size: 1rem }
.video-header span { color: var(--subtle); font-variant-numeric: tabular-nums; font-size: .9rem }
.video-asset video { display: block; width: 100%; aspect-ratio: 16 / 9; background: var(--ink); border-radius: 4px }
.video-asset .actions { margin-top: 9px }
.check-task { display: inline-flex; min-height: 44px; align-items: center; gap: 8px; color: var(--subtle); font-size: .88rem; margin-top: 5px; }
.check-task input { width: 17px; height: 17px; accent-color: var(--red) }
.reference { border: 1px solid var(--line); background: var(--panel); border-radius: 6px; margin-bottom: 8px; scroll-margin-top: 82px }
.reference summary { font-weight: 750 }
.recording { margin-top: 18px }
.reference-body > p + button { margin-top: 12px }
.reference-body h3 { margin-top: 12px; margin-bottom: 6px; font-size: 1rem }
.tool-heading { border-bottom: 1px solid var(--line); padding-bottom: 12px }
.tool-body { max-width: 830px }
.tool-intro { color: var(--subtle); margin-bottom: 12px }
.library-list article { padding: 12px 10px; border-bottom: 1px solid var(--line) }
.library-list article:last-child { border-bottom: 0 }
.library-list article p { margin-bottom: 9px }
.checklist { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 5px 13px }
.checklist ul { padding-left: 1.35rem }
.checklist li + li { margin-top: 4px }
dialog { width: min(590px, calc(100% - 24px)); max-height: 88vh; padding: 15px 17px; border: 1px solid #a67d70; border-radius: 9px; background: var(--panel); color: var(--ink); overflow: auto }
dialog::backdrop { background: #2e1817a8 }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 13px }
.dialog-head h2 { font-size: 1.22rem }
#search-box, #manual-copy { width: 100%; min-height: 46px; border: 1px solid #af8980; padding: 8px 12px; border-radius: 6px; background: #fff; color: var(--ink) }
#manual-copy { min-height: 115px }
.search-result { display: grid; gap: 4px; padding: 10px 6px; border-bottom: 1px solid var(--line) }
.search-result:hover { background: var(--rose) }
.search-result span, .empty, .result-count { color: var(--subtle); font-size: .9rem }
.empty, .result-count { margin: 12px 0 5px }
#image-view > img { max-height: 60vh; object-fit: contain; margin: 0 auto }
.toast { position: fixed; bottom: max(18px, env(safe-area-inset-bottom)); right: 18px; z-index: 5; background: var(--wine); color: white; padding: 12px 16px; border: 1px solid #ac7f74; border-radius: 8px; max-width: calc(100% - 36px); font-size: .92rem }

@media (max-width: 920px) {
  .home-main { grid-template-columns: minmax(0, 1fr) 218px; gap: 17px }
  .hero { padding: 38px; gap: 25px }
}
@media (max-width: 700px) {
  .wrap { width: calc(100% - 30px) }
  .top-inner { min-height: 57px }
  .brand img { width: 58px; height: 35px }
  .brand span { display: none }
  .topbar nav a, .search-button { padding-inline: 10px }
  .search-button { margin-left: 2px }
  main { padding-top: 16px }
  .hero { grid-template-columns: 1fr; padding: 28px 22px 25px; gap: 14px; border-radius: 11px 11px 5px 5px }
  .hero h1 { font-size: clamp(1.75rem, 6vw, 2.65rem); max-width: 13em }
  .hero-label { font-size: .88rem; margin-bottom: 8px }
  .hero-sub { margin: 10px 0 13px; font-size: .95rem }
  .hero-graphic { width: min(235px, 100%); gap: 7px; grid-template-columns: repeat(5, 1fr) }
  .hero-graphic span { min-height: 27px; aspect-ratio: auto; font-size: 1.02rem }
  .chapter-rule { display: none }
  .home-main { grid-template-columns: 1fr; gap: 17px; margin-top: 20px }
  .section-heading { margin-bottom: 8px }
  .section-heading h2 { font-size: 1.38rem }
  .course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin: 8px 0 }
  .course-grid a { flex-direction: row; align-items: center; padding: 8px; min-height: 61px; gap: 7px }
  .course-seal { flex: 0 0 32px; width: 32px; height: 32px; font-size: 1.05rem }
  .course-name strong { font-size: .88rem }
  .phase-line { min-height: 53px; padding: 7px 8px; gap: 6px }
  .phase-line > span:last-child { font-size: .8rem }
  .closure-links { gap: 5px }
  .closure-links .phase-line { display: grid; gap: 2px; justify-items: start; min-height: 58px; font-size: .85rem }
  .quick-panel { padding-inline: 14px }
  .breadcrumbs { margin-bottom: 6px }
  .day-stamp { flex-basis: 50px; height: 50px; font-size: 1.55rem }
  .day-head { gap: 11px; padding-bottom: 13px }
  .day-head h1 { font-size: 1.85rem }
  .day-head p:last-child { font-size: .91rem }
  .day-tabs { margin: 10px 0 15px; gap: 5px }
  .day-tabs a { padding-inline: 8px }
  .day-layout { display: flex; flex-direction: column; gap: 15px }
  .time-index, .timeline { width: 100% }
  .time-index { position: static; padding: 9px }
  .time-index h2 { margin-bottom: 6px }
  .time-links { grid-template-columns: repeat(auto-fit, minmax(50px, 1fr)); gap: 5px }
  .recording-link { margin-top: 0 }
  .task summary, .reference summary { padding-inline: 10px; gap: 8px }
  .task-time { min-width: 52px; font-size: .97rem }
  .task-content, .reference-body { padding: 10px }
  .message { padding: 10px }
  .message.has-poster { grid-template-columns: minmax(0,1fr) }
  .asset-preview { max-width: 170px }
  .footer { margin-top: 24px }
}
@media (max-width: 360px) {
  .wrap { width: calc(100% - 22px) }
  .topbar nav a, .search-button { padding-inline: 7px }
  .topbar nav { gap: 1px }
}
