/* =========================================================
   เว็บครบรอบเมฆ × เบียร์ — MOBILE FIRST
   เขียน base = มือถือ แล้วค่อย enhance ขึ้นจอใหญ่ด้วย min-width
   ========================================================= */
:root {
    --cream: #fff8ec;
    --butter: #ffe8a8;
    --blush: #ffd1dc;
    --rose: #ff7aa8;
    --berry: #b54773;
    --sky: #bfe8ff;
    --mint: #cbf5df;
    --ink: #5a3d4d;
    --muted: #8b6b78;
    --card: rgba(255, 255, 255, 0.78);
    --shadow: 0 16px 40px rgba(181, 71, 115, 0.16);
    --radius-lg: 26px;
    --radius-md: 20px;
    --gutter: 16px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Mali', cursive, sans-serif;
    color: var(--ink);
    line-height: 1.7;
    background:
        radial-gradient(circle at 10% 6%, rgba(255, 209, 220, 0.95) 0 6rem, transparent 6.2rem),
        radial-gradient(circle at 92% 6%, rgba(191, 232, 255, 0.85) 0 7rem, transparent 7.2rem),
        radial-gradient(circle at 88% 82%, rgba(203, 245, 223, 0.8) 0 8rem, transparent 8.2rem),
        linear-gradient(135deg, #fff8ec 0%, #fff0f7 48%, #eef8ff 100%);
    background-attachment: fixed;
    overflow-x: hidden;
}

/* ออโรร่าไหลช้า ๆ เป็นฉากหลังลึกสุด */
body::after {
    content: '';
    position: fixed;
    inset: -40%;
    z-index: -2;
    pointer-events: none;
    background:
        radial-gradient(circle at 30% 30%, rgba(255, 122, 168, 0.20), transparent 45%),
        radial-gradient(circle at 70% 60%, rgba(191, 232, 255, 0.22), transparent 45%),
        radial-gradient(circle at 50% 80%, rgba(203, 245, 223, 0.20), transparent 45%);
    animation: auroraDrift 24s ease-in-out infinite alternate;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        radial-gradient(circle, rgba(255, 122, 168, 0.2) 1.5px, transparent 1.5px),
        radial-gradient(circle, rgba(255, 232, 168, 0.35) 2px, transparent 2px);
    background-position: 0 0, 24px 28px;
    background-size: 56px 56px, 72px 72px;
    mask-image: linear-gradient(to bottom, black, transparent 82%);
    animation: twinkleField 6s ease-in-out infinite;
}

/* ล็อกการเลื่อนตอนยังไม่กดรับจดหมาย */
body.gate-open {
    overflow: hidden;
    height: 100vh;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

h1, h2, h3, p {
    margin-top: 0;
}

h1, h2, h3 {
    font-family: 'Itim', cursive;
    letter-spacing: 0.01em;
}

main {
    width: min(1120px, calc(100% - 2 * var(--gutter)));
    margin: 0 auto;
}

section, .hero {
    margin: 20px 0;
    padding: 1.4rem;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: var(--radius-lg);
    background: var(--card);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

/* =========================================================
   ด่านจดหมาย (GATE)
   ========================================================= */
.gate {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 1.2rem;
    overflow: hidden;
    background:
        radial-gradient(circle at 20% 18%, rgba(255, 209, 220, 0.9), transparent 40%),
        radial-gradient(circle at 82% 78%, rgba(191, 232, 255, 0.85), transparent 42%),
        linear-gradient(160deg, #ffeaf3 0%, #fff4ea 50%, #eaf6ff 100%);
    transition: opacity 0.7s ease, transform 0.7s ease, visibility 0.7s;
}

.gate.closing {
    opacity: 0;
    visibility: hidden;
    transform: scale(1.08);
}

.gate-sky {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.g-star {
    position: absolute;
    width: 14px;
    height: 14px;
    background: #fff;
    clip-path: polygon(50% 0, 62% 35%, 100% 50%, 62% 65%, 50% 100%, 38% 65%, 0 50%, 38% 35%);
    filter: drop-shadow(0 0 6px rgba(255, 122, 168, 0.7));
    animation: twinkle 2.6s ease-in-out infinite;
}
.g-star:nth-child(1) { left: 12%; top: 18%; animation-delay: 0s; }
.g-star:nth-child(2) { left: 80%; top: 14%; animation-delay: .5s; background: var(--butter); }
.g-star:nth-child(3) { left: 18%; top: 74%; animation-delay: 1s; background: var(--sky); }
.g-star:nth-child(4) { left: 74%; top: 70%; animation-delay: 1.4s; }
.g-star:nth-child(5) { left: 50%; top: 8%; animation-delay: 1.9s; background: var(--mint); }
.g-star:nth-child(6) { left: 90%; top: 46%; animation-delay: .8s; background: var(--blush); }

.envelope-stage {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: center;
    gap: 1.2rem;
    width: 100%;
    max-width: 460px;
    text-align: center;
    animation: gateRise 0.9s cubic-bezier(.2, .8, .2, 1) both;
}

.envelope {
    position: relative;
    width: clamp(170px, 55vw, 250px);
    height: clamp(118px, 38vw, 172px);
    filter: drop-shadow(0 22px 34px rgba(181, 71, 115, 0.32));
    animation: floatEnvelope 3.4s ease-in-out infinite;
    transform-style: preserve-3d;
}

.env-body {
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: linear-gradient(160deg, #fff 0%, #ffe9f1 100%);
    box-shadow: inset 0 -10px 24px rgba(255, 122, 168, 0.18);
}

.env-body::before,
.env-body::after {
    content: '';
    position: absolute;
    bottom: 0;
    width: 56%;
    height: 100%;
    background: linear-gradient(160deg, #ffd7e6, #ffc2d8);
}
.env-body::before { left: 0; clip-path: polygon(0 0, 0 100%, 100% 100%); }
.env-body::after { right: 0; clip-path: polygon(100% 0, 0 100%, 100% 100%); }

.env-letter {
    position: absolute;
    left: 8%;
    right: 8%;
    bottom: 10%;
    height: 80%;
    display: grid;
    place-items: start center;
    padding-top: 0.6rem;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(181, 71, 115, 0.18);
    transition: transform 0.8s ease;
    z-index: 1;
}

.env-heart {
    font-size: 2.2rem;
    animation: heartbeat 1.5s infinite;
}

.env-flap {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 58%;
    background: linear-gradient(160deg, #ff9cc0, #ff7aa8);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    transform-origin: top;
    border-radius: 16px 16px 0 0;
    z-index: 3;
    transition: transform 0.7s ease;
}

.env-seal {
    position: absolute;
    top: 38%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 6px 16px rgba(181, 71, 115, 0.3);
    font-size: 1.5rem;
    z-index: 4;
}

/* ตอนกดรับ ฝาเปิด จดหมายเด้งขึ้น */
.gate.accepting .env-flap { transform: rotateX(180deg); }
.gate.accepting .env-letter { transform: translateY(-60%) scale(1.04); }
.gate.accepting .env-seal { opacity: 0; transform: translate(-50%, -50%) scale(0); transition: 0.4s ease; }

.gate-copy { width: 100%; }

.gate-kicker {
    display: inline-block;
    margin: 0 0 0.4rem;
    color: var(--berry);
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-size: 0.72rem;
}

#gate-title {
    margin: 0 0 0.6rem;
    color: var(--berry);
    font-size: clamp(1.7rem, 7vw, 3rem);
    line-height: 1.1;
    text-shadow: 2px 2px 0 #fff;
}

.gate-sub {
    margin: 0 0 1.3rem;
    color: var(--muted);
    font-size: 0.98rem;
}

.gate-actions {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
    min-height: 60px;
}

.button.big {
    min-height: 58px;
    padding: 0.9rem 1.8rem;
    font-size: 1.1rem;
    animation: pulseGlow 2s ease-in-out infinite;
}

.runaway {
    position: relative;
    transition: transform 0.18s ease, opacity 0.3s ease;
    will-change: transform;
}

.gate-hint {
    margin: 0.9rem 0 0;
    min-height: 1.5rem;
    color: var(--rose);
    font-weight: 700;
}

/* =========================================================
   ของตกแต่งลอย: หัวใจตก / ลูกโป่ง / cursor trail
   ========================================================= */
.falling-layer,
.balloon-layer {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.falling-bit {
    position: absolute;
    top: -40px;
    font-size: 1.1rem;
    opacity: 0;
    animation: fallDown linear forwards;
    will-change: transform;
}

.balloon {
    position: absolute;
    bottom: -80px;
    font-size: 2rem;
    opacity: 0.8;
    animation: floatUp linear infinite;
}
.balloon:nth-child(1) { left: 8%; animation-duration: 17s; animation-delay: -2s; }
.balloon:nth-child(2) { left: 52%; animation-duration: 22s; animation-delay: -9s; font-size: 2.6rem; }
.balloon:nth-child(3) { left: 86%; animation-duration: 19s; animation-delay: -5s; }

.cursor-heart {
    position: fixed;
    z-index: 60;
    pointer-events: none;
    font-size: 1.05rem;
    transform: translate(-50%, -50%);
    animation: popFade 1s ease-out forwards;
    will-change: transform, opacity;
}

.page-sparkles span {
    position: fixed;
    z-index: 0;
    width: 12px;
    height: 12px;
    pointer-events: none;
    background: var(--rose);
    clip-path: polygon(50% 0, 62% 35%, 100% 50%, 62% 65%, 50% 100%, 38% 65%, 0 50%, 38% 35%);
    opacity: 0.5;
    animation: floaty 7s ease-in-out infinite;
}

.page-sparkles span:nth-child(1) { left: 7%; top: 18%; }
.page-sparkles span:nth-child(2) { left: 91%; top: 22%; animation-delay: -1s; background: var(--sky); }
.page-sparkles span:nth-child(3) { left: 16%; top: 68%; animation-delay: -3s; background: var(--butter); }
.page-sparkles span:nth-child(4) { left: 78%; top: 82%; animation-delay: -4s; background: var(--mint); }
.page-sparkles span:nth-child(5) { left: 50%; top: 10%; animation-delay: -2s; }
.page-sparkles span:nth-child(6) { left: 4%; top: 90%; animation-delay: -5s; background: var(--sky); }

/* =========================================================
   เมนู — base = แถวเดียวกะทัดรัด เลื่อนแนวนอนได้
   ========================================================= */
.top-nav {
    position: sticky;
    top: 10px;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: min(1120px, calc(100% - 2 * var(--gutter)));
    margin: 10px auto 0;
    padding: 0.5rem 0.6rem;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 12px 28px rgba(181, 71, 115, 0.14);
    backdrop-filter: blur(16px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    flex-shrink: 0;
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    color: var(--berry);
    font-weight: 700;
    font-size: 0.95rem;
    background: #fff6fb;
}

.brand-icon {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    color: white;
    background: linear-gradient(135deg, var(--rose), #ffaec8);
    animation: heartbeat 1.6s infinite;
}

/* ลิงก์เมนูเลื่อนแนวนอนได้บนมือถือ ไม่ตกบรรทัดให้เกะกะ */
.nav-links {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex: 1;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}

.nav-links::-webkit-scrollbar { display: none; }

.nav-links a {
    flex-shrink: 0;
    padding: 0.4rem 0.6rem;
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.85rem;
    transition: 0.25s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
    color: var(--berry);
    background: #fff1f6;
    outline: none;
}

.music-toggle {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: #fff6fb;
    box-shadow: 0 8px 18px rgba(181, 71, 115, 0.18);
    cursor: pointer;
    transition: transform 0.25s ease, background 0.25s ease;
}

.music-toggle:hover { transform: scale(1.08); }
.music-toggle.playing { background: linear-gradient(135deg, var(--rose), #ffaec8); }
.music-toggle.playing .music-icon { animation: spin 3s linear infinite; }

/* =========================================================
   HERO — base = คอลัมน์เดียว การ์ดอยู่ล่าง
   ========================================================= */
.hero {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    gap: 1.6rem;
    overflow: hidden;
}

.hero::after {
    content: '♡';
    position: absolute;
    right: -1rem;
    top: 0.5rem;
    color: rgba(255, 122, 168, 0.14);
    font-size: clamp(7rem, 32vw, 14rem);
    line-height: 1;
    transform: rotate(12deg);
    animation: heartbeat 3s ease-in-out infinite;
}

.eyebrow, .section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.6rem;
    color: var(--berry);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.eyebrow::before, .section-kicker::before {
    content: '✦';
    color: var(--rose);
    animation: spin 4s linear infinite;
}

.hero h1 {
    margin-bottom: 1rem;
    color: var(--berry);
    font-size: clamp(2.6rem, 12vw, 4rem);
    line-height: 0.98;
    text-shadow: 2px 2px 0 #fff;
}

.wave {
    display: inline-block;
    animation: wave 2.2s ease-in-out infinite;
    transform-origin: 70% 70%;
}

.hero-note {
    color: var(--muted);
    font-size: clamp(1rem, 4.4vw, 1.2rem);
}

.hero-tip {
    margin-top: 1.1rem;
    color: var(--rose);
    font-size: 0.9rem;
    font-weight: 700;
}

/* ปุ่มหลัก — base ปุ่มเต็มความกว้าง กดง่ายด้วยนิ้ว */
.hero-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.7rem;
    margin-top: 1.6rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0.8rem 1.4rem;
    border: 0;
    border-radius: 999px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.25s ease;
}

.button.primary {
    color: white;
    background: linear-gradient(135deg, var(--rose), #ff9abb);
    box-shadow: 0 14px 26px rgba(255, 122, 168, 0.28);
}

.button.ghost {
    color: var(--berry);
    background: white;
}

.button:hover,
.button:focus-visible {
    transform: translateY(-3px) rotate(-1deg);
    outline: none;
}

.hero-card {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: center;
    padding: 1.6rem;
    border: 7px solid #fff;
    border-radius: 32px;
    color: var(--berry);
    text-align: center;
    background:
        linear-gradient(white, white) padding-box,
        repeating-linear-gradient(-35deg, var(--blush) 0 14px, var(--butter) 14px 28px, var(--sky) 28px 42px) border-box;
    box-shadow: 0 22px 50px rgba(181, 71, 115, 0.22);
    animation: cardSway 6s ease-in-out infinite;
    transition: transform 0.2s ease;
}

.hero-card::before,
.hero-card::after {
    content: '';
    position: absolute;
    width: 64px;
    height: 28px;
    border-radius: 999px;
    background: rgba(255, 209, 220, 0.86);
    box-shadow: 24px 0 0 rgba(255, 209, 220, 0.86);
}

.hero-card::before { top: 28px; left: -28px; transform: rotate(-18deg); }
.hero-card::after { right: -28px; bottom: 42px; transform: rotate(16deg); }

.moon {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    margin-bottom: 0.8rem;
    border-radius: 50%;
    font-size: 2.4rem;
    background: #fff7ce;
    animation: floaty 5s ease-in-out infinite;
}

.couple-badge {
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    color: white;
    background: var(--rose);
    font-weight: 700;
}

.big-heart {
    margin: 0.7rem 0;
    color: var(--rose);
    font-size: clamp(4.5rem, 22vw, 7rem);
    line-height: 1;
    animation: heartbeat 1.6s infinite;
}

.hero-card p {
    margin-bottom: 0.3rem;
    font-size: 1.35rem;
    font-weight: 700;
}

.hero-card small {
    color: var(--muted);
}

/* =========================================================
   หัวข้อ section
   ========================================================= */
.section-heading {
    max-width: 720px;
    margin: 0 auto 1.6rem;
    text-align: center;
}

.section-heading h2,
.letter-card h2 {
    margin-bottom: 0.6rem;
    color: var(--berry);
    font-size: clamp(1.8rem, 7vw, 3.5rem);
    line-height: 1.1;
}

.section-heading p,
.soft-note,
.letter-card p {
    color: var(--muted);
}

/* =========================================================
   COUNTDOWN — base = ตาราง 2x2
   ========================================================= */
.timer {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
}

.timer div {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 110px;
    padding: 0.8rem;
    border: 2px dashed rgba(255, 122, 168, 0.38);
    border-radius: 24px;
    background: linear-gradient(180deg, #ffffff 0%, #fff4f8 100%);
    transition: transform 0.3s ease;
}

.timer div:hover { transform: translateY(-6px) scale(1.03); }

.timer div::before {
    content: '♡';
    position: absolute;
    top: 0.45rem;
    right: 0.7rem;
    color: rgba(255, 122, 168, 0.45);
}

.timer span {
    color: var(--berry);
    font-family: 'Itim', cursive;
    font-size: clamp(2.6rem, 13vw, 5rem);
    line-height: 0.9;
}

.timer small {
    color: var(--muted);
    font-weight: 700;
}

.timer span.tick { animation: tickPop 0.4s ease; }

.soft-note {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    margin-top: 1.3rem;
}

.soft-note p {
    margin: 0;
    padding: 0.6rem 1rem;
    border-radius: 999px;
    text-align: center;
    background: rgba(255, 255, 255, 0.72);
}

/* =========================================================
   TIMELINE
   ========================================================= */
.timeline {
    position: relative;
    display: grid;
    gap: 0.9rem;
    max-width: 860px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 1.6rem;
    bottom: 1.6rem;
    left: 26px;
    width: 4px;
    border-radius: 999px;
    background: linear-gradient(var(--blush), var(--sky), var(--mint));
}

.event {
    position: relative;
    min-height: 110px;
    padding: 1.2rem 1.1rem 1.2rem 4.6rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.76);
    box-shadow: 0 12px 28px rgba(181, 71, 115, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event:hover {
    transform: translateX(4px) scale(1.01);
    box-shadow: 0 18px 38px rgba(181, 71, 115, 0.18);
}

.event:nth-child(even) {
    background: rgba(255, 250, 226, 0.78);
}

.event-icon {
    position: absolute;
    left: 2px;
    top: 50%;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 4px solid white;
    border-radius: 50%;
    background: var(--blush);
    box-shadow: 0 10px 22px rgba(181, 71, 115, 0.16);
    transform: translateY(-50%);
    animation: floaty 4s ease-in-out infinite;
}

.event h3 {
    margin-bottom: 0.35rem;
    color: var(--berry);
    font-size: 1.25rem;
}

.event p {
    margin-bottom: 0;
    color: var(--muted);
}

/* =========================================================
   GALLERY — base = คอลัมน์เดียว รูปใหญ่เต็มตา
   ========================================================= */
.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.photo-card {
    position: relative;
    min-height: 240px;
    padding: 0.7rem 0.7rem 3rem;
    border: 0;
    border-radius: 22px;
    color: var(--berry);
    font: inherit;
    font-weight: 700;
    background: white;
    box-shadow: 0 16px 30px rgba(181, 71, 115, 0.14);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.photo-card:hover,
.photo-card:focus-visible {
    z-index: 2;
    box-shadow: 0 24px 48px rgba(181, 71, 115, 0.24);
    outline: none;
    transform: translateY(-8px) scale(1.02);
}

.photo-card img {
    width: 100%;
    height: 230px;
    border-radius: 16px;
    object-fit: cover;
}

.photo-card span {
    position: absolute;
    right: 1.1rem;
    bottom: 0.9rem;
    left: 1.1rem;
    display: inline-flex;
    justify-content: center;
}

/* =========================================================
   MODAL
   ========================================================= */
.modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.2rem;
    background: rgba(90, 61, 77, 0.76);
    backdrop-filter: blur(10px);
}

.modal.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal img {
    max-width: min(94vw, 980px);
    max-height: 82vh;
    border: 8px solid #fff;
    border-radius: 22px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
    object-fit: contain;
    animation: zoomIn 0.4s cubic-bezier(.2, .8, .2, 1);
}

.close {
    position: absolute;
    top: 16px;
    right: 18px;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    color: var(--berry);
    background: white;
    font-size: 1.9rem;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.close:hover { transform: rotate(90deg) scale(1.1); }

/* =========================================================
   LOVE METER
   ========================================================= */
.meter-wrap {
    display: grid;
    justify-items: center;
    gap: 1.2rem;
    max-width: 640px;
    margin: 0 auto;
}

.meter-track {
    position: relative;
    width: 100%;
    height: 42px;
    border-radius: 999px;
    background: rgba(255, 209, 220, 0.45);
    box-shadow: inset 0 4px 12px rgba(181, 71, 115, 0.18);
    overflow: hidden;
}

.meter-fill {
    width: 0%;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #ffb3cf, var(--rose), #ff5e93);
    background-size: 200% 100%;
    box-shadow: 0 0 18px rgba(255, 94, 147, 0.5);
    transition: width 0.25s cubic-bezier(.2, .8, .2, 1);
    animation: shimmer 2.5s linear infinite;
}

.meter-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--berry);
    font-weight: 700;
    font-family: 'Itim', cursive;
    text-shadow: 0 1px 2px #fff;
}

.heart-pump {
    width: 100%;
    max-width: 320px;
    padding: 1rem 2rem;
    border: 0;
    border-radius: 999px;
    color: white;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--rose), #ff9abb);
    box-shadow: 0 14px 26px rgba(255, 122, 168, 0.3);
    cursor: pointer;
    transition: transform 0.12s ease;
}

.heart-pump:active { transform: scale(0.92); }
.heart-pump.bump { animation: pumpBump 0.3s ease; }

.meter-status {
    margin: 0;
    color: var(--muted);
    text-align: center;
    font-weight: 700;
}

/* =========================================================
   LETTER
   ========================================================= */
.letter-card {
    position: relative;
    max-width: 820px;
    margin: 0 auto;
    padding: 1.6rem 1.3rem;
    border: 2px dashed rgba(255, 122, 168, 0.4);
    border-radius: 28px;
    text-align: center;
    background:
        linear-gradient(white, rgba(255, 255, 255, 0.9)),
        repeating-linear-gradient(0deg, transparent 0 34px, rgba(255, 122, 168, 0.09) 34px 36px);
}

.stamp {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 0.8rem;
    border: 2px dashed var(--rose);
    border-radius: 16px;
    font-size: 2rem;
    transform: rotate(8deg);
    animation: stampWiggle 4s ease-in-out infinite;
}

.typed-letter {
    min-height: 6.5rem;
    font-size: 1.08rem;
}

.typed-letter::after {
    content: '|';
    color: var(--rose);
    animation: caret 1s steps(1) infinite;
}

.typed-letter.done::after { content: ''; }

.reasons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin: 1.3rem 0 0.4rem;
}

.reason-chip {
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: #fff1f6;
    color: var(--berry);
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 8px 18px rgba(181, 71, 115, 0.12);
    cursor: default;
    transition: transform 0.2s ease;
}

.reason-chip:hover { transform: translateY(-4px) scale(1.05) rotate(-2deg); }

.signature {
    margin-top: 1.2rem;
    color: var(--berry);
    font-family: 'Itim', cursive;
    font-size: 1.35rem;
}

.footer {
    margin: 1.6rem 0 2.4rem;
    text-align: center;
    color: var(--muted);
    font-weight: 700;
    font-size: 0.95rem;
}

/* =========================================================
   REVEAL ON SCROLL
   ========================================================= */
.hidden {
    opacity: 0;
    transform: translateY(28px) scale(0.98);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* =========================================================
   KEYFRAMES
   ========================================================= */
@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    45% { transform: scale(1.16); }
}

@keyframes floaty {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-22px) rotate(18deg); }
}

@keyframes floatEnvelope {
    0%, 100% { transform: translateY(0) rotate(-1deg); }
    50% { transform: translateY(-14px) rotate(1deg); }
}

@keyframes gateRise {
    from { opacity: 0; transform: translateY(40px) scale(0.94); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes twinkle {
    0%, 100% { opacity: 0.25; transform: scale(0.7) rotate(0deg); }
    50% { opacity: 1; transform: scale(1.2) rotate(40deg); }
}

@keyframes twinkleField {
    0%, 100% { opacity: 0.85; }
    50% { opacity: 1; }
}

@keyframes auroraDrift {
    from { transform: translate(-3%, -2%) rotate(0deg); }
    to { transform: translate(3%, 2%) rotate(8deg); }
}

@keyframes fallDown {
    0% { opacity: 0; transform: translateY(-10px) rotate(0deg); }
    10% { opacity: 0.9; }
    100% { opacity: 0; transform: translateY(105vh) rotate(360deg); }
}

@keyframes floatUp {
    0% { transform: translateY(0) translateX(0) rotate(-4deg); }
    50% { transform: translateY(-55vh) translateX(24px) rotate(4deg); }
    100% { transform: translateY(-110vh) translateX(-12px) rotate(-4deg); }
}

@keyframes popFade {
    0% { opacity: 1; transform: translate(-50%, -50%) scale(0.4); }
    100% { opacity: 0; transform: translate(-50%, -150%) scale(1.3); }
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 14px 26px rgba(255, 122, 168, 0.28); }
    50% { box-shadow: 0 14px 42px rgba(255, 94, 147, 0.55); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes wave {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(18deg); }
    75% { transform: rotate(-12deg); }
}

@keyframes cardSway {
    0%, 100% { transform: rotate(2deg); }
    50% { transform: rotate(-2deg) translateY(-8px); }
}

@keyframes tickPop {
    0% { transform: scale(1); }
    40% { transform: scale(1.3); color: var(--rose); }
    100% { transform: scale(1); }
}

@keyframes shimmer {
    to { background-position: 200% 0; }
}

@keyframes pumpBump {
    0% { transform: scale(1); }
    50% { transform: scale(1.12); }
    100% { transform: scale(1); }
}

@keyframes stampWiggle {
    0%, 100% { transform: rotate(8deg); }
    50% { transform: rotate(-4deg) scale(1.05); }
}

@keyframes caret {
    50% { opacity: 0; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.85); }
    to { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

/* =========================================================
   ENHANCE: แท็บเล็ตเล็ก / มือถือแนวนอน  (≥ 600px)
   ========================================================= */
@media (min-width: 600px) {
    :root {
        --radius-lg: 30px;
        --gutter: 18px;
    }

    section, .hero {
        margin: 26px 0;
        padding: clamp(1.8rem, 4vw, 3rem);
    }

    .gate-actions {
        gap: 1rem;
    }

    .hero-actions {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }

    .button {
        min-height: 50px;
    }

    .timer {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 1rem;
    }

    .timer div {
        min-height: 130px;
    }

    .soft-note {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.8rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.2rem;
    }

    .photo-card:nth-child(2n) { transform: rotate(1.8deg); }
    .photo-card:nth-child(2n + 1) { transform: rotate(-1.5deg); }
    .photo-card:hover,
    .photo-card:focus-visible { transform: translateY(-8px) rotate(0deg) scale(1.02); }

    .letter-card {
        padding: clamp(2rem, 5vw, 3.5rem);
    }

    .stamp {
        position: absolute;
        right: 1.4rem;
        top: 1.2rem;
        margin: 0;
    }
}

/* =========================================================
   ENHANCE: แท็บเล็ต  (≥ 768px)
   ========================================================= */
@media (min-width: 768px) {
    :root {
        --radius-lg: 34px;
        --radius-md: 24px;
        --shadow: 0 24px 60px rgba(181, 71, 115, 0.18);
    }

    .top-nav {
        top: 16px;
        gap: 1rem;
        padding: 0.75rem;
        border-radius: 999px;
    }

    .brand {
        padding: 0.55rem 0.9rem;
        font-size: 1rem;
    }

    .nav-links {
        flex: 0 1 auto;
        justify-content: center;
        overflow: visible;
    }

    .nav-links a {
        padding: 0.55rem 0.85rem;
        font-size: 0.95rem;
    }

    .nav-links a:hover,
    .nav-links a:focus-visible {
        transform: translateY(-2px);
    }

    .music-toggle {
        width: 44px;
        height: 44px;
    }

    .timeline::before { left: 38px; }

    .event {
        min-height: 120px;
        padding: 1.4rem 1.4rem 1.4rem 6rem;
    }

    .event:nth-child(even) {
        transform: translateX(22px);
    }

    .event:nth-child(even):hover {
        transform: translateX(28px) scale(1.01);
    }

    .event-icon {
        left: 12px;
        width: 54px;
        height: 54px;
    }

    .event h3 { font-size: 1.45rem; }

    .gallery-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1.5rem;
    }

    .photo-card {
        min-height: 260px;
        padding: 0.7rem 0.7rem 3.2rem;
    }

    .photo-card img { height: 250px; }
}

/* =========================================================
   ENHANCE: เดสก์ท็อป  (≥ 992px) — hero สองคอลัมน์ + การ์ดเอียง
   ========================================================= */
@media (min-width: 992px) {
    section, .hero {
        margin: 34px 0;
        padding: clamp(2rem, 5vw, 4.5rem);
    }

    .hero {
        grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
        gap: clamp(1.5rem, 5vw, 4rem);
        min-height: 640px;
    }

    .hero::after {
        right: -2rem;
        top: 1rem;
        font-size: clamp(10rem, 25vw, 20rem);
    }

    .hero h1 {
        max-width: 720px;
        font-size: clamp(3.2rem, 7vw, 7.5rem);
        line-height: 0.92;
        text-shadow: 3px 3px 0 #fff;
    }

    .hero-note {
        max-width: 620px;
        font-size: clamp(1.1rem, 2.3vw, 1.35rem);
    }

    .hero-card {
        padding: clamp(1.5rem, 4vw, 3rem);
        border-width: 9px;
        border-radius: 42px;
        box-shadow: 0 30px 70px rgba(181, 71, 115, 0.22);
        transform: rotate(2deg);
    }

    .hero-card::before,
    .hero-card::after {
        width: 74px;
        height: 32px;
        box-shadow: 28px 0 0 rgba(255, 209, 220, 0.86);
    }

    .hero-card::before { top: 34px; left: -34px; }
    .hero-card::after { right: -34px; bottom: 50px; }

    .moon {
        width: 86px;
        height: 86px;
        font-size: 2.8rem;
    }

    .big-heart { font-size: clamp(5rem, 14vw, 9rem); }

    .hero-card p { font-size: 1.5rem; }

    .timer div { min-height: 150px; }
}

/* จอใหญ่มาก ๆ — เผื่อ section-heading เว้นช่วงสวยขึ้น */
@media (min-width: 1200px) {
    .section-heading { margin-bottom: 2rem; }
}
