/* 邀請頁：字型比照聖誕 Party 邀請函——中文 Noto Serif TC（300／400／500）、英文 Marcellus（/css/fonts.css，放在自己的網站上）。
   米白底、深綠字、沉一點的金；上方是匹克球場的俯視圖，一顆球來回越過球網。 */
*{box-sizing:border-box;margin:0;padding:0}
[hidden]{display:none!important}
:root{--bg:#F4F1EB;--card:#FCFBF8;--ink:#22382D;--gold:#9A7424;--court:#17382C;--ball:#DCEB3C;--zh:"Noto Serif TC","Songti TC","PMingLiU",serif;--en:"Marcellus",Georgia,serif}
html,body{background:var(--bg)}
body{color:var(--ink);font-family:var(--zh);font-weight:300;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent;-webkit-text-size-adjust:100%}
.wrap{max-width:460px;margin:0 auto;overflow:hidden}

/* 球場 */
.hero{position:relative;aspect-ratio:390/330;overflow:hidden;background:var(--court)}
.court{position:absolute;left:50%;top:54%;width:128%;transform:translate(-50%,-50%) rotate(-14deg);animation:court-in 1.6s cubic-bezier(.2,.7,.2,1) both}
@keyframes court-in{from{transform:translate(-50%,-46%) rotate(-9deg) scale(1.12);opacity:0}to{transform:translate(-50%,-50%) rotate(-14deg) scale(1);opacity:1}}
.hero:before,.hero:after{content:"";position:absolute;left:0;right:0;z-index:1;pointer-events:none}
.hero:before{top:0;height:42%;background:linear-gradient(180deg,rgba(10,28,21,.92),rgba(10,28,21,0))}
.hero:after{bottom:0;height:34%;background:linear-gradient(180deg,rgba(244,241,235,0),#F4F1EB)}
/* 球：左右來回（8 秒一趟），過網的時候跳最高；影子留在地上 */
.ball{animation:ball-x 8s ease-in-out infinite}
.ball-body{animation:ball-y 2s ease-in-out infinite}
.ball-shadow{animation:ball-s 2s ease-in-out infinite;transform-box:fill-box;transform-origin:center}
@keyframes ball-x{0%,100%{transform:translate(112px,118px)}50%{transform:translate(408px,186px)}}
@keyframes ball-y{0%,100%{transform:translateY(0)}50%{transform:translateY(-46px)}}
@keyframes ball-s{0%,100%{transform:scale(1);opacity:.45}50%{transform:scale(.55);opacity:.22}}

.welcome{position:absolute;left:0;right:0;top:calc(26px + env(safe-area-inset-top,0px));z-index:2;text-align:center;font-family:var(--en);color:#F5ECD7}
.welcome small{display:block;font-size:10.5px;letter-spacing:.38em;color:var(--ball);margin-bottom:7px;text-indent:.38em}
.welcome b{font-weight:400;font-size:15px;letter-spacing:.26em;text-indent:.26em;display:block}

.title{text-align:center;font-family:var(--en);margin-top:-10px;padding:0 18px;position:relative;z-index:2}
.title .y{font-size:13px;letter-spacing:.34em;text-indent:.34em;color:var(--gold);text-transform:uppercase}
.title h1{font-weight:400;font-size:clamp(34px,10.4vw,44px);line-height:1.16;letter-spacing:.01em;margin-top:8px}
.title h1 span:first-child{display:block;font-size:1.5em;line-height:1.02}
.title .nb{white-space:nowrap}
.title .tag{font-size:13.5px;letter-spacing:.2em;text-indent:.2em;margin-top:12px;opacity:.78}

.date{display:flex;align-items:center;justify-content:center;gap:20px;margin:22px 0 26px;font-family:var(--en)}
.date .d{font-size:clamp(52px,16vw,64px);line-height:1;color:var(--gold);letter-spacing:.02em}
.date i{width:1px;height:52px;background:var(--gold);opacity:.6}
/* 有數字的小字用中文的那套字（Marcellus 的 0 長得像英文字母 O，「14:00」會像「14:OO」） */
.date .t{font-family:var(--zh);font-weight:400;font-size:19px;letter-spacing:.06em;word-spacing:.2em;white-space:nowrap}
.date .s{font-family:var(--zh);font-size:13.5px;letter-spacing:.08em;opacity:.82;margin-top:6px}

.body{padding:0 24px calc(34px + env(safe-area-inset-bottom,0px));display:flex;flex-direction:column;gap:22px}
.intro{font-size:15.5px;line-height:1.95;text-align:center;letter-spacing:.03em;padding:0 4px}
.card{background:var(--card);border:1px solid rgba(60,84,68,.22);border-radius:20px;padding:24px 22px 22px;display:flex;flex-direction:column;gap:18px;box-shadow:0 6px 20px rgba(40,60,48,.08)}
.row{display:flex;gap:16px}
.row .l{flex:none;width:52px}
.row .l b{display:block;font-weight:500;font-size:14px;letter-spacing:.22em;color:var(--gold)}
.row .l small{display:block;font-family:var(--en);font-size:9.5px;letter-spacing:.2em;color:var(--gold);opacity:.7;margin-top:3px}
.row .c{flex:1;min-width:0}
.row .m{font-weight:400;font-size:17px;line-height:1.5}
.row .m2{font-weight:400;font-size:15.5px;line-height:1.6}
.row .m2+.m2{margin-top:5px}
.row .s{font-size:13.5px;line-height:1.55;opacity:.8;margin-top:3px}
.hr{height:1px;background:rgba(60,84,68,.18)}
.map{align-self:flex-start;margin-left:68px;display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 15px;white-space:nowrap;border:1px solid rgba(142,106,30,.6);border-radius:999px;color:var(--gold);text-decoration:none;font-size:13.5px;letter-spacing:.06em}
.map span{font-family:var(--en);font-size:12px;letter-spacing:.08em;opacity:.8}

/* 場地照片（public/img/venue 有照片才會出現）：橫向滑動 */
.gallery{display:flex;gap:10px;overflow-x:auto;scroll-snap-type:x mandatory;margin:0 -24px;padding:0 24px 4px;-webkit-overflow-scrolling:touch}
.gallery img{flex:none;width:78%;aspect-ratio:4/3;object-fit:cover;border-radius:16px;scroll-snap-align:center;background:#DDD8CC}
.gallery img:only-child{width:100%}

.article{display:block;text-decoration:none;color:var(--ink);background:var(--court);color:#F5ECD7;border-radius:20px;padding:20px 22px}
.article small{display:block;font-size:12px;letter-spacing:.14em;color:var(--ball)}
.article b{display:block;font-weight:400;font-size:16px;line-height:1.6;margin-top:8px}
.article span{display:inline-block;margin-top:12px;font-size:13.5px;letter-spacing:.06em;border-bottom:1px solid rgba(245,236,215,.5);padding-bottom:2px}

.rsvp{text-align:center;padding:6px 0 0}
.rsvp p{font-weight:400;font-size:16.5px;line-height:1.6;letter-spacing:.04em}
.rsvp em{font-style:normal;color:var(--gold);font-weight:500}
.rsvp>small{display:block;font-size:12.5px;letter-spacing:.08em;opacity:.7;margin-top:4px}
.btns{display:flex;gap:12px;margin-top:18px}
.btn{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-height:66px;border-radius:18px;text-decoration:none;transition:transform .15s ease,box-shadow .15s ease}
.btn b{font-weight:500;font-size:19px;letter-spacing:.24em;text-indent:.24em}
.btn small{font-family:var(--en);font-size:10.5px;letter-spacing:.3em;text-indent:.3em;opacity:.8}
.btn.g{background:var(--court);color:#F5ECD7;box-shadow:0 8px 20px rgba(23,56,44,.28)}
.btn.g small{color:var(--ball);opacity:1}
.btn.o{background:transparent;color:var(--ink);border:1px solid rgba(34,56,45,.5)}
.btn:hover{transform:translateY(-1px)}
.btn:focus-visible,.map:focus-visible,.article:focus-visible,.admin-entry:focus-visible{outline:2px solid var(--gold);outline-offset:3px}
.rsvp .rsvp-hint{font-weight:300;font-size:13px;opacity:.75;margin-top:14px;letter-spacing:.02em}
.phase-open .show-closed,.phase-closed .show-open{display:none}
.phase-closed .rsvp-hint{display:none}

.foot{display:flex;flex-direction:column;align-items:center;gap:14px;margin-top:6px;text-align:center}
.foot i{width:36px;height:1px;background:var(--gold);opacity:.6}
.foot p{font-size:13.5px;letter-spacing:.08em;opacity:.85}
.foot img{width:125px;height:auto;opacity:.92}
.admin-entry{font-size:12px;color:var(--ink);opacity:.55;letter-spacing:.08em;padding:10px}

@media (min-width:520px){.wrap{margin:28px auto;border-radius:28px;background:var(--bg);box-shadow:0 20px 60px rgba(30,50,40,.16)}html,body{background:#E6E1D6}}
@media (prefers-reduced-motion:reduce){.court,.ball,.ball-body,.ball-shadow{animation:none}.ball{transform:translate(320px,150px)}}
