body { padding: 0; margin: 0; width: 100%; height: 100%; background-image: url(background.png); background-repeat:repeat; 
touch-action: none;           /* UAジェスチャーを全域でブロック */
-ms-touch-action: none;
}
/*
#unity-container { position: absolute }
#unity-container.unity-desktop { left: 50%; top: 0%; transform: translate(-50%, 0%) }
#unity-container.unity-mobile { position: fixed; width: 100%; height: 100% }
*/
#unity-container { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) ;overflow: hidden;}
#unity-canvas { background: #231F20}
.unity-mobile #unity-canvas { background: #231F20;}
#unity-loading-bar { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: none }
#unity-logo { width: 720; height: 1280; background: url('Loading.png') no-repeat center;background-size: contain}
#unity-progress-bar-empty { width: 141px; height: 18px; margin-top: 10px; margin-left: 6.5px; background: url('progress-bar-empty-dark.png') no-repeat center }
#unity-progress-bar-full { width: 0%; height: 18px; margin-top: 10px; background: url('progress-bar-full-dark.png') no-repeat center }
#unity-footer { position: relative }
.unity-mobile #unity-footer { display: none }
#unity-logo-title-footer { float:left; width: 102px; height: 38px; background: url('unity-logo-title-footer.png') no-repeat center }
#unity-build-title { float: right; margin-right: 10px; line-height: 38px; font-family: arial; font-size: 18px }
#unity-fullscreen-button { cursor:pointer; float: right; width: 38px; height: 38px; background: url('fullscreen-button.png') no-repeat center }
#unity-warning { position: absolute; left: 50%; top: 5%; transform: translate(-50%); background: white; padding: 10px; display: none }
:root{
  /* 端からの余白は画面幅に比例（最小12pxは確保） */
  --attention-side: max(12px, calc(env(safe-area-inset-left, 0px) + 2vmin));
  --attention-side-r: max(12px, calc(env(safe-area-inset-right, 0px) + 2vmin));

  /* 下からの距離は動的ビューポート(svh)で相対化 */
  --attention-offset: calc(env(safe-area-inset-bottom, 0px) + 14svh);
}

#unity-attention {
  position: fixed;
  left:  var(--attention-side);
  right: var(--attention-side-r);
  bottom: var(--attention-offset);
  transform: none;
  z-index: 999999;
  /* 横幅の上限を撤廃（必要なら残してOK） */
  max-width: none;
  width: auto;
  padding-inline: clamp(10px, 2vmin, 24px);
  padding-block:  clamp(6px,  1.2vmin, 14px);
  border-radius:  clamp(8px,  1.2vmin, 14px);

  font-size: clamp(10px, 3.2vmin, 32px);
  line-height: 1.4;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto;
  color: #fff;
  text-align: center;
  pointer-events: none;          /* クリックを邪魔しない */
  white-space: pre-wrap;        /* ← 改行しない（\n も無視） */
  word-break: break-word;
}
/* 小さな端末では少し詰める */
@supports (height: 100svh) {
   #unity-attention { bottom: calc(env(safe-area-inset-bottom, 0px) + 12svh); }
 }

/* 縦だけ極端に狭い端末での底上げ（任意） */
@media (max-height: 540px) {
  #unity-attention { font-size: clamp(10px, 3.8vmin, 34px); }
}
