@import url('https://fonts.googleapis.com/css2?family=Zen+Maru+Gothic:wght@400;700&display=swap');

/* 全体の競合を避けるためIDセレクタでカプセル化 */
#mag-frailty {
    --main-green: #45b09e;
    --main-orange: #f39c12;
    --text-color: #444;
    display: block;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    box-sizing: border-box;
}

#mag-frailty .article-wrapper {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    font-family: 'Zen Maru Gothic', sans-serif !important;
    font-size: 18px;
    color: var(--text-color);
    line-height: 1.7;
    text-align: left;
    box-sizing: border-box;
}

/* 親サイトCSSのリセット */
#mag-frailty h1,
#mag-frailty h2,
#mag-frailty h3,
#mag-frailty h4,
#mag-frailty h5,
#mag-frailty h6 {
    background: none;
    background-color: transparent;
    background-image: none;
    border: none;
    border-bottom: none;
    padding: 0;
    margin: 0;
    font-family: 'Zen Maru Gothic', sans-serif !important;
    line-height: 1.4;
    box-shadow: none;
}

#mag-frailty p {
    background: none;
    background-color: transparent;
    background-image: none;
    font-family: 'Zen Maru Gothic', sans-serif !important;
    font-size: 18px;
}

/* ヘッダー */
#mag-frailty .article-header {
    padding: 60px 30px 40px;
    text-align: center;
    background: linear-gradient(to bottom, #f0fcfb, #fff);
}

#mag-frailty .category-label {
    font-size: 12px;
    background: var(--main-green);
    color: #fff;
    padding: 4px 18px;
    border-radius: 20px;
    font-weight: bold;
    display: inline-block;
}

#mag-frailty .subtitle {
    color: var(--main-green);
    font-weight: bold;
    margin: 15px 0 5px;
    font-size: 18px;
}

#mag-frailty .main-copy {
    font-size: 36px;
    margin: 0;
    line-height: 1.3;
    color: var(--text-color);
}

#mag-frailty .orange-marker {
    color: var(--main-orange);
    position: relative;
    z-index: 1;
}

#mag-frailty .orange-marker::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 5px;
    width: 100%;
    height: 10px;
    background: #fff4e6;
    z-index: -1;
}

#mag-frailty .lead-text-box {
    margin-top: 30px;
    padding: 28px 30px;
    background: #fff;
    border-radius: 15px;
    border: 2px dashed #ddd;
    text-align: left;
    font-size: 18px;
}

/* セクション */
#mag-frailty .content-section {
    padding: 60px 35px;
}

#mag-frailty .section-heading,
#mag-frailty .section-heading-green,
#mag-frailty .section-heading-orange {
    text-align: center;
    font-size: 26px;
    margin-bottom: 35px;
    line-height: 1.5;
    font-weight: bold;
}

#mag-frailty .section-heading-green {
    color: var(--main-green);
}

#mag-frailty .section-heading-orange {
    color: var(--main-orange);
}

#mag-frailty .bg-pale-green {
    background-color: #f0fcfb;
}

#mag-frailty .body-text p {
    margin-bottom: 1.5em;
    font-size: 18px;
    line-height: 1.7;
}

/* グラフ */
#mag-frailty .data-viz-card {
    background: #fff;
    padding: 35px 25px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin: 30px 0;
    border: 1px solid #f0f0f0;
}

#mag-frailty .viz-title {
    text-align: center;
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 70px;
    color: #666;
}

#mag-frailty .bar-chart-flex {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 40px;
    height: 200px;
    margin-top: 20px;
}

#mag-frailty .bar-group {
    text-align: center;
    width: 90px;
    font-size: 15px;
}

#mag-frailty .bar {
    border-radius: 10px 10px 0 0;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    position: relative;
}

#mag-frailty .bar-gray {
    background: #ccc;
}

#mag-frailty .bar-main {
    background: var(--main-orange);
}

#mag-frailty .pop-label {
    position: absolute;
    top: -35px;
    background: #e74c3c;
    font-size: 13px;
    padding: 2px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

#mag-frailty .bold-text {
    font-weight: bold;
    margin-top: 10px;
}

/* 方程式 */
#mag-frailty .bone-formula-flex {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 40px 0;
}

#mag-frailty .circle-item {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 2px solid #ddd;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: bold;
}

#mag-frailty .green-border {
    border-color: var(--main-green);
    background: var(--main-green);
    color: #fff;
}

#mag-frailty .orange-fill {
    background: var(--main-orange);
    border: none;
    color: #fff;
}

#mag-frailty .circle-item small {
    font-size: 11px;
    font-weight: normal;
    margin-top: 2px;
}

#mag-frailty .symbol {
    font-weight: bold;
    color: var(--main-green);
    font-size: 23px;
}

#mag-frailty .bone-quality-label {
    background-color: #2da042;
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: bold;
    display: inline-block;
    font-size: 18px;
    line-height: 1.4;
}

/* 円グラフ */
#mag-frailty .composition-card {
    display: flex;
    align-items: center;
    gap: 30px;
    margin: 30px 0;
    background: #fff;
    padding: 25px;
    border-radius: 15px;
}

#mag-frailty .pie-chart-ui {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: conic-gradient(var(--main-green) 0% 26%, #eee 26% 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#mag-frailty .pie-inner {
    width: 80px;
    height: 80px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--main-green);
    line-height: 1;
}

