/* ---------------------------------------------------------
   MiSans：全站正文与等宽场景统一用它（可变字重 150–700）
   字体文件是 MiSansVF.ttf 的子集，保留站点用到的字符，约 2.6 MB
   --------------------------------------------------------- */
@font-face {
  font-family: "MiSans";
  src: url("fonts/MiSans.woff2?v=20261030") format("woff2");
  font-weight: 150 700;
  font-style: normal;
  font-display: swap;
}

/* ---------------------------------------------------------
   设计变量（与主站同一套语言）
   --------------------------------------------------------- */
:root {
  --bg: #fbfbf9;
  --bg-soft: #f4f3ef;
  --surface: #ffffff;
  --ink: #1b1d1b;
  --ink-soft: #4d524d;
  --muted: #6b706a;
  --line: #e6e4de;
  --line-strong: #d3d1ca;
  --hover: #f1f0eb;
  --accent: #2f6a58;
  --accent-ink: #245446;
  --accent-soft: rgba(47, 106, 88, 0.09);
  --code-bg: #f3f2ed;
  --radius: 12px;
  --radius-sm: 8px;
  --shell: 1120px;
  --head-h: 68px;
  --font-sans: "MiSans", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-mono: "MiSans", ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  color-scheme: light;
}

/* 深色由 theme-init.js / theme.js 写在 html 的 data-theme 上（和主站、后台同一套规则）：
   手动切换必须能盖过系统偏好，纯媒体查询做不到。没开 JS 时就是浅色 ——
   本站的问答列表、整屏翻页本来就靠脚本，不额外留一份媒体查询兜底。 */
html[data-theme="dark"] {
  --bg: #0e100f;
  --bg-soft: #121513;
  --surface: #151816;
  --ink: #e9ebe6;
  --ink-soft: #b7bdb5;
  --muted: #8a9188;
  --line: #242925;
  --line-strong: #363c36;
  --hover: #191d19;
  --accent: #7fb9a4;
  --accent-ink: #a3d0bd;
  --accent-soft: rgba(127, 185, 164, 0.12);
  --code-bg: #161a17;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* 手机上点按不再闪系统默认的半透明方块，交互反馈交给各自的样式 */
  -webkit-tap-highlight-color: transparent;
}

/* 接管翻页时关掉原生吸附与平滑，交给脚本缓动 */
html.js-pager {
  scroll-snap-type: none;
  scroll-behavior: auto;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(880px 520px at 82% -10%, var(--accent-soft), transparent 62%),
    radial-gradient(660px 460px at 0% 106%, var(--accent-soft), transparent 60%);
}

main {
  position: relative;
  z-index: 1;
}

a {
  color: var(--accent-ink);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--code-bg);
  font: 0.9em var(--font-mono);
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 24px;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 650;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--muted);
  font: 11px/1.4 var(--font-mono);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.lede {
  max-width: 58ch;
  color: var(--ink-soft);
  font-size: clamp(14.5px, 1.1vw, 16.5px);
}

.note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

/* ---------------------------------------------------------
   顶栏 / 进度点
   --------------------------------------------------------- */
.site-head {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  border-bottom: 1px solid transparent;
  background: transparent;
  transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease);
}

.site-head.is-scrolled {
  background: var(--surface);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: saturate(1.2) blur(14px);
  -webkit-backdrop-filter: saturate(1.2) blur(14px);
  border-bottom-color: var(--line);
}

