:root {
  --page-bg: #eef9ef;
  --main-green: #147567;
  --deep-green: #0a5e54;
  --title-green: #0a6f63;
  --sun-yellow: #ffd76a;
  --warm-yellow: #ffe8a3;
  --soft-orange: #ffbd73;
  --soft-peach: #ffd8bf;
  --soft-pink: #f5bfd7;
  --soft-blue: #cfefff;
  --soft-sky: #bfe7ff;
  --soft-mint: #d4f3d6;
  --soft-leaf: #c6efb8;
  --card-cream: #fff7df;
  --card-cream-2: #fbe8b1;
  --surface: rgba(255, 252, 245, 0.92);
  --surface-2: rgba(245, 255, 244, 0.92);
  --border-soft: rgba(20, 117, 103, 0.16);
  --text-main: #25312f;
  --text-soft: #5d564a;
  --shadow-soft: 0 18px 40px rgba(72, 98, 58, 0.16);
  --shadow-card: 0 14px 30px rgba(72, 98, 58, 0.15);
  --radius-xl: 34px;
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text-main);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 8% 12%, rgba(191, 231, 255, 0.85), transparent 20%),
    radial-gradient(circle at 88% 10%, rgba(212, 243, 214, 0.85), transparent 20%),
    radial-gradient(circle at 12% 88%, rgba(255, 216, 191, 0.58), transparent 18%),
    radial-gradient(circle at 86% 82%, rgba(255, 215, 106, 0.4), transparent 18%),
    linear-gradient(180deg, #f2fff0 0%, #eaf9ed 45%, #f8f4de 100%);
}

button,
a {
  font: inherit;
}

.fatiha-activity-page {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0 44px;
}

