/* 共通SPナビゲーション */

.site-header .sn-trigger {
    display: none;
}

dialog.sn-dialog:not([open]) {
    display: none;
}

dialog.sn-dialog,
dialog.sn-dialog * {
    box-sizing: border-box;
}

dialog.sn-dialog {
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: none;
    height: 100%;
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #fbf8f2;
    color: #354b70;
    text-align: left;
    font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", sans-serif;
    font-size: 16px;
    line-height: 1.7;
    letter-spacing: 0.03em;
    overflow: hidden;
}

dialog.sn-dialog[open] {
    display: flex;
    flex-direction: column;
    animation: sn-appear 240ms ease-out both;
}

dialog.sn-dialog::backdrop {
    background: rgba(30, 46, 70, 0.35);
}

dialog.sn-dialog p {
    margin: 0;
}

dialog.sn-dialog a {
    color: inherit;
    text-decoration: none;
}

dialog.sn-dialog button {
    font: inherit;
    cursor: pointer;
}

dialog.sn-dialog :is(a, button, summary):focus-visible,
.site-header .sn-trigger:focus-visible {
    outline: 2px solid #7189bb;
    outline-offset: 3px;
}

/* 常に上部に残るタイトル・閉じるボタン */

dialog.sn-dialog .sn-head {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: calc(12px + env(safe-area-inset-top)) 22px 12px;
    border-bottom: 1px solid #d8dfe7;
    background: #fbf8f2;
}

dialog.sn-dialog .sn-head p {
    font-size: 15px;
    letter-spacing: 0.15em;
}

dialog.sn-dialog .sn-head p span {
    display: block;
    margin-top: 2px;
    font-size: 10px;
    letter-spacing: 0.04em;
}

dialog.sn-dialog .sn-close {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 6px;
    border: 0;
    background: transparent;
    color: #354b70;
    font-size: 12px;
}

dialog.sn-dialog .sn-close span {
    font-family: Arial, sans-serif;
    font-size: 32px;
    font-weight: 300;
    line-height: 1;
}

/* メニュー部分だけスクロール */

dialog.sn-dialog .sn-scroll {
    flex: 1 1 auto;
    min-height: 0;
    padding: 24px 22px calc(28px + env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
}

dialog.sn-dialog .sn-nav {
    position: static;
    display: block;
    width: 100%;
    max-width: 600px;
    height: auto;
    margin: 0 auto;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

/* 医療機関の支援 */

dialog.sn-dialog .sn-medical {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 94px;
    margin-bottom: 14px;
    padding: 20px;
    background: #eaf0f6;
    font-size: 17px;
    font-weight: 600;
}

dialog.sn-dialog .sn-medical small {
    display: block;
    margin-bottom: 5px;
    font-size: 11px;
    font-weight: 400;
}

/* 通常リンク・折りたたみ見出し */

dialog.sn-dialog .sn-row,
dialog.sn-dialog .sn-group>summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 62px;
    margin: 0;
    padding: 16px 4px;
    border: 0;
    background: transparent;
    color: #354b70;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.6;
}

dialog.sn-dialog .sn-row,
dialog.sn-dialog .sn-group {
    border-bottom: 1px solid #cbd3df;
}

dialog.sn-dialog .sn-row>span {
    flex: 0 0 auto;
    font-size: 15px;
    color: #7189bb;
}

dialog.sn-dialog .sn-group {
    display: block;
    margin: 0;
    padding: 0;
    background: transparent;
}

dialog.sn-dialog .sn-group>summary {
    cursor: pointer;
    list-style: none;
}

dialog.sn-dialog summary::-webkit-details-marker {
    display: none;
}

dialog.sn-dialog .sn-group>summary::before,
dialog.sn-dialog .sn-group>summary::after {
    content: none;
}

dialog.sn-dialog .sn-plus {
    position: relative;
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
}

dialog.sn-dialog .sn-plus::before,
dialog.sn-dialog .sn-plus::after {
    content: "";
    position: absolute;
    inset: 7px 0 auto;
    height: 1px;
    background: #7189bb;
}

dialog.sn-dialog .sn-plus::after {
    transform: rotate(90deg);
    transition: transform 200ms ease;
}

dialog.sn-dialog .sn-group[open] .sn-plus::after {
    transform: rotate(0);
}

/* 折りたたみ内のリンク */

dialog.sn-dialog .sn-sub {
    margin: 0 0 18px;
    padding: 6px 16px;
    background: #fff;
}

dialog.sn-dialog .sn-group[open] .sn-sub {
    animation: sn-sub-appear 200ms ease-out both;
}

dialog.sn-dialog .sn-sub a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 52px;
    padding: 13px 0;
    font-size: 14px;
    line-height: 1.7;
}

dialog.sn-dialog .sn-sub a+a {
    border-top: 1px solid #edf0f4;
}

dialog.sn-dialog .sn-sub a span {
    flex: 0 0 auto;
    color: #7189bb;
}

dialog.sn-dialog a[aria-current="page"] {
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: #7189bb;
    text-underline-offset: 5px;
}

/* お問い合わせ */

dialog.sn-dialog .sn-contact {
    max-width: 600px;
    margin: 30px auto 0;
}

dialog.sn-dialog .sn-contact p {
    margin-bottom: 14px;
    font-size: 12px;
}

dialog.sn-dialog .sn-contact-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 58px;
    padding: 16px 20px;
    background: #354b70;
    color: #fff;
    font-size: 16px;
}

dialog.sn-dialog .sn-phone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80px;
    margin-top: 14px;
    font-family: Arial, sans-serif;
    font-size: 24px;
    letter-spacing: 0.04em;
}

dialog.sn-dialog .sn-phone span {
    margin-bottom: 4px;
    font-family: "Yu Gothic", sans-serif;
    font-size: 11px;
}

dialog.sn-dialog .sn-privacy {
    display: block;
    width: fit-content;
    max-width: 100%;
    margin: 18px auto 0;
    padding: 12px 0;
    font-size: 11px;
    color: #535e6e;
}

/* 幅1100px以下ではSPメニューに統一 */

@media (max-width: 1100px) {
    header.site-header .desktop-nav {
        display: none;
    }

    header.site-header .brand {
        min-width: 0;
        flex: 1 1 auto;
    }

    header.site-header .brand-name {
        min-width: 0;
        white-space: normal;
    }

    .site-header .sn-trigger {
        display: inline-flex;
        flex: 0 0 auto;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 7px;
        width: 60px;
        min-height: 52px;
        margin-left: 10px;
        padding: 6px 0;
        border: 0;
        background: transparent;
        color: #354b70;
        font-family: "Yu Gothic", sans-serif;
        font-size: 10px;
        line-height: 1.2;
        cursor: pointer;
    }

    .site-header .sn-trigger-icon {
        display: block;
        width: 24px;
        height: 10px;
        border-top: 1px solid currentColor;
        border-bottom: 1px solid currentColor;
    }
}

@keyframes sn-appear {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes sn-sub-appear {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {

    dialog.sn-dialog[open],
    dialog.sn-dialog .sn-group[open] .sn-sub {
        animation: none;
    }

    dialog.sn-dialog .sn-plus::after {
        transition: none;
    }
}