/* Meeting Bingo - a corporate meeting at 3 AM: slate, bingo-card cream, dauber red, meeting teal */
:root { --night: #1E2235; --moon: #FFF6E6; --itch: #FFD23F; --sheet: #FF6B6B; --coil: #4ECDC4; --bite: #FF4D4D; }

/* Screens: a grid of bingo squares instead of Bzzz Off's coil */
.screen { background:
  linear-gradient(rgba(255,246,230,.05) 2px, transparent 2px) 0 0 / 60px 60px,
  linear-gradient(90deg, rgba(255,246,230,.05) 2px, transparent 2px) 0 0 / 60px 60px,
  radial-gradient(circle at 50% 36%, #3a4066 0%, var(--night) 72%); }
.screen.dim { background: radial-gradient(circle at 50% 40%, rgba(58,64,102,.93) 0%, rgba(30,34,53,.97) 70%); }
.mascot svg { animation: wob 2s ease-in-out infinite; }
@keyframes wob { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
.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: 56px; line-height: 105px; height: 105px; }
.pest.hazard { background: var(--coil); }
html, body { background: var(--night); }

/* ---------- The meeting ---------- */
#play { position: fixed; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom));
  background: radial-gradient(circle at 50% 20%, #2e3354, var(--night) 70%); overflow-y: auto; }
#play.stare { animation: stare .6s; }
@keyframes stare { 20% { box-shadow: inset 0 0 0 9999px rgba(255,77,77,.25); } }
.top { width: 100%; max-width: 760px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip.urgent { border-color: var(--bite); background: var(--bite); }
.att small { font-weight: 800; opacity: .8; }
.att .bar { display: block; width: 80px; height: 10px; border-radius: 6px; background: rgba(255,255,255,.15); overflow: hidden; }
#attFill { display: block; height: 100%; transition: width .25s, background .25s; }
#attFill.ok { background: var(--coil); } #attFill.meh { background: var(--itch); } #attFill.bad { background: var(--bite); }
.meeting { width: 100%; max-width: 760px; display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
#speaker { display: flex; gap: 12px; align-items: flex-start; background: #111426; border: 3px solid #3a4066; border-radius: 18px; padding: 10px 14px; min-height: 92px; }
#speaker.pop { animation: pop .3s cubic-bezier(.3, 1.8, .5, 1); }
#who { display: flex; flex-direction: column; align-items: center; min-width: 74px; text-align: center; line-height: 1.15; }
#who .face { font-size: 38px; }
#who b { font-size: 14px; }
#who small { font-size: 11px; opacity: .7; font-weight: 700; }
.caption { flex: 1; margin: 0; max-width: none; font-size: 19px; font-weight: 800; line-height: 1.4; color: var(--moon); }
.cursor { display: inline-block; width: 8px; height: 18px; background: var(--coil); margin-left: 2px; vertical-align: -2px; animation: blink .8s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
#prev { margin: 0; max-width: none; font-size: 13.5px; font-weight: 600; opacity: .55; min-height: 1.3em; padding: 0 6px; }
#grid { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 6px; padding: 8px; background: var(--moon); border: 4px solid var(--night); border-radius: 16px; box-shadow: 0 8px 0 rgba(0,0,0,.35); }
.cell { position: relative; aspect-ratio: 1.25; display: flex; align-items: center; justify-content: center; padding: 4px; cursor: pointer; font-family: var(--body); font-weight: 900; font-size: 14px; line-height: 1.15;
  color: var(--night); background: #fff; border: 2px solid #c8ccdf; border-radius: 10px; overflow-wrap: anywhere; isolation: isolate; }
.cell:hover { border-color: var(--coil); }
.cell.daubed::after { content: ""; position: absolute; inset: 12%; z-index: -1; border-radius: 50%; background: rgba(255,107,107,.7); animation: daub .25s cubic-bezier(.3, 1.8, .5, 1); }
.cell.free { background: #fff1c2; }
.cell.free::after { background: rgba(78,205,196,.55); animation: none; }
.cell.inline { background: #dff7f4; border-color: var(--coil); }
.cell.nope { animation: nope .35s; }
@keyframes daub { from { transform: scale(2); opacity: 0; } }
@keyframes nope { 25% { transform: translateX(-6px); background: #ffd6d6; } 75% { transform: translateX(6px); } }
.controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#need { font-weight: 800; opacity: .8; }
#nodBtn, #bingoBtn { cursor: pointer; font-family: var(--body); border: 4px solid var(--night); box-shadow: 0 6px 0 var(--night); }
#nodBtn { display: flex; flex-direction: column; align-items: center; font-size: 30px; line-height: 1.1; padding: 6px 18px; border-radius: 18px; background: #3d4266; color: var(--moon); }
#nodBtn small { font-size: 12px; font-weight: 900; }
#nodBtn.ready { background: var(--itch); color: var(--night); animation: ready .3s ease-in-out infinite alternate; }
#bingoBtn { font-family: var(--comic); font-size: 30px; letter-spacing: .06em; padding: 8px 26px; border-radius: 18px; background: #5a5f86; color: var(--moon); }
#bingoBtn.ready { background: var(--sheet); color: #fff; animation: ready .35s ease-in-out infinite alternate; }
#nodBtn:active, #bingoBtn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--night); }
@keyframes ready { from { transform: scale(1); } to { transform: scale(1.08); } }
#hint { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: max-content; max-width: 88vw; background: rgba(30,34,53,.95);
  border: 3px dashed var(--moon); border-radius: 16px; padding: 10px 18px; font-weight: 800; font-size: 16px; text-align: center; pointer-events: none; z-index: 2; }
.toast { position: fixed; left: 50%; top: 18%; transform: translate(-50%, -10px); opacity: 0; pointer-events: none; z-index: 4; max-width: 90vw; text-align: center;
  font-weight: 900; font-size: 16px; padding: 8px 16px; border-radius: 14px; border: 3px solid var(--night); transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.good { background: var(--coil); color: var(--night); }
.toast.bad { background: var(--bite); color: #fff; }
.big-word { position: fixed; left: 50%; top: 45%; transform: translate(-50%, -50%) scale(0); z-index: 5; pointer-events: none; font-family: var(--comic); font-size: clamp(64px, 16vw, 150px);
  color: var(--itch); text-shadow: var(--outline), 8px 8px 0 var(--sheet); letter-spacing: .04em; white-space: nowrap; }
.big-word.show { animation: big .5s cubic-bezier(.3, 1.8, .5, 1) forwards; }
.big-word.bad { color: var(--moon); text-shadow: var(--outline), 8px 8px 0 var(--bite); }
@keyframes big { to { transform: translate(-50%, -50%) scale(1) rotate(-6deg); } }

@media (max-width: 560px) {
  .caption { font-size: 16px; }
  #who { min-width: 56px; }
  #who .face { font-size: 30px; }
  .cell { font-size: 11.5px; padding: 3px; aspect-ratio: 1.05; }
  #grid { gap: 4px; padding: 6px; }
  #bingoBtn { font-size: 24px; padding: 6px 18px; }
  .att .bar { width: 54px; }
}
@media (prefers-reduced-motion: reduce) {
  .mascot svg, .cursor, #nodBtn.ready, #bingoBtn.ready, .cell.daubed::after, .cell.nope, #play.stare, #speaker.pop { animation: none; }
  .big-word.show { animation: none; transform: translate(-50%, -50%) scale(1); }
}