.shell--head {
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--head-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  white-space: nowrap;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand:hover {
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: block;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  overflow: hidden;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.head-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

/* 顶栏的文字式入口：不带边框和底色，靠颜色变化表示悬停与当前页 */
.head-link {
  display: inline-flex;
  align-items: center;
  padding: 4px 2px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.16s var(--ease);
}

.head-link:hover {
  color: var(--ink);
  text-decoration: none;
}

.head-link.is-current {
  color: var(--ink);
}

.head-help-short {
  display: none;
}

.head-cta {
  padding: 8px 16px;
  font-size: 13.5px;
}

/* 宽屏顶栏放大一档：标和字一起变大，右侧两个入口保持原尺寸 */
@media (min-width: 900px) {
  :root {
    --head-h: 82px;
  }

  .brand {
    gap: 12px;
    font-size: 22px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 11px;
  }
}

/* ---------------------------------------------------------
   主题切换按钮（图标与动画逻辑照搬主站 / 后台那套）
   --------------------------------------------------------- */
.theme-btn {
  flex: none;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background-color 0.16s var(--ease), color 0.16s var(--ease);
}

.theme-btn:hover {
  background: var(--hover);
  color: var(--ink);
}

/* 动画期间图标是内联进来的过渡 SVG，先给个底色免得看着在闪 */
.theme-btn.is-animating {
  background: var(--hover);
}

.theme-btn svg {
  width: 21px;
  height: 21px;
  display: block;
}

/* 静止态用 mask 上当前主题那一枚，颜色跟着 currentColor 走 */
.theme-icon {
  width: 21px;
  height: 21px;
  display: block;
  background: currentColor;
  --theme-icon: url("/UniversitySchedule/assets/icons/theme/light.svg");
  -webkit-mask: var(--theme-icon) center / contain no-repeat;
  mask: var(--theme-icon) center / contain no-repeat;
}

html:not([data-theme]) .theme-icon,
html[data-theme="light"][data-mode="light"] .theme-icon {
  --theme-icon: url("/UniversitySchedule/assets/icons/theme/light.svg");
}

html[data-theme="dark"][data-mode="dark"] .theme-icon {
  --theme-icon: url("/UniversitySchedule/assets/icons/theme/dark.svg");
}

html[data-theme="light"][data-mode="auto"] .theme-icon {
  --theme-icon: url("/UniversitySchedule/assets/icons/theme/light-a.svg");
}

html[data-theme="dark"][data-mode="auto"] .theme-icon {
  --theme-icon: url("/UniversitySchedule/assets/icons/theme/dark-a.svg");
}

/* 切换主题时给整页一个短暂的颜色过渡，图标动画只管按钮 */
html.theme-anim *:not(svg):not(svg *) {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease !important;
}

@media (prefers-reduced-motion: reduce) {
  html.theme-anim *:not(svg):not(svg *) {
    transition: none !important;
  }
}

.rail {
  position: fixed;
  right: 26px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 25;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

@media (min-width: 1280px) {
  .rail {
    display: flex;
  }
}

.rail-dot {
  position: relative;
  width: 8px;
  height: 8px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  background: transparent;
  cursor: pointer;
  transition: height 0.3s var(--ease), background-color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.rail-dot:hover {
  border-color: var(--ink-soft);
}

.rail-dot.is-active {
  height: 24px;
  border-color: var(--accent);
  background: var(--accent);
}

.rail-dot span {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 11px;
  color: var(--ink-soft);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease);
}

.rail-dot:hover span,
.rail-dot:focus-visible span {
  opacity: 1;
}

/* ---------------------------------------------------------
   分屏
   --------------------------------------------------------- */
.screen {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 112px 0 72px;
}

.screen-inner {
  width: 100%;
}

@media (min-width: 900px) and (min-height: 700px) {
  html:not(.js-pager) {
    scroll-snap-type: y mandatory;
  }

  .screen {
    min-height: 100vh;
    min-height: 100svh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }
}

.section-head {
  margin-bottom: clamp(26px, 4vh, 42px);
}

.section-head h2 {
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.16;
}

.section-head .lede {
  margin-top: 12px;
}

/* ---------------------------------------------------------
   按钮
   --------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 500;
  transition: background-color 0.16s var(--ease), border-color 0.16s var(--ease);
}

.btn:hover {
  border-color: var(--line-strong);
  background: var(--hover);
  color: var(--ink);
  text-decoration: none;
}

.btn-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-ink);
  border-color: var(--accent-ink);
  color: #fff;
}

.btn-block {
  width: 100%;
  padding: 13px 18px;
  font-size: 15px;
}

.btn-lg {
  padding: 12px 22px;
  border-radius: 11px;
  font-size: 15px;
}

/* ---------------------------------------------------------
   首屏
   --------------------------------------------------------- */
.hero {
  padding-top: 96px;
  padding-bottom: 44px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(32px, 4.5vw, 64px);
  align-items: center;
}

.hero h1 {
  /* 标题只有五个字，放大到接近栏宽；再大就会换行 */
  font-size: clamp(52px, 6.2vw, 92px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  white-space: nowrap;
  /* 副标题更宽时（窄一点的桌面宽度），两行仍共用同一条中线 */
  text-align: center;
}

/* 后续屏（教务导入等）沿用首屏结构，标题更长，字号收到单行放得下为止 */
.hero--sub h1 {
  font-size: clamp(32px, 3.2vw, 46px);
  white-space: normal;
}

/* 标题只有一行：把文案块收到标题的宽度，副标题再在标题下居中 */
.hero-copy {
  width: max-content;
  max-width: 100%;
}

.hero .lede {
  font-size: clamp(15px, 1.2vw, 17px);
  max-width: none;
  text-align: center;
}

/* 首屏类页脚注：教务适配的求助说明，跟着文案块居中、压小一档 */
.hero-note {
  margin-top: 22px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
  text-align: center;
  text-wrap: pretty;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 26px;
  color: var(--muted);
  font: 11.5px/1.5 var(--font-mono);
}

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: 11px/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.75;
}

.scroll-hint i {
  font-style: normal;
  animation: hint-bob 2.4s var(--ease) infinite;
}

@keyframes hint-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* ---------------------------------------------------------
   课表示意（设备框）
   --------------------------------------------------------- */
.hero-visual {
  position: relative;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 8% -6% 12%;
  z-index: -1;
  border-radius: 50%;
  background: rgba(47, 106, 88, 0.15);
  filter: blur(50px);
}

html[data-theme="dark"] .hero-visual::before {
  background: rgba(127, 185, 164, 0.13);
}

.hero-shot {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  /* 首屏要保持「一屏装得下」：可用高度 = 视口 - 顶栏留白(96) - 底部留白(44) */
  max-height: calc(100vh - 140px);
  max-height: calc(100svh - 140px);
  margin: 0 auto;
  filter: drop-shadow(0 26px 46px rgba(20, 30, 24, 0.22));
}

/* ---------------------------------------------------------
   通知轮播（中间一张是前两屏的 2/3，两边 3/4 并淡一点）
   --------------------------------------------------------- */
.showcase {
  /* 中图高度 = 前两屏截图高度的 2/3；侧图宽 = 0.75 × 中图宽 */
  --shot-h: calc((100svh - 140px) * 0.6667);
  --gap: calc(var(--shot-h) * 0.075);
  --shift-1: calc(var(--shot-h) * 0.414 + var(--gap));
  --shift-2: calc(var(--shot-h) * 0.769 + var(--gap) * 2);
  padding-top: 96px;
  padding-bottom: 40px;
  overflow: hidden;
}

.showcase-inner {
  display: flex;
  flex-direction: column;
}

/* 没有脚本或系统减少了动效时：三张并排、三条文案并排，不藏内容 */
.showcase-copies {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px clamp(24px, 4vw, 56px);
}

.showcase-copy {
  text-align: center;
}

.showcase-copy h2 {
  font-size: clamp(32px, 3.2vw, 46px);
  line-height: 1.12;
}

.showcase-copy p {
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: clamp(14.5px, 1.1vw, 16.5px);
}

.showcase-stage {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px 24px;
  margin-top: 32px;
}

.showcase-item {
  display: block;
  width: auto;
  height: auto;
  max-width: calc(33.333% - 16px);
  max-height: calc(var(--shot-h) * 0.75);
  filter: drop-shadow(0 16px 30px rgba(20, 30, 24, 0.18));
}

.showcase.is-carousel .showcase-copies {
  display: grid;
  justify-items: center;
}

/* 三条文案叠在同一格里交叉淡入淡出，切换时不撑动版面 */
.showcase.is-carousel .showcase-copy {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.showcase.is-carousel .showcase-copy.is-current {
  opacity: 1;
  transform: none;
}

.showcase.is-carousel .showcase-stage {
  position: relative;
  display: block;
  height: var(--shot-h);
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.showcase.is-carousel .showcase-item {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: auto;
  height: var(--shot-h);
  max-width: none;
  max-height: none;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: transform 0.62s var(--ease), opacity 0.62s var(--ease);
  z-index: 1;
  -webkit-user-drag: none;
}

.showcase.is-carousel .showcase-item[data-offset="0"] {
  z-index: 2;
  opacity: 1;
}

.showcase.is-carousel .showcase-item[data-offset="-1"] {
  opacity: 0.5;
  transform: translate(calc(-50% - var(--shift-1)), -50%) scale(0.75);
}

.showcase.is-carousel .showcase-item[data-offset="1"] {
  opacity: 0.5;
  transform: translate(calc(-50% + var(--shift-1)), -50%) scale(0.75);
}

.showcase.is-carousel .showcase-item[data-offset="-2"] {
  opacity: 0.4;
  transform: translate(calc(-50% - var(--shift-2)), -50%) scale(0.75);
}

.showcase.is-carousel .showcase-item[data-offset="2"] {
  opacity: 0.4;
  transform: translate(calc(-50% + var(--shift-2)), -50%) scale(0.75);
}

/* 进屏换边、进度点跳转时不做补间，免得几张图横穿屏幕 */
.showcase.no-transition .showcase-item,
.showcase.no-transition .showcase-copy {
  transition: none;
}

/* ---------------------------------------------------------
   节假日（文字夹在两张截图中间）
   --------------------------------------------------------- */
.festival {
  padding-top: 96px;
  padding-bottom: 44px;
}

/* 比常规栏宽一点：两张全尺寸截图 + 中间一列文字才放得下；
   间隔随窗口变宽，让截图与文字之间留出呼吸位 */
.festival-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-areas: "left copy right";
  gap: clamp(24px, 6vw, 96px);
  align-items: center;
  width: 100%;
  max-width: 1424px;
  margin: 0 auto;
  padding: 0 24px;
}

.festival-copy {
  grid-area: copy;
  text-align: center;
}

.festival-copy h1 {
  font-size: clamp(32px, 3.2vw, 46px);
  line-height: 1.12;
  white-space: nowrap;
}

.festival-copy .lede {
  margin-top: 16px;
  max-width: none;
  font-size: clamp(15px, 1.2vw, 17px);
  line-height: 1.7;
}

.festival-shot--left {
  grid-area: left;
}

.festival-shot--right {
  grid-area: right;
}

/* 两列并排时按格子收窄，别沿用首屏手机上 380px 的宽度上限 */
.festival-shot .hero-shot {
  max-width: 100%;
}

/* ---------------------------------------------------------
   多比例适配（两行设备截图，高度约为通知屏中图的一半）
   --------------------------------------------------------- */
.adapt {
  /* 通知屏中图是 (100svh - 140px) 的 2/3，这里再取一半 */
  --shot-h: calc((100svh - 140px) * 0.3333);
  padding-top: 96px;
  padding-bottom: 44px;
}

.adapt-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.adapt-copy {
  text-align: center;
}

.adapt-copy h1 {
  font-size: clamp(32px, 3.2vw, 46px);
  line-height: 1.12;
}

.adapt-copy .lede {
  margin-top: 14px;
  max-width: none;
  font-size: clamp(15px, 1.2vw, 17px);
}

.adapt-rows {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(14px, 2.6vh, 32px);
  width: 100%;
  margin-top: clamp(26px, 4vh, 40px);
}

.adapt-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 2.6vw, 38px);
  max-width: 100%;
}

/* 四张图统一高度、各自按比例定宽；放不下时按行收窄（min-width: 0 才允许收缩） */
.adapt-shot {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: var(--shot-h);
  min-width: 0;
  filter: drop-shadow(0 14px 28px rgba(20, 30, 24, 0.18));
}

/* ---------------------------------------------------------
   功能（6 张卡）
   --------------------------------------------------------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  transition: border-color 0.18s var(--ease), transform 0.18s var(--ease);
}

.card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.card-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 12px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.card-icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.8;
}

.card h3 {
  margin-bottom: 6px;
  font-size: 15px;
}

.card p {
  color: var(--muted);
  font-size: 13px;
}

/* ---------------------------------------------------------
   教务导入
   --------------------------------------------------------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  display: flex;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 13.5px;
  counter-increment: step;
}

.steps li::before {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  content: counter(step);
  font: 11px/1 var(--font-mono);
}

.ticks {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ticks li {
  position: relative;
  padding: 5px 0 5px 20px;
  color: var(--muted);
  font-size: 13px;
}

.ticks li::before {
  position: absolute;
  top: 13px;
  left: 2px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--line-strong);
  content: "";
}

/* ---------------------------------------------------------
   数据 / 权限
   --------------------------------------------------------- */
.code {
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--code-bg);
}

.code code {
  padding: 0;
  background: none;
  font-size: 12px;
  line-height: 1.7;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.table th,
.table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.table th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.table td:first-child {
  width: 42%;
  white-space: nowrap;
}

.table code {
  font-size: 11.5px;
}

/* ---------------------------------------------------------
   下载
   --------------------------------------------------------- */
.download {
  text-align: center;
}

.download-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.download h2 {
  font-size: clamp(32px, 4.4vw, 56px);
  line-height: 1.12;
  margin-bottom: 12px;
}

.download .lede {
  max-width: 54ch;
}

/* 版本号单独一行，嵌在「大学课程表」字样的正下方，用正文（lede）字号。 */
.download .download-version {
  margin-top: -2px;
}

/* 主按钮按当前系统变化 + 「更多下载」下拉菜单（跟密码管家官网同一套） */
.dl-action {
  /* 主按钮和下面菜单同宽：改一处两边一起变 */
  --dl-w: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 26px;
}

.dl-primary {
  min-width: var(--dl-w);
  height: 50px;
  padding: 0 28px;
  gap: 9px;
  font-size: 15.5px;
}

.dl-primary .os-icon {
  width: 19px;
  height: 19px;
  flex: none;
}

/* JS 把检测到的系统写进 data-os，只露对应那枚图标；没脚本时默认显示 Windows 版 */
.dl-primary[data-os="windows"] .os-icon--android,
.dl-primary[data-os="android"] .os-icon--windows {
  display: none;
}

/* 当前系统对应的包还没上传：按钮留在原位但按不了，别点了落 404 */
.dl-primary.is-unavailable,
.dl-primary.is-unavailable:hover {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--muted);
  pointer-events: none;
}

.dl-more {
  position: relative;
  margin-top: 12px;
}

.dl-more-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
  transition: color 0.16s;
}

