/* 去年の案内文を、今年の日付に直す（/hizuke/）。日英共通。
   上に去年の案内文（見本入り）と変更後の年、日付の対応表（行ごとに移し方・候補・祝日・確定）、今年の文と共有カード。
   年が書かれていない日付の扱いは既定値のまま折りたたむ。閉じている間の中身は display: none にする（閉じた details の中身にも
   文字の箱が残り、品質の審査の重なりの計測が拾った・2026-11-25）。 */
[hidden] { display: none !important; }
.hz { --h-line: var(--hairline, #e5e7eb); --h-strong: var(--hairline-strong, #d1d5db); --h-acc: var(--accent, #b45309); --h-soft: var(--ink-soft, #4b5563);
  --h-ink: var(--ink, #1f2937); --h-wash: #fff7ed; --h-todo: #fef3c7; --h-ok: #dcfce7; --h-ok-ink: #166534; --h-red: #b91c1c;
  border: 1px solid var(--h-line); background: var(--panel, #fff); margin-bottom: 8px; }
.hz-h { display: flex; align-items: baseline; gap: 10px; margin: 0; font-size: 16px; font-weight: 700; color: var(--h-ink); }
.hz-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.hz-tag { font-size: 12px; font-weight: 700; color: var(--h-acc); border: 1px solid #fed7aa; background: var(--h-wash); padding: 2px 8px; }
.hz-tag.is-own { color: var(--h-soft); border-color: var(--h-line); background: #f9fafb; }

/* 01 入力 */
.hz-in { padding: 18px 20px 12px; border-bottom: 1px solid var(--h-line); }
.hz-text { display: block; width: 100%; box-sizing: border-box; margin-top: 10px; min-height: 12em; padding: 10px 12px; border: 1px solid var(--h-strong); background: #fff;
  font: 15px/1.7 "IBM Plex Sans JP", system-ui, sans-serif; color: var(--h-ink); resize: vertical; }
.hz-text:focus { outline: 2px solid var(--h-acc); outline-offset: -1px; border-color: transparent; }
.hz-in-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin-top: 10px; }
.hz-to { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: var(--h-ink); }
.hz-to select, .hz-cond select { font: inherit; font-size: 16px; font-weight: 700; padding: 6px 8px; border: 1px solid var(--h-ink); background: #fff; color: var(--h-ink); min-height: 40px; }
.hz-in-acts { font-size: 13px; color: var(--h-soft); }
.hz-peek { display: none; }
.hz-link { border: 0; background: none; padding: 6px 0; font: inherit; font-size: 13px; color: var(--h-ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 32px; }
.hz-link:hover { color: var(--h-acc); }
.hz-opts { margin-top: 10px; font-size: 14px; }
.hz-opts summary { cursor: pointer; color: var(--h-soft); font-weight: 500; min-height: 36px; display: flex; align-items: center; }
.hz-opts summary:hover { color: var(--h-ink); }
.hz-opts summary b { font-weight: 400; margin-left: .5em; font-size: 12px; color: #6b7280; }
.hz-opts:not([open]) .hz-cond { display: none; }
.hz-cond { display: grid; gap: 6px; margin: 6px 0 4px; }
.hz-cond label { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hz-cond select { font-size: 15px; font-weight: 500; border-color: var(--h-strong); min-height: 36px; }
.hz-hint { margin: 0; font-size: 13px; line-height: 1.6; color: var(--h-soft); }

/* 02 対応表 */
.hz-out { padding: 18px 20px 14px; border-bottom: 1px solid var(--h-line); min-width: 0; }
.hz-sum { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; margin: 10px 0 0; font-size: 15px; color: var(--h-soft); }
.hz-sum b { font: 600 28px/1 var(--mono); color: var(--h-ink); margin: 0 2px; font-variant-numeric: tabular-nums; }
.hz-sum .is-warn b { color: var(--h-acc); }
.hz-sum .is-hol b { color: var(--h-red); }
.hz-sum .hz-jump { border: 0; border-bottom: 1px dashed currentColor; background: none; padding: 0 0 2px; font: inherit; color: inherit; cursor: pointer; }
.hz-sum .hz-jump:hover { color: var(--h-ink); }
.hz-sum .hz-jump:focus-visible { outline: 2px solid var(--h-acc); outline-offset: 2px; }
.hz-sum-note { flex-basis: 100%; font-size: 13px; color: var(--h-soft); }
.hz-banner { margin: 10px 0 0; padding: 8px 12px; background: var(--h-wash); border: 1px solid #fed7aa; font-size: 13px; line-height: 1.6; color: var(--h-ink); }
.hz-rows { list-style: none; margin: 12px 0 0; padding: 0; border-top: 1px solid var(--h-line); }
.hz-row { display: grid; grid-template-columns: minmax(8.5em, 10em) 1.2em minmax(0, 1fr) minmax(7.5em, 9em) minmax(0, 8em) auto; align-items: center; gap: 6px 10px;
  padding: 10px 0; border-bottom: 1px solid var(--h-line); }
/* 確定した行は、行全体の地を緑にし、確定の枠を塗る（3周目の審査の指摘: 1280px では押しても画面の変化が 0.1% ほどで、押せたか分からなかった） */
.hz-row[data-state="ok"] { box-shadow: inset 0 0 0 2px #16a34a; background: #c6f6d5; }
.hz-row.has-warn { background: var(--h-wash); }
.hz-row[data-state="ok"].has-warn { background: #c6f6d5; }
.hz-row[data-state="ok"] .hz-c-to b { color: var(--h-ok-ink); }
.hz-row > * { min-width: 0; }
.hz-row { scroll-margin-top: 80px; }
.hz-c-from { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 0 8px; padding-left: 8px; }
.hz-c-from b { font: 600 17px/1.3 var(--mono); color: var(--h-soft); }
.hz-c-from small { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; font-size: 12px; color: #6b7280; line-height: 1.5; }
.hz-n { font: 500 11px/1 var(--mono); color: #9ca3af; grid-row: span 2; }
.hz-row-y .hz-n { font-family: inherit; }
/* 年の選択欄: 既定の▼の幅で「2025年」が「2025⁴」と切れていたので、▼を小さな絵に替えて文字の分の幅を確保する（2周目の審査の指摘） */
.hz-year { flex: none; -webkit-appearance: none; appearance: none; font: inherit; font-size: 12px; line-height: 1.4; padding: 1px 16px 1px 5px; min-width: 5.6em;
  border: 1px solid var(--h-strong); border-radius: 0; color: var(--h-soft); cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5'%3E%3Cpath d='M0 0h8L4 5z' fill='%234b5563'/%3E%3C/svg%3E") no-repeat right 5px center / 8px 5px; }
.hz-year:focus-visible { outline: 2px solid var(--h-acc); outline-offset: 1px; }
/* 矢印は飾りなので文字にせず描く（読み上げ・字数に入れない） */
.hz-arrow { color: #9ca3af; font-size: 15px; text-align: center; }
.hz-arrow::before { content: "→" / ""; }
.hz-c-rule select { width: 100%; font: inherit; font-size: 14px; padding: 6px 6px; border: 1px solid var(--h-strong); background: #fff; color: var(--h-ink); min-height: 38px; text-overflow: ellipsis; }
.hz-row-y .hz-c-rule { font: 500 14px var(--mono); color: var(--h-soft); }
.hz-c-to { display: grid; }
.hz-c-to b { font: 700 19px/1.3 var(--mono); color: var(--h-ink); }
.hz-c-to b.hz-none { font: 700 14px/1.4 inherit; color: var(--h-red); }
.hz-c-to small { font-size: 12px; color: #6b7280; line-height: 1.4; overflow-wrap: anywhere; }
.hz-c-hol { display: flex; flex-wrap: wrap; gap: 4px; }
.hz-chip { font-size: 12px; line-height: 1.4; padding: 1px 6px; border: 1px solid currentColor; white-space: nowrap; }
.hz-chip.now { color: var(--h-red); font-weight: 700; }
.hz-chip.before { color: var(--h-soft); }
.hz-chip.out { color: #6b7280; border-style: dashed; }
.hz-c-ok { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--h-ink); cursor: pointer; min-height: 40px; padding: 0 12px 0 10px;
  white-space: nowrap; border: 1px solid var(--h-strong); background: #fff; }
.hz-c-ok:hover { border-color: var(--h-ink); }
.hz-c-ok input { width: 20px; height: 20px; margin: 0; accent-color: #14532d; }
.hz-c-ok:has(input:checked) { background: #16a34a; border-color: #16a34a; color: #fff; }
.hz-c-ok:has(input:focus-visible) { outline: 2px solid var(--h-acc); outline-offset: 2px; }
.hz-c-ok:has(input:disabled) { color: #9ca3af; cursor: default; border-style: dashed; }
.hz-warn { grid-column: 1 / -1; list-style: none; margin: 0; padding: 0 0 0 8px; display: grid; gap: 2px; }
.hz-warn li { font-size: 13px; line-height: 1.55; color: #92400e; }
.hz-warn li::before { content: "!"; display: inline-block; width: 1.3em; height: 1.3em; margin-right: 6px; text-align: center; font: 700 11px/1.3em var(--mono); color: #fff; background: var(--h-acc); }
.hz-fix { border: 1px solid var(--h-acc); background: #fff; color: var(--h-acc); font: inherit; font-size: 13px; font-weight: 700; padding: 3px 10px; min-height: 32px; margin: 2px 0; cursor: pointer; }
.hz-fix:hover { background: var(--h-wash); }
.hz-done { font-weight: 700; color: var(--h-ok-ink); }
/* 日付ごとの年の選択欄は「年が書かれていない日付の扱い」を開いている間だけ（ふだんは年を文字で示す） */
.hz:not(.is-years) .hz-year, .hz.is-years .hz-year-t { display: none; }
.hz-auto { grid-column: 1 / -1; margin: 0; padding-left: 8px; font-size: 12px; line-height: 1.5; color: var(--h-ok-ink); }
.hz-left { margin: 8px 0 0; font-size: 13px; line-height: 1.6; color: #92400e; }
.hz-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 12px; }
.hz-count { font-size: 13px; color: var(--h-soft); font-variant-numeric: tabular-nums; }
.hz-src { margin: 10px 0 0; font-size: 12px; line-height: 1.6; color: #6b7280; }

/* 03 今年の文 */
.hz-res { padding: 18px 20px 16px; }
.hz-legend { margin: 8px 0 0; font-size: 13px; color: var(--h-soft); line-height: 1.7; }
.hz-preview { margin: 8px 0 0; padding: 12px 14px; border: 1px solid var(--h-line); background: #fff; font: 15px/1.8 "IBM Plex Sans JP", system-ui, sans-serif; color: var(--h-ink);
  white-space: pre-wrap; overflow-wrap: anywhere; max-height: 22em; overflow: auto; }
mark.hz-m-todo { background: var(--h-todo); color: inherit; padding: 0 1px; }
mark.hz-m-ok { background: var(--h-ok); color: var(--h-ok-ink); font-weight: 700; padding: 0 1px; }
mark.hz-m-none { background: #fee2e2; color: inherit; padding: 0 1px; }
.hz-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 12px; }
.hz-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border: 1px solid var(--h-ink); background: var(--h-ink); color: #fff;
  font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; text-decoration: none; transition: transform .08s ease, background-color .12s; }
.hz-btn:hover { background: #374151; }
.hz-btn:active { transform: scale(.97); }
.hz-btn.sub { background: #fff; color: var(--h-ink); border-color: var(--h-strong); min-height: 40px; font-size: 14px; padding: 0 14px; }
.hz-btn.sub:hover { border-color: var(--h-ink); }
.hz-btn:disabled { opacity: .45; cursor: default; }
.hz-status { font-size: 13px; color: #15803d; font-weight: 500; }
/* コピーした後は、押したボタンそのものを「コピーしました」の緑に替え、今年の文の枠も緑にする（4周目の審査の指摘: 1280px では横の1行の文字しか変わらず、
   押せたか分かりにくかった）。文・確定を変えるまで残す */
.hz-btn.is-done, .hz-btn.is-done:hover { background: #15803d; border-color: #15803d; }
.hz-preview { transition: background-color .2s, border-color .2s; }
.hz-preview.is-copied { background: #f0fdf4; border-color: #16a34a; box-shadow: inset 0 0 0 1px #16a34a; }
.hz-card { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 14px; align-items: start; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--h-line); }
.hz-card-view { min-width: 0; }
.hz-card img { display: block; width: 100%; height: auto; border: 1px solid var(--h-line); background: #f9fafb; aspect-ratio: 1200 / 630; }
.hz-card-side { display: flex; flex-wrap: wrap; gap: 8px; align-content: start; }
/* 変更後の年が祝日の表の外のとき、年の選択欄のすぐ下に出す一言（5周目の審査の指摘） */
.hz-to-note { flex-basis: 100%; box-sizing: border-box; margin: 0; padding: 6px 10px; font-size: 13px; line-height: 1.6; color: var(--h-red); background: #fef2f2; border-radius: 4px; }
/* カードの中身を読める大きさの文字で並べる見本。375px で縮めた画像では文字が数ピクセルになるため、640px 以下だけ出す（5周目の審査の指摘） */
.hz-card-list { display: none; }
.hz-note { flex-basis: 100%; margin: 2px 0 0; font-size: 12px; line-height: 1.6; color: #6b7280; }

/* 下の節: サイト共通の小さな英字風の見出し（朱の横線＋灰色の大文字）ではなく和文の見出しに。
   手順は同じ箱を3つ並べず、1本の線の上に、その手順で画面に出るもの（日付・移した日付・確定の数）を置く（2周目の審査の指摘） */
.tool:has(.hz) .section > h2 { font-family: inherit; font-size: 17px; font-weight: 700; letter-spacing: .02em; color: var(--ink, #1f2937); text-transform: none; margin-bottom: 12px; }
.tool:has(.hz) .section > h2::before { display: none; }
.tool:has(.hz) .section-note + .section-note { margin-top: 10px; }
ol.steps.hz-steps { border: 0; border-top: 1px solid var(--ink, #1f2937); background: none; gap: 28px; grid-template-columns: 1fr 1.1fr 1fr; }
ol.steps.hz-steps li { padding: 14px 0 0; border: 0; font-size: 14px; }
ol.steps.hz-steps li::before { display: none; }
ol.steps.hz-steps b { font-size: 15px; margin-bottom: 4px; }
.hz-steps .hz-ex { display: block; margin-bottom: 8px; font: 700 22px/1.2 var(--mono); color: var(--ink, #1f2937); font-variant-numeric: tabular-nums; }
.hz-steps li:nth-child(2) .hz-ex { color: #166534; }
.hz-steps li:nth-child(3) .hz-ex { font-size: 18px; padding-top: 3px; }
.hz-other .tool-nav .no { color: #9ca3af; }
/* 右の関連ツール: 同じ形のカードを同じ大きさで並べず、1件目だけ大きな絵のカード、2件目からは小さな絵と名前の行にする
   （1〜3周目の審査の指摘。中身は sync-related.mjs が TOP から写すので、このページの見た目だけを変える） */
.tool:has(.hz) .tool-aside .related { grid-template-columns: minmax(0, 1fr); gap: 0; }
.tool:has(.hz) .tool-aside .related li:first-child { margin-bottom: 10px; }
.tool:has(.hz) .tool-aside .related li:first-child .r-name { font-size: 15px; }
.tool:has(.hz) .tool-aside .related .r-desc { display: none; }
.tool:has(.hz) .tool-aside .related li:not(:first-child) a { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; border-width: 0 0 1px; background: none; }
.tool:has(.hz) .tool-aside .related li:nth-child(2) a { border-top-width: 1px; }
.tool:has(.hz) .tool-aside .related li:not(:first-child) .r-thumb { aspect-ratio: 4 / 3; border: 1px solid var(--hairline); margin: 8px 0; }
.tool:has(.hz) .tool-aside .related li:not(:first-child) .r-body { padding: 8px 0 8px 12px; }
.tool:has(.hz) .tool-aside .related li:not(:first-child) .r-name { font-size: 13px; font-weight: 500; }

@media (max-width: 900px) {
  /* 768px でも移し方の選択欄が「11/8(土)…」と切れていたので 900px 以下は2段にする。年の選択欄（スマホでは共通の指定で 16px）が矢印の列へはみ出さないよう、矢印の列と間を詰める */
  .hz-row { grid-template-columns: minmax(0, 1fr) .8em minmax(0, 1fr) auto; column-gap: 6px; scroll-margin-top: 76px; }
  .hz-c-from { gap: 0 6px; padding-left: 6px; }
  .hz-c-ok { padding: 0; }
  .hz-c-rule { grid-column: 1 / -1; grid-row: 2; padding-left: 8px; }
  .hz-c-hol { grid-column: 1 / -1; padding-left: 8px; }
  .hz-c-hol:empty, .hz-row-y .hz-c-rule { display: none; }
  .hz-c-ok { grid-column: 4; grid-row: 1; }
}
@media (max-width: 640px) {
  .hz-in, .hz-out, .hz-res { padding-left: 14px; padding-right: 14px; }
  .hz-in { padding-top: 14px; }
  /* 375px の最初の画面に、件数の行と最初の候補の行が入るよう、入力欄は5行ほどにする（2周目の審査の指摘。中はスクロールと右下のつまみで広げられる） */
  .hz-text { min-height: 0; height: 8.8em; font-size: 16px; line-height: 1.6; }
  /* 最初の画面: 入力欄の上に「去年の案内文」の見出しを残す（3周目に外したら、何を貼る欄か分からないと4周目の審査の指摘）。件数は入力欄の下の1行に */
  .hz-in .hz-text { margin-top: 6px; }
  .hz-peek:not(:empty) { display: block; order: 3; flex-basis: 100%; text-align: left; border: 0; border-top: 1px solid var(--h-line); background: none; padding: 8px 0 0;
    font: inherit; font-size: 14px; color: var(--h-soft); cursor: pointer; min-height: 40px; }
  .hz-peek b { font: 600 20px/1 var(--mono); color: var(--h-ink); margin: 0 2px; }
  ol.steps.hz-steps { grid-template-columns: 1fr; gap: 18px; }
  .hz-sum b { font-size: 24px; }
  .hz-sum { gap: 4px 14px; }
  .hz-c-from b { font-size: 16px; }
  .hz-c-to b { font-size: 17px; }
  .hz-card { grid-template-columns: minmax(0, 1fr); }
  /* カードの見本は枠の幅いっぱいに縮めて全体を見せる（4周目の審査の指摘: 760px で描いて横にずらす形では、見出しと右の列が枠の端で切れていた）。
     行ごとの日付は上の表で読めるので、ここは保存される画像の見本として全体が見えることを優先する */
  .hz-card-view img { width: 100%; max-width: 100%; height: auto; }
  .hz-card-list { display: block; margin-top: 8px; padding: 10px 12px; border: 1px solid var(--h-line); background: #f9fafb; font-size: 14px; line-height: 1.5; color: var(--h-ink); }
  .hz-cl-title { margin: 0 0 6px; font-weight: 700; font-size: 15px; }
  .hz-cl-rows { list-style: none; margin: 0; padding: 0; }
  .hz-cl-rows li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; padding: 5px 0; border-top: 1px solid var(--h-line); }
  .hz-cl-from { color: #6b7280; }
  .hz-cl-arrow { color: #9ca3af; }
  .hz-cl-rows b.hz-none { color: var(--h-red); }
  .hz-cl-rule { color: var(--h-soft); font-size: 13px; }
  .hz-cl-chip { font-size: 12px; font-weight: 700; border: 1px solid currentColor; padding: 0 6px; }
  .hz-cl-foot { margin: 6px 0 0; font-size: 13px; color: var(--h-soft); }
  .hz-cl-foot:last-child { font-weight: 700; color: var(--h-ink); }
  .hz-acts .hz-btn { flex: 1 1 auto; }
  .hz-opts summary { flex-wrap: wrap; padding: 4px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hz-btn, .hz-preview { transition: none; }
}
@media (max-width: 640px) {
  .tool:has(.hz) .lede { margin-bottom: 18px; }
}
