/* Shivyu web shell. Colors match UIColorPalette.cs; fonts are the game's own (Fredoka, Nunito). */
@font-face { font-family: 'Fredoka'; src: url('/fonts/Fredoka-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Fredoka'; src: url('/fonts/Fredoka-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Nunito'; src: url('/fonts/Nunito-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }

:root {
  --pink: #ff7091;
  --pink-dark: #e04f73;
  --blue: #4a8fe3;
  --blue-dark: #1d3f73;
  --yellow: #ffc733;
  --yellow-dark: #e0a300;
  --cream: #fff7eb;
  --green: #4abf66;
  --ink: #262121;
  --ink-soft: #5e5656;
  --white: #fff;
  --radius: 20px;
  --shadow: 0 6px 0 rgba(0, 0, 0, .12), 0 12px 28px rgba(29, 63, 115, .18);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 1.0625rem/1.6 'Nunito', system-ui, sans-serif;
  color: var(--ink);
  background: var(--cream);
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, .btn, .brand, .logo { font-family: 'Fredoka', 'Nunito', system-ui, sans-serif; font-weight: 700; line-height: 1.15; }
h2 { font-size: clamp(2rem, 4vw, 2.75rem); margin: 0 0 .4em; color: var(--blue-dark); }
h3 { font-size: 1.35rem; margin: 0 0 .35em; }
a { color: var(--blue-dark); }
:focus-visible { outline: 4px solid var(--yellow); outline-offset: 3px; border-radius: 8px; }

.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--white); padding: 8px 16px; border-radius: 12px; }
.skip-link:focus { left: calc(8px + var(--safe-l)); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  min-height: 48px; padding: .55em 1.4em;
  border: 0; border-radius: 999px; cursor: pointer; text-decoration: none;
  font-size: 1.15rem; letter-spacing: .02em;
  color: var(--white); background: var(--pink); box-shadow: 0 5px 0 var(--pink-dark);
  transition: transform .08s, box-shadow .08s;
}
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--pink-dark); }
.btn-play { font-size: clamp(1.4rem, 3vw, 1.9rem); padding: .55em 1.8em; color: var(--ink); background: var(--yellow); box-shadow: 0 6px 0 var(--yellow-dark), 0 14px 30px rgba(0, 0, 0, .22); }
.btn-play:active { box-shadow: 0 2px 0 var(--yellow-dark); animation: none; }
.btn-ghost { color: var(--white); background: rgba(29, 63, 115, .55); box-shadow: 0 4px 0 rgba(0, 0, 0, .2); backdrop-filter: blur(4px); }
.btn-small { min-height: 40px; font-size: 1rem; padding: .35em 1.1em; }

.install-only, .ios-only { display: none; }
.can-install .install-only, .is-ios .ios-only { display: inline-flex; }
.is-standalone .install-only, .is-standalone .ios-only { display: none; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: calc(10px + var(--safe-t)) calc(20px + var(--safe-r)) 10px calc(20px + var(--safe-l));
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px);
  box-shadow: 0 2px 12px rgba(29, 63, 115, .12);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--blue-dark); font-size: 1.5rem; letter-spacing: .12em; font-kerning: none; }
.brand img { border-radius: 10px; }
.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav a:not(.btn) { padding: 8px 12px; border-radius: 12px; text-decoration: none; font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 1.05rem; color: var(--ink); }
.site-nav a:not(.btn):hover { background: var(--cream); }
.menu-toggle { display: none; }

