/* ふるさと納税ワンストップまとめ。配色は kantan-tools 共通（atena-kantan 35f1c35 css/style.css の 1〜52 行目を写したもの: --blue / --ink / --bg …）。変えない */
[hidden] { display: none !important; }
:root { --blue: #1f6feb; --ink: #1d232b; --muted: #5b6573; --bg: #f5f7fa; --card: #fff; --line: #dde3ea; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif;
  color: var(--ink); background: var(--bg); line-height: 1.6; font-size: 16px;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.top { background: var(--blue); color: #fff; padding: 14px 16px 10px; }
.top h1 { margin: 0; font-size: 1.3rem; max-width: 960px; margin: 0 auto; }
.top h1 .nw { display: inline-block; white-space: nowrap; }   /* 見出しを語の途中で折り返さない */
.lead { margin: 4px auto 8px; font-size: .9rem; max-width: 960px; }
.steps { display: flex; gap: 4px; max-width: 960px; margin: 0 auto; }
.step { flex: 1; text-align: center; padding: 6px 2px; border-radius: 6px; background: rgba(255,255,255,.18); color: #fff; border: 0; font: inherit; font-size: .85rem;
  cursor: pointer; min-height: 40px; white-space: nowrap; }
.step.active { background: #fff; color: var(--blue); font-weight: 700; }
.step:focus-visible { outline: 3px solid #ffb800; outline-offset: 2px; }
main { max-width: 960px; margin: 0 auto; padding: 12px 14px 24px; }
h2 { font-size: 1.2rem; margin: 10px 0 10px; }
h2:focus { outline: none; }
h3 { font-size: 1rem; margin: 10px 0 6px; }
.count { font-size: .9rem; color: var(--muted); font-weight: 400; }
.privacy { margin: 0 0 8px; font-size: .92rem; font-weight: 700; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 16px; border-radius: 12px;
  border: 2px solid var(--blue); background: #fff; color: var(--blue); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; text-align: center; }
.btn.primary { background: var(--blue); color: #fff; }
.btn.big { min-height: 56px; font-size: 1.05rem; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost-line { border-color: var(--line); color: var(--ink); }
.btn.small { min-height: 40px; padding: 4px 10px; font-size: .85rem; border-width: 1px; }
.btn.sq { min-width: 44px; min-height: 44px; padding: 0; font-size: 1.2rem; }
.btn.danger { border-color: #c0262d; color: #c0262d; }
.btn.danger-text { color: #c0262d; border-color: #e7b3b5; }
.btn:disabled { opacity: .45; cursor: default; }
.btn:focus-visible, label.btn:focus-within { outline: 3px solid #ffb800; outline-offset: 2px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; align-items: center; }
.vh { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); }
.err { color: #c0262d; font-weight: 700; margin: 6px 0; }
.err:empty { display: none; }
.info { color: var(--blue); font-weight: 700; margin: 6px 0; }
.info:empty { display: none; }
.warn { color: #9a5b00; }
.sample-fmt { display: flex; flex-direction: column; font-size: .82rem; color: var(--muted); flex: 0 1 300px; min-width: 0; max-width: 100%; }
.sample-fmt select { min-height: 48px; width: 100%; max-width: 100%; }
.hint { font-size: .88rem; color: var(--muted); margin: 4px 0 8px; }
.empty { background: var(--card); border: 1px dashed var(--line); border-radius: 12px; padding: 14px; color: var(--muted); }
.box { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 14px 0; }
.box summary { cursor: pointer; font-weight: 700; min-height: 32px; }
.box ol, .box ul { margin: 0 0 8px; padding-left: 1.3em; }
.box li { margin: 3px 0; font-size: .93rem; }
/* 一覧 */
/* 以下 atena-kantan 35f1c35 css/style.css のフォーム・表の部分を写して、このツール用に足したもの（色は上の変数と同じ系統だけ） */
input, select { font: inherit; font-size: 16px; padding: 8px 10px; border: 1px solid #b9c3cf; border-radius: 8px; background: #fff; color: var(--ink); min-height: 44px; max-width: 100%; }
input:focus, select:focus { outline: 3px solid #ffb800; outline-offset: 1px; }
textarea { font: inherit; font-size: 16px; padding: 8px 10px; border: 1px solid #b9c3cf; border-radius: 8px; background: #fff; color: var(--ink); width: 100%; resize: vertical; line-height: 1.6; }
textarea:focus { outline: 3px solid #ffb800; outline-offset: 1px; }
.form label { display: flex; flex-direction: column; font-size: .88rem; font-weight: 700; margin: 6px 0; }
.form label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; font-size: .95rem; min-height: 44px; }
.form input[type=checkbox], .form input[type=radio], label.check input { min-height: 0; width: 20px; height: 20px; flex: 0 0 auto; }
label.check { display: flex; flex-direction: row; align-items: center; gap: 8px; min-height: 44px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 600px) { .row2 { grid-template-columns: 1fr; } }
fieldset { border: 1px solid var(--line); border-radius: 12px; margin: 10px 0; padding: 8px 12px; background: var(--card); min-width: 0; }
legend { font-weight: 700; padding: 0 4px; }
.legend2 { margin: 8px 0 2px; font-weight: 700; font-size: .9rem; width: 100%; }
.radios { display: flex; flex-wrap: wrap; gap: 4px 16px; border: 0; padding: 0; margin: 4px 0; background: transparent; }
.radios.col { flex-direction: column; }
.radios label { flex-direction: row; align-items: center; gap: 6px; font-weight: 400; min-height: 40px; margin: 0; }
.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 14px; }
.map-grid label { display: flex; flex-direction: column; font-size: .88rem; font-weight: 700; }
.scroll-x { overflow-x: auto; max-width: 100%; }
table.mini { border-collapse: collapse; font-size: .82rem; background: #fff; margin: 8px 0; }
table.mini th, table.mini td { border: 1px solid var(--line); padding: 4px 6px; white-space: nowrap; }
.sticky { position: sticky; bottom: 0; background: var(--bg); padding: 8px 0; margin: 0; z-index: 2; }
.support-line { flex-direction: column; align-items: center; gap: 4px; }
.foot { text-align: center; font-size: .8rem; color: var(--muted); padding: 10px 16px 24px; }
.foot p { margin: 2px 0; }
.foot a { color: var(--muted); }
@media (max-width: 600px) { .steps { display: grid; grid-template-columns: 1fr 1fr; } }
/* このツール */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 12px 0; }
.card h3:first-child { margin-top: 0; }
.req { font-size: .72rem; color: #c0262d; font-weight: 700; }
.statusbar { position: sticky; top: 0; z-index: 3; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; padding: 6px 10px; background: #fff; border-bottom: 1px solid var(--line); }
.chip { font-size: .85rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); background: #eef1f5; }
.chip:empty { display: none; }
.lv-ok.chip { background: #e8f6ec; border-color: #a9dbb7; color: #146c2e; }
.lv-warn.chip { background: #fff6e0; border-color: #f2d48a; color: #7a4d00; }
.lv-over.chip { background: #fdecec; border-color: #f1b4b6; color: #a3161d; }
.ck.lv-ok { border-left: 6px solid #2f9e55; }
.ck.lv-warn { border-left: 6px solid #d99a00; }
.ck.lv-over { border-left: 6px solid #c0262d; }
.big-num { font-size: 2rem; font-weight: 700; margin: 0; }
.big-num small { font-size: 1rem; color: var(--muted); }
.big-num-s { font-size: 1.2rem; font-weight: 700; margin: 0 0 4px; }
.ok-text { color: #146c2e; font-weight: 700; }
.warn-text { color: #7a4d00; font-weight: 700; }
.err-text { color: #c0262d; }
.err-list { margin: 0; padding-left: 1.2em; color: #c0262d; }
.notes { margin: 6px 0; padding-left: 1.2em; font-size: .9rem; }
.notes li { margin: 3px 0; }
.birth-row, .mn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.birth-row input { width: 4.2em; text-align: center; }
.birth-row select { width: auto; }
.mn-input { flex: 1 1 12em; min-width: 0; font-variant-numeric: tabular-nums; letter-spacing: .08em; }
.mn-input.masked { -webkit-text-security: disc; text-security: disc; }
.mn-msg { margin: 4px 0; font-size: .88rem; }
.mn-msg.ok { color: #146c2e; font-weight: 700; }
.mn-msg.warn { color: #7a4d00; font-weight: 700; }
.mn-msg:empty { display: none; }
.groups ul { margin: 4px 0 8px; padding-left: 1.2em; font-size: .9rem; }
.dons { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.don { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.don-head { display: flex; align-items: center; gap: 8px; }
.don-no { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; font-size: .85rem; }
.don-title { flex: 1; min-width: 0; font-weight: 700; overflow-wrap: anywhere; }
.don-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 12px; }
.don-grid label { display: flex; flex-direction: column; font-size: .85rem; font-weight: 700; margin: 4px 0; min-width: 0; }
.don-grid input, .don-grid select { width: 100%; }
.don input.bad { border-color: #c0262d; background: #fff7f7; }
.don-more { margin-top: 4px; }
.don-more summary { cursor: pointer; min-height: 40px; display: flex; align-items: center; color: var(--blue); font-weight: 700; font-size: .9rem; }
.faq summary { cursor: pointer; font-weight: 700; min-height: 40px; display: flex; align-items: center; }
.faq p { margin: 0 0 8px; font-size: .9rem; }
.about ul { font-size: .92rem; }
@media (max-width: 600px) {
  .don-grid { grid-template-columns: 1fr; }
  .actions.sticky .btn { flex: 1 1 auto; }
}

/* 台紙の写真（P1） */
.photo-box { margin: 12px 0; }
.photo-box > summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.photo-slot { border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin: 10px 0; }
.photo-label { margin: 0 0 6px; font-weight: 600; }
.photo-slot input[type="file"] { max-width: 100%; }
.photo-canvas { display: block; width: 100%; max-width: 420px; height: auto; aspect-ratio: 85.6 / 54; border: 1px dashed var(--muted); touch-action: none; cursor: grab; background: #fff; margin-top: 8px; }
.photo-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.photo-tools input[type="range"] { width: 160px; vertical-align: middle; }
#henkoBox > summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
#henkoBox h4 { margin: 14px 0 4px; }
.vh { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.photo-pick { position: relative; cursor: pointer; }
.photo-pick:focus-within { outline: 2px solid var(--blue); outline-offset: 2px; }
