/* Game UI (loaded only on games / picker / bingo pages) */
.game-shell {
  width: min(520px, 100%);
  margin-inline: auto;
}
.game-frame {
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  border: 4px solid var(--pink);
  background: var(--ink);
  box-shadow:
    0 0 0 6px var(--navy),
    0 0 0 9px var(--cyan),
    0 0 70px rgba(248, 89, 241, 0.4);
}
#pc {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2/3;
  touch-action: none;
  cursor: none;
  background: var(--ink);
}
.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  text-align: center;
  padding: 24px;
  background: radial-gradient(ellipse at center, rgba(14, 5, 76, 0.86), rgba(5, 2, 32, 0.94));
}
.overlay[hidden] {
  display: none;
}
.overlay h2 {
  font-size: clamp(2.2rem, 8vw, 3.4rem);
}
.overlay p {
  max-width: 30ch;
  color: #dcd8f7;
}
.overlay .big {
  font-family: var(--display);
  font-size: clamp(3rem, 14vw, 5.5rem);
  color: var(--yellow);
  text-shadow: 0 0 24px rgba(248, 192, 0, 0.6);
  line-height: 1;
}
.overlay .row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: center;
  margin-top: 20px;
  font-size: 0.92rem;
  color: #cfcbef;
}
.legend span b {
  font-weight: 800;
  color: var(--yellow);
}
.game-help {
  margin-top: 14px;
  text-align: center;
  font-family: var(--label);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--purple);
}

/* quiz */
.quiz-card {
  background: linear-gradient(160deg, var(--navy-2), var(--ink));
  border: 4px solid var(--cyan);
  border-radius: 26px;
  padding: clamp(20px, 4vw, 34px);
  box-shadow: 0 0 60px rgba(0, 192, 248, 0.25);
  text-align: center;
  display: grid;
  gap: 18px;
}
.quiz-top {
  display: flex;
  justify-content: space-between;
  font-family: var(--label);
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--purple);
  letter-spacing: 0.06em;
}
.quiz-bar {
  height: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}
.quiz-bar b {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--pink), var(--cyan));
  transition: width 0.4s;
}
.emoji-clue {
  font-size: clamp(3.4rem, 15vw, 6rem);
  line-height: 1.1;
  letter-spacing: 0.08em;
  filter: drop-shadow(0 0 18px rgba(248, 89, 241, 0.5));
  min-height: 1.2em;
}
.quiz-q {
  font-family: var(--display);
  font-size: 1.5rem;
  color: var(--yellow);
}
.opts {
  display: grid;
  gap: 12px;
}
@media (min-width: 560px) {
  .opts {
    grid-template-columns: 1fr 1fr;
  }
}
.opt {
  font-family: var(--label);
  font-weight: 800;
  font-size: 1rem;
  padding: 1em 1.1em;
  border-radius: 16px;
  border: 3px solid var(--purple);
  background: var(--navy);
  color: var(--white);
  cursor: pointer;
  transition:
    transform 0.15s,
    border-color 0.2s,
    background 0.2s;
  text-align: center;
}
.opt:hover:not([disabled]) {
  transform: translateY(-3px);
  border-color: var(--pink);
}
.opt.right {
  border-color: #37e08a;
  background: rgba(55, 224, 138, 0.16);
  color: #c9ffe4;
}
.opt.wrong {
  border-color: var(--red);
  background: rgba(226, 65, 47, 0.2);
}
.opt[disabled] {
  cursor: default;
}
.quiz-feedback {
  min-height: 1.6em;
  font-family: var(--display);
  font-size: 1.35rem;
}
.quiz-feedback.good {
  color: #37e08a;
}
.quiz-feedback.bad {
  color: var(--red);
}
.quiz-end {
  display: grid;
  gap: 14px;
  justify-items: center;
}
.quiz-end .big {
  font-family: var(--display);
  font-size: clamp(3.4rem, 14vw, 5.5rem);
  color: var(--yellow);
  text-shadow: 0 0 24px rgba(248, 192, 0, 0.6);
  line-height: 1;
}

