/* 全域樣式：版面、留白背景、轉向提示。#ui 內部樣式在 src/ui/ui.css */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  font-family: "Nunito", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
}

body {
  /* 遊玩區外的留白：跟遊戲天空同色系，加幾朵淡淡的雲，不搶畫面 */
  /* --page 由 main.js 依關卡 theme.page 設定 */
  --page: #a9dcff;
  background-color: var(--page);
  background-image:
    radial-gradient(ellipse 120px 46px at 12% 22%, rgba(255,255,255,.55) 60%, transparent 62%),
    radial-gradient(ellipse 90px 36px at 88% 38%, rgba(255,255,255,.5) 60%, transparent 62%),
    radial-gradient(ellipse 140px 50px at 18% 74%, rgba(255,255,255,.45) 60%, transparent 62%),
    radial-gradient(ellipse 110px 40px at 84% 86%, rgba(255,255,255,.5) 60%, transparent 62%),
    linear-gradient(var(--page), color-mix(in srgb, var(--page) 40%, white));
  background-attachment: fixed;
}

#app {
  position: fixed;
  inset: 0;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

/* 用來量 safe-area inset，viewport.js 讀它的 padding */
#safe-probe {
  position: fixed;
  inset: 0;
  visibility: hidden;
  pointer-events: none;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

#stage {
  position: absolute;
  overflow: hidden;
  container-type: size;
  background: #8fd3ff;
  box-shadow: 0 0 0 1px rgba(40, 90, 140, .12), 0 8px 30px rgba(40, 90, 140, .18);
}

#game {
  display: block;
  width: 100%;
  height: 100%;
}

#ui {
  position: absolute;
  inset: 0;
}

#rotate {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  background: #8fd3ff;
  color: #1d3b5c;
  font-size: 20px;
  font-weight: 700;
}
#rotate[hidden] { display: none; }
.rotate-box { text-align: center; }
.rotate-phone {
  width: 44px; height: 76px; margin: 0 auto 14px;
  border: 5px solid #1d3b5c; border-radius: 10px;
  animation: rotate-hint 1.6s ease-in-out infinite;
}
@keyframes rotate-hint {
  0%, 30% { transform: rotate(-90deg); }
  60%, 100% { transform: rotate(0deg); }
}
