/* 源泉徴収票かんたん。配色は kantan-tools 共通（--blue / --ink / --bg …）。変えない */
:root { --blue: #1f6feb; --ink: #1d232b; --muted: #5b6573; --bg: #f5f7fa; --card: #fff; --line: #dde3ea; }
* { box-sizing: border-box; }
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; }
.top { background: var(--blue); color: #fff; padding: 14px 16px 12px; }
.top h1 { margin: 0 auto; font-size: 1.25rem; max-width: 960px; line-height: 1.35; }
.lead { margin: 4px auto 0; font-size: .9rem; max-width: 960px; opacity: .95; }
.wrap { max-width: 960px; margin: 0 auto; padding: 12px 16px 32px; }
h2 { font-size: 1.15rem; margin: 18px 0 8px; }
h3 { font-size: 1rem; margin: 12px 0 6px; }
.hint { font-size: .88rem; color: var(--muted); margin: 4px 0 8px; }
.box { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 12px 0; }
.disclaimer { font-size: .9rem; }
.disclaimer p { margin: 0 0 8px; }
.disclaimer p:last-child { margin-bottom: 0; }
.policy { font-weight: 700; }
.warn { color: #9a5b00; background: #fff6e0; border: 1px solid #f2d48a; border-radius: 8px; padding: 8px 10px; margin: 8px 0; }
.err { color: #c0262d; font-weight: 700; margin: 6px 0; }
.stop { color: #9c1c38; background: #fdecef; border: 1px solid #f6c3cd; border-radius: 8px; padding: 8px 10px; margin: 8px 0; }
.ok { color: #166534; }
.form label, .field { display: flex; flex-direction: column; font-size: .88rem; font-weight: 700; margin: 6px 0; }
.form label.check, label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; font-size: .95rem; min-height: 44px; }
input, select, textarea { font: inherit; font-size: 16px; padding: 8px 10px; border: 1px solid #b9c3cf; border-radius: 8px; background: #fff; color: var(--ink); min-height: 44px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 3px solid #ffb800; outline-offset: 1px; }
textarea { resize: vertical; min-height: 72px; }
.grid { display: grid; gap: 8px 12px; }
.grid-2 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.month-table { width: 100%; border-collapse: collapse; font-size: .85rem; background: #fff; }
.month-table th, .month-table td { border: 1px solid var(--line); padding: 4px; vertical-align: middle; }
.month-table th { background: #eef1f5; font-weight: 700; text-align: center; }
.month-table .m { text-align: center; font-weight: 700; width: 2.5em; }
.month-table input { min-height: 40px; padding: 6px 8px; text-align: right; font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 14px; border-radius: 10px;
  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.danger { border-color: #c0262d; color: #c0262d; }
.btn:focus-visible { outline: 3px solid #ffb800; outline-offset: 2px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.result dl { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin: 0; }
.result dt { color: var(--muted); font-size: .9rem; }
.result dd { margin: 0; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.foot { text-align: center; font-size: .8rem; color: var(--muted); padding: 10px 16px 24px; }
.foot a { color: var(--muted); }
.faq details { margin: 6px 0; }
.faq summary { cursor: pointer; font-weight: 700; min-height: 32px; }
.hidden { display: none !important; }
.yen-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 640px) { .yen-grid { grid-template-columns: 1fr 1fr; } }

.kv { display: grid; grid-template-columns: minmax(8em, max-content) minmax(0, 1fr); gap: 4px 12px; margin: 0 0 8px; }
.kv dt { color: var(--muted); font-size: .9rem; word-break: keep-all; overflow-wrap: break-word; line-height: 1.45; }
.kv dd { margin: 0; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.deadlines { padding-left: 1.2em; }
.deadlines li { margin: 8px 0; }
.deadlines .dl-date, .deadlines .dl-what, .deadlines .hint { display: block; }
.deadlines .hint { margin: 2px 0 0; }
/* 390 幅で語の途中で折り返さない（切れ目は app.js の jaWrap が <wbr> で入れる）。長すぎる語だけは最後の手段で折る */
.ja-wrap, .ja-wrap dt { word-break: keep-all; overflow-wrap: anywhere; line-break: strict; }
.ja-wrap .nw { white-space: nowrap; }
.foot { overflow-wrap: anywhere; }

input.bad { border-color: #c0262d; background: #fff7f7; }
.yen-msg { font-size: .82rem; font-weight: 700; margin: 2px 0 0; }
.yen-msg:empty, .yen-msg[hidden] { display: none; }
