:root {
    --primary-color: #2e68e0;
    --light-gray: #f8f9fa;
    --dark-gray: #343a40;
    --white: #fff;
    --border-color: #dee2e6;
}

body {
    font-family: 'Noto Sans JP', 'Helvetica Neue', 'Arial', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Meiryo', sans-serif;
    background-color: var(--white);
    color: #000;
    line-height: 1.6;
    margin: 0;
    font-weight: normal;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 15px 15px;
    background-color: var(--white);
}

h1 {
    text-align: center;
    color: #000;
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 1.7em;
}

h2 {
    font-size: 1.2em;
    color: var(--primary-color);
    border-left: 4px solid var(--primary-color);
    padding-left: 10px;
    margin-top: 25px;
    margin-bottom: 15px;
    font-weight: 600;
}

strong {
    font-weight: 600;
}

.form-section {
    margin-bottom: 20px;
}

.total-amount-display {
    text-align: center;
    margin-bottom: 25px;
    padding: 15px;
    background-color: #e9f5ff;
    border-radius: 5px;
}

.total-amount-display h3 {
    margin: 0 0 5px 0;
    font-size: 1.1em;
    color: var(--primary-color);
    font-weight: normal;
}

.total-amount-display p {
    margin: 0;
    font-size: 2em;
    font-weight: 600;
    color: var(--dark-gray);
}

.total-amount-display .tax-note {
    font-size: 0.5em;
    font-weight: normal;
}

.course-selection .course-item {
    margin-bottom: 8px;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    transition: background-color 0.2s;
}

.course-selection .course-item:has(input:checked) {
    background-color: #fdfde8;
    border-color: #f5c518;
}

.course-selection label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 1em;
    font-weight: normal;
}

.course-selection label strong {
    margin-right: 10px;
    white-space: nowrap;
}

.course-selection input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
}

.course-selection .price {
    margin-left: auto;
    font-weight: normal;
    white-space: nowrap;
}

.course-detail {
    padding-left: 28px;
    font-size: 0.85em;
    color: #6c757d;
}

#discountInfo,
#starterSetInfo {
    background-color: #f1f1f1;
    padding: 15px;
    border-radius: 5px;
}

#discountInfo {
    color: #d9534f;
    font-weight: normal;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        padding: 15px;
    }

    h1 {
        font-size: 1.4em;
    }

    .total-amount-display p {
        font-size: 1.6em;
    }

    /* Removed column layout for course selection on mobile */
    .course-selection .price {
        margin-left: auto;
        /* Ensure price stays on the right */
        margin-top: 0;
    }
}

.form-submit-area {
    text-align: center;
    margin-top: 30px;
}

.button-group {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 15px;
    margin-top: 40px;
    margin-bottom: 30px;
}

.button-primary {
    background-color: #2e68e0;
    color: #fff;
    border: none;
    padding: 15px 10px;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.button-primary:hover {
    opacity: 0.8;
}

.button-primary:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.button-secondary {
    background-color: #999;
    color: #fff;
    border: none;
    padding: 15px 10px;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.button-secondary:hover {
    opacity: 0.8;
}

.form-group {
    margin-bottom: 20px;
}

.form-group:last-child {
    border-bottom: none;
}

.label-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 2px;
}

.form-label {
    font-size: 1.1em;
    font-weight: bold;
    color: var(--primary-color);
    border-left: 5px solid var(--primary-color);
    padding-left: 10px;
}

/* その他ラベルの文字色は黒に上書き */
.form-group label {
    color: #000 !important;
}

.required-tag {
    background: #fe0099;
    /* 必須背景はピンク */
    color: #fff;
    font-size: 0.7em;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 10px;
}

.field-error-message {
    color: #F00;
    font-size: 0.85em;
    margin-left: 10px;
    font-weight: normal;
}

.required {
    background-color: #dc3545;
    /* 赤 */
    color: white;
    font-size: 0.7em;
    padding: 2px 5px;
    border-radius: 3px;
    margin-left: 5px;
}

.name-row,
.address-input-group {
    display: flex;
    gap: 10px;
}

.name-row input,
.address-input-group input {
    width: 100%;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #CCC;
    border-radius: 8px;
    font-size: 1em;
    box-sizing: border-box;
    background: #fff;
    transition: border-color 0.2s;
    margin-top: 0;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

.radio-group,
.checkbox-group {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.radio-label,
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-weight: normal;
}

input[type="radio"],
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    /* JSで切り替え */
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: var(--dark-gray);
    color: var(--white);
    padding: 20px 30px;
    border-radius: 8px;
    width: 80%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 2em;
    cursor: pointer;
}

.terms-text {
    font-size: 0.9em;
    line-height: 1.7;
}

/* --- Confirm Payment Page Styles --- */
.order-summary-section {
    border: 1px solid var(--border-color);
    border-radius: 5px;
    margin-bottom: 30px;
}

.summary-block {
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-color);
}

.summary-block:last-child {
    border-bottom: none;
}

.summary-block p {
    margin: 5px 0;
}

.item-name {
    font-weight: 600;
}

.item-calc {
    text-align: right;
    color: #333;
}

.quantity-control {
    display: inline-flex;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.quantity-btn {
    background: #eee;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    font-weight: bold;
}

.quantity-input {
    width: 40px;
    text-align: center;
    border: none;
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
}

.total-section {
    padding: 15px;
    background-color: #f8f9fa;
}

.total-section .notice {
    color: #dc3545;
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.total-section .total-amount {
    text-align: right;
    font-size: 1.3em;
    font-weight: bold;
}

.payment-method-section,
.shipping-info-section {
    margin-bottom: 30px;
}

.address-display {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

/* --- Final Confirm Page Styles --- */
.confirm-info-table {
    border: 1px solid var(--border-color);
    border-radius: 5px;
    margin-bottom: 20px;
}

.info-row {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: normal;
    color: #6c757d;
    font-size: 0.85em;
}

.info-data {
    padding-left: 10px;
    font-weight: 600;
    white-space: pre-wrap;
    /* 質問などの長いテキストを折り返す */
}

/* --- Thanks Page Styles --- */
.thanks-message {
    text-align: center;
    padding: 40px 20px;
}

.thanks-message h1 {
    font-size: 1.7em;
}

.thanks-message p {
    font-size: 1em;
    line-height: 1.6;
}

/* Specific styles for contact form (from index.php) */
#inquiryContentArea {
    display: none;
    /* 初期状態では非表示 */
}

/* Specific styles for confirmation page (from confirm.php) */
.confirm-item {
    padding: 15px 0;
    border-bottom: 1px solid #ccc;
}

.confirm-item:last-child {
    border-bottom: none;
}

.confirm-item-label {
    font-size: 0.95em;
    color: #777;
    margin-bottom: 5px;
    display: block;
    font-weight: bold;
}

.confirm-item-value {
    font-size: 1.1rem;
    color: #000;
    word-wrap: break-word;
}

.confirm-value-wrapper {
    margin-left: 5px;
}

.button-group {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 15px;
    margin-top: 40px;
    margin-bottom: 30px;
}

.button-group button {
    min-width: 0;
}

.button-group .button-secondary {
    min-width: 100px;
    /* 戻るボタンを小さく */
}