:root {
  --bg: #fff8ee;
  --text: #18354f;
  --muted: #4f6f8e;
  --card: rgba(255, 255, 255, 0.92);
  --line: rgba(62, 132, 200, 0.33);
  --blue: #2f8df6;
  --blue-2: #36c6ff;
  --mint: #d2ffe8;
  --peach: #ffd7b7;
  --sun: #ffe36b;
  --coral: #ff8da0;
  --green: #7ed957;
  --orange: #ff9f32;
  --shadow: 0 18px 45px rgba(37, 91, 143, 0.2);
  --radius: 28px;

  --page-width: 1180px;
  --map-radius: 30px;
  --map-padding: clamp(10px, 1.6vw, 18px);
  --station-size: clamp(200px, var(--icon-size, 7.8vw), 112px);
  --station-hover-scale: 1.12;
  --modal-width: 430px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  padding-top: 96px;
  font-family: "Onest", "Segoe UI", sans-serif;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  position: relative;
}

body.nav-open,
body.modal-open {
  overflow: hidden;
}

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    radial-gradient(circle at 18% 14%, rgba(255, 227, 107, 0.35), transparent 24%),
    radial-gradient(circle at 85% 22%, rgba(54, 198, 255, 0.28), transparent 28%),
    radial-gradient(circle at 78% 78%, rgba(255, 141, 160, 0.22), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.23)),
    url("images/backgr.png");
  background-size: cover;
  background-position: center;
}

.top-nav {
  position: fixed;
  top: 12px;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  justify-content: center;
  padding: 0 16px;
  pointer-events: none;
}

.top-nav__inner {
  width: min(1060px, 100%);
  min-height: 68px;
  border-radius: 20px;
  border: 1px solid rgba(62, 132, 200, 0.28);
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.94), rgba(225, 248, 255, 0.92), rgba(255, 239, 215, 0.92));
  backdrop-filter: blur(8px);
  box-shadow: 0 12px 28px rgba(51, 78, 108, 0.16);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 18px;
  pointer-events: auto;
  position: relative;
}

.top-nav__brand {
  text-decoration: none;
  color: #1f71d1;
  font-family: "Comfortaa", "Onest", sans-serif;
  font-size: clamp(16px, 2.3vw, 24px);
  font-weight: 700;
  white-space: nowrap;
}

.top-nav__menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-nav__link {
  text-decoration: none;
  color: #21517f;
  font-weight: 700;
  font-size: 15px;
  padding: 10px 14px;
  border-radius: 12px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.top-nav__link:hover {
  background: linear-gradient(120deg, rgba(54, 198, 255, 0.24), rgba(255, 227, 107, 0.28));
  color: #114c92;
  transform: translateY(-1px);
}

.top-nav__burger {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(47, 141, 246, 0.4);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.top-nav__burger span {
  width: 18px;
  height: 2px;
  background: #1e5e9f;
  border-radius: 20px;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.top-nav.is-open .top-nav__burger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.top-nav.is-open .top-nav__burger span:nth-child(2) {
  opacity: 0;
}

.top-nav.is-open .top-nav__burger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.tropa-page,
.footer {
  width: min(var(--page-width), calc(100% - 32px));
  margin: 0 auto;
}

.tropa-page {
  display: grid;
  gap: 18px;
  margin-bottom: 34px;
}

.tropa-hero,
.tropa-map-card {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 88% 16%, rgba(255, 227, 107, 0.42), transparent 38%),
    radial-gradient(circle at 10% 88%, rgba(54, 198, 255, 0.26), transparent 42%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(246, 253, 255, 0.9));
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.tropa-hero::before,
.tropa-map-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--blue), var(--blue-2), var(--green), var(--sun), var(--coral));
  opacity: 0.9;
}

.tropa-hero {
  text-align: center;
  padding: clamp(24px, 4vw, 42px);
}

.tropa-hero__badge,
.tropa-map-head__label,
.station-modal__label {
  display: inline-block;
  margin: 0 0 12px;
  padding: 8px 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--peach), #fff2d5);
  color: #5f5867;
  font-size: 15px;
  font-weight: 800;
}

.tropa-hero h1,
.tropa-map-head h2,
.station-modal__card h2 {
  margin: 0;
  font-family: "Comfortaa", "Onest", sans-serif;
  color: #2b6ab8;
  line-height: 1.08;
}

.tropa-hero h1 {
  font-size: clamp(42px, 6.4vw, 78px);
}

.tropa-hero p:not(.tropa-hero__badge) {
  max-width: 820px;
  margin: 16px auto 0;
  color: #365877;
  font-size: clamp(18px, 2vw, 23px);
}

.tropa-map-card {
  padding: clamp(16px, 2.4vw, 28px);
}

.tropa-map-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 16px;
}

.tropa-map-head h2 {
  font-size: clamp(28px, 3.2vw, 42px);
}

.tropa-map-head p:not(.tropa-map-head__label) {
  max-width: 440px;
  margin: 0;
  color: #3f6488;
  font-size: 17px;
  font-weight: 600;
}

.tropa-map-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--map-radius);
  border: 1px solid rgba(47, 141, 246, 0.33);
  background: linear-gradient(145deg, rgba(225, 248, 255, 0.7), rgba(255, 246, 215, 0.7));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 18px 36px rgba(24, 53, 79, 0.18);
  user-select: none;
}

.tropa-map {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  filter: saturate(1.06) brightness(1.02);
}

.station-point {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 5;
  width: var(--station-size);
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border-radius: 50%;
  text-decoration: none;
  cursor: pointer;
  outline: none;
  filter: drop-shadow(0 10px 16px rgba(24, 53, 79, 0.28));
  animation: station-pulse 2.2s ease-in-out infinite;
  transition: transform 0.2s ease, filter 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.station-point::before {
  content: "";
  position: absolute;
  inset: 9%;
  border-radius: 50%;
  /* background: radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.95), transparent 28%), linear-gradient(135deg, #ffffff, #fff1be 58%, #ffc263); */
  border: 4px solid #fff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16), inset 0 -4px 8px rgba(255, 145, 31, 0.16);
}


.station-point--no-pulse::before {
  animation: none;
}

.station-point img {
  position: relative;
  z-index: 2;
  width: 78%;
  height: 78%;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 4px 5px rgba(24, 53, 79, 0.16));
}

.station-point:hover,
.station-point:focus-visible {
  transform: translate(-50%, -50%) scale(var(--station-hover-scale));
  filter: drop-shadow(0 0 14px rgba(255, 227, 107, 0.9)) drop-shadow(0 12px 18px rgba(24, 53, 79, 0.25));
  animation-play-state: paused;
}

.station-point:focus-visible::before {
  outline: 4px solid rgba(47, 141, 246, 0.55);
  outline-offset: 4px;
}

.station-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 18px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.station-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.station-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 48, 77, 0.45);
  backdrop-filter: blur(5px);
}

.station-modal__card {
  position: relative;
  z-index: 1;
  width: min(var(--modal-width), 100%);
  border-radius: 30px;
  border: 1px solid rgba(62, 132, 200, 0.32);
  background:
    radial-gradient(circle at 85% 12%, rgba(255, 227, 107, 0.38), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(238, 251, 255, 0.96));
  box-shadow: 0 26px 64px rgba(18, 50, 82, 0.32);
  padding: 30px;
  text-align: center;
  transform: translateY(12px) scale(0.96);
  transition: transform 0.24s ease;
}

.station-modal.is-open .station-modal__card {
  transform: translateY(0) scale(1);
}

.station-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.85);
  color: #205992;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(24, 53, 79, 0.12);
}

.station-modal__icon {
  width: clamp(92px, 18vw, 128px);
  aspect-ratio: 1 / 1;
  object-fit: contain;
  margin-bottom: 8px;
  filter: drop-shadow(0 12px 16px rgba(24, 53, 79, 0.16));
}

.station-modal__card h2 {
  font-size: clamp(25px, 3vw, 34px);
}

.station-modal__card p {
  margin: 14px 0 0;
  color: #365877;
  font-size: 18px;
}

.station-modal__lesson {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(47, 141, 246, 0.22);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(225, 248, 255, 0.74));
}

.station-modal__lesson strong {
  display: block;
  margin-bottom: 4px;
  color: #1f5b96;
}

.station-modal__play {
  width: 100%;
  min-height: 54px;
  margin-top: 18px;
  border-radius: 16px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(130deg, var(--blue), var(--blue-2), #58e4b5);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(47, 141, 246, 0.38);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.station-modal__play:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(47, 141, 246, 0.44);
}

.footer {
  margin-bottom: 30px;
  text-align: center;
  color: #446789;
  font-size: 14px;
}

@keyframes station-pulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.05);
  }
}

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

@media (max-width: 900px) {
  .tropa-map-head {
    display: grid;
    align-items: start;
  }

  .tropa-map-head p:not(.tropa-map-head__label) {
    max-width: none;
  }
}

@media (max-width: 700px) {
  :root {
    --station-size: clamp(42px, var(--icon-size, 11vw), 70px);
  }

  body {
    padding-top: 82px;
  }

  .top-nav {
    top: 8px;
    padding: 0 8px;
  }

  .top-nav__inner {
    min-height: 60px;
    border-radius: 16px;
    padding: 8px 10px 8px 14px;
  }

  .top-nav__brand {
    font-size: 15px;
  }

  .top-nav__burger {
    display: flex;
  }

  .top-nav__menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: min(280px, calc(100vw - 16px));
    display: grid;
    gap: 4px;
    padding: 10px;
    border-radius: 16px;
    border: 1px solid rgba(47, 141, 246, 0.26);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.97), rgba(229, 248, 255, 0.95));
    box-shadow: 0 14px 26px rgba(50, 80, 113, 0.2);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
  }

  .top-nav.is-open .top-nav__menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  .top-nav__link {
    padding: 11px 12px;
    border-radius: 10px;
  }

  .tropa-page,
  .footer {
    width: calc(100% - 16px);
  }

  .tropa-hero,
  .tropa-map-card {
    border-radius: 22px;
  }

  .tropa-map-card {
    padding: 10px;
  }

  .tropa-map-wrap {
    border-radius: 20px;
  }

  .tropa-map {
    min-height: 360px;
  }

  .station-point::before {
    border-width: 3px;
  }

  .station-modal__card {
    padding: 24px 18px 20px;
    border-radius: 24px;
  }
}


/* ===== Тропа Добра: игра «Распредели шарики малышам» ===== */

.balloons-page {
  overflow-x: hidden;
}

.balloons-page-wrap {
  width: min(1180px, calc(100% - 150px));
  margin: 14px auto 42px;
  display: grid;
}

.balloons-screen {
  display: none;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius, 28px);
  border: 1px solid var(--line, rgba(62, 132, 200, 0.33));
  background:
    radial-gradient(circle at 16% 18%, rgba(54, 198, 255, 0.18), transparent 36%),
    radial-gradient(circle at 82% 20%, rgba(255, 227, 107, 0.28), transparent 38%),
    linear-gradient(145deg, rgba(255,255,255,.94), rgba(246,253,255,.9));
  box-shadow: var(--shadow, 0 18px 45px rgba(37, 91, 143, 0.2));
  padding: clamp(22px, 4vw, 38px);
}

.balloons-screen::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 7px;
  background: linear-gradient(90deg, #2f8df6, #36c6ff, #7ed957, #ffe36b, #ff8da0);
}

.balloons-screen.is-active {
  display: grid;
}

.balloons-start,
.balloons-result {
  min-height: calc(100vh - 170px);
  align-content: center;
  justify-items: center;
  text-align: center;
  gap: 16px;
}

.balloons-start__icon,
.balloons-result__image {
  width: clamp(130px, 18vw, 220px);
  max-height: 220px;
  object-fit: contain;
  filter: drop-shadow(0 14px 22px rgba(24,53,79,.16));
}

.balloons-badge {
  margin: 0;
  padding: 9px 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffd7b7, #fff2d5);
  color: #344f70;
  font-weight: 800;
  font-size: clamp(16px, 1.8vw, 22px);
}

.balloons-screen h1,
.balloons-screen h2 {
  margin: 0;
  max-width: 900px;
  font-family: "Comfortaa", "Onest", sans-serif;
  font-size: clamp(38px, 5.4vw, 76px);
  line-height: 1.08;
  color: #2b6ab8;
}

.balloons-lead,
.balloons-screen p {
  max-width: 860px;
  margin: 0;
  color: #365877;
  font-size: clamp(18px, 2.1vw, 24px);
}

.balloons-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.balloons-btn {
  min-height: 52px;
  border: 0;
  border-radius: 16px;
  padding: 13px 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Onest", "Segoe UI", sans-serif;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.balloons-btn:hover {
  transform: translateY(-2px);
}

