* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%; overflow: hidden;
  background: #ffe9c7;
  font-family: "Arial Rounded MT Bold", "Chalkboard SE", "Comic Sans MS", system-ui, sans-serif;
  color: #3b2a4a;
  user-select: none; -webkit-user-select: none;
  cursor: default;
}
#c { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; }
#hud { position: fixed; inset: 0; pointer-events: none; }

/* ---------- player badges ---------- */
.badges {
  position: absolute; top: 1.4vh; left: 50%; transform: translateX(-50%);
  display: flex; gap: 1.2vw;
}
.badge {
  display: flex; align-items: center; gap: .5vw;
  padding: .5vh 1.1vw .5vh .5vw; border-radius: 99px;
  background: rgba(255,255,255,.88); box-shadow: 0 .4vh 0 rgba(0,0,0,.15);
  font-size: 2.6vh; min-width: 7vw;
  transition: transform .2s;
}
.badge.empty { opacity: .45; background: rgba(255,255,255,.5); }
.badge .dot {
  width: 4.4vh; height: 4.4vh; border-radius: 50%;
  display: grid; place-items: center; font-size: 2.5vh; color: #fff;
  border: .4vh solid rgba(255,255,255,.9);
  box-shadow: inset 0 -.5vh 0 rgba(0,0,0,.18);
}
.badge .score { font-size: 3vh; min-width: 2ch; text-align: center; }
.badge.pop { transform: scale(1.18); }

