/* =====================================================
   爱情小屋 · Love House — 紧凑浪漫主题样式
   ===================================================== */
:root {
    --pink: #e91e63;
    --pink-deep: #c2185b;
    --rose: #ff8fab;
    --purple: #b57bea;
    --gold: #d4af37;
    --ink: #4a2040;
    --ink-light: #9c6b90;
    --bg1: #fff0f5;
    --bg2: #ffe3ec;
    --bg3: #f3e7ff;
    --card: rgba(255, 255, 255, .68);
    --shadow: 0 6px 20px rgba(233, 30, 99, .12);
    --radius: 18px;
}
body.skin-candy { --pink: #ff7b9c; --pink-deep: #e85d8b; --purple: #72c6ef; --bg1: #fff7d6; --bg2: #ffe0ec; --bg3: #dff7ff; }
body.skin-forest { --pink: #3c9b78; --pink-deep: #237052; --purple: #7bbf91; --bg1: #e9f8ed; --bg2: #d4f0df; --bg3: #e5e0f7; }
body.skin-galaxy { --pink: #c77dff; --pink-deep: #8b5cf6; --purple: #00d4ff; --ink: #f2e9ff; --ink-light: #b9a9d6; --bg1: #10002b; --bg2: #240046; --bg3: #3c096c; --card: rgba(25, 8, 60, .72); --shadow: 0 8px 28px rgba(124, 58, 237, .35); }
body.skin-neon { --pink: #ff2bd6; --pink-deep: #ff0080; --purple: #00f5d4; --ink: #e8ffff; --ink-light: #9efcf2; --bg1: #080014; --bg2: #16002b; --bg3: #001f2e; --card: rgba(8, 0, 25, .72); --shadow: 0 0 24px rgba(255, 43, 214, .25); }
body.skin-ocean { --pink: #00d9ff; --pink-deep: #0084ff; --purple: #7b61ff; --ink: #e7fbff; --ink-light: #a4dbe6; --bg1: #001d2e; --bg2: #003b5c; --bg3: #075985; --card: rgba(0, 35, 55, .72); --shadow: 0 8px 28px rgba(0, 217, 255, .22); }
body.skin-sunset { --pink: #ff6b35; --pink-deep: #e63946; --purple: #ffca3a; --ink: #fff5e6; --ink-light: #ffd1a9; --bg1: #421b1b; --bg2: #7f2d24; --bg3: #c2410c; --card: rgba(70, 20, 20, .7); --shadow: 0 8px 28px rgba(255, 107, 53, .28); }
body.skin-aurora { --pink: #a78bfa; --pink-deep: #6366f1; --purple: #2dd4bf; --ink: #effffc; --ink-light: #b9e8dc; --bg1: #042f2e; --bg2: #134e4a; --bg3: #164e63; --card: rgba(4, 35, 39, .7); --shadow: 0 8px 28px rgba(45, 212, 191, .26); }

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 14.5px;
    color: var(--ink);
    background: linear-gradient(120deg, var(--bg1), var(--bg2), var(--bg3), var(--bg1));
    background-size: 400% 400%;
    animation: bgmove 24s ease infinite;
    min-height: 100vh;
    overflow-x: hidden;
}
@keyframes bgmove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
body.skin-galaxy, body.skin-neon, body.skin-ocean, body.skin-sunset, body.skin-aurora { background-image: radial-gradient(circle at 15% 15%, rgba(255,255,255,.12), transparent 24%), radial-gradient(circle at 85% 80%, rgba(255,255,255,.1), transparent 26%), linear-gradient(120deg, var(--bg1), var(--bg2), var(--bg3), var(--bg1)); }
body.skin-galaxy .glass, body.skin-neon .glass, body.skin-ocean .glass, body.skin-sunset .glass, body.skin-aurora .glass { border-color: rgba(255,255,255,.2); }
body.skin-neon .hero-names, body.skin-neon .btn-main, body.skin-neon .mascot-badge { filter: drop-shadow(0 0 10px rgba(255,43,214,.65)); }
body.skin-galaxy .hero-names, body.skin-ocean .hero-names, body.skin-aurora .hero-names { filter: drop-shadow(0 0 8px rgba(0,212,255,.45)); }

/* 深色皮肤统一提升对比度，避免原主题固定深色文字在深色背景上不可读 */
body.skin-galaxy, body.skin-neon, body.skin-ocean, body.skin-sunset, body.skin-aurora { color: var(--ink); }
body.skin-galaxy .hero-quote, body.skin-neon .hero-quote, body.skin-ocean .hero-quote, body.skin-sunset .hero-quote, body.skin-aurora .hero-quote,
body.skin-galaxy .diary-card .d-content, body.skin-neon .diary-card .d-content, body.skin-ocean .diary-card .d-content, body.skin-sunset .diary-card .d-content, body.skin-aurora .diary-card .d-content,
body.skin-galaxy .tl-item p, body.skin-neon .tl-item p, body.skin-ocean .tl-item p, body.skin-sunset .tl-item p, body.skin-aurora .tl-item p,
body.skin-galaxy .bless-card .b-content, body.skin-neon .bless-card .b-content, body.skin-ocean .bless-card .b-content, body.skin-sunset .bless-card .b-content, body.skin-aurora .bless-card .b-content,
body.skin-galaxy .period-item .pi-note, body.skin-neon .period-item .pi-note, body.skin-ocean .period-item .pi-note, body.skin-sunset .period-item .pi-note, body.skin-aurora .period-item .pi-note { color: var(--ink) !important; }
body.skin-galaxy .nav, body.skin-neon .nav, body.skin-ocean .nav, body.skin-sunset .nav, body.skin-aurora .nav { background: rgba(10, 10, 28, .88); border-color: rgba(255,255,255,.24); }
body.skin-galaxy .nav a, body.skin-neon .nav a, body.skin-ocean .nav a, body.skin-sunset .nav a, body.skin-aurora .nav a { color: var(--ink); }
body.skin-galaxy input, body.skin-galaxy select, body.skin-galaxy textarea, body.skin-neon input, body.skin-neon select, body.skin-neon textarea, body.skin-ocean input, body.skin-ocean select, body.skin-ocean textarea, body.skin-sunset input, body.skin-sunset select, body.skin-sunset textarea, body.skin-aurora input, body.skin-aurora select, body.skin-aurora textarea { color: var(--ink); background: rgba(15, 15, 35, .86); border-color: color-mix(in srgb, var(--purple) 55%, transparent); }
body.skin-galaxy .btn-ghost, body.skin-neon .btn-ghost, body.skin-ocean .btn-ghost, body.skin-sunset .btn-ghost, body.skin-aurora .btn-ghost { color: var(--ink); background: rgba(20, 20, 45, .86); border-color: color-mix(in srgb, var(--pink) 65%, white); }
body.skin-galaxy .form-box, body.skin-neon .form-box, body.skin-ocean .form-box, body.skin-sunset .form-box, body.skin-aurora .form-box { background: rgba(10, 10, 28, .62); border-color: color-mix(in srgb, var(--purple) 45%, transparent); }
body.skin-galaxy .photo-item .p-caption, body.skin-neon .photo-item .p-caption, body.skin-ocean .photo-item .p-caption, body.skin-sunset .photo-item .p-caption, body.skin-aurora .photo-item .p-caption,
body.skin-galaxy .bd-surprise, body.skin-neon .bd-surprise, body.skin-ocean .bd-surprise, body.skin-sunset .bd-surprise, body.skin-aurora .bd-surprise { color: var(--ink); background: rgba(10, 10, 28, .7); }

/* ---------- 飘浮爱心背景 ---------- */
.f-heart {
    position: fixed;
    bottom: -50px;
    font-size: 20px;
    opacity: .35;
    pointer-events: none;
    z-index: 0;
    animation: floatUp linear forwards;
}
@keyframes floatUp {
    0% { transform: translateY(0) rotate(0deg) scale(1); opacity: .35; }
    100% { transform: translateY(-115vh) rotate(360deg) scale(1.2); opacity: 0; }
}

/* ---------- 通用 ---------- */
.glass {
    background: var(--card);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, .8);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px 20px;
    position: relative;
    z-index: 1;
}

.btn-main {
    display: inline-block;
    border: none;
    cursor: pointer;
    padding: 9px 22px;
    font-size: .88rem;
    font-weight: 600;
    letter-spacing: .06em;
    color: #fff;
    background: linear-gradient(120deg, var(--pink), var(--purple));
    border-radius: 999px;
    box-shadow: 0 6px 16px rgba(233, 30, 99, .32);
    transition: transform .25s, box-shadow .25s, filter .25s;
    text-decoration: none;
}
.btn-main:hover { transform: translateY(-2px) scale(1.02); filter: brightness(1.08); box-shadow: 0 9px 20px rgba(233, 30, 99, .4); }
.btn-main:active { transform: scale(.97); }

.btn-ghost {
    display: inline-block;
    padding: 6px 16px;
    font-size: .82rem;
    color: var(--pink-deep);
    background: rgba(255, 255, 255, .8);
    border: 1.5px solid rgba(233, 30, 99, .35);
    border-radius: 999px;
    cursor: pointer;
    text-decoration: none;
    transition: all .25s;
    font-weight: 600;
}
.btn-ghost:hover { background: linear-gradient(120deg, var(--pink), var(--purple)); color: #fff; border-color: transparent; }

.export-bar { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.skin-switcher, .mascot-switcher { white-space: nowrap; color: var(--ink-light); font-size: .78rem; }
.skin-switcher select, .mascot-switcher select { padding: 5px 8px; font-size: .78rem; }
.mascot-badge { width: 148px; height: 148px; flex: 0 0 148px; overflow: hidden; border-radius: 24px; background: rgba(255,255,255,.55); box-shadow: 0 8px 22px rgba(233,30,99,.18); }
.mascot-badge video { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 680px) {
    .mascot-badge { width: 112px; height: 112px; flex-basis: 112px; }
}

input, select, textarea {
    font-size: .88rem;
    color: var(--ink);
    padding: 8px 12px;
    border: 1.5px solid rgba(233, 30, 99, .22);
    border-radius: 10px;
    background: rgba(255, 255, 255, .85);
    outline: none;
    transition: border-color .25s, box-shadow .25s;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--pink);
    box-shadow: 0 0 0 3px rgba(233, 30, 99, .12);
}
textarea { resize: vertical; width: 100%; }

/* ---------- 折叠式添加框 ---------- */
.add-box { margin-bottom: 14px; }
.add-box summary {
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 7px 18px;
    font-size: .86rem;
    font-weight: 600;
    color: var(--pink-deep);
    background: linear-gradient(120deg, rgba(255, 143, 171, .16), rgba(181, 123, 234, .16));
    border: 1.5px dashed rgba(233, 30, 99, .4);
    border-radius: 999px;
    transition: all .25s;
    user-select: none;
}
.add-box summary::-webkit-details-marker { display: none; }
.add-box summary::before { content: '＋'; font-size: 1rem; line-height: 1; transition: transform .3s; }
.add-box[open] summary::before { transform: rotate(45deg); }
.add-box summary:hover { background: linear-gradient(120deg, var(--pink), var(--purple)); color: #fff; border-style: solid; }
body.export-mode .add-box { display: none; }

/* ---------- Hero（紧凑横排） ---------- */
.hero {
    position: relative;
    padding: 30px 20px 18px;
    z-index: 1;
}
.hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.hero-left { display: flex; align-items: center; gap: 16px; }
.hero-logo { font-size: 2.4rem; animation: floaty 3s ease-in-out infinite; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.hero-names {
    font-family: "STKaiti", "KaiTi", "Noto Serif SC", serif;
    font-size: clamp(1.6rem, 3.5vw, 2.3rem);
    letter-spacing: .08em;
    background: linear-gradient(90deg, var(--pink), var(--purple), var(--pink));
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shine 5s linear infinite;
}
@keyframes shine { to { background-position: 200% center; } }

.heart-beat {
    display: inline-block;
    color: var(--pink);
    font-style: normal;
    animation: beat 1.2s ease-in-out infinite;
    margin: 0 .12em;
}
@keyframes beat { 0%, 100% { transform: scale(1); } 30% { transform: scale(1.3); } }

.hero-quote { margin-top: 4px; font-family: "STKaiti", "KaiTi", serif; color: #a06b98; font-size: .88rem; }

.hero-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.hero-date { color: var(--ink-light); font-size: .78rem; letter-spacing: .22em; }

.counters { display: flex; gap: 8px; }
.counter {
    background: rgba(255, 255, 255, .75);
    border: 1px solid rgba(233, 30, 99, .18);
    border-radius: 12px;
    padding: 7px 4px;
    min-width: 62px;
    text-align: center;
    box-shadow: var(--shadow);
}
.counter b { display: block; font-size: 1.3rem; color: var(--pink); font-family: Georgia, serif; line-height: 1.25; }
.counter span { font-size: .66rem; color: var(--ink-light); letter-spacing: .12em; }

/* ---------- 导航 ---------- */
.nav {
    position: sticky;
    top: 8px;
    z-index: 50;
    max-width: 1200px;
    margin: 10px auto 16px;
    padding: 7px 14px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2px;
    background: rgba(255, 255, 255, .78);
    backdrop-filter: blur(14px);
    border-radius: 999px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, .8);
    width: fit-content;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
}
.nav a {
    text-decoration: none;
    color: var(--ink);
    font-size: .82rem;
    padding: 6px 11px;
    border-radius: 999px;
    transition: background .25s, color .25s;
    white-space: nowrap;
}
.nav a:hover { background: linear-gradient(120deg, var(--pink), var(--purple)); color: #fff; }

/* ---------- 12 栅格布局 ---------- */
.layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px 30px;
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 16px;
    align-items: start;
}
.span-12 { grid-column: span 12; }
.span-7 { grid-column: span 7; }
.span-6 { grid-column: span 6; }
.span-5 { grid-column: span 5; }

.sec { scroll-margin-top: 64px; }

/* ---------- 板块标题（紧凑单行） ---------- */
.sec-head {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(233, 30, 99, .14);
    flex-wrap: wrap;
}
.section-icon { font-size: 1.2rem; animation: floaty 3.4s ease-in-out infinite; }
.sec-head h2 {
    font-family: "STKaiti", "KaiTi", serif;
    font-size: 1.25rem;
    letter-spacing: .1em;
    color: var(--pink-deep);
}
.section-sub { color: var(--ink-light); font-size: .78rem; letter-spacing: .05em; }

/* ---------- 表单（紧凑） ---------- */
.form-box { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; padding: 14px; border-radius: 12px; background: rgba(255, 240, 245, .6); border: 1px dashed rgba(233, 30, 99, .25); }
.form-row { display: grid; grid-template-columns: 140px 1fr 110px; gap: 8px; }
.form-inline { flex-direction: row; align-items: center; flex-wrap: wrap; margin-bottom: 0; }
.form-inline input[type="text"], .form-inline input[type="date"], .form-inline select { flex: 1; min-width: 130px; }
.form-inline input[type="file"] { flex: 1.2; min-width: 180px; background: none; border: none; padding: 4px; }
.form-inline label { color: var(--ink-light); font-size: .85rem; }
body.export-mode .form-box { display: none; }

/* ---------- 恋爱计时（横条） ---------- */
.milestone { margin-bottom: 8px; }
.milestone p { color: var(--ink-light); font-size: .85rem; margin-bottom: 6px; }
.progress { height: 8px; background: rgba(233, 30, 99, .12); border-radius: 999px; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--pink), var(--purple), var(--gold)); transition: width 1s ease; }
.stat-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 8px; }
.chip {
    background: rgba(255, 255, 255, .8);
    border: 1px solid rgba(233, 30, 99, .18);
    border-radius: 999px;
    padding: 5px 14px;
    font-size: .8rem;
    color: var(--ink);
}
#timer .form-box { margin-top: 4px; }
#timer .form-inline { padding: 10px; }
.milestone-row { display: flex; align-items: center; gap: 14px; }

/* ---------- 恋爱日记（双列小卡） ---------- */
.diary-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.diary-card {
    background: rgba(255, 255, 255, .85);
    border-radius: 14px;
    padding: 14px;
    box-shadow: var(--shadow);
    border-top: 3px solid var(--rose);
    font-size: .85rem;
}
.diary-card .d-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.diary-card .d-date { font-size: .74rem; color: var(--ink-light); }
.diary-card .d-mood { font-size: 1.2rem; }
.diary-card h4 { font-size: .95rem; color: var(--pink-deep); margin-bottom: 5px; }
.diary-card .d-content { font-size: .84rem; line-height: 1.7; color: #5c3a54; white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- 甜蜜瞬间（紧凑列表） ---------- */
.moment-list { display: flex; flex-direction: column; gap: 8px; max-height: 380px; overflow-y: auto; padding-right: 4px; }
.moment-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(140deg, rgba(255, 143, 171, .14), rgba(181, 123, 234, .14));
    border: 1px solid rgba(233, 30, 99, .16);
    border-radius: 12px;
    padding: 9px 13px;
    transition: transform .25s;
}
.moment-card:hover { transform: translateX(3px); }
.moment-card .m-heart { font-size: 1rem; animation: beat 1.4s ease-in-out infinite; flex: none; }
.moment-card p { flex: 1; font-size: .85rem; line-height: 1.6; }
.moment-card .m-date { font-size: .7rem; color: var(--ink-light); flex: none; }

/* ---------- 恋爱记忆（紧凑时间轴） ---------- */
.timeline { position: relative; padding-left: 24px; max-height: 420px; overflow-y: auto; }
.timeline::before {
    content: '';
    position: absolute;
    left: 6px; top: 6px; bottom: 6px;
    width: 2.5px;
    background: linear-gradient(180deg, var(--pink), var(--purple));
    border-radius: 3px;
}
.tl-item {
    position: relative;
    margin-bottom: 14px;
    background: rgba(255, 255, 255, .85);
    border-radius: 12px;
    padding: 12px 15px;
    box-shadow: var(--shadow);
    font-size: .85rem;
}
.tl-item::before {
    content: '❤';
    position: absolute;
    left: -24px; top: 14px;
    width: 16px; height: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 9px;
    color: #fff;
    background: var(--pink);
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(233, 30, 99, .16);
}
.tl-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: .74rem; color: var(--ink-light); margin-bottom: 4px; }
.tl-item h4 { color: var(--pink-deep); margin-bottom: 4px; font-size: .92rem; }
.tl-item p { font-size: .84rem; line-height: 1.7; color: #5c3a54; }

/* ---------- 未来计划 ---------- */
.plan-progress { display: flex; align-items: center; gap: 10px; margin: 4px 0 12px; }
.plan-progress .progress { flex: 1; }
.plan-progress span { font-size: .76rem; color: var(--ink-light); white-space: nowrap; }
.plan-list { display: flex; flex-direction: column; gap: 8px; }
.plan-item {
    display: flex; align-items: center; gap: 10px;
    background: rgba(255, 255, 255, .85);
    border-radius: 12px; padding: 10px 13px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform .25s, opacity .25s;
}
.plan-item:hover { transform: translateX(4px); }
.plan-item .p-check {
    width: 22px; height: 22px; flex: none;
    border-radius: 50%;
    border: 2px solid var(--rose);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 12px; font-weight: 700;
}
.plan-item.done .p-check { background: linear-gradient(120deg, var(--pink), var(--purple)); border-color: transparent; }
.plan-item .p-content { flex: 1; font-size: .88rem; }
.plan-item.done .p-content { text-decoration: line-through; opacity: .55; }
.plan-item .p-deadline { font-size: .72rem; color: var(--ink-light); }
body.export-mode .plan-item { cursor: default; }

/* ---------- 照片墙 ---------- */
.photo-grid { columns: 4 190px; column-gap: 12px; max-height: 620px; overflow-y: auto; }
.photo-item {
    break-inside: avoid;
    margin-bottom: 12px;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: var(--shadow);
    cursor: zoom-in;
    position: relative;
}
.photo-item img { width: 100%; display: block; transition: transform .45s; }
.photo-item:hover img { transform: scale(1.05); }
.photo-item .p-caption { padding: 7px 12px; font-size: .78rem; color: #5c3a54; background: rgba(255, 240, 245, .7); }
.photo-item .p-ribbon {
    position: absolute; top: 8px; left: 8px;
    background: rgba(233, 30, 99, .85);
    color: #fff;
    font-size: .66rem;
    padding: 2px 9px;
    border-radius: 999px;
}

/* ---------- 生理期关怀 ---------- */
.period-top { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.period-status {
    flex: 1.6; min-width: 260px;
    display: flex; align-items: center; gap: 16px;
    background: linear-gradient(135deg, rgba(255, 143, 171, .16), rgba(181, 123, 234, .16));
    border: 1px solid rgba(233, 30, 99, .18);
    border-radius: 14px;
    padding: 16px 20px;
}
.period-status .ps-icon { font-size: 2.2rem; animation: floaty 3s ease-in-out infinite; }
.period-status .ps-icon.ongoing { animation: beat 1.4s ease-in-out infinite; }
.period-status .ps-text { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.period-status .ps-text b { font-size: 1.05rem; color: var(--pink-deep); }
.period-status .ps-text span { font-size: .84rem; color: var(--ink-light); }
.period-status .ps-cycle {
    display: flex; flex-direction: column; align-items: center;
    background: rgba(255, 255, 255, .85);
    border: 1px solid rgba(233, 30, 99, .18);
    border-radius: 12px; padding: 8px 14px; flex: none;
}
.period-status .ps-cycle span { font-size: .68rem; color: var(--ink-light); }
.period-status .ps-cycle b { font-size: 1.5rem; color: var(--pink); font-family: Georgia, serif; line-height: 1.2; }
.period-status .ps-cycle.warn {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, .22);
    animation: beat 1.6s ease-in-out infinite;
}

.period-side { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 8px; }
.mini-label { display: flex; align-items: center; gap: 5px; font-size: .8rem; color: var(--ink-light); white-space: nowrap; }
.mini-label input { width: 62px; padding: 6px 8px; }
.setting-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.setting-tip { font-size: .72rem; color: var(--ink-light); line-height: 1.6; }

.period-cycle { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.period-cycle .pc-label { font-size: .78rem; color: var(--ink-light); }
.period-cycle .pc-item {
    font-size: .72rem; line-height: 1.5; text-align: center;
    background: rgba(255, 255, 255, .8);
    border: 1px solid rgba(233, 30, 99, .16);
    border-radius: 10px; padding: 6px 12px; color: var(--ink-light);
}
.period-cycle .pc-item.now { background: linear-gradient(120deg, var(--pink), var(--purple)); color: #fff; border-color: transparent; }

.period-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-top: 14px; }
.period-item {
    display: flex; align-items: center; gap: 10px;
    background: rgba(255, 255, 255, .82);
    border-left: 3px solid var(--rose);
    border-radius: 10px; padding: 10px 13px;
    box-shadow: var(--shadow);
}
.period-item .pi-date { flex: none; display: flex; flex-direction: column; }
.period-item .pi-date b { font-size: .95rem; color: var(--pink-deep); }
.period-item .pi-date span { font-size: .68rem; color: var(--ink-light); }
.period-item .pi-date .ongoing { color: var(--pink); }
.period-item .pi-info { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.period-item .pi-gap { font-size: .72rem; color: var(--ink-light); }
.period-item .pi-note { font-size: .74rem; color: #5c3a54; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-xs { padding: 4px 10px; font-size: .72rem; }

/* ---------- 祝福留言（已停用，保留样式兼容旧数据） ---------- */
.blessing-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; max-height: 420px; overflow-y: auto; padding: 4px 2px; }
.bless-card {
    background: #fffdf6;
    border: 1px solid rgba(212, 175, 55, .3);
    border-radius: 4px 16px 4px 16px;
    padding: 14px;
    box-shadow: var(--shadow);
    position: relative;
    transition: transform .3s;
}
.bless-card:nth-child(odd) { transform: rotate(-1deg); }
.bless-card:nth-child(even) { transform: rotate(1deg); }
.bless-card:hover { transform: rotate(0) scale(1.04); z-index: 2; }
.bless-card::before { content: '“'; position: absolute; top: 0; left: 8px; font-size: 1.9rem; color: rgba(212, 175, 55, .45); font-family: Georgia, serif; }
.bless-card .b-content { font-size: .84rem; line-height: 1.7; color: #5c3a54; margin-bottom: 8px; }
.bless-card .b-meta { font-size: .72rem; color: var(--ink-light); text-align: right; }
.bless-card .b-meta b { color: var(--pink); }

/* ---------- 许愿树（整行宽幅） ---------- */
.tree-area {
    position: relative;
    height: 460px;
    border-radius: 16px;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 20% 15%, rgba(181, 123, 234, .25), transparent 45%),
        radial-gradient(ellipse at 80% 10%, rgba(255, 143, 171, .3), transparent 45%),
        linear-gradient(180deg, #fdeef7 0%, #fce4ec 55%, #f8d7e3 100%);
    border: 1px solid rgba(233, 30, 99, .15);
}
.tree-area::before {
    content: '✦ ✧ ✦ ✧ ✦ ✧ ✦ ✧ ✦ ✧ ✦ ✧ ✦ ✧ ✦ ✧';
    position: absolute;
    inset: 12px;
    color: rgba(212, 175, 55, .55);
    font-size: .72rem;
    letter-spacing: 2.4em;
    pointer-events: none;
    animation: twinkle 3s ease-in-out infinite;
}
/* 整行时树居中放大 */
#wishes .tree { transform: translateX(-50%) scale(1.05); width: 420px; height: 500px; }
@keyframes twinkle { 0%, 100% { opacity: .4; } 50% { opacity: 1; } }
.tree { position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%) scale(.78); transform-origin: bottom center; width: 340px; height: 400px; pointer-events: none; }
#wishes .tree-crown {
    position: absolute; top: 26px; left: 50%; transform: translateX(-50%);
    width: 400px; height: 360px;
    background:
        radial-gradient(circle at 30% 30%, #7fc97f 0 26%, transparent 27%),
        radial-gradient(circle at 70% 28%, #6fbf6f 0 25%, transparent 26%),
        radial-gradient(circle at 50% 50%, #8fd98f 0 34%, transparent 35%),
        radial-gradient(circle at 22% 62%, #77c477 0 24%, transparent 25%),
        radial-gradient(circle at 78% 62%, #6fbf6f 0 24%, transparent 25%),
        radial-gradient(circle at 50% 75%, #86d286 0 28%, transparent 29%);
    border-radius: 50%;
    filter: drop-shadow(0 8px 18px rgba(60, 130, 60, .25));
}
.tree-trunk {
    position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 32px; height: 140px;
    background: linear-gradient(90deg, #a9745b, #8b5a3c, #a9745b);
    border-radius: 6px 6px 2px 2px;
}
#wishes .wish-cards { position: absolute; inset: 28px 24px 150px; }
.wish-card {
    position: absolute;
    width: 132px;
    max-width: 15%;
    background: linear-gradient(140deg, #fff, #ffe3ec);
    border: 1px solid rgba(233, 30, 99, .25);
    border-radius: 4px 12px 4px 12px;
    padding: 6px 10px;
    font-size: .72rem;
    line-height: 1.5;
    color: #7a3568;
    box-shadow: 0 4px 12px rgba(233, 30, 99, .18);
    animation: sway 4s ease-in-out infinite;
    overflow: hidden;
}
.wish-card::before {
    content: '';
    position: absolute;
    top: -13px; left: 50%;
    width: 1.5px; height: 13px;
    background: rgba(150, 80, 60, .6);
}
.wish-card b { display: block; color: var(--pink-deep); font-size: .66rem; margin-bottom: 1px; }
@keyframes sway { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }
.wish-empty {
    position: absolute; bottom: 10px; left: 0; right: 0;
    text-align: center; color: var(--ink-light); font-size: .8rem;
}

/* ---------- 生日蛋糕（蛋糕+信息并排） ---------- */
.birthday-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.birthday-panel {
    background: rgba(255, 255, 255, .55);
    border-radius: 14px;
    padding: 14px;
    text-align: center;
}
.bp-name { font-family: "STKaiti", "KaiTi", serif; color: var(--pink-deep); font-size: 1.05rem; letter-spacing: .08em; margin-bottom: 10px; }
.bd-body { display: flex; align-items: center; gap: 16px; text-align: left; flex-wrap: wrap; justify-content: center; }
.bd-side { flex: 1; min-width: 160px; display: flex; flex-direction: column; gap: 8px; }
.bd-countdown { font-size: .9rem; color: var(--pink); font-weight: 600; }
.bd-countdown.today { animation: beat 1s ease-in-out infinite; }
.bd-surprise { font-size: .8rem; color: #7a3568; background: rgba(255, 240, 245, .7); border-radius: 10px; padding: 8px 10px; display: none; line-height: 1.6; }
.bd-surprise.show { display: block; }
.bd-side .add-box { margin: 0; }
.bd-side .form-box { margin-top: 8px; }

/* 阳历/农历类型切换 */
.bd-type { display: flex; gap: 8px; }
.bd-type label {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 7px 0;
    font-size: .85rem;
    color: var(--ink);
    background: rgba(255, 255, 255, .8);
    border: 1.5px solid rgba(233, 30, 99, .25);
    border-radius: 10px;
    cursor: pointer;
    transition: all .25s;
    user-select: none;
}
.bd-type input { display: none; }
.bd-type label.active,
.bd-type label:has(input:checked) {
    background: linear-gradient(120deg, var(--pink), var(--purple));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(233, 30, 99, .3);
}
.bd-lunar { display: flex; gap: 8px; }
.bd-lunar select { flex: 1; }

/* CSS 蛋糕（小号） */
.cake { width: 150px; margin: 0 auto; position: relative; flex: none; }
.candles { display: flex; justify-content: center; gap: 18px; position: relative; z-index: 3; }
.candle { width: 8px; height: 34px; background: repeating-linear-gradient(45deg, #ff8fab 0 5px, #fff 5px 10px); border-radius: 3px; position: relative; }
.flame {
    position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
    width: 10px; height: 13px;
    background: radial-gradient(circle at 50% 70%, #fff7d6 0 20%, #ffd54f 55%, #ff9800 100%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: flick .3s ease-in-out infinite alternate;
    box-shadow: 0 0 12px 3px rgba(255, 193, 7, .55);
}
@keyframes flick { from { transform: translateX(-50%) scale(1); } to { transform: translateX(-50%) scale(.82, 1.15); } }
.layer { margin: 0 auto; border-radius: 8px; box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .05); }
.l-top { width: 86px; height: 34px; background: linear-gradient(180deg, #ffd9e6, #ff9db8); position: relative; z-index: 2; }
.l-top::after { content: ''; display: block; height: 10px; margin-top: -1px; background: repeating-linear-gradient(90deg, #fff 0 7px, transparent 7px 14px); border-radius: 0 0 6px 6px; }
.l-mid { width: 118px; height: 40px; background: linear-gradient(180deg, #ffc4d6, #ff8fab); margin-top: -2px; }
.l-bottom { width: 150px; height: 44px; background: linear-gradient(180deg, #ffb3c9, #ff7ba0); margin-top: -2px; }
.plate { width: 176px; height: 10px; margin: 2px auto 0; background: linear-gradient(180deg, #f5f5f5, #d8d8d8); border-radius: 50%; }

/* ---------- 恋爱小游戏（游戏+榜单并排） ---------- */
.game-wrap { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; }
.game-left { flex: 1.4; min-width: 300px; }
.game-info { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; color: var(--ink-light); font-size: .85rem; flex-wrap: wrap; }
.game-info b { color: var(--pink); font-size: 1.05rem; }
.game-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.gcard { perspective: 600px; aspect-ratio: 1/1; cursor: pointer; max-width: 110px; }
.gcard .g-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .5s; }
.gcard.flipped .g-inner, .gcard.matched .g-inner { transform: rotateY(180deg); }
.g-face {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    border-radius: 12px;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    font-size: clamp(1.4rem, 4vw, 2rem);
}
.g-front { background: linear-gradient(140deg, var(--pink), var(--purple)); color: rgba(255, 255, 255, .85); box-shadow: var(--shadow); }
.g-back { background: rgba(255, 255, 255, .92); border: 2px solid rgba(233, 30, 99, .3); transform: rotateY(180deg); }
.gcard.matched .g-back { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212, 175, 55, .35); animation: pop .45s ease; }
.gcard.matched { cursor: default; }
@keyframes pop { 0% { transform: scale(1); } 50% { transform: scale(1.12); } 100% { transform: scale(1); } }
.game-tip { color: var(--ink-light); font-size: .78rem; margin-top: 12px; }
.game-scores { flex: 1; min-width: 220px; background: rgba(255, 240, 245, .55); border-radius: 14px; padding: 14px; }
.game-scores h4 { color: var(--pink-deep); margin-bottom: 8px; font-size: .95rem; }
.game-scores ol { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.game-scores li { background: rgba(255, 255, 255, .8); border-radius: 8px; padding: 6px 12px; font-size: .82rem; display: flex; justify-content: space-between; }
.game-scores li b { color: var(--pink); }

/* 照片删除按钮（右上角，hover 显示） */
.photo-item .photo-del {
    position: absolute;
    top: 8px; right: 8px;
    z-index: 2;
    width: 28px; height: 28px;
    border: none;
    border-radius: 8px;
    background: rgba(233, 30, 99, .88);
    color: #fff;
    font-size: .85rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity .25s, transform .25s;
}
.photo-item:hover .photo-del { opacity: 1; }
.photo-item .photo-del:hover { transform: scale(1.12); background: #c2185b; }
@media (hover: none) { .photo-item .photo-del { opacity: 1; width: 30px; height: 30px; } }

/* ---------- 灯箱（带上一张/下一张） ---------- */
.lightbox {
    display: none;
    position: fixed; inset: 0; z-index: 100;
    background: rgba(40, 10, 30, .82);
    backdrop-filter: blur(6px);
    align-items: center; justify-content: center;
    padding: 40px;
}
.lightbox.open { display: flex; }
.lightbox figure { max-width: 84vw; max-height: 86vh; text-align: center; }
.lightbox img { max-width: 84vw; max-height: 78vh; border-radius: 14px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.lightbox figcaption { color: #ffd6e7; margin-top: 12px; font-size: .9rem; letter-spacing: .1em; }
.lightbox-close {
    position: absolute; top: 14px; right: 26px;
    font-size: 2.4rem; color: #ffd6e7; cursor: pointer; line-height: 1;
}
.lb-nav {
    position: absolute; top: 50%;
    transform: translateY(-50%);
    width: 76px; height: 108px;
    border: 1.5px solid rgba(255, 214, 231, .35);
    border-radius: 20px;
    background: linear-gradient(140deg, rgba(255, 214, 231, .22), rgba(181, 123, 234, .22));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffd6e7;
    font-size: 3.4rem;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    transition: background .3s, transform .3s, box-shadow .3s, border-color .3s;
    display: flex; align-items: center; justify-content: center;
    padding-bottom: 10px;
}
.lb-nav:hover {
    background: linear-gradient(140deg, rgba(255, 143, 171, .55), rgba(181, 123, 234, .55));
    border-color: rgba(255, 214, 231, .7);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 10px 34px rgba(233, 30, 99, .45);
}
.lb-nav:active { transform: translateY(-50%) scale(.96); }
.lb-prev { left: 28px; }
.lb-next { right: 28px; }
.lb-count {
    position: absolute; bottom: 22px; left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 214, 231, .85);
    font-size: .85rem;
    letter-spacing: .15em;
    background: rgba(40, 10, 30, .5);
    border-radius: 999px;
    padding: 4px 16px;
}

/* ---------- Toast ---------- */
.toast {
    position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(20px);
    background: linear-gradient(120deg, var(--pink), var(--purple));
    color: #fff; padding: 10px 24px; border-radius: 999px;
    font-size: .86rem; letter-spacing: .05em;
    box-shadow: 0 10px 30px rgba(233, 30, 99, .4);
    opacity: 0; pointer-events: none; transition: opacity .35s, transform .35s; z-index: 120;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 空状态 ---------- */
.empty-tip { text-align: center; color: var(--ink-light); padding: 18px 0 6px; font-size: .82rem; }

/* ---------- 页脚 ---------- */
.footer { text-align: center; padding: 26px 20px 40px; color: var(--ink-light); position: relative; z-index: 1; }
.footer code { background: rgba(255, 255, 255, .7); padding: 2px 8px; border-radius: 6px; font-size: .74rem; color: var(--pink-deep); }
.footer-sub { margin-top: 6px; font-size: .78rem; }

/* =====================================================
   首页样式（保持原有布局，紧凑化）
   ===================================================== */
.hero-full {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px calc(40px + env(safe-area-inset-bottom));
}
.hero-full .hero-inner { display: block; text-align: center; max-width: 620px; width: 100%; }
.hero-full .hero-logo { font-size: clamp(2.4rem, 8vw, 3rem); margin-bottom: 8px; }
.hero-full .hero-names { font-size: clamp(2rem, 9vw, 3.6rem); }
.hero-full .hero-quote { margin-top: 22px; font-size: clamp(.9rem, 3.6vw, 1.1rem); }

/* Demo 入口按钮 */
.demo-btn {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin-top: 26px;
    padding: 12px 24px 12px 16px;
    border-radius: 999px;
    text-decoration: none;
    background: linear-gradient(120deg, rgba(255, 255, 255, .9), rgba(255, 214, 231, .85));
    border: 1.5px solid rgba(233, 30, 99, .3);
    box-shadow: var(--shadow);
    transition: transform .3s, box-shadow .3s;
}
.demo-btn:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 10px 26px rgba(233, 30, 99, .24); }
.demo-btn .db-icon { font-size: 1.7rem; animation: beat 1.4s ease-in-out infinite; }
.demo-btn .db-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.5; }
.demo-btn .db-text b { font-size: 1.02rem; color: var(--pink-deep); }
.demo-btn .db-text i { font-style: normal; font-size: .78rem; color: var(--ink-light); }

.divider { display: flex; align-items: center; gap: 12px; margin: 26px auto 0; max-width: 420px; color: var(--ink-light); font-size: .8rem; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: rgba(233, 30, 99, .2); }

.form-error {
    background: linear-gradient(120deg, #ffdce4, #ffe6ec);
    color: #c2185b;
    border: 1.5px solid rgba(233, 30, 99, .35);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: .85rem;
    text-align: center;
}
.pwd-row { display: flex; }
.pwd-row input { text-align: center; width: 100%; }

/* ---------- 管理员登录 / 管理条 ---------- */
#couples { scroll-margin-top: 20px; }
.admin-box { text-align: center; padding: 34px 24px; }
.admin-box .ab-lock { font-size: 2.4rem; animation: floaty 3s ease-in-out infinite; }
.admin-box h3 { color: var(--pink-deep); font-size: 1.1rem; letter-spacing: .06em; margin: 10px 0 0; }
.ab-form {
    display: flex; gap: 10px; justify-content: center; align-items: center;
    flex-wrap: wrap; margin: 18px auto 0; max-width: 400px;
}
.ab-form .form-error { flex-basis: 100%; margin-bottom: 4px; }
.ab-form input { flex: 1; min-width: 180px; text-align: center; }
.ab-hint { margin-top: 16px; font-size: .74rem; color: var(--ink-light); }

.admin-bar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap; margin-bottom: 14px;
}
.ab-badge {
    background: linear-gradient(120deg, var(--gold), #f0d060);
    color: #5c3a54; font-weight: 700; font-size: .82rem;
    padding: 5px 16px; border-radius: 999px;
    box-shadow: 0 4px 12px rgba(212, 175, 55, .3);
}

.create-form { margin: 36px auto 0; max-width: 520px; display: flex; flex-direction: column; gap: 14px; }
.create-row { display: flex; align-items: center; gap: 10px; justify-content: center; flex-wrap: wrap; }
.create-row input { width: 170px; text-align: center; font-size: 1rem; }
.amp { font-size: 1.4rem; animation: beat 1.2s ease-in-out infinite; }
.date-label { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--ink-light); flex-wrap: wrap; }
.create-tip { text-align: center; font-size: .78rem; color: var(--ink-light); }

.section-home { max-width: 900px; margin: 0 auto; padding: 50px 16px; position: relative; z-index: 1; }
.home-head { text-align: center; margin-bottom: 20px; }
.home-head .section-icon { font-size: 1.8rem; display: block; margin-bottom: 4px; animation: floaty 3.4s ease-in-out infinite; }
.home-head h2 { font-family: "STKaiti", "KaiTi", serif; font-size: 1.5rem; letter-spacing: .16em; color: var(--pink-deep); }
.home-head .section-sub { margin-top: 4px; color: var(--ink-light); font-size: .85rem; }

.couples-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.couple-card {
    text-decoration: none;
    text-align: center;
    padding: 20px 14px;
    border-radius: 16px;
    background: linear-gradient(140deg, rgba(255, 255, 255, .9), rgba(255, 214, 231, .6));
    border: 1px solid rgba(233, 30, 99, .15);
    transition: transform .3s, box-shadow .3s;
}
.couple-card:hover { transform: translateY(-4px) scale(1.02); box-shadow: var(--shadow); }
.cc-names { font-size: 1.15rem; font-weight: 700; color: var(--pink-deep); }
.cc-since { margin-top: 8px; font-size: .8rem; color: var(--ink-light); }
.cc-days { color: var(--pink); font-size: .9rem; }
.cc-id { margin-top: 8px; font-size: .7rem; color: var(--ink-light); }
.cc-id code { background: rgba(255, 255, 255, .75); padding: 2px 8px; border-radius: 6px; color: var(--pink-deep); }

/* ---------- 响应式（平板） ---------- */
@media (max-width: 960px) {
    .span-7, .span-6, .span-5 { grid-column: span 12; }
    .hero-inner { justify-content: center; text-align: center; }
    .hero-right { align-items: center; }
    .form-row { grid-template-columns: 1fr; }
    .birthday-grid { grid-template-columns: 1fr; }
    .game-grid { max-width: 100%; }
    .gcard { max-width: none; }
    .moment-list, .timeline, .photo-grid, .blessing-list, .period-list { max-height: none; }
}

/* =====================================================
   H5 移动端适配（≤640px）
   ===================================================== */
@media (max-width: 640px) {
    body { font-size: 15px; -webkit-text-size-adjust: 100%; }

    /* 输入控件字号 ≥16px 防止 iOS 自动缩放 */
    input, select, textarea { font-size: 16px; padding: 10px 12px; }

    .layout { grid-template-columns: 1fr; gap: 12px; padding: 0 12px calc(24px + env(safe-area-inset-bottom)); }
    .span-12, .span-7, .span-6, .span-5 { grid-column: span 1; }
    .glass { padding: 14px 14px; border-radius: 16px; }

    /* Hero 竖排居中 */
    .hero { padding: 22px 14px 14px; }
    .hero-inner { flex-direction: column; gap: 14px; }
    .hero-left { flex-direction: column; gap: 8px; text-align: center; }
    .hero-right { align-items: center; width: 100%; }
    .hero-logo { font-size: 2rem; }
    .hero-left:has(.mascot-badge) { gap: 12px; }
    .hero-names { font-size: 1.55rem; }
    .hero-quote { font-size: .82rem; }
    .hero-date { font-size: .72rem; letter-spacing: .16em; }
    .counters { gap: 6px; width: 100%; justify-content: center; }
    .counter { min-width: 0; flex: 1; padding: 6px 2px; }
    .counter b { font-size: 1.15rem; }
    .counter span { font-size: .62rem; }

    /* 导航横向滚动 */
    .nav {
        position: sticky;
        top: 4px;
        border-radius: 14px;
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin: 8px 12px 12px;
        max-width: none;
        width: auto;
        left: auto;
        transform: none;
        padding: 7px 10px;
    }
    .nav::-webkit-scrollbar { display: none; }
    .nav a { flex: none; font-size: .8rem; padding: 7px 12px; }

    .sec { scroll-margin-top: 58px; }
    .sec-head h2 { font-size: 1.08rem; }
    .section-sub { font-size: .72rem; }
    .section-icon { font-size: 1.05rem; }

    /* 表单 */
    .form-row { grid-template-columns: 1fr; }
    .form-inline { flex-direction: column; align-items: stretch; }
    .form-inline input, .form-inline select { width: 100%; }
    .form-inline input[type="file"] { width: 100%; }
    .form-inline .btn-main { width: 100%; }
    .mini-label { justify-content: space-between; }
    .mini-label input { width: 74px; }
    .add-box summary { width: 100%; justify-content: center; padding: 10px 18px; }

    /* 各板块单列 */
    .diary-list, .blessing-list, .period-list { grid-template-columns: 1fr; }
    .photo-grid { columns: 2; column-gap: 8px; }
    .photo-item { margin-bottom: 8px; }
    .moment-list, .timeline { max-height: 340px; }

    /* 生日 */
    .birthday-grid { grid-template-columns: 1fr; }
    .bd-body { flex-direction: column; gap: 10px; }
    .bd-side { width: 100%; min-width: 0; }
    .cake { width: 130px; }
    .l-top { width: 76px; height: 30px; }
    .l-mid { width: 104px; height: 34px; }
    .l-bottom { width: 130px; height: 38px; }
    .plate { width: 152px; }
    .candle { height: 30px; }

    /* 生理期 */
    .period-top { flex-direction: column; }
    .period-status { width: 100%; min-width: 0; padding: 14px 16px; gap: 12px; }
    .period-side { width: 100%; min-width: 0; }
    .setting-actions { flex-direction: column; }
    .setting-actions button { width: 100%; }

    /* 游戏：4 列小卡 */
    .game-wrap { flex-direction: column; gap: 14px; }
    .game-left { min-width: 0; width: 100%; }
    .game-scores { width: 100%; min-width: 0; }
    .game-grid { gap: 8px; }
    .g-face { border-radius: 10px; font-size: 1.5rem; }

    /* 许愿树 */
    .tree-area { height: 380px; }
    #wishes .tree { transform: translateX(-50%) scale(.72); }
    #wishes .wish-cards { inset: 20px 10px 120px; }
    .wish-card { width: auto; max-width: 30%; font-size: .62rem; padding: 4px 7px; }

    /* 灯箱 */
    .lightbox { padding: 16px; }
    .lightbox-close { top: 8px; right: 16px; font-size: 2rem; }
    .lb-nav { width: 52px; height: 78px; font-size: 2.4rem; border-radius: 14px; padding-bottom: 7px; }
    .lb-prev { left: 8px; }
    .lb-next { right: 8px; }
    .lb-count { bottom: 14px; font-size: .78rem; }

    /* 首页 */
    .hero-full { padding: 40px 16px calc(32px + env(safe-area-inset-bottom)); }
    .create-form { margin-top: 24px; padding: 20px 16px; gap: 12px; }
    .create-row { flex-direction: column; gap: 10px; }
    .create-row input { width: 100%; max-width: 260px; }
    .date-label { flex-direction: column; gap: 8px; }
    .demo-btn { width: 100%; max-width: 340px; justify-content: center; margin-top: 20px; }
    .btn-main { width: 100%; }
    .section-home { padding: 30px 12px; }
    .couples-grid { grid-template-columns: 1fr; }
    .admin-box { padding: 24px 16px; }
    .admin-box .ab-form { flex-direction: column; }
    .admin-box .ab-form input, .admin-box .ab-form .btn-main { width: 100%; }
    .admin-bar { justify-content: center; }
    .footer { padding: 22px 16px calc(30px + env(safe-area-inset-bottom)); }
}

/* ---------- 触摸设备优化 ---------- */
@media (hover: none) {
    .couple-card:hover, .demo-btn:hover, .plan-item:hover, .moment-card:hover { transform: none; }
    .gcard:active .g-inner { transform: scale(.95); }
    .btn-main:active, .btn-ghost:active { transform: scale(.96); }
    .add-box summary:active { transform: scale(.97); }
}
