/* Weiling at 35: styled after Weiling's own watercolors (bold washes, squiggles, suns),
   with monstera, ivy and rattan cane for a little Singapore-at-home flair. */
:root {
  --paper: #FFF6EA;
  --paper-2: #FFEEDB;
  --card: #FFFDF8;
  --ink: #35190F;           /* warm brown, like Dabao's type */
  --ink-soft: #6A4A3C;
  --marigold: #FFC21A;
  --tangerine: #FF7417;     /* Dabao orange */
  --crimson: #C8132A;       /* Dabao red */
  --coral: #F0533A;
  --pink: #EE5D9C;
  --teal: #0E8F86;
  --cobalt: #2F6CD0;
  --violet: #6A4BB5;
  --leaf: #1E9150;
  --leaf-deep: #0B6236;
  --rattan: #DDAE6E;
  --rattan-dark: #8C5A2B;
  --peach: #FFD9BF;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --hand: 'Caveat', 'Bradley Hand', 'Segoe Print', cursive;
  --radius: 22px;
  --shadow: 0 1px 2px rgba(80, 40, 10, .07), 0 14px 34px -14px rgba(80, 40, 10, .32);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .42 0 0 0 0 .28 0 0 0 0 .16 0 0 0 .11 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --cane: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Crect width='24' height='24' fill='%234A2A12'/%3E%3Cg fill='none' stroke-linecap='round'%3E%3Cg stroke='%238C5A2B' stroke-width='4.8'%3E%3Cpath d='M0 0H24M0 24H24M0 0V24M24 0V24M12 0L24 12L12 24L0 12Z'/%3E%3C/g%3E%3Cg stroke='%23E4B775' stroke-width='3'%3E%3Cpath d='M0 0H24M0 24H24M0 0V24M24 0V24M12 0L24 12L12 24L0 12Z'/%3E%3C/g%3E%3Cg stroke='%23FBE0AE' stroke-width='.8' opacity='.85'%3E%3Cpath d='M0 -.7H24M-.7 0V24M12.6 .6L23.4 11.4M.6 11.4L11.4 .6'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  --rod: linear-gradient(to bottom, #6E4320, #F0C887 30%, #D49A55 60%, #7A4A22);
  --wrap: repeating-linear-gradient(105deg, transparent 0 7px, rgba(90, 50, 18, .38) 7px 8.5px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--sans); color: var(--ink); line-height: 1.55;
  background: var(--grain), var(--paper);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.06; margin: 0; letter-spacing: -.015em; }
h2 { font-size: clamp(2.3rem, 7vw, 3.6rem); }
h2 em, h1 em { font-style: italic; }
p { margin: 0 0 1em; }
a { color: inherit; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.eyebrow, .kicker {
  font-size: .78rem; letter-spacing: .22em; text-transform: uppercase;
  font-weight: 700; color: var(--crimson); margin: 0 0 .8rem;
}
.wc { pointer-events: none; user-select: none; -webkit-user-select: none; }
.leaf { pointer-events: none; overflow: visible; }

/* ---------- HERO ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: grid; place-items: center; text-align: center;
  padding: max(9vh, env(safe-area-inset-top)) 22px 10vh; overflow: hidden;
}
.hero-art { position: absolute; inset: 0; z-index: 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 26vh), rgba(0,0,0,.35) calc(100% - 9vh), transparent 100%);
          mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 26vh), rgba(0,0,0,.35) calc(100% - 9vh), transparent 100%); }
.hero-art > * { position: absolute; }
#h-blue   { top: -3%;  right: -9%;  width: clamp(190px, 40vw, 470px); }
#h-orange { bottom: 3%; left: -10%; width: clamp(240px, 52vw, 600px); }
#h-pink   { top: 15%;  left: -9%;  width: clamp(120px, 24vw, 300px); opacity: .95; }
#h-purple { bottom: 21%; right: -4%; width: clamp(80px, 14vw, 180px); }
#h-teal   { bottom: -2%; right: 10%; width: clamp(130px, 22vw, 270px); }
#h-dots   { top: 26%; right: 22%; width: clamp(70px, 9vw, 120px); opacity: .85; }
#h-leaf1  { top: -60px; left: -70px; width: clamp(170px, 30vw, 340px); }
#h-leaf2  { bottom: -80px; right: -60px; width: clamp(150px, 26vw, 300px); }
.hero-inner { position: relative; z-index: 2; max-width: 760px; padding: 26px 8px; }
.hero-inner::before { /* soft paper glow for legibility */
  content: ""; position: absolute; inset: -12% -16%; z-index: -1;
  background: radial-gradient(closest-side, rgba(255,246,234,.96) 55%, rgba(255,246,234,.75) 78%, rgba(255,246,234,0));
}
.hero-title { font-size: clamp(4.1rem, 18vw, 8.8rem); line-height: .92; margin: .15rem 0 1.4rem; font-weight: 600; color: var(--ink); }
.hero-title > span { display: block; }
.hero-at { font-size: .58em; font-weight: 400; color: var(--leaf-deep); font-style: italic; }
.num { position: relative; display: inline-block; }
.num em {
  position: relative; z-index: 1; font-weight: 800; font-size: 1.7em; font-style: italic;
  background: linear-gradient(135deg, var(--crimson) 10%, var(--tangerine) 55%, var(--pink));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  padding: 0 .08em 0 .02em;
}
.num .sun { position: absolute; z-index: 0; width: 1.25em; left: 50%; top: 50%; transform: translate(-46%, -46%); opacity: .9; animation: sunspin 40s linear infinite; }
@keyframes sunspin { to { transform: translate(-46%, -46%) rotate(360deg); } }
.hero-sub { font-size: clamp(1.05rem, 2.7vw, 1.25rem); color: var(--ink-soft); max-width: 34ch; margin: 0 auto 2.2rem; }
.scroll-cue {
  display: inline-flex; flex-direction: column; align-items: center; gap: .2rem;
  text-decoration: none; color: var(--crimson); font-family: var(--hand); font-size: 1.75rem; font-weight: 700; line-height: 1;
}
.scroll-cue svg { animation: bob 2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(7px); } }