.balloons-btn--primary {
  background: linear-gradient(130deg, #2f8df6, #36c6ff, #58e4b5);
  color: #fff;
  box-shadow: 0 10px 22px rgba(47, 141, 246, .35);
}

.balloons-btn--ghost {
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(220,247,255,.9));
  color: #205992;
  border: 1px solid rgba(47, 141, 246, .32);
  box-shadow: 0 8px 18px rgba(37, 91, 143, .12);
}

.balloons-game {
  gap: 18px;
}

.balloons-hud {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.balloons-hud__item {
  min-width: 170px;
  border: 1px solid rgba(47,141,246,.24);
  border-radius: 20px;
  padding: 12px 16px;
  background: rgba(255,255,255,.76);
  box-shadow: 0 10px 22px rgba(37, 91, 143, .1);
}

.balloons-hud__item--wide {
  flex: 1;
}

.balloons-hud__item span {
  display: block;
  color: #4f6f8e;
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.balloons-hud__item strong {
  display: block;
  margin-top: 3px;
  font-family: "Comfortaa", "Onest", sans-serif;
  color: #1f5b96;
  font-size: clamp(20px, 2.4vw, 28px);
}

.balloons-game-hint {
  justify-self: center;
  max-width: 760px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(47, 141, 246, .18);
  color: #365877;
  font-weight: 700;
  text-align: center;
}

.balloons-field {
  --tube-width: clamp(116px, 10vw, 150px);
  --tube-height: calc(var(--tube-width) * 2.82);
  --ball-size: calc(var(--tube-width) * 0.5);
  --ball-left: 50%;
  --ball-bottom: calc(var(--tube-width) * .2);
  --ball-step: calc(var(--ball-size) * .98);

  min-height: 620px;
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr));
  gap: clamp(18px, 4vw, 44px);
  align-items: end;
  justify-items: center;
  padding: clamp(24px, 4vw, 48px);
  border-radius: 28px;
  border: 1px solid rgba(47,141,246,.22);
  background:
    radial-gradient(circle at 20% 20%, rgba(255,227,107,.22), transparent 34%),
    radial-gradient(circle at 78% 24%, rgba(54,198,255,.20), transparent 36%),
    linear-gradient(180deg, rgba(255,255,255,.72), rgba(238,250,255,.68));
}

.balloons-tube {
  position: relative;
  width: var(--tube-width);
  height: var(--tube-height);
  border: 0;
  background: transparent;
  padding: 0;
  overflow: visible;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
  transition: transform .2s ease, filter .2s ease;
}

.balloons-tube::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(var(--tube-width) * .24);
  width: calc(var(--tube-width) * .72);
  height: calc(var(--tube-height) * .70);
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(255,255,255,.22);
  z-index: 1;
}

.balloons-tube:hover {
  transform: translateY(-5px);
}

.balloons-tube.is-selected {
  filter: drop-shadow(0 0 18px rgba(255,184,77,.95));
}

.balloons-tube.is-complete {
  filter: drop-shadow(0 0 14px rgba(126,217,87,.52));
}

.balloons-tube__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 4;
  pointer-events: none;
}

.balloons-tube__balls {
  position: absolute;
  
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.balloons-ball {
  position: absolute;
  left: var(--ball-left);
  bottom: calc(var(--ball-bottom) + (var(--slot) * var(--ball-step)));
  width: var(--ball-size);
  height: var(--ball-size);
  transform: translateX(-50%);
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 6px 8px rgba(24,53,79,.14));
  animation: balloons-ball-pop .18s ease both;
}

.balloons-lesson {
  padding: 16px 20px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(210,255,232,.8), rgba(255,246,215,.86));
  border: 1px solid rgba(126,217,87,.28);
}

.balloons-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  place-items: center;
  padding: 20px;
}

.balloons-modal.is-open {
  display: grid;
}

.balloons-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(24, 53, 79, .38);
  backdrop-filter: blur(4px);
}

.balloons-modal__card {
  position: relative;
  z-index: 2;
  width: min(540px, 100%);
  border-radius: 28px;
  background:
    radial-gradient(circle at 82% 14%, rgba(255,227,107,.26), transparent 34%),
    linear-gradient(145deg, #fff, #f1fbff);
  box-shadow: 0 20px 50px rgba(24,53,79,.28);
  padding: 30px;
}

.balloons-modal__card h2 {
  margin: 0 0 14px;
  font-family: "Comfortaa", "Onest", sans-serif;
  color: #2b6ab8;
  font-size: 32px;
}

.balloons-modal__card p {
  margin: 0 0 12px;
  color: #365877;
  font-size: 18px;
}

.balloons-modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #fff2d5;
  color: #1f5b96;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

@keyframes balloons-ball-pop {
  from {
    opacity: 0;
    transform: translateX(-50%) scale(.82) translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) scale(1) translateY(0);
  }
}

@media (max-width: 760px) {
  .balloons-page-wrap {
    width: calc(100% - 16px);
  }

  .balloons-screen {
    border-radius: 22px;
    padding: 20px;
  }

  .balloons-field {
    --tube-width: clamp(92px, 26vw, 116px);
    min-height: auto;
    grid-template-columns: repeat(3, minmax(84px, 1fr));
    gap: 22px 12px;
    padding: 20px 8px;
  }

  .balloons-hud__item,
  .balloons-hud .balloons-btn {
    width: 100%;
  }

  .balloons-btn {
    width: 100%;
  }
}


/* ===== Тропа Добра: игра «Спаси щенка от дождя» ===== */

.puppy-page {
  overflow-x: hidden;
}

.puppy-layout {
  width: min(1180px, calc(100% - 32px));
  margin: 14px auto 42px;
  display: grid;
}

.puppy-screen {
  display: none;
  border-radius: var(--radius, 28px);
  border: 1px solid var(--line, rgba(62, 132, 200, 0.33));
  background:
    radial-gradient(circle at 16% 18%, rgba(54, 198, 255, 0.18), transparent 36%),
    radial-gradient(circle at 82% 20%, rgba(255, 227, 107, 0.28), transparent 38%),
    linear-gradient(145deg, rgba(255,255,255,.94), rgba(246,253,255,.9));
  box-shadow: var(--shadow, 0 18px 45px rgba(37, 91, 143, 0.2));
  padding: clamp(18px, 3vw, 34px);
  position: relative;
  overflow: hidden;
}

.puppy-screen::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 7px;
  background: linear-gradient(90deg, #2f8df6, #36c6ff, #7ed957, #ffe36b, #ff8da0);
  z-index: 3;
}

.puppy-screen.is-active {
  display: grid;
}

.puppy-screen--start,
.puppy-screen--result {
  min-height: calc(100vh - 170px);
  align-content: center;
  justify-items: center;
  text-align: center;
  gap: 16px;
}

.puppy-start-icon,
.puppy-result-image {
  width: clamp(130px, 18vw, 220px);
  max-height: 220px;
  object-fit: contain;
  filter: drop-shadow(0 14px 22px rgba(24,53,79,.16));
}

.puppy-badge {
  margin: 0;
  width: fit-content;
  padding: 9px 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffd7b7, #fff2d5);
  color: #344f70;
  font-weight: 800;
  font-size: clamp(15px, 1.6vw, 20px);
}

.puppy-screen h1,
.puppy-screen h2 {
  margin: 0;
  max-width: 900px;
  font-family: "Comfortaa", "Onest", sans-serif;
  font-size: clamp(34px, 4.7vw, 68px);
  line-height: 1.08;
  color: #2b6ab8;
}

.puppy-screen p {
  max-width: 860px;
  margin: 0;
  color: #365877;
  font-size: clamp(17px, 1.9vw, 22px);
}

.puppy-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.puppy-actions--center {
  margin-top: 16px;
}

.puppy-btn {
  min-height: 52px;
  border: 0;
  border-radius: 16px;
  padding: 13px 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Onest", "Segoe UI", sans-serif;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease, opacity .2s ease;
}

.puppy-btn:hover:not(:disabled) {
  transform: translateY(-2px);
}

.puppy-btn:disabled {
  cursor: not-allowed;
  opacity: .52;
  filter: grayscale(.2);
}

.puppy-btn--primary {
  background: linear-gradient(130deg, #2f8df6, #36c6ff, #58e4b5);
  color: #fff;
  box-shadow: 0 10px 22px rgba(47, 141, 246, .35);
}

.puppy-btn--ghost {
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(220,247,255,.9));
  color: #205992;
  border: 1px solid rgba(47, 141, 246, .32);
  box-shadow: 0 8px 18px rgba(37, 91, 143, .12);
}

.puppy-screen--select,
.puppy-screen--path {
  gap: 18px;
}

.puppy-panel-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.puppy-panel-head > div:first-child {
  display: grid;
  gap: 8px;
}

.puppy-counter {
  min-width: 150px;
  border: 1px solid rgba(47,141,246,.24);
  border-radius: 20px;
  padding: 12px 16px;
  background: rgba(255,255,255,.76);
  box-shadow: 0 10px 22px rgba(37, 91, 143, .1);
}

.puppy-counter span {
  display: block;
  color: #4f6f8e;
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.puppy-counter strong {
  display: block;
  margin-top: 3px;
  font-family: "Comfortaa", "Onest", sans-serif;
  color: #1f5b96;
  font-size: clamp(22px, 2.6vw, 32px);
}

.puppy-select-field,
.puppy-path-field {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(47,141,246,.22);
  background: #eaf8ff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 16px 32px rgba(24,53,79,.13);
  user-select: none;
}

.puppy-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  pointer-events: none;
}

.puppy-select-dog {
  position: absolute;
  width: clamp(95px, 15vw, 185px);
  transform: translate(-50%, -100%);
  z-index: 4;
  filter: drop-shadow(0 14px 16px rgba(24, 53, 79, .22));
  pointer-events: none;
  animation: puppy-shiver 1.4s ease-in-out infinite;
}

.puppy-basket {
  position: absolute;
  width: clamp(150px, 18vw, 230px);
  min-height: clamp(80px, 9vw, 120px);
  transform: translate(-50%, -50%);
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 12px;
  border-radius: 24px;
  border: 2px dashed rgba(47,141,246,.42);
  background: rgba(255,255,255,.72);
  box-shadow: 0 12px 24px rgba(24,53,79,.14);
}

.puppy-basket::before {
  content: "Набор помощи";
  position: absolute;
  left: 50%;
  top: -14px;
  transform: translateX(-50%);
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff2d5;
  color: #2b5f93;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.puppy-basket img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.puppy-items {
  position: absolute;
  inset: 0;
  z-index: 6;
}

.puppy-item {
  position: absolute;
  width: clamp(70px, 8vw, 106px);
  height: clamp(70px, 8vw, 106px);
  transform: translate(-50%, -50%);
  border: 2px solid rgba(255,255,255,.88);
  border-radius: 24px;
  background: rgba(255,255,255,.78);
  box-shadow: 0 12px 24px rgba(24,53,79,.17);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.puppy-item:hover:not(:disabled) {
  transform: translate(-50%, -50%) scale(1.07) rotate(-2deg);
  box-shadow: 0 16px 28px rgba(24,53,79,.22);
}

.puppy-item img {
  width: 78%;
  height: 78%;
  object-fit: contain;
  pointer-events: none;
}

.puppy-item.is-collected {
  opacity: 0;
  transform: translate(-50%, -50%) scale(.3);
  pointer-events: none;
}

.puppy-item.is-wrong {
  animation: puppy-wrong .38s ease;
}

.puppy-runner {
  position: absolute;
  width: clamp(86px, 9.5vw, 145px);
  transform: translate(-50%, -100%);
  z-index: 7;
  filter: drop-shadow(0 12px 14px rgba(24,53,79,.25));
  pointer-events: none;
}

.puppy-finish-zone {
  position: absolute;
  left: 82%;
  top: 35%;
  width: clamp(72px, 8vw, 110px);
  height: clamp(72px, 8vw, 110px);
  transform: translate(-50%, -50%);
  display: grid;
  place-items: end center;
  padding-bottom: 2px;
  border-radius: 50%;
  color: rgba(255,255,255,.9);
  font-weight: 900;
  font-size: 12px;
  z-index: 4;
  pointer-events: none;
  background: radial-gradient(circle, rgba(126,217,87,.22), rgba(126,217,87,0) 68%);
  animation: puppy-finish-pulse 1.6s ease-in-out infinite;
}

.puppy-lesson {
  padding: 16px 20px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(210,255,232,.8), rgba(255,246,215,.86));
  border: 1px solid rgba(126,217,87,.28);
}

.puppy-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  place-items: center;
  padding: 20px;
}

.puppy-modal.is-open {
  display: grid;
}

.puppy-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(24, 53, 79, .38);
  backdrop-filter: blur(4px);
}

