/* ============================================================
   Arrow Maze Master — Light toy-morphism / casual game UI
   Palette: Sky Blue #42A5F5, Sunshine #FFD54F, Green #66BB6A, Red #EF5350
   Typography: Fredoka (headings) + Nunito (body)
   ============================================================ */

:root {
  --sky-top: #87CEEB;
  --sky-mid: #64B5F6;
  --sky-deep: #42A5F5;
  --yellow: #FFD54F;
  --yellow-dark: #F9A825;
  --green: #66BB6A;
  --green-dark: #43A047;
  --red: #EF5350;
  --red-dark: #E53935;
  --white: #FFFFFF;
  --ink: #1A237E;
  --ink-muted: #3949AB;
  --card-shadow: 0 8px 0 rgba(26, 35, 126, 0.12), 0 16px 32px rgba(66, 165, 245, 0.2);
  --pill-shadow: 0 4px 0 var(--green-dark), 0 8px 16px rgba(67, 160, 71, 0.35);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-pill: 999px;
  --font-display: "Fredoka", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, sans-serif;
  --hud-h: 72px;
  --transition: 200ms ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--hud-h) + 24px);
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 45%, #BBDEFB 100%);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; border: none; cursor: pointer; background: none; }
ul, ol { list-style: none; }

.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 9999;
  padding: 10px 18px;
  background: var(--white);
  border-radius: var(--radius-pill);
  font-weight: 700;
  box-shadow: var(--card-shadow);
}
.skip-link:focus { top: 16px; }

/* ---- Sky & floating decorations ---- */
.sky-scene {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.cloud {
  position: absolute;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 100px;
  filter: blur(1px);
}
.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  background: inherit;
  border-radius: 50%;
}
.cloud--1 { width: 180px; height: 50px; top: 8%; left: -5%; animation: drift 28s linear infinite; }
.cloud--1::before { width: 70px; height: 70px; top: -35px; left: 30px; }
.cloud--1::after  { width: 90px; height: 90px; top: -45px; left: 80px; }

.cloud--2 { width: 140px; height: 42px; top: 18%; right: 5%; animation: drift 34s linear infinite reverse; opacity: 0.7; }
.cloud--2::before { width: 55px; height: 55px; top: -28px; left: 20px; }
.cloud--2::after  { width: 70px; height: 70px; top: -35px; left: 60px; }

.cloud--3 { width: 200px; height: 55px; top: 55%; left: 60%; animation: drift 40s linear infinite; opacity: 0.5; }
.cloud--3::before { width: 80px; height: 80px; top: -40px; left: 40px; }
.cloud--3::after  { width: 100px; height: 100px; top: -50px; left: 90px; }

.cloud--4 { width: 120px; height: 38px; top: 75%; left: 10%; animation: drift 30s linear infinite reverse; opacity: 0.6; }
.cloud--4::before { width: 50px; height: 50px; top: -25px; left: 15px; }
.cloud--4::after  { width: 65px; height: 65px; top: -32px; left: 50px; }

@keyframes drift {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(100vw + 200px)); }
}

.float-deco {
  position: absolute;
  opacity: 0.85;
}
.float-deco--coin {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #FFF59D, var(--yellow) 50%, var(--yellow-dark));
  border: 3px solid var(--white);
  box-shadow: 0 4px 8px rgba(249, 168, 37, 0.4);
}
.float-deco--coin::after {
  content: "$";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--yellow-dark);
}
.coin-1 { top: 22%; right: 12%; animation: bob 5s ease-in-out infinite; }
.coin-2 { top: 62%; left: 6%; animation: bob 6s ease-in-out infinite 1s; width: 28px; height: 28px; }

.float-deco--star {
  width: 24px;
  height: 24px;
  background: var(--yellow);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  border: none;
  filter: drop-shadow(0 2px 4px rgba(249, 168, 37, 0.5));
}
.star-1 { top: 35%; left: 8%; animation: bob 4s ease-in-out infinite; }
.star-2 { top: 48%; right: 18%; animation: bob 5.5s ease-in-out infinite 0.5s; width: 18px; height: 18px; }
.star-3 { top: 80%; right: 8%; animation: bob 4.5s ease-in-out infinite 1.5s; width: 20px; height: 20px; }

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-12px) rotate(8deg); }
}

