/* ==========================================================
   全局基础样式 - 婚礼邀请函
   ========================================================== */
:root {
    --primary: #c4345b;
    --primary-light: #ff7eb3;
    --gold: #c9a062;
    --bg: #fff8f6;
    --bg-deep: #fdf0f1;
    --text: #4a3b3b;
    --text-light: #8a7777;
    --white: #fff;
    --shadow: 0 12px 36px rgba(196, 52, 91, 0.12);
}

* { box-sizing: border-box; }

html, body {
    margin: 0; padding: 0;
    color: var(--text);
    font-family: "Noto Serif SC", "PingFang SC", "Microsoft YaHei", serif;
    background: linear-gradient(180deg, #fff 0%, #fff8f6 30%, #fff 100%);
    overflow-x: hidden;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-light); }

img { max-width: 100%; }

/* ===== 顶部导航 ===== */
.nav {
    position: fixed; top: 0; left: 0; right: 0;
    z-index: 99;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    background: rgba(255, 255, 255, 0.55);
    border-bottom: 1px solid rgba(196, 52, 91, 0.1);
    transition: all .3s ease;
}
.nav-inner {
    max-width: 1100px; margin: 0 auto;
    padding: 14px 24px;
    display: flex; align-items: center; justify-content: space-between;
}
.brand {
    font-family: "Great Vibes", cursive, serif;
    font-size: 26px; color: var(--primary);
    letter-spacing: 1px;
}
.nav-links { display: flex; gap: 28px; }
.nav-links a {
    color: var(--text); font-size: 15px;
    position: relative; padding: 4px 0;
}
.nav-links a.active, .nav-links a:hover { color: var(--primary); }
.nav-links a.active::after {
    content: ''; position: absolute; bottom: -4px; left: 0; right: 0;
    height: 2px; background: var(--primary); border-radius: 2px;
}

/* ===== 通用区段 ===== */
.section {
    max-width: 1100px; margin: 0 auto;
    padding: 100px 24px 80px;
}
.section h2.title {
    text-align: center; font-family: "Great Vibes", serif;
    font-size: 56px; color: var(--primary);
    margin: 0 0 12px;
}
.section .subtitle {
    text-align: center; color: var(--text-light);
    margin-bottom: 50px; letter-spacing: 4px;
}
.section .divider {
    text-align: center; color: var(--gold);
    letter-spacing: 8px; font-size: 14px; margin-bottom: 60px;
}

/* ===== 首页：封面 ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 200, 220, 0.5), transparent 60%),
        radial-gradient(circle at 80% 80%, rgba(255, 220, 200, 0.5), transparent 60%),
        linear-gradient(135deg, #fff5f7 0%, #fff8f0 60%, #fff 100%);
    overflow: hidden;
}
.hero::before {
    content: ''; position: absolute; inset: 0;
    background:
        radial-gradient(ellipse at center, transparent 40%, rgba(255,255,255,0.5) 100%);
    pointer-events: none;
}
.hero .groom, .hero .bride {
    font-family: "Noto Serif SC", serif;
    font-size: 64px; letter-spacing: 8px;
    color: var(--primary);
    text-shadow: 0 4px 24px rgba(196,52,91,0.15);
    margin: 0;
}
.hero .symbol {
    font-size: 44px; color: var(--gold);
    margin: 12px 0;
}
.hero .groom, .hero .bride { display: inline-block; }
.hero .name-row {
    display: flex; align-items: center; gap: 30px;
    flex-wrap: wrap; justify-content: center;
}
.hero .hint {
    margin-top: 60px; font-size: 13px; letter-spacing: 6px;
    color: var(--text-light);
    animation: bounce 1.6s ease-in-out infinite;
}
@keyframes bounce {
    0%,100% { transform: translateY(0); }
    50%     { transform: translateY(-8px); }
}

/* ===== 倒计时 ===== */
.countdown {
    margin: 50px auto 0;
    display: flex; gap: 18px; justify-content: center;
    flex-wrap: wrap;
}
.countdown .cell {
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(10px);
    border-radius: 16px; padding: 18px 22px;
    min-width: 100px; text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid rgba(196,52,91,0.1);
}
.countdown .cell .num {
    font-size: 38px; font-weight: bold; color: var(--primary);
    font-family: "Playfair Display", serif;
}
.countdown .cell .label { font-size: 12px; color: var(--text-light); letter-spacing: 4px; margin-top: 4px; }

