/* ============================================================
   婚礼电子邀请函 H5 - 主样式（主题变量由 theme-*.css 提供）
   ============================================================ */

:root {
    /* 主题变量（默认简约，被 theme-*.css 覆盖） */
    --primary: #d4a373;
    --primary-light: #e9d8c3;
    --bg: #fdf8f3;
    --card-bg: #ffffff;
    --text: #5b4a42;
    --text-light: #9b8b80;
    --title-color: #b38860;
    --nav-bg: rgba(255, 255, 255, .95);
    --radius: 14px;
    --font-title: 'STKaiti', 'KaiTi', '楷体', serif;
    --font-body: -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --cover-mask: linear-gradient(180deg, rgba(0,0,0,.15), rgba(0,0,0,.55));
    --petal-color: #f0c9d2;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
    height: 100%;
    overflow: hidden;
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    user-select: text;
    -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* ================= H5-01 加载页 ================= */
.loading {
    position: fixed; inset: 0; z-index: 999;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: var(--bg);
    transition: opacity .6s, visibility .6s;
}
.loading.done { opacity: 0; visibility: hidden; }
.loading-ring { position: relative; width: 90px; height: 90px; margin-bottom: 30px; }
.ring {
    position: absolute; inset: 0; border: 2px solid transparent;
    border-top-color: var(--primary); border-radius: 50%;
    animation: spin 1.4s linear infinite;
}
.ring.r2 { inset: 12px; animation-duration: 1.9s; border-top-color: var(--primary-light); }
.ring.r3 { inset: 24px; animation-duration: 2.4s; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 14px; color: var(--text-light); letter-spacing: 2px; margin-bottom: 22px; }
.loading-bar { width: 140px; height: 3px; background: rgba(0,0,0,.08); border-radius: 3px; overflow: hidden; }
.loading-bar i { display: block; height: 100%; width: 0; background: var(--primary); border-radius: 3px; transition: width .3s; }
.btn-retry {
    margin-top: 24px; padding: 10px 28px; border: 1px solid var(--primary);
    background: none; color: var(--primary); border-radius: 20px; font-size: 14px; cursor: pointer;
}

/* ================= 主体与翻页 ================= */
.app { position: relative; height: 100%; }
.page {
    position: absolute; inset: 0 0 56px 0; /* 底部导航高度 */
    display: flex; flex-direction: column;
    opacity: 0; pointer-events: none;
    transition: opacity .7s ease, transform .7s ease;
    transform: translateY(24px) scale(.98);
    overflow: hidden;
    background: var(--bg);
}
.page.active { opacity: 1; pointer-events: auto; transform: none; }
.page.no-anim { transition: none; }
/* 婚礼信息页：粉色背景 */
.page-wedding {
    background: linear-gradient(180deg, #ffe4ec 0%, #fff0f4 40%, #fdf8f3 100%);
}
.page-scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 26px 22px 10px; }

.section-title {
    font-family: var(--font-title);
    font-size: 24px; color: var(--title-color);
    text-align: center; letter-spacing: 3px; margin: 14px 0 22px;
    position: relative;
}
.section-title::before, .section-title::after {
    content: ''; display: inline-block; width: 34px; height: 1px;
    background: var(--primary); vertical-align: middle; margin: 0 12px; opacity: .5;
}
.page-hint {
    text-align: center; font-size: 12px; color: var(--text-light);
    padding: 10px 0 12px; letter-spacing: 1px;
}
.arrow-up {
    display: inline-block; width: 7px; height: 7px;
    border-right: 1.5px solid var(--text-light); border-top: 1.5px solid var(--text-light);
    transform: rotate(-45deg); margin-left: 6px; animation: bounce 1.6s infinite;
}
@keyframes bounce { 0%,100% { transform: rotate(-45deg) translate(0,0); } 50% { transform: rotate(-45deg) translate(3px,-3px); } }

/* ================= H5-02 封面 ================= */
.page-cover { background: var(--bg); }
.cover-bg {
    position: absolute; inset: 0;
    background: linear-gradient(160deg, var(--primary-light), var(--primary));
    background-size: cover; background-position: center;
    transition: transform 8s ease-out;
}
.page-cover.active .cover-bg { transform: scale(1.06); }
.cover-mask { position: absolute; inset: 0; background: var(--cover-mask); }
.cover-inner {
    position: relative; flex: 1;
    display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
    color: #fff; text-align: center; padding: 9vh 22px 24px;
}
/* 顶部「吾家有喜」 */
.cover-badge { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; animation: fadeIn 1.2s ease both; }
.badge-text {
    font-family: var(--font-title);
    font-size: 32px; font-weight: 700; letter-spacing: 10px; text-indent: 10px;
    white-space: nowrap;
    background: linear-gradient(180deg, #fdf3d7 8%, #f5d78e 45%, var(--primary, #c9a06c) 100%);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 10px rgba(0,0,0,.45));
    margin: 0; line-height: 1.2;
}
.badge-orn {
    position: relative; width: 32px; height: 1px; flex-shrink: 0;
    background: linear-gradient(90deg, transparent, rgba(245,215,142,.9));
}
.badge-orn:last-child { transform: scaleX(-1); }
.badge-orn::after {
    content: ''; position: absolute; top: -2.5px; width: 6px; height: 6px;
    transform: rotate(45deg); background: #f5d78e;
    box-shadow: 0 0 8px rgba(245,215,142,.8);
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.cover-invite {
    font-size: 17px; letter-spacing: 3px; line-height: 2;
    opacity: .95; margin-bottom: 22px; max-width: 100%;
    text-shadow: 0 2px 12px rgba(0,0,0,.45);
}
.cover-names {
    font-family: var(--font-title);
    font-size: 34px; font-weight: 400; letter-spacing: 4px;
    text-shadow: 0 2px 18px rgba(0,0,0,.4); margin-bottom: 14px;
    display: flex; align-items: center; justify-content: center;
    text-indent: 4px;
}
.cover-names .heart {
    font-style: normal; font-size: 1em; margin: 0 10px; color: #ffb3c1;
    animation: beat 1.4s infinite; line-height: 1; letter-spacing: 0;
}
@keyframes beat { 0%,100% { transform: scale(1); } 25% { transform: scale(1.25); } }
.cover-date {
    font-family: var(--font-title);
    font-size: 25px; font-weight: 600; letter-spacing: 3px; opacity: .95;
    margin-bottom: 12px; text-shadow: 0 2px 14px rgba(0,0,0,.45);
}
.cover-date .date-tag {
    display: block; font-family: inherit; font-size: 22px; font-weight: 500;
    letter-spacing: 5px; opacity: .85; margin-bottom: 8px;
}
/* 封面地图位置 */
.cover-map { margin: 4px 0 16px; }
.cover-map .map-link {
    display: block; width: 72%; max-width: 300px; height: 92px;
    margin: 0 auto 8px; border-radius: 12px; overflow: hidden;
    border: 1px solid rgba(255,255,255,.55);
    box-shadow: 0 4px 22px rgba(0,0,0,.28);
}
.cover-map .map-link img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-map .map-icon {
    height: 72px; width: 72%; max-width: 300px; margin: 0 auto 8px;
    border-radius: 12px; border: 1px solid rgba(255,255,255,.35);
    background-size: 34px; box-shadow: 0 4px 22px rgba(0,0,0,.28);
}
.cover-map-addr {
    font-size: 13px; letter-spacing: 1px; opacity: .92;
    text-shadow: 0 1px 8px rgba(0,0,0,.5);
}
.cover-love {
    font-size: 14px; letter-spacing: 1px; opacity: .95; margin-bottom: 5vh;
    display: flex; align-items: center; justify-content: center; gap: 6px;
}
.cover-love i {
    font-style: normal; font-size: 13px; color: #ffb3c1;
    animation: beat 1.4s infinite;
}
.cover-love b {
    font-family: var(--font-title); font-size: 22px; font-weight: 600;
    color: #ffd9e0; margin: 0 2px; text-shadow: 0 2px 12px rgba(255,150,180,.5);
}
.cover-open { display: flex; align-items: center; gap: 12px; animation: floatUp 2.2s infinite; }
@keyframes floatUp { 0%,100% { transform: translateY(0); opacity: .9; } 50% { transform: translateY(-6px); opacity: 1; } }
.open-line { width: 36px; height: 1px; background: rgba(255,255,255,.7); }
.open-text { font-size: 13px; letter-spacing: 3px; border: 1px solid rgba(255,255,255,.65); padding: 8px 18px; border-radius: 22px; }

/* ================= H5-03 故事页 ================= */
.avatars { display: flex; align-items: center; justify-content: center; gap: 26px; margin: 16px 0 6px; }
.avatar-wrap { text-align: center; font-size: 13px; color: var(--text-light); }
.avatar {
    width: 86px; height: 86px; border-radius: 50%;
    background: var(--primary-light) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 86 86"><text x="43" y="54" font-size="34" text-anchor="middle">🤵</text></svg>') center/cover no-repeat;
    background-size: cover; border: 3px solid #fff; box-shadow: 0 6px 20px rgba(150,120,90,.25);
    margin-bottom: 8px;
}
.avatar.bride {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 86 86"><text x="43" y="54" font-size="34" text-anchor="middle">👰</text></svg>');
}
.avatar-love { color: #ffb3c1; font-size: 22px; animation: beat 1.4s infinite; }
.story-content { line-height: 2; font-size: 15px; color: var(--text); word-break: break-word; }
.rich-text img { max-width: 100% !important; height: auto; border-radius: 10px; margin: 8px 0; display: block; }
.rich-text p { margin: 6px 0; }
.page-gap { height: 40px; }

/* ================= H5-05b 联系与位置页 ================= */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 14px 0 18px; }
.contact-card {
    background: var(--card-bg); border-radius: var(--radius);
    box-shadow: 0 6px 18px rgba(150,120,90,.12); padding: 20px 14px 16px;
    text-align: center; position: relative;
}
/* 有祝福内容时头像上的提示角标 */
.contact-avatar.has-greet::before {
    content: '💬'; position: absolute; top: -4px;
    width: 24px; height: 24px; font-size: 13px; line-height: 24px;
    background: linear-gradient(135deg, #e05a6d, #c73a4e); color: #fff;
    border-radius: 50%; box-shadow: 0 2px 8px rgba(199,58,78,.4);
    animation: bubbleBadge 1.8s ease-in-out infinite;
}
@keyframes bubbleBadge { 0%,100% { transform: scale(1); } 50% { transform: scale(1.15); } }
.contact-avatar.groom.has-greet::before { left: -4px; }
.contact-avatar.bride.has-greet::before { right: -4px; }
.contact-avatar {
    width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 10px;
    background: var(--primary-light, #f0ebe4) center/cover no-repeat;
    border: 3px solid #fff; box-shadow: 0 4px 14px rgba(150,120,90,.2);
    display: flex; align-items: center; justify-content: center; font-size: 34px;
}
.contact-avatar.groom, .contact-avatar.bride { cursor: pointer; -webkit-tap-highlight-color: transparent; }
/* 头像点击弹出的祝福气泡（新郎左上 / 新娘右上） */
.greet-bubble {
    position: absolute; z-index: 20; max-width: 78%;
    background: linear-gradient(135deg, #fff, #fff8f3);
    border: 1px solid rgba(224,90,109,.25);
    border-radius: 14px; padding: 10px 13px;
    font-size: 13px; line-height: 1.7; color: #8a5a44;
    box-shadow: 0 8px 24px rgba(150,90,60,.22);
    animation: bubbleIn .32s cubic-bezier(.34,1.56,.64,1);
    pointer-events: none;
}
.greet-bubble.out { animation: bubbleOut .28s ease forwards; }
.greet-bubble::after {
    content: ''; position: absolute; bottom: -7px;
    width: 12px; height: 12px; background: inherit;
    border-right: 1px solid rgba(224,90,109,.25);
    border-bottom: 1px solid rgba(224,90,109,.25);
    transform: rotate(45deg);
}
.greet-bubble.left { left: 8px; top: 6px; }
.greet-bubble.left::after { left: 28px; }
.greet-bubble.right { right: 8px; top: 6px; }
.greet-bubble.right::after { right: 28px; }
@keyframes bubbleIn { from { opacity: 0; transform: translateY(10px) scale(.6); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes bubbleOut { to { opacity: 0; transform: translateY(8px) scale(.8); } }
.contact-name { font-size: 17px; font-weight: 600; color: var(--title-color); margin-bottom: 2px; }
.contact-role { font-size: 12px; color: var(--text-light); letter-spacing: 2px; margin-bottom: 14px; }
.contact-btn {
    display: block; padding: 9px 0; border-radius: 22px; font-size: 14px;
    background: linear-gradient(135deg, var(--primary), var(--title-color));
    color: #fff; letter-spacing: 1px; box-shadow: 0 4px 12px rgba(150,120,90,.35);
}
.contact-btn.bride { background: linear-gradient(135deg, #e8a0b4, #d4789a); box-shadow: 0 4px 12px rgba(212,120,154,.35); }
.contact-btn.disabled { background: #e9e4dc; color: #b3a89d; box-shadow: none; }
.contact-tel { font-size: 12px; color: var(--text-light); margin-top: 8px; letter-spacing: 1px; }

/* ================= H5-04 婚礼信息页 ================= */
.countdown { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 10px 0 12px; }
.cd-item {
    position: relative; width: 64px; padding: 13px 0 9px; border-radius: 14px;
    background: linear-gradient(160deg, rgba(255,255,255,.72), rgba(255,255,255,.38));
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,.85);
    box-shadow: 0 8px 22px rgba(150,120,90,.16), inset 0 1px 0 rgba(255,255,255,.9);
    text-align: center; overflow: hidden;
}
.cd-item::after { /* 顶部金色高光线 */
    content: ''; position: absolute; top: 0; left: 18%; right: 18%; height: 2px;
    border-radius: 0 0 3px 3px;
    background: linear-gradient(90deg, transparent, var(--primary, #c9a06c), transparent);
    opacity: .8;
}
.cd-item b {
    display: block; font-family: var(--font-title); font-size: 28px; font-weight: 600;
    line-height: 1.15; letter-spacing: 1px;
    background: linear-gradient(180deg, var(--title-color), var(--primary, #c9a06c));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.cd-item span { font-size: 10px; color: var(--text-light); letter-spacing: 1px; text-transform: uppercase; }
.cd-sep {
    width: 2px; height: 34px; border-radius: 2px; margin: 0 1px;
    background: linear-gradient(180deg, transparent, var(--primary, #c9a06c), transparent);
    opacity: .55; animation: cdPulse 1s infinite;
}
@keyframes cdPulse { 0%,100% { opacity: .55; } 50% { opacity: 1; } }
.cd-flip { animation: cdFlip .45s ease; }
@keyframes cdFlip {
    0% { transform: translateY(-8px); opacity: 0; filter: blur(2px); }
    100% { transform: translateY(0); opacity: 1; filter: blur(0); }
}
.cd-label {
    text-align: center; font-size: 17px; color: var(--title-color);
    font-weight: 600; letter-spacing: 3px; margin: 4px 0 16px;
    animation: cdBounce 1.6s ease-in-out infinite;
}
/* 婚礼日期（公历 + 农历） */
.wed-date-info { text-align: center; margin: 10px 0 20px; }
.wed-solar {
    font-size: 16px; font-weight: 600; color: var(--title-color);
    letter-spacing: 1px;
}
.wed-lunar {
    margin-top: 5px; font-size: 16px; font-weight: 600; color: var(--title-color);
    letter-spacing: 1px;
}
.wed-lunar i { font-style: normal; color: var(--primary, #c87ba0); font-size: 10px; margin: 0 4px; }
/* 婚礼当天天气与穿衣建议 */
.wed-weather {
    margin: 12px auto 0; padding: 10px 14px; max-width: 320px;
    background: rgba(255,255,255,.55); border-radius: 12px;
    box-shadow: 0 3px 10px rgba(150,120,90,.08);
}
.wed-weather .w-line { font-size: 14px; color: var(--title-color); letter-spacing: .5px; }
.wed-weather .w-line i { font-style: normal; margin-right: 4px; }
.wed-weather .w-line.sub { margin-top: 5px; font-size: 13px; color: var(--text-light); }
@keyframes cdBounce {
    0%,100% { transform: translateY(0) scale(1); }
    30%     { transform: translateY(-7px) scale(1.06); }
    55%     { transform: translateY(0) scale(1); }
    75%     { transform: translateY(-3px) scale(1.02); }
}

.info-card {
    background: var(--card-bg); border-radius: var(--radius);
    box-shadow: 0 6px 18px rgba(150,120,90,.12); padding: 6px 18px; margin-bottom: 16px;
}
.info-row { display: flex; align-items: center; gap: 14px; padding: 14px 4px; border-bottom: 1px dashed var(--primary-light); }
.info-row:last-child { border-bottom: none; }
.info-icon { font-size: 22px; }
.info-row em { font-style: normal; font-size: 12px; color: var(--text-light); display: block; margin-bottom: 3px; }
.info-row p { font-size: 15px; color: var(--text); }

.map-preview { padding: 14px 4px 16px; }
.map-icon { height: 90px; border-radius: 10px; margin-bottom: 12px;
    background: linear-gradient(135deg, #e8f4ea, #d9ecd9) center / 40px no-repeat;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40"><text x="20" y="28" font-size="26" text-anchor="middle">📍</text></svg>'), linear-gradient(135deg,#f9e8ea,#f3d5d9);
    display: flex; align-items: center; justify-content: center;
}
/* 静态地图（腾讯静态图 API） */
.map-link { display: block; height: 150px; border-radius: 10px; margin-bottom: 12px; overflow: hidden; background: #efe9e4; position: relative; }
.map-link img { width: 100%; height: 100%; object-fit: cover; display: block; }
.map-btns { display: flex; gap: 12px; }
.map-btn {
    flex: 1; text-align: center; padding: 11px 0; border-radius: 22px;
    font-size: 14px; color: #fff; text-decoration: none; letter-spacing: 1px;
}
.map-btn.amap { background: linear-gradient(135deg, #e05a6d, #c73a4e); }
.map-btn.bmap { background: linear-gradient(135deg, #e05a6d, #c73a4e); }

/* ================= H5-05 相册页 ================= */
.album-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.photo-item { position: relative; border-radius: 10px; overflow: hidden; cursor: pointer; aspect-ratio: 3/4; background: var(--primary-light); }
.photo-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.photo-item:active img { transform: scale(1.05); }
.photo-item.video::after {
    content: '▶'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    font-size: 26px; color: rgba(255,255,255,.95); text-shadow: 0 0 12px rgba(0,0,0,.6);
    background: linear-gradient(180deg, rgba(0,60,120,.06) 40%, rgba(0,0,0,.35));
}
.video-tag {
    position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.5); color: #fff;
    font-size: 10px; padding: 2px 8px; border-radius: 10px; letter-spacing: 1px;
}

/* 图片/视频 预览 */
.viewer { position: fixed; inset: 0; z-index: 500; background: rgba(0,0,0,.92); }
.viewer-close { position: absolute; top: 16px; right: 18px; z-index: 2; color: #fff; font-size: 22px; cursor: pointer; padding: 6px; }
.viewer-body { height: 100%; display: flex; align-items: center; justify-content: center; }
.viewer-body img { max-width: 100%; max-height: 100%; object-fit: contain; touch-action: pinch-zoom; }
.viewer-body video { max-width: 100%; max-height: 100%; }
/* 查看器左右切换 */
.viewer-nav {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
    width: 44px; height: 44px; margin-top: -22px; line-height: 40px;
    text-align: center; color: #fff; font-size: 30px; font-family: serif;
    background: rgba(255,255,255,.14); border-radius: 50%; cursor: pointer;
    -webkit-tap-highlight-color: transparent; user-select: none;
}
.viewer-nav:active { background: rgba(255,255,255,.3); }
.viewer-nav.prev { left: 12px; }
.viewer-nav.next { right: 12px; }
.viewer-nav.hidden { display: none; }
.viewer-count {
    position: absolute; bottom: 24px; left: 0; right: 0; z-index: 2;
    text-align: center; color: rgba(255,255,255,.85); font-size: 13px; letter-spacing: 1px;
}
.viewer-body img.slide-in { animation: viewerFade .25s ease; }
@keyframes viewerFade { from { opacity: 0; } to { opacity: 1; } }

/* ================= H5-06 RSVP ================= */
.rsvp-tip { text-align: center; font-size: 12px; color: var(--text-light); margin: -12px 0 18px; }
.rsvp-form, .msg-form {
    background: var(--card-bg); border-radius: var(--radius);
    box-shadow: 0 6px 18px rgba(150,120,90,.12); padding: 20px 18px 22px;
}
.form-item { margin-bottom: 16px; }
.form-item label { display: block; font-size: 13px; color: var(--text); margin-bottom: 8px; }
.form-item label i { color: #e05a5a; font-style: normal; }
.form-item input, .form-item select, .form-item textarea,
.msg-form input, .msg-form textarea {
    width: 100%; padding: 12px 14px; border: 1px solid var(--primary-light);
    border-radius: 10px; font-size: 15px; background: #fff; color: var(--text); outline: none;
    font-family: var(--font-body);
}
.form-item input:focus, .form-item textarea:focus, .msg-form input:focus, .msg-form textarea:focus { border-color: var(--primary); }
.form-item textarea { resize: none; }
.radio-group { display: flex; gap: 14px; }
.radio {
    flex: 1; text-align: center; padding: 11px 0; border-radius: 10px;
    border: 1px solid var(--primary-light); font-size: 14px; cursor: pointer; transition: all .25s;
    color: var(--text);
}
.radio.checked { background: var(--primary); border-color: var(--primary); color: #fff; }
.radio input { display: none; }
.submit-btn {
    width: 100%; margin-top: 6px; padding: 14px 0; border: none; border-radius: 26px;
    background: linear-gradient(135deg, var(--primary), var(--title-color));
    color: #fff; font-size: 16px; letter-spacing: 4px; cursor: pointer; font-weight: 600;
}
.submit-btn:active { opacity: .85; }
.submit-btn:disabled { background: #ccc; cursor: not-allowed; }
.submit-btn.small { padding: 11px 0; font-size: 14px; margin-top: 12px; }

/* ================= H5-07 留言墙 ================= */
.msg-list { margin-top: 16px; }
.msg-card {
    background: var(--card-bg); border-radius: var(--radius);
    box-shadow: 0 4px 14px rgba(150,120,90,.1); padding: 14px 16px; margin-bottom: 12px;
    animation: fadeUp .5s ease;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } }
.msg-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.msg-avatar {
    width: 34px; height: 34px; border-radius: 50%; background: var(--primary-light);
    display: flex; align-items: center; justify-content: center; font-size: 15px; color: #fff;
}
.msg-nick { font-size: 14px; color: var(--title-color); font-weight: 600; }
.msg-time { font-size: 11px; color: #c3b6ac; margin-left: auto; }
.msg-content { font-size: 14px; line-height: 1.8; color: var(--text); word-break: break-word; }
.msg-like { margin-top: 8px; text-align: right; font-size: 12px; color: var(--text-light); }
.msg-like span { cursor: pointer; }
.msg-like span.liked { color: #e07070; }
.load-more {
    display: block; width: 100%; margin-top: 6px; padding: 11px;
    background: none; border: 1px dashed var(--primary-light); border-radius: 10px;
    color: var(--text-light); font-size: 13px;
}

/* ================= H5-08 底部导航 ================= */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0; height: 56px; z-index: 200;
    display: flex; background: var(--nav-bg);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 -2px 14px rgba(100,80,60,.08);
    padding-bottom: env(safe-area-inset-bottom);
}
.nav-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; text-decoration: none; color: var(--text-light); font-size: 10px; cursor: pointer;
    transition: color .25s;
}
.nav-item i { font-style: normal; font-size: 19px; line-height: 1; }
.nav-item i.nav-word { font-size: 12px; line-height: 19px; letter-spacing: 1px; font-weight: 600; }
.nav-item.active { color: var(--primary); font-weight: 600; }

/* ================= 音乐按钮 ================= */
.music-btn {
    position: fixed; top: 16px; right: 16px; z-index: 210;
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(255,255,255,.88); box-shadow: 0 3px 12px rgba(100,80,60,.2);
    display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.music-btn span { color: var(--primary); font-size: 18px; }
.music-btn.playing { animation: rotate360 4s linear infinite; }
@keyframes rotate360 { to { transform: rotate(360deg); } }

/* 分享按钮 */
.share-btn {
    position: fixed; top: 16px; right: 64px; z-index: 210;
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(255,255,255,.88); box-shadow: 0 3px 12px rgba(100,80,60,.2);
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    color: var(--primary); font-size: 18px; font-weight: bold;
}

/* ================= 弹幕特效 ================= */
.danmaku-layer { position: fixed; inset: 0 0 56px 0; z-index: 150; pointer-events: none; overflow: hidden; }
.danmaku-item {
    position: absolute; left: 100%; white-space: nowrap;
    font-size: 14px; color: var(--title-color); opacity: .85;
    text-shadow: 0 1px 3px rgba(255,255,255,.8);
    animation: danmakuMove linear forwards;
}
@keyframes danmakuMove { to { transform: translateX(calc(-100vw - 100%)); } }

/* 花瓣层 */
.petal { position: fixed; top: -30px; z-index: 140; pointer-events: none; opacity: .9;
    animation: petalFall linear forwards; }
@keyframes petalFall {
    to { transform: translateY(110vh) translateX(60px) rotate(360deg); opacity: .4; }
}

/* 烟花画布 */
#fireworksCanvas { position: fixed; inset: 0; z-index: 160; pointer-events: none; }

/* ================= H5-09 分享弹窗 ================= */
.share-mask {
    position: fixed; inset: 0; z-index: 600; background: rgba(0,0,0,.65);
    display: flex; align-items: center; justify-content: center; padding: 30px;
}
.share-dialog {
    background: #fff; border-radius: 16px; padding: 28px 24px; max-width: 340px; width: 100%;
    text-align: center; position: relative; animation: fadeUp .4s;
}
.share-arrow { position: absolute; top: -60px; right: 30px; font-size: 52px; color: #ffd75e; animation: bounce2 1s infinite; }
@keyframes bounce2 { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.share-dialog h3 { font-size: 18px; color: #444; margin-bottom: 10px; }
.share-dialog p { font-size: 13px; color: #888; line-height: 1.9; margin-bottom: 18px; }
.share-preview {
    display: flex; gap: 10px; align-items: center; background: #f7f7f7;
    padding: 10px; border-radius: 10px; margin-bottom: 20px; text-align: left;
}
.share-preview img { width: 52px; height: 52px; border-radius: 6px; object-fit: cover; background: #eee; }
.sp-text { overflow: hidden; }
.sp-text b { display: block; font-size: 14px; color: #333; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-text span { font-size: 12px; color: #999; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.share-dialog button {
    width: 100%; padding: 12px; border: none; border-radius: 22px;
    background: var(--primary); color: #fff; font-size: 15px; cursor: pointer;
}

/* ================= 弹窗提示 ================= */
.toast {
    position: fixed; top: 42%; left: 50%; transform: translate(-50%, -50%); z-index: 800;
    background: rgba(0,0,0,.75); color: #fff; padding: 16px 26px; border-radius: 12px;
    font-size: 14px; line-height: 1.8; max-width: 76vw; text-align: center; animation: fadeUp .3s;
}

/* ================= PC 自适应（>=768px 竖屏卡片式） ================= */
@media (min-width: 768px) {
    .app { position: relative; height: 100%; display: flex; align-items: center; justify-content: center; background: var(--primary-light); }
    .page, .bottom-nav {
        width: 430px; left: 50%; transform: translateX(-50%);
        margin: 0; height: calc(100% - 30px); top: 15px; border-radius: 22px;
        box-shadow: 0 18px 50px rgba(90,60,40,.22); overflow: hidden;
    }
    .bottom-nav { top: auto; bottom: 15px; height: 56px; border-radius: 18px; }
    .page.active { transform: translateX(-50%); }
    .page:not(.active) { transform: translateX(-50%) translateY(24px) scale(.98); }
    .page.no-anim { transition: none !important; }
    .music-btn, .share-btn { top: 32px; }
    .music-btn { right: calc(50% - 215px + 16px); }
    .share-btn { right: calc(50% - 215px + 64px); }
    .cover-names { font-size: 40px; }
    .section-title { font-size: 27px; }
}
