/* Contact-page layout. GRAVITI Forms owns validation and the completion view. */
.form-hub { border-top: 1px solid var(--line); }
.form-hub-heading { padding: 40px 0 35px; }
.form-hub-heading h2 { font-size: clamp(23px, 2.3vw, 32px); margin-bottom: 12px; }
.form-hub-heading > p:last-child { color: var(--muted); font-size: 13px; }
/* The purpose selector is a real radio field owned by GRAVITI Forms. */
.form-hub .form-field.purpose-field { grid-template-columns: minmax(0, 1fr); gap: 16px; border-top: 0; padding: 0 0 32px; }
.form-hub .purpose-field > label { padding-top: 0; }
.form-hub .purpose-field .wpcf7-radio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.form-hub .purpose-field .wpcf7-list-item { display: flex; justify-content: center; gap: 10px; min-width: 0; min-height: 74px; margin: 0; padding: 14px 12px; border: 1px solid #dedbd6; border-radius: 8px; background: #fff; color: var(--ink); font-size: 14px; font-weight: 500; cursor: pointer; transition: background .15s, border-color .15s; }
.form-hub .purpose-field .wpcf7-list-item:has(input:checked) { background: #fdf7f7; border-color: var(--red); }
.form-hub .purpose-field .wpcf7-list-item:hover { border-color: var(--red); background: #fdf7f7; }
.form-hub .purpose-field .wpcf7-list-item:has(:focus-visible) { outline: 2px solid var(--red); outline-offset: 3px; }
.form-hub .purpose-field input[type='radio'] { accent-color: var(--red); }

/* Keep conditional rows and controls within the content width. */
.form-hub .gf-wrap, .form-hub .gf-form, .form-hub .gf-form [data-name] { min-width: 0; max-width: 100%; }
.form-hub .gf-form [data-name] { display: block; width: 100%; }
.form-hub .form-field { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 25px; border-top: 1px solid var(--line); padding: 26px 0; align-items: start; }
.form-hub .form-field > * { min-width: 0; max-width: 100%; }
.form-hub .form-field > label { font-size: 14px; padding-top: 10px; }
.form-hub .form-field:has([aria-required='true']:not(:disabled)) > label::after { content: '必須'; color: var(--red); font-size: 10px; margin-left: 12px; }
.form-hub .gf-form .gf-condition-required { display: none; }
.form-hub .required { display: inline-block; color: var(--red); font-size: 10px; margin-left: 12px; }
.form-hub .gf-form input:not([type='checkbox']):not([type='radio']):not([type='hidden']):not([type='submit']),
.form-hub .gf-form select, .form-hub .gf-form textarea { box-sizing: border-box; width: 100%; min-width: 0; max-width: 100%; background: #faf9f7; border: 1px solid #d5d0cb; border-radius: 0; padding: 12px 15px; color: var(--ink); font: inherit; }
.form-hub .gf-form textarea { resize: vertical; min-height: 180px; }
.form-hub .gf-form input[type='date'] { appearance: none; -webkit-appearance: none; min-height: 48px; }
.form-hub .gf-form :is(input, select, textarea)[aria-invalid='true'] { border-color: var(--red); }
.form-hub .gf-form :focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.form-hub .form-actions { text-align: center; margin: 35px 0 0; }
.form-hub .gf-form [type='submit'] { appearance: none; box-sizing: border-box; width: min(100%, 280px); min-width: 0; max-width: 100%; color: #fff; background: var(--red); border: 1px solid var(--red); border-radius: 0; padding: 16px 35px; font: inherit; font-size: 14px; cursor: pointer; }
.form-hub .gf-form [type='submit']:hover { background: var(--red-dark); }
.form-hub .gf-form [type='submit']:disabled { opacity: .55; cursor: wait; }
.form-hub .gf-field-error { color: var(--red); font-size: 12px; margin-top: 8px; }
.form-hub .gf-result:not(:empty) { margin-top: 24px; padding: 15px 20px; background: var(--paper); color: var(--ink); font-size: 13px; }
.form-hub .gf-complete { min-width: 0; max-width: 100%; }
.form-unavailable { padding: 20px; background: var(--paper); font-size: 14px; }
.form-unavailable a { text-decoration: underline; }
.form-help { margin-top: 60px; padding: 30px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 6px 30px; }
.form-help > p { color: var(--muted); font-size: 12px; }
.form-help > a { font-size: 27px; font-weight: 500; letter-spacing: .04em; grid-column: 1; }
.form-help small { grid-column: 2; grid-row: 1 / 3; font-size: 11px; color: var(--muted); }
.form-help small a { text-decoration: underline; }

@media (max-width: 760px) {
    .form-hub .purpose-field .wpcf7-radio { gap: 8px; }
    .form-hub .purpose-field .wpcf7-list-item { flex-direction: column; gap: 8px; min-height: 84px; padding: 12px 6px; font-size: 12px; line-height: 1.6; letter-spacing: 0; }
    .form-hub .purpose-field input[type='radio'] { font-size: 14px; }
    .form-hub .form-field { grid-template-columns: minmax(0, 1fr); gap: 12px; padding-block: 20px; }
    .form-hub .form-field > label { padding-top: 0; }
    .form-hub .gf-form input, .form-hub .gf-form select, .form-hub .gf-form textarea { font-size: 16px; }
    .form-help { grid-template-columns: 1fr; }
    .form-help small { grid-column: 1; grid-row: auto; margin-top: 15px; }
}
@media (prefers-reduced-motion: reduce) { .form-hub .purpose-field .wpcf7-list-item { transition: none; } }
