/* =========================================================
   VINAS seminar entry form
   入力・確認・完了・エラーの全画面で共通利用（各PHPのインラインstyleは廃止）
   ========================================================= */

:root {
    --vinas-navy: #13355f;
    --vinas-navy-dark: #08233f;
    --vinas-blue: #1c6fa8;
    --vinas-green: #4e9d7a;
    --vinas-green-dark: #34775c;
    --vinas-bg: #eef3f6;
    --vinas-surface: #ffffff;
    --vinas-surface-soft: #f7fafb;
    --vinas-border: #d8e2e8;
    --vinas-border-strong: #bfd0da;
    --vinas-text: #1d2a35;
    --vinas-muted: #5b6b78;
    --vinas-error-bg: #fff3f3;
    --vinas-error-border: #f2a8a8;
    --vinas-error-text: #a51818;
    --vinas-radius: 14px;
    --vinas-radius-sm: 8px;
    --vinas-shadow: 0 18px 45px rgba(8, 35, 63, 0.10);
    --vinas-focus: 0 0 0 4px rgba(28, 111, 168, 0.22);
}

* { box-sizing: border-box; }

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', Meiryo, sans-serif;
    color: var(--vinas-text);
    background:
        radial-gradient(circle at top left, rgba(78, 157, 122, 0.14), transparent 34%),
        linear-gradient(135deg, #eef3f6 0%, #f8fbfc 48%, #eaf2f0 100%);
    background-attachment: fixed;
    margin: 0;
    padding: 0 16px;
    line-height: 1.75;
    letter-spacing: 0.02em;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--vinas-blue); }
a:hover { color: var(--vinas-navy); }

.sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
}

.honeypot {
    position: absolute;
    left: -9999px;
    width: 1px; height: 1px;
    overflow: hidden;
}

/* ---------- レイアウト ---------- */
.container {
    position: relative;
    width: 100%;
    max-width: 880px;
    margin: 48px auto;
    background: var(--vinas-surface);
    padding: 44px clamp(20px, 5vw, 56px) 48px;
    border-radius: var(--vinas-radius);
    border: 1px solid var(--vinas-border);
    box-shadow: var(--vinas-shadow);
    overflow: hidden;
    flex: 1 0 auto;
}

.container::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 6px;
    background: linear-gradient(90deg, var(--vinas-navy) 0%, var(--vinas-blue) 48%, var(--vinas-green) 100%);
}

/* ---------- 見出し ---------- */
.page-header { text-align: center; margin-bottom: 24px; }

.page-eyebrow {
    margin: 0 0 6px;
    color: var(--vinas-blue);
    font-size: clamp(14px, 2.2vw, 17px);
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.5;
}

.page-title {
    margin: 0;
    color: var(--vinas-navy-dark);
    font-size: clamp(24px, 4vw, 32px);
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1.4;
}

.lead {
    text-align: center;
    color: var(--vinas-muted);
    margin: 0 0 28px;
    font-size: 14px;
}

/* ---------- ステップ表示 ---------- */
.steps {
    display: flex;
    justify-content: center;
    gap: 8px;
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
    counter-reset: none;
}

.steps li {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #8a98a3;
    font-size: 13px;
    font-weight: 500;
}

.steps li + li::before {
    content: "";
    width: 28px;
    height: 1px;
    background: var(--vinas-border-strong);
    margin-right: 4px;
}

.steps-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px; height: 26px;
    border-radius: 50%;
    border: 1px solid var(--vinas-border-strong);
    background: #fff;
    font-size: 12px;
    font-weight: 700;
}

