/* =========================================================
   小学 · 永远在课间
   明亮 / 手账贴纸风：奶油纸、蜡笔色、歪着贴的照片
   ========================================================= */

:root {
  --cream: #fff8e8;
  --paper: #fffdf7;
  --ink: #2f2a26;
  --muted: #7a6f63;
  --sky: #d9f1ff;
  --sun: #ffc93c;
  --coral: #ff7a6b;
  --mint: #8fd9b6;
  --blue: #4a9be8;
  --line: #f0e3c8;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --pad: clamp(1.2rem, 5vw, 4.5rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.85;
  background:
    radial-gradient(1200px 600px at 80% -10%, #ffe9a8 0%, transparent 60%),
    radial-gradient(900px 500px at 0% 10%, #cdeaff 0%, transparent 55%),
    linear-gradient(180deg, var(--sky) 0%, var(--cream) 38%, var(--cream) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.is-locked {
  overflow: hidden;
}

#confetti {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.75;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 900;
  letter-spacing: 0.01em;
  line-height: 1.1;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}

::selection {
  background: var(--sun);
  color: var(--ink);
}

/* ---------------- 顶栏 ---------------- */

.bar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem var(--pad);
  background: rgba(255, 252, 243, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 2px dashed rgba(47, 42, 38, 0.1);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 900;
  font-size: 1.1rem;
  letter-spacing: 0.06em;
}

.logo__dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 0 0 4px rgba(255, 201, 60, 0.28);
}

.bar__nav {
  display: flex;
  gap: 0.4rem;
}

.bar__nav a {
  padding: 0.4em 1em;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  transition: background-color 0.3s, color 0.3s;
}

.bar__nav a:hover {
  background: #fff;
  color: var(--ink);
}

.bar__count {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--muted);
  padding: 0.35em 0.9em;
  border-radius: 999px;
  background: #fff;
  border: 2px solid var(--line);
}

.bar__count b {
  color: var(--coral);
}

/* ---------------- 开头 ---------------- */

.hero {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(1.6rem, 4vw, 4rem);
  align-items: center;
  max-width: 1240px;
  margin-inline: auto;
  padding: clamp(2.6rem, 6vw, 5rem) var(--pad) clamp(2.4rem, 6vw, 4.5rem);
}

.pill {
  display: inline-block;
  padding: 0.35em 1em;
  border-radius: 999px;
  background: #fff;
  border: 2px solid var(--line);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.hero h1 {
  margin: 0.5rem 0 0;
  font-size: clamp(3.2rem, 10vw, 7rem);
  line-height: 0.98;
  letter-spacing: -0.01em;
  text-shadow: 0 6px 0 #fff, 0 10px 22px rgba(47, 42, 38, 0.12);
}

.hl {
  position: relative;
  display: inline-block;
  color: var(--coral);
  transform: rotate(-2deg);
}

.squiggle {
  display: block;
  width: min(300px, 60%);
  height: 18px;
  margin: 0.4rem 0 1rem 0.2rem;
  color: var(--sun);
}

.hero__lead {
  max-width: 30ch;
  color: var(--muted);
  font-weight: 600;
  font-size: clamp(0.98rem, 0.5vw + 0.88rem, 1.1rem);
  line-height: 1.95;
}

.hero__btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.6rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.85em 1.6em;
  border-radius: 999px;
  font-weight: 900;
  font-size: 0.9rem;
  border: 2px solid transparent;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease),
    background-color 0.3s;
}

.btn--sun {
  background: var(--sun);
  color: #4a3700;
  box-shadow: 0 8px 0 #e0a800;
}

.btn--sun:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 0 #e0a800;
}

.btn--ghost {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}

.btn--ghost:hover {
  transform: translateY(-2px);
  background: #fffdf7;
}

/* 贴纸照片 */

.hero__stickers {
  position: relative;
  min-height: clamp(320px, 46vw, 520px);
}

.sticker {
  position: absolute;
  margin: 0;
  padding: 10px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 20px 36px -18px rgba(47, 42, 38, 0.45);
  overflow: hidden;
}

.sticker img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

