/* --- 1. セクション全体 --- */
.charm-section {
    padding: 40px 20px 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* 複数カードがある場合に折り返す */
    gap: 20px;       /* カード間の隙間 */
}

/* --- 2. カードの基本構造 --- */
.charm-card {
    position: relative;
    width: 100%;           /* デフォルト（スマホ）は100% */
    max-width: 600px;      /* PCで広がりすぎない上限 */
    background: #fff;
    border: 2px solid #C8A040;
    padding: 24px 32px 28px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    box-sizing: border-box; /* paddingを含めたサイズ計算 */
}

/* PC（画面幅が広い時）は横幅を半分にする（必要に応じて） */
@media screen and (min-width: 992px) {
    .charm-card {
        width: 48%; 
    }
}

/* --- 3. 五線譜・ト音記号の装飾 --- */
.staff-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.sg {
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: #c5cdd8;
    box-shadow: 0 12px 0 #c5cdd8, 0 24px 0 #c5cdd8, 0 36px 0 #c5cdd8, 0 48px 0 #c5cdd8;
}

.sg:nth-child(1) { top: 60px; }
.sg:nth-child(2) { top: 160px; }
.sg:nth-child(3) { top: 260px; }
.sg:nth-child(4) { top: 360px; }

.clef {
    position: absolute;
    left: 10px;
    top: 40px;
    font-size: 90px;
    line-height: 1;
    color: #c5cdd8;
    opacity: .2;
    z-index: 0;
    pointer-events: none;
    user-select: none;
}

/* --- 4. タイトル部分 --- */
.charm-title-row {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
}

.t-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(to right, transparent, #C8A040);
}

.t-line:last-child {
    background: linear-gradient(to left, transparent, #C8A040);
}

.charm-title {
    font-family: 'Hiragino Mincho ProN', 'Yu Mincho', serif;
    font-size: 30px;
    font-weight: 700;
    letter-spacing: 4px;
    color: #2C1505;
    white-space: nowrap;
    padding: 4px 12px;
    background: linear-gradient(135deg, rgba(232, 192, 96, .18), rgba(212, 168, 64, .08));
    text-shadow: 0 1px 4px rgba(180, 120, 20, .25);
}

/* --- 5. リスト部分 --- */
.charm-list {
    position: relative;
    z-index: 1;
    list-style: none;
    margin: 0 auto 24px;
    width: fit-content;
    padding: 0;
}

.charm-list li {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px dashed rgba(200, 160, 64, .3);
    font-size: 19px;
    font-weight: 700;
    color: #2C1505;
    line-height: 1.5;
}

.charm-list li:last-child {
    border-bottom: none;
}

.charm-list .n {
    color: #C8A040;
    min-width: 18px;
    text-align: right;
    font-size: 17px;
}

/* --- 6. 診断ボタン --- */
.btn-diagnosis {
    position: relative;
    z-index: 1;
    display: block;
    width: 70%;
    margin: 0 auto;
    padding: 16px 0;
    border-radius: 15px;
    background: linear-gradient(160deg, #fdf2d8 0%, #f0d090 100%);
    border: 2px solid #C8A040;
    color: #2C1505;
    font-family: 'Hiragino Mincho ProN', 'Yu Mincho', serif;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 4px;
    cursor: pointer;
    box-shadow: 0 6px 0 #9a6e18, 0 9px 18px rgba(80, 40, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .55);
    transition: all .12s;
    text-align: center;
    text-decoration: none;
}

.btn-diagnosis:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 0 #9a6e18, 0 12px 22px rgba(80, 40, 0, .32);
}

.btn-diagnosis:active {
    transform: translateY(5px);
    box-shadow: 0 1px 0 #9a6e18, 0 3px 8px rgba(80, 40, 0, .2);
}

/* --- 7. 【重要】レスポンシブ（スマホ用調整） --- */
@media screen and (max-width: 768px) {
    .charm-section {
        padding: 30px 15px 0;
    }
    
    .charm-card {
        padding: 20px 15px 25px;
    }

    .charm-title {
        font-size: 20px;
        letter-spacing: 2px;
        padding: 4px 8px;
    }

    .charm-list li {
        font-size: 16px;
        gap: 8px;
    }

    .btn-diagnosis {
        width: 90%;
        font-size: 18px;
        letter-spacing: 2px;
    }

    .clef {
        font-size: 70px;
        top: 30px;
        left: 5px;
    }
}

/* 400px以下の極小画面 */
@media screen and (max-width: 400px) {
    .t-line {
        display: none;
    }
    .charm-title-row {
        justify-content: center;
    }
    .charm-title {
        font-size: 17px;
    }
}