/* Campfire Hero in the browser: a night sky lit by the fire, the game in a phone-shaped column (full screen on touch devices). */
:root {
  --night: #140C26;
  --dusk: #2A1846;
  --ember: #FF8A2B;
  --flame: #FFC94A;
  --ash: #FFF3E2;
  --ink: #1A1226;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: radial-gradient(110% 80% at 50% 105%, #6A2A1E 0%, var(--dusk) 42%, var(--night) 100%);
  color: var(--ash);
  font: 500 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

#room {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
}

#phone {
  position: relative;
  background: var(--ink);
  overflow: hidden;
}

body.desk #phone {
  border-radius: 26px;
  box-shadow: 0 0 0 5px rgba(255, 201, 74, 0.85), 0 0 60px rgba(255, 138, 43, 0.35), 0 24px 60px rgba(0, 0, 0, 0.5);
}

body.hand #phone {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
}

#unity-canvas {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
  touch-action: none;
  background: var(--ink);
}

#curtain {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  background: radial-gradient(90% 60% at 50% 100%, #7A3420 0%, var(--dusk) 55%, var(--night) 100%);
  transition: opacity 0.35s ease;
}

#curtain.gone { opacity: 0; pointer-events: none; }

#logo { width: min(84%, 400px); height: auto; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.45)); }

#meter {
  width: min(60%, 260px);
  height: 14px;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.4);
  box-shadow: inset 0 0 0 2px rgba(255, 201, 74, 0.35);
  overflow: hidden;
}

#meter-fill {
  width: 10%;
  height: 100%;
  border-radius: 7px;
  background: linear-gradient(90deg, var(--ember), var(--flame));
  transition: width 0.2s ease;
}

#meter-text { margin: 0; font-weight: 700; letter-spacing: 0.04em; opacity: 0.9; }

#trouble {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #D9452B;
  color: #fff;
  font-weight: 600;
}

#keys {
  width: 290px;
  padding: 22px 22px 18px;
  border-radius: 22px;
  background: rgba(255, 243, 226, 0.96);
  color: var(--ink);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
}

#keys h2 { margin: 0 0 12px; font-size: 21px; font-weight: 800; color: #B5491A; }
#keys ul { list-style: none; margin: 0 0 12px; padding: 0; }
#keys li { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
#keys p { margin: 8px 0 0; }
#keys .quiet { color: #6E6478; font-size: 13px; }

.caps {
  flex: none;
  min-width: 88px;
  padding: 4px 8px;
  border-radius: 9px;
  background: var(--dusk);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  text-align: center;
  box-shadow: 0 3px 0 var(--night);
}