.sticker--a {
  width: 46%;
  aspect-ratio: 3 / 4;
  left: 2%;
  top: 4%;
  transform: rotate(-7deg);
  z-index: 3;
}

.sticker--b {
  width: 48%;
  aspect-ratio: 4 / 3;
  right: 0;
  top: 34%;
  transform: rotate(6deg);
  z-index: 4;
}

.sticker--c {
  width: 38%;
  aspect-ratio: 3 / 4;
  left: 18%;
  bottom: 0;
  transform: rotate(9deg);
  z-index: 2;
}

.sticker:hover {
  z-index: 9;
  transform: rotate(0) scale(1.03);
  transition: transform 0.5s var(--ease);
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(10px);
  z-index: 0;
}

.blob--sun {
  width: 120px;
  height: 120px;
  right: 6%;
  top: 6%;
  background: radial-gradient(circle at 35% 30%, #ffe9a8, #ffc93c);
  opacity: 0.85;
}

.blob--mint {
  width: 90px;
  height: 90px;
  left: 0;
  bottom: 12%;
  background: radial-gradient(circle at 35% 30%, #d9fff0, #8fd9b6);
  opacity: 0.9;
}

/* ---------------- 六年 ---------------- */

.years {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin-inline: auto;
  padding: clamp(2.4rem, 6vw, 4.5rem) var(--pad);
}

.years__head {
  margin-bottom: clamp(1.4rem, 3vw, 2.2rem);
}

.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  color: var(--blue);
  text-transform: uppercase;
}

.years h2 {
  margin-top: 0.3rem;
  font-size: clamp(1.9rem, 4.6vw, 3.2rem);
}

.mark {
  position: relative;
  white-space: nowrap;
}

.mark::after {
  content: "";
  position: absolute;
  left: -2%;
  right: -2%;
  bottom: 0.08em;
  height: 0.32em;
  background: var(--sun);
  opacity: 0.55;
  border-radius: 99px;
  z-index: -1;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2.4vw, 1.8rem);
}

.card {
  padding: 0.9rem 0.9rem 1.4rem;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 18px 34px -24px rgba(47, 42, 38, 0.45);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}

.card:nth-child(1) {
  transform: rotate(-1.2deg);
}
.card:nth-child(2) {
  transform: rotate(1.4deg);
}
.card:nth-child(3) {
  transform: rotate(-0.8deg);
}

.card:hover {
  transform: rotate(0) translateY(-4px);
  box-shadow: 0 26px 44px -26px rgba(47, 42, 38, 0.5);
}

.card__photo {
  margin: 0 0 1rem;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--line);
}

.card__photo--tall {
  aspect-ratio: 4 / 5;
}

.card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.3rem;
}

.card p {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

/* ---------------- 照片墙 ---------------- */

.wall {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin-inline: auto;
  padding: clamp(2rem, 5vw, 4rem) var(--pad) clamp(3rem, 7vw, 6rem);
}

.wall__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: clamp(1.4rem, 3vw, 2.2rem);
}

.wall__head h2 {
  margin-top: 0.3rem;
  font-size: clamp(1.9rem, 4.6vw, 3.2rem);
}

.wall__note {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  text-align: right;
}

.wall__note code {
  padding: 0.1em 0.4em;
  border-radius: 6px;
  background: #fff;
  border: 1px solid var(--line);
}

.wall__grid {
  columns: 3;
  column-gap: clamp(0.8rem, 1.8vw, 1.3rem);
}

.photo {
  position: relative;
  display: inline-block;
  width: 100%;
  margin: 0 0 clamp(0.8rem, 1.8vw, 1.3rem);
  break-inside: avoid;
  padding: 8px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 14px 26px -16px rgba(47, 42, 38, 0.45);
  transform: rotate(var(--tilt, 0deg));
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
  cursor: zoom-in;
  -webkit-tap-highlight-color: transparent;
}

.photo img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  background: var(--line);
}

.photo__no {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  padding: 0.1em 0.5em;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  font-size: 0.6rem;
  font-weight: 900;
  font-style: normal;
  color: var(--muted);
}

