/* ============================================================
   YYUP课程表 v1.0.0 — Liquid Glass UI
   ============================================================ */
:root {
  --accent: #6ea8ff;
  --accent-2: #b78bff;
  --accent-3: #5eead4;
  --danger: #ff7a90;
  --ok: #4ade80;
  --warn: #fbbf24;

  --text: rgba(255, 255, 255, 0.94);
  --text-2: rgba(255, 255, 255, 0.66);
  --text-3: rgba(255, 255, 255, 0.42);

  --glass-bg: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05));
  --glass-bg-strong: linear-gradient(145deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.09));
  --glass-border: rgba(255, 255, 255, 0.26);
  --glass-border-soft: rgba(255, 255, 255, 0.14);
  --glass-shadow: 0 18px 50px rgba(4, 8, 24, 0.38), 0 2px 10px rgba(4, 8, 24, 0.18);
  --glass-inner: inset 0 1px 0 rgba(255, 255, 255, 0.48), inset 0 -1px 0 rgba(255, 255, 255, 0.06);

  --blur: 26px;
  --sat: 180%;
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 13px;

  --row-h: 58px;
  --rail-w: 44px;
  --nav-h: 74px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "HarmonyOS Sans SC",
    "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  --num: "SF Pro Display", -apple-system, "Helvetica Neue", "DIN Alternate", var(--font);
}

body[data-theme="light"] {
  --text: rgba(12, 20, 40, 0.92);
  --text-2: rgba(20, 30, 55, 0.62);
  --text-3: rgba(20, 30, 55, 0.4);
  --glass-bg: linear-gradient(145deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.34));
  --glass-bg-strong: linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.5));
  --glass-border: rgba(255, 255, 255, 0.9);
  --glass-border-soft: rgba(120, 140, 190, 0.18);
  --glass-shadow: 0 20px 44px rgba(70, 90, 150, 0.18), 0 2px 8px rgba(70, 90, 150, 0.08);
  --glass-inner: inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 -1px 0 rgba(255, 255, 255, 0.3);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(110, 168, 255, 0.9), rgba(180, 120, 255, 0.9));
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 3px 10px rgba(40, 70, 160, 0.45);
}

html,
body {
  margin: 0;
  height: 100%;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: #060912;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: 0.01em;
}

/* ---------- 背景 ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(120% 90% at 15% 0%, #1b2a6b 0%, transparent 55%),
    radial-gradient(110% 80% at 90% 10%, #4b1f6b 0%, transparent 50%),
    radial-gradient(120% 90% at 50% 110%, #0b3b56 0%, transparent 60%),
    linear-gradient(160deg, #070a18 0%, #0a0f22 40%, #060a14 100%);
}
body[data-theme="light"] .bg {
  background:
    radial-gradient(120% 90% at 10% 0%, #cfe0ff 0%, transparent 55%),
    radial-gradient(110% 80% at 95% 5%, #e9d5ff 0%, transparent 50%),
    radial-gradient(120% 90% at 50% 110%, #d8f5ef 0%, transparent 60%),
    linear-gradient(160deg, #f2f5fd 0%, #e9eefb 50%, #f6f8ff 100%);
}
.blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(60px);
  opacity: var(--blob-opacity, 0.55);
  z-index: -2;
  pointer-events: none;
  animation: float 22s ease-in-out infinite;
}
body[data-theme="light"] .blob {
  opacity: var(--blob-opacity, 0.5);
  filter: blur(70px);
}
.blob.b1 {
  width: 58vw;
  height: 58vw;
  max-width: 460px;
  max-height: 460px;
  left: -18vw;
  top: -12vh;
  background: radial-gradient(circle at 40% 40%, #4f7cff, #7c4dff 60%, transparent 72%);
}
.blob.b2 {
  width: 52vw;
  height: 52vw;
  max-width: 420px;
  max-height: 420px;
  right: -20vw;
  top: 18vh;
  background: radial-gradient(circle at 50% 50%, #ff5f9e, #b14dff 65%, transparent 75%);
  animation-delay: -7s;
}
.blob.b3 {
  width: 64vw;
  height: 64vw;
  max-width: 520px;
  max-height: 520px;
  left: 10vw;
  bottom: -22vh;
  background: radial-gradient(circle at 50% 50%, #25d0c0, #2b7fff 68%, transparent 78%);
  animation-delay: -13s;
}
@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  33% { transform: translate3d(3vw, 3vh, 0) scale(1.06); }
  66% { transform: translate3d(-2vw, -2vh, 0) scale(0.97); }
}
.noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

/* ---------- 玻璃 ---------- */
.glass {
  background: linear-gradient(145deg, rgba(255, 255, 255, var(--glass-alpha, 0.16)), rgba(255, 255, 255, var(--glass-alpha-2, 0.06)));
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow), var(--glass-inner);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(var(--sat));
  backdrop-filter: blur(var(--blur)) saturate(var(--sat));
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}
.glass::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.34) 0%, rgba(255, 255, 255, 0) 34%, rgba(255, 255, 255, 0) 68%, rgba(255, 255, 255, 0.1) 100%);
  opacity: 0.55;
  mix-blend-mode: screen;
}
body[data-theme="light"] .glass::after {
  opacity: 0.38;
  mix-blend-mode: normal;
}
.glass-strong {
  background: var(--glass-bg-strong);
}