.puppy-modal__card {
  position: relative;
  z-index: 2;
  width: min(560px, 100%);
  border-radius: 28px;
  background:
    radial-gradient(circle at 82% 14%, rgba(255,227,107,.26), transparent 34%),
    linear-gradient(145deg, #fff, #f1fbff);
  box-shadow: 0 20px 50px rgba(24,53,79,.28);
  padding: 30px;
}

.puppy-modal__card h2 {
  margin: 0 0 14px;
  font-family: "Comfortaa", "Onest", sans-serif;
  color: #2b6ab8;
  font-size: 32px;
}

.puppy-modal__card p {
  margin: 0 0 12px;
  color: #365877;
  font-size: 18px;
}

.puppy-modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #fff2d5;
  color: #1f5b96;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

@keyframes puppy-shiver {
  0%, 100% { transform: translate(-50%, -100%) rotate(-1deg); }
  50% { transform: translate(-50%, calc(-100% - 3px)) rotate(1deg); }
}

@keyframes puppy-wrong {
  0%, 100% { transform: translate(-50%, -50%); }
  25% { transform: translate(calc(-50% - 8px), -50%) rotate(-4deg); }
  50% { transform: translate(calc(-50% + 8px), -50%) rotate(4deg); }
  75% { transform: translate(calc(-50% - 4px), -50%) rotate(-2deg); }
}

@keyframes puppy-finish-pulse {
  0%, 100% { opacity: .65; transform: translate(-50%, -50%) scale(.94); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
}

@media (max-width: 760px) {
  .puppy-layout {
    width: calc(100% - 16px);
  }

  .puppy-screen {
    border-radius: 22px;
    padding: 18px;
  }

  .puppy-select-field,
  .puppy-path-field {
    aspect-ratio: 10 / 12;
  }

  .puppy-item {
    width: 62px;
    height: 62px;
    border-radius: 18px;
  }

  .puppy-basket {
    width: 132px;
    min-height: 80px;
  }

  .puppy-basket img {
    width: 28px;
    height: 28px;
  }

  .puppy-btn,
  .puppy-counter {
    width: 100%;
  }
}

/* ===== Тропа Добра: игра «Филворд Добрые слова» ===== */

.wordsearch-page {
  overflow-x: hidden;
}

.wordsearch-layout {
  width: min(1180px, calc(100% - 32px));
  margin: 14px auto 42px;
  display: grid;
}

.wordsearch-screen {
  display: none;
  border-radius: var(--radius, 28px);
  border: 1px solid var(--line, rgba(62, 132, 200, 0.33));
  background:
    radial-gradient(circle at 14% 18%, rgba(54, 198, 255, 0.18), transparent 36%),
    radial-gradient(circle at 84% 22%, rgba(255, 227, 107, 0.3), transparent 38%),
    linear-gradient(145deg, rgba(255,255,255,.94), rgba(246,253,255,.9));
  box-shadow: var(--shadow, 0 18px 45px rgba(37, 91, 143, 0.2));
  padding: clamp(22px, 4vw, 38px);
  position: relative;
  overflow: hidden;
}

.wordsearch-screen::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 7px;
  background: linear-gradient(90deg, #2f8df6, #36c6ff, #7ed957, #ffe36b, #ff8da0);
}

.wordsearch-screen.is-active {
  display: grid;
}

.wordsearch-screen--start,
.wordsearch-screen--result {
  min-height: calc(100vh - 170px);
  align-content: center;
  justify-items: center;
  text-align: center;
  gap: 16px;
}

.wordsearch-start-icon,
.wordsearch-result-image {
  width: clamp(130px, 18vw, 220px);
  max-height: 220px;
  object-fit: contain;
  filter: drop-shadow(0 14px 22px rgba(24,53,79,.16));
}

.wordsearch-badge {
  margin: 0;
  padding: 9px 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffd7b7, #fff2d5);
  color: #344f70;
  font-weight: 800;
  font-size: clamp(16px, 1.8vw, 22px);
}

.wordsearch-screen h1,
.wordsearch-screen h2 {
  margin: 0;
  max-width: 920px;
  font-family: "Comfortaa", "Onest", sans-serif;
  font-size: clamp(38px, 5.2vw, 74px);
  line-height: 1.08;
  color: #2b6ab8;
}

.wordsearch-screen p {
  max-width: 860px;
  margin: 0;
  color: #365877;
  font-size: clamp(18px, 2.1vw, 24px);
}

.wordsearch-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.wordsearch-btn {
  min-height: 52px;
  border: 0;
  border-radius: 16px;
  padding: 13px 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Onest", "Segoe UI", sans-serif;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.wordsearch-btn:hover {
  transform: translateY(-2px);
}

.wordsearch-btn--primary {
  background: linear-gradient(130deg, #2f8df6, #36c6ff, #58e4b5);
  color: #fff;
  box-shadow: 0 10px 22px rgba(47, 141, 246, .35);
}

.wordsearch-btn--ghost {
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(220,247,255,.9));
  color: #205992;
  border: 1px solid rgba(47, 141, 246, .32);
  box-shadow: 0 8px 18px rgba(37, 91, 143, .12);
}

.wordsearch-screen--game {
  gap: 20px;
}

.wordsearch-hud {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.wordsearch-hud__item {
  min-width: 170px;
  border: 1px solid rgba(47,141,246,.24);
  border-radius: 20px;
  padding: 12px 16px;
  background: rgba(255,255,255,.78);
  box-shadow: 0 10px 22px rgba(37, 91, 143, .1);
}

.wordsearch-hud__item--hint {
  flex: 1 1 340px;
}

.wordsearch-hud__item span {
  display: block;
  color: #4f6f8e;
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.wordsearch-hud__item strong {
  display: block;
  margin-top: 3px;
  font-family: "Comfortaa", "Onest", sans-serif;
  color: #1f5b96;
  font-size: clamp(18px, 2vw, 26px);
}

.wordsearch-game-area {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: stretch;
}

.wordsearch-board-wrap,
.wordsearch-words {
  border-radius: 28px;
  border: 1px solid rgba(47,141,246,.22);
  background:
    radial-gradient(circle at 20% 20%, rgba(255,227,107,.18), transparent 34%),
    radial-gradient(circle at 80% 24%, rgba(54,198,255,.18), transparent 36%),
    linear-gradient(180deg, rgba(255,255,255,.78), rgba(238,250,255,.72));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
}

.wordsearch-board-wrap {
  padding: clamp(14px, 2.8vw, 28px);
  display: grid;
  place-items: center;
  min-height: 640px;
}

.wordsearch-board {
  --cell-size: clamp(32px, 5.2vw, 62px);
  display: grid;
  grid-template-columns: repeat(var(--cols), var(--cell-size));
  grid-template-rows: repeat(var(--rows), var(--cell-size));
  gap: clamp(5px, .7vw, 9px);
  touch-action: none;
  user-select: none;
}

.wordsearch-cell {
  width: var(--cell-size);
  height: var(--cell-size);
  border: 2px solid rgba(47, 141, 246, .22);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(225,248,255,.86));
  color: #1f5b96;
  font-family: "Comfortaa", "Onest", sans-serif;
  font-size: clamp(20px, 2.4vw, 34px);
  font-weight: 800;
  display: grid;
  place-items: center;
  box-shadow: 0 7px 14px rgba(37, 91, 143, .12);
  transition: transform .14s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}

.wordsearch-cell.is-hovered,
.wordsearch-cell.is-selected {
  transform: translateY(-2px) scale(1.04);
  background: linear-gradient(145deg, #fff0ba, #ffd77a);
  color: #794d00;
  box-shadow: 0 10px 18px rgba(255, 184, 77, .28);
}

.wordsearch-cell.is-found {
  background: linear-gradient(145deg, #d2ffe8, #88eaae);
  color: #17623a;
  border-color: rgba(126,217,87,.58);
  box-shadow: 0 8px 18px rgba(126,217,87,.22);
}

.wordsearch-cell.is-wrong {
  animation: wordsearch-wrong .32s ease both;
}

.wordsearch-words {
  padding: 22px;
}

.wordsearch-words h2 {
  margin: 0 0 14px;
  font-family: "Comfortaa", "Onest", sans-serif;
  font-size: 28px;
  color: #2b6ab8;
}

.wordsearch-words ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.wordsearch-word {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-radius: 16px;
  padding: 11px 13px;
  background: rgba(255,255,255,.86);
  border: 1px solid rgba(47,141,246,.18);
  color: #365877;
  font-size: 18px;
  font-weight: 800;
  transition: opacity .2s ease, transform .2s ease, background .2s ease;
}

.wordsearch-word::after {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(47,141,246,.24);
  flex: 0 0 auto;
}

.wordsearch-word.is-found {
  color: #17623a;
  background: linear-gradient(135deg, rgba(210,255,232,.92), rgba(255,246,215,.9));
  text-decoration: line-through;
  transform: translateX(2px);
}

.wordsearch-word.is-found::after {
  background: #7ed957;
  box-shadow: 0 0 0 4px rgba(126,217,87,.18);
}

.wordsearch-lesson {
  padding: 16px 20px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(210,255,232,.8), rgba(255,246,215,.86));
  border: 1px solid rgba(126,217,87,.28);
}

.wordsearch-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  place-items: center;
  padding: 20px;
}

.wordsearch-modal.is-open {
  display: grid;
}

.wordsearch-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(24, 53, 79, .38);
  backdrop-filter: blur(4px);
}

.wordsearch-modal__card {
  position: relative;
  z-index: 2;
  width: min(560px, 100%);
  border-radius: 28px;
  background:
    radial-gradient(circle at 82% 14%, rgba(255,227,107,.26), transparent 34%),
    linear-gradient(145deg, #fff, #f1fbff);
  box-shadow: 0 20px 50px rgba(24,53,79,.28);
  padding: 30px;
}

.wordsearch-modal__card h2 {
  margin: 0 0 14px;
  font-family: "Comfortaa", "Onest", sans-serif;
  color: #2b6ab8;
  font-size: 32px;
}

.wordsearch-modal__card p {
  margin: 0 0 12px;
  color: #365877;
  font-size: 18px;
}

.wordsearch-modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #fff2d5;
  color: #1f5b96;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

@keyframes wordsearch-wrong {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

@media (max-width: 1080px) {
  .wordsearch-game-area {
    grid-template-columns: 1fr;
  }

  .wordsearch-board-wrap {
    min-height: auto;
  }

  .wordsearch-words ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .wordsearch-layout {
    width: calc(100% - 16px);
  }

  .wordsearch-screen {
    border-radius: 22px;
    padding: 18px;
  }

  .wordsearch-board {
    --cell-size: min(9.7vw, 44px);
    gap: 4px;
  }

  .wordsearch-cell {
    border-radius: 12px;
    font-size: 18px;
  }

  .wordsearch-words ul {
    grid-template-columns: 1fr;
  }

  .wordsearch-hud__item,
  .wordsearch-hud .wordsearch-btn {
    width: 100%;
  }
}
/* ===== Тропа Добра: игра «Собери разбитую вазу» ===== */

.vase-page { overflow-x: hidden; }

.vase-layout {
  width: min(1180px, calc(100% - 32px));
  margin: 14px auto 42px;
  display: grid;
}

.vase-screen {
  display: none;
  border-radius: var(--radius, 28px);
  border: 1px solid var(--line, rgba(62, 132, 200, .33));
  background:
    radial-gradient(circle at 14% 18%, rgba(54, 198, 255, .18), transparent 36%),
    radial-gradient(circle at 84% 22%, rgba(255, 227, 107, .3), transparent 38%),
    linear-gradient(145deg, rgba(255,255,255,.94), rgba(246,253,255,.9));
  box-shadow: var(--shadow, 0 18px 45px rgba(37, 91, 143, .2));
  padding: clamp(22px, 4vw, 38px);
  position: relative;
  overflow: hidden;
}

.vase-screen::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 7px;
  background: linear-gradient(90deg, #2f8df6, #36c6ff, #7ed957, #ffe36b, #ff8da0);
}

.vase-screen.is-active { display: grid; }

.vase-screen--start,
.vase-screen--choice,
.vase-screen--result {
  min-height: calc(100vh - 170px);
  align-content: center;
  justify-items: center;
  text-align: center;
  gap: 16px;
}

.vase-start-image,
.vase-choice-image,
.vase-result-image {
  width: clamp(150px, 22vw, 280px);
  max-height: 300px;
  object-fit: contain;
  filter: drop-shadow(0 16px 24px rgba(24,53,79,.16));
}

.vase-badge {
  margin: 0;
  padding: 9px 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffd7b7, #fff2d5);
  color: #344f70;
  font-weight: 800;
  font-size: clamp(16px, 1.8vw, 22px);
}

.vase-screen h1,
.vase-screen h2 {
  margin: 0;
  max-width: 920px;
  font-family: "Comfortaa", "Onest", sans-serif;
  font-size: clamp(38px, 5.2vw, 74px);
  line-height: 1.08;
  color: #2b6ab8;
}

.vase-screen p {
  max-width: 860px;
  margin: 0;
  color: #365877;
  font-size: clamp(18px, 2.1vw, 24px);
}

.vase-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.vase-btn {
  min-height: 52px;
  border: 0;
  border-radius: 16px;
  padding: 13px 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Onest", "Segoe UI", sans-serif;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.vase-btn:hover { transform: translateY(-2px); }

.vase-btn--primary {
  background: linear-gradient(130deg, #2f8df6, #36c6ff, #58e4b5);
  color: #fff;
  box-shadow: 0 10px 22px rgba(47, 141, 246, .35);
}

.vase-btn--ghost {
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(220,247,255,.9));
  color: #205992;
  border: 1px solid rgba(47, 141, 246, .32);
  box-shadow: 0 8px 18px rgba(37, 91, 143, .12);
}

.vase-screen--game { gap: 20px; }

.vase-hud {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.vase-hud__item {
  min-width: 170px;
  border: 1px solid rgba(47,141,246,.24);
  border-radius: 20px;
  padding: 12px 16px;
  background: rgba(255,255,255,.78);
  box-shadow: 0 10px 22px rgba(37, 91, 143, .1);
}

.vase-hud__item--hint { flex: 1 1 340px; }

.vase-hud__item span {
  display: block;
  color: #4f6f8e;
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.vase-hud__item strong {
  display: block;
  margin-top: 3px;
  font-family: "Comfortaa", "Onest", sans-serif;
  color: #1f5b96;
  font-size: clamp(18px, 2vw, 26px);
}

.vase-game-area {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 18px;
  align-items: stretch;
  min-width: 0;
}

.vase-puzzle-wrap,
.vase-tray-wrap {
  border-radius: 28px;
  border: 1px solid rgba(47,141,246,.22);
  background:
    radial-gradient(circle at 20% 20%, rgba(255,227,107,.18), transparent 34%),
    radial-gradient(circle at 80% 24%, rgba(54,198,255,.18), transparent 36%),
    linear-gradient(180deg, rgba(255,255,255,.78), rgba(238,250,255,.72));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
}

.vase-puzzle-wrap {
  min-width: 0;
  min-height: 610px;
  padding: clamp(16px, 3vw, 28px);
  display: grid;
  place-items: center;
}

.vase-puzzle {
  --piece-size: clamp(110px, 12.5vw, 165px);
  display: grid;
  grid-template-columns: repeat(var(--cols), var(--piece-size));
  grid-template-rows: repeat(var(--rows), var(--piece-size));
  gap: 8px;
  padding: 12px;
  border-radius: 24px;
  background: rgba(255,255,255,.55);
  box-shadow: inset 0 0 0 2px rgba(47,141,246,.12);
}

.vase-slot,
.vase-piece {
  width: var(--piece-size, 120px);
  height: var(--piece-size, 120px);
  border-radius: 18px;
  border: 2px dashed rgba(47, 141, 246, .24);
  background-color: rgba(255,255,255,.78);
  background-repeat: no-repeat;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(37, 91, 143, .12);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, filter .16s ease;
}

.vase-slot.is-over {
  transform: scale(1.03);
  border-color: rgba(255,184,77,.78);
  box-shadow: 0 10px 20px rgba(255, 184, 77, .24);
}

.vase-slot.is-filled {
  border-style: solid;
  border-color: rgba(126,217,87,.56);
  cursor: default;
}

.vase-slot.is-wrong { animation: vase-wrong .32s ease both; }

.vase-tray-wrap {
  padding: 22px;
  min-width: 0;
}

.vase-tray-wrap h2 {
  margin: 0 0 14px;
  font-family: "Comfortaa", "Onest", sans-serif;
  font-size: 28px;
  color: #2b6ab8;
}

.vase-tray {
  --piece-size: 88px;
  display: grid;
  grid-template-columns: repeat(3, var(--piece-size));
  justify-content: center;
  gap: 12px;
}

.vase-piece {
  border-style: solid;
  border-color: rgba(47,141,246,.24);
  background-color: #fff;
}

.vase-piece:hover,
.vase-piece.is-selected {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 12px 20px rgba(47, 141, 246, .2);
  border-color: rgba(255,184,77,.78);
}

.vase-piece.is-dragging { opacity: .55; }

.vase-choice-list {
  width: min(760px, 100%);
  display: grid;
  gap: 12px;
}

.vase-choice {
  width: 100%;
  border: 1px solid rgba(47,141,246,.22);
  border-radius: 20px;
  padding: 18px 20px;
  background: rgba(255,255,255,.88);
  color: #365877;
  font-family: "Onest", "Segoe UI", sans-serif;
  font-size: clamp(18px, 2vw, 23px);
  font-weight: 800;
  text-align: left;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}

.vase-choice:hover { transform: translateY(-2px); }

.vase-choice.is-wrong {
  background: linear-gradient(135deg, rgba(255, 141, 160, .22), rgba(255,255,255,.9));
  animation: vase-wrong .32s ease both;
}

.vase-choice.is-correct {
  background: linear-gradient(135deg, rgba(210,255,232,.9), rgba(255,246,215,.9));
  box-shadow: 0 12px 24px rgba(126,217,87,.18);
}

.vase-lesson {
  padding: 16px 20px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(210,255,232,.8), rgba(255,246,215,.86));
  border: 1px solid rgba(126,217,87,.28);
}

.vase-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  place-items: center;
  padding: 20px;
}

.vase-modal.is-open { display: grid; }

.vase-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(24, 53, 79, .38);
  backdrop-filter: blur(4px);
}

.vase-modal__card {
  position: relative;
  z-index: 2;
  width: min(560px, 100%);
  border-radius: 28px;
  background:
    radial-gradient(circle at 82% 14%, rgba(255,227,107,.26), transparent 34%),
    linear-gradient(145deg, #fff, #f1fbff);
  box-shadow: 0 20px 50px rgba(24,53,79,.28);
  padding: 30px;
}

.vase-modal__card h2 {
  margin: 0 0 14px;
  font-family: "Comfortaa", "Onest", sans-serif;
  color: #2b6ab8;
  font-size: 32px;
}

.vase-modal__card p {
  margin: 0 0 12px;
  color: #365877;
  font-size: 18px;
}

.vase-modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #fff2d5;
  color: #1f5b96;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

@keyframes vase-wrong {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

@media (max-width: 1020px) {
  .vase-game-area { grid-template-columns: 1fr; }
  .vase-puzzle-wrap { min-height: auto; }
  .vase-tray { grid-template-columns: repeat(5, var(--piece-size)); }
}

@media (max-width: 620px) {
  .vase-layout { width: calc(100% - 16px); }
  .vase-screen { border-radius: 22px; padding: 18px; }
  .vase-puzzle { --piece-size: min(27vw, 95px); gap: 5px; padding: 8px; }
  .vase-tray { --piece-size: min(22vw, 78px); grid-template-columns: repeat(3, var(--piece-size)); }
  .vase-hud__item,
  .vase-hud .vase-btn { width: 100%; }
}


/* ===== Тропа Добра: игра «Перенеси бабушке сумки» ===== */

.granny-page {
  overflow-x: hidden;
}

.granny-layout {
  width: min(1180px, calc(100% - 32px));
  margin: 14px auto 42px;
  display: grid;
}

.granny-screen {
  display: none;
  border-radius: var(--radius, 28px);
  border: 1px solid var(--line, rgba(62, 132, 200, 0.33));
  background:
    radial-gradient(circle at 16% 18%, rgba(54, 198, 255, 0.18), transparent 36%),
    radial-gradient(circle at 84% 22%, rgba(255, 227, 107, 0.3), transparent 38%),
    linear-gradient(145deg, rgba(255,255,255,.94), rgba(246,253,255,.9));
  box-shadow: var(--shadow, 0 18px 45px rgba(37, 91, 143, 0.2));
  padding: clamp(22px, 4vw, 38px);
  position: relative;
  overflow: hidden;
}

.granny-screen::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 7px;
  background: linear-gradient(90deg, #2f8df6, #36c6ff, #7ed957, #ffe36b, #ff8da0);
}

.granny-screen.is-active {
  display: grid;
}

.granny-screen--start,
.granny-screen--result {
  min-height: calc(100vh - 170px);
  align-content: center;
  justify-items: center;
  text-align: center;
  gap: 16px;
}

.granny-start-icon,
.granny-result-image {
  width: clamp(130px, 18vw, 220px);
  max-height: 230px;
  object-fit: contain;
  filter: drop-shadow(0 14px 22px rgba(24,53,79,.16));
}

.granny-badge {
  margin: 0;
  padding: 9px 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffd7b7, #fff2d5);
  color: #344f70;
  font-weight: 800;
  font-size: clamp(16px, 1.8vw, 22px);
}

.granny-screen h1,
.granny-screen h2 {
  margin: 0;
  max-width: 920px;
  font-family: "Comfortaa", "Onest", sans-serif;
  font-size: clamp(38px, 5.2vw, 74px);
  line-height: 1.08;
  color: #2b6ab8;
}

.granny-screen p {
  max-width: 860px;
  margin: 0;
  color: #365877;
  font-size: clamp(18px, 2.1vw, 24px);
}

.granny-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.granny-btn {
  min-height: 52px;
  border: 0;
  border-radius: 16px;
  padding: 13px 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Onest", "Segoe UI", sans-serif;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.granny-btn:hover {
  transform: translateY(-2px);
}

.granny-btn--primary {
  background: linear-gradient(130deg, #2f8df6, #36c6ff, #58e4b5);
  color: #fff;
  box-shadow: 0 10px 22px rgba(47, 141, 246, .35);
}

.granny-btn--ghost {
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(220,247,255,.9));
  color: #205992;
  border: 1px solid rgba(47, 141, 246, .32);
  box-shadow: 0 8px 18px rgba(37, 91, 143, .12);
}

.granny-screen--game {
  gap: 16px;
}

.granny-hud {
  display: grid;
  grid-template-columns: 160px minmax(260px, 1fr) 180px;
  gap: 12px;
  align-items: stretch;
}

.granny-hud__item {
  border: 1px solid rgba(47,141,246,.24);
  border-radius: 20px;
  padding: 12px 16px;
  background: rgba(255,255,255,.78);
  box-shadow: 0 10px 22px rgba(37, 91, 143, .1);
}

.granny-hud__item span {
  display: block;
  color: #4f6f8e;
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.granny-hud__item strong {
  display: block;
  margin-top: 3px;
  font-family: "Comfortaa", "Onest", sans-serif;
  color: #1f5b96;
  font-size: clamp(20px, 2.4vw, 28px);
}

.granny-balance {
  position: relative;
  height: 22px;
  margin-top: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff8da0, #ffe36b 38%, #d2ffe8 50%, #ffe36b 62%, #ff8da0);
  border: 1px solid rgba(47,141,246,.22);
  overflow: hidden;
}

.granny-balance__safe {
  position: absolute;
  left: 42%;
  top: 0;
  width: 16%;
  height: 100%;
  background: rgba(255,255,255,.42);
}

.granny-balance__needle {
  position: absolute;
  left: 50%;
  top: -5px;
  width: 5px;
  height: 32px;
  border-radius: 999px;
  background: #1f5b96;
  box-shadow: 0 0 0 4px rgba(255,255,255,.75), 0 5px 12px rgba(24,53,79,.22);
  transform: translateX(-50%);
}

.granny-field {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 440px;
  border-radius: 28px;
  border: 1px solid rgba(47,141,246,.24);
  background: #eaf8ff;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 14px 28px rgba(37, 91, 143, .14);
  user-select: none;
}

.granny-parallax {
  position: absolute;
  inset: 0;
  background-repeat: repeat-x;
  background-size: auto 100%;
  background-position: 0 0;
  will-change: background-position;
}

.granny-parallax--bg1 { z-index: 1; }
.granny-parallax--bg2 { z-index: 2; }
.granny-parallax--bg3 { z-index: 3; }

.granny-obstacles,
.granny-drops {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.granny-obstacle,
.granny-drop {
  position: absolute;
  object-fit: contain;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 8px 10px rgba(24,53,79,.16));
  pointer-events: none;
}

.granny-obstacle {
  width: var(--size, 80px);
}

.granny-drop {
  width: 54px;
  animation: granny-drop .8s ease-out both;
}

.granny-boy {
  position: absolute;
  left: 19%;
  bottom: 10.5%;
  width: clamp(120px, 14vw, 176px);
  z-index: 7;
  transform: translateX(-50%) rotate(var(--tilt, 0deg));
  transform-origin: 50% 92%;
  filter: drop-shadow(0 14px 18px rgba(24,53,79,.18));
  pointer-events: none;
}

.granny-boy.is-hit {
  animation: granny-hit .28s ease both;
}

.granny-field-hint {
  position: absolute;
  left: 50%;
  top: 18px;
  z-index: 10;
  transform: translateX(-50%);
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,.82);
  color: #1f5b96;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(24,53,79,.12);
  pointer-events: none;
  white-space: nowrap;
}

.granny-controls {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.granny-control {
  width: 74px;
  height: 58px;
  border: 1px solid rgba(47,141,246,.32);
  border-radius: 18px;
  background: linear-gradient(135deg, #fff, #e7f8ff);
  color: #1f5b96;
  font-size: 34px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(37,91,143,.14);
}

.granny-control:active {
  transform: translateY(2px);
}

.granny-lesson {
  padding: 16px 20px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(210,255,232,.8), rgba(255,246,215,.86));
  border: 1px solid rgba(126,217,87,.28);
}

.granny-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  place-items: center;
  padding: 20px;
}

.granny-modal.is-open {
  display: grid;
}

.granny-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(24, 53, 79, .38);
  backdrop-filter: blur(4px);
}

.granny-modal__card {
  position: relative;
  z-index: 2;
  width: min(560px, 100%);
  border-radius: 28px;
  background:
    radial-gradient(circle at 82% 14%, rgba(255,227,107,.26), transparent 34%),
    linear-gradient(145deg, #fff, #f1fbff);
  box-shadow: 0 20px 50px rgba(24,53,79,.28);
  padding: 30px;
}

.granny-modal__card h2 {
  margin: 0 0 14px;
  font-family: "Comfortaa", "Onest", sans-serif;
  color: #2b6ab8;
  font-size: 32px;
}

.granny-modal__card p {
  margin: 0 0 12px;
  color: #365877;
  font-size: 18px;
}

.granny-modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #fff2d5;
  color: #1f5b96;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

@keyframes granny-hit {
  0%, 100% { transform: translateX(-50%) rotate(var(--tilt, 0deg)); }
  35% { transform: translateX(-50%) rotate(calc(var(--tilt, 0deg) + 8deg)); }
  70% { transform: translateX(-50%) rotate(calc(var(--tilt, 0deg) - 8deg)); }
}

@keyframes granny-drop {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(.7) rotate(0deg); }
  100% { opacity: 0; transform: translate(-50%, 90px) scale(1) rotate(130deg); }
}

@media (max-width: 900px) {
  .granny-hud {
    grid-template-columns: 1fr;
  }

  .granny-field {
    min-height: 360px;
  }

  .granny-boy {
    width: clamp(100px, 22vw, 140px);
  }
}

@media (max-width: 620px) {
  .granny-layout {
    width: calc(100% - 16px);
  }

  .granny-screen {
    border-radius: 22px;
    padding: 18px;
  }

  .granny-field {
    min-height: 310px;
    border-radius: 20px;
  }

  .granny-field-hint {
    max-width: calc(100% - 20px);
    font-size: 13px;
    white-space: normal;
    text-align: center;
  }
}
/* ===== Тропа Добра: игра «Башня дружбы» ===== */

.tower-page {
  overflow-x: hidden;
}

.tower-layout {
  width: min(1180px, calc(100% - 32px));
  margin: 14px auto 42px;
  display: grid;
}

/* Экраны */

.tower-screen {
  display: none;
  position: relative;
  overflow: hidden;

  padding: clamp(22px, 4vw, 38px);

  border: 1px solid var(--line, rgba(62, 132, 200, 0.33));
  border-radius: var(--radius, 28px);

  background:
    radial-gradient(
      circle at 15% 18%,
      rgba(54, 198, 255, 0.17),
      transparent 36%
    ),
    radial-gradient(
      circle at 84% 20%,
      rgba(255, 227, 107, 0.28),
      transparent 38%
    ),
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.95),
      rgba(246, 253, 255, 0.91)
    );

  box-shadow:
    var(--shadow, 0 18px 45px rgba(37, 91, 143, 0.2));
}

.tower-screen::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 7px;

  background:
    linear-gradient(
      90deg,
      #2f8df6,
      #36c6ff,
      #7ed957,
      #ffe36b,
      #ff8da0
    );
}

.tower-screen.is-active {
  display: grid;
}

.tower-screen--start,
.tower-screen--result {
  min-height: calc(100vh - 170px);

  align-content: center;
  justify-items: center;

  gap: 16px;
  text-align: center;
}

/* Старт и результат */

.tower-start-icon,
.tower-result-image {
  width: clamp(140px, 20vw, 245px);
  max-height: 245px;

  object-fit: contain;

  filter:
    drop-shadow(
      0 15px 24px rgba(24, 53, 79, 0.17)
    );
}

.tower-badge {
  margin: 0;
  padding: 9px 18px;

  border-radius: 999px;

  background:
    linear-gradient(
      90deg,
      #ffd7b7,
      #fff2d5
    );

  color: #344f70;

  font-size: clamp(16px, 1.8vw, 22px);
  font-weight: 800;
}

.tower-screen h1,
.tower-screen h2 {
  max-width: 920px;
  margin: 0;

  color: #2b6ab8;

  font-family: "Comfortaa", "Onest", sans-serif;
  font-size: clamp(38px, 5.2vw, 74px);
  line-height: 1.08;
}

.tower-screen p {
  max-width: 870px;
  margin: 0;

  color: #365877;

  font-size: clamp(18px, 2.1vw, 24px);
}

/* Кнопки */

.tower-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;

  gap: 12px;
  margin-top: 8px;
}

.tower-btn,
.tower-choice {
  min-height: 52px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 13px 22px;

  border: 0;
  border-radius: 16px;

  font-family: "Onest", "Segoe UI", sans-serif;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;

  cursor: pointer;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease,
    opacity 0.2s ease;
}

.tower-btn:hover,
.tower-choice:hover {
  transform: translateY(-2px);
}

.tower-btn--primary {
  color: #ffffff;

  background:
    linear-gradient(
      130deg,
      #2f8df6,
      #36c6ff,
      #58e4b5
    );

  box-shadow:
    0 10px 22px rgba(47, 141, 246, 0.35);
}

.tower-btn--ghost {
  color: #205992;

  border:
    1px solid rgba(47, 141, 246, 0.32);

  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.96),
      rgba(220, 247, 255, 0.9)
    );

  box-shadow:
    0 8px 18px rgba(37, 91, 143, 0.12);
}

