/*
 * CC Connections Collection · Chewy brand styles
 *
 * Typography: Gordita is Chewy's brand face, served from /public/fonts.
 */





:root {
  /* Primary */
  --chewy-blue: #1c49c2;
  --navy: #001a70;
  --light-blue: #dfeaff;
  --bluey: #a8b8f7;
  --white: #ffffff;
  /* Single accent, used sparingly for the main call to action */
  --accent: #10b981; /* emerald */
  --accent-dark: #047857;

  --ink: var(--navy);
  --ink-soft: #3a4a85;
  --surface: var(--white);
  --page: #eef3ff;

  --font: "Gordita", "Avenir Next", "Avenir", "Montserrat", "Nunito Sans", "Segoe UI", system-ui, -apple-system, sans-serif;

  --radius-sm: 14px;
  --radius: 24px;
  --radius-lg: 36px;
  --pill: 999px;
  --shadow: 0 12px 32px rgba(0, 26, 112, 0.1), 0 2px 6px rgba(0, 26, 112, 0.06);
  --shadow-lift: 0 18px 40px rgba(0, 26, 112, 0.16), 0 4px 10px rgba(0, 26, 112, 0.08);
  --container: 1200px;
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 0%, rgba(168, 184, 247, 0.45), transparent 32rem),
    radial-gradient(circle at 100% 30%, rgba(223, 234, 255, 0.9), transparent 36rem),
    var(--page);
  -webkit-font-smoothing: antialiased;
}

@media (min-width: 1400px) {
  body { font-size: 1.25rem; }
}

main { flex: 1; outline: none; }

h1, h2, h3 { line-height: 1.12; margin: 0; font-weight: 700; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: var(--chewy-blue); }

[tabindex="-1"]:focus { outline: none; }

:focus-visible {
  outline: 4px solid var(--chewy-blue);
  outline-offset: 3px;
  border-radius: 10px;
}

.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  border-radius: var(--pill);
  background: var(--white);
  color: var(--navy);
  font-weight: 700;
}
.skip-link:focus { top: 1rem; }

/* ---------- Header & footer ---------- */

.site-header {
  background: var(--navy);
  color: var(--white);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
}

.brand-mark { width: 48px; height: 48px; display: block; border-radius: 50%; box-shadow: 0 0 0 2px rgba(168, 184, 247, 0.35); }
.brand-name { font-size: 1.3rem; letter-spacing: -0.01em; }
.brand-pill {
  padding: 0.2rem 0.7rem;
  border-radius: var(--pill);
  background: var(--light-blue);
  color: var(--navy);
  font-size: 0.85rem;
}

.header-link {
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
  padding: 0.55rem 1.1rem;
  border-radius: var(--pill);
  border: 2px solid rgba(168, 184, 247, 0.5);
  transition: background 0.2s;
}
.header-link:hover { background: rgba(255, 255, 255, 0.1); }

.site-footer {
  margin-top: 4rem;
  padding: 1.75rem 0;
  background: var(--navy);
  color: var(--bluey);
  font-size: 0.95rem;
}
.site-footer strong { color: var(--white); }
.footer-brand { display: inline-flex; align-items: center; gap: 0.75rem; }
.footer-brand img { flex: none; height: auto; }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.8rem 1.5rem;
  border: 3px solid transparent;
  border-radius: var(--pill);
  font: inherit;
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  transition: transform 0.18s var(--ease-bounce), box-shadow 0.2s, background-color 0.2s, color 0.2s, border-color 0.2s;
}
.btn svg { width: 1.25em; height: 1.25em; flex: none; }
.btn:hover:not(:disabled) { transform: translateY(-2px); }
.btn:active:not(:disabled) { transform: translateY(1px) scale(0.98); }
.btn:disabled { cursor: not-allowed; }