/* ---------- 壳层 ---------- */
.app {
  position: relative;
  height: 100vh;
  height: 100dvh;
  max-width: 620px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: calc(var(--safe-top) + 10px) 14px 0;
  overflow: hidden;
}
#mainView {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
@media (min-width: 900px) {
  :root {
    --row-h: 64px;
    --rail-w: 52px;
  }
  .app {
    max-width: 860px;
    height: calc(100vh - 44px);
    height: calc(100dvh - 44px);
    margin: 22px auto;
    padding: 20px 20px 0;
    border-radius: 42px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: linear-gradient(170deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.16);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    backdrop-filter: blur(18px) saturate(140%);
  }
  body[data-theme="light"] .app {
    border-color: rgba(255, 255, 255, 0.8);
    background: linear-gradient(170deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.12));
    box-shadow: 0 40px 120px rgba(70, 90, 150, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  }
  .app-head {
    padding: 6px 6px 14px;
  }
  .brand-title {
    font-size: 18px;
  }
  .brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 15px;
  }
  .week-num {
    font-size: 38px;
  }
  .week-label {
    font-size: 13px;
  }
  .tt-day-head .dh-name {
    font-size: 13px;
  }
  .tt-day-head .dh-date {
    font-size: 10px;
  }
  .course .c-name {
    font-size: 12px;
    -webkit-line-clamp: 5;
  }
  .course .c-room {
    font-size: 9.5px;
  }
  .today-item {
    min-width: 150px;
  }
  .tab {
    height: 60px;
    font-size: 11px;
  }
}

.app-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 4px 12px;
  flex: none;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.brand-mark {
  overflow: hidden;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.42));
  color: #0d1830;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.5px;
  box-shadow: 0 8px 22px rgba(60, 110, 255, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  flex: none;
}
.brand-text {
  min-width: 0;
}
.brand-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: nowrap;
}
.brand-sub {
  font-size: 11px;
  color: var(--text-2);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 46vw;
}
.head-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
}
.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  border: 1px solid var(--glass-border-soft);
  background: var(--glass-bg);
  color: var(--text);
  display: grid;
  place-items: center;
  font-size: 16px;
  cursor: pointer;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  transition: transform 0.18s ease, background 0.2s ease;
}
.icon-btn:active {
  transform: scale(0.92);
}

/* ---------- 主视图 ---------- */
.view {
  flex: 1;
  min-height: 0;
  display: none;
  flex-direction: column;
  animation: viewIn 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}
.view.active {
  display: flex;
}
@keyframes viewIn {
  from { opacity: 0; transform: translateY(10px) scale(0.995); }
  to { opacity: 1; transform: none; }
}

/* ---------- 周切换 ---------- */
.week-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-lg);
  margin-bottom: 10px;
  flex: none;
}
.week-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}
.week-num {
  font-family: var(--num);
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  background: linear-gradient(180deg, #fff, rgba(255, 255, 255, 0.62));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
body[data-theme="light"] .week-num {
  background: linear-gradient(180deg, #182241, rgba(24, 34, 65, 0.5));
  -webkit-background-clip: text;
  background-clip: text;
}
.week-label {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.4;
}
.week-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}
.chip-btn {
  border: 1px solid var(--glass-border-soft);
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-2);
  border-radius: 12px;
  height: 34px;
  min-width: 34px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.18s ease;
}
.chip-btn:active {
  transform: scale(0.94);
}
.chip-btn.on {
  background: rgba(110, 168, 255, 0.28);
  border-color: rgba(150, 190, 255, 0.5);
  color: #fff;
}
body[data-theme="light"] .chip-btn.on {
  color: #12326f;
}
.chip-btn.primary {
  background: linear-gradient(140deg, #6ea8ff, #9b7bff);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 6px 18px rgba(90, 130, 255, 0.35);
}

/* ---------- 课表 ---------- */
.tt-wrap {
  flex: 1;
  min-height: 0;
  border-radius: var(--radius-xl);
  padding: 6px 6px 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(165deg, rgba(12, 18, 38, 0.58), rgba(12, 18, 38, 0.34));
}
body[data-theme="light"] .tt-wrap {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.46));
}
.tt-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.tt-scroll::-webkit-scrollbar {
  display: none;
}

