.age-path {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 28px);
  padding: clamp(12px, 4vw, 42px);
  border: 2px solid #ffe08d;
  border-radius: 22px;
  background: linear-gradient(#17345c26, #17345c70),
    url("assets/age-learning-path.webp?v=45b8ed1d36") center 66% / cover, #416642;
  list-style: none;
}

.age-path::before {
  position: absolute;
  z-index: -1;
  inset: 50% 12% auto;
  border-top: 8px dotted #fff4ba;
  filter: drop-shadow(0 2px 2px #493818);
  content: "";
}

.age-path li {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 8px;
  padding: 12px;
  border: 1px solid #b9cee8;
  border-radius: 14px;
  background: #f0f6ff;
  text-align: center;
  box-shadow: 0 4px 0 #29466f;
}

.age-path li:first-child { background: #fff1bb; border-color: #ad8532; }
.age-path li a,
.age-path-extras .play-topic-grid a {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  min-block-size: 78px;
  border-radius: 14px;
  background: #fffdf5;
  text-align: center;
  font-weight: 750;
}

.age-path-extras .play-topic-grid { margin-block-end: 12px; }
.age-game-icon { font-size: clamp(1.65rem, 4vw, 2.65rem); line-height: 1.1; }

@media (prefers-reduced-motion: no-preference) {
  .age-path { animation: age-route-arrive 380ms ease-out both; }
  .age-guide-section a:is(:hover, :focus-visible) .age-game-icon {
    animation: age-game-hop 300ms ease-out;
  }
}

@keyframes age-route-arrive {
  from { opacity: .4; transform: translateY(7px); }
  to { opacity: 1; transform: none; }
}

@keyframes age-game-hop {
  50% { transform: translateY(-5px); }
}

@media (max-width: 600px) {
  .age-path { grid-template-columns: 1fr; }
  .age-path::before {
    inset: 10% 50%;
    border: 0;
    border-inline-start: 8px dotted #fff4ba;
  }
}
.age-entry {
  --route-accent: #bce88d;
  --route-photo: center 52%;
}

.age-entry[data-route-age="3"] { --route-accent: #b8e5ff; --route-photo: left 40%; }
.age-entry[data-route-age="4"] { --route-accent: #ffe19e; --route-photo: left 78%; }
.age-entry[data-route-age="5"] { --route-accent: #ead1ff; --route-photo: right 18%; }

.kingdom-entry.age-entry > img { object-position: var(--route-photo); }
.age-entry .kingdom-entry-copy { justify-self: start; }

.age-entry-label {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--route-accent);
  font-weight: 800;
}

.age-entry-icon {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  line-height: 1.15;
}

.age-entry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-block-start: 12px;
}

.age-entry-actions a:not([hidden]) {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-sizing: border-box;
  min-height: 44px;
  padding: 6px 14px;
  border: 2px solid var(--route-accent);
  border-radius: 14px;
  background: #14294b;
  color: #fff9e7;
  text-decoration: none;
  font-weight: 800;
}

.age-entry-actions a.age-entry-start:not([hidden]) {
  background: var(--route-accent);
  color: #132745;
}

@media (prefers-reduced-motion: no-preference) {
  .age-entry[data-route-age] .kingdom-entry-copy {
    animation: age-route-greeting 420ms ease-out both;
  }
}

@keyframes age-route-greeting {
  from { transform: translateY(12px); }
  to { transform: none; }
}

@media(max-width:700px){.age-path{background:linear-gradient(#17345c26,#17345c70),url("assets/age-learning-path-768.webp?v=f1554506b8") center 66%/cover,#416642}}