.dl-more-trigger:hover {
  color: var(--ink);
}

.dl-caret {
  width: 14px;
  height: 14px;
  transition: transform 0.22s var(--ease);
}

.dl-more:hover .dl-caret,
.dl-more:focus-within .dl-caret,
.dl-more.is-open .dl-caret {
  transform: rotate(180deg);
}

.dl-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  z-index: 30;
  width: min(var(--dl-w), calc(100vw - 48px));
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 22px 48px -26px rgba(15, 26, 20, 0.38), 0 4px 14px rgba(15, 26, 20, 0.06);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -6px);
  pointer-events: none;
  /* 收起时留缓冲：鼠标从触发文字挪到菜单要跨过一段空隙，不能刚离开就消失 */
  transition: opacity 0.16s var(--ease), transform 0.16s var(--ease), visibility 0s linear 0.24s;
}

/* 触发文字与菜单之间的空隙用透明桥接层填上，鼠标下移时始终落在 .dl-more 内，:hover 不会断 */
.dl-menu::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 16px;
}

.dl-more:hover .dl-menu,
.dl-more:focus-within .dl-menu,
.dl-more.is-open .dl-menu {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  pointer-events: auto;
  transition: opacity 0.16s var(--ease), transform 0.16s var(--ease), visibility 0s;
}