.intro { opacity: 0; transform: translateY(18px); animation: rise .9s cubic-bezier(.2,.7,.2,1) forwards; }
.intro-1 { animation-delay: .2s; } .intro-2 { animation-delay: .4s; } .intro-3 { animation-delay: .65s; }
.intro-4 { animation-delay: .95s; } .intro-5 { animation-delay: 1.3s; }
@keyframes rise { to { opacity: 1; transform: none; } }
.pop { opacity: 0; transform: scale(.6) rotate(calc(var(--r, 0deg) - 12deg)); animation: pop 1.1s cubic-bezier(.2,.9,.25,1.15) forwards; }
.p1 { animation-delay: .05s; } .p2 { animation-delay: .2s; } .p3 { animation-delay: .35s; }
.p4 { animation-delay: .5s; } .p5 { animation-delay: .65s; } .p6 { animation-delay: .8s; }
@keyframes pop { to { opacity: 1; transform: scale(1) rotate(var(--r, 0deg)); } }

/* ---------- VINES ---------- */
.vine-hang { position: absolute; top: 0; width: 60px; transform: translateX(-50%); }
.vine-hang svg, .vine-row svg, .tl-vine svg { display: block; overflow: visible; }
.vine-row { position: absolute; left: 0; right: 0; top: 100%; height: 0; z-index: 3; pointer-events: none; overflow-x: clip; }
.vine-row .vine-hang { top: 0; }
.sway { transform-origin: 50% 0; animation: sway 7s ease-in-out infinite alternate; }
@keyframes sway { from { transform: rotate(-2.2deg); } to { transform: rotate(2.2deg); } }

/* ---------- INTRO ---------- */
.section-intro { text-align: center; padding: 64px 24px 18px; max-width: 640px; margin: 0 auto; position: relative; }
.lede { color: var(--ink-soft); font-size: 1.08rem; margin-top: 1rem; }

