:root {
    --van-primary-color: #1677ff;
    --van-success-color: #21966f;
    --van-danger-color: #cf3f46;
    --page-bg: #f5f6f7;
    --line: #ebedf0;
    --text: #1f2329;
    --muted: #69737d;
}

* { box-sizing: border-box; }
html, body { width: 100%; max-width: 100%; margin: 0; min-height: 100%; overflow-x: hidden; background: var(--page-bg); color: var(--text); }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif; }
[v-cloak] { display: none; }
#mobile-check-app { width: 100%; max-width: 100%; min-height: 100vh; overflow-x: hidden; }
.check-page { width: 100%; max-width: 600px; min-height: calc(100vh - 46px); margin: 0 auto; padding-bottom: calc(24px + env(safe-area-inset-bottom)); background: var(--page-bg); }

.term-line { display: flex; align-items: center; justify-content: space-between; min-height: 42px; padding: 0 16px; background: #fff; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.schedule-filter { border-bottom: 1px solid var(--line); }
.schedule-filter::after { display: none; }
.schedule-filter .van-dropdown-menu__bar { width: 100%; }
.schedule-filter .van-dropdown-menu__item { min-width: 0; }
.schedule-filter .van-dropdown-menu__title { max-width: calc(100% - 16px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.van-search { padding-top: 8px; padding-bottom: 8px; }
.van-search__content { border-radius: 4px; }

.mark-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 12px 10px; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.mark-summary div { display: grid; justify-items: center; gap: 3px; padding: 10px 4px 9px; border-right: 1px solid var(--line); }
.mark-summary div:last-child { border-right: 0; }
.mark-summary strong { font-size: 18px; font-weight: 650; line-height: 1; }
.mark-summary span { color: var(--muted); font-size: 11px; }
.text-good { color: var(--van-success-color); }
.text-bad { color: var(--van-danger-color); }
.text-empty { color: #5f6b73; }

.building-tabs { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.building-tabs .van-tabs__content { display: none; }
.building-tabs .van-tabs__wrap { padding: 0 6px; }
.building-tabs .van-tab { padding: 0 12px; }

.floor-block { margin-top: 10px; background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.floor-block .van-swipe { width: 100%; overflow: hidden; }
.floor-bar { display: flex; align-items: center; justify-content: space-between; min-height: 58px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.floor-bar h2 { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: 0; }
.floor-bar div > span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.floor-index { color: var(--muted); font-size: 12px; }

.room-list { display: grid; width: 100%; gap: 10px; padding: 10px 12px; background: var(--page-bg); }
.room-row { display: grid; grid-template-columns: 70px minmax(0, 1fr); width: 100%; min-height: 174px; overflow: hidden; border: 1px solid #d5dbe0; border-radius: 6px; background: #fff; box-shadow: 0 1px 2px rgba(31, 35, 41, .06); }
.room-row.is-good { box-shadow: inset 3px 0 var(--van-success-color); }
.room-row.is-bad { box-shadow: inset 3px 0 var(--van-danger-color); }
.room-row.is-empty { box-shadow: inset 3px 0 #69737d; }
.room-code { display: flex; align-items: flex-start; justify-content: center; padding-top: 21px; border-right: 1px solid #d5dbe0; background: #f8f9fa; color: #111820; font-size: 20px; font-variant-numeric: tabular-nums; font-weight: 700; }
.room-info { min-width: 0; overflow: hidden; padding: 14px 14px 12px; }
.room-title-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.class-name { min-width: 0; overflow: hidden; color: #616b75; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.course-name, .teacher-name { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.course-name { margin-top: 11px; }
.teacher-name { margin-top: 7px; }
.course-name span, .teacher-name span { flex: 0 0 48px; color: #8a949e; font-size: 11px; }
.course-name strong { min-width: 0; color: #1269d3; font-size: 17px; font-weight: 700; line-height: 1.25; }
.teacher-name strong { color: #1f2329; font-size: 16px; font-weight: 700; }
.staff-info { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 12px; margin: 10px 0 0; }
.staff-info div { display: flex; min-width: 0; gap: 6px; font-size: 12px; }
.staff-info dt { flex: 0 0 auto; color: #8a949e; }
.staff-info dd { min-width: 0; margin: 0; overflow: hidden; color: #3d454d; text-overflow: ellipsis; white-space: nowrap; }
.mark-buttons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; min-width: 0; margin-top: 13px; }
.mark-buttons .van-button { width: 100%; min-width: 0; padding-right: 4px; padding-left: 4px; border-radius: 3px; }

.floor-pager { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); }
.floor-pager .van-button { min-width: 108px; border-radius: 4px; }
.update-time { margin: 14px 0 0; color: #929ca5; font-size: 11px; text-align: center; }
.page-loading { padding: 56px 0; color: var(--muted); }

@media (min-width: 601px) {
    body { padding: 12px 0; }
    #mobile-check-app { max-width: 600px; margin: 0 auto; border: 1px solid var(--line); }
}

@media (max-width: 360px) {
    .staff-info { grid-template-columns: 1fr; }
    .room-row { grid-template-columns: 62px minmax(0, 1fr); }
}
