/* 古幢小学 2026级2班 · 逐光同行 向阳而生 */
:root {
  --sun: #f4a52a;
  --sun-deep: #e07d0b;
  --glow: #ffd884;
  --sky: #58a6e8;
  --leaf: #3fae94;
  --rose: #ef7d76;
  --ink: #302b23;
  --ink-soft: #756a5c;
  --paper: #fffcf5;
  --paper-2: #fff7e8;
  --line: rgba(126, 98, 58, .13);
  --shadow: 0 18px 50px rgba(163, 113, 35, .12);
  --shadow-sm: 0 8px 24px rgba(163, 113, 35, .09);
  --radius: 22px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.75;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; }

.wrap {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
}

/* ---------- 导航 ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(255, 252, 245, .82);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .02em;
  white-space: nowrap;
}
.brand-mark {
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 32%, #fff3c4, var(--sun) 62%, var(--sun-deep));
  box-shadow: 0 0 0 4px rgba(244, 165, 42, .14), 0 0 16px rgba(244, 165, 42, .55);
}
.brand small {
  display: block;
  font-size: 9.5px;
  font-weight: 600;
  color: var(--ink-soft);
  letter-spacing: .08em;
  line-height: 1.2;
}
.nav-links { display: flex; gap: 6px; }
.nav-links a {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
  transition: .25s;
}
.nav-links a:hover, .nav-links a:focus-visible {
  color: var(--sun-deep);
  background: rgba(244, 165, 42, .12);
  outline: none;
}

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 16px 0 18px;
  background:
    radial-gradient(900px 520px at 78% 4%, rgba(255, 216, 132, .62), transparent 62%),
    radial-gradient(620px 420px at 8% 88%, rgba(88, 166, 232, .14), transparent 68%),
    linear-gradient(180deg, #fffdf6 0%, #fff6e3 100%);
}
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -330px;
  right: -170px;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 228, 158, .95) 0%, rgba(255, 216, 132, .42) 34%, rgba(255, 216, 132, 0) 68%);
  animation: halo 9s ease-in-out infinite alternate;
}
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -40%;
  right: 12%;
  width: 190px;
  height: 160%;
  transform: rotate(24deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .5), transparent);
  filter: blur(18px);
  opacity: .7;
}
@keyframes halo {
  from { transform: scale(1) translateY(0); opacity: .85; }
  to   { transform: scale(1.12) translateY(22px); opacity: 1; }
}

.hero-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid rgba(224, 125, 11, .22);
  border-radius: 999px;
  background: rgba(255, 255, 255, .66);
  color: var(--sun-deep);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
}
.hero-quick {
  padding: 4px 11px; border-radius: 999px;
  font-size: 11px; font-weight: 700; color: var(--sun-deep);
  background: rgba(255, 255, 255, .8);
  border: 1px solid rgba(224, 125, 11, .28);
  transition: background .2s, color .2s;
}
.hero-quick:hover { background: var(--sun); color: #fff; }
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 0 0 3px rgba(244, 165, 42, .2);
}
.hero h1 {
  margin: 8px 0 4px;
  font-size: clamp(24px, 5.2vw, 36px);
  line-height: 1.2;
  letter-spacing: .03em;
  font-weight: 900;
  white-space: nowrap;
}
.hero h1 .light {
  background: linear-gradient(100deg, var(--sun-deep), var(--sun) 45%, #ffcf68 78%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  margin: 0;
  font-size: clamp(12px, 1.7vw, 13.5px);
  color: var(--ink-soft);
  letter-spacing: .04em;
}
.hero-inner { position: relative; z-index: 1; }

/* ---------- 首屏滚动通知栏 ---------- */
.notice-bar {
  position: relative;
  z-index: 2;
  height: 36px;
  overflow: hidden;
  background: linear-gradient(90deg, #fff0cd, #fff9eb 48%, #fff0cd);
  border-top: 1px solid rgba(224, 125, 11, .22);
  border-bottom: 1px solid rgba(224, 125, 11, .18);
  outline: none;
}
.notice-bar:focus-visible { box-shadow: inset 0 0 0 2px rgba(88, 166, 232, .55); }
.notice-inner {
  display: flex; align-items: center; gap: 12px;
  height: 100%;
}
.notice-label {
  flex: none;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--sun-deep), var(--sun));
  color: #fff;
  font-size: 11px; font-weight: 800; letter-spacing: .06em;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(224, 125, 11, .2);
}
.notice-viewport {
  flex: 1 1 auto; min-width: 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 18px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 18px), transparent);
}
.notice-track {
  display: flex; width: max-content;
  animation: notice-scroll 22s linear infinite;
  will-change: transform;
}
.notice-group { display: flex; flex: none; }
.notice-item {
  position: relative; flex: none;
  padding-right: 64px;
  color: #8a4b06; font-size: 12.5px; font-weight: 600;
  letter-spacing: .02em; white-space: nowrap; line-height: 1.6;
}
.notice-item::after {
  content: "";
  position: absolute; right: 29px; top: 50%;
  width: 4px; height: 4px; margin-top: -2px;
  border-radius: 50%; background: rgba(224, 125, 11, .42);
}
@keyframes notice-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
/* 悬停、聚焦、点击（微信里点一下）都能暂停，方便看清文字 */
.notice-bar:hover .notice-track,
.notice-bar:focus-within .notice-track,
.notice-bar.is-paused .notice-track { animation-play-state: paused; }
@media (max-width: 640px) {
  .notice-bar { height: 32px; }
  .notice-inner { gap: 8px; }
  .notice-label { padding: 2px 6px; gap: 3px; font-size: 10px; }
  .notice-item { font-size: 11px; padding-right: 40px; }
  .notice-item::after { right: 17px; }
  .notice-track { animation-duration: 18s; }
  /* 首句要能完整读完，左端不做渐隐，右端只留很窄的淡出 */
  .notice-viewport {
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 10px), transparent 100%);
    mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 10px), transparent 100%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .notice-track { animation: none !important; transform: none !important; }
  .notice-viewport { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  transition: transform .22s, box-shadow .22s;
}
.btn-primary {
  color: #fff;
  background: linear-gradient(120deg, var(--sun-deep), var(--sun));
  box-shadow: 0 12px 26px rgba(224, 125, 11, .28);
}
.btn-ghost {
  color: var(--sun-deep);
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(224, 125, 11, .24);
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 16px 30px rgba(224, 125, 11, .24); }
.btn:focus-visible { outline: 3px solid rgba(88, 166, 232, .5); outline-offset: 3px; }

