﻿/* 致青春 · 黄昏胶片 + 拍立得照片堆叠 + 砖墙留言
   设计语言：老电影胶片颗粒 / 手写笔迹 / 做旧纸张 / 印泥印章
   全部组件 class 名保持不变，仅做质感升级 */

:root {
  --ink: #2e2a24;          /* 墨色 */
  --ink-soft: #6f6758;     /* 淡墨 */
  --stamp: #b23a2e;        /* 印泥红（低饱和） */
  --blue: #31557a;         /* 蓝墨水 */
  --paper: #f3ead8;        /* 老纸 */
  --paper-bright: #fbf6ea; /* 亮纸 */
  --gold: #c9a35f;         /* 昏黄 */
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }
body { font-family: "Kaiti SC", "STKaiti", "KaiTi", serif; color: var(--ink); }

/* 全局胶片颗粒（覆盖全屏的细噪点，不影响交互） */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 9998; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.03; mix-blend-mode: soft-light;
}

#petals { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 100; pointer-events: none; }

.snap-container { height: 100vh; overflow-y: scroll; scroll-snap-type: y mandatory; scroll-behavior: smooth; }

.screen { height: 100vh; scroll-snap-align: start; scroll-snap-stop: always; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px; overflow: hidden; }
.screen > * { position: relative; z-index: 2; }
/* 屏间平滑过渡：远离视口时轻微模糊 + 收缩 + 溶解，避免生硬拼接 */
.screen { --trans: 1; transition: opacity 0.35s ease; box-shadow: inset 0 0 0 100vmax rgba(18,13,8, calc(var(--trans) * 0.42)); }
.screen > * { opacity: calc(1 - var(--trans) * 0.25); transform: scale(calc(1 - var(--trans) * 0.03)); filter: blur(calc(var(--trans) * 3px)); transition: opacity 0.3s ease, transform 0.3s ease, filter 0.3s ease; }
/* 当前屏内容完全清晰 */
.screen.active > * { opacity: 1; transform: scale(1); filter: blur(0); }
/* 相邻屏边缘色块融合，消除拼接缝（背景层之上、内容之下） */
.screen-hero::before { content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 90px; z-index: 1; pointer-events: none; background: linear-gradient(180deg, transparent 0%, rgba(230,218,194,0.55) 100%); }
.screen-album::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 70px; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(18,13,8,0.6) 0%, transparent 100%); }
.screen-album::after { content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 80px; z-index: 1; pointer-events: none; background: linear-gradient(180deg, transparent 0%, rgba(168,90,54,0.6) 100%); }
.screen-board::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 70px; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(168,90,54,0.55) 0%, transparent 100%); }

