:root { --bg: #f4f6f8; --card: #fff; --ink: #1d2430; --muted: #66707d; --line: #dde3ea; --accent: #0b5cad; --accent-ink: #fff; --ok: #1f8a4c; --bad: #c0392b; --warn: #b9770e; --radius: 12px; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif; background: var(--bg); color: var(--ink); line-height: 1.6; font-size: 16px; }
header.top { background: #0f2340; color: #fff; padding: 12px 16px; }
header.top .brand { max-width: 760px; margin: 0 auto; display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .02em; }
header.top .brand small { font-weight: 400; opacity: .8; }
main { max-width: 760px; margin: 0 auto; padding: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.card.inner { background: #fafbfc; padding: 14px; margin: 10px 0; }
h1 { font-size: 1.35rem; margin: 0 0 10px; }
h2 { font-size: 1.1rem; margin: 0 0 14px; padding-bottom: 8px; border-bottom: 2px solid var(--accent); }
h3 { font-size: 1rem; margin: 18px 0 6px; }
.lead { color: var(--ink); }
.muted { color: var(--muted); font-size: .9rem; }
.hint { color: var(--muted); font-size: .85rem; margin: 4px 0 0; }
.req { color: var(--bad); font-style: normal; font-size: .75rem; margin-left: 6px; border: 1px solid var(--bad); border-radius: 4px; padding: 0 4px; vertical-align: middle; }
.field { margin: 0 0 16px; }
.field[hidden] { display: none; }
.field > label { display: block; font-weight: 600; margin-bottom: 4px; font-size: .95rem; }
input[type=text], input[type=email], input[type=tel], input[type=date], input[type=number], select, textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid #b9c2cc; border-radius: 8px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
input.upper { text-transform: uppercase; letter-spacing: .05em; font-family: ui-monospace, Menlo, Consolas, monospace; }
.money-row, .zip-row { display: flex; align-items: center; gap: 8px; }
.money-row input { text-align: right; font-variant-numeric: tabular-nums; font-size: 1.1rem; }
.money-row .unit, .funds .unit { color: var(--muted); white-space: nowrap; }
.money-read { color: var(--accent); font-size: .9rem; min-height: 1.2em; margin-top: 2px; }
.zip-row input { max-width: 180px; }
.opts { display: flex; flex-direction: column; gap: 6px; }
.opt { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid #c6ced6; border-radius: 8px; cursor: pointer; background: #fff; }
.opt input { margin-top: 4px; flex: none; }
.opt span { display: block; }
.opt small { display: block; color: var(--muted); font-size: .8rem; }
.opt.on { border-color: var(--accent); background: #eef4fb; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--bad); }
.error { color: var(--bad); font-size: .85rem; margin: 4px 0 0; }
.error[hidden] { display: none; }
.err-summary { color: var(--bad); background: #fdecea; border: 1px solid #f5c6c2; border-radius: 8px; padding: 10px 12px; }
.computed .value { font-size: 1.3rem; font-weight: 700; padding: 8px 12px; background: #f4f6f8; border-radius: 8px; text-align: right; font-variant-numeric: tabular-nums; }
.btn { font: inherit; padding: 12px 20px; border-radius: 10px; border: 1px solid var(--accent); background: #fff; color: var(--accent); cursor: pointer; font-weight: 600; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.big { font-size: 1.1rem; padding: 14px 28px; }
.btn.small { padding: 7px 12px; font-size: .9rem; }
.btn.ghost { border-color: #c6ced6; color: var(--muted); }
.btn:disabled { opacity: .5; cursor: default; }
.nav { display: flex; justify-content: space-between; align-items: center; margin: 24px 0; gap: 12px; }
.progress { list-style: none; display: flex; gap: 4px; padding: 0; margin: 0 0 16px; }
.progress li { flex: 1; text-align: center; color: var(--muted); font-size: .75rem; }
.progress li span { display: inline-flex; width: 28px; height: 28px; border-radius: 50%; align-items: center; justify-content: center; background: #d9e0e8; color: #fff; font-weight: 700; margin-bottom: 2px; }
.progress li.now span { background: var(--accent); }
.progress li.done span { background: var(--ok); }
.progress li.now { color: var(--ink); font-weight: 600; }
.progress small { display: block; line-height: 1.2; }
.row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.fund-row select { flex: 1 1 200px; }
.fund-row input { width: 90px; text-align: right; }
.funds .total { margin-left: auto; font-weight: 600; }
.group-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.docs-list li, .done ol li { margin: 4px 0; }
.qr-box { display: flex; gap: 16px; align-items: center; border: 1px dashed #b9c2cc; border-radius: 10px; padding: 14px; margin: 12px 0; background: #fafbfc; }
.qr-box .qr { width: 160px; height: 160px; flex: none; background: #fff; }
.qr-box .qr svg { width: 100%; height: 100%; }
.qr-box p { margin: 4px 0; font-size: .9rem; }
.slot { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin: 10px 0; background: #fff; }
.slot.ok { border-color: var(--ok); background: #f1faf4; }
.slot.bad { border-color: var(--bad); }
.slot.uploading { opacity: .6; }
.slot-head { display: flex; align-items: center; gap: 8px; }
.slot-head .status { margin-left: auto; color: var(--muted); font-size: .85rem; }
.slot.ok .status { color: var(--ok); font-weight: 600; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.thumbs figure { position: relative; margin: 0; width: 96px; }
.thumbs img { width: 96px; height: 96px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); background: #eee; }
.thumbs figcaption { font-size: .7rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thumbs .x { position: absolute; top: -6px; right: -6px; border: none; background: var(--bad); color: #fff; border-radius: 50%; width: 22px; height: 22px; cursor: pointer; }
.upload-btn { display: inline-block; }
.confirm-sec { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dotted #e3e8ee; font-size: .95rem; }
.kv span { color: var(--muted); flex: 0 0 45%; }
.kv b { text-align: right; word-break: break-all; }
.kv.big b { font-size: 1.15rem; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.kv-group { margin: 8px 0; padding: 8px 10px; background: #fafbfc; border-radius: 8px; }
.kv-title { font-weight: 700; margin-bottom: 4px; }
.bad { color: var(--bad); }
.done .receipt { font-size: 1.2rem; }
.done .receipt b { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.4rem; letter-spacing: .05em; }
.invalid h2 { border: none; }
#line-banner { background: #fff4d6; border-bottom: 1px solid #f0d58c; padding: 10px 16px; text-align: center; font-size: .9rem; }
#line-banner a { font-weight: 700; color: var(--accent); }
footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 24px 16px; }
@media (max-width: 600px) {
  main { padding: 10px; }
  .card { padding: 14px; }
  .progress small { display: none; }
  .progress li.now small { display: block; }
  .qr-box { flex-direction: column; }
  .kv { flex-direction: column; gap: 0; }
  .kv b { text-align: left; }
  .nav .btn { flex: 1; }
}
