@font-face {
  font-family: Fredoka;
  src: url("assets/fonts/Fredoka.ttf") format("truetype");
  font-weight: 300 700;
  font-display: swap;
}
:root {
  font-family: "Trebuchet MS", Verdana, sans-serif;
  color: #500d59;
  background: #fffaf2;
  line-height: 1.5;
  scroll-padding-top: 18px;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
a, button, summary { -webkit-tap-highlight-color: transparent; }
button, summary { font: inherit; color: inherit; cursor: pointer; }
button { background: #fffaf2; border: 1px solid #d5b6d5; }
:focus-visible { outline: 3px solid #086f6a; outline-offset: 4px; }
.skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip:focus { position: fixed; top: 8px; left: 8px; padding: 12px; background: white; z-index: 2; }
.wrap { width: min(1180px, calc(100% - 64px)); margin-inline: auto; }
h1, h2, h3, summary { font-family: Fredoka, "Trebuchet MS", sans-serif; letter-spacing: -.025em; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
h1, h2, h3 { line-height: 1.08; }
h1 { font-size: clamp(42px, 5.5vw, 78px); font-weight: 700; }
h2 { font-size: clamp(29px, 3.6vw, 45px); }
h3 { font-size: clamp(21px, 2.1vw, 28px); }
.page-head, .page-head nav, footer { display: flex; align-items: center; }
.page-head { min-height: 82px; justify-content: space-between; gap: 12px; }
.page-head img { display: block; width: clamp(105px, 13vw, 172px); height: auto; }
.page-head nav { gap: clamp(12px, 2.7vw, 36px); font-size: 15px; font-weight: 700; }
.page-head nav a { text-decoration: none; padding-block: 8px; }
.page-head nav a:hover, footer a:hover { text-decoration: underline; }
.page-head nav .back { border-radius: 999px; background: #f3e4f4; padding: 9px 17px; }
.pack-hero { border-radius: 28px; background: #f2ddf6; overflow: hidden; display: grid; grid-template-columns: 46% 54%; }
.hero-copy { padding: clamp(24px, 3.8vw, 56px); align-self: center; }
.hero-copy p { max-width: 38ch; margin: 18px 0 24px; font-size: clamp(16px, 1.35vw, 19px); }
.primary { display: inline-flex; align-items: center; gap: 14px; background: #87109a; color: white; text-decoration: none; font-weight: 700; border-radius: 32px; padding: 12px 19px; }
.primary:hover { background: #680c78; }
.hero-photo { position: relative; min-height: clamp(290px, 33vw, 410px); }
.hero-photo img { position: absolute; width: 100%; height: 100%; object-fit: cover; object-position: 50% 54%; }
.contents { margin-top: clamp(36px, 5vw, 68px); }
.gallery { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 20px; }
.gallery li { grid-column: span 2; }
.gallery li:nth-last-child(-n+2) { grid-column: span 3; }
.activity { display: flex; flex-direction: column; height: 100%; overflow: hidden; border-radius: 20px; border: 1px solid #e5d8ce; text-decoration: none; background: #fffdfa; }
.paper { background: #f4e5f6; padding: 14px 22px; display: grid; place-items: center; }
.gallery li:nth-child(2n) .paper { background: #e2efea; }
.gallery li:nth-child(3n) .paper { background: #ffebcf; }
.paper img { height: clamp(170px, 16vw, 214px); width: 100%; object-fit: contain; filter: drop-shadow(0 2px 4px #30133025); }
.card-copy { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.card-copy p { margin: 10px 0 14px; }
.enlarge { font-weight: 700; margin-top: auto; color: #80168b; text-decoration: underline; text-underline-offset: 3px; }
.activity:hover { border-color: #aa54ad; }
.parents { margin: clamp(40px, 5vw, 65px) 0; }
.parents h2 { margin-bottom: 18px; }
details { background: #fff4dd; border: 1px solid #ead6a9; border-radius: 16px; margin: 10px 0; }
details + details { background: #f0e6f5; border-color: #e3cce6; }
summary { font-size: clamp(21px, 2vw, 26px); font-weight: 600; padding: 16px 22px; }
.detail-content { padding: 6px 24px 22px; }
.guide-grid, .objects { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 28px; }
.detail-content h3 { font-size: 22px; margin-bottom: 7px; }
.answers section + section { margin-top: 24px; }
.answers ol { padding-left: 25px; margin: 6px 0; }
.answers li { margin: 4px 0; }
.mazes { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin-top: 12px; }
.mazes figure { background: #fffbf5; border-radius: 12px; padding: 10px; text-align: center; }
.mazes img { display: block; width: 100%; height: auto; }
figcaption, dt { font-weight: 700; }
.objects { gap: 10px 24px; }
footer { border-top: 1px solid #d4bcd0; min-height: 70px; }
footer a { font-weight: 700; text-underline-offset: 3px; }
dialog { color: inherit; background: #fffaf2; width: min(850px, calc(100% - 28px)); max-height: 94vh; max-height: 94dvh; border: 1px solid #d9bfda; border-radius: 20px; padding: 16px; overflow: auto; }
dialog::backdrop { background: #2a142bba; }
.modal-head, .pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.modal-head h2 { font-size: clamp(22px,3.2vw,32px); }
.modal-head p, .pager span { font-size: 14px; }
dialog button { border-radius: 18px; padding: 9px 14px; font-weight: 700; }
dialog button:disabled { opacity: .45; cursor: default; }
.modal-paper { background: #ede4eb; margin: 12px 0; padding: 8px; border-radius: 12px; }
.modal-paper img { display: block; width: auto; height: auto; max-width: 100%; max-height: min(64vh, 710px); max-height: min(64dvh, 710px); margin-inline: auto; }
@media (max-width: 800px) {
  .wrap { width: calc(100% - 36px); }
  .gallery { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
  .gallery li, .gallery li:nth-last-child(-n+2) { grid-column: auto; }
}
@media (max-width: 660px) {
  .page-head { min-height: 70px; }
  .page-head nav { gap: 12px; font-size: 13px; }
  .pack-hero { grid-template-columns: 1fr; border-radius: 20px; }
  .hero-copy { padding: 22px; }
  .hero-copy p { margin: 12px 0 16px; }
  .hero-photo { min-height: 0; aspect-ratio: 1.65; }
  .gallery { grid-template-columns: 1fr; }
  .activity { display: grid; grid-template-columns: minmax(0,.78fr) minmax(0,1.22fr); }
  .paper { padding: 10px; }
  .paper img { height: auto; max-height: 200px; }
  .card-copy { padding: 15px; }
  .card-copy p { font-size: 15px; margin: 8px 0 13px; }
  .enlarge { font-size: 14px; }
  .guide-grid, .objects, .mazes { grid-template-columns: 1fr; }
  .mazes img { max-width: 310px; margin-inline: auto; }
  .detail-content { padding: 3px 16px 18px; }
  summary { padding: 14px 16px; }
}
@media (max-width: 420px) {
  .wrap { width: calc(100% - 28px); }
  .page-head { flex-wrap: wrap; gap: 0; justify-content: center; padding: 9px 0; }
  .page-head > a { margin-right: auto; }
  .page-head nav { gap: 8px; }
  .page-head nav .back { padding: 7px 8px; }
  .page-head img { width: 90px; }
  .pager button { padding-inline: 9px; }
}