/* HUD */

.tower-screen--game {
  gap: 18px;
}

.tower-hud {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  flex-wrap: wrap;

  gap: 12px;
}

.tower-hud__item {
  min-width: 155px;

  padding: 11px 15px;

  border:
    1px solid rgba(47, 141, 246, 0.24);

  border-radius: 19px;

  background:
    rgba(255, 255, 255, 0.8);

  box-shadow:
    0 10px 22px rgba(37, 91, 143, 0.1);
}

.tower-hud__item--hint {
  flex: 1 1 330px;
}

.tower-hud__item span {
  display: block;

  color: #4f6f8e;

  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tower-hud__item strong {
  display: block;

  margin-top: 3px;

  color: #1f5b96;

  font-family: "Comfortaa", "Onest", sans-serif;
  font-size: clamp(17px, 1.8vw, 24px);
}

/* Игровое поле */

.tower-field {
  position: relative;
  overflow: hidden;

  width: 100%;
  min-height: 560px;
  aspect-ratio: 16 / 9;

  border:
    1px solid rgba(47, 141, 246, 0.24);

  border-radius: 28px;

  background: #f4fbff;

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    0 16px 34px rgba(24, 53, 79, 0.14);

  user-select: none;
  touch-action: manipulation;
}

/* Фон с параллаксом камеры */

.tower-bg {
  position: absolute;
  inset: -12% 0;

  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.05),
      rgba(255, 255, 255, 0.1)
    ),
    url("images/tropa/tower/bg.png")
      center center / cover no-repeat;

  transform:
    translateY(var(--camera-bg-y, 0px))
    scale(1.04);

  transform-origin: center center;

  transition:
    transform 0.45s cubic-bezier(0.22, 0.8, 0.3, 1);

  will-change: transform;
}