/* 浮动光点 */
.motes { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.mote {
  position: absolute;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #ffd071;
  opacity: .5;
  animation: float 8s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); opacity: .35; }
  50% { transform: translateY(-26px) scale(1.35); opacity: .9; }
}

/* ---------- 通用区块 ---------- */
.section { padding: 78px 0; }
.section.alt { background: linear-gradient(180deg, #fff8ea, #fffcf5); }
.sec-head { margin-bottom: 38px; }
.sec-kicker {
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .24em;
  color: var(--sun-deep);
  text-transform: uppercase;
}
.sec-head h2 {
  margin: 10px 0 8px;
  font-size: clamp(26px, 5vw, 38px);
  letter-spacing: .04em;
  font-weight: 850;
}
.sec-head p { margin: 0; color: var(--ink-soft); font-size: 15px; }

/* 寄语（紧凑金句带） */
#motto { padding: 18px 0; }
.quote-card {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  position: relative; overflow: hidden;
  padding: 12px 20px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(125deg, #ef9431, #f6b445 52%, #f7cf75);
  box-shadow: var(--shadow-sm);
}
.quote-card::after {
  content: "";
  position: absolute; right: -40px; top: -70px;
  width: 150px; height: 150px; border-radius: 50%;
  background: rgba(255, 255, 255, .14);
}
.quote-card .mark {
  flex: none; font-size: 26px; line-height: 1;
  opacity: .55; font-family: Georgia, serif;
}
.quote-card blockquote {
  position: relative; z-index: 1; flex: 1 1 auto;
  margin: 0;
  font-size: clamp(14px, 2.1vw, 18px);
  font-weight: 700; line-height: 1.5; letter-spacing: .02em;
  text-wrap: balance;
}
.quote-card p {
  position: relative; z-index: 1; flex: none;
  margin: 0 0 0 auto; opacity: .9; font-size: 11px; white-space: nowrap;
}

/* 51 颗小太阳 */
.sun-grid-wrap {
  padding: 30px clamp(16px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255, 255, 255, .72);
  box-shadow: var(--shadow-sm);
}
.sun-grid {
  display: grid;
  grid-template-columns: repeat(17, 1fr);
  gap: clamp(7px, 1.4vw, 14px);
  max-width: 760px;
  margin: 0 auto;
}
.spark {
  position: relative;
  aspect-ratio: 1;
  border: none;
  padding: 0;
  border-radius: 50%;
  cursor: pointer;
  background: radial-gradient(circle at 32% 30%, #fff4cf, var(--glow) 46%, var(--sun) 78%);
  box-shadow: 0 0 0 3px rgba(244, 165, 42, .13), 0 4px 12px rgba(224, 125, 11, .18);
  animation: breathe 3.6s ease-in-out infinite;
  animation-delay: calc(var(--i) * 55ms);
  transition: transform .2s, box-shadow .2s;
}
.spark:nth-child(3n) { background: radial-gradient(circle at 32% 30%, #e9f6ff, #b6e0f7 48%, var(--sky) 80%); box-shadow: 0 0 0 3px rgba(88, 166, 232, .13), 0 4px 12px rgba(88, 166, 232, .18); }
.spark:nth-child(5n) { background: radial-gradient(circle at 32% 30%, #e4f8f0, #a9e7d3 48%, var(--leaf) 80%); box-shadow: 0 0 0 3px rgba(63, 174, 148, .13), 0 4px 12px rgba(63, 174, 148, .18); }
.spark:hover, .spark:focus-visible {
  transform: scale(1.32);
  box-shadow: 0 0 0 5px rgba(244, 165, 42, .2), 0 8px 20px rgba(224, 125, 11, .3);
  outline: none;
  z-index: 2;
}
@keyframes breathe {
  0%, 100% { opacity: .78; transform: scale(.94); }
  50% { opacity: 1; transform: scale(1.06); }
}
.sun-note {
  margin: 24px 0 0;
  text-align: center;
  font-size: 14px;
  color: var(--ink-soft);
  min-height: 1.8em;
}
.sun-note strong { color: var(--sun-deep); }

/* 四课卡片 */
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.card {
  padding: 28px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card-icon {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 15px;
  font-size: 23px;
  margin-bottom: 16px;
}
.card:nth-child(1) .card-icon { background: rgba(244, 165, 42, .16); }
.card:nth-child(2) .card-icon { background: rgba(88, 166, 232, .16); }
.card:nth-child(3) .card-icon { background: rgba(63, 174, 148, .16); }
.card:nth-child(4) .card-icon { background: rgba(239, 125, 118, .16); }
.card h3 { margin: 0 0 8px; font-size: 19px; letter-spacing: .05em; }
.card p { margin: 0; font-size: 14px; color: var(--ink-soft); }

/* 时间轴 */
.timeline { position: relative; max-width: 760px; margin: 0 auto; padding-left: 34px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 11px; top: 8px; bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--sun), rgba(244, 165, 42, .12));
}
.tl-item { position: relative; padding: 0 0 30px 10px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -28px; top: 8px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 0 0 5px rgba(244, 165, 42, .18);
}
.tl-item .when {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  color: var(--sun-deep);
}
.tl-item h3 { margin: 4px 0 6px; font-size: 19px; }
.tl-item p { margin: 0; font-size: 14px; color: var(--ink-soft); }

/* 页脚 */
.footer {
  padding: 44px 0 38px;
  text-align: center;
  background: linear-gradient(180deg, #fff6e3, #fff1d5);
  border-top: 1px solid var(--line);
}
.footer .slogan {
  font-size: clamp(20px, 4vw, 28px);
  font-weight: 850;
  letter-spacing: .12em;
  color: var(--sun-deep);
}
.footer p { margin: 12px 0 0; font-size: 13px; color: var(--ink-soft); }
.footer .divider { width: 46px; height: 2px; margin: 20px auto; background: rgba(224, 125, 11, .3); }

/* 滚动显现 */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* 响应式 */
@media (max-width: 900px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .sun-grid { grid-template-columns: repeat(13, 1fr); }
}
@media (max-width: 640px) {
  .wrap { width: min(100% - 32px, 1080px); }
  .nav-inner { height: 46px; }
  .brand { font-size: 13px; }
  .brand small { font-size: 9px; }
  .nav-links { gap: 0; }
  .nav-links a { padding: 5px 7px; font-size: 11px; }
  .nav-links a:nth-child(3), .nav-links a:nth-child(4) { display: none; }
  .hero { padding: 13px 0 15px; }
  .hero h1 { font-size: clamp(22px, 5.6vw, 26px); }
  .hero::before { width: 460px; height: 460px; top: -230px; right: -190px; }
  .stats { gap: 8px; }
  .stat { min-width: 0; flex: 1 1 30%; padding: 12px 10px; text-align: center; }
  .stat b { font-size: 25px; }
  .stat span { font-size: 11px; }
  .section { padding: 58px 0; }
  .cards { grid-template-columns: 1fr; }
  /* 资料宫格响应式见文件末尾 */
  .sun-grid { grid-template-columns: repeat(9, 1fr); gap: 8px; }
  .sun-grid-wrap { padding: 20px 12px; }
  #motto { padding: 14px 0; }
  .quote-card { padding: 11px 14px; gap: 8px; }
  .quote-card .mark { display: none; }
  .quote-card blockquote { font-size: 13.5px; }
  .quote-card p { margin-left: 0; font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- 班级常用资料（宫格） ---------- */
.files-section {
  padding-top: 30px;
  padding-bottom: 46px;
  background: linear-gradient(180deg, #fff6e3 0%, #fffcf5 32%);
}
.files-head { margin-bottom: 18px; }
.files-head h2 { margin: 6px 0 4px; font-size: clamp(22px, 4vw, 30px); }
.files-head p { font-size: 13.5px; }

.file-tiles {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
.tile-text { display: flex; flex-direction: column; }
.tile {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start;
  min-height: 150px;
  padding: 16px 15px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform .22s, box-shadow .22s, border-color .22s;
}
.tile:hover, .tile:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(224, 125, 11, .42);
  outline: none;
}
.tile:active { transform: translateY(-1px); }
.tile-primary {
  border-color: rgba(224, 125, 11, .34);
  background: linear-gradient(160deg, #fff8e9, #fff 62%);
}
.tile-primary::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(90deg, var(--sun-deep), var(--sun), #ffd884);
}
.tile-badge {
  position: absolute; top: 12px; right: 12px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 10px; font-weight: 800; letter-spacing: .04em; color: #fff;
  background: linear-gradient(120deg, var(--sun-deep), var(--sun));
}
.tile-icon {
  width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 13px; font-size: 21px; margin-bottom: 11px;
  background: var(--paper-2);
}
.tile-name { font-size: 15px; font-weight: 800; letter-spacing: .02em; line-height: 1.4; }
.tile-meta { margin-top: 4px; font-size: 11.5px; color: var(--ink-soft); line-height: 1.5; }
.tile-go { margin-top: auto; padding-top: 10px; font-size: 12px; font-weight: 700; color: var(--sun-deep); }

/* 站内查看页仍在复用的组件，保留 */
.file-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.btn-sm { padding: 9px 18px; font-size: 13.5px; }
.btn-sm:focus-visible { outline: 3px solid rgba(88, 166, 232, .5); outline-offset: 3px; }
.file-preview {
  position: relative; display: block; overflow: hidden;
  border-radius: 16px; border: 1px solid var(--line);
  background: #fff; cursor: zoom-in;
}
.file-preview img { display: block; width: 100%; height: auto; }
.zoom-tip {
  position: absolute; right: 12px; bottom: 12px;
  padding: 6px 13px; border-radius: 999px;
  font-size: 12px; font-weight: 700; color: #fff;
  background: rgba(48, 43, 35, .72);
}

/* 图片灯箱 */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 16px; background: rgba(30, 25, 18, .93);
  opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: min(1100px, 100%); margin-bottom: 12px;
  color: #fff; font-size: 14px; font-weight: 700;
}
.lightbox-close {
  flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%;
  font-size: 24px; line-height: 1; color: #fff; cursor: pointer;
  background: rgba(255, 255, 255, .18);
}
.lightbox-close:hover { background: var(--sun-deep); }
.lightbox-close:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.lightbox-stage {
  width: min(1100px, 100%); max-height: calc(100vh - 120px);
  overflow: auto; -webkit-overflow-scrolling: touch;
  border-radius: 12px; background: #fff;
}
.lightbox-stage img { display: block; width: 100%; height: auto; }
.lightbox-hint { margin-top: 10px; font-size: 12px; color: rgba(255, 255, 255, .72); }
body.lb-lock { overflow: hidden; }

@media (max-width: 900px) {
  .file-tiles { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .files-section { padding-top: 22px; padding-bottom: 36px; }
  .file-tiles { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .tile { min-height: 132px; padding: 14px 13px 12px; border-radius: 16px; }
  .tile-primary::before { border-radius: 16px 16px 0 0; }
  .tile-badge { top: 10px; right: 10px; padding: 2px 7px; font-size: 9.5px; }
  .tile-icon { width: 36px; height: 36px; font-size: 18px; margin-bottom: 9px; border-radius: 11px; }
  .tile-name { font-size: 14px; }
  .tile-meta { font-size: 11px; }
  .tile-go { font-size: 11.5px; }
  .tile-wide {
    grid-column: 1 / -1; min-height: 0;
    flex-direction: row; align-items: center; flex-wrap: nowrap;
    gap: 12px; padding: 14px 16px;
  }
  .tile-wide .tile-icon { margin-bottom: 0; flex: none; }
  .tile-wide .tile-text { flex: 1 1 auto; min-width: 0; }
  .tile-wide .tile-go { margin-top: 0; padding-top: 0; flex: none; }
  .btn-sm { flex: 1 1 auto; justify-content: center; }
  .lightbox { padding: 10px; }
  .lightbox-stage { max-height: calc(100vh - 110px); }
}

/* ---------- 微信内置浏览器适配 ---------- */
.wx-only { display: none; }
body.in-wechat .dl-only { display: none !important; }
body.in-wechat .wx-only { display: inline; }
.wx-tip, .doc-wx-tip {
  font-size: 12.5px; color: var(--ink-soft); line-height: 1.6;
}
.files-wechat-tip {
  margin: 14px 0 0; padding: 10px 14px;
  border-radius: 12px; font-size: 12.5px; color: var(--ink-soft);
  background: rgba(88, 166, 232, .09); border: 1px solid rgba(88, 166, 232, .18);
}
.files-wechat-tip b { color: #2f7fb8; }

/* ---------- 站内资料查看页 ---------- */
.doc-page {
  min-height: 100vh;
  -webkit-text-size-adjust: 100%;
  background: linear-gradient(180deg, #fff8ea, #fffcf5 42%);
}
.doc-bar {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 252, 245, .9);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.doc-bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 54px; }
.doc-back { font-size: 14px; font-weight: 700; color: var(--sun-deep); white-space: nowrap; }
.doc-bar-title { font-size: 13px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-main { width: min(980px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 54px; }
.doc-head h1 { margin: 8px 0 8px; font-size: clamp(24px, 5vw, 32px); letter-spacing: .03em; }
.doc-head p { margin: 0; font-size: 14px; color: var(--ink-soft); line-height: 1.8; }
.doc-tip {
  margin: 18px 0; padding: 12px 16px;
  border: 1px solid rgba(224, 125, 11, .18); border-radius: 14px;
  background: rgba(244, 165, 42, .12);
  font-size: 13.5px; color: var(--ink-soft); line-height: 1.7;
}
.doc-tip b { color: var(--sun-deep); }
.doc-figure {
  position: relative; display: block; overflow: hidden;
  border: 1px solid var(--line); border-radius: 16px;
  background: #fff; box-shadow: var(--shadow-sm); cursor: zoom-in;
}
.doc-figure img { display: block; width: 100%; height: auto; }
.doc-figure:focus-visible { outline: 3px solid rgba(88, 166, 232, .6); outline-offset: 3px; }
.doc-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.doc-foot { padding: 24px 16px 32px; text-align: center; font-size: 12px; color: #9a8e7c; }

.doc-search-wrap { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 18px 0 14px; }
.doc-search {
  flex: 1 1 260px; min-width: 0; padding: 12px 16px;
  border: 1.5px solid rgba(224, 125, 11, .25); border-radius: 14px;
  background: #fff; font-size: 15px; color: var(--ink); outline: none;
  -webkit-appearance: none; appearance: none;
}
.doc-search:focus { border-color: var(--sun); box-shadow: 0 0 0 4px rgba(244, 165, 42, .15); }
.doc-count { font-size: 13px; color: var(--ink-soft); }
.roster-scroll {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line); border-radius: 16px;
  background: #fff; box-shadow: var(--shadow-sm);
}
.roster { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.roster th, .roster td {
  padding: 10px 12px; text-align: left; white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
.roster thead th { background: #fff2d6; color: var(--sun-deep); font-weight: 800; }
.roster tbody tr:last-child td { border-bottom: 0; }
.roster tr.pending td { background: #fffaf0; }
.roster td[data-label="学生姓名"] { font-weight: 700; color: var(--sun-deep); }
.doc-empty { padding: 24px; text-align: center; font-size: 14px; color: var(--ink-soft); }
.doc-notes {
  margin-top: 26px; padding: 20px 22px;
  border: 1px solid var(--line); border-radius: 18px; background: #fff;
}
.doc-notes h2 { margin: 0 0 10px; font-size: 18px; }
.doc-notes ol { margin: 0; padding-left: 20px; font-size: 13.5px; line-height: 1.9; color: var(--ink-soft); }

@media (max-width: 640px) {
  .doc-main { padding: 22px 0 44px; }
  .roster-scroll { overflow: visible; border: 0; background: transparent; box-shadow: none; }
  .roster, .roster tbody { display: block; }
  .roster thead { display: none; }
  .roster tr {
    display: block; margin: 0 0 10px; padding: 8px 14px;
    border: 1px solid var(--line); border-radius: 14px;
    background: #fff; box-shadow: var(--shadow-sm);
  }
  .roster tr.pending { background: #fffaf0; }
  .roster td {
    display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
    padding: 6px 0; border: 0; white-space: normal; text-align: right; font-size: 14px;
  }
  .roster td::before { content: attr(data-label); flex: none; font-size: 12px; color: var(--ink-soft); text-align: left; }
  .roster td[data-label="序号"], .roster td[data-label="值岗家长签字"], .roster td:empty { display: none; }
}

/* ---------- 请假条模板查看页 ---------- */
.tpl-card { margin-top: 20px; }
.tpl-paper {
  padding: 24px clamp(16px, 3vw, 30px);
  border: 1px solid var(--line); border-radius: 18px;
  background: #fff; box-shadow: var(--shadow-sm);
}
.tpl-head { font-size: clamp(17px, 3vw, 20px); font-weight: 700; }
.tpl-intro { margin: 10px 0 20px; font-size: 14.5px; line-height: 1.9; }
.tpl-inline {
  width: 3.2em; padding: 2px 4px;
  border: 0; border-bottom: 1.5px solid var(--sun); border-radius: 0;
  background: rgba(244, 165, 42, .08);
  font: inherit; color: var(--sun-deep); text-align: center; outline: none;
  -webkit-appearance: none; appearance: none;
}
.tpl-inline:focus { background: rgba(244, 165, 42, .2); }
.tpl-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 22px; }
.tpl-fields label { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; }
.tpl-fields label span { flex: none; white-space: nowrap; color: var(--ink-soft); }
.tpl-fields input {
  flex: 1 1 auto; min-width: 0; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 10px;
  background: #fffdf8; font: inherit; font-size: 14px; color: var(--ink); outline: none;
  -webkit-appearance: none; appearance: none;
}
.tpl-fields input:focus { border-color: var(--sun); box-shadow: 0 0 0 3px rgba(244, 165, 42, .15); }
button.btn { font-family: inherit; cursor: pointer; }
button.btn-primary { border: 0; }
.copy-status { margin: 12px 0 0; min-height: 1.4em; font-size: 13px; font-weight: 700; color: var(--leaf); }
.copy-status.err { color: var(--rose); }
.tpl-fallback {
  width: 100%; margin-top: 10px; padding: 12px;
  border: 1px dashed var(--sun); border-radius: 12px;
  background: #fff; font-size: 14px; line-height: 1.9; color: var(--ink);
}
.tpl-fallback[hidden] { display: none; }
.raw-tpl {
  margin-top: 22px; padding: 14px 18px;
  border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, .7);
}
.raw-tpl summary { cursor: pointer; font-size: 13.5px; font-weight: 700; color: var(--sun-deep); }
.raw-tpl pre {
  margin: 12px 0 0; font-size: 13px; line-height: 1.9;
  white-space: pre-wrap; word-break: break-word; color: var(--ink-soft); font-family: inherit;
}
@media (max-width: 640px) {
  .tpl-paper { padding: 18px 14px; }
  .tpl-fields { grid-template-columns: 1fr; gap: 10px; }
}

/* ---------- 精简：成长四课 / 一路向光的时光 ---------- */
/* 主标题去逗号后，用字间距保留两段之间的呼吸 */
.hero h1 .light { word-spacing: .16em; }

#creed, #growth { padding: 34px 0; }
#creed .sec-head, #growth .sec-head { margin-bottom: 16px; }
#creed .sec-head h2, #growth .sec-head h2 {
  margin: 6px 0 4px; font-size: clamp(22px, 4vw, 30px);
}
#creed .sec-head p, #growth .sec-head p { font-size: 13.5px; }

/* 四课：4 列紧凑宫格 */
.creed-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.creed-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 132px; padding: 14px 10px; text-align: center;
  border: 1px solid var(--line); border-radius: 18px;
  background: #fff; box-shadow: var(--shadow-sm);
  transition: transform .22s, box-shadow .22s, border-color .22s;
}
.creed-tile:hover {
  transform: translateY(-4px); box-shadow: var(--shadow);
  border-color: rgba(224, 125, 11, .42);
}
.creed-icon {
  width: 40px; height: 40px; display: grid; place-items: center;
  margin-bottom: 8px; border-radius: 12px; font-size: 20px;
  background: var(--paper-2);
}
.creed-tile:nth-child(1) .creed-icon { background: rgba(244, 165, 42, .16); }
.creed-tile:nth-child(2) .creed-icon { background: rgba(88, 166, 232, .16); }
.creed-tile:nth-child(3) .creed-icon { background: rgba(63, 174, 148, .16); }
.creed-tile:nth-child(4) .creed-icon { background: rgba(239, 125, 118, .16); }
.creed-tile h3 { margin: 0 0 4px; font-size: 15px; letter-spacing: .02em; line-height: 1.4; }
.creed-tile p { margin: 0; font-size: 12px; line-height: 1.55; color: var(--ink-soft); }

/* 时光：桌面横向三段时间轴 */
.timeline {
  position: relative; display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px; max-width: none; margin: 0; padding: 22px 0 0;
}
.timeline::before {
  left: 0; right: 0; top: 4px; bottom: auto; width: auto; height: 2px;
  background: linear-gradient(90deg, var(--sun), rgba(244, 165, 42, .12));
}
.tl-item, .tl-item:last-child { padding: 0; }
.tl-item::before {
  left: 0; top: 0; width: 10px; height: 10px;
  box-shadow: 0 0 0 4px rgba(244, 165, 42, .18);
}
.tl-item .when { font-size: 11px; letter-spacing: .08em; }
.tl-item h3 { margin: 3px 0 4px; font-size: 16px; }
.tl-item p { font-size: 12.5px; line-height: 1.6; }

@media (max-width: 900px) {
  .creed-tiles { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  #creed, #growth { padding: 26px 0; }
  #creed .sec-head, #growth .sec-head { margin-bottom: 14px; }
  .creed-tiles { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .creed-tile { min-height: 116px; padding: 12px 8px; border-radius: 16px; }
  .creed-icon { width: 34px; height: 34px; font-size: 18px; margin-bottom: 6px; }
  .creed-tile h3 { font-size: 13.5px; }
  .creed-tile p { font-size: 11px; }
  .timeline { grid-template-columns: 1fr; gap: 0; padding: 0; }
  .timeline::before {
    left: 4px; right: auto; top: 8px; bottom: 8px; width: 2px; height: auto;
    background: linear-gradient(180deg, var(--sun), rgba(244, 165, 42, .12));
  }
  .tl-item { padding: 0 0 12px 20px; }
  .tl-item:last-child { padding-bottom: 0; }
  .tl-item::before { left: 0; top: 6px; width: 10px; height: 10px; }
  .tl-item .when { display: inline; margin-right: 8px; font-size: 10.5px; }
  .tl-item h3 { display: inline; margin: 0; font-size: 14px; }
  .tl-item p { margin-top: 2px; font-size: 12px; }
}

/* ---------- 统一压缩：各板块标题与整页节奏 ---------- */
.sec-kicker { font-size: 10.5px; letter-spacing: .18em; }
.sec-head, .files-head,
#creed .sec-head, #growth .sec-head { margin-bottom: 14px; }
.sec-head h2, .files-head h2,
#creed .sec-head h2, #growth .sec-head h2 {
  margin: 4px 0 3px;
  font-size: clamp(20px, 3.4vw, 27px);
  letter-spacing: .03em;
  line-height: 1.3;
}
.sec-head p, .files-head p,
#creed .sec-head p, #growth .sec-head p { font-size: 12.5px; line-height: 1.5; }

.section, #creed, #growth { padding: 28px 0; }
.files-section { padding-top: 24px; padding-bottom: 28px; }
.files-wechat-tip { margin-top: 10px; padding: 8px 12px; font-size: 12px; }
#motto { padding: 14px 0; }
.quote-card { padding: 10px 18px; }
.quote-card blockquote { font-size: clamp(13.5px, 1.9vw, 16px); }

.sun-grid-wrap { padding: 18px clamp(14px, 2.4vw, 26px); border-radius: 20px; }
.sun-grid { max-width: 660px; gap: clamp(6px, 1vw, 10px); }
.sun-note { margin-top: 12px; font-size: 12.5px; min-height: 1.5em; }

.creed-tile { min-height: 118px; }
.timeline { padding-top: 18px; gap: 12px; }
.tl-item p { font-size: 12px; }

.footer { padding: 26px 0 22px; }
.footer .slogan { font-size: clamp(18px, 3.4vw, 24px); }
.footer .divider { margin: 12px auto; }
.footer p { margin-top: 6px; font-size: 12.5px; }

/* 资料查看页标题区同步收紧 */
.doc-main { padding-top: 22px; }
.doc-head h1 { margin: 6px 0 6px; font-size: clamp(21px, 4vw, 27px); }
.doc-head p { font-size: 13px; line-height: 1.7; }
.doc-tip { margin: 14px 0; padding: 10px 14px; font-size: 13px; }
.doc-notes { margin-top: 20px; padding: 16px 18px; }
.doc-notes h2 { font-size: 16px; }

@media (max-width: 640px) {
  .section, #creed, #growth { padding: 22px 0; }
  .files-section { padding-top: 20px; padding-bottom: 24px; }
  .sec-head, .files-head, #creed .sec-head, #growth .sec-head { margin-bottom: 12px; }
  .sec-head h2, .files-head h2, #creed .sec-head h2, #growth .sec-head h2 { font-size: 21px; }
  .sec-head p, .files-head p, #creed .sec-head p, #growth .sec-head p { font-size: 12px; }
  .creed-tile { min-height: 110px; }
  .sun-grid-wrap { padding: 16px 12px; }
  .sun-grid { gap: 7px; }
  #motto { padding: 12px 0; }
  .quote-card { padding: 10px 12px; }
  .quote-card blockquote { font-size: 13px; }
  .footer { padding: 22px 0 20px; }
}

/* ---------- 再压缩：板块标题 / 时间轴 / 页脚 ---------- */
.sec-kicker { font-size: 9.5px; letter-spacing: .14em; }
.sec-head, .files-head,
#creed .sec-head, #growth .sec-head { margin-bottom: 9px; }
.sec-head h2, .files-head h2,
#creed .sec-head h2, #growth .sec-head h2 {
  margin: 2px 0 2px;
  font-size: clamp(18px, 2.8vw, 22px);
  line-height: 1.25;
}
.sec-head p, .files-head p,
#creed .sec-head p, #growth .sec-head p { font-size: 11.5px; line-height: 1.45; }

.section, #creed, #growth { padding: 24px 0; }
.files-section { padding-top: 20px; padding-bottom: 24px; }
#motto { padding: 12px 0; }
.quote-card { padding: 8px 14px; }
.quote-card blockquote { font-size: clamp(12.5px, 1.7vw, 14.5px); }

.creed-tile h3 { font-size: 13.5px; }
.creed-tile p { font-size: 11.5px; }
.sun-note { font-size: 11.5px; }
.sun-note .wish-text { margin-left: .7em; }

.tl-item .when { font-size: 10px; }
.tl-item h3 { font-size: 14px; }
.tl-item p { font-size: 11.5px; line-height: 1.55; }

/* 页脚 */
.footer { padding: 16px 0 12px; }
.footer .slogan { font-size: clamp(15px, 2.8vw, 19px); letter-spacing: .08em; }
.footer .divider { width: 36px; margin: 8px auto; }
.footer p { margin-top: 3px; font-size: 11.5px; line-height: 1.6; }

/* 资料查看页标题 */
.doc-head h1 { font-size: clamp(19px, 3.4vw, 23px); margin: 4px 0 4px; }
.doc-notes h2 { font-size: 15px; }

@media (max-width: 640px) {
  .section, #creed, #growth { padding: 20px 0; }
  .files-section { padding-top: 18px; padding-bottom: 20px; }
  .sec-head, .files-head, #creed .sec-head, #growth .sec-head { margin-bottom: 8px; }
  .sec-head h2, .files-head h2, #creed .sec-head h2, #growth .sec-head h2 { font-size: 18px; }
  .sec-head p, .files-head p, #creed .sec-head p, #growth .sec-head p { font-size: 11px; }
  .creed-tile h3 { font-size: 12.5px; }
  .creed-tile p { font-size: 11px; }
  .quote-card blockquote { font-size: 12.5px; }
  #motto { padding: 10px 0; }

  /* 修复：桌面 .tl-item:last-child{padding:0} 特异性更高，会让末项丢失左缩进，
     造成圆点压字、描述整行左移。这里用同特异性显式给三项统一内边距。 */
  .tl-item, .tl-item:last-child {
    display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px;
    padding: 0 0 10px 22px;
  }
  .tl-item:last-child { padding-bottom: 0; }
  .tl-item .when { flex: none; margin-right: 0; font-size: 10px; }
  .tl-item h3 { flex: 0 1 auto; margin: 0; font-size: 13px; }
  .tl-item p { flex: 1 1 100%; margin-top: 2px; font-size: 11.5px; }
  .timeline::before { left: 4px; top: 6px; bottom: 6px; width: 2px; }
  .tl-item::before {
    left: 1px; top: 5px; width: 8px; height: 8px;
    box-shadow: 0 0 0 3px rgba(244, 165, 42, .18);
  }
  .footer { padding: 14px 0 12px; }

  /* 寄语：编号与句子分两行居中，避免长句在窄屏折出「你。」这类孤字 */
  .sun-note { min-height: 3em; line-height: 1.6; }
  .sun-note strong, .sun-note .wish-text { display: block; }
  .sun-note .wish-text { margin: 1px 0 0; }
}
