:root {
  --vh: 1vh;
  --rose: #ef4d74;
  --pink-bg: #f6a5c0;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #f6a5c0;
  font-family: "PingFang TC", "Microsoft JhengHei", Arial, sans-serif;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

a {
  -webkit-tap-highlight-color: transparent;
}

.home-app {
  width: 100%;
  height: 100%;
}

.home-stage {
  position: fixed;
  left: 50%;
  top: 50%;
  width: min(100vw, calc(var(--vh) * 100 * 1500 / 2667));
  aspect-ratio: 1500 / 2667;
  height: auto;
  overflow: hidden;
  background: #f6a5c0;
  transform: translate(-50%, -50%);
  transform-origin: center;
  container-type: inline-size;
}

.home-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  z-index: 0;
}

/* 藏寶圖：頂部對齊、佔滿寬度 */
.map-wrap {
  position: absolute;
  left: 50%;
  top: 5.5%;
  transform: translateX(-50%);
  width: 106%;
  z-index: 2;
}

.map-img {
  display: block;
  width: 100%;
  height: auto;
}

/* 兩個進入遊戲的熱區（覆蓋旗子＋徽章＋門牌） */
.gate {
  position: absolute;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  border-radius: 6% / 4%;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

.gate:active {
  background: rgba(255, 255, 255, 0.15);
}

/* B2 連通道大門（旗2 · 疊蛋糕） */
.gate--cake {
  left: 38%;
  top: 30%;
  width: 40%;
  height: 22%;
}

/* 1F 南側大門（旗1 · 拼圖） */
.gate--puzzle {
  left: 20%;
  top: 54%;
  width: 42%;
  height: 22%;
}

/* 底部沙灘：左右滿版的沙色地面 */
.beach {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 16%;
  background: #f8eba3;
  z-index: 1;
}

/* 底部禮物 + 蒐集徽章GO 橫幅（沙色與 .beach 相同，無縫接合） */
.badge-go {
  position: absolute;
  left: 50%;
  bottom: -2.5%;
  transform: translateX(-50%);
  width: 115%;
  height: auto;
  z-index: 3;
  pointer-events: none;
}

/* 底部頁籤：活動詳情 | 抽獎辦法（坐落在沙灘上） */
.tabbar {
  position: absolute;
  left: 50%;
  bottom: 1.5%;
  transform: translateX(-50%);
  width: 92%;
  z-index: 4;
  line-height: 0;
}

.tabbar-img {
  display: block;
  width: 100%;
  height: auto;
}

.tabbar-btn {
  position: absolute;
  top: 0;
  height: 100%;
  width: 50%;
}

.tabbar-btn--left { left: 0; }
.tabbar-btn--right { right: 0; }

.tabbar-btn:active {
  background: rgba(255, 255, 255, 0.18);
}