/* ---------- timer ---------- */
.timer {
  position: absolute; top: 9.5vh; left: 50%; transform: translateX(-50%);
  width: 34vw; height: 2.6vh; border-radius: 99px;
  background: rgba(255,255,255,.7); overflow: hidden;
  box-shadow: 0 .3vh 0 rgba(0,0,0,.12);
  display: none;
}
.timer.on { display: block; }
.timer .fill {
  height: 100%; width: 100%; border-radius: 99px;
  background: linear-gradient(90deg, #ff7aa8, #ffb04d, #ffe14d);
  transition: width .2s linear;
}
.timer.hurry .fill { background: linear-gradient(90deg, #ff3d3d, #ff8a3d); animation: pulse .5s infinite alternate; }
@keyframes pulse { to { filter: brightness(1.3); } }

/* ---------- team goal ---------- */
.goal {
  position: absolute; bottom: 3vh; left: 50%; transform: translateX(-50%);
  padding: 1vh 2.4vw; border-radius: 99px;
  background: rgba(255,255,255,.9); font-size: 5vh;
  box-shadow: 0 .5vh 0 rgba(0,0,0,.15);
  display: none; white-space: nowrap;
  transition: transform .15s;
}
.goal.on { display: block; }
.goal.pop { transform: translateX(-50%) scale(1.15); }

/* ---------- banner ---------- */
.banner {
  position: absolute; top: 34%; left: 0; right: 0; text-align: center;
  font-size: 12vh; color: #fff;
  -webkit-text-stroke: .5vh #3b2a4a; paint-order: stroke fill;
  text-shadow: 0 1vh 0 rgba(0,0,0,.2);
  opacity: 0; transform: scale(.4);
  transition: opacity .2s, transform .35s cubic-bezier(.3,1.8,.5,1);
}
.banner.on { opacity: 1; transform: scale(1); }
.banner.small { font-size: 7vh; }

/* ---------- cards (intro, results, pause, boot) ---------- */
.card {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%) scale(.7); opacity: 0;
  min-width: 46vw; max-width: 80vw;
  padding: 4vh 4vw; border-radius: 5vh;
  background: rgba(255,255,255,.95);
  box-shadow: 0 1.4vh 0 rgba(0,0,0,.15), 0 0 0 1vh rgba(255,255,255,.5);
  text-align: center;
  transition: opacity .25s, transform .4s cubic-bezier(.3,1.6,.5,1);
}
.card.on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.card .icon { font-size: 16vh; line-height: 1.1; }
.card h1 { margin: .5vh 0 1vh; font-size: 8vh; letter-spacing: .05em; }
.card p { margin: 1vh 0; font-size: 4vh; }
.card .stars { font-size: 11vh; letter-spacing: 1vw; }
.card .stars span { display: inline-block; animation: starIn .5s cubic-bezier(.3,1.8,.5,1) both; }
.card .stars span.off { filter: grayscale(1) opacity(.3); }
@keyframes starIn { from { transform: scale(0) rotate(-90deg); } }
.awards { display: flex; gap: 1.5vw; justify-content: center; flex-wrap: wrap; margin: 2vh 0; }
.award {
  padding: 1.2vh 1.4vw; border-radius: 3vh; color: #fff; font-size: 3vh;
  min-width: 14vw; box-shadow: inset 0 -.6vh 0 rgba(0,0,0,.18);
  animation: starIn .5s cubic-bezier(.3,1.8,.5,1) both;
}
.award .big { font-size: 7vh; display: block; }
.buttons { display: flex; gap: 3vw; justify-content: center; font-size: 4vh; margin-top: 2vh; }
.btn { display: inline-flex; align-items: center; gap: .8vw; }
.glyph {
  display: inline-grid; place-items: center;
  width: 5.5vh; height: 5.5vh; border-radius: 50%;
  background: #2a2340; font-size: 3.4vh; font-weight: bold;
}
.glyph.x { color: #8fb4ff; }
.glyph.o { color: #ff7a8a; }
.glyph.sq { color: #ff9ad8; }
.glyph.tri { color: #6fe0b0; }
.glyph.menu { color: #fff; font-size: 3vh; border-radius: 1.2vh; }

/* grown-up mouse exit, top-left; kids use Options ☰ → ◯ Quit */
.exit {
  position: fixed; left: 1.2vw; top: 1.4vh; z-index: 5;
  font: inherit; font-size: 2.6vh; color: #3b2a4a;
  padding: .7vh 1.2vw; border: 0; border-radius: 99px;
  background: rgba(255,255,255,.75); box-shadow: 0 .4vh 0 rgba(0,0,0,.15);
  cursor: pointer; opacity: .6; transition: opacity .2s, transform .15s;
}
.exit:hover { opacity: 1; transform: scale(1.06); }

/* ---------- hub hints ---------- */
.hint {
  position: absolute; bottom: 3vh; left: 50%; transform: translateX(-50%);
  font-size: 3.6vh; padding: 1vh 2vw; border-radius: 99px;
  background: rgba(255,255,255,.85); display: none; gap: 2.4vw;
  white-space: nowrap; align-items: center;
}
.hint.on { display: flex; }
.hint .join { animation: bob 1s infinite alternate ease-in-out; }
@keyframes bob { to { transform: translateY(-.6vh); } }

.title {
  position: absolute; top: 9vh; left: 0; right: 0; text-align: center;
  font-size: 9vh; color: #fff; letter-spacing: .06em;
  -webkit-text-stroke: .5vh #3b2a4a; paint-order: stroke fill;
  text-shadow: 0 .9vh 0 rgba(0,0,0,.2);
  display: none;
}
.title.on { display: block; }
.title span { display: inline-block; animation: wob 1.6s infinite ease-in-out; }
@keyframes wob { 50% { transform: translateY(-1vh) rotate(4deg); } }

.mute {
  position: absolute; right: 1.5vw; bottom: 2vh; font-size: 3.5vh; opacity: .55;
}
.mute.ask { opacity: 1; font-size: 2.6vh; padding: .8vh 1.4vw; border-radius: 99px; background: #fff; box-shadow: 0 .4vh 0 rgba(0,0,0,.15); }

.boot { pointer-events: auto; cursor: pointer; }
.countdown {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 30vh; color: #fff;
  -webkit-text-stroke: 1vh #3b2a4a; paint-order: stroke fill;
  opacity: 0;
}
.countdown.go { animation: count .7s ease-out; }
@keyframes count { 0% { opacity: 0; transform: scale(2.2); } 20% { opacity: 1; transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: scale(.8); } }
/* coins earned on the results card (js/main.js payCoins) */
.coins { display: flex; gap: 1.2vw; justify-content: center; flex-wrap: wrap; margin: 0 0 1vh; }
.coin { padding: .8vh 1.4vw; border-radius: 3vh; color: #fff; font-size: 3vh; display: flex; gap: .8vw; align-items: center;
  box-shadow: inset 0 -.5vh 0 rgba(0,0,0,.18); animation: starIn .5s cubic-bezier(.3,1.8,.5,1) both; }
.coin b { color: #fff6c2; text-shadow: 0 .3vh 0 rgba(0,0,0,.25); }
.coin span { opacity: .9; font-size: 2.4vh; }
.coin span::before { content: '= '; }
.coin .tip { background: rgba(255,255,255,.28); border-radius: 2vh; padding: .2vh .8vw; }
.coin .tip::before { content: ''; }
