/* ============================================================
   base.css — watercolor cartoon palette, conic-check wall, vignette
   ============================================================ */

:root {
  /* Canonical palette names (Stage 2R spec) */
  --bg-wall: #EDE0D0;
  --bg-wall-check: #E5D4C0;
  --wood-light: #D4A574;
  --wood-mid: #B8875A;
  --wood-dark: #8B5A2B;
  --accent-brick: #B8747C;

  /* legacy aliases */
  --bg: var(--bg-wall);
  --wall: var(--bg-wall);
  --wall-check: var(--bg-wall-check);
  --wood: var(--wood-mid);
  --wood-darker: #6B4520;
  --accent: var(--accent-brick);
  --accent-dark: #8D525A;
  --accent-light: #D9A2A8;

  /* text */
  --text: #3D2B1F;
  --text-soft: #6B5142;
  --text-mute: #9A8575;

  /* state colors */
  --ok: #6FA26C;
  --warn: #D9A441;
  --bad: #C4594E;
  --glow: rgba(255, 120, 60, 0.55);
  --glow-soft: rgba(255, 140, 70, 0.25);
  --shadow: rgba(61, 43, 31, 0.22);
  --shadow-soft: rgba(61, 43, 31, 0.10);

  /* meat colors (Stage 4 computes inline via HSL; these are keyframes) */
  --meat-raw: hsl(355, 60%, 55%);
  --meat-searing: hsl(25, 55%, 50%);
  --meat-perfect: hsl(25, 55%, 35%);
  --meat-over: hsl(20, 40%, 22%);
  --meat-burnt: hsl(0, 0%, 10%);

  /* layout heights */
  --h-hud: 8vh;
  --h-seats: 22vh;
  --h-counter: 40px;
  --h-tray: 18vh;
  --h-grill: 28vh;
  --h-toolbar: 7vh;

  /* radii / spacing */
  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  --pad: 12px;
  --pad-sm: 8px;
  --pad-lg: 16px;
  --gap: 8px;

  --fs-xs: 10px;
  --fs-sm: 12px;
  --fs-md: 14px;
  --fs-lg: 18px;
  --fs-xl: 24px;

  font-family:
    -apple-system, BlinkMacSystemFont, "Pretendard", "Apple SD Gothic Neo",
    "Noto Sans KR", system-ui, sans-serif;
  color: var(--text);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  /* Stage 12: lock the document so a drag ghost or touch-gesture pan
     can never materialize a scrollbar. Scrollable UI (e.g. settlement
     cards) opts in with overflow:auto on its own container. */
  overflow: hidden;
  margin: 0;
  padding: 0;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    repeating-conic-gradient(
      var(--wall) 0% 25%,
      var(--wall-check) 0% 50%
    );
  background-size: 24px 24px;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  outline: none;
}

button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

#app {
  position: relative;
  width: 375px;
  max-width: 100vw;
  height: 812px;
  max-height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  box-shadow: 0 20px 60px var(--shadow);
  border-radius: 8px;
  isolation: isolate;
}

/* soft vignette over the whole app frame */
#app::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    transparent 60%,
    rgba(0, 0, 0, 0.15) 100%
  );
  pointer-events: none;
  z-index: 1000;
}

/* ------------------------------------------------------------
   Scenes
   ------------------------------------------------------------ */
.scene {
  display: none;
  position: absolute;
  inset: 0;
  flex-direction: column;
  overflow: hidden;
}

.scene--active {
  display: flex;
}

/* ------------------------------------------------------------
   Stage 14: build timestamp (visible in every scene)
   ------------------------------------------------------------ */
#build-stamp {
  position: fixed;
  right: 8px;
  bottom: 6px;
  font-size: 10px;
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  color: rgba(0, 0, 0, 0.28);
  letter-spacing: 0.02em;
  pointer-events: none;
  user-select: none;
  z-index: 1;
  white-space: nowrap;
}
