/* Shhh! Don't Wake Papa - midnight kitchen: deep teal night, marigold, coral, fridge-light cyan */
:root { --night: #0E2433; --moon: #FDF1DC; --itch: #FFB627; --sheet: #FF6B6B; --coil: #3DDC97; --bite: #E63946; --fridge: #BFF4FF; }

/* Screens: teal night with a faint "z z z" wallpaper instead of Bzzz Off's coil */
.screen { background:
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Ctext x='10' y='40' font-family='Arial' font-weight='900' font-size='28' fill='%23ffffff' fill-opacity='.05'%3Ez%3C/text%3E%3Ctext x='70' y='100' font-family='Arial' font-weight='900' font-size='20' fill='%23ffffff' fill-opacity='.05'%3Ez%3C/text%3E%3C/svg%3E"),
  radial-gradient(circle at 50% 35%, #1f5468 0%, var(--night) 70%); }
.screen.dim { background: radial-gradient(circle at 50% 40%, rgba(31,84,104,.93) 0%, rgba(14,36,51,.97) 70%); }
.title { text-shadow: var(--outline), 7px 7px 0 var(--sheet); }
.mascot svg { animation: tiptoe 2.4s ease-in-out infinite; }
@keyframes tiptoe { 0%, 100% { transform: translateY(0) rotate(-3deg); } 25% { transform: translateY(-6px) rotate(0); } 50% { transform: translateY(0) rotate(3deg); } 75% { transform: translateY(-6px) rotate(0); } }
.menu-grid a.ghost { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 10px; font-size: 18px; text-decoration: none; }
.page.boss { background: var(--sheet); }
.pest .big-emoji { font-size: 76px; line-height: 110px; height: 110px; }
.pest img { width: 130px; height: auto; }
.pest.snack { background: var(--fridge); }

/* ---------- HUD ---------- */
.hud-top { align-items: center; }
.hud-left { gap: 6px; }
#melt { border-color: var(--sheet); }
.susp { display: flex; align-items: center; gap: 8px; background: var(--night); border: 3px solid var(--moon); border-radius: 30px; padding: 3px 12px; }
#suspFace { font-size: 22px; line-height: 1; }
.susp .bar { width: min(180px, 30vw); height: 12px; border: 2px solid var(--moon); border-radius: 8px; overflow: hidden; background: rgba(253,241,220,.15); }
#suspFill { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--coil), var(--itch), var(--bite)); transition: width .15s; }
#banner { margin: 14px auto 0; width: fit-content; max-width: 92vw; padding: 8px 20px; border: 4px solid var(--night); border-radius: 18px;
  font-weight: 900; font-size: clamp(16px, 3.6vw, 22px); text-align: center; box-shadow: 0 5px 0 var(--night); }
#banner.stir { background: var(--itch); color: var(--night); animation: wobble .25s ease-in-out infinite alternate; }
#banner.look { background: var(--bite); color: #fff; transform: scale(1.06); }
#banner.storm { background: var(--fridge); color: var(--night); }
@keyframes wobble { from { transform: rotate(-2deg); } to { transform: rotate(2deg); } }
#hint { position: fixed; left: 50%; bottom: 120px; transform: translateX(-50%); background: rgba(14,36,51,.85); border: 3px dashed var(--moon);
  border-radius: 16px; padding: 10px 18px; font-weight: 800; font-size: 18px; text-align: center; animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 50% { transform: translateX(-50%) scale(1.05); } }
.hud-bottom { position: fixed; left: 0; right: 0; bottom: max(14px, env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 12px; padding: 0 110px 0 14px; }
#gear { flex: none; min-width: 120px; justify-content: center; }
#gear[data-gear="1"] { border-color: var(--itch); }
#gear[data-gear="2"] { border-color: var(--bite); background: var(--bite); }
#minimap { position: relative; flex: 1; height: 12px; max-width: 520px; background: rgba(253,241,220,.2); border: 2px solid var(--moon); border-radius: 8px; }
.mm-icon { position: absolute; top: 50%; transform: translate(-50%, -50%); font-size: 18px; line-height: 1; }
.mm-creak { position: absolute; top: 0; bottom: 0; background: #e0a96d; opacity: .8; }
.mm-kid { position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 50%; background: var(--coil); border: 3px solid var(--night); transform: translate(-50%, -50%); box-shadow: 0 0 0 3px var(--coil); }
#pad { position: fixed; right: 16px; bottom: max(12px, env(safe-area-inset-bottom)); width: 82px; height: 82px; border-radius: 50%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; font-size: 30px; line-height: 1; background: rgba(253,241,220,.12); border: 4px solid var(--moon); transition: transform .1s, background .1s; }
#pad small { font-size: 12px; font-weight: 900; text-transform: lowercase; }
#pad.on { background: var(--coil); border-color: var(--night); transform: scale(.92); }

@media (max-width: 560px) {
  .susp .bar { width: 22vw; }
  #goal { font-size: 13px; }
  #hint { font-size: 15px; bottom: 110px; width: 86vw; }
  .hud-bottom { padding-right: 96px; gap: 8px; }
  #gear { min-width: 0; }
  #pad { width: 70px; height: 70px; font-size: 26px; }
  .pest img { width: 110px; }
}
@media (prefers-reduced-motion: reduce) {
  .mascot svg, #hint, #banner.stir { animation: none; }
}
canvas { cursor: pointer; }