.fatiha-floating-hearts {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.fatiha-floating-heart {
  position: absolute;
  bottom: -48px;
  color: rgba(245, 191, 215, 0.42);
  font-weight: 900;
  line-height: 1;
  opacity: 0;
  animation-name: fatihaHeartFloat;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.fatiha-floating-heart:nth-child(1) {
  left: 6%;
  font-size: 18px;
  animation-duration: 18s;
  animation-delay: 0s;
}

.fatiha-floating-heart:nth-child(2) {
  left: 14%;
  font-size: 14px;
  color: rgba(255, 215, 106, 0.38);
  animation-duration: 22s;
  animation-delay: 4s;
}

.fatiha-floating-heart:nth-child(3) {
  left: 24%;
  font-size: 20px;
  color: rgba(191, 231, 255, 0.44);
  animation-duration: 20s;
  animation-delay: 8s;
}

.fatiha-floating-heart:nth-child(4) {
  left: 34%;
  font-size: 13px;
  color: rgba(212, 243, 214, 0.48);
  animation-duration: 24s;
  animation-delay: 2s;
}

.fatiha-floating-heart:nth-child(5) {
  left: 45%;
  font-size: 17px;
  animation-duration: 19s;
  animation-delay: 6s;
}

.fatiha-floating-heart:nth-child(6) {
  left: 56%;
  font-size: 15px;
  color: rgba(255, 216, 191, 0.42);
  animation-duration: 23s;
  animation-delay: 10s;
}

.fatiha-floating-heart:nth-child(7) {
  left: 66%;
  font-size: 21px;
  color: rgba(255, 215, 106, 0.34);
  animation-duration: 21s;
  animation-delay: 3s;
}

.fatiha-floating-heart:nth-child(8) {
  left: 76%;
  font-size: 14px;
  color: rgba(191, 231, 255, 0.42);
  animation-duration: 25s;
  animation-delay: 7s;
}

.fatiha-floating-heart:nth-child(9) {
  left: 84%;
  font-size: 18px;
  color: rgba(212, 243, 214, 0.44);
  animation-duration: 20s;
  animation-delay: 12s;
}

.fatiha-floating-heart:nth-child(10) {
  left: 92%;
  font-size: 15px;
  animation-duration: 26s;
  animation-delay: 5s;
}

.fatiha-floating-heart:nth-child(11) {
  left: 18%;
  font-size: 16px;
  color: rgba(255, 216, 191, 0.4);
  animation-duration: 27s;
  animation-delay: 14s;
}

.fatiha-floating-heart:nth-child(12) {
  left: 72%;
  font-size: 19px;
  color: rgba(245, 191, 215, 0.36);
  animation-duration: 28s;
  animation-delay: 16s;
}

@keyframes fatihaHeartFloat {
  0% {
    transform: translate3d(0, 0, 0) scale(0.75) rotate(0deg);
    opacity: 0;
  }

  12% {
    opacity: 0.42;
  }

  82% {
    opacity: 0.42;
  }

  100% {
    transform: translate3d(18px, -115vh, 0) scale(1.12) rotate(12deg);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fatiha-floating-hearts {
    display: none;
  }
}

.activity-hero {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
}

.activity-hero-image {
  width: min(100%, 920px);
  max-height: 320px;
  object-fit: cover;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
}

.activity-intro,
.activity-progress,
.cards-section,
.card-panel,
.bonus-access,
.activity-footer {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
}

.activity-intro {
  padding: 30px 28px;
  margin-bottom: 22px;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: #d8f3ff;
  border: 1px solid rgba(20, 117, 103, 0.18);
}

.activity-intro > * {
  position: relative;
  z-index: 1;
}

.language-switch {
  display: inline-flex;
  gap: 8px;
  padding: 8px;
  margin: 0 auto 20px;
  border-radius: 999px;
  background: rgba(255, 247, 219, 0.92);
  border: 1px solid rgba(20, 117, 103, 0.18);
  box-shadow: 0 8px 18px rgba(72, 98, 58, 0.08);
}

.language-switch a {
  min-width: 110px;
  padding: 11px 16px;
  border-radius: 999px;
  color: var(--deep-green);
  text-decoration: none;
  font-weight: 900;
  font-size: 1rem;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.language-switch a:hover {
  transform: translateY(-1px);
}

.language-switch a.is-active {
  background: linear-gradient(135deg, #1a8577, #0e6a5e);
  color: #fff;
}

.activity-kicker {
  margin: 0 0 10px;
  color: #6b6357;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.activity-intro h1 {
  margin: 0 0 16px;
  color: var(--title-green);
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.13;
}

.activity-intro p {
  max-width: 780px;
  margin: 0 auto 14px;
  color: var(--text-soft);
  font-size: 1.08rem;
  line-height: 1.65;
}

.activity-parent-note {
  max-width: 880px;
  margin: 0 auto;
  padding: 16px 18px;
  background: #ffe59b;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 184, 92, 0.48);
  color: #4f4639;
  font-weight: 800;
}

.cards-section {
  padding: 26px 22px 30px;
  margin-bottom: 22px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 20%, rgba(255, 202, 120, 0.3), transparent 16%),
    radial-gradient(circle at 88% 18%, rgba(191, 231, 255, 0.5), transparent 18%),
    radial-gradient(circle at 25% 85%, rgba(212, 243, 214, 0.55), transparent 20%),
    radial-gradient(circle at 78% 78%, rgba(255, 229, 160, 0.38), transparent 18%),
    linear-gradient(135deg, rgba(198, 239, 184, 0.5), rgba(208, 240, 255, 0.52) 48%, rgba(255, 245, 206, 0.54));
}

.cards-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.1) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.1) 75%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.1) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.1) 75%);
  background-size: 56px 56px;
  opacity: 0.12;
  pointer-events: none;
}

.cards-section h2 {
  position: relative;
  z-index: 1;
  width: fit-content;
  margin: 0 auto 22px;
  padding: 10px 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffcf69, #ffb86a);
  color: #0b6b61;
  font-size: 1.8rem;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(255, 184, 92, 0.2);
}

.cards-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(7, minmax(92px, 1fr));
  gap: 16px;
}

