@font-face {
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../BingoBloom/assets/fonts/NunitoSans-Regular.woff2") format("woff2");
}

@font-face {
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../BingoBloom/assets/fonts/NunitoSans-ExtraBold.woff2") format("woff2");
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../BingoBloom/assets/fonts/CormorantGaramond-Bold.woff2") format("woff2");
}

:root {
  --font-body: "Nunito Sans", Arial, sans-serif;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --bg: #f5f7f2;
  --paper: #fffef9;
  --ink: #2e3138;
  --muted: #66707b;
  --line: #d8ded8;
  --line-strong: #bec8c1;
  --sage: #9dbb9d;
  --teal: #2f8f7a;
  --coral: #dd6654;
  --indigo: #4f75b8;
  --gold: #d49b3d;
  --plum: #b95f89;
  --shadow: 0 20px 54px rgba(48, 55, 64, 0.12);
  --soft-shadow: 0 10px 24px rgba(48, 55, 64, 0.09);
  --game-color: var(--teal);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  background:
    linear-gradient(90deg, rgba(79, 117, 184, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(47, 143, 122, 0.07) 1px, transparent 1px),
    linear-gradient(135deg, #f8faf4 0%, #eef7f4 38%, #fff6ef 100%);
  background-size: 36px 36px, 36px 36px, auto;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    repeating-linear-gradient(120deg, rgba(255, 255, 255, 0.34) 0 2px, transparent 2px 20px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0));
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
}

button,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 15px;
  color: #fffef9;
  background: var(--game-color);
  border: 1px solid color-mix(in srgb, var(--game-color), #111 14%);
  border-radius: 7px;
  box-shadow: 0 10px 18px color-mix(in srgb, var(--game-color), transparent 78%);
  cursor: pointer;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

button:hover,
.button-link:hover,
button:focus-visible,
.button-link:focus-visible {
  box-shadow: 0 14px 24px color-mix(in srgb, var(--game-color), transparent 72%);
  filter: saturate(1.06);
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.25);
  opacity: 0.45;
  transform: none;
}

.ghost-button,
.secondary-link {
  color: var(--ink);
  background: #fff;
  border-color: var(--line-strong);
  box-shadow: none;
}

.danger-button {
  --game-color: var(--coral);
}

.site-shell {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 0 16px;
}

.site-header .brand {
  flex: none;
}

.site-header-actions {
  display: flex;
  flex: 1;
  min-width: 0;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(221, 102, 84, 0.9), rgba(79, 117, 184, 0.88)),
    var(--teal);
  border-radius: 8px;
  box-shadow: var(--soft-shadow);
  font-weight: 800;
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  font-size: 17px;
  line-height: 1;
}

.brand-copy span,
.nav-link,
.eyebrow,
.panel-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

/* All seventeen games sit in one row that scrolls sideways when it overflows. */
.site-nav {
  display: flex;
  flex: 1;
  min-width: 0;
  gap: 6px;
  padding: 4px 2px;
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent);
}

.site-nav .nav-link {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 7px 11px;
}




.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 9px 10px;
  color: #48515b;
  background: rgba(255, 254, 249, 0.74);
  border: 1px solid rgba(216, 222, 216, 0.82);
  border-radius: 7px;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.is-active {
  color: var(--ink);
  border-color: color-mix(in srgb, var(--game-color), #fff 45%);
  box-shadow: 0 8px 16px rgba(48, 55, 64, 0.08);
}

.home-hero,
.game-hero,
.surface {
  background: rgba(255, 254, 249, 0.92);
  border: 1px solid rgba(216, 222, 216, 0.86);
  box-shadow: var(--shadow);
}

.home-hero,
.game-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.58fr);
  gap: 30px;
  align-items: center;
  min-height: 380px;
  padding: 32px;
}

.hero-copy {
  display: grid;
  gap: 15px;
}

.eyebrow,
.panel-label {
  margin: 0;
  color: var(--game-color);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-variant-numeric: lining-nums;
  letter-spacing: 0;
  text-wrap: balance;
}

