.form-hero { padding: 40px 0 24px; }
.form-hero h1 { font-family: var(--serif); font-size: clamp(24px, 6vw, 34px); margin: 4px 0 18px; line-height: 1.5; }
.form-hero .en { font-family: var(--latin); letter-spacing: .3em; color: var(--accent); }
.form-hero p { color: var(--ink-2); margin: 0 0 .9em; font-size: 15px; }

.progress { display: flex; gap: 8px; list-style: none; padding: 0; margin: 28px 0 8px; font-size: 13px; }
.progress li { flex: 1; padding-top: 10px; border-top: 3px solid var(--line); color: var(--ink-3); }
.progress li.on { border-color: var(--ink); color: var(--ink); font-weight: 700; }

.fgroup { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 24px 20px; margin: 18px 0; }
.fgroup > legend, .fgroup-title { font-family: var(--serif); font-size: 18px; font-weight: 700; padding: 0; margin-bottom: 4px; }
fieldset.fgroup { min-width: 0; }
fieldset.fgroup > legend { float: left; width: 100%; margin-bottom: 14px; }
fieldset.fgroup > legend + * { clear: both; }
.fgroup-sub { font-size: 13px; color: var(--ink-3); margin: 0 0 16px; }
.field { margin-bottom: 22px; }
.field:last-child { margin-bottom: 0; }
.label { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; margin-bottom: 8px; }
.label .no { font-family: var(--latin); font-size: 15px; color: var(--ink-3); font-weight: 500; min-width: 22px; }
.req { font-size: 11px; background: var(--accent); color: #fff8f4; border-radius: 4px; padding: 1px 7px; font-weight: 700; letter-spacing: .06em; }
.opt { font-size: 11px; background: var(--paper-2); color: var(--ink-2); border-radius: 4px; padding: 1px 7px; }
.hint { font-size: 13px; color: var(--ink-3); margin: 6px 0 0; line-height: 1.7; }
.row { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.row3 { display: grid; gap: 8px; grid-template-columns: 1.3fr 1fr 1fr; }
.sublabel { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 4px; }
input[type=text], input[type=email], input[type=tel], input[type=date], select, textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--paper);
  border: 1px solid #cfcabf; border-radius: 10px; padding: 12px 14px; min-height: 50px;
  transition: border-color .15s, background-color .15s;
}
textarea { min-height: 140px; resize: vertical; line-height: 1.7; }
input:focus, select:focus, textarea:focus { border-color: var(--focus); background: #fff; outline: 2px solid rgba(47,95,179,.25); outline-offset: 0; }
.unit { position: relative; }
.unit input { padding-right: 48px; }
.unit::after { content: attr(data-unit); position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-size: 14px; pointer-events: none; }
[aria-invalid="true"] { border-color: var(--accent) !important; background: #fff9f7 !important; }
.err { color: var(--accent); font-size: 13.5px; margin: 6px 0 0; font-weight: 500; display: none; }
.err.show { display: block; }
.age-note { margin-top: 10px; font-size: 13.5px; padding: 12px 14px; border-radius: 10px; background: var(--paper-2); color: var(--ink-2); line-height: 1.7; }
.age-note[hidden] { display: none; }
.age-note.attn { background: var(--warn-bg); border: 1px solid var(--warn-line); color: #5a4410; }

.seg { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.seg label, .choices label {
  display: flex; align-items: center; gap: 10px; border: 1px solid #cfcabf; border-radius: 10px; padding: 11px 14px;
  cursor: pointer; background: var(--paper); font-size: 15px; min-height: 48px;
}
.seg label { flex: 1; justify-content: center; min-width: 120px; }
.seg input, .choices input { accent-color: var(--ink); width: 18px; height: 18px; margin: 0; }
.seg label:has(input:checked), .choices label:has(input:checked) { border-color: var(--ink); background: #fff; box-shadow: inset 0 0 0 1px var(--ink); }
.choices { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
@media (max-width: 380px) { .choices { grid-template-columns: 1fr; } }
.chip { background: none; border: 1px dashed var(--ink-2); color: var(--ink); font: inherit; font-size: 13px; padding: 6px 14px; border-radius: 999px; cursor: pointer; margin-bottom: 8px; }
.chip:hover { background: var(--paper-2); }
.counter { font-size: 12px; color: var(--ink-3); text-align: right; margin-top: 4px; }

.photo-grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .photo-grid { grid-template-columns: 1fr 1fr; } }
.photo-slot { border: 1.5px dashed #c9c3b6; border-radius: 14px; padding: 16px; background: var(--paper); }
.photo-slot.has { border-style: solid; border-color: var(--ink-2); }
.photo-frame { aspect-ratio: 3/4; border-radius: 10px; background: var(--paper-2); display: grid; place-items: center; overflow: hidden; margin: 10px 0 12px; color: var(--ink-3); font-size: 13px; text-align: center; padding: 10px; }
.photo-frame.full { aspect-ratio: 9/16; max-height: 360px; }
.photo-frame img { width: 100%; height: 100%; object-fit: contain; background: #ebe8e1; }
.photo-frame svg { width: 44px; height: 44px; stroke: var(--ink-3); fill: none; stroke-width: 1.3; margin: 0 auto 6px; }
.file-btn { position: relative; display: block; }
.file-btn input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.file-btn span { display: flex; justify-content: center; align-items: center; min-height: 46px; border-radius: 999px; border: 1px solid var(--ink); font-weight: 700; font-size: 14px; }
.file-btn:focus-within span { outline: 3px solid var(--focus); outline-offset: 3px; }
.file-name { font-size: 12.5px; color: var(--ink-2); margin-top: 8px; word-break: break-all; }
.photo-guide { font-size: 13.5px; color: var(--ink-2); background: var(--paper-2); border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; }
.photo-guide p { margin: 0 0 6px; } .photo-guide p:last-child { margin: 0; }

.consent label { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 15px; }
.consent input { width: 22px; height: 22px; accent-color: var(--ink); flex: none; margin-top: 3px; }
.minor-note { font-size: 14px; margin-top: 14px; color: var(--ink-2); }

.actions { display: flex; flex-direction: column; gap: 12px; margin: 28px 0 60px; }
.actions .btn { width: 100%; }
@media (min-width: 640px) { .actions { flex-direction: row-reverse; } .actions .btn { width: auto; flex: 1; } }
.err-summary { background: #fff4f1; border: 1px solid #e8b9ae; border-radius: 12px; padding: 14px 16px; color: #7c2a1d; font-size: 14px; margin-top: 20px; }
.err-summary[hidden] { display: none; }
.err-summary ul { margin: 6px 0 0; padding-left: 1.2em; }
.err-summary a { color: #7c2a1d; }

/* confirm */
#confirm[hidden], #form-view[hidden] { display: none; }
.confirm-list { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.confirm-list .ci { display: grid; grid-template-columns: 1fr; padding: 16px 20px; border-bottom: 1px solid var(--line); gap: 4px; }
.confirm-list .ci:last-child { border-bottom: 0; }
.confirm-list dt { font-size: 12.5px; color: var(--ink-3); display: flex; gap: 8px; }
.confirm-list dt b { font-family: var(--latin); font-weight: 500; }
.confirm-list dd { margin: 0; white-space: pre-wrap; word-break: break-word; font-size: 15.5px; }
.confirm-list .ci-photo dd img { max-height: 220px; width: auto; border-radius: 8px; background: var(--paper-2); }
@media (min-width: 640px) { .confirm-list .ci { grid-template-columns: 180px 1fr; gap: 20px; } }
.edit-link { font-size: 12.5px; background: none; border: 0; color: var(--navy); text-decoration: underline; cursor: pointer; padding: 0; font: inherit; font-size: 12.5px; justify-self: start; }
.pending-submit { margin-top: 24px; }
