/* Publication visibility is server-rendered. In the editor every child remains accessible. */
.editor-styles-wrapper .he-editor-layout-hidden { outline: 2px dashed #996800; outline-offset: 4px; }
.editor-styles-wrapper .he-editor-layout-hidden::before { content: attr(data-hanabi-visibility); display: block; width: fit-content; padding: 4px 8px; margin: 0 0 8px; background: #fff4ce; color: #6b4b00; font: 600 12px/1.5 system-ui, sans-serif; }
.he-layout-hidden-notice { margin: 8px 0 12px; }

/* Native containers replace builder wrappers; individual Hanabi sections retain their own spacing. */
body.he-site :is(.wp-block-group, .wp-block-columns, .wp-block-column) { box-sizing: border-box; min-width: 0; }
body.he-site :is(.wp-block-group, .wp-block-columns, .wp-block-column, .wp-block-heading)[id] { scroll-margin-top: 128px; }
body.he-site .he-builder > .wp-block-group:has(.he-el) { margin-block: 0; max-width: none; }
body.he-site .he-builder :is(.wp-block-group, .wp-block-column):has(> .he-el) { --wp--style--block-gap: 0px; }
body.he-site .he-builder .wp-block-group:has(.he-el) > :is(.wp-block-group, .wp-block-columns, .wp-block-column, .he-el:not(.he-guide):not(.he-about):not(.he-nl-latest):not(.he-shop-products)) { max-width: none; margin-left: 0 !important; margin-right: 0 !important; }
body.he-site .he-builder .wp-block-group > .he-guide { max-width: 78ch; }
body.he-site .he-builder .wp-block-group > .he-about { max-width: 1140px; }
body.he-site .he-builder .wp-block-group > .he-nl-latest { max-width: 1600px; }
body.he-site .he-builder .wp-block-group > .he-shop-products { max-width: 1440px; }
body.he-site .he-builder .wp-block-group:has(.he-el) > :is(.wp-block-group, .wp-block-columns, .wp-block-column) { margin-block: 0; }
body.he-site .he-builder > :is(.wp-block-group, .wp-block-columns):not(:has(.he-el)):not(.alignfull) { max-width: 1240px; margin: 56px auto; padding-inline: 24px; }

/* Theme-template shop pages used full-width rows. Keep their native full-width groups edge to edge. */
body.he-site .main-content > .row > .wp-block-group.alignfull { position: relative; width: 100vw; max-width: none; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
body.he-boutique .wp-block-group.alignfull:has(.nectar-post-grid) > :is(.nectar-post-grid-wrap, .wp-block-columns, .wp-block-heading) { max-width: none; }
body.he-boutique .wp-block-group.alignfull:has(.nectar-post-grid) { padding-inline: 30px; }
body.he-boutique .wp-block-group:has(> .wp-block-heading + .nectar-post-grid-wrap) > .wp-block-heading { margin-block: 0 24px; }
body.he-boutique-root .main-content > .row > .wp-block-group.alignfull:has(.nectar-post-grid) { padding: 6px 12px; margin-top: 0; margin-bottom: 0; }
body.he-boutique-root .main-content > .row > .wp-block-group.alignfull:has(.nectar-post-grid):nth-child(2) { padding-top: 12px; }
body.he-boutique-root .wp-block-group.alignfull:has(.nectar-post-grid) > .wp-block-columns { gap: 12px; margin: 0; }
body.he-boutique-root .wp-block-group.alignfull:has(.nectar-post-grid) > .wp-block-columns > .wp-block-column { margin: 0; }

/* One selected product per native column: stretch the card and its copy to the row's tallest card. */
body.he-boutique .wp-block-columns:has(.he-shop-legacy-grid[data-columns="1"]) { align-items: stretch; }
body.he-boutique .wp-block-column:has(> .nectar-post-grid-wrap:only-child > .he-shop-legacy-grid[data-columns="1"]),
body.he-boutique .wp-block-column > .nectar-post-grid-wrap:only-child:has(> .he-shop-legacy-grid[data-columns="1"]) { display: flex; flex-direction: column; flex-grow: 1; }
body.he-boutique .wp-block-column > .nectar-post-grid-wrap:only-child > .he-shop-legacy-grid[data-columns="1"] { flex-grow: 1; }
body.he-boutique .wp-block-column .he-shop-legacy-grid[data-columns="1"] > .he-shop-legacy-card { height: 100% !important; }
body.he-boutique .wp-block-column .he-shop-legacy-grid[data-columns="1"] > .he-shop-legacy-card > .inner { height: 100% !important; grid-template-rows: 330px minmax(190px, 1fr); }
@media (max-width: 781px) {
    body.he-boutique .wp-block-columns > .wp-block-column { flex-basis: 100% !important; }
    body.he-boutique .wp-block-column .he-shop-legacy-grid[data-columns="1"] > .he-shop-legacy-card { height: auto !important; }
    body.he-boutique .wp-block-column .he-shop-legacy-grid[data-columns="1"] > .he-shop-legacy-card > .inner { height: auto !important; grid-template-rows: auto; }
}
@media (max-width: 700px) {
    body.he-site :is(.wp-block-group, .wp-block-columns, .wp-block-column, .wp-block-heading)[id] { scroll-margin-top: 96px; }
}