@media (prefers-reduced-motion: reduce) {
  .cloud, .float-deco { animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ---- Game HUD header ---- */
.game-hud {
  position: fixed;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 100;
  transition: transform var(--transition), box-shadow var(--transition);
}
.game-hud.is-scrolled {
  top: 8px;
}
.game-hud.is-scrolled .hud-inner {
  box-shadow: 0 12px 40px rgba(26, 35, 126, 0.18);
}

.hud-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 3px solid var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  min-height: var(--hud-h);
}

.hud-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  cursor: pointer;
  transition: opacity var(--transition);
}
.hud-brand:hover { opacity: 0.85; }
.hud-brand__icon {
  border-radius: 14px;
  border: 2px solid var(--white);
  box-shadow: 0 3px 0 rgba(66, 165, 245, 0.3);
}
.hud-brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
  white-space: nowrap;
}

/* Stepper navigation */
.hud-stepper { flex: 1; display: flex; justify-content: center; }
.stepper-track {
  display: flex;
  align-items: center;
  gap: 0;
}
.stepper-wire {
  width: 32px;
  height: 4px;
  background: linear-gradient(90deg, var(--green), #A5D6A7);
  border-radius: 2px;
  margin: 0 -2px;
}
.step-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  position: relative;
  padding: 4px 8px;
  transition: transform var(--transition);
}
.step-node:hover { transform: translateY(-2px); }
.step-node__ring {
  position: absolute;
  top: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid #E0E0E0;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.step-node--active .step-node__ring,
.step-node.is-active .step-node__ring {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(239, 83, 80, 0.25);
}
.step-node--done .step-node__ring {
  border-color: var(--green);
  background: var(--green);
}
.step-node__icon {
  position: relative;
  z-index: 1;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-muted);
}
.step-node--active .step-node__icon,
.step-node.is-active .step-node__icon { color: var(--red); }
.step-node--done .step-node__icon { color: var(--white); }
.step-node__icon svg { width: 18px; height: 18px; }
.step-node__label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}

.hud-stats {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.hud-hearts { display: flex; gap: 4px; }
.heart {
  display: inline-block;
  width: 22px;
  height: 20px;
  background: var(--red);
  clip-path: path("M11,19 C11,19 1,12 1,6.5 C1,3.5 3.5,1.5 6,1.5 C8,1.5 10,3 11,4.5 C12,3 14,1.5 16,1.5 C18.5,1.5 21,3.5 21,6.5 C21,12 11,19 11,19 Z");
  filter: drop-shadow(0 2px 2px rgba(229, 57, 53, 0.4));
}
.heart--sm { width: 16px; height: 14px; }
.hud-coins {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--yellow-dark);
}
.coin-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #FFF59D, var(--yellow));
  border: 2px solid var(--white);
}

/* 3D pill buttons */
.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--white);
  border: 3px solid var(--white);
  transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
  cursor: pointer;
  white-space: nowrap;
}
.btn-pill svg { width: 18px; height: 18px; }
.btn-pill--green {
  background: linear-gradient(180deg, #81C784 0%, var(--green) 40%, var(--green-dark) 100%);
  box-shadow: var(--pill-shadow);
}
.btn-pill--blue {
  background: linear-gradient(180deg, #64B5F6 0%, var(--sky-deep) 40%, #1E88E5 100%);
  box-shadow: 0 4px 0 #1565C0, 0 8px 16px rgba(30, 136, 229, 0.35);
}
.btn-pill--lg { padding: 14px 28px; font-size: 1.05rem; }
.btn-pill:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}
.btn-pill:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--green-dark);
}
.btn-pill:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

