:root {
  color-scheme: light;
  --ink: #383b35;
  --muted: #85877e;
  --page: #fafaf7;
  --panel: #f2f3ef;
  --line: #e2e4dc;
  --green: #32775b;
  --regular: #f1f2ed;
  --image: #e5edf5;
  --nuclear: #eee7f4;
  --cbl: #f4eada;
  --serif: "Course Serif", "Songti SC", "STSong", "SimSun", "Times New Roman", serif;
  font-family: var(--serif);
  color: var(--ink);
  background: var(--page);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid #71a68d; outline-offset: 3px; }
button:disabled { opacity: .35; cursor: default; }
h1, h2, h3, p { margin: 0; }
.site-header { background: #fafaf7f5; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; backdrop-filter: blur(12px); }
.header-inner { max-width: 1440px; margin: auto; height: 67px; padding: 0 28px; display: flex; align-items: center; gap: 32px; }
.brand { display: flex; align-items: center; gap: 12px; font-size: 17px; font-weight: 600; letter-spacing: .04em; }
.brand small { display: block; font-size: 10px; font-weight: 400; letter-spacing: .02em; margin-top: 4px; color: var(--muted); }
.brand-icon { position: relative; font-family: var(--serif); font-size: 29px; line-height: 1; width: 36px; height: 34px; color: #272a25; border-bottom: 3px solid #272a25; transform: rotate(-6deg); }
.brand-icon span { position: absolute; top: -3px; right: -1px; font-family: var(--serif); font-size: 15px; color: var(--green); }
.tabs { display: flex; align-self: stretch; gap: 24px; padding-left: 30px; border-left: 1px solid var(--line); }
.tabs a { display: flex; align-items: center; padding: 1px 1px 0; position: relative; font-size: 13px; color: var(--muted); }
.tabs a[aria-current=page] { color: var(--ink); font-weight: 600; }
.tabs a[aria-current=page]::after { content: ""; position: absolute; height: 2px; bottom: -1px; left: 0; right: 0; background: var(--green); }
.header-date { margin-left: auto; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
main { max-width: 1440px; padding: 24px 28px 30px; margin: auto; min-height: calc(100vh - 67px); }
h1, h2 { font-family: var(--serif); font-weight: 500; }
h1 { font-size: 29px; letter-spacing: -.035em; line-height: 1.35; }
h1 .weekday { color: #71756b; font-size: .73em; font-weight: 400; margin-left: 5px; }
h2 { font-size: 20px; }
.eyebrow { font-size: 9px; letter-spacing: .1em; font-weight: 500; color: var(--muted); margin-bottom: 7px; }
.subtext { color: var(--muted); font-size: 11px; line-height: 1.7; margin-top: 6px; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 20px; }
.date-controls { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.button, .icon-button { display: inline-flex; align-items: center; justify-content: center; border: 1px solid #dcdfd5; background: #f5f6f1; color: var(--ink); border-radius: 3px; min-height: 34px; padding: 7px 12px; font-size: 11px; font-weight: 500; }
.button.primary { background: #343a32; color: #fff; border-color: #343a32; }
.button:hover, .icon-button:hover { background: #e9ede4; }
.button.primary:hover { background: #475141; }
.icon-button { width: 32px; padding: 3px; font-size: 20px; font-family: var(--serif); }
input[type=date] { background: #f5f6f1; border: 1px solid #dcdfd5; border-radius: 3px; padding: 6px 8px; min-height: 34px; color: var(--ink); font-size: 11px; max-width: 135px; }
.day-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 30px; align-items: start; }
.section-title { display: flex; align-items: baseline; gap: 11px; margin: 18px 0 9px; font-family: var(--serif); font-size: 17px; color: #4b5045; }
.section-title:first-child { margin-top: 0; }
.section-title span { font-family: var(--serif); font-size: 10px; color: var(--muted); }
.section-title::after { content: ""; height: 1px; background: var(--line); flex: 1; align-self: center; }
.course { position: relative; display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 14px; padding: 13px 16px; border-radius: 3px; background: var(--regular); border: 1px solid #e2e5da; margin-bottom: 5px; border-left: 2px solid #c8cfc0; }
.course.image { background: var(--image); border-color: #d9e2eb; border-left-color: #81a7c5; }
.course.nuclear { background: var(--nuclear); border-color: #e1d7eb; border-left-color: #b09ac7; }
.course.cbl { background: var(--cbl); border-color: #eadcc7; border-left-color: #c4a174; }
.course.current { border-color: #78a58a; border-left: 3px solid var(--green); background: #e8efe5; }
.time { font-size: 18px; font-weight: 500; line-height: 1.15; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.time span { display: block; font-size: 10px; color: var(--muted); font-weight: 400; margin-top: 5px; letter-spacing: 0; }
.course h3 { font-size: 14px; line-height: 1.5; font-weight: 500; overflow-wrap: anywhere; }
.course-meta { display: flex; gap: 5px 11px; flex-wrap: wrap; align-items: center; margin-top: 6px; font-size: 10px; line-height: 1.5; color: #727a6b; }
.course-module { color: #8b9084; }
.room { display: flex; align-items: center; gap: 4px; }
.pin { width: 10px; height: 13px; flex-shrink: 0; }
.badge { font-size: 10px; line-height: 1.4; padding: 2px 6px; border-radius: 3px; font-weight: 500; display: inline-block; background: #e9ece4; white-space: nowrap; }
.badge.image { background: #d5e4f0; color: #486e8b; }
.badge.nuclear { background: #e1d2ee; color: #79578e; }
.badge.cbl { background: #eddbbb; color: #8a693b; }
.live { background: #d6e8d9; color: #34754f; display: inline-block; font-size: 9px; padding: 2px 5px; border-radius: 2px; }
.done-label { color: #979c90; font-size: 9px; }
.transfer { font-size: 10px; line-height: 1.5; color: #6a836b; margin: 5px 0 6px 111px; display: flex; gap: 5px; align-items: baseline; }
.transfer::before { content: "↳"; color: #86a084; }
.room-warning { margin-top: 7px; font-size: 10px; color: #8d7047; line-height: 1.6; }
.side-panel { border: 1px solid var(--line); border-radius: 3px; background: var(--panel); padding: 17px; margin-bottom: 12px; }
.side-panel.hero { background: #eff2ea; border-top: 2px solid #6f9e7e; }
.side-label { font-size: 10px; color: #63816a; margin-bottom: 13px; }
.side-label::before { content: ""; display: inline-block; width: 5px; height: 5px; background: #6b9271; border-radius: 50%; margin-right: 6px; vertical-align: 2px; }
.next-time { font-family: var(--serif); font-size: 28px; letter-spacing: -.03em; margin-bottom: 6px; }
.next-title { font-family: var(--serif); font-size: 17px; line-height: 1.5; }
.next-room { font-size: 11px; line-height: 1.5; margin-top: 12px; color: #7c8573; display: flex; gap: 5px; align-items: center; }
.next-link { margin-top: 13px; padding-top: 10px; border-top: 1px solid #dbe2d3; font-size: 10px; display: block; color: var(--green); }
.day-metrics { display: flex; justify-content: space-between; gap: 18px; margin-top: 12px; }
.metric strong { display: block; font-family: var(--serif); font-size: 26px; font-weight: 400; }
.metric span { font-size: 10px; color: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 6px; }
.legend-title { font-family: var(--serif); font-size: 15px; margin-bottom: 11px; }
.legend-note { font-size: 10px; color: var(--muted); line-height: 1.8; margin-top: 11px; }
.empty { padding: 35px 22px; background: #f0f2eb; border: 1px solid var(--line); border-radius: 3px; text-align: center; }
.empty-symbol { font-size: 26px; color: #8e9c84; margin-bottom: 12px; }
.empty h2 { font-size: 21px; }
.empty p { margin: 9px 0 18px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.toolbar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.search-wrap { position: relative; flex: 1; min-width: 190px; }
.search-wrap::before { content: "⌕"; position: absolute; left: 10px; top: 5px; font-size: 20px; color: #909887; }
input[type=search] { width: 100%; min-height: 34px; padding: 7px 11px 7px 33px; border: 1px solid #e2e5dc; border-radius: 3px; background: #f1f3ed; color: var(--ink); font-size: 12px; }
select { max-width: 100%; border: 1px solid #e0e4d8; border-radius: 3px; min-height: 34px; padding: 7px 26px 7px 10px; color: #69705f; background: #f1f3ed; font-size: 11px; }
.result-bar { display: flex; gap: 13px; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: 10px; color: var(--muted); }
.week-block { border: 1px solid #dbdfd4; border-radius: 3px; background: #dfe3d9; overflow: hidden; margin-bottom: 19px; scroll-margin-top: 85px; }
.week-title { display: flex; align-items: center; gap: 15px; padding: 11px 14px; background: #f1f3eb; border-bottom: 1px solid #dce1d2; }
.week-title h2 { font-size: 18px; color: #404d3b; }
.week-title .range { font-size: 11px; color: #939a89; }
.week-title .week-count { margin-left: auto; color: #919886; font-size: 10px; }
.week-scroll { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: #bdc7b3 #eff2ea; }
.week-content { min-width: 1120px; }
.week-grid { display: grid; grid-template-columns: repeat(7, minmax(150px, 1fr)); gap: 1px; }
.week-day { background: #f3f4ef; display: flex; align-items: center; justify-content: space-between; gap: 6px; text-align: left; border: 0; min-height: 42px; padding: 8px 11px; color: #898e80; font-size: 10px; }
.week-day b { font-family: var(--serif); font-size: 16px; color: #606b55; font-weight: 400; }
.week-day.today { background: #e5eddd; color: #4b7554; box-shadow: inset 0 -2px #7ba277; }
.week-day.today b { color: #3d6846; }
.week-day:hover { background: #e9eee0; }
.week-period-label { font-family: var(--serif); font-size: 11px; letter-spacing: .08em; padding: 4px 11px; background: #e3e9da; color: #7f8d70; }
.week-period-label.pm { background: #eae5d9; color: #9b8866; }
.week-cell { background: #f4f5ef; padding: 5px; min-height: 45px; }
.week-grid.afternoon .week-cell { background: #f5f2ec; }
.week-cell.off { background: #f1f2ec; }
.mini-course { display: block; text-align: left; width: 100%; border: 1px solid #dee3d5; border-left: 2px solid #bac7ae; color: var(--ink); background: #e9ede2; padding: 6px 7px; border-radius: 2px; margin-bottom: 4px; line-height: 1.4; }
.mini-course:last-child { margin-bottom: 0; }
.mini-course.image { background: #e1eaf3; border-color: #d2dfea; border-left-color: #87a9c6; }
.mini-course.nuclear { background: #eae1f2; border-color: #dfd1ea; border-left-color: #b49dc8; }
.mini-course.cbl { background: #f2e4cd; border-color: #e9d7b9; border-left-color: #c2a175; }
.mini-course:hover { filter: brightness(.97); border-color: #9fac92; }
.mini-top { display: flex; justify-content: space-between; align-items: center; gap: 4px; margin-bottom: 4px; flex-wrap: wrap; }
.mini-time { font-size: 10px; font-weight: 500; font-variant-numeric: tabular-nums; color: #7b8571; white-space: nowrap; }
.mini-title { display: block; font-size: 12px; font-weight: 400; line-height: 1.55; overflow-wrap: anywhere; }
.mini-room { display: block; color: #8c927f; font-size: 10px; margin-top: 4px; line-height: 1.4; }
.mini-group { font-size: 9px; border-radius: 2px; padding: 1px 3px; display: inline-block; background: #ffffff60; color: #6c6d62; white-space: nowrap; }
.off-note { color: #b1b7a6; font-size: 10px; padding: 12px 4px; text-align: center; }
.swipe-note { display: none; font-size: 10px; color: var(--muted); margin: 0 0 11px; }
.week-result-empty { padding: 25px; text-align: center; color: var(--muted); font-size: 12px; }
dialog { border: 1px solid #d9dfd0; border-radius: 4px; padding: 24px; background: #f7f8f3; color: var(--ink); max-width: 450px; width: calc(100% - 32px); box-shadow: 0 18px 80px #2b33241f; }
dialog::backdrop { background: #343b2c70; backdrop-filter: blur(2px); }
dialog h2 { margin-top: 14px; line-height: 1.6; }
dialog .detail-line { font-size: 12px; line-height: 1.9; margin-top: 13px; color: #7b8271; }
.dialog-close { margin-top: 22px; width: 100%; background: #363e30; color: #fff; border-color: #363e30; }
.dialog-close:hover { background: #4d5944; }
.all-title-meta { display: flex; gap: 9px; align-items: center; }
.all-title-meta .badge { background: transparent; color: var(--muted); padding: 0 3px; }
.notice { background: #f0e8d8; border: 1px solid #e0d4bc; color: #88724e; border-radius: 3px; padding: 11px 13px; font-size: 11px; line-height: 1.8; margin-bottom: 14px; }
.loading-error { margin: 25px auto; max-width: 700px; color: #8b443e; }
.desktop-only { display: block; }
@media (max-width: 1150px) {
  .header-inner { padding: 0 22px; }
  main { padding: 22px 22px 26px; }
  .day-layout { grid-template-columns: minmax(0,1fr) 250px; gap: 24px; }
  .header-date { display: none; }
  .swipe-note { display: block; }
  .side-panel { padding: 15px; }
}
@media (max-width: 720px) {
  .header-inner { height: 58px; padding: 0 15px; justify-content: space-between; gap: 15px; }
  .brand { font-size: 15px; gap: 9px; }
  .brand small { font-size: 8px; margin-top: 3px; }
  .brand-icon { width: 28px; height: 29px; font-size: 24px; border-bottom-width: 2px; }
  .brand-icon span { right: -3px; font-size: 12px; top: -1px; }
  .tabs { gap: 17px; padding-left: 16px; }
  .tabs a { font-size: 11px; white-space: nowrap; }
  main { padding: 18px 15px 23px; min-height: calc(100vh - 58px); }
  .page-heading { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 11px; margin-bottom: 16px; }
  .eyebrow { font-size: 8px; margin-bottom: 5px; letter-spacing: .06em; }
  h1 { font-size: 25px; }
  h1 .weekday { margin-left: 3px; font-size: .67em; }
  .subtext { font-size: 10px; margin-top: 5px; }
  .date-controls { flex-basis: 100%; gap: 5px; }
  .date-controls .button { margin-left: 3px; }
  .date-controls input { flex: 1; max-width: 175px; min-width: 0; }
  .date-controls .button, .date-controls .icon-button, .date-controls input { min-height: 32px; }
  .day-layout { display: flex; flex-direction: column; gap: 15px; }
  .day-sidebar { display: contents; }
  .side-panel.hero { display: grid; grid-template-columns: 54px minmax(0,1fr); column-gap: 12px; row-gap: 4px; order: -1; width: 100%; padding: 11px 13px; margin-bottom: 0; }
  .side-label { grid-column: 1 / -1; margin-bottom: 4px; font-size: 9px; }
  .next-time { font-size: 24px; margin: 0; grid-column: 1; grid-row: 2 / 4; align-self: center; }
  .next-title { font-size: 15px; line-height: 1.4; grid-column: 2; }
  .next-room { grid-column: 2; margin: 0; font-size: 10px; }
  .next-link { grid-column: 1 / -1; margin-top: 4px; padding-top: 6px; font-size: 9px; }
  .day-courses { width: 100%; }
  .day-sidebar .side-panel:not(.hero) { display: none; }
  .section-title { margin: 15px 0 7px; font-size: 16px; }
  .section-title span { font-size: 9px; }
  .course { padding: 11px 11px; grid-template-columns: 57px minmax(0,1fr); gap: 10px; margin-bottom: 5px; }
  .time { font-size: 16px; padding-top: 1px; }
  .time span { font-size: 9px; margin-top: 4px; }
  .course h3 { font-size: 13px; line-height: 1.5; }
  .course-meta { font-size: 9px; margin-top: 5px; gap: 4px 7px; }
  .course-module { display: none; }
  .badge { font-size: 9px; padding: 1px 5px; }
  .done-label, .live { font-size: 8px; }
  .transfer { margin: 4px 0 5px 79px; font-size: 9px; }
  .room-warning { font-size: 9px; margin-top: 6px; }
  .all-title-meta { gap: 9px; }
  .all-title-meta .button { min-height: 28px; padding: 5px 9px; font-size: 10px; }
  .toolbar { padding: 9px 0; gap: 6px; margin-bottom: 10px; }
  .search-wrap { flex-basis: 100%; min-width: 0; }
  select { flex: 1; min-width: 0; font-size: 10px; padding: 7px 20px 7px 8px; }
  .toolbar .button { font-size: 10px; padding: 7px 8px; }
  .result-bar { align-items: center; flex-wrap: wrap; gap: 8px; font-size: 9px; margin-bottom: 10px; }
  .legend { gap: 4px; }
  .week-title { padding: 10px 12px; gap: 12px; }
  .week-title h2 { font-size: 17px; }
  .week-title .range { font-size: 10px; }
  .week-title .week-count { font-size: 9px; }
  .week-block { margin-bottom: 15px; scroll-margin-top: 73px; }
  .swipe-note { font-size: 9px; margin-bottom: 10px; }
  .empty { padding: 28px 18px; }
  .empty p { font-size: 11px; }
  .desktop-only { display: none; }
}
@media (max-width: 359px) {
  .header-inner { padding: 0 12px; gap: 9px; }
  .brand { font-size: 14px; gap: 7px; }
  .tabs { padding-left: 11px; gap: 12px; }
  main { padding-left: 12px; padding-right: 12px; }
  .course { grid-template-columns: 52px minmax(0,1fr); padding: 10px 8px; gap: 8px; }
}
