/* =====================================================
   ⭐ 推し活費詳細
   oshi-money.css
===================================================== */


/* =====================================================
   ページ本体
===================================================== */

.oshi-money-page {

    width: 100%;
    max-width: 100%;

    box-sizing: border-box;

    padding: 12px 12px 110px;

    overflow-x: hidden;

    writing-mode: horizontal-tb;
}


/* =====================================================
   共通リセット
===================================================== */

.oshi-money-page *,
.oshi-money-page *::before,
.oshi-money-page *::after {

    box-sizing: border-box;

    writing-mode: horizontal-tb;
}


/* =====================================================
   ヘッダー
===================================================== */

.oshi-money-header {

    width: 100%;
    max-width: 100%;

    display: grid;

    grid-template-columns:
        auto
        minmax(0, 1fr);

    align-items: center;

    gap: 10px;

    margin-bottom: 14px;
}


/* 戻るボタン */

.oshi-money-header button {

    flex-shrink: 0;

    width: auto;

    max-width: none;

    border: none;

    border-radius: 999px;

    padding: 8px 11px;

    background: rgba(255,255,255,0.9);

    color: inherit;

    font-size: 0.78rem;

    line-height: 1.2;

    white-space: nowrap;

    writing-mode: horizontal-tb;

    cursor: pointer;

    box-shadow:
        0 2px 7px rgba(0,0,0,0.07);
}


/* タイトル */

.oshi-money-header h2 {

    display: block;

    width: 100%;

    min-width: 0;

    margin: 0;

    padding: 0;

    font-size: 1.3rem;

    line-height: 1.4;

    font-weight: 700;

    white-space: nowrap;

    writing-mode: horizontal-tb;

    text-orientation: mixed;

    text-align: left;

    overflow: hidden;

    text-overflow: ellipsis;
}


/* =====================================================
   期間切り替え
===================================================== */

/* =====================================================
   📅 期間切り替え
   お金ページと同じ配色ルール
===================================================== */

.oshi-money-period {

    width: 100%;

    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 7px;

    margin-bottom: 14px;
}


/* 共通 */

.oshi-money-period button {

    width: 100%;

    min-width: 0;

    min-height: 42px;

    padding: 10px 5px;

    margin: 0;

    border: none;

    border-radius: 12px;

    background: rgba(0,0,0,0.06);

    color: #222 !important;

    font-size: 13px;

    font-weight: 400;

    line-height: 1.2;

    white-space: nowrap;

    writing-mode: horizontal-tb;

    cursor: pointer;

    transition:
        background 0.15s ease,
        color 0.15s ease,
        transform 0.1s ease;
}


/* 非選択 */

.oshi-money-period button:not(.active) {

    background: rgba(0,0,0,0.06);

    color: #222 !important;
}


/* 選択中 */

.oshi-money-period button.active {

    background: var(--accent) !important;

    color: #fff !important;

    font-weight: 700;

    box-shadow:
        0 2px 7px rgba(0,0,0,0.18);
}


/* 押した瞬間 */

.oshi-money-period button:active {

    transform: scale(0.98);
}


/* =====================================================
   今月の合計
===================================================== */

.oshi-money-total {

    width: 100%;

    margin-bottom: 15px;

    padding: 22px 16px;

    border-radius: 20px;

    text-align: center;

    background: rgba(255,255,255,0.92);

    box-shadow:
        0 5px 18px rgba(0,0,0,0.08);
}


.oshi-money-total-label {

    display: block;

    font-size: 0.85rem;

    line-height: 1.4;

    white-space: nowrap;

    writing-mode: horizontal-tb;

    opacity: 0.65;
}


.oshi-money-total-value {

    display: block;

    margin-top: 8px;

    font-size: clamp(2rem, 9vw, 2.8rem);

    font-weight: 800;

    line-height: 1.15;

    white-space: nowrap;

    writing-mode: horizontal-tb;
}


/* =====================================================
   推し別セクション
===================================================== */

.oshi-money-section {

    width: 100%;

    margin-bottom: 15px;

    padding: 16px 12px;

    border-radius: 18px;

    background: rgba(255,255,255,0.9);

    box-shadow:
        0 3px 14px rgba(0,0,0,0.06);
}


