/* 就労証明書かんたん作成。配色は kantan-tools 共通（furikaeri-matome e39fe8c css/style.css 2〜43 行目を写したもの。もとは atena-kantan 35f1c35）。変えない */
[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; }
.lead { margin: 4px auto 8px; font-size: .9rem; max-width: 960px; }
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; }
.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; }
.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; }
.foot { text-align: center; font-size: .8rem; color: var(--muted); padding: 10px 16px 24px; }
.foot p { margin: 2px 0; }
/* このツール（ここから下はこのツール用に足したもの。色は上の変数と同じ系統だけ） */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 12px 0; min-width: 0; }
.unofficial { font-size: .85rem; margin: 2px auto 6px; max-width: 960px; }
.top .unofficial { color: #fff; }
.target { margin: 4px 0 6px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.tab { min-height: 48px; border-radius: 10px; border: 2px solid var(--blue); background: #fff; color: var(--blue); font: inherit; font-weight: 700; cursor: pointer; padding: 6px 8px; font-size: .9rem; }
.tab[aria-selected="true"] { background: var(--blue); color: #fff; }
.tab:focus-visible { outline: 3px solid #ffb800; outline-offset: 2px; }
.selfnote { background: #eef4ff; border-radius: 10px; padding: 8px 12px; font-size: .92rem; }
.selfnote p { margin: 4px 0; }
form label, .grid2 > label, .grid3 > label { display: flex; flex-direction: column; gap: 2px; font-size: .88rem; font-weight: 700; min-width: 0; }
input[type=text], input[type=date], input[type=month], input[type=time], input[type=number], select, textarea {
  font: inherit; font-size: 16px; font-weight: 400; min-height: 44px; padding: 6px 8px; border: 1px solid #b9c3cf; border-radius: 8px; background: #fff; color: var(--ink);
  width: 100%; min-width: 0; max-width: 100%; }
textarea { min-height: 80px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #ffb800; outline-offset: 1px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 10px 12px; margin: 6px 0; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: 10px 12px; margin: 6px 0; }
.act-row { border-top: 1px dashed var(--line); padding-top: 6px; }
.slot { display: grid; grid-template-columns: 4.2em repeat(3, minmax(0, 1fr)); gap: 6px; align-items: end; margin: 6px 0; }
.slot-lb { font-weight: 700; font-size: .9rem; padding-bottom: 10px; }
.slot label { font-size: .8rem; }
@media (max-width: 480px) { .slot { grid-template-columns: repeat(2, minmax(0, 1fr)); } .slot-lb { grid-column: 1 / -1; padding: 0; } }
fieldset { border: 1px solid var(--line); border-radius: 10px; margin: 8px 0; padding: 6px 10px 10px; min-width: 0; }
legend { font-weight: 700; font-size: .9rem; padding: 0 4px; }
.days { display: flex; flex-wrap: wrap; gap: 6px; }
.day { flex-direction: row !important; align-items: center; }
.day input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.day span { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; min-height: 44px; padding: 0 8px; border: 2px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.day input:checked + span { border-color: var(--blue); background: #eef4ff; color: var(--blue); }
.day input:focus-visible + span { outline: 3px solid #ffb800; outline-offset: 1px; }
.chk { display: flex !important; flex-direction: row !important; align-items: center; gap: 8px; min-height: 44px; font-weight: 400 !important; margin: 6px 0; }
.chk input { width: 22px; height: 22px; flex: 0 0 auto; }
.full { display: flex; flex-direction: column; }
.checks { list-style: none; padding: 0; margin: 6px 0; }
.checks li { margin: 4px 0; }
.checks li.ok { color: var(--muted); }
.chk-item { display: block; width: 100%; text-align: left; font: inherit; font-size: .92rem; min-height: 44px; padding: 8px 10px; border-radius: 8px; cursor: pointer; border: 1px solid var(--line); background: #fff; color: var(--ink); }
.checks li.e .chk-item { border-color: #e7b3b5; background: #fff5f5; color: #9b1c22; }
.checks li.w .chk-item { border-color: #f1d39a; background: #fffaf0; color: #7a4a00; }
.err-count { color: #c0262d; font-weight: 700; cursor: pointer; margin: 4px 0; }
.src p { margin: 2px 0; font-size: .8rem; color: var(--muted); overflow-wrap: anywhere; }
.foot .src p { font-size: .75rem; }
.foot a, .src a { overflow-wrap: anywhere; }
.foot-support { margin: 4px 0 10px !important; }
details.box p { margin: 6px 0 0; font-size: .92rem; }
label.btn { position: relative; }

/* ---- プレビュー（A4 縦 1 枚。画面では幅に合わせて縮小） ---- */
.sheet-fit { overflow: hidden; position: relative; }
.sheet { width: 194mm; transform-origin: 0 0; background: #fff; color: #000; font-family: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif; font-size: 8.2pt; line-height: 1.28; }
.sheet .v { font-family: "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif; font-weight: 600; color: #0b2a66; }
.sheet .blank { display: inline-block; min-width: 1.2em; }
.sh-frame { border: 1.2pt solid #000; padding: 3mm 3mm 2mm; }
.sh-title { text-align: center; font-size: 14pt; font-weight: 700; margin: 0 0 1mm; letter-spacing: .3em; }
.sh-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 3mm; }
.sh-to { padding-top: 2mm; min-width: 40mm; }
.sh-issuer { border-collapse: collapse; width: 108mm; }
.sh-issuer th { text-align: left; font-weight: 400; width: 22mm; padding: .1mm 1mm; white-space: nowrap; }
.sh-issuer td { border-bottom: .5pt solid #000; padding: .1mm 1mm; overflow-wrap: anywhere; }
.sh-cert { margin: 1.5mm 0 .5mm; }
.sh-warn { margin: 0 0 1.5mm; font-size: 7.6pt; }
.sh-body { border-collapse: collapse; width: 100%; table-layout: fixed; }
.sh-body .c-no { width: 7mm; } .sh-body .c-lb { width: 33mm; }
.sh-body th, .sh-body td { border: .6pt solid #000; padding: .35mm 1.1mm; vertical-align: middle; overflow-wrap: anywhere; }
.sh-body th { font-weight: 400; text-align: left; }
.sh-body th.no { text-align: center; }
.sh-body th small { display: block; font-size: 6.4pt; line-height: 1.25; }
.sh-body tr.hd th, .sh-body tr.hd td { text-align: center; background: #f0f0f0; }
.sheet .ck { display: inline-block; margin-right: 2.2mm; white-space: nowrap; }
.sheet .right { float: right; }
.sheet .act { display: inline-block; margin-right: 3mm; }
.sheet .kana { font-size: 7.4pt; }
.sheet .note { height: 11mm; overflow: hidden; white-space: pre-wrap; }
.sheet .kid { border-bottom: .4pt dotted #666; padding: .1mm 0; }
.sheet .kid:last-child { border-bottom: 0; }
.sh-src { margin: 1mm 0 0; font-size: 7pt; color: #000; }

/* ---- P1: CSV 一括 ---- */
.batch-sum { font-weight: 700; margin: 6px 0; }
.batch-list { list-style: none; padding: 0; margin: 6px 0; }
.batch-list > li { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin: 6px 0; background: #fff; }
.batch-list > li.has-e { border-color: #e7b3b5; background: #fff5f5; }
.batch-list .bl-head { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; justify-content: space-between; }
.batch-list .bl-name { font-weight: 700; overflow-wrap: anywhere; min-width: 0; }
.batch-list .bl-count { font-size: .88rem; }
.batch-list .bl-count .e { color: #c0262d; font-weight: 700; }
.batch-list .bl-count .w { color: #9a5b00; }
.batch-list ul { margin: 4px 0 0; padding-left: 1.2em; font-size: .85rem; }
.batch-list ul li.e { color: #9b1c22; }
.batch-list ul li.w { color: #7a4a00; }
.batch-edit { position: sticky; top: 0; z-index: 5; background: #fffaf0; border: 1px solid #f1d39a; border-radius: 10px; padding: 8px 12px; margin: 8px 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.batch-print { display: none; }
.measure { position: absolute; left: -10000px; top: 0; visibility: hidden; pointer-events: none; }

@media print {
  body.print-batch #secPreview { display: none !important; }
  body.print-batch .batch-print { display: block !important; }
  .batch-print .bp-page { break-after: page; page-break-after: always; }
  .batch-print .bp-page:last-child { break-after: auto; page-break-after: auto; }
  .measure { display: none !important; }
  @page { size: A4 portrait; margin: 8mm; }
  html, body { background: #fff !important; padding: 0 !important; margin: 0 !important; }
  .np, .foot, .top, header, footer { display: none !important; }
  main { padding: 0 !important; margin: 0 !important; max-width: none !important; }
  #secPreview { border: 0 !important; padding: 0 !important; margin: 0 !important; border-radius: 0 !important; break-inside: avoid; }
  .sheet-fit { height: auto !important; overflow: visible !important; }
  .sheet { transform: none !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.btn.small { min-height: 44px; }  /* 点按目標 44px 以上（このツールの基準） */
