/* ============================================================
   东阳市第三高级中学校园网站 · 设计系统
   风格：简约 · 圆润 · 丝滑动效
   ============================================================ */

:root {
  /* 主色（取自校徽） */
  --blue: #0E4A9E;
  --blue-dark: #0A3573;
  --blue-soft: #EAF2FC;
  --blue-hover: #1359bd;
  --green: #1B9E4C;
  --green-soft: #E8F7EE;
  --orange: #F26522;
  --orange-soft: #FFF0E8;
  --gold: #F5B800;

  /* 中性色 */
  --ink: #1F2937;
  --ink-soft: #374151;
  --muted: #6B7280;
  --line: #EAF0F6;
  --bg: #F5F7FA;
  --white: #FFFFFF;

  /* 圆润 */
  --r-xl: 22px;
  --r-lg: 18px;
  --r: 14px;
  --r-sm: 10px;
  --r-pill: 999px;

  /* 柔和阴影 */
  --sh-xs: 0 1px 4px rgba(31, 41, 55, .05);
  --sh-sm: 0 4px 16px rgba(31, 41, 55, .06);
  --sh: 0 10px 34px rgba(14, 74, 158, .08);
  --sh-hover: 0 18px 46px rgba(14, 74, 158, .16);
  --sh-primary: 0 8px 20px rgba(14, 74, 158, .28);

  --ease: cubic-bezier(.22, 1, .36, 1);
  --t-fast: .18s;
  --t: .28s;
  --t-slow: .45s;
  --header-h: 74px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: "Noto Serif SC", "STSong", "SimSun", serif;
  color: var(--ink);
  line-height: 1.35;
  font-weight: 700;
}

a { color: var(--blue); text-decoration: none; transition: color var(--t-fast) var(--ease); }
a:hover { color: var(--blue-hover); }
img { max-width: 100%; display: block; }
ul { list-style: none; }

.container { width: min(1200px, 92%); margin: 0 auto; }

::selection { background: rgba(14, 74, 158, .16); }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #c9d6e6; border-radius: 99px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #a9bfd8; }

/* ---------- 顶部条 ---------- */
.topbar {
  background: var(--blue-dark);
  color: rgba(255, 255, 255, .82);
  font-size: 12.5px;
  height: 34px;
  display: flex;
  align-items: center;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; }