.oshi-money-section h3 {

    display: block;

    width: 100%;

    margin: 0 4px 10px;

    padding: 0;

    font-size: 1rem;

    line-height: 1.4;

    white-space: nowrap;

    writing-mode: horizontal-tb;

    text-align: left;
}


/* =====================================================
   推し別 行
===================================================== */

.oshi-money-person {

    width: 100%;

    max-width: 100%;

    min-width: 0;

    min-height: 48px;

    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        auto
        24px;

    align-items: center;

    gap: 10px;

    padding: 9px 7px;

    border: none;

    border-bottom:
        1px solid rgba(0,0,0,0.07);

    background: transparent;

    color: inherit;

    text-align: left;

    writing-mode: horizontal-tb;

    cursor: pointer;
}


.oshi-money-person:last-child {

    border-bottom: none;
}


/* 推し名 */

.oshi-money-person-name {

    min-width: 0;

    display: block;

    padding-left: 8px;

    font-size: 0.9rem;

    line-height: 1.4;

    white-space: nowrap;

    writing-mode: horizontal-tb;

    overflow: hidden;

    text-overflow: ellipsis;

    text-align: left;
}


/* 金額 */

.oshi-money-person-value {

    min-width: 80px;

    display: block;

    font-size: 0.92rem;

    font-weight: 700;

    line-height: 1.4;

    text-align: right;

    white-space: nowrap;

    writing-mode: horizontal-tb;
}


/* 矢印 */

.oshi-money-arrow {

    width: 24px;

    min-width: 24px;

    display: block;

    font-size: 1.35rem;

    line-height: 1;

    text-align: center;

    white-space: nowrap;

    writing-mode: horizontal-tb;

    opacity: 0.45;
}


/* =====================================================
   総合計
===================================================== */

.oshi-money-grand-total {

    width: 100%;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 12px;

    padding: 17px 15px;

    border-radius: 18px;

    background: rgba(255,255,255,0.94);

    box-shadow:
        0 4px 16px rgba(0,0,0,0.08);

    font-weight: 800;

    writing-mode: horizontal-tb;
}


.oshi-money-grand-total > div {

    min-width: 0;

    white-space: nowrap;

    writing-mode: horizontal-tb;

    text-align: left;
}


.oshi-money-grand-total strong {

    flex-shrink: 0;

    font-size: 1.2rem;

    line-height: 1.3;

    text-align: right;

    white-space: nowrap;

    writing-mode: horizontal-tb;
}


/* =====================================================
   ボタン押下
===================================================== */

.oshi-money-header button:active,
.oshi-money-period button:active,
.oshi-money-person:active {

    transform: scale(0.98);
}


/* =====================================================
   スマホ
===================================================== */

@media (max-width: 420px) {

    .oshi-money-page {

        padding-left: 10px;

        padding-right: 10px;

        padding-bottom: 110px;
    }


    .oshi-money-header {

        grid-template-columns:
            auto
            minmax(0, 1fr);

        gap: 8px;
    }


    .oshi-money-header button {

        padding: 7px 9px;

        font-size: 0.75rem;
    }


    .oshi-money-header h2 {

        font-size: 1.15rem;

        text-align: left;
    }


    .oshi-money-person {

        grid-template-columns:
            minmax(0, 1fr)
            auto
            22px;

        gap: 7px;

        padding-left: 4px;

        padding-right: 4px;
    }


    .oshi-money-person-name {

        padding-left: 5px;

        font-size: 0.85rem;
    }


    .oshi-money-person-value {

        min-width: 70px;

        font-size: 0.86rem;
    }


    .oshi-money-arrow {

        width: 22px;

        min-width: 22px;
    }

}


/* =====================================================
   極端に狭い画面
===================================================== */

@media (max-width: 350px) {

    .oshi-money-header h2 {

        font-size: 1rem;
    }


    .oshi-money-person-value {

        min-width: 62px;

        font-size: 0.82rem;
    }


    .oshi-money-period {

        gap: 5px;
    }


    .oshi-money-period button {

        font-size: 12px;

        padding-left: 3px;

        padding-right: 3px;
    }

}