/* =========================================================================
   Design Tokens (Matched to Main Site)
   ========================================================================= */
:root {
    --clr-primary: #1B4D2E; /* Deep Green */
    --clr-secondary: #0A2615; /* Darker Green */
    --clr-accent: #C49A45; /* Gold / Sand */
    --clr-accent-hover: #AB8537;
    --clr-bg: #F8F9FA;
    --clr-bg-alt: #E9ECEF;
    --clr-text: #333333;
    --clr-text-light: #666666;
    --clr-white: #FFFFFF;
    --clr-error: #D32F2F;
    
    --font-heading: &#039;Outfit&#039;, &#039;Noto Sans JP&#039;, sans-serif;
    --font-body: &#039;Noto Sans JP&#039;, sans-serif;
    
    --transition-normal: 0.3s ease;
}

/* =========================================================================
   Reset & Base
   ========================================================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--clr-text);
    background-color: var(--clr-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* =========================================================================
   Header & Footer
   ========================================================================= */
.form-header {
    background-color: var(--clr-white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 1rem 0;
    text-align: center;
}

.form-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--clr-primary);
    font-family: var(--font-heading);
    letter-spacing: 0.05em;
}

.form-footer {
    margin-top: auto;
    background-color: var(--clr-secondary);
    color: var(--clr-white);
    text-align: center;
    padding: 1.5rem 0;
}

.copyright {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* =========================================================================
   Main Content Layout
   ========================================================================= */
#main {
    flex: 1;
    width: 100%;
    max-width: 800px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}

.section {
    background: var(--clr-white);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-bottom: 2rem;
}

.section__ttl {
    background-color: var(--clr-primary);
    color: var(--clr-white);
    padding: 1.25rem 2rem;
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-align: center;
}

.section__body {
    padding: 2rem;
}

/* =========================================================================
   Form Typography & Text
   ========================================================================= */
#txt_explain {
    margin-bottom: 2rem;
    color: var(--clr-text-light);
    font-size: 0.95rem;
    text-align: center;
}

.required-mark {
    color: var(--clr-error);
    font-weight: bold;
    margin-right: 0.2rem;
}

.red_txt {
    color: var(--clr-error);
    font-weight: 500;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* =========================================================================
   Form Table
   ========================================================================= */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}

.table th,
.table td {
    padding: 1.25rem;
    border-bottom: 1px solid var(--clr-bg-alt);
    text-align: left;
    vertical-align: middle;
}

.table th {
    width: 30%;
    background-color: var(--clr-bg-alt);
    font-weight: 500;
    color: var(--clr-primary);
}

.table tr:last-child th,
.table tr:last-child td {
    border-bottom: none;
}

/* Form Inputs (Targeting typical CGI generated inputs) */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
    width: 100%;
    max-width: 500px;
    padding: 0.75rem 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition-normal);
    background-color: var(--clr-white);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--clr-accent);
    box-shadow: 0 0 0 3px rgba(196, 154, 69, 0.1);
}

textarea {
    min-height: 150px;
    resize: vertical;
}

/* Radio & Checkbox spacing */
input[type="radio"],
input[type="checkbox"] {
    margin-right: 0.5rem;
}

label {
    margin-right: 1.5rem;
    cursor: pointer;
}

/* =========================================================================
   Buttons
   ========================================================================= */
.button_box {
    text-align: center;
    margin-top: 2rem;
}

.btn-submit {
    display: inline-block;
    padding: 1rem 4rem;
    background-color: var(--clr-accent);
    color: var(--clr-white);
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: var(--transition-normal);
    box-shadow: 0 4px 6px rgba(196, 154, 69, 0.2);
    font-family: inherit;
}

.btn-submit:hover {
    background-color: var(--clr-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(196, 154, 69, 0.3);
}

.back_link_box {
    text-align: center;
    margin-top: 1.5rem;
}

.btn-back {
    display: inline-block;
    text-decoration: none;
    color: var(--clr-text-light);
    font-weight: 500;
    transition: var(--transition-normal);
    position: relative;
}

.btn-back::after {
    content: &#039;&#039;;
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.btn-back:hover {
    color: var(--clr-primary);
}

.btn-back:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* =========================================================================
   Responsive Design
   ========================================================================= */
@media (max-width: 768px) {
    #main {
        margin: 1.5rem auto;
    }

    .section__body {
        padding: 1.5rem 1rem;
    }

    .table th,
    .table td {
        display: block;
        width: 100%;
        padding: 1rem;
    }

    .table th {
        background-color: transparent;
        border-bottom: none;
        padding-bottom: 0.5rem;
        font-weight: 600;
    }

    .table td {
        padding-top: 0;
    }
    
    .table tr {
        border-bottom: 1px solid var(--clr-bg-alt);
        display: block;
        margin-bottom: 1rem;
    }
    
    .table tr:last-child {
        margin-bottom: 0;
        border-bottom: none;
    }

    .btn-submit {
        width: 100%;
        padding: 1rem;
    }
}

/* =========================================================================
   Confirmation Action Buttons
   ========================================================================= */
.action_buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.btn-outline {
    display: inline-block;
    padding: 1rem 3rem;
    background-color: transparent;
    color: var(--clr-primary);
    border: 2px solid var(--clr-primary);
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: var(--transition-normal);
    font-family: inherit;
    text-align: center;
}

.btn-outline:hover {
    background-color: var(--clr-primary);
    color: var(--clr-white);
    transform: translateY(-2px);
}

/* 既に設定されている@media (max-width: 768px){} 内に以下を追記・修正 */
@media (max-width: 768px) {
    .btn-submit,
    .btn-outline {
        width: 100%;
        padding: 1rem;
    }

    .action_buttons {
        flex-direction: column-reverse; /* スマホでは戻るボタンを下に配置 */
        gap: 1rem;
    }
}