:root {
  color-scheme: dark;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --title-font: 'Fredoka', 'Poppins', Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --bg: #0d1325;
  --bg-soft: #131a38;
  --surface: rgba(255,255,255,0.06);
  --surface-strong: rgba(255,255,255,0.12);
  --text: #f6f7ff;
  --muted: #9db2d8;
  --hero-scroll-progress: 0;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  background: #fff2df;
  color: var(--text);
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  line-height: 1.5;
}

.page-shell {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.hero {
  display: block;
  min-height: 100vh;
  min-height: 100svh;
  position: relative;
}

.full-hero .hero-stage {
  position: fixed;
  inset: 0;
  height: 100vh;
  height: 100svh;
  width: 100vw;
  transform: translateY(calc(var(--hero-scroll-progress) * -56px)) scale(calc(1 - (var(--hero-scroll-progress) * 0.035)));
  opacity: calc(1 - (var(--hero-scroll-progress) * 0.18));
  transform-origin: center top;
  will-change: transform, opacity;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  color: #d3e0ff;
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-heading {
  margin: 0;
  font-size: clamp(3rem, 5vw, 5.8rem);
  line-height: 0.95;
  max-width: 770px;
  letter-spacing: -0.04em;
  color: #ffffff;
}

.hero-text {
  max-width: 620px;
  color: rgba(255,255,255,0.8);
  font-size: 1.08rem;
}

.hero-stage {
  position: relative;
  height: 100%;
  border-radius: 0;
  background:
    radial-gradient(circle at 52% 22%, #6bd69b 0%, rgba(107, 214, 155, 0) 34%),
    linear-gradient(180deg, #45b977 0%, #13713c 100%);
  overflow: visible;
}

.hero-stage-deco {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 22% 25%, rgba(255,255,255,0.16), transparent 12%),
                    radial-gradient(circle at 80% 14%, rgba(255,255,255,0.08), transparent 16%),
                    radial-gradient(circle at 50% 85%, rgba(255,255,255,0.1), transparent 18%);
  opacity: calc(1 - (var(--hero-scroll-progress) * 0.35));
  pointer-events: none;
}

.site-header {
  position: absolute;
  left: clamp(16px, 3vw, 34px);
  top: clamp(14px, 2.6vw, 30px);
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-logo {
  display: inline-flex;
  width: clamp(95px, 11vw, 148px);
  pointer-events: auto;
}

.site-logo img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.hero-canvas-shell.full-screen {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hero-canvas-shell {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.hero-noise-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 3;
}

.hero-noise-item {
  position: absolute;
  left: var(--noise-left);
  top: var(--noise-top);
  width: var(--noise-size);
  height: var(--noise-size);
  object-fit: contain;
  opacity: var(--noise-opacity);
  transform: translate(-50%, -50%) rotate(var(--noise-rotate));
  animation: noise-float var(--noise-duration) ease-in-out var(--noise-delay) infinite;
}

@keyframes noise-float {
  0%, 100% {
    transform: translate(-50%, -50%) translateY(0) rotate(var(--noise-rotate));
  }
  50% {
    transform: translate(-50%, -50%) translateY(calc(var(--noise-drift) * -1)) rotate(calc(var(--noise-rotate) * -1));
  }
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: pan-y;
}

.hero-canvas-shell.paint-gesture-active .hero-canvas {
  touch-action: none;
}

.hero-h1 {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0;
  margin: 0;
  color: #ffffff;
  font-family: var(--title-font);
  font-weight: 700;
  text-align: center;
  line-height: 0.78;
  pointer-events: none;
  z-index: 3;
  font-size: clamp(56px, 13vw, 178px);
  letter-spacing: -0.02em;
}

.hero-line {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  justify-content: center;
}

.mobile-title-break {
  display: none;
}

.hero-letter {
  display: inline-block;
  pointer-events: none;
  transition: transform 0.22s ease;
}

.hero-premium-mark {
  display: inline-flex;
  width: 0.96em;
  height: 0.82em;
  margin: 0 0.01em 0 -0.1em;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  position: relative;
  line-height: 0;
  pointer-events: auto;
}

.hero-premium-mark img {
  position: absolute;
  left: 48%;
  top: 50%;
  width: 1.18em;
  height: 1.18em;
  display: block;
  object-fit: contain;
  transform: translate(-50%, -48%);
  transition: transform 0.18s ease;
}

.hero-premium-mark:hover img {
  transform: translate(-50%, -48%) scale(1.08);
}

.hero-premium-mark.premium-bounce-out img {
  animation: premium-bounce-out 0.34s ease;
}

@keyframes premium-bounce-out {
  0% { transform: translate(-50%, -48%) scale(1.08); }
  45% { transform: translate(-50%, -48%) scale(0.94); }
  72% { transform: translate(-50%, -48%) scale(1.03); }
  100% { transform: translate(-50%, -48%) scale(1); }
}

.hero-letter.jump {
  animation: letter-bounce-hover 0.38s ease;
}

@keyframes letter-bounce-hover {
  0% { transform: translateY(0) scale(1); }
  30% { transform: translateY(-12px) scale(1.02); }
  60% { transform: translateY(2px) scale(0.98); }
  100% { transform: translateY(0) scale(1); }
}

.hero-cta {
  position: absolute;
  left: 50%;
  top: calc(50% + clamp(92px, 10vw, 158px) + 24px);
  width: min(560px, calc(100vw - 40px));
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 16px;
  text-align: center;
  pointer-events: none;
  z-index: 4;
}

.hero-cta p {
  max-width: 520px;
  margin: 6px 0 8px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(0.98rem, 1.55vw, 1.28rem);
  font-weight: 700;
  line-height: 1.35;
}

.store-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.store-button {
  display: inline-flex;
  width: clamp(150px, 15vw, 176px);
  aspect-ratio: 2350 / 711.9;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 14px 28px rgba(10, 20, 50, 0.16);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  pointer-events: auto;
}

.store-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(10, 20, 50, 0.2);
}

.store-button img {
  width: 100%;
  height: 100%;
  display: block;
}

.paint-layer {
  z-index: 2;
}

.hero-canvas {
  z-index: 1;
}

.visually-hidden {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden; clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

.hidden {
  display: none !important;
}

.paint-layer {
  pointer-events: none;
}

.hero-title-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: clamp(3rem, 7vw, 6.4rem);
  letter-spacing: -0.05em;
  color: rgba(255,255,255,0.1);
  pointer-events: none;
}

.tool-panel {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  width: min(760px, 96vw);
  max-width: 760px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  z-index: 6;
}

.tool-panel .tool-card {
  display: none;
}

.tool-panel.open .tool-card {
  display: block;
}

.tool-card {
  background: #ffffff;
  border-radius: 32px;
  padding: 18px 18px 14px;
  box-shadow: 0 28px 80px rgba(10, 20, 50, 0.16);
  border: 1px solid rgba(20, 32, 66, 0.08);
}

.tool-card-title {
  color: #0f172a;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.tool-bar {
  background: #ffffff;
  border-radius: 32px;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(20, 32, 66, 0.08);
  box-shadow: 0 18px 60px rgba(10, 20, 50, 0.12);
}

.tool-button {
  border: 1px solid rgba(16, 24, 40, 0.08);
  background: #ffffff;
  color: #09101f;
  font-weight: 700;
  padding: 12px 14px;
  border-radius: 18px;
  min-width: 110px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: none;
}

.tool-button.active {
  background: #eff6ff;
  border-color: rgba(60, 146, 255, 0.24);
  box-shadow: 0 14px 30px rgba(60, 146, 255, 0.16);
}

.tool-button .tool-icon {
  width: 22px;
  height: 22px;
  display: block;
}

.tool-button:hover {
  transform: translateY(-1px);
}

.tool-options {
  display: grid;
  gap: 16px;
}

.tool-section {
  display: none;
  gap: 14px;
}

.tool-section.active {
  display: grid;
}

.control-group {
  display: grid;
  gap: 12px;
  padding: 0;
  border-radius: 0;
  background: none;
  border: none;
}

.control-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.control-label {
  color: #0f172a;
  font-weight: 700;
}

.tool-card .control-note {
  color: #64748b;
}

.tool-button.danger {
  color: #b91c1c;
  background: #fee2e2;
  border-color: rgba(185, 28, 28, 0.18);
}

.control-group {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 28px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
}

.control-group.compact {
  padding: 14px;
}

.control-label {
  font-size: 0.92rem;
  color: #d7e3ff;
  font-weight: 700;
}

.tool-row,
.color-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tool-button,
.color-swatch,
.letter-button,
.sticker-button {
  border: none;
  border-radius: 18px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.tool-button,
.letter-button,
.sticker-button {
  padding: 12px 16px;
  background: rgba(255,255,255,0.08);
  color: #eef4ff;
  font-weight: 700;
}

.tool-button .tool-icon {
  margin-right: 8px;
  font-size: 1.1rem;
}

.tool-button.active,
.color-swatch.active,
.letter-button.active,
.sticker-button.active {
  box-shadow: 0 14px 30px rgba(60, 146, 255, 0.28);
  transform: translateY(-1px);
  background: linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0.10));
}

.tool-section {
  display: none;
  gap: 14px;
  margin-top: 16px;
}

.tool-section.active {
  display: block;
}

.control-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.control-note {
  color: rgba(255,255,255,0.75);
  font-size: 0.92rem;
  margin-top: 8px;
}

.sticker-editor {
  display: grid;
  gap: 12px;
  padding-top: 14px;
}

.sticker-editor.hidden {
  display: none;
}

.tool-button.danger {
  background: rgba(255, 90, 95, 0.18);
  color: #ffb4b8;
}

.tool-button {
  min-width: 110px;
}

.color-swatch {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.18);
}

.color-swatch.active {
  border-color: #ffffff;
}

.letters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
  gap: 10px;
}

.letter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  font-size: 1.05rem;
  font-weight: 800;
  background: rgba(146, 170, 255, 0.12);
  transition: transform 0.18s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.letter-button:hover {
  animation: letter-bounce 0.35s ease;
  background: rgba(255, 255, 255, 0.14);
}

@keyframes letter-bounce {
  0% { transform: translateY(0) scale(1); }
  30% { transform: translateY(-8px) scale(1.02); }
  60% { transform: translateY(2px) scale(0.99); }
  100% { transform: translateY(0) scale(1); }
}

.stickers {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.sticker-button {
  width: 62px;
  height: 62px;
  min-height: 0;
  background: rgba(255,255,255,0.95);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 20px;
  padding: 8px;
}

.sticker-button img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sticker-button,
.sticker-button:hover,
.sticker-button:active,
.sticker-button.active {
  animation: none;
  transform: none;
}

.hero-badge {
  position: absolute;
  right: clamp(16px, 3vw, 34px);
  top: clamp(18px, 2.8vw, 34px);
  padding: 10px 15px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 800;
  z-index: 8;
}

.hero-placeholder {
  height: 100vh;
  height: 100svh;
  width: 100%;
}

.mobile-next-section {
  position: fixed;
  left: max(12px, env(safe-area-inset-left, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  width: 54px;
  height: 54px;
  border: 2px solid rgba(32, 40, 51, 0.14);
  border-radius: 18px;
  display: none;
  place-items: center;
  background: #ffffff;
  color: #2d78ff;
  z-index: 11;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px) scale(0.94);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.mobile-next-section svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-stage.tools-open .mobile-next-section {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

@supports (height: 100dvh) {
  .hero,
  .full-hero .hero-stage,
  .hero-placeholder {
    height: 100dvh;
    min-height: 100dvh;
  }
}

.sticker {
  position: absolute;
  width: 72px;
  height: 72px;
  border-radius: 22px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  border: 2px solid rgba(255,255,255,0.16);
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  transform: translate(-50%, -50%);
  z-index: 4;
}

.sticker.sticker-selected {
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.22);
  border-color: rgba(99, 102, 241, 0.45);
}

.sticker:active {
  cursor: grabbing;
}

.sticker.sticker-dragging {
  cursor: grabbing;
  z-index: 5;
}

.second-section {
  position: relative;
  z-index: 7;
  min-height: 100vh;
  margin: 0 calc(50% - 50vw);
  padding: clamp(82px, 10vw, 132px) 24px 0;
  background: linear-gradient(180deg, #fff7ec 0%, #fff2df 100%);
  color: #11131b;
}

.second-section::before {
  content: none;
}

.second-section-inner {
  position: relative;
  width: min(1160px, 100%);
  margin: 0 auto;
  text-align: center;
}

.section-kicker {
  margin: 0 0 14px;
  color: transparent;
  font-family: var(--title-font);
  font-size: clamp(0.84rem, 1.3vw, 1rem);
  font-weight: 900;
  text-transform: uppercase;
  background-image: linear-gradient(90deg, #ed6d8f, #ff9d43, #ffe45d, #5edb73, #42b8ff, #8a6bff, #ed6d8f);
  background-size: 240% 100%;
  background-position: 0 50%;
  background-clip: text;
  -webkit-background-clip: text;
}

.section-kicker:hover {
  animation: kicker-rainbow 4.8s linear infinite;
}

@keyframes kicker-rainbow {
  0% { background-position: 0 50%; }
  100% { background-position: 240% 50%; }
}

.second-section h2 {
  max-width: 820px;
  margin: 0 auto clamp(34px, 5vw, 58px);
  color: #11131b;
  font-family: var(--title-font);
  font-size: clamp(2.35rem, 6vw, 5.2rem);
  font-weight: 900;
  line-height: 0.98;
}

.features {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 1.8vw, 22px);
}

.features-doodle-line {
  position: absolute;
  left: 50%;
  top: clamp(180px, 24vw, 280px);
  width: 110vw;
  height: auto;
  transform: translateX(-50%);
  overflow: visible;
  pointer-events: none;
  z-index: 1;
}

.features-doodle-line path {
  fill: none;
  stroke: #efd8bb;
  stroke-width: 12;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1320;
  stroke-dashoffset: 1320;
  animation: draw-features-doodle 5.8s ease-in-out infinite;
}

@keyframes draw-features-doodle {
  0% { stroke-dashoffset: 1320; opacity: 0.25; }
  20% { opacity: 1; }
  58%, 76% { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 0.25; }
}

.feature-card {
  position: relative;
  min-height: clamp(260px, 28vw, 330px);
  padding: clamp(14px, 1.8vw, 20px);
  border-radius: 22px;
  border: none;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 14px;
  text-align: center;
  overflow: hidden;
  opacity: 0;
  transform: translateY(34px) scale(0.92) rotate(calc(var(--card-rotate, 0deg) - 3deg));
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.feature-card::before {
  content: "";
  position: absolute;
  inset: auto 0 -12px 0;
  height: 28px;
  background: var(--card-depth, rgba(17, 19, 27, 0.18));
  border-radius: 0 0 22px 22px;
  z-index: -1;
}

.feature-card:hover {
  transform: rotate(var(--card-rotate, 0deg)) translateY(-4px);
}

.features.features-in-view .feature-card {
  opacity: 1;
  transform: rotate(var(--card-rotate, 0deg));
  animation: feature-card-enter 0.72s cubic-bezier(.18, 1.28, .32, 1) backwards;
}

.features.features-in-view .feature-card:nth-child(2) {
  animation-delay: 0.1s;
}

.features.features-in-view .feature-card:nth-child(3) {
  animation-delay: 0.2s;
}

.features.features-in-view .feature-card:nth-child(4) {
  animation-delay: 0.3s;
}

@keyframes feature-card-enter {
  0% {
    opacity: 0;
    transform: translateY(34px) scale(0.92) rotate(calc(var(--card-rotate, 0deg) - 3deg));
  }
  58% {
    opacity: 1;
    transform: translateY(-8px) scale(1.035) rotate(calc(var(--card-rotate, 0deg) + 1.5deg));
  }
  78% {
    opacity: 1;
    transform: translateY(3px) scale(0.99) rotate(calc(var(--card-rotate, 0deg) - 0.6deg));
  }
  100% {
    opacity: 1;
    transform: rotate(var(--card-rotate, 0deg));
  }
}

@media (prefers-reduced-motion: reduce) {
  .feature-card,
  .features.features-in-view .feature-card,
  .feature-mini,
  .feature-mini-grid.feature-mini-in-view .feature-mini {
    opacity: 1;
    transform: rotate(var(--card-rotate, 0deg));
    animation: none;
  }

  .feature-mini,
  .feature-mini-grid.feature-mini-in-view .feature-mini {
    transform: none;
  }
}

.feature-card-play {
  background: #f983ba;
  --card-rotate: -1.7deg;
  --card-depth: #d76599;
}

.feature-card-stickers {
  background: #62d85d;
  --card-rotate: 1.2deg;
  --card-depth: #48aa45;
}

.feature-card-share {
  background: #ff7046;
  --card-rotate: -0.8deg;
  --card-depth: #d85031;
}

.feature-card-fun {
  background: #5baff4;
  --card-rotate: 1.8deg;
  --card-depth: #408fd0;
}

.feature-art {
  position: relative;
  min-height: 176px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
  overflow: hidden;
  z-index: 1;
}

.feature-art::before,
.feature-art::after {
  content: "";
  position: absolute;
  border: 4px solid #10131b;
  border-color: #10131b transparent transparent transparent;
  border-radius: 50%;
  pointer-events: none;
}

.feature-art::before {
  left: -12%;
  bottom: -18%;
  width: 72%;
  height: 48%;
  transform: rotate(10deg);
}

.feature-art::after {
  right: -16%;
  top: -20%;
  width: 66%;
  height: 44%;
  transform: rotate(-12deg);
}

.feature-art img {
  position: absolute;
  width: 48%;
  height: auto;
  object-fit: contain;
  transition: transform 0.22s ease;
}

.feature-art img:first-child {
  left: 12%;
  bottom: 10%;
  transform: rotate(-8deg);
}

.feature-art img:last-child {
  right: 8%;
  top: 8%;
  transform: rotate(9deg);
}

.feature-card-play .feature-art img:first-child,
.feature-card-share .feature-art img:first-child {
  width: 54%;
}

.feature-card-play .feature-art img:first-child {
  z-index: 2;
}

.feature-card-play .feature-art img:last-child {
  z-index: 1;
}

.feature-card-fun .feature-art img:first-child {
  width: 58%;
  left: 8%;
  bottom: 2%;
}

.feature-card-play:hover .feature-art img:first-child {
  animation: brush-stroke 1.8s ease-in-out infinite;
}

.feature-card-play:hover .feature-art::before {
  animation: paint-swipe 1.8s ease-in-out infinite;
}

.feature-card-stickers:hover .feature-art img:first-child {
  animation: sticker-wiggle-left 1.7s ease-in-out infinite;
}

.feature-card-stickers:hover .feature-art img:last-child {
  animation: sticker-wiggle-right 1.7s ease-in-out 0.12s infinite;
}

.feature-card-share:hover .feature-art img:first-child {
  animation: bucket-pour 1.9s ease-in-out infinite;
}

.feature-card-share:hover .feature-art img:last-child {
  animation: create-pop 1.9s ease-in-out 0.16s infinite;
}

.feature-card-fun:hover .feature-art img:first-child {
  animation: fun-spin 2s ease-in-out infinite;
}

.feature-card-fun:hover .feature-art img:last-child {
  animation: fun-bounce 1.8s ease-in-out 0.12s infinite;
}

@keyframes brush-stroke {
  0%, 100% { transform: rotate(-8deg) translate(0, 0); }
  42% { transform: rotate(-14deg) translate(10px, -7px); }
  72% { transform: rotate(0deg) translate(18px, 4px); }
}

@keyframes paint-swipe {
  0%, 100% { transform: rotate(10deg) translateX(0) scaleX(1); opacity: 0.85; }
  48% { transform: rotate(10deg) translateX(8px) scaleX(1.06); opacity: 1; }
}

@keyframes sticker-wiggle-left {
  0%, 100% { transform: rotate(-8deg) scale(1); }
  35% { transform: rotate(-13deg) scale(1.04); }
  68% { transform: rotate(-3deg) scale(0.99); }
}

@keyframes sticker-wiggle-right {
  0%, 100% { transform: rotate(9deg) scale(1); }
  36% { transform: rotate(14deg) scale(1.04); }
  68% { transform: rotate(4deg) scale(0.99); }
}

@keyframes bucket-pour {
  0%, 100% { transform: rotate(-8deg) translateY(0); }
  42% { transform: rotate(-20deg) translate(-4px, -5px); }
  74% { transform: rotate(-2deg) translate(6px, 2px); }
}

@keyframes create-pop {
  0%, 100% { transform: rotate(9deg) scale(1); }
  45% { transform: rotate(12deg) scale(1.07); }
  72% { transform: rotate(7deg) scale(0.99); }
}

@keyframes fun-spin {
  0%, 100% { transform: rotate(-8deg) scale(1); }
  45% { transform: rotate(8deg) scale(1.04); }
  75% { transform: rotate(-12deg) scale(1.01); }
}

@keyframes fun-bounce {
  0%, 100% { transform: rotate(9deg) translateY(0) scale(1); }
  40% { transform: rotate(12deg) translateY(-8px) scale(1.04); }
  72% { transform: rotate(6deg) translateY(2px) scale(0.99); }
}

.feature-card h3 {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #11131b;
  font-family: var(--title-font);
  font-size: clamp(1.55rem, 2.7vw, 2.2rem);
  line-height: 1;
}

.section-downloads {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(16px, 2.4vw, 28px);
}

.download-callout {
  display: grid;
  justify-items: center;
  gap: clamp(18px, 3vw, 34px);
}

.download-callout-text {
  position: relative;
  width: min(640px, 100%);
  color: #11131b;
  font-family: var(--title-font);
  font-size: clamp(2.35rem, 6vw, 5.2rem);
  font-weight: 900;
  line-height: 0.96;
  text-align: center;
}

.download-callout-arrow {
  display: block;
  width: clamp(92px, 14vw, 148px);
  height: auto;
  overflow: visible;
  justify-self: center;
  transform: none;
}

.download-callout-arrow path {
  fill: none;
  stroke: #2d78ff;
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 260;
  stroke-dashoffset: 260;
  animation: draw-download-arrow 2.4s ease-in-out infinite;
}

.download-callout-arrow path:nth-child(2) {
  stroke-dasharray: 42;
  stroke-dashoffset: 42;
  animation-delay: 0.72s;
}

@keyframes draw-download-arrow {
  0% { stroke-dashoffset: 260; opacity: 0.2; }
  18% { opacity: 1; }
  58%, 78% { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 0.2; }
}

.section-downloads .store-button {
  width: clamp(206px, 20vw, 272px);
  border-radius: 16px;
}

.photo-section {
  position: relative;
  z-index: 8;
  margin: 0 calc(50% - 50vw);
  padding: clamp(104px, 11vw, 150px) 24px clamp(80px, 9vw, 126px);
  border-radius: 34px 34px 0 0;
  background: linear-gradient(180deg, #fff9ef 0%, #fff7ec 100%);
  color: #11131b;
  overflow: hidden;
}

.photo-section::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 22px;
  width: min(168px, 34vw);
  height: 8px;
  border-radius: 999px;
  background: rgba(17, 19, 27, 0.12);
  transform: translateX(-50%);
}

.photo-section::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #ffffff;
  opacity: 0;
  pointer-events: none;
  z-index: 2;
}

.photo-section.photo-shot::after {
  animation: photo-flash 0.34s ease-out;
}

.photo-section-inner {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: grid;
  gap: clamp(30px, 5vw, 58px);
  position: relative;
  z-index: 3;
}

.photo-copy {
  max-width: 840px;
  margin: 0 auto;
  text-align: center;
}

.photo-copy h2 {
  margin: 0 auto 18px;
  color: #11131b;
  font-family: var(--title-font);
  font-size: clamp(2.35rem, 6vw, 5.2rem);
  font-weight: 900;
  line-height: 0.98;
}

.photo-copy p:last-child {
  max-width: 650px;
  margin: 0 auto;
  color: rgba(17, 19, 27, 0.7);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  font-weight: 700;
  line-height: 1.45;
}

.photo-demo {
  position: relative;
  min-height: clamp(260px, 34vw, 390px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(16px, 3vw, 34px);
}

.paper-drawing,
.colored-drawing {
  min-height: clamp(220px, 28vw, 330px);
  aspect-ratio: 4 / 3;
  border-radius: 26px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 3px solid #11131b;
}

.paper-drawing {
  background: #ffffff;
}

.colored-drawing {
  background: #9fe7a0;
}

.paper-drawing img,
.colored-drawing img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.paper-drawing img {
  filter: none;
  opacity: 1;
}

.camera-button {
  width: clamp(72px, 9vw, 106px);
  aspect-ratio: 1;
  border-radius: 28px;
  display: grid;
  place-items: center;
  background: transparent;
  border: none;
  overflow: hidden;
}

.camera-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-section.photo-shot .camera-button {
  animation: camera-pop 0.38s cubic-bezier(.22, 1.12, .38, 1);
}

.photo-section.photo-shot .photo-section-inner {
  animation: photo-section-pop 0.38s cubic-bezier(.22, 1.08, .38, 1);
}

@keyframes camera-pop {
  0% { transform: scale(1); }
  24% { transform: scale(0.9); }
  52% { transform: scale(1.04); }
  78% { transform: scale(0.99); }
  100% { transform: scale(1); }
}

@keyframes photo-section-pop {
  0% { transform: scale(1); filter: brightness(1); }
  20% { transform: scale(0.994); filter: brightness(1.1); }
  52% { transform: scale(1.006); filter: brightness(1.03); }
  78% { transform: scale(0.998); filter: brightness(1); }
  100% { transform: scale(1); filter: brightness(1); }
}

@keyframes photo-flash {
  0% { opacity: 0; }
  14% { opacity: 0.42; }
  46% { opacity: 0.12; }
  100% { opacity: 0; }
}

.feature-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 22px);
}

.feature-mini {
  min-height: 206px;
  padding: clamp(34px, 4vw, 46px) clamp(22px, 3vw, 30px) clamp(18px, 2.4vw, 24px);
  border-radius: 24px;
  display: grid;
  align-content: start;
  text-align: left;
  opacity: 0;
  transform: translateY(22px) scale(0.94) rotate(-1.5deg);
}

.feature-mini-grid.feature-mini-in-view .feature-mini {
  opacity: 1;
  transform: none;
  animation: feature-mini-enter 0.48s cubic-bezier(.22, 1.24, .36, 1) backwards;
}

.feature-mini-grid.feature-mini-in-view .feature-mini:nth-child(2) {
  animation-delay: 0.08s;
}

.feature-mini-grid.feature-mini-in-view .feature-mini:nth-child(3) {
  animation-delay: 0.16s;
}

@keyframes feature-mini-enter {
  0% {
    opacity: 0;
    transform: translateY(22px) scale(0.94) rotate(-1.5deg);
  }
  62% {
    opacity: 1;
    transform: translateY(-5px) scale(1.025) rotate(0.8deg);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

.feature-mini-paint {
  background: #ffe676;
}

.feature-mini-stickers {
  background: #f6a5ce;
}

.feature-mini-photo {
  background: #8bd6ff;
}

.feature-mini h3 {
  margin: 0;
  color: #11131b;
  font-family: var(--title-font);
  font-size: clamp(1.45rem, 2.4vw, 2.1rem);
  line-height: 1;
}

.feature-mini p {
  margin: 10px 0 0;
  color: rgba(17, 19, 27, 0.72);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
}

.site-footer {
  position: relative;
  z-index: 8;
  margin: 0 calc(50% - 50vw);
  min-height: 100vh;
  padding: 0 24px clamp(42px, 6vw, 76px);
  display: grid;
  justify-items: center;
  background: #fff2df;
  color: #11131b;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 22px;
  margin-bottom: 64px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  padding: 10px 2px;
  color: rgba(15, 23, 42, 0.72);
  font-weight: 900;
  text-decoration: none;
}

.footer-links a:hover {
  color: #194cff;
}

.legal-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 14% 14%, rgba(255, 211, 122, 0.62), transparent 24%),
    radial-gradient(circle at 86% 8%, rgba(159, 231, 242, 0.58), transparent 22%),
    linear-gradient(180deg, #fff2df 0%, #ffffff 100%);
  color: #172033;
}

.legal-shell {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: 28px 20px 72px;
}

.legal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.legal-logo {
  display: inline-flex;
  width: clamp(112px, 18vw, 156px);
}

.legal-logo img {
  width: 100%;
  height: auto;
  display: block;
}

.legal-language {
  background: rgba(45, 120, 255, 0.14);
}

.legal-card {
  width: 100%;
  max-width: 100%;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(25, 76, 255, 0.1);
  border-radius: 30px;
  padding: clamp(24px, 5vw, 48px);
  box-shadow: 0 24px 70px rgba(10, 20, 50, 0.12);
}

.legal-card h1,
.legal-card h2 {
  font-family: var(--title-font);
  color: #101827;
  letter-spacing: 0;
}

.legal-card h1 {
  margin: 0;
  font-size: clamp(2.4rem, 7vw, 4.2rem);
  line-height: 0.98;
}

.legal-card h2 {
  margin: 32px 0 8px;
  font-size: clamp(1.3rem, 3vw, 1.8rem);
}

.legal-card p {
  margin: 10px 0 0;
  color: rgba(23, 32, 51, 0.78);
  font-size: 1rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.legal-card a {
  color: #194cff;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.legal-updated {
  color: rgba(23, 32, 51, 0.56) !important;
  margin-bottom: 24px !important;
}

@media (max-width: 520px) {
  body.legal-page {
    width: 100vw;
    overflow-x: hidden;
  }

  body.legal-page .legal-shell {
    max-width: 100vw;
    padding: 28px 20px 56px;
  }

  body.legal-page .legal-header {
    width: 100%;
  }

  body.legal-page .legal-card {
    width: calc(100vw - 40px);
    max-width: calc(100vw - 40px);
    padding: 34px 22px 40px 26px;
  }

  body.legal-page .legal-card h1 {
    font-size: clamp(2rem, 12vw, 3.1rem);
  }

  body.legal-page .legal-card p,
  body.legal-page .legal-card h1,
  body.legal-page .legal-card h2 {
    width: calc(100vw - 92px);
    max-width: 100%;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
  }
}

.footer-inner {
  width: min(980px, 100%);
  min-height: calc(100vh - clamp(18px, 3vw, 34px));
  display: grid;
  align-content: center;
  justify-items: center;
  gap: clamp(64px, 9vw, 112px);
  transform: translateY(clamp(28px, 5vh, 64px));
}

.footer-socials {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
}

.footer-social-link {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  background: transparent;
  border: none;
  color: #9c7d5c;
  transition: transform 0.18s ease, color 0.18s ease;
}

.footer-social-link:hover {
  transform: translateY(-2px);
  color: #765d42;
}

.footer-social-link svg {
  width: 48px;
  height: 48px;
  display: block;
  fill: currentColor;
}

.zentto-credit {
  position: absolute;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  width: 25px;
  height: 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateX(-50%);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.zentto-credit::before {
  content: '';
  position: absolute;
  inset: 50% auto auto 50%;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
}

.zentto-credit:hover {
  opacity: 0.78;
  transform: translateX(-50%) translateY(-2px);
}

.zentto-credit img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

@media (max-width: 900px) {
  .site-header {
    left: max(18px, env(safe-area-inset-left, 0px));
    top: max(16px, env(safe-area-inset-top, 0px));
  }

  .hero-badge {
    right: max(18px, env(safe-area-inset-right, 0px));
    top: max(18px, env(safe-area-inset-top, 0px));
  }

  .hero-h1 {
    font-size: clamp(64px, 15vw, 132px);
  }

  .mobile-title-break {
    display: block;
  }

  .hero-cta {
    top: calc(50% + clamp(112px, 14vw, 168px));
  }

  .photo-demo {
    gap: clamp(14px, 2vw, 22px);
  }

  .paper-drawing,
  .colored-drawing {
    min-height: clamp(210px, 25vw, 300px);
  }

  .feature-mini-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .second-section {
    padding-inline: 18px;
  }

  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(680px, 100%);
    margin: 0 auto;
  }

  .features-doodle-line {
    top: clamp(190px, 36vw, 280px);
    width: 120vw;
  }

  .feature-card {
    min-height: 250px;
  }
}

@media (max-width: 620px) {
  .page-shell {
    padding: 0 14px 40px;
  }

  .mobile-next-section {
    display: grid;
  }

  .site-header {
    left: max(12px, env(safe-area-inset-left, 0px));
    top: max(12px, env(safe-area-inset-top, 0px));
    gap: 7px;
  }

  .site-logo {
    width: 88px;
  }

  .hero-badge {
    display: none;
  }

  .hero-cta {
    top: calc(50% + clamp(126px, 32vw, 154px));
    width: min(340px, calc(100vw - 28px));
    transform: translate(-50%, -34px);
    gap: 10px;
  }

  .hero-cta p {
    font-size: 0.95rem;
  }

  .store-buttons {
    gap: 9px;
  }

  .store-button {
    width: min(142px, calc((100vw - 48px) / 2));
    border-radius: 10px;
  }

  .hero-stage {
    border-radius: 0;
  }

  .hero-h1 {
    font-size: clamp(52px, 14.5vw, 78px);
    line-height: 0.78;
    padding: 0 12px;
    transform: translateY(-34px);
  }

  .hero-line:first-child {
    margin-bottom: -0.04em;
  }

  .hero-premium-mark {
    width: 0.44em;
    height: 0.62em;
    margin-left: -0.04em;
  }

  .hero-premium-mark img {
    left: 82%;
    width: 0.96em;
    height: 0.96em;
  }

  .second-section {
    padding-top: 74px;
  }

  .photo-section {
    border-radius: 26px 26px 0 0;
    padding: 86px 16px 70px;
  }

  .photo-copy h2,
  .second-section h2,
  .download-callout-text {
    font-size: clamp(1.95rem, 8.8vw, 2.85rem);
    line-height: 1;
  }

  .photo-demo {
    grid-template-columns: 1fr;
    justify-items: center;
    min-height: 0;
    gap: 14px;
  }

  .paper-drawing,
  .colored-drawing {
    width: min(360px, 100%);
    min-height: 240px;
    border-radius: 22px;
  }

  .camera-button {
    width: 76px;
    border-radius: 22px;
  }

  .second-section h2 {
    margin-bottom: 28px;
  }

  .feature-card {
    min-height: 198px;
    border-radius: 20px;
  }

  .features {
    grid-template-columns: 1fr;
    width: min(360px, 100%);
  }

  .features-doodle-line {
    display: none;
  }

  .feature-art {
    min-height: 140px;
    border-radius: 14px;
  }

  .download-callout {
    gap: 30px;
  }

  .download-callout-text {
    width: min(320px, 100%);
  }

  .download-callout-arrow {
    width: 82px;
    transform: none;
  }

  .section-downloads {
    gap: 12px;
  }

  .section-downloads .store-button {
    width: min(218px, 82vw);
  }

  .hero-screen {
    padding: 24px;
  }

  .feature-mini-grid {
    grid-template-columns: 1fr;
    width: min(360px, 100%);
    margin: 0 auto;
  }

  .feature-mini {
    min-height: 156px;
  }

  .letters {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .page-shell {
    padding: 0 16px 40px;
  }

  .control-group {
    padding: 18px;
  }

  .letters {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Compact app-style editor dock */
.tool-panel {
  position: fixed;
  right: clamp(14px, 2.4vw, 28px);
  bottom: calc(clamp(14px, 2.4vw, 28px) + env(safe-area-inset-bottom, 0px));
  left: auto;
  transform: none;
  width: min(304px, calc(100vw - 28px));
  max-width: none;
  align-items: flex-end;
  gap: 10px;
  z-index: 10;
}

.tool-hint {
  position: absolute;
  right: 118px;
  bottom: 132px;
  width: min(460px, calc(100vw - 170px));
  color: #ffffff;
  font-family: var(--title-font);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.15;
  text-align: right;
  pointer-events: none;
  z-index: 4;
  transition: opacity 0.24s ease, transform 0.24s ease, visibility 0.24s ease;
  animation: tool-hint-float 1.8s ease-in-out infinite;
}

.tool-hint span {
  display: block;
  white-space: nowrap;
  transform: translateY(-30px);
}

.tool-hint-arrow {
  position: absolute;
  right: -30px;
  bottom: -42px;
  width: 66px;
  height: 42px;
  overflow: visible;
  transform: rotate(-10deg);
  transform-origin: right bottom;
}

.tool-hint-arrow path {
  fill: none;
  stroke: #ffffff;
  stroke-width: 5.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tool-panel.hint-hidden .tool-hint {
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(0.98);
  animation: none;
}

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

.tool-panel .tool-card {
  width: min(304px, calc(100vw - 28px));
  border-radius: 20px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(32, 40, 51, 0.06);
  box-shadow: 0 16px 34px rgba(16, 24, 40, 0.14), inset 0 1px 0 rgba(255,255,255,0.8);
  backdrop-filter: blur(18px);
}

.tool-card-title {
  display: none;
}

.tool-options {
  gap: 10px;
}

.tool-section {
  margin-top: 0;
  gap: 10px;
}

.tool-section.active {
  display: grid;
}

.tool-card .control-label,
.tool-card .control-row label {
  color: #272832;
  font-size: 0.76rem;
  font-weight: 800;
}

.tool-card .control-note {
  margin-top: 2px;
  color: #767989;
  font-size: 0.78rem;
}

.control-row {
  gap: 8px;
}

.color-row {
  gap: 6px;
}

.control-slider-row {
  display: grid;
  grid-template-columns: 68px 1fr;
  width: 100%;
}

.tool-card input[type="range"] {
  width: 100%;
  height: 28px;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
}

.tool-card input[type="range"]::-webkit-slider-runnable-track {
  height: 14px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0) 42%),
    linear-gradient(90deg, #ff6f8f 0%, #ffd85a 36%, #60d96c 68%, #52b7ff 100%);
  border: 2px solid rgba(32, 40, 51, 0.12);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.58),
    inset 0 -3px 0 rgba(25, 32, 48, 0.12),
    0 4px 8px rgba(16, 24, 40, 0.08);
}

.tool-card input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  margin-top: -9px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.95) 0 16%, rgba(255, 255, 255, 0) 17%),
    linear-gradient(180deg, #ffffff 0%, #f7f0ff 38%, #d8c9ff 100%);
  border: 2px solid #202833;
  box-shadow:
    0 5px 0 #8f7bcd,
    0 9px 14px rgba(38, 43, 62, 0.18);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.tool-card input[type="range"]:hover::-webkit-slider-thumb {
  transform: translateY(-1px) scale(1.05);
  box-shadow:
    0 6px 0 #8f7bcd,
    0 12px 18px rgba(38, 43, 62, 0.2);
}

.tool-card input[type="range"]:active::-webkit-slider-thumb {
  transform: translateY(3px) scale(0.98);
  box-shadow:
    0 2px 0 #8f7bcd,
    0 5px 10px rgba(38, 43, 62, 0.16);
}

.tool-card input[type="range"]::-moz-range-track {
  height: 14px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0) 42%),
    linear-gradient(90deg, #ff6f8f 0%, #ffd85a 36%, #60d96c 68%, #52b7ff 100%);
  border: 2px solid rgba(32, 40, 51, 0.12);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.58),
    inset 0 -3px 0 rgba(25, 32, 48, 0.12),
    0 4px 8px rgba(16, 24, 40, 0.08);
}

.tool-card input[type="range"]::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.95) 0 16%, rgba(255, 255, 255, 0) 17%),
    linear-gradient(180deg, #ffffff 0%, #f7f0ff 38%, #d8c9ff 100%);
  border: 2px solid #202833;
  box-shadow:
    0 5px 0 #8f7bcd,
    0 9px 14px rgba(38, 43, 62, 0.18);
}

.color-swatch {
  width: 25px;
  height: 25px;
  border-radius: 8px;
  border: 1px solid rgba(32, 40, 51, 0.16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 2px 5px rgba(16, 24, 40, 0.08);
}

.color-swatch.active {
  border-color: #202833;
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #202833, 0 5px 10px rgba(15, 23, 42, 0.14);
}

.tool-bar {
  width: auto;
  padding: 7px;
  gap: 7px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(32, 40, 51, 0.06);
  box-shadow: 0 18px 34px rgba(16, 24, 40, 0.16), inset 0 1px 0 rgba(255,255,255,0.82);
  backdrop-filter: blur(18px);
}

.tool-bar .tool-button {
  position: relative;
  width: 58px;
  height: 58px;
  min-width: 0;
  padding: 5px;
  border-radius: 16px;
  border: 1px solid rgba(32, 40, 51, 0.12);
  background: #fff8dc;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.66), 0 3px 8px rgba(15, 23, 42, 0.08);
}

.tool-bar .tool-button:nth-child(1) {
  background: #b8dcff;
}

.tool-bar .tool-button:nth-child(2) {
  background: #f9e4a2;
}

.tool-bar .tool-button:nth-child(3) {
  background: #f2d8e9;
}

.tool-bar .tool-button.active {
  border-color: #202833;
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.72), 0 0 0 2px #ffffff, 0 0 0 4px #202833, 0 8px 16px rgba(15, 23, 42, 0.14);
}

.tool-bar .tool-button span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.tool-bar .tool-icon {
  width: 44px;
  height: 44px;
  margin: 0;
  object-fit: contain;
}

.stickers {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.sticker-button {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 16px;
  padding: 7px;
  border-color: rgba(32, 40, 51, 0.1);
  box-shadow: 0 3px 8px rgba(16, 24, 40, 0.08);
}

.sticker-editor {
  gap: 8px;
  padding-top: 8px;
}

.tool-card .tool-button.danger {
  position: relative;
  width: 100%;
  min-width: 0;
  padding: 12px 14px 13px;
  border-radius: 18px;
  background: linear-gradient(180deg, #ff7c89 0%, #ff4e62 72%);
  color: #ffffff;
  border: 2px solid rgba(122, 18, 36, 0.18);
  box-shadow:
    0 8px 0 #c92f43,
    0 15px 24px rgba(166, 35, 56, 0.22),
    inset 0 2px 0 rgba(255, 255, 255, 0.46);
  text-shadow: 0 1px 0 rgba(117, 15, 31, 0.24);
  overflow: hidden;
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.tool-card .tool-button.danger::before {
  content: "";
  position: absolute;
  left: 14%;
  right: 14%;
  top: 5px;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  pointer-events: none;
}

.tool-card .tool-button.danger:hover {
  transform: translateY(-2px);
  filter: saturate(1.08);
  box-shadow:
    0 10px 0 #c92f43,
    0 18px 28px rgba(166, 35, 56, 0.25),
    inset 0 2px 0 rgba(255, 255, 255, 0.5);
}

.tool-card .tool-button.danger:active {
  transform: translateY(5px) scale(0.99);
  box-shadow:
    0 3px 0 #c92f43,
    0 8px 14px rgba(166, 35, 56, 0.2),
    inset 0 2px 0 rgba(255, 255, 255, 0.38);
}

@media (max-width: 900px) {
  .tool-panel {
    position: fixed;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    width: min(268px, calc(100vw - 24px));
    margin: 0;
  }

  .tool-hint {
    right: 100px;
    bottom: 120px;
    width: 190px;
    font-size: 0.9rem;
  }

  .tool-hint-arrow {
    right: -28px;
    bottom: -38px;
    width: 58px;
    height: 38px;
  }
}

@media (max-width: 620px) {
  .tool-panel {
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    width: auto;
  }

  .tool-hint {
    right: calc(100% + 22px);
    bottom: 58px;
    width: min(148px, calc(100vw - 224px));
    font-size: 0.82rem;
    text-align: right;
  }

  .tool-hint span {
    white-space: normal;
    transform: none;
  }

  .tool-hint-arrow {
    right: -18px;
    bottom: -34px;
    width: 42px;
    height: 28px;
    transform: rotate(-6deg);
  }

  .tool-panel .tool-card {
    width: min(286px, calc(100vw - 20px));
    padding: 10px;
    border-radius: 22px;
  }

  .tool-bar {
    padding: 7px;
    border-radius: 23px;
  }

  .tool-bar .tool-button {
    width: 54px;
    height: 54px;
    border-radius: 18px;
  }

  .tool-bar .tool-icon {
    width: 40px;
    height: 40px;
  }

  .color-swatch {
    width: 24px;
    height: 24px;
    border-radius: 9px;
  }

  .stickers {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .sticker-button {
    width: 100%;
    height: auto;
    border-radius: 15px;
  }
}

/* Keep decorative assets and buttons flat, closer to the app reference. */
.hero-noise-item,
.hero-premium-mark img {
  filter: none;
}

.store-button,
.store-button:hover,
.tool-card,
.tool-bar,
.tool-button,
.tool-button:hover,
.tool-button.active,
.color-swatch,
.color-swatch.active,
.sticker-button,
.sticker-button:hover,
.sticker-button:active,
.sticker-button.active {
  box-shadow: none;
}

@media (max-width: 620px) {
  .hero-noise-item {
    opacity: calc(var(--noise-opacity) * 0.72);
  }

  .hero-noise-nuvem {
    --noise-size: 190px;
  }
}

@media (max-width: 380px) {
  .photo-copy h2,
  .second-section h2,
  .download-callout-text {
    font-size: clamp(1.8rem, 8.2vw, 2.35rem);
  }
}

/* Pinti Escrever hero */
.writing-hero {
  display: block !important;
  padding: 0;
  isolation: isolate;
}

.word-hero-copy {
  position: absolute;
  left: 50%;
  bottom: clamp(22px, 4vw, 48px);
  z-index: 7;
  display: grid;
  gap: 12px;
  width: min(940px, calc(100vw - 36px));
  max-width: none;
  padding: clamp(12px, 1.8vw, 18px);
  border: 3px solid rgba(17, 19, 27, 0.92);
  border-radius: 26px;
  background: rgba(255, 250, 241, 0.94);
  box-shadow: 0 14px 0 rgba(17, 19, 27, 0.16);
  transform: translateX(-50%) rotate(-0.4deg);
}

.hero-kicker {
  width: max-content;
  margin: 0;
  padding: 7px 12px;
  border-radius: 999px;
  background: #2d78ff;
  color: #ffffff;
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(0.78rem, 1vw, 0.92rem);
}

.word-title {
  position: relative;
  inset: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: baseline;
  gap: 10px;
  margin: 0;
  color: #11131b;
  font-family: var(--title-font);
  font-size: clamp(2rem, 5.4vw, 4.8rem);
  font-weight: 900;
  line-height: 1;
  text-align: left;
  pointer-events: auto;
  letter-spacing: 0;
}

.word-title-token {
  appearance: none;
  border: 3px solid #11131b;
  padding: 0.05em 0.18em 0.12em;
  border-radius: 18px;
  background: #ffffff;
  color: inherit;
  font: inherit;
  line-height: inherit;
  cursor: pointer;
  box-shadow: 0 8px 0 rgba(17, 19, 27, 0.16);
  transition: background-color 0.16s ease, color 0.16s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.word-title-token:hover,
.word-title-token:focus-visible,
.word-title-token.active {
  background: #ffe66d;
  color: #11131b;
  transform: translateY(-5px) rotate(-1deg);
  outline: none;
}

.hero-subtitle {
  max-width: 720px;
  margin: 0;
  color: rgba(17, 19, 27, 0.68);
  font-size: clamp(0.9rem, 1.15vw, 1rem);
  font-weight: 800;
  line-height: 1.42;
}

.word-search-card {
  position: absolute;
  inset: clamp(86px, 10vw, 118px) clamp(14px, 3vw, 42px) clamp(18px, 3vw, 42px);
  z-index: 4;
  width: auto;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  transform: none;
  overflow: hidden;
}

.word-search-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 34%;
  background: linear-gradient(180deg, rgba(45, 120, 255, 0), rgba(45, 120, 255, 0.58) 84%);
  pointer-events: none;
  z-index: 2;
}

.word-search-header {
  position: absolute;
  left: clamp(6px, 2vw, 22px);
  top: clamp(6px, 2vw, 18px);
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 0;
  color: #ffffff;
  font-family: var(--title-font);
  font-size: clamp(1rem, 1.6vw, 1.24rem);
  font-weight: 900;
}

.word-search-progress {
  display: inline-flex;
  min-width: 56px;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: #ffffff;
  color: #2d78ff;
}

.word-grid {
  display: grid;
  grid-template-columns: repeat(var(--word-grid-cols, 18), minmax(0, 1fr));
  gap: clamp(5px, 0.72vw, 11px);
  height: 100%;
  align-content: stretch;
  opacity: 0.96;
}

.word-cell {
  min-width: 0;
  min-height: 0;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: rgba(255, 250, 241, 0.92);
  color: #11131b;
  font-family: var(--title-font);
  font-size: clamp(1.2rem, 2.3vw, 2rem);
  font-weight: 900;
  line-height: 1;
  transition: transform 0.16s ease, background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.word-cell.word-path {
  background: rgba(255, 250, 241, 0.92);
}

.word-cell.highlight {
  background: #ffe66d;
  color: #11131b;
  border-color: #11131b;
  box-shadow: 0 6px 0 rgba(17, 19, 27, 0.16);
  transform: translateY(-4px) scale(1.04);
}

.word-cell.found {
  background: #66df81;
  border-color: #11131b;
}

.word-search-tip {
  position: absolute;
  right: clamp(6px, 2vw, 22px);
  top: clamp(9px, 2vw, 20px);
  z-index: 3;
  margin-top: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.94rem;
  font-weight: 800;
  text-align: center;
}

.writing-demo .writing-card {
  position: relative;
  background: #ffffff;
  padding: clamp(18px, 3vw, 28px);
}

.trace-letter {
  color: #11131b;
  font-family: var(--title-font);
  font-size: clamp(7rem, 16vw, 12rem);
  font-weight: 900;
  line-height: 0.8;
  -webkit-text-stroke: 3px #11131b;
  color: transparent;
}

.trace-guide {
  position: absolute;
  width: 52%;
  height: 12px;
  border-radius: 999px;
  background: #ff6b94;
  transform: translateY(74px) rotate(-12deg);
}

.word-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 2vw, 18px);
  background: #9fe7a0;
}

.word-card span,
.camera-button span {
  display: grid;
  place-items: center;
  color: #11131b;
  font-family: var(--title-font);
  font-weight: 900;
}

.word-card span {
  width: clamp(54px, 8vw, 86px);
  aspect-ratio: 1;
  border-radius: 18px;
  background: #ffffff;
  border: 3px solid #11131b;
  font-size: clamp(2rem, 5vw, 4rem);
  box-shadow: 0 8px 0 rgba(17, 19, 27, 0.16);
}

.camera-button {
  background: #ffe66d;
  border: 3px solid #11131b;
}

.camera-button span {
  width: 100%;
  height: 100%;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
}

.learning-demo {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.1fr) minmax(180px, 0.72fr);
}

.trace-activity {
  background: #fffaf1;
}

.trace-activity .trace-letter {
  color: rgba(17, 19, 27, 0.08);
  -webkit-text-stroke: 4px #11131b;
  font-size: clamp(8rem, 17vw, 13rem);
}

.trace-path {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 42%;
  height: 12px;
  border-radius: 999px;
  background: #ff6b94;
  transform-origin: left center;
}

.trace-path-one {
  transform: translate(-47%, -22px) rotate(90deg);
}

.trace-path-two {
  width: 34%;
  background: #ffe66d;
  transform: translate(-15%, 24px) rotate(0deg);
}

.syllable-card {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(8px, 1.4vw, 14px);
  padding: clamp(18px, 3vw, 28px);
  background: #8bd6ff;
}

.syllable-card span {
  display: grid;
  place-items: center;
  min-height: clamp(56px, 8vw, 86px);
  border: 3px solid #11131b;
  border-radius: 18px;
  background: #ffffff;
  color: #11131b;
  font-family: var(--title-font);
  font-size: clamp(1.5rem, 3vw, 2.6rem);
  font-weight: 900;
  box-shadow: 0 8px 0 rgba(17, 19, 27, 0.16);
}

.word-search-preview {
  align-self: stretch;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  min-height: clamp(220px, 28vw, 330px);
  padding: clamp(14px, 2vw, 22px);
  border: 3px solid #11131b;
  border-radius: 26px;
  background: #24775e;
}

.word-search-preview span {
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--title-font);
  font-size: clamp(1.1rem, 2.4vw, 2rem);
  font-weight: 900;
}

.word-search-preview span:nth-child(n+5):nth-child(-n+8) {
  background: #fffaf1;
  color: #11131b;
  border: 2px solid #11131b;
}

.learning-art {
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.68);
}

.learning-art::before,
.learning-art::after {
  content: none;
}

.learning-art span,
.learning-art strong,
.learning-art b {
  position: relative;
  z-index: 1;
  font-family: var(--title-font);
  font-weight: 900;
  line-height: 1;
}

.letters-art span {
  color: transparent;
  -webkit-text-stroke: 4px #11131b;
  font-size: clamp(6rem, 12vw, 9rem);
}

.letters-art i {
  position: absolute;
  width: 46%;
  height: 12px;
  border-radius: 999px;
  background: #ff6b94;
  transform: translateY(34px) rotate(-14deg);
}

.syllables-art {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 18px;
}

.syllables-art span {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1.35;
  border: 3px solid #11131b;
  border-radius: 18px;
  background: #ffffff;
  color: #11131b;
  font-size: clamp(1.6rem, 3.6vw, 2.7rem);
}

.syllables-art span:nth-child(3) {
  grid-column: 1 / -1;
  width: 62%;
  justify-self: center;
}

.numbers-art {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 18px;
}

.numbers-art span {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 22px;
  background: #fffaf1;
  border: 3px solid #11131b;
  color: #11131b;
  font-size: clamp(2.8rem, 6vw, 4.6rem);
}

.math-art {
  grid-template-columns: 1fr auto 0.8fr auto 0.8fr;
  gap: 8px;
  padding: 18px;
  color: #11131b;
}

.math-art span {
  color: #ff6b94;
  font-size: clamp(2rem, 5vw, 3.6rem);
}

.math-art b {
  font-size: clamp(2rem, 4vw, 3.1rem);
}

.math-art strong {
  display: grid;
  place-items: center;
  width: clamp(58px, 8vw, 88px);
  aspect-ratio: 1;
  border: 3px solid #11131b;
  border-radius: 20px;
  background: #ffe66d;
  font-size: clamp(2.4rem, 5vw, 4rem);
}

@media (max-width: 900px) {
  .writing-hero {
    padding: 0;
  }

  .word-hero-copy {
    left: 50%;
    right: auto;
    bottom: 18px;
    justify-items: center;
    text-align: center;
    margin: 0 auto;
  }

  .word-title {
    justify-content: center;
    text-align: center;
    font-size: clamp(1.8rem, 8.6vw, 3.2rem);
  }

  .hero-subtitle {
    max-width: 560px;
  }

  .word-search-card {
    inset: 82px 10px 12px;
    width: auto;
    transform: none;
  }

  .hero-badge {
    display: none;
  }
}

@media (max-width: 620px) {
  .writing-hero {
    padding: 0;
  }

  .hero-kicker {
    padding: 6px 10px;
    font-size: 0.68rem;
  }

  .word-title {
    gap: 7px;
    font-size: clamp(1.3rem, 7.6vw, 2rem);
    line-height: 0.98;
  }

  .word-title > span {
    display: none;
  }

  .word-title-token {
    border-width: 2px;
    border-radius: 13px;
    box-shadow: 0 5px 0 rgba(17, 19, 27, 0.14);
  }

  .hero-subtitle {
    display: none;
  }

  .word-hero-copy {
    width: calc(100vw - 22px);
    padding: 10px;
    border-width: 2px;
    border-radius: 18px;
    gap: 8px;
    box-shadow: 0 8px 0 rgba(17, 19, 27, 0.14);
  }

  .writing-hero .store-button {
    width: min(134px, calc((100% - 10px) / 2));
    border-radius: 10px;
  }

  .word-search-card {
    inset: 76px 8px 8px;
    width: auto;
    max-width: none;
    padding: 0;
  }

  .word-search-card::after {
    height: 42%;
  }

  .word-grid {
    gap: 4px;
    min-width: 0;
  }

  .word-cell {
    min-width: 0;
    border-width: 1px;
    border-radius: 9px;
    font-size: clamp(0.88rem, 4.5vw, 1.2rem);
  }

  .word-search-header {
    max-width: 190px;
    font-size: 0.84rem;
  }

  .word-search-tip {
    display: none;
  }

  .writing-demo {
    grid-template-columns: 1fr;
  }

  .writing-demo .camera-button {
    justify-self: center;
  }
}

/* Hero as a word-search title: no content block, just found words in the grid. */
.writing-hero {
  display: grid !important;
  place-items: center;
  padding: clamp(82px, 8vw, 110px) 0 0;
  overflow: hidden;
}

.writing-hero .word-hero-copy,
.writing-hero .hero-kicker,
.writing-hero .hero-subtitle,
.writing-hero .word-search-header,
.writing-hero .word-search-tip,
.hero-badge {
  display: none !important;
}

.writing-hero .word-search-card {
  position: relative;
  inset: auto;
  z-index: 4;
  width: 124vw;
  max-width: none;
  aspect-ratio: 24 / var(--word-grid-rows, 11);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
  overflow: visible;
}

.writing-hero .word-search-card::after {
  content: none;
}

.writing-hero .word-grid {
  display: grid;
  grid-template-columns: repeat(var(--word-grid-cols, 24), minmax(0, 1fr));
  grid-template-rows: repeat(var(--word-grid-rows, 11), minmax(0, 1fr));
  gap: clamp(5px, 0.62vw, 9px);
  width: 100%;
  height: 100%;
  opacity: 1;
}

.writing-hero .word-cell {
  min-width: 0;
  min-height: 0;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: clamp(9px, 1.2vw, 17px);
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.42);
  font-size: clamp(0.95rem, 2.4vw, 2.85rem);
  box-shadow: none;
  transform: none;
}

.writing-hero .word-cell.found {
  background: #fffaf1;
  color: #11131b;
  border-color: #11131b;
  box-shadow: 0 clamp(5px, 0.75vw, 10px) 0 rgba(17, 19, 27, 0.18);
}

.writing-hero .word-cell.highlight,
.writing-hero .word-cell.found.highlight {
  background: #ffe66d;
  color: #11131b;
  border-color: #11131b;
  transform: translateY(-3px);
}

.writing-hero .word-cell.word-cell-cleared {
  background: transparent;
  border-color: transparent;
  color: transparent;
  box-shadow: none;
  pointer-events: none;
}

.hero-writing-cta {
  position: absolute;
  right: clamp(18px, 4vw, 64px);
  bottom: clamp(24px, 5vw, 66px);
  z-index: 7;
  display: grid;
  justify-items: end;
  gap: 16px;
  width: min(560px, calc(100vw - 36px));
  padding: clamp(18px, 2.6vw, 34px) 0 0 clamp(22px, 3vw, 46px);
  text-align: right;
}

.hero-writing-cta p {
  margin: 0;
  max-width: 540px;
  color: #ffffff;
  font-size: clamp(1.05rem, 1.6vw, 1.34rem);
  font-weight: 900;
  line-height: 1.35;
  text-shadow: 0 3px 14px rgba(10, 20, 50, 0.24);
}

.hero-writing-cta .store-buttons {
  justify-content: flex-end;
}

@media (max-width: 620px) {
  .writing-hero {
    grid-template-columns: 100%;
    align-items: start !important;
    align-content: space-between;
    padding-top: 72px;
    padding-bottom: 28px;
    row-gap: clamp(16px, 4vw, 28px);
  }

  .writing-hero .word-search-card {
    width: 220vw;
    justify-self: start;
  }

  .writing-hero .word-grid {
    gap: 4px;
  }

  .writing-hero .word-cell {
    border-width: 1px;
    border-radius: 8px;
    font-size: clamp(0.82rem, 4.7vw, 1.32rem);
  }

  .hero-writing-cta {
    position: static;
    inset: auto;
    justify-items: center;
    gap: 14px;
    width: min(360px, calc(100vw - 32px));
    padding: 0;
    text-align: center;
  }

  .hero-writing-cta p {
    max-width: none;
    font-size: clamp(1.05rem, 4.4vw, 1.2rem);
    line-height: 1.32;
    text-align: center;
  }

  .hero-writing-cta .store-buttons {
    justify-content: center;
  }

  .hero-writing-cta .store-button {
    width: min(132px, calc((100vw - 42px) / 2));
  }
}

@media (max-width: 900px) {
  .learning-demo {
    grid-template-columns: 1fr 0.34fr 1fr;
  }

  .word-search-preview {
    grid-column: 1 / -1;
    min-height: 220px;
  }
}

@media (max-width: 620px) {
  .learning-demo {
    grid-template-columns: 1fr;
  }

  .learning-demo .camera-button {
    justify-self: center;
  }

  .syllable-card {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .word-search-preview {
    min-height: 220px;
  }

  .math-art {
    grid-template-columns: 1fr auto 0.8fr;
  }
}

/* New learning sections */
.learning-world {
  background: linear-gradient(180deg, #fff9ef 0%, #f7fff4 100%);
  color: #11131b;
}

.learning-world-inner,
.learning-map-inner {
  width: min(1160px, 100%);
  margin: 0 auto;
  position: relative;
  z-index: 3;
}

.learning-world-copy {
  max-width: 910px;
  margin: 0 auto clamp(34px, 5vw, 64px);
  text-align: center;
}

.learning-world-copy h2,
.learning-map h2 {
  margin: 0 auto 18px;
  color: #11131b;
  font-family: var(--title-font);
  font-size: clamp(2.35rem, 6vw, 5.2rem);
  font-weight: 900;
  line-height: 0.98;
}

.learning-world-copy p:last-child {
  max-width: 680px;
  margin: 0 auto;
  color: rgba(17, 19, 27, 0.72);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  font-weight: 800;
  line-height: 1.45;
}

.activity-board {
  display: grid;
  grid-template-columns: 1.12fr 0.9fr 1.28fr;
  grid-template-rows: minmax(150px, 0.72fr) minmax(210px, 1fr) minmax(170px, 0.82fr);
  gap: clamp(14px, 2vw, 22px);
  min-height: clamp(620px, 62vw, 760px);
}

.activity-panel {
  position: relative;
  border: 7px solid rgba(255, 255, 255, 0.92);
  border-radius: 34px;
  overflow: hidden;
  display: grid;
  place-items: center;
  box-shadow: 0 13px 0 rgba(31, 94, 61, 0.32);
}

.activity-panel::before {
  content: "";
  position: absolute;
  left: 5%;
  right: 5%;
  top: 7%;
  height: 14%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  pointer-events: none;
}

.activity-panel::after {
  content: "";
  position: absolute;
  right: -3%;
  top: -8%;
  width: 32%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  pointer-events: none;
}

.panel-label {
  position: absolute;
  left: 18px;
  top: 16px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(18, 106, 58, 0.9);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 900;
}

.trace-panel {
  grid-column: 1;
  grid-row: 1 / 3;
  background: #fffdf8;
}

.trace-panel strong {
  color: transparent;
  -webkit-text-stroke: 18px rgba(214, 211, 204, 0.42);
  font-family: var(--title-font);
  font-size: clamp(11rem, 23vw, 18rem);
  line-height: 0.8;
}

.trace-stroke {
  position: absolute;
  width: 46%;
  height: 18px;
  border-radius: 999px;
  background: #65c7d9;
  box-shadow: none;
}

.trace-stroke-one {
  height: 20px;
  transform: translate(-58px, -8px) rotate(90deg);
}

.trace-stroke-two {
  width: 0;
  height: 0;
  opacity: 0;
}

.trace-panel::after {
  content: none;
}

.trace-panel .trace-dot-one {
  left: 26%;
  top: 22%;
  width: 48px;
  background: #ff7cae;
  border: 0;
  color: transparent;
  box-shadow: 0 0 0 10px rgba(255, 124, 174, 0.32);
}

.trace-panel .trace-dot-two,
.trace-panel .trace-dot-three {
  display: none;
}

.trace-panel .trace-dot-one::after {
  content: "";
  position: absolute;
  inset: 30%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.42);
}

.trace-dot {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 38px;
  aspect-ratio: 1;
  border: 3px solid #11131b;
  border-radius: 50%;
  background: #ffffff;
  color: #11131b;
  font-family: var(--title-font);
  font-weight: 900;
}

.trace-dot-one {
  left: 28%;
  top: 24%;
}

.trace-dot-two {
  left: 56%;
  top: 34%;
}

.trace-dot-three {
  left: 58%;
  top: 59%;
}

.syllable-panel {
  grid-column: 2;
  grid-row: 1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 22px;
  background: #ffd8e7;
}

.syllable-panel span,
.hunt-panel span,
.count-panel strong,
.sum-panel strong {
  font-family: var(--title-font);
  font-weight: 900;
}

.syllable-panel span {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 74px;
  border: 0;
  border-radius: 20px;
  background: #fffdf8;
  color: #292933;
  font-size: clamp(1.8rem, 4vw, 3rem);
  box-shadow: 0 8px 0 rgba(112, 76, 86, 0.18);
}

.hunt-panel {
  grid-column: 3;
  grid-row: 1 / 3;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 22px;
  background: #fffdf8;
}

.hunt-panel span {
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: transparent;
  color: #292933;
  font-size: clamp(1.2rem, 2.6vw, 2.1rem);
}

.hunt-panel .hunt-found {
  background: #dff5ec;
  color: #13713c;
  border: 0;
  box-shadow: 0 6px 0 rgba(31, 94, 61, 0.14);
}

.mascot-panel {
  grid-column: 2;
  grid-row: 2;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.mascot-panel::before,
.mascot-panel::after {
  content: none;
}

.octopus-image {
  width: min(124%, 310px);
  max-width: none;
  height: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 18px 18px rgba(14, 82, 49, 0.22));
}

.count-panel {
  grid-column: 1;
  grid-row: 3;
  align-content: center;
  gap: 18px;
  background: #ffe7a8;
}

.count-objects {
  display: flex;
  gap: 12px;
}

.count-objects i {
  width: clamp(34px, 5vw, 54px);
  aspect-ratio: 1;
  border: 0;
  border-radius: 50%;
  background: #ffb44f;
  box-shadow: inset 0 5px 0 rgba(255,255,255,0.36), 0 7px 0 rgba(112, 76, 22, 0.18);
}

.count-panel strong {
  color: #292933;
  font-size: clamp(4rem, 10vw, 7rem);
  line-height: 0.8;
}

.sum-panel {
  grid-column: 2 / 4;
  grid-row: 3;
  grid-template-columns: auto auto auto auto auto;
  gap: clamp(8px, 1.4vw, 16px);
  padding: 20px;
  background: #fffdf8;
  color: #292933;
}

.sum-panel span,
.sum-panel b {
  font-family: var(--title-font);
  font-size: clamp(2rem, 4.2vw, 3.6rem);
  font-weight: 900;
}

.sum-panel .sum-dots {
  color: #ffb44f;
}

.sum-panel strong {
  display: grid;
  place-items: center;
  width: clamp(68px, 10vw, 110px);
  aspect-ratio: 1;
  border: 0;
  border-radius: 22px;
  background: #ffffff;
  font-size: clamp(3rem, 6vw, 5rem);
  box-shadow: 0 8px 0 rgba(31, 94, 61, 0.16);
}

.learning-map {
  background: linear-gradient(180deg, #f7fff4 0%, #fff2df 100%);
}

.learning-map-inner {
  text-align: center;
}

.learning-lanes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 34px);
  margin-top: clamp(30px, 5vw, 58px);
}

.learning-lane {
  position: relative;
  display: grid;
  gap: 14px;
  padding: clamp(18px, 2.6vw, 28px);
  border: 3px solid #11131b;
  border-radius: 26px;
  box-shadow: 0 14px 0 rgba(17, 19, 27, 0.16);
}

.language-lane {
  background: #8bd6ff;
  transform: rotate(-0.8deg);
}

.math-lane {
  background: #ffe66d;
  transform: rotate(0.8deg);
}

.lane-title {
  justify-self: start;
  padding: 8px 12px;
  border-radius: 999px;
  background: #11131b;
  color: #ffffff;
  font-weight: 900;
}

.lane-step {
  display: grid;
  grid-template-columns: minmax(110px, 0.4fr) 1fr;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 3px solid #11131b;
  border-radius: 20px;
  background: #fffaf1;
  text-align: left;
}

.lane-step strong {
  color: #11131b;
  font-family: var(--title-font);
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 0.9;
}

.lane-step span {
  color: rgba(17, 19, 27, 0.72);
  font-weight: 900;
  font-size: clamp(1rem, 1.8vw, 1.2rem);
}

@media (max-width: 900px) {
  .activity-board,
  .learning-lanes {
    grid-template-columns: 1fr;
  }

  .activity-board {
    grid-template-rows: none;
  }

  .trace-panel,
  .hunt-panel,
  .mascot-panel,
  .count-panel,
  .sum-panel {
    grid-column: auto;
    grid-row: auto;
    min-height: 260px;
  }

  .learning-lane {
    transform: none;
  }
}

@media (max-width: 620px) {
  .activity-panel {
    border-radius: 20px;
  }

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

  .sum-panel {
    grid-template-columns: 1fr auto 1fr;
  }

  .sum-panel b:nth-of-type(2),
  .sum-panel strong {
    grid-column: auto;
  }

  .lane-step {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

/* Polished app-inspired activity board */
.activity-board {
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.88fr) minmax(0, 1.24fr);
  grid-template-rows: minmax(160px, 0.72fr) minmax(220px, 1fr) minmax(168px, 0.72fr);
  gap: clamp(16px, 2vw, 24px);
  min-height: clamp(640px, 62vw, 760px);
}

.activity-panel {
  border: 7px solid rgba(255, 255, 255, 0.94);
  border-radius: 32px;
  box-shadow: 0 12px 0 rgba(42, 101, 66, 0.2);
}

.activity-panel::before {
  left: 6%;
  right: 6%;
  top: 7%;
  height: 13%;
  background: rgba(255, 255, 255, 0.28);
}

.activity-panel::after {
  right: -6%;
  top: -13%;
  width: 36%;
  background: rgba(255, 255, 255, 0.18);
}

.panel-label {
  left: 18px;
  top: 16px;
  background: rgba(21, 110, 62, 0.9);
  box-shadow: inset 0 5px 0 rgba(255, 255, 255, 0.18);
}

.trace-panel {
  background: #fffdf8;
}

.trace-panel strong {
  transform: translateX(-3%);
  color: transparent;
  -webkit-text-stroke: clamp(12px, 1.8vw, 20px) rgba(220, 217, 209, 0.52);
  font-size: clamp(10rem, 21vw, 16rem);
}

.trace-stroke {
  z-index: 1;
  width: 46%;
  height: clamp(12px, 1.4vw, 18px);
  background: #62c6d8;
  border-radius: 999px;
}

.trace-stroke-one {
  transform: translate(-54px, -8px) rotate(90deg);
}

.trace-panel .trace-dot-one {
  left: 25%;
  top: 22%;
  width: clamp(34px, 4.2vw, 50px);
  background: #ff7caf;
}

.syllable-panel,
.count-panel {
  background: #ffd9e9;
}

.syllable-panel {
  gap: 12px;
  padding: clamp(18px, 2.2vw, 24px);
}

.syllable-panel span {
  min-height: 0;
  border-radius: 18px;
  background: #fffdf8;
  box-shadow: 0 7px 0 rgba(88, 60, 70, 0.16);
}

.mascot-panel {
  align-self: center;
  justify-self: center;
  width: 100%;
  min-height: 0;
}

.octopus-image {
  width: min(132%, 330px);
  transform: translateY(8px);
}

.hunt-panel {
  gap: clamp(8px, 1vw, 12px);
  padding: clamp(18px, 2.4vw, 26px);
  background: #fffdf8;
}

.hunt-panel span {
  border-radius: 12px;
  color: #292933;
}

.hunt-panel .hunt-found {
  background: #e2f5ea;
  color: #156e3e;
  box-shadow: 0 6px 0 rgba(31, 94, 61, 0.13);
}

.count-panel {
  grid-template-columns: 1fr auto;
  align-items: center;
  justify-items: center;
  padding: clamp(18px, 2.4vw, 26px);
}

.count-panel .panel-label {
  position: static;
  justify-self: start;
  grid-column: 1 / -1;
}

.count-objects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.count-objects i {
  width: clamp(26px, 3.4vw, 42px);
  background: #ffb74f;
}

.count-panel strong {
  font-size: clamp(3.6rem, 7vw, 5.6rem);
}

.sum-panel {
  background: #fffdf8;
  justify-content: center;
}

.sum-panel .sum-dots {
  color: #ffb74f;
}

.learning-map {
  background: linear-gradient(180deg, #f7fff4 0%, #fff2df 100%);
}

@media (max-width: 900px) {
  .activity-board {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    min-height: 0;
  }

  .trace-panel,
  .hunt-panel,
  .mascot-panel,
  .count-panel,
  .sum-panel,
  .syllable-panel {
    grid-column: auto;
    grid-row: auto;
    min-height: 240px;
  }

  .mascot-panel {
    min-height: 220px;
  }
}

/* Final polish pass: closer to the app screens */
.activity-panel {
  border-color: rgba(255, 255, 255, 0.96);
  border-width: 8px;
  border-radius: 38px;
  box-shadow: 0 13px 0 rgba(34, 92, 58, 0.22);
}

.activity-panel::before {
  top: 6%;
  height: 12%;
  opacity: 0.9;
}

.trace-panel {
  background: #fffdf8;
}

.trace-panel strong {
  transform: translateX(-2%);
  -webkit-text-stroke: clamp(13px, 1.65vw, 19px) rgba(218, 214, 205, 0.55);
}

.trace-stroke-one {
  transform: translate(-52px, -8px) rotate(90deg);
}

.trace-panel .trace-dot-one {
  box-shadow: 0 0 0 11px rgba(255, 124, 174, 0.28);
}

.syllable-panel,
.count-panel {
  background: #ffd7e7;
}

.syllable-panel span,
.sum-panel strong {
  background: #fffdf8;
}

.hunt-panel {
  background: #fffdf8;
  gap: clamp(8px, 0.9vw, 12px);
}

.hunt-panel span {
  font-size: clamp(1.3rem, 2.2vw, 2rem);
}

.hunt-panel .hunt-found {
  background: #dff3e9;
  box-shadow: 0 7px 0 rgba(29, 99, 58, 0.13);
}

.mascot-panel {
  overflow: hidden;
  border: 0;
  border-radius: 30px;
  background: radial-gradient(circle at 50% 35%, rgba(107, 214, 155, 0.65), rgba(107, 214, 155, 0) 62%);
}

.octopus-image {
  width: min(160%, 380px);
  transform: translateY(18%);
  clip-path: inset(0 0 18% 0 round 26px);
}

.count-panel {
  background: #ffe8a9;
}

.sum-panel {
  background: #fffdf8;
}

.learning-lanes {
  align-items: stretch;
}

.learning-lane {
  border: 8px solid rgba(255, 255, 255, 0.96);
  border-radius: 34px;
  box-shadow: 0 13px 0 rgba(34, 92, 58, 0.18);
  padding: clamp(18px, 2.4vw, 26px);
}

.language-lane,
.math-lane {
  transform: none;
}

.language-lane {
  background: #8bd6ff;
}

.math-lane {
  background: #ffe676;
}

.lane-title {
  background: #11131b;
  box-shadow: inset 0 5px 0 rgba(255, 255, 255, 0.14);
}

.lane-step {
  grid-template-columns: minmax(170px, 0.48fr) minmax(0, 1fr);
  gap: clamp(18px, 2.2vw, 28px);
  min-height: 92px;
  border: 4px solid #11131b;
  border-radius: 22px;
  padding: 16px 22px;
  background: #fffdf8;
}

.lane-step strong {
  min-width: 0;
  font-size: clamp(2.2rem, 3.8vw, 3.45rem);
  white-space: nowrap;
}

.lane-step span {
  color: rgba(41, 41, 51, 0.76);
  font-size: clamp(1.05rem, 1.35vw, 1.2rem);
}

@media (max-width: 900px) {
  .lane-step {
    grid-template-columns: minmax(140px, 0.45fr) minmax(0, 1fr);
  }
}

@media (max-width: 620px) {
  .lane-step {
    grid-template-columns: 1fr;
    gap: 8px;
    text-align: center;
  }
}

/* Alignment and finish pass */
.learning-world {
  background:
    radial-gradient(circle at 50% 0%, rgba(107, 214, 155, 0.18), rgba(107, 214, 155, 0) 32%),
    linear-gradient(180deg, #fff9ec 0%, #f7fff1 100%);
}

.learning-world-copy {
  margin-bottom: clamp(42px, 5vw, 70px);
}

.learning-world-copy h2,
.learning-map h2 {
  color: #151821;
  text-wrap: balance;
}

.learning-world-copy p:last-child,
.learning-map-inner > p:not(.section-kicker) {
  color: #4c4d56;
}

.activity-board {
  grid-template-columns: minmax(300px, 1.08fr) minmax(230px, 0.78fr) minmax(330px, 1.16fr);
  grid-template-rows: minmax(210px, auto) 270px 190px;
  gap: 22px;
  align-items: stretch;
}

.activity-panel {
  color: #292933;
  border: 9px solid #ffffff;
  border-radius: 36px;
  box-shadow: 0 14px 0 rgba(30, 93, 59, 0.22);
}

.trace-panel {
  padding: 34px;
}

.trace-panel strong {
  font-size: clamp(12rem, 18vw, 17rem);
  -webkit-text-stroke-color: rgba(222, 219, 210, 0.68);
}

.trace-stroke-one {
  left: 38%;
  top: 49%;
  width: 270px;
  transform: translate(-50%, -50%) rotate(90deg);
}

.trace-panel .trace-dot-one {
  left: 25%;
  top: 23%;
}

.syllable-panel {
  align-content: stretch;
  background: #ffd5e7;
}

.syllable-panel span {
  min-height: 58px;
  color: #292933;
}

.mascot-panel {
  background:
    radial-gradient(circle at 50% 30%, #72d79d 0%, #4fc485 45%, #20884e 100%);
  border: 0;
  border-radius: 28px;
  box-shadow: none;
}

.octopus-image {
  width: min(152%, 350px);
  transform: translateY(20%);
}

.hunt-panel {
  background: #fffdf8;
  grid-auto-rows: 1fr;
}

.hunt-panel span {
  min-width: 0;
  min-height: 0;
  color: #292933;
  font-size: clamp(1.45rem, 2.05vw, 2.15rem);
}

.hunt-panel .hunt-found {
  color: #13713c;
  background: #d9f3e6;
}

.count-panel {
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr auto;
  align-content: stretch;
  gap: 10px;
  background: #ffe5a3;
}

.count-objects {
  grid-template-columns: repeat(4, auto);
  justify-content: center;
}

.count-panel strong {
  font-size: clamp(4.2rem, 6vw, 6rem);
}

.sum-panel {
  grid-template-columns: auto auto auto auto auto;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 2.4vw, 30px);
  padding-inline: clamp(26px, 4vw, 52px);
}

.sum-panel span,
.sum-panel b {
  color: #292933;
}

.sum-panel .sum-dots {
  letter-spacing: 0.08em;
}

.learning-map {
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 213, 231, 0.35), rgba(255, 213, 231, 0) 35%),
    linear-gradient(180deg, #f7fff1 0%, #fff8ec 100%);
  color: #292933;
}

.learning-map-inner {
  width: min(1040px, 100%);
}

.learning-lanes {
  gap: 24px;
  align-items: start;
}

.learning-lane {
  gap: 22px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.lane-title {
  justify-self: start;
  margin-left: 18px;
  padding: 10px 16px;
  background: #167246;
  color: #ffffff;
}

.lane-step {
  position: relative;
  grid-template-columns: 120px 1fr;
  min-height: 190px;
  padding: 28px 30px;
  gap: 26px;
  overflow: hidden;
  border: 7px solid #ffffff;
  border-radius: 34px;
  background: #ffd8e8;
  box-shadow: 0 13px 0 rgba(34, 92, 58, 0.18);
}

.math-lane .lane-step {
  background: #ffe7a6;
}

.language-lane .lane-step:nth-of-type(4),
.math-lane .lane-step:nth-of-type(3) {
  background: #d8f5e5;
}

.lane-step::before {
  content: "";
  position: absolute;
  left: 26px;
  top: 26px;
  width: 104px;
  aspect-ratio: 1;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow:
    inset 0 0 0 7px rgba(255, 255, 255, 0.48),
    0 7px 0 rgba(65, 87, 66, 0.12);
}

.lane-step::after {
  content: "";
  position: absolute;
  right: -44px;
  top: -52px;
  width: 170px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
}

.lane-step strong,
.lane-step span {
  position: relative;
  z-index: 1;
}

.lane-step strong {
  display: grid;
  place-items: center;
  min-width: 104px;
  min-height: 104px;
  font-size: clamp(2.4rem, 4.2vw, 4rem);
  color: #273238;
}

.lane-step span {
  align-self: center;
  color: #5b524f;
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  font-weight: 900;
}

@media (max-width: 900px) {
  .activity-board {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .activity-panel {
    min-height: 260px;
  }

  .learning-lanes {
    grid-template-columns: 1fr;
  }
}

/* Section 3 correction: keep split layout, restore simpler example cards */
.learning-map {
  padding-top: clamp(92px, 10vw, 150px);
  padding-bottom: clamp(112px, 12vw, 170px);
  background: linear-gradient(180deg, #fff2df 0%, #fff8ea 24%, #f8fff2 70%, #fff2df 100%);
}

.learning-map-inner {
  width: min(1180px, 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(42px, 6vw, 86px);
  text-align: left;
}

.learning-map-copy {
  flex: 0 1 430px;
}

.learning-lanes {
  flex: 1 1 620px;
  width: auto;
  margin: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(22px, 3vw, 36px);
}

.language-lane {
  background: #88d5ff;
}

.math-lane {
  background: #ffe56f;
}

.learning-lane .lane-title {
  background: #11131b;
  color: #ffffff;
}

.language-lane .lane-step,
.math-lane .lane-step,
.language-lane .lane-step:nth-of-type(2),
.language-lane .lane-step:nth-of-type(3),
.language-lane .lane-step:nth-of-type(4),
.math-lane .lane-step:nth-of-type(2),
.math-lane .lane-step:nth-of-type(3),
.math-lane .lane-step:nth-of-type(4) {
  background: #fffaf2;
}

@media (max-width: 980px) {
  .learning-map-inner {
    display: grid;
    text-align: center;
  }

  .learning-map-copy {
    justify-self: center;
  }

  .learning-lanes {
    width: min(760px, 100%);
    margin-inline: auto;
  }
}

@media (max-width: 620px) {
  .learning-lanes {
    grid-template-columns: 1fr;
  }
}

/* Requested section 3 layout: title above, two example cards below */
.learning-map-inner {
  display: block;
  width: min(1120px, 100%);
  text-align: center;
}

.learning-map-copy {
  max-width: 760px;
  margin: 0 auto;
}

.learning-map-copy .section-kicker,
.learning-map-copy h2 {
  margin-left: auto;
  margin-right: auto;
}

.learning-map-copy h2 {
  max-width: 760px;
}

.learning-lanes {
  width: min(1060px, 100%);
  margin: clamp(32px, 5vw, 58px) auto 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(22px, 3vw, 36px);
}

/* Match count and math dots with the same crisp glossy finish */
.count-objects i,
.sum-dots i {
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0) 30%),
    #ffad3f;
  box-shadow:
    inset 0 4px 0 rgba(255, 255, 255, 0.24),
    0 5px 0 rgba(112, 76, 22, 0.16);
}

.count-objects i {
  animation: none;
  transform: none;
}

@media (max-width: 760px) {
  .learning-lanes {
    grid-template-columns: 1fr;
  }
}

/* No divider between section 3 and footer */
.learning-map,
.site-footer {
  background: #fff8f0;
}

.learning-map::after {
  content: none;
}

.second-section.learning-map,
.second-section.learning-map + .site-footer {
  background: #fff8f0;
}

.second-section.learning-map::after {
  content: none;
  display: none;
}

@media (max-width: 620px) {
  .activity-panel {
    border-width: 7px;
    border-radius: 28px;
  }

  .sum-panel {
    grid-template-columns: auto auto auto;
  }

  .lane-step {
    grid-template-columns: 92px 1fr;
    min-height: 150px;
    padding: 22px;
    gap: 18px;
    text-align: left;
  }

  .lane-step::before,
  .lane-step strong {
    width: 82px;
    min-width: 82px;
    min-height: 82px;
  }

  .lane-step strong {
    font-size: clamp(2rem, 10vw, 3.1rem);
  }
}

/* Third section reset: app menu cards */
.learning-map {
  background:
    radial-gradient(circle at 50% 0%, rgba(107, 214, 155, 0.16), rgba(107, 214, 155, 0) 34%),
    linear-gradient(180deg, #f8fff2 0%, #fff7ea 100%);
}

.learning-map-inner {
  width: min(1120px, 100%);
}

.learning-lanes {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 34px);
  align-items: start;
  margin-top: clamp(28px, 4vw, 48px);
}

.learning-lane {
  display: grid;
  gap: 18px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.lane-title {
  justify-self: start;
  margin: 0 0 -2px 18px;
  padding: 9px 15px;
  border-radius: 999px;
  background: #167246;
  color: #ffffff;
  font-size: 0.95rem;
  line-height: 1;
  box-shadow: inset 0 5px 0 rgba(255, 255, 255, 0.16), 0 5px 0 rgba(23, 100, 61, 0.18);
}

.lane-step {
  position: relative;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  min-height: 154px;
  padding: 24px 30px;
  overflow: hidden;
  border: 7px solid #ffffff;
  border-radius: 34px;
  background: #ffd7e7;
  box-shadow: 0 12px 0 rgba(34, 92, 58, 0.18);
  text-align: left;
}

.math-lane .lane-step {
  background: #ffe6a6;
}

.language-lane .lane-step:nth-of-type(4) {
  background: #d9f5e5;
}

.math-lane .lane-step:nth-of-type(3) {
  background: #d9f5e5;
}

.lane-step::before {
  content: "";
  position: absolute;
  left: 24px;
  top: 50%;
  width: 96px;
  aspect-ratio: 1;
  transform: translateY(-50%);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow:
    inset 0 0 0 7px rgba(255, 255, 255, 0.46),
    0 7px 0 rgba(65, 87, 66, 0.11);
}

.lane-step::after {
  content: "";
  position: absolute;
  right: -46px;
  top: -58px;
  width: 178px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
}

.lane-step strong {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 96px;
  min-width: 96px;
  min-height: 96px;
  color: #263238;
  font-size: clamp(2.35rem, 3.4vw, 3.6rem);
  line-height: 0.9;
  white-space: nowrap;
}

.lane-step span {
  position: relative;
  z-index: 1;
  align-self: center;
  color: #5a5250;
  font-size: clamp(1.3rem, 1.7vw, 1.65rem);
  font-weight: 900;
  line-height: 1.1;
}

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

@media (max-width: 620px) {
  .lane-step {
    grid-template-columns: 88px minmax(0, 1fr);
    min-height: 132px;
    gap: 16px;
    padding: 20px;
    border-radius: 28px;
  }

  .lane-step::before,
  .lane-step strong {
    width: 78px;
    min-width: 78px;
    min-height: 78px;
  }

  .lane-step strong {
    font-size: clamp(1.85rem, 8vw, 2.7rem);
  }

  .lane-step span {
    font-size: clamp(1.05rem, 5vw, 1.35rem);
  }
}

/* Third section lighter pass */
.learning-map {
  background: linear-gradient(180deg, #f8fff2 0%, #fff7ea 100%);
}

.learning-lanes {
  width: min(980px, 100%);
  margin-inline: auto;
  gap: clamp(18px, 2.4vw, 28px);
}

.learning-lane {
  gap: 12px;
}

.lane-title {
  margin-left: 12px;
}

.lane-step {
  grid-template-columns: minmax(82px, 0.26fr) minmax(0, 1fr);
  min-height: 92px;
  padding: 16px 20px;
  gap: 18px;
  border: 3px solid rgba(255, 255, 255, 0.96);
  border-radius: 24px;
  box-shadow: 0 8px 0 rgba(34, 92, 58, 0.12);
}

.lane-step::before {
  display: none;
}

.lane-step::after {
  right: -64px;
  top: -74px;
  width: 150px;
  opacity: 0.8;
}

.lane-step strong {
  width: auto;
  min-width: 0;
  min-height: 0;
  justify-content: start;
  font-size: clamp(2rem, 3vw, 3.1rem);
}

.lane-step span {
  font-size: clamp(1.05rem, 1.4vw, 1.28rem);
}

@media (max-width: 620px) {
  .lane-step {
    grid-template-columns: minmax(72px, 0.32fr) minmax(0, 1fr);
    min-height: 82px;
    padding: 14px 16px;
  }

  .lane-step strong {
    width: auto;
    min-width: 0;
    min-height: 0;
    font-size: clamp(1.8rem, 8vw, 2.5rem);
  }
}

/* Third section grouped lists */
.learning-lane {
  gap: 14px;
  padding: clamp(16px, 2.2vw, 24px);
  border: 7px solid rgba(255, 255, 255, 0.96);
  border-radius: 34px;
  box-shadow: 0 12px 0 rgba(34, 92, 58, 0.14);
}

.language-lane {
  background: #88d5ff;
}

.math-lane {
  background: #ffe56f;
}

.lane-title {
  margin: 0 0 2px;
  background: #11131b;
  box-shadow: inset 0 5px 0 rgba(255, 255, 255, 0.13);
}

.lane-step {
  min-height: 88px;
  border: 3px solid #11131b;
  border-radius: 20px;
  background: #fffaf2;
  box-shadow: none;
}

.math-lane .lane-step,
.language-lane .lane-step:nth-of-type(4),
.math-lane .lane-step:nth-of-type(3) {
  background: #fffaf2;
}

.lane-step::after {
  display: none;
}

@media (max-width: 620px) {
  .learning-lane {
    border-width: 5px;
    border-radius: 26px;
    padding: 14px;
  }

  .lane-step {
    min-height: 78px;
    border-width: 2px;
    border-radius: 18px;
  }
}

/* Third section visual refinement and footer transition */
.learning-map {
  padding-bottom: clamp(92px, 10vw, 150px);
  background:
    radial-gradient(circle at 50% 8%, rgba(107, 214, 155, 0.14), rgba(107, 214, 155, 0) 34%),
    linear-gradient(180deg, #f8fff2 0%, #fff7ea 58%, #fff2df 100%);
}

.learning-map::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: clamp(60px, 8vw, 120px);
  background: linear-gradient(180deg, rgba(255, 242, 223, 0), #fff2df 72%);
  pointer-events: none;
}

.learning-lanes {
  width: min(1060px, 100%);
  gap: clamp(22px, 3vw, 36px);
}

.learning-lane {
  position: relative;
  overflow: hidden;
  gap: 16px;
  padding: clamp(18px, 2.2vw, 26px);
  border: 8px solid rgba(255, 255, 255, 0.98);
  border-radius: 32px;
  box-shadow: 0 14px 0 rgba(34, 92, 58, 0.16);
}

.learning-lane::before {
  content: "";
  position: absolute;
  left: 5%;
  right: 5%;
  top: 6%;
  height: 46px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  pointer-events: none;
}

.learning-lane::after {
  content: "";
  position: absolute;
  right: -42px;
  top: -48px;
  width: 170px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  pointer-events: none;
}

.language-lane {
  background: #83d0fa;
}

.math-lane {
  background: #ffe370;
}

.lane-title {
  position: relative;
  z-index: 1;
  margin-bottom: 4px;
  padding: 10px 16px;
  color: #ffffff;
  background: #11131b;
  font-size: 0.96rem;
  box-shadow: inset 0 5px 0 rgba(255, 255, 255, 0.14);
}

.lane-step {
  position: relative;
  z-index: 1;
  grid-template-columns: minmax(120px, 0.34fr) minmax(0, 1fr);
  min-height: 104px;
  padding: 18px 22px;
  border: 3px solid rgba(17, 19, 27, 0.92);
  border-radius: 20px;
  background: #fffaf1;
  box-shadow: 0 5px 0 rgba(36, 46, 38, 0.08);
}

.lane-step strong {
  color: #11131b;
  font-size: clamp(2.1rem, 3.2vw, 3.35rem);
}

.lane-step span {
  color: #56545a;
  font-size: clamp(1.05rem, 1.45vw, 1.32rem);
}

.site-footer {
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0) 34%),
    #fff2df;
}

@media (max-width: 900px) {
  .learning-map {
    padding-bottom: 96px;
  }

  .learning-lane {
    border-radius: 30px;
  }
}

@media (max-width: 620px) {
  .learning-lane {
    gap: 12px;
    border-width: 6px;
    border-radius: 26px;
    padding: 14px;
  }

  .lane-step {
    grid-template-columns: minmax(78px, 0.34fr) minmax(0, 1fr);
    min-height: 82px;
    padding: 13px 15px;
    border-radius: 17px;
  }

  .lane-step strong {
    font-size: clamp(1.75rem, 7.2vw, 2.45rem);
  }

  .lane-step span {
    font-size: clamp(1rem, 4.6vw, 1.22rem);
  }
}

/* Activity motion */
.trace-panel {
  isolation: isolate;
}

.trace-panel strong {
  position: relative;
  z-index: 1;
}

.trace-stroke {
  display: none;
}

.trace-draw {
  position: absolute;
  inset: 12% 15% 10% 12%;
  width: 73%;
  height: 78%;
  z-index: 2;
  overflow: visible;
  pointer-events: none;
}

.trace-draw-path {
  fill: none;
  stroke: #62c6d8;
  stroke-width: 15;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 4px 0 rgba(30, 117, 132, 0.12));
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.trace-draw-path-main {
  animation: draw-trace-line 4.8s cubic-bezier(.68, 0, .24, 1) infinite;
}

.trace-draw-path-top {
  animation: draw-trace-line 4.8s cubic-bezier(.68, 0, .24, 1) infinite;
  animation-delay: 1.05s;
}

.trace-draw-path-bottom {
  animation: draw-trace-line 4.8s cubic-bezier(.68, 0, .24, 1) infinite;
  animation-delay: 2.15s;
}

.trace-runner {
  fill: #ff7caf;
  filter: drop-shadow(0 0 0 rgba(255, 124, 175, 0.3)) drop-shadow(0 5px 0 rgba(124, 60, 83, 0.12));
}

.trace-panel .trace-dot-one {
  display: none;
}

.syllable-panel span {
  animation: soft-tile-pop 4.6s ease-in-out infinite;
}

.syllable-panel span:nth-child(2) {
  animation-delay: 0.16s;
}

.syllable-panel span:nth-child(3) {
  animation-delay: 0.32s;
}

.syllable-panel span:nth-child(4) {
  animation-delay: 0.48s;
}

.hunt-panel .hunt-found {
  animation: found-letter-pulse 3.8s ease-in-out infinite;
}

.hunt-panel .hunt-found:nth-child(2n) {
  animation-delay: 0.2s;
}

.hunt-panel .hunt-found:nth-child(3n) {
  animation-delay: 0.4s;
}

.count-objects i {
  animation: count-dot-bounce 3.6s ease-in-out infinite;
}

.count-objects i:nth-child(2) {
  animation-delay: 0.12s;
}

.count-objects i:nth-child(3) {
  animation-delay: 0.24s;
}

.count-objects i:nth-child(4) {
  animation-delay: 0.36s;
}

.sum-panel strong {
  animation: answer-pop 4.2s ease-in-out infinite;
}

@keyframes draw-trace-line {
  0%,
  11% {
    stroke-dashoffset: 1;
    opacity: 0;
    transform: translate(0, 0);
  }
  16% {
    opacity: 1;
  }
  48%,
  76% {
    stroke-dashoffset: 0;
    opacity: 1;
    transform: translate(1px, -1px);
  }
  92%,
  100% {
    stroke-dashoffset: 0;
    opacity: 0;
    transform: translate(0, 0);
  }
}

@keyframes trace-dot-guide {
  0%,
  8%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  18% {
    transform: translate(0, 5px) scale(1.08);
  }
  46% {
    transform: translate(0, 126px) scale(0.96);
  }
  58% {
    transform: translate(56px, 80px) scale(1.04);
  }
  78% {
    transform: translate(70px, 164px) scale(1);
  }
  90% {
    transform: translate(0, 0) scale(1);
  }
}

@keyframes soft-tile-pop {
  0%,
  72%,
  100% {
    transform: translateY(0);
  }
  78% {
    transform: translateY(-5px);
  }
  86% {
    transform: translateY(1px);
  }
}

@keyframes found-letter-pulse {
  0%,
  70%,
  100% {
    transform: translateY(0);
    box-shadow: 0 7px 0 rgba(29, 99, 58, 0.13);
  }
  78% {
    transform: translateY(-4px);
    box-shadow: 0 11px 0 rgba(29, 99, 58, 0.1);
  }
}

@keyframes count-dot-bounce {
  0%,
  68%,
  100% {
    transform: translateY(0) scale(1);
  }
  76% {
    transform: translateY(-7px) scale(1.03);
  }
  84% {
    transform: translateY(1px) scale(0.98);
  }
}

@keyframes answer-pop {
  0%,
  68%,
  100% {
    transform: scale(1) rotate(0deg);
  }
  76% {
    transform: scale(1.08) rotate(-1deg);
  }
  84% {
    transform: scale(0.98) rotate(1deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .trace-draw-path,
  .trace-runner,
  .trace-panel .trace-dot-one,
  .syllable-panel span,
  .hunt-panel .hunt-found,
  .count-objects i,
  .sum-panel strong {
    animation: none;
  }

  .trace-draw-path {
    stroke-dashoffset: 0;
    opacity: 1;
  }

  .trace-runner {
    opacity: 0 !important;
  }
}

/* Word-search activity: app-like found words */
.hunt-panel {
  grid-template-rows: minmax(0, 1fr) auto;
  align-content: stretch;
  gap: 14px;
  padding: clamp(18px, 2.2vw, 24px);
  background: #fffdf8;
}

.hunt-grid-mini {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-template-rows: repeat(7, minmax(0, 1fr));
  width: 100%;
  height: 100%;
  min-height: 0;
  gap: 6px;
}

.hunt-grid-mini span {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  border-radius: 16px;
  color: #292933;
  background: transparent;
  font-family: var(--title-font);
  font-size: clamp(1.15rem, 2vw, 1.9rem);
  font-weight: 900;
  line-height: 1;
  box-shadow: none;
}

.hunt-grid-mini .hunt-word {
  color: #ffffff;
  animation: word-found-cell 5.8s ease-in-out infinite;
  animation-delay: var(--find-delay, 0s);
}

.hunt-word-green {
  --found-color: #5dcc68;
  --find-delay: 0.35s;
}

.hunt-word-pink {
  --found-color: #e94b9a;
  --find-delay: 1.65s;
}

.hunt-word-blue {
  --found-color: #58b7ef;
  --find-delay: 2.9s;
}

.hunt-word:not(.hunt-start):not(.hunt-end) {
  border-radius: 4px;
}

.hunt-word-green.hunt-start {
  border-radius: 16px 4px 4px 16px;
}

.hunt-word-green.hunt-end {
  border-radius: 4px 16px 16px 4px;
}

.hunt-word-pink.hunt-start,
.hunt-word-blue.hunt-start {
  border-radius: 16px 16px 4px 4px;
}

.hunt-word-pink.hunt-end,
.hunt-word-blue.hunt-end {
  border-radius: 4px 4px 16px 16px;
}

.hunt-word-list {
  display: flex;
  justify-content: center;
  gap: 8px;
  min-width: 0;
}

.hunt-chip {
  position: relative;
  display: inline-grid;
  place-items: center;
  min-width: 0;
  padding: 8px 11px;
  border: 3px solid #ffffff;
  border-radius: 999px;
  color: #ffffff;
  font-family: var(--title-font);
  font-size: clamp(0.78rem, 1.1vw, 1rem);
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 5px 0 rgba(34, 92, 58, 0.18);
  animation: word-chip-found 5.8s ease-in-out infinite;
  animation-delay: var(--find-delay, 0s);
}

.hunt-chip::after {
  content: "";
  position: absolute;
  left: 15%;
  right: 15%;
  top: 50%;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-50%) scaleX(0);
  transform-origin: left center;
  animation: word-chip-strike 5.8s ease-in-out infinite;
  animation-delay: var(--find-delay, 0s);
}

.hunt-chip-green {
  --find-delay: 0.35s;
  background: #5dcc68;
}

.hunt-chip-pink {
  --find-delay: 1.65s;
  background: #e94b9a;
}

.hunt-chip-blue {
  --find-delay: 2.9s;
  background: #58b7ef;
}

@keyframes word-found-cell {
  0%,
  8% {
    color: #292933;
    background: transparent;
    transform: scale(1);
    box-shadow: none;
  }
  15% {
    color: #ffffff;
    background: var(--found-color);
    transform: scale(1.08);
    box-shadow: 0 7px 0 rgba(34, 92, 58, 0.12);
  }
  23%,
  82% {
    color: #ffffff;
    background: var(--found-color);
    transform: scale(1);
    box-shadow: 0 5px 0 rgba(34, 92, 58, 0.12);
  }
  92%,
  100% {
    color: #292933;
    background: transparent;
    transform: scale(1);
    box-shadow: none;
  }
}

@keyframes word-chip-found {
  0%,
  8% {
    transform: translateY(0);
  }
  15% {
    transform: translateY(-4px);
  }
  25%,
  82% {
    transform: translateY(0);
  }
}

@keyframes word-chip-strike {
  0%,
  12% {
    transform: translateY(-50%) scaleX(0);
  }
  24%,
  82% {
    transform: translateY(-50%) scaleX(1);
  }
  92%,
  100% {
    transform: translateY(-50%) scaleX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hunt-grid-mini .hunt-word,
  .hunt-chip,
  .hunt-chip::after {
    animation: none;
  }

  .hunt-grid-mini .hunt-word {
    color: #ffffff;
    background: var(--found-color);
  }

  .hunt-chip::after {
    transform: translateY(-50%) scaleX(1);
  }
}

/* Activity cards richer finish */
.syllable-panel {
  background:
    radial-gradient(circle at 86% -12%, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0) 34%),
    linear-gradient(180deg, #ffd4e8 0%, #f8b9dc 100%);
}

.syllable-panel span {
  border: 4px solid rgba(255, 255, 255, 0.88);
  background:
    linear-gradient(180deg, #fffdf8 0%, #fff6ee 100%);
  box-shadow:
    0 8px 0 rgba(120, 61, 91, 0.16),
    inset 0 5px 0 rgba(255, 255, 255, 0.72);
}

.hunt-panel {
  border-color: #ffffff;
  background:
    radial-gradient(circle at 88% -10%, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0) 32%),
    #fffdf8;
}

.count-panel {
  overflow: hidden;
  grid-template-columns: 1fr;
  grid-template-rows: auto minmax(36px, 0.9fr) minmax(58px, auto);
  justify-items: center;
  align-items: center;
  gap: 4px;
  padding: 24px 24px 18px;
  background:
    radial-gradient(circle at 86% 12%, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 28%),
    linear-gradient(180deg, #ffeab0 0%, #ffd36f 100%);
}

.count-panel::after {
  content: "";
  position: absolute;
  right: -22px;
  top: -26px;
  width: 120px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.count-panel .panel-label {
  position: relative;
  z-index: 2;
  margin-right: auto;
}

.count-objects {
  position: relative;
  z-index: 1;
  grid-template-columns: repeat(4, auto);
  gap: 10px;
  align-self: end;
}

.count-objects i {
  width: clamp(28px, 3.4vw, 42px);
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.46), rgba(255, 255, 255, 0) 28%),
    #ffad3f;
}

.count-panel strong {
  position: relative;
  z-index: 1;
  align-self: start;
  margin-top: -4px;
  color: #292933;
  font-size: clamp(3.2rem, 5.8vw, 5rem);
  line-height: 0.82;
}

.sum-panel {
  overflow: hidden;
  background:
    radial-gradient(circle at 8% 18%, rgba(88, 183, 239, 0.14), rgba(88, 183, 239, 0) 25%),
    radial-gradient(circle at 92% 80%, rgba(255, 124, 175, 0.14), rgba(255, 124, 175, 0) 28%),
    linear-gradient(180deg, #fffdf8 0%, #fff7ec 100%);
}

.sum-panel::before {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  top: 20px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
}

.sum-panel .sum-dots {
  display: inline-flex;
  gap: 7px;
  align-items: center;
}

.sum-panel .sum-dots i {
  display: block;
  width: clamp(30px, 3.2vw, 46px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0) 28%),
    #ffad3f;
  box-shadow: 0 6px 0 rgba(132, 82, 26, 0.13);
}

.sum-panel b {
  color: #292933;
  text-shadow: 0 3px 0 rgba(41, 41, 51, 0.08);
}

.sum-panel strong {
  border: 6px solid rgba(255, 255, 255, 0.78);
  background:
    linear-gradient(180deg, #ffffff 0%, #fffaf3 100%);
  box-shadow:
    0 8px 0 rgba(34, 92, 58, 0.14),
    inset 0 5px 0 rgba(255, 255, 255, 0.8);
}

@media (max-width: 900px) {
  .count-panel {
    min-height: 220px;
  }
}

/* ════════════════════════════════════════════════════════
   Fix & polish pass — sessão 2 (activity board)
   ════════════════════════════════════════════════════════ */

/* 1. Fix caça-palavras (hunt-panel):
   A regra ~linha 3343 definia grid-template-columns: repeat(5, 1fr) para
   colocar <span>s diretamente. Agora os filhos são .hunt-grid-mini e
   .hunt-word-list; precisamos resetar para coluna única e esticar. */
.hunt-panel {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr auto;
  place-items: stretch;
  align-content: stretch;
  gap: clamp(10px, 1.2vw, 16px);
  padding: clamp(16px, 2vw, 22px);
}

/* Garante que o grid interno usa toda a altura disponível */
.hunt-grid-mini {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.hunt-word-list {
  width: 100%;
}

/* 2. Fix count-panel — o número "4" estava sendo cortado por overflow:hidden.
   Reduzimos padding + font e usamos grid-template-rows flexível. */
.count-panel {
  padding: 16px 18px 12px;
  gap: 6px;
  grid-template-rows: auto 1fr auto;
}

.count-panel strong {
  font-size: clamp(2.2rem, 3.8vw, 3.2rem);
  margin-top: 0;
  line-height: 0.88;
  align-self: end;
}

.count-objects i {
  width: clamp(20px, 2.6vw, 30px);
}

/* 3. Mascote pinti-lapis.png: card sem fundo, sem borda, sem sombra —
   só a imagem, vazando para os paineis adjacentes */
.mascot-panel {
  overflow: visible;
  z-index: 2;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.mascot-panel::before,
.mascot-panel::after {
  content: none;
}

.octopus-image {
  width: min(190%, 480px);
  transform: translateX(-4%) translateY(4%);
  position: relative;
  z-index: 3;
  clip-path: none;
  filter: drop-shadow(0 30px 24px rgba(14, 82, 49, 0.24));
}

/* 4. Sombras neutras nos paineis de atividade (era verde-escuro, agora neutro) */
.activity-panel {
  box-shadow: 0 13px 0 rgba(17, 19, 27, 0.12);
}

/* Mascote não tem sombra — precisa vir APÓS a regra activity-panel acima */
.mascot-panel {
  box-shadow: none;
}

/* 5. Transições suaves entre seções — sem corte seco de cor */
.photo-section.learning-world {
  background:
    radial-gradient(circle at 50% 0%, rgba(107, 214, 155, 0.14), rgba(107, 214, 155, 0) 30%),
    linear-gradient(180deg, #fff2df 0%, #f6fff2 100%);
}

.second-section.learning-map {
  background:
    radial-gradient(circle at 50% 6%, rgba(107, 214, 155, 0.11), rgba(107, 214, 155, 0) 32%),
    linear-gradient(180deg, #f6fff2 0%, #fff8ea 52%, #fff2df 100%);
}

@media (max-width: 900px) {
  .hunt-panel {
    grid-template-rows: 1fr auto;
  }
}

@media (max-width: 620px) {
  .count-panel strong {
    font-size: clamp(2rem, 8.5vw, 2.8rem);
  }

  .count-objects i {
    width: clamp(16px, 3.8vw, 24px);
  }

  .octopus-image {
    width: min(172%, 360px);
  }

  .hunt-panel {
    min-height: 0;
    grid-template-rows: auto auto;
  }

  .hunt-grid-mini {
    height: auto;
    grid-template-rows: repeat(7, auto);
  }

  .hunt-grid-mini span {
    aspect-ratio: 1;
    height: auto;
  }

  .count-panel {
    grid-template-rows: auto auto auto;
    align-content: center;
    justify-items: center;
    gap: 16px;
    padding: 18px 18px 22px;
  }

  .count-objects {
    gap: 10px;
  }

  .count-objects i {
    width: clamp(30px, 8vw, 42px);
  }

  .count-panel strong {
    display: grid;
    place-items: center;
    align-self: center;
    width: clamp(68px, 10vw, 110px);
    aspect-ratio: 1;
    margin-top: 0;
    padding: 0;
    border-radius: 22px;
    background: #fffdf8;
    box-shadow: 0 8px 0 rgba(150, 100, 20, 0.16);
    font-size: clamp(3rem, 6vw, 5rem);
    line-height: 1;
  }
}

/* ════════════════════════════════════════════════════════
   Fix pass 2 — sílabas, count vertical center, badges
   ════════════════════════════════════════════════════════ */

/* 6. Sílabas: remove min-height para tiles caberem no painel de 180px */
.syllable-panel span {
  min-height: 0;
}
.syllable-panel {
  padding: 14px;
  gap: 10px;
}

/* 7. Count panel: flex column centrado; label volta a ser absolute */
.count-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  gap: 10px;
}
.count-panel .panel-label {
  position: absolute;
  left: 18px;
  top: 16px;
  margin: 0;
}
.count-objects {
  align-self: auto;
}
.count-panel strong {
  font-size: clamp(2.2rem, 3.8vw, 3.2rem);
  line-height: 1;
  margin-top: 0;
  align-self: auto;
}

/* 8. Hunt panel: padding-top para o badge PALAVRAS não sobrepor o grid */
.hunt-panel {
  padding-top: clamp(44px, 5vw, 50px);
}

/* 9. Sum panel: padding-top para o badge MATEMÁTICA */
.sum-panel {
  padding-top: clamp(44px, 5.5vw, 52px);
}

/* 10. Badges nos novos painéis: regras span/b dos painéis tinham precedência
   de source-order sobre .panel-label — dois seletores de classe vencem. */
.hunt-panel .panel-label,
.syllable-panel .panel-label,
.sum-panel .panel-label {
  display: inline-block;
  width: auto;
  height: auto;
  min-height: 0;
  background: rgba(18, 106, 58, 0.9);
  color: #ffffff;
  font-size: 0.78rem;
  font-family: inherit;
  font-weight: 900;
}

@media (max-width: 620px) {
  .syllable-panel { padding-top: 40px; padding-left: 10px; padding-right: 10px; padding-bottom: 10px; gap: 8px; }
  .hunt-panel { padding-top: 40px; }
  .sum-panel { padding-top: 40px; }
}

/* ════════════════════════════════════════════════════════
   Fix pass 3 — bg único, badge sílabas sem sobreposição
   ════════════════════════════════════════════════════════ */

/* Mesmo bg quente em todas as seções abaixo do hero */
.photo-section,
.second-section,
.learning-world,
.site-footer {
  background: #fff8f0;
}
.photo-section.learning-world,
.second-section.learning-map {
  background: #fff8f0;
}

/* Syllable panel: espaço suficiente acima para o badge SÍLABAS */
.syllable-panel {
  padding-top: 46px;
  padding-left: 12px;
  padding-right: 12px;
  padding-bottom: 12px;
  gap: 10px;
}
.syllable-panel span {
  font-size: clamp(1.5rem, 3.2vw, 2.6rem);
  min-height: 0;
}

@media (max-width: 620px) {
  .syllable-panel { padding-top: 42px; }
}

/* ════════════════════════════════════════════════════════
   Fix pass 4 — sílabas, math, divisória, inclination, cascade
   ════════════════════════════════════════════════════════ */

/* Body bg alinhado com as seções → sem linha divisória */
html, body { background: #fff8f0; }

/* Syllable panel: badge no fluxo do grid, padding igual em cima e embaixo */
.syllable-panel .panel-label {
  position: static;
  grid-column: 1 / -1;
  justify-self: start;
  left: auto;
  top: auto;
}
.syllable-panel {
  padding: 12px;
  gap: 10px;
  min-height: clamp(204px, 16vw, 224px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: auto repeat(2, minmax(clamp(54px, 4.8vw, 66px), 1fr));
  align-content: stretch;
}
.syllable-panel span {
  min-height: clamp(54px, 4.8vw, 66px);
  height: auto;
  padding: 4px 8px 6px;
  font-size: clamp(1.45rem, 2.6vw, 2.25rem);
  line-height: 0.92;
  overflow: visible;
}

.syllable-panel span:nth-of-type(4) {
  animation-delay: 0.64s;
}

/* Sum panel: equação verticalmente centrada (padding igual + align-content) */
.sum-panel {
  padding: 20px;
  align-content: center;
}

/* Learning lanes: cards levemente inclinados */
.language-lane {
  transform: rotate(-1.8deg);
}
.math-lane {
  transform: rotate(1.8deg);
}

/* Cascade animation para os lane-steps */
@keyframes lane-step-in {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}
.language-lane .lane-step:nth-child(2) { --cs: 0s;     }
.language-lane .lane-step:nth-child(3) { --cs: 0.13s;  }
.language-lane .lane-step:nth-child(4) { --cs: 0.26s;  }
.math-lane     .lane-step:nth-child(2) { --cs: 0.07s;  }
.math-lane     .lane-step:nth-child(3) { --cs: 0.20s;  }
.math-lane     .lane-step:nth-child(4) { --cs: 0.33s;  }
.learning-lanes.in-view .lane-step {
  animation: lane-step-in 0.42s ease-out calc(var(--cs, 0s)) both;
}

/* Contagem dots substituídos por <i> */
.lane-count-dots {
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
}
.lane-count-dots i {
  display: block;
  width: clamp(16px, 1.7vw, 22px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* Final layout/color pass: varied activity badges and split learning map */
.panel-label,
.hunt-panel .panel-label,
.syllable-panel .panel-label,
.sum-panel .panel-label,
.count-panel .panel-label {
  display: inline-block;
  width: auto;
  height: auto;
  min-height: 0;
  padding: 8px 12px;
  border: 3px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  color: #ffffff;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
  box-shadow:
    inset 0 4px 0 rgba(255, 255, 255, 0.16),
    0 5px 0 rgba(34, 92, 58, 0.14);
}

.trace-panel .panel-label {
  background: #2f8c62;
}

.syllable-panel .panel-label {
  background: #d94291;
}

.hunt-panel .panel-label {
  position: absolute;
  left: 18px;
  top: 16px;
  background: #4e9fe5;
}

.count-panel .panel-label {
  background: #f0a12f;
}

.sum-panel .panel-label {
  background: #7657d9;
}

.trace-panel {
  background: #e9fbff;
}

.syllable-panel {
  background: linear-gradient(180deg, #ffd4e8 0%, #f8b9dc 100%);
}

.hunt-panel {
  padding-top: clamp(52px, 5vw, 58px);
  background: #fffdf8;
}

.count-panel {
  background: linear-gradient(180deg, #ffe8a8 0%, #ffd36f 100%);
}

.count-objects i {
  background: #ffad3f;
  box-shadow: 0 5px 0 rgba(112, 76, 22, 0.18);
  animation: none;
  transform: none;
}

.sum-panel {
  background: linear-gradient(180deg, #eee7ff 0%, #fff7ef 100%);
}

.activity-panel::before,
.activity-panel::after,
.learning-lane::before,
.learning-lane::after {
  content: none;
}

.hunt-chip {
  border-color: rgba(255, 255, 255, 0.9);
}

.learning-map {
  padding-top: clamp(92px, 10vw, 150px);
  padding-bottom: clamp(112px, 12vw, 170px);
  background:
    radial-gradient(circle at 14% 16%, rgba(255, 213, 231, 0.28), rgba(255, 213, 231, 0) 30%),
    linear-gradient(180deg, #fff2df 0%, #fff8ea 18%, #f7fff1 64%, #fff2df 100%);
}

.learning-map::after {
  height: clamp(96px, 11vw, 150px);
  background: linear-gradient(180deg, rgba(255, 242, 223, 0), #fff2df 78%);
}

.learning-map-inner {
  width: min(1180px, 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(42px, 6vw, 86px);
  text-align: left;
}

.learning-map-copy {
  flex: 0 1 420px;
}

.learning-map-copy .section-kicker,
.learning-map-copy h2 {
  margin-left: 0;
  margin-right: 0;
}

.learning-map-copy h2 {
  max-width: 440px;
}

.learning-lanes {
  flex: 1 1 620px;
  width: auto;
  margin: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.learning-lane {
  transform: none;
}

.language-lane {
  background: #8bd8ff;
}

.math-lane {
  background: #ffe36d;
}

.learning-lane .lane-title {
  color: #ffffff;
}

.language-lane .lane-title {
  background: #2d78ff;
}

.math-lane .lane-title {
  background: #ed8c27;
}

.language-lane .lane-step:nth-of-type(2) {
  background: #fff3a8;
}

.language-lane .lane-step:nth-of-type(3) {
  background: #ffd7e8;
}

.language-lane .lane-step:nth-of-type(4) {
  background: #d9f5e5;
}

.math-lane .lane-step:nth-of-type(2) {
  background: #dbeeff;
}

.math-lane .lane-step:nth-of-type(3) {
  background: #e7dcff;
}

.math-lane .lane-step:nth-of-type(4) {
  background: #fffaf2;
}

.site-footer {
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0) 36%),
    linear-gradient(180deg, #fff2df 0%, #fff8f0 42%, #fff8f0 100%);
}

@media (max-width: 980px) {
  .learning-map-inner {
    display: grid;
    gap: clamp(32px, 6vw, 54px);
    text-align: center;
  }

  .learning-map-copy {
    max-width: 680px;
    justify-self: center;
  }

  .learning-map-copy .section-kicker,
  .learning-map-copy h2 {
    margin-left: auto;
    margin-right: auto;
  }

  .learning-lanes {
    width: min(760px, 100%);
    margin-inline: auto;
  }
}

@media (max-width: 620px) {
  .panel-label,
  .hunt-panel .panel-label,
  .syllable-panel .panel-label,
  .sum-panel .panel-label,
  .count-panel .panel-label {
    padding: 7px 10px;
    font-size: 0.72rem;
  }

  .hunt-panel {
    padding-top: 48px;
  }

  .learning-lanes {
    grid-template-columns: 1fr;
  }
}

/* Final override: section 3 and footer share one uninterrupted background */
html,
body,
.second-section.learning-map,
.learning-map,
.site-footer,
.second-section.learning-map + .site-footer {
  background: #fff8f0;
}

.second-section.learning-map::after,
.learning-map::after {
  content: none;
  display: none;
}

/* Final override: section 3 title above cards */
.second-section.learning-map .learning-map-inner {
  display: block;
  width: min(1120px, 100%);
  text-align: center;
}

.second-section.learning-map .learning-map-copy {
  max-width: 760px;
  margin: 0 auto;
}

.second-section.learning-map .learning-map-copy .section-kicker,
.second-section.learning-map .learning-map-copy h2 {
  margin-left: auto;
  margin-right: auto;
}

.second-section.learning-map .learning-map-copy h2 {
  max-width: 760px;
}

.second-section.learning-map .learning-lanes {
  display: grid;
  width: min(1060px, 100%);
  margin: clamp(32px, 5vw, 58px) auto 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(22px, 3vw, 36px);
}

@media (max-width: 760px) {
  .second-section.learning-map .learning-lanes {
    grid-template-columns: 1fr;
  }
}

/* Section 3 cards: value on one edge, label on the other */
.second-section.learning-map .lane-step {
  grid-template-columns: auto auto;
  justify-content: space-between;
  align-items: center;
  column-gap: clamp(28px, 5vw, 72px);
}

.second-section.learning-map .lane-step strong {
  justify-self: start;
}

.second-section.learning-map .lane-step span {
  justify-self: end;
  text-align: right;
}

.second-section.learning-map .language-lane {
  transform: rotate(-1.2deg);
}

.second-section.learning-map .math-lane {
  transform: rotate(1.2deg);
}

@media (max-width: 760px) {
  .second-section.learning-map .language-lane,
  .second-section.learning-map .math-lane {
    transform: none;
  }
}

/* Math dots: purple, solid, no inner gloss */
.sum-panel .sum-dots i,
.sum-dots i {
  background: #7657d9;
  box-shadow: 0 5px 0 rgba(73, 48, 142, 0.16);
}

/* Slightly smaller mascot in the activity board */
.activity-board .octopus-image {
  width: min(162%, 382px);
}

/* Section 2 cards: subtle entry bounce */
@keyframes activity-card-bounce-in {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
  }
  62% {
    opacity: 1;
    transform: translateY(-5px) scale(1.012);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.activity-board.activity-board-in-view .activity-panel {
  animation: activity-card-bounce-in 0.52s cubic-bezier(.22, 1.18, .36, 1) both;
}

.activity-board.activity-board-in-view .activity-panel:nth-child(2) {
  animation-delay: 0.06s;
}

.activity-board.activity-board-in-view .activity-panel:nth-child(3) {
  animation-delay: 0.12s;
}

.activity-board.activity-board-in-view .activity-panel:nth-child(4) {
  animation-delay: 0.18s;
}

.activity-board.activity-board-in-view .activity-panel:nth-child(5) {
  animation-delay: 0.24s;
}

/* Activity cards without the white frame or rear depth shadow */
.activity-board .activity-panel {
  border: 0;
  box-shadow: none;
}

.activity-board .trace-panel {
  background: linear-gradient(180deg, #e9fbff 0%, #9be8f3 100%);
}

.activity-board .trace-panel strong {
  -webkit-text-stroke-color: #d8f5fa;
}

.activity-board .trace-draw-path {
  stroke: url("#traceRainbow");
  filter: drop-shadow(0 4px 0 rgba(67, 108, 143, 0.14));
}

.activity-board .syllable-panel {
  background: linear-gradient(180deg, #ffd4e8 0%, #f18ac2 100%);
}

.activity-board .hunt-panel {
  background: linear-gradient(180deg, #fffdf8 0%, #ffe8bd 100%);
}

.activity-board .count-panel {
  background: linear-gradient(180deg, #ffe8a8 0%, #ffbd3f 100%);
}

.activity-board .sum-panel {
  background: linear-gradient(180deg, #eee7ff 0%, #a98cf0 100%);
}

/* Learning cards use the same borderless, more vivid gradient treatment */
.second-section.learning-map .learning-lane {
  border: 0;
  box-shadow: none;
}

.second-section.learning-map .language-lane {
  background: linear-gradient(180deg, #b9eaff 0%, #55bdf2 100%);
}

.second-section.learning-map .math-lane {
  background: linear-gradient(180deg, #ded3ff 0%, #9979e8 100%);
}

.activity-board.activity-board-in-view .activity-panel:nth-child(6) {
  animation-delay: 0.3s;
}

@media (prefers-reduced-motion: reduce) {
  .activity-board.activity-board-in-view .activity-panel {
    animation: none;
  }
}

/* Mobile: count "4" and sum "5" result chips should match exactly */
@media (max-width: 620px) {
  .count-panel strong {
    font-size: clamp(3rem, 6vw, 5rem);
    border: 6px solid rgba(255, 255, 255, 0.78);
    background: linear-gradient(180deg, #ffffff 0%, #fffaf3 100%);
    box-shadow:
      0 8px 0 rgba(150, 100, 20, 0.16),
      inset 0 5px 0 rgba(255, 255, 255, 0.8);
  }

  .sum-panel strong {
    height: clamp(68px, 10vw, 110px);
  }
}