.hud-cta { flex-shrink: 0; }
.hud-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
}
.hud-burger span {
  display: block;
  width: 24px;
  height: 3px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.hud-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hud-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hud-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.hud-drawer {
  margin-top: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.96);
  border: 3px solid var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.hud-drawer a {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-weight: 700;
  transition: background var(--transition);
  cursor: pointer;
}
.hud-drawer a:hover { background: rgba(66, 165, 245, 0.12); }
.hud-drawer[hidden] { display: none; }

/* ---- Hero ---- */
main { position: relative; z-index: 1; }

.hero-stage {
  padding: calc(var(--hud-h) + 48px) 24px 60px;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-banner {
  display: block;
  width: min(340px, 92%);
  height: auto;
  margin-bottom: 18px;
  filter: drop-shadow(0 8px 16px rgba(26, 35, 126, 0.18));
}

.speech-bubble {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--yellow);
  border: 3px solid var(--white);
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ink);
  box-shadow: 0 4px 0 var(--yellow-dark), 0 6px 12px rgba(249, 168, 37, 0.3);
  margin-bottom: 20px;
  position: relative;
}
.speech-bubble::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 28px;
  border: 8px solid transparent;
  border-top-color: var(--yellow);
  border-left-color: var(--yellow);
}
.speech-bubble svg { width: 18px; height: 18px; flex-shrink: 0; }

.hero-title {
  font-family: var(--font-display);
  line-height: 1.05;
  margin-bottom: 18px;
}
.hero-title__line {
  display: block;
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  font-weight: 700;
  -webkit-text-stroke: 3px var(--white);
  paint-order: stroke fill;
  text-shadow: 0 4px 0 rgba(26, 35, 126, 0.15), 0 8px 20px rgba(66, 165, 245, 0.3);
}
.hero-title__line--blue { color: var(--sky-deep); }
.hero-title__line--gold { color: var(--yellow-dark); }

.hero-lead {
  font-size: 1.1rem;
  color: var(--ink-muted);
  max-width: 480px;
  margin-bottom: 28px;
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 28px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.hero-tags li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.7);
  border: 2px solid var(--white);
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-muted);
}
.hero-tags svg { width: 16px; height: 16px; color: var(--sky-deep); }

/* Phone mockup */
.phone-stage {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 20px;
}

.phone-frame {
  position: relative;
  width: min(280px, 80vw);
  padding: 14px;
  background: var(--white);
  border-radius: 40px;
  box-shadow:
    0 0 0 4px rgba(255, 255, 255, 0.8),
    0 20px 0 rgba(26, 35, 126, 0.08),
    0 30px 60px rgba(26, 35, 126, 0.2);
  transform: rotate(2deg);
  transition: transform 600ms ease;
}
.phone-frame:hover { transform: rotate(0deg) scale(1.02); }

.phone-notch {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 22px;
  background: #111;
  border-radius: 0 0 14px 14px;
  z-index: 2;
}

.phone-screen {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  background: #1E3A5F;
  aspect-ratio: 9 / 19;
}
.phone-screen__shot {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.phone-hud-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 36px 12px 0;
}
.phone-hud-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.phone-hud-bar__level {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--white);
}
.phone-hud-bar__lives { display: flex; gap: 3px; }

.game-modal-card {
  position: absolute;
  bottom: -10px;
  right: -20px;
  width: 180px;
  animation: bob 5s ease-in-out infinite 0.3s;
}
.game-modal-card__header {
  background: var(--sky-deep);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  text-align: center;
  padding: 8px 12px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  border: 3px solid var(--white);
  border-bottom: none;
  margin-bottom: -2px;
  position: relative;
  z-index: 1;
}
.game-modal-card__body {
  background: var(--white);
  border: 3px solid var(--white);
  border-radius: 0 var(--radius-md) var(--radius-md) var(--radius-md);
  padding: 16px;
  text-align: center;
  box-shadow: var(--card-shadow);
}
.game-modal-card__body p {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-muted);
  margin-top: 8px;
}
.game-modal-card__heart { width: 32px; height: 28px; }

/* Maze path connector */
.maze-connector {
  width: 100%;
  height: 60px;
  margin-top: 40px;
  opacity: 0.7;
}
.maze-path {
  stroke: var(--green);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 12 8;
  animation: dash-flow 20s linear infinite;
}
.maze-path--vert { stroke-width: 4; stroke-dasharray: 8 6; }
.maze-arrowhead { fill: var(--green); }

@keyframes dash-flow {
  to { stroke-dashoffset: -200; }
}