.card-tile {
  min-height: 172px;
  padding: 14px 12px;
  border: 1px solid rgba(20, 117, 103, 0.16);
  border-radius: 26px;
  background:
    radial-gradient(circle at 25% 18%, rgba(255, 255, 255, 0.5), transparent 35%),
    linear-gradient(180deg, #fff0c4, #f5df9b);
  color: var(--deep-green);
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.card-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(72, 98, 58, 0.18);
  filter: brightness(1.03);
}

.card-tile:active {
  transform: translateY(-1px) scale(0.98);
}

.card-tile-number {
  display: block;
  font-size: 0.92rem;
  font-weight: 900;
  line-height: 1.25;
}

.card-tile-question {
  display: block;
  margin-top: 24px;
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1;
}

.card-tile-check {
  display: none;
  margin-top: 28px;
  font-size: 2.4rem;
  font-weight: 900;
  animation: checkPop 0.45s ease both;
}

.card-tile.is-complete {
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.42), transparent 34%),
    linear-gradient(180deg, #d7f4db, #bde8ca);
  color: #0d6245;
  box-shadow:
    0 14px 30px rgba(72, 98, 58, 0.16),
    0 0 0 3px rgba(207, 238, 221, 0.8);
}

.card-tile.is-complete .card-tile-question {
  display: none;
}

.card-tile.is-complete .card-tile-check {
  display: block;
}

.activity-progress {
  padding: 18px 22px;
  margin-bottom: 22px;
  background:
    linear-gradient(135deg, rgba(255, 247, 220, 0.95), rgba(236, 250, 234, 0.95));
}

.activity-progress p {
  margin: 0 0 10px;
  color: var(--deep-green);
  font-weight: 900;
  font-size: 1.05rem;
}

.progress-bar {
  width: 100%;
  height: 13px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(205, 219, 184, 0.72);
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1a8b78, #e1b24a);
  transition: width 0.35s ease;
}

.card-panel {
  padding: 24px;
  margin-bottom: 22px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 8% 10%, rgba(208, 240, 255, 0.45), transparent 16%),
    radial-gradient(circle at 92% 14%, rgba(255, 217, 140, 0.28), transparent 16%),
    radial-gradient(circle at 18% 88%, rgba(212, 243, 214, 0.35), transparent 18%),
    linear-gradient(135deg, rgba(255, 252, 244, 0.97), rgba(239, 251, 239, 0.96));
}

.close-card-button {
  display: block;
  margin-left: auto;
  margin-bottom: 16px;
  padding: 10px 18px;
  border: 1px solid rgba(20, 117, 103, 0.22);
  border-radius: 999px;
  background: linear-gradient(135deg, #fff6d6, #fff0c4);
  color: var(--deep-green);
  cursor: pointer;
  font-weight: 900;
}

.selected-card-layout {
  display: grid;
  grid-template-columns: minmax(240px, 420px) 1fr;
  gap: 26px;
  align-items: start;
}

.selected-card-image-wrap {
  display: flex;
  justify-content: center;
}

.selected-card-image {
  width: 100%;
  max-width: 420px;
  border-radius: 28px;
  box-shadow: 0 18px 34px rgba(72, 98, 58, 0.16);
}

.selected-card-content {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid rgba(20, 117, 103, 0.16);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 248, 221, 0.95), rgba(236, 251, 241, 0.96) 52%, rgba(212, 240, 255, 0.85));
  box-shadow: 0 10px 24px rgba(72, 98, 58, 0.08);
}

.selected-card-step {
  order: 1;
  margin: 0 0 8px;
  color: #5d564a;
  font-weight: 900;
  font-size: 0.95rem;
}

.selected-card-content h2 {
  order: 2;
  margin: 0 0 14px;
  color: var(--title-green);
  font-size: 1.9rem;
}

.selected-card-content p {
  color: var(--text-soft);
  line-height: 1.65;
  font-size: 1.02rem;
}

#selectedCardQuestion {
  order: 3;
}

.treasure-score {
  order: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  margin: 24px auto 6px;
  text-align: center;
}

.treasure-score-circle {
  position: relative;
  display: grid;
  place-items: center;
  width: 132px;
  height: 132px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 34% 22%, rgba(255, 255, 255, 0.95), transparent 26%),
    radial-gradient(circle at 68% 78%, rgba(255, 232, 162, 0.82), transparent 30%),
    linear-gradient(135deg, #ffd76a, #f4a94f);
  border: 4px solid rgba(255, 255, 255, 0.9);
  color: #0b6b61;
  box-shadow:
    0 14px 26px rgba(242, 171, 80, 0.24),
    0 0 0 7px rgba(255, 221, 146, 0.38),
    0 0 34px rgba(242, 189, 61, 0.42);
}