/* Hero */
.hero {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1.1fr .9fr; align-items: center;
  min-height: min(88vh, 820px);
  padding: 48px calc(5vw + var(--safe-r)) 64px calc(5vw + var(--safe-l));
  background: url('/images/hero-bg.jpg') center bottom / cover no-repeat, var(--blue);
}
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(29, 63, 115, .55), rgba(29, 63, 115, 0) 60%); pointer-events: none; }
.hero-inner { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.hero-char { width: min(440px, 100%); filter: drop-shadow(0 16px 20px rgba(0, 0, 0, .3)); animation: bob 1.6s ease-in-out infinite; }
.logo { margin: 0; display: flex; flex-direction: column; align-items: inherit; color: var(--white); text-shadow: 0 4px 0 var(--blue-dark), 0 8px 24px rgba(0, 0, 0, .35); }
/* Each letter is its own "block": a real gap between letters (the stroke no longer eats the spacing, so I and V stay apart). */
.logo-main { display: flex; gap: .1em; font-size: clamp(3.4rem, 10vw, 7rem); font-kerning: none; -webkit-text-stroke: 3px var(--blue-dark); paint-order: stroke fill; }
.logo-main span { display: inline-block; animation: letter-in .55s cubic-bezier(.3, 1.6, .5, 1) calc(var(--i) * 70ms) backwards, wave 3.2s ease-in-out calc(var(--i) * 120ms + 1s) infinite; }
.logo-main span:nth-child(1) { color: var(--yellow); rotate: -6deg; }
.logo-main span:nth-child(2) { color: var(--pink); rotate: 4deg; }
.logo-main span:nth-child(3) { color: var(--white); rotate: -3deg; margin-inline: .04em; }
.logo-main span:nth-child(4) { color: var(--green); rotate: 5deg; margin-inline: .04em; }
.logo-main span:nth-child(5) { color: var(--white); rotate: -4deg; }
.logo-main span:nth-child(6) { color: var(--yellow); rotate: 6deg; }
.logo-sub { font-size: clamp(1.4rem, 4vw, 2.4rem); color: var(--yellow); letter-spacing: .2em; -webkit-text-stroke: 2px var(--blue-dark); paint-order: stroke fill; }
.tagline { margin: 0; font: 600 clamp(1.2rem, 2.4vw, 1.6rem) 'Fredoka', sans-serif; color: var(--white); text-shadow: 0 2px 6px rgba(0, 0, 0, .4); }
.hero-note { margin: 0; color: var(--white); font-weight: 700; text-shadow: 0 2px 6px rgba(0, 0, 0, .45); }

.perks {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 36px;
  margin: 0; padding: 18px 20px; list-style: none;
  background: var(--blue-dark); color: var(--white); font: 600 1.15rem 'Fredoka', sans-serif;
}
.perks li::before { content: '★ '; color: var(--yellow); }

/* Sections */
.section { max-width: 1180px; margin: 0 auto; padding: 72px calc(24px + var(--safe-r)) 24px calc(24px + var(--safe-l)); scroll-margin-top: 64px; }
.lead { margin-top: 0; font-size: 1.15rem; color: var(--ink-soft); }

.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 0; list-style: none; }
.feature-grid li { padding: 20px; border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow); text-align: center; }
.feature-grid img { width: 140px; height: 140px; object-fit: contain; margin: 0 auto 8px; }
.feature-grid img.small { width: 84px; height: 84px; margin: 28px auto 36px; }
.feature-grid p { margin: 0; color: var(--ink-soft); }

.world-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; padding: 0; list-style: none; }
.world-card { position: relative; overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow); background: var(--blue-dark); aspect-ratio: 16 / 9; }
.world-card img { width: 100%; height: 100%; object-fit: cover; }
.world-card::after { content: ''; position: absolute; inset: 40% 0 0; background: linear-gradient(transparent, rgba(0, 0, 0, .72)); }
.world-chapter, .world-name { position: absolute; left: 14px; z-index: 1; color: var(--white); font-family: 'Fredoka', sans-serif; }
.world-chapter { bottom: 36px; font-weight: 600; font-size: .85rem; color: var(--yellow); letter-spacing: .08em; text-transform: uppercase; }
.world-name { bottom: 10px; font-weight: 700; font-size: 1.2rem; }

.char-card { display: grid; grid-template-columns: 220px 1fr; align-items: center; gap: 28px; padding: 24px; border-radius: var(--radius); background: linear-gradient(135deg, #bfe0ff, #e9f4ff); box-shadow: var(--shadow); }
.char-card img { width: 220px; }
.char-card p { margin: .4em 0 0; }
.badge { display: inline-block; padding: 2px 12px; border-radius: 999px; background: var(--green); color: var(--white); font: 600 .95rem 'Fredoka', sans-serif; }

.mission-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; padding: 0; list-style: none; }
.mission-list li { padding: 14px 18px 14px 52px; border-radius: 16px; background: var(--white) url('/images/coin.png') 14px center / 26px no-repeat; box-shadow: 0 3px 0 rgba(0, 0, 0, .08); font-weight: 700; }

.about p { max-width: 720px; font-size: 1.2rem; }

.help-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.help-grid article { padding: 22px; border-radius: var(--radius); background: var(--white); box-shadow: 0 3px 0 rgba(0, 0, 0, .08); }
.help-grid dl { margin: 0; }
.help-grid dt { font-weight: 700; }
.help-grid dd { margin: 0 0 .6em; color: var(--ink-soft); }
.help-grid ul, .help-grid ol { padding-left: 1.2em; }

.cta { display: flex; flex-direction: column; align-items: center; gap: 16px; padding-bottom: 72px; text-align: center; }
.cta .btn-ghost { background: var(--blue); }

.site-footer { padding: 24px 20px calc(24px + var(--safe-b)); text-align: center; color: var(--white); background: var(--blue-dark); }
.site-footer p { margin: 0; }

.update-banner {
  position: fixed; z-index: 50; left: 50%; bottom: calc(16px + var(--safe-b)); transform: translateX(-50%);
  display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 20px;
  border-radius: 999px; background: var(--blue-dark); color: var(--white); box-shadow: var(--shadow);
  font: 600 1rem 'Fredoka', sans-serif; white-space: nowrap;
}

/* ---- Game layer: coin HUD, coin hunt, tap-to-jump ---- */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.coin-hud {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 14px 4px 5px; border-radius: 999px;
  background: var(--blue-dark); color: var(--yellow); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .25);
  font: 700 1.15rem 'Fredoka', sans-serif; font-variant-numeric: tabular-nums;
}
.coin-hud img { width: 26px; height: 26px; }
.coin-hud.bump { animation: bump .35s ease-out; }