.dl-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 9px;
  color: var(--ink);
  transition: background 0.16s;
}

.dl-row:hover {
  background: var(--hover);
}

.dl-badge {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
}

.dl-badge svg {
  width: 16px;
  height: 16px;
}

.dl-name {
  font-size: 14.5px;
  font-weight: 600;
}

.dl-ver {
  margin-left: auto;
  color: var(--muted);
  font: 12.5px/1 var(--font-mono);
}

.dl-missing {
  margin: 0;
  padding: 9px 10px 9px 50px;
  color: var(--muted);
  font-size: 13px;
}

.download .note {
  max-width: 46ch;
}

.site-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  width: min(560px, 100%);
  margin-top: clamp(48px, 9vh, 92px);
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.site-foot p {
  margin: 0;
}

/* 下载屏：版权声明和备案号上下两行、居中，排版跟个人站首页页脚一致。
   只加在 .download 里，帮助页那两行的 .site-foot 还是原来的横排。 */
.download .site-foot {
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.download .site-foot .foot-beian {
  font: 11.5px/1.5 var(--font-mono);
}

.download .site-foot .foot-beian a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 备案号下面一行：字体授权说明，跟备案号同样的小号等宽 */
.download .site-foot .foot-font {
  font: 11.5px/1.5 var(--font-mono);
}


/* 友情链接：四站互链，按「个人网站 / 软件 / 服务」分三列、列内竖排；配色跟各站 token，深浅色自动适配 */
.friend-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 32px;
  width: 100%;
  margin-top: 12px;
  font-size: 12px;
  text-align: left;
}
.friend-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 72px;
}
.friend-group-title {
  margin: 0 0 2px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}