.btn-lg { padding: 1rem 1.9rem; font-size: 1.15rem; }
.btn-xl { padding: 1.25rem 2.4rem; font-size: clamp(1.25rem, 1.8vw, 1.6rem); min-width: 15rem; }

.btn-primary {
  background: var(--accent);
  color: var(--navy);
  box-shadow: 0 6px 0 var(--accent-dark), 0 12px 24px rgba(16, 185, 129, 0.3);
}
.btn-primary:hover:not(:disabled) { box-shadow: 0 8px 0 var(--accent-dark), 0 16px 28px rgba(16, 185, 129, 0.35); }
.btn-primary:active:not(:disabled) { box-shadow: 0 2px 0 var(--accent-dark), 0 6px 14px rgba(16, 185, 129, 0.3); }

.btn-secondary {
  background: var(--white);
  color: var(--chewy-blue);
  border-color: var(--chewy-blue);
  box-shadow: 0 6px 0 var(--bluey);
}
.btn-secondary:hover:not(:disabled) { background: var(--light-blue); }
.btn-secondary:disabled {
  color: #7d8bbf;
  border-color: var(--bluey);
  background: var(--light-blue);
  box-shadow: none;
}

.btn-ghost {
  background: var(--white);
  color: var(--navy);
  border-color: var(--light-blue);
  padding: 0.7rem 1.2rem;
  font-size: 1rem;
}
.btn-ghost:hover { border-color: var(--bluey); }

.btn-light { background: var(--white); color: var(--chewy-blue); }
.btn-light:hover { background: var(--light-blue); }

.btn-outline-light {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.55);
}
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.12); border-color: var(--white); }

/* ---------- Shared bits ---------- */

.eyebrow {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--chewy-blue);
  margin-bottom: 0.6rem;
}
.eyebrow-light { color: var(--bluey); }

.lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 46rem; margin-top: 0.8rem; }

.badge {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  border-radius: var(--pill);
  font-size: 0.85rem;
  font-weight: 700;
}
.badge-ready { background: var(--chewy-blue); color: var(--white); }
.badge-soon { background: var(--light-blue); color: var(--chewy-blue); }

.view { animation: view-in 0.35s ease both; }
@keyframes view-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Hub: hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 2rem;
  margin-top: 2rem;
  padding: clamp(2rem, 5vw, 4.5rem);
  border-radius: var(--radius-lg);
  background: var(--chewy-blue);
  color: var(--white);
  box-shadow: var(--shadow-lift);
  isolation: isolate;
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
}
.hero::before {
  width: 34rem; height: 34rem;
  right: -10rem; top: -12rem;
  background: rgba(168, 184, 247, 0.35);
}
.hero::after {
  width: 20rem; height: 20rem;
  left: -7rem; bottom: -11rem;
  background: rgba(0, 26, 112, 0.35);
}

.hero h1 { font-size: clamp(2.6rem, 5.4vw, 4.6rem); }
.hero-subtitle {
  margin-top: 1rem;
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  color: var(--light-blue);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
}
.hero-chips li {
  padding: 0.35rem 0.9rem 0.35rem 0.75rem;
  border-radius: var(--pill);
  background: rgba(0, 26, 112, 0.35);
  font-size: 0.95rem;
  font-weight: 700;
}
.hero-chips li::before { content: "✓ "; color: var(--bluey); }

.hero-art { display: flex; flex-direction: column; align-items: flex-start; gap: 1.5rem; }
.hero-bubbles {
  width: min(100%, 15rem);
  height: auto;
  margin-left: 2rem;
  filter: drop-shadow(0 10px 0 rgba(0, 26, 112, 0.25));
  animation: float 7s ease-in-out infinite;
}

