/* ==========================================
   全体
========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {

    font-family: "Yu Gothic UI", "Yu Gothic", sans-serif;
    background: #ffffff;
    color: #333333;

    max-width: 720px;
    margin: 40px auto;
    padding: 20px;

    line-height: 1.7;

}


/* ==========================================
   タイトル
========================================== */

h1 {

    text-align: center;
    margin-bottom: 35px;

    font-size: 2rem;

}

.description{

    margin-bottom:24px;

    line-height:1.8;

}

/* ==========================================
   性別
========================================== */

.gender-area {

    margin-bottom: 30px;
    padding: 18px;

    border: 1px solid #dddddd;
    border-radius: 10px;

    background: #fafafa;

}

.gender-title {

    margin-bottom: 12px;

    font-weight: bold;

}

.gender-options {

    display: flex;
    gap: 30px;

}

.gender-options label {

    display: flex;
    align-items: center;

    gap: 7px;

    cursor: pointer;

}

.gender-options input[type="radio"] {

    cursor: pointer;

}

/* ==========================================
   能力値一覧
========================================== */

.status-list {

    display: flex;
    flex-direction: column;
    gap: 15px;

    margin-bottom: 35px;

}

.status {

    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 20px;

    padding: 14px;

    border: 1px solid #dddddd;
    border-radius: 10px;

    background: #fafafa;

}

.status-heading {

    display: grid;
    flex: 1;
    gap: 2px;

    min-width: 0;

}


/* 能力名 */

.label {

    font-weight: bold;
    letter-spacing: 0.08em;

    text-align: left;

}

.status-description {

    color: #666666;

    font-size: 0.88rem;
    line-height: 1.5;

}

.status-controls {

    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center; /* 追加・MIN&MAX用 */
    gap: 12px;

}


/* 数値 */

.value {

    width: 40px;

    text-align: center;

    font-size: 1.4rem;

    font-weight: bold;

}


/* ==========================================
   ボタン
========================================== */

button {

    cursor: pointer;

    border: 1px solid #cccccc;
    border-radius: 6px;

    background: white;
    color: #333333;
    -webkit-text-fill-color: currentColor;

    padding: 8px 14px;

    font-size: 1rem;

    transition: 0.2s;

}

button:hover {

    background: #f0f0f0;

}

button:active {

    transform: scale(0.96);

}

button:disabled {

    background: #eeeeee;
    color: #999999;
    -webkit-text-fill-color: #999999;

    cursor: not-allowed;

}


/* ＋－ボタン */

.plus,
.minus {

    width: 42px;
    height: 42px;

    font-size: 1.2rem;

}

/* MIN / MAX ボタン */
.set-min,
.set-max {
    min-width: 48px;
    height: 34px;

    padding: 0 8px;

    font-size: 0.72rem;
    font-weight: bold;
    letter-spacing: 0.04em;

    color: #555555;
    background: #f7f7f7;

    border: 1px solid #cccccc;
    border-radius: 6px;
}

.set-min:hover,
.set-max:hover {
    background: #eeeeee;
}


/* ==========================================
   補足アコーディオン
========================================== */

.text-accordion {

    margin-bottom: 35px;

    border: 1px solid #dddddd;
    border-radius: 10px;

    background: #fafafa;

    overflow: hidden;

}

.text-accordion summary {

    position: relative;

    padding: 14px 48px 14px 18px;

    font-weight: bold;

    cursor: pointer;
    user-select: none;

    list-style: none;

    transition: background 0.2s;

}

.text-accordion summary:hover {

    background: #f0f0f0;

}

/* 標準の三角マーカーを非表示 */
.text-accordion summary::-webkit-details-marker {

    display: none;

}

/* 右側の開閉マーク */
.text-accordion summary::after {

    content: "＋";

    position: absolute;
    top: 50%;
    right: 18px;

    transform: translateY(-50%);

    color: #666666;

    font-size: 1.2rem;
    font-weight: normal;

}

.text-accordion[open] summary::after {

    content: "−";

}

.text-accordion[open] summary {

    border-bottom: 1px solid #dddddd;

}

.text-accordion p {

    margin: 0;
    padding: 16px 18px 18px;

    color: #555555;

    line-height: 1.8;

}

/* キーボード操作時 */
.text-accordion summary:focus-visible {

    outline: 2px solid #777777;
    outline-offset: -2px;

}

/* ==========================================
   成長ボーナス
========================================== */

.bonus-accordion {

    margin-bottom: 35px;

    border: 1px solid #d4d4d4;
    border-radius: 10px;

    background: #fafafa;

    overflow: hidden;

}


/* 見出し */
.bonus-accordion > summary {

    position: relative;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 16px;

    padding: 14px 48px 14px 18px;

    font-weight: bold;

    cursor: pointer;
    user-select: none;

    list-style: none;

    transition: background 0.2s;

}


.bonus-accordion > summary:hover {

    background: #f0f0f0;

}


.bonus-accordion > summary::-webkit-details-marker {

    display: none;

}


/* 開閉マーク */
.bonus-accordion > summary::after {

    content: "＋";

    position: absolute;

    top: 50%;
    right: 18px;

    transform: translateY(-50%);

    color: #666666;

    font-size: 1.2rem;
    font-weight: normal;

}


.bonus-accordion[open] > summary::after {

    content: "−";

}


.bonus-accordion[open] > summary {

    border-bottom: 1px solid #dddddd;

}


/* summary右側 */
.bonus-summary-info {

    margin-left: auto;

    color: #777777;

    font-size: 0.85rem;
    font-weight: normal;

}