/* ===== 邀请按钮 ===== */
.cta {
    display: inline-block; margin: 40px auto 0;
    padding: 14px 50px; border-radius: 50px;
    background: linear-gradient(135deg, var(--primary), #e84775);
    color: #fff; font-size: 16px; letter-spacing: 4px;
    box-shadow: var(--shadow);
    transition: transform .3s ease;
}
.cta:hover { transform: translateY(-2px) scale(1.04); color: #fff; }

/* ===== 新人故事 ===== */
.timeline {
    position: relative; max-width: 700px; margin: 0 auto;
    padding: 20px 0;
}
.timeline::before {
    content: ''; position: absolute; left: 50%; top: 0; bottom: 0;
    width: 2px; background: linear-gradient(180deg, var(--primary-light), var(--gold));
    transform: translateX(-50%);
}
.t-item {
    position: relative; padding: 24px 0;
    display: flex; align-items: center;
}
.t-item .dot {
    width: 14px; height: 14px; border-radius: 50%;
    background: var(--primary); position: absolute;
    left: 50%; transform: translateX(-50%);
    box-shadow: 0 0 0 6px rgba(196,52,91,0.15);
}
.t-card {
    width: 42%; padding: 18px 22px;
    background: #fff; border-radius: 16px;
    box-shadow: var(--shadow);
    line-height: 1.8;
}
.t-item:nth-child(odd)  { justify-content: flex-start; }
.t-item:nth-child(even) { justify-content: flex-end; }
.t-item:nth-child(odd)  .t-card { margin-right: auto; }
.t-item:nth-child(even) .t-card { margin-left: auto; }
.t-card h3 { margin: 0 0 8px; color: var(--primary); font-size: 18px; }
.t-card .date { font-size: 12px; color: var(--gold); letter-spacing: 2px; }

/* ===== 婚礼信息卡 ===== */
.venue-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
}
@media (max-width: 720px) { .venue-grid { grid-template-columns: 1fr; } }

/* ===== 新人卡片（A & J） ===== */
.couple-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}
.couple-avatar {
    width: 140px;
    height: 140px;
    font-size: 60px;
}
.venue-card {
    background: #fff; border-radius: 20px; padding: 28px;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--primary);
}
.venue-card .icon {
    width: 56px; height: 56px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 24px; margin-bottom: 16px;
}
.venue-card h3 { margin: 0 0 12px; color: var(--primary); }
.venue-card p { color: var(--text-light); line-height: 1.8; margin: 4px 0; }