.hero-chain {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.1rem;
}
.hero-chain li {
  position: relative;
  padding: 0.7rem 1.5rem;
  border-radius: var(--pill);
  background: var(--white);
  color: var(--navy);
  font-size: clamp(1.1rem, 1.8vw, 1.5rem);
  font-weight: 700;
  box-shadow: 0 8px 0 rgba(0, 26, 112, 0.25);
  animation: float 6s ease-in-out infinite;
}
.hero-chain li:nth-child(1) { margin-left: 0; }
.hero-chain li:nth-child(2) { margin-left: 3rem; animation-delay: -1s; }
.hero-chain li:nth-child(3) { margin-left: 6rem; animation-delay: -2s; }
.hero-chain li:nth-child(4) { margin-left: 3.5rem; animation-delay: -3s; }
.hero-chain li:nth-child(5) { margin-left: 7rem; animation-delay: -4s; }
.hero-chain li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 2.4rem;
  top: 100%;
  width: 5px;
  height: 1.1rem;
  border-radius: 4px;
  background: var(--bluey);
}
.hero-chain .is-mystery {
  display: flex;
  gap: 0.35rem;
  padding: 0.55rem 0.8rem;
  background: var(--navy);
}
.mini-tile {
  width: 2.1rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(168, 184, 247, 0.25);
  border: 2px dashed var(--bluey);
  color: var(--navy);
  font-size: 1.2rem;
}
.mini-tile.is-shown { background: var(--accent); border: 0; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* ---------- Hub: steps ---------- */

.steps {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.steps li {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.4rem;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.steps strong { display: block; font-size: 1.1rem; }
.steps span:not(.step-num) { display: block; color: var(--ink-soft); font-size: 0.95rem; line-height: 1.4; }
.step-num {
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--light-blue);
  color: var(--chewy-blue);
  font-weight: 700;
  font-size: 1.2rem;
}

/* ---------- Hub: game library ---------- */

.library { margin-top: 3.5rem; scroll-margin-top: 1.5rem; }

.section-head { margin-bottom: 1.5rem; }
.section-head h2 { font-size: clamp(2rem, 3.4vw, 2.75rem); }
.section-head p { color: var(--ink-soft); margin-top: 0.5rem; font-size: 1.15rem; }

.game-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.game-card {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.game-card h3 { font-size: 1.6rem; margin-top: 0.65rem; }
.game-card p { color: var(--ink-soft); margin-top: 0.4rem; }
.game-card .game-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.9rem;
  color: var(--navy);
  font-weight: 700;
  font-size: 1rem;
}
.game-meta svg { width: 1.2em; height: 1.2em; color: var(--chewy-blue); }

.game-icon {
  width: 4.25rem;
  height: 4.25rem;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: var(--light-blue);
  color: var(--chewy-blue);
}
.game-icon svg { width: 2.6rem; height: 2.6rem; }

.game-card.is-featured {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  gap: 2rem;
  padding: 2.25rem 2.5rem;
  border: 3px solid var(--chewy-blue);
}
.game-card.is-featured .game-icon {
  width: 7rem;
  height: 7rem;
  border-radius: 30px;
  background: var(--chewy-blue);
  color: var(--white);
}
.game-card.is-featured .game-icon svg { width: 4.2rem; height: 4.2rem; }
.game-card.is-featured h3 { font-size: 2.2rem; }
.game-card.is-featured .game-body { flex: 1; }
.game-card.is-featured .game-body > p:not(.game-meta) { max-width: 40rem; font-size: 1.15rem; }
.game-cta { flex: none; }

.game-card.is-soon { background: rgba(255, 255, 255, 0.7); box-shadow: none; border: 2px dashed var(--bluey); }
.game-card.is-soon .game-icon { background: rgba(168, 184, 247, 0.3); }

/* ---------- Picker ---------- */

.back-link {
  display: inline-flex;
  gap: 0.4rem;
  margin-top: 2rem;
  font-weight: 700;
  text-decoration: none;
  padding: 0.5rem 1rem 0.5rem 0.8rem;
  border-radius: var(--pill);
  background: var(--white);
  box-shadow: var(--shadow);
}
.back-link:hover { background: var(--light-blue); }

.picker-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem 2rem;
  flex-wrap: wrap;
  margin: 2rem 0 1.5rem;
}
.picker-head h1 { font-size: clamp(2.6rem, 5vw, 4rem); }

.status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink-soft);
  font-weight: 700;
}

