/* ufotableWEBSHOP POP-UP展 2026 —— 商售區預約 Banner（和紙門） */
@font-face { font-family: 'Satoshi'; src: url(../fonts/satoshi/Satoshi-Black.woff2) format('woff2'); font-weight: 900; font-display: swap; }

/* 外框：桌機 1920:800；手機 4:5（預約頁）或 358:520（首頁輪播，左右各裁約 7%） */
.ufo-bn { position: relative; aspect-ratio: 1920 / 800; overflow: hidden; border-radius: var(--radius-lg, 20px); background: #162032; isolation: isolate; }
.ufo-bn--reservation { border-radius: 20px; margin-bottom: 48px; }
@media (max-width: 1023px) {
  .ufo-bn { aspect-ratio: 1080 / 1350; }
  .ufo-bn--home { aspect-ratio: 358 / 520; }
  .ufo-bn--reservation { margin-bottom: 32px; }
}

/* 圖層：與原圖同比例、高度撐滿、水平置中（首頁手機版超出的左右被裁掉）；座標以原圖 px 換算 */
.ufo-bn__art { --w: 1920; --h: 800; position: absolute; top: 0; bottom: 0; left: 50%; aspect-ratio: 1920 / 800; transform: translateX(-50%); container-type: inline-size; }
@media (max-width: 1023px) { .ufo-bn__art { --w: 1080; --h: 1350; aspect-ratio: 1080 / 1350; } }
.ufo-bn__stage, .ufo-bn__stage picture, .ufo-bn__stage img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ufo-bn__stage[hidden] { display: none; }
.ufo-bn__stage img { object-fit: cover; }
@media (prefers-reduced-motion: no-preference) { .ufo-bn__stage { animation: ufo-fade .5s var(--ease-out, ease-out); } }
@keyframes ufo-fade { from { opacity: 0; } }

/* 疊字共用：--x/--y 為原圖 px 中心點，--fs 為字級（原圖 px） */
.ufo-bn__num, .ufo-bn__date { position: absolute; left: calc(var(--x) / var(--w) * 100%); top: calc(var(--y) / var(--h) * 100%); transform: translate(-50%, -50%); font-size: calc(var(--fs) / var(--w) * 100cqw); line-height: 1; white-space: nowrap; font-family: 'Satoshi', var(--font-tc, sans-serif); font-variant-numeric: tabular-nums; pointer-events: none; }

/* 倒數四格 */
.ufo-bn__count { --c1: 1294; --c2: 1431; --c3: 1568; --c4: 1706; --cy: 639.5; display: contents; }
.ufo-bn__num { --y: var(--cy); --fs: 58; font-weight: 900; letter-spacing: -.01em; color: #162032; }
.ufo-bn__num[data-u="d"] { --x: var(--c1); } .ufo-bn__num[data-u="h"] { --x: var(--c2); } .ufo-bn__num[data-u="m"] { --x: var(--c3); } .ufo-bn__num[data-u="s"] { --x: var(--c4); }
.ufo-bn__bar { --bx: 1232; --by: 698; --bw: 536; --bh: 5; position: absolute; left: calc(var(--bx) / var(--w) * 100%); top: calc(var(--by) / var(--h) * 100%); width: calc(var(--bw) / var(--w) * 100%); height: calc(var(--bh) / var(--h) * 100%); pointer-events: none; }
.ufo-bn__bar > span { display: block; height: 100%; width: calc(var(--p, 0) * 100%); border-radius: 99px; background: #0070BA; transition: width 1s linear; }
@media (max-width: 1023px) {
  .ufo-bn__count { --c1: 257; --c2: 445; --c3: 634; --c4: 822; --cy: 604; }
  .ufo-bn__num { --fs: 51; }
  .ufo-bn__bar { --bx: 169; --by: 652; --bw: 740; --bh: 5; }
}
.ufo-bn[data-stage="2"] .ufo-bn__num { color: #C0282C; }
.ufo-bn[data-stage="2"] .ufo-bn__num[data-u="d"] { color: rgba(22, 32, 50, .32); }
.ufo-bn[data-stage="2"] .ufo-bn__bar > span { background: #C0282C; }
.ufo-bn:not([data-stage="1"]):not([data-stage="2"]) .ufo-bn__count { display: none; }

/* 階段 ③ 時間軸日期（置中於節點下）、階段 ④ 候補開放時間（靠左大字） */
.ufo-bn__date { display: none; font-weight: 500; }
.ufo-bn__date--deadline { --x: 1246; --y: 694.5; --fs: 12.8; }
.ufo-bn__date--result { --x: 1500; --y: 694.5; --fs: 12.8; }
.ufo-bn__date--open { --x: 1234; --y: 640; --fs: 38.5; transform: translate(0, -50%); font-weight: 700; color: #0F1A2B; letter-spacing: -.005em; }
@media (max-width: 1023px) {
  .ufo-bn__date--deadline { --x: 225; --y: 658.5; --fs: 11; }
  .ufo-bn__date--result { --x: 539.5; --y: 658; --fs: 11; }
  .ufo-bn__date--open { --x: 172; --y: 604.5; --fs: 44; }
}
.ufo-bn__date--left { --y: 615; --fs: 13.9; transform: translate(0, -50%); color: #566066; letter-spacing: .01em; }
.ufo-bn__date--left[data-col="zh"] { --x: 97; } .ufo-bn__date--left[data-col="ja"] { --x: 427; } .ufo-bn__date--left[data-col="en"] { --x: 795; }
@media (prefers-color-scheme: dark) { .ufo-bn__date--left { color: #A9B7C8; } }
@media (max-width: 1023px) {
  .ufo-bn__date--left { --y: 1109.5; --fs: 14.6; color: #3B474F; }
  .ufo-bn__date--left[data-col="zh"] { --x: 120; } .ufo-bn__date--left[data-col="ja"] { --x: 544; } .ufo-bn__date--left[data-col="en"] { display: none !important; }
}
@media (max-width: 1023px) and (prefers-color-scheme: dark) { .ufo-bn__date--left { color: #C1D0E1; } }
.ufo-bn[data-stage="4"] .ufo-bn__date--left, .ufo-bn[data-stage="3"] .ufo-bn__date--deadline, .ufo-bn[data-stage="3"] .ufo-bn__date--result, .ufo-bn[data-stage="4"] .ufo-bn__date--open { display: block; }
.ufo-bn__date--deadline, .ufo-bn__date--result { color: #2B3A4E; }
@media (prefers-color-scheme: dark) { .ufo-bn__date--deadline, .ufo-bn__date--result { color: #C9D7E5; } }

/* 點擊：整張→預約方式頁；圖上按鈕位置疊透明熱區 */
.ufo-bn__main { position: absolute; inset: 0; z-index: 1; }
.ufo-bn__hot { --hx: 96; --hy: 672; --hw: 330; --hh: 84; position: absolute; z-index: 2; left: calc(var(--hx) / 1920 * 100%); top: calc(var(--hy) / 800 * 100%); width: calc(var(--hw) / 1920 * 100%); height: calc(var(--hh) / 800 * 100%); border-radius: 999px; transition: background-color .2s, box-shadow .2s; }
.ufo-bn__hot--guide { --hx: 450; --hw: 270; }
.ufo-bn__hot[hidden] { display: none; }
.ufo-bn__hot:hover { background: rgba(255, 255, 255, .1); box-shadow: 0 6px 24px rgba(0, 0, 0, .18); }
.ufo-bn__hot:focus-visible, .ufo-bn__main:focus-visible { outline: 3px solid var(--focus-ring, #5AA9E0); outline-offset: 3px; }
.ufo-bn__main:focus-visible { outline-offset: -4px; border-radius: inherit; }
/* 熱區要跟著圖層一起裁切，所以手機版改用圖層座標換算 */
@media (max-width: 1023px) {
  .ufo-bn__hot { --hx: 119; --hy: 1160; --hw: 413; --hh: 87; left: calc(50% + (var(--hx) / 1080 - .5) * var(--artw)); top: calc(var(--hy) / 1350 * 100%); width: calc(var(--hw) / 1080 * var(--artw)); height: calc(var(--hh) / 1350 * 100%); }
  .ufo-bn__hot--guide { --hx: 555; --hw: 406; }
  .ufo-bn { --artw: 100%; }
  .ufo-bn--home { --artw: calc(100% * (1080 / 1350) / (358 / 520)); }
}