.treasure-score-circle::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.58);
  pointer-events: none;
}

.treasure-score-points {
  display: block;
  font-size: clamp(2rem, 3vw, 2.35rem);
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
  letter-spacing: -0.06em;
}

.treasure-score-label {
  color: var(--deep-green);
  font-size: 1rem;
  font-weight: 950;
  line-height: 1.2;
}

.treasure-score-hint {
  max-width: 320px;
  margin: 0;
  color: #6b5634;
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1.4;
}

.treasure-score-pop {
  position: absolute;
  left: 50%;
  top: -24px;
  padding: 5px 12px;
  border-radius: 999px;
  background: #fff8dc;
  color: #b06f10;
  font-weight: 950;
  font-size: 1.08rem;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 8px 16px rgba(176, 111, 16, 0.2);
}

.treasure-score-pop.is-visible {
  animation: scorePopRise 0.9s ease-out both;
}

.earned-points-pop {
  position: absolute;
  z-index: 9999;
  transform: translate(-50%, -100%);
  padding: 12px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fff8dc, #ffd76a);
  color: #0b6b61;
  font-weight: 950;
  font-size: 1.25rem;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  box-shadow:
    0 12px 24px rgba(176, 111, 16, 0.22),
    0 0 24px rgba(242, 189, 61, 0.75),
    0 0 44px rgba(255, 215, 106, 0.55);
  animation: earnedPointsFloat 5.4s ease-out both;
}

.earned-pearl {
  position: absolute;
  z-index: 9998;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  pointer-events: none;
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 1), transparent 28%),
    linear-gradient(135deg, #fff3a8, #f0a141);
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow:
    0 0 0 5px rgba(255, 219, 126, 0.25),
    0 0 20px rgba(242, 189, 61, 0.8),
    0 0 36px rgba(255, 215, 106, 0.55);
  animation: earnedPearlFloat 5.2s ease-out both;
  animation-delay: var(--pearl-delay);
}

.answer-choices {
  order: 5;
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.answer-choice {
  width: 100%;
  padding: 16px 18px;
  border: 1px solid rgba(20, 117, 103, 0.16);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  font-weight: 800;
  line-height: 1.5;
  white-space: pre-line;
  position: relative;
  overflow: visible;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.answer-choice:hover {
  border-color: rgba(20, 117, 103, 0.42);
  background: #fffaf0;
  transform: translateY(-1px);
}

.answer-choice.is-correct {
  border-color: rgba(242, 189, 61, 0.9);
  background: #e5f8e9;
  box-shadow:
    0 0 0 3px rgba(242, 189, 61, 0.42),
    0 0 18px rgba(242, 189, 61, 0.55),
    0 0 28px rgba(20, 117, 103, 0.18);
  animation: correctGoldenHalo 1.6s ease-in-out 18;
}

.answer-choice.is-wrong {
  border-color: rgba(170, 92, 62, 0.28);
  background: #fff1ea;
}

.feedback-message {
  order: 6;
  min-height: 0;
  margin: 0;
  color: var(--deep-green);
  font-weight: 900;
  line-height: 1.55;
}

.feedback-message:not(:empty) {
  min-height: auto;
  margin: 14px 0 12px;
  animation: feedbackGlow 0.65s ease both;
}

.recitation-box {
  order: 7;
  margin-top: 8px;
  padding: 18px;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 234, 170, 0.78), rgba(255, 247, 219, 0.95));
  border: 1px solid rgba(255, 184, 92, 0.34);
}

.primary-button,
.primary-link,
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 22px;
  border: 0;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  font-weight: 900;
}