.chain-group { margin-top: 2.5rem; }
.chain-group-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.6rem;
  margin-bottom: 1rem;
}
.chain-group-count {
  padding: 0.1rem 0.65rem;
  border-radius: var(--pill);
  background: var(--light-blue);
  color: var(--chewy-blue);
  font-size: 0.95rem;
}

.dots { display: inline-flex; gap: 4px; }
.dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bluey);
  opacity: 0.5;
}
.dots span.is-on { background: var(--chewy-blue); opacity: 1; }

.chain-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1rem;
}

.chain-card {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  height: 100%;
  padding: 1.35rem 1.4rem 1.2rem;
  border-radius: var(--radius);
  background: var(--white);
  color: var(--navy);
  text-decoration: none;
  box-shadow: var(--shadow);
  border: 3px solid transparent;
  transition: transform 0.2s var(--ease-bounce), box-shadow 0.2s, border-color 0.2s;
}
.chain-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
  border-color: var(--chewy-blue);
}
.chain-card-top { display: flex; align-items: center; justify-content: space-between; }
.chain-card-name { font-size: 0.95rem; font-weight: 700; color: var(--ink-soft); }
.chain-card-word { font-size: 1.75rem; font-weight: 700; color: var(--chewy-blue); line-height: 1.1; }
.chain-card-blanks { display: flex; gap: 6px; }
.chain-card-blanks span {
  flex: 1;
  height: 10px;
  border-radius: var(--pill);
  background: var(--light-blue);
}
.chain-card-cta { margin-top: auto; padding-top: 0.3rem; font-weight: 700; font-size: 0.95rem; color: var(--navy); }
.chain-card:hover .chain-card-cta { color: var(--chewy-blue); }

/* ---------- Leader instructions ---------- */

.instructions {
  margin-top: 1.5rem;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.instructions summary {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.1rem 1.5rem;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  font-size: 1.15rem;
}
.instructions summary::-webkit-details-marker { display: none; }
.instructions summary:hover { background: #f6f9ff; }
.instructions-sub { font-weight: 400; color: var(--ink-soft); }
.instructions-icon {
  flex: none;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--chewy-blue);
  color: var(--white);
  font-weight: 700;
  font-style: italic;
  font-family: Georgia, serif;
}
.instructions-chevron {
  margin-left: auto;
  width: 0.75rem;
  height: 0.75rem;
  border-right: 3px solid var(--chewy-blue);
  border-bottom: 3px solid var(--chewy-blue);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.2s;
}
.instructions[open] .instructions-chevron { transform: rotate(-135deg) translate(-2px, -2px); }

.instructions-body {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 1.5rem 2.5rem;
  padding: 0.25rem 1.5rem 1.5rem;
}
.instructions-body ol { margin: 0; padding-left: 1.4rem; display: grid; gap: 0.45rem; }
.instructions-body li::marker { color: var(--chewy-blue); font-weight: 700; }
.script {
  padding: 1.25rem 1.4rem;
  border-radius: var(--radius-sm);
  background: var(--light-blue);
  align-self: start;
}
.script-label { font-weight: 700; color: var(--chewy-blue); font-size: 0.95rem; margin-bottom: 0.4rem; }
.script em { font-style: normal; font-weight: 700; }

/* ---------- Play ---------- */

.play-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
}
.play-bar > .btn { justify-self: start; }
.play-heading { text-align: center; }
.play-heading h1 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
.play-meta { color: var(--ink-soft); font-weight: 700; font-size: 1rem; margin-top: 0.15rem; }
.play-bar-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.6rem; }

