/* Shared article pattern styles for the editor canvas and published posts. */
.byst-article-pattern {
    color: #3f3532;
    font-family: var(--byst-sans, "Noto Sans JP", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.95;
    margin-block: 28px;
}

.byst-article-pattern > :first-child {
    margin-top: 0;
}

.byst-article-pattern > :last-child {
    margin-bottom: 0;
}

.byst-article-pattern .wp-block-heading {
    color: #211c1b;
    font-weight: 900;
    line-height: 1.45;
}

.byst-article-pattern h2.wp-block-heading {
    padding-bottom: 12px;
    border-bottom: 3px solid #f5dbe1;
    font-size: clamp(25px, 3vw, 32px);
}

.byst-article-pattern.wp-block-group > h2.wp-block-heading {
    margin: 0 0 18px;
}

.byst-article-intro .byst-article-intro__lead {
    color: #211c1b;
    font-weight: 700;
}

.byst-pattern-menu {
    padding: clamp(18px, 3vw, 28px);
    border: 1px solid #f0d5de;
    border-left: 4px solid var(--byst-pink, #e86f86);
    border-radius: 18px;
    background: #fff8fa;
}

.byst-pattern-menu > .byst-article-callout__title {
    margin: 0 0 16px;
    color: #a8385c;
    font-weight: 900;
    line-height: 1.6;
}

.byst-article-pattern.byst-pattern-menu p.byst-article-menu__note {
    margin-bottom: 0;
    font-size: 14px;
}

.byst-article-gallery.wp-block-gallery.has-nested-images {
    --wp--style--unstable-gallery-gap: 16px;
    gap: 16px;
    margin-block: 24px;
}

.byst-article-gallery.wp-block-gallery.has-nested-images figure.wp-block-image {
    margin-block: 0;
}

.byst-article-gallery.wp-block-gallery.has-nested-images figure.wp-block-image img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    border-radius: 12px;
    background: #fff;
}

.byst-article-contact-buttons {
    gap: 12px;
}

.byst-article-contact-button .wp-block-button__link {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 48px;
    padding: 14px 24px;
    border: 1px solid #b73c61;
    border-radius: 999px;
    background: #b73c61;
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
}

/* Override the article body's general pink link color on the contact button. */
.byst-article-page .byst-article-content .byst-article-contact-button .wp-block-button__link {
    color: #fff;
    text-decoration: none;
}

.byst-article-contact-button .wp-block-button__link:hover {
    background: #a8385c;
    border-color: #a8385c;
}

.byst-article-contact-button .wp-block-button__link:focus-visible {
    outline: 3px solid #a8385c;
    outline-offset: 4px;
}

@media (max-width: 600px) {
    /* Core gallery calculates a desktop width for each image; stack on mobile. */
    .byst-article-gallery.wp-block-gallery.has-nested-images figure.wp-block-image {
        width: 100% !important;
        flex-basis: 100% !important;
    }

    .byst-article-contact-buttons,
    .byst-article-contact-button {
        width: 100%;
    }

    .byst-article-contact-button .wp-block-button__link {
        box-sizing: border-box;
        width: 100%;
    }
}
