* {
  box-sizing:border-box
}

:root {
  --bg:#e9e2d7;
  --paper:#f7f2e8;
  --paper2:#efe6d7;
  --ink:#2b2926;
  --muted:#777068;
  --line:rgba(43,41,38,.14);
  --accent:#9e4338;
  --shadow:0 18px 50px rgba(47,39,31,.10)
}

html,body {
  margin:0;
  min-height:100%;
  background:var(--bg);
  color:var(--ink);
  font-family:"Noto Serif SC","Songti SC","STSong","Microsoft YaHei",serif
}

body {
  min-height:100vh
}

button {
  font:inherit;
  -webkit-tap-highlight-color:transparent
}

body.modal-open {
  overflow:hidden
}



/* ===== 翻开青春相册封面 ===== */
.cover-gate {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 10%, rgba(255,255,255,.72), transparent 28%),
    linear-gradient(145deg, #ece4d8, #d8ccbb);
}

.cover-gate[hidden] {
  display: none !important;
}

.cover-gate-card {
  width: min(760px, 100%);
  padding: 48px 32px 42px;
  text-align: center;
}

.cover-gate-kicker {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .20em;
}

.cover-gate-card h1 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 500;
  letter-spacing: .08em;
  white-space: nowrap;
}

.cover-gate-card p {
  margin: 0 0 34px;
  color: var(--muted);
  font-size: 14px;
}

.primary-btn {
  min-width: 180px;
  min-height: 50px;
  padding: 0 26px;
  border: 1px solid rgba(43,41,38,.22);
  border-radius: 999px;
  background: rgba(247,242,232,.82);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(47,39,31,.08);
  transition:
    background .2s ease,
    transform .18s ease,
    box-shadow .2s ease;
}

.primary-btn:hover {
  background: rgba(255,252,246,.96);
  box-shadow: 0 10px 28px rgba(47,39,31,.12);
  transform: translateY(-1px);
}

.primary-btn:active {
  transform: translateY(1px);
}

@media (max-width: 760px) {
  .cover-gate-card {
    padding: 38px 20px 34px;
  }

  .cover-gate-card h1 {
    font-size: 28px;
    letter-spacing: .04em;
    white-space: nowrap;
  }
}

/* ===== 页面整体 ===== */
.app-shell {
  min-height:100vh;
  background:radial-gradient(circle at 18% 6%,rgba(255,255,255,.64),transparent 26%),linear-gradient(145deg,#ece4d8,#ddd1c1)
}

.topbar {
  width:min(1120px,calc(100% - 32px));
  margin:0 auto;
  padding:34px 0 20px;
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:20px;
  border-bottom:1px solid var(--line)
}

.eyebrow {
  letter-spacing:.18em;
  text-transform:uppercase;
  font-size:12px;
  color:var(--muted)
}

.topbar h1 {
  margin:10px 0 5px;
  font-size:clamp(26px,4vw,40px);
  font-weight:500;
  letter-spacing:.08em
}

.topbar p {
  margin:0;
  color:var(--muted);
  font-size:14px
}

/* ===== 顶部搜索 ===== */
.search-toggle {
  width:44px;
  height:44px;
  flex:0 0 auto;
  display:grid;
  place-items:center;
  border:0;
  border-radius:50%;
  background:transparent;
  color:var(--ink);
  cursor:pointer
}

.search-toggle:hover {
  background:rgba(43,41,38,.05)
}

.search-toggle svg {
  width:22px;
  height:22px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round
}

.search-wrap {
  width:min(1120px,calc(100% - 32px));
  margin:14px auto 0
}

.search-wrap input {
  width:100%;
  min-height:48px;
  border:1px solid var(--line);
  border-radius:14px;
  padding:0 16px;
  background:#fffdf8;
  color:var(--ink);
  font:inherit;
  outline:none;
  box-shadow:0 8px 24px rgba(47,39,31,.05)
}

.search-wrap input:focus {
  border-color:rgba(158,67,56,.38);
  box-shadow:0 0 0 3px rgba(158,67,56,.08)
}


main {
  padding-bottom:60px
}

/* ===== 顶部轮播区 ===== */
.hero-card {
  width:min(1120px,calc(100% - 32px));
  margin:28px auto 0;
  border:12px solid rgba(255,255,255,.50);
  background:#fffaf1;
  box-shadow:var(--shadow);
  overflow:hidden
}

.memory-carousel {
  position:relative;
  background:#eee8de;
  overflow:hidden
}

.memory-stage {
  position:relative;
  width:100%;
  aspect-ratio:1605/980;
  display:grid;
  place-items:center;
  overflow:hidden
}

.memory-slide {
  position:absolute;
  inset:0;
  opacity:0;
  pointer-events:none;
  transition:opacity .75s ease;
  display:grid;
  place-items:center;
  background:#eee8de
}

.memory-slide.active {
  opacity:1;
  pointer-events:auto
}

.memory-slide img,.memory-slide video {
  width:100%;
  height:100%;
  display:block;
  object-fit:contain
}

.memory-slide video {
  background:#111
}

.memory-caption {
  position:absolute;
  left:50%;
  bottom:14px;
  transform:translateX(-50%);
  width:max-content;
  max-width:calc(100% - 120px);
  padding:8px 13px;
  border:1px solid rgba(255,255,255,.12);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.16),
    0 2px 8px rgba(0,0,0,.08);
  border-radius:999px;
  background:rgba(28,24,21,.12);
  color:#fff;
  font-size:20px;
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px)
}

