:root {
  color-scheme: light;
  font-family: system-ui, sans-serif;
  color: #242046;
  background: #f7f4ff;
}
* { box-sizing: border-box; }
body { margin: 0; }
.shell { width: min(100% - 32px, 920px); margin-inline: auto; }
.masthead {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.masthead p { margin: 0; color: #625779; font-size: .85rem; }
.brand { font-weight: 850; color: #492c85; text-decoration: none; }
.brand span {
  display: inline-grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border-radius: 12px;
  color: #fff;
  background: #5934a2;
}
main { padding-bottom: 32px; }
h1 { margin: 10px 0 16px; font-size: clamp(2.1rem, 7vw, 3.8rem); line-height: 1.05; letter-spacing: -.035em; }
h2 { margin: 0 0 12px; font-size: clamp(1.45rem, 4vw, 2rem); line-height: 1.15; }
a:focus-visible { outline: 3px solid #6337b4; outline-offset: 3px; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.tiles.tiles-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tile, .age-card {
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  color: inherit;
  text-decoration: none;
  border: 2px solid #ffffff85;
  border-radius: 20px;
}
.tile { min-height: 132px; padding: 8px; }
.tile-art { font-size: clamp(2.4rem, 8vw, 3.7rem); line-height: 1; margin-bottom: 9px; }
.tile-life, .young { background: #ffecd7; }
.tile-learn, .middle { background: #e8ddff; }
.tile-play, .older { background: #d7f0e5; }
.tile-parents { background: #deedff; }
.tile:hover, .age-card:hover { border-color: #7653a6; }
.panel {
  background: #fff;
  border: 1px solid #e1d7f0;
  border-radius: 22px;
  margin-top: 16px;
  padding: clamp(14px, 3vw, 24px);
  scroll-margin-top: 10px;
}
.panel > p { line-height: 1.5; margin: 0 0 12px; }
.age-cards { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; }
.age-cards .adventure-card { height: 100%; }
.age-cards .adventure-card-title small {
  display: block;
  margin-bottom: 4px;
  color: #514762;
  font-size: .875rem;
  font-weight: 700;
}
.age-card {
  position: relative;
  min-height: 164px;
  height: 100%;
  gap: 8px;
  padding: 12px 9px;
  line-height: 1.25;
}
.age-number {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  width: 31px;
  height: 31px;
  background: #fff;
  font-weight: 850;
  color: #492c85;
}
.age-art { font-size: clamp(2.2rem, 9vw, 3.5rem); line-height: 1.12; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.parent-topics { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 0 16px; }
.parent-topics a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 12px;
  color: #492c85;
  background: #f0e9fb;
}
.action {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 16px;
  min-height: 48px;
  background: #5934a2;
  color: #fff;
  text-decoration: none;
  border-radius: 14px;
  font-weight: 750;
}
.hints { margin: 0; }
.hints > div { scroll-margin-top: 16px; }
.hints > div:target { background: #f7f4ff; outline: 2px solid #7653a6; outline-offset: 4px; }
.hints > div + div { border-top: 1px solid #e9e0f6; margin-top: 9px; padding-top: 9px; }
.hints dt { font-weight: 780; }
.hints dd { margin: 5px 0 0; line-height: 1.5; }
@media (max-width: 610px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile { min-height: 106px; }
  .age-cards { grid-template-columns: 1fr; }
  .age-card { min-height: 118px; }
}
