/* 導入準備フォーム 共通の見た目（index.html・admin.html）。1列の申込書型
   UI設計ルール: 文字は rem、枠は min-height、折り返し可、タップ領域は44px以上 */
:root {
  --bg: #f3f5f9; --paper: #ffffff; --ink: #18223a; --muted: #5a6680; --line: #d6dce8;
  --navy: #1b4965; --navy-ink: #ffffff; --navy-soft: #e2ebf2;
  --done: #2f7a4d; --done-soft: #e6f3ea; --mark: #a85a14; --mark-soft: #fbefe0; --field: #fbfcfe; --danger: #b3261e;
  --f-head: "Zen Kaku Gothic New", "BIZ UDPGothic", "Hiragino Sans", "Yu Gothic", sans-serif;
  --f-body: "BIZ UDPGothic", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1522; --paper: #172033; --ink: #e8ecf4; --muted: #a3aec4; --line: #2c3953;
    --navy: #8cbcd9; --navy-ink: #0f1522; --navy-soft: #1d2d40; --done: #7fcf9c; --done-soft: #183427;
    --mark: #f0b06a; --mark-soft: #3a2a17; --field: #111a2b; --danger: #f2a39d; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--f-body); font-size: 1.0625rem; line-height: 1.75; overflow-wrap: break-word;
  padding: 1.5rem max(1rem, env(safe-area-inset-right)) 2rem max(1rem, env(safe-area-inset-left));
}
.wrap { max-width: 44rem; margin: 0 auto; display: flex; flex-direction: column; gap: 1.5rem; }
h1, h2, h3 { font-family: var(--f-head); margin: 0; line-height: 1.4; text-wrap: balance; }
header { display: flex; flex-direction: column; gap: .5rem; }
.eyebrow { color: var(--navy); font-weight: 700; font-size: .9rem; letter-spacing: .06em; }
h1 { font-size: 1.75rem; font-weight: 900; }
.lead { margin: 0; color: var(--muted); }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: .75rem; padding: 1rem 1.125rem; display: flex; flex-direction: column; gap: .625rem; }
.panel h2 { font-size: 1.15rem; }
.panel p { margin: 0; }
.muted { color: var(--muted); }
.small-text { font-size: .92rem; }

.progress-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .25rem 1rem; }
.progress-row strong { font-family: var(--f-head); font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.bar { height: .625rem; background: var(--navy-soft); border-radius: 1rem; overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: var(--navy); border-radius: 1rem; transition: width .25s; }
.status { font-size: .9rem; color: var(--muted); }
.ok { color: var(--done); }
.warn { color: var(--mark); }

section.part { background: var(--paper); border: 1px solid var(--line); border-radius: .75rem; overflow: hidden; }
.part-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem .75rem; padding: .875rem 1.125rem; background: var(--navy-soft); }
.part-head h2 { font-size: 1.2rem; color: var(--navy); }
.count { font-size: .9rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.part-note { margin: 0; padding: .75rem 1.125rem 0; color: var(--muted); font-size: .95rem; }
.field { padding: .875rem 1.125rem; display: flex; flex-direction: column; gap: .5rem; }
.field + .field { border-top: 1px solid var(--line); }
.field.is-done { background: var(--done-soft); }
.f-label { font-weight: 700; display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .5rem; }
.f-hint { color: var(--muted); font-size: .92rem; line-height: 1.6; margin: 0; }
.tag { font-size: .8rem; padding: 0 .5rem; border-radius: 1rem; background: var(--mark-soft); color: var(--mark); font-weight: 700; }
.tag.opt { background: var(--navy-soft); color: var(--muted); }
.done-row { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem; }
.done-row .check { color: var(--done); font-weight: 700; }
.done-row .lbl { font-weight: 700; }
.done-row .val { flex: 1 1 12rem; min-width: 0; white-space: pre-wrap; }

input[type=text], input[type=number], input[type=password], select, textarea {
  font: inherit; color: var(--ink); background: var(--field); border: 2px solid var(--line); border-radius: .5rem;
  min-height: 2.75rem; padding: .375rem .625rem; width: 100%; max-width: 100%;
}
textarea { min-height: 5.5rem; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--navy); outline-offset: 1px; border-color: var(--navy); }
.inline { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; }
.inline select, .inline input[type=number] { width: auto; min-width: 6rem; }
.inline .flex1 { flex: 1 1 12rem; width: auto; }
.choices { display: flex; flex-wrap: wrap; gap: .5rem; }
.choice { display: inline-flex; align-items: center; gap: .5rem; min-height: 2.75rem; padding: .25rem .875rem; border: 2px solid var(--line); border-radius: 2rem; background: var(--field); cursor: pointer; }
.choice input { width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--navy); }
.choice:has(input:checked) { border-color: var(--navy); background: var(--navy-soft); font-weight: 700; }
.swatch { width: 1.1rem; height: 1.1rem; border-radius: 50%; display: inline-block; border: 1px solid var(--line); }

button, .btn { font: inherit; font-weight: 700; min-height: 2.75rem; padding: .375rem 1.125rem; border-radius: .5rem; border: 2px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; text-align: center; }
button.primary { background: var(--navy); border-color: var(--navy); color: var(--navy-ink); }
button.danger { border-color: var(--danger); color: var(--danger); }
button.small { padding: .25rem .75rem; font-size: .95rem; }
button:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
button:disabled { opacity: .55; cursor: default; }

.rows { display: flex; flex-direction: column; gap: .625rem; }
.row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding: .625rem; border: 1px solid var(--line); border-radius: .5rem; background: var(--field); }
.row > * { min-width: 0; }
.row .grow { flex: 1 1 10rem; width: auto; }
.row .mid { flex: 1 1 7rem; width: auto; }
.row select { width: auto; min-width: 6.5rem; flex: 0 1 auto; }
.row .choice { background: var(--paper); }
.row-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { display: inline-flex; align-items: center; gap: .25rem; padding: .125rem .25rem .125rem .75rem; border-radius: 2rem; background: var(--navy-soft); }
.chip button { min-height: 2.75rem; min-width: 2.75rem; padding: 0; border: none; background: transparent; }
.photo { display: flex; flex-direction: column; gap: .375rem; padding: .75rem; border: 2px dashed var(--line); border-radius: .5rem; }
.photo-msg { font-size: .92rem; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }
footer { text-align: center; color: var(--muted); font-size: .9rem; }
@media (prefers-reduced-motion: reduce) { .bar span { transition: none; } }