.memory-arrow {
  position:absolute;
  top:50%;
  z-index:4;
  width:48px;
  height:48px;
  margin-top:-24px;
  border:1px solid rgba(255,255,255,.56);
  border-radius:50%;
  background:rgba(247,242,232,.40);
  color:var(--ink);
  font-size:30px;
  cursor:pointer;
  box-shadow:0 4px 16px rgba(35,29,24,.12);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  transition: 
    background .2s ease,
    transform .2s ease,
    box-shadow .2s ease;
}

.memory-arrow:hover {
  background: rgba(247, 242, 232, .78);
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(35, 29, 24, .18);
}

.memory-prev {
  left:14px
}

.memory-next {
  right:14px
}

.memory-dots {
  min-height:36px;
  padding:12px 16px 6px;
  display:flex;
  justify-content:center;
  gap:8px
}

.memory-dot {
  width:8px;
  height:8px;
  padding:0;
  border:0;
  border-radius:50%;
  background:rgba(43,41,38,.22)
}

.memory-dot.active {
  background:var(--accent);
  transform:scale(1.18)
}

.hero-note {
  padding:18px 24px 26px;
  text-align:center;
  color:var(--muted);
  font-size:16px;
  line-height:1.8
}

.audio-title {
  margin:0 0 12px;
  text-align:center;
  color:var(--muted);
  font-size:16px;
  letter-spacing:.06em
}

.class-audio {
  display:block;
  width:calc(100% - 48px);
  margin:0 auto 26px
}

/* ===== 班级影像列表 ===== */
.gallery-section {
  width:min(1120px,calc(100% - 32px));
  margin:30px auto 0
}

.section-heading {
  margin-bottom:14px;
  display:flex;
  justify-content:space-between;
  align-items:baseline
}

.section-heading span {
  font-size:20px;
  font-weight:600
}

.section-heading small {
  color:var(--muted)
}

.album-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px
}

.album-card {
  border:1px solid var(--line);
  border-radius:16px;
  background:#fffaf2;
  padding:12px;
  text-align:left;
  cursor:pointer;
  color:var(--ink);
  appearance:none;
  -webkit-appearance:none;
  transition:.18s
}

.album-card:hover {
  transform:translateY(-2px);
  box-shadow:0 12px 28px rgba(45,36,28,.08)
}

.album-thumb {
  width:100%;
  aspect-ratio:1605/980;
  overflow:hidden;
  border-radius:11px;
  background:#eee8de
}

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

.album-card-title {
  margin-top:11px;
  font-size:17px;
  font-weight:600
}

.album-card-meta {
  margin-top:4px;
  color:var(--muted);
  font-size:12px
}

/* ===== 照片详情弹窗 ===== */
.photo-modal {
  position:fixed;
  inset:0;
  z-index:1000;
  display:none;
  align-items:center;
  justify-content:center;
  padding: 8px 28px 28px;
}

.photo-modal.active {
  display:flex
}

.photo-modal-backdrop {
  position:absolute;
  inset:0;
  background:rgba(36,31,27,.54);
  backdrop-filter:blur(5px);
  -webkit-backdrop-filter:blur(5px)
}

.photo-modal-card {
  position:relative;
  z-index:1;
  width:min(1040px,calc(100% - 24px));
  max-height:calc(100vh - 56px);
  max-height:calc(100dvh - 56px);
  overflow-y:auto;
  padding:28px;
  background:var(--paper);
  border:1px solid rgba(43,41,38,.12);
  box-shadow:0 28px 80px rgba(35,29,24,.26)
}

.photo-modal-close {
  position:absolute;
  top:10px;
  right:12px;
  width:44px;
  height:44px;
  border:0;
  border-radius:50%;
  background:transparent;
  color:var(--ink);
  font-size:30px;
  cursor:pointer
}


.photo-modal-topnav {
  position:absolute;
  top:60px;
  right:30px;
  z-index:2;
  display:flex;
  align-items:center;
  gap:18px;
}

.photo-modal-topnav button {
  min-height:30px;
  padding:0 4px;
  border:0;
  background:transparent;
  color:var(--ink);
  font-size:14px;
  cursor:pointer;
  opacity:.86;
  transition:opacity .2s ease;
}

.photo-modal-topnav button:hover {
  opacity:1;
}

