/* Machli Pakdo! - deep river blue, mango gold, bobber red, lotus pink */
:root { --night: #0F2230; --moon: #FFF8E8; --itch: #FFB627; --sheet: #FF4D4D; --coil: #5BE37D; --bite: #FF4D4D; }

/* Screens: water ripples */
.screen { background:
  repeating-radial-gradient(circle at 50% 120%, rgba(255,255,255,.04) 0 14px, transparent 14px 40px),
  radial-gradient(circle at 50% 30%, #1d4a5e 0%, var(--night) 72%); }
.screen.dim { background: radial-gradient(circle at 50% 40%, rgba(29,74,94,.93) 0%, rgba(15,34,48,.97) 70%); }
.mascot svg { animation: bob 2.2s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-6px) rotate(1deg); } }
.menu-grid a.ghost { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 10px; font-size: 18px; text-decoration: none; }
.menu-grid .wide { grid-column: 1 / -1; }
.logo { font-size: clamp(44px, 10vw, 96px); }
.item .blurb { font-size: 13px; font-weight: 600; opacity: .85; line-height: 1.3; }
.item .found { font-size: 12px; font-weight: 800; color: var(--itch); }
.item .buy { background: var(--itch); }
canvas { cursor: pointer; }

/* Machli-dex */
.dexgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; width: 100%; }
.dexcard { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 12px 8px 10px; border-radius: 16px;
  background: rgba(255,248,232,.08); border: 3px solid var(--rc); }
.dexcard .emoji { font-size: 40px; line-height: 1.1; }
.dexcard b { font-size: 14px; line-height: 1.2; }
.dexcard i { font-style: normal; font-weight: 800; font-size: 12px; color: var(--rc); }
.dexcard small { font-size: 11.5px; font-weight: 600; opacity: .8; line-height: 1.3; }
.dexcard em { font-style: normal; font-weight: 900; font-size: 12px; color: var(--itch); }
.dexcard.unknown { opacity: .55; border-style: dashed; }

/* ---------- HUD ---------- */
.hud-top { align-items: center; }
.hud-left { flex-direction: row; gap: 6px; flex-wrap: wrap; }
.meters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center; }
#dailyChip { border-color: var(--itch); }
.tools { position: fixed; left: 0; right: 0; bottom: max(12px, env(safe-area-inset-bottom)); display: flex; gap: 10px; justify-content: center; pointer-events: none; }
.tools .ghost { pointer-events: auto; font-size: 15px; padding: 7px 14px; min-height: 40px; }
#hint { position: fixed; left: 50%; top: 36%; transform: translate(-50%, -50%); width: max-content; max-width: 88vw; background: rgba(15,34,48,.92);
  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); }

/* The catch card */
#catch { position: fixed; inset: 0; z-index: 6; display: flex; align-items: center; justify-content: center; background: rgba(5,15,25,.55); padding: 16px; }
.catchcard { position: relative; width: min(340px, 92vw); display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  background: var(--moon); color: var(--night); border: 5px solid var(--rc); border-radius: 26px; padding: 18px 16px 14px; box-shadow: 0 0 0 4px var(--night), 0 0 40px var(--rc);
  animation: catchpop .45s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes catchpop { from { transform: scale(.3) rotate(-10deg); } to { transform: scale(1); } }
.catchcard .emoji { font-size: 84px; line-height: 1.1; animation: flop 1s ease-in-out infinite; }
@keyframes flop { 50% { transform: rotate(10deg) scale(1.05); } }
.catchcard b { font-family: var(--display); font-weight: 400; font-size: 30px; line-height: 1.05; }
.catchcard .tag { font-weight: 900; font-size: 14px; padding: 2px 12px; border-radius: 20px; border: 2px solid var(--night); }
.catchcard .kg { font-weight: 800; font-size: 15px; opacity: .8; }
.catchcard p { font-size: 15px; font-weight: 700; }
.catchcard .free { font-weight: 800; font-size: 13px; color: #1f8a4c; }
.catchcard .val { font-family: var(--display); font-size: 30px; color: #b07400; }
.catchcard .new { position: absolute; top: -16px; right: -10px; background: var(--sheet); color: #fff; font-weight: 900; padding: 4px 12px; border-radius: 14px; border: 3px solid var(--night); transform: rotate(8deg); }
.catchcard .tapon { font-size: 12px; font-weight: 700; opacity: .6; }

@media (max-width: 560px) {
  .hud-top { flex-wrap: wrap; }
  .meters { order: 3; width: 100%; }
  #hint { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { .mascot svg, .catchcard, .catchcard .emoji { animation: none; } }