.tt-head {
  display: flex;
  align-items: stretch;
  padding: 2px 0 8px;
  position: sticky;
  top: 0;
  z-index: 6;
  background: linear-gradient(180deg, rgba(12, 18, 38, 0.55), rgba(12, 18, 38, 0));
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-radius: 16px 16px 0 0;
}
body[data-theme="light"] .tt-head {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0));
}
.tt-head-rail {
  width: var(--rail-w);
  flex: none;
  font-size: 9px;
  color: var(--text-3);
  display: grid;
  place-items: end center;
  padding-bottom: 4px;
}
.tt-day-head {
  flex: 1;
  min-width: 0;
  text-align: center;
  padding: 5px 0 6px;
  border-radius: 14px;
  transition: background 0.25s ease;
}
.tt-day-head .dh-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
}
.tt-day-head .dh-date {
  font-size: 9px;
  color: var(--text-3);
  margin-top: 2px;
  font-family: var(--num);
}
.tt-day-head.today {
  background: linear-gradient(180deg, rgba(110, 168, 255, 0.34), rgba(150, 120, 255, 0.12));
  box-shadow: inset 0 0 0 1px rgba(160, 195, 255, 0.35);
}
.tt-day-head.today .dh-name,
.tt-day-head.today .dh-date {
  color: #fff;
}
body[data-theme="light"] .tt-day-head.today .dh-name,
body[data-theme="light"] .tt-day-head.today .dh-date {
  color: #0e1c3a;
}

.tt-body {
  position: relative;
  display: flex;
  padding-bottom: 14px;
}
.tt-rail {
  width: var(--rail-w);
  flex: none;
  position: relative;
}
.tt-rail-cell {
  height: var(--row-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
}
body[data-theme="light"] .tt-rail-cell {
  border-color: rgba(30, 50, 100, 0.08);
}
.tt-rail-cell b {
  font-family: var(--num);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: -0.02em;
}
.tt-rail-cell span,
.tt-rail-cell em {
  font-size: 7.5px;
  line-height: 1.1;
  color: var(--text-3);
  font-family: var(--num);
  font-style: normal;
}
.tt-rail-cell em { opacity: 0.72; }

.tt-days {
  flex: 1;
  display: flex;
  min-width: 0;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
}
body[data-theme="light"] .tt-days {
  background: rgba(255, 255, 255, 0.32);
  border-color: rgba(30, 50, 100, 0.07);
}
.tt-day {
  flex: 1;
  min-width: 0;
  position: relative;
  border-left: 1px solid rgba(255, 255, 255, 0.055);
}
.tt-day:first-child {
  border-left: 0;
}
body[data-theme="light"] .tt-day {
  border-color: rgba(30, 50, 100, 0.07);
}
.tt-day.today {
  background: linear-gradient(180deg, rgba(110, 168, 255, 0.11), rgba(140, 110, 255, 0.04));
}
.now-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 1.5px;
  background: linear-gradient(90deg, rgba(255, 122, 144, 0.1), #ff7a90 40%, rgba(255, 122, 144, 0.2));
  z-index: 4;
  pointer-events: none;
  box-shadow: 0 0 8px rgba(255, 122, 144, 0.55);
}
.now-line::after {
  content: "";
  position: absolute;
  left: 0;
  top: -3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff7a90;
  box-shadow: 0 0 8px #ff7a90;
}
.tt-day::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(180deg, transparent 0 calc(var(--row-h) - 1px), rgba(255, 255, 255, 0.055) calc(var(--row-h) - 1px) var(--row-h));
  pointer-events: none;
}
body[data-theme="light"] .tt-day::before {
  background-image: repeating-linear-gradient(180deg, transparent 0 calc(var(--row-h) - 1px), rgba(30, 50, 100, 0.07) calc(var(--row-h) - 1px) var(--row-h));
}

