#medicalCooperation {
    color: #302a27;
    font-family: "ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro", "メイリオ", Meiryo, Osaka, "ＭＳ Ｐゴシック", "MS PGothic", sans-serif;
    line-height: 1.75;
}

#medicalCooperation * {
    box-sizing: border-box;
}

.cooperationIntro {
    margin-bottom: 28px;
    padding: 0 0 24px;
    border-bottom: 1px solid #d6d0ca;
    background: #fff;
}

.cooperationCase {
    margin: 0 0 34px;
    padding: 22px;
    border: 1px solid #d6d0ca;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(56, 49, 48, 0.08);
}

#primary .cooperationCase h3 {
    display: flex;
    align-items: baseline;
    margin: 0 0 22px;
    padding: 0 0 12px;
    border: 0;
    border-bottom: 2px solid #77a43d;
    border-radius: 0;
    background: none;
    color: #3c5724;
    font-size: 1.2em;
    font-weight: normal;
    line-height: 1.55;
}

.caseNumber {
    display: inline-block;
    flex: 0 0 auto;
    width: auto;
    height: auto;
    margin: 0 8px 0 0;
    background: transparent;
    color: #3c5724;
    font-size: 1em;
    line-height: inherit;
}

.cooperationFlow {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 172px minmax(0, 1fr);
    gap: 12px;
    align-items: stretch;
}

.medicalParty {
    height: 230px;
    border: 3px solid #398362;
    background: #fffef7;
}

.medicalParty.centerParty {
    border-color: #214c8d;
    background: #fff;
}

.partyName {
    margin: 0;
    padding: 10px 12px;
    background: #eaf3dd;
    color: #315d47;
    font-size: 1.18em;
    font-weight: normal;
    line-height: 1.4;
    text-align: center;
}

.centerParty .partyName {
    background: #edf3fb;
    color: #214c8d;
}

.partyName span {
    font-size: 0.82em;
}

.feeRows {
    padding: 16px 14px;
}

.feeRow {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    justify-content: space-between;
    line-height: 1.45;
}

.feeRow span {
    min-width: 0;
}

.feeRow strong {
    flex: 0 0 auto;
    color: #193d72;
    font-size: 1.25em;
    font-weight: normal;
    white-space: nowrap;
}

.familyDoctor .feeRow strong {
    color: #398362;
}

.feeRow small {
    font-size: 0.83em;
}

.feePlus {
    padding: 2px 0;
    font-size: 1.45em;
    line-height: 1;
    text-align: center;
}

.purpose {
    margin: 16px 0 0;
    color: #31435d;
    font-weight: normal;
    text-align: center;
}

.flowExchange {
    display: flex;
    flex-direction: column;
    gap: 28px;
    align-self: center;
}

.arrow {
    position: relative;
    margin: 0;
    padding: 9px 10px;
    border: 3px solid #398362;
    background: #f4f8df;
    color: #304b3e;
    font-size: 0.78em;
    font-weight: normal;
    line-height: 1.35;
    text-align: center;
}

.arrowToCenter::after {
    position: absolute;
    top: 50%;
    right: -17px;
    width: 0;
    height: 0;
    border-top: 13px solid transparent;
    border-bottom: 13px solid transparent;
    border-left: 17px solid #398362;
    content: "";
    transform: translateY(-50%);
}

.arrowToDoctor {
    border-color: #214c8d;
    background: #edf3fb;
    color: #214c8d;
}

.arrowToDoctor::before {
    position: absolute;
    top: 50%;
    left: -17px;
    width: 0;
    height: 0;
    border-top: 13px solid transparent;
    border-right: 17px solid #214c8d;
    border-bottom: 13px solid transparent;
    content: "";
    transform: translateY(-50%);
}

.singleDirection .flowExchange {
    justify-content: center;
}

.contactParty {
    display: block;
}

.contactParty .partyName {
    margin-bottom: 24px;
}

.contactLine {
    margin: 0;
    padding: 0 12px;
    font-size: 1.05em;
    line-height: 1.6;
    text-align: center;
}

.caseDescription {
    margin: 20px 0 0;
    padding: 16px 18px;
    border-radius: 5px;
    background: #f7f5f2;
    font-size: 0.95em;
}

.medicalContact {
    padding: 22px;
    border: 2px solid #ed9a42;
    border-radius: 8px;
    background: #fffaf2;
    text-align: center;
}

.medicalContact p {
    margin: 0;
}

.medicalContact .contactTitle {
    margin-bottom: 6px;
    color: #b65c12;
    font-size: 1.3em;
    font-weight: normal;
}

.medicalContact .contactTel {
    margin-top: 8px;
    font-size: 1.8em;
    font-weight: normal;
    line-height: 1.2;
}

.medicalContact .contactTel a {
    color: #b65c12;
    text-decoration: none;
}

#primary h2 {
    display: block;
    overflow: visible;
    width: 850px;
    max-width: 96%;
    height: auto !important;
    margin: 0 auto;
    padding: 0;
    border: none;
    background: none;
    color: inherit;
    text-indent: 0;
}

#primary h2 img {
    display: block;
    width: 100%;
    max-width: 850px;
    height: auto;
}

#primary h2 .mobileH2Text {
    display: none;
}

#primary #priInner {
    padding-top: 18px;
}

@media only screen and (max-width: 1150px) {
    .cooperationFlow {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .medicalParty {
        width: 100%;
        height: auto;
        min-height: 0;
    }

    .flowExchange {
        width: calc(100% - 34px);
        gap: 44px;
        margin: 16px 0 18px;
    }

    .singleDirection .flowExchange {
        gap: 16px;
        margin: 12px 0 18px;
    }

    .arrowToCenter::after {
        top: auto;
        right: auto;
        bottom: -17px;
        left: 50%;
        border-top: 17px solid #398362;
        border-right: 13px solid transparent;
        border-bottom: 0;
        border-left: 13px solid transparent;
        transform: translateX(-50%);
    }

    .arrowToDoctor::before {
        top: -17px;
        left: 50%;
        border-top: 0;
        border-right: 13px solid transparent;
        border-bottom: 17px solid #214c8d;
        border-left: 13px solid transparent;
        transform: translateX(-50%);
    }
}

@media only screen and (max-width: 768px) {
    #primary h2 {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 10px 15px;
        border-top: 1px solid #211614;
        color: #67a61d;
        font-size: 150%;
        font-weight: lighter;
        line-height: 1.4;
        box-sizing: border-box;
    }

    #primary h2 img {
        display: none;
    }

    #primary h2 .mobileH2Text {
        display: block;
    }

    .cooperationIntro {
        padding: 0 0 20px;
    }

    .cooperationCase {
        margin-bottom: 24px;
        padding: 16px 12px;
    }

    #primary .cooperationCase h3 {
        font-size: 1.08em;
    }

    .feeRow {
        font-size: 0.95em;
    }

    .caseDescription {
        padding: 14px;
    }

    .medicalContact .contactTel {
        font-size: 1.55em;
    }
}

@media print {
    .cooperationCase {
        break-inside: avoid;
        box-shadow: none;
    }
}