/* picker */
.picker {
  display: grid;
  gap: 26px;
}
.picker fieldset {
  border: 0;
  display: grid;
  gap: 12px;
}
.picker legend {
  font-family: var(--display);
  font-size: 1.6rem;
  color: var(--cyan);
  margin-bottom: 8px;
  text-shadow: 0 0 16px rgba(0, 192, 248, 0.4);
}
.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.choice {
  position: relative;
}
.choice input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}
.choice span {
  display: inline-block;
  font-family: var(--label);
  font-weight: 800;
  padding: 0.7em 1.2em;
  border-radius: 999px;
  border: 3px solid var(--purple);
  background: var(--navy);
  color: var(--white);
  transition: all 0.2s;
}
.choice input:checked + span {
  border-color: var(--yellow);
  background: rgba(248, 192, 0, 0.16);
  color: var(--yellow);
  box-shadow: 0 0 22px rgba(248, 192, 0, 0.35);
}
.choice input:focus-visible + span {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}
.slot {
  position: relative;
  border-radius: 26px;
  border: 4px solid var(--yellow);
  background: linear-gradient(160deg, var(--navy-2), var(--ink));
  padding: clamp(22px, 5vw, 40px);
  text-align: center;
  box-shadow: 0 0 60px rgba(248, 192, 0, 0.22);
  display: grid;
  gap: 12px;
  justify-items: center;
  min-height: 250px;
  align-content: center;
}
.slot .ticker {
  font-family: var(--display);
  font-size: clamp(2rem, 7vw, 3.4rem);
  line-height: 1.05;
  color: var(--white);
}
.slot.spin .ticker {
  color: var(--cyan);
  filter: blur(1px);
}
.slot .yr {
  font-family: var(--label);
  font-weight: 800;
  color: var(--pink);
  letter-spacing: 0.1em;
}
.slot .blurb {
  max-width: 46ch;
  color: #dcd8f7;
}
.slot .snack {
  color: var(--yellow);
  font-size: 1rem;
}
.slot .snack b {
  font-family: var(--label);
  font-weight: 800;
}

/* bingo */
.bingo {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  width: min(680px, 100%);
  margin-inline: auto;
}
.bcell {
  min-width: 0;
  overflow-wrap: anywhere;
  hyphens: auto;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 4px;
  border-radius: 14px;
  border: 3px solid var(--purple);
  background: var(--navy-2);
  color: var(--white);
  font-family: var(--label);
  font-weight: 700;
  font-size: clamp(0.5rem, 2.2vw, 0.92rem);
  line-height: 1.15;
  cursor: pointer;
  transition:
    transform 0.15s,
    background 0.2s,
    border-color 0.2s;
}
.bcell:hover {
  transform: scale(1.04);
  border-color: var(--pink);
}
.bcell.on {
  background: var(--pink);
  border-color: var(--pink);
  color: var(--royal);
  transform: rotate(-2deg);
}
.bcell.free {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--royal);
  font-family: var(--display);
  font-size: clamp(0.9rem, 3.4vw, 1.4rem);
}
.bcell.win {
  animation: winp 0.6s ease-in-out infinite alternate;
}
@keyframes winp {
  to {
    box-shadow: 0 0 26px var(--yellow);
    transform: scale(1.05);
  }
}
.bingo-msg {
  min-height: 2em;
  text-align: center;
  font-family: var(--display);
  font-size: 1.7rem;
  color: var(--yellow);
  margin-top: 16px;
}
.tools {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin: 0 0 24px;
}
@media print {
  .nav,
  .site-foot,
  .page-head,
  .tools,
  .bingo-msg,
  .no-print,
  .skip {
    display: none !important;
  }
  body {
    background: #fff;
  }
  .bcell {
    background: #fff !important;
    color: #000 !important;
    border: 2px solid #000 !important;
    transform: none !important;
    box-shadow: none !important;
  }
  .bcell.on {
    background: #ddd !important;
  }
  .print-title {
    display: block !important;
    color: #000;
    text-align: center;
    font-family: var(--display);
    font-size: 2rem;
    margin-bottom: 12px;
  }
}
.print-title {
  display: none;
}

