/* B250609 班级看台 — tokens 先行，组件里不出现裸色值 */
:root {
  --paper: #F6F2E8;
  --paper-2: #EDE6D3;
  --card: #FCFAF4;
  --ink: #16281D;
  --ink-2: #22392C;
  --green: #1E4D33;
  --green-deep: #10231A;
  --muted: #5B6455;
  --accent: #9C3F1E;
  --accent-bright: #B4502A;
  --accent-soft: #F0E2D2;
  --line: #D8CFB9;
  --gold: #8A6D1B;
  --radius: 14px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --shadow: 0 10px 30px rgba(22, 40, 29, .12);
  --shadow-lift: 0 16px 36px rgba(22, 40, 29, .18);
  --font-display: "Noto Serif SC", "Songti SC", "STSong", serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

html, body { overflow-x: clip; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.3;
  overflow-wrap: break-word;
  min-width: 0;
}

a { color: var(--green); }

::selection { background: var(--accent-soft); color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--accent-bright);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  background: var(--green-deep);
  color: var(--paper);
  padding: 10px 16px;
  border-radius: 8px;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; color: var(--paper); }

.wrap {
  width: min(1120px, 100% - 40px);
  margin-inline: auto;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 242, 232, .94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--green);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 900;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 17px; letter-spacing: .04em; }
.brand-text span { font-size: 12px; color: var(--muted); }
.site-nav {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--ink-2);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.site-nav a:hover { background: var(--paper-2); color: var(--accent); }