h1 {
  max-width: 760px;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 0.98;
  overflow-wrap: anywhere;
}

/* Chinese headings fall back to a system face; give them CJK proportions. */
:root:lang(zh) h1 {
  font-size: clamp(34px, 4.4vw, 60px);
  line-height: 1.12;
}

.hero-lede,
.game-description,
.card-copy,
.empty-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.62;
}

.hero-lede {
  max-width: 690px;
  font-size: 18px;
}

.hero-actions,
.action-row,
.mini-actions,
.preview-actions,
.score-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-badges,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-badges span,
.tag-row span,
.score-pill,
.progress-pill {
  padding: 8px 11px;
  color: #4b535c;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.hero-art {
  isolation: isolate;
  position: relative;
  min-height: 295px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(47, 143, 122, 0.1), rgba(221, 102, 84, 0.12)),
    #fff;
  border: 1px solid var(--line);
  box-shadow: var(--soft-shadow);
}

.hero-art::before {
  position: absolute;
  inset: 15px;
  z-index: 2;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.76);
  pointer-events: none;
}

.hero-art::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
  padding: 9px 0;
  color: color-mix(in srgb, var(--game-color), #111 28%);
  background: rgba(255, 254, 249, 0.78);
  border-top: 1px solid rgba(255, 255, 255, 0.82);
  content: attr(data-status);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-align: center;
  text-transform: uppercase;
  animation: ticker-soft 4.8s ease-in-out infinite alternate;
}

.hero-art img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.78;
  transform: scale(1.03);
  animation: watercolor-breath 11s ease-in-out infinite alternate;
}

.sample-sheet {
  position: absolute;
  left: 22px;
  top: 24px;
  z-index: 1;
  width: 210px;
  min-height: 250px;
  padding: 18px;
  background: rgba(255, 254, 249, 0.93);
  border: 1px solid var(--line-strong);
  box-shadow: 0 20px 36px rgba(48, 55, 64, 0.13);
  animation: paper-float 7s ease-in-out infinite;
}

.sample-sheet strong {
  display: block;
  margin-bottom: 14px;
  font-family: var(--font-display);
  font-size: 27px;
  line-height: 1.02;
}

.sample-lines {
  display: grid;
  gap: 8px;
}

.sample-lines i {
  display: block;
  height: 10px;
  background: color-mix(in srgb, var(--game-color), #fff 78%);
  border-radius: 999px;
  transform-origin: left center;
  animation: line-breathe 3.8s ease-in-out infinite;
}

.sample-lines i:nth-child(2n) {
  animation-delay: 420ms;
}

.sample-lines i:nth-child(3n) {
  animation-delay: 820ms;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.editorial-overview {
  margin-top: 48px;
  padding: clamp(24px, 4vw, 44px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.78);
}

.editorial-overview > h2 {
  max-width: 800px;
  margin: 8px 0 18px;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.2vw, 2.7rem);
  line-height: 1.08;
}

.editorial-overview > p:last-child {
  max-width: 900px;
  color: var(--muted);
  line-height: 1.8;
}

.editorial-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.editorial-grid article {
  padding: 20px;
  border-radius: 20px;
  background: var(--paper);
}

.editorial-grid h3 {
  margin: 0 0 8px;
}

.editorial-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.editorial-guide {
  max-width: 1040px;
  margin: 56px auto 24px;
  padding: clamp(24px, 4vw, 46px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 18px 48px rgba(67, 52, 38, 0.08);
}

.editorial-guide h2 {
  max-width: 820px;
  margin: 8px 0 16px;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.2vw, 2.8rem);
  line-height: 1.08;
}

.editorial-guide h3 {
  margin: 28px 0 8px;
  font-size: 1.12rem;
}

.editorial-guide p,
.editorial-guide li {
  color: var(--muted);
  line-height: 1.78;
}

.editorial-guide ol {
  padding-left: 1.35rem;
}

.guide-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 4px;
}

.guide-meta span {
  display: inline-flex;
  gap: 6px;
  padding: 9px 12px;
  border-radius: 999px;
  background: #eef3ee;
  color: var(--ink);
  font-size: 0.9rem;
}

