/* Base layout, canvas and gesture suppression */
:root {
  --cream: #f7e9c9;
  --cream2: #efdcb2;
  --wood: #a8703f;
  --wood-d: #6e4426;
  --ink: #3a2418;
  --ink-soft: #6b4a34;
  --green: #5c9a3e;
  --green-d: #3c6e28;
  --yellow: #f0c040;
  --orange: #e0782a;
  --red: #c4432f;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --slot: clamp(34px, calc((100vw - 24px - var(--sal) - var(--sar) - 64px) / 8), 50px);
  --font: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", "Noto Sans CJK KR", "Malgun Gothic", system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; height: 100%; overflow: hidden; background: #1a120e; color: var(--ink);
  font-family: var(--font); font-size: 15px;
  overscroll-behavior: none; touch-action: none;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  -webkit-text-size-adjust: 100%;
}
input, textarea, select { -webkit-user-select: text; user-select: text; font-family: var(--font); }
#app { position: fixed; inset: 0; overflow: hidden; }
#game {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  image-rendering: pixelated; image-rendering: crisp-edges; touch-action: none;
}
img, canvas { image-rendering: pixelated; image-rendering: crisp-edges; }
.hidden { display: none !important; }
button { font-family: var(--font); touch-action: manipulation; color: var(--ink); }

#fade { position: absolute; inset: 0; background: #120c0a; opacity: 0; pointer-events: none; transition: opacity .22s linear; z-index: 60; }
#fade.on { opacity: 1; pointer-events: auto; }

#boot { position: absolute; inset: 0; z-index: 90; background: #2a1c16; color: var(--cream); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.boot-title { font-weight: 900; letter-spacing: 2px; font-size: 26px; color: #ffe9a8; text-shadow: 0 3px 0 #6e4426, 0 0 0 #000; }
.boot-bar { width: 220px; height: 12px; border: 2px solid #f7e9c9; border-radius: 4px; padding: 2px; }
.boot-bar i { display: block; height: 100%; width: 0; background: #f0c040; border-radius: 2px; }
#boot-msg { font-size: 13px; opacity: .85; max-width: 80vw; text-align: center; white-space: pre-wrap; }
