@font-face { font-family: "Black Han Sans"; src: url("/assets/fonts/BlackHanSans.4f3f2644.woff2") format("woff2"); font-weight: 400; font-display: block; }
@font-face { font-family: "Chainmate Sans KR"; src: url("/assets/fonts/ChainmateSansKR-Medium.d86e263e.woff2") format("woff2"); font-weight: 500; font-display: block; }
/* 화면 맞춤(docs/design-notes/layout.md 「화면 맞춤」): 캔버스 자리 · 크기는 main.js가 기기 화소 정수 자리에 둔다.
   창은 끌리지도 · 튕기지도 · 확대되지도 않는다(손가락 두 번 누르기 · 벌리기 · 길게 누르기 선택과 메뉴 포함) */
html, body {
  margin: 0; height: 100%; background: #05061a; overflow: hidden;
  overscroll-behavior: none; touch-action: none;
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
}
body { position: fixed; inset: 0; }
canvas {
  display: block;
  position: absolute;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  touch-action: none;
  outline: none;
}
/* 캔버스 바탕은 비워 둔다: WebKit은 반 CSS 화소 자리의 캔버스 그림을 1 기기 화소 밀어 그려, 바탕이 있으면 테두리에 한 줄이 비친다(뒤는 같은 결의 여백 판) */
#screen { background: transparent; cursor: default; }
#pad { background: #05061a; }
/* 안전 영역 재기(노치 · 홈 막대): main.js가 padding을 읽는다 */
#safe {
  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);
}
/* 캔버스 · 여백 판이 놓이는 틀. 폰 세로면 main.js가 틀을 창 높이 × 창 폭으로 잡고 시계 방향 90도 돌린다(src/ui/fit.js stageTransform) */
#stage { position: fixed; left: 0; top: 0; width: 100%; height: 100%; overflow: hidden; transform-origin: 0 0; }
/* 글자 입력 칸(CHM-72, src/ui/textfield.js): 캔버스 위에 겹치는 아이디 · 비번 칸. 자리 · 크기 · 글 크기는 textfield.js가 게임 좌표에서 옮겨 적는다.
   body가 글 고르기를 막고 있어 칸에서만 푼다(안 풀면 아이폰에서 글 자리 표시가 안 뜬다) */
.tf { position: fixed; left: 0; top: 0; width: 0; height: 0; margin: 0; padding: 0; z-index: 5; }
.tf-in {
  position: fixed; box-sizing: border-box; margin: 0; border: 1px solid #3a4280; border-radius: 9px;
  background: #161a44; color: #fff1b8; caret-color: #efbd55; outline: none;
  font-family: "Chainmate Sans KR", sans-serif; font-weight: 500; line-height: 1; letter-spacing: 0;
  transform-origin: 0 0; -webkit-appearance: none; appearance: none;
  -webkit-user-select: text; user-select: text; touch-action: manipulation; -webkit-touch-callout: default;
}
.tf-in:focus { border-color: #efbd55; }
.tf-in::selection { background: #efbd55; color: #2a1c08; }
/* 비번 관리자가 채운 칸의 바탕을 게임 결로 */
.tf-in:-webkit-autofill { -webkit-text-fill-color: #fff1b8; box-shadow: 0 0 0 1000px #161a44 inset; caret-color: #efbd55; }
/* 이름표는 캔버스가 그린다 — 화면 읽기 프로그램에만 보인다 */
.tf-label { position: fixed; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; color: #ece3cf; font-family: "Chainmate Sans KR", sans-serif; }
.tf-go { position: fixed; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
/* 폰 세로(돌려 그린 화면)에서 초점이 가면: 어두운 바탕 위, 화면 위쪽에 바로 선 칸과 이름표 */
.tf.lift { width: 100%; height: 100%; background: rgba(5, 6, 26, 0.86); }
.tf.lift .tf-label { width: auto; height: auto; overflow: visible; clip-path: none; }