.primary-button,
.primary-link {
  background: linear-gradient(135deg, #178173, #0f695e);
  color: #fff;
  box-shadow: 0 10px 22px rgba(20, 117, 103, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-button:hover,
.primary-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(20, 117, 103, 0.22);
}

.secondary-link {
  background: linear-gradient(135deg, #fff6d8, #fff1c4);
  color: var(--deep-green);
  border: 1px solid rgba(20, 117, 103, 0.2);
}

.bonus-access {
  padding: 30px 24px;
  margin-bottom: 22px;
  text-align: center;
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 208, 105, 0.24), transparent 18%),
    radial-gradient(circle at 80% 80%, rgba(191, 231, 255, 0.28), transparent 18%),
    linear-gradient(135deg, rgba(255, 250, 234, 0.96), rgba(237, 251, 239, 0.96));
}

.bonus-access h2 {
  margin: 0 0 10px;
  color: var(--title-green);
  font-size: 1.8rem;
}

.bonus-access p {
  color: var(--text-soft);
  line-height: 1.6;
}

.treasure-gift {
  max-width: 720px;
  margin: 0 auto 24px;
  padding: 26px 26px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 20% 12%, rgba(255, 255, 255, 0.86), transparent 28%),
    linear-gradient(135deg, rgba(255, 236, 178, 0.98), rgba(231, 250, 235, 0.96));
  border: 1px solid rgba(242, 189, 61, 0.42);
  box-shadow: 0 14px 30px rgba(72, 98, 58, 0.13);
  text-align: center;
}

.treasure-gift-medals {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  flex-wrap: nowrap;
  margin: 0 auto 18px;
}

.treasure-gift-medal {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 96px;
  height: 96px;
  margin: 0;
  border-radius: 999px;
  background:
    radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.96), transparent 24%),
    radial-gradient(circle at 70% 78%, rgba(255, 232, 162, 0.82), transparent 30%),
    linear-gradient(135deg, #ffd76a, #f0a141);
  border: 5px solid rgba(255, 255, 255, 0.88);
  color: #0b6b61;
  font-size: 2.7rem;
  font-weight: 950;
  box-shadow:
    0 0 0 8px rgba(255, 219, 126, 0.25),
    0 0 36px rgba(242, 189, 61, 0.52),
    0 14px 26px rgba(242, 171, 80, 0.24);
  animation: treasureGiftGlow 1.8s ease-in-out infinite;
}

.treasure-gift-medal::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: inherit;
  border: 2px solid rgba(255, 255, 255, 0.58);
  pointer-events: none;
}

.treasure-gift-title {
  margin: 0 0 8px;
  color: var(--deep-green);
  font-size: 1.25rem;
  font-weight: 950;
}

.treasure-gift-score {
  margin: 0;
  color: #6b5634;
  font-weight: 900;
}

.treasure-gift-hint {
  max-width: 520px;
  margin: 10px auto 0;
  color: #6b5634;
  font-weight: 800;
  line-height: 1.5;
}

.activity-footer {
  padding: 20px;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(255, 248, 227, 0.95), rgba(238, 251, 239, 0.95));
}

.reset-activity-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 12px;
  padding: 10px 18px;
  border: 1px solid rgba(20, 117, 103, 0.2);
  border-radius: 999px;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  font-weight: 900;
}

.reset-activity-button:hover {
  color: var(--deep-green);
  background: #fff8e8;
}

@keyframes correctHalo {
  0% {
    transform: scale(1);
    box-shadow:
      0 0 0 0 rgba(212, 243, 214, 0),
      0 0 0 rgba(20, 117, 103, 0);
  }

  45% {
    transform: scale(1.018);
    box-shadow:
      0 0 0 5px rgba(212, 243, 214, 0.88),
      0 0 24px rgba(20, 117, 103, 0.24);
  }

  100% {
    transform: scale(1);
    box-shadow:
      0 0 0 3px rgba(212, 243, 214, 0.7),
      0 0 18px rgba(20, 117, 103, 0.17);
  }
}

@keyframes checkPop {
  0% {
    transform: scale(0.4);
    opacity: 0;
  }

  70% {
    transform: scale(1.18);
    opacity: 1;
  }

  100% {
    transform: scale(1);
  }
}

