.home { padding-top: clamp(40px, 6vw, 72px); }
.crisis { display: flex; align-items: center; gap: 12px; text-decoration: none; font-size: .9rem; color: var(--ink-2); border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 10px 20px; width: fit-content; max-width: 100%; margin-bottom: clamp(48px, 8vw, 88px); }
@media (hover: hover) { .crisis:hover { border-color: var(--danger); color: var(--ink); } }
.crisis:active { border-color: var(--danger); }
.crisis .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); flex: none; box-shadow: 0 0 0 4px var(--danger-soft); }
.crisis b { color: var(--danger); font-weight: 700; white-space: nowrap; }
/* スマートフォンでは、緊急の案内を一行に収め、最初の画面に「基本コースを始める」まで入るようにする */
@media (max-width: 600px) {
  .home { padding-top: 24px; padding-bottom: 40px; }
  .crisis { font-size: .8rem; gap: 8px; padding: 8px 14px; min-height: 44px; margin-bottom: 32px; }
  .home .eyebrow { margin-bottom: 16px; }
  .home .lead { margin-top: 20px; }
  .cta { margin-top: 28px; }
}
.home h1 { font-size: clamp(2.2rem, 6.4vw, 3.7rem); line-height: 1.35; white-space: nowrap; }
@media (max-width: 380px) { .home h1 { font-size: 2rem; } }
.home .lead { font-size: clamp(1rem, 1.6vw, 1.12rem); max-width: 36em; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 40px; }
.btn.big { padding: 18px 36px; font-size: 1.05rem; }
.cta .textlink { padding: 6px 0; }
.resume { margin-top: 16px; font-size: .88rem; color: var(--ink-3); min-height: 1.6em; }
/* 数字で見る被害（最近の事案の前に置く） */
.stats { display: grid; gap: 0; margin: 0 0 clamp(48px, 7vw, 72px); }
.stats > div { padding: 24px 0; border-top: 1px solid var(--line); }
.stats > div:last-child { border-bottom: 1px solid var(--line); }
.stats dt { font-family: var(--font-head); font-weight: 700; font-size: clamp(1.9rem, 4vw, 2.4rem); line-height: 1.2; letter-spacing: .02em; }
.stats dd { margin: 6px 0 0; color: var(--ink-2); font-size: .9rem; line-height: 1.8; }
/* タブレットより広い画面では、三つの数字を横に並べる */
@media (min-width: 600px) { .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: clamp(32px, 5vw, 56px); } .stats > div { border-bottom: 1px solid var(--line); } }

.news { list-style: none; margin: 0; padding: 0; }
.news li { margin: 0; display: grid; gap: 8px 48px; padding: 32px 0; border-top: 1px solid var(--line); }
.news li:last-child { border-bottom: 1px solid var(--line); }
@media (min-width: 860px) { .news li { grid-template-columns: 8.5em 1fr 13em; } }
/* タブレットの縦向きでは、日付を上に置き、本文と関係する訓練を左右に並べる */
@media (min-width: 600px) and (max-width: 859px) { .news li { grid-template-columns: minmax(0, 1fr) 11em; gap: 4px 40px; } .news time { grid-column: 1 / -1; } }
.news time { font-family: var(--mono); font-size: .84rem; color: var(--ink-3); padding-top: 3px; }
.news h3 { font-size: 1.08rem; margin-bottom: 8px; }
.news p { color: var(--ink-2); font-size: .93rem; }
.news .rel { font-size: .86rem; display: flex; flex-direction: column; gap: 0; padding-top: 3px; }
/* 指でも押しやすいよう、リンクの上下に余白をとる */
.news .rel a { padding: 9px 0; min-height: 44px; }
.news .rel a.go { text-decoration: none; font-family: var(--font-head); font-weight: 700; }
.news .rel a.go::after { content: " →"; color: var(--accent); }
@media (hover: hover) { .news .rel a.go:hover { color: var(--accent); } }
.news .rel .src { color: var(--ink-3); font-size: .78rem; }
.news-more { margin-top: 28px; }
/* スマートフォンでは本文を4行でたたみ、続きはその場で開く（次の区切りまでの距離を縮める） */
.news .read { display: none; }
@media (max-width: 759px) {
  .news p.clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden; }
  .news .read { display: inline-flex; align-items: center; min-height: 44px; margin-top: 2px; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; font-size: .86rem; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--ink-3); cursor: pointer; }
}
.news li:nth-last-child(1 of :not(.hidden)) { border-bottom: 1px solid var(--line); }

