/* Kahan Hai? - 3 AM power cut: plum dark, torch orange, Mummy-saree pink, tubelight teal */
:root { --night: #2B1B2E; --moon: #FFF1E6; --itch: #FFB84D; --sheet: #FF5C7A; --coil: #4FD1C5; --bite: #FF4D4D; }

/* Screens: a torch beam sweeping the dark instead of Bzzz Off's coil */
.screen { background:
  radial-gradient(ellipse 60% 40% at 30% 30%, rgba(255,184,77,.18) 0%, rgba(255,184,77,0) 70%),
  radial-gradient(circle at 50% 38%, #4b2f4f 0%, var(--night) 72%); }
.screen.dim { background: radial-gradient(circle at 50% 40%, rgba(75,47,79,.93) 0%, rgba(43,27,46,.97) 70%); }
.mascot svg { animation: search 2.4s ease-in-out infinite; }
@keyframes search { 0%, 100% { transform: translate(0, 0) rotate(-6deg); } 30% { transform: translate(10px, -6px) rotate(4deg); } 65% { transform: translate(-8px, -10px) rotate(-2deg); } }
.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); color: #fff; }
.pest .big-emoji { font-size: 52px; line-height: 105px; height: 105px; white-space: nowrap; }
.pest.hazard { background: var(--coil); }
canvas { cursor: crosshair; }

/* ---------- HUD ---------- */
.hud-top { align-items: center; }
.hud-left { flex-direction: row; gap: 6px; }
.chip.urgent { border-color: var(--bite); background: var(--bite); animation: panic .3s ease-in-out infinite alternate; }
.chip.rival { border-color: var(--sheet); }
@keyframes panic { from { transform: scale(1); } to { transform: scale(1.1); } }
.meters { display: flex; gap: 8px; align-items: center; }
#hintBtn { pointer-events: auto; font-family: var(--body); font-weight: 900; font-size: 16px; color: var(--night); background: var(--itch);
  border: 3px solid var(--night); border-radius: 16px; padding: 4px 12px; box-shadow: 0 4px 0 var(--night); cursor: pointer; }
#hintBtn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--night); }
#hintBtn:disabled { opacity: .45; cursor: default; }
#combo { font-family: var(--comic); font-size: 24px; letter-spacing: .04em; color: var(--itch); text-shadow: var(--outline); min-width: 1px; }
#hint { position: fixed; left: 50%; top: 40%; transform: translate(-50%, -50%); width: max-content; max-width: 88vw; background: rgba(43,27,46,.92);
  border: 3px dashed var(--moon); border-radius: 16px; padding: 10px 18px; font-weight: 800; font-size: 16px; text-align: center; pointer-events: none; }

/* The list of lost things */
#tray { position: fixed; left: 0; right: 0; bottom: 0; z-index: 4; padding: 8px 8px max(8px, env(safe-area-inset-bottom));
  background: var(--moon); border-top: 4px solid var(--night); box-shadow: 0 -6px 0 rgba(0,0,0,.25); }
#list { display: flex; flex-wrap: wrap; gap: 6px 8px; justify-content: center; max-width: 900px; margin: 0 auto; }
.want { position: relative; display: flex; align-items: center; gap: 6px; padding: 3px 10px 3px 6px; color: var(--night); background: #fff;
  border: 3px solid var(--night); border-radius: 14px; font-weight: 800; box-shadow: 0 3px 0 var(--night); transition: transform .2s, opacity .2s; }
.want i { font-style: normal; font-size: 26px; line-height: 1.1; }
.want small { font-size: 13px; line-height: 1.15; max-width: 9em; }
.want.got, .want.mummy { opacity: .55; transform: scale(.94); }
.want.got { background: var(--coil); }
.want.mummy { background: var(--sheet); color: #fff; }
.want.got::after, .want.mummy::after { position: absolute; top: -10px; right: -8px; font-size: 18px; }
.want.got::after { content: "✅"; }
.want.mummy::after { content: "👩"; }

@media (max-width: 560px) {
  .hud-top { flex-wrap: wrap; }
  .meters { order: 3; width: 100%; justify-content: center; }
  #hint { font-size: 14px; }
  .want { padding: 2px 7px 2px 4px; gap: 3px; }
  .want i { font-size: 21px; }
  .want small { font-size: 11px; max-width: 7em; }
}
@media (prefers-reduced-motion: reduce) {
  .mascot svg, .chip.urgent { animation: none; }
}

/* ---------- Menu, daily search, album, Mummy's verdict ---------- */
.menu-grid .wide { grid-column: 1 / -1; }
.daily { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 100%; max-width: 460px; padding: 12px 16px; cursor: pointer; font-family: var(--body);
  background: var(--coil); color: var(--night); border: 4px solid var(--night); border-radius: 18px; box-shadow: 0 7px 0 var(--night); transform: rotate(-1deg); }
.daily:active { box-shadow: 0 2px 0 var(--night); translate: 0 5px; }
.daily .emoji { font-size: 34px; line-height: 1.1; }
.daily b { font-family: var(--display); font-weight: 400; font-size: 24px; }
.daily span:not(.emoji) { font-size: 14px; font-weight: 600; }
.daily small { font-weight: 900; font-size: 14px; }
.album { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; width: 100%; }
.kz { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 10px; border: 3px dashed rgba(255,241,230,.3); border-radius: 16px; background: rgba(255,241,230,.05); }
.kz span { font-size: 40px; line-height: 1.1; opacity: .5; }
.kz b { font-size: 15px; }
.kz small { font-size: 12.5px; font-weight: 600; opacity: .7; line-height: 1.35; }
.kz.got { border: 3px solid var(--itch); background: rgba(255,184,77,.14); box-shadow: 0 0 18px rgba(255,184,77,.25); }
.kz.got span { opacity: 1; animation: glint 2.4s ease-in-out infinite; }
@keyframes glint { 0%, 80%, 100% { filter: none; } 90% { filter: drop-shadow(0 0 8px #fff) brightness(1.3); } }
.verdict { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.vpill { background: var(--sheet); color: #fff; border: 3px solid var(--night); border-radius: 30px; padding: 4px 16px; font-weight: 900; font-size: 17px; transform: rotate(-2deg); box-shadow: 0 4px 0 var(--night); }
.vpill b { font-family: var(--comic); font-size: 24px; letter-spacing: .04em; margin-left: 4px; }
#verdictLine { font-weight: 800; font-style: italic; font-size: 17px; }
@media (max-width: 560px) {
  .album { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .kz.got span { animation: none; }
}