/* ---------- TIMELINE ---------- */
.timeline { position: relative; max-width: 1100px; margin: 0 auto; padding: 30px 20px 70px; overflow-x: visible; overflow-y: clip; }
@media (max-width: 1180px) { .timeline { overflow-x: clip; } }
.tl-vine { position: absolute; top: 0; bottom: 0; left: 50%; width: 70px; transform: translateX(-50%); z-index: 0; pointer-events: none; }
.month { position: relative; text-align: center; margin: 60px 0 34px; z-index: 2; }
.month span {
  display: inline-block; padding: 5px; border-radius: 999px;
  background: var(--wrap), var(--rod); box-shadow: var(--shadow);
}
.month b {
  display: block; padding: .42rem 1.25rem; border-radius: 999px; background: var(--card);
  font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 1.15rem; color: var(--ink);
}
.entry { position: relative; width: 50%; padding: 0 52px 0 0; margin-bottom: 30px; z-index: 1; }
.entry.right { margin-left: 50%; padding: 0 0 0 52px; }
@media (min-width: 761px) { .entry + .entry { margin-top: -170px; } }
.entry .node {
  position: absolute; top: 30px; right: -11px; width: 22px; height: 22px; z-index: 3;
  border-radius: 52% 48% 55% 45% / 47% 55% 45% 53%; background: var(--c, var(--tangerine));
  box-shadow: 0 0 0 4px var(--paper), inset -3px -3px 0 rgba(0,0,0,.12);
}
.entry.right .node { right: auto; left: -11px; }
.splash { position: absolute; z-index: 0; width: 120px; top: -26px; right: 18px; opacity: .95; transform: rotate(var(--r, 10deg)); }
.entry.right .splash { right: -30px; }

.card {
  position: relative; z-index: 1; background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform .35s ease, box-shadow .35s ease;
}
@media (hover: hover) { .card:hover { transform: translateY(-4px) rotate(-.3deg); box-shadow: 0 2px 4px rgba(80,40,10,.07), 0 22px 44px -16px rgba(80,40,10,.38); } }
.card-body { padding: 18px 22px 22px; }
.date { display: inline-block; font-family: var(--hand); font-size: 1.35rem; font-weight: 700; color: var(--c, var(--crimson)); line-height: 1; margin-bottom: .35rem; }
.card h3 { font-size: 1.5rem; font-weight: 600; margin-bottom: .4rem; color: var(--ink); }
.card p { margin: 0; color: var(--ink-soft); font-size: 1rem; }