/* Область, в которой строится башня */

.tower-stage {
  position: absolute;
  inset: 0 0 90px;

  overflow: hidden;
}

/* Вся поставленная башня */
.tower-stack {
  position: absolute;

  left: 50%;
  bottom: 4%;

  width: 100%;
  height: 88%;

  transform:
    translateX(
      calc(
        -50% + var(--tower-sway-x, 0px)
      )
    )
    translateY(
      var(--camera-y, 0px)
    );

  transform-origin: 50% 100%;

  will-change: transform;

  pointer-events: none;
}

/* Основание башни */

.tower-base {
  position: absolute;

  left: 50%;
  bottom: 0;

  width: clamp(170px, 22vw, 270px);
  height: 22px;

  transform:
    translateX(-50%);

  border-radius:
    999px 999px 12px 12px;

  background:
    linear-gradient(
      180deg,
      #d99b52,
      #9c622c
    );

  box-shadow:
    0 9px 18px rgba(69, 44, 20, 0.25);
}

/* Общие стили блоков */

.tower-placed-block,
.tower-moving-block {
  position: absolute;

  width: clamp(150px, 19vw, 230px);
  aspect-ratio: 3.2 / 1;

  padding: 0;

  border: 0;

  background: transparent;
}

/* Движущийся блок */

.tower-moving-block {
  top: 5%;
  left: 0;

  z-index: 30;

  cursor: pointer;

  filter:
    drop-shadow(
      0 12px 14px rgba(24, 53, 79, 0.22)
    );
}

.tower-moving-block[hidden] {
  display: none !important;
}

/* Поставленные блоки */

.tower-placed-block {
  z-index: 15;

  transform:
    translateX(-50%);

  filter:
    drop-shadow(
      0 8px 10px rgba(24, 53, 79, 0.16)
    );
}

.tower-placed-block img,
.tower-moving-block img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: contain;

  pointer-events: none;
}

/* Слова поверх блоков */

.tower-placed-block span,
.tower-moving-block span {
  position: absolute;
  inset: 0;

  display: grid;
  place-items: center;

  padding: 0 6%;

  color: #214665;

  font-family: "Comfortaa", "Onest", sans-serif;
  font-size: clamp(11px, 1.4vw, 18px);
  font-weight: 700;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;

  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9);

  pointer-events: none;
}

.tower-placed-block.is-bad span,
.tower-moving-block.is-bad span {
  color: #7a2f38;
}

/* Блок во время морального выбора */

.tower-moving-block.is-deciding {
  left: 50% !important;
  top: 7%;

  transform:
    translateX(-50%);

  animation:
    tower-preview 1.2s ease-in-out infinite;
}

/* Сообщения */