.hero-char-btn { position: relative; z-index: 1; justify-self: center; padding: 0; border: 0; background: none; cursor: pointer; }
.hero-char-btn.jump .hero-char { animation: jump .6s cubic-bezier(.3, .7, .4, 1); }
.jump-hint {
  position: absolute; top: 24%; right: 14%; padding: 4px 14px; border-radius: 999px 999px 999px 4px;
  background: var(--white); color: var(--pink-dark); font: 700 1.1rem 'Fredoka', sans-serif;
  box-shadow: 0 4px 0 rgba(0, 0, 0, .15); animation: wave 2s ease-in-out infinite;
}
.hero-char-btn.tapped .jump-hint { display: none; }

.quest {
  display: grid; gap: 6px; width: min(360px, 100%); margin-top: 8px; padding: 12px 16px;
  border-radius: 18px; background: rgba(29, 63, 115, .7); backdrop-filter: blur(6px);
  color: var(--white); box-shadow: 0 4px 0 rgba(0, 0, 0, .2);
}
.quest-head { display: flex; justify-content: space-between; font: 700 1.1rem 'Fredoka', sans-serif; }
.quest-head b { color: var(--yellow); font-variant-numeric: tabular-nums; }
.quest-bar { height: 12px; border-radius: 999px; background: rgba(0, 0, 0, .3); overflow: hidden; }
.quest-bar span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(var(--yellow), var(--yellow-dark)); transition: width .4s cubic-bezier(.3, 1.4, .5, 1); }
.quest p { margin: 0; font-size: .95rem; }
.quest.done { background: rgba(38, 120, 60, .8); }
.quest.done .quest-bar span { background: linear-gradient(#8ee6a2, var(--green)); }

.section { position: relative; }
.feature-grid li { position: relative; }
.coin-pickup {
  position: absolute; z-index: 3; width: 44px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer;
  filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .25)); animation: coin-spin 2.4s ease-in-out infinite;
}
.coin-pickup img { width: 100%; height: 100%; }
.coin-pop {
  position: fixed; z-index: 60; translate: -50% -50%; pointer-events: none;
  font: 700 1.6rem 'Fredoka', sans-serif; color: var(--yellow);
  -webkit-text-stroke: 2px var(--blue-dark); paint-order: stroke fill;
  animation: pop-up .9s ease-out forwards;
}

/* Play button: glint sweep + gentle pulse */
.btn-play { position: relative; overflow: hidden; animation: pulse 2.2s ease-in-out infinite; }
.btn-play::after { content: ''; position: absolute; inset: 0 auto 0 -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .7), transparent); animation: glint 3s ease-in-out infinite; }

/* HUD-style perks */
.perks li { padding: 4px 16px; border-radius: 999px; background: rgba(255, 255, 255, .1); }

/* Level-select world cards */
.world-card { transition: transform .2s cubic-bezier(.3, 1.6, .5, 1), box-shadow .2s; }
.world-card:hover { transform: translateY(-6px) rotate(-1deg); box-shadow: 0 10px 0 rgba(0, 0, 0, .12), 0 18px 32px rgba(29, 63, 115, .28); }
.world-card img { transition: scale .4s; }
.world-card:hover img { scale: 1.06; }
.world-card:first-child::before {
  content: 'START HERE'; position: absolute; z-index: 2; top: 12px; right: 12px; padding: 3px 12px; border-radius: 999px;
  background: var(--yellow); color: var(--ink); font: 700 .8rem 'Fredoka', sans-serif; letter-spacing: .06em; box-shadow: 0 3px 0 var(--yellow-dark);
}

