:root {
  --accent: #fb576b;
  --accent-d: #e2435a;
  --accent-soft: #fff1f3;
  --text: #333;
  --muted: #6f6f6f;
  --line: #e7e3e4;
  --bg: #faf8f8;
  --card: #fff;
  --err: #d6243b;
  --info: #2f6fb0;
  --radius: 10px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: .02em;
}
a { color: var(--accent-d); }
[hidden] { display: none !important; }

.hd { background: #fff; border-bottom: 1px solid var(--line); }
.hd-in { max-width: 760px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; gap: 10px; }
.hex {
  width: 26px; height: 28px; background: var(--accent);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.brand { font-weight: 700; font-size: 15px; letter-spacing: .06em; }

.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(115deg, #fff 0 55%, var(--accent-soft) 55% 70%, #ffd9de 70% 100%);
}
.hero::after {
  content: ""; position: absolute; right: -40px; bottom: -60px; width: 220px; height: 240px;
  background: var(--accent); opacity: .85;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
@media (max-width: 600px) {
  .hero { background: linear-gradient(115deg, #fff 0 70%, var(--accent-soft) 70% 85%, #ffd9de 85% 100%); }
  .hero::after { width: 110px; height: 120px; right: -36px; bottom: -44px; opacity: .6; }
}
.hero-in { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; padding: 28px 16px 32px; }
.hero h1 { margin: 0 0 8px; color: var(--accent); font-size: clamp(24px, 5vw, 32px); letter-spacing: .08em; }
.hero p { margin: 0; max-width: 34em; font-size: 14px; }

.wrap { max-width: 760px; margin: 0 auto; padding: 20px 16px 48px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 20px; margin-bottom: 16px; box-shadow: 0 1px 2px rgba(0,0,0,.03);
}
.card h2 {
  margin: 0 0 16px; font-size: 20px; padding-left: 14px; position: relative;
}
.card h2::before {
  content: ""; position: absolute; left: 0; top: .35em; width: 5px; height: 1.1em;
  background: var(--accent); border-radius: 3px;
}
.center { text-align: center; }
.center h2 { padding-left: 0; }
.center h2::before { display: none; }
.lead { margin: -4px 0 20px; color: var(--muted); font-size: 14px; }
.small { font-size: 13px; color: var(--muted); }

.banner { border-radius: var(--radius); padding: 12px 14px; margin-bottom: 16px; font-size: 14px; }
.banner.warn { background: #fff6e0; border: 1px solid #f1d48a; }
.banner.info { background: #eef5fc; border: 1px solid #c4dbf1; }

.progress { list-style: none; margin: 0 0 16px; padding: 0; display: flex; gap: 4px; counter-reset: st; }
.progress li {
  flex: 1; text-align: center; font-size: 11px; color: var(--muted); position: relative; padding-top: 34px;
  counter-increment: st; line-height: 1.3;
}
.progress li::before {
  content: counter(st); position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 28px; height: 28px; line-height: 28px; border-radius: 50%;
  background: #fff; border: 2px solid var(--line); color: var(--muted); font-weight: 700; font-size: 13px;
}
.progress li.done::before { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.progress li.now { color: var(--text); font-weight: 700; }
.progress li.now::before { background: var(--accent); border-color: var(--accent); color: #fff; }
@media (max-width: 520px) {
  .progress li span { display: none; }
  .progress li.now span { display: inline; position: absolute; left: 50%; transform: translateX(-50%); white-space: nowrap; }
}

.fld { margin-bottom: 20px; }
.fld > .lbl { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.tag { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 3px; line-height: 1.6; white-space: nowrap; }
.tag.req { background: var(--accent); color: #fff; }
.tag.opt { background: #eee; color: var(--muted); }
.help { font-size: 13px; color: var(--muted); margin: -2px 0 6px; }
.err { color: var(--err); font-size: 13px; margin-top: 4px; display: none; }
.fld.invalid .err { display: block; }
.fld.invalid input, .fld.invalid select, .fld.invalid textarea { border-color: var(--err); background: #fff8f9; }

input[type=text], input[type=tel], input[type=email], input[type=url], input[type=number],
input[type=date], input[type=month], select, textarea {
  width: 100%; font: inherit; font-size: 16px; color: inherit;
  padding: 10px 12px; border: 1px solid #d5cfd1; border-radius: 8px; background: #fff;
  appearance: none; -webkit-appearance: none;
}
select {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%;
  background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(251,87,107,.18); }
.unit-wrap { display: flex; align-items: center; gap: 8px; }
.unit-wrap input { max-width: 220px; }
.unit { color: var(--muted); white-space: nowrap; }

.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices label {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  border: 1px solid #d5cfd1; border-radius: 999px; padding: 8px 16px; background: #fff; font-size: 15px;
}
.choices input { accent-color: var(--accent); margin: 0; width: 18px; height: 18px; }
.choices label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-d); font-weight: 700; }
.choices.big { display: grid; grid-template-columns: 1fr 1fr; }
.choices.big label { border-radius: var(--radius); padding: 18px 16px; justify-content: center; font-size: 17px; }

.person {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px 4px; margin-bottom: 16px;
  background: #fffdfd;
}
.person h3 { margin: 0 0 14px; font-size: 16px; color: var(--accent-d); }
.empty { color: var(--muted); font-size: 14px; background: #f6f4f4; border-radius: 8px; padding: 12px 14px; }

.note { background: var(--accent-soft); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 20px; font-size: 14px; }
.note p { margin: 0 0 6px; }
.note ul { margin: 0 0 8px; padding-left: 1.2em; }
.note .ng { color: var(--err); font-weight: 700; }

.docbox { border: 1px dashed #d5cfd1; border-radius: var(--radius); padding: 14px; margin-bottom: 16px; }
.docbox h3 { margin: 0 0 8px; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.files { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.files li { display: flex; align-items: center; gap: 10px; background: #f8f6f6; border-radius: 8px; padding: 6px 8px; font-size: 13px; }
.files img { width: 48px; height: 48px; object-fit: cover; border-radius: 4px; background: #eee; }
.files .pdf { width: 48px; height: 48px; display: grid; place-items: center; background: #eee; border-radius: 4px; font-weight: 700; font-size: 11px; color: var(--muted); }
.files .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files button { border: 0; background: none; color: var(--err); font: inherit; cursor: pointer; padding: 4px 6px; }
.pick { position: relative; overflow: hidden; display: inline-block; }
.pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.cf h3 { font-size: 15px; margin: 20px 0 6px; color: var(--accent-d); }
.cf dl { margin: 0; display: grid; grid-template-columns: minmax(8em, 40%) 1fr; border-top: 1px solid var(--line); font-size: 14px; }
.cf dt, .cf dd { margin: 0; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.cf dt { color: var(--muted); }
.cf dd { white-space: pre-wrap; word-break: break-word; }
.privacy { background: #f6f4f4; border-radius: var(--radius); padding: 14px 16px; font-size: 14px; margin: 24px 0 0; }

.nav { display: flex; justify-content: space-between; gap: 12px; margin: 8px 0 16px; }
.btn {
  font: inherit; font-weight: 700; border-radius: 999px; padding: 12px 28px; cursor: pointer;
  border: 2px solid transparent; transition: background .15s, opacity .15s; min-height: 48px;
}
.btn.primary { background: var(--accent); color: #fff; margin-left: auto; min-width: 160px; }
.btn.primary:hover { background: var(--accent-d); }
.btn.ghost { background: #fff; color: var(--muted); border-color: var(--line); }
.btn.outline { background: #fff; color: var(--accent-d); border-color: var(--accent); }
.btn.text { background: none; color: var(--muted); text-decoration: underline; padding: 12px 8px; }
.btn:disabled { opacity: .5; cursor: default; }
.save { padding: 16px 20px; }
.save p { margin: 0 0 10px; }
.save-btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.msg-icon {
  width: 64px; height: 70px; margin: 8px auto 12px; background: var(--accent);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.spinner {
  width: 36px; height: 36px; margin: 8px auto; border-radius: 50%;
  border: 3px solid var(--accent-soft); border-top-color: var(--accent); animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 20;
  background: #333; color: #fff; padding: 10px 18px; border-radius: 8px; font-size: 14px;
  max-width: calc(100% - 32px); box-shadow: 0 4px 16px rgba(0,0,0,.2);
}
.overlay { position: fixed; inset: 0; background: rgba(255,255,255,.85); z-index: 30; display: grid; place-items: center; }
.overlay-box { text-align: center; padding: 24px; }
.ft { text-align: center; font-size: 12px; color: var(--muted); padding: 24px 16px 32px; }