.photo-modal-heading {
  padding:2px 250px 18px 0;
  border-bottom:1px solid var(--line)
}

.photo-modal-heading h2 {
  margin:4px 0 0;
  font-size:26px;
  font-weight:500
}

.photo-viewer {
  margin-top:22px;
  border:10px solid rgba(255,255,255,.56);
  background:#eee8de;
  box-shadow:var(--shadow);
  overflow:hidden
}

.photo-viewer img {
  width:100%;
  height:auto;
  display:block
}

.photo-meta-grid {
  margin:18px 0;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px
}

.photo-meta-item {
  padding:14px 16px;
  border:1px solid var(--line);
  background:#fffaf2
}

.meta-label,.people-label {
  color:var(--muted);
  font-size:12px;
  letter-spacing:.08em
}

.meta-value {
  margin-top:6px;
  font-size:16px
}

.people-paper {
  min-height:100px;
  padding:22px;
  border:1px solid rgba(90,73,56,.13);
  background:linear-gradient(#fbf6ec,#f5eddf);
  box-shadow:inset 0 0 0 6px rgba(255,255,255,.24)
}

.people-text {
  margin-top:15px;
  font-size:17px;
  line-height:1.95
}

.people-paper + .people-paper {
  margin-top:14px
}

.cusdis-divider {
  height:1px;
  margin:20px 0 16px;
  background:rgba(90,73,56,.13)
}

.cusdis-heading {
  color:var(--muted);
  font-size:12px;
  letter-spacing:.08em
}

.cusdis-mount {
  margin-top:10px;
  color:var(--ink)
}

.cusdis-mount iframe {
  display:block;
  width:100%!important;
  height:260px;
  max-height:720px;
  border:0;
  color-scheme:light;
  opacity:0;
  transition:opacity .18s ease
}

.cusdis-mount iframe.cusdis-loaded {
  opacity:.9
}

.cusdis-loading,.cusdis-error {
  padding:20px 0;
  color:var(--muted);
  font-size:14px
}

.photo-modal-nav {
  margin-top:20px;
  padding-top:15px;
  border-top:1px solid var(--line);
  display:flex;
  justify-content:space-between
}

.photo-modal-nav button {
  min-height:44px;
  border:0;
  background:transparent;
  color:var(--ink);
  padding:0 8px;
  cursor:pointer
}

.empty-state {
  grid-column:1/-1;
  padding:48px 0;
  text-align:center;
  color:var(--muted)
}


/* ===== 页面版权信息 ===== */
.site-footer {
  width:min(1120px,calc(100% - 32px));
  margin:52px auto 0;
  padding:24px 0 30px;
  border-top:1px solid var(--line);
  text-align:center;
  color:var(--muted);
  font-size:13px;
  line-height:1.8
}

.site-footer small {
  display:block;
  margin-top:4px;
  font-size:11px;
  letter-spacing:.12em
}


/* ===== 手机端适配 ===== */
@media(max-width:760px) {
  .topbar,.hero-card,.gallery-section,.search-wrap,.site-footer {
    width:min(100% - 22px,1120px)
  }

  .topbar {
    padding-top:24px
  }

  .topbar h1 {
    font-size:26px
  }


  .hero-card {
    border-width:8px
  }

  .memory-arrow {
    width:40px;
    height:40px;
    margin-top:-20px;
    font-size:27px
  }

  .memory-prev {
    left:8px
  }

  .memory-next {
    right:8px
  }

  .memory-caption {
    left:50%;
    bottom:9px;
    transform:translateX(-50%);
    max-width:calc(100% - 88px);
    padding:6px 10px;
    font-size:12px
  }

  .album-grid {
    grid-template-columns:1fr;
    gap:14px
  }

  .photo-modal {
    padding:8px 12px 12px
  }

  .photo-modal-card {
    width:100%;
    max-height:calc(100vh - 32px);
    max-height:calc(100dvh - 32px);
    padding:20px 14px 18px
  }

  .photo-modal-heading h2 {
    font-size:22px
  }


  .photo-modal-topnav {
    top:56px;
    right:16px;
    gap:8px;
  }

  .photo-modal-topnav button {
    font-size:12px;
    padding:0 2px;
  }

  .photo-modal-heading {
    padding-right:190px;
  }

  .photo-viewer {
    margin-top:18px;
    border-width:7px
  }

  .photo-meta-grid {
    grid-template-columns:1fr;
    gap:10px
  }

  .people-paper {
    min-height:90px;
    padding:18px
  }

  .people-text {
    font-size:15px
  }

  .search-toggle {
    width:40px;
    height:40px
  }

  .search-toggle svg {
    width:21px;
    height:21px
  }

  .class-audio {
    width:calc(100% - 28px);
    margin-bottom:20px
  }

  .audio-title {
    font-size:14px
  }

  .site-footer {
    margin-top:38px;
    padding-bottom:24px
  }

}