/* ===== 屏 1 · 黄昏校园（胶片黄昏） ===== */
.screen-hero {
  background:
    radial-gradient(ellipse at 50% 38%, rgba(255,157,92,0.5) 0%, transparent 46%),
    linear-gradient(180deg, #17121c 0%, #241b28 12%, #3d2c26 28%, #6b4a2f 44%, #b97c3d 60%, #e09c45 74%, #f0c47f 88%, #f8ecd4 100%);
}
.screen-hero::after { content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 38%; background: linear-gradient(180deg, transparent 0%, rgba(20,12,6,0.42) 62%, rgba(20,12,6,0.62) 100%); z-index: 1; pointer-events: none; }

.sun { position: absolute; top: 18%; right: 10%; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, #fffbe8 0%, #ffcf87 28%, #ff9d5c 52%, transparent 72%); z-index: 1; animation: sunGlow 5s ease-in-out infinite; }
@keyframes sunGlow { 0%,100% { box-shadow: 0 0 46px 16px rgba(255,180,100,0.32); } 50% { box-shadow: 0 0 74px 36px rgba(255,180,100,0.5); } }

.cloud { position: absolute; z-index: 1; background: rgba(255,255,255,0.13); border-radius: 50px; filter: blur(2px); }
.cloud::before,.cloud::after { content: ""; position: absolute; background: inherit; border-radius: 50%; }
.cloud-1 { top: 14%; left: 8%; width: 120px; height: 34px; animation: drift 28s linear infinite; }
.cloud-1::before { width: 56px; height: 56px; top: -26px; left: 18px; }
.cloud-1::after { width: 44px; height: 44px; top: -18px; right: 16px; }
.cloud-2 { top: 30%; right: 10%; width: 90px; height: 28px; animation: drift 40s linear infinite reverse; opacity: 0.6; }
.cloud-2::before { width: 44px; height: 44px; top: -20px; left: 14px; }
.cloud-2::after { width: 34px; height: 34px; top: -14px; right: 12px; }
@keyframes drift { from { transform: translateX(-60px); } to { transform: translateX(calc(100vw + 80px)); } }

.school { display: flex; flex-direction: column; align-items: center; margin-bottom: 16px; }
.badge { height: 86px; width: auto; object-fit: contain; margin-bottom: 10px; mix-blend-mode: multiply; animation: badgeIn 0.8s cubic-bezier(0.34,1.56,0.64,1) both; opacity: 0.98; background: transparent; position: relative; z-index: 9999; }
.badge.hidden { display: none; }
@keyframes badgeIn { from { opacity: 0; transform: scale(0.4) rotate(-20deg); } to { opacity: 0.94; transform: scale(1) rotate(0); } }
.school-name { font-size: 18px; font-weight: 500; letter-spacing: 4px; color: rgba(255,255,255,0.88); text-shadow: 0 1px 4px rgba(0,0,0,0.4); }
.school-sub { margin-top: 5px; font-size: 13px; letter-spacing: 2px; color: rgba(255,255,255,0.62); text-shadow: 0 1px 3px rgba(0,0,0,0.3); }

.hero-title-wrap { display: flex; align-items: center; gap: 28px; margin-bottom: 24px; }
.hero-title { font-family: "Ma Shan Zheng", cursive; font-size: 112px; font-weight: 400; letter-spacing: 16px; line-height: 1.05; color: #fff; text-shadow: 1px 1px 0 rgba(0,0,0,0.18), 3px 3px 0 rgba(0,0,0,0.12), 5px 7px 14px rgba(0,0,0,0.4), 0 0 56px rgba(255,200,100,0.28); user-select: none; animation: titleIn 1s cubic-bezier(0.22,1,0.36,1) both 0.2s; }
@keyframes titleIn { from { opacity: 0; transform: translateY(40px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }

.hero-sub-vertical { display: flex; flex-direction: column; gap: 12px; writing-mode: vertical-rl; font-size: 14px; letter-spacing: 6px; color: rgba(255,255,255,0.78); text-shadow: 0 1px 4px rgba(0,0,0,0.3); border-left: 1px solid rgba(255,255,255,0.35); padding-left: 14px; animation: titleIn 1s cubic-bezier(0.22,1,0.36,1) both 0.6s; font-family: "Ma Shan Zheng", cursive; }

.hero-stamp { display: inline-block; border: 2px solid rgba(255,255,255,0.42); color: rgba(255,255,255,0.82); font-size: 15px; letter-spacing: 3px; padding: 7px 14px; transform: rotate(5deg); border-radius: 50%; font-family: Georgia, serif; margin-bottom: 20px; animation: titleIn 1s cubic-bezier(0.22,1,0.36,1) both 0.1s; }
.hero-line { font-size: 15px; color: rgba(255,255,255,0.62); font-style: italic; letter-spacing: 2px; text-shadow: 0 1px 3px rgba(0,0,0,0.3); }

.scroll-hint { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); font-size: 13px; color: rgba(255,255,255,0.55); letter-spacing: 3px; display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 2; animation: titleIn 1s ease both 1s; }
.mouse { width: 22px; height: 34px; border: 2px solid rgba(255,255,255,0.4); border-radius: 14px; position: relative; }
.mouse::before { content: ""; position: absolute; top: 5px; left: 50%; transform: translateX(-50%); width: 3px; height: 7px; background: rgba(255,255,255,0.7); border-radius: 2px; animation: wheel 1.8s ease-in-out infinite; }
@keyframes wheel { 0%,100% { transform: translate(-50%, 0); opacity: 1; } 50% { transform: translate(-50%, 8px); opacity: 0.3; } }

/* ===== 屏 2 · 堆叠照片（做旧剪贴簿） ===== */
.screen-album { justify-content: flex-start; padding: 0; overflow: hidden; }

.scrapbook-bg { position: absolute; inset: 0; z-index: 0; background:
  radial-gradient(circle at 20% 30%, rgba(160,140,110,0.16), transparent 42%),
  radial-gradient(circle at 82% 72%, rgba(140,120,95,0.13), transparent 45%),
  linear-gradient(135deg, #e6d9c2 0%, #efe3cb 30%, #e2d4bb 62%, #ece0c8 100%); }
.scrapbook-bg::before { content: ""; position: absolute; inset: 0; background-image:
  linear-gradient(rgba(80,60,30,0.045) 1px, transparent 1px),
  linear-gradient(90deg, rgba(80,60,30,0.045) 1px, transparent 1px);
  background-size: 28px 28px; }
.scrapbook-bg::after { content: ""; position: absolute; inset: 0; background:
  radial-gradient(ellipse at 15% 85%, rgba(0,0,0,0.09), transparent 42%),
  radial-gradient(ellipse at 88% 12%, rgba(0,0,0,0.07), transparent 36%),
  radial-gradient(ellipse at 50% 60%, rgba(255,245,220,0.35), transparent 65%); }

.album-inner { position: relative; z-index: 2; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px; }
.album-title { color: var(--ink); text-shadow: none; margin-bottom: 28px; position: absolute; top: 44px; z-index: 5; }
.album-title .num { background: var(--ink); color: #f3ead8; }

.screen-title { font-size: 34px; letter-spacing: 10px; display: flex; align-items: center; gap: 12px; font-family: "Ma Shan Zheng", cursive; font-weight: 400; }
.num { font-size: 14px; color: #f3ead8; background: var(--ink); padding: 4px 12px; border-radius: 2px; font-family: Georgia, serif; letter-spacing: 2px; }

.stack { position: relative; width: min(520px, 86vw); height: min(380px, 52vh); perspective: 1200px; }

/* 拍立得风格卡片（白边加厚 + 双层阴影 + 手写标题） */
.stack-card { position: absolute; inset: 0; background: var(--paper-bright); padding: 14px 14px 56px; border-radius: 2px; box-shadow:
  0 1px 2px rgba(60,40,20,0.14),
  0 6px 16px rgba(60,40,20,0.16),
  0 22px 48px rgba(60,40,20,0.14); will-change: transform, opacity; cursor: zoom-in; transition: transform 0.55s cubic-bezier(0.22,1,0.36,1), opacity 0.45s ease, box-shadow 0.3s; transform-style: preserve-3d; }
.stack-card img { width: 100%; height: calc(100% - 40px); object-fit: cover; display: block; border-radius: 1px; filter: saturate(0.9) contrast(1.02) sepia(0.08); transition: filter 0.3s, transform 0.3s; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06); }
.stack-card figcaption { position: absolute; bottom: 16px; left: 14px; right: 14px; text-align: center; font-family: "Ma Shan Zheng", cursive; font-size: 17px; color: #4a3c2c; letter-spacing: 2px; text-shadow: 0 1px 0 rgba(255,255,255,0.6); }

/* 胶带（半透明磨砂） */
.stack-card .tape { position: absolute; width: 58px; height: 18px; background: rgba(226,214,182,0.75); box-shadow: 0 1px 3px rgba(0,0,0,0.12); z-index: 3; opacity: 0.85; border-left: 1px dashed rgba(120,100,70,0.25); border-right: 1px dashed rgba(120,100,70,0.25); }
.stack-card .tape-tl { top: -7px; left: 16px; transform: rotate(-7deg); }
.stack-card .tape-tr { top: -7px; right: 16px; transform: rotate(6deg); }

/* 堆叠位置 */
.stack-card.p0 { transform: translate(0,0) rotate(0deg) scale(1); z-index: 10; }
.stack-card.p1 { transform: translate(16px,18px) rotate(2.5deg) scale(0.96); z-index: 6; }
.stack-card.p2 { transform: translate(-14px,32px) rotate(-3deg) scale(0.92); z-index: 3; opacity: 0.82; }
.stack-card.p3 { transform: translate(8px,44px) rotate(1.5deg) scale(0.88); z-index: 1; opacity: 0.45; }

/* 悬停拾起 */
.stack-card.p0:hover { transform: translate(0,-8px) rotate(0deg) scale(1.05); box-shadow: 0 2px 6px rgba(60,40,20,0.16), 0 18px 36px rgba(60,40,20,0.22), 0 34px 72px rgba(60,40,20,0.2); z-index: 20; }
.stack-card.p0:hover img { filter: saturate(1) contrast(1.02) sepia(0.03); transform: scale(1.025); }
.stack-card.p0:hover figcaption { color: #33261a; }

/* 切换飞出/飞入 */
.stack-card.out-right { transform: translate(160px,12px) rotate(14deg) scale(0.88); opacity: 0; z-index: 12; }
.stack-card.out-left { transform: translate(-160px,12px) rotate(-14deg) scale(0.88); opacity: 0; z-index: 12; }
.stack-card.in-right { animation: flyInR 0.5s cubic-bezier(0.22,1,0.36,1) both; }
@keyframes flyInR { from { transform: translate(180px,0) rotate(12deg) scale(0.92); opacity: 0.15; } to { transform: translate(0,0) rotate(0) scale(1); opacity: 1; } }
.stack-card.in-left { animation: flyInL 0.5s cubic-bezier(0.22,1,0.36,1) both; }
@keyframes flyInL { from { transform: translate(-180px,0) rotate(-12deg) scale(0.92); opacity: 0.15; } to { transform: translate(0,0) rotate(0) scale(1); opacity: 1; } }

/* 箭头 */
.arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border: 2px solid var(--ink); background: rgba(251,246,234,0.9); border-radius: 50%; font-size: 30px; color: var(--ink); cursor: pointer; z-index: 20; transition: all 0.2s; font-family: Georgia, serif; line-height: 1; box-shadow: 0 3px 10px rgba(0,0,0,0.12); }
.arrow:hover { background: var(--stamp); border-color: var(--stamp); color: #fff; transform: translateY(-50%) scale(1.08); }
.arrow:active { transform: translateY(-50%) scale(0.94); }
.arrow-left { left: max(14px, 3vw); }
.arrow-right { right: max(14px, 3vw); }
.stack-count { margin-top: 18px; font-size: 15px; color: var(--ink-soft); letter-spacing: 3px; font-family: Georgia, serif; }

.empty-tip { text-align: center; color: var(--ink-soft); font-size: 16px; padding: 50px 20px; border: 2px dashed var(--ink-soft); opacity: 0.6; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.empty-tip.light { color: rgba(255,255,255,0.85); border-color: rgba(255,255,255,0.6); }

/* ===== 灯箱（拍立得大图 + 评论） ===== */
.lightbox { position: fixed; inset: 0; z-index: 320; background: rgba(18,13,8,0.94); display: flex; flex-direction: column; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.3s; overflow-y: auto; overscroll-behavior: contain; padding: 30px 0; }
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img { max-width: 92vw; max-height: 70vh; object-fit: contain; background: var(--paper-bright); padding: 14px 14px 44px; border-radius: 2px; box-shadow: 0 1px 2px rgba(0,0,0,0.4), 0 24px 80px rgba(0,0,0,0.7); transform: scale(0.88); transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1); flex-shrink: 0; }
.lightbox.open img { transform: scale(1); }
.lightbox-cap { margin-top: 16px; color: rgba(255,255,255,0.88); font-size: 16px; letter-spacing: 3px; font-family: "Ma Shan Zheng", cursive; }
.lightbox-close { position: absolute; top: 20px; right: 28px; background: none; border: 2px solid rgba(255,255,255,0.6); color: #fff; font-size: 30px; width: 46px; height: 46px; border-radius: 50%; cursor: pointer; line-height: 1; transition: all 0.2s; }
.lightbox-close:hover { background: var(--stamp); border-color: var(--stamp); transform: rotate(90deg); }

/* ===== 屏 3 · 砖墙留言 ===== */
.screen-board { justify-content: flex-start; padding: 50px 24px 30px; overflow-y: auto; }

.brick-wall { position: absolute; inset: 0; z-index: 0; background-color: #a85a36; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='56'%3E%3Crect x='0' y='0' width='118' height='26' fill='%23b5643c'/%3E%3Crect x='120' y='0' width='118' height='26' fill='%23ad5d37'/%3E%3Crect x='-60' y='28' width='118' height='26' fill='%23a35733'/%3E%3Crect x='60' y='28' width='118' height='26' fill='%23b96840'/%3E%3Crect x='180' y='28' width='118' height='26' fill='%23ad5d37'/%3E%3C/svg%3E"); background-size: 240px 56px; }
.brick-wall::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 0 25px, rgba(0,0,0,0.38) 25px 27px, transparent 27px), linear-gradient(180deg, transparent 0 53px, rgba(0,0,0,0.3) 53px 55px, transparent 55px); background-size: 100% 56px; opacity: 0.85; }
.brick-wall::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 22%, rgba(255,255,255,0.13), transparent 62%), radial-gradient(ellipse at 50% 100%, rgba(0,0,0,0.28), transparent 55%); }

.board-inner { position: relative; z-index: 2; width: 100%; max-width: 800px; margin: 0 auto; }
.board-title { color: #fff; text-shadow: 0 2px 6px rgba(0,0,0,0.5); }
.board-title .num { background: #fff; color: #a85a36; }

.board-form { background: rgba(251,246,234,0.96); border-radius: 2px; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 1px 2px rgba(0,0,0,0.3), 0 10px 28px rgba(0,0,0,0.38); margin-bottom: 8px; transition: opacity 0.3s, transform 0.3s; }
.board-form.nailing { opacity: 0.45; transform: scale(0.97); pointer-events: none; }

.hammer-tip { background: rgba(251,246,234,0.95); color: var(--stamp); font-size: 15px; letter-spacing: 1px; padding: 10px 16px; border-radius: 2px; box-shadow: 0 4px 14px rgba(0,0,0,0.3); text-align: center; margin-bottom: 10px; animation: pulseTip 1.4s ease-in-out infinite; z-index: 5; }
.hammer-tip.hidden { display: none; }
@keyframes pulseTip { 0%,100% { transform: scale(1); } 50% { transform: scale(1.03); } }

.input { border: none; border-bottom: 1px dashed var(--ink-soft); background: transparent; padding: 8px 4px; font-size: 16px; font-family: inherit; color: var(--ink); outline: none; }
.input:focus { border-bottom-color: var(--blue); }
.textarea { min-height: 66px; resize: vertical; }
.btn-post { align-self: flex-end; background: var(--stamp); color: #fff; border: none; font-size: 15px; font-family: "Ma Shan Zheng", cursive; padding: 9px 24px; cursor: pointer; letter-spacing: 3px; transform: rotate(-1.5deg); box-shadow: 0 2px 5px rgba(0,0,0,0.3); transition: transform 0.15s, opacity 0.15s, box-shadow 0.15s; }
.btn-post:hover { transform: rotate(0) scale(1.04); opacity: 0.92; box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
.btn-post:active { transform: scale(0.95); }

.wall { position: relative; min-height: 420px; padding: 20px; overflow: hidden; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; }
.wall:active { cursor: grabbing; }
.wall.nailing { cursor: crosshair; }
.wall-inner { position: relative; height: 100%; min-height: 380px; width: 100%; will-change: transform; transition: transform 0.25s ease-out; }
.wall-hint { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); z-index: 6; background: rgba(251,246,234,0.85); color: var(--ink-soft); font-size: 12px; letter-spacing: 2px; padding: 4px 14px; border-radius: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.2); pointer-events: none; }
.wall-hint.hidden { display: none; }
.wall-pan-btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 7; width: 34px; height: 60px; border: none; background: rgba(251,246,234,0.88); color: var(--stamp); font-size: 22px; line-height: 1; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,0.25); transition: background 0.2s, transform 0.2s; border-radius: 2px; }
.wall-pan-btn:hover { background: var(--stamp); color: #fff; }
.wall-pan-btn:active { transform: translateY(-50%) scale(0.92); }
.wall-pan-btn.hidden { display: none; }
.wall-pan-btn.inactive { opacity: 0.35; cursor: default; }
.wall-pan-btn.inactive:hover { background: rgba(251,246,234,0.88); color: var(--stamp); }
.wall-pan-left { left: 2px; }
.wall-pan-right { right: 2px; }

/* 纸条：纸张纹理 + 柔和阴影 + 做旧 */
.note { position: absolute; width: 168px; min-height: 96px; padding: 30px 14px 14px; font-size: 13px; cursor: pointer; touch-action: none; user-select: none; transform-origin: 50% 90%; z-index: 5; transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.3s ease, filter 0.3s; }
.note::before { content: ""; position: absolute; inset: 0; z-index: -1; background:
  radial-gradient(circle at 15% 20%, rgba(255,255,255,0.7), transparent 40%),
  radial-gradient(circle at 85% 80%, rgba(0,0,0,0.05), transparent 45%),
  linear-gradient(160deg, rgba(255,255,255,0.5), transparent 55%),
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.32'/%3E%3C/svg%3E");
  box-shadow: 0 1px 2px rgba(0,0,0,0.22), 0 7px 16px rgba(0,0,0,0.26), 0 14px 34px rgba(0,0,0,0.18); border-radius: 2px 2px 3px 3px; }
.note::after { content: ""; position: absolute; bottom: -6px; left: 8%; right: 8%; height: 14px; background: radial-gradient(ellipse at 50% 0%, rgba(0,0,0,0.2), transparent 70%); z-index: -2; }
.note.c-yellow { background: #f5e9a8; }
.note.c-blue { background: #c9dff2; }
.note.c-pink { background: #f7d2d8; }
.note.c-green { background: #d2ebc9; }
.note .tape { position: absolute; top: -12px; left: 50%; transform: translateX(-50%) rotate(-2deg); width: 52px; height: 20px; background: rgba(226,214,182,0.8); box-shadow: 0 2px 4px rgba(0,0,0,0.14); border-left: 1px dashed rgba(120,100,70,0.28); border-right: 1px dashed rgba(120,100,70,0.28); z-index: 1; }
.note-nick { font-weight: 700; color: #33506e; font-size: 13px; font-family: "Kaiti SC", serif; }
.note-time { font-size: 9px; color: rgba(0,0,0,0.42); margin-left: 6px; font-family: Georgia, serif; }
.note-text { margin-top: 8px; line-height: 1.75; word-break: break-word; font-family: "Kaiti SC", serif; color: rgba(40,35,30,0.92); }
.note:hover { z-index: 40; filter: brightness(1.04); transform: translateY(-4px) scale(1.03) rotate(0.5deg); box-shadow: 0 20px 48px rgba(0,0,0,0.38); }
.note.dragging { cursor: grabbing; z-index: 99; transition: none; filter: brightness(1.06) drop-shadow(0 24px 40px rgba(0,0,0,0.45)); }
.note.breeze { animation: breeze 6s ease-in-out infinite; }
@keyframes breeze { 0%,100% { transform: rotate(var(--tilt, 0deg)) translateX(0); } 25% { transform: rotate(calc(var(--tilt, 0deg) + 1.2deg)) translateX(2px); } 50% { transform: rotate(calc(var(--tilt, 0deg) - 0.8deg)) translateX(-2px); } 75% { transform: rotate(calc(var(--tilt, 0deg) + 0.6deg)) translateX(1.5px); } }
.note.nailing-down { animation: hammerIn 0.5s cubic-bezier(0.5,0,0.8,0.5) both; }
@keyframes hammerIn { 0% { opacity: 0.6; transform: translateY(-26px) scale(0.9) rotate(-3deg); } 45% { transform: translateY(6px) scale(1.02) rotate(1deg); } 70% { transform: translateY(-10px) scale(1); } 100% { opacity: 1; transform: translateY(0) scale(1) rotate(0); } }

.note-pop { position: fixed; inset: 0; z-index: 250; background: rgba(18,13,8,0.92); display: flex; flex-direction: column; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.note-pop.open { opacity: 1; pointer-events: auto; }
.note-pop-card { width: min(380px, 88vw); background: #f5e9a8; border-radius: 2px; padding: 40px 26px 26px; position: relative; box-shadow: 0 1px 2px rgba(0,0,0,0.3), 0 26px 74px rgba(0,0,0,0.6); transform: scale(0.85); transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1); font-size: 17px; }
.note-pop.open .note-pop-card { transform: scale(1); }
.note-pop-card .tape { position: absolute; top: -12px; left: 50%; transform: translateX(-50%) rotate(-2deg); width: 64px; height: 22px; background: rgba(226,214,182,0.8); box-shadow: 0 2px 4px rgba(0,0,0,0.14); }
.note-pop-card .note-nick { font-size: 16px; }
.note-pop-card .note-text { font-size: 18px; line-height: 1.9; }

/* ===== 上传 + 管理 ===== */
.album-tools { position: absolute; top: 6%; right: max(16px, 4vw); display: flex; gap: 10px; z-index: 30; }
.btn-upload, .btn-admin, .btn-album {
  border: 2px solid var(--ink); background: rgba(251,246,234,0.92); color: var(--ink);
  font-family: "Kaiti SC", serif; font-size: 14px; letter-spacing: 1px; padding: 7px 14px; cursor: pointer;
  border-radius: 2px; transition: all 0.2s; box-shadow: 0 3px 8px rgba(0,0,0,0.12);
}
.btn-upload:hover, .btn-admin:hover, .btn-album:hover { background: var(--stamp); border-color: var(--stamp); color: #fff; transform: translateY(-2px); }
.btn-admin.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.admin-bar { margin-top: 10px; align-items: center; gap: 10px; }
.admin-status { font-size: 13px; color: var(--stamp); }

/* 照片删除按钮（管理员/上传者可见） */
.stack-card .del-photo { position: absolute; top: 8px; right: 8px; z-index: 30; background: rgba(178,58,46,0.92); color: #fff; border: none; width: 26px; height: 26px; border-radius: 50%; font-size: 16px; line-height: 1; cursor: pointer; display: none; }
.stack-card .del-photo.show { display: block; }
.stack-card .del-photo:hover { background: #e74c3c; transform: scale(1.1); }

/* 留言删除按钮（管理员可见） */
.note .del-note { position: absolute; bottom: 6px; right: 8px; z-index: 30; background: rgba(178,58,46,0.85); color: #fff; border: none; width: 22px; height: 22px; border-radius: 50%; font-size: 13px; line-height: 1; cursor: pointer; display: none; }
.note .del-note.show { display: block; }
.note .del-note:hover { background: #e74c3c; }
.note-pop .del-note-pop { position: absolute; bottom: 14px; right: 14px; background: rgba(178,58,46,0.92); color: #fff; border: none; padding: 6px 14px; font-size: 13px; border-radius: 2px; cursor: pointer; letter-spacing: 1px; }
.note-pop .del-note-pop:hover { background: #e74c3c; }

/* ===== 弹窗 ===== */
.modal { position: fixed; inset: 0; z-index: 300; background: rgba(18,13,8,0.9); display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.modal.open { opacity: 1; pointer-events: auto; }
.modal-card { width: min(380px, 90vw); background: var(--paper-bright); border-radius: 3px; padding: 30px 26px 24px; box-shadow: 0 1px 2px rgba(0,0,0,0.3), 0 26px 74px rgba(0,0,0,0.6); transform: scale(0.9); transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1); text-align: center; }
.modal.open .modal-card { transform: scale(1); }
.modal-title { font-family: "Ma Shan Zheng", cursive; font-size: 26px; letter-spacing: 4px; margin-bottom: 18px; color: var(--ink); }
.modal-input { width: 100%; text-align: center; font-size: 18px; letter-spacing: 6px; margin-bottom: 10px; }
.modal-desc { color: var(--ink-soft); font-size: 15px; line-height: 1.8; margin-bottom: 14px; word-break: break-word; }
.modal-btns { display: flex; gap: 12px; justify-content: center; margin-top: 16px; }
.btn-ghost { background: transparent; border: 2px solid var(--ink-soft); color: var(--ink-soft); font-family: inherit; font-size: 14px; letter-spacing: 2px; padding: 8px 22px; cursor: pointer; border-radius: 2px; transition: all 0.2s; }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-danger { background: var(--stamp); color: #fff; border: none; font-family: "Ma Shan Zheng", cursive; font-size: 16px; letter-spacing: 2px; padding: 9px 24px; cursor: pointer; border-radius: 2px; box-shadow: 0 3px 8px rgba(0,0,0,0.3); transition: all 0.2s; }
.btn-danger:hover { background: #e74c3c; transform: scale(1.04); }
.admin-status { color: var(--stamp); font-size: 13px; min-height: 20px; margin-top: 4px; }

/* 删除倒计时 */
.confirm-count { font-size: 20px; font-weight: 700; color: var(--stamp); letter-spacing: 2px; margin: 6px 0; font-family: Georgia, serif; }
.confirm-warn { font-size: 13px; color: var(--stamp); background: #fbece8; border: 1px dashed var(--stamp); padding: 8px 12px; border-radius: 2px; margin-top: 10px; line-height: 1.6; }

/* 管理员固定按钮（左下角） */
.admin-fab { position: fixed; left: 18px; bottom: 24px; z-index: 200; width: 46px; height: 46px; border-radius: 50%; border: none; background: rgba(49,85,122,0.92); color: #fff; font-size: 20px; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,0.35); transition: all 0.25s; }
.admin-fab:hover { transform: scale(1.1); background: var(--blue); }
.admin-fab.on { background: var(--stamp); }
.admin-fab.on:hover { background: #e74c3c; }

/* ===== 全部相册（拍立得拼贴墙） ===== */
.album-modal { position: fixed; inset: 0; z-index: 280; background:
  radial-gradient(ellipse at 50% 0%, rgba(120,90,60,0.22), transparent 55%),
  #17130e; display: flex; flex-direction: column; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.album-modal.open { opacity: 1; pointer-events: auto; }
.album-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; border-bottom: 1px solid rgba(255,255,255,0.08); background: rgba(23,19,14,0.95); position: relative; }
.album-modal-head .modal-title { margin-bottom: 0; color: rgba(255,255,255,0.92); font-size: 17px; letter-spacing: 4px; }
.album-grid { flex: 1; overflow-y: auto; padding: 24px; display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 210px; gap: 18px; align-content: start; }
/* 拍立得相框：厚白边 + 底部手写标题区 + 胶带 */
.album-item { background: var(--paper-bright); padding: 10px 10px 30px; border-radius: 2px; position: relative; cursor: zoom-in; animation: albumIn 0.45s ease both; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,0.35), 0 8px 22px rgba(0,0,0,0.4); break-inside: avoid; margin-bottom: 22px; transition: box-shadow 0.3s, transform 0.3s; }
.album-item:hover { box-shadow: 0 2px 4px rgba(0,0,0,0.4), 0 16px 40px rgba(0,0,0,0.55); transform: translateY(-3px) rotate(0deg) !important; z-index: 5; }
.album-item::before { content: ""; position: absolute; top: -6px; left: 50%; transform: translateX(-50%) rotate(-2deg); width: 74px; height: 18px; background: rgba(226,214,182,0.72); box-shadow: 0 1px 3px rgba(0,0,0,0.12); z-index: 5; border-left: 1px dashed rgba(120,100,70,0.25); border-right: 1px dashed rgba(120,100,70,0.25); }
.album-item img.main-photo { width: 100%; flex: 1; min-height: 0; object-fit: contain; display: block; filter: saturate(0.92) contrast(1.02) sepia(0.06); transition: filter 0.3s, transform 0.3s; background: #fff; }
.album-item:hover img.main-photo { filter: saturate(1) contrast(1.02); transform: scale(1.02); }
.album-item .album-cap { padding: 8px 2px 0; }
.album-item .album-cap-title { font-size: 14px; color: #4a3c2c; font-weight: 400; font-family: "Ma Shan Zheng", cursive; line-height: 1.35; letter-spacing: 1px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.album-item .album-cap-desc { font-size: 11px; color: #8a7a64; margin-top: 3px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-family: "Kaiti SC", serif; }
.album-item .album-label { position: absolute; bottom: 6px; right: 10px; color: rgba(60,50,40,0.5); font-size: 9px; letter-spacing: 1px; font-family: Georgia, serif; }
@keyframes albumIn { from { opacity: 0; } to { opacity: 1; } }
.album-item .del-photo { position: absolute; top: 8px; right: 8px; z-index: 6; background: rgba(178,58,46,0.92); color: #fff; border: none; width: 20px; height: 20px; border-radius: 50%; font-size: 12px; line-height: 1; cursor: pointer; display: none; }
.album-item .del-photo.show { display: block; }

/* ===== 留言墙分页 ===== */
.wall-pager { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 16px; }
.pager-btn { background: rgba(251,246,234,0.92); border: 2px solid var(--ink); color: var(--ink); font-family: inherit; font-size: 14px; letter-spacing: 2px; padding: 7px 18px; cursor: pointer; border-radius: 2px; transition: all 0.2s; }
.pager-btn:hover { background: var(--blue); border-color: var(--blue); color: #fff; }
.pager-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.pager-info { color: rgba(255,255,255,0.88); font-size: 14px; letter-spacing: 1px; font-family: Georgia, serif; }

/* 墙体滑动动画 */
.wall { transition: transform 0.7s cubic-bezier(0.22,1,0.36,1), opacity 0.3s ease; }

/* 通用隐藏 */
.hidden { display: none !important; }

/* ===== 灯箱评论 ===== */
.lightbox-desc { color: rgba(255,255,255,0.85); font-size: 15px; line-height: 1.7; max-width: 640px; text-align: center; padding: 10px 20px 4px; }
.lightbox-comments { width: min(680px, 92vw); background: rgba(251,246,234,0.97); border-radius: 3px; margin-top: 14px; padding: 14px 16px; max-height: 40vh; display: flex; flex-direction: column; flex-shrink: 0; }
.comments-head { font-size: 14px; letter-spacing: 2px; color: var(--ink); font-weight: 700; border-bottom: 1px dashed var(--ink-soft); padding-bottom: 8px; margin-bottom: 8px; }
.comments-list { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 6px; min-height: 40px; max-height: 26vh; }
.comment-item { background: #fffdf6; border-radius: 2px; padding: 7px 10px; font-size: 14px; box-shadow: 0 1px 3px rgba(0,0,0,0.09); display: flex; align-items: flex-start; gap: 8px; }
.comment-item .c-nick { color: #33506e; font-weight: 700; white-space: nowrap; }
.comment-item .c-time { color: rgba(0,0,0,0.4); font-size: 11px; font-family: Georgia, serif; white-space: nowrap; margin-top: 2px; }
.comment-item .c-text { flex: 1; line-height: 1.5; word-break: break-word; color: rgba(40,35,30,0.92); }
.comment-item .c-del { background: rgba(178,58,46,0.85); color: #fff; border: none; width: 20px; height: 20px; border-radius: 50%; font-size: 12px; line-height: 1; cursor: pointer; flex-shrink: 0; margin-top: 2px; }
.comment-item .c-del:hover { background: #e74c3c; }
.comment-item .c-del.hidden { display: none !important; }
.comments-empty { color: var(--ink-soft); font-size: 13px; text-align: center; padding: 10px; }
.comments-form { display: flex; gap: 8px; margin-top: 8px; align-items: center; }
.comments-form .input { border-bottom: 1px dashed var(--ink-soft); flex: 1; font-size: 14px; }
.comments-form #commentNick { flex: 0 0 90px; }
.comments-form .btn-post { letter-spacing: 1px; padding: 7px 16px; font-size: 14px; }

/* ===== 上传弹窗 ===== */
.upload-preview { max-height: 160px; overflow: hidden; border-radius: 2px; margin-bottom: 12px; border: 1px dashed var(--ink-soft); display: flex; align-items: center; justify-content: center; background: #f3ead8; }
.upload-preview-img { max-height: 160px; max-width: 100%; object-fit: contain; }
.modal-textarea { width: 100%; min-height: 70px; resize: vertical; margin-top: 10px; text-align: left; font-size: 15px; }

/* ===== 桌面大屏 ===== */
@media (min-width: 1280px) {
  .board-inner { max-width: 980px; }
  .wall { min-height: 520px; }
  .wall-inner { min-height: 480px; }
}

/* ===== 手机端适配 ===== */
@media (max-width: 640px) {
  .screen { padding: 24px 14px; }
  .screen-hero { padding-top: 18px; }

  /* 校徽与太阳 */
  .sun { width: 64px; height: 64px; top: 12%; right: 6%; }
  .badge { height: 58px; margin-bottom: 6px; }
  .school-name { font-size: 14px; letter-spacing: 2px; }
  .school-sub { font-size: 11px; letter-spacing: 1px; }

  /* 大标题 */
  .hero-title-wrap { flex-direction: column; gap: 10px; margin-bottom: 14px; }
  .hero-title { font-size: 52px; letter-spacing: 10px; }
  .hero-sub-vertical { flex-direction: row; writing-mode: horizontal-tb; font-size: 12px; letter-spacing: 3px; border-left: none; border-top: 1px solid rgba(255,255,255,0.35); padding-left: 0; padding-top: 8px; }
  .hero-stamp { font-size: 12px; padding: 5px 10px; margin-bottom: 12px; }
  .hero-line { font-size: 12px; letter-spacing: 1px; }

  /* 照片堆叠 */
  .album-inner { padding: 18px 10px; }
  .album-title { font-size: 22px; top: 30px; }
  .stack { width: min(88vw, 400px); height: min(50vh, 430px); }
  .stack-card { padding: 10px 10px 48px; }
  .stack-card img { height: calc(100% - 58px); }
  .stack-card figcaption { font-size: 15px; bottom: 14px; }
  .album-tools { top: 8%; right: 10px; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
  .btn-upload, .btn-album { font-size: 12px; padding: 5px 9px; }
  .stack-count { margin-top: 10px; font-size: 13px; }
  .arrow { width: 38px; height: 38px; font-size: 22px; }

  /* 相册（2列拍立得网格） */
  .album-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; padding: 12px; gap: 12px; }
  .album-item { padding: 8px 8px 26px; }
  .album-item .album-cap-title { font-size: 13px; }
  .album-item .album-cap-desc { font-size: 10px; }
  .album-modal-head { padding: 10px 16px; }

  /* 留言墙 */
  .board-inner { max-width: 100%; }
  .board-form { padding: 12px 14px; gap: 8px; }
  .wall { min-height: 380px; padding: 14px; }
  .wall-inner { min-height: 352px; }
  .note { width: 128px; min-height: 74px; padding: 24px 10px 10px; font-size: 12px; }
  .note .tape { width: 40px; height: 18px; top: -10px; }
  .note-nick { font-size: 11px; }
  .note-time { font-size: 8px; margin-left: 4px; }
  .wall-pager { gap: 10px; }
  .pager-btn { padding: 6px 12px; font-size: 13px; }

  /* 弹窗通用 */
  .modal-card { width: 92vw; padding: 20px 16px; }
  .modal-title { font-size: 22px; }

  /* 灯箱评论 */
  .lightbox img { max-width: 94vw; padding: 10px 10px 36px; }
  .comments-form { flex-wrap: wrap; }
  .comments-form #commentNick { flex: 1 1 100%; }
  .comments-form #commentText { flex: 1 1 100%; }
  .comments-form .btn-post { flex: 0 0 auto; }
  .lightbox-comments { max-height: 40vh; }
}

/* 动效偏好 */
@media (prefers-reduced-motion: reduce) {
  .sun,.cloud,.mouse::before,.hero-title,.stack-card,.note,.badge,.hammer-tip,.hero-sub-vertical { animation: none !important; transition: none; }
}