/* 基本コース：最初の画面のすぐ下に、7つの訓練を一行ずつ詰めて並べる */
.section.alt.course-sec { padding: clamp(40px, 7vw, 96px) 0 clamp(56px, 8vw, 104px); }
.course-sec .section-head { margin-bottom: 28px; }
.course-sec .section-head h2 + p { margin-top: 12px; word-break: auto-phrase; }
.prog { display: flex; align-items: center; gap: 20px; margin-bottom: 20px; max-width: 420px; }
.prog .meter { flex: 1; background: var(--line); }
.prog > span { font-size: .86rem; color: var(--ink-2); white-space: nowrap; }
.steps-list { list-style: none; margin: 0; padding: 0; }
.steps-list li { margin: 0; }
.steps-list a { position: relative; display: grid; grid-template-columns: 3em minmax(0, 15em) minmax(0, 1fr) auto; gap: 0 24px; align-items: center; padding: 16px 56px 16px 0; border-top: 1px solid var(--line); text-decoration: none; transition: background .2s, padding .2s; border-radius: 0; }
.steps-list li:last-child a { border-bottom: 1px solid var(--line); }
@media (hover: hover) { .steps-list a:hover { background: var(--surface); padding-left: 16px; } }
.steps-list a:active { background: var(--surface); }
.steps-list .n { font-family: var(--mono); font-size: .9rem; color: var(--ink-3); }
.steps-list .t { font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; line-height: 1.5; letter-spacing: .03em; }
.steps-list .d { color: var(--ink-2); font-size: .86rem; line-height: 1.7; }
.steps-list .m { font-size: .8rem; line-height: 1.6; color: var(--ink-3); text-align: right; white-space: nowrap; }
.steps-list .m .ok { color: var(--ok); font-family: var(--mono); letter-spacing: .1em; margin-right: 10px; }
.steps-list .m .nx { color: var(--accent); font-weight: 700; margin-right: 10px; }
/* 各行が訓練へのリンクであることを、右端の矢印で示す */
.steps-list a::after { content: "→"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); color: var(--ink-3); transition: transform .2s, color .2s; }
@media (hover: hover) { .steps-list a:hover::after { color: var(--accent); transform: translate(4px, -50%); } }
.steps-list li.is-next a::after { color: var(--accent); }
.steps-list li.done .t { color: var(--ink-2); }
.steps-list li.done .n { color: var(--ok); }
.steps-list li.is-next a { background: var(--surface); padding-left: 16px; box-shadow: inset 3px 0 0 var(--accent); }
.steps-list li.is-next .n { color: var(--accent); }
/* スマートフォン：番号・訓練名・目安の時間だけを二行に収める */
@media (max-width: 759px) {
  .steps-list a { grid-template-columns: 2.2em minmax(0, 1fr); gap: 0 10px; padding: 11px 40px 11px 0; }
  .steps-list .n { grid-row: span 2; align-self: start; padding-top: 2px; }
  .steps-list .d { display: none; }
  .steps-list .m { grid-column: 2; text-align: left; }
  .steps-list a::after { right: 14px; }
  .steps-list li.is-next a { padding-left: 12px; }
}
.cert-wait { margin: 20px 0 0; font-size: .9rem; color: var(--ink-2); }
.cert-wait b { font-family: var(--mono); font-weight: 400; color: var(--accent); margin: 0 .2em; }