.trail {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  row-gap: 0.6rem;
  margin: 1.5rem 0 1.25rem;
}
.trail-word {
  min-width: 5.5rem;
  min-height: 2.9rem;
  display: inline-grid;
  place-items: center;
  padding: 0.45rem 1.15rem;
  border-radius: var(--pill);
  font-weight: 700;
  font-size: 1.15rem;
}
.trail-word.is-solved { background: var(--chewy-blue); color: var(--white); }
.trail-word.is-current {
  background: var(--white);
  color: var(--chewy-blue);
  border: 3px dashed var(--chewy-blue);
  font-size: 1.35rem;
}
.trail-word.is-upcoming { background: rgba(168, 184, 247, 0.35); }
.trail-link {
  width: 2rem;
  height: 5px;
  border-radius: 4px;
  background: var(--bluey);
  opacity: 0.6;
}
.trail-link.is-solved { background: var(--chewy-blue); opacity: 1; }

.stage {
  position: relative;
  padding: clamp(1.5rem, 3.5vw, 3rem);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-lift);
  text-align: center;
  overflow: hidden;
}
.stage::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 10px;
  background: var(--chewy-blue);
}

.stage-top {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  min-height: 2.6rem;
}
.stage-step {
  padding: 0.35rem 1rem;
  border-radius: var(--pill);
  background: var(--light-blue);
  color: var(--chewy-blue);
  font-weight: 700;
}
.last-link {
  padding: 0.35rem 1rem;
  border-radius: var(--pill);
  border: 2px solid var(--light-blue);
  color: var(--ink-soft);
  font-weight: 700;
}
.last-link [aria-hidden] { color: var(--chewy-blue); }

.phrase {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin: clamp(1.5rem, 4vw, 3rem) 0 1.25rem;
}
.prev-word {
  font-size: clamp(2.4rem, 5.2vw, 4.75rem);
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
  letter-spacing: -0.02em;
}
.phrase-plus {
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--light-blue);
  color: var(--chewy-blue);
  font-weight: 700;
  font-size: 2rem;
  line-height: 1;
}
.tiles {
  --tile: clamp(2.6rem, min(5.4vw, calc(58vw / var(--letters, 7))), 5.25rem);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: calc(var(--tile) * 0.14);
}
.tile {
  width: var(--tile);
  height: calc(var(--tile) * 1.15);
  display: grid;
  place-items: center;
  border-radius: calc(var(--tile) * 0.24);
  background: var(--light-blue);
  border: 3px dashed var(--bluey);
  font-size: calc(var(--tile) * 0.62);
  font-weight: 700;
  line-height: 1;
  color: var(--white);
}
.tile.is-shown {
  background: var(--chewy-blue);
  border: 0;
  box-shadow: 0 calc(var(--tile) * 0.08) 0 var(--navy);
}
.tile.is-new { animation: tile-flip 0.45s var(--ease-bounce); }
.tile-symbol { background: transparent; border: 0; color: var(--navy); width: auto; }
.tile-gap { width: calc(var(--tile) * 0.4); }

@keyframes tile-flip {
  0% { transform: rotateX(90deg) scale(0.8); }
  100% { transform: none; }
}

.is-popping { animation: pop 0.5s var(--ease-bounce); }
@keyframes pop {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: none; opacity: 1; }
}

.tile.is-correct {
  background: var(--accent);
  color: var(--navy);
  box-shadow: 0 calc(var(--tile) * 0.08) 0 var(--accent-dark);
}