.tower-feedback {
  position: absolute;

  left: 50%;
  top: 23%;

  z-index: 50;

  min-width: 220px;
  max-width: min(520px, 84%);

  padding: 10px 16px;

  border-radius: 999px;

  color: #214665;
  background:
    rgba(255, 255, 255, 0.91);

  box-shadow:
    0 10px 24px rgba(24, 53, 79, 0.16);

  text-align: center;
  font-weight: 800;

  opacity: 0;

  transform:
    translate(-50%, -50%);

  pointer-events: none;

  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.tower-feedback.is-visible {
  opacity: 1;

  transform:
    translate(-50%, -50%)
    scale(1.03);
}

/* Кнопки выбора */

.tower-controls {
  position: absolute;

  left: 50%;
  bottom: 18px;

  z-index: 60;

  display: flex;
  gap: 14px;

  transform:
    translateX(-50%);
}

.tower-choice {
  min-width: 150px;

  color: #ffffff;
}

.tower-choice--place {
  background:
    linear-gradient(
      130deg,
      #4ebf69,
      #7ed957
    );

  box-shadow:
    0 10px 22px rgba(78, 191, 105, 0.32);
}

.tower-choice--remove {
  background:
    linear-gradient(
      130deg,
      #ff9474,
      #ff657d
    );

  box-shadow:
    0 10px 22px rgba(255, 101, 125, 0.3);
}

.tower-controls.is-drop-mode .tower-choice {
  display: none;
}

/* Финальная плашка */

.tower-lesson {
  padding: 16px 20px;

  border:
    1px solid rgba(126, 217, 87, 0.28);

  border-radius: 18px;

  background:
    linear-gradient(
      135deg,
      rgba(210, 255, 232, 0.8),
      rgba(255, 246, 215, 0.86)
    );
}

/* Окно помощи */

.tower-modal {
  position: fixed;
  inset: 0;

  z-index: 2000;

  display: none;
  place-items: center;

  padding: 20px;
}

.tower-modal.is-open {
  display: grid;
}

.tower-modal__overlay {
  position: absolute;
  inset: 0;

  background:
    rgba(24, 53, 79, 0.38);

  backdrop-filter:
    blur(4px);
}

.tower-modal__card {
  position: relative;

  z-index: 2;

  width: min(570px, 100%);

  padding: 30px;

  border-radius: 28px;

  background:
    radial-gradient(
      circle at 82% 14%,
      rgba(255, 227, 107, 0.26),
      transparent 34%
    ),
    linear-gradient(
      145deg,
      #ffffff,
      #f1fbff
    );

  box-shadow:
    0 20px 50px rgba(24, 53, 79, 0.28);
}

.tower-modal__card h2 {
  margin: 0 0 14px;

  color: #2b6ab8;

  font-family: "Comfortaa", "Onest", sans-serif;
  font-size: 32px;
}

.tower-modal__card p {
  margin: 0 0 12px;

  color: #365877;

  font-size: 18px;
}

.tower-modal__close {
  position: absolute;

  top: 12px;
  right: 14px;

  width: 40px;
  height: 40px;

  border: 0;
  border-radius: 50%;

  color: #1f5b96;
  background: #fff2d5;

  font-size: 30px;
  line-height: 1;

  cursor: pointer;
}

/* Анимация блока во время выбора */

@keyframes tower-preview {
  0%,
  100% {
    transform:
      translateX(-50%)
      translateY(0);
  }

  50% {
    transform:
      translateX(-50%)
      translateY(-5px);
  }
}

/* Планшеты */

@media (max-width: 900px) {
  .tower-field {
    min-height: 620px;
    aspect-ratio: auto;
  }

  .tower-stage {
    inset:
      0 0 104px;
  }

  .tower-placed-block,
  .tower-moving-block {
    width:
      clamp(145px, 28vw, 210px);
  }
}

/* Телефоны */

@media (max-width: 760px) {
  .tower-layout {
    width:
      calc(100% - 16px);
  }

  .tower-screen {
    padding: 18px;
    border-radius: 22px;
  }

  .tower-field {
    min-height: 560px;
    aspect-ratio: auto;
    border-radius: 22px;
  }

  .tower-stage {
    inset:
      0 0 104px;
  }

  .tower-controls {
    width:
      calc(100% - 24px);

    gap: 8px;
  }

  .tower-choice {
    min-width: 0;
    flex: 1;

    padding-inline: 12px;
  }

  .tower-hud__item,
  .tower-hud .tower-btn {
    width: 100%;
  }

  .tower-placed-block,
  .tower-moving-block {
    width:
      clamp(138px, 47vw, 190px);
  }

  .tower-placed-block span,
  .tower-moving-block span {
    font-size:
      clamp(10px, 3.3vw, 15px);
  }

  .tower-feedback {
    top: 27%;

    min-width: 180px;
    max-width: 88%;

    font-size: 14px;
  }
}

/* ===== Тропа Добра: игра «Помоги маме рассортировать посуду» ===== */

.dishes-page {
  overflow-x: hidden;
}

.dishes-layout {
  width: min(1180px, calc(100% - 32px));
  margin: 14px auto 42px;
  display: grid;
}

.dishes-screen {
  display: none;
  position: relative;
  overflow: hidden;
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid var(--line, rgba(62, 132, 200, 0.33));
  border-radius: var(--radius, 28px);
  background:
    radial-gradient(circle at 16% 18%, rgba(54, 198, 255, 0.18), transparent 36%),
    radial-gradient(circle at 84% 22%, rgba(255, 227, 107, 0.3), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(246, 253, 255, 0.9));
  box-shadow: var(--shadow, 0 18px 45px rgba(37, 91, 143, 0.2));
}

.dishes-screen::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: 30;
  height: 7px;
  background: linear-gradient(
    90deg,
    #2f8df6,
    #36c6ff,
    #7ed957,
    #ffe36b,
    #ff8da0
  );
}

.dishes-screen.is-active {
  display: grid;
}

.dishes-screen--start,
.dishes-screen--result {
  min-height: calc(100vh - 170px);
  align-content: center;
  justify-items: center;
  gap: 16px;
  text-align: center;
}

.dishes-start-icon,
.dishes-result-image {
  width: clamp(130px, 18vw, 220px);
  max-height: 230px;
  object-fit: contain;
  filter: drop-shadow(0 14px 22px rgba(24, 53, 79, 0.16));
}

.dishes-badge {
  width: fit-content;
  margin: 0;
  padding: 9px 18px;
  border-radius: 999px;
  color: #344f70;
  background: linear-gradient(90deg, #ffd7b7, #fff2d5);
  font-size: clamp(16px, 1.8vw, 22px);
  font-weight: 800;
}

.dishes-screen h1,
.dishes-screen h2 {
  max-width: 920px;
  margin: 0;
  color: #2b6ab8;
  font-family: "Comfortaa", "Onest", sans-serif;
  font-size: clamp(38px, 5.2vw, 74px);
  line-height: 1.08;
}

.dishes-screen p {
  max-width: 860px;
  margin: 0;
  color: #365877;
  font-size: clamp(18px, 2.1vw, 24px);
}

.dishes-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.dishes-btn {
  min-height: 52px;
  padding: 13px 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 16px;
  font-family: "Onest", "Segoe UI", sans-serif;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
}

.dishes-btn:hover {
  transform: translateY(-2px);
}

.dishes-btn--primary {
  color: #ffffff;
  background: linear-gradient(130deg, #2f8df6, #36c6ff, #58e4b5);
  box-shadow: 0 10px 22px rgba(47, 141, 246, 0.35);
}

.dishes-btn--ghost {
  color: #205992;
  border: 1px solid rgba(47, 141, 246, 0.32);
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.96),
      rgba(220, 247, 255, 0.9)
    );
  box-shadow: 0 8px 18px rgba(37, 91, 143, 0.12);
}

.dishes-screen--game {
  gap: 18px;
}

.dishes-hud {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.dishes-hud__item {
  min-width: 170px;
  padding: 12px 16px;
  border: 1px solid rgba(47, 141, 246, 0.24);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 22px rgba(37, 91, 143, 0.1);
}

.dishes-hud__item--hint {
  flex: 1 1 340px;
}

.dishes-hud__item span {
  display: block;
  color: #4f6f8e;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dishes-hud__item strong {
  display: block;
  margin-top: 3px;
  color: #1f5b96;
  font-family: "Comfortaa", "Onest", sans-serif;
  font-size: clamp(18px, 2vw, 26px);
}

.dishes-field {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(47, 141, 246, 0.24);
  border-radius: 28px;
  background: #f7e1b4;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 16px 34px rgba(24, 53, 79, 0.14);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.dishes-background {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
}

.dishes-drop-layer,
.dishes-placed-layer,
.dishes-items-layer {
  position: absolute;
  inset: 0;
}

.dishes-drop-layer {
  z-index: 2;
  pointer-events: none;
}

.dishes-placed-layer {
  z-index: 3;
  pointer-events: none;
}

.dishes-items-layer {
  z-index: 5;
}

.dishes-drop-zone {
  position: absolute;
  border: 3px dashed transparent;
  border-radius: 18px;
  background: transparent;
  transition:
    border-color 0.16s ease,
    background-color 0.16s ease,
    transform 0.16s ease;
}

.dishes-field.dishes-debug .dishes-drop-zone {
  border-color: rgba(47, 141, 246, 0.72);
  background: rgba(54, 198, 255, 0.14);
}

.dishes-drop-zone.is-active {
  border-color: rgba(126, 217, 87, 0.92);
  background: rgba(210, 255, 232, 0.28);
  box-shadow: 0 0 24px rgba(126, 217, 87, 0.32);
  transform: scale(1.015);
}

.dishes-item,
.dishes-placed-item {
  position: absolute;
  display: block;
  object-fit: contain;
  transform-origin: 50% 50%;
  -webkit-user-drag: none;
}

.dishes-item {
  z-index: 1;
  cursor: grab;
  touch-action: none;
  filter: drop-shadow(0 7px 8px rgba(81, 53, 23, 0.22));
  transition:
    left 0.24s ease,
    top 0.24s ease,
    transform 0.18s ease,
    filter 0.18s ease,
    opacity 0.2s ease;
}

.dishes-item:hover {
  filter:
    drop-shadow(0 0 13px rgba(255, 227, 107, 0.78))
    drop-shadow(0 8px 8px rgba(81, 53, 23, 0.2));
}

.dishes-item.is-dragging {
  z-index: 100;
  cursor: grabbing;
  transform: translateY(-50%) scale(1.08) rotate(-2deg) !important;
  filter: drop-shadow(0 15px 13px rgba(49, 49, 49, 0.28));
  transition: transform 0.12s ease, filter 0.12s ease;
}

.dishes-item.is-returning {
  pointer-events: none;
}

.dishes-item.is-placed {
  pointer-events: none;
  opacity: 0;
  transform: translateY(-50%) scale(0.72) !important;
}

.dishes-placed-item {
  z-index: 2;
  filter: drop-shadow(0 5px 6px rgba(81, 53, 23, 0.16));
  animation: dishes-place-pop 0.34s ease both;
}

.dishes-feedback {
  position: absolute;
  left: 50%;
  top: 8%;
  z-index: 30;
  min-width: 220px;
  max-width: min(520px, 84%);
  padding: 10px 16px;
  border-radius: 999px;
  color: #214665;
  background: rgba(255, 255, 255, 0.91);
  box-shadow: 0 10px 24px rgba(24, 53, 79, 0.16);
  text-align: center;
  font-weight: 800;
  opacity: 0;
  transform: translate(-50%, -12px);
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.dishes-feedback.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.dishes-feedback.is-error {
  color: #7a2f38;
  background: rgba(255, 239, 242, 0.95);
}

.dishes-game-hint {
  justify-self: center;
  max-width: 760px !important;
  padding: 10px 16px;
  border: 1px solid rgba(47, 141, 246, 0.18);
  border-radius: 999px;
  color: #365877 !important;
  background: rgba(255, 255, 255, 0.72);
  font-size: 16px !important;
  font-weight: 700;
  text-align: center;
}

.dishes-lesson {
  padding: 16px 20px;
  border: 1px solid rgba(126, 217, 87, 0.28);
  border-radius: 18px;
  background:
    linear-gradient(
      135deg,
      rgba(210, 255, 232, 0.8),
      rgba(255, 246, 215, 0.86)
    );
}

.dishes-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  place-items: center;
  padding: 20px;
}

.dishes-modal.is-open {
  display: grid;
}

.dishes-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(24, 53, 79, 0.38);
  backdrop-filter: blur(4px);
}

.dishes-modal__card {
  position: relative;
  z-index: 2;
  width: min(570px, 100%);
  padding: 30px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 82% 14%, rgba(255, 227, 107, 0.26), transparent 34%),
    linear-gradient(145deg, #ffffff, #f1fbff);
  box-shadow: 0 20px 50px rgba(24, 53, 79, 0.28);
}

.dishes-modal__card h2 {
  margin: 0 0 14px;
  color: #2b6ab8;
  font-family: "Comfortaa", "Onest", sans-serif;
  font-size: 32px;
}

.dishes-modal__card p {
  margin: 0 0 12px;
  color: #365877;
  font-size: 18px;
}

.dishes-modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  color: #1f5b96;
  background: #fff2d5;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

@keyframes dishes-place-pop {
  0% {
    opacity: 0;
    transform: translateY(-50%) scale(0.68);
  }

  72% {
    opacity: 1;
    transform: translateY(-50%) scale(1.08);
  }

  100% {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }
}

@media (max-width: 760px) {
  .dishes-layout {
    width: calc(100% - 16px);
  }

  .dishes-screen {
    padding: 18px;
    border-radius: 22px;
  }

  .dishes-screen--start,
  .dishes-screen--result {
    min-height: calc(100dvh - 128px);
    align-content: start;
  }

  .dishes-hud__item,
  .dishes-hud .dishes-btn,
  .dishes-btn {
    width: 100%;
  }

  .dishes-field {
    border-radius: 20px;
  }

  .dishes-feedback {
    top: 5%;
    min-width: 180px;
    max-width: 90%;
    padding: 7px 12px;
    font-size: 12px;
  }

  .dishes-game-hint {
    border-radius: 18px;
    font-size: 14px !important;
  }

  .dishes-modal__card {
    padding: 24px 18px 20px;
    border-radius: 24px;
  }
}

@media (max-width: 620px) and (orientation: portrait) {
  .dishes-field {
    min-height: 360px;
  }
}

/* ===== Тропа Добра: игра «Мост примирения» ===== */

.bridge-page {
  overflow-x: hidden;
}

.bridge-layout {
  width: min(1180px, calc(100% - 32px));
  margin: 14px auto 42px;
  display: grid;
}