#mag-frailty .pie-label {
    font-size: 11px;
    color: #444;
    margin-bottom: 2px;
}

#mag-frailty .pie-value {
    font-size: 20px;
}

#mag-frailty .pie-desc {
    font-size: 18px;
    text-align: left;
}

#mag-frailty .pie-desc p {
    font-size: 18px;
    line-height: 1.7;
}

#mag-frailty .caption-note {
    font-size: 14px !important;
    color: #999;
    margin-top: 8px;
}

/* 骨の画像比較 */
#mag-frailty .bone-comparison-box {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin: 30px 0;
}

#mag-frailty .bone-img-item {
    flex: 1;
    max-width: 300px;
    text-align: center;
}

#mag-frailty .bone-img-item img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

#mag-frailty .bone-img-caption {
    font-size: 16px;
    font-weight: bold;
    margin-top: 10px;
}

/* ステップ */
#mag-frailty .step-card {
    background: #fff;
    padding: 28px 30px;
    border-radius: 15px;
    border: 1px solid #f0f0f0;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

#mag-frailty .step-title-line {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
}

#mag-frailty .num {
    background: var(--main-orange);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

#mag-frailty .step-title-line h3 {
    margin: 0;
    font-size: 20px;
    color: var(--main-orange);
    font-weight: bold;
}

#mag-frailty .step-desc {
    margin: 0;
    font-size: 18px;
    color: #666;
    padding-left: 51px;
    line-height: 1.7;
}

/* 商品紹介 */
#mag-frailty .recommend-box {
    background: #fff4e6;
    padding: 60px 35px;
    text-align: center;
}

#mag-frailty .rec-title {
    font-size: 23px;
    color: var(--main-orange);
    margin-bottom: 30px;
    font-weight: bold;
    line-height: 1.4;
}

#mag-frailty .product-ui {
    background: #fff;
    padding: 30px;
    border-radius: 20px;
    display: flex;
    gap: 30px;
    text-align: left;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

#mag-frailty .p-img {
    flex: 1;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #f0f0f0;
}

#mag-frailty .p-img img {
    width: 100%;
    height: auto;
    display: block;
}

#mag-frailty .p-content {
    flex: 1.5;
}

#mag-frailty .p-brand {
    font-size: 13px;
    color: #999;
    margin-bottom: 5px;
}

#mag-frailty .p-name {
    font-size: 21px;
    margin: 0 0 10px 0;
    color: #333;
    font-weight: bold;
}

#mag-frailty .p-price {
    font-size: 26px;
    font-weight: bold;
    color: #e74c3c;
    margin-bottom: 15px;
}

#mag-frailty .p-price span {
    font-size: 13px;
    margin-left: 5px;
}

#mag-frailty .p-btn {
    display: block;
    background: var(--main-orange);
    color: #fff !important;
    text-align: center;
    padding: 16px;
    border-radius: 35px;
    text-decoration: none;
    font-weight: bold;
    font-size: 18px;
    transition: opacity 0.2s;
}

#mag-frailty .p-btn:hover {
    opacity: 0.8;
}

/* 戻るボタン */
#mag-frailty .btn_link_bottom {
    text-align: center;
    padding: 50px 0;
}

/* 統計グラフ */
#mag-frailty .chart-figure {
    margin: 0 0 1.5em 0;
}

#mag-frailty .chart-img {
    max-width: 80%;
    height: auto;
    display: block;
    margin: 0 auto;
}

#mag-frailty .source-caption {
    font-size: 13px;
    color: #666;
    margin-top: 1em;
    line-height: 1.4;
}

#mag-frailty .source-link {
    color: #0056b3;
    text-decoration: underline;
}

#mag-frailty .source-note {
    display: inline-block;
    margin-left: 0.5em;
}

/* 骨の健康要素まとめ */
#mag-frailty .bone-summary-box {
    background-color: #fff;
    border-radius: 20px;
    padding: 35px;
    margin-top: 60px;
}

#mag-frailty .bone-summary-heading {
    text-align: center;
    font-size: 26px;
    margin-top: 0;
    margin-bottom: 25px;
}

#mag-frailty .bone-formula-flex.is-summary {
    margin: 0 0 30px 0;
    justify-content: center;
}

#mag-frailty .circle-item.is-large {
    aspect-ratio: 1;
    height: auto;
    font-size: 21px;
}

#mag-frailty .bone-comp-img {
    border-radius: 20px;
    width: 100%;
    display: block;
}

#mag-frailty .bone-img-caption.is-large {
    font-size: 16px;
    font-weight: bold !important;
    margin-bottom: 5px;
    text-align: center;
}

#mag-frailty .bone-img-desc {
    font-size: 14px;
    margin-top: 0;
    text-align: left;
}

/* スマホ対応 */
@media (max-width: 600px) {
    #mag-frailty .main-copy {
        font-size: 26px;
    }

    #mag-frailty .bar-chart-flex {
        gap: 20px;
    }

    #mag-frailty .circle-item {
        width: 80px;
        height: 80px;
        font-size: 13px;
    }

    #mag-frailty .composition-card {
        flex-direction: column;
        text-align: center;
    }

    #mag-frailty .product-ui {
        flex-direction: column;
    }

    #mag-frailty .step-desc {
        padding-left: 0;
        margin-top: 10px;
    }

    #mag-frailty .bone-comparison-box {
        flex-direction: column;
        align-items: center;
    }
}
