/* あて名かんたん（atena-kantan）。配色は kantan-tools 共通（証明写真・HEIC と同じ --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; }
/* 一覧 */
.list-box { margin: 8px 0; }
.list-tools { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 10px; }
.list-tools label { display: flex; flex-direction: column; font-size: .82rem; color: var(--muted); }
.list-tools .grow { flex: 1 1 220px; }
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; }
input:focus, select:focus { outline: 3px solid #ffb800; outline-offset: 1px; }
.rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; gap: 10px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.row-main { flex: 1; min-width: 0; }
.row-main p { margin: 0; }
.row-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.row-name .ren { color: var(--muted); font-size: .9rem; }
.row-addr { font-size: .88rem; color: var(--muted); overflow-wrap: anywhere; }
.row-note { font-size: .8rem; color: #9a5b00; }
.row-act { display: flex; gap: 6px; flex: 0 0 auto; }
.badge { font-size: .72rem; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); background: #eef1f5; color: var(--ink); font-weight: 700; }
.badge.k-nenga { background: #fdecef; border-color: #f6c3cd; color: #9c1c38; }
.badge.k-mochu { background: #e9ebef; border-color: #c5cad3; color: #333a44; }
.badge.k-kanchu { background: #e6f1fe; border-color: #b9d6fb; color: #0e4ea8; }
.badge.k-none { background: #f4f4f4; color: #666; }
.badge.flag { background: #fff6e0; border-color: #f2d48a; color: #7a4d00; }
.glyph-warn { font-size: .85rem; }
@media (max-width: 600px) {
  .row { flex-direction: column; align-items: stretch; }
  .row-act { justify-content: flex-end; }
}
/* 列の対応 */
.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 14px; }
.map-grid label { display: flex; flex-direction: column; font-size: .88rem; font-weight: 700; }
.scroll-x { overflow-x: auto; }
table.mini { border-collapse: collapse; font-size: .82rem; background: #fff; }
table.mini th, table.mini td { border: 1px solid var(--line); padding: 4px 6px; white-space: nowrap; }
/* フォーム */
.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] { min-height: 0; width: 20px; height: 20px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
@media (max-width: 600px) { .row3 { grid-template-columns: 1fr; } }
fieldset { border: 1px solid var(--line); border-radius: 12px; margin: 10px 0; padding: 8px 12px; background: var(--card); }
legend { font-weight: 700; padding: 0 4px; }
.legend2 { margin: 8px 0 2px; font-weight: 700; font-size: .9rem; }
.radios { display: flex; flex-wrap: wrap; gap: 4px 16px; border: 0; padding: 0; margin: 4px 0; background: transparent; }
fieldset.radios { border: 1px solid var(--line); padding: 8px 12px; background: var(--card); }
.radios label { flex-direction: row; align-items: center; gap: 6px; font-weight: 400; min-height: 40px; margin: 0; }
.calib { display: flex; align-items: center; gap: 8px; margin: 6px 0; flex-wrap: wrap; }
.calib span { min-width: 9em; font-size: .9rem; }
.calib output { min-width: 3.2em; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.edit-preview canvas { border: 1px solid var(--line); border-radius: 4px; background: #fffdf7; }
.sticky { position: sticky; bottom: 0; background: var(--bg); padding: 8px 0; margin: 0; }
/* プレビュー */
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 10px 0; }
#pageNo { min-width: 7em; text-align: center; font-weight: 700; }
.card-wrap { display: flex; justify-content: center; width: 100%; max-width: 400px; margin: 0 auto; }
#card { display: block; width: 100%; max-width: 400px; box-shadow: 0 2px 10px rgba(0,0,0,.15); border-radius: 4px; background: #fffdf7; }
.warn-list { margin: 8px 0; padding-left: 1.2em; font-size: .9rem; }
.support-line { flex-direction: column; align-items: center; gap: 4px; }
.support-line .hint { margin: 0; text-align: center; }
.foot { text-align: center; font-size: .8rem; color: var(--muted); padding: 10px 16px 24px; }
.foot p { margin: 2px 0; }
.foot a { color: var(--muted); }
/* 第 2 期: 4 つの手順・季節の宛名・文面 */
@media (max-width: 600px) { .steps { display: grid; grid-template-columns: 1fr 1fr; } }
.season-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.season-btns .btn { flex: 1 1 220px; }
.season details { margin-top: 8px; font-size: .9rem; }
.season .rules { margin: 4px 0; padding-left: 1.2em; }
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; }
.bun-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); gap: 18px; align-items: start; }
@media (max-width: 860px) { .bun-grid { grid-template-columns: 1fr; } }
.bun-types { flex-direction: column; align-items: flex-start; }
.bun-types legend { margin-bottom: 2px; }
#bunCard { display: block; width: 100%; max-width: 400px; box-shadow: 0 2px 10px rgba(0,0,0,.15); border-radius: 4px; background: #fffdf7; }
.bun-grid fieldset { min-width: 0; }
.bun-grid input, .bun-grid select { width: 100%; }
