:root {
  color-scheme: light;
  --bb-ivory: #f7eedc;
  --bb-paper: #fff9eb;
  --bb-green: #2da34b;
  --bb-brown: #4a2a17;
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; background: #F7EFDC; }
body {
  display: grid;
  place-items: center;
  font-family: "BB Body", Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", system-ui, -apple-system, sans-serif;
  touch-action: none;
  overscroll-behavior: none;
}
#game-shell {
  position: relative;
  width: 100vw;
  height: 100dvh;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  background: #F7EFDC;
}
#game-shell.screen-title {
  background: linear-gradient(
    to bottom,
    #F7EFDC 0%,
    #F7EFDC 50%,
    #CD8346 50%,
    #CD8346 100%
  );
}
#game-shell.screen-ui,
#game-shell.screen-game {
  background: #F7EFDC;
}
#game-shell::before,
#game-shell::after {
  content: "";
  display: none;
  position: absolute;
  border: 1px solid rgba(45, 163, 75, .15);
  border-radius: 50%;
  pointer-events: none;
}
#game-shell::before { width: 38vmin; height: 38vmin; top: -19vmin; right: -12vmin; }
#game-shell::after { width: 26vmin; height: 26vmin; bottom: -14vmin; left: -8vmin; }
#game-container {
  position: absolute;
  inset: 0;
  min-width: 0;
  min-height: 0;
  background: transparent;
  overflow: hidden;
}
#game-shell.tablet-frame {
  background: #EEE5D3;
}
#game-shell.tablet-frame #game-container {
  inset: auto;
  left: var(--game-frame-left);
  top: var(--game-frame-top);
  width: var(--game-frame-width);
  height: var(--game-frame-height);
  outline: 1px solid rgba(120, 88, 55, 0.18);
}
#game-container canvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  box-shadow: none;
  touch-action: none;
}
#loading-message {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  color: var(--bb-brown);
  font-weight: 800;
  letter-spacing: -.02em;
  pointer-events: none;
}
body.game-ready #loading-message { display: none; }
noscript {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: #F7EFDC;
  color: var(--bb-brown);
}
