/* Bhaag! - a gully at 3 AM: near-black brown, sodium-lamp amber, kurta blue, hot pink */
:root { --night: #1C120C; --moon: #FFF1DC; --itch: #FFA62B; --sheet: #FF5E7E; --coil: #3CC9B0; --bite: #FF4433; }

/* Screens: a sodium lamp glow instead of Bzzz Off's coil */
.screen { background:
  radial-gradient(ellipse at 80% 0%, rgba(255,166,43,.32) 0%, rgba(255,166,43,0) 45%),
  radial-gradient(circle at 50% 38%, #4a2a17 0%, var(--night) 72%); }
.screen.dim { background: radial-gradient(circle at 50% 40%, rgba(74,42,23,.93) 0%, rgba(28,18,12,.97) 70%); }
.mascot svg { animation: gallop .32s ease-in-out infinite alternate; }
@keyframes gallop { from { transform: translateY(0) rotate(-3deg); } to { transform: translateY(-10px) rotate(3deg); } }
.menu-grid a.ghost { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 10px; font-size: 18px; text-decoration: none; }
.page { cursor: default; }
.page .day { font-size: 26px; }
.ms-line { font-size: 13px; font-weight: 600; line-height: 1.3; }
.page.locked { background: #9a8474; }
canvas { cursor: pointer; }

/* ---------- HUD ---------- */
.hud-top { align-items: center; }
.hud-left { flex-direction: row; gap: 6px; }
#score { font-size: 17px; text-shadow: none; padding: 0; color: var(--moon); }
.meters { display: flex; gap: 10px; align-items: center; justify-content: center; }
.meter { display: flex; align-items: center; gap: 6px; background: var(--night); border: 3px solid var(--moon); border-radius: 30px; padding: 2px 12px; font-size: 18px; }
.meter .bar { width: min(170px, 28vw); height: 12px; border: 2px solid var(--moon); border-radius: 8px; overflow: hidden; background: rgba(255,241,220,.15); }
#dogFill { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--coil), var(--itch), var(--bite)); transition: width .15s; }
#biscuitBtn { position: fixed; right: max(14px, env(safe-area-inset-right)); top: calc(max(10px, env(safe-area-inset-top)) + 62px); pointer-events: auto;
  font-family: var(--body); font-weight: 900; font-size: 22px; color: var(--night); background: #FFE14D; border: 3px solid var(--night);
  border-radius: 18px; padding: 6px 14px; box-shadow: 0 5px 0 var(--night); cursor: pointer; touch-action: none; }
#biscuitBtn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--night); }
#biscuitBtn:disabled { opacity: .5; cursor: default; }
.chip.event { border-color: var(--sheet); background: var(--sheet); font-size: 14px; }
.goal.daily { color: var(--coil); font-size: 15px; max-width: 30em; }
.roast { font-size: 16px; font-weight: 700; font-style: italic; color: var(--itch); margin-top: -6px; max-width: 30em; }
.item small { font-size: 13px; font-weight: 600; opacity: .8; text-align: center; line-height: 1.3; }
.item:not(.on) .emoji { opacity: .5; }
#resLoot:empty { display: none; }
#hint { position: fixed; left: 50%; top: 38%; transform: translate(-50%, -50%); width: max-content; max-width: 88vw; background: rgba(28,18,12,.9);
  border: 3px dashed var(--moon); border-radius: 16px; padding: 10px 18px; font-weight: 800; font-size: 17px; text-align: center; pointer-events: none; }

@media (max-width: 560px) {
  .hud-top { flex-wrap: wrap; }
  .meters { order: 3; width: 100%; }
  .meter .bar { width: 46vw; }
  #biscuitBtn { top: calc(max(10px, env(safe-area-inset-top)) + 100px); }
  #hint { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .mascot svg { animation: none; }
}