/* 基本コースの修了 */
.cert-done { margin-top: clamp(48px, 7vw, 72px); padding-top: clamp(40px, 6vw, 56px); border-top: 1px solid var(--line); }
.cert-msg { text-align: center; max-width: 34em; margin: 0 auto; }
.cert-msg .mk { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); margin-bottom: 16px; }
.cert-msg .mk svg { width: 22px; height: 22px; }
.cert-msg h3 { font-size: clamp(1.4rem, 3.2vw, 1.85rem); margin-bottom: 12px; }
.cert-msg p { color: var(--ink-2); }
.cert-done .field { max-width: 360px; margin: 40px auto 0; }
.cert-done .btns { justify-content: center; }
/* 訓練手帳：上に集計（修了印・結末・テスト・修了証）と次のおすすめ、下に分野ごとの修了印 */
.log { display: grid; gap: 12px; margin-bottom: clamp(36px, 6vw, 56px); }
@media (min-width: 860px) { .log { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; } }
.log-sum { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 0; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 600px) and (max-width: 859px) { .log-sum { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.log-sum > div { background: var(--surface); padding: 14px 16px 16px; min-width: 0; }
.log-sum dt { font-size: .78rem; color: var(--ink-2); letter-spacing: .06em; }
.log-sum dd { margin: 2px 0 0; }
.log-sum .v { font-family: var(--mono); font-size: .9rem; color: var(--ink-2); white-space: nowrap; }
.log-sum .v b { font-family: var(--font-head); font-weight: 700; font-size: 1.9rem; line-height: 1.3; color: var(--ink); margin-right: .12em; }
.log-sum .v.none { display: inline-block; padding-top: 12px; font-family: var(--font-body); font-size: .88rem; color: var(--ink-3); }
.log-sum .r { display: block; font-size: .78rem; line-height: 1.5; color: var(--ink-2); }
.log-sum .meter { display: block; margin-top: 8px; }
.log-sum .meter > span { background: var(--stamp); }
.log-next { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 18px 52px 18px 20px; border: 1px solid var(--accent); border-radius: var(--radius); background: var(--accent-soft); text-decoration: none; transition: background .2s; }
.log-next .lbl { font-family: var(--mono); font-size: .75rem; letter-spacing: .14em; color: var(--accent); }
.log-next .t { font-family: var(--font-head); font-weight: 700; font-size: 1.12rem; line-height: 1.5; }
.log-next .t br { display: none; }
.log-next .d { color: var(--ink-2); font-size: .88rem; }
.log-next .f { margin-top: auto; padding-top: 6px; display: flex; flex-wrap: wrap; gap: 2px 16px; font-size: .8rem; color: var(--ink-2); }
.log-next .f .g { color: var(--ink); font-weight: 700; }
.log-next::after { content: "→"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); color: var(--accent); font-size: 1.2rem; transition: transform .2s; }
@media (hover: hover) { .log-next:hover::after { transform: translate(4px, -50%); } }
.log-next:active { background: var(--surface); }
.log-fin { margin: 0; padding: 18px 20px; border: 1px solid var(--ok); border-radius: var(--radius); background: var(--ok-soft); font-weight: 700; display: flex; align-items: center; }

/* 修了印の色（朱肉の色。暗い表示では明るめの朱） */
.log-sec { --stamp: var(--danger); }
.lg-course { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: clamp(32px, 5vw, 48px); }
.lg-name { font-family: var(--font-head); font-weight: 700; font-size: 1rem; letter-spacing: .06em; }
.mini { display: flex; gap: 6px; }
.mini i { width: 18px; height: 18px; border-radius: 50%; border: 1.5px dashed var(--ink-3); }
.mini i.on { border: 2px solid var(--stamp); background: radial-gradient(circle, var(--stamp) 0 30%, transparent 33%); }
.lg-course .c, .lg-head .c { margin-left: auto; font-family: var(--mono); font-size: .86rem; color: var(--ink-2); white-space: nowrap; }
.lg-course .c b, .lg-head .c b { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; color: var(--ink); margin-right: .1em; }

.more-sec + .more-sec { margin-top: clamp(36px, 5vw, 56px); }
.lg-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 12px; }
.more-h { font-family: var(--font-head); font-weight: 700; font-size: 1.12rem; letter-spacing: .06em; margin: 0; }
.lg-head .goal { order: 3; flex-basis: 100%; font-size: .82rem; color: var(--accent); font-weight: 700; }
.lg-head .goal.ok { color: var(--ok); }
@media (min-width: 680px) { .lg-head .goal { order: 0; flex-basis: auto; padding: 3px 12px; border-radius: 999px; background: var(--accent-soft); } .lg-head .goal.ok { background: var(--ok-soft); } }