/* Missions as quest cards */
.mission-list li { transition: transform .15s; }
.mission-list li:hover { transform: translateY(-3px); }

@keyframes bob { 50% { transform: translateY(-12px); } }
@keyframes letter-in { from { opacity: 0; transform: translateY(-60%) scale(.4); } }
@keyframes wave { 0%, 60%, 100% { transform: none; } 30% { transform: translateY(-8%); } }
@keyframes jump { 40% { transform: translateY(-38%) rotate(-6deg); } 70% { transform: translateY(4%) scaleY(.94); } }
@keyframes bump { 40% { transform: scale(1.25); } }
@keyframes coin-spin { 50% { transform: scaleX(.3) translateY(-4px); } }
@keyframes pop-up { from { opacity: 1; transform: translateY(0) scale(.6); } 30% { transform: translateY(-20px) scale(1.2); } to { opacity: 0; transform: translateY(-70px) scale(1); } }
@keyframes pulse { 50% { transform: scale(1.04); } }
@keyframes glint { 0%, 55% { left: -60%; } 100% { left: 130%; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Tablet */
@media (max-width: 1024px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile */
@media (max-width: 600px) {
  .menu-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 48px; height: 48px; padding: 12px; border: 0; border-radius: 14px; background: var(--cream); cursor: pointer;
  }
  .menu-toggle span { height: 3px; border-radius: 2px; background: var(--blue-dark); transition: transform .2s, opacity .2s; }
  .menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 12px calc(16px + var(--safe-r)) 20px calc(16px + var(--safe-l));
    background: var(--white); box-shadow: 0 12px 24px rgba(29, 63, 115, .18);
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a:not(.btn) { padding: 14px; font-size: 1.2rem; }
  .site-nav .btn { margin-top: 8px; min-height: 52px; }

  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 32px; min-height: auto; }
  .hero::after { background: linear-gradient(rgba(29, 63, 115, .45), rgba(29, 63, 115, .15)); }
  .hero-inner { align-items: center; }
  .hero-char-btn { order: -1; margin-bottom: -12px; }
  .hero-char { width: 220px; }
  .quest { align-self: stretch; text-align: left; }
  .coin-hud { font-size: 1rem; }
  .btn-play { width: 100%; max-width: 340px; min-height: 60px; }
  .section { padding-top: 56px; }
  .feature-grid, .help-grid { grid-template-columns: 1fr; }
  .char-card { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .char-card img { width: 180px; }
  .update-banner { left: 12px; right: 12px; transform: none; justify-content: space-between; white-space: normal; }
}

/* ==== Game-menu skin: sky backdrop, outlined "windows" with title plates, chunky controls ==== */
body { background: linear-gradient(#72c2ff, #b9e3ff 45%, #e4f5ff) fixed; }
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .85;
  background:
    radial-gradient(ellipse 90px 34px at 12% 22%, #fff 98%, transparent),
    radial-gradient(ellipse 60px 40px at 16% 18%, #fff 98%, transparent),
    radial-gradient(ellipse 110px 38px at 62% 58%, #fff 98%, transparent),
    radial-gradient(ellipse 70px 46px at 66% 53%, #fff 98%, transparent),
    radial-gradient(ellipse 80px 28px at 88% 12%, #fff 98%, transparent);
  background-size: 1100px 700px;
  animation: clouds 90s linear infinite;
}
@keyframes clouds { to { background-position: 1100px 0; } }

.site-header { background: var(--white); box-shadow: none; border-bottom: 4px solid var(--blue-dark); }

.btn { border: 3px solid var(--blue-dark); box-shadow: 0 5px 0 var(--blue-dark); }
.btn:active { box-shadow: 0 1px 0 var(--blue-dark); }
.btn-play { border-width: 4px; box-shadow: 0 7px 0 var(--blue-dark), 0 16px 30px rgba(0, 0, 0, .25); }
.btn-play:active { box-shadow: 0 2px 0 var(--blue-dark); }
.btn-ghost { box-shadow: 0 4px 0 var(--blue-dark); }

.play-wrap { position: relative; display: flex; }
.play-sparkle { position: absolute; inset: -22px -30px; pointer-events: none; z-index: 1; }
.play-wrap .btn-play { flex: 1; }

.perks { border-block: 4px solid #122a4f; }

/* Sections are game windows floating on the sky */
.section {
  width: calc(100% - 32px - var(--safe-l) - var(--safe-r)); margin: 72px auto 0;
  padding: 60px 28px 32px;
  background: var(--cream); border: 4px solid var(--blue-dark); border-radius: 32px;
  box-shadow: 0 8px 0 var(--blue-dark), 0 24px 40px rgba(29, 63, 115, .18);
  scroll-margin-top: 110px;
}
.section > h2 {
  position: absolute; top: 0; left: 50%; transform: translate(-50%, -58%);
  margin: 0; padding: .18em 1.1em; white-space: nowrap;
  font-size: clamp(1.5rem, 3.4vw, 2.2rem); letter-spacing: .04em; color: var(--white);
  background: var(--pink); border: 4px solid var(--blue-dark); border-radius: 18px;
  box-shadow: 0 6px 0 var(--blue-dark); -webkit-text-stroke: 2px var(--blue-dark); paint-order: stroke fill;
}
#warmup > h2 { background: var(--yellow); }
#chapters > h2 { background: var(--green); }
#missions > h2 { background: var(--blue); }
#help > h2 { background: var(--yellow); }
.section > .lead { max-width: 60ch; margin: 0 auto 24px; text-align: center; }
.cta { padding-block: 64px 40px; }
.cta > h2 { position: static; transform: none; }

/* Chunky cards */
.feature-grid li, .help-grid article, .mission-list li, .world-card {
  border: 3px solid var(--blue-dark); box-shadow: 0 5px 0 var(--blue-dark);
}
.world-card:hover { box-shadow: 0 10px 0 var(--blue-dark); }
.level-node {
  position: absolute; z-index: 2; top: 10px; left: 10px; display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%; background: var(--yellow); color: var(--ink);
  border: 3px solid var(--blue-dark); box-shadow: 0 3px 0 var(--blue-dark);
  font: 700 1.25rem 'Fredoka', sans-serif; font-variant-numeric: tabular-nums;
}

kbd {
  display: inline-block; min-width: 1.9em; padding: 0 .45em; border-radius: 8px; text-align: center;
  font: 700 .9em 'Fredoka', sans-serif; color: var(--ink); background: var(--white);
  border: 2px solid var(--blue-dark); box-shadow: 0 3px 0 var(--blue-dark);
}

/* Warm-up runner */
.runner { position: relative; overflow: hidden; border: 4px solid var(--blue-dark); border-radius: 20px; background: #8fd0ff; }
.runner canvas { display: block; width: 100%; height: auto; touch-action: manipulation; cursor: pointer; }
.runner canvas:focus-visible { outline-offset: -6px; }
.runner-hud {
  position: absolute; top: 10px; left: 10px; right: 10px; display: flex; justify-content: space-between; pointer-events: none;
}
.runner-hud span {
  padding: 2px 12px; border-radius: 999px; background: rgba(29, 63, 115, .85); color: var(--white);
  font: 600 .95rem 'Fredoka', sans-serif;
}
.runner-hud b { color: var(--yellow); font-variant-numeric: tabular-nums; }
.runner-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  border: 0; cursor: pointer; background: rgba(29, 63, 115, .45); color: var(--white);
  font: 700 clamp(1.4rem, 4vw, 2.4rem) 'Fredoka', sans-serif; -webkit-text-stroke: 2px var(--blue-dark); paint-order: stroke fill;
}
.runner-overlay small { font: 600 1rem 'Nunito', sans-serif; -webkit-text-stroke: 0; }
.runner-overlay:focus-visible { outline-offset: -8px; }

.fx-burst { position: fixed; z-index: 70; translate: -50% -50%; pointer-events: none; }

/* Ground strip */
.site-footer { margin-top: 72px; padding-top: 40px; background: linear-gradient(var(--green) 0 14px, var(--blue-dark) 14px 18px, #7a4b2a 18px); }

@media (max-width: 600px) {
  .section { padding: 52px 16px 24px; border-radius: 24px; margin-top: 60px; }
  .section > h2 { font-size: 1.4rem; }
  .play-wrap { width: 100%; max-width: 340px; }
  .runner-overlay small { font-size: .85rem; }
}

/* The last chapter is the finale: a full-width banner card, so it never sits alone in a row */
.world-card:last-child { grid-column: 1 / -1; aspect-ratio: auto; height: clamp(160px, 22vw, 240px); }
.world-card:last-child::before {
  content: 'FINAL CHAPTER'; position: absolute; z-index: 2; top: 12px; right: 12px; padding: 3px 12px; border-radius: 999px;
  background: var(--pink); color: var(--white); font: 700 .8rem 'Fredoka', sans-serif; letter-spacing: .06em;
  border: 2px solid var(--blue-dark); box-shadow: 0 3px 0 var(--blue-dark);
}
.world-card:last-child .world-name { font-size: 1.6rem; }