.bonus-summary-info strong {

    color: #333333;

    font-size: 1rem;

}


/* アコーディオン内部 */
.bonus-content {

    padding: 18px;

}


/* 説明文 */
.bonus-description {

    margin: 0 0 18px;

    color: #555555;

    font-size: 0.9rem;
    line-height: 1.8;

}


/* 獲得総ポイント */
.bonus-total {

    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 16px;

    padding: 10px 14px;

    background: #f1f1f1;

    border-radius: 7px;

    color: #555555;

}


.bonus-point-count {
    color: #333333;
    font-size: 1.05rem;

    display: flex;
    align-items: baseline;
    gap: 5px;
}

.bonus-point-separator {
    color: #999999;
    font-weight: normal;
}

.bonus-point-unit {
    margin-left: 2px;
    font-size: 0.8em;
    font-weight: normal;
    color: #777777;
}


/* 8能力値 */
.bonus-list {

    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 10px;

}


.bonus-item {

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;

    padding: 10px 12px;

    border: 1px solid #dddddd;
    border-radius: 8px;

    background: white;

}


.bonus-stat-name {

    min-width: 36px;

    font-weight: bold;
    letter-spacing: 0.04em;

    color: #444444;

}


/* ＋−操作 */
.bonus-controls {

    display: flex;
    align-items: center;

    gap: 6px;

}


.bonus-minus,
.bonus-plus {

    width: 32px;
    height: 32px;
    padding: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #cccccc;
    border-radius: 6px;

    background: #f8f8f8;
    color: #333333;

    font-size: 1rem;

    cursor: pointer;

}


.bonus-minus:hover,
.bonus-plus:hover {

    background: #eeeeee;

}


.bonus-minus:disabled,
.bonus-plus:disabled {

    color: #aaaaaa;

    background: #eeeeee;

    cursor: not-allowed;

}

/* 0 / ALL 補助ボタン */
.bonus-reset,
.bonus-plus-ten {

    min-width: 34px;
    height: 26px;

    padding: 0 6px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #d2d2d2;
    border-radius: 5px;

    background: #f5f5f5;
    color: #666666;

    font-size: 0.68rem;
    font-weight: bold;
    letter-spacing: 0.02em;

    cursor: pointer;

    transition: background 0.2s;

}

.bonus-reset:hover,
.bonus-plus-ten:hover {

    background: #e9e9e9;

}

.bonus-reset:disabled,
.bonus-plus-ten:disabled {

    color: #aaaaaa;
    background: #eeeeee;

    cursor: not-allowed;

}


.bonus-value {

    min-width: 30px;

    text-align: center;

    font-weight: bold;

    color: #333333;

}

/* ==========================================
   ボーナス加算後の判定目標値
========================================== */

.bonus-target-area {

    margin-top: 20px;

    padding-top: 18px;

    border-top: 1px solid #dddddd;

}


.bonus-target-heading {

    margin-bottom: 12px;

    color: #555555;

    font-size: 0.85rem;
    font-weight: bold;
    letter-spacing: 0.03em;

}


.bonus-target-list {

    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 8px;

}


.bonus-target-item {

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 8px;

    padding: 9px 11px;

    background: #f3f3f3;

    border-radius: 6px;

    color: #666666;

    font-size: 0.8rem;

}


.bonus-target-item strong {

    color: #333333;

    font-size: 1rem;

}


/* ==========================================
   レーダーチャート
========================================== */

.chart-area{

    display:flex;

    justify-content:center;

    margin:35px 0;

}

#radar-chart{

    max-width:360px;
    width:100%;
    height:auto;

}

/* ==========================================
   合計・残りポイント
========================================== */

#total,
#remain {

    font-weight: bold;

}

p {

    margin-bottom: 12px;

}


/* ==========================================
   下部ボタン
========================================== */

#random-btn,
#confirm-btn,
#simulation-start-btn {

    display: block;

    width: 100%;

    margin-top: 18px;

    padding: 14px;

    font-size: 1rem;

}


/* ==========================================
   フッター
========================================== */

footer {

    margin-top: 60px;
    padding-top: 20px;

    border-top: 1px solid #dddddd;

    text-align: center;

    color: #666666;

    font-size: 0.9rem;

}

footer p {

    margin-bottom: 6px;

}


/* ==========================================
   スマートフォン
========================================== */

@media (max-width: 600px) {

    body {
        margin: 20px auto;
        padding: 16px;
    }

    h1 {
        font-size: 1.6rem;
    }

    .status {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .status-heading {
        text-align: center;
    }

    .label {
        text-align: center;
    }

    .status-controls {
        justify-content: center;
        gap: 6px;
    }

    .set-min,
    .set-max {
        min-width: 44px;
        padding: 0 6px;
        font-size: 0.68rem;
    }

    .gender-options {
        gap: 18px;
    }

    /* 成長ボーナス振り分け用 */
    .bonus-accordion > summary {
        padding-left: 14px;
    }


    .bonus-summary-info {
        font-size: 0.78rem;
    }


    .bonus-content {
        padding: 14px;
    }


    .bonus-list {
        grid-template-columns: 1fr;
    }


    .bonus-item {
        padding: 9px 10px;
    }

    .bonus-target-list {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }


    .bonus-controls {
        gap: 5px;
    }


    .bonus-reset,
    .bonus-plus-ten {
        min-width: 31px;
        padding: 0 5px;
        font-size: 0.64rem;
    }
}