/* ---- Features ---- */
.features-maze {
  padding: 40px 24px 80px;
}

.section-shell {
  max-width: 900px;
  margin: 0 auto;
}

.section-head {
  text-align: center;
  margin-bottom: 48px;
}
.section-badge {
  display: inline-block;
  padding: 6px 16px;
  background: var(--yellow);
  border: 2px solid var(--white);
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--ink);
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
  -webkit-text-stroke: 2px var(--white);
  paint-order: stroke fill;
}
.section-sub {
  color: var(--ink-muted);
  font-weight: 600;
  max-width: 520px;
  margin: 0 auto;
}

.maze-cards {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.level-card {
  display: grid;
  grid-template-columns: auto 1fr;
  max-width: 520px;
  background: var(--white);
  border: 3px solid var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: default;
}
.level-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 0 rgba(26, 35, 126, 0.1), 0 24px 48px rgba(66, 165, 245, 0.25);
}
.level-card--left  { align-self: flex-start; }
.level-card--right { align-self: flex-end; }

.level-card__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px 16px;
  background: linear-gradient(180deg, var(--sky-deep), #1E88E5);
  color: var(--white);
  min-width: 80px;
}
.level-card__header--gold  { background: linear-gradient(180deg, var(--yellow), var(--yellow-dark)); color: var(--ink); }
.level-card__header--green { background: linear-gradient(180deg, var(--green), var(--green-dark)); }
.level-card__header--red   { background: linear-gradient(180deg, var(--red), var(--red-dark)); }
.level-card__num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
}
.level-card__header svg { width: 24px; height: 24px; }
.level-card__body { padding: 20px 24px; }
.level-card__body h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: 8px;
  color: var(--ink);
}
.level-card__body p {
  font-size: 0.95rem;
  color: var(--ink-muted);
  font-weight: 600;
}

.maze-vertical-path {
  align-self: center;
  width: 40px;
  height: 48px;
  opacity: 0.6;
}
.maze-vertical-path svg { width: 100%; height: 100%; }
.maze-vertical-path--flip { transform: scaleX(-1); }

/* How to play */
.howto-strip {
  margin-top: 56px;
  padding: 28px 32px;
  background: rgba(255, 255, 255, 0.85);
  border: 3px solid var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
}
.howto-strip__title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  text-align: center;
  margin-bottom: 24px;
  color: var(--ink);
}
.howto-steps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.howto-steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ink-muted);
}
.howto-steps__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #E3F2FD, #BBDEFB);
  border: 2px solid var(--white);
  border-radius: 12px;
  color: var(--sky-deep);
}
.howto-steps__icon svg { width: 20px; height: 20px; }

/* ---- Screenshots carousel ---- */
.shots-carousel {
  padding: 20px 0 60px;
  overflow: hidden;
}

.shots-hint {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-muted);
  margin-bottom: 20px;
  opacity: 0.85;
}

.shots-track {
  display: flex;
  gap: 24px;
  padding: 12px 24px 28px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 24px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--sky-deep) rgba(255, 255, 255, 0.5);
}
.shots-track::-webkit-scrollbar { height: 8px; }
.shots-track::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.4);
  border-radius: 4px;
}
.shots-track::-webkit-scrollbar-thumb {
  background: var(--sky-deep);
  border-radius: 4px;
}

.shots-track__item {
  flex: 0 0 auto;
  scroll-snap-align: center;
}