.topbar a { color: rgba(255, 255, 255, .82); }
.topbar a:hover { color: #fff; }
.topbar-links { display: flex; gap: 18px; }

/* ---------- 站头 ---------- */
.site-header {
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: box-shadow var(--t) var(--ease);
}
.site-header.scrolled { box-shadow: var(--sh-sm); }
.header-main {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 18px;
}
.logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.logo img { width: 52px; height: 52px; object-fit: contain;
  transition: transform .5s var(--ease); }
.logo:hover img { transform: rotate(-8deg) scale(1.05); }
.logo-text .cn {
  font-family: "Noto Serif SC", "STSong", serif;
  font-size: 21px; font-weight: 800; color: var(--blue-dark);
  letter-spacing: 1px; line-height: 1.25;
}
.logo-text .en { font-size: 10.5px; color: var(--muted); letter-spacing: .6px; }

.header-search { margin-left: auto; position: relative; }
.header-search input {
  width: 230px; height: 40px; border: 1.5px solid var(--line);
  border-radius: var(--r-pill); padding: 0 46px 0 18px;
  background: var(--bg); font-size: 14px; outline: none;
  transition: all var(--t) var(--ease);
}
.header-search input:focus {
  width: 280px; border-color: var(--blue);
  background: #fff; box-shadow: 0 0 0 4px rgba(14, 74, 158, .1);
}
.header-search button {
  position: absolute; right: 5px; top: 5px; width: 30px; height: 30px;
  border: none; border-radius: 50%; background: var(--blue); color: #fff;
  cursor: pointer; display: grid; place-items: center;
  transition: transform var(--t) var(--ease), background var(--t-fast);
}
.header-search button:hover { background: var(--blue-hover); transform: scale(1.08); }

.header-user { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* ---------- 导航 ---------- */
.main-nav { background: var(--blue); position: sticky; top: var(--header-h); z-index: 99; }
.nav-list { display: flex; align-items: stretch; justify-content: center; height: 50px; }
.nav-list > li { position: relative; }
.nav-list > li > a {
  display: flex; align-items: center; height: 50px; padding: 0 20px;
  color: rgba(255, 255, 255, .9); font-size: 15px; position: relative;
  transition: color var(--t-fast);
}
.nav-list > li > a::after {
  content: ""; position: absolute; left: 20px; right: 20px; bottom: 8px;
  height: 3px; border-radius: 3px; background: var(--gold);
  transform: scaleX(0); transform-origin: center;
  transition: transform .3s var(--ease);
}
.nav-list > li > a:hover, .nav-list > li.active > a { color: #fff; }
.nav-list > li > a:hover::after, .nav-list > li.active > a::after { transform: scaleX(1); }
.nav-badge {
  background: var(--orange); color: #fff; font-size: 10px; font-style: normal;
  padding: 1px 7px; border-radius: var(--r-pill); margin-left: 6px;
}
.nav-toggle {
  display: none; background: none; border: none; color: var(--blue);
  font-size: 24px; padding: 8px 14px; cursor: pointer;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 40px; padding: 0 22px; border-radius: var(--r-pill);
  border: 1.5px solid transparent; font-size: 14.5px; font-weight: 600;
  cursor: pointer; white-space: nowrap; transition: all var(--t) var(--ease);
  font-family: inherit; text-decoration: none; user-select: none;
}
.btn:active { transform: scale(.96); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: var(--sh-primary); }
.btn-primary:hover { background: var(--blue-hover); color: #fff; transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(14, 74, 158, .34); }
.btn-green { background: var(--green); color: #fff; box-shadow: 0 8px 20px rgba(27, 158, 76, .26); }
.btn-green:hover { background: #179045; color: #fff; transform: translateY(-2px); }
.btn-orange { background: var(--orange); color: #fff; box-shadow: 0 8px 20px rgba(242, 101, 34, .26); }
.btn-orange:hover { background: #e85a18; color: #fff; transform: translateY(-2px); }
.btn-outline { background: transparent; border-color: var(--blue); color: var(--blue); }
.btn-outline:hover { background: var(--blue); color: #fff; transform: translateY(-2px); }
.btn-ghost { background: rgba(255, 255, 255, .16); color: #fff; border-color: rgba(255, 255, 255, .4); }
.btn-ghost:hover { background: rgba(255, 255, 255, .28); color: #fff; }
.btn-light { background: var(--blue-soft); color: var(--blue); }
.btn-light:hover { background: #dceafb; transform: translateY(-2px); }
.btn-sm { height: 32px; padding: 0 15px; font-size: 13px; }
.btn-lg { height: 48px; padding: 0 30px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-danger { background: #fff; color: #e24848; border-color: #f3c3c3; }
.btn-danger:hover { background: #fdecec; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--white); border-radius: var(--r-lg);
  box-shadow: var(--sh-sm); padding: 26px;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.card.hoverable:hover { transform: translateY(-6px); box-shadow: var(--sh-hover); }
.card-title {
  font-size: 18px; margin-bottom: 16px; display: flex; align-items: center;
  gap: 10px; font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif; font-weight: 700;
}
.card-title::before {
  content: ""; width: 5px; height: 18px; border-radius: 3px;
  background: linear-gradient(var(--blue), var(--green));
}
.card-title .more { margin-left: auto; font-size: 13px; font-weight: 400; }

/* ---------- 板块标题 ---------- */
.section { padding: 46px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 26px; }
.section-title { font-size: 27px; position: relative; padding-left: 16px; }
.section-title::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 6px; height: 26px; border-radius: 4px;
  background: linear-gradient(180deg, var(--blue), var(--green));
}
.section-sub { color: var(--muted); font-size: 13.5px; margin-top: 4px; padding-left: 16px; }
.section-more { color: var(--muted); font-size: 14px; transition: gap var(--t); display: inline-flex; gap: 4px; }
.section-more:hover { color: var(--blue); gap: 8px; }

/* ---------- 轮播 ---------- */
.hero { position: relative; overflow: hidden; background: var(--blue-dark); }
.hero-track { position: relative; height: 440px; }
.hero-slide {
  position: absolute; inset: 0; opacity: 0; transform: scale(1.06);
  transition: opacity .7s var(--ease), transform 1.2s var(--ease);
  pointer-events: none;
}
.hero-slide.active { opacity: 1; transform: scale(1); pointer-events: auto; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-slide video { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-slide::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(10, 53, 115, .55), rgba(10, 53, 115, .12) 60%, transparent);
}
.hero-caption {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 0 0 56px; color: #fff;
}
.hero-caption .inner {
  width: min(1200px, 92%); margin: 0 auto;
  transform: translateY(26px); opacity: 0;
  transition: transform .7s var(--ease) .15s, opacity .7s var(--ease) .15s;
}
.hero-slide.active .hero-caption .inner { transform: translateY(0); opacity: 1; }
.hero-caption h2 { color: #fff; font-size: 38px; margin-bottom: 10px; text-shadow: 0 2px 14px rgba(0,0,0,.25); }
.hero-caption p { font-size: 16px; opacity: .92; margin-bottom: 18px; }
.hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 46px; height: 46px; border-radius: 50%; border: none;
  background: rgba(255, 255, 255, .2); backdrop-filter: blur(6px);
  color: #fff; font-size: 20px; cursor: pointer;
  display: grid; place-items: center;
  transition: background var(--t), transform var(--t);
}
.hero-arrow:hover { background: rgba(255, 255, 255, .38); transform: translateY(-50%) scale(1.08); }
.hero-arrow.prev { left: 24px; }
.hero-arrow.next { right: 24px; }
.hero-dots { position: absolute; bottom: 22px; right: 6%; z-index: 3; display: flex; gap: 9px; }
.hero-dots button {
  width: 9px; height: 9px; border-radius: 99px; border: none; cursor: pointer;
  background: rgba(255, 255, 255, .45); transition: all var(--t) var(--ease);
}
.hero-dots button.active { width: 28px; background: #fff; }

/* ---------- 快捷入口 ---------- */
.quick-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.quick-item {
  background: #fff; border-radius: var(--r-lg); padding: 22px 10px; text-align: center;
  box-shadow: var(--sh-sm); display: block; color: var(--ink);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.quick-item:hover { transform: translateY(-6px); box-shadow: var(--sh-hover); color: var(--ink); }
.quick-ico {
  width: 54px; height: 54px; margin: 0 auto 10px; border-radius: 18px;
  display: grid; place-items: center; font-size: 24px;
  transition: transform .35s var(--ease);
}
.quick-item:hover .quick-ico { transform: translateY(-4px) rotate(-6deg) scale(1.08); }
.quick-ico.blue { background: var(--blue-soft); color: var(--blue); }
.quick-ico.green { background: var(--green-soft); color: var(--green); }
.quick-ico.orange { background: var(--orange-soft); color: var(--orange); }
.quick-item span { font-size: 14px; font-weight: 600; }

/* ---------- 新闻卡片 ---------- */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.news-card {
  background: #fff; border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--sh-sm); display: block; color: var(--ink);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.news-card:hover { transform: translateY(-7px); box-shadow: var(--sh-hover); color: var(--ink); }
.news-card .thumb { height: 190px; overflow: hidden; position: relative; }
.news-card .thumb img { width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s var(--ease); }
.news-card:hover .thumb img { transform: scale(1.06); }
.news-card .body { padding: 18px 20px 20px; }
.news-card h3 { font-size: 16.5px; margin-bottom: 9px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif; }
.news-card p { color: var(--muted); font-size: 13.5px; line-height: 1.7;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-card .meta { margin-top: 13px; display: flex; justify-content: space-between;
  color: #9aa6b5; font-size: 12.5px; }

/* 新闻列表行 */
.news-list { display: flex; flex-direction: column; }
.news-row {
  display: flex; align-items: center; gap: 14px; padding: 15px 16px;
  border-radius: var(--r); transition: background var(--t-fast);
  border-bottom: 1px dashed var(--line);
}
.news-row:hover { background: var(--blue-soft); }
.news-row .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--blue);
  flex-shrink: 0; opacity: .5; transition: all var(--t-fast); }
.news-row:hover .dot { opacity: 1; transform: scale(1.4); }
.news-row a.title { flex: 1; color: var(--ink); font-size: 15px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.news-row a.title:hover { color: var(--blue); }
.news-row .date { color: var(--muted); font-size: 13px; flex-shrink: 0; }
.news-row .top-tag { flex-shrink: 0; }

.tag, .badge {
  display: inline-flex; align-items: center; font-size: 12px; font-weight: 600;
  padding: 2px 10px; border-radius: var(--r-pill); line-height: 1.7;
}
.tag-blue { background: var(--blue-soft); color: var(--blue); }
.tag-green { background: var(--green-soft); color: var(--green); }
.tag-orange { background: var(--orange-soft); color: var(--orange); }
.tag-gray { background: #eef1f5; color: var(--muted); }
.tag-red { background: #fdecec; color: #e24848; }
.tag-gold { background: #fdf4d7; color: #a67c00; }

/* ---------- 首页布局组合 ---------- */
.home-grid { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; }
.notice-scroll .news-row { padding: 12px 8px; }

.culture-banner {
  border-radius: var(--r-xl); padding: 44px 46px; color: #fff;
  background: linear-gradient(120deg, var(--green), #0e6b33);
  position: relative; overflow: hidden;
}
.culture-banner::after {
  content: "道"; position: absolute; right: 30px; bottom: -60px;
  font-size: 220px; font-family: "Noto Serif SC", serif; opacity: .08; line-height: 1;
}
.culture-banner h2 { color: #fff; font-size: 28px; margin-bottom: 14px; }
.culture-banner p { opacity: .94; max-width: 720px; }
.culture-words { display: flex; gap: 14px; margin-top: 22px; flex-wrap: wrap; }
.culture-words span {
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .28);
  padding: 8px 22px; border-radius: var(--r-pill); font-size: 15px; letter-spacing: 3px;
  backdrop-filter: blur(4px);
}

/* 校庆横幅 */
.anniv-banner {
  border-radius: var(--r-xl); overflow: hidden; position: relative;
  background: linear-gradient(120deg, #c2410c, var(--orange));
  color: #fff; padding: 40px 44px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.anniv-banner h2 { color: #fff; font-size: 26px; }
.anniv-banner p { opacity: .92; margin-top: 6px; }
.countdown { display: flex; gap: 12px; }
.countdown .num-box {
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .3);
  border-radius: var(--r); width: 76px; padding: 12px 6px; text-align: center;
  backdrop-filter: blur(4px);
}
.countdown .num { font-size: 30px; font-weight: 800; line-height: 1.1;
  font-family: "Noto Sans SC", sans-serif; }
.countdown .unit { font-size: 12px; opacity: .85; }

/* ---------- 内页横幅 ---------- */
.page-hero {
  background: linear-gradient(120deg, var(--blue-dark), var(--blue) 60%, #1b6fc4);
  color: #fff; padding: 48px 0; position: relative; overflow: hidden;
}
.page-hero::after {
  content: ""; position: absolute; right: -60px; top: -60px;
  width: 280px; height: 280px; border-radius: 50%;
  background: rgba(255, 255, 255, .06);
}
.page-hero h1 { color: #fff; font-size: 31px; margin-bottom: 8px; }
.page-hero p { opacity: .9; }
.breadcrumb { font-size: 13.5px; color: rgba(255,255,255,.75); margin-top: 12px; }
.breadcrumb a { color: rgba(255,255,255,.85); }
.breadcrumb a:hover { color: #fff; }

.main-wrap { padding: 34px 0 60px; }
.layout-2col { display: grid; grid-template-columns: 1fr 310px; gap: 26px; align-items: start; }
.sidebar .card + .card { margin-top: 22px; }
.side-menu a {
  display: flex; align-items: center; gap: 9px; padding: 11px 14px;
  border-radius: var(--r-sm); color: var(--ink-soft); font-size: 14.5px;
  transition: all var(--t-fast) var(--ease);
}
.side-menu a:hover, .side-menu a.active {
  background: var(--blue-soft); color: var(--blue); transform: translateX(4px);
}

/* ---------- 文章 ---------- */
.article-head { text-align: center; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.article-head h1 { font-size: 27px; margin-bottom: 14px; }
.article-meta { color: var(--muted); font-size: 13.5px; display: flex; gap: 18px;
  justify-content: center; flex-wrap: wrap; }
.article-body { padding: 28px 6px; font-size: 16px; line-height: 2; }
.article-body p { margin-bottom: 16px; }
.article-body img { border-radius: var(--r); margin: 16px auto; }
.article-foot { border-top: 1px solid var(--line); padding-top: 18px; display: flex;
  justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.attachment-box {
  display: flex; align-items: center; gap: 12px; padding: 14px 18px;
  background: var(--blue-soft); border-radius: var(--r); margin: 18px 0;
  transition: transform var(--t-fast);
}
.attachment-box:hover { transform: translateX(4px); }

/* ---------- 分页 ---------- */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 34px; }
.pagination a, .pagination span {
  min-width: 38px; height: 38px; padding: 0 10px; display: grid; place-items: center;
  border-radius: var(--r-sm); background: #fff; color: var(--ink-soft);
  box-shadow: var(--sh-xs); font-size: 14px; transition: all var(--t-fast) var(--ease);
}
.pagination a:hover { background: var(--blue-soft); color: var(--blue); transform: translateY(-2px); }
.pagination .current { background: var(--blue); color: #fff; box-shadow: var(--sh-primary); }
.pagination .disabled { opacity: .4; pointer-events: none; }

/* ---------- 表单 ---------- */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; color: var(--ink-soft); }
.form-group label .req { color: var(--orange); margin-left: 3px; }
.form-control, input[type=text], input[type=password], input[type=email],
input[type=tel], input[type=number], input[type=date], input[type=datetime-local],
input[type=file], select, textarea {
  width: 100%; height: 44px; padding: 0 16px; border: 1.5px solid var(--line);
  border-radius: var(--r-sm); background: #fff; font-size: 14.5px;
  font-family: inherit; color: var(--ink); outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
textarea { height: auto; padding: 12px 16px; line-height: 1.8; resize: vertical; }
.form-control:focus, input:focus, select:focus, textarea:focus {
  border-color: var(--blue); box-shadow: 0 0 0 4px rgba(14, 74, 158, .1);
}
.form-control::placeholder, input::placeholder, textarea::placeholder { color: #b3bcc8; }
.form-hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.input-group { position: relative; }
.input-icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
  color: #a6b2c0; pointer-events: none; }
.input-icon + input { padding-left: 44px; }

/* ---------- 表格 ---------- */
.table-wrap { background: #fff; border-radius: var(--r-lg); box-shadow: var(--sh-sm);
  overflow: hidden; overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th {
  background: var(--blue-soft); color: var(--blue-dark); font-weight: 700;
  text-align: left; padding: 14px 16px; white-space: nowrap;
}
.data-table td { padding: 13px 16px; border-top: 1px solid var(--line); vertical-align: middle; }
.data-table tbody tr { transition: background var(--t-fast); }
.data-table tbody tr:hover { background: #f7faff; }
.data-table .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- 徽章/状态点 ---------- */
.status-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.status-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; }
.status-ongoing { color: var(--green); }
.status-ongoing::before { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft);
  animation: pulse 1.6s infinite; }
.status-pending { color: #b7891a; }
.status-pending::before { background: var(--gold); }
.status-closed { color: var(--muted); }
.status-closed::before { background: #b3bcc8; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(27, 158, 76, .35); }
  70% { box-shadow: 0 0 0 7px rgba(27, 158, 76, 0); }
  100% { box-shadow: 0 0 0 0 rgba(27, 158, 76, 0); }
}

/* ---------- 投票 ---------- */
.vote-card { display: block; }
.vote-option {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px;
  border: 2px solid var(--line); border-radius: var(--r); margin-bottom: 12px;
  cursor: pointer; transition: all var(--t) var(--ease); position: relative;
  background: #fff;
}
.vote-option:hover { border-color: #bcd2f2; background: #f8fbff; transform: translateX(4px); }
.vote-option.checked { border-color: var(--blue); background: var(--blue-soft); }
.vote-option.disabled { cursor: default; }
.vote-option.disabled:hover { transform: none; }
.vote-check {
  width: 22px; height: 22px; border: 2px solid #c4cfdd; border-radius: 50%;
  flex-shrink: 0; display: grid; place-items: center; transition: all var(--t-fast);
}
.vote-option[data-type=multiple] .vote-check { border-radius: 7px; }
.vote-option.checked .vote-check { border-color: var(--blue); background: var(--blue); }
.vote-check::after { content: ""; width: 9px; height: 9px; border-radius: 50%;
  background: #fff; transform: scale(0); transition: transform .2s var(--ease); }
.vote-option[data-type=multiple] .vote-check::after { border-radius: 2px; }
.vote-option.checked .vote-check::after { transform: scale(1); }
.vote-option .opt-text { flex: 1; font-size: 15px; }
.vote-option .opt-img { width: 56px; height: 56px; border-radius: var(--r-sm); object-fit: cover; }

.vote-result { margin-top: 6px; }
.vote-bar-row { margin-bottom: 16px; }
.vote-bar-row .bar-head { display: flex; justify-content: space-between; font-size: 14px;
  margin-bottom: 7px; gap: 10px; }
.vote-bar-row .bar-track { height: 12px; background: #eef2f7; border-radius: 99px; overflow: hidden; }
.vote-bar-row .bar-fill {
  height: 100%; width: 0; border-radius: 99px;
  background: linear-gradient(90deg, var(--blue), #3b82d6);
  transition: width 1s var(--ease);
}
.vote-bar-row.winner .bar-fill { background: linear-gradient(90deg, var(--orange), #ff9466); }
.vote-bar-row .pct { font-weight: 700; color: var(--blue); min-width: 58px; text-align: right; }

/* ---------- 时间线（校史） ---------- */
.timeline { position: relative; padding-left: 34px; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px;
  width: 3px; border-radius: 3px; background: linear-gradient(var(--blue), var(--green)); }
.tl-item { position: relative; padding-bottom: 30px; }
.tl-item::before { content: ""; position: absolute; left: -31px; top: 5px;
  width: 15px; height: 15px; border-radius: 50%; background: #fff;
  border: 4px solid var(--blue); transition: transform var(--t); }
.tl-item:hover::before { transform: scale(1.25); border-color: var(--orange); }
.tl-year { font-family: "Noto Serif SC", serif; font-size: 20px; font-weight: 800;
  color: var(--blue); }
.tl-item p { color: var(--ink-soft); margin-top: 4px; }

/* ---------- 相册 ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.gallery-card { border-radius: var(--r-lg); overflow: hidden; position: relative;
  box-shadow: var(--sh-sm); display: block; aspect-ratio: 4/3; }
.gallery-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.gallery-card:hover img { transform: scale(1.08); }
.gallery-card .cap {
  position: absolute; inset: auto 0 0 0; padding: 30px 18px 14px; color: #fff;
  background: linear-gradient(transparent, rgba(10, 30, 60, .75));
  font-weight: 600; transform: translateY(4px); transition: transform var(--t);
}
.gallery-card:hover .cap { transform: translateY(0); }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.photo-grid a { border-radius: var(--r); overflow: hidden; aspect-ratio: 4/3;
  box-shadow: var(--sh-sm); }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.photo-grid a:hover img { transform: scale(1.07); }

/* 灯箱 */
.lightbox {
  position: fixed; inset: 0; z-index: 1000; background: rgba(10, 20, 35, .88);
  display: none; align-items: center; justify-content: center; padding: 40px;
  opacity: 0; transition: opacity .3s var(--ease);
}
.lightbox.open { display: flex; opacity: 1; }
.lightbox img { max-width: 90%; max-height: 88vh; border-radius: var(--r);
  box-shadow: 0 30px 80px rgba(0,0,0,.5); animation: zoomIn .35s var(--ease); }
.lightbox .lb-close { position: absolute; top: 24px; right: 30px; color: #fff;
  background: rgba(255,255,255,.15); border: none; width: 44px; height: 44px;
  border-radius: 50%; font-size: 20px; cursor: pointer; }
@keyframes zoomIn { from { transform: scale(.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------- 师资 ---------- */
.teacher-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.teacher-card { text-align: center; padding: 28px 18px; }
.teacher-avatar {
  width: 88px; height: 88px; border-radius: 50%; margin: 0 auto 14px;
  display: grid; place-items: center; font-size: 34px; color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--green));
  font-family: "Noto Serif SC", serif; font-weight: 700;
  transition: transform .4s var(--ease);
}
.hoverable:hover .teacher-avatar { transform: scale(1.08) rotate(-4deg); }
.teacher-card h3 { font-size: 17px; font-family: "Noto Sans SC", sans-serif; }
.teacher-card .subj { color: var(--blue); font-size: 13px; font-weight: 600; margin: 4px 0 8px; }
.teacher-card .bio { color: var(--muted); font-size: 12.5px; line-height: 1.7;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- 留言 ---------- */
.message-card { padding: 20px 22px; margin-bottom: 16px; }
.message-head { display: flex; justify-content: space-between; margin-bottom: 8px; }
.message-head .who { font-weight: 700; display: flex; align-items: center; gap: 9px; }
.message-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--blue-soft);
  color: var(--blue); display: grid; place-items: center; font-weight: 700; }
.message-reply { background: var(--green-soft); border-radius: var(--r); padding: 12px 16px;
  margin-top: 12px; font-size: 14px; border-left: 3px solid var(--green); }
.message-time { color: var(--muted); font-size: 12.5px; }

/* ---------- 登录页 ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-side {
  background: linear-gradient(150deg, var(--blue-dark), var(--blue) 55%, #1b6fc4);
  color: #fff; padding: 60px; display: flex; flex-direction: column; justify-content: center;
  position: relative; overflow: hidden;
}
.auth-side::before { content: ""; position: absolute; width: 480px; height: 480px;
  border-radius: 50%; background: rgba(255,255,255,.05); top: -160px; right: -120px; }
.auth-side::after { content: ""; position: absolute; width: 320px; height: 320px;
  border-radius: 50%; background: rgba(27,158,76,.18); bottom: -120px; left: -80px; }
.auth-side .brand { display: flex; align-items: center; gap: 14px; margin-bottom: 46px; position: relative; }
.auth-side .brand img { width: 60px; }
.auth-side .brand .cn { font-family: "Noto Serif SC", serif; font-size: 23px; font-weight: 800; }
.auth-side h1 { color: #fff; font-size: 36px; line-height: 1.5; position: relative; }
.auth-side .motto { margin-top: 22px; font-size: 17px; opacity: .9; position: relative;
  display: flex; gap: 12px; flex-wrap: wrap; }
.auth-side .motto span { border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.1);
  padding: 6px 18px; border-radius: var(--r-pill); letter-spacing: 2px; }
.auth-panel { display: grid; place-items: center; padding: 40px; background: #fff; }
.auth-box { width: min(410px, 100%); animation: fadeUp .5s var(--ease); }
.auth-box h2 { font-size: 26px; margin-bottom: 6px; }
.auth-box .sub { color: var(--muted); margin-bottom: 30px; font-size: 14px; }
.role-tabs { display: flex; background: var(--bg); border-radius: var(--r-pill); padding: 5px;
  margin-bottom: 24px; position: relative; }
.role-tabs button {
  flex: 1; height: 38px; border: none; background: transparent; border-radius: var(--r-pill);
  font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; z-index: 1;
  transition: color var(--t); font-family: inherit;
}
.role-tabs button.active { color: #fff; }
.role-tabs .slider {
  position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc(33.333% - 6px);
  background: var(--blue); border-radius: var(--r-pill);
  transition: transform .32s var(--ease); box-shadow: var(--sh-primary);
}
.role-tabs[data-role=teacher] .slider { transform: translateX(100%); }
.role-tabs[data-role=admin] .slider { transform: translateX(200%); }
.role-tabs[data-role=teacher] button.lab-teacher,
.role-tabs[data-role=admin] button.lab-admin { color: #fff; }
.role-tabs[data-role=student] button.lab-student { color: #fff; }
.demo-accounts { margin-top: 26px; background: var(--bg); border-radius: var(--r);
  padding: 14px 18px; font-size: 12.5px; color: var(--muted); line-height: 2; }
.demo-accounts code { background: #e7edf5; padding: 1px 7px; border-radius: 6px; color: var(--blue); }

/* ---------- 中心 / 后台布局 ---------- */
.portal { display: grid; grid-template-columns: 232px 1fr; min-height: calc(100vh - 34px); }
.portal-side {
  background: linear-gradient(180deg, var(--blue-dark), var(--blue));
  padding: 24px 16px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.portal-brand { display: flex; align-items: center; gap: 10px; color: #fff;
  padding: 0 8px 22px; border-bottom: 1px solid rgba(255,255,255,.14); margin-bottom: 16px; }
.portal-brand img { width: 40px; }
.portal-brand .t { font-size: 15.5px; font-weight: 700; line-height: 1.3; }
.portal-menu a {
  display: flex; align-items: center; gap: 11px; padding: 12px 15px;
  color: rgba(255,255,255,.78); border-radius: var(--r-sm); margin-bottom: 4px;
  font-size: 14.5px; transition: all var(--t-fast) var(--ease); position: relative;
}
.portal-menu a:hover { background: rgba(255,255,255,.12); color: #fff; transform: translateX(4px); }
.portal-menu a.active { background: rgba(255,255,255,.18); color: #fff; font-weight: 600; }
.portal-menu a.active::before { content: ""; position: absolute; left: -16px; top: 20%;
  bottom: 20%; width: 4px; border-radius: 4px; background: var(--gold); }
.portal-menu .grp { color: rgba(255,255,255,.4); font-size: 11.5px; padding: 16px 15px 6px;
  letter-spacing: 2px; }
.portal-main { padding: 26px 30px 50px; min-width: 0; }
.portal-top {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px;
  background: #fff; border-radius: var(--r-lg); padding: 14px 22px; box-shadow: var(--sh-sm);
}
.portal-top h1 { font-size: 20px; font-family: "Noto Sans SC", sans-serif; }
.portal-user { display: flex; align-items: center; gap: 11px; }
.portal-user .ava {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--blue), var(--green)); color: #fff; font-weight: 700;
}
.portal-user .info { font-size: 13.5px; line-height: 1.4; }
.portal-user .info .name { font-weight: 700; }
.portal-user .info .role { color: var(--muted); font-size: 12px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 24px; }
.stat-card { background: #fff; border-radius: var(--r-lg); padding: 22px; box-shadow: var(--sh-sm);
  display: flex; align-items: center; gap: 16px; transition: transform var(--t) var(--ease), box-shadow var(--t); }
.stat-card:hover { transform: translateY(-5px); box-shadow: var(--sh-hover); }
.stat-ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
  font-size: 23px; flex-shrink: 0; }
.stat-num { font-size: 28px; font-weight: 800; line-height: 1.1; color: var(--ink);
  font-family: "Noto Sans SC", sans-serif; }
.stat-label { color: var(--muted); font-size: 13px; }

.dash-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: start; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.breadcrumb-bar { font-size: 13.5px; color: var(--muted); margin: 0 0 16px;
  display: flex; gap: 7px; align-items: center; }
.breadcrumb-bar a { color: var(--blue); }
.breadcrumb-bar a:hover { text-decoration: underline; }
.chart-box { width: 100%; min-height: 260px; }
.chart-box svg { width: 100%; height: auto; }

/* 课表 */
.timetable { width: 100%; border-collapse: separate; border-spacing: 8px; }
.timetable th { background: var(--blue); color: #fff; padding: 12px 6px; border-radius: var(--r-sm);
  font-size: 14px; font-weight: 600; }
.timetable th.corner { background: transparent; }
.timetable td {
  background: #fff; border-radius: var(--r-sm); text-align: center; padding: 14px 6px;
  font-size: 14px; box-shadow: var(--sh-xs); transition: all var(--t-fast) var(--ease);
  font-weight: 600;
}
.timetable td:hover { transform: scale(1.06); box-shadow: var(--sh); color: var(--blue); }
.timetable td.period { background: var(--blue-soft); color: var(--blue); }
.timetable td.empty { background: transparent; box-shadow: none; }

/* 全天课表（编排 / 查看） */
.tt-edit, .tt-view { width: 100%; border-collapse: separate; border-spacing: 6px; }
.tt-edit th, .tt-view th { background: var(--blue); color: #fff; padding: 10px 4px;
  border-radius: var(--r-sm); font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.tt-edit .tt-corner, .tt-view .tt-corner { background: transparent; }
.tt-edit td, .tt-view td { background: #fff; border-radius: var(--r-sm); text-align: center;
  padding: 5px; box-shadow: var(--sh-xs); vertical-align: middle; }
.tt-view td { padding: 9px 4px; }
.tt-period { background: transparent !important; box-shadow: none !important; text-align: right !important;
  padding-right: 8px !important; white-space: nowrap; }
.tt-kind { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px;
  border-radius: 999px; background: var(--blue-soft); color: var(--blue); }
.tt-kind-reading { background: #fff1e3; color: var(--orange); }
.tt-kind-night { background: #e9edfd; color: #3f51b5; }
.tt-row-reading td:not(.empty) { background: #fffaf4; }
.tt-row-night td:not(.empty) { background: #f6f8ff; }
.tt-cell { width: 100%; min-width: 86px; padding: 6px 4px; font-size: 12.5px;
  border: 1px solid var(--line); border-radius: 10px; background: #fafbfc; }
.tt-cell:focus { border-color: var(--blue); background: #fff; outline: none; }
.tt-subj { display: block; font-size: 13.5px; font-weight: 700; color: #24324a; }
.tt-teacher { display: block; font-size: 11px; color: var(--muted); font-weight: 400; margin-top: 2px; }
.tt-view td.empty { background: transparent; box-shadow: none; }
.staff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px 18px; }

/* 成绩 */
.score-badge { font-weight: 800; font-size: 15px; }
.score-good { color: var(--green); }
.score-mid { color: #b7891a; }
.score-low { color: #e24848; }

/* Tabs */
.tabs { display: flex; gap: 6px; border-bottom: 2px solid var(--line); margin-bottom: 22px; }
.tabs a, .tabs button {
  padding: 11px 20px; font-size: 14.5px; font-weight: 600; color: var(--muted);
  border-bottom: 3px solid transparent; margin-bottom: -2px; cursor: pointer;
  background: none; border-top: none; border-left: none; border-right: none;
  font-family: inherit; transition: all var(--t-fast);
}
.tabs a:hover, .tabs a.active, .tabs button.active { color: var(--blue); border-bottom-color: var(--blue); }

/* Toast 提示 */
.toast-wrap { position: fixed; top: 22px; left: 50%; transform: translateX(-50%);
  z-index: 2000; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.toast {
  padding: 12px 24px; border-radius: var(--r-pill); color: #fff; font-size: 14px;
  box-shadow: 0 12px 34px rgba(0,0,0,.2); display: flex; align-items: center; gap: 9px;
  animation: toastIn .4s var(--ease); max-width: 90vw;
}
.toast.success { background: var(--green); }
.toast.error { background: #e24848; }
.toast.warning { background: #e8930c; }
.toast.info { background: var(--blue); }
.toast.leaving { animation: toastOut .35s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-22px) scale(.95); }
  to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-16px) scale(.96); } }

/* 模态框 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 28, 48, .5); z-index: 1500;
  display: none; align-items: center; justify-content: center; padding: 24px;
  opacity: 0; transition: opacity .25s var(--ease); backdrop-filter: blur(3px);
}
.modal-mask.open { display: flex; opacity: 1; }
.modal {
  background: #fff; border-radius: var(--r-lg); width: min(440px, 100%);
  padding: 30px; box-shadow: 0 30px 80px rgba(0,0,0,.25);
  transform: scale(.94) translateY(10px); transition: transform .3s var(--ease);
}
.modal-mask.open .modal { transform: scale(1) translateY(0); }
.modal h3 { font-size: 19px; margin-bottom: 10px; font-family: "Noto Sans SC", sans-serif; }
.modal p { color: var(--muted); margin-bottom: 24px; }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; }

/* 回到顶部 */
.back-top {
  position: fixed; right: 26px; bottom: 30px; z-index: 90;
  width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--blue); color: #fff; font-size: 19px; box-shadow: var(--sh-primary);
  opacity: 0; transform: translateY(16px); pointer-events: none;
  transition: all var(--t) var(--ease);
}
.back-top.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-top:hover { background: var(--blue-hover); transform: translateY(-4px); }

/* 空状态 */
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty .ico { font-size: 46px; opacity: .4; margin-bottom: 12px; }

/* 富文本编辑器 */
.editor-toolbar { display: flex; gap: 4px; flex-wrap: wrap; padding: 8px;
  border: 1.5px solid var(--line); border-bottom: none; border-radius: var(--r-sm) var(--r-sm) 0 0;
  background: var(--bg); }
.editor-toolbar button { width: 34px; height: 32px; border: none; background: transparent;
  border-radius: 7px; cursor: pointer; color: var(--ink-soft); font-size: 14px;
  transition: all var(--t-fast); }
.form-control.editor-area { border-radius: 0 0 var(--r-sm) var(--r-sm); min-height: 260px; }
.editor-toolbar button:hover { background: var(--blue-soft); color: var(--blue); }

/* ---------- 入场动画 ---------- */
[data-reveal] {
  opacity: 0; transform: translateY(26px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
  transition-delay: var(--d, 0s);
}
[data-reveal].is-in { opacity: 1; transform: translateY(0); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); } }
.page-enter { animation: fadeUp .4s var(--ease); }

/* ---------- 页脚 ---------- */
.site-footer {
  background: linear-gradient(180deg, var(--blue-dark), #072a5c);
  color: rgba(255, 255, 255, .75); padding: 48px 0 0; margin-top: 30px;
}
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; padding-bottom: 36px; }
.footer-brand { display: flex; gap: 14px; align-items: flex-start; }
.footer-brand img { width: 58px; }
.footer-brand .cn { font-family: "Noto Serif SC", serif; font-size: 19px; color: #fff; font-weight: 800; }
.footer-brand .en { font-size: 11px; opacity: .6; }
.footer-col h4 { color: #fff; font-size: 15px; margin-bottom: 16px;
  font-family: "Noto Sans SC", sans-serif; }
.footer-col a, .footer-col li { color: rgba(255,255,255,.7); font-size: 13.5px;
  display: block; padding: 4px 0; transition: all var(--t-fast); }
.footer-col a:hover { color: #fff; transform: translateX(4px); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 18px 0;
  text-align: center; font-size: 12.5px; opacity: .65; }

/* ---------- 移动端抽屉与遮罩 ---------- */
.nav-mask, .portal-mask {
  position: fixed; inset: 0; background: rgba(15, 25, 50, .5);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  z-index: 1000; opacity: 0; visibility: hidden;
  transition: opacity .32s ease, visibility .32s;
}
.nav-mask.show, .portal-mask.show { opacity: 1; visibility: visible; }

/* 门户顶部汉堡按钮（仅移动端显示） */
.portal-menu-btn {
  display: none; background: var(--blue-soft); border: none; color: var(--blue);
  width: 42px; height: 42px; border-radius: 12px; cursor: pointer;
  align-items: center; justify-content: center; flex-shrink: 0;
  transition: transform .2s var(--ease), background .2s;
}
.portal-menu-btn:active { transform: scale(.92); }

/* ---------- 响应式 ---------- */
@media (max-width: 992px) {
  .home-grid, .layout-2col, .dash-grid, .grid-2 { grid-template-columns: 1fr; }
  .news-grid, .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .teacher-grid { grid-template-columns: repeat(3, 1fr); }
  .quick-grid { grid-template-columns: repeat(3, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }

  /* 前台导航 → 右侧滑入抽屉 */
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; padding: 0; border-radius: 12px;
    background: var(--blue-soft); color: var(--blue); margin-left: 10px;
    transition: transform .2s var(--ease);
  }
  .nav-toggle:active { transform: scale(.92); }
  .main-nav { position: static; background: transparent; box-shadow: none; }
  .main-nav .container { padding: 0; }
  .nav-list {
    position: fixed; top: 0; right: 0; bottom: 0; width: 280px; max-width: 82vw;
    background: #fff; flex-direction: column; justify-content: flex-start;
    height: 100vh; height: 100dvh;
    padding: 72px 16px 32px; z-index: 1001; overflow-y: auto;
    transform: translateX(100%); display: flex !important;
    transition: transform .4s cubic-bezier(.22, 1, .36, 1);
    box-shadow: -24px 0 60px rgba(0, 0, 0, .2);
  }
  .nav-list.open { transform: translateX(0); }
  .nav-list > li { width: 100%; }
  .nav-list > li > a {
    height: 48px; border-radius: 12px; padding: 0 16px;
    color: #24324a; justify-content: flex-start; font-size: 15px;
  }
  .nav-list > li.active > a { background: var(--blue-soft); color: var(--blue); }
  .nav-list > li > a::after { display: none; }
  body.nav-open { overflow: hidden; }

  /* 门户/后台侧边栏 → 左侧滑入抽屉 */
  .portal { grid-template-columns: 1fr; }
  .portal-side {
    position: fixed; top: 0; left: 0; bottom: 0; width: 270px; max-width: 80vw;
    z-index: 1001; transform: translateX(-100%); height: 100vh; height: 100dvh;
    overflow-y: auto; transition: transform .4s cubic-bezier(.22, 1, .36, 1);
    box-shadow: 24px 0 60px rgba(0, 0, 0, .2);
  }
  .portal-side.open { transform: translateX(0); }
  .portal-menu-btn { display: inline-flex; }
  .portal-menu { display: flex; flex-direction: column; flex-wrap: nowrap; padding: 8px 12px 24px; }
  .portal-menu .grp { display: block; }
  .portal-menu a { margin: 2px 0; }
  .portal-menu a.active::before { display: none; }
  body.portal-open { overflow: hidden; }
}

@media (max-width: 640px) {
  .topbar { display: none; }
  .header-search { display: none; }
  .hero-track { height: 260px; }
  .hero-caption h2 { font-size: 22px; }
  .hero-caption p { font-size: 13px; }
  .news-grid, .gallery-grid, .photo-grid, .teacher-grid { grid-template-columns: 1fr; }
  .quick-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .section-title { font-size: 20px; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }
  .portal-main { padding: 14px 14px 80px; }
  .anniv-banner { padding: 24px 18px; }
  .container { padding-left: 16px; padding-right: 16px; }
  .header-main { padding: 10px 16px; gap: 8px; }
  .logo-text .cn { font-size: 15px; }
  .logo-text .en { display: none; }

  /* 按钮：触控友好 + 自动换行不挤压 */
  .btn { height: 44px; padding: 0 18px; font-size: 14px; }
  .btn-sm { height: 36px; padding: 0 12px; font-size: 12.5px; }
  .actions, .card-actions, .modal-actions, .form-actions { flex-wrap: wrap; }
  .actions .btn, .card-actions .btn { flex: 1 1 auto; min-width: 0; }

  /* 表单全宽 */
  .form-group input, .form-group select, .form-group textarea { width: 100%; }
  .form-actions { flex-direction: column; }
  .form-actions .btn { width: 100%; }

  /* 表格：横向滚动 + 惯性滚动 */
  .table-wrap { -webkit-overflow-scrolling: touch; overflow-x: auto; }
  .data-table { min-width: 560px; }
  .data-table th, .data-table td { padding: 11px 12px; font-size: 13px; }

  /* 课表：最小宽度保证不挤压，时段列固定 */
  .tt-edit, .tt-view { min-width: 620px; }
  .tt-edit .tt-period, .tt-view .tt-period {
    position: sticky; left: 0; z-index: 2;
    background: #f3f5fa !important; box-shadow: 2px 0 6px rgba(0,0,0,.05);
  }
  .tt-cell { min-width: 72px; font-size: 12px; }
  .tt-subj { font-size: 12.5px; }
  .tt-teacher { font-size: 10px; }

  /* 门户顶部 */
  .portal-top { padding: 14px 0; gap: 10px; }
  .portal-top h1 { font-size: 18px; }
  .portal-user .info { display: none; }
  .portal-user .ava { width: 38px; height: 38px; font-size: 15px; }

  /* 卡片与标题 */
  .card { padding: 18px 16px; }
  .card-title { font-size: 16px; }
  .breadcrumb-bar { font-size: 12px; flex-wrap: wrap; gap: 4px; }

  /* 任课网格单列 */
  .staff-grid { grid-template-columns: 1fr 1fr; gap: 12px; }

  /* 底部安全区 */
  .site-footer { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
}

@media (max-width: 480px) {
  .hero-track { height: 220px; }
  .hero-caption h2 { font-size: 19px; }
  .stat-grid { grid-template-columns: 1fr; }
  .nav-list { width: 85vw; }
  .portal-side { width: 82vw; }
  .staff-grid { grid-template-columns: 1fr; }
  .header-user .btn-sm span { display: none; }
}

/* 尊重“减少动态效果”系统设置 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

/* 自定义页面内容区（后台 HTML 页面） */
.custom-page-content h2 { font-size: 20px; margin: 24px 0 12px; color: var(--blue-dark); }
.custom-page-content h3 { font-size: 17px; margin: 20px 0 10px; }
.custom-page-content p { line-height: 1.9; margin: 10px 0; }
.custom-page-content img { max-width: 100%; border-radius: 12px; margin: 12px 0; }
.custom-page-content table { width: 100%; border-collapse: collapse; margin: 14px 0; }
.custom-page-content th, .custom-page-content td { padding: 10px 14px; border: 1px solid var(--line); text-align: left; }
.custom-page-content th { background: var(--blue-soft); color: var(--blue-dark); }
.custom-page-content a { color: var(--blue); text-decoration: underline; }
