/* ==========================================================
   開場資料填寫視窗（Google 表單）
   放在 #game-container 之外，用真實的視窗單位，
   不跟著遊戲畫面一起縮放，手機上也能維持好讀好點的大小
========================================================== */
html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

#form-gate {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  background: #1a2b3c;
  font-family: "微軟正黑體", "Microsoft JhengHei", "PingFang TC", sans-serif;
}
#form-gate.hidden {
  display: none;
}

#form-gate-modal {
  position: relative;
  width: min(1400px, 98vw);
  max-height: 97vh;
  max-height: 97dvh;
  padding: clamp(24px, 4vmin, 48px) clamp(14px, 3vmin, 44px)
    clamp(16px, 3vmin, 36px);
  background: #fffdf0;
  border: 5px solid #f0a63a;
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}

#form-gate-title {
  margin: 0 0 clamp(8px, 2vmin, 18px);
  font-size: clamp(26px, 6vmin, 56px);
  font-weight: 900;
  line-height: 1.4;
  color: #a5731f;
  text-align: center;
}
#form-gate-desc {
  margin: 0 0 clamp(12px, 3vmin, 28px);
  font-size: clamp(18px, 3.5vmin, 32px);
  font-weight: 700;
  line-height: 1.6;
  color: #5c3814;
  text-align: center;
}

#form-gate-form-wrap {
  position: relative;
  width: 100%;
  height: 90vh;
  height: 90dvh;
  min-height: min(650px, 75vh);
  min-height: min(650px, 75dvh);
  max-height: 1350px;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: inset 0 0 0 2px rgba(165, 115, 31, 0.25);
  flex-shrink: 0;
}
#form-gate-frame {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  transform-origin: top left;
}

/* 送出成功後蓋在表單上的提示 */
#form-gate-done {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  background: rgba(255, 253, 240, 0.96);
  font-size: clamp(26px, 6vmin, 56px);
  font-weight: 900;
  color: #3f9d67;
  text-align: center;
  line-height: 1.5;
}
#form-gate.done #form-gate-done {
  display: flex;
}
