:root {
  --bg: #f8f9fa; --paper: #fff; --ink: #24282f; --muted: #747d8a;
  --line: #e7e9ed; --soft: #f1f3f5; --accent: #272b32;
  --sage: #f0f4f1; --blue: #eef2f8; --peach: #f8f1eb;
  --violet: #f2eff7; --gold: #f7f5eb; --rose: #f8eff1;
  color: var(--ink); background: var(--bg);
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei UI', 'Microsoft YaHei', sans-serif;
  font-size: 14px; font-synthesis: none; -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; color: inherit; background: none; border: 0; }
button:disabled { cursor: not-allowed; opacity: .35; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid #8895ab; outline-offset: 4px;
}
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h2 { font-size: 15px; font-weight: 600; }
h3 { font-size: 14px; font-weight: 550; }
small { font-size: 11px; color: var(--muted); }
.icon { width: 17px; height: 17px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.muted { color: var(--muted); }
.app-header { height: 76px; border-bottom: 1px solid var(--line); background: var(--paper); }
.header-inner { max-width: 1440px; height: 100%; padding: 0 52px; margin: 0 auto; display: flex; align-items: center; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 21px; font-weight: 650; letter-spacing: 2px; }
.brand-icon { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 7px; background: var(--accent); color: #fff; }
.brand-icon svg { width: 21px; height: 21px; }
.brand small { margin: 4px 0 0 2px; font-size: 9px; font-weight: 500; color: #9ca1aa; letter-spacing: 1.7px; }
nav { display: flex; align-items: center; gap: 7px; margin-left: 74px; }
.nav-button { display: flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: 6px; color: #7a8089; font-size: 12px; min-height: 36px; }
.nav-button .icon { width: 15px; height: 15px; }
.nav-button:hover { background: #f5f6f8; }
.nav-button.active { background: #f0f2f5; color: var(--ink); font-weight: 600; }
.nav-button b { font-size: 9px; font-weight: 500; min-width: 17px; height: 17px; display: grid; place-items: center; background: #e8ebef; color: #717780; border-radius: 4px; }
.header-status { margin-left: auto; display: flex; align-items: center; gap: 7px; font-size: 10px; color: #9298a0; }
.header-status .icon-button { margin-left: 13px; }
.status-dot { display: inline-block; width: 5px; height: 5px; background: #879b8c; border-radius: 50%; }
.content { max-width: 1440px; padding: 48px 52px 24px; margin: 0 auto; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.eyebrow { font-size: 9px; color: #9399a2; letter-spacing: 2px; margin-bottom: 11px; font-weight: 500; }
h1 { font-size: 30px; font-weight: 550; line-height: 1.3; letter-spacing: -.6px; }
.title-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.current-week { display: inline-flex; align-items: center; min-height: 30px; padding: 6px 10px; border: 1px solid #dce4df; border-radius: 5px; background: #f0f4f1; color: #506859; font-size: 11px; white-space: nowrap; }
.current-week:hover { background: #e6ede8; }
.page-heading p { margin-top: 10px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.heading-actions { display: flex; gap: 9px; align-items: center; margin-top: 13px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; border: 1px solid #dfe2e7; border-radius: 6px; min-height: 37px; padding: 9px 14px; font-size: 11px; background: #fff; white-space: nowrap; transition: background .15s, border-color .15s; }
.button:hover { background: #f6f7f9; border-color: #cdd2da; }
.button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.button.primary:hover { background: #414750; border-color: #414750; }
.button .icon { width: 15px; height: 15px; }
.text-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 11px; padding: 5px 0; color: #626a75; }
.text-button:hover { color: #20242b; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 4px; border-radius: 5px; color: #808792; font-size: 24px; }
.icon-button:hover { background: #f0f2f5; color: var(--ink); }
.overview-row { display: grid; grid-template-columns: minmax(0, 1fr) 172px 172px; align-items: center; margin-bottom: 28px; padding: 22px 26px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); }
.next-card { display: flex; align-items: center; min-width: 0; gap: 17px; padding-right: 34px; }
.next-marker { height: 39px; width: 3px; flex-shrink: 0; background: #82948c; border-radius: 2px; }
.next-info { min-width: 0; }
.next-info > span { font-size: 10px; color: #7b8592; display: block; margin-bottom: 7px; }
.next-info h2 { font-size: 17px; line-height: 1.4; margin-bottom: 6px; font-weight: 600; overflow-wrap: anywhere; }
.next-info p { font-size: 11px; color: #7d8794; line-height: 1.7; }
.next-card > button { margin-left: auto; white-space: nowrap; color: #9399a1; font-size: 10px; }
.stat-card { padding-left: 27px; border-left: 1px solid var(--line); }
.stat-card > .muted { font-size: 10px; }
.stat-card > div { margin: 6px 0 5px; font-size: 10px; color: #9298a0; }
.stat-card strong { color: #343b45; font-size: 25px; font-weight: 500; font-variant-numeric: tabular-nums; margin-right: 4px; }
.stat-card small { font-size: 9px; color: #838d9b; }
.panel { border: 1px solid var(--line); border-radius: 9px; background: var(--paper); overflow: hidden; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 23px; }
.term-info h2 { font-size: 13px; font-weight: 550; }
.term-info > span { display: block; margin-top: 7px; color: #818c9b; font-size: 10px; font-variant-numeric: tabular-nums; }
.table-tools { display: flex; align-items: center; gap: 12px; }
.week-controls { display: flex; align-items: center; gap: 3px; }
.week-button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-size: 12px; min-width: 88px; min-height: 30px; font-weight: 500; }
.week-button .icon { width: 12px; height: 12px; color: #999fa9; }
.small-button { padding: 7px 11px; border: 1px solid var(--line); border-radius: 5px; font-size: 10px; }
.small-button:hover { background: var(--soft); }
.tool-divider { width: 1px; height: 19px; background: var(--line); margin: 0 3px; }
.table-tools > .text-button { font-size: 11px; color: #515966; }
.table-tools > .text-button .icon { width: 15px; height: 15px; }
.timetable-scroll { overflow: auto; border-top: 1px solid var(--line); }
.timetable { display: grid; grid-template-columns: 64px repeat(7, minmax(0, 1fr)); min-width: 760px; position: relative; }
.day-heading { padding: 13px 3px; border-bottom: 1px solid var(--line); text-align: center; font-size: 10px; color: #a0a6af; background: #fcfcfd; font-variant-numeric: tabular-nums; }
.day-heading strong { font-size: 11px; font-weight: 500; color: #6f7783; margin-bottom: 5px; display: block; }
.day-heading.today { background: #f1f3f6; }
.day-heading.today strong { color: #2b3441; font-weight: 650; }
.day-heading.today > span { color: #62738a; }
.period-cell { border-right: 1px solid #edf0f3; border-bottom: 1px solid #edf0f3; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 3px; font-variant-numeric: tabular-nums; }
.period-cell > span { font-size: 11px; color: #7d8591; }
.period-cell small { font-size: 8px; color: #939dab; }
.grid-cell { border-right: 1px solid #f0f2f5; border-bottom: 1px solid #f0f2f5; cursor: pointer; }
.grid-cell.today { background: #fafbfd; }
.grid-cell:hover { background: #f5f6f9; }
.course-slot { display: flex; gap: 3px; min-width: 0; padding: 4px; pointer-events: none; z-index: 1; }
.course-card { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; width: 100%; min-width: 0; overflow: hidden; border-left: 2px solid; border-radius: 4px; text-align: left; padding: 10px 11px; pointer-events: auto; transition: filter .15s; }
.course-card:hover { filter: brightness(.97); }
.course-card strong { font-size: 11px; font-weight: 550; line-height: 1.6; overflow-wrap: anywhere; }
.course-card span { font-size: 9px; line-height: 1.7; opacity: .9; overflow-wrap: anywhere; }
.course-card .course-time { font-size: 8px; margin-top: auto; opacity: .7; }
.sage { background: var(--sage); color: #506859; border-color: #a0b4a7; }
.blue { background: var(--blue); color: #4f6582; border-color: #a2b3cc; }
.peach { background: var(--peach); color: #8c6b55; border-color: #d0b29d; }
.violet { background: var(--violet); color: #726487; border-color: #baabce; }
.gold { background: var(--gold); color: #8a7d50; border-color: #c6bc92; }
.rose { background: var(--rose); color: #926c78; border-color: #cfaab7; }
.course-card.is-inactive { background: #f0f1f3; color: #9299a3; border-color: #d3d7de; }
.course-card.is-inactive strong { font-weight: 450; }
.course-card.is-inactive .course-time { opacity: 1; }
.course-slot.is-shared { flex-direction: column; }
.course-slot.is-shared .course-card { flex: 1; min-height: 0; gap: 3px; padding: 6px 8px; }
.course-slot.is-shared .course-card strong { width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 10px; flex-shrink: 0; }
.course-slot.is-shared .course-meta { display: none; }
.course-slot.is-shared .course-time { margin-top: 0; width: 100%; font-size: 8px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 0; }
.table-footer { display: flex; align-items: center; gap: 20px; min-height: 46px; padding: 11px 22px; color: #8b95a3; font-size: 9px; }
.table-footer > .text-button { font-size: 9px; margin-left: auto; color: #7a8390; }
.grid-hint { margin-left: auto; }
.today-panel { border-bottom: 1px solid var(--line); margin: 0 0 24px; }
.today-panel > summary { cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 18px 2px; list-style: none; font-size: 11px; color: #6e7784; }
.today-panel > summary::-webkit-details-marker { display: none; }
.today-panel > summary > span:first-child { font-weight: 550; }
#today-date { font-size: 10px; margin-left: auto; color: #9ba2ac; }
.today-panel > summary .icon { width: 13px; height: 13px; color: #a2a9b3; transition: transform .15s; }
.today-panel[open] > summary .icon { transform: rotate(180deg); }
#today-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; padding: 2px 0 21px; }
.today-item { padding: 15px 18px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); }
.today-item small { font-size: 10px; }
.today-item button { display: block; text-align: left; padding: 0; margin: 10px 0 7px; font-size: 12px; font-weight: 550; }
.today-item p { font-size: 10px; color: #98a0ab; line-height: 1.8; }
.today-item.finished { opacity: .5; }
.today-empty { grid-column: 1 / -1; padding: 8px 2px 2px; font-size: 11px; color: #9ba2ad; }
.empty-state { display: flex; align-items: center; flex-direction: column; justify-content: center; text-align: center; padding: 60px 20px 64px; }
.empty-symbol { width: 29px; height: 29px; color: #b0b7c1; stroke-width: 1; margin-bottom: 21px; }
.empty-state h3 { font-size: 15px; font-weight: 500; color: #626b78; }
.empty-state p { font-size: 11px; line-height: 1.9; margin: 10px 0 24px; color: #a0a7b0; }
.empty-state > div:last-child { display: flex; gap: 9px; }
.demo-banner { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 13px; border: 1px solid var(--line); background: #f0f2f5; border-radius: 6px; margin-bottom: 27px; font-size: 10px; color: #8b939e; }
.demo-banner > span { display: flex; align-items: center; gap: 10px; }
.demo-tag { color: #636e7e; border: 1px solid #d9dee6; background: #f9fafb; padding: 2px 5px; border-radius: 3px; font-size: 9px; }
.demo-banner button { font-size: 10px; color: #737e8d; }
.site-footer { display: flex; justify-content: space-between; padding: 22px 0 8px; font-size: 9px; color: #b1b6bf; }
.footer-divider { margin: 0 10px; color: #c7cbd2; }
.warning-strip { padding: 13px 20px; font-size: 11px; line-height: 1.9; background: #faf5ec; color: #967550; border-top: 1px solid #eee6da; white-space: pre-line; }
.task-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 21px 24px; border-bottom: 1px solid var(--line); }
.task-toolbar h2 { font-size: 13px; }
.check-label { display: flex; align-items: center; gap: 7px; font-size: 11px; color: #9098a3; margin: 0; }
.check-label input { width: 14px; min-height: 0; margin: 0; }
.task-item { display: flex; align-items: flex-start; gap: 15px; padding: 23px 25px; border-bottom: 1px solid #f0f2f5; }
.task-item:last-child { border-bottom: 0; }
.task-check { width: 18px; height: 18px; padding: 0; border: 1px solid #cdd3dc; border-radius: 4px; flex-shrink: 0; margin-top: 2px; }
.task-item.done .task-check { background: var(--accent); border-color: var(--accent); color: #fff; font-size: 11px; }
.task-item.done h3 { text-decoration: line-through; color: #aab0b9; }
.task-info { flex: 1; min-width: 0; }
.task-info h3 { font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.task-info p { font-size: 11px; color: #939ca8; margin-top: 8px; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; }
.due-tag { display: inline-block; font-size: 10px; color: #969eaa; margin-top: 10px; font-variant-numeric: tabular-nums; }
.due-tag.overdue { color: #af7c67; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.settings-panel { padding: 27px; }
.settings-panel h2 { margin-bottom: 23px; font-size: 14px; }
.settings-panel h2 small { font-size: 10px; font-weight: 400; margin-left: 10px; }
.settings-panel > p { font-size: 11px; line-height: 2; color: #8c95a2; margin-bottom: 18px; }
.settings-panel > .field-hint { font-size: 10px; }
.settings-panel > small { display: block; font-size: 10px; margin-top: 10px; line-height: 1.9; }
.settings-panel hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
.lower-settings { margin-top: 22px; }
label { display: block; font-size: 11px; color: #7a8594; margin-bottom: 17px; line-height: 1.7; }
input, select, textarea { display: block; width: 100%; min-height: 39px; border: 1px solid #dfe3e9; border-radius: 5px; padding: 10px 11px; margin-top: 7px; background: #fff; color: var(--ink); font-size: 12px; }
input:hover, select:hover, textarea:hover { border-color: #c6cdd7; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
textarea { resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-hint { font-size: 10px; color: #939daa; line-height: 1.9; }
.period-row { display: flex; align-items: center; gap: 13px; margin-bottom: 8px; }
.period-row > span { font-size: 10px; color: #97a0ac; min-width: 42px; }
.period-row > span:nth-child(3) { min-width: 10px; text-align: center; }
.period-row input { padding: 7px 9px; margin: 0; min-height: 31px; font-size: 11px; }
.button-group { display: flex; gap: 10px; flex-wrap: wrap; }
.privacy-details { margin-top: 19px; font-size: 10px; color: #98a0ab; line-height: 2; }
.privacy-details summary { cursor: pointer; }
.privacy-details p { margin-top: 10px; }
dialog { width: min(490px, calc(100vw - 32px)); max-height: 90dvh; padding: 27px; border: 1px solid #e1e5eb; border-radius: 10px; color: var(--ink); background: #fff; box-shadow: 0 20px 100px #20283320; }
dialog::backdrop { background: #20263050; backdrop-filter: blur(3px); }
.wide-dialog { width: min(700px, calc(100vw - 32px)); }
.small-dialog { width: min(410px, calc(100vw - 32px)); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 26px; }
.dialog-heading .eyebrow { display: none; }
.dialog-heading h2 { font-size: 20px; font-weight: 550; }
.dialog-heading .icon-button { font-weight: 300; }
.dialog-footer { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding-top: 20px; margin-top: 24px; border-top: 1px solid var(--line); }
.spacer { flex: 1; }
.danger { color: #ad7567; }
.form-error { color: #ad7567; font-size: 11px; line-height: 1.9; white-space: pre-line; }
.color-choices { border: 0; padding: 0; margin: 0; }
.color-choices legend { font-size: 11px; color: #7a8594; margin-bottom: 10px; }
.color-choices > div { display: flex; gap: 12px; }
.color-choices label { margin: 0; }
.color-choices input { width: 23px; height: 23px; min-height: 0; appearance: none; margin: 0; padding: 0; border: 1px solid #0000000b; border-radius: 50%; cursor: pointer; }
.color-choices input:checked { outline: 1px solid #8592a6; outline-offset: 3px; }
.import-tabs { display: flex; gap: 23px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.import-tabs button { padding: 0 1px 12px; color: #9aa3b0; font-size: 12px; }
.import-tabs button.active { border-bottom: 2px solid var(--ink); color: var(--ink); }
.upload-zone { position: relative; display: flex; flex-direction: column; align-items: center; gap: 11px; cursor: pointer; padding: 38px 20px; border: 1px dashed #cdd4df; border-radius: 7px; background: #fafbfc; margin: 0; }
.upload-zone:hover, .upload-zone.dragging { background: #f0f3f7; }
.upload-zone input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.upload-icon { width: 27px; height: 27px; color: #8b98aa; margin-bottom: 5px; }
.upload-zone strong { font-size: 12px; font-weight: 500; color: #667489; }
.upload-zone > span:last-child { font-size: 10px; color: #a2acba; }
.import-notice { padding: 17px 0; }
.import-notice p { font-size: 10px; color: #97a1af; line-height: 2; }
#image-preview { width: 100%; max-height: 260px; object-fit: contain; margin-top: 14px; background: #f6f7f9; border-radius: 6px; }
#import-service-state { font-size: 9px; max-width: 60%; }
.review-item { display: flex; align-items: flex-start; gap: 13px; padding: 16px; border: 1px solid var(--line); border-radius: 6px; margin-top: 11px; }
.review-item > input { width: 15px; min-height: 15px; height: 15px; margin: 3px 0 0; flex-shrink: 0; }
.review-item > button { flex: 1; text-align: left; padding: 0; }
.review-item strong { font-size: 12px; display: block; margin-bottom: 7px; font-weight: 550; }
.review-item span { display: block; font-size: 10px; line-height: 2; color: #9ba5b2; }
.review-item em { align-self: center; font-size: 10px; font-style: normal; color: #8b98aa; }
.review-item.unselected { opacity: .4; }
.review-item.duplicate { background: #f6f7f8; color: #89929d; }
.review-item.duplicate strong { font-weight: 450; }
.review-item.duplicate em { color: #7c8880; white-space: nowrap; }
.duplicate-notice { margin-top: 12px; padding: 12px 14px; background: #f0f4f1; border: 1px solid #dce4df; border-radius: 5px; font-size: 11px; line-height: 1.9; color: #506859; }
.calibration-label { margin-top: 20px; }
.review-empty { padding: 25px 0; font-size: 12px; line-height: 2; color: var(--muted); }
#week-options { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
#week-options button { padding: 11px 3px; border: 1px solid var(--line); border-radius: 5px; font-size: 11px; }
#week-options button.active { background: var(--accent); color: #fff; }
#confirm-message { margin-top: 15px; font-size: 12px; color: #8f9aa8; line-height: 2; white-space: pre-line; }
#toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); padding: 12px 20px; background: #303743; border: 1px solid #444c59; color: #fff; font-size: 11px; line-height: 1.9; border-radius: 7px; z-index: 1000; max-width: calc(100vw - 32px); box-shadow: 0 4px 20px #1f273017; }
@media (min-width: 1500px) { .content { padding-top: 54px; } .course-card { padding: 12px 14px; } .course-card strong { font-size: 12px; } .course-card span { font-size: 10px; } }
@media (max-width: 1100px) {
  .header-inner { padding: 0 32px; } .content { padding: 37px 32px 22px; }
  nav { margin-left: 45px; } .brand small { display: none; }
  .overview-row { grid-template-columns: minmax(0,1fr) 145px 145px; }
  .stat-card { padding-left: 22px; } .next-card { padding-right: 25px; }
  .table-tools { gap: 8px; } .panel-heading { padding: 19px; }
}
@media (max-width: 760px) {
  .app-header { height: 64px; } .header-inner { padding: 0 20px; }
  .brand { font-size: 19px; gap: 9px; } .brand-icon { width: 27px; height: 27px; border-radius: 6px; }
  .brand-icon svg { width: 18px; height: 18px; } .brand small { display: block; font-size: 8px; margin-left: 1px; }
  .header-status { font-size: 9px; gap: 6px; } .header-status .icon-button { display: none; }
  nav { position: fixed; inset: auto 0 0; margin: 0; height: calc(61px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid var(--line); background: #fffffff5; backdrop-filter: blur(12px); display: flex; justify-content: space-around; z-index: 10; gap: 0; }
  .nav-button { flex-direction: column; justify-content: center; gap: 5px; width: 32%; min-height: 52px; padding: 6px; font-size: 10px; position: relative; border-radius: 0; }
  .nav-button.active { background: none; } .nav-button .icon { width: 18px; height: 18px; }
  .nav-button b { position: absolute; top: 3px; left: calc(50% + 8px); font-size: 8px; min-width: 14px; height: 14px; border-radius: 4px; }
  main { padding-bottom: calc(61px + env(safe-area-inset-bottom)); }
  .content { padding: 29px 18px 17px; }
  .page-heading { gap: 10px; margin-bottom: 25px; align-items: center; }
  .eyebrow { font-size: 8px; letter-spacing: 1.7px; margin-bottom: 9px; }
  h1 { font-size: 26px; line-height: 1.3; } .page-heading p { font-size: 10px; margin-top: 8px; line-height: 1.8; max-width: 210px; }
  .title-row { gap: 8px; } .current-week { min-height: 26px; font-size: 10px; padding: 5px 8px; }
  .heading-actions { margin-top: 0; } .heading-actions > #export-calendar { display: none; }
  .button { min-height: 36px; padding: 9px 12px; font-size: 10px; gap: 7px; }
  .button .icon { width: 14px; height: 14px; }
  .overview-row { grid-template-columns: 1fr 1fr; padding: 19px; margin-bottom: 20px; border-radius: 8px; gap: 19px 0; }
  .next-card { grid-column: 1 / -1; padding: 0 0 19px; border-bottom: 1px solid var(--line); gap: 13px; }
  .next-info h2 { font-size: 16px; margin-bottom: 6px; } .next-info > span { font-size: 9px; margin-bottom: 6px; }
  .next-info p { font-size: 10px; } .next-marker { height: 33px; width: 2px; }
  .next-card > button { font-size: 9px; }
  .stat-card { padding: 0; border-left: 0; display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 8px; }
  .stat-card:last-child { padding-left: 20px; margin-left: 20px; border-left: 1px solid var(--line); }
  .stat-card > .muted { font-size: 9px; } .stat-card > div { margin: 0; font-size: 8px; }
  .stat-card strong { font-size: 20px; margin-right: 2px; } .stat-card small { grid-column: 1 / -1; margin-top: 5px; font-size: 8px; }
  .panel { border-radius: 8px; }
  .panel-heading { flex-direction: column; align-items: stretch; gap: 15px; padding: 17px 14px 12px; }
  .term-info { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .term-info h2 { font-size: 11px; } .term-info > span { font-size: 9px; margin: 0; }
  .table-tools { width: 100%; gap: 9px; }
  .week-controls { gap: 1px; } .week-controls > .icon-button { width: 27px; height: 28px; }
  .week-controls .icon { width: 14px; height: 14px; }
  .week-button { min-width: 75px; font-size: 11px; gap: 7px; }
  .small-button { font-size: 9px; padding: 6px 9px; }
  .tool-divider { margin-left: auto; background: transparent; }
  .table-tools > .text-button { font-size: 10px; }
  .timetable { min-width: 680px; grid-template-columns: 44px repeat(7,minmax(0,1fr)); }
  .timetable-scroll { max-height: 590px; }
  .day-heading { position: sticky; top: 0; z-index: 3; padding: 12px 2px; font-size: 9px; }
  .day-heading strong { font-size: 10px; } .period-cell > span { font-size: 10px; } .period-cell small { font-size: 7px; }
  .course-card { padding: 9px 7px; gap: 6px; } .course-card strong { font-size: 10px; } .course-card span { font-size: 8px; }
  .course-card .course-time { font-size: 7px; }
  .table-footer { min-height: 42px; padding: 10px 13px; gap: 10px; font-size: 8px; flex-wrap: wrap; }
  .table-footer > .text-button { font-size: 8px; }
  .grid-hint { display: none; }
  .table-footer::after { content: '左右滑动查看完整课表'; color: #b4bac3; margin-left: auto; font-size: 8px; }
  .today-panel > summary { padding: 17px 1px; font-size: 10px; }
  #today-date { font-size: 9px; } #today-list { grid-template-columns: 1fr; gap: 9px; }
  .today-item { padding: 14px 15px; }
  .empty-state { padding: 47px 18px 51px; } .empty-state h3 { font-size: 14px; } .empty-state p { font-size: 10px; }
  .demo-banner { padding: 10px; font-size: 9px; margin-bottom: 23px; gap: 8px; }
  .demo-banner > span { gap: 6px; } .demo-tag { font-size: 8px; flex-shrink: 0; }
  .demo-banner button { font-size: 9px; flex-shrink: 0; }
  .site-footer { font-size: 8px; padding-top: 23px; }
  .settings-grid { grid-template-columns: 1fr; gap: 17px; } .settings-panel { padding: 23px 20px; } .lower-settings { margin-top: 17px; }
  .settings-panel h2 { font-size: 14px; } .settings-panel > p { font-size: 10px; }
  .settings-panel > small { font-size: 9px; } .period-row { gap: 10px; } .period-row input { max-width: 170px; }
  .field-row { gap: 12px; } label { font-size: 10px; } input, select, textarea { font-size: 12px; }
  .task-toolbar { padding: 19px; } .task-toolbar h2 { font-size: 12px; } .check-label { font-size: 10px; }
  .task-item { padding: 19px; gap: 12px; } .task-info h3 { font-size: 12px; } .task-info p { font-size: 10px; }
  dialog { padding: 22px 19px; max-height: 92dvh; } .dialog-heading h2 { font-size: 18px; }
  .dialog-footer { flex-wrap: wrap; gap: 8px; } .dialog-footer > .field-hint { flex-basis: 100%; max-width: 100%; }
  .upload-zone { padding: 30px 15px; } .upload-zone strong { font-size: 11px; }
  .review-item { padding: 12px; gap: 10px; } .review-item strong { font-size: 11px; } .review-item span { font-size: 9px; } .review-item em { font-size: 9px; }
  #toast { bottom: calc(78px + env(safe-area-inset-bottom)); font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