.course {
  position: absolute;
  left: 1px;
  right: 1px;
  border-radius: var(--course-radius, 4px);
  padding: 4px 3px 3px;
  color: #fff;
  font-size: 9.5px;
  line-height: 1.2;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 5px 14px rgba(6, 12, 30, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.38);
  transition: transform 0.16s ease, box-shadow 0.2s ease;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.16);
}
.course::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.4), transparent 42%, rgba(255, 255, 255, 0.08));
  pointer-events: none;
  opacity: 0.55;
}
.course:active {
  transform: scale(0.965);
}
.course.now {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.55), 0 8px 22px rgba(90, 140, 255, 0.35);
}
body[data-theme="light"] .course {
  filter: saturate(1.08) brightness(0.9);
  text-shadow: 0 1px 3px rgba(20, 30, 60, 0.3);
}
body[data-theme="light"] .course .c-name {
  color: #fff;
  font-weight: 750;
}
.course .c-name {
  font-weight: 700;
  font-size: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  letter-spacing: 0;
  word-break: break-all;
}
.course .c-place,
.course .c-teacher {
  margin-top: 2px;
  font-size: 8px;
  line-height: 1.25;
  opacity: 0.88;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-all;
}
.course .c-teacher {
  opacity: 0.78;
}
.course .c-room {
  margin-top: 2px;
  font-size: 8px;
  opacity: 0.86;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.course.compact .c-name {
  -webkit-line-clamp: 2;
  font-size: 10px;
}
.course.not-current {
  opacity: 0.36;
  filter: saturate(0.4);
}
.course .c-flag {
  position: absolute;
  top: 3px;
  right: 3px;
  font-size: 7px;
  padding: 1px 3px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.3);
  font-weight: 700;
}

.today-panel {
  margin-top: 10px;
  padding: 13px 14px;
  border-radius: var(--radius-lg);
  flex: none;
}
.today-panel .tp-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 8px;
}
.today-panel .tp-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-3);
  box-shadow: 0 0 10px var(--accent-3);
}
.today-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.today-list::-webkit-scrollbar {
  display: none;
}
.today-item {
  flex: none;
  min-width: 118px;
  max-width: 150px;
  padding: 9px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-left: 3px solid var(--c, var(--accent));
}
body[data-theme="light"] .today-item {
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(30, 50, 100, 0.08);
}
.today-item .ti-time {
  font-size: 9px;
  color: var(--text-3);
  font-family: var(--num);
}
.today-item .ti-name {
  font-size: 12px;
  font-weight: 600;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.today-item .ti-room {
  font-size: 9.5px;
  color: var(--text-2);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.today-empty {
  font-size: 12px;
  color: var(--text-2);
  padding: 6px 0;
}

/* ---------- 底部导航 ---------- */
.tabbar {
  flex: none;
  margin: 10px 0 calc(8px + var(--safe-bottom));
  border-radius: 26px;
  padding: 7px;
  display: flex;
  gap: 4px;
  z-index: 20;
}
.tab {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--text-3);
  border-radius: 19px;
  height: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
}
.tab .ti {
  font-size: 19px;
  line-height: 1;
  filter: saturate(0.6);
  transition: transform 0.22s ease;
}
.tab.on {
  color: #fff;
  background: linear-gradient(160deg, rgba(110, 168, 255, 0.32), rgba(150, 110, 255, 0.2));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 6px 18px rgba(80, 120, 255, 0.2);
}
body[data-theme="light"] .tab.on {
  color: #10224a;
}
.tab.on .ti {
  transform: translateY(-1px) scale(1.06);
  filter: none;
}

/* ---------- 通用列表/卡片 ---------- */
.view-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
  padding-bottom: 6px;
}
.view-scroll::-webkit-scrollbar {
  display: none;
}
.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 4px 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-2);
  letter-spacing: 0.04em;
}
.section-title .line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--glass-border-soft), transparent);
}
.section-title .more {
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
}