/* media slot */
.media { position: relative; aspect-ratio: 4 / 3; background: var(--paper-2); }
.gallery { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.gallery::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; height: 100%; scroll-snap-align: center; position: relative; cursor: zoom-in; border: 0; padding: 0; background: none; }
.slide img, .slide video { width: 100%; height: 100%; object-fit: cover; }
.slide .play-badge { position: absolute; right: 12px; bottom: 12px; width: 34px; height: 34px; border-radius: 50%; background: rgba(0,0,0,.45); color: #fff; display: grid; place-items: center; font-size: 13px; pointer-events: none; }
.dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.6); box-shadow: 0 0 0 1px rgba(0,0,0,.12); transition: all .25s; }
.dots i.on { background: #fff; width: 18px; border-radius: 4px; }
.gnav { position: absolute; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255,253,248,.88); color: var(--ink); font-size: 26px; line-height: 1; cursor: pointer; box-shadow: var(--shadow); opacity: 0; transition: opacity .25s; display: grid; place-items: center; padding: 0 0 3px; }
.gprev { left: 10px; } .gnext { right: 10px; }
@media (hover: hover) { .media:hover .gnav, .gnav:focus-visible { opacity: 1; } }
@media (hover: none) { .gnav { display: none; } }
.count { position: absolute; top: 10px; right: 10px; font-size: .72rem; font-weight: 700; color: #fff; background: rgba(0,0,0,.4); padding: 3px 9px; border-radius: 999px; }

.placeholder { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; background: var(--tint, #FFE9C7); }
.placeholder::after { content: ""; position: absolute; inset: 0; background: var(--grain); opacity: .9; pointer-events: none; }
.placeholder .ph-art { position: absolute; width: 74%; height: 84%; object-fit: contain; transform: rotate(var(--r, 0deg)); }
.placeholder .medal {
  position: relative; z-index: 1; width: 92px; height: 92px; display: grid; place-items: center; font-size: 42px;
  background: var(--card); border-radius: 50% 46% 52% 48% / 48% 52% 46% 54%;
  box-shadow: 0 0 0 5px rgba(255,253,248,.6), 0 12px 26px -10px rgba(60,20,0,.45);
}

/* affirmations */
.aff {
  position: absolute; z-index: 0; pointer-events: none; user-select: none;
  font-family: var(--hand); font-weight: 700; line-height: 1.02; color: var(--c, var(--teal));
  opacity: .5; will-change: transform;
}
.aff i { display: block; font-style: normal; animation: drift 9s ease-in-out infinite alternate; }
@keyframes drift { from { transform: translate(-6px, -5px) rotate(-1.2deg); } to { transform: translate(6px, 6px) rotate(1.2deg); } }
.entry .aff { top: 50%; width: calc(100% - 80px); font-size: clamp(1.7rem, 2.6vw, 2.3rem); text-align: center; margin-top: -.55em; }
.entry.left .aff { left: calc(100% + 80px); }
.entry.right .aff { right: calc(100% + 80px); }
.aff-slot { position: relative; height: 110px; display: grid; place-items: center; }
.aff-slot .aff { position: relative; font-size: clamp(2rem, 6vw, 2.8rem); text-align: center; padding: 0 20px; }

/* reveal */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.entry.reveal.left { transform: translate(-28px, 18px); }
.entry.reveal.right { transform: translate(28px, 18px); }
.reveal.in { opacity: 1; transform: none !important; }

/* ---------- RATTAN BAND ---------- */
.rattan-band {
  position: relative; height: 30px; z-index: 4;
  background:
    var(--wrap) top / 100% 8px no-repeat, var(--rod) top / 100% 8px no-repeat,
    var(--wrap) bottom / 100% 8px no-repeat, var(--rod) bottom / 100% 8px no-repeat,
    var(--cane) center / 20px 20px;
  box-shadow: 0 6px 14px -8px rgba(60,30,5,.6);
}

/* ---------- HIGHLIGHTS ---------- */
.highlights { position: relative; overflow: hidden; padding: 74px 0 70px; background: var(--grain), linear-gradient(170deg, #FFD3B5, #FFC59E 60%, #FFB98D); }
.hl-wc1 { position: absolute; width: clamp(150px, 26vw, 300px); right: -40px; top: -30px; opacity: .85; }
.hl-wc2 { position: absolute; width: clamp(220px, 40vw, 480px); left: -70px; bottom: -40px; opacity: .6; transform: rotate(8deg); }
.highlights-head { text-align: center; padding: 0 24px 30px; position: relative; }
.hl-strip { position: relative; display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px 24px 20px; max-width: 1120px; margin: 0 auto; scrollbar-width: none; }
.hl-strip::-webkit-scrollbar { display: none; }
@media (max-width: 760px) { .hl-strip { flex-direction: column; overflow: visible; scroll-snap-type: none; padding: 8px 20px 20px; gap: 14px; } .hl { flex: none; } }
.hl {
  position: relative; flex: 1 0 230px; scroll-snap-align: center; border-radius: 20px; padding: 26px 22px 24px;
  background: var(--card); box-shadow: var(--shadow); overflow: hidden;
}
.hl::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 7px; background: var(--c, var(--tangerine)); }
.hl .ic { width: 52px; height: 52px; display: grid; place-items: center; font-size: 28px; margin-bottom: 12px; border-radius: 52% 48% 55% 45% / 47% 55% 45% 53%; background: var(--t, #FFE6C8); }
.hl h3 { font-size: 1.35rem; font-weight: 600; margin-bottom: .35rem; }
.hl p { margin: 0; color: var(--ink-soft); font-size: .98rem; }

/* ---------- DABAO ---------- */
.dabao { padding: 90px 20px 40px; }
.dabao-card {
  position: relative; max-width: 720px; margin: 0 auto; text-align: center;
  background: var(--card); border-radius: 28px; padding: 56px 30px 36px; box-shadow: var(--shadow);
  border: 3px solid var(--tangerine);
}
.dabao-leaf { position: absolute; width: 150px; left: -58px; top: -64px; transform: rotate(-30deg); z-index: -1; }
.dabao-badge {
  position: absolute; top: -32px; left: 50%; transform: translateX(-50%) rotate(-4deg);
  width: 64px; height: 64px; background: var(--crimson); color: #FFF4E0;
  border-radius: 52% 48% 55% 45% / 47% 55% 45% 53%;
  display: grid; place-items: center; font-size: 1.1rem; font-weight: 700; letter-spacing: .05em;
  box-shadow: 0 0 0 6px var(--paper);
}
.dabao-card h2 { color: var(--ink); font-weight: 600; margin-bottom: 1rem; }
.dabao-card h2 span { color: var(--tangerine); font-style: italic; }
.dabao-card p { color: var(--ink-soft); font-size: 1.08rem; margin: 0 auto 1rem; max-width: 52ch; }
.dabao-card .eyebrow { color: var(--crimson); margin-bottom: .8rem; }
.dabao-sign { font-family: var(--hand); font-size: 1.5rem !important; color: var(--crimson) !important; margin: 0 !important; }

/* background washes + edge monsteras (generated in script.js) */
.bg-deco { position: absolute; top: 0; bottom: 0; left: 0; right: 0; z-index: 0; pointer-events: none; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 160px, #000 calc(100% - 160px), transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 160px, #000 calc(100% - 160px), transparent 100%); }
.bg-deco.full { left: 50%; right: auto; width: 100vw; transform: translateX(-50%); }
.bg-deco > * { position: absolute; pointer-events: none; }
.edge-leaf { transform-origin: 50% 50%; }
.letter-frame, .section-intro > * { position: relative; z-index: 1; }

/* ---------- LETTER ---------- */
.letter-section { padding: 20px 18px 90px; overflow-x: clip; }
.letter-frame {
  position: relative; max-width: 700px; margin: 0 auto; padding: 14px; border-radius: 16px;
  background: var(--wrap), var(--cane) center / 20px 20px;
  box-shadow: inset 0 0 0 4px #A8713A, inset 0 0 0 6px #F0C887, 0 30px 60px -30px rgba(60,30,5,.55);
}
.letter-leaf { position: absolute; width: 140px; left: -50px; top: -60px; transform: rotate(-20deg); z-index: 2; }
.letter-peony { position: absolute; width: 130px; right: -26px; bottom: -40px; z-index: 2; transform: rotate(12deg); }
.letter-paper { position: relative; padding: 44px 30px 40px; border-radius: 6px; background: var(--grain), #FFFCF4; }
.letter-paper h2 { margin-bottom: 1.4rem; }
.letter { font-family: var(--serif); font-size: 1.15rem; line-height: 34px; color: #3B2A20; background: repeating-linear-gradient(to bottom, transparent 0 33px, rgba(14,143,134,.16) 33px 34px); }
.letter p { margin: 0 0 34px; }
.letter p:last-child { margin-bottom: 0; }
.letter .sign { font-family: var(--hand); font-size: 1.7rem; color: var(--crimson); }
.us-circle { margin: 26px auto 0; width: 180px; height: 180px; border-radius: 50%; padding: 6px; position: relative; z-index: 3;
  background: var(--cane) center / 14px 14px, #E9C48A; box-shadow: 0 0 0 3px #FFF6E4, 0 0 0 5px #C99556, 0 14px 28px -14px rgba(60,30,5,.55); }
.us-circle img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 3px solid #FFF6E4; }

/* ---------- CLOSING ---------- */
.closing {
  position: relative; text-align: center; padding: 120px 24px 190px; overflow: hidden; color: #fff;
  background: linear-gradient(to bottom, rgba(40,25,90,.28), rgba(40,25,90,.05) 55%, rgba(0,0,0,0)), url("media/watercolor/sunset.jpg") center 42% / cover no-repeat, #8A7BC4;
}
.closing-inner { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; }
.closing-inner::before { content: ""; position: absolute; inset: -14% -10%; z-index: -1; background: radial-gradient(closest-side, rgba(52,28,92,.42), rgba(52,28,92,.18) 60%, rgba(52,28,92,0)); }
.closing .eyebrow { color: #FFE9A8; }
.closing h2 { font-size: clamp(3rem, 11vw, 5.8rem); font-weight: 600; margin-bottom: 1.1rem; text-shadow: 0 3px 24px rgba(40,20,70,.45); }
.closing h2 em { color: #FFD24A; }
.closing p:not(.eyebrow) { font-size: 1.2rem; text-shadow: 0 2px 12px rgba(40,20,70,.55); }
.again { margin-top: .6rem; font: 700 1rem var(--sans); color: #fff; background: var(--crimson); border: 0; border-radius: 999px; padding: .85rem 1.5rem; cursor: pointer; box-shadow: 0 10px 24px -10px rgba(120,0,20,.7); }
.again:active { transform: scale(.97); }

/* Oink in the hero: peeking out of a little rattan nook */
.oink-hero {
  position: absolute; z-index: 3; right: max(12px, 6vw); bottom: 0; width: clamp(122px, 15vw, 190px); aspect-ratio: 1 / 1.08;
  padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.oink-hole {
  position: absolute; inset: 0; overflow: hidden; border-radius: 999px 999px 10px 10px;
  background: var(--wrap), var(--cane) center / 16px 16px; padding: 7px 7px 0;
  box-shadow: inset 0 0 0 3px #A8713A, inset 0 0 0 5px #F0C887, 0 14px 30px -14px rgba(60,30,5,.6);
}
.oink-hole img {
  display: block; width: 100%; height: calc(100% + 30px); object-fit: cover; object-position: 30% 22%;
  border-radius: 999px 999px 4px 4px; transform: translateY(26px); transition: transform .35s cubic-bezier(.3,1.6,.5,1);
  animation: oinkpeek 7s ease-in-out 2.2s infinite;
}
.oink-hero:hover .oink-hole img, .oink-hero:focus-visible .oink-hole img { animation: none; transform: translateY(0) rotate(-3deg); }
@keyframes oinkpeek { 0%, 100% { transform: translateY(26px); } 40%, 70% { transform: translateY(2px) rotate(-3deg); } }
.oink-hero .psst { top: -14px; left: -30px; }

/* Oink peeking (Easter egg) */
.oink-peek {
  position: absolute; right: max(14px, 7%); bottom: -56px; width: clamp(140px, 16vw, 180px); height: clamp(175px, 20vw, 225px); padding: 0; border: 0; background: none;
  cursor: pointer; z-index: 2; transform-origin: 50% 100%; animation: peek 6s ease-in-out infinite;
  -webkit-tap-highlight-color: transparent;
}
.oink-peek .oink-hole img { height: 100%; object-position: 50% 0; animation: none; transform: translateY(0); }
.oink-peek .oink-hole { border-radius: 999px 999px 0 0; }
.oink-peek:hover, .oink-peek:focus-visible { animation: none; transform: translateY(-26px) rotate(-4deg); transition: transform .3s; }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes peek { 0%, 100% { transform: translateY(0) rotate(0); } 45% { transform: translateY(-12px) rotate(-5deg); } 60% { transform: translateY(-12px) rotate(4deg); } }
.psst {
  position: absolute; top: -22px; left: -46px; font-family: var(--hand); font-weight: 700; font-size: 1.35rem; color: var(--ink);
  background: #fff; padding: 2px 12px 4px; border-radius: 16px 16px 4px 16px; box-shadow: 0 6px 14px -6px rgba(0,0,0,.4);
  animation: psst 6s ease-in-out infinite;
}
@keyframes psst { 0%, 30%, 100% { opacity: 0; transform: translateY(6px) scale(.9); } 40%, 75% { opacity: 1; transform: none; } }

.footer { text-align: center; padding: 30px 20px calc(30px + env(safe-area-inset-bottom)); font-size: .88rem; color: var(--ink-soft); }
.footer p { margin-bottom: .4rem; }

/* ---------- CRITTERS NOOK ---------- */
.nook { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; background: rgba(40, 20, 8, .62); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); overflow-y: auto; }
.nook[hidden] { display: none; }
.nook-panel {
  position: relative; width: min(900px, 100%); max-height: calc(100svh - 32px); overflow-y: auto; overflow-x: hidden;
  border-radius: 24px; background: var(--grain), #FFF4E4; box-shadow: 0 30px 80px -20px rgba(0,0,0,.6);
  animation: nookin .45s cubic-bezier(.2,.9,.25,1.1);
}
@keyframes nookin { from { opacity: 0; transform: translateY(30px) scale(.96); } }
.nook-close { position: absolute; top: 10px; right: 10px; z-index: 6; width: 42px; height: 42px; border-radius: 50%; border: 0; background: #fff; color: var(--ink); font-size: 28px; line-height: 1; cursor: pointer; box-shadow: var(--shadow); }
.nook-wall {
  position: relative; text-align: center; padding: 46px 22px 30px;
  background: linear-gradient(rgba(255,244,228,.88), rgba(255,244,228,.94)), var(--cane) center / 22px 22px;
  border-bottom: 10px solid transparent; border-image: var(--rod) 1;
}
.nook-wall .vine-row { top: 0; }
.nook-kicker { font-family: var(--hand); font-size: 1.6rem; font-weight: 700; color: var(--crimson); margin: 0 0 .2rem; }
.nook-wall h2 { font-weight: 600; font-size: clamp(2rem, 7vw, 3rem); }
.nook-sub { color: var(--ink-soft); margin: .6rem 0 1.4rem; }
.nook-photos { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; }
.polaroid { background: #fff; padding: 8px 8px 30px; box-shadow: 0 12px 24px -12px rgba(60,30,5,.55); border: 0; cursor: zoom-in; transform: rotate(var(--r, -3deg)); transition: transform .3s; }
.polaroid:hover { transform: rotate(0) scale(1.03); }
.polaroid img { width: clamp(130px, 34vw, 230px); aspect-ratio: 4 / 5; object-fit: cover; }
.nook-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 30px 18px; padding: 30px 22px 40px; }
.critter { position: relative; text-align: center; padding-bottom: 22px; }
.critter::after { /* rattan shelf under each critter */
  content: ""; position: absolute; left: -9px; right: -9px; bottom: 0; height: 12px; border-radius: 6px;
  background: var(--wrap), var(--rod); box-shadow: 0 6px 10px -6px rgba(60,30,5,.7);
}
.critter button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.critter img {
  width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50% 46% 52% 48% / 48% 52% 46% 54%;
  border: 5px solid #fff; box-shadow: 0 10px 22px -12px rgba(60,30,5,.6); background: var(--paper-2);
}
.critter h3 { font-family: var(--hand); font-weight: 700; font-size: 1.75rem; margin: .5rem 0 0; color: var(--ink); }
.critter .kind { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--teal); font-weight: 700; margin: .1rem 0 .35rem; }
.critter p { font-size: .95rem; color: var(--ink-soft); margin: 0 0 12px; }
.nook-leaf1 { position: absolute; z-index: 5; width: 130px; left: -46px; top: -40px; transform: rotate(130deg); }
.nook-leaf2 { position: absolute; z-index: 5; width: 110px; right: -46px; top: 150px; transform: rotate(-115deg); }

/* ---------- LIGHTBOX ---------- */
.lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(28,14,8,.96); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 56px 12px 70px; touch-action: pan-y; }
.lightbox[hidden] { display: none; }
.lb-stage { max-width: min(1100px, 100%); max-height: 100%; display: grid; place-items: center; }
.lb-stage img, .lb-stage video { max-width: 100%; max-height: calc(100vh - 140px); max-height: calc(100svh - 140px); border-radius: 8px; object-fit: contain; }
.lb-close, .lb-nav { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0; cursor: pointer; border-radius: 50%; display: grid; place-items: center; }
.lb-close { top: max(12px, env(safe-area-inset-top)); right: 12px; width: 44px; height: 44px; font-size: 28px; line-height: 1; }
.lb-nav { top: 50%; transform: translateY(-50%); width: 48px; height: 48px; font-size: 32px; line-height: 1; }
.lb-prev { left: 12px; } .lb-next { right: 12px; }
.lb-caption { position: absolute; bottom: max(16px, env(safe-area-inset-bottom)); left: 0; right: 0; text-align: center; color: rgba(255,255,255,.85); padding: 0 20px; margin: 0; font-size: .95rem; }

#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 90; }

/* ---------- MOBILE ---------- */
@media (max-width: 760px) {
  .timeline { padding: 10px 14px 50px; }
  .tl-vine { left: 26px; width: 50px; }
  .month { text-align: left; margin: 44px 0 24px; padding-left: 4px; }
  .month b { font-size: 1.05rem; padding: .38rem 1.05rem; }
  .entry, .entry.right { width: 100%; margin-left: 0; padding: 0 0 0 34px; margin-bottom: 26px; }
  .entry.has-aff { margin-bottom: 104px; }
  .entry .node, .entry.right .node { left: 1px; right: auto; top: 24px; width: 20px; height: 20px; }
  .entry.reveal.left, .entry.reveal.right { transform: translateY(24px); }
  .splash, .entry.right .splash { width: 86px; right: -18px; top: -20px; }
  .entry .aff, .entry.left .aff, .entry.right .aff { left: 30px; right: 0; top: calc(100% + 18px); width: auto; margin: 0; font-size: 1.85rem; }
  .card h3 { font-size: 1.32rem; }
  .card-body { padding: 15px 18px 18px; }
  .placeholder .medal { width: 80px; height: 80px; font-size: 38px; }
  .lb-nav { display: none; }
  .letter-paper { padding: 36px 20px 34px; }
  .letter-frame { padding: 10px; }
  .letter-leaf { width: 104px; left: -30px; top: -46px; }
  .letter-peony { width: 96px; right: -12px; bottom: -34px; }
  .dabao-card { padding: 52px 20px 32px; }
  .dabao-leaf { width: 110px; left: -30px; top: -50px; }
  .tree { opacity: .35; bottom: auto; top: 10px; }
  .closing { padding: 100px 22px 180px; background-position: center 48%; }
  .nook-shelf { grid-template-columns: repeat(2, 1fr); padding: 26px 18px 34px; gap: 26px 16px; }
  .critter h3 { font-size: 1.5rem; }
  .critter p { font-size: .88rem; }
  #h-dots { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .intro, .pop { animation: none; opacity: 1; transform: rotate(var(--r, 0deg)); }
  .intro { transform: none; }
  .reveal { opacity: 1; transform: none !important; transition: none; }
  .num .sun, .scroll-cue svg, .aff i, .sway, .oink-peek, .psst, .oink-peek .eyes, .oink-hole img { animation: none; }
  .psst { opacity: 1; }
}

/* Chinese name in shimmering gold */
.cn-name {
  font-family: "Noto Serif SC", "Songti SC", "STSong", "SimSun", "Noto Serif CJK SC", serif; font-weight: 700; font-style: normal;
  letter-spacing: .12em; line-height: 1.1; white-space: nowrap;
  background: linear-gradient(110deg, #7A4B0C 0%, #B98220 16%, #FFE9A8 28%, #D9A032 40%, #8C5C10 54%, #C99028 68%, #FFF1BE 80%, #A26E18 100%);
  background-size: 250% 100%; background-position: 100% 0;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: #C8922B;
  filter: drop-shadow(0 0 3px rgba(255, 190, 60, .45)) drop-shadow(0 1px 0 rgba(80, 45, 5, .5));
  animation: cnshimmer 6s ease-in-out infinite;
}
.hero-title > .cn-hero { animation: rise .9s cubic-bezier(.2,.7,.2,1) .5s forwards, cnshimmer 6s ease-in-out 1.6s infinite; display: block; font-size: clamp(2.4rem, 11vw, 4.6rem); margin: .35rem 0 .3rem; padding-left: .12em; }
.closing p.cn-closing { text-shadow: none; background-image: linear-gradient(110deg, #C98A1E 0%, #F2C24E 16%, #FFF6D2 28%, #FFD45E 40%, #D99A26 54%, #FFE08A 68%, #FFFBE6 80%, #E2A834 100%); display: block; font-size: clamp(2.6rem, 12vw, 4.4rem); margin: -.3rem 0 1.1rem; padding-left: .12em;
  filter: drop-shadow(0 0 6px rgba(255, 214, 100, .55)) drop-shadow(0 2px 3px rgba(40, 20, 70, .95)) drop-shadow(0 0 1px rgba(60, 30, 5, .8)); }
@keyframes cnshimmer { 0% { background-position: 100% 0; } 55%, 100% { background-position: 0% 0; } }
@media (prefers-reduced-motion: reduce) {
  .cn-name { animation: none; background-position: 40% 0; }
  .hero-title > .cn-hero { animation: rise .01s forwards; }
}

/* Oink's hero nook fades into the page instead of sitting on a hard edge */
.oink-hero .oink-hole {
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 62%, rgba(0,0,0,.4) 84%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 0, #000 62%, rgba(0,0,0,.4) 84%, transparent 100%);
}