.bridge-screen {
  display: none;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 84% 14%, rgba(255, 227, 107, 0.30), transparent 36%),
    radial-gradient(circle at 12% 86%, rgba(54, 198, 255, 0.20), transparent 40%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(242, 252, 255, 0.92));
  box-shadow: var(--shadow);
  padding: clamp(22px, 3.6vw, 38px);
}

.bridge-screen::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 7px;
  background: linear-gradient(90deg, var(--blue), var(--blue-2), var(--green), var(--sun), var(--coral));
}

.bridge-screen.is-active {
  display: grid;
}

.bridge-screen--start,
.bridge-screen--result {
  min-height: min(720px, calc(100dvh - 130px));
  place-items: center;
  align-content: center;
  text-align: center;
}

.bridge-start-icon {
  width: clamp(118px, 19vw, 178px);
  aspect-ratio: 1;
  object-fit: contain;
  filter: drop-shadow(0 14px 18px rgba(24, 53, 79, 0.18));
}

.bridge-badge,
.bridge-step {
  width: fit-content;
  margin: 12px auto;
  padding: 8px 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--peach), #fff2d5);
  color: #65596a;
  font-weight: 800;
}

.bridge-screen h1,
.bridge-screen h2 {
  margin: 0;
  color: #2b6ab8;
  font-family: "Comfortaa", "Onest", sans-serif;
  line-height: 1.1;
}

.bridge-screen--start h1 {
  font-size: clamp(38px, 5vw, 64px);
}

.bridge-screen--start > p:not(.bridge-badge),
.bridge-screen--result > p:not(.bridge-badge):not(.bridge-lesson) {
  max-width: 760px;
  margin: 16px auto 0;
  color: #365877;
  font-size: clamp(18px, 2vw, 22px);
}

.bridge-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.bridge-btn {
  min-height: 52px;
  padding: 12px 22px;
  border: 0;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #22527e;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 22px rgba(24, 53, 79, 0.14);
  font: 800 17px/1.2 "Onest", sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.bridge-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(24, 53, 79, 0.20);
}

.bridge-btn--primary {
  color: #fff;
  background: linear-gradient(130deg, var(--blue), var(--blue-2), #58e4b5);
  box-shadow: 0 12px 24px rgba(47, 141, 246, 0.34);
}

.bridge-btn--ghost {
  border: 1px solid rgba(47, 141, 246, 0.24);
}

.bridge-screen--game {
  gap: 18px;
}

.bridge-hud {
  display: grid;
  grid-template-columns: minmax(120px, 0.55fr) minmax(260px, 1.8fr) auto;
  gap: 12px;
  align-items: stretch;
}

.bridge-hud__item {
  min-height: 70px;
  padding: 11px 15px;
  border: 1px solid rgba(47, 141, 246, 0.20);
  border-radius: 18px;
  display: grid;
  align-content: center;
  background: rgba(255, 255, 255, 0.82);
}

.bridge-hud__item span {
  color: #58738d;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.bridge-hud__item strong {
  color: #255f99;
  font-size: 18px;
}

.bridge-field {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(47, 141, 246, 0.30);
  border-radius: 26px;
  background: #dff7ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.56), 0 16px 34px rgba(24, 53, 79, 0.16);
  user-select: none;
}

.bridge-field__bg,
.bridge-piece {
  position: absolute;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
}

.bridge-field__bg {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bridge-pieces {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.bridge-piece {
  opacity: 0;
  transform: translateY(-10px) scale(0.98);
  filter: drop-shadow(0 9px 8px rgba(78, 54, 25, 0.16));
  transition: opacity 0.34s ease, transform 0.42s cubic-bezier(.2,.9,.3,1.25), filter 0.34s ease;
}

.bridge-piece.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: bridge-piece-glow 0.72s ease both;
}

.bridge-character {
  position: absolute;
  z-index: 5;
  width: clamp(58px, 9.2%, 118px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 9px 10px rgba(24, 53, 79, 0.22));
  pointer-events: none;
  transition: left 1.1s ease, right 1.1s ease, transform 0.5s ease, opacity 0.3s ease;
}

.bridge-character--left {
  left: 6%;
  bottom: 6%;
}

.bridge-character--right {
  right: 6%;
  bottom: 6%;
}

.bridge-field.is-complete .bridge-character--left {
  left: 42%;
  transform: translateX(-50%) translateY(-5%);
}

.bridge-field.is-complete .bridge-character--right {
  right: 42%;
  transform: translateX(50%) translateY(-5%);
}

.bridge-feedback {
  position: absolute;
  left: 50%;
  top: 7%;
  z-index: 12;
  max-width: min(620px, 86%);
  padding: 10px 18px;
  border-radius: 999px;
  color: #205b90;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 24px rgba(24, 53, 79, 0.18);
  font-weight: 800;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, -12px);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.bridge-feedback.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.bridge-feedback.is-wrong {
  color: #793743;
  background: rgba(255, 239, 242, 0.96);
}

.bridge-sparkles {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.bridge-sparkle {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff4a8;
  box-shadow: 0 0 16px #ffe36b;
  animation: bridge-sparkle 0.85s ease-out both;
}

.bridge-question-panel {
  padding: clamp(18px, 2.6vw, 28px);
  border: 1px solid rgba(47, 141, 246, 0.22);
  border-radius: 24px;
  background:
    radial-gradient(circle at 90% 12%, rgba(255, 227, 107, 0.20), transparent 34%),
    rgba(255, 255, 255, 0.82);
}

.bridge-question-panel h2 {
  font-size: clamp(23px, 3vw, 34px);
  text-align: center;
}

.bridge-choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.bridge-choice {
  min-height: 84px;
  padding: 14px 16px;
  border: 1px solid rgba(47, 141, 246, 0.24);
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #244f76;
  background:
    radial-gradient(circle at 90% 10%, rgba(255, 227, 107, 0.20), transparent 34%),
    linear-gradient(145deg, rgba(255,255,255,.98), rgba(232,249,255,.92));
  box-shadow: 0 10px 20px rgba(37, 91, 143, 0.12);
  font: 750 16px/1.32 "Onest", sans-serif;
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.bridge-choice:hover:not(:disabled),
.bridge-choice:focus-visible:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(47, 141, 246, 0.48);
  box-shadow: 0 14px 26px rgba(37, 91, 143, 0.18);
}

.bridge-choice__icon {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #fff2c3, #dcf7ff);
  font-size: 23px;
}

.bridge-choice.is-correct {
  border-color: rgba(92, 190, 95, 0.58);
  background: linear-gradient(145deg, #fff, #e2ffe7);
  animation: bridge-correct 0.42s ease;
}

.bridge-choice.is-wrong {
  border-color: rgba(255, 120, 130, 0.58);
  background: linear-gradient(145deg, #fff, #fff0f1);
  animation: bridge-wrong 0.34s ease;
}

.bridge-choice:disabled {
  cursor: default;
}

.bridge-choice.is-muted {
  opacity: 0.58;
}

.bridge-result-image {
  width: min(420px, 88%);
  max-height: 390px;
  object-fit: contain;
  filter: drop-shadow(0 16px 20px rgba(24, 53, 79, 0.18));
}

.bridge-screen--result h2 {
  font-size: clamp(32px, 4.2vw, 52px);
}

.bridge-lesson {
  max-width: 760px;
  margin: 18px auto 0;
  padding: 14px 20px;
  border: 1px solid rgba(126, 217, 87, 0.30);
  border-radius: 18px;
  color: #285e55;
  background: linear-gradient(135deg, rgba(210,255,232,.86), rgba(255,246,215,.90));
  font-size: 18px;
  font-weight: 800;
}

.bridge-modal {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: none;
  place-items: center;
  padding: 20px;
}

.bridge-modal.is-open {
  display: grid;
}

.bridge-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(24, 53, 79, 0.42);
  backdrop-filter: blur(5px);
}

.bridge-modal__card {
  position: relative;
  z-index: 2;
  width: min(590px, 100%);
  padding: 30px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 84% 12%, rgba(255, 227, 107, 0.28), transparent 34%),
    linear-gradient(145deg, #fff, #f0fbff);
  box-shadow: 0 24px 58px rgba(24, 53, 79, 0.30);
}

.bridge-modal__card h2 {
  margin: 0 0 14px;
  color: #2b6ab8;
  font: 700 32px/1.15 "Comfortaa", "Onest", sans-serif;
}

.bridge-modal__card p {
  margin: 0 0 12px;
  color: #365877;
  font-size: 18px;
}

.bridge-modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  color: #1f5b96;
  background: #fff2d5;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

@keyframes bridge-piece-glow {
  0% { filter: drop-shadow(0 0 0 rgba(255, 227, 107, 0)); }
  50% { filter: drop-shadow(0 0 18px rgba(255, 227, 107, 0.95)); }
  100% { filter: drop-shadow(0 9px 8px rgba(78, 54, 25, 0.16)); }
}

@keyframes bridge-sparkle {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.3); }
  45% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -95px) scale(1.4); }
}

@keyframes bridge-correct {
  50% { transform: scale(1.025); }
}

@keyframes bridge-wrong {
  25%, 75% { transform: translateX(-6px); }
  50% { transform: translateX(6px); }
}

@media (max-width: 820px) {
  .bridge-hud {
    grid-template-columns: 1fr 1.6fr;
  }

  .bridge-hud .bridge-btn {
    grid-column: 1 / -1;
  }

  .bridge-choices {
    grid-template-columns: 1fr;
  }

  .bridge-choice {
    min-height: 68px;
  }
}

@media (max-width: 620px) {
  .bridge-layout {
    width: calc(100% - 16px);
  }

  .bridge-screen {
    padding: 16px;
    border-radius: 22px;
  }

  .bridge-screen--start,
  .bridge-screen--result {
    min-height: calc(100dvh - 112px);
    align-content: start;
  }

  .bridge-hud {
    grid-template-columns: 1fr;
  }

  .bridge-hud .bridge-btn {
    grid-column: auto;
    width: 100%;
  }

  .bridge-field {
    border-radius: 18px;
  }

  .bridge-question-panel {
    padding: 16px 12px;
    border-radius: 20px;
  }

  .bridge-choice {
    border-radius: 17px;
    font-size: 15px;
  }

  .bridge-character {
    width: 11.5%;
  }

  .bridge-modal__card {
    padding: 24px 18px 20px;
    border-radius: 24px;
  }
}

/* =========================================================
   Станция «Собери рюкзак добрых дел»
   ========================================================= */

.backpack-page {
  min-height: 100vh;
}

.backpack-layout {
  width: min(1120px, calc(100% - 32px));
  margin: 34px auto 60px;
}

.backpack-screen {
  display: none;
  position: relative;
  overflow: hidden;
  padding: clamp(26px, 4vw, 50px);
  border: 1px solid rgba(109, 151, 184, 0.28);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 22px 55px rgba(62, 96, 120, 0.18);
}

.backpack-screen.is-active {
  display: block;
  animation: backpack-screen-in 0.45s ease both;
}

.backpack-screen--start,
.backpack-screen--result {
  min-height: 630px;
  text-align: center;
}

.backpack-screen--start {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.backpack-screen--start.is-active {
  display: flex;
}

.backpack-screen--start h1,
.backpack-screen--result h2 {
  max-width: 780px;
  margin: 12px auto 16px;
  font-family: 'Comfortaa', sans-serif;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.08;
  color: #315e64;
}

.backpack-screen--start > p:not(.backpack-badge),
.backpack-screen--result > p:not(.backpack-badge):not(.backpack-lesson) {
  max-width: 720px;
  margin: 0 auto 24px;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.55;
  color: #527078;
}

.backpack-start-icon {
  width: clamp(150px, 19vw, 220px);
  height: clamp(150px, 19vw, 220px);
  object-fit: contain;
  filter: drop-shadow(0 18px 22px rgba(55, 93, 103, 0.2));
  animation: backpack-float 3.2s ease-in-out infinite;
}

.backpack-badge {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  margin: 8px 0 0;
  padding: 8px 16px;
  border-radius: 999px;
  background: #fff1c7;
  color: #8c6722;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
}

.backpack-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}

.backpack-actions--center {
  margin-top: 22px;
}

.backpack-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 13px 24px;
  border: 0;
  border-radius: 17px;
  font: 700 16px/1 'Onest', sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.backpack-btn:hover {
  transform: translateY(-2px);
}