.steps li.is-current { color: var(--vinas-navy); font-weight: 700; }
.steps li.is-current .steps-num { background: var(--vinas-navy); border-color: var(--vinas-navy); color: #fff; }
.steps li.is-done { color: var(--vinas-green-dark); }
.steps li.is-done .steps-num { background: #e6f2ec; border-color: var(--vinas-green); color: var(--vinas-green-dark); }

/* ---------- バッジ ---------- */
.badge {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.6;
    letter-spacing: 0.04em;
    vertical-align: 0.12em;
    white-space: nowrap;
}

.badge-required { background: #c62828; color: #fff; }
.badge-optional { background: #e9eef2; color: #5b6b78; }
.lead .badge { margin: 0 2px; }

/* ---------- セクション ---------- */
.form-section { margin: 0 0 32px; }

.section-title {
    margin: 0 0 8px;
    padding: 0 0 10px 14px;
    border-bottom: 2px solid var(--vinas-border);
    position: relative;
    color: var(--vinas-navy);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.5;
}

.section-title::before {
    content: "";
    position: absolute;
    left: 0; top: 4px;
    width: 4px; height: 1.2em;
    border-radius: 2px;
    background: linear-gradient(var(--vinas-blue), var(--vinas-green));
}

/* ---------- 入力行 ---------- */
.form-row {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 8px 24px;
    align-items: start;
    padding: 18px 0;
    border-bottom: 1px solid #edf2f5;
}

.form-row:focus { outline: none; }

.form-label {
    display: block;
    padding-top: 10px;
    color: #263747;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.6;
}

.form-hint {
    display: block;
    color: var(--vinas-muted);
    font-size: 12px;
    font-weight: 400;
}

.form-field { min-width: 0; }

.form-help {
    margin: 6px 0 0;
    color: var(--vinas-muted);
    font-size: 12.5px;
    line-height: 1.6;
}

.field-error {
    margin: 6px 0 0;
    color: var(--vinas-error-text);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.6;
}

.field-error::before { content: "！ "; }

/* ---------- 入力系 ---------- */
input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
    width: 100%;
    min-height: 46px;
    padding: 10px 13px;
    border: 1px solid var(--vinas-border-strong);
    border-radius: var(--vinas-radius-sm);
    background: #fff;
    color: var(--vinas-text);
    font: inherit;
    font-size: 16px; /* iOSでフォーカス時に拡大されない最小サイズ */
    line-height: 1.55;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.input-short { max-width: 260px; }

textarea { min-height: 96px; resize: vertical; }

input[type="text"]:hover,
input[type="email"]:hover,
input[type="tel"]:hover,
select:hover,
textarea:hover { border-color: #8fb3c6; }

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

::placeholder { color: #8796a1; opacity: 1; }

.has-error input[type="text"],
.has-error input[type="email"],
.has-error input[type="tel"],
.has-error select,
.has-error textarea {
    border-color: #d94b4b;
    background: var(--vinas-error-bg);
}

/* ---------- チェックボックス・ラジオ ---------- */
.options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 8px;
}

.option {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-height: 44px;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #dfe8ed;
    border-radius: 10px;
    background: var(--vinas-surface-soft);
    color: #2d4050;
    font-size: 14px;
    line-height: 1.5;
    cursor: pointer;
    transition: border-color .18s ease, background-color .18s ease;
}

.option:hover { border-color: rgba(28, 111, 168, 0.5); background: #f1f7fb; }

.option input {
    flex: 0 0 auto;
    width: 18px; height: 18px;
    margin: 1px 0 0;
    accent-color: var(--vinas-navy);
    cursor: pointer;
}

.option:has(input:checked) {
    border-color: var(--vinas-blue);
    background: #eaf3fa;
    color: var(--vinas-navy-dark);
    font-weight: 500;
}

.option:has(input:focus-visible) { box-shadow: var(--vinas-focus); }

.has-error .option { border-color: #eab4b4; }

/* ---------- 個人情報 ---------- */
.privacy-box {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    margin: 8px 0 0;
    padding: 22px 24px;
    border: 1px solid var(--vinas-border);
    border-radius: var(--vinas-radius-sm);
    background: var(--vinas-surface-soft);
    font-size: 14px;
}

.privacy-box.has-error { border-color: #d94b4b; background: var(--vinas-error-bg); }

.privacy-body { flex: 1 1 auto; min-width: 0; }

.privacy-title {
    margin: 0 0 8px;
    color: var(--vinas-navy);
    font-size: 16px;
    font-weight: 700;
}

.privacy-body p { margin: 0 0 14px; color: #3c4c58; line-height: 1.8; }

.check-agree {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border: 1px solid var(--vinas-border-strong);
    border-radius: 10px;
    background: #fff;
    font-weight: 700;
    cursor: pointer;
}

.check-agree input { width: 20px; height: 20px; margin: 0; accent-color: var(--vinas-navy); }
.check-agree:has(input:checked) { border-color: var(--vinas-blue); background: #eaf3fa; }
.check-agree:has(input:focus-visible) { box-shadow: var(--vinas-focus); }

.privacy-seal { flex: 0 0 auto; min-width: 120px; text-align: center; }

.captcha-row { display: flex; justify-content: center; margin: 28px 0 0; }

/* ---------- ボタン ---------- */
.button-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin: 36px 0 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 240px;
    min-height: 52px;
    padding: 12px 32px;
    border: 1px solid transparent;
    border-radius: 999px;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.4;
    text-decoration: none;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease, background-color .18s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--vinas-navy) 0%, #1d628d 62%, var(--vinas-green-dark) 100%);
    color: #fff;
    box-shadow: 0 12px 24px rgba(19, 53, 95, 0.22);
}

.btn-primary:hover { color: #fff; filter: brightness(1.08); transform: translateY(-2px); box-shadow: 0 16px 30px rgba(19, 53, 95, 0.28); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
    background: #fff;
    color: var(--vinas-navy);
    border-color: var(--vinas-border-strong);
}

.btn-secondary:hover { color: var(--vinas-navy); background: var(--vinas-surface-soft); border-color: var(--vinas-navy); }

.btn:focus-visible { outline: none; box-shadow: var(--vinas-focus); }
.btn[disabled] { opacity: .65; cursor: wait; transform: none; }

/* ---------- エラー一覧 ---------- */
.error-box {
    background: var(--vinas-error-bg);
    border: 1px solid var(--vinas-error-border);
    border-left: 5px solid #d94b4b;
    padding: 14px 18px;
    margin: 0 0 24px;
    color: var(--vinas-error-text);
    font-size: 14px;
    border-radius: var(--vinas-radius-sm);
}

.error-box:focus { outline: 2px solid #d94b4b; outline-offset: 2px; }
.error-box ul { margin: 8px 0 0; padding-left: 20px; }
.error-box a { color: var(--vinas-error-text); }

/* ---------- 確認画面 ---------- */
.confirm-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0 0 8px;
    border: 1px solid var(--vinas-border);
    border-radius: var(--vinas-radius-sm);
    overflow: hidden;
    font-size: 14px;
}

.confirm-table th,
.confirm-table td {
    text-align: left;
    vertical-align: top;
    padding: 12px 16px;
    border-bottom: 1px solid var(--vinas-border);
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.confirm-table tr:last-child th,
.confirm-table tr:last-child td { border-bottom: none; }

.confirm-table th { width: 34%; background: #f2f7f8; color: var(--vinas-navy); font-weight: 700; }
.confirm-table td.is-empty { color: #98a5af; }

/* ---------- 完了画面 ---------- */
.complete-box {
    max-width: 620px;
    margin: 0 auto;
    text-align: center;
    font-size: 15px;
}

.complete-box p { margin: 0 0 16px; }
.complete-box .note { color: var(--vinas-muted); font-size: 13px; }
.complete-box .contact {
    margin-top: 24px;
    padding: 16px;
    border-radius: var(--vinas-radius-sm);
    background: var(--vinas-surface-soft);
    font-size: 14px;
}

/* ---------- フッター ---------- */
.footer {
    flex-shrink: 0;
    margin: 0 -16px;
    padding: 14px 16px;
    background: var(--vinas-navy-dark);
    text-align: center;
}

.footer p { margin: 0; color: #fff; font-size: 12px; letter-spacing: 0.04em; }

/* ---------- スマートフォン ---------- */
@media (max-width: 760px) {
    body { padding: 0 12px; }
    .footer { margin: 0 -12px; }

    .container {
        margin: 20px auto 28px;
        padding: 32px 18px 32px;
        border-radius: 12px;
    }

    .form-row { grid-template-columns: 1fr; gap: 6px; padding: 16px 0; }
    .form-label { padding-top: 0; }
    .input-short { max-width: none; }
    .options { grid-template-columns: 1fr; }

    .privacy-box { flex-direction: column; padding: 18px; }
    .privacy-seal { align-self: center; }
    .check-agree { display: flex; }

    .button-row { flex-direction: column-reverse; }
    .btn { width: 100%; min-width: 0; }

    .steps li { font-size: 12px; }
    .steps li + li::before { width: 16px; }

    .confirm-table,
    .confirm-table tbody,
    .confirm-table tr,
    .confirm-table th,
    .confirm-table td { display: block; width: 100%; }

    .confirm-table th { border-bottom: none; padding-bottom: 4px; }
    .confirm-table td { padding-top: 4px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