.hint-status { color: var(--ink-soft); font-weight: 700; font-size: 1.05rem; }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Typed guesses */
.guess {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  width: min(100%, 36rem);
  margin: 1.5rem auto 0;
}
.guess-input {
  flex: 1;
  min-width: 0;
  padding: 0.8rem 1.4rem;
  border: 3px solid var(--bluey);
  border-radius: var(--pill);
  background: var(--white);
  color: var(--navy);
  font: inherit;
  font-size: clamp(1.2rem, 1.8vw, 1.5rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.guess-input::placeholder { color: var(--ink-soft); opacity: 0.7; font-weight: 500; letter-spacing: 0; text-transform: none; }
.guess-input:focus { outline: none; border-color: var(--chewy-blue); box-shadow: 0 0 0 4px rgba(28, 73, 194, 0.2); }
.guess-input:disabled { background: var(--light-blue); }
.guess.is-shaking { animation: shake 0.4s ease-in-out; }
@keyframes shake {
  0%, 100% { transform: none; }
  20%, 60% { transform: translateX(-10px); }
  40%, 80% { transform: translateX(10px); }
}

.guess-feedback {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1rem;
  padding: 0.55rem 1.25rem;
  border-radius: var(--pill);
  font-weight: 700;
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
}
.guess-feedback::before {
  width: 1.6em;
  height: 1.6em;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  font-size: 0.85em;
  line-height: 1;
}
.guess-feedback.is-correct { background: rgba(16, 185, 129, 0.16); color: var(--navy); }
.guess-feedback.is-correct::before { content: "✓"; background: var(--accent); color: var(--navy); }
.guess-feedback.is-wrong { background: var(--light-blue); color: var(--navy); }
.guess-feedback.is-wrong::before { content: "✕"; background: var(--navy); color: var(--white); }

/* After a wrong guess, nudge toward the reveal button */
.btn-secondary.is-suggested { animation: nudge 1.6s ease-in-out 2; }
@keyframes nudge {
  0%, 100% { box-shadow: 0 6px 0 var(--bluey); }
  50% { box-shadow: 0 6px 0 var(--bluey), 0 0 0 8px rgba(28, 73, 194, 0.22); }
}

.controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 1.75rem;
}

.key-hint { margin-top: 1.5rem; font-size: 0.95rem; color: var(--ink-soft); }
kbd {
  display: inline-block;
  min-width: 1.7em;
  padding: 0.05em 0.45em;
  border-radius: 7px;
  border: 2px solid var(--bluey);
  border-bottom-width: 4px;
  background: var(--white);
  font: inherit;
  font-weight: 700;
  color: var(--navy);
  text-align: center;
}

/* ---------- Completion ---------- */

.complete {
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 4.5vw, 3.75rem);
  border-radius: var(--radius-lg);
  background: var(--chewy-blue);
  color: var(--white);
  text-align: center;
  box-shadow: var(--shadow-lift);
  isolation: isolate;
  animation: pop 0.55s var(--ease-bounce);
}
.complete::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 30rem; height: 30rem;
  top: -14rem; left: 50%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: rgba(168, 184, 247, 0.3);
}
.complete-burst {
  width: 5rem;
  height: 5rem;
  margin: 0 auto 0.75rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--white);
  color: var(--accent);
  box-shadow: 0 8px 0 rgba(0, 26, 112, 0.3);
}
.complete-burst svg { width: 3rem; height: 3rem; animation: spin-in 0.8s var(--ease-bounce); }
@keyframes spin-in {
  from { transform: rotate(-180deg) scale(0.3); }
  to { transform: none; }
}
.complete-badge {
  display: inline-block;
  padding: 0.3rem 1rem;
  border-radius: var(--pill);
  background: var(--navy);
  font-weight: 700;
  font-size: 0.95rem;
}
.complete h2 { font-size: clamp(2.6rem, 5.5vw, 4.25rem); margin-top: 0.75rem; }
.complete-lead { font-size: 1.3rem; color: var(--light-blue); margin-top: 0.5rem; }

.complete-chain {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin: 1.75rem 0 1.25rem;
}
.complete-word {
  padding: 0.6rem 1.35rem;
  border-radius: var(--pill);
  background: var(--white);
  color: var(--navy);
  font-weight: 700;
  font-size: clamp(1.2rem, 2.2vw, 1.75rem);
  box-shadow: 0 6px 0 rgba(0, 26, 112, 0.3);
}
.complete-arrow { font-size: 1.6rem; font-weight: 700; color: var(--bluey); }