/* ===== 表单 ===== */
.form-card {
    max-width: 640px; margin: 0 auto;
    background: #fff; border-radius: 24px; padding: 36px;
    box-shadow: var(--shadow);
}
.form-row { display: flex; gap: 16px; flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: 220px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 14px; color: var(--text); }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: 12px 14px;
    border: 1px solid #eee; border-radius: 12px;
    font-family: inherit; font-size: 14px;
    transition: border .2s ease, box-shadow .2s ease;
    background: #fafafa;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none; border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(255,126,179,0.15);
}
.radio-group {
    display: flex; gap: 14px; flex-wrap: wrap;
}
.radio-group label {
    flex: 1; min-width: 110px; text-align: center;
    padding: 12px; border: 1px solid #eee; border-radius: 12px;
    cursor: pointer; transition: all .25s ease;
    background: #fafafa;
}
.radio-group input { display: none; }
.radio-group input:checked + span {
    color: #fff;
}
.radio-group label:has(input:checked) {
    background: linear-gradient(135deg, var(--primary), #e84775);
    color: #fff; border-color: transparent;
}
.btn-submit {
    width: 100%; padding: 14px; margin-top: 8px;
    border: none; border-radius: 50px;
    background: linear-gradient(135deg, var(--primary), #e84775);
    color: #fff; font-size: 16px; letter-spacing: 4px;
    cursor: pointer; transition: transform .25s ease;
    box-shadow: var(--shadow);
}
.btn-submit:hover { transform: translateY(-2px); }
.btn-submit:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* ===== 祝福墙 ===== */
.wall {
    column-count: 3; column-gap: 18px;
}
@media (max-width: 720px) { .wall { column-count: 1; } }
@media (min-width: 721px) and (max-width: 1024px) { .wall { column-count: 2; } }

.wish-card {
    break-inside: avoid;
    margin-bottom: 18px;
    padding: 18px 20px; border-radius: 14px;
    color: #fff; box-shadow: var(--shadow);
    animation: fadeInUp .6s ease both;
    position: relative;
}
.wish-card .who { font-weight: bold; font-size: 15px; margin-bottom: 6px; }
.wish-card .what { font-size: 14px; line-height: 1.7; opacity: .95; }
.wish-card .when { font-size: 11px; opacity: .75; margin-top: 8px; letter-spacing: 2px; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.fab-wish {
    position: fixed; right: 24px; bottom: 24px;
    width: 60px; height: 60px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #e84775);
    color: #fff; border: none; cursor: pointer;
    font-size: 28px; box-shadow: var(--shadow);
    z-index: 90; transition: transform .25s ease;
}
.fab-wish:hover { transform: scale(1.1) rotate(8deg); }

/* 模态 */
.modal-mask {
    position: fixed; inset: 0; background: rgba(0,0,0,0.4);
    display: none; align-items: center; justify-content: center;
    z-index: 100; backdrop-filter: blur(6px);
}
.modal-mask.show { display: flex; animation: fadeIn .3s ease both; }
.modal {
    background: #fff; border-radius: 20px;
    width: 90%; max-width: 460px; padding: 28px;
    animation: zoomIn .3s ease both;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes zoomIn { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal h3 { margin: 0 0 16px; color: var(--primary); }
.modal .close {
    float: right; cursor: pointer; background: none; border: none;
    font-size: 24px; color: #999; line-height: 1;
}

.toast {
    position: fixed; left: 50%; top: 30px; transform: translateX(-50%);
    padding: 12px 24px; border-radius: 30px;
    background: rgba(0,0,0,0.8); color: #fff; font-size: 14px;
    z-index: 200; display: none;
}
.toast.show { display: block; animation: fadeIn .3s ease; }

/* ===== 雪花 + 爱心飘落 ===== */
.snow-layer {
    position: fixed; inset: 0; pointer-events: none; z-index: 5; overflow: hidden;
}
.snow-layer i {
    position: absolute; color: #ff7eb3; opacity: .8;
    user-select: none;
    animation: fall linear infinite;
}
@keyframes fall {
    0% { transform: translateY(-10vh) rotate(0); }
    100% { transform: translateY(110vh) rotate(360deg); }
}

/* ===== reveal 进场动效 ===== */
.reveal {
    opacity: 0; transform: translateY(30px);
    transition: opacity .8s ease, transform .8s ease;
}
.reveal.in {
    opacity: 1; transform: translateY(0);
}

/* footer */
footer {
    text-align: center; padding: 40px 16px;
    color: var(--text-light); font-size: 13px;
    background: linear-gradient(180deg, transparent, var(--bg-deep));
}

/* 公告弹窗（微信打开时提示浏览器打开） */
.open-tips {
    position: fixed; top: 0; left: 0; right: 0;
    background: #333; color: #fff; padding: 10px;
    text-align: center; font-size: 13px; z-index: 999;
    display: none;
}
.open-tips a { color: #ffd700; }

/* 响应式 */
@media (max-width: 720px) {
    .hero .groom, .hero .bride { font-size: 40px; letter-spacing: 4px; }
    .hero .symbol { font-size: 28px; }
    .nav-links { gap: 14px; }
    .nav-links a { font-size: 13px; }
    .section h2.title { font-size: 38px; }
    .section { padding: 80px 16px 60px; }
}
/* ==========================================================
   入场动画 + 音乐播放器浮窗
   ========================================================== */

/* ===== 入场（首次访问） ===== */
.intro-mask {
    position: fixed; inset: 0;
    background: linear-gradient(135deg, #ffe5ec 0%, #fff5e1 60%, #ffe5ec 100%);
    z-index: 300;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center;
    transition: opacity .8s ease, transform .8s ease;
}
/* 已开启过入场（同会话切换页签）：直接隐藏 */
html.wedding-entered .intro-mask { display: none !important; }
.intro-mask.hide {
    opacity: 0; pointer-events: none;
    transform: scale(1.1);
}
.intro-mask .frame {
    position: relative; padding: 40px 30px 36px;
    background: rgba(255,255,255,0.4);
    border: 1px solid rgba(255,255,255,0.7);
    border-radius: 24px;
    backdrop-filter: blur(10px);
    box-shadow: 0 30px 60px rgba(196,52,91,0.18);
    width: 86%; max-width: 380px;
    animation: frameIn 1.2s ease both;
}
@keyframes frameIn { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }
.intro-mask .to {
    font-family: 'Great Vibes', cursive, serif;
    font-size: 32px; color: var(--primary); margin: 0 0 6px;
}
.intro-mask .names {
    font-size: 22px; color: #4a3b3b; letter-spacing: 4px; margin: 0 0 16px;
}
.intro-mask .invite {
    font-size: 13px; color: var(--text-light); letter-spacing: 6px; margin: 0 0 28px;
}
.intro-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 16px 38px; border-radius: 50px;
    background: linear-gradient(135deg, var(--primary), #ff7eb3);
    color: #fff; border: none; cursor: pointer;
    font-size: 16px; letter-spacing: 4px;
    box-shadow: 0 12px 24px rgba(196,52,91,0.35);
    transition: transform .25s ease, box-shadow .25s ease;
    -webkit-tap-highlight-color: transparent;
}
.intro-btn:hover { transform: translateY(-3px); box-shadow: 0 20px 32px rgba(196,52,91,0.4); }
.intro-btn:active { transform: translateY(0); }
.intro-btn .dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: #fff; box-shadow: 0 0 0 0 rgba(255,255,255,0.7);
    animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(255,255,255,0.8); }
    50%     { box-shadow: 0 0 0 14px rgba(255,255,255,0); }
}
.intro-hint {
    font-size: 12px; color: var(--text-light);
    margin-top: 16px; letter-spacing: 4px;
}

/* ===== 音乐浮窗 ===== */
.music-fab {
    position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom));
    width: 52px; height: 52px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #ff7eb3);
    color: #fff; border: none; cursor: pointer;
    z-index: 90; box-shadow: var(--shadow);
    display: flex; align-items: center; justify-content: center;
    transition: transform .3s ease;
    -webkit-tap-highlight-color: transparent;
}
.music-fab:hover { transform: scale(1.06); }
.music-fab.playing {
    animation: spin 8s linear infinite;
}
.music-fab.paused {
    /* 暂停时停转 */
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
.music-fab.playing:hover { animation-play-state: paused; }
.music-fab svg { width: 26px; height: 26px; pointer-events: none; }

.music-panel {
    position: fixed; right: 18px; bottom: calc(82px + env(safe-area-inset-bottom));
    width: 240px; max-height: 320px; overflow: auto;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(14px);
    border-radius: 16px;
    box-shadow: var(--shadow);
    z-index: 90;
    padding: 14px;
    transform: translateY(20px) scale(0.9);
    opacity: 0; pointer-events: none;
    transition: all .3s ease;
}
.music-panel.show {
    transform: translateY(0) scale(1);
    opacity: 1; pointer-events: auto;
}
.music-panel .now {
    font-size: 13px; color: var(--text-light); letter-spacing: 2px;
    margin-bottom: 6px;
}
.music-panel .title {
    color: var(--primary); font-size: 15px; margin-bottom: 10px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.music-panel .list { list-style: none; padding: 0; margin: 6px 0 0; }
.music-panel .list li {
    padding: 8px 10px; border-radius: 8px; cursor: pointer;
    font-size: 14px; transition: background .15s ease;
    display: flex; align-items: center; gap: 6px;
}
.music-panel .list li:hover { background: #fce4ec; }
.music-panel .list li.current {
    background: linear-gradient(135deg, var(--primary), #ff7eb3);
    color: #fff;
}
.music-panel .list li .icon { opacity: .7; font-size: 12px; }

/* ===== 浮动祝福按钮 避让音乐按钮 ===== */
.fab-wish {
    right: calc(18px + 60px);
}

/* ==========================================================
   移动端深度适配
   ========================================================== */

/* 触摸目标最小 44px */
.nav-links a, .intro-btn, .music-fab, .fab-wish, .cta, .btn-submit {
    min-height: 44px;
}

/* iOS 安全区 */
body { padding-bottom: env(safe-area-inset-bottom); }

/* 单列卡片 */
.venue-grid, .timeline { grid-column-gap: 18px; }

@media (max-width: 720px) {
    /* 导航 mobile：横向滚动避免挤压 */
    .nav-inner { padding: 10px 14px; }
    .brand { font-size: 22px; }
    .nav-links { gap: 14px; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .nav-links a { white-space: nowrap; font-size: 14px; padding: 6px 2px; }
    .nav-links::-webkit-scrollbar { display: none; }

    /* 封面 */
    .hero { min-height: 100svh; padding: 80px 18px 60px; }
    .hero .groom, .hero .bride { font-size: 36px; letter-spacing: 4px; }
    .hero .symbol { font-size: 26px; margin: 8px 0; }
    .hero .name-row { gap: 16px; }
    .hero .hint { margin-top: 36px; font-size: 12px; letter-spacing: 4px; }
    .countdown { gap: 10px; margin-top: 36px; }
    .countdown .cell { min-width: 72px; padding: 12px 10px; }
    .countdown .cell .num { font-size: 26px; }
    .countdown .cell .label { font-size: 11px; }
    .cta { margin-top: 28px; padding: 12px 36px; font-size: 15px; }

    /* 段落 */
    .section { padding: 70px 16px 50px; }
    .section h2.title { font-size: 38px; margin-bottom: 8px; }
    .section .subtitle { margin-bottom: 30px; letter-spacing: 3px; font-size: 13px; }
    .section .divider { margin-bottom: 36px; }

    /* 时间线 */
    .timeline::before { left: 18px; }
    .t-item { justify-content: flex-start !important; }
    .t-item .dot { left: 18px; transform: translateX(-50%); }
    .t-card { width: calc(100% - 50px); margin-left: auto !important; margin-right: 0 !important; }

    /* 卡片 1 列 */
    .venue-grid { grid-template-columns: 1fr; gap: 14px; }
    .venue-card { padding: 22px; border-radius: 16px; }
    .venue-card .icon { width: 48px; height: 48px; font-size: 20px; }

    /* 新人卡片：单列堆叠，避免两列溢出 */
    .couple-grid { grid-template-columns: 1fr; gap: 16px; max-width: 420px; margin: 0 auto; }
    .couple-card { padding: 22px 18px !important; border-radius: 18px !important; }
    .couple-avatar { width: 108px; height: 108px; font-size: 48px; }

    /* 表单 */
    .form-card { padding: 22px 18px; border-radius: 18px; }
    .form-row { gap: 0; }
    .form-row .form-group { min-width: 100%; }
    .radio-group label { padding: 10px; min-width: 96px; font-size: 13px; }

    /* 祝福墙 */
    .wall { column-count: 1; column-gap: 0; }
    .wish-card { padding: 14px 16px; }

    /* 倒计时数字 */
    .stat-grid { gap: 10px; }
}

/* 横屏手机 */
@media (max-width: 920px) and (orientation: landscape) {
    .hero { min-height: 100svh; }
    .countdown .cell { min-width: 70px; padding: 10px 12px; }
    .countdown .cell .num { font-size: 24px; }
}

/* 超小屏优化（5.5寸以下） */
@media (max-width: 360px) {
    .hero .groom, .hero .bride { font-size: 30px; letter-spacing: 2px; }
    .countdown .cell { min-width: 60px; padding: 10px 8px; }
    .countdown .cell .num { font-size: 22px; }
    .nav-links { gap: 10px; }
    .music-fab { width: 46px; height: 46px; }
    .fab-wish { right: calc(18px + 52px); width: 52px; height: 52px; }
    .couple-avatar { width: 90px; height: 90px; font-size: 40px; }
}


/* ==========================================================
   照片墙（瀑布流 + 随机角度 + Lightbox）
   ========================================================== */

/* hero 段落 */
.photos-hero { padding-bottom: 20px; }
.photos-lead {
    text-align: center;
    color: var(--text-light);
    line-height: 1.9;
    margin: 20px auto 0;
    max-width: 620px;
    font-size: 14px;
}
.photos-count {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 10px;
    border-radius: 999px;
    background: rgba(196, 52, 91, .08);
    color: var(--primary);
    font-size: 12px;
    letter-spacing: 1px;
}

/* 段落 */
.photos-section {
    padding-top: 30px;
    padding-bottom: 80px;
    min-height: 40vh;
}

/* 瀑布流容器 */
.photos-wall {
    column-count: 4;
    column-gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}
@media (max-width: 1024px) { .photos-wall { column-count: 3; } }
@media (max-width: 720px)  { .photos-wall { column-count: 2; column-gap: 14px; } }
@media (max-width: 380px)  { .photos-wall { column-count: 1; } }

/* 卡片基础（覆盖全局 .reveal 的 transform，避免破坏 rotate） */
.photo-card {
    --rot: 0deg;
    position: relative;
    display: inline-block;        /* columns 布局关键 */
    width: 100%;
    margin: 0 0 24px;
    background: #fff;
    border-radius: 6px;
    padding: 10px 10px 14px;
    box-shadow: 0 6px 18px rgba(60, 30, 40, .12);
    cursor: zoom-in;
    overflow: visible;            /* 让胶带装饰可以溢出 */
    break-inside: avoid;          /* 避免卡片被截断到两列 */

    transform: rotate(var(--rot));
    transition:
        transform .45s cubic-bezier(.34, 1.56, .64, 1),
        box-shadow .35s ease,
        filter .35s ease;

    will-change: transform;
}
/* 滚动渐入：覆盖全局 .reveal 的 transform，确保旋转角度不被吃掉 */
.photo-card.reveal {
    opacity: 0;
    transform: rotate(var(--rot)) translateY(30px);
}
.photo-card.reveal.in {
    opacity: 1;
    transform: rotate(var(--rot)) translateY(0);
}
/* hover：还原角度、浮起、放大 */
.photo-card.reveal.in:hover {
    transform: rotate(0deg) translateY(-10px) scale(1.04);
    z-index: 5;
    box-shadow: 0 24px 48px rgba(196, 52, 91, .28);
    filter: saturate(1.1);
}

/* 相框：固定白边 + 阴影 */
.photo-frame {
    position: relative;
    background: #fff;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.04);
}
.photo-img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform .8s cubic-bezier(.2, .8, .2, 1);
}
.photo-card.reveal.in:hover .photo-img {
    transform: scale(1.06);
}

/* 胶带装饰：用纯 CSS 画两条半透明胶带，营造"随手钉在墙上"的感觉 */
.photo-tape {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%) rotate(-3deg);
    width: 70px;
    height: 18px;
    background: linear-gradient(180deg,
        rgba(255, 235, 170, .85),
        rgba(255, 215, 130, .65));
    border-left: 1px dashed rgba(180, 140, 60, .25);
    border-right: 1px dashed rgba(180, 140, 60, .25);
    box-shadow: 0 2px 6px rgba(120, 80, 20, .18);
    opacity: .9;
}
.photo-card.reveal.in:hover .photo-tape {
    transform: translateX(-50%) rotate(0deg);
    opacity: 1;
}

/* 配文（手写感） */
.photo-caption {
    margin-top: 10px;
    padding: 0 4px;
    text-align: center;
    font-family: 'Great Vibes', 'Noto Serif SC', serif;
    font-size: 18px;
    color: var(--primary);
    line-height: 1.4;
}

/* 加载 / 空状态 */
.photos-loading,
.photos-empty {
    text-align: center;
    color: var(--text-light);
    padding: 60px 20px;
    font-size: 14px;
    letter-spacing: 2px;
}
.ph-empty-emoji {
    font-size: 50px;
    margin-bottom: 14px;
    opacity: .6;
}
.spinner {
    width: 32px; height: 32px;
    margin: 0 auto 14px;
    border: 3px solid rgba(196,52,91,.18);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Lightbox ---------- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 400;
    background: rgba(20, 12, 18, .82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .26s ease;
    padding: 24px;
}
.lightbox.show { opacity: 1; }
.lightbox[hidden] { display: none; }

.lb-stage {
    position: relative;
    max-width: min(92vw, 1100px);
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.lb-stage img {
    max-width: 100%;
    max-height: 78vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 30px 80px rgba(0,0,0,.5);
    background: #1a1a1a;
    transition: opacity .25s ease;
}
.lb-caption {
    color: #fff;
    font-family: 'Great Vibes', 'Noto Serif SC', serif;
    font-size: 22px;
    text-align: center;
    max-width: 80%;
    line-height: 1.5;
    text-shadow: 0 2px 12px rgba(0,0,0,.6);
}
.lb-counter {
    color: rgba(255,255,255,.6);
    font-size: 12px;
    letter-spacing: 3px;
}

.lb-close,
.lb-nav {
    position: absolute;
    background: rgba(255,255,255,.12);
    border: 0;
    color: #fff;
    cursor: pointer;
    border-radius: 50%;
    transition: background .2s ease, transform .2s ease;
    backdrop-filter: blur(4px);
}
.lb-close {
    top: 16px; right: 16px;
    width: 44px; height: 44px;
    font-size: 26px;
    line-height: 1;
}
.lb-nav {
    top: 50%;
    transform: translateY(-50%);
    width: 52px; height: 52px;
    font-size: 36px;
    line-height: 1;
}
.lb-prev { left: 16px; }
.lb-next { right: 16px; }
.lb-close:hover,
.lb-nav:hover {
    background: rgba(255,255,255,.25);
    transform: translateY(-50%) scale(1.06);
}
.lb-close:hover { transform: scale(1.06); }

@media (max-width: 720px) {
    .lb-nav { width: 42px; height: 42px; font-size: 28px; }
    .lb-prev { left: 6px; }
    .lb-next { right: 6px; }
    .lb-caption { font-size: 18px; }
    .lb-stage img { max-height: 70vh; }
}
