/* =========================================================
   アプローチスコアカード専用CSS
   takefu_score.php 専用
========================================================= */

.score-page {
    width: 100%;
    box-sizing: border-box;
    padding: 20px 10px 40px;
}

.score-screen {
    width: 100%;
}


/* =========================================================
   注意事項
========================================================= */

.notice-container {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    padding: 24px 20px;
    box-sizing: border-box;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.notice-header {
    text-align: center;
    margin-bottom: 20px;
}

.notice-header h1 {
    margin: 0 0 8px;
    font-size: 24px;
    line-height: 1.4;
}

.notice-header p {
    margin: 0;
    font-size: 13px;
}

.notice-content {
    padding: 16px;
    background: #f7f7f7;
    border-radius: 8px;
}

.notice-content ul {
    margin: 0;
    padding-left: 20px;
}

.notice-content li {
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.6;
}

.notice-content li:last-child {
    margin-bottom: 0;
}

.agreement-check {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.agreement-check input {
    width: 22px;
    height: 22px;
    margin: 0;
    cursor: pointer;
}

.notice-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.agree-button {
    width: 100%;
    height: 52px;
    border: none;
    border-radius: 8px;
    background: #2f7d4a;
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.agree-button:disabled {
    background: #cccccc;
    color: #888888;
    cursor: not-allowed;
}

.agree-button:not(:disabled):active {
    transform: scale(0.98);
}

.back-button {
    width: 100%;
    height: 48px;
    border: 1px solid #cccccc;
    border-radius: 8px;
    background: #ffffff;
    color: #333333;
    font-size: 15px;
    cursor: pointer;
}

.back-button:active {
    transform: scale(0.98);
}


/* =========================================================
   スコア入力ページ
========================================================= */

.score-container {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    box-sizing: border-box;
    background: #ffffff;
    border-radius: 12px;
    padding: 20px 12px 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.score-header {
    text-align: center;
    margin-bottom: 18px;
}

.round-page-number {
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 1px;
}

.score-header h1 {
    margin: 0 0 6px;
    font-size: 26px;
    line-height: 1.3;
}

.score-header p {
    margin: 0;
    font-size: 13px;
}


/* =========================================================
   ホール入力
========================================================= */

.score-input-area {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.score-hole {
    display: grid;
    grid-template-columns: 45px 1fr 145px 45px;
    align-items: center;
    min-height: 68px;
    border: 1px solid #dddddd;
    border-radius: 8px;
    background: #fafafa;
}

.hole-number {
    text-align: center;
}

.hole-number span {
    font-size: 22px;
    font-weight: bold;
}

.hole-number small {
    font-size: 12px;
}

.recommended-score {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.recommended-score span {
    font-size: 11px;
}

.recommended-score strong {
    font-size: 15px;
}

.score-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.score-button {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: #eeeeee;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.score-button:active {
    transform: scale(0.92);
}

.score-value {
    width: 38px;
    text-align: center;
}

.score-number {
    font-size: 24px;
    font-weight: bold;
}

.score-difference {
    text-align: center;
}

.difference-value {
    font-size: 18px;
    font-weight: bold;
}


/* =========================================================
   各周合計
========================================================= */

.round-total {
    margin-top: 10px;
    padding: 10px;
    border-radius: 8px;
    background: #eeeeee;
}

.round-total-label {
    margin-bottom: 6px;
    text-align: center;
    font-size: 14px;
    font-weight: bold;
}

.round-total-values {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    text-align: center;
}

.round-total-values div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.round-total-values span {
    font-size: 11px;
}

.round-total-values strong {
    font-size: 20px;
}


/* =========================================================
   周のページ移動
========================================================= */

.next-round-button,
.previous-round-button,
.finish-round-button {
    box-sizing: border-box;
    height: 52px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}


/* =========================================================
   次の周へ
========================================================= */

.next-round-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: 16px;
    padding: 0;
    border: none;
    background: #2f7d4a;
    color: #ffffff;
}

.next-round-button span {
    font-size: 26px;
    line-height: 1;
}


/* =========================================================
   周ナビゲーション
========================================================= */

.round-navigation {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    width: 100%;
    margin-top: 16px;
}


/* 2列配置の中では次へボタンの余白をリセット */

.round-navigation .next-round-button {
    width: 100%;
    margin-top: 0;
}


/* =========================================================
   前の周へ
========================================================= */

.previous-round-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 1px solid #cccccc;
    background: #ffffff;
    color: #333333;
}

.previous-round-button span {
    font-size: 26px;
    line-height: 1;
}


/* =========================================================
   最終結果へ
========================================================= */

.finish-round-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin: 0;
    padding: 0;
    border: none;
    background: #2f7d4a;
    color: #ffffff;
}

.finish-round-button span {
    font-size: 26px;
    line-height: 1;
}


/* =========================================================
   ボタン押下時
========================================================= */

.next-round-button:active,
.previous-round-button:active,
.finish-round-button:active,
.create-scorecard-button:active {
    transform: scale(0.98);
}


/* =========================================================
   最終結果
========================================================= */

.result-rounds {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.result-round {
    display: grid;
    grid-template-columns: 1fr 1fr 60px;
    align-items: center;
    min-height: 54px;
    padding: 0 14px;
    box-sizing: border-box;
    border: 1px solid #dddddd;
    border-radius: 8px;
    background: #fafafa;
}

.result-round span {
    font-size: 14px;
    font-weight: bold;
}

.result-round-score {
    text-align: center;
    font-size: 22px;
}

.result-round-difference {
    text-align: right;
    font-size: 16px;
    font-weight: bold;
}

.grand-total {
    margin-top: 18px;
    padding: 14px 10px;
    border-radius: 10px;
    background: #2f7d4a;
    color: #ffffff;
}

.grand-total-title {
    margin-bottom: 8px;
    text-align: center;
    font-size: 17px;
    font-weight: bold;
    letter-spacing: 1px;
}

.grand-total-values {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    text-align: center;
}

.grand-total-values div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.grand-total-values span {
    font-size: 11px;
}

.grand-total-values strong {
    font-size: 25px;
}

.result-back-button {
    margin-top: 12px;
}


/* =========================================================
   結果を画像として保存
========================================================= */

.create-scorecard-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 52px;
    margin-top: 12px;
    padding: 0 16px;
    box-sizing: border-box;
    border: none;
    border-radius: 8px;
    background: #2f7d4a;
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}


/* =========================================================
   画像共有・保存ボタン
========================================================= */

.create-scorecard-button.share-ready {
    background: #d32f2f;
}


/* =========================================================
   武生HPに戻るボタン
========================================================= */

.back-home-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 52px;
    margin-top: 12px;
    padding: 0 16px;
    box-sizing: border-box;
    border-radius: 8px;
    background: #666666;
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.back-home-button:active {
    background: #555555;
}


/* =========================================================
   PNG生成用
========================================================= */

#scorecard-output {
    position: absolute;
    left: -99999px;
    top: 0;
    width: 405px;
    height: 720px;
}

.scorecard-image {
    width: 405px;
    height: 720px;
    box-sizing: border-box;
    padding: 18px;
    background: #ffffff;
    border: 1px solid #dddddd;
}


/* =========================================================
   PNGタイトル
========================================================= */

.scorecard-title {
    text-align: center;
    margin-bottom: 10px;
}

.scorecard-title h2 {
    margin: 0;
    font-size: 22px;
    line-height: 1.3;
    letter-spacing: 1px;
}

.scorecard-title p {
    margin: 5px 0 0;
    font-size: 12px;
}


/* =========================================================
   各周
========================================================= */

.scorecard-round {
    margin-bottom: 10px;
}

.scorecard-round h3 {
    margin: 0 0 4px;
    padding: 5px;
    text-align: center;
    background: #eeeeee;
    font-size: 13px;
    line-height: 1.2;
    letter-spacing: 1px;
}


/* =========================================================
   スコア表
========================================================= */

.scorecard-table {
    width: 100%;
    border-top: 1px solid #cccccc;
    border-left: 1px solid #cccccc;
}

.scorecard-table-row {
    display: grid;
    grid-template-columns: 45px repeat(6, 1fr);
    min-height: 24px;
}

.scorecard-table-row span {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border-right: 1px solid #cccccc;
    border-bottom: 1px solid #cccccc;
    font-size: 12px;
    line-height: 1;
}

.scorecard-table-row:first-child {
    font-weight: bold;
    background: #f3f3f3;
}

.scorecard-table-row .table-label {
    font-weight: bold;
    background: #f3f3f3;
}


/* =========================================================
   各周の合計
========================================================= */

.scorecard-round-total {
    display: grid;
    grid-template-columns: 1fr 70px 55px;
    align-items: center;
    min-height: 24px;
    margin-top: 3px;
    padding: 0 8px;
    box-sizing: border-box;
    background: #eeeeee;
}

.scorecard-round-total span {
    font-size: 11px;
    font-weight: bold;
}

.scorecard-round-total strong {
    text-align: center;
    font-size: 13px;
}


/* =========================================================
   18ホール総合計
========================================================= */

.scorecard-grand-total {
    margin-top: 8px;
    padding: 9px 8px;
    border: 2px solid #333333;
}

.grand-total-heading {
    margin-bottom: 6px;
    text-align: center;
    font-size: 15px;
    font-weight: bold;
    letter-spacing: 1px;
}

.grand-total-result {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    text-align: center;
}

.grand-total-result div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.grand-total-result span {
    font-size: 9px;
}

.grand-total-result strong {
    font-size: 19px;
}


/* =========================================================
   PNGフッター
========================================================= */

.scorecard-footer {
    margin-top: 9px;
    text-align: center;
}

.scorecard-footer p {
    margin: 0;
    font-size: 10px;
}


/* ========================================
   スコアカード スタート画面
======================================== */

.score-start-page {
    width: 100%;
    padding: 30px 10px 50px;
    box-sizing: border-box;
}

.score-start {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 30px 20px;
    box-sizing: border-box;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
}

.score-start h1 {
    margin: 0;
    text-align: center;
    font-size: 1.5rem;
}

.score-start h2 {
    margin: 10px 0 30px;
    text-align: center;
    font-size: 1.8rem;
}

.score-start-notice {
    margin-bottom: 25px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background-color: #fff;
    box-sizing: border-box;
}

.score-start-notice h3 {
    margin: 0 0 15px;
    text-align: center;
    font-size: 1.1rem;
}

.score-start-notice ul {
    margin: 0;
    padding-left: 1.4em;
}

.score-start-notice li {
    margin-bottom: 10px;
    line-height: 1.6;
}

.score-start-notice li:last-child {
    margin-bottom: 0;
}

.score-start-check {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    font-weight: bold;
    cursor: pointer;
}

.score-start-check input {
    width: 20px;
    height: 20px;
    margin: 0;
    cursor: pointer;
}

.score-start-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 55px;
    margin: 0 auto 15px;
    box-sizing: border-box;
    border-radius: 10px;
    background-color: #2f7d4a;
    color: #fff;
    font-size: 1.2rem;
    font-weight: bold;
    text-decoration: none;
    transition: opacity 0.2s;
}

.score-start-button:hover {
    opacity: 0.85;
}

.score-start-button.disabled {
    background-color: #aaa;
    opacity: 0.6;
    cursor: default;
}

.score-start-home-button {
    display: block;
    text-align: center;
    color: #555;
    font-size: 0.95rem;
    text-decoration: underline;
}

@media screen and (max-width: 480px) {

    .score-start-page {
        padding: 20px 10px 40px;
    }

    .score-start {
        padding: 25px 15px;
    }

    .score-start h1 {
        font-size: 1.3rem;
    }

    .score-start h2 {
        font-size: 1.5rem;
        margin-bottom: 25px;
    }

    .score-start-notice {
        padding: 15px;
    }

    .score-start-notice li {
        font-size: 0.9rem;
    }

}


/* CSS読み込み確認用 */
.score-start {
    border: 10px solid red !important;
}