.photo:hover {
  transform: rotate(0) translateY(-4px) scale(1.015);
  box-shadow: 0 24px 40px -20px rgba(47, 42, 38, 0.55);
}

.empty {
  padding: 3.5rem 0;
  text-align: center;
  font-weight: 700;
  color: var(--muted);
}

/* ---------------- 页脚 ---------------- */

.foot {
  position: relative;
  z-index: 1;
  padding: clamp(2rem, 4vw, 3rem) var(--pad) 2.2rem;
  background: rgba(255, 253, 247, 0.7);
  border-top: 2px dashed rgba(47, 42, 38, 0.12);
}

.foot__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid rgba(47, 42, 38, 0.08);
}

.foot__brand {
  font-weight: 900;
  letter-spacing: 0.06em;
}

.foot__links {
  display: flex;
  gap: 1.2rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
}

.foot__links a:hover {
  color: var(--coral);
}

.foot__count {
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--muted);
}

.foot__count b {
  color: var(--coral);
}

.foot__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.9rem;
  padding-top: 1rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
}

.foot__legal a:hover {
  color: var(--coral);
}

.police {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
}

.police img {
  height: 18px;
  width: auto;
}

/* ---------------- 共享灯箱主题（奶油贴纸） ---------------- */

.lb {
  --lb-bg: rgba(255, 248, 232, 0.97);
  --lb-blur: blur(10px);
  --lb-ink: var(--ink);
  --lb-muted: rgba(47, 42, 38, 0.55);
  --lb-accent: var(--coral);
  --lb-accent-ink: #fff;
  --lb-line: rgba(47, 42, 38, 0.16);
  --lb-btn: #fff;
  --lb-radius: 50%;
  --lb-btn-size: 44px;
  --lb-img-radius: 18px;
  --lb-shadow: 0 30px 60px -30px rgba(47, 42, 38, 0.5);
  --lb-font: var(--sans);
}

.lb__count {
  font-weight: 900;
  letter-spacing: 0.12em;
}

.lb__img {
  border: 10px solid #fff;
}

/* ---------------- 图片槽位 ---------------- */

[data-slot] {
  background: #fff;
  overflow: hidden;
}

[data-slot] img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

[data-slot].is-empty {
  display: none;
}

/* ---------------- 响应式 ---------------- */

@media (max-width: 1080px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .hero__stickers {
    min-height: 380px;
    max-width: 560px;
  }
  .bar__nav {
    display: none;
  }
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cards .card:last-child {
    grid-column: 1 / -1;
  }
  .wall__grid {
    columns: 3;
  }
}

@media (max-width: 720px) {
  .bar {
    padding: 0.7rem 1.1rem;
  }
  .hero {
    padding: 1.8rem 1.1rem 2rem;
  }
  .hero__stickers {
    min-height: 330px;
  }
  .squiggle {
    height: 12px;
  }
  .years,
  .wall {
    padding-inline: 1.1rem;
  }
  .cards {
    grid-template-columns: 1fr;
    gap: 1.1rem;
  }
  .cards .card:last-child {
    grid-column: auto;
  }
  .wall__grid {
    columns: 2;
    column-gap: 0.7rem;
  }
  .photo {
    padding: 6px;
    border-radius: 12px;
  }
  .wall__head {
    flex-direction: column;
    align-items: flex-start;
  }
  .wall__note {
    text-align: left;
  }
  .foot {
    padding-inline: 1.1rem;
  }
}

/* ---------------- 下载弹窗（共享组件） ---------------- */

.foot__dl {
  font: inherit;
  font-weight: 700;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.foot__dl:hover {
  color: var(--coral);
}

.dlm {
  --dlm-bg: var(--paper);
  --dlm-ink: var(--ink);
  --dlm-muted: var(--muted);
  --dlm-line: var(--line);
  --dlm-accent: var(--coral);
  --dlm-accent-ink: #fff;
  --dlm-hover: #fff8e8;
  --dlm-radius: 24px;
  --dlm-font: var(--sans);
  --dlm-backdrop: rgba(255, 248, 232, 0.78);
}