/* ---------- Sections ---------- */
section { padding: 88px 0; }
.section-title {
  margin: 0 0 8px;
  font-size: clamp(30px, 4.5vw, 44px);
  font-weight: 900;
  letter-spacing: .01em;
}
.section-lead { margin: 0 0 36px; color: var(--muted); font-size: 17px; }
.block-title {
  margin: 0 0 18px;
  font-size: 20px;
  font-weight: 600;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(92vh, 860px);
  display: flex;
  align-items: flex-end;
  padding: 0 0 72px;
  color: var(--paper);
  background: var(--green-deep);
  overflow: hidden;
}
.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(16, 35, 26, .92) 0%, rgba(16, 35, 26, .55) 46%, rgba(16, 35, 26, .18) 100%);
}
.hero-inner { position: relative; }
.hero-eyebrow {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .28em;
  color: var(--accent-soft);
}
.hero-title { margin: 0; }
.hero-title .reveal-line:first-child {
  display: block;
  font-size: clamp(64px, 13vw, 148px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: .02em;
}
.hero-sub {
  display: block;
  margin-top: 14px;
  font-size: clamp(20px, 3.4vw, 32px);
  font-weight: 600;
  letter-spacing: .06em;
}
.hero-slogan {
  margin: 22px 0 0;
  font-family: var(--font-display);
  font-size: clamp(18px, 2.6vw, 26px);
  font-weight: 600;
  color: var(--paper);
}
.hero-note { margin: 10px 0 0; color: rgba(246, 242, 232, .82); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-scroll {
  position: absolute;
  right: 28px;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(246, 242, 232, .85);
  font-size: 13px;
  text-decoration: none;
}
.hero-scroll span {
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--paper);
  border-bottom: 2px solid var(--paper);
  transform: rotate(45deg) translateY(-2px);
  animation: nudge 1.8s var(--ease) infinite;
}
@keyframes nudge {
  0%, 100% { transform: rotate(45deg) translate(0, -2px); opacity: .9; }
  50% { transform: rotate(45deg) translate(3px, 1px); opacity: .5; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 15.5px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.btn-solid { background: var(--accent-bright); color: #FFF8F0; box-shadow: 0 6px 18px rgba(180, 80, 42, .35); }
.btn-solid:hover { background: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.btn-solid:active { transform: translateY(0) scale(.98); }
.btn-ghost { border-color: rgba(246, 242, 232, .75); color: var(--paper); background: rgba(16, 35, 26, .25); }
.btn-ghost:hover { background: rgba(246, 242, 232, .14); transform: translateY(-2px); }
.btn-ghost:active { transform: translateY(0) scale(.98); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* ---------- Stats ---------- */
.stats { background: var(--paper); }
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
}
.stat {
  padding: 26px 22px 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.stat dt {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--muted);
}
.stat dd { margin: 0; }
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(36px, 4vw, 48px);
  font-weight: 900;
  line-height: 1.1;
  color: var(--green);
  font-variant-numeric: tabular-nums;
}
.stat-unit { margin-left: 4px; font-size: 16px; color: var(--ink-2); }
.stat-sub { margin-top: 8px; font-size: 13.5px; color: var(--muted); }

/* ---------- GPA ---------- */
.gpa { background: var(--paper-2); }
.gpa-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 28px;
  align-items: stretch;
}
.gpa-chart, .gpa-top {
  padding: 28px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.admin-lock {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 20px;
  background: var(--paper);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}
.admin-lock-title { font-size: 17px; font-weight: 700; color: var(--ink); }
.admin-lock-text { font-size: 14.5px; line-height: 1.7; color: var(--ink-2); }
.admin-lock .btn { justify-self: start; }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.bar-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 12px;
}
.bar-label { font-size: 14.5px; font-weight: 500; color: var(--ink-2); }
.bar-track {
  height: 14px;
  border-radius: 999px;
  background: var(--paper-2);
  overflow: hidden;
}
.bar-fill {
  display: block;
  height: 100%;
  width: var(--w);
  border-radius: 999px;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .9s var(--ease) .15s;
}
.in .bar-fill, .gpa-chart.in .bar-fill { transform: scaleX(1); }
.bar-row:first-child .bar-fill { background: var(--accent-bright); }
.bar-value { font-size: 14.5px; font-weight: 700; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.gpa-note { margin: 20px 0 0; font-size: 13.5px; color: var(--muted); }
.top-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.top-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 6px;
  border-bottom: 1px solid var(--line);
}
.top-list li:last-child { border-bottom: 0; }
.rank {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--paper-2);
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.rank-1 { background: var(--gold); color: #FFF8F0; }
.rank-2 { background: var(--accent-bright); color: #FFF8F0; }
.rank-3 { background: var(--green); color: var(--paper); }
.top-name { font-size: 16.5px; font-weight: 500; }
.privacy-note {
  margin: 22px 0 0;
  padding: 12px 16px;
  border-left: 3px solid var(--accent-bright);
  background: var(--accent-soft);
  font-size: 14px;
  color: var(--ink-2);
}

/* ---------- Timeline ---------- */
.timeline-list {
  list-style: none;
  margin: 0;
  padding: 0 0 0 8px;
  border-left: 2px solid var(--line);
}
.timeline-item { position: relative; padding: 0 0 40px 32px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: -9px;
  top: 8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--paper);
  border: 3px solid var(--accent-bright);
}
.timeline-time {
  margin: 0 0 4px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--accent);
}
.timeline-item h3 { margin: 0 0 6px; font-size: 22px; font-weight: 600; }
.timeline-item p { margin: 0; max-width: 68ch; color: var(--ink-2); }
.timeline-photo {
  margin-top: 16px;
  max-width: 560px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

/* ---------- Check-in wall ---------- */
.checkin { background: var(--green-deep); color: var(--paper); }
.checkin .section-title { color: var(--paper); }
.checkin .section-lead { color: rgba(246, 242, 232, .78); }
.section-head { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
.section-head .section-title { margin-bottom: 0; }
.soon-badge {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-bright);
  color: #FFF8F0;
  font-size: 13.5px;
  font-weight: 700;
}
.checkin-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 28px;
}
.checkin-stats > div {
  padding: 20px;
  border: 1px solid rgba(246, 242, 232, .22);
  border-radius: var(--radius);
  background: rgba(246, 242, 232, .06);
}
.checkin-stats dt { font-size: 13.5px; color: rgba(246, 242, 232, .72); }
.checkin-stats dd {
  margin: 4px 0 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 38px);
  font-weight: 900;
  color: var(--paper);
  font-variant-numeric: tabular-nums;
}
.filter-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.filter-btn {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1.5px solid rgba(246, 242, 232, .4);
  background: transparent;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.filter-btn:hover { border-color: var(--paper); transform: translateY(-1px); }
.filter-btn:active { transform: translateY(0) scale(.97); }
.filter-btn.is-active { background: var(--accent-bright); border-color: var(--accent-bright); color: #FFF8F0; }
.wall {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.wall-card {
  position: relative;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}
.wall-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.wall-card.is-hidden { display: none; }
.wall-card.sample { border-style: dashed; border-color: var(--accent-bright); }
.sample-tag {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}
.wall-nick { margin: 0 0 10px; font-family: var(--font-display); font-size: 19px; font-weight: 600; }
.wall-badges { margin: 0 0 10px; }
.badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}
.badge-morning { background: #F3E3C8; color: #7A5410; }
.badge-map { background: #DCE8DC; color: var(--green); }
.badge-activity { background: var(--accent-soft); color: var(--accent); }
.badge-rollcall { background: #E3E6EA; color: #33414F; }
.wall-meta, .wall-streak { margin: 0; font-size: 14.5px; color: var(--ink-2); }
.wall-reward { margin: 10px 0 0; font-size: 14.5px; font-weight: 700; color: var(--accent); }
.wall-empty { margin: 0; padding: 28px; text-align: center; color: rgba(246, 242, 232, .85); border: 1px dashed rgba(246, 242, 232, .4); border-radius: var(--radius); }
.checkin-note { margin: 18px 0 0; font-size: 13.5px; color: rgba(246, 242, 232, .66); }

.map-block { margin-top: 48px; }
.map-block .block-title { color: var(--paper); }
.map-sub { margin: -8px 0 18px; color: rgba(246, 242, 232, .72); font-size: 14.5px; }
.map-wrap {
  padding: 20px;
  border: 1px solid rgba(246, 242, 232, .22);
  border-radius: var(--radius);
  background: rgba(246, 242, 232, .05);
}
.nj-map { width: 100%; height: auto; }
.map-bg { fill: #1A3A28; }
.map-river { stroke: #7FA8C9; stroke-width: 7; opacity: .75; stroke-linecap: round; }
.map-river-2 { stroke-width: 5; opacity: .5; }
.map-road { stroke: rgba(246, 242, 232, .28); stroke-width: 2; stroke-dasharray: 7 6; }
.map-label { fill: rgba(246, 242, 232, .55); font-size: 13px; font-family: var(--font-body); }
.pin { cursor: pointer; }
.pin-dot { fill: var(--accent-bright); stroke: #FFF8F0; stroke-width: 2; }
.pin-pulse {
  fill: none;
  stroke: var(--accent-bright);
  stroke-width: 2;
  opacity: .8;
  transform-box: fill-box;
  transform-origin: center;
  animation: pulse 2.4s var(--ease) infinite;
}
.pin-label {
  fill: var(--paper);
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-body);
}
@keyframes pulse {
  0% { transform: scale(.55); opacity: .9; }
  70% { transform: scale(1.5); opacity: 0; }
  100% { transform: scale(1.5); opacity: 0; }
}
.map-status { margin: 14px 0 0; font-size: 14.5px; color: rgba(246, 242, 232, .85); }
.map-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.map-chip {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(246, 242, 232, .4);
  background: transparent;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 13.5px;
  cursor: pointer;
  transition: background-color .2s var(--ease), transform .2s var(--ease);
}
.map-chip:hover { background: rgba(246, 242, 232, .14); transform: translateY(-1px); }
.map-chip.is-active { background: var(--accent-bright); border-color: var(--accent-bright); }

.star-block {
  margin-top: 40px;
  padding: 24px 26px;
  border-radius: var(--radius);
  border: 1px solid rgba(246, 242, 232, .22);
  background: rgba(246, 242, 232, .06);
}
.star-block .block-title { color: var(--paper); margin-bottom: 6px; }
.star-block p { margin: 0; color: rgba(246, 242, 232, .82); }

/* ---------- Branch ---------- */
.pillars {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-top: 2px solid var(--green);
  border-bottom: 1px solid var(--line);
  margin-bottom: 40px;
}
.pillar { padding: 24px 20px; }
.pillar + .pillar { border-left: 1px solid var(--line); }
.pillar h3 { margin: 0 0 8px; font-size: 20px; font-weight: 600; color: var(--green); }
.pillar p { margin: 0; font-size: 15px; color: var(--ink-2); }
.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.gallery figure { margin: 0; }
.gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.gallery figure:hover img { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.gallery figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); }

/* ---------- Admin ---------- */
.admin { padding-top: 0; }
.admin-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 36px;
  border-radius: var(--radius);
  background: var(--green);
  color: var(--paper);
}
.admin-panel .section-title { color: var(--paper); margin-bottom: 4px; }
.admin-panel p { margin: 0; color: rgba(246, 242, 232, .82); }
.admin-dialog {
  max-width: min(440px, 92vw);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow-lift);
}
.admin-dialog::backdrop { background: rgba(16, 35, 26, .55); }
.admin-dialog h3 { margin: 0 0 10px; font-size: 22px; }
.admin-dialog p { margin: 0 0 20px; color: var(--ink-2); }

/* ---------- Footer ---------- */
.site-footer {
  padding: 36px 0 44px;
  background: var(--green-deep);
  color: rgba(246, 242, 232, .85);
}
.footer-inner { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 24px; }
.footer-inner p { margin: 0; }
.footer-inner strong { color: var(--paper); font-size: 17px; }
.footer-note { font-size: 13.5px; color: rgba(246, 242, 232, .6); }
.to-top { margin-left: auto; color: var(--paper); font-size: 14px; }

/* ---------- Reveal animations ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-line {
  display: block;
  opacity: 0;
  transform: translateY(26px);
  animation: line-in .8s var(--ease) forwards;
}
.reveal-line:nth-child(1) { animation-delay: .05s; }
.reveal-line:nth-child(2) { animation-delay: .16s; }
.reveal-line:nth-child(3) { animation-delay: .28s; }
.reveal-line:nth-child(4) { animation-delay: .4s; }
.hero-actions.reveal-line { animation-delay: .5s; }
@keyframes line-in { to { opacity: 1; transform: translateY(0); } }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  section { padding: 64px 0; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gpa-grid { grid-template-columns: minmax(0, 1fr); }
  .wall { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pillar:nth-child(3) { border-left: 0; }
  .pillar:nth-child(n+3) { border-top: 1px solid var(--line); }
  .gallery { grid-template-columns: minmax(0, 1fr); }
  .gallery img { aspect-ratio: 16 / 10; }
  .hero-scroll { display: none; }
}
@media (max-width: 560px) {
  .wrap { width: calc(100% - 32px); }
  .site-nav a { padding: 8px 9px; font-size: 13.5px; }
  .brand-text span { display: none; }
  .stat-grid { gap: 12px; }
  .stat { padding: 18px 14px; }
  .wall { grid-template-columns: minmax(0, 1fr); }
  .checkin-stats { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .gpa-chart, .gpa-top { padding: 20px; }
  .bar-row { grid-template-columns: 78px minmax(0, 1fr) 40px; gap: 8px; }
  .admin-panel { padding: 26px 20px; }
  .pillars { grid-template-columns: minmax(0, 1fr); }
  .pillar + .pillar { border-left: 0; border-top: 1px solid var(--line); }
  .hero { min-height: 88vh; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal, .reveal-line { opacity: 1; transform: none; }
  .pin-pulse { animation: none; opacity: 0; }
  .hero-scroll span { animation: none; }
  .bar-fill { transform: scaleX(1); }
}
