/* Tiffin Chor! - night-purple, butter gold, brainrot pink, mint */
:root { --night: #1E1430; --moon: #FFF7EA; --itch: #FFB627; --sheet: #FF4FA3; --coil: #3DDC97; --bite: #FF3B3B; }

/* Screens: a tiled classroom floor */
.screen { background:
  repeating-conic-gradient(rgba(255,255,255,.03) 0 25%, transparent 0 50%) 0 0 / 80px 80px,
  radial-gradient(circle at 50% 30%, #3b2a5a 0%, var(--night) 72%); }
.screen.dim { background: radial-gradient(circle at 50% 40%, rgba(59,42,90,.94) 0%, rgba(30,20,48,.97) 70%); }
.mascot svg { animation: tiptoe 1.2s ease-in-out infinite; }
@keyframes tiptoe { 0%, 100% { transform: translate(0, 0) rotate(-3deg); } 50% { transform: translate(4px, -6px) 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; }
.menu-grid .wide { grid-column: 1 / -1; }
.logo { font-size: clamp(44px, 10vw, 96px); }
.page.boss { background: var(--sheet); }
.page .room small { font-size: 12px; opacity: .75; }
canvas { cursor: grab; }

/* Tiffin-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,247,234,.08); border: 3px solid var(--rc); box-shadow: 0 0 14px color-mix(in srgb, var(--rc) 45%, transparent); }
.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 { position: absolute; top: 6px; right: 8px; font-style: normal; font-weight: 900; font-size: 12px; color: var(--itch); }
.dexcard.unknown { opacity: .55; box-shadow: none; 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; }
#moneyChip.done { background: var(--coil); color: var(--night); border-color: var(--night); }
#timeChip.late { background: var(--bite); animation: ring .2s infinite; }
@keyframes ring { 50% { transform: rotate(4deg); } }
#carryChip { background: var(--itch); color: var(--night); border-color: var(--night); }
#lockBtn { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); pointer-events: auto; touch-action: none;
  font-size: 20px; padding: 12px 20px; min-width: 120px; }
#lockBtn:disabled { background: #9d97b0; }
#hint { position: fixed; left: 50%; top: 40%; transform: translate(-50%, -50%); width: max-content; max-width: 88vw; background: rgba(30,20,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); }
#hint small { font-size: 13px; opacity: .8; }

@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, #timeChip.late { animation: none; }
}
