/* Code Quest Kids: the videos' look on the web. Cartoon night sky (violet → royal blue), floating candy shapes,
   rounded Fredoka type, chunky "sticker" cards with thick borders. Colour meaning matches the videos:
   green = it works, pink-red = oops, yellow = look here. Tones (.tone-*) set --tone/--tone-top/--tone-light. */

@font-face { font-family: Fredoka; src: url(/fonts/Fredoka-400.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Fredoka; src: url(/fonts/Fredoka-500.woff2) format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: Fredoka; src: url(/fonts/Fredoka-600.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: Fredoka; src: url(/fonts/Fredoka-700.woff2) format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url(/fonts/JetBrainsMono-500.woff2) format('woff2'); font-weight: 500; font-display: swap; }

:root {
  --bg-top: #3a1c9c;
  --bg-mid: #4c2bd0;
  --bg-bottom: #1d3fb8;
  --text: #f3f0ff;
  --muted: #c9c1f5;
  --yellow: #fde047;
  --pink: #ff5c8a;
  --green: #4ade80;
  --cyan: #22d3ee;
  --card: rgba(33, 17, 99, 0.92);
  --card-2: rgba(52, 28, 150, 0.9);
  --line: rgba(233, 213, 255, 0.35);
  --shadow: 0 8px 0 rgba(20, 8, 70, 0.55);
  --radius: 28px;
  --font: Fredoka, 'Segoe UI', 'Trebuchet MS', Arial, sans-serif;
  --mono: 'JetBrains Mono', 'DejaVu Sans Mono', monospace;
  --bit-face: #67e8f9;
  --tone: #60a5fa;
  --tone-top: #2563eb;
  --tone-light: #dbeafe;
  --max: 1180px;
  color-scheme: dark;
}

.tone-blue { --tone: #60a5fa; --tone-top: #2563eb; --tone-light: #dbeafe; }
.tone-cyan { --tone: #22d3ee; --tone-top: #0891b2; --tone-light: #cffafe; }
.tone-red { --tone: #ff5c8a; --tone-top: #e11d48; --tone-light: #ffe4ec; }
.tone-purple { --tone: #c084fc; --tone-top: #9333ea; --tone-light: #f3e8ff; }
.tone-yellow { --tone: #fde047; --tone-top: #ca8a04; --tone-light: #fef9c3; }
.tone-green { --tone: #4ade80; --tone-top: #16a34a; --tone-light: #dcfce7; }
.tone-orange { --tone: #fb923c; --tone-top: #ea580c; --tone-light: #ffedd5; }
.tone-pink { --tone: #f472b6; --tone-top: #db2777; --tone-light: #fce7f3; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.55;
  color: var(--text);
  background-color: var(--bg-mid);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--yellow); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.4em; font-weight: 700; letter-spacing: 0.2px; }
h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
mark { background: none; color: var(--yellow); text-shadow: 0 0 22px rgba(253, 224, 71, 0.55); }
.icon { flex: none; vertical-align: -0.18em; }
.center { text-align: center; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--yellow); color: #1e1b4b; padding: 8px 16px; border-radius: 12px; z-index: 50; }
.skip:focus { left: 8px; }
:focus-visible { outline: 4px solid var(--yellow); outline-offset: 3px; border-radius: 12px; }

/* ---------- Sky: stars + floating candy shapes ---------- */
.sky { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 45%, var(--bg-bottom) 100%); }
.sky::before, .sky::after {
  content: ''; position: absolute; inset: -50%;
  background-image:
    radial-gradient(2px 2px at 20px 30px, #fff, transparent), radial-gradient(2px 2px at 140px 90px, #fde047, transparent),
    radial-gradient(1.5px 1.5px at 90px 160px, #fff, transparent), radial-gradient(2px 2px at 200px 220px, #67e8f9, transparent),
    radial-gradient(1.5px 1.5px at 260px 40px, #f9a8d4, transparent);
  background-size: 300px 260px;
  opacity: 0.55;
  animation: twinkle 6s ease-in-out infinite alternate;
}
.sky::after { background-size: 420px 380px; opacity: 0.35; animation-delay: -3s; transform: rotate(12deg); }
.shape { position: absolute; display: block; border-radius: 30%; opacity: 0.22; animation: float 14s ease-in-out infinite; }
.s1 { width: 90px; height: 90px; left: 4%; top: 18%; background: var(--pink); border-radius: 50%; }
.s2 { width: 70px; height: 70px; right: 6%; top: 12%; background: var(--yellow); transform: rotate(20deg); animation-delay: -4s; }
.s3 { width: 120px; height: 120px; right: 10%; top: 62%; background: var(--cyan); border-radius: 50%; animation-delay: -8s; }
.s4 { width: 60px; height: 60px; left: 12%; top: 72%; background: var(--green); animation-delay: -2s; }
.s5 { width: 0; height: 0; left: 46%; top: 88%; border: 40px solid transparent; border-bottom: 70px solid #c084fc; border-radius: 0; background: none; animation-delay: -6s; }
.s6 { width: 48px; height: 48px; left: 38%; top: 6%; background: #fb923c; border-radius: 50%; animation-delay: -10s; }
@keyframes float { 0%, 100% { translate: 0 0; rotate: 0deg; } 50% { translate: 0 -30px; rotate: 18deg; } }
@keyframes twinkle { from { opacity: 0.25; } to { opacity: 0.6; } }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px max(16px, calc((100vw - var(--max)) / 2));
  background: rgba(40, 18, 130, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 3px solid rgba(233, 213, 255, 0.2);
}
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); font-size: 1.35rem; }
.logo .bit { transition: transform 0.2s; }
.logo:hover .bit { transform: rotate(-10deg) scale(1.08); }
.logo-text b { color: #fff; }
.logo-text em { font-style: normal; color: var(--yellow); font-weight: 700; }
.site-header ul { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.site-header nav a {
  display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px;
  color: var(--text); text-decoration: none; font-weight: 600; border: 3px solid transparent;
  transition: background 0.15s, transform 0.15s;
}
.site-header nav a:hover { background: rgba(255, 255, 255, 0.12); transform: translateY(-2px); }
.site-header nav a.active { background: var(--yellow); color: #3b1a86; border-color: #fff6; }

main { width: min(var(--max), 100% - 32px); margin: 0 auto; padding: 24px 0 40px; }

/* ---------- Buttons, badges, chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px; border: 4px solid #fff;
  font: 700 1.15rem var(--font); color: #2e1065; text-decoration: none; cursor: pointer;
  background: #e9d5ff; box-shadow: var(--shadow); transition: transform 0.12s, box-shadow 0.12s;
}
.btn:hover { transform: translateY(-3px) rotate(-1deg); }
.btn:active { transform: translateY(5px); box-shadow: 0 2px 0 rgba(20, 8, 70, 0.55); }
.btn-yellow { background: var(--yellow); }
.btn-pink { background: #f9a8d4; }
.btn-green { background: var(--green); }
.btn-small { padding: 9px 18px; font-size: 1rem; border-width: 3px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }
.cta-row.center { justify-content: center; }
.badge, .chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px; border-radius: 999px;
  font-size: 0.85rem; font-weight: 600; line-height: 1.4;
}
.badge { background: var(--tone); color: #1e1b4b; }
.chip { background: rgba(255, 255, 255, 0.1); color: var(--tone-light); border: 2px solid var(--tone); }
.kicker { display: inline-flex; gap: 6px; align-items: center; background: rgba(255, 255, 255, 0.12); padding: 6px 14px; border-radius: 999px; font-weight: 600; color: var(--yellow); }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 60ch; }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: 1fr 1.15fr; gap: 28px; align-items: center; padding: 20px 0 10px; }
.hero h1 { margin-top: 14px; }
.rainbow {
  background: linear-gradient(90deg, #ff5c8a, #fb923c, #fde047, #4ade80, #22d3ee, #c084fc);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-art { position: relative; }
.hero-img { border-radius: var(--radius); border: 5px solid #fff; box-shadow: var(--shadow), 0 0 60px rgba(192, 132, 252, 0.45); }
.hero-bit { position: absolute; left: -26px; bottom: -34px; display: flex; flex-direction: column; align-items: flex-start; }
.bubble {
  position: relative; margin-bottom: 6px; max-width: 250px; padding: 10px 14px; border-radius: 20px;
  background: #fff; color: #3b0764; font: 600 0.95rem var(--font); border: 0; text-align: left; cursor: pointer;
  box-shadow: 0 6px 0 rgba(20, 8, 70, 0.35);
}
.bubble::after { content: ''; position: absolute; left: 44px; bottom: -12px; border: 8px solid transparent; border-top: 10px solid #fff; }
.bouncy { animation: bob 3s ease-in-out infinite; transform-origin: bottom center; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-10px) rotate(2deg); } }

/* ---------- Bit ---------- */
.bit { overflow: visible; }
.bit .bit-screen { fill: #10214f; }
.bit[data-mood='oops'] { --bit-face: #ff8fb0; }
.bit[data-mood='oops'] .bit-screen { fill: #3b0a2a; }
.bit .bit-face { display: none; }
.bit[data-mood='happy'] .bit-happy, .bit[data-mood='wow'] .bit-wow, .bit[data-mood='oops'] .bit-oops, .bit[data-mood='think'] .bit-think { display: inline; }
.bit .bit-antenna { animation: glow 1.6s ease-in-out infinite; filter: drop-shadow(0 0 6px #fde047); }
.bit .bit-eye { animation: blink 4.5s infinite; transform-box: fill-box; transform-origin: center; }
.bit-arm-l { transform-origin: 38px 176px; }
.bit-waving .bit-arm-l { animation: wave 1.2s ease-in-out infinite; }
@keyframes glow { 50% { opacity: 0.45; } }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 96% { transform: scaleY(0.1); } }
@keyframes wave { 0%, 100% { transform: rotate(-100deg); } 50% { transform: rotate(-140deg); } }

/* ---------- Sections & cards ---------- */
.section { margin: 56px 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 18px; }
.section-head h2 { display: flex; align-items: center; gap: 10px; margin: 0; }
.section-head p { margin: 0; color: var(--muted); width: 100%; }
.link-more { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; }
.panel {
  background: var(--card); border: 4px solid var(--line); border-radius: var(--radius);
  padding: clamp(18px, 3vw, 30px); box-shadow: var(--shadow); margin: 28px 0;
}
.section-title { display: flex; align-items: center; gap: 10px; }
.section-title .icon { color: var(--yellow); }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 24px; }
.card {
  display: flex; flex-direction: column; overflow: hidden; text-decoration: none; color: var(--text);
  background: var(--card); border: 4px solid var(--tone); border-radius: var(--radius);
  box-shadow: 0 8px 0 rgba(20, 8, 70, 0.55), 0 0 30px color-mix(in srgb, var(--tone) 30%, transparent);
  transition: transform 0.18s, box-shadow 0.18s;
}
.card:hover { transform: translateY(-6px) rotate(-0.6deg); }
.card[hidden] { display: none; }
.card-art { position: relative; aspect-ratio: 16 / 9; background: var(--card-2); }
.card-art img { width: 100%; height: 100%; object-fit: cover; }
.card-play {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%; display: grid; place-items: center;
  width: 64px; height: 64px; border-radius: 50%; background: #fff; color: var(--tone-top);
  box-shadow: 0 6px 0 rgba(20, 8, 70, 0.45); opacity: 0; scale: 0.6; transition: 0.2s;
}
.card:hover .card-play, .card:focus-visible .card-play { opacity: 1; scale: 1; }
.card-length { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 4px; align-items: center; padding: 3px 10px; border-radius: 999px; background: rgba(20, 8, 70, 0.8); font-size: 0.85rem; font-weight: 600; }
.card-body { padding: 16px 20px 20px; }
.card-body h3 { margin: 10px 0 6px; }
.card-body p { margin: 0; color: var(--muted); font-size: 1rem; }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Quest map ---------- */
.map-banner img { width: 100%; border-radius: var(--radius); border: 5px solid #fff; box-shadow: var(--shadow); max-height: 380px; object-fit: cover; }
.quest-path {
  list-style: none; margin: 28px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 44px 16px; position: relative;
}
.island:nth-child(even) { translate: 0 26px; }
@media (min-width: 1181px) {
  /* A lone island on the last row of five sits in the middle. */
  .island:last-child:nth-child(5n+1) { grid-column: 3; }
}
.island-inner {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px;
  padding: 18px 8px 16px; border-radius: 40px 40px 999px 999px / 40px 40px 60px 60px;
  background: radial-gradient(circle at 50% 20%, color-mix(in srgb, var(--tone) 55%, #fff 0%), var(--tone-top));
  border: 4px solid #fff; color: #fff; text-decoration: none; box-shadow: var(--shadow);
  transition: transform 0.18s;
}
a.island-inner:hover { transform: translateY(-6px) scale(1.04) rotate(-2deg); }
.island-num {
  position: absolute; top: -14px; left: -8px; width: 36px; height: 36px; display: grid; place-items: center;
  background: var(--yellow); color: #3b1a86; border: 3px solid #fff; border-radius: 50%; font-weight: 700;
}
.island-icon { display: grid; place-items: center; width: 62px; height: 62px; border-radius: 50%; background: rgba(255, 255, 255, 0.25); margin-bottom: 6px; }
.island-name { font-weight: 700; font-size: 1.2rem; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.2); }
.island-blurb { font-size: 0.9rem; opacity: 0.95; }
.island-count { margin-top: 6px; font-size: 0.8rem; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: rgba(20, 8, 70, 0.45); display: inline-flex; gap: 4px; align-items: center; }
.island.locked .island-inner { filter: grayscale(0.65); opacity: 0.75; }
@media (min-width: 641px) and (max-width: 1180px) {
  /* Three per row on a six-column grid, so a last row of one or two islands can be centred. */
  .quest-path { grid-template-columns: repeat(6, 1fr); gap: 40px 16px; }
  .island { grid-column: span 2; }
  .island:nth-child(even) { translate: 0; }
  .island:nth-child(3n+2) { translate: 0 26px; }
  .island:last-child:nth-child(3n+1) { grid-column: 3 / span 2; translate: 0 26px; }
  .island:nth-last-child(2):nth-child(3n+1) { grid-column: 2 / span 2; }
}

/* ---------- Series + teaser ---------- */
.series-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.series-card {
  display: grid; grid-template-columns: 150px 1fr; gap: 18px; align-items: center; padding: 16px;
  background: var(--card); border: 4px solid var(--tone); border-radius: var(--radius); box-shadow: var(--shadow);
  color: var(--text); text-decoration: none; transition: transform 0.18s;
}
.series-card:hover { transform: translateY(-5px) rotate(0.6deg); }
.series-card img { border-radius: 22px; border: 3px solid #fff; }
.series-card p { color: var(--muted); font-size: 1rem; }
.teaser-card {
  display: grid; grid-template-columns: 1.2fr 1fr; overflow: hidden; border-radius: var(--radius); border: 5px solid var(--green);
  background: linear-gradient(135deg, #14532d, #0e7490); color: #fff; text-decoration: none; box-shadow: var(--shadow);
}
.teaser-card img { width: 100%; height: 100%; object-fit: cover; }
.teaser-text { padding: clamp(20px, 4vw, 40px); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.grownups-strip { display: grid; grid-template-columns: 180px 1fr; gap: 24px; align-items: center; background: var(--card); border-radius: var(--radius); padding: 22px; border: 4px dashed var(--line); }
.round-art { border-radius: 50%; border: 5px solid #fff; box-shadow: var(--shadow); aspect-ratio: 1; object-fit: cover; }

/* ---------- Page hero ---------- */
.page-hero { padding: 16px 0 8px; }
.page-hero h1 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-hero.with-art { display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; align-items: center; }
.page-hero-art { border-radius: var(--radius); border: 5px solid #fff; box-shadow: var(--shadow); }
.page-hero.lost { text-align: center; display: flex; flex-direction: column; align-items: center; padding: 30px 0; }
.page-hero.lost img { width: min(300px, 70vw); margin-bottom: 18px; animation: bob 4s ease-in-out infinite; }
.page-hero.lost h1 { justify-content: center; }

/* ---------- Filters ---------- */
.filters { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.filter-group { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 999px; cursor: pointer;
  font: 600 1rem var(--font); color: var(--text); background: rgba(255, 255, 255, 0.08); border: 3px solid var(--tone, #fff);
}
.pill:not([class*='tone-']) { border-color: #fff; }
.pill.active { background: var(--tone, #fff); color: #1e1b4b; }
.pill:not([class*='tone-']).active { background: #fff; }
.empty { text-align: center; color: var(--muted); font-size: 1.2rem; }

/* ---------- Lesson page ---------- */
.crumbs a { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; text-decoration: none; }
.lesson-head { margin: 14px 0 20px; }
.lesson-head h1 { margin-top: 12px; }
.lesson-top { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; align-items: start; }
.lesson-top.is-short { grid-template-columns: minmax(260px, 380px) 1fr; }
.video {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000;
  border: 5px solid var(--tone); box-shadow: var(--shadow), 0 0 50px color-mix(in srgb, var(--tone) 35%, transparent);
}
.video-vertical { aspect-ratio: 9 / 16; }
.video img { width: 100%; height: 100%; object-fit: cover; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-play {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background: rgba(20, 8, 70, 0.25); border: 0; color: #fff; cursor: pointer; font: 700 1.2rem var(--font);
}
.video-play .icon { width: 96px; height: 96px; padding: 24px 20px 24px 28px; border-radius: 50%; background: #ff5c8a; border: 5px solid #fff; box-shadow: var(--shadow); transition: transform 0.15s; }
.video-play:hover .icon { transform: scale(1.1) rotate(-6deg); }
.video-play span { background: rgba(20, 8, 70, 0.75); padding: 4px 14px; border-radius: 999px; }
.video-overlay { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(20, 8, 70, 0.4); }
.bit-says { margin: 0; display: flex; gap: 14px; align-items: flex-start; }
.bit-says h2 { font-size: 1.3rem; display: flex; gap: 8px; align-items: center; }
.bit-says p { color: var(--muted); margin: 0; }
.lesson-top.is-short .bit-says { flex-direction: column; }

.code-window { margin: 16px 0 0; border-radius: 20px; overflow: hidden; border: 4px solid #1e1b4b; background: #0f0a2e; box-shadow: var(--shadow); max-width: 640px; }
.code-window figcaption { display: flex; align-items: center; gap: 10px; padding: 8px 14px; background: #2e1a73; font: 500 0.9rem var(--mono); color: var(--muted); }
.dots { display: inline-flex; gap: 6px; }
.dots i { width: 12px; height: 12px; border-radius: 50%; background: #ff5c8a; }
.dots i:nth-child(2) { background: #fde047; }
.dots i:nth-child(3) { background: #4ade80; }
.code-window pre { margin: 0; padding: 16px 20px; overflow-x: auto; font: 500 1.05rem/1.7 var(--mono); color: #e0e7ff; counter-reset: line; }
.tk-k { color: #f472b6; font-weight: 700; }
.tk-b { color: #22d3ee; }
.tk-s { color: #fde047; }
.tk-n { color: #fb923c; }
.tk-c { color: #a5b4fc; font-style: italic; }

.quiz { border-color: var(--yellow); }
.quiz-q { font-size: 1.35rem; font-weight: 600; }
.quiz-picture { display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: 4px; width: min(100%, calc(var(--cols) * 40px)); margin: 16px 0 0; padding: 10px; border-radius: 16px; background: #24164f; border: 4px solid #1e1b4b; box-shadow: var(--shadow); }
.quiz-picture span { aspect-ratio: 1; border-radius: 6px; background: rgba(255, 255, 255, 0.06); }
.quiz-picture.paper span { background: #fff; display: grid; place-items: center; }
.quiz-picture span i { display: grid; place-items: center; font-style: normal; }
.quiz-picture b { display: grid; place-items: center; font: 700 15px/1 Fredoka, system-ui, sans-serif; }
.quiz-picture .ax-x { color: #67e8f9; padding-top: 2px; }
.quiz-picture .ax-y { color: #fdba74; justify-items: end; padding-right: 4px; }
.quiz-options { display: grid; gap: 12px; margin-top: 18px; }
.quiz-option {
  display: flex; align-items: center; gap: 12px; text-align: left; padding: 14px 18px; border-radius: 20px; cursor: pointer;
  font: 600 1.15rem var(--font); color: var(--text); background: var(--card-2); border: 4px solid #818cf8; box-shadow: 0 6px 0 rgba(20, 8, 70, 0.5);
  transition: transform 0.12s;
}
.quiz-option:hover { transform: translateX(6px); }
.quiz-letter { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: #fff; color: #3b1a86; font-weight: 700; flex: none; }
.quiz-option.right { background: #15803d; border-color: var(--green); }
.quiz-option.wrong { background: #9f1239; border-color: var(--pink); animation: shake 0.4s; }
.quiz-result { margin: 16px 0 0; font-size: 1.2rem; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.quiz-result.right { color: var(--green); }
.quiz-result.wrong { color: #ff8fb0; }
@keyframes shake { 25% { translate: -8px 0; } 75% { translate: 8px 0; } }

.mini-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.mini-card { padding: 18px; border-radius: 22px; background: var(--card-2); border: 4px solid var(--tone); box-shadow: var(--shadow); }
.mini-card p { margin: 0; color: var(--muted); font-size: 1rem; }
.mini-icon { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; background: var(--tone); color: #1e1b4b; margin-bottom: 10px; }

.recap { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center; }
.recap-side { padding: 16px 20px; border-radius: 22px; border: 4px solid; }
.recap-side.oops { border-color: var(--pink); background: rgba(159, 18, 57, 0.35); }
.recap-side.ok { border-color: var(--green); background: rgba(21, 128, 61, 0.35); }
.recap-side h3 { display: flex; gap: 8px; align-items: center; }
.recap-side ul { margin: 0; padding-left: 20px; }
.vs { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--yellow); color: #3b1a86; font-weight: 700; border: 4px solid #fff; animation: spin 8s linear infinite; }
@keyframes spin { to { rotate: 360deg; } }
.verdict { margin: 18px 0 0; text-align: center; font-size: 1.4rem; font-weight: 700; }
.try-it { border-color: var(--green); background: linear-gradient(135deg, rgba(21, 128, 61, 0.55), rgba(8, 145, 178, 0.45)); }
.try-it p { font-size: 1.2rem; margin: 0; }

.pager { display: flex; justify-content: space-between; gap: 16px; margin: 36px 0 12px; }
.pager-link {
  display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-radius: 22px; background: var(--card);
  border: 4px solid var(--line); color: var(--text); text-decoration: none; box-shadow: var(--shadow); max-width: 48%;
}
.pager-link small { display: block; color: var(--yellow); font-weight: 600; }
.pager-link.next { margin-left: auto; text-align: right; }
.coming-next { display: flex; gap: 8px; align-items: center; justify-content: center; color: var(--muted); }

/* ---------- Grown-ups ---------- */
.steps, .path-list { margin: 0; padding-left: 22px; }
.steps li { margin-bottom: 10px; }
.path-list { list-style: none; padding: 0; display: grid; gap: 10px; }
.path-list li { display: flex; align-items: center; gap: 12px; }
.path-list .mini-icon { margin: 0; width: 40px; height: 40px; }

/* ---------- Games (/play/) ----------
   Hub: .game-grid of .game-tile cards. Game pages (body.game-page): one .game-stage panel exactly one screen tall
   (screen height minus the sticky header, measured by client/games.js into --header-h). Inside, .game-bar and the
   controls keep their natural height and the play area (board, arena, pattern) takes whatever is left. */
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 24px; }
.game-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 22px; border-radius: var(--radius);
  background: var(--card-2); border: 5px solid var(--tone); box-shadow: var(--shadow); color: var(--text); text-decoration: none;
  transition: transform 0.15s;
}
.game-tile:hover { transform: translateY(-4px) rotate(-1deg); }
.game-tile h2 { margin: 0; font-size: 1.6rem; }
.game-tile p { margin: 0; color: var(--muted); flex: 1; }
.game-tile-icon { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 24px; background: var(--tone); color: #1e1b4b; box-shadow: 0 5px 0 var(--tone-top); }
.game-tile-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; margin-top: 4px; }
.game-tile-foot small { color: var(--muted); font-weight: 600; }
.game-tile-foot small.done { color: var(--yellow); }

.game-page main { width: min(var(--max), 100% - 20px); padding-top: 10px; }
.game-stage {
  position: relative; display: flex; flex-direction: column; gap: 10px; margin: 0 0 28px;
  height: calc(100vh - var(--header-h, 72px) - 20px);
  height: calc(100dvh - var(--header-h, 72px) - 20px);
  min-height: 340px; padding: clamp(10px, 2vw, 22px); border-color: var(--tone); overflow: hidden;
}
.game-stage.shake { animation: shake 0.35s; }
.game-bar { display: flex; align-items: center; gap: 10px; flex: none; }
.game-bar h1 { display: flex; align-items: center; gap: 8px; margin: 0; flex: 1; min-width: 0; font-size: clamp(1.25rem, 3.2vw, 2rem); white-space: nowrap; }
.game-bar h1 > span { overflow: hidden; text-overflow: ellipsis; }
.game-bar h1 .icon { color: var(--tone); }
.game-back { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 14px; color: var(--text); background: rgba(255, 255, 255, 0.12); border: 3px solid var(--line); }
.game-back:hover { background: rgba(255, 255, 255, 0.22); }
.level-pick { display: flex; align-items: center; gap: 6px; flex: none; padding: 4px; border-radius: 999px; background: rgba(20, 8, 70, 0.55); border: 3px solid var(--line); }
.level-pick button { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer; background: var(--yellow); color: #3b1a86; }
.level-pick button:disabled { background: rgba(255, 255, 255, 0.1); color: var(--muted); opacity: 0.5; cursor: default; }
.level-label { display: flex; flex-direction: column; align-items: center; line-height: 1.1; min-width: 88px; text-align: center; }
.level-label b.done::after { content: ' ★'; color: var(--yellow); }
.level-label small { color: var(--muted); font-size: 0.8rem; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.game-area { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.game-say { margin: 0; min-height: 1.5em; font-weight: 600; font-size: 1.05rem; line-height: 1.35; color: var(--muted); }
.game-say.win { color: var(--green); }
.game-say.oops { color: #ff8fb0; }
.game-pop { position: absolute; inset: 0; z-index: 10; display: grid; place-items: center; padding: 16px; background: rgba(20, 8, 70, 0.72); backdrop-filter: blur(3px); }
.game-pop-card {
  width: min(380px, 100%); padding: 22px; text-align: center; border-radius: var(--radius);
  background: var(--card-2); border: 5px solid #fff; box-shadow: var(--shadow); animation: pop-in 0.3s cubic-bezier(0.3, 1.5, 0.5, 1);
}
.game-pop-card .bit { width: 70px; height: auto; margin: 0 auto 6px; }
.game-pop-card h2 { margin: 0 0 6px; }
.game-pop-card p { color: var(--muted); }
.game-pop-card .cta-row { justify-content: center; }
@keyframes pop-in { from { transform: scale(0.6); opacity: 0; } }

/* Bit's Maze + Bug Hunt. Phones: board on top, controls below, the program as a sideways-scrolling strip.
   Wide or landscape screens: board left, controls right, the program as a list. */
.maze-main { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.maze-board-wrap { flex: 1; min-height: 120px; display: grid; place-items: center; }
.maze-board {
  --cols: 5; --size: 60px;
  position: relative; display: grid; grid-template-columns: repeat(var(--cols), var(--size)); gap: 5px; width: max-content;
  padding: 10px; border-radius: 24px; background: #1e1b4b; border: 4px solid #818cf8;
}
.cell { width: var(--size); height: var(--size); border-radius: calc(var(--size) / 5); background: #3730a3; }
.cell.path { background: linear-gradient(145deg, #a78bfa, #7c3aed); box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.2); }
.cell.path:nth-child(3n) { background: linear-gradient(145deg, #f9a8d4, #db2777); }
.cell.path:nth-child(3n + 1) { background: linear-gradient(145deg, #67e8f9, #0891b2); }
.cell.wall { background: #312e81; opacity: 0.55; }
.cell.trail { outline: 4px solid var(--yellow); outline-offset: -4px; }
.cell.goal { display: grid; place-items: center; font-size: calc(var(--size) * 0.6); color: var(--yellow); text-shadow: 0 0 18px var(--yellow); }
.cell.goal::before { content: '★'; animation: glow 1.4s infinite; }
.maze-bit { position: absolute; left: 10px; top: 10px; width: var(--size); height: var(--size); display: grid; place-items: center; transition: transform 0.28s cubic-bezier(0.3, 1.4, 0.5, 1); pointer-events: none; }
.maze-bit svg { width: 85%; height: auto; }
.maze-bit.bump { animation: shake 0.35s 2; }
.maze-code { flex: none; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.palette { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.block-btn {
  display: grid; place-items: center; height: 58px; border-radius: 18px; cursor: pointer; color: #fff; touch-action: manipulation;
  background: linear-gradient(145deg, #a78bfa, #7c3aed); border: 4px solid #fff; box-shadow: 0 6px 0 rgba(20, 8, 70, 0.55);
}
.block-btn:nth-child(2) { background: linear-gradient(145deg, #f9a8d4, #db2777); }
.block-btn:nth-child(3) { background: linear-gradient(145deg, #67e8f9, #0891b2); }
.block-btn:nth-child(4) { background: linear-gradient(145deg, #86efac, #16a34a); }
.block-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(20, 8, 70, 0.55); }
.block-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.maze-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.maze-actions .btn { padding-block: 9px; }
.maze-count { margin-left: auto; color: var(--muted); font-weight: 600; }
.program {
  list-style: none; margin: 0; padding: 8px; border-radius: 20px; background: rgba(20, 8, 70, 0.5); border: 3px dashed var(--line);
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; min-height: 64px;
}
.program:empty { display: none; }
.program-empty { margin: 0; color: var(--muted); padding: 14px; min-height: 64px; border-radius: 20px; border: 3px dashed var(--line); text-align: center; }
.prog-block {
  flex: none; display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 14px; font-weight: 600;
  background: var(--tone-top); border: 3px solid var(--tone); box-shadow: 0 4px 0 rgba(20, 8, 70, 0.5); position: relative;
}
.prog-block.looped { border-width: 3px 3px 3px 12px; }
.prog-block.running { outline: 4px solid #fff; transform: scale(1.04); }
.prog-block .grow { display: none; flex: 1; }
.prog-dir { display: grid; place-items: center; color: #fff; }
button.prog-dir { border: 3px solid #fff; background: rgba(255, 255, 255, 0.18); border-radius: 12px; padding: 3px; cursor: pointer; }
.prog-times, .prog-del { border: 0; cursor: pointer; font: 700 1rem var(--font); border-radius: 10px; padding: 4px 10px; }
.prog-times { background: var(--yellow); color: #3b1a86; min-width: 48px; }
.prog-del { background: rgba(255, 255, 255, 0.2); color: #fff; display: grid; place-items: center; padding: 4px 6px; }
@media (min-width: 900px), (orientation: landscape) and (min-width: 600px) {
  .maze-main { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: stretch; }
  .maze-board-wrap { min-height: 0; }
  .maze-code { min-height: 0; overflow-y: auto; padding: 4px 6px 8px 2px; }
  .program { flex-direction: column; overflow: visible; }
  .prog-block .grow { display: block; }
}

/* If/Else Sorter. On short screens the two buttons move to the sides of the arena. */
.sorter { flex: 1; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; gap: 10px; }
.sorter-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sorter-rule { font: 500 clamp(0.95rem, 2.4vw, 1.2rem) var(--mono); padding: 6px 12px; border-radius: 12px; background: #1e1b4b; color: var(--yellow); border: 3px solid #818cf8; }
.sorter-hud { margin-left: auto; display: flex; gap: 12px; font-size: 1.15rem; }
.sorter-hud .hearts { color: var(--pink); letter-spacing: 2px; }
.sorter-bit .bit { display: block; }
.sorter-arena { position: relative; flex: 1; min-height: 140px; border-radius: 22px; overflow: hidden; background: rgba(20, 8, 70, 0.5); border: 3px dashed var(--line); touch-action: pan-y; }
.sorter-thing {
  position: absolute; left: 50%; top: 8px; display: grid; place-items: center;
  width: clamp(70px, 18vmin, 110px); height: clamp(70px, 18vmin, 110px); font-size: clamp(2.6rem, 11vmin, 4.2rem); line-height: 1;
  border-radius: 26px; background: #fff; border: 5px solid var(--tone); box-shadow: 0 6px 0 rgba(20, 8, 70, 0.5); transform: translate(-50%, 0);
}
.sorter-thing.is-number { color: #3b1a86; font-weight: 700; }
.bin { position: absolute; bottom: 8px; width: 42%; padding: 8px 10px; border-radius: 16px; text-align: center; font-weight: 700; line-height: 1.2; opacity: 0.85; }
.bin b { display: block; font-family: var(--mono); font-size: 0.85rem; opacity: 0.8; }
.bin-yes { left: 8px; background: #166534; border: 3px solid var(--green); }
.bin-no { right: 8px; background: #9f1239; border: 3px solid var(--pink); }
.bin.flash-right { animation: bin-yes 0.5s; }
.bin.flash-wrong { animation: shake 0.4s; }
@keyframes bin-yes { 50% { transform: scale(1.08); opacity: 1; box-shadow: 0 0 30px var(--green); } }
.sorter-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sort-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 70px; padding: 8px 10px; border-radius: 20px;
  border: 4px solid #fff; cursor: pointer; font: 700 1.1rem var(--font); color: #fff; line-height: 1.2; box-shadow: 0 6px 0 rgba(20, 8, 70, 0.55); touch-action: manipulation;
}
.sort-btn b { font-family: var(--mono); display: block; font-size: 0.9rem; opacity: 0.85; }
.sort-yes { background: linear-gradient(145deg, #4ade80, #16a34a); }
.sort-no { background: linear-gradient(145deg, #fb7185, #e11d48); }
.sort-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(20, 8, 70, 0.55); }

/* Loop Spotter */
.pattern { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; gap: clamp(12px, 3vh, 26px); overflow-y: auto; }
.pattern-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.pat-tile {
  --t: clamp(34px, 9.5vmin, 76px);
  display: grid; place-items: center; width: var(--t); height: var(--t); font-size: calc(var(--t) * 0.58); line-height: 1;
  border-radius: 16px; background: rgba(255, 255, 255, 0.92); border-bottom: 6px solid #a78bfa;
}
.pat-tile.g1 { border-bottom-color: #22d3ee; }
.pat-ask { background: var(--yellow); color: #3b1a86; font-weight: 700; animation: pulse 1.2s infinite; border-bottom-color: #ca8a04; }
@keyframes pulse { 50% { transform: scale(1.1); box-shadow: 0 0 22px var(--yellow); } }
.pat-new { animation: pop-in 0.35s cubic-bezier(0.3, 1.5, 0.5, 1); outline: 4px solid var(--green); }
.pattern-loop { display: flex; align-self: center; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 18px; background: #1e1b4b; border: 3px solid var(--yellow); font-family: var(--mono); color: var(--yellow); }
.pattern-loop .pat-tile { --t: 40px; }
.pattern-loop[hidden] { display: none; }
.pattern-options { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.pat-option {
  --o: clamp(56px, min(19vw, 12vh), 110px); width: var(--o); height: var(--o); font-size: calc(var(--o) * 0.5); line-height: 1; cursor: pointer;
  border-radius: 24px; background: var(--card); border: 4px solid #fff; box-shadow: 0 6px 0 rgba(20, 8, 70, 0.55); touch-action: manipulation;
}
.pat-option:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(20, 8, 70, 0.55); }
.pat-option.wrong { background: #9f1239; border-color: var(--pink); animation: shake 0.4s; opacity: 0.6; }
.pat-option.right { background: #166534; border-color: var(--green); }
.pattern-dots { display: flex; justify-content: center; gap: 8px; }
.pattern-dots i { width: 14px; height: 14px; border-radius: 50%; background: rgba(255, 255, 255, 0.2); }
.pattern-dots i.now { background: var(--yellow); }
.pattern-dots i.done { background: var(--green); }

@media (max-width: 640px) {
  .game-stage { padding: 10px; border-width: 3px; }
  .game-bar h1 .icon { display: none; }
  .level-label { min-width: 64px; }
  .level-label small { display: none; }
  .level-pick button { width: 32px; height: 32px; }
  .game-back { width: 36px; height: 36px; }
  .sorter-bit { display: none; }
  .game-say { font-size: 0.95rem; }
}
/* Phones: the site header shrinks to one row of icons on game pages, leaving the screen to the game, and the hub's
   big picture hides so the game cards come first. */
@media (max-width: 640px), (max-height: 520px) {
  .game-page .site-header { flex-wrap: nowrap; justify-content: flex-start; gap: 8px; padding-block: 6px; }
  .game-page .logo-text { display: none; }
  .game-page .site-header nav { width: auto; margin-left: auto; }
  .game-page .site-header nav a { padding: 7px; }
  .game-page .site-header nav a span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .game-page .header-sub { position: static; }
  .play-hub .page-hero-art { display: none; }
}
@media (max-width: 640px) {
  .play-hub + .section { margin-top: 16px; }
  .game-grid { gap: 16px; }
  .game-tile { display: grid; grid-template-columns: 60px minmax(0, 1fr); gap: 4px 14px; padding: 14px; align-items: center; }
  .game-tile-icon { width: 60px; height: 60px; border-radius: 18px; grid-row: span 2; }
  .game-tile-icon .icon { width: 34px; height: 34px; }
  .game-tile h2 { font-size: 1.35rem; }
  .game-tile .chip { justify-self: start; font-size: 0.85rem; }
  .game-tile p, .game-tile-foot { grid-column: 1 / -1; font-size: 0.98rem; }
}
/* Short screens (phones on their side): squeeze the fixed parts so the board keeps its room. */
@media (max-height: 520px) {
  .game-stage { min-height: 300px; gap: 6px; padding: 8px; }
  .game-area, .maze-code { gap: 6px; }
  .block-btn { height: 44px; }
  .sorter { grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; gap: 6px 10px; }
  .sorter-top, .sorter .game-say { grid-column: 1 / -1; }
  .sorter-buttons { display: contents; }
  .sort-yes { grid-area: 2 / 1; }
  .sort-no { grid-area: 2 / 3; }
  .sort-btn { flex-direction: column; }
  .sort-no svg { order: -1; }
  .sorter .bin { display: none; }
  .program, .program-empty { min-height: 48px; }
}

/* ---------- Confetti (client/main.js) ---------- */
.confetti { position: fixed; top: -20px; width: 12px; height: 18px; z-index: 60; pointer-events: none; border-radius: 3px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

/* ---------- Footer ---------- */
.site-footer { margin-top: 40px; padding: 30px 16px 26px; background: rgba(20, 8, 70, 0.6); border-top: 3px solid rgba(233, 213, 255, 0.2); }
.footer-inner { width: min(var(--max), 100%); margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; align-items: center; }
.footer-brand { display: flex; gap: 14px; align-items: center; }
.footer-brand p { margin: 0; color: var(--muted); }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-links a { color: var(--text); font-weight: 600; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.footer-links a:hover { color: var(--yellow); }
.footer-small { text-align: center; color: var(--muted); font-size: 0.9rem; margin: 22px 0 0; }
.art-missing { display: grid; place-items: center; aspect-ratio: 16 / 9; background: var(--card-2); color: var(--yellow); border-radius: inherit; }

/* ---------- Small screens ---------- */
@media (max-width: 900px) {
  .hero, .page-hero.with-art, .lesson-top, .lesson-top.is-short, .teaser-card { grid-template-columns: minmax(0, 1fr); }
  .hero-bit { position: static; flex-direction: row; align-items: center; margin-top: -40px; padding-left: 8px; }
  .hero-bit .bubble { order: 2; margin: 0 0 0 8px; }
  .hero-bit .bubble::after { left: -14px; bottom: 50%; border: 8px solid transparent; border-right: 10px solid #fff; }
  .lesson-top.is-short .video { max-width: 380px; margin: 0 auto; width: 100%; }
  .page-hero-art { max-width: min(480px, 100%); }
}
@media (max-width: 640px) {
  body { font-size: 17px; }
  .site-header { flex-wrap: wrap; justify-content: center; padding-block: 8px; }
  .site-header nav { width: 100%; }
  .site-header ul { justify-content: space-between; }
  .site-header nav a { flex-direction: column; gap: 0; padding: 4px 10px; font-size: 0.85rem; }
  .logo { font-size: 1.15rem; }
  .series-card, .grownups-strip { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .series-card img { max-width: 160px; }
  .grownups-strip img { max-width: 160px; }
  .island:nth-child(even) { translate: 0; }
  .quest-path { grid-template-columns: repeat(4, 1fr); }
  .island { grid-column: span 2; }
  .island:last-child:nth-child(odd) { grid-column: 2 / span 2; }
  .recap { grid-template-columns: 1fr; justify-items: center; }
  .recap-side { width: 100%; }
  .pager { flex-direction: column; }
  .pager-link { max-width: 100%; }
  .bit-says { flex-direction: column; align-items: center; text-align: center; }
  .bit-says h2 { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* Grid children may shrink below their content (wide images, code) instead of widening the page. */
.hero > *, .page-hero.with-art > *, .lesson-top > *, .teaser-card > *, .series-card > *, .grownups-strip > * { min-width: 0; }
.hero-small { width: min(260px, 100%); justify-self: center; }

/* ---------- YouTube subscribe ---------- */
.btn-youtube { background: #ff0033; color: #fff; }
.btn-youtube:hover { background: #ff2a55; }
.header-sub { flex: none; }
.site-header nav { margin-left: auto; }
.footer-sub { flex: none; }
.channel-banner {
  display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; margin: 56px 0;
  padding: clamp(20px, 3vw, 30px); border-radius: var(--radius); border: 5px solid #fff;
  background: linear-gradient(120deg, #e11d48, #db2777 45%, #9333ea); box-shadow: var(--shadow), 0 0 50px rgba(255, 0, 51, 0.35);
}
.channel-banner h2 { margin: 0 0 4px; }
.channel-banner p { margin: 0; color: #ffe4ec; }
.channel-banner small { display: block; opacity: 0.85; margin-top: 4px; }
.channel-banner .cta-row { margin: 0; }
.channel-icon { display: grid; place-items: center; width: 96px; height: 96px; border-radius: 28px; background: #fff; color: #ff0033; animation: bob 3s ease-in-out infinite; }
.bit-says .cta-row { margin-top: 14px; }
@media (max-width: 900px) {
  .channel-banner { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .channel-banner .cta-row { justify-content: center; }
}
@media (max-width: 640px) {
  .header-sub { position: absolute; right: 12px; top: 10px; }
  .site-header { position: sticky; }
  .site-header .logo { margin-right: auto; }
  .site-header { justify-content: flex-start; }
}
