/* 來賓首頁（LINE 內開啟的頁面，390×844）。牌桌、卡框、卡背為本案生成元件；版面與動態為 CSS。 */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: #000; }
body { color: #f5ead0; font-family: "Songti TC", "Noto Serif TC", serif; -webkit-font-smoothing: antialiased; }
button, a { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; text-decoration: none; }
.num { font-family: "Didot", "Bodoni 72", serif; font-weight: 700; }
.stage { position: relative; width: 390px; height: 844px; margin: 0 auto; overflow: hidden; overflow: clip; background: #020604; isolation: isolate; }
.bg { position: absolute; inset: 0; z-index: -2; background: linear-gradient(180deg, rgba(2,6,4,.2), rgba(2,6,4,.7) 70%), url(assets/gen/c-table.jpg) center 38% / cover; }
.fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 40; }
.hud { position: absolute; left: 16px; right: 16px; top: 14px; display: flex; justify-content: space-between; align-items: center; z-index: 5; }
.hud .wm { width: 128px; filter: drop-shadow(0 2px 6px #000); } .hud .tag { font-size: 11px; color: rgba(245,234,208,.6); }
.sword { position: absolute; left: 7px; top: 70px; bottom: 30px; width: 3px; z-index: 4; background: rgba(217,177,92,.18); }
.sword i { position: absolute; left: 0; right: 0; top: 0; height: calc(var(--p, 0) * 1%); background: linear-gradient(180deg, #fff6da, #d9b15c); box-shadow: 0 0 10px rgba(255,214,130,.9); transition: height 1.4s .6s cubic-bezier(.2,1,.3,1); }
.sword i::after { content: ""; position: absolute; left: -4px; bottom: -6px; width: 11px; height: 11px; transform: rotate(45deg); background: #fff3d0; box-shadow: 0 0 14px #ffd98a; }

/* splash */
.splash { position: absolute; inset: 0; z-index: 60; display: grid; place-content: center; justify-items: center; background: #010302; pointer-events: none; }
.splash .beam { position: absolute; left: 50%; top: 0; width: 4px; height: 0; margin-left: -2px; background: linear-gradient(180deg, transparent, #fff3d0 40%, #d9b15c); box-shadow: 0 0 24px 6px rgba(255,214,130,.6); }
.splash img { width: 250px; opacity: 0; filter: drop-shadow(0 4px 14px rgba(0,0,0,.9)); }
.splash p { margin-top: 14px; font-size: 13px; letter-spacing: .3em; color: #d9b15c; opacity: 0; }
.splash.go .beam { animation: beam .7s cubic-bezier(.6,0,.3,1) forwards; }
.splash.go img { animation: wmin .8s .45s cubic-bezier(.2,.9,.3,1) forwards; }
.splash.go p { animation: wmin .6s .8s ease-out forwards; }
.splash.go { animation: splashout .6s 1.7s ease-in forwards; }
.splash.skip { display: none; }
@keyframes beam { 0% { height: 0; opacity: 1; } 70% { height: 100%; opacity: 1; } 100% { height: 100%; opacity: 0; } }
@keyframes wmin { from { opacity: 0; transform: translateY(12px); filter: blur(5px); } to { opacity: 1; transform: none; filter: drop-shadow(0 4px 14px rgba(0,0,0,.9)); } }
@keyframes splashout { to { opacity: 0; visibility: hidden; } }

/* home */
.home { position: absolute; inset: 64px 0 0 0; padding: 0 20px 0 24px; }
.hello small { font-size: 12px; letter-spacing: .3em; color: #d9b15c; }
.hello h1 { margin-top: 4px; font-size: 28px; letter-spacing: .1em; color: #ffe7b0; text-shadow: 0 2px 10px rgba(0,0,0,.9); }
.hello p { margin-top: 2px; font-size: 14px; color: rgba(245,234,208,.85); }
.tile { position: relative; display: grid; align-content: center; gap: 2px; padding: 10px 12px; border: 12px solid transparent; border-image: url(assets/gen/c-card-front.png) 84 fill / 12px stretch;
  filter: drop-shadow(0 8px 12px rgba(0,0,0,.7)); transition: transform .15s; animation: tin .55s cubic-bezier(.2,1.2,.4,1) both; }
.tile:active { transform: translateY(2px) scale(.98); }
.tile b { font-size: 18px; letter-spacing: .08em; color: #ffe7b0; }
.tile em { font-style: normal; font-size: 13px; line-height: 1.45; color: rgba(245,234,208,.85); }
.tile em.hot { color: #bfe8a8; }
.tile.wide { margin-top: 14px; grid-template-columns: 92px 1fr; align-items: center; gap: 14px; padding: 8px 12px 8px 8px; }
.tile.wide .pic { width: 92px; height: 138px; overflow: hidden; border-radius: 3px; box-shadow: 0 0 0 1px rgba(217,177,92,.6); }
.tile.wide .pic img { width: 100%; height: 100%; object-fit: cover; }
.tile.wide b { font-size: 22px; }
.tile .tx { display: grid; gap: 4px; }
.tiles { margin-top: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tiles .tile { min-height: 92px; }
.tiles .tile:nth-child(1) { animation-delay: .08s; } .tiles .tile:nth-child(2) { animation-delay: .14s; } .tiles .tile:nth-child(3) { animation-delay: .2s; } .tiles .tile:nth-child(4) { animation-delay: .26s; } .tiles .tile:nth-child(5) { animation-delay: .32s; }
.tile.wide2 { grid-column: 1 / -1; min-height: 70px; }
.tile.ping::after { content: ""; position: absolute; right: -4px; top: -4px; width: 10px; height: 10px; transform: rotate(45deg); background: #ffe2a0; box-shadow: 0 0 10px #ffd98a; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .3; } }
@keyframes tin { from { opacity: 0; transform: translateY(26px); } }
.splash.go ~ .home .tile { animation-delay: 1.9s; }
.foot { margin-top: 12px; font-size: 11.5px; line-height: 1.5; color: rgba(245,234,208,.55); }

/* sheets */
.sheet { position: absolute; inset: 0; z-index: 20; padding: 64px 24px 20px; background: linear-gradient(180deg, rgba(2,6,4,.55), #020604 40%), url(assets/gen/c-table.jpg) center 20% / cover #020604; visibility: hidden; transform: translateY(100%); transition: transform .45s cubic-bezier(.2,1,.3,1), visibility 0s .45s; overflow-y: auto; }
.sheet.on { visibility: visible; transform: none; transition: transform .45s cubic-bezier(.2,1,.3,1); }
.sheet .close { font-size: 15px; color: #ffe2a0; }
.sheet h2 { margin-top: 12px; font-size: 26px; letter-spacing: .14em; color: #ffe7b0; }
.fine { margin-top: 14px; font-size: 12.5px; line-height: 1.6; color: rgba(245,234,208,.65); }
.seatcard { margin: 26px auto 0; width: 230px; height: 330px; display: grid; place-content: center; justify-items: center; gap: 10px; border: 18px solid transparent; border-image: url(assets/gen/c-card-front.png) 84 fill / 18px stretch; }
.sheet.on .seatcard { animation: flipin .7s .15s cubic-bezier(.2,1.2,.4,1) both; }
@keyframes flipin { from { opacity: 0; transform: perspective(900px) rotateY(90deg); } }
.seatcard small { font: 700 13px "Didot", serif; letter-spacing: .5em; color: #d9b15c; }
.seatcard .num { font-size: 92px; line-height: 1; color: #ffe7b0; text-shadow: 0 0 22px rgba(255,200,90,.6); }
.seatcard span { font-size: 18px; letter-spacing: .1em; }

.fb { display: grid; gap: 14px; margin-top: 16px; }
.fb fieldset { border: 0; } .fb legend { font-size: 16px; color: #ffe7b0; margin-bottom: 8px; }
.fb .opts { display: flex; flex-wrap: wrap; gap: 8px; }
.fb .opts label { padding: 8px 12px; font-size: 14px; border: 1px solid rgba(217,177,92,.45); border-radius: 3px; cursor: pointer; }
.fb .opts input { display: none; } .fb .opts input:checked + span { color: #1a1206; } .fb .opts label:has(input:checked) { background: linear-gradient(180deg, #f3d58c, #b88a3a); border-color: #f3d58c; }
.fb textarea { width: 100%; height: 110px; padding: 10px; font: 15px/1.5 "PingFang TC", sans-serif; color: #f5ead0; background: rgba(0,0,0,.5); border: 1px solid rgba(217,177,92,.45); border-radius: 3px; resize: none; }
.fb .count { font-size: 11px; text-align: right; color: rgba(245,234,208,.5); }
.btn { display: grid; place-items: center; width: 100%; height: 60px; margin-top: 4px; font-size: 19px; font-weight: 700; letter-spacing: .1em; color: #ffe7b0; border: 12px solid transparent; border-image: url(assets/gen/c-card-front.png) 84 fill / 12px stretch; }
.fb-done { display: none; margin-top: 20px; }
.fb-done.on { display: block; }
.fb-done .card { position: relative; width: 240px; height: 336px; margin: 0 auto; perspective: 1000px; }
.fb-done .card .in { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .8s cubic-bezier(.4,0,.2,1); }
.fb-done .f { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 8px; }
.fb-done .back { background: url(assets/gen/c-card-back.png) center / 100% 100%; }
.fb-done .front { transform: rotateY(180deg); display: grid; place-content: center; gap: 12px; padding: 0 16px; text-align: center; border: 16px solid transparent; border-image: url(assets/gen/c-card-front.png) 84 fill / 16px stretch; }
.fb-done .front b { font-size: 22px; color: #ffe7b0; } .fb-done .front span { font-size: 14px; line-height: 1.6; }
.fb-done.on .card .in { animation: turn .9s .3s cubic-bezier(.4,0,.2,1) forwards; }
@keyframes turn { to { transform: rotateY(180deg); } }
.fb-done .mine { margin-top: 16px; font-size: 13px; line-height: 1.6; color: rgba(245,234,208,.75); white-space: pre-wrap; }

.cps { display: grid; gap: 12px; margin-top: 16px; }
.cp { position: relative; display: grid; grid-template-columns: 70px 1fr; gap: 12px; align-items: center; padding: 12px; border: 12px solid transparent; border-image: url(assets/gen/c-card-front.png) 84 fill / 12px stretch; animation: tin .5s both; }
.cp i { width: 70px; height: 100px; border-radius: 4px; background: url(assets/gen/c-card-back.png) center / 100% 100%; }
.cp b { font-size: 17px; color: #ffe7b0; } .cp span { display: block; font-size: 13px; color: rgba(245,234,208,.8); }
.cp .void { position: absolute; right: 8px; top: 6px; padding: 2px 8px; font-size: 11px; color: #ffcf96; border: 1px solid #e2a35c; border-radius: 3px; transform: rotate(6deg); }
.empty { margin-top: 26px; text-align: center; font-size: 15px; line-height: 1.7; color: rgba(245,234,208,.8); }
.empty i { display: block; width: 90px; height: 135px; margin: 0 auto 16px; border-radius: 6px; background: url(assets/gen/c-card-back.png) center / 100% 100%; opacity: .55; animation: breathe 3.2s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .9; box-shadow: 0 0 24px rgba(255,205,110,.4); } }

.gal { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.gal button { display: grid; gap: 6px; text-align: left; animation: tin .5s both; }
.gal img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px; box-shadow: 0 0 0 1px rgba(217,177,92,.6), 0 10px 18px rgba(0,0,0,.6); }
.gal small { font-size: 12px; color: rgba(245,234,208,.75); }
.viewer { position: absolute; inset: 0; z-index: 45; display: none; place-content: center; justify-items: center; gap: 16px; background: rgba(0,0,0,.92); }
.viewer.on { display: grid; animation: fade .3s both; } @keyframes fade { from { opacity: 0; } }
.viewer img { width: 300px; border-radius: 4px; box-shadow: 0 0 0 1px rgba(217,177,92,.7), 0 0 40px rgba(255,214,120,.3); }
.vrow { display: flex; gap: 18px; font-size: 15px; } .vrow a, .vrow .dl { color: #ffe2a0; border-bottom: 1px solid rgba(255,226,160,.5); } .vrow button { color: rgba(245,234,208,.8); }

.toast { position: absolute; left: 20px; right: 20px; bottom: 40px; z-index: 50; text-align: center; pointer-events: none; }
.toast div { display: inline-block; padding: 9px 14px; font-size: 14px; background: rgba(10,22,16,.94); box-shadow: 0 0 0 1px rgba(217,177,92,.7); border-radius: 4px; animation: toast 2.6s ease forwards; }
@keyframes toast { 0% { opacity: 0; transform: translateY(8px); } 12%, 82% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.net { position: absolute; inset: 0; z-index: 55; display: none; place-content: center; text-align: center; background: rgba(0,0,0,.72); }
.net.show { display: grid; }
.net .spin { width: 60px; height: 90px; margin: 0 auto 18px; border-radius: 5px; background: url(assets/gen/c-card-back.png) center / 100% 100%; animation: spinY 1.1s linear infinite; }
@keyframes spinY { to { transform: rotateY(360deg); } }
.busy { opacity: .6; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