.friend-links a {
  color: var(--muted);
  text-decoration: none;
  line-height: 1.6;
}
.friend-links a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------------------------------------------------------
   返回顶部
   --------------------------------------------------------- */
.to-top {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 26;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  box-shadow: 0 6px 18px rgba(20, 30, 24, 0.1);
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  visibility: hidden;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s var(--ease),
    border-color 0.16s var(--ease), background-color 0.16s var(--ease), color 0.16s var(--ease);
}

.to-top.is-visible {
  opacity: 1;
  transform: none;
  visibility: visible;
}

.to-top:hover {
  background: var(--hover);
  color: var(--ink);
}

.to-top svg {
  width: 18px;
  height: 18px;
}

/* ---------------------------------------------------------
   进场
   --------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}

.screen.is-active .reveal {
  opacity: 1;
  transform: none;
}

.screen.is-active .cards .card:nth-child(2) {
  transition-delay: 0.06s;
}

.screen.is-active .cards .card:nth-child(3) {
  transition-delay: 0.12s;
}

.screen.is-active .cards .card:nth-child(4) {
  transition-delay: 0.18s;
}

.screen.is-active .cards .card:nth-child(5) {
  transition-delay: 0.24s;
}

.screen.is-active .cards .card:nth-child(6) {
  transition-delay: 0.3s;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
    scroll-snap-type: none;
  }

  /* 返回顶部只剩淡入淡出，不再上移 */
  .to-top {
    transform: none;
    transition: opacity 0.2s linear, visibility 0.2s linear;
  }

  .reveal,
  .screen.is-active .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .scroll-hint i {
    animation: none;
  }
}