.card {
  padding: 14px 15px;
  border-radius: var(--radius-lg);
  margin-bottom: 10px;
}
.card-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.card-title {
  font-size: 14px;
  font-weight: 650;
  line-height: 1.35;
}
.card-sub {
  font-size: 11.5px;
  color: var(--text-2);
  margin-top: 4px;
  line-height: 1.5;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--glass-border-soft);
  color: var(--text-2);
}
.badge.ok { background: rgba(74, 222, 128, 0.16); color: #b9f6cd; border-color: rgba(74, 222, 128, 0.3); }
.badge.warn { background: rgba(251, 191, 36, 0.16); color: #ffe6a3; border-color: rgba(251, 191, 36, 0.3); }
.badge.err { background: rgba(255, 122, 144, 0.16); color: #ffc2cb; border-color: rgba(255, 122, 144, 0.3); }
body[data-theme="light"] .badge.ok { color: #0c6b36; }
body[data-theme="light"] .badge.warn { color: #7a5300; }
body[data-theme="light"] .badge.err { color: #8c1c2e; }

.course-list-card {
  display: flex;
  gap: 12px;
  align-items: stretch;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 9px;
  cursor: pointer;
}
.course-list-card .bar {
  width: 4px;
  border-radius: 4px;
  flex: none;
}
.course-list-card .cl-body {
  flex: 1;
  min-width: 0;
}
.course-list-card .cl-name {
  font-size: 14px;
  font-weight: 650;
  display: flex;
  align-items: center;
  gap: 6px;
}
.course-list-card .cl-meta {
  font-size: 11px;
  color: var(--text-2);
  margin-top: 5px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
}
.course-list-card .cl-time {
  text-align: right;
  flex: none;
  font-size: 10px;
  color: var(--text-2);
  font-family: var(--num);
  line-height: 1.6;
}
.course-list-card .cl-time b {
  display: block;
  font-size: 12px;
  color: var(--text);
}

.empty {
  text-align: center;
  padding: 26px 18px;
  color: var(--text-2);
  font-size: 12.5px;
  line-height: 1.7;
}
.empty .emoji {
  font-size: 34px;
  display: block;
  margin-bottom: 8px;
  opacity: 0.85;
}

/* ---------- 按钮/表单 ---------- */
.btn {
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.13);
  color: var(--text);
  border-radius: 15px;
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.2s ease, opacity 0.2s;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; pointer-events: none; }
.btn.primary {
  background: linear-gradient(135deg, #6ea8ff, #a67bff 60%, #d47bff);
  border-color: rgba(255, 255, 255, 0.42);
  color: #fff;
  box-shadow: 0 10px 26px rgba(90, 120, 255, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.btn.ghost {
  background: transparent;
}
.btn.danger {
  background: rgba(255, 90, 120, 0.18);
  border-color: rgba(255, 120, 145, 0.4);
  color: #ffc7d1;
}
body[data-theme="light"] .btn.danger { color: #8c1c2e; }
.btn.block { width: 100%; }
.btn.sm { padding: 8px 12px; font-size: 12px; border-radius: 12px; }

.field {
  margin-top: 12px;
}
.field label {
  display: block;
  font-size: 11.5px;
  color: var(--text-2);
  margin: 0 0 6px 3px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.input,
.select,
.textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--glass-border-soft);
  background: rgba(255, 255, 255, 0.09);
  color: var(--text);
  padding: 12px 13px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border 0.2s ease, background 0.2s ease, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
body[data-theme="light"] .input,
body[data-theme="light"] .select,
body[data-theme="light"] .textarea {
  background: rgba(255, 255, 255, 0.66);
}
.input::placeholder,
.textarea::placeholder {
  color: var(--text-3);
}
.input:focus,
.select:focus,
.textarea:focus {
  border-color: rgba(110, 168, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(110, 168, 255, 0.18);
  background: rgba(255, 255, 255, 0.13);
}
.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4.5L6 8.5L10 4.5' fill='none' stroke='%23a9b7d6' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  padding-right: 34px;
}
.textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.6;
  font-size: 12.5px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
.row {
  display: flex;
  gap: 10px;
}
.row > * { flex: 1; min-width: 0; }

.switch {
  width: 46px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid var(--glass-border-soft);
  position: relative;
  cursor: pointer;
  flex: none;
  transition: background 0.24s ease;
}
.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}
.switch.on {
  background: linear-gradient(120deg, #6ea8ff, #a67bff);
}
.switch.on::after {
  transform: translateX(18px);
}

.week-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.week-chip {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-family: var(--num);
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border-soft);
  cursor: pointer;
  user-select: none;
  transition: all 0.16s;
}
.week-chip.on {
  background: linear-gradient(135deg, rgba(110, 168, 255, 0.85), rgba(150, 110, 255, 0.8));
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

.color-picker {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}
.color-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.25);
  transition: transform 0.16s;
  position: relative;
}
.color-dot.on {
  transform: scale(1.14);
  border-color: #fff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.28);
}

/* ---------- 底部弹层 ---------- */
.sheet-mask {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 18, 0.45);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}
.sheet-mask.show {
  opacity: 1;
  pointer-events: auto;
}
.sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 104%);
  width: min(100%, 620px);
  max-height: 90vh;
  max-height: 90dvh;
  border-radius: 30px 30px 0 0;
  z-index: 61;
  padding: 8px 16px calc(20px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  transition: transform 0.36s cubic-bezier(0.22, 1, 0.36, 1);
  background: linear-gradient(165deg, rgba(30, 38, 64, 0.92), rgba(18, 24, 44, 0.92));
  border: 1px solid var(--glass-border);
  border-bottom: 0;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  -webkit-backdrop-filter: blur(34px) saturate(180%);
  backdrop-filter: blur(34px) saturate(180%);
}
body[data-theme="light"] .sheet {
  background: linear-gradient(165deg, rgba(250, 252, 255, 0.94), rgba(238, 243, 255, 0.94));
  box-shadow: 0 -20px 60px rgba(40, 60, 120, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.sheet.show {
  transform: translate(-50%, 0);
}
.sheet-grip {
  width: 38px;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.28);
  margin: 4px auto 10px;
  flex: none;
}
body[data-theme="light"] .sheet-grip {
  background: rgba(30, 50, 100, 0.18);
}
.sheet-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  padding: 0 2px 10px;
}
.sheet-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.sheet-sub {
  font-size: 11.5px;
  color: var(--text-2);
  margin-top: 3px;
}
.sheet-head .icon-btn {
  margin-left: auto;
}
.sheet-body {
  overflow-y: auto;
  min-height: 0;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.sheet-body::-webkit-scrollbar {
  display: none;
}
.sheet-foot {
  flex: none;
  padding-top: 12px;
  display: flex;
  gap: 9px;
}
.sheet-foot .btn {
  flex: 1;
}

/* ---------- 导入 ---------- */
.import-method {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.method-card {
  padding: 14px;
  border-radius: var(--radius-lg);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 7px;
  transition: transform 0.18s ease, background 0.2s;
  min-height: 108px;
}
.method-card:active {
  transform: scale(0.975);
}
.method-card .m-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 17px;
  background: linear-gradient(140deg, rgba(110, 168, 255, 0.42), rgba(160, 110, 255, 0.28));
  border: 1px solid rgba(255, 255, 255, 0.24);
}
.method-card .m-title {
  font-size: 13px;
  font-weight: 650;
}
.method-card .m-desc {
  font-size: 10.5px;
  color: var(--text-2);
  line-height: 1.5;
}
.method-card.wide {
  grid-column: 1 / -1;
  min-height: 0;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}
.method-card.wide .m-body { flex: 1; }

.school-search {
  display: flex;
  gap: 8px;
  align-items: center;
}
.school-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 15px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.16s;
}
.school-item:active {
  background: rgba(255, 255, 255, 0.1);
}
.school-item .s-name {
  font-size: 13px;
  font-weight: 600;
}
.school-item .s-meta {
  font-size: 10.5px;
  color: var(--text-2);
  margin-top: 3px;
}
.school-item .s-go {
  margin-left: auto;
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
}

.stepline {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
}
.stepline .st {
  flex: 1;
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.13);
  overflow: hidden;
}
.stepline .st.on {
  background: linear-gradient(90deg, #6ea8ff, #b78bff);
  box-shadow: 0 0 12px rgba(110, 168, 255, 0.5);
}

.captcha-box {
  display: flex;
  gap: 10px;
  align-items: center;
}
.captcha-box img {
  height: 46px;
  border-radius: 10px;
  border: 1px solid var(--glass-border-soft);
  background: #fff;
  cursor: pointer;
  flex: none;
  max-width: 140px;
  object-fit: contain;
}
.logs {
  margin-top: 10px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
  padding: 10px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 9.5px;
  line-height: 1.7;
  color: rgba(210, 225, 255, 0.75);
  max-height: 140px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
body[data-theme="light"] .logs {
  background: rgba(18, 30, 60, 0.06);
  color: rgba(30, 45, 80, 0.7);
}

.preview-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 6px;
}
body[data-theme="light"] .preview-row {
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(30, 50, 100, 0.07);
}
.preview-row .p-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}
.preview-row .p-name {
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.preview-row .p-meta {
  font-size: 10px;
  color: var(--text-2);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.preview-row .p-when {
  margin-left: auto;
  font-size: 9.5px;
  color: var(--text-2);
  font-family: var(--num);
  text-align: right;
  flex: none;
}

/* ---------- 登录 ---------- */
.login-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 18px 4px 40px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
.login-hero {
  text-align: center;
  margin-bottom: 22px;
}
.login-logo {
  overflow: hidden;
  width: 78px;
  height: 78px;
  margin: 0 auto 16px;
  border-radius: 26px;
  display: grid;
  place-items: center;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -1px;
  color: #0b1730;
  background: linear-gradient(150deg, #ffffff, #c9d9ff 55%, #e6d3ff);
  box-shadow: 0 20px 50px rgba(80, 120, 255, 0.4), inset 0 1px 0 #fff;
  position: relative;
}
.brand-mark img,
.login-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.login-logo::after { display: none;
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.8), transparent 45%);
}
.login-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.login-sub {
  font-size: 12px;
  color: var(--text-2);
  margin-top: 6px;
  line-height: 1.7;
}
.login-card {
  padding: 18px 16px 16px;
  border-radius: 28px;
}
.tabs-mini {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  margin-bottom: 6px;
}
.tabs-mini button {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--text-2);
  height: 34px;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.tabs-mini button.on {
  background: rgba(255, 255, 255, 0.18);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.auth-tip {
  font-size: 10.5px;
  line-height: 1.6;
  color: var(--text-3);
  margin: 2px 2px 10px;
  text-align: center;
}
.auth-switch {
  margin-top: 10px;
  text-align: center;
  font-size: 11px;
  color: var(--text-3);
}
.auth-switch button {
  border: 0;
  background: none;
  color: var(--accent, #8fb4ff);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 0 2px;
}
.qq-login {
  margin-top: 8px;
  font-size: 12px;
  opacity: 0.9;
}
.legal-links {
  margin-top: 10px;
  font-size: 10px;
  line-height: 1.7;
  color: var(--text-3);
  text-align: center;
}
.legal-links a {
  color: var(--accent, #8fb4ff);
  text-decoration: none;
}
@media (max-width: 760px) {
  .app-head { padding: 4px 4px 6px; }
  .brand-mark { width: 36px; height: 36px; border-radius: 12px; font-size: 14px; }
  .brand-title { font-size: 15px; }
  .brand-sub { font-size: 9.5px; }
  .week-bar { padding: 7px 8px; margin-bottom: 7px; gap: 6px; }
  .week-num { font-size: 24px; }
  .course-list-card { padding: 8px 10px; margin-bottom: 6px; gap: 8px; }
  .course-list-card .cl-name { font-size: 13px; }
  .course-list-card .cl-meta { margin-top: 3px; font-size: 10px; }
  :root { --rail-w: 29px; }
  .tt-head-rail { font-size: 8px; }
  .tt-rail-cell b { font-size: 10px; }
  .tt-rail-cell span,
  .tt-rail-cell em { font-size: 7px; }
  .tt-day-head { padding: 4px 0; }
  .tt-day-head .dh-name { font-size: 10.5px; }
  .tt-day-head .dh-date { font-size: 8px; }
  .course { padding: 3px 2px 2px; }
  .course .c-name { font-size: 10px; line-height: 1.18; -webkit-line-clamp: 5; }
  .course .c-room { font-size: 8px; }
}
body.tab-schedule .app-head { display: none; }
body.simple-mode .app-head,
body.simple-mode .today-panel { display: none !important; }
body.simple-mode .app { padding-bottom: 8px; }
body.simple-mode .tt-wrap { border-radius: 20px; }
body.extra-bottom .view-schedule { padding-bottom: 72px; }
@media (max-height: 860px) {
  .login-wrap { padding-top: 6px; padding-bottom: 80px; }
  .login-hero { margin-bottom: 10px; }
  .login-logo { width: 54px; height: 54px; border-radius: 18px; font-size: 19px; margin-bottom: 8px; }
  .login-title { font-size: 22px; }
  .login-sub { font-size: 11px; margin-top: 3px; }
  .login-card { padding: 12px 12px 10px; }
  .field { margin-bottom: 8px; }
  .input { height: 44px; }
  .tabs-mini button { height: 30px; }
}
@media (max-height: 740px) {
  .login-hero { margin-bottom: 12px; }
  .login-logo { width: 58px; height: 58px; border-radius: 20px; font-size: 21px; margin-bottom: 10px; }
  .login-title { font-size: 24px; }
  .login-sub { margin-top: 4px; font-size: 12px; }
  .login-card { padding: 14px 14px 12px; }
  .login-wrap { padding-top: 8px; }
}
.hint-text {
  font-size: 10.5px;
  color: var(--text-3);
  line-height: 1.7;
  margin-top: 10px;
  text-align: center;
}
.hint-text code {
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.09);
  padding: 1px 5px;
  border-radius: 5px;
  font-size: 10px;
}

/* ---------- 我的 ---------- */
.profile-card {
  padding: 18px 16px;
  border-radius: 26px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.avatar {
  width: 56px;
  height: 56px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 700;
  color: #0c1730;
  background: linear-gradient(150deg, #dbe7ff, #b9c9ff 50%, #e3d3ff);
  box-shadow: inset 0 1px 0 #fff, 0 8px 20px rgba(80, 110, 255, 0.3);
  flex: none;
  overflow: hidden;
  position: relative;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.avatar .avatar-edit {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 20px;
  height: 20px;
  border-radius: 9px 0 16px 0;
  background: rgba(8, 14, 30, 0.72);
  color: #fff;
  font-size: 12px;
  display: grid;
  place-items: center;
}
.profile-name {
  font-size: 17px;
  font-weight: 700;
}
.profile-sub {
  font-size: 11px;
  color: var(--text-2);
  margin-top: 4px;
}
.profile-stats {
  margin-left: auto;
  text-align: right;
}
.profile-stats b {
  font-family: var(--num);
  font-size: 20px;
  font-weight: 700;
  display: block;
}
.profile-stats span {
  font-size: 9.5px;
  color: var(--text-3);
}

.setting-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 16px;
  cursor: pointer;
}
.setting-row + .setting-row {
  margin-top: 2px;
}
.setting-row .sr-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.1);
  font-size: 14px;
  flex: none;
}
.setting-row .sr-title {
  font-size: 13px;
  font-weight: 600;
}
.setting-row .sr-desc {
  font-size: 10.5px;
  color: var(--text-3);
  margin-top: 2px;
}
.setting-row .sr-right {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ---------- Toast ---------- */
.toast-wrap {
  position: fixed;
  bottom: calc(var(--nav-h) + 104px + var(--safe-bottom));
  top: auto;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: min(92vw, 520px);
}
.toast {
  padding: 11px 16px;
  border-radius: 16px;
  font-size: 12.5px;
  font-weight: 600;
  text-align: center;
  color: #fff;
  background: linear-gradient(140deg, rgba(30, 40, 70, 0.94), rgba(18, 26, 48, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.36);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  animation: toastIn 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.toast.err {
  background: linear-gradient(140deg, rgba(120, 30, 55, 0.96), rgba(70, 20, 40, 0.96));
}
.toast.ok {
  background: linear-gradient(140deg, rgba(20, 90, 70, 0.96), rgba(12, 55, 50, 0.96));
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-12px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

/* ---------- 杂项 ---------- */
.spin {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.fade-in { animation: viewIn 0.32s ease; }

.fab {
  position: fixed;
  right: max(calc(50% - 290px), 18px);
  bottom: calc(var(--nav-h) + var(--safe-bottom) + 30px);
  width: 54px;
  height: 54px;
  border-radius: 19px;
  display: grid;
  place-items: center;
  font-size: 24px;
  color: #fff;
  background: linear-gradient(150deg, rgba(110, 168, 255, 0.9), rgba(160, 110, 255, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 14px 34px rgba(80, 120, 255, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  z-index: 30;
  cursor: pointer;
  transition: transform 0.18s ease;
}
.fab:active { transform: scale(0.93); }

.swipe-hint {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-top: 8px;
  flex: none;
}
.swipe-hint i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
}
.swipe-hint i.on {
  background: rgba(255, 255, 255, 0.75);
  width: 14px;
  border-radius: 4px;
}

@media (max-width: 360px) {
  :root { --row-h: 54px; }
  .brand-title { font-size: 15px; }
  .week-num { font-size: 26px; }
  .course .c-name { font-size: 9.5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
