/* =========================================================
   hang_n 的梦幻小屋 · Dreamy Room
   奶油黄 × 雪白 × 婴儿蓝
   ========================================================= */
:root {
    --cream: #fff8ea;
    --butter: #fbecc0;
    --butter-deep: #efd99c;
    --snow: #ffffff;
    --baby: #a9c8f5;
    --baby-soft: #dce9fd;
    --blue: #6f97e8;
    --blue-deep: #4e72c9;
    --pink: #f6b8c8;
    --gold: #f5c84c;
    --ink: #4b5578;
    --ink-soft: #8a93b2;
    --paper: rgba(255, 255, 255, 0.72);
    --paper-solid: #fffdf8;
    --line: rgba(111, 151, 232, 0.18);
    --shadow: 0 18px 40px rgba(78, 114, 201, 0.12);
    --shadow-lg: 0 30px 70px rgba(78, 114, 201, 0.18);
    --sky-a: #eaf2ff;
    --sky-b: #fff8ea;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --f-body: 'Fredoka', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --f-cute: 'ZCOOL KuaiLe', 'Fredoka', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --f-code: 'JetBrains Mono', Consolas, monospace;
}
[data-theme="dark"] {
    --cream: #1b2140;
    --butter: #3a3a5c;
    --butter-deep: #4b4b72;
    --snow: #252c52;
    --baby: #8fb0f0;
    --baby-soft: #2b3462;
    --blue: #9dbcff;
    --blue-deep: #c4d6ff;
    --ink: #e8ecff;
    --ink-soft: #a3acd3;
    --paper: rgba(32, 39, 78, 0.72);
    --paper-solid: #222a52;
    --line: rgba(157, 188, 255, 0.18);
    --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 30px 70px rgba(0, 0, 0, 0.45);
    --sky-a: #121735;
    --sky-b: #1d2147;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--f-body); color: var(--ink); background: var(--sky-b);
    overflow-x: hidden; transition: background 0.8s ease, color 0.6s ease; line-height: 1.6;
}
body.loading { overflow: hidden; }
::selection { background: var(--baby); color: #fff; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-thumb { background: var(--baby); border-radius: 10px; border: 3px solid var(--sky-b); }
a { color: inherit; }
img { display: block; }

/* ========== 开启界面：猫娘小屋的房门 ========== */
#preloader { position: fixed; inset: 0; z-index: 10000; pointer-events: all; overflow: hidden; perspective: 1400px; }
.pl-sky { position: absolute; inset: 0; z-index: 3; pointer-events: none; transition: opacity .5s; }
.pl-sky i { position: absolute; bottom: -40px; left: var(--x, 50%); width: var(--s, 14px); height: var(--s, 14px); border-radius: 50%; background: radial-gradient(circle at 30% 30%, #fff, rgba(169,200,245,.55) 60%, rgba(169,200,245,0)); animation: plFloat var(--d, 9s) linear infinite; animation-delay: var(--dl, 0s); }
.pl-sky i:nth-child(1) { --x: 6%; --s: 22px; --d: 10s; }
.pl-sky i:nth-child(2) { --x: 14%; --s: 10px; --d: 7s; --dl: -3s; }
.pl-sky i:nth-child(3) { --x: 24%; --s: 16px; --d: 11s; --dl: -6s; }
.pl-sky i:nth-child(4) { --x: 33%; --s: 8px; --d: 8s; --dl: -1s; }
.pl-sky i:nth-child(5) { --x: 45%; --s: 18px; --d: 12s; --dl: -8s; }
.pl-sky i:nth-child(6) { --x: 57%; --s: 12px; --d: 9s; --dl: -4s; }
.pl-sky i:nth-child(7) { --x: 66%; --s: 24px; --d: 13s; --dl: -2s; }
.pl-sky i:nth-child(8) { --x: 75%; --s: 9px; --d: 7.5s; --dl: -5s; }
.pl-sky i:nth-child(9) { --x: 83%; --s: 15px; --d: 10.5s; --dl: -7s; }
.pl-sky i:nth-child(10) { --x: 92%; --s: 20px; --d: 11.5s; --dl: -9s; }
.pl-sky i:nth-child(11) { --x: 38%; --s: 6px; --d: 6s; --dl: -2.5s; background: none; }
.pl-sky i:nth-child(12) { --x: 70%; --s: 6px; --d: 6.5s; --dl: -4.5s; background: none; }
.pl-sky i:nth-child(11)::before, .pl-sky i:nth-child(12)::before { content: '✦'; position: absolute; inset: -6px; color: #f5c84c; font-size: 14px; }
@keyframes plFloat { 0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: 1; } 50% { transform: translate(18px, -55vh); } 90% { opacity: 1; } 100% { transform: translate(-10px, -110vh); opacity: 0; } }

.door {
    position: absolute; top: 0; bottom: 0; width: 50%; z-index: 1;
    background: radial-gradient(120% 80% at 50% 40%, #fffdf6, #fdf1d2);
    box-shadow: inset 0 0 0 14px rgba(255,255,255,.55), inset 0 0 0 16px rgba(239,217,156,.6);
    transition: transform 1.25s cubic-bezier(0.7, 0, 0.2, 1);
}
.door-l { left: 0; transform-origin: 0 50%; }
.door-r { right: 0; transform-origin: 100% 50%; }
/* 门上淡淡的猫爪印花 */
.door .paws { position: absolute; inset: 0; opacity: .55; background-image: var(--paw-svg); background-size: 120px 120px; animation: pawDrift 30s linear infinite; }
#preloader { --paw-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='%23f6b8c8' fill-opacity='.4'%3E%3Cellipse cx='30' cy='36' rx='9' ry='7'/%3E%3Ccircle cx='20' cy='25' r='3.6'/%3E%3Ccircle cx='27' cy='20' r='3.6'/%3E%3Ccircle cx='35' cy='20' r='3.6'/%3E%3Ccircle cx='41' cy='26' r='3.6'/%3E%3C/g%3E%3Cg fill='%23a9c8f5' fill-opacity='.4'%3E%3Cellipse cx='90' cy='96' rx='9' ry='7'/%3E%3Ccircle cx='80' cy='85' r='3.6'/%3E%3Ccircle cx='87' cy='80' r='3.6'/%3E%3Ccircle cx='95' cy='80' r='3.6'/%3E%3Ccircle cx='101' cy='86' r='3.6'/%3E%3C/g%3E%3C/svg%3E"); }
@keyframes pawDrift { to { background-position: 120px -240px; } }
.door .knob { position: absolute; top: 50%; width: 22px; height: 22px; margin-top: -11px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff2b8, var(--gold) 60%, #d9a520); box-shadow: 0 4px 10px rgba(217,165,32,.35); }
.door-l .knob { right: 24px; } .door-r .knob { left: 24px; }

.loader-center::before { content: ''; position: absolute; left: 50%; top: 50%; width: 520px; height: 520px; margin: -260px 0 0 -260px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.95) 0, rgba(255,255,255,.7) 40%, rgba(255,255,255,0) 70%); z-index: -1; pointer-events: none; }
[data-theme="dark"] .loader-center::before { background: radial-gradient(circle, rgba(60,72,140,.8) 0, rgba(60,72,140,0) 70%); }
.loader-center { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; transition: opacity 0.45s, transform 0.7s var(--ease), filter .5s; }
.loader-avatar { position: relative; width: 150px; height: 150px; margin-bottom: 14px; cursor: pointer; animation: avatarIn .9s var(--spring) both; -webkit-tap-highlight-color: transparent; }
@keyframes avatarIn { from { transform: scale(.3) rotate(-20deg); opacity: 0; } }
.loader-avatar .face-clip { position: absolute; inset: 11px; z-index: 2; border-radius: 50%; overflow: hidden; border: 4px solid #fff; box-shadow: 0 12px 30px rgba(111,151,232,.3); background: #dce9fd; animation: avatarPop 1.8s ease-in-out infinite; }
.loader-avatar .ring { position: absolute; inset: 0; z-index: 1; border-radius: 50%; background: conic-gradient(from 0deg, #a9c8f5, #f6b8c8, #fbecc0, #a9c8f5); -webkit-mask: radial-gradient(circle, transparent 68px, #000 69px); mask: radial-gradient(circle, transparent 68px, #000 69px); animation: spin 2.4s linear infinite; }
.loader-avatar .orbit { position: absolute; inset: -16px; z-index: 3; animation: spin 3.2s linear infinite; pointer-events: none; }
.loader-avatar .orbit.o2 { inset: -30px; animation-duration: 4.6s; animation-direction: reverse; }
.loader-avatar .orbit.o3 { inset: -44px; animation-duration: 6.4s; }
.loader-avatar .orbit i { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 1.3rem; }
/* 猫耳朵 + 腮红 + 尾巴 */
.cat-ear { position: absolute; top: -10px; z-index: 1; width: 56px; height: 62px; background: #9fbef2; clip-path: polygon(50% 0, 100% 100%, 0 100%); transform-origin: 50% 100%; }
.cat-ear::before { content: ''; position: absolute; left: 4px; right: 4px; top: 8px; bottom: 0; background: #fff; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.cat-ear::after { content: ''; position: absolute; left: 16px; right: 16px; top: 22px; bottom: 4px; background: #f8c6d3; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.cat-ear.l { left: 4px; rotate: -26deg; animation: earTwitchL 4s ease-in-out infinite; }
.cat-ear.r { right: 4px; rotate: 26deg; animation: earTwitchR 4s ease-in-out infinite 1.3s; }
@keyframes earTwitchL { 0%, 86%, 100% { transform: none; } 90% { transform: rotate(-14deg) scaleY(.88); } 94% { transform: rotate(4deg); } }
@keyframes earTwitchR { 0%, 86%, 100% { transform: none; } 90% { transform: rotate(14deg) scaleY(.88); } 94% { transform: rotate(-4deg); } }
.blush { position: absolute; z-index: 3; bottom: 42px; width: 20px; height: 10px; border-radius: 50%; background: rgba(246,150,175,.6); filter: blur(2px); opacity: 0; transition: opacity .3s; pointer-events: none; }
.blush.l { left: 32px; } .blush.r { right: 32px; }
.loader-avatar.petted .blush { opacity: 1; }
.loader-avatar .tail { position: absolute; right: -40px; bottom: 6px; z-index: 0; width: 60px; height: 72px; border: 10px solid #fff; border-left: none; border-bottom: none; border-radius: 0 64px 0 0; transform-origin: 0 100%; animation: tailWag 1.6s ease-in-out infinite; filter: drop-shadow(0 2px 3px rgba(111,151,232,.3)); }
.loader-avatar .tail::after { content: '🎀'; position: absolute; left: 2px; top: 20px; font-size: 1rem; rotate: 40deg; }
@keyframes tailWag { 0%, 100% { transform: rotate(-10deg); } 50% { transform: rotate(14deg); } }
.loader-avatar.petted .cat-ear.l { animation: earFlatL .5s ease; }
.loader-avatar.petted .cat-ear.r { animation: earFlatR .5s ease; }
@keyframes earFlatL { 50% { transform: rotate(-28deg) scaleY(.7); } }
@keyframes earFlatR { 50% { transform: rotate(28deg) scaleY(.7); } }
.loader-avatar.petted .tail { animation-duration: .45s; }
@keyframes avatarPop { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@keyframes bearBob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-10px) rotate(4deg); } }
@keyframes ring { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(18deg); } 75% { transform: rotate(-18deg); } }

.loader-title { font-family: 'Fredoka', var(--f-cute); font-weight: 700; filter: drop-shadow(0 3px 0 #fff) drop-shadow(0 6px 14px rgba(111,151,232,.35)); display: flex; align-items: baseline; gap: 1px; font-size: 2.6rem; line-height: 1.15; letter-spacing: 1px; }
.loader-title span { display: inline-block; background: linear-gradient(180deg, #6f97e8 20%, #e99ab2); -webkit-background-clip: text; background-clip: text; color: transparent; animation: letterIn .7s var(--spring) both, letterBob 2.4s ease-in-out infinite; }
.loader-title span:nth-child(1) { animation-delay: .25s, 1.2s; } .loader-title span:nth-child(2) { animation-delay: .32s, 1.35s; }
.loader-title span:nth-child(3) { animation-delay: .39s, 1.5s; } .loader-title span:nth-child(4) { animation-delay: .46s, 1.65s; }
.loader-title span:nth-child(5) { animation-delay: .53s, 1.8s; } .loader-title span:nth-child(6) { animation-delay: .6s, 1.95s; }
.loader-title em { font-family: var(--f-cute); font-weight: 400; font-style: normal; font-size: 1.15rem; color: #b49440; margin-left: 10px; animation: letterIn .7s var(--spring) .75s both; }
@keyframes letterIn { from { transform: translateY(30px) scale(.4); opacity: 0; } }
@keyframes letterBob { 0%, 100% { transform: none; } 50% { transform: translateY(-5px); } }
.loader-text { font-family: var(--f-cute); color: #7a83a6; font-size: 1.05rem; letter-spacing: 2px; min-height: 1.6em; transition: opacity .25s, transform .25s; }
.loader-text.swap { opacity: 0; transform: translateY(6px); }
.dots i { font-style: normal; display: inline-block; animation: dotJump 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dotJump { 0%, 60%, 100% { transform: none; } 30% { transform: translateY(-6px); } }
.loader-track { position: relative; width: 240px; padding-top: 18px; transition: opacity .4s; }
.loader-bar { height: 10px; border-radius: 10px; background: #fff; box-shadow: inset 0 1px 3px rgba(0,0,0,.08), 0 0 0 3px rgba(255,255,255,.6); overflow: hidden; }
.loader-bar span { position: relative; display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #a9c8f5, #f6b8c8); transition: width .2s; overflow: hidden; }
.loader-bar span::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(-45deg, rgba(255,255,255,.4) 0 6px, transparent 6px 12px); background-size: 17px 17px; animation: barSlide .8s linear infinite; }
@keyframes barSlide { to { background-position: 17px 0; } }
.loader-track .runner { position: absolute; top: -6px; left: 0; font-size: 1.1rem; transition: left .2s; animation: runHop .36s ease-in-out infinite alternate; }
@keyframes runHop { from { transform: translate(-50%, 0) rotate(-12deg); } to { transform: translate(-50%, -6px) rotate(12deg); } }
.loader-track .pct { position: absolute; right: -48px; bottom: -4px; font-family: var(--f-code); font-size: .82rem; color: #8a93b2; font-weight: 600; }
.enter-btn { margin-top: 12px; border: none; cursor: pointer; font-family: var(--f-cute); font-size: 1.1rem; letter-spacing: 1px; color: #fff; padding: 12px 28px; border-radius: 999px; background: linear-gradient(135deg, #8fb3f2, #f3b9c8); box-shadow: 0 10px 24px rgba(111,151,232,.35), inset 0 -3px 0 rgba(0,0,0,.08); opacity: 0; transform: translateY(16px) scale(.8); pointer-events: none; transition: opacity .4s, transform .5s var(--spring), box-shadow .3s; }
.enter-btn .bell { display: inline-block; transform-origin: 50% 10%; }
#preloader.ready .enter-btn { opacity: 1; transform: none; pointer-events: auto; }
#preloader.ready .enter-btn .bell { animation: ring .6s ease-in-out infinite; }
#preloader.ready .enter-btn:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 16px 30px rgba(111,151,232,.45); }
#preloader.ready .enter-btn:active { transform: scale(.95); }
.enter-hint { font-size: .8rem; color: #a2a9c4; opacity: 0; transition: opacity .4s .2s; }
#preloader.ready .enter-hint { opacity: 1; }
#preloader.ready .loader-track { opacity: .5; }

#preloader.open .loader-center { opacity: 0; transform: scale(1.25); filter: blur(6px); pointer-events: none; }
#preloader.open .pl-sky { opacity: 0; }
#preloader.open .door-l { transform: rotateY(84deg); }
#preloader.open .door-r { transform: rotateY(-84deg); }
#preloader.gone { display: none; }
@media (max-width: 600px) { .loader-title { font-size: 2rem; } .loader-track { width: 190px; } }
[data-theme="dark"] .door { background: radial-gradient(120% 80% at 50% 40%, #2a3263, #1b2140); box-shadow: inset 0 0 0 14px rgba(255,255,255,.04), inset 0 0 0 16px rgba(143,176,240,.25); }
[data-theme="dark"] .loader-text { color: #c4cbe8; }
[data-theme="dark"] .loader-title em { color: #f1d78a; }

.face-clip img { width: 100%; height: 100%; object-fit: cover; }
.face-clip img.zoom { transform: scale(6.2); transform-origin: 54.5% 0%; }
.face-clip img.zoom-av { transform: scale(2.5); transform-origin: 50% 14%; }
.polaroid-img img.av-pola { transform: scale(1.35); transform-origin: 50% 12%; }
.polaroid:hover .polaroid-img img.av-pola { transform: scale(1.45); }

/* ========== 背景 ========== */
.sky {
    position: fixed; inset: 0; z-index: -3;
    background:
        radial-gradient(60vw 50vh at 85% 10%, rgba(169, 200, 245, .55), transparent 70%),
        radial-gradient(50vw 50vh at 5% 80%, rgba(251, 236, 192, .7), transparent 70%),
        radial-gradient(40vw 40vh at 50% 50%, rgba(246, 184, 200, .25), transparent 70%),
        linear-gradient(180deg, var(--sky-a), var(--sky-b));
    transition: opacity .8s;
}
[data-theme="dark"] .sky {
    background:
        radial-gradient(50vw 40vh at 80% 10%, rgba(111, 151, 232, .35), transparent 70%),
        radial-gradient(40vw 40vh at 10% 85%, rgba(180, 120, 220, .2), transparent 70%),
        linear-gradient(180deg, var(--sky-a), var(--sky-b));
}
#fluffCanvas { position: fixed; inset: 0; z-index: -2; pointer-events: none; }
#ribbonCanvas { position: fixed; inset: 0; z-index: 9990; pointer-events: none; }

/* ========== HERO ========== */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; overflow: hidden; padding: 60px 6vw 120px; }
.hero-room {
    position: absolute; inset: -40px; z-index: -1; background-size: cover; background-position: center;
    opacity: 0.0; filter: blur(2px) saturate(1.05); transition: opacity 1.2s ease, background-image .6s;
    transform: scale(1.06);
}
.hero-room.has-img { opacity: 0.38; }
[data-theme="dark"] .hero-room.has-img { opacity: 0.45; }
.hero-room::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, var(--sky-b) 15%, transparent 70%); opacity: .85; }
.light-rays { position: absolute; top: -10%; right: 5%; width: 60vw; height: 120%; pointer-events: none; z-index: 0; mix-blend-mode: soft-light; }
.light-rays i {
    position: absolute; top: 0; left: 50%; width: 9vw; height: 100%; transform-origin: top center;
    background: linear-gradient(180deg, rgba(255,255,255,.9), transparent 80%); filter: blur(12px);
    animation: ray 8s ease-in-out infinite;
}
.light-rays i:nth-child(1) { transform: rotate(18deg); }
.light-rays i:nth-child(2) { transform: rotate(28deg); width: 5vw; animation-delay: -2s; }
.light-rays i:nth-child(3) { transform: rotate(38deg); animation-delay: -4s; }
.light-rays i:nth-child(4) { transform: rotate(48deg); width: 4vw; animation-delay: -6s; }
@keyframes ray { 0%, 100% { opacity: .35; } 50% { opacity: .9; } }
[data-theme="dark"] .light-rays { opacity: .25; }

.hero-grid { position: relative; z-index: 2; width: 100%; max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 4vw; align-items: center; }
.hero-text > * { opacity: 0; transform: translateY(26px); }
body.ready .hero-text > * { animation: rise 1s var(--ease) forwards; }
body.ready .hero-text > *:nth-child(1) { animation-delay: .2s; }
body.ready .hero-text > *:nth-child(2) { animation-delay: .3s; }
body.ready .hero-text > *:nth-child(3) { animation-delay: 1.6s; }
body.ready .hero-text > *:nth-child(4) { animation-delay: 1.8s; }
body.ready .hero-text > *:nth-child(5) { animation-delay: 2s; }
@keyframes rise { to { opacity: 1; transform: none; } }

.hero-badge { display: inline-flex; align-items: center; gap: 6px; padding: 7px 16px; border-radius: 999px; background: var(--paper); border: 1.5px solid var(--line); color: var(--blue); font-weight: 600; font-size: .9rem; backdrop-filter: blur(8px); }
.hero-badge i { animation: twinkle 2s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.3) rotate(20deg); } }

.hero-name-svg { width: min(600px, 100%); height: auto; overflow: visible; margin: 8px 0 0 -4px; }
.hero-name-svg text {
    font-family: var(--f-body); font-weight: 700; font-size: 140px; letter-spacing: 2px;
    fill: url(#nameGrad); fill-opacity: 0; stroke: var(--blue); stroke-width: 2.5; stroke-linejoin: round;
    stroke-dasharray: 1600; stroke-dashoffset: 1600;
    paint-order: stroke;
}
body.ready .hero-name-svg text { animation: drawName 2.2s .35s var(--ease) forwards, fillName 1s 1.6s ease forwards; }
@keyframes drawName { to { stroke-dashoffset: 0; } }
@keyframes fillName { to { fill-opacity: 1; stroke-width: 6; stroke: #fff; } }
[data-theme="dark"] body.ready .hero-name-svg text, [data-theme="dark"] .hero-name-svg text { }

.hero-title { font-family: var(--f-cute); font-size: clamp(1.1rem, 2vw, 1.45rem); color: var(--blue-deep); margin: 4px 0 18px; }
.hero-bubble {
    position: relative; max-width: 520px; padding: 18px 22px; border-radius: 22px 22px 22px 6px;
    background: var(--paper); border: 1.5px solid var(--line); box-shadow: var(--shadow); backdrop-filter: blur(10px);
}
.hero-bubble p { color: var(--ink-soft); font-weight: 500; }
.typed-line { margin-top: 4px; color: var(--ink) !important; font-weight: 600 !important; min-height: 1.6em; }
.caret { display: inline-block; width: 2px; height: 1.1em; margin-left: 3px; vertical-align: -3px; background: var(--blue); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 28px; }
.tag-btn {
    position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 14px 26px 14px 38px;
    border-radius: 10px 999px 999px 10px; text-decoration: none; font-weight: 600; font-size: 1.02rem;
    color: var(--blue-deep); background: var(--paper-solid); border: 2px solid var(--baby);
    box-shadow: 0 6px 0 var(--baby), var(--shadow); transition: transform .3s var(--spring), box-shadow .3s;
}
.tag-btn.primary { color: #fff; background: linear-gradient(135deg, #8fb3f2, #6f97e8); border-color: #6f97e8; box-shadow: 0 6px 0 #4e72c9, var(--shadow); }
.tag-btn:hover { transform: translateY(-4px) rotate(-2deg); }
.tag-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--baby); }
.tag-hole { position: absolute; left: 14px; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: var(--sky-b); border: 2px solid currentColor; opacity: .6; }
.tag-bell { position: absolute; left: 10px; top: 100%; width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff2b8, var(--gold)); box-shadow: 0 2px 4px rgba(0,0,0,.15); transform-origin: 50% -10px; }
.tag-btn:hover .tag-bell { animation: ring .5s ease-in-out 2; }

/* 拱窗 + 角色 */
.hero-visual { position: relative; justify-self: center; width: min(430px, 100%); opacity: 0; transform: translateY(40px) scale(.95); }
body.ready .hero-visual { animation: rise 1.2s .5s var(--ease) forwards; }
.arch { position: relative; aspect-ratio: 3 / 4; animation: breathe 5s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.arch-inner {
    position: absolute; inset: 0; border-radius: 999px 999px 32px 32px; overflow: hidden;
    border: 10px solid var(--paper-solid); box-shadow: var(--shadow-lg), inset 0 0 0 2px var(--baby);
    background: linear-gradient(180deg, #dce9fd, #fff8ea);
}
.arch-inner img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; transform: scale(1.28); transform-origin: 50% 30%; transition: transform 1.2s var(--ease); }
.hero-visual:hover .arch-inner img { transform: scale(1.36); }
.arch-glass { position: absolute; inset: 0; background: linear-gradient(115deg, rgba(255,255,255,.55) 0%, transparent 30%, transparent 60%, rgba(255,255,255,.25) 75%, transparent 85%); pointer-events: none; animation: glass 6s ease-in-out infinite; }
@keyframes glass { 0%, 100% { opacity: .5; transform: translateX(-10%); } 50% { opacity: 1; transform: translateX(10%); } }
.arch-lace { position: absolute; inset: -18px; border-radius: 999px 999px 44px 44px; border: 3px dashed var(--baby); opacity: .7; pointer-events: none; animation: laceSpin 30s linear infinite; }
@keyframes laceSpin { to { filter: hue-rotate(40deg); } }
.deco { position: absolute; font-size: 2.2rem; filter: drop-shadow(0 6px 10px rgba(78,114,201,.25)); pointer-events: none; transition: transform .2s ease-out; }
.deco::before { content: ''; }
.d1 { top: 4%; left: -12%; font-size: 2.8rem; animation: floaty 6s ease-in-out infinite; }
.d2 { top: 18%; right: -10%; animation: floaty 5s -1s ease-in-out infinite; }
.d3 { bottom: 26%; left: -14%; font-size: 1.8rem; animation: floaty 7s -2s ease-in-out infinite; }
.d4 { top: -4%; right: 18%; font-size: 1.7rem; animation: floaty 4s -3s ease-in-out infinite; }
.d5 { bottom: -2%; right: -8%; font-size: 3rem; animation: floaty 6.5s -1.5s ease-in-out infinite; }
.d6 { bottom: 6%; left: -4%; font-size: 2.6rem; animation: floaty 8s -4s ease-in-out infinite; }
@keyframes floaty { 0%, 100% { translate: 0 0; rotate: 0deg; } 50% { translate: 0 -18px; rotate: 10deg; } }

.scroll-cue { position: absolute; bottom: 100px; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; flex-direction: column; align-items: center; color: var(--ink-soft); text-decoration: none; font-size: .75rem; letter-spacing: 3px; font-weight: 600; opacity: 0; }
body.ready .scroll-cue { animation: rise 1s 2.4s forwards; }
.scroll-cue i { font-size: 1.6rem; animation: cue 1.6s ease-in-out infinite; }
@keyframes cue { 0%, 100% { transform: translateY(0); opacity: .4; } 50% { transform: translateY(8px); opacity: 1; } }
.hero-wave { position: absolute; left: 0; bottom: -1px; width: 100%; height: 90px; z-index: 2; }
.hero-wave path { fill: var(--sky-b); transition: fill .8s; animation: wave 10s ease-in-out infinite alternate; }
@keyframes wave { to { d: path("M0,50 C300,0 520,110 760,60 C1000,10 1220,100 1440,40 L1440,120 L0,120 Z"); } }

/* ========== 通用 Section ========== */
main { position: relative; z-index: 1; }
.section { max-width: 1180px; margin: 0 auto; padding: 90px 24px; }
.sec-head { text-align: center; margin-bottom: 50px; }
.sec-kicker { display: inline-block; font-family: var(--f-code); font-size: .82rem; color: var(--blue); background: var(--baby-soft); padding: 4px 14px; border-radius: 999px; margin-bottom: 12px; letter-spacing: 1px; }
.sec-head h2 { font-family: var(--f-cute); font-weight: 400; font-size: clamp(2rem, 4.5vw, 3rem); color: var(--ink); position: relative; display: inline-block; }
.sec-head h2::after {
    content: ''; position: absolute; left: -6%; right: -6%; bottom: 4px; height: 14px; z-index: -1; border-radius: 10px;
    background: linear-gradient(90deg, var(--butter), var(--baby-soft)); transform: scaleX(0); transform-origin: left; transition: transform 1s .3s var(--ease);
}
.sec-head.in h2::after { transform: scaleX(1); }
.sec-head p { color: var(--ink-soft); margin-top: 10px; font-weight: 500; }

.reveal { opacity: 0; transform: translateY(50px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ========== 代码区 ========== */
.code-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 30px; align-items: stretch; }
.editor { border-radius: 22px; overflow: hidden; background: #1e2440; box-shadow: var(--shadow-lg); border: 1px solid rgba(255,255,255,.08); display: flex; flex-direction: column; min-height: 440px; }
.editor-bar { display: flex; align-items: center; gap: 8px; padding: 14px 18px; background: #262d50; }
.editor-bar .dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.r { background: #ff7b8a; } .dot.y { background: #ffd36b; } .dot.g { background: #7fe0b0; }
.editor-tab { margin-left: 12px; font-family: var(--f-code); font-size: .82rem; color: #c9d4ff; background: #1e2440; padding: 4px 12px; border-radius: 8px; }
.editor-tab i { color: #ffd36b; }
.editor-body { flex: 1; padding: 22px 24px; font-family: var(--f-code); font-size: .92rem; line-height: 1.85; color: #dbe3ff; white-space: pre-wrap; word-break: break-word; overflow: auto; }
.editor-body .k { color: #c9a0ff; } .editor-body .v { color: #8fd3ff; } .editor-body .s { color: #ffd59e; }
.editor-body .n { color: #ff9fb8; } .editor-body .c { color: #6f7aa6; font-style: italic; } .editor-body .p { color: #9fb0e0; } .editor-body .f { color: #7fe0b0; }
.code-caret { background: #8fd3ff; height: 1.05em; }

.portrait-wrap { position: relative; border-radius: 22px; overflow: hidden; background: radial-gradient(120% 90% at 50% 30%, #2f3b73, #171c3a 70%); box-shadow: var(--shadow-lg); min-height: 460px; }
#portraitCanvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.char-stage { position: absolute; inset: 0; cursor: pointer; border-radius: 22px; overflow: hidden; transition: transform .25s ease-out; }
.fx-canvas { display: block; width: 100%; height: 100%; }
.char-stage.poked { animation: stagePoke .5s var(--spring); }
@keyframes stagePoke { 30% { scale: 1.04; } 60% { scale: .98; } }
.char-stage::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); pointer-events: none; }
.char-svg { width: 100%; height: 100%; overflow: visible; }
.portrait-hint { position: absolute; top: 14px; left: 14px; z-index: 2; font-family: var(--f-code); font-size: .76rem; color: #b9c8f0; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.08); padding: 4px 14px; border-radius: 999px; pointer-events: none; white-space: nowrap; }
.char-bubble { position: absolute; top: 18px; right: 18px; max-width: 60%; padding: 8px 14px; border-radius: 16px 16px 4px 16px; background: #fffdf8; color: #4b5578; font-weight: 600; font-size: .88rem; box-shadow: 0 10px 25px rgba(0,0,0,.25); opacity: 0; transform: scale(.6); transform-origin: bottom right; pointer-events: none; }
.char-bubble.show { animation: bubbleLife 2.4s var(--spring) forwards; }
@keyframes bubbleLife { 0% { opacity: 0; transform: scale(.6); } 12% { opacity: 1; transform: scale(1); } 85% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(.9) translateY(-6px); } }
.float-heart { position: absolute; font-size: 1.2rem; pointer-events: none; animation: heartUp 1.6s ease-out forwards; }
@keyframes heartUp { 0% { transform: translate(-50%, 0) scale(.4); opacity: 0; } 15% { opacity: 1; transform: translate(-50%, -10px) scale(1.1); } 100% { transform: translate(-50%, -110px) scale(.8) rotate(20deg); opacity: 0; } }

/* 图层逐个出现 + 描边绘制 */
.char-svg .layer { opacity: 0; transform: translateY(8px); transform-box: view-box; transition: opacity .5s ease, transform .8s var(--spring); }
.char-svg .layer.show { opacity: 1; transform: none; }
.char-svg .layer.show .ink { animation: inkDraw 1.1s ease-out both; }
@keyframes inkDraw { 0% { stroke-dasharray: 1; stroke-dashoffset: 1; fill-opacity: 0; } 55% { fill-opacity: 0; } 100% { stroke-dasharray: 1; stroke-dashoffset: 0; fill-opacity: 1; } }
.char-glow { animation: glowPulse 4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes glowPulse { 0%, 100% { opacity: .7; transform: scale(1); } 50% { opacity: 1; transform: scale(1.05); } }
.char-svg .twinkle { transform-box: fill-box; transform-origin: center; animation: twinkleStar 2.6s ease-in-out infinite; }
@keyframes twinkleStar { 0%, 100% { opacity: .2; transform: scale(.5) rotate(0); } 50% { opacity: 1; transform: scale(1) rotate(45deg); } }

/* 活起来之后 */
.char-svg .breathe { transform-box: view-box; transform-origin: 200px 470px; }
.char-svg.alive .breathe { animation: charBreathe 3.6s ease-in-out infinite; }
@keyframes charBreathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.008, .99) translateY(1px); } }
.char-svg .head { transform-box: view-box; transform-origin: 200px 300px; transition: transform .5s cubic-bezier(.2,.8,.3,1); }
.char-svg .sway { transform-box: view-box; transform-origin: var(--ox) var(--oy); }
.char-svg.alive .sway { animation: hairSwayC 4.5s ease-in-out infinite; }
.char-svg.alive .sway.soft { animation-duration: 3.4s; }
@keyframes hairSwayC { 0%, 100% { transform: rotate(-1.6deg); } 50% { transform: rotate(1.6deg); } }
.char-svg .ahoge { transform-box: view-box; transform-origin: 207px 82px; }
.char-svg.alive .ahoge { animation: ahogeBoing 2.2s ease-in-out infinite; }
@keyframes ahogeBoing { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(8deg); } }
.char-svg .bell-swing { transform-box: view-box; transform-origin: var(--ox) var(--oy); }
.char-svg.alive .bell-swing { animation: bellIdle 3s ease-in-out infinite; }
@keyframes bellIdle { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
.char-svg.poked .bell-swing { animation: bellRing .25s ease-in-out 4; }
@keyframes bellRing { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(14deg); } 75% { transform: rotate(-14deg); } }
.char-svg .eye { transform-box: view-box; transform-origin: var(--cx) var(--cy); transition: transform .08s ease; }
.char-svg .eye-open, .char-svg .eye-happy, .char-svg .eye-shut, .char-svg .mouth > g { transition: opacity .18s ease; }
.char-svg .eye-happy, .char-svg .eye-shut, .char-svg .m-o, .char-svg .m-cat { opacity: 0; }
.char-svg .eye[data-state="happy"] .eye-open, .char-svg .eye[data-state="shut"] .eye-open { opacity: 0; }
.char-svg .eye[data-state="happy"] .eye-happy, .char-svg .eye[data-state="shut"] .eye-shut { opacity: 1; }
.char-svg .mouth[data-state="o"] .m-smile, .char-svg .mouth[data-state="cat"] .m-smile { opacity: 0; }
.char-svg .mouth[data-state="o"] .m-o, .char-svg .mouth[data-state="cat"] .m-cat { opacity: 1; }
.char-svg .eye.closed { transform: scaleY(.08); }
.char-svg .iris { transition: transform .25s ease-out; }
.char-svg .eye-star { transform-box: fill-box; transform-origin: center; animation: twinkleStar 2s ease-in-out infinite; }
.char-svg .mouth { transform-box: fill-box; transform-origin: center top; transition: transform .3s var(--spring); }
.char-svg .blush { transition: opacity .4s; opacity: .8; }
.char-stage:hover .blush, .char-svg.poked .blush { opacity: 1; }
.char-svg.poked .breathe { animation: charHop .6s var(--spring); }
@keyframes charHop { 40% { transform: translateY(-14px); } }
.char-svg .teddy { transform-box: view-box; transform-origin: 200px 470px; }
.char-svg.alive .teddy { animation: teddyTilt 5s ease-in-out infinite; }
@keyframes teddyTilt { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }

/* ========== 关于 ========== */
.about-grid { display: grid; grid-template-columns: 340px 1fr; gap: 40px; align-items: center; }
.polaroid {
    position: relative; background: #fff; padding: 16px 16px 60px; border-radius: 6px; box-shadow: var(--shadow-lg);
    rotate: -4deg; transition: rotate .6s var(--spring), transform .6s var(--spring), opacity 1s var(--ease);
}
.polaroid:hover { rotate: 2deg; transform: scale(1.03); }
.polaroid-img { aspect-ratio: 1; overflow: hidden; border-radius: 2px; background: #dce9fd; }
.polaroid-img img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; transition: transform 1s var(--ease); }
.polaroid:hover .polaroid-img img { transform: scale(1.08); }
.polaroid-cap { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; font-family: var(--f-cute); font-size: 1.7rem; color: #4b5578; }
.tape { position: absolute; width: 110px; height: 30px; background: repeating-linear-gradient(45deg, rgba(169,200,245,.8) 0 8px, rgba(220,233,253,.8) 8px 16px); box-shadow: 0 2px 4px rgba(0,0,0,.06); }
.tape.t1 { top: -12px; left: -24px; rotate: -35deg; }
.tape.t2 { top: -10px; right: -26px; rotate: 32deg; background: repeating-linear-gradient(45deg, rgba(251,236,192,.9) 0 8px, rgba(255,248,234,.9) 8px 16px); }
.about-card { background: var(--paper); border: 1.5px solid var(--line); border-radius: 28px; padding: 34px; box-shadow: var(--shadow); backdrop-filter: blur(14px); }
.info-rows { display: grid; gap: 10px; margin-bottom: 26px; }
.info-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; background: var(--baby-soft); font-weight: 600; transition: transform .3s var(--spring), background .3s; }
.info-row i:first-child { font-size: 1.3rem; color: var(--blue); }
.info-row a { text-decoration: none; }
.info-row:hover { transform: translateX(6px); }
.copyable { cursor: pointer; }
.copy-ico { margin-left: auto; opacity: 0; transition: opacity .3s; color: var(--blue); }
.copyable:hover .copy-ico { opacity: 1; }
.hidden-link { display: none; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.stat { text-align: center; padding: 16px 6px; border-radius: 18px; background: var(--paper-solid); border: 2px dashed var(--baby); transition: transform .4s var(--spring); }
.stat:hover { transform: translateY(-6px) rotate(-3deg); }
.stat b { display: block; font-family: var(--f-body); font-size: 2rem; font-weight: 700; color: var(--blue); line-height: 1.2; }
.stat span { font-size: .82rem; color: var(--ink-soft); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips span { padding: 7px 14px; border-radius: 999px; background: var(--butter); color: #7a6630; font-weight: 600; font-size: .9rem; transition: transform .3s var(--spring); cursor: default; }
[data-theme="dark"] .chips span { color: #f3e3b0; }
.chips span:nth-child(even) { background: var(--baby-soft); color: var(--blue-deep); }
.chips span:hover { transform: translateY(-4px) rotate(-4deg) scale(1.06); }

/* ========== 挂牌 ========== */
#services { position: relative; }
.string-line { height: 40px; margin: 0 4% -6px; border-top: 3px solid var(--butter-deep); border-radius: 50% 50% 0 0 / 40px 40px 0 0; transform: scaleY(-1); opacity: .8; }
.hang-tags { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; padding: 0 3%; }
.hang { position: relative; transform-origin: 50% 0; animation: sway 5s var(--d) ease-in-out infinite; perspective: 1000px; padding-top: 50px; }
@keyframes sway { 0%, 100% { transform: rotate(2.5deg); } 50% { transform: rotate(-2.5deg); } }
.hang-rope { position: absolute; top: 0; left: 50%; width: 3px; height: 54px; margin-left: -1.5px; background: var(--butter-deep); }
.hang-rope::after { content: '🎀'; position: absolute; top: -14px; left: 50%; transform: translateX(-50%); font-size: 1.4rem; }
.flip { position: relative; aspect-ratio: 4 / 5; transform-style: preserve-3d; transition: transform .9s var(--spring); }
.hang:hover .flip { transform: rotateY(180deg); }
.face {
    position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 26px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px;
    box-shadow: var(--shadow-lg); border: 3px solid #fff;
}
.face::before { content: ''; position: absolute; top: 14px; left: 50%; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: var(--sky-b); box-shadow: inset 0 2px 3px rgba(0,0,0,.12); }
.front { background: linear-gradient(180deg, #ffffff, #eef4ff); }
.hang:nth-child(2) .front { background: linear-gradient(180deg, #fffdf6, #fff3d4); }
[data-theme="dark"] .front { background: linear-gradient(180deg, #2b3462, #222a52); border-color: #39447a; }
.front img { width: 78%; aspect-ratio: 1; object-fit: cover; border-radius: 20px; margin-bottom: 14px; }
.front .emoji-fallback { font-size: 5rem; margin-bottom: 14px; animation: floaty 4s ease-in-out infinite; }
.face h3 { font-family: var(--f-cute); font-weight: 400; font-size: 1.4rem; color: var(--ink); }
.back { transform: rotateY(180deg); background: linear-gradient(160deg, #8fb3f2, #6f97e8); color: #fff; gap: 14px; }
.back h3 { color: #fff; }
.back p { font-weight: 500; line-height: 1.8; opacity: .95; }

/* ========== 作品 ========== */
.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.work { position: relative; display: block; text-decoration: none; border-radius: 24px; overflow: hidden; background: var(--paper-solid); box-shadow: var(--shadow); transition: transform .5s var(--spring), box-shadow .4s; }
.work:hover { transform: translateY(-8px) rotate(-1deg); box-shadow: var(--shadow-lg); }
.work-img { aspect-ratio: 4 / 3; overflow: hidden; background: var(--baby-soft); }
.work-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.work:hover .work-img img { transform: scale(1.1); }
.work-info { padding: 16px 18px 20px; }
.work-info h3 { font-size: 1.1rem; margin-bottom: 4px; }
.work-info p { color: var(--ink-soft); font-size: .92rem; }
.empty-room { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 24px; padding: 40px; border-radius: 28px; border: 3px dashed var(--baby); background: var(--paper); color: var(--ink-soft); font-weight: 600; text-align: left; }
.empty-room .e-ico { font-size: 3.5rem; animation: bearBob 2.4s ease-in-out infinite; }
.empty-room .e-img { width: 140px; height: 140px; border-radius: 28px; object-fit: cover; object-position: 50% 20%; box-shadow: var(--shadow); animation: bearBob 3s ease-in-out infinite; }
.empty-room b { display: block; font-family: var(--f-cute); font-weight: 400; font-size: 1.4rem; color: var(--ink); }

/* ========== 手记：信封 ========== */
.blog-banner { display: none; height: 280px; border-radius: 28px; margin-bottom: 30px; background-size: cover; background-position: center 35%; box-shadow: var(--shadow-lg); position: relative; overflow: hidden; }
.blog-banner.has-img { display: block; }
.blog-banner::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(30,36,64,.35), transparent 50%); }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 30px; }
.letter { position: relative; cursor: pointer; padding-top: 112px; outline: none; }
.env { position: relative; height: 236px; perspective: 900px; transition: transform .5s var(--spring); }
.env-back { position: absolute; inset: 0; border-radius: 16px; background: linear-gradient(180deg, #ecd394, #f3dfa6); box-shadow: var(--shadow); }
.env-paper {
    position: absolute; left: 6%; right: 6%; top: 12px; height: 212px; z-index: 2; padding: 16px 18px; border-radius: 10px;
    background: #fffdf8; background-image: repeating-linear-gradient(180deg, transparent 0 25px, rgba(111,151,232,.16) 25px 26px);
    box-shadow: 0 -4px 12px rgba(0,0,0,.06); transition: transform .4s cubic-bezier(.55,0,.75,.25) 0s;
}
.env-paper .l-meta { font-size: .78rem; color: var(--blue); font-weight: 600; display: flex; gap: 12px; }
.env-paper h3 { font-size: 1.08rem; color: #4b5578; margin: 4px 0 6px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.env-paper p { font-size: .86rem; color: #8a93b2; line-height: 26px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* 信封正面口袋：上方 V 形开口，盖住信纸下半部分 */
.env-front {
    position: absolute; inset: 0; z-index: 3; border-radius: 16px;
    clip-path: polygon(0 0, 50% 48%, 100% 0, 100% 100%, 0 100%);
    background: linear-gradient(170deg, #fff6dc, #fbe9bb 60%, #f5dc9d);
}
.env-front::before { content: ''; position: absolute; inset: 0; background: linear-gradient(to top right, transparent calc(50% - 1px), rgba(217,184,102,.45) 50%, transparent calc(50% + 1px)), linear-gradient(to top left, transparent calc(50% - 1px), rgba(217,184,102,.45) 50%, transparent calc(50% + 1px)); opacity: .8; }
.env-postmark { position: absolute; left: 16px; top: 66px; width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; border: 2px solid rgba(111,151,232,.45); border-radius: 50%; color: rgba(78,114,201,.65); font-family: var(--f-code); font-size: .7rem; font-weight: 700; rotate: -14deg; }
.env-postmark::after { content: ''; position: absolute; left: 100%; top: 50%; width: 26px; height: 10px; margin-top: -5px; background: repeating-linear-gradient(180deg, rgba(111,151,232,.4) 0 2px, transparent 2px 4px); }
.env-stamp { position: absolute; right: 16px; top: 60px; width: 46px; height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; background: #dce9fd; border: 3px dotted #fff; outline: 2px solid #a9c8f5; rotate: 6deg; }
.env-stamp b { font-size: .58rem; color: var(--blue-deep); letter-spacing: 1px; }
.env-stamp i { font-style: normal; font-size: 1.2rem; }
.env-hook { position: absolute; left: 18px; right: 18px; bottom: 34px; text-align: center; font-family: var(--f-cute); font-size: 1.12rem; line-height: 1.35; color: #6b5418; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.env-hook::before, .env-hook::after { color: #d9b866; }
.env-hook::before { content: '「'; } .env-hook::after { content: '」'; }
.env-label { position: absolute; left: 0; right: 0; bottom: 12px; text-align: center; font-size: .72rem; font-weight: 600; letter-spacing: .5px; color: #a88a3a; }
[data-theme="dark"] .env-hook { color: #fbecc0; }
[data-theme="dark"] .env-label { color: #d9c486; }
/* 封口翻盖：关着时盖住 V 形开口 */
.env-flap {
    position: absolute; left: 0; right: 0; top: 0; height: 100%; z-index: 4; transform-origin: top center; border-radius: 16px 16px 0 0;
    clip-path: polygon(0 0, 100% 0, 50% 54%);
    background: linear-gradient(180deg, #f6e1a8, #fbebc2 70%, #f7e3ad);
    transition: transform .5s cubic-bezier(.45,0,.2,1) .38s, z-index 0s .38s;
}
.env-seal {
    position: absolute; z-index: 5; left: 50%; top: 52%; transform: translate(-50%, -50%); width: 50px; height: 50px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 1.4rem;
    background: radial-gradient(circle at 35% 35%, #d2e2ff, #7fa3ea 70%, #5f86d8); box-shadow: 0 4px 10px rgba(78,114,201,.45), inset 0 -3px 6px rgba(0,0,0,.18);
    transition: transform .4s var(--spring) .82s, opacity .25s .82s;
}
.letter-cta { position: relative; margin-top: 14px; height: 1.4em; text-align: center; font-weight: 600; color: var(--blue); font-size: .9rem; }
.letter-cta span { position: absolute; left: 0; right: 0; transition: opacity .3s, transform .3s; }
.cta-open { opacity: 0; transform: translateY(6px); }
[data-theme="dark"] .env-back { background: linear-gradient(180deg, #3a4580, #2f3870); }
[data-theme="dark"] .env-front { background: linear-gradient(170deg, #34407a, #2b3462 60%, #262e58); }
[data-theme="dark"] .env-flap { background: linear-gradient(180deg, #44508e, #39447a 70%, #34407a); }
[data-theme="dark"] .env-label { color: #f3e3b0; }
/* 打开：先掀开翻盖、拆掉蜡封，再抽出信纸露出标题 */
.letter:hover .env, .letter.open .env, .letter:focus-visible .env { transform: translateY(-4px); }
.letter:hover .env-flap, .letter.open .env-flap, .letter:focus-visible .env-flap { transform: rotateX(180deg); z-index: 1; transition: transform .55s cubic-bezier(.45,0,.2,1) .22s, z-index 0s .5s; }
.letter:hover .env-seal, .letter.open .env-seal, .letter:focus-visible .env-seal { transform: translate(-50%, -50%) scale(0) rotate(160deg); opacity: 0; transition: transform .3s cubic-bezier(.5,0,.75,0) 0s, opacity .25s .05s; }
.letter:hover .env-paper, .letter.open .env-paper, .letter:focus-visible .env-paper { transform: translateY(-104px); transition: transform .7s var(--spring) .72s; }
.letter.opening .env-paper { transform: translateY(-120px) scale(1.03); transition: transform .35s var(--ease) 0s; }
.letter:hover .cta-closed, .letter.open .cta-closed { opacity: 0; transform: translateY(-6px); }
.letter:hover .cta-open, .letter.open .cta-open { opacity: 1; transform: none; }
.letter:not(:hover):not(.open) .env-seal { animation: sealPulse 2.4s ease-in-out infinite; }
@keyframes sealPulse { 0%, 100% { box-shadow: 0 4px 10px rgba(78,114,201,.45), inset 0 -3px 6px rgba(0,0,0,.18); } 50% { box-shadow: 0 4px 18px rgba(127,163,234,.85), inset 0 -3px 6px rgba(0,0,0,.18); } }

/* 阅读窗口：封面配图 */
.m-cover { margin: -44px -50px 26px; aspect-ratio: 16 / 8; overflow: hidden; background: #eef3fe; }
.m-cover img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; display: block; animation: coverIn 1.2s var(--ease) both; }
@keyframes coverIn { from { transform: scale(1.08); opacity: 0; } }
.m-end { text-align: center; color: #a3acd3; font-weight: 600; margin: 34px 0 6px; letter-spacing: 1px; }
@media (max-width: 960px) { .m-cover { margin: -36px -24px 22px; } }

/* ========== 丝带时间线 ========== */
.ribbon-timeline { position: relative; max-width: 900px; margin: 0 auto; padding: 10px 0; }
.ribbon-path { position: absolute; left: 50%; top: 0; width: 40px; height: 100%; transform: translateX(-50%); overflow: visible; }
.ribbon-path path { fill: none; stroke: var(--baby); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 1100; stroke-dashoffset: 1100; filter: drop-shadow(0 2px 3px rgba(78,114,201,.25)); }
.t-item { position: relative; width: 50%; padding: 0 50px 50px; }
.t-item:nth-child(odd) { margin-left: 50%; }
.t-item:nth-child(even) { text-align: right; }
.t-bell { position: absolute; top: 6px; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; background: radial-gradient(circle at 35% 35%, #fff4c4, var(--gold)); box-shadow: 0 4px 10px rgba(217,165,32,.4); transform-origin: 50% -6px; z-index: 2; }
.t-item:nth-child(odd) .t-bell { left: -17px; }
.t-item:nth-child(even) .t-bell { right: -17px; }
.t-item.in .t-bell { animation: ring .6s ease-in-out 3; }
.t-card { display: inline-block; text-align: left; padding: 22px 24px; border-radius: 24px; background: var(--paper); border: 1.5px solid var(--line); box-shadow: var(--shadow); backdrop-filter: blur(10px);
    opacity: 0; transform: translateY(30px) scale(.94); transition: opacity .9s var(--ease), transform .9s var(--spring), box-shadow .3s; }
.t-item.in .t-card { opacity: 1; transform: none; }
.t-card:hover { box-shadow: var(--shadow-lg); }
.t-date { display: inline-block; padding: 3px 12px; border-radius: 999px; background: var(--butter); color: #8a6d1f; font-size: .82rem; font-weight: 700; margin-bottom: 8px; }
[data-theme="dark"] .t-date { color: #f3e3b0; }
.t-card h3 { font-size: 1.2rem; }
.t-card h4 { color: var(--blue); font-weight: 600; font-size: .95rem; margin-bottom: 8px; }
.t-card p { color: var(--ink-soft); font-size: .95rem; }

/* ========== 写信 ========== */
.mail-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 40px; align-items: center; }
.mail-art { display: flex; justify-content: center; }
.mail-art img { width: 100%; max-width: 380px; border-radius: 36px; box-shadow: var(--shadow-lg); animation: breathe 5s ease-in-out infinite; }
.mail-art .emoji-fallback { font-size: 10rem; animation: floaty 5s ease-in-out infinite; }
.envelope-stage { position: relative; perspective: 1400px; }
.letter-paper {
    position: relative; z-index: 3; padding: 34px 36px 26px; border-radius: 18px; background: #fffdf8;
    background-image: repeating-linear-gradient(180deg, transparent 0 35px, rgba(111,151,232,.16) 35px 36px);
    box-shadow: var(--shadow-lg); color: #4b5578; transition: transform 1s var(--ease), opacity .6s;
}
.letter-paper::before { content: ''; position: absolute; left: 22px; top: 0; bottom: 0; width: 2px; background: rgba(246,184,200,.6); }
.letter-hi { font-family: var(--f-cute); font-size: 1.5rem; margin-bottom: 12px; color: var(--blue-deep); }
[data-theme="dark"] .letter-hi { color: #4e72c9; }
.line-field { display: flex; align-items: baseline; gap: 12px; margin-bottom: 8px; font-weight: 600; color: #8a93b2; }
.line-field span { white-space: nowrap; }
.line-field input, .letter-paper textarea { flex: 1; border: none; outline: none; background: transparent; font-family: var(--f-body); font-size: 1.02rem; color: #4b5578; padding: 6px 2px; border-bottom: 2px dashed transparent; transition: border-color .3s; }
.line-field input:focus { border-bottom-color: var(--baby); }
.letter-paper textarea { width: 100%; line-height: 36px; resize: vertical; margin-top: 6px; padding: 0 2px; }
.letter-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
#charCount { font-size: .82rem; color: #a3acd3; font-weight: 600; }
.seal-btn { display: inline-flex; align-items: center; gap: 6px; border: none; cursor: pointer; padding: 12px 24px; border-radius: 999px; font-family: var(--f-body); font-weight: 600; font-size: 1rem; color: #fff; background: linear-gradient(135deg, #8fb3f2, #6f97e8); box-shadow: 0 5px 0 #4e72c9; transition: transform .3s var(--spring), box-shadow .2s; }
.seal-btn:hover { transform: translateY(-3px); }
.seal-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #4e72c9; }
.seal-btn:disabled { opacity: .7; cursor: default; }
/* 信封动画（寄出时出现） */
.envelope-back, .envelope-front, .envelope-flap { position: absolute; left: 4%; right: 4%; bottom: -10px; height: 62%; opacity: 0; pointer-events: none; transition: opacity .3s; }
.envelope-back { z-index: 1; background: #f3dfa6; border-radius: 16px; }
.envelope-front { z-index: 4; background: linear-gradient(180deg, #fbefd0, #f7e5b4); border-radius: 0 0 16px 16px; clip-path: polygon(0 20%, 50% 60%, 100% 20%, 100% 100%, 0 100%); display: flex; align-items: center; justify-content: center; }
.envelope-front .wax { margin-top: 40px; width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; background: radial-gradient(circle at 35% 35%, #c8dbff, #6f97e8); transform: scale(0); }
.envelope-flap { z-index: 5; height: 40%; bottom: auto; top: calc(38% + 10px); background: #f7e5b4; clip-path: polygon(0 0, 100% 0, 50% 100%); transform-origin: top; transform: rotateX(180deg); }
.envelope-stage.sending .envelope-back, .envelope-stage.sending .envelope-front, .envelope-stage.sending .envelope-flap { opacity: 1; }
.envelope-stage.sending .letter-paper { transform: translateY(32%) scale(.82); }
.envelope-stage.sealed .envelope-flap { transform: rotateX(0); transition: transform .6s var(--ease), opacity .3s; z-index: 6; }
.envelope-stage.sealed .envelope-front .wax { transform: scale(1); transition: transform .5s .4s var(--spring); }
.envelope-stage.flying { animation: flyAway 1.2s cubic-bezier(.5, 0, .75, 0) forwards; }
@keyframes flyAway { 0% { transform: none; } 20% { transform: translateY(10px) rotate(-3deg); } 100% { transform: translate(60vw, -80vh) rotate(25deg) scale(.3); opacity: 0; } }
.envelope-stage.back-in { animation: backIn .8s var(--spring); }
@keyframes backIn { from { transform: translateY(40px) scale(.9); opacity: 0; } }

/* ========== 引言 & 页脚 ========== */
.quote-sec { padding-top: 40px; }
.quote-sec blockquote { position: relative; max-width: 820px; margin: 0 auto; text-align: center; padding: 50px 40px; border-radius: 36px; background: var(--paper); border: 1.5px solid var(--line); box-shadow: var(--shadow); }
.quote-sec blockquote > i { font-size: 3rem; color: var(--baby); display: block; margin-bottom: 6px; }
#dynQuote { font-family: var(--f-cute); font-size: clamp(1.3rem, 3vw, 1.9rem); line-height: 1.7; }
#dynQuote .ch { display: inline-block; opacity: 0; transform: translateY(20px) rotate(10deg); transition: opacity .5s, transform .6s var(--spring), color .4s; }
#dynQuote.in .ch { opacity: 1; transform: none; }
#dynQuote .ch:hover { color: var(--blue); transform: translateY(-6px) scale(1.2); }

.footer { text-align: center; padding: 30px 20px 140px; color: var(--ink-soft); font-weight: 500; }
.footer i.ri-heart-3-fill { color: var(--pink); display: inline-block; animation: beat 1.2s ease-in-out infinite; }
@keyframes beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.3); } 30% { transform: scale(1); } 45% { transform: scale(1.2); } }
.cat-sleep { position: relative; display: inline-block; cursor: pointer; margin-bottom: 10px; }
.cat-sleep img { width: 150px; height: 150px; object-fit: cover; border-radius: 50%; box-shadow: var(--shadow); animation: catBreath 3.5s ease-in-out infinite; }
.cat-sleep .emoji-fallback { font-size: 5rem; display: inline-block; animation: catBreath 3.5s ease-in-out infinite; }
@keyframes catBreath { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.03, .97); } }
.cat-sleep.poked img, .cat-sleep.poked .emoji-fallback { animation: catJump .6s var(--spring); }
@keyframes catJump { 30% { transform: translateY(-24px) rotate(-8deg); } }
.zzz { position: absolute; top: 0; right: -10px; font-family: var(--f-cute); color: var(--blue); }
.zzz i { position: absolute; font-style: normal; opacity: 0; animation: zz 3s ease-in-out infinite; font-size: 1rem; }
.zzz i:nth-child(2) { animation-delay: 1s; font-size: 1.3rem; }
.zzz i:nth-child(3) { animation-delay: 2s; font-size: 1.6rem; }
@keyframes zz { 0% { opacity: 0; transform: translate(0, 10px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(26px, -40px); } }

/* ========== 吉祥物 ========== */
.mascot { position: fixed; left: 24px; bottom: 24px; z-index: 1200; width: 84px; cursor: pointer; transform: translateY(160%); transition: transform .9s var(--spring); }
body.ready .mascot { transform: none; transition-delay: 2.4s; }
.mascot-face { position: relative; width: 100%; aspect-ratio: 1; animation: mascotBob 3s ease-in-out infinite; transform-origin: 50% 100%; }
.mascot-face .face-clip { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; border: 4px solid #fff; box-shadow: 0 10px 24px rgba(78,114,201,.3), 0 0 0 3px var(--baby); background: #dce9fd; }
.mascot-bow { position: absolute; top: -8px; right: -6px; font-size: 1.8rem; transform: rotate(18deg); filter: drop-shadow(0 3px 4px rgba(0,0,0,.12)); }
.mascot-bell { position: absolute; left: 50%; bottom: -6px; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff2b8, var(--gold) 60%, #d9a520); box-shadow: 0 3px 6px rgba(217,165,32,.4); transform-origin: 50% -8px; }
.mascot-face::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--baby); opacity: 0; }
.mascot:hover .mascot-face::after { animation: pulseRing 1.4s ease-out infinite; }
@keyframes pulseRing { 0% { transform: scale(.9); opacity: .9; } 100% { transform: scale(1.3); opacity: 0; } }
@keyframes mascotBob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-6px) rotate(3deg); } }
.mascot:hover .mascot-face { animation-duration: 1s; }
.mascot.jump .mascot-face { animation: mascotJump .6s var(--spring); }
@keyframes mascotJump { 40% { transform: translateY(-30px) scale(1.06, .94); } 70% { transform: translateY(0) scale(.95, 1.05); } }
.mascot.jump .mascot-bell, .mascot:hover .mascot-bell { animation: ring .5s ease-in-out 2; }
.mascot-bubble {
    position: absolute; left: 64px; bottom: 96px; width: max-content; max-width: 220px; padding: 10px 16px; border-radius: 18px 18px 18px 4px;
    background: var(--paper-solid); border: 2px solid var(--baby); color: var(--ink); font-weight: 600; font-size: .92rem; box-shadow: var(--shadow);
    opacity: 0; transform: translateY(10px) scale(.8); transform-origin: bottom left; transition: opacity .3s, transform .4s var(--spring); pointer-events: none;
}
.mascot-bubble.show { opacity: 1; transform: none; }

/* ========== Dock ========== */
.dock {
    position: fixed; left: 50%; bottom: 18px; z-index: 1300; display: flex; align-items: flex-end; gap: 6px; padding: 8px 12px; height: 66px;
    border-radius: 24px; background: var(--paper); border: 1.5px solid rgba(255,255,255,.7); box-shadow: var(--shadow-lg); backdrop-filter: blur(18px) saturate(150%);
    transform: translate(-50%, 140%); transition: transform 1s var(--spring);
}
[data-theme="dark"] .dock { border-color: rgba(255,255,255,.08); }
body.ready .dock { transform: translate(-50%, 0); transition-delay: 2.2s; }
.dock-item {
    position: relative; width: 46px; height: 46px; flex-shrink: 0; border-radius: 15px; border: none; cursor: pointer; text-decoration: none;
    display: flex; align-items: center; justify-content: center; font-size: 1.3rem; color: var(--blue);
    background: var(--paper-solid); box-shadow: 0 3px 8px rgba(78,114,201,.12);
    transition: width .2s ease, height .2s ease, font-size .2s, background .3s, color .3s; will-change: width;
}
.dock-item::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 12px); left: 50%; transform: translateX(-50%) translateY(6px); padding: 4px 10px; border-radius: 8px; background: var(--ink); color: var(--sky-b); font-size: .78rem; font-weight: 600; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.dock-item:hover::after { opacity: 1; transform: translateX(-50%); }
.dock-item.active { background: linear-gradient(135deg, #8fb3f2, #6f97e8); color: #fff; }
.dock-item.active::before { content: ''; position: absolute; bottom: -7px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--blue); }
.dock-item.on { background: var(--butter); color: #b58a16; }
.dock-sep { width: 2px; height: 34px; margin: 0 4px 6px; border-radius: 2px; background: var(--line); align-self: flex-end; }
.dock-item.bounce { animation: dockBounce .6s var(--spring); }
@keyframes dockBounce { 40% { transform: translateY(-16px); } }
#bgmPlayer.on i { animation: spin 3s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 弹幕弹窗 */
.dm-pop {
    position: fixed; left: 50%; bottom: 100px; z-index: 1300; display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 16px;
    border-radius: 999px; background: var(--paper-solid); border: 2px solid var(--baby); box-shadow: var(--shadow-lg);
    transform: translate(-50%, 20px) scale(.9); opacity: 0; pointer-events: none; transition: transform .4s var(--spring), opacity .3s;
}
.dm-pop.show { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.dm-pop.shake { animation: shake .4s; }
@keyframes shake { 25% { margin-left: -8px; } 75% { margin-left: 8px; } }
#dmInput { width: 220px; border: none; outline: none; background: transparent; font-family: var(--f-body); font-size: .98rem; color: var(--ink); }
#dmColor { width: 28px; height: 28px; border: none; padding: 0; background: none; cursor: pointer; }
#dmColor::-webkit-color-swatch-wrapper { padding: 0; }
#dmColor::-webkit-color-swatch { border: 2px solid #fff; border-radius: 50%; }
#dmBtn { border: none; cursor: pointer; padding: 9px 18px; border-radius: 999px; font-family: var(--f-body); font-weight: 600; color: #fff; background: linear-gradient(135deg, #8fb3f2, #6f97e8); }
#danmakuContainer { position: fixed; inset: 0; z-index: 900; pointer-events: none; overflow: hidden; }
.danmaku-item { position: absolute; left: 0; white-space: nowrap; padding: 5px 16px; border-radius: 999px; font-weight: 600; font-size: 1.02rem; background: rgba(255,255,255,.75); box-shadow: 0 4px 12px rgba(78,114,201,.15); animation: dmSlide linear forwards; }
[data-theme="dark"] .danmaku-item { background: rgba(30,36,70,.75); }
.danmaku-item.mine { border: 2px solid currentColor; }
@keyframes dmSlide { from { transform: translateX(100vw); } to { transform: translateX(-110%); } }

/* ========== 弹窗 ========== */
.modal { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: center; justify-content: center; padding: 20px; visibility: hidden; }
.modal.open { visibility: visible; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(40, 50, 90, .35); backdrop-filter: blur(6px); opacity: 0; transition: opacity .4s; }
.modal.open .modal-backdrop { opacity: 1; }
.modal-paper {
    position: relative; width: min(760px, 100%); max-height: 88vh; display: flex; flex-direction: column; overflow: hidden; border-radius: 20px;
    background: #fffdf8; color: #4b5578; box-shadow: 0 40px 80px rgba(0,0,0,.25);
    transform: translateY(80px) rotateX(20deg) scale(.9); opacity: 0; transition: transform .7s var(--spring), opacity .4s;
}
.modal.open .modal-paper { transform: none; opacity: 1; }
.modal-progress { height: 5px; background: #eef3fe; flex-shrink: 0; }
.modal-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #a9c8f5, #f6b8c8); }
.modal-body { overflow-y: auto; padding: 44px 50px 56px; background-image: repeating-linear-gradient(180deg, transparent 0 37px, rgba(111,151,232,.1) 37px 38px); }
.modal-body .m-title { font-family: var(--f-cute); font-size: 1.9rem; line-height: 1.4; color: #4b5578; margin-bottom: 10px; }
.modal-body .m-meta { display: flex; gap: 16px; color: #6f97e8; font-weight: 600; font-size: .88rem; padding-bottom: 18px; margin-bottom: 22px; border-bottom: 2px dashed #dce9fd; }
.blog-content { font-size: 1.02rem; line-height: 2; }
.blog-content p { margin-bottom: 1em; }
.blog-content h2 { font-family: var(--f-cute); font-weight: 400; font-size: 1.4rem; margin: 1.5em 0 .5em; padding-left: 14px; border-left: 5px solid #a9c8f5; }
.blog-content strong { color: #4e72c9; background: linear-gradient(transparent 60%, #fbecc0 60%); }
.blog-content code { font-family: var(--f-code); background: #eef3fe; padding: 1px 6px; border-radius: 6px; }
.blog-content blockquote { border-left: 4px solid #f6b8c8; padding: 6px 14px; color: #8a93b2; background: #fff6f8; border-radius: 0 10px 10px 0; margin: 1em 0; }
.blog-content img { max-width: 100%; border-radius: 12px; }
.modal-close { position: absolute; top: 16px; right: 16px; z-index: 2; width: 42px; height: 42px; border-radius: 50%; border: none; cursor: pointer; font-size: 1.3rem; background: #eef3fe; color: #4e72c9; transition: transform .4s var(--spring), background .3s; }
.modal-close:hover { transform: rotate(90deg) scale(1.1); background: #dce9fd; }
body.modal-open { overflow: hidden; }

/* ========== Toast / 进度 ========== */
.toast { position: fixed; top: 24px; left: 50%; z-index: 4000; padding: 12px 22px; border-radius: 999px; background: var(--paper-solid); border: 2px solid var(--baby); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-lg); transform: translate(-50%, -100px); transition: transform .5s var(--spring); }
.toast.show { transform: translate(-50%, 0); }
.scroll-meter { position: fixed; right: 16px; top: 50%; z-index: 1100; width: 6px; height: 160px; margin-top: -80px; border-radius: 6px; background: var(--line); overflow: hidden; }
.scroll-meter span { display: block; width: 100%; height: 0; border-radius: inherit; background: linear-gradient(180deg, #a9c8f5, #f6b8c8); }

/* 光标星星 */
.spark { position: fixed; z-index: 9995; pointer-events: none; font-size: 14px; animation: spark .9s ease-out forwards; }
@keyframes spark { 0% { transform: translate(-50%, -50%) scale(.3); opacity: 1; } 100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1) rotate(var(--r)); opacity: 0; } }

/* ========== 响应式 ========== */
@media (max-width: 960px) {
    .hero { padding: 90px 22px 140px; }
    .hero-grid { grid-template-columns: 1fr; text-align: center; }
    .hero-visual { order: -1; width: min(300px, 80%); margin-bottom: 10px; }
    .hero-name-svg { margin: 0 auto; }
    .hero-name-svg text { text-anchor: middle; }
    .hero-bubble { margin: 0 auto; border-radius: 22px; }
    .hero-cta { justify-content: center; }
    .code-grid, .about-grid, .mail-grid { grid-template-columns: 1fr; }
    .polaroid { max-width: 320px; margin: 0 auto; }
    .hang-tags { grid-template-columns: 1fr; max-width: 320px; margin: 0 auto; }
    .string-line { display: none; }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .ribbon-path { left: 20px; }
    .t-item, .t-item:nth-child(odd) { width: 100%; margin-left: 0; padding: 0 0 40px 60px; text-align: left; }
    .t-item .t-bell, .t-item:nth-child(odd) .t-bell, .t-item:nth-child(even) .t-bell { left: 3px; right: auto; }
    .scroll-meter, .deco { display: none; }
    .mascot { width: 60px; left: 12px; bottom: 90px; }
    .mascot-bubble { left: 44px; bottom: 70px; }
    .modal-body { padding: 36px 24px 44px; }
}
@media (max-width: 680px) {
    .dock { gap: 2px; padding: 6px 8px; height: 56px; max-width: calc(100vw - 16px); overflow-x: auto; }
    .dock-item { width: 38px; height: 38px; font-size: 1.1rem; border-radius: 12px; }
    .dock-sep { display: none; }
    #dmInput { width: 140px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ========== 可爱交互 ========== */
/* 猫爪光标（仅精确指针设备） */
@media (hover: hover) and (pointer: fine) {
    body.paw-cursor { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cg stroke='%23fff' stroke-width='1.6' fill='%237fa6ef'%3E%3Cellipse cx='14' cy='18' rx='6.5' ry='5.2'/%3E%3Ccircle cx='6.5' cy='11' r='2.8'/%3E%3Ccircle cx='11.2' cy='6.8' r='2.8'/%3E%3Ccircle cx='16.8' cy='6.8' r='2.8'/%3E%3Ccircle cx='21.5' cy='11' r='2.8'/%3E%3C/g%3E%3C/svg%3E") 6 4, auto; }
    body.paw-cursor a, body.paw-cursor button, body.paw-cursor [role="button"], body.paw-cursor .letter, body.paw-cursor .mascot, body.paw-cursor .cat-sleep, body.paw-cursor .char-stage, body.paw-cursor .copyable, body.paw-cursor label, body.paw-cursor .work-card {
        cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cg stroke='%23fff' stroke-width='1.6' fill='%23f39ab3'%3E%3Cellipse cx='14' cy='18' rx='6.5' ry='5.2'/%3E%3Ccircle cx='6.5' cy='11' r='2.8'/%3E%3Ccircle cx='11.2' cy='6.8' r='2.8'/%3E%3Ccircle cx='16.8' cy='6.8' r='2.8'/%3E%3Ccircle cx='21.5' cy='11' r='2.8'/%3E%3C/g%3E%3C/svg%3E") 6 4, pointer;
    }
    body.paw-cursor input, body.paw-cursor textarea { cursor: text; }
}
.spark.top { z-index: 10010; }

/* 吉祥物：猫耳、尾巴、睡觉、摸头、拖动 */
.mascot { touch-action: none; }
.mascot.dragging { transition: none; cursor: grabbing; }
.mascot.dragging .mascot-face { animation: none; transform: scale(1.08) rotate(-6deg); }
.mascot.dragging .m-tail { animation-duration: .35s; }
.m-ear { position: absolute; top: -12px; z-index: 0; width: 32px; height: 36px; background: #9fbef2; clip-path: polygon(50% 0, 100% 100%, 0 100%); transform-origin: 50% 100%; }
.m-ear::before { content: ''; position: absolute; left: 3px; right: 3px; top: 6px; bottom: 0; background: #fff; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.m-ear::after { content: ''; position: absolute; left: 10px; right: 10px; top: 14px; bottom: 4px; background: #f8c6d3; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.m-ear.l { left: 2px; rotate: -24deg; animation: earTwitchL 5s ease-in-out infinite; }
.m-ear.r { right: 6px; rotate: 24deg; animation: earTwitchR 5s ease-in-out infinite 2s; }
.mascot-face .face-clip { z-index: 1; }
.mascot-bow, .mascot-bell { z-index: 2; }
.m-tail { position: absolute; right: -26px; bottom: 4px; z-index: 0; width: 36px; height: 44px; border: 7px solid #fff; border-left: none; border-bottom: none; border-radius: 0 40px 0 0; transform-origin: 0 100%; animation: tailWag 1.8s ease-in-out infinite; filter: drop-shadow(0 2px 2px rgba(111,151,232,.35)); }
.mascot.petting .m-ear.l { animation: earFlatL .5s ease infinite; }
.mascot.petting .m-ear.r { animation: earFlatR .5s ease infinite; }
.mascot.petting .m-tail { animation-duration: .4s; }
.mascot.petting .mascot-face { animation-duration: .8s; }
.m-zzz { position: absolute; right: -14px; top: -18px; z-index: 3; font-family: var(--f-cute); color: var(--blue); font-weight: 700; opacity: 0; transition: opacity .4s; pointer-events: none; }
.m-zzz i { font-style: normal; position: absolute; animation: zFloat 2.4s ease-in infinite; opacity: 0; }
.m-zzz i:nth-child(2) { animation-delay: .8s; left: 8px; font-size: 1.1em; } .m-zzz i:nth-child(3) { animation-delay: 1.6s; left: 16px; font-size: 1.3em; }
@keyframes zFloat { 0% { transform: translate(0, 0); opacity: 0; } 30% { opacity: 1; } 100% { transform: translate(10px, -26px); opacity: 0; } }
.mascot.sleepy .m-zzz { opacity: 1; }
.mascot.sleepy .mascot-face { animation: mascotSleep 4s ease-in-out infinite; }
.mascot.sleepy .m-ear { animation: none; transform: rotate(var(--sl, 0)) scaleY(.82); }
.mascot.sleepy .m-ear.l { --sl: -18deg; } .mascot.sleepy .m-ear.r { --sl: 18deg; }
.mascot.sleepy .m-tail { animation-duration: 5s; }
.mascot.sleepy .face-clip img { filter: saturate(.85) brightness(.95); }
@keyframes mascotSleep { 0%, 100% { transform: rotate(-8deg) scale(1); } 50% { transform: rotate(-8deg) scale(1.03, .97); } }

/* 双击留下的猫爪印 */
.paw-stamp { position: fixed; z-index: 9990; pointer-events: none; width: 34px; height: 34px; margin: -17px 0 0 -17px; background: var(--paw) center / contain no-repeat; animation: pawStamp 1.6s ease-out forwards; }
@keyframes pawStamp { 0% { transform: scale(1.8) rotate(var(--r)); opacity: 0; } 15% { transform: scale(1) rotate(var(--r)); opacity: .9; } 70% { opacity: .8; } 100% { transform: scale(1) rotate(var(--r)) translateY(-6px); opacity: 0; } }
:root { --paw: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Cg fill='%23f6b8c8'%3E%3Cellipse cx='14' cy='18' rx='6.5' ry='5.2'/%3E%3Ccircle cx='6.5' cy='11' r='2.8'/%3E%3Ccircle cx='11.2' cy='6.8' r='2.8'/%3E%3Ccircle cx='16.8' cy='6.8' r='2.8'/%3E%3Ccircle cx='21.5' cy='11' r='2.8'/%3E%3C/g%3E%3C/svg%3E"); }

/* 彩蛋：猫爪雨 / 小白雨 */
.rain-drop { position: fixed; top: -50px; z-index: 9993; pointer-events: none; font-size: var(--fs, 24px); animation: rainFall var(--d, 3s) cubic-bezier(.4, 0, .7, 1) forwards; }
@keyframes rainFall { 0% { transform: translate(0, 0) rotate(0); opacity: 0; } 10% { opacity: 1; } 100% { transform: translate(var(--dx, 0), 110vh) rotate(var(--r, 360deg)); opacity: .8; } }

/* 滚动条上的小爪子 */
.scroll-meter { overflow: visible; }
.scroll-meter span { position: relative; }
.scroll-meter span::after { content: '🐾'; position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%) rotate(180deg); font-size: 12px; }

/* 底部小猫戳多了会生气 */
.cat-sleep.grumpy img, .cat-sleep.grumpy .emoji-fallback { filter: hue-rotate(-20deg) saturate(1.3); animation: catAngry .4s ease-in-out 3; }
@keyframes catAngry { 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }

/* 小提示气泡（彩蛋提示） */
.cute-hint { position: fixed; left: 50%; bottom: 100px; z-index: 4000; transform: translate(-50%, 20px); opacity: 0; padding: 8px 16px; border-radius: 999px; background: var(--paper-solid); border: 2px dashed var(--pink); font-family: var(--f-cute); color: var(--ink); font-size: .95rem; transition: opacity .4s, transform .5s var(--spring); pointer-events: none; }
.cute-hint.show { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .m-ear, .m-tail, .cat-ear, .loader-avatar .tail { animation: none !important; } }
.mascot.flip .mascot-bubble { left: auto; right: 64px; border-radius: 18px 18px 4px 18px; transform-origin: bottom right; }
.mascot.below .mascot-bubble { bottom: auto; top: 96px; }

/* ========== 社交主页 ========== */
.social-row { flex-wrap: wrap; }
.socials { display: flex; flex-wrap: wrap; gap: 8px; }
.soc { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 8px; border-radius: 999px; background: var(--paper-solid); color: var(--ink); font-size: .9rem; box-shadow: 0 3px 0 var(--line); transition: transform .35s var(--spring), box-shadow .3s, color .3s, background .3s; }
.soc[hidden] { display: none; }
.soc i { font-size: 1.15rem; }
.soc.bili i { color: #fb7299; } .soc.gh i { color: var(--ink); }
.soc:hover { transform: translateY(-3px) rotate(-3deg); box-shadow: 0 7px 0 var(--line); }
.soc.bili:hover { background: #fb7299; color: #fff; } .soc.bili:hover i { color: #fff; }
.soc.gh:hover { background: #3f4766; color: #fff; } .soc.gh:hover i { color: #fff; }
.soc.xhs:hover { background: #ff2442; color: #fff; }
.xhs-logo { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: #ff2442; color: #fff; font-size: .7rem; font-weight: 700; font-family: var(--f-body); line-height: 1; }
.soc.xhs:hover .xhs-logo { background: #fff; color: #ff2442; }
.foot-socials { display: flex; justify-content: center; gap: 12px; margin: 4px 0 10px; }
.foot-socials:empty { display: none; }
.soc-mini { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--paper-solid); color: var(--ink); font-size: 1.2rem; text-decoration: none; box-shadow: var(--shadow); transition: transform .4s var(--spring), background .3s, color .3s; }
.soc-mini:hover { transform: translateY(-5px) scale(1.12) rotate(8deg); }
.soc-mini.bilibili:hover { background: #fb7299; color: #fff; }
.soc-mini.github:hover { background: #3f4766; color: #fff; }
.soc-mini.xiaohongshu:hover { background: #ff2442; }
.soc-mini .xhs-logo { width: 22px; height: 22px; }

/* 文章分享 */
.m-share { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 6px 0 10px; }
.m-share-btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border-radius: 999px; border: 2px dashed var(--baby); background: var(--paper-solid); color: var(--blue-deep); font: 600 .92rem var(--f-body); text-decoration: none; cursor: pointer; transition: transform .3s var(--spring), background .3s, color .3s, border-color .3s; }
.m-share-btn:hover { transform: translateY(-3px) rotate(-2deg); background: var(--baby); color: #fff; border-color: var(--baby); }