.backpack-btn--primary {
  color: #fff;
  background: linear-gradient(135deg, #35a9f3, #49d9ac);
  box-shadow: 0 12px 24px rgba(53, 169, 243, 0.26);
}

.backpack-btn--ghost {
  color: #3f6871;
  background: #fff;
  border: 1px solid rgba(72, 121, 134, 0.22);
  box-shadow: 0 8px 18px rgba(72, 121, 134, 0.1);
}

.backpack-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.backpack-panel-head h2 {
  margin: 8px 0 7px;
  font-family: 'Comfortaa', sans-serif;
  font-size: clamp(27px, 3.3vw, 43px);
  color: #315e64;
}

.backpack-panel-head p:not(.backpack-badge) {
  margin: 0;
  color: #627b80;
  font-size: 17px;
}

.backpack-progress-wrap {
  flex: 0 0 auto;
  min-width: 260px;
  padding: 15px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 26px rgba(55, 92, 105, 0.12);
  text-align: center;
}

.backpack-progress-label {
  display: block;
  margin-bottom: 8px;
  color: #6c7d82;
  font-size: 13px;
  font-weight: 700;
}

.backpack-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 34px;
}

.backpack-progress-item {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #b8c4c6;
  font-size: 25px;
  line-height: 1;
  transition: transform 0.3s ease;
}

.backpack-progress-item.is-filled {
  animation: backpack-pop 0.42s ease both;
}

.backpack-field {
  position: relative;
  min-height: 610px;
  overflow: hidden;
  border-radius: 28px;
  background: #eaf7ec;
  box-shadow: inset 0 0 0 1px rgba(73, 119, 93, 0.14);
}

.backpack-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  pointer-events: none;
}

.backpack-bag-zone {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 44%;
  width: clamp(210px, 29vw, 330px);
  transform: translate(-50%, -50%);
}

.backpack-bag {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  max-height: 330px;
  object-fit: contain;
  filter: drop-shadow(0 18px 16px rgba(34, 68, 55, 0.22));
  transition: transform 0.28s ease;
}

.backpack-glow {
  position: absolute;
  z-index: 1;
  inset: 10% 4%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 232, 122, 0.78), rgba(255, 232, 122, 0) 68%);
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.backpack-bag-zone.is-receiving .backpack-bag {
  animation: backpack-bounce 0.55s ease;
}

.backpack-bag-zone.is-receiving .backpack-glow,
.backpack-bag-zone.is-full .backpack-glow {
  opacity: 1;
  transform: scale(1.1);
}

.backpack-bag-zone.is-full .backpack-bag {
  animation: backpack-celebrate 0.8s ease infinite alternate;
}

.backpack-count {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: -4px;
  transform: translateX(-50%);
  min-width: 88px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #416970;
  box-shadow: 0 8px 18px rgba(52, 83, 88, 0.16);
  text-align: center;
  font-weight: 800;
}

.backpack-cards {
  position: absolute;
  z-index: 5;
  left: 5%;
  right: 5%;
  bottom: 30px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.backpack-deed-card {
  min-height: 112px;
  padding: 17px 15px;
  border: 2px solid rgba(72, 143, 169, 0.14);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  color: #355d66;
  box-shadow: 0 12px 24px rgba(45, 80, 91, 0.15);
  font: 700 clamp(15px, 1.55vw, 19px)/1.35 'Comfortaa', sans-serif;
  cursor: pointer;
  transform: translateY(18px);
  opacity: 0;
  animation: backpack-card-in 0.42s ease forwards;
  animation-delay: calc(var(--card-index) * 70ms);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.backpack-deed-card:hover:not(:disabled) {
  transform: translateY(-5px) rotate(-0.5deg);
  border-color: rgba(54, 181, 137, 0.42);
  box-shadow: 0 17px 30px rgba(45, 80, 91, 0.2);
}

.backpack-deed-card:focus-visible {
  outline: 4px solid rgba(62, 174, 240, 0.35);
  outline-offset: 3px;
}

.backpack-deed-card.is-wrong {
  border-color: #ef9d9d;
  background: #fff3f3;
  animation: backpack-wrong 0.5s ease;
}

.backpack-deed-card.is-collected {
  visibility: hidden;
}

.backpack-flying-card {
  position: fixed;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 17px 15px;
  border: 2px solid rgba(72, 143, 169, 0.14);
  border-radius: 22px;
  background: #fff;
  color: #355d66;
  box-shadow: 0 14px 30px rgba(45, 80, 91, 0.2);
  font: 700 clamp(15px, 1.55vw, 19px)/1.35 'Comfortaa', sans-serif;
  text-align: center;
  pointer-events: none;
  animation: backpack-fly var(--fly-duration) cubic-bezier(0.5, 0, 0.3, 1) forwards;
}

.backpack-feedback {
  position: absolute;
  z-index: 8;
  top: 20px;
  left: 50%;
  max-width: min(620px, calc(100% - 32px));
  padding: 12px 18px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 25px rgba(46, 79, 88, 0.16);
  color: #42636a;
  font-weight: 700;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, -12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.backpack-feedback.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.backpack-feedback.is-success {
  color: #357460;
}

.backpack-feedback.is-wrong {
  color: #a25b5b;
}

.backpack-result-image {
  display: block;
  width: min(560px, 86%);
  max-height: 330px;
  margin: 0 auto 12px;
  object-fit: contain;
  filter: drop-shadow(0 18px 24px rgba(59, 89, 80, 0.2));
}

.backpack-lesson {
  display: inline-block;
  max-width: 700px;
  margin: 2px auto 24px;
  padding: 13px 20px;
  border-radius: 18px;
  background: #fff5cf;
  color: #806422;
  font-weight: 800;
}

.backpack-modal {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.backpack-modal.is-open {
  display: flex;
}

.backpack-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(39, 61, 68, 0.48);
  backdrop-filter: blur(5px);
}

.backpack-modal__card {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  padding: 30px;
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(23, 50, 59, 0.28);
}

.backpack-modal__card h2 {
  margin: 0 0 15px;
  font-family: 'Comfortaa', sans-serif;
  color: #315e64;
}

.backpack-modal__card p {
  margin: 10px 0;
  color: #5a747b;
  line-height: 1.55;
}

.backpack-modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: #f1f6f6;
  color: #547077;
  font-size: 26px;
  cursor: pointer;
}

@keyframes backpack-screen-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes backpack-float {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-10px) rotate(1deg); }
}

@keyframes backpack-card-in {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes backpack-pop {
  0% { transform: scale(0.45) rotate(-20deg); }
  70% { transform: scale(1.22) rotate(8deg); }
  100% { transform: scale(1) rotate(0); }
}

@keyframes backpack-bounce {
  0%, 100% { transform: scale(1); }
  45% { transform: scale(1.08) rotate(-2deg); }
  70% { transform: scale(0.98) rotate(1deg); }
}

@keyframes backpack-celebrate {
  from { transform: translateY(0) rotate(-1deg); }
  to { transform: translateY(-8px) rotate(1deg); }
}

@keyframes backpack-wrong {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-9px) rotate(-1deg); }
  40% { transform: translateX(8px) rotate(1deg); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(4px); }
}

@keyframes backpack-fly {
  0% { transform: translate(0, 0) scale(1) rotate(0); opacity: 1; }
  60% { opacity: 1; }
  100% { transform: translate(var(--fly-x), var(--fly-y)) scale(0.16) rotate(8deg); opacity: 0; }
}

@media (max-width: 840px) {
  .backpack-panel-head {
    flex-direction: column;
  }

  .backpack-progress-wrap {
    width: 100%;
    min-width: 0;
  }

  .backpack-field {
    min-height: 720px;
  }

  .backpack-bag-zone {
    top: 35%;
  }

  .backpack-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .backpack-layout {
    width: min(100% - 18px, 1120px);
    margin-top: 16px;
  }

  .backpack-screen {
    padding: 20px 14px;
    border-radius: 24px;
  }

  .backpack-screen--start,
  .backpack-screen--result {
    min-height: 570px;
  }

  .backpack-field {
    min-height: 760px;
    border-radius: 21px;
  }

  .backpack-bag-zone {
    top: 31%;
    width: min(245px, 68vw);
  }

  .backpack-cards {
    left: 12px;
    right: 12px;
    bottom: 16px;
    gap: 10px;
  }

  .backpack-deed-card {
    min-height: 124px;
    padding: 12px 10px;
    border-radius: 17px;
    font-size: 15px;
  }

  .backpack-progress-item {
    width: 27px;
    height: 27px;
    font-size: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .backpack-screen.is-active,
  .backpack-start-icon,
  .backpack-deed-card,
  .backpack-bag-zone.is-receiving .backpack-bag,
  .backpack-bag-zone.is-full .backpack-bag,
  .backpack-flying-card,
  .backpack-progress-item.is-filled {
    animation: none !important;
  }
}
/* =========================================================
   СЕКЦИЯ PDF — ТРОПА ДОБРА
========================================================= */

.tropa-pdf-section {
  width: 100%;
}

.tropa-pdf-card {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(
      circle at 88% 16%,
      rgba(255, 227, 107, 0.42),
      transparent 38%
    ),
    radial-gradient(
      circle at 10% 88%,
      rgba(54, 198, 255, 0.26),
      transparent 42%
    ),
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.94),
      rgba(246, 253, 255, 0.9)
    );
  box-shadow: var(--shadow);
}

.tropa-pdf-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 6px;
  background: linear-gradient(
    90deg,
    var(--blue),
    var(--blue-2),
    var(--green),
    var(--sun),
    var(--coral)
  );
}

.tropa-pdf-card__content {
  max-width: 680px;
}

.tropa-pdf-card__label {
  display: inline-block;
  margin: 0 0 12px;
  padding: 8px 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--peach), #fff2d5);
  color: #5f5867;
  font-size: 15px;
  font-weight: 800;
}

.tropa-pdf-card h2 {
  margin: 0;
  font-family: "Comfortaa", "Onest", sans-serif;
  color: #2b6ab8;
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.15;
}

.tropa-pdf-card__content > p:last-child {
  margin: 14px 0 0;
  color: #365877;
  font-size: clamp(17px, 2vw, 20px);
}

.tropa-pdf-card__actions {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

/* =========================================================
   КНОПКИ
========================================================= */

.btn {
  min-height: 52px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Onest", "Segoe UI", sans-serif;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:focus-visible {
  outline: 4px solid rgba(47, 141, 246, 0.28);
  outline-offset: 3px;
}

.btn--primary {
  color: #ffffff;
  background: linear-gradient(
    130deg,
    var(--blue),
    var(--blue-2),
    #58e4b5
  );
  box-shadow: 0 10px 22px rgba(47, 141, 246, 0.35);
}

.btn--secondary {
  color: #ffffff;
  background: linear-gradient(
    130deg,
    #ff9f32,
    #ffbd59,
    #ffe36b
  );
  box-shadow: 0 10px 22px rgba(255, 159, 50, 0.3);
}

.btn--ghost {
  color: #205992;
  border-color: rgba(47, 141, 246, 0.32);
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.96),
    rgba(220, 247, 255, 0.9)
  );
  box-shadow: 0 8px 18px rgba(37, 91, 143, 0.12);
}

/* =========================================================
   PDF-ПОПАП
========================================================= */

.pdf-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 14px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.22s ease,
    visibility 0.22s ease;
}

.pdf-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.pdf-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 35, 63, 0.56);
  backdrop-filter: blur(3px);
}

.pdf-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  max-height: calc(100vh - 28px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(47, 141, 246, 0.35);
  border-radius: 20px;
  background: linear-gradient(
    150deg,
    rgba(255, 255, 255, 0.98),
    rgba(236, 250, 255, 0.96)
  );
  box-shadow: 0 24px 50px rgba(14, 38, 66, 0.32);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.24s ease;
}

.pdf-modal.is-open .pdf-modal__dialog {
  transform: translateY(0) scale(1);
}

.pdf-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pdf-modal__title {
  margin: 0;
  font-family: "Comfortaa", "Onest", sans-serif;
  font-size: clamp(19px, 2vw, 24px);
  color: #1f4f7e;
}

.pdf-modal__close {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(47, 141, 246, 0.34);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.84);
  color: #1f4f7e;
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
}

.pdf-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pdf-modal__frame {
  width: 100%;
  min-height: min(68vh, 760px);
  border: 1px solid rgba(47, 141, 246, 0.28);
  border-radius: 14px;
  background: #ffffff;
}

.pdf-modal__note {
  margin: 0;
  color: #365a7d;
  font-size: 14px;
}

/* =========================================================
   АДАПТИВ
========================================================= */

@media (max-width: 760px) {
  .tropa-pdf-card {
    display: grid;
  }

  .tropa-pdf-card__actions {
    justify-content: stretch;
  }

  .tropa-pdf-card__actions .btn {
    width: 100%;
  }

  .pdf-modal {
    padding: 0;
  }

  .pdf-modal__dialog {
    width: 100%;
    min-height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
    padding: 10px;
  }

  .pdf-modal__actions .btn {
    width: 100%;
  }

  .pdf-modal__frame {
    min-height: calc(100dvh - 250px);
    border-radius: 10px;
  }
}