@keyframes feedbackGlow {
  0% {
    transform: translateY(4px);
    opacity: 0;
  }

  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes correctGoldenHalo {
  0% {
    box-shadow:
      0 0 0 2px rgba(242, 189, 61, 0.22),
      0 0 10px rgba(242, 189, 61, 0.3),
      0 0 18px rgba(20, 117, 103, 0.12);
  }

  50% {
    box-shadow:
      0 0 0 4px rgba(242, 189, 61, 0.62),
      0 0 22px rgba(242, 189, 61, 0.72),
      0 0 34px rgba(20, 117, 103, 0.2);
  }

  100% {
    box-shadow:
      0 0 0 2px rgba(242, 189, 61, 0.28),
      0 0 12px rgba(242, 189, 61, 0.36),
      0 0 20px rgba(20, 117, 103, 0.14);
  }
}

@keyframes scorePopRise {
  0% {
    opacity: 0;
    transform: translate(-50%, 8px) scale(0.72);
  }

  30% {
    opacity: 1;
    transform: translate(-50%, -8px) scale(1.12);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -34px) scale(0.92);
  }
}

@keyframes earnedPointsFloat {
  0% {
    opacity: 0;
    transform: translate(-50%, -55%) scale(0.82);
  }

  10% {
    opacity: 1;
    transform: translate(-50%, -105%) scale(1.12);
  }

  75% {
    opacity: 1;
    transform: translate(-50%, -220%) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -285%) scale(0.94);
  }
}

@keyframes earnedPearlFloat {
  0% {
    opacity: 0;
    transform: translate(-50%, -40%) scale(0.6);
  }

  10% {
    opacity: 1;
    transform: translate(-50%, -75%) scale(1.12);
  }

  78% {
    opacity: 1;
    transform: translate(
      calc(-50% + var(--pearl-x)),
      -210px
    ) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(
      calc(-50% + var(--pearl-x)),
      -285px
    ) scale(0.9);
  }
}

@keyframes treasureGiftGlow {
  0%,
  100% {
    box-shadow:
      0 0 0 8px rgba(255, 219, 126, 0.25),
      0 0 36px rgba(242, 189, 61, 0.52),
      0 14px 26px rgba(242, 171, 80, 0.24);
  }

  50% {
    box-shadow:
      0 0 0 12px rgba(255, 219, 126, 0.36),
      0 0 52px rgba(242, 189, 61, 0.72),
      0 16px 30px rgba(242, 171, 80, 0.28);
  }
}

@media (max-width: 900px) {
  .cards-grid {
    grid-template-columns: repeat(4, minmax(82px, 1fr));
  }

  .selected-card-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .fatiha-activity-page {
    width: min(100% - 18px, 1120px);
    padding-top: 14px;
  }

  .activity-hero-image {
    max-height: 210px;
    border-radius: 24px;
  }

  .activity-intro,
  .activity-progress,
  .cards-section,
  .card-panel,
  .bonus-access,
  .activity-footer {
    border-radius: 24px;
  }

  .activity-intro {
    padding: 22px 18px;
  }

  .language-switch a {
    min-width: 92px;
    padding: 9px 12px;
  }

  .cards-section {
    padding: 18px;
  }

  .cards-grid {
    grid-template-columns: repeat(2, minmax(110px, 1fr));
    gap: 12px;
  }

  .card-tile {
    min-height: 138px;
  }

  .selected-card-content {
    padding: 18px;
  }

  .answer-choice {
    font-size: 0.95rem;
  }

  .treasure-score {
    margin-top: 22px;
  }

  .treasure-score-circle {
    width: 112px;
    height: 112px;
  }

  .treasure-score-points {
    font-size: 2rem;
  }

  .treasure-score-label {
    font-size: 0.92rem;
  }

  .treasure-score-hint {
    font-size: 0.9rem;
  }

  .earned-points-pop {
    padding: 12px 18px;
    font-size: 1.25rem;
  }

  .earned-pearl {
    width: 16px;
    height: 16px;
  }

  .treasure-gift {
    max-width: 100%;
    padding: 22px 16px;
    border-radius: 24px;
  }

  .treasure-gift-medals {
    gap: 12px;
  }

  .treasure-gift-medal {
    width: 78px;
    height: 78px;
  }

  .activity-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px 18px;
  }

  .activity-footer > a,
  .activity-footer > button,
  .activity-footer .primary-button,
  .activity-footer .secondary-link,
  .activity-footer .reset-activity-button {
    width: min(100%, 310px);
    min-height: 56px;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
  }
}