.shot-phone {
  margin: 0;
}
.shot-phone__frame {
  width: 200px;
  padding: 10px;
  background: var(--white);
  border-radius: 28px;
  border: 3px solid var(--white);
  box-shadow: var(--card-shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: grab;
}
.shot-phone__frame:active { cursor: grabbing; }
.shots-track__item:nth-child(odd) .shot-phone__frame { transform: rotate(-2deg); }
.shots-track__item:nth-child(even) .shot-phone__frame { transform: rotate(2deg); }
.shot-phone__frame:hover {
  transform: rotate(0deg) translateY(-6px);
  box-shadow: 0 12px 0 rgba(26, 35, 126, 0.1), 0 24px 48px rgba(66, 165, 245, 0.28);
}
.shot-phone__frame img {
  width: 100%;
  border-radius: 18px;
  aspect-ratio: 9 / 16;
  object-fit: cover;
}

/* ---- Download ---- */
.download-win {
  padding: 40px 24px 100px;
  display: flex;
  justify-content: center;
}

.download-panel {
  max-width: 640px;
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  border: 4px solid var(--white);
}
.download-panel__header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 24px;
  background: linear-gradient(180deg, var(--sky-deep), #1E88E5);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
}
.download-panel__header svg { width: 20px; height: 20px; color: var(--yellow); }
.download-panel__body {
  padding: 36px 32px;
  background: var(--white);
  text-align: center;
}
.download-panel__body h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  margin-bottom: 12px;
  color: var(--ink);
}
.download-panel__body p {
  color: var(--ink-muted);
  font-weight: 600;
  margin-bottom: 28px;
}
.download-panel__stores {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.store-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  background: #111;
  color: var(--white);
  border-radius: var(--radius-md);
  border: 3px solid var(--white);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
  transition: transform var(--transition);
  cursor: pointer;
  text-align: left;
}
.store-badge--play { background: linear-gradient(180deg, #444, #111); }
.store-badge:hover { transform: translateY(-2px); }
.store-badge:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
.store-badge__icon svg,
.store-badge__icon i svg { width: 28px; height: 28px; display: block; }
.store-badge__text { display: flex; flex-direction: column; }
.store-badge__text small { font-size: 0.65rem; opacity: 0.8; }
.store-badge__text strong { font-family: var(--font-display); font-size: 1.1rem; }

/* ---- Footer ---- */
.site-footer {
  position: relative;
  z-index: 1;
  padding: 32px 24px;
  background: rgba(255, 255, 255, 0.9);
  border-top: 3px solid var(--white);
}
.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}
.footer-links a {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ink-muted);
  transition: color var(--transition);
  cursor: pointer;
}
.footer-links a:hover { color: var(--sky-deep); }
.footer-copy {
  font-size: 0.8rem;
  color: var(--ink-muted);
  opacity: 0.8;
}

/* ---- Modal ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(26, 35, 126, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.modal-overlay[hidden] { display: none; }

.modal-card {
  width: min(380px, 100%);
  animation: modal-pop 300ms ease;
}
@keyframes modal-pop {
  from { transform: scale(0.9); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.modal-card__header {
  background: var(--sky-deep);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  text-align: center;
  padding: 12px 20px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  border: 3px solid var(--white);
  border-bottom: none;
}
.modal-card__body {
  background: var(--white);
  border: 3px solid var(--white);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  padding: 32px 28px;
  text-align: center;
  box-shadow: var(--card-shadow);
}
.modal-card__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #E3F2FD, #BBDEFB);
  border-radius: 50%;
  border: 3px solid var(--white);
  color: var(--sky-deep);
}
.modal-card__icon svg { width: 28px; height: 28px; }
.modal-card__body h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-bottom: 8px;
  color: var(--ink);
}
.modal-card__body p {
  color: var(--ink-muted);
  font-weight: 600;
  margin-bottom: 24px;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .hud-stats { display: none; }
  .step-node__label { display: none; }
}

@media (max-width: 768px) {
  .hud-stepper { display: none; }
  .hud-cta { display: none; }
  .hud-burger { display: flex; }
  .hud-brand__name { font-size: 0.85rem; max-width: 140px; overflow: hidden; text-overflow: ellipsis; }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }
  .hero-banner { margin-left: auto; margin-right: auto; }
  .hero-lead { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-tags { justify-content: center; }
  .phone-stage { order: -1; }
  .game-modal-card { display: none; }

  .level-card--left,
  .level-card--right { align-self: stretch; max-width: 100%; }
  .maze-vertical-path { display: none; }

  .howto-steps { grid-template-columns: 1fr; }

  .maze-connector { display: none; }
}

@media (max-width: 480px) {
  .game-hud { top: 8px; left: 8px; right: 8px; }
  .hud-inner { padding: 8px 12px; border-radius: 20px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .btn-pill--lg { width: 100%; }
  .download-panel__stores { flex-direction: column; align-items: stretch; }
  .store-badge { justify-content: center; }
}