/* character picker + sound button + nugget legend */
.snd {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--cyan);
  background: rgba(10, 4, 58, 0.8);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 0 16px rgba(0, 192, 248, 0.4);
}
.snd:hover {
  background: rgba(0, 192, 248, 0.2);
}
.chars {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.char-pick {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 10px 12px 8px;
  border-radius: 16px;
  border: 3px solid var(--purple);
  background: rgba(14, 5, 76, 0.7);
  color: #fff;
  cursor: pointer;
  font-family: var(--label);
  font-weight: 800;
  font-size: 0.75rem;
  transition:
    transform 0.15s,
    border-color 0.2s;
}
.char-pick img {
  height: 70px;
  width: auto;
  object-fit: contain;
}
.char-pick:hover {
  transform: translateY(-3px);
}
.char-pick.on {
  border-color: var(--yellow);
  background: rgba(248, 192, 0, 0.14);
  box-shadow: 0 0 22px rgba(248, 192, 0, 0.35);
}
.legend .nug {
  display: inline-block;
  width: 20px;
  height: 18px;
  vertical-align: -3px;
  border-radius: 50% 50% 45% 55%;
  background: #fff4c9;
  box-shadow:
    0 0 0 2px #e6b04a,
    0 0 10px rgba(248, 192, 0, 0.6);
}
.legend .nug.gold {
  background: radial-gradient(circle at 35% 35%, #fff7b0, #f0a800);
  box-shadow:
    0 0 0 2px #fff,
    0 0 12px #f8c000;
}
#pc {
  cursor: none;
}

/* ---------- Snack Stack ---------- */
#stack {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2/3;
  touch-action: none;
  background: var(--ink);
  cursor: pointer;
}
/* ---------- Cinema Tycoon ---------- */
.tycoon {
  background: linear-gradient(160deg, var(--navy-2), var(--ink));
  border: 4px solid var(--yellow);
  border-radius: 26px;
  padding: clamp(18px, 4vw, 30px);
  box-shadow: 0 0 50px rgba(248, 192, 0, 0.22);
}
.ty-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.ty-rank {
  font-family: var(--label);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pink);
}
.ty-count {
  font-family: var(--display);
  font-size: clamp(1.8rem, 6vw, 2.8rem);
  color: #fff;
  line-height: 1.1;
}
.ty-count b {
  font-weight: 400;
  color: var(--yellow);
}
.ty-rate {
  color: #cfcbef;
  font-size: 0.95rem;
}
.ty-big {
  position: relative;
  width: clamp(130px, 30vw, 180px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 4px solid var(--pink);
  background: radial-gradient(circle, #2a1290, var(--ink));
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 0 30px rgba(248, 89, 241, 0.5);
  transition: transform 0.08s;
}
.ty-big img {
  width: 70%;
  pointer-events: none;
}
.ty-big:active {
  transform: scale(0.94);
}
.ty-big.pop img {
  animation: typop 0.18s;
}
@keyframes typop {
  50% {
    transform: scale(1.12) rotate(-4deg);
  }
}
.ty-float {
  position: absolute;
  pointer-events: none;
  font-family: var(--display);
  font-size: 1.4rem;
  color: var(--yellow);
  animation: tyfloat 0.8s ease-out forwards;
  transform: translate(-50%, -50%);
}
@keyframes tyfloat {
  to {
    opacity: 0;
    transform: translate(-50%, -160%);
  }
}
.ty-welcome {
  margin-top: 14px;
  padding: 0.7em 1em;
  border-radius: 12px;
  background: rgba(0, 192, 248, 0.15);
  color: #fff;
}
.ty-shop {
  list-style: none;
  display: grid;
  gap: 10px;
  margin-top: 22px;
}
.ty-up {
  width: 100%;
  display: grid;
  grid-template-columns: 52px 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 0 12px;
  text-align: left;
  padding: 10px 14px;
  border-radius: 16px;
  border: 3px solid var(--cyan);
  background: var(--navy);
  color: #fff;
  cursor: pointer;
  transition:
    transform 0.12s,
    opacity 0.2s;
}
.ty-up:hover:not([disabled]) {
  transform: translateY(-2px);
}
.ty-up[disabled] {
  opacity: 0.55;
  cursor: default;
  border-color: var(--purple);
}
.ty-up.locked {
  filter: grayscale(1) brightness(0.6);
}
.ty-up img {
  grid-row: 1/3;
  width: 52px;
  height: 52px;
  object-fit: contain;
}
.ty-name {
  font-family: var(--display);
  font-size: 1.25rem;
}
.ty-name em {
  font-style: normal;
  font-family: var(--label);
  font-weight: 800;
  font-size: 0.8rem;
  color: var(--pink);
  margin-left: 6px;
}
.ty-desc {
  grid-column: 2;
  font-size: 0.85rem;
  color: #cfcbef;
}
.ty-cost {
  grid-row: 1/3;
  grid-column: 3;
  font-family: var(--label);
  font-weight: 800;
  color: var(--yellow);
  white-space: nowrap;
}
.ty-reset {
  background: none;
  border: 0;
  color: var(--purple);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
}
.tycoon button {
  font-family: inherit;
}
