.red {
    color: #be291e;
}

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    max-width: 600px;
    width: 100%;
}

#header .header_sp,
#header_bottom .header_sp {
    box-shadow: initial;
}

h2.cake-form-ttl {
    font-size: 30px;
    text-align: center;
    position: relative;
    z-index: 2;
}

p.cake-form-subttl {
    font-size: 12px;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    z-index: 2;
}

img.cake-form-img {
    position: absolute;
    right: 0;
    top: 200%;
    transform: translateY(-50%);
    max-height: 120px;
    z-index: 1;
}

form.cake-form-wrapper {
    padding: 65px 15px;
}

form.cake-form-wrapper {
    padding: 65px 15px;
    background: #ecefeb;
}

h1 {
    color: #333;
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
}

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

.form-group .form-group {
    margin-bottom: 0;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 600;
    font-size: 14px;
}

select,
input[type="text"],
input[type="tel"],
input[type="email"] {
    width: 100%;
    padding: 12px;
    border: 1px solid transparent;
    font-size: 14px;
    box-sizing: border-box;
    line-height: 1.5;
    height: 44px;
}

select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: white;
}

select.placeholder {
    font-size: 12px;
    color: #666;
}

.select-wrapper {
    position: relative;
}

.select-wrapper::after {
    content: "";
    position: absolute;
    right: 5px;
    top: 50%;
    width: 6px;
    height: 6px;
    border-right: 0.75px solid #000;
    border-bottom: 0.75px solid #000;
    transform: translateY(-50%) rotate(45deg);
    pointer-events: none;
}

select:focus,
input[type="text"]:focus,
input[type="tel"]:focus,
input[type="email"]:focus {
    outline: none;
}

select.touched:invalid,
input[type="text"].touched:invalid,
input[type="tel"].touched:invalid,
input[type="email"].touched:invalid {
    border: 2px solid #dc3545 !important;
    background-color: #fff5f5 !important;
}

input[type="checkbox"].touched:invalid {
    outline: 2px solid #dc3545;
    outline-offset: 2px;
}

form.was-validated select:invalid,
form.was-validated input[type="text"]:invalid,
form.was-validated input[type="tel"]:invalid,
form.was-validated input[type="email"]:invalid,
form.was-validated input[type="checkbox"]:invalid {
    border: 2px solid #dc3545 !important;
    background-color: #fff5f5 !important;
}

form.was-validated input[type="checkbox"]:invalid {
    outline: 2px solid #dc3545;
    outline-offset: 2px;
    background-color: transparent !important;
}

.error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
    display: none;
}

.error-message.show {
    display: block;
}

.row {
    display: flex;
    gap: 8px;
}

.row .form-group {
    flex: 1;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 10px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

.form-note {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.form-attention {
    margin-top: 45px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border: 1px solid #000;
    flex-shrink: 0;
    cursor: pointer;
}

.checkbox-wrapper label {
    font-size: 14px;
    font-weight: normal;
    margin-bottom: 0;
    cursor: pointer;
}

.price-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.price-table td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
    font-size: 14px;
}

.price-table td.price {
    text-align: right;
    font-weight: 600;
    font-family: "Zen Kaku Gothic New", "Noto Sans JP", sans-serif;
}

.price-table .total-row {
    border-top: 2px solid #333;
}

.price-table .total-row td {
    padding: 16px 12px;
    font-size: 16px;
    font-weight: 700;
    border-bottom: none;
}

.payment-button-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.payment-button {
    width: 115px;
    height: 40px;
    background-color: #495930;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: opacity 0.2s;
}

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

.policy-links-wrapper {
    margin-top: 30px;
}

.policy-links-divider {
    width: 100%;
    height: 1px;
    background-color: #c9d0c4;
    margin-bottom: 20px;
}

.policy-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.policy-links-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: flex-start;
    align-items: center;
}

.policy-link {
    color: #5a6b44;
    text-decoration: underline !important;
    font-size: 14px;
    line-height: 1.5;
    transition: opacity 0.2s;
    cursor: pointer;
}

.policy-link:hover {
    opacity: 0.7;
    color: #5a6b44;
}

/* ???????????????????body.opening-after::after??????? */
body.policy-popup-open.opening-after::after {
    display: none !important;
}

/* ?????????? */
.policy-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.policy-popup.show {
    display: flex;
    opacity: 1;
}

.policy-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.policy-popup-content {
    position: relative;
    background-color: #ffffff;
    max-width: 90%;
    max-height: 90%;
    width: 600px;
    padding: 40px;
    padding-top: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    z-index: 10001;
}

.policy-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    background: none;
    border: none;
    font-size: 30px;
    line-height: 1;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: opacity 0.2s;
}

.policy-popup-close:hover {
    opacity: 0.7;
}

.policy-popup-body {
    color: #333;
    font-size: 14px;
    line-height: 1.8;
    white-space: pre-line;
    word-wrap: break-word;
}

/* ???????? */
@media (max-width: 768px) {
    .policy-popup-content {
        width: 95%;
        padding: 30px 20px;
        max-height: 85%;
    }

    .policy-popup-close {
        top: 10px;
        right: 10px;
        width: 25px;
        height: 25px;
        font-size: 25px;
    }
}

/* ???????? */
.checkout-confirm-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000001;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.checkout-confirm-modal.show {
    display: flex;
    opacity: 1;
}

.checkout-confirm-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

.checkout-confirm-content {
    position: relative;
    background-color: #ffffff;
    max-width: 90%;
    width: 450px;
    padding: 40px 30px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
    z-index: 10001;
    text-align: center;
}

.checkout-confirm-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.checkout-confirm-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
}

.checkout-confirm-body {
    margin-bottom: 30px;
}

.checkout-confirm-body p {
    font-size: 14px;
    line-height: 1.8;
    color: #555;
    margin-bottom: 10px;
}

.checkout-confirm-warning {
    color: #c53030 !important;
    font-weight: 600;
    background-color: #fff5f5;
    padding: 12px;
    margin: 15px 0 !important;
}

.checkout-confirm-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkout-confirm-btn {
    width: 100%;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
}

.checkout-confirm-btn:hover {
    opacity: 0.9;
}

.checkout-confirm-btn:active {
    transform: scale(0.98);
}

.checkout-confirm-btn-primary {
    background-color: #495930;
    color: #ffffff;
}

.checkout-confirm-btn-secondary {
    background-color: #e2e8e0;
    color: #555;
}

/* ???????? */
@media (max-width: 768px) {
    .checkout-confirm-content {
        width: 95%;
        padding: 30px 20px;
    }

    .checkout-confirm-icon {
        font-size: 40px;
    }

    .checkout-confirm-title {
        font-size: 18px;
    }

    .checkout-confirm-body p {
        font-size: 13px;
    }
}