html, body { margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden; background: #000; overscroll-behavior: none; }

/* 게임 화면 — 어느 기기에서나 화면 가득(유니티가 이 크기에 맞춰 그린다) */
#unity-canvas {
  position: fixed; left: 0; top: 0; width: 100%; height: 100%; display: block;
  background: #000; outline: none;
  touch-action: none; -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
}

/* «눌러서 시작» 화면 — 게임을 내려받는 동안 진행 막대, 다 되면 «화면을 눌러 시작» */
#start {
  position: fixed; left: 0; top: 0; right: 0; bottom: 0; z-index: 10; overflow: hidden;
  background: #000; cursor: pointer;
  touch-action: none; -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
  transition: opacity .3s ease-out;
}
#start.leaving { opacity: 0; pointer-events: none; }
#start-bg { position: absolute; background: url("forest.png") center no-repeat; image-rendering: pixelated; }   /* 자리 · 크기는 layout()이 게임 화면에 맞춘다 */
#start-title, #start-bar, #start-tap { position: absolute; pointer-events: none; }
#start-title { opacity: 0; transition: opacity .25s ease-out; }
#start-title.shown { opacity: 1; }
#start-title, #start-bar, #start-tap { image-rendering: pixelated; }   /* 게임처럼 도트 그대로 키운다(타이틀 그림도 게임에선 Point) */
#start-tap { visibility: hidden; }
#start.ready #start-bar { visibility: hidden; }
#start.ready #start-tap { visibility: visible; animation: momong-blink 1.1s steps(1, end) infinite; }
@keyframes momong-blink { 0% { opacity: 1; } 70% { opacity: 0; } 100% { opacity: 0; } }

#start-error {
  display: none; position: absolute; left: 8%; right: 8%; top: 74%;
  color: #fff7ed; font: bold 18px/1.5 sans-serif; text-align: center;
  text-shadow: -2px 0 #050403, 2px 0 #050403, 0 -2px #050403, 0 2px #050403;
}
#start.error #start-bar, #start.error #start-tap { visibility: hidden; animation: none; }
#start.error #start-error { display: block; }
#start.error { cursor: default; }

/* 세이브가 안 되는 브라우저 알림(사이트 데이터 차단 등) */
#start-note {
  display: none; position: absolute; left: 6%; right: 6%; top: 88%;
  color: #fff7ed; font: bold 14px/1.4 sans-serif; text-align: center;
  text-shadow: -1px 0 #050403, 1px 0 #050403, 0 -1px #050403, 0 1px #050403;
}

/* 메모리 진단 아이콘 — «Show Diagnostics Overlay»를 켠 빌드에서만, 시작한 뒤에 */
#diagnostics-icon { display: none; position: fixed; right: 6px; bottom: 6px; width: 28px; height: 28px; z-index: 5; opacity: .6; }

/* 유니티 경고(주소에 ?dev일 때만) */
#unity-warning { position: fixed; left: 50%; top: 4%; transform: translate(-50%); z-index: 20; max-width: 90%; font: 13px/1.4 sans-serif; }
#unity-warning div { background: #fff3a8; color: #222; padding: 8px 12px; margin-bottom: 4px; border-radius: 4px; }

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