@media (max-width: 760px) {
  .editorial-grid {
    grid-template-columns: 1fr;
  }
}

.game-card {
  display: grid;
  grid-template-rows: 168px auto;
  min-height: 100%;
  overflow: hidden;
  background: rgba(255, 254, 249, 0.95);
  border: 1px solid rgba(216, 222, 216, 0.9);
  box-shadow: var(--soft-shadow);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.game-card:hover,
.game-card:focus-visible {
  border-color: color-mix(in srgb, var(--card-color), #fff 48%);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.game-card-media {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--card-color), #fff 82%), rgba(255, 255, 255, 0.82)),
    #fff;
}

.game-card-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-card-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.game-card h2 {
  color: var(--ink);
  font-size: 25px;
  line-height: 1.02;
}

.game-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.48;
}

.game-card-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 11px;
  color: color-mix(in srgb, var(--card-color), #111 18%);
  background: color-mix(in srgb, var(--card-color), #fff 88%);
  border: 1px solid color-mix(in srgb, var(--card-color), #fff 62%);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.game-page {
  padding-bottom: 36px;
}

.game-layout {
  display: grid;
  grid-template-columns: minmax(270px, 0.33fr) minmax(0, 0.67fr);
  gap: 18px;
  margin-top: 18px;
}

.surface {
  padding: 18px;
}

.control-surface {
  align-self: start;
  position: sticky;
  top: 16px;
}

.play-surface,
.preview-surface {
  min-width: 0;
}

.preview-surface {
  grid-column: 1 / -1;
}

.action-dock {
  position: fixed;
  left: 24px;
  bottom: 22px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: min(470px, calc(100vw - 48px));
  padding: 12px 14px 12px 16px;
  color: var(--ink);
  background: rgba(255, 254, 249, 0.94);
  border: 1px solid color-mix(in srgb, var(--game-color), #fff 58%);
  box-shadow: 0 20px 45px rgba(48, 55, 64, 0.16);
  opacity: 0;
  transform: translateY(28px);
  pointer-events: none;
  transition: opacity 260ms ease, transform 260ms ease;
}

.action-dock.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.action-dock span {
  display: block;
  color: var(--game-color);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.action-dock strong {
  display: block;
  max-width: 128px;
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.action-dock nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.action-dock a,
.action-dock button {
  min-height: 40px;
  padding: 0 11px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  box-shadow: none;
  font-size: 12px;
  font-weight: 800;
}

.action-dock button:last-child {
  color: #fffef9;
  background: var(--game-color);
  border-color: color-mix(in srgb, var(--game-color), #111 14%);
}

.panel-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.panel-heading h2 {
  font-size: 31px;
  line-height: 1.05;
}

.play-status {
  display: grid;
  gap: 9px;
  margin: 0 0 14px;
  padding: 12px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--game-color), #fff 91%), rgba(255, 255, 255, 0.9)),
    #fff;
  border: 1px solid color-mix(in srgb, var(--game-color), #fff 68%);
}

.play-status-copy {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.play-status-copy strong {
  color: var(--ink);
}

.play-status-dot {
  width: 9px;
  height: 9px;
  background: var(--game-color);
  border-radius: 999px;
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--game-color), transparent 84%);
  animation: status-pulse 1.8s ease-in-out infinite;
}

.play-status-meter {
  height: 7px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.play-status-meter span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--game-color), var(--gold));
  border-radius: inherit;
  transition: width 240ms ease-out;
}

.control-grid {
  display: grid;
  gap: 13px;
}

label {
  display: grid;
  gap: 7px;
  color: #48515b;
  font-size: 13px;
  font-weight: 800;
}

input[type="text"],
input[type="number"],
select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.stat-strip div {
  padding: 12px;
  background: color-mix(in srgb, var(--game-color), #fff 88%);
  border: 1px solid color-mix(in srgb, var(--game-color), #fff 66%);
}

.stat-strip strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
}

.stat-strip span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.seed-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.how-play-card {
  display: grid;
  gap: 11px;
  padding: 13px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--game-color), #fff 90%), rgba(255, 255, 255, 0.92)),
    #fff;
  border: 1px solid color-mix(in srgb, var(--game-color), #fff 62%);
}

.how-play-card summary {
  display: grid;
  gap: 3px;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
}

.how-play-card summary::-webkit-details-marker {
  display: none;
}

.how-play-card summary span {
  color: var(--game-color);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.how-play-card summary strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 23px;
  line-height: 1;
}

.how-play-card p,
.how-play-mini li {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.how-play-card p {
  margin: 0;
}

.how-play-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.how-play-meta span {
  padding: 5px 7px;
  color: color-mix(in srgb, var(--game-color), #111 18%);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid color-mix(in srgb, var(--game-color), #fff 70%);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.how-play-mini {
  display: grid;
  gap: 6px;
}

.how-play-mini strong {
  color: var(--ink);
  font-size: 12px;
  text-transform: uppercase;
}

.how-play-mini ul,
.how-play-mini ol {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 18px;
}

.emoji-list,
.mission-list,
.feud-board,
.word-list,
.slot-grid,
.quiz-list,
.choice-list,
.scramble-list,
.know-list,
.escape-list {
  display: grid;
  gap: 10px;
}

.emoji-row,
.mission-item,
.answer-row,
.slot-row,
.word-chip,
.quiz-card,
.choice-card,
.scramble-row,
.know-row,
.escape-card,
.mystery-card,
.solution-card {
  border: 1px solid var(--line);
  background: #fff;
}

.quiz-card,
.choice-card,
.scramble-row,
.know-row,
.escape-card,
.mystery-card,
.solution-card {
  padding: 14px;
}

.quiz-question,
.know-row p,
.escape-card p,
.mystery-card p,
.solution-card p {
  margin: 0;
  color: var(--ink);
  line-height: 1.5;
}

.choice-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.option-button,
.big-choice {
  min-height: 48px;
  color: var(--ink);
  background: color-mix(in srgb, var(--game-color), #fff 88%);
  border-color: color-mix(in srgb, var(--game-color), #fff 62%);
  box-shadow: none;
}

.option-button.is-selected,
.big-choice.is-selected {
  color: #fff;
  background: var(--game-color);
}

.option-button.is-correct {
  color: #fff;
  background: var(--teal);
}

.option-button.is-wrong {
  color: #fff;
  background: var(--coral);
}

.choice-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.choice-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.scramble-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.scramble-row strong {
  color: var(--game-color);
  font-size: 20px;
  letter-spacing: 2px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.scramble-row.is-correct,
.escape-card.is-correct {
  border-color: color-mix(in srgb, var(--teal), #fff 20%);
  background: color-mix(in srgb, var(--teal), #fff 91%);
}

.know-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 0.55fr) minmax(160px, 0.55fr) 74px;
  gap: 10px;
  align-items: end;
}

.know-row > span {
  color: var(--teal);
  font-weight: 800;
}

.draw-card,
.story-reader {
  display: grid;
  min-height: 190px;
  place-items: center;
  padding: 24px;
  color: var(--ink);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--game-color), #fff 88%), #fff),
    #fff;
  border: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: clamp(35px, 6vw, 62px);
  line-height: 1.08;
  text-align: center;
}

.story-reader {
  align-items: center;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.24;
}

.story-reader mark {
  padding: 0 6px;
  color: #fff;
  background: var(--game-color);
  border-radius: 6px;
}

.draw-canvas {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 12px;
  background: #fff;
  border: 1px solid var(--line-strong);
  touch-action: none;
}

.escape-card {
  display: grid;
  gap: 10px;
}

.escape-card h3,
.mystery-card h3,
.solution-card h3 {
  font-family: var(--font-body);
  font-size: 18px;
}

.escape-card details {
  color: var(--muted);
  font-size: 13px;
}

.role-select {
  margin-bottom: 12px;
}

.mystery-card,
.solution-card {
  display: grid;
  gap: 10px;
}

.solution-card {
  margin-top: 12px;
  background: color-mix(in srgb, var(--game-color), #fff 93%);
}

.emoji-row {
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px;
}

.emoji-clue {
  font-size: 28px;
  line-height: 1.1;
  text-align: center;
}

.emoji-feedback {
  min-width: 74px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

.emoji-row.is-correct {
  border-color: color-mix(in srgb, var(--teal), #fff 20%);
  background: color-mix(in srgb, var(--teal), #fff 90%);
}

.story-preview {
  min-height: 190px;
  padding: 20px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--game-color), #fff 91%), #fff),
    #fff;
  border: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.18;
}

.story-preview mark {
  padding: 0 4px;
  color: color-mix(in srgb, var(--game-color), #111 20%);
  background: rgba(255, 255, 255, 0.64);
  border-bottom: 2px solid var(--game-color);
}

.slot-row {
  display: grid;
  grid-template-columns: 135px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
}

.slot-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.mission-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 48px;
  padding: 8px 10px;
}

.mission-item button {
  width: 42px;
  min-height: 42px;
  padding: 0;
  color: var(--game-color);
  background: #fff;
  border-color: var(--line-strong);
  box-shadow: none;
}

.mission-item.is-done {
  border-color: color-mix(in srgb, var(--teal), #fff 30%);
  background: color-mix(in srgb, var(--teal), #fff 91%);
}

.mission-item.is-done button {
  color: #fff;
  background: var(--teal);
}

.progress-bar {
  height: 10px;
  overflow: hidden;
  background: #e7ece7;
  border: 1px solid var(--line);
}

.progress-bar span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--gold));
  transition: width 180ms ease;
}

.feud-stage {
  display: grid;
  gap: 14px;
}

.feud-question {
  padding: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--indigo), color-mix(in srgb, var(--indigo), #111 18%));
  border: 1px solid color-mix(in srgb, var(--indigo), #111 20%);
}

.feud-question h3 {
  font-family: var(--font-body);
  font-size: 22px;
  line-height: 1.24;
}

.answer-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 62px;
  align-items: center;
  min-height: 48px;
  overflow: hidden;
}

.answer-row button {
  min-height: 48px;
  border-radius: 0;
  box-shadow: none;
}

.answer-text {
  padding: 0 14px;
  font-weight: 800;
}

.answer-points {
  display: grid;
  height: 100%;
  place-items: center;
  color: #fff;
  background: var(--indigo);
  font-weight: 800;
}

.answer-row:not(.is-open) .answer-text,
.answer-row:not(.is-open) .answer-points {
  color: transparent;
  text-shadow: 0 0 9px rgba(46, 49, 56, 0.3);
}

.team-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.team-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
}

.team-score {
  font-family: var(--font-display);
  font-size: 46px;
  line-height: 1;
}

.word-search-wrap {
  display: grid;
  grid-template-columns: minmax(330px, 1fr) minmax(190px, 0.35fr);
  gap: 16px;
  align-items: start;
}

.letter-grid {
  display: grid;
  gap: 3px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line-strong);
}

.letter-cell {
  aspect-ratio: 1;
  min-height: 0;
  padding: 0;
  color: var(--ink);
  background: #f8faf8;
  border: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  font-size: clamp(12px, 1.8vw, 18px);
}

.letter-cell.is-selected {
  color: #fff;
  background: var(--gold);
}

.letter-cell.is-found {
  color: #fff;
  background: var(--teal);
}

.word-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.word-chip {
  width: 100%;
  min-height: 42px;
  padding: 8px;
  color: var(--ink);
  background: #fff;
  border-color: var(--line);
  box-shadow: none;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.word-chip:hover,
.word-chip:focus-visible {
  color: var(--ink);
  background: color-mix(in srgb, var(--game-color), #fff 88%);
  border-color: color-mix(in srgb, var(--game-color), #fff 35%);
  box-shadow: 0 8px 18px rgba(48, 55, 64, 0.08);
}

.word-chip.is-target {
  color: #fff;
  background: var(--gold);
  border-color: var(--gold);
}

.word-chip.is-found {
  color: #fff;
  background: var(--teal);
  border-color: var(--teal);
}

.word-chip:disabled {
  cursor: default;
  opacity: 1;
  transform: none;
}

.preview-frame {
  display: grid;
  min-height: 420px;
  place-items: center;
  padding: 18px;
  overflow: auto;
  background:
    linear-gradient(90deg, rgba(79, 117, 184, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(47, 143, 122, 0.05) 1px, transparent 1px),
    rgba(255, 255, 255, 0.64);
  background-size: 26px 26px;
  border: 1px solid var(--line);
}

.preview-frame .print-page {
  width: min(100%, 780px);
  margin: 0;
  box-shadow: 0 16px 32px rgba(48, 55, 64, 0.13);
  transform-origin: top center;
}

.print-area {
  display: none;
}

.print-page {
  position: relative;
  min-height: 10.5in;
  margin: 0 auto 22px;
  padding: 0.34in;
  color: #2f3137;
  background: #fffefb;
  border: 1px solid #d8ded8;
}

.print-page::before {
  position: absolute;
  inset: 0.17in;
  content: "";
  border: 1px solid #dfe5df;
  pointer-events: none;
}

.print-content {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
}

.print-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 78px;
  gap: 12px;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 2px solid color-mix(in srgb, var(--game-color), #fff 38%);
}

.print-header h2 {
  font-size: 34px;
  line-height: 1.02;
}

.print-header p {
  margin: 6px 0 0;
  color: #68717a;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.print-header img {
  width: 76px;
  height: 76px;
  object-fit: contain;
}

.print-logo {
  border: 1px solid #d8ded8;
  border-radius: 12px;
}

.print-icon {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  color: #fff;
  background: var(--game-color);
  border-radius: 12px;
  font-size: 24px;
  font-weight: 800;
}

.print-how-hero {
  display: grid;
  gap: 7px;
  padding: 18px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--game-color), #fff 88%), rgba(255, 255, 255, 0.94)),
    #fff;
  border: 1px solid color-mix(in srgb, var(--game-color), #fff 62%);
}

.print-how-hero .panel-label {
  margin: 0;
}

.print-how-hero h3 {
  color: #2f3137;
  font-family: var(--font-display);
  font-size: 32px;
  line-height: 1;
}

.print-how-hero p:last-child {
  max-width: 62ch;
  color: #59636d;
  line-height: 1.55;
}

.print-how-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.print-how-meta div,
.print-how-grid section {
  padding: 13px;
  background: #fff;
  border: 1px solid #d8ded8;
}

.print-how-meta strong {
  display: block;
  color: var(--game-color);
  font-size: 11px;
  text-transform: uppercase;
}

.print-how-meta span {
  display: block;
  margin-top: 5px;
  color: #2f3137;
  font-weight: 800;
  line-height: 1.35;
}

.print-how-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 10px;
}

.print-how-grid h3 {
  margin-bottom: 8px;
  color: #2f3137;
  font-size: 18px;
}

.print-how-grid ul,
.print-how-grid ol {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 20px;
}

.print-how-grid li {
  color: #59636d;
  line-height: 1.45;
}

.print-grid {
  display: grid;
  gap: 10px;
}

.print-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.print-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.worksheet-row,
.answer-key-row,
.print-line,
.print-mission,
.print-answer,
.print-question,
.print-choice,
.print-card,
.print-role {
  padding: 10px;
  background: #fff;
  border: 1px solid #d8ded8;
}

.print-question {
  display: grid;
  gap: 9px;
}

.print-question div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.print-question div span {
  padding: 6px 8px;
  border: 1px solid #d8ded8;
  font-size: 12px;
}

.print-choice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.print-choice strong {
  color: #68717a;
  font-size: 11px;
  text-align: center;
  text-transform: uppercase;
}

.print-card {
  display: grid;
  min-height: 86px;
  place-items: center;
  color: #2f3137;
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.12;
  text-align: center;
}

.print-role {
  display: grid;
  gap: 8px;
}

.print-role h3,
.print-role p {
  margin: 0;
}

.print-sketch {
  height: 7.2in;
  background:
    linear-gradient(#eef2ee 1px, transparent 1px),
    linear-gradient(90deg, #eef2ee 1px, transparent 1px),
    #fff;
  background-size: 0.35in 0.35in;
  border: 1px solid #bfc8c0;
}

.worksheet-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 56px;
}

.worksheet-row strong {
  font-size: 26px;
  text-align: center;
}

.blank-line {
  height: 22px;
  border-bottom: 1.5px solid #9aa49c;
}

.answer-key-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.print-line {
  min-height: 44px;
  border-bottom: 2px solid #a4aea7;
}

.print-story {
  padding: 18px;
  background: #fff;
  border: 1px solid #d8ded8;
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1.28;
}

.print-blank {
  display: inline-block;
  min-width: 96px;
  border-bottom: 1.5px solid #59635c;
}

.print-mission {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 9px;
  min-height: 46px;
}

.print-box {
  width: 18px;
  height: 18px;
  border: 1.5px solid #59635c;
}

.print-answer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 8px;
  align-items: center;
}

.print-answer span:last-child {
  text-align: right;
  font-weight: 800;
}

.print-letter-grid {
  display: grid;
  gap: 2px;
  width: min(100%, 6.8in);
  margin: 0 auto;
  padding: 8px;
  background: #fff;
  border: 1px solid #bfc8c0;
}

.print-letter {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid #e0e5df;
  font-size: 13px;
  font-weight: 800;
}

.print-letter.is-solution {
  background: color-mix(in srgb, var(--game-color), #fff 76%);
}

.print-word-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.print-word-list span {
  padding: 7px 10px;
  background: #fff;
  border: 1px solid #d8ded8;
  font-size: 12px;
  font-weight: 800;
}

.footer-space {
  height: 28px;
}







@keyframes watercolor-breath {
  from {
    transform: scale(1.03) translate3d(-4px, -3px, 0);
  }

  to {
    transform: scale(1.09) translate3d(5px, 4px, 0);
  }
}

@keyframes paper-float {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(-0.4deg);
  }

  50% {
    transform: translate3d(6px, -8px, 0) rotate(0.6deg);
  }
}

@keyframes line-breathe {
  0%,
  100% {
    transform: scaleX(0.9);
    opacity: 0.65;
  }

  50% {
    transform: scaleX(1);
    opacity: 1;
  }
}

@keyframes ticker-soft {
  from {
    opacity: 0.72;
  }

  to {
    opacity: 1;
  }
}

@keyframes status-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.8;
  }

  50% {
    transform: scale(1.32);
    opacity: 1;
  }
}

@media (max-width: 980px) {
  .home-hero,
  .game-hero,
  .game-layout,
  .word-search-wrap {
    grid-template-columns: 1fr;
  }

  .game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .control-surface {
    align-self: stretch;
    position: static;
  }

  .action-dock {
    display: none;
  }
}

@media (max-width: 680px) {
  .site-shell {
    width: min(100% - 24px, 1180px);
  }

  .site-header {
    align-items: stretch;
    flex-direction: column;
  }

  .site-header-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .site-nav {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  .nav-link {
    flex: 0 0 auto;
  }

  .home-hero,
  .game-hero,
  .surface {
    min-width: 0;
    padding: 16px;
  }

  .hero-copy,
  .hero-art {
    min-width: 0;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(34px, 11vw, 46px);
    line-height: 1.04;
  }

  .hero-lede {
    font-size: 16px;
  }

  .hero-badges span,
  .tag-row span {
    max-width: 100%;
  }

  .hero-art {
    min-height: 260px;
  }

  .sample-sheet {
    width: 176px;
  }

  .game-grid,
  .team-board,
  .word-list,
  .print-two,
  .print-three {
    grid-template-columns: 1fr;
  }

  .game-page .game-layout {
    display: flex;
    flex-direction: column;
  }

  .game-page .play-surface {
    order: 1;
  }

  .game-page .control-surface {
    order: 2;
  }

  .game-page .preview-surface {
    order: 3;
  }

  .game-page .game-hero {
    gap: 16px;
    min-height: auto;
  }

  .game-page .game-hero .hero-art {
    min-height: 185px;
  }

  .game-page .sample-sheet {
    min-height: 150px;
  }

  .choice-buttons,
  .choice-card,
  .scramble-row,
  .know-row {
    grid-template-columns: 1fr;
  }

  .word-search-wrap {
    display: block;
    max-width: 100%;
    overflow-x: auto;
  }

  .word-search-wrap .letter-grid {
    min-width: 452px;
  }

  .word-search-wrap .word-list {
    margin-top: 12px;
  }

  .emoji-row {
    grid-template-columns: 1fr;
  }

  .emoji-feedback {
    text-align: left;
  }

  .slot-row {
    grid-template-columns: 1fr;
  }

  .panel-heading {
    display: grid;
  }

}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}

@page {
  size: letter;
  margin: 0.25in;
}

@media print {
  body {
    background: #fff;
  }

  body::before,
  .site-header,
  .home-hero,
  .game-hero,
  .game-layout,
  .action-dock {
    display: none !important;
  }

  .site-shell {
    width: auto;
    margin: 0;
  }

  .game-page {
    padding-bottom: 0;
  }

  .print-area {
    display: block;
    margin: 0;
    padding: 0;
  }

  .print-page {
    min-height: calc(11in - 0.5in);
    margin: 0;
    padding: 0.26in;
    border: 0;
    box-shadow: none;
    break-after: auto;
    break-before: auto;
    page-break-after: auto;
    page-break-before: auto;
  }

  .print-page + .print-page {
    break-before: page;
    page-break-before: always;
  }

  .print-header h2 {
    font-size: 28pt;
  }

  .print-letter {
    font-size: 11pt;
  }
}

/* ---------- Night hangar frame ----------
   With <html data-gh-scheme="night"> the page is a printed sheet taped to a workbench in the
   dark hangar: the light paper keeps its look, the surroundings take the site's night. */
@media screen {
  :root[data-gh-scheme="night"] body {
    background:
      radial-gradient(ellipse 70% 40% at 50% 0%, rgba(255, 241, 214, 0.07), transparent 70%),
      var(--gh-night);
  }

  :root[data-gh-scheme="night"] body::before {
    display: none;
  }

  :root[data-gh-scheme="night"] .site-shell {
    position: relative;
    z-index: 1;
    width: min(1220px, calc(100% - 24px));
    min-height: 0;
    margin: clamp(26px, 3.4vw, 48px) auto 0;
    padding: 0 clamp(14px, 2.4vw, 32px) 34px;
    border-radius: 18px;
    background:
      linear-gradient(90deg, rgba(79, 117, 184, 0.06) 1px, transparent 1px),
      linear-gradient(180deg, rgba(47, 143, 122, 0.07) 1px, transparent 1px),
      linear-gradient(135deg, #f8faf4 0%, #eef7f4 38%, #fff6ef 100%);
    background-size: 36px 36px, 36px 36px, auto;
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.6),
      0 60px 120px -40px rgba(0, 0, 0, 0.95),
      0 0 160px -60px rgba(255, 241, 214, 0.35);
  }

  /* Two strips of tape hold the sheet down. */
  :root[data-gh-scheme="night"] .site-shell::before,
  :root[data-gh-scheme="night"] .site-shell::after {
    content: "";
    position: absolute;
    top: -12px;
    z-index: 2;
    width: 110px;
    height: 26px;
    background: rgba(255, 214, 107, 0.62);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
    pointer-events: none;
  }

  :root[data-gh-scheme="night"] .site-shell::before {
    left: 6%;
    transform: rotate(-4deg);
  }

  :root[data-gh-scheme="night"] .site-shell::after {
    right: 6%;
    transform: rotate(3deg);
  }

  @media (max-width: 560px) {
    :root[data-gh-scheme="night"] .site-shell {
      width: calc(100% - 16px);
      border-radius: 12px;
    }

    :root[data-gh-scheme="night"] .site-shell::before,
    :root[data-gh-scheme="night"] .site-shell::after {
      width: 70px;
      height: 18px;
      top: -8px;
    }
  }
}
