@charset "utf-8";

/* ----------------------------------------------------------
   Base Reset
---------------------------------------------------------- */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, menu, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, main,
nav, output, ruby, section, summary,
time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    vertical-align: baseline;
}

article, aside, details, figcaption, figure,
footer, header, main, menu, nav, section {
    display: block;
}

body {
    line-height: 1.6;
    font-family: "Noto Sans", "Noto Sans JP", "Yu Gothic UI", sans-serif;
    color: #333;
    background: #fff;
    font-size: 16px;
}

/* ----------------------------------------------------------
   Layout
---------------------------------------------------------- */
.container {
    max-width: 100%;
    padding: 20px;
    margin: 0 auto;
}

.form-card {
    max-width: 720px;
    margin: 40px auto;
    background: #fff;
    border: 1px solid #e1e6ef;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.06);
}

/* ----------------------------------------------------------
   Title & Intro
---------------------------------------------------------- */
.form-title {
    background: #0066cc;
    color: #fff;
    padding: 14px 20px;
    margin-bottom: 25px;
    font-size: 22px;
    font-weight: bold;
    border-radius: 6px;
}

.form-intro {
    margin-bottom: 25px;
    font-size: 16px;
}

/* ----------------------------------------------------------
   Error
---------------------------------------------------------- */
.form-error {
    color: #d10000;
    font-size: 14px;
    margin-bottom: 20px;
    font-weight: bold;
}

/* ----------------------------------------------------------
   Form Table
---------------------------------------------------------- */
.form-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 25px;
    table-layout: auto; /* ←テーブル暴走防止（重要） */
}

.form-table th {
    background: #e9eff7;
    padding: 12px;
    border: 1px solid #cbd6e2;
    font-weight: bold;
    width: 28%;
    font-size: 16px;
    text-align: left;
    padding-left: 18px; /* ←左インデント */
}

.form-table td {
    background: #fff;
    padding: 12px;
    border: 1px solid #cbd6e2;
    font-size: 16px;
}

/* ----------------------------------------------------------
   Inputs
---------------------------------------------------------- */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #cbd6e2;
    border-radius: 6px;
    font-size: 16px;
    font-family: inherit;
    box-sizing: border-box;
}

textarea {
    resize: vertical;
    min-height: 160px; /* ←縦幅が広すぎる問題を解決 */
}

input:focus, textarea:focus {
    border-color: #0066cc;
    outline: none;
}

/* ----------------------------------------------------------
   Buttons
---------------------------------------------------------- */
.form-actions {
    text-align: center;
    margin-top: 25px;
}

.btn-primary {
    padding: 10px 28px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    border: none;
    background: #0066cc;
    color: #fff;
}

.btn-primary:hover {
    background: #0052a3;
}

.form-back {
    text-align: center;
    margin-top: 25px;
    font-size: 16px;
}

.form-back a {
    color: #0066cc;
}

/* ----------------------------------------------------------
   Responsive（最適化済）
---------------------------------------------------------- */
@media (max-width: 768px) {

    .form-card {
        padding: 20px;
        margin: 20px;
    }

    .form-title {
        font-size: 20px;
        padding: 12px;
    }

    .form-table th,
    .form-table td {
        padding: 10px;
        font-size: 16px;
    }

    /* スマホは項目を縦配置に */
    .form-table tr {
        display: block;
        margin-bottom: 15px;
    }

    .form-table th {
        width: 100%;
        border-radius: 6px 6px 0 0;
    }

    .form-table td {
        width: 100%;
        border-top: none;
        border-radius: 0 0 6px 6px;
    }

    input[type="submit"] {
        width: 80%;
        max-width: 300px;
        padding: 12px;
        font-size: 16px;
        margin: 15px auto 0;
        display: block;
    }
}

.form-table th {
    vertical-align: top;
    padding-top: 18px; 
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
    padding: 10px 28px;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    border: none;
    margin-left: 10px;
}

.btn-secondary:hover {
    background: #d5d5d5;
}