/* Rasgulla Defense! - chashni brown, marigold gold, mirchi red, banana-leaf green */
:root { --night: #2A1408; --moon: #FFF8EC; --itch: #FFC233; --sheet: #E8332A; --coil: #45D483; --bite: #E8332A; }

/* Screens: a dari with woven stripes */
.screen { background:
  repeating-linear-gradient(0deg, rgba(232,51,42,.08) 0 18px, transparent 18px 36px, rgba(255,194,51,.07) 36px 54px, transparent 54px 72px),
  radial-gradient(circle at 50% 30%, #5a3218 0%, var(--night) 72%); }
.screen.dim { background: radial-gradient(circle at 50% 40%, rgba(90,50,24,.94) 0%, rgba(42,20,8,.97) 70%); }
.mascot svg { animation: wobble 1.6s ease-in-out infinite; }
@keyframes wobble { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg) translateY(-6px); } }
.menu-grid a.ghost { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 10px; font-size: 18px; text-decoration: none; }
.logo { font-size: clamp(40px, 9vw, 90px); }
.page.boss { background: var(--sheet); }
.page .room small { font-size: 12px; opacity: .75; }
canvas { cursor: pointer; }

/* ---------- The card bar ---------- */
#hud { padding: 0; }
#bar { display: flex; align-items: center; gap: 8px; padding: max(6px, env(safe-area-inset-top)) 10px 6px; background: rgba(42,20,8,.92); border-bottom: 3px solid var(--itch);
  pointer-events: auto; overflow-x: auto; scrollbar-width: none; }
.pot { display: flex; flex-direction: column; align-items: center; font-size: 22px; line-height: 1; padding: 4px 10px; background: var(--moon); color: var(--night); border: 3px solid var(--night); border-radius: 14px; min-width: 64px; }
.pot b { font-family: var(--display); font-size: 20px; font-weight: 400; }
#cards { display: flex; gap: 6px; }
.card { position: relative; width: 58px; height: 68px; border-radius: 12px; border: 3px solid var(--night); background: #FFE7B8; cursor: pointer; padding: 2px; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 4px 0 var(--night); font-family: var(--body); }
.card .ic { font-size: 30px; line-height: 1.1; }
.card b { font-weight: 900; font-size: 14px; color: var(--night); }
.card .cool { position: absolute; left: 0; right: 0; top: 0; height: 0; background: rgba(42,20,8,.6); pointer-events: none; }
.card.poor { filter: grayscale(.8) brightness(.8); }
.card.sel { background: var(--coil); transform: translateY(-3px); box-shadow: 0 7px 0 var(--night); }
.tool { width: 50px; height: 50px; border-radius: 12px; border: 3px solid var(--night); background: var(--moon); font-size: 24px; cursor: pointer; box-shadow: 0 4px 0 var(--night); }
.tool.sel { background: var(--sheet); }
.right { display: flex; flex-direction: column; gap: 4px; margin-left: auto; align-items: flex-end; }
.wave { display: flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 800; }
#wave { width: 90px; height: 12px; border: 3px solid var(--night); background: var(--moon); border-radius: 8px; overflow: hidden; }
#waveFill { display: block; height: 100%; width: 0; background: var(--sheet); }
#bar #pauseBtn { flex: none; }
#hint { position: fixed; left: 50%; top: 55%; transform: translate(-50%, -50%); width: max-content; max-width: 88vw; background: rgba(42,20,8,.93);
  border: 3px dashed var(--moon); border-radius: 16px; padding: 10px 18px; font-weight: 700; font-size: 16px; line-height: 1.4; text-align: center; pointer-events: none; }
#hint b { font-family: var(--display); font-weight: 400; font-size: 22px; color: var(--itch); }
#hint small { font-size: 13px; opacity: .8; }

@media (max-width: 700px) {
  .card { width: 48px; height: 58px; }
  .card .ic { font-size: 24px; }
  #levelChip { display: none; }
  #wave { width: 60px; }
  #hint { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { .mascot svg { animation: none; } }