/* 一つの訓練：スマートフォンでは一行ずつの台帳、広い画面ではカード */
.lg-grid { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.lg-grid li { margin: 0; display: flex; }
.lg-t { position: relative; flex: 1; min-width: 0; display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 2px 14px; align-items: center; padding: 10px 36px 10px 2px; border-bottom: 1px solid var(--line); text-decoration: none; transition: background .2s; }
.lg-t::after { content: "→"; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.lg-t:active { background: var(--surface); }
.lg-t .stamp { grid-row: span 2; }
.lg-t .t { font-family: var(--font-head); font-weight: 700; font-size: 1rem; line-height: 1.5; }
.lg-t .t br { display: none; }
.lg-t .d { display: none; color: var(--ink-2); font-size: .88rem; line-height: 1.7; }
.lg-t .f { display: flex; flex-wrap: wrap; gap: 0 14px; font-size: .8rem; line-height: 1.6; color: var(--ink-3); }
.lg-t .f .e { color: var(--ink-2); font-family: var(--mono); font-size: .78rem; }
.lg-t.on .t { color: var(--ink-2); }
.lg-t.ref { grid-template-columns: minmax(0, 1fr); padding-left: 0; }
.lg-t.ref .d { display: block; }
@media (hover: hover) { .lg-t:hover { background: var(--surface); } .lg-t:hover::after { color: var(--accent); } }
@media (min-width: 680px) {
  .lg-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; border: 0; }
  .lg-t { grid-template-columns: minmax(0, 1fr) 48px; grid-template-rows: auto auto 1fr; align-items: start; gap: 6px 12px; padding: 16px 16px 16px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); min-height: 150px; }
  .lg-t.on { background: color-mix(in srgb, var(--stamp) 4%, var(--bg)); }
  .lg-t .stamp { grid-column: 2; grid-row: 1; }
  .lg-t .t { grid-column: 1; grid-row: 1; align-self: center; font-size: 1.04rem; }
  .lg-t .d { display: block; grid-column: 1 / -1; }
  .lg-t .f { grid-column: 1 / -1; align-self: end; padding-top: 4px; }
  .lg-t::after { display: none; }
  .lg-t.ref { grid-template-columns: minmax(0, 1fr); min-height: 0; padding: 18px 20px; }
  .lg-t.ref .t { align-self: start; }
}
@media (min-width: 1000px) { .lg-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.lg-t:focus-visible { outline-offset: -3px; }

/* 修了印：押したものは朱の二重の輪に「修了」と日付、まだのものは点線の輪 */
.stamp { width: 48px; height: 48px; border-radius: 50%; display: grid; place-content: center; text-align: center; flex: none; }
.stamp.off { border: 1.5px dashed var(--ink-3); opacity: .7; }
.stamp:not(.off) { color: var(--stamp); border: 2px solid currentColor; outline: 1px solid currentColor; outline-offset: -6px; rotate: -10deg; }
.lg-grid li:nth-child(3n+2) .stamp:not(.off) { rotate: 7deg; }
.lg-grid li:nth-child(3n) .stamp:not(.off) { rotate: -3deg; }
.stamp .s-w { font-family: var(--font-head); font-weight: 700; font-size: .76rem; line-height: 1.15; letter-spacing: .04em; }
.stamp .s-d { font-family: var(--mono); font-size: .64rem; line-height: 1.1; }
/* 前にトップページを開いたあとに押された印は、押すように現れる */
@keyframes stamp-press { 0% { opacity: 0; transform: scale(1.9); } 55% { opacity: 1; transform: scale(.9); } 100% { opacity: 1; transform: scale(1); } }
.reveal.in .lg-t.new .stamp { animation: stamp-press .5s cubic-bezier(.2, .8, .3, 1.15) both; animation-delay: calc(.3s + var(--k, 0) * .09s); }
@media (prefers-reduced-motion: reduce) { .reveal.in .lg-t.new .stamp { animation: none; } }

/* 修了証の種類（二つ以上受け取ったとき） */
.cert-pick { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 32px; }
.chip { appearance: none; font: inherit; font-family: var(--font-head); font-weight: 700; font-size: .86rem; letter-spacing: .04em; min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.chip[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--bg); }
@media (hover: hover) { .chip:hover { border-color: var(--ink); } }

.sos { display: grid; gap: 24px; align-items: center; }
@media (min-width: 820px) { .sos { grid-template-columns: 1fr auto; gap: 64px; } }
/* タブレットの縦向きでは、ボタンを横いっぱいに伸ばさない */
@media (min-width: 600px) and (max-width: 819px) { .sos .btn { justify-self: start; } }
.sos h2 { margin-bottom: 12px; }
.sos p { color: var(--ink-2); max-width: 36em; }
.cert { border: 1px solid var(--ink); padding: clamp(32px, 6vw, 64px) 24px; text-align: center; background: var(--surface); max-width: 640px; margin: 32px auto 0; }
.cert .sub { font-family: var(--font-head); font-weight: 700; font-size: 1rem; letter-spacing: .3em; margin: 12px -.3em 0 0; }
.cert .t { font-family: var(--font-head); font-size: 1.6rem; letter-spacing: .5em; margin: 4px -.5em 28px 0; }
.cert .name { font-family: var(--font-head); font-size: 1.4rem; border-bottom: 1px solid var(--ink); display: inline-block; min-width: 10em; padding: 0 1em 4px; margin-bottom: 28px; }
.cert p { word-break: auto-phrase; }
.cert .by { margin-top: 8px; font-family: var(--font-head); font-weight: 700; letter-spacing: .12em; }
.cert .op { margin-top: 4px; font-size: .78rem; line-height: 1.7; color: var(--ink-2); }
.cert .op .nw { display: inline-block; }
@media (max-width: 600px) { .cert br { display: none; } }
/* 修了証があるときに印刷すると、修了証だけを一枚に収める */
@media print {
  body.cert-ready main > :not(#course), body.cert-ready #course .wrap > :not(#cert), body.cert-ready .cert-done > :not(.cert) { display: none !important; }
  body.cert-ready #course { background: none; padding: 0 !important; }
  body.cert-ready .cert-done { margin: 0; padding: 0; border: 0; }
  body.cert-ready .cert { margin: 48px auto 0; background: #fff; border-color: #000; color: #000; }
  body.cert-ready .cert .name { border-color: #000; }
  body.cert-ready .cert .op { color: #333; }
}

/* 元は style 属性だった指定（CSP の style-src に 'unsafe-inline' を付けないため、ここへ移した） */
.textlink.ul-soft { text-decoration-color: var(--ink-3); }
