/* スマホのアプリ用の上書き。ゲームの絵 (#stage) は 1920×1080 を縮めて出すので、
   指でさわるもの (歯車・メニュー・お知らせ) は、縮めたあとでも押しやすく、読める大きさにする */
* {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

html, body {
  background: var(--bg);
  touch-action: manipulation;
  -webkit-user-select: none;
  -webkit-text-size-adjust: 100%;
}

input, textarea { -webkit-user-select: text; user-select: text; }

/* コメントの言いかたの案内は出さない (オートのバトルなので) */
#howto { display: none !important; }

/* 歯車: 縮めても指で押せる大きさに (画面では 40pt ほど) */
.gear {
  right: 26px;
  bottom: 26px;
  width: 112px;
  height: 112px;
  border-width: 4px;
  opacity: 0.6;
}
.gear svg { width: 64px; height: 64px; }
@media (hover: none) {
  .gear:hover { opacity: 0.6; transform: none; border-color: rgba(255, 255, 255, 0.25); color: rgba(255, 255, 255, 0.6); }
}

/* 音の札も、押しやすく */
.sound-hint { height: 84px; padding: 0 36px 0 28px; font-size: 30px; gap: 18px; }
.sound-hint .speaker { transform: skewX(14deg) scale(1.8); margin-right: 10px; }
body.lobby-on .sound-hint { top: 120px; }

/* メニューは、ゲームの絵の外 (画面いっぱい) に出し、スマホの画面に合わせて縮める (--menu-scale は main.js の fit が決める) */
.menu {
  position: fixed;
  inset: 0;
  z-index: 30;
}
/* 画面より広い 1180px の板を、まん中を基準に縮める */
.menu-panel {
  position: absolute;
  left: 50%;
  top: 50%;
  height: 560px;
  transform: translate(-50%, -50%) scale(var(--menu-scale, 1));
  animation: menu-in-app 0.22s cubic-bezier(0.2, 1.4, 0.4, 1);
}
@keyframes menu-in-app {
  from { transform: translate(-50%, -50%) scale(calc(var(--menu-scale, 1) * 0.94)); opacity: 0; }
}
.menu-head { padding: 16px 28px 14px 36px; }
.menu-title { font-size: 44px; }
.menu-body { -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }

.toasts {
  position: fixed;
  bottom: 28px;
  z-index: 40;
}
.toast { font-size: 14px; padding: 8px 20px; }
