/* =========================================================
   確認モード（checkmode.js）
   通常表示では何も出ない。見えるのは .check-toggle だけ。
   ========================================================= */
:root { --check: #E9C21C; --check-soft: rgba(233, 194, 28, .32); }
html.is-check { --check-h: 40px; }
@media (max-width: 599px) { html.is-check { --check-h: 48px; } } /* 案内文が2行になる幅 */

/* ---------- 印 ---------- */
.is-check [data-check] {
  text-decoration: underline 2px var(--check);
  text-underline-offset: .3em;
  text-decoration-skip-ink: none;
  background-image: linear-gradient(transparent 58%, var(--check-soft) 58%);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  cursor: help;
  border-radius: 1px;
}
.is-check [data-check]:focus-visible { outline: 2px solid var(--check); outline-offset: 2px; }
/* ブロック要素（表全体・段落全体など）：枠と角の小さな札 */
.is-check [data-check].is-check-block {
  text-decoration: none; background-image: none;
  outline: 2px dashed var(--check); outline-offset: 6px;
  position: relative;
}
.is-check [data-check].is-check-block::before {
  content: "要確認"; position: absolute; z-index: 2; top: -18px; right: -6px;
  padding: 2px 8px; border-radius: 2px;
  background: var(--check); color: #1B1917;
  font-family: var(--font-gothic); font-size: 11px; font-weight: 700; letter-spacing: .1em; line-height: 1.5;
}

/* ---------- 注記ポップ ---------- */
.check-pop {
  position: fixed; inset: auto; left: 12px; top: 12px; z-index: 80; margin: 0;
  width: max-content; max-width: min(300px, calc(100vw - 24px));
  padding: 10px 14px 10px 12px;
  background: #1B1917; color: #F2EEE6;
  border: 0; border-left: 3px solid var(--check); border-radius: 3px;
  font-family: var(--font-gothic); font-size: .85rem; font-weight: 500; line-height: 1.7; letter-spacing: .04em;
  box-shadow: 0 0 0 1px rgba(242, 238, 230, .14), 0 6px 20px rgba(15, 14, 13, .22);
  overflow: visible;
}
.check-pop[hidden] { display: none; }
.check-pop::before {
  content: "確認事項"; display: block; margin-bottom: 2px;
  font-size: .7rem; font-weight: 700; letter-spacing: .14em; color: var(--check);
}

/* ---------- 上部バナー ---------- */
.check-banner {
  position: fixed; inset: 0 0 auto; z-index: 70; height: var(--check-h, 40px);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 0 0 var(--gutter);
  background: var(--check); color: #1B1917;
  font-size: .8rem; font-weight: 700; letter-spacing: .06em; line-height: 1.4;
}
.check-banner[hidden] { display: none; }
.check-banner__text { display: flex; align-items: center; gap: .6em; min-width: 0; }
.check-banner__mark { width: 8px; height: 8px; flex: none; background: #1B1917; }
.check-banner__off {
  flex: none; align-self: stretch; min-width: 64px; padding: 0 16px;
  background: rgba(27, 25, 23, .08); border: 0; border-left: 1px solid rgba(27, 25, 23, .18);
  font-size: .8rem; font-weight: 700; letter-spacing: .1em; color: inherit;
}
.check-banner__off:hover { background: rgba(27, 25, 23, .16); }
@media (max-width: 374px) { .check-banner { font-size: .72rem; letter-spacing: .02em; } }

/* バナーの分だけ固定ヘッダー・帯レール・メニューを下げる（ヘッダーとアンカー位置は base.css が --check-h を見る） */
/* ページ本体もバナーの分だけ下げる（ヒーローの見出しがヘッダーに重ならないように） */
html.is-check body { padding-top: var(--check-h); }
.is-check .menu { padding-top: calc(var(--header-h) + var(--check-h) + 24px); }

/* ---------- トグル（フッターに置く。予備はレイアウト末尾） ---------- */
.check-toggle {
  display: inline-flex; align-items: center; gap: .7em;
  min-height: 44px; padding: 0 14px 0 10px;
  background: none; border: 1px solid currentColor; border-radius: 22px;
  font-size: .8rem; font-weight: 700; letter-spacing: .12em; line-height: 1;
  opacity: .72; transition: opacity .2s var(--ease);
}
.check-toggle:hover, .check-toggle[aria-pressed="true"] { opacity: 1; }
.check-toggle[hidden] { display: none; }
/* 小さなスイッチ */
.check-toggle::before {
  content: ""; width: 28px; height: 16px; flex: none; border-radius: 8px;
  border: 1px solid currentColor;
  background: radial-gradient(circle 5px at 8px 50%, currentColor 98%, transparent) no-repeat;
  transition: background-position .2s var(--ease), background-color .2s var(--ease);
}
.check-toggle[aria-pressed="true"]::before {
  background: radial-gradient(circle 5px at 19px 50%, #1B1917 98%, transparent) no-repeat, var(--check);
  border-color: var(--check);
}
.check-toggle-slot {
  display: flex; justify-content: center;
  padding: 20px var(--gutter);
  background: var(--sumi); color: var(--on-sumi);
  border-top: 1px solid var(--line-sumi);
}

@media print { .check-banner, .check-pop, .check-toggle { display: none !important; } }