/* ---------------------------------------------------------
   窄屏
   --------------------------------------------------------- */
@media (max-width: 1100px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 899px) {
  .screen {
    min-height: 0;
    padding: 92px 0 56px;
  }

  .hero {
    padding-top: 100px;
  }

  .showcase {
    padding-top: 100px;
    padding-bottom: 56px;
  }

  /* 手机：文字在上，两张截图并排在下 */
  .festival-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "copy copy" "left right";
    gap: 32px 12px;
    padding: 0 16px;
  }

  .festival-copy h1 {
    font-size: clamp(30px, 8.4vw, 44px);
    white-space: normal;
  }

  /* 两行并排时按宽度收一档，两行保持同一缩放，不会一行大一行小 */
  .adapt {
    --shot-h: min(calc((100svh - 140px) * 0.3333), calc(50vw - 24px));
  }

  .hero-grid,
  .split {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero h1 {
    font-size: clamp(44px, 12vw, 68px);
    white-space: normal;
  }

  .hero--sub h1 {
    font-size: clamp(30px, 8.4vw, 44px);
  }

  /* 手机上副标题比标题还宽，居中只能两行一起居中 */
  .hero-copy {
    width: 100%;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .scroll-hint {
    display: none;
  }
}

@media (max-width: 620px) {
  .shell {
    padding: 0 16px;
  }

  .to-top {
    right: 16px;
    bottom: 18px;
  }

  .table td:first-child {
    width: auto;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .hero-shot {
    max-width: min(380px, 92vw);
    max-height: 90vh;
    max-height: 90svh;
  }

  /* 手机上首屏图受宽度和 90svh 双重限制，中图取两者更小的 2/3 */
  .showcase {
    --shot-h: min(calc(90svh * 0.6667), 129.6vw);
  }
}

@media (max-width: 480px) {
  .shell--head {
    gap: 8px;
  }

  .brand {
    gap: 8px;
    font-size: 16px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .head-actions {
    gap: 8px;
  }

  .theme-btn {
    width: 34px;
    height: 34px;
  }

  .theme-btn svg,
  .theme-icon {
    width: 19px;
    height: 19px;
  }

  .head-cta {
    padding: 8px 12px;
  }

  .head-help-full {
    display: none;
  }

  .head-help-short {
    display: inline;
  }
}

/* 320 一档放不下「标志 + 主题 + 首页 + 帮助 + 下载」（量过：带站名要 332px），先把站名收掉，图标仍在 */
@media (max-width: 340px) {
  .brand-word {
    display: none;
  }
}

/* ---------------------------------------------------------
   竖屏手机 / 触屏：系统吸附翻页
   （第三屏上下滑直接翻页，只有左右滑才换图；鼠标滚轮仍走脚本翻页）
   --------------------------------------------------------- */
/* 减少动效时也保留吸附：吸附是滚动落点，不是我们加的动画；
   脚本翻页才是动画，那边照旧关掉。这样任何屏幕都还有翻页 */
@media (max-width: 899px) and (orientation: portrait),
       (pointer: coarse) and (min-height: 700px) {
  html:not(.js-pager) {
    scroll-snap-type: y mandatory;
  }

  .screen {
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }
}

/* 触屏的一屏一节：site.js 量完每屏高度后加 is-paged。
   不靠 pointer 媒体判断——折叠屏展开时 Chrome 可能把主指针报成 fine。 */
html.is-paged {
  scroll-snap-type: y mandatory;
}

html.is-paged .screen {
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

@media (max-width: 899px) and (orientation: portrait) {
  /* 一屏一节：整屏高度，内容在中间 */
  .screen {
    height: 100vh;
    height: 100svh;
    min-height: 0;
    padding: 84px 0 24px;
  }

  .hero {
    padding-top: 84px;
    padding-bottom: 24px;
  }

  /* 首屏两张图改成「文字在上、图吃掉剩余高度」，不会被切掉 */
  .hero-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(18px, 3vh, 30px);
    height: 100%;
  }

  .hero-visual {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 0;
  }

  .hero-visual .hero-shot {
    max-height: 100%;
  }
}
