/* Shared illustrated layouts; tokens live in theme.json. */
.wp-block-group.is-style-section,
.wp-block-group.is-style-hero,
.wp-block-group.is-style-media-section { padding-block: var(--wp--preset--spacing--70); }
.wp-block-group.is-style-hero { position: relative; text-align: center; padding-block: var(--wp--preset--spacing--60); }
.wp-block-group.is-style-hero > .wp-block-group { position: relative; }
.wp-block-group.is-style-hero h1 { max-width: 850px; margin-inline: auto; }
.wp-block-group.is-style-hero .wp-block-buttons { justify-content: center; }
.wp-block-group.is-style-hero .hero-logo { width: min(340px, 72vw); margin-inline: auto; }
.wp-block-group.is-style-hero .hero-logo img { width: 100%; height: auto; }
/* Home only: recover the logo's extra 24px flow gap while enlarging its original artwork. */
.home .wp-block-group.is-style-hero { padding-bottom: var(--wp--preset--spacing--50); }
.home .wp-block-group.is-style-hero .hero-logo { width: min(380px, 81vw); margin-block-start: 0; }
.home .wp-block-group.is-style-hero .wp-block-buttons { flex-wrap: wrap; row-gap: var(--wp--preset--spacing--40); }
.home .wp-block-group.is-style-hero .wp-block-button .wp-element-button { min-height: 52px; display: flex; align-items: center; justify-content: center; box-sizing: border-box; }
.wp-block-group.is-style-hero .hero-sun { position: absolute; width: 120px; left: 4%; top: 8%; transform: rotate(-10deg); }
.wp-block-group.is-style-hero .hero-wave { position: absolute; width: 130px; right: 2%; top: 52%; transform: rotate(8deg); }
.wp-block-group.is-style-section .wp-block-columns { align-items: center; gap: var(--wp--preset--spacing--70); }
.wp-block-group.is-style-section .wp-block-column > h2:first-child { margin-top: 0; }
.wp-block-group.is-style-section .section-paw { max-width: 58px; margin-block: 0 var(--wp--preset--spacing--40); transform: rotate(-15deg); }
.wp-block-group.is-style-section .author-art { max-width: 430px; margin-inline: auto; }
.wp-block-group.is-style-section .section-wave { max-width: 115px; margin-left: auto; }
.wp-block-group.is-style-featured-book .wp-block-columns { align-items: center; gap: var(--wp--preset--spacing--70); }
.wp-block-group.is-style-featured-book .wp-block-post-featured-image { margin: 0; padding: var(--wp--preset--spacing--50); background: var(--wp--preset--color--paper); border-radius: var(--wp--custom--radius--card); box-shadow: 8px 8px 0 var(--wp--preset--color--sunshine); }
.wp-block-group.is-style-featured-book .wp-block-post-title { font-size: var(--wp--preset--font-size--x-large); }
.wp-block-group.is-style-featured-book .wp-block-post-title a,
.wp-block-group.is-style-book-card .wp-block-post-title a,
.wp-block-group.is-style-activity-card .wp-block-post-title a { color: var(--wp--preset--color--ink); text-decoration: none; }
.wp-block-group.is-style-book-card { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1fr); align-items: center; gap: var(--wp--preset--spacing--60); padding: var(--wp--preset--spacing--60); background: var(--wp--preset--color--cream); border: var(--wp--custom--border--fine) solid var(--wp--preset--color--line); border-radius: var(--wp--custom--radius--card); }
.wp-block-group.is-style-book-card > * { min-width: 0; margin: 0; }
.wp-block-group.is-style-activity-card,
.wp-block-group.hub-activity-card { border: var(--wp--custom--border--fine) solid var(--wp--preset--color--line); border-radius: var(--wp--custom--radius--card); background: var(--wp--preset--color--paper); padding: var(--wp--preset--spacing--50); }
.wp-block-group.is-style-activity-card .wp-block-post-featured-image { margin: 0; }
.wp-block-group.is-style-activity-card .wp-block-post-featured-image img { border-radius: var(--wp--custom--radius--card); }
.wp-block-group.is-style-book-intro .wp-block-columns { align-items: flex-start; gap: var(--wp--preset--spacing--60); }
.wp-block-group.is-style-book-intro .wp-block-post-title { font-size: var(--wp--preset--font-size--x-large); }
.wp-block-group.is-style-media-section { border-top: var(--wp--custom--border--fine) solid var(--wp--preset--color--line); text-align: center; }
.wp-block-group.is-style-media-section .printed-photo { max-width: 420px; margin-inline: auto; }
.wp-block-group.is-style-activity-intro { padding-block: var(--wp--preset--spacing--60); }
.wp-block-group.is-style-activity-intro .wp-block-post-featured-image { margin-top: var(--wp--preset--spacing--60); }
/* Hub introductions use core constrained/wide widths; the original paw stays out of the text flow. */
.spot-hub > .wp-block-group { position:relative; }
.wp-block-group.spot-hub .section-paw { position:absolute; top:0; right:0; margin:0; width:58px; }
.spot-hub .wp-block-bob-natalia-activity-list { grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr)); gap:var(--wp--preset--spacing--60); }
.hub-activity-card > .wp-block-columns { margin:0; }
.hub-activity-card .wp-block-post-featured-image { margin:0; }
.hub-activity-card .wp-block-post-featured-image img { display:block; width:100%; height:auto; border-radius:var(--wp--custom--radius--card); }
.hub-activity-card .wp-block-post-title a { color:var(--wp--preset--color--ink); text-decoration:none; }
.hub-activity-card .wp-block-post-title a:hover { text-decoration:underline; }
.spot-hub .wp-block-bob-natalia-activity-list:not(.has-one) .wp-block-columns { flex-direction:column; align-items:stretch; }
.spot-hub .wp-block-bob-natalia-activity-list:not(.has-one) .wp-block-column { flex-basis:auto!important; width:100%; align-self:stretch; }
/* Home features: reuse the approved Spot Bob! card without moving page-authored blocks. */
.home .wp-block-group.is-style-section:has(.wp-block-bob-natalia-featured-book) {
 background-color:var(--wp--preset--color--soft-yellow)!important;
}
.home .is-style-featured-book > .wp-block-columns,
.home .wp-block-bob-natalia-colouring-list.is-featured .is-style-activity-card {
 box-sizing:border-box; width:100%; max-width:none;
 padding:var(--wp--preset--spacing--50);
 border:var(--wp--custom--border--fine) solid var(--wp--preset--color--line);
 border-radius:var(--wp--custom--radius--card); background:var(--wp--preset--color--paper);
}
.home .is-style-featured-book > .wp-block-columns,
.home .wp-block-bob-natalia-colouring-list.is-featured .is-style-activity-card > .wp-block-columns {
 margin:0; align-items:center; gap:var(--wp--preset--spacing--50);
}
.home .is-style-featured-book > .wp-block-columns > .wp-block-column,
.home .wp-block-bob-natalia-colouring-list.is-featured .wp-block-column { min-width:0; }
/* Centre complete copy groups beside the artwork; leave stacked cards untouched. */
@media(min-width:782px) {
 .home .is-style-featured-book > .wp-block-columns > .wp-block-column,
 .home .wp-block-bob-natalia-colouring-list.is-featured .wp-block-column { align-self:center; }
}
@media(min-width:783px) {
 /* Spot's copy is a sequence of sibling blocks, rather than a wrapped column. */
 .home .has-aqua-background-color .wp-block-post-template > li:first-child .is-style-activity-card {
  --feature-copy-rows:5;
  grid-template-rows:minmax(0,1fr) repeat(var(--feature-copy-rows),auto) minmax(0,1fr);
 }
 .home .has-aqua-background-color .wp-block-post-template > li:first-child .is-style-activity-card:has(> :last-child:nth-child(5)) { --feature-copy-rows:4; }
 .home .has-aqua-background-color .wp-block-post-template > li:first-child .is-style-activity-card:has(> :last-child:nth-child(4)) { --feature-copy-rows:3; }
 .home .has-aqua-background-color .wp-block-post-template > li:first-child .is-style-activity-card:has(> :last-child:nth-child(3)) { --feature-copy-rows:2; }
 .home .wp-block-group.is-style-section.has-aqua-background-color .wp-block-post-template > li:first-child .is-style-activity-card > .wp-block-post-featured-image { grid-row:1 / -1; }
 .home .has-aqua-background-color .wp-block-post-template > li:first-child .is-style-activity-card > :nth-child(2) { grid-row:2; }
 .home .has-aqua-background-color .wp-block-post-template > li:first-child .is-style-activity-card > :nth-child(3) { grid-row:3; }
 .home .has-aqua-background-color .wp-block-post-template > li:first-child .is-style-activity-card > :nth-child(4) { grid-row:4; }
 .home .has-aqua-background-color .wp-block-post-template > li:first-child .is-style-activity-card > :nth-child(5) { grid-row:5; }
 .home .has-aqua-background-color .wp-block-post-template > li:first-child .is-style-activity-card > :nth-child(6) { grid-row:6; }
}
/* Collection introductions keep their reading width, anchored to the wide cards rather than centred. */
.post-type-archive-books main.site-main { background:var(--wp--preset--color--soft-yellow); }
.post-type-archive-books main.site-main > :is(h1,p) {
 margin-inline-start:max(0px,calc((100% - var(--wp--style--global--wide-size))/2))!important;
 margin-inline-end:auto!important;
}
.post-type-archive-books .wp-block-group.is-style-book-card {
 background:var(--wp--preset--color--paper); padding:var(--wp--preset--spacing--50); gap:var(--wp--preset--spacing--50);
}
.post-type-archive-books .is-style-book-card .wp-block-post-featured-image { width:100%; }
.post-type-archive-books .is-style-book-card .wp-block-post-featured-image img { display:block; width:100%; height:auto; }
body.page:not(.home) .spot-hub > .wp-block-group.alignwide > :is(h1,p):not(.has-text-align-center),
body.page:not(.home) .is-style-section:has(.wp-block-bob-natalia-colouring-list.is-library) > .wp-block-group.alignwide > :is(h1,p):not(.has-text-align-center) {
 margin-inline-start:0!important; margin-inline-end:auto!important;
}
/* Singular introductions share the main container's left edge without widening copy or artwork. */
.single-activities .is-style-activity-intro > :not(.alignwide),
.single-books .is-style-book-intro > .wp-block-columns > .wp-block-column:last-child > * {
 max-width:var(--wp--style--global--content-size);
 margin-inline-start:0!important; margin-inline-end:auto!important;
}
.single-activities .is-style-activity-intro > :is(h1,h2,p),
.single-books .is-style-book-intro > .wp-block-columns > .wp-block-column:last-child { text-align:left; }
.single-activities .is-style-activity-intro > .wp-block-bob-natalia-activity-actions > .wp-block-buttons,
.single-books .is-style-book-intro > .wp-block-columns > .wp-block-column:last-child > .wp-block-buttons { justify-content:flex-start; }
@media(max-width: 782px) {
 .home .wp-block-group.is-style-featured-book > .wp-block-columns,
 .home .wp-block-bob-natalia-colouring-list.is-featured .is-style-activity-card > .wp-block-columns { gap:var(--wp--preset--spacing--40); }
 /* Match the existing core Columns stacking threshold across all three Home features. */
 .home .wp-block-group.is-style-section.has-aqua-background-color .wp-block-post-template > li:first-child .is-style-activity-card { display:block; }
 .wp-block-group.spot-hub .section-paw { width:42px; }
 .wp-block-group.is-style-hero .hero-sun { width: 75px; left: 0; top: 3%; }
 .wp-block-group.is-style-hero .hero-wave { width: 75px; right: 0; top: 42%; }
 .wp-block-group.is-style-book-card { grid-template-columns: 1fr; padding: var(--wp--preset--spacing--50); }
 .wp-block-group.is-style-book-card .wp-block-post-featured-image { max-width: 420px; margin-inline: auto; }
 .wp-block-group.is-style-section .wp-block-columns,
 .wp-block-group.is-style-featured-book .wp-block-columns { gap: var(--wp--preset--spacing--60); }
}
/* Stacked feature cards: artwork/copy 24px, copy rhythm 12px, actions 16px. */
@media(max-width:781px) {
 .home .wp-block-group.is-style-featured-book > .wp-block-columns,
 .home .wp-block-bob-natalia-colouring-list.is-featured .is-style-activity-card > .wp-block-columns,
 .spot-hub .wp-block-group.hub-activity-card > .wp-block-columns,
 body.page .wp-block-bob-natalia-colouring-list.is-library .is-style-activity-card > .wp-block-columns { gap:var(--wp--preset--spacing--50); }
 :is(
  .home .is-style-featured-book > .wp-block-columns > .wp-block-column:last-child,
  .home .wp-block-bob-natalia-colouring-list.is-featured .wp-block-column:last-child,
  .post-type-archive-books .is-style-book-card > .wp-block-group,
  .spot-hub .hub-activity-card .wp-block-column:last-child,
  body.page .wp-block-bob-natalia-colouring-list.is-library .wp-block-column:last-child,
  .home .has-aqua-background-color .is-style-activity-card
 ) > * {
  margin-block-start:12px!important;
  margin-block-end:0;
 }
 :is(
  .home .is-style-featured-book > .wp-block-columns > .wp-block-column:last-child,
  .home .wp-block-bob-natalia-colouring-list.is-featured .wp-block-column:last-child,
  .post-type-archive-books .is-style-book-card > .wp-block-group,
  .spot-hub .hub-activity-card .wp-block-column:last-child,
  body.page .wp-block-bob-natalia-colouring-list.is-library .wp-block-column:last-child,
  .home .has-aqua-background-color .is-style-activity-card
 ) > :first-child { margin-block-start:0!important; }
 :is(
  .home .is-style-featured-book > .wp-block-columns > .wp-block-column:last-child,
  .home .wp-block-bob-natalia-colouring-list.is-featured .wp-block-column:last-child,
  .post-type-archive-books .is-style-book-card > .wp-block-group,
  .spot-hub .hub-activity-card .wp-block-column:last-child,
  body.page .wp-block-bob-natalia-colouring-list.is-library .wp-block-column:last-child,
  .home .has-aqua-background-color .is-style-activity-card
 ) > :is(.wp-block-buttons,.wp-block-bob-natalia-activity-actions) { margin-block-start:16px!important; }
 :is(
  .home .is-style-featured-book,
  .home .wp-block-bob-natalia-colouring-list.is-featured,
  .post-type-archive-books .is-style-book-card,
  .spot-hub .hub-activity-card,
  body.page .wp-block-bob-natalia-colouring-list.is-library,
  .home .has-aqua-background-color .is-style-activity-card
 ) .wp-block-buttons { gap:12px; }
 .home .wp-block-group.is-style-section.has-aqua-background-color .is-style-activity-card > .wp-block-post-featured-image + * { margin-block-start:24px!important; }
}
/* These two layouts retain their existing inclusive 782px stacking breakpoint. */
@media(min-width:782px) and (max-width:782px) {
 :is(.post-type-archive-books .is-style-book-card > .wp-block-group,.home .has-aqua-background-color .is-style-activity-card) > * { margin-block-start:12px!important; margin-block-end:0; }
 :is(.post-type-archive-books .is-style-book-card > .wp-block-group,.home .has-aqua-background-color .is-style-activity-card) > :first-child { margin-block-start:0!important; }
 :is(.post-type-archive-books .is-style-book-card > .wp-block-group,.home .has-aqua-background-color .is-style-activity-card) > :is(.wp-block-buttons,.wp-block-bob-natalia-activity-actions) { margin-block-start:16px!important; }
 :is(.post-type-archive-books .is-style-book-card,.home .has-aqua-background-color .is-style-activity-card) .wp-block-buttons { gap:12px; }
 .home .wp-block-group.is-style-section.has-aqua-background-color .is-style-activity-card > .wp-block-post-featured-image + * { margin-block-start:24px!important; }
}
@media(max-width: 480px) {
 .wp-block-group.is-style-hero .hero-logo { width: 72%; }
 .home .wp-block-group.is-style-hero .hero-logo { width: 81%; }
 .wp-block-group.is-style-hero .hero-wave { display: none; }
 .wp-block-group.is-style-hero .hero-sun { width: 55px; }
}