.complete-links {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  max-width: 50rem;
}
.complete-links li {
  padding: 0.3rem 0.9rem;
  border-radius: var(--pill);
  background: rgba(0, 26, 112, 0.4);
  color: var(--light-blue);
  font-weight: 700;
  font-size: 1rem;
}

.complete-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 2.25rem;
}
.complete-actions-small { margin-top: 1rem; }

.confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 50;
}
.confetti span {
  position: absolute;
  top: -5vh;
  left: var(--x);
  width: var(--size);
  height: calc(var(--size) * 0.6);
  border-radius: 3px;
  opacity: 0;
  animation: confetti-fall var(--duration) cubic-bezier(0.25, 0.6, 0.45, 1) var(--delay) forwards;
}
@keyframes confetti-fall {
  0% { opacity: 1; transform: translate(0, 0) rotate(0); }
  85% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--drift), 108vh) rotate(var(--spin)); }
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .steps { grid-template-columns: 1fr; }
  .game-grid { grid-template-columns: 1fr 1fr; }
  .game-card.is-featured { flex-direction: column; align-items: flex-start; padding: 2rem; }
  .instructions-body { grid-template-columns: 1fr; }
  .play-bar { grid-template-columns: 1fr; justify-items: center; }
  .play-bar > .btn { justify-self: center; }
  .play-heading { order: -1; }
  .play-bar-actions { justify-content: center; }
}

@media (max-width: 640px) {
  body { font-size: 1.05rem; }
  .container { width: min(100% - 1.5rem, var(--container)); }
  .brand-name { font-size: 1.1rem; }
  .header-link { display: none; }
  .hero { margin-top: 1rem; border-radius: var(--radius); }
  .hero-actions .btn { width: 100%; }
  .game-grid { grid-template-columns: 1fr; }
  .game-card.is-featured .game-icon { width: 5rem; height: 5rem; border-radius: 22px; }
  .game-card.is-featured .game-icon svg { width: 3rem; height: 3rem; }
  .game-cta { width: 100%; }
  .picker-head .btn { width: 100%; }
  .chain-grid { grid-template-columns: 1fr 1fr; }
  .chain-card-word { font-size: 1.4rem; }
  .instructions-sub { display: none; }
  .trail-word { min-width: 3.5rem; font-size: 0.95rem; padding: 0.35rem 0.8rem; min-height: 2.4rem; }
  .trail-link { width: 0.9rem; }
  .tiles { --tile: clamp(2rem, calc(72vw / var(--letters, 7)), 3.4rem); }
  .phrase { flex-direction: column; gap: 0.75rem; }
  .phrase-plus { width: 2.25rem; height: 2.25rem; font-size: 1.5rem; }
  .controls { flex-direction: column; }
  .guess { flex-direction: column; }
  .btn-xl { width: 100%; min-width: 0; }
  .key-hint { display: none; }
  .complete-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* CC Connections Collection homepage refinements */
.brand-mark{width:52px;height:36px;object-fit:contain;border-radius:0;box-shadow:none}
.brand-name{font-weight:700}
.hero{grid-template-columns:minmax(0,1.3fr) minmax(180px,.7fr)}
.hero h1{max-width:13ch;line-height:1.07}
.hero-art{align-items:center;justify-content:center}
.hero-bubbles{width:min(100%,22rem);margin-left:0;animation:none;filter:none}
.hero-actions .btn-primary{background:#00CC75;border-color:#00CC75;color:#002956}
.hero-actions .btn-primary:hover{background:#00b96b;border-color:#00b96b}
@media(max-width:760px){.hero{grid-template-columns:1fr}.hero-art{display:flex}.hero-bubbles{width:min(50%,12rem)}}
