/* EmpaC Academy
   配色は社内ツール共通（SNSスカウトと同じトークン）に揃えている。 */

:root {
  /* エンパシーのブランド色（実測値）。社内ツール入口と共通。
     キーカラーはライム #F1F013、差し色に黄 #FFDE1F。地は #EFEEEB / #FEF8EB。 */
  --ground: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #F5F6F8;
  --surface-3: #E3E6EB;
  --ink: #1B2430;
  --ink-2: #4B5563;
  --ink-3: #6B7280;
  --rule: #E3E6EB;
  --rule-strong: #D3D8E0;
  --accent: #2563A8;
  --accent-ink: #FFFFFF;
  --accent-deep: #1D4E85;
  --accent-soft: #EAF1FA;
  --focus: #1D4E85;
  --good: #157A5A;
  --good-soft: #E7F5EF;
  --warn: #A9690B;
  --code-bg: #1B2430;
  --code-ink: #E7EAEF;
  --paper: #F9FAFB;

  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(19, 27, 38, .05), 0 4px 14px rgba(19, 27, 38, .05);
  --shadow-lg: 0 10px 32px rgba(19, 27, 38, .10);
  --toc-w: 296px;
  --header-h: 58px;
  --measure: 74ch;
  --scale: 1;
}

[data-theme="dark"] {
  --ground: #12161D;
  --surface: #1A1F28;
  --surface-2: #1F2530;
  --surface-3: #2A303B;
  --ink: #E7EAEF;
  --ink-2: #B7BEC9;
  --ink-3: #8B93A1;
  --rule: #2A303B;
  --rule-strong: #38404D;
  --accent: #6FA8E0;
  --accent-ink: #0E1620;
  --accent-deep: #9AC3EE;
  --accent-soft: #1B2A3D;
  --focus: #9AC3EE;
  --good: #4FCBA0;
  --good-soft: #123027;
  --warn: #E0A257;
  --code-bg: #0E1319;
  --code-ink: #E7EAEF;
  --paper: #171C24;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 14px rgba(0, 0, 0, .28);
  --shadow-lg: 0 10px 32px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }

/* display を持つクラスが [hidden] に勝ってしまうので明示的に潰す */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: "Zen Kaku Gothic New", "Noto Sans JP", sans-serif;
  font-size: 15px;
  line-height: 1.75;
  font-feature-settings: "palt" 1;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.icon { width: 1em; height: 1em; flex: none; stroke-width: 1.9; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 8px;
  transition: top .15s;
}
.skip-link:focus { top: 10px; }

/* ---------- ヘッダー ---------- */

.hdr {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--rule);
}
.hdr__in {
  height: 100%;
  max-width: 1440px; margin: 0 auto; padding: 0 18px;
  display: flex; align-items: center; gap: 14px;
}

.brand {
  display: inline-flex; align-items: center; gap: 9px;
  color: var(--ink); font-weight: 700; letter-spacing: .01em; flex: none;
}
.brand:hover { text-decoration: none; }
.brand__mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink); display: grid; place-items: center;
  font-size: 14px; font-weight: 800; letter-spacing: 0;
}
.brand__name { font-size: 15px; }
.brand__name small { display: block; font-size: 10px; font-weight: 600; color: var(--ink-3); letter-spacing: .09em; }

.hdr__spacer { flex: 1 1 auto; }

/* 検索 */
.search { position: relative; flex: 0 1 360px; min-width: 0; }
.search__box {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface-2); border: 1px solid var(--rule);
  border-radius: 99px; padding: 0 12px; height: 36px;
}
.search__box:focus-within { border-color: var(--focus); background: var(--surface); }
.search__box .icon { color: var(--ink-3); font-size: 15px; }
.search__input {
  flex: 1; min-width: 0; border: 0; background: none; outline: none;
  font: inherit; font-size: 13.5px; color: var(--ink);
}
.search__kbd {
  font-size: 10.5px; color: var(--ink-3); border: 1px solid var(--rule);
  border-radius: 5px; padding: 1px 5px; background: var(--surface);
}
.search__box:focus-within .search__kbd { display: none; }
.search__results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  max-height: min(62vh, 460px); overflow-y: auto; padding: 6px;
  list-style: none; margin: 0;
}
.search__results[hidden] { display: none; }
.search__results li a {
  display: block; padding: 9px 11px; border-radius: var(--radius); color: var(--ink);
}
.search__results li a:hover,
.search__results li a:focus,
.search__results li.is-active a { background: var(--surface-2); text-decoration: none; }
.search__hit-t { font-size: 13.5px; font-weight: 600; }
.search__hit-m { font-size: 11px; color: var(--ink-3); margin-top: 1px; }
.search__hit-x {
  font-size: 12px; color: var(--ink-2); margin-top: 3px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.search__hit-x mark, .search__hit-t mark {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  color: inherit; border-radius: 3px; padding: 0 1px;
}
.search__empty { padding: 14px; font-size: 13px; color: var(--ink-3); text-align: center; }

/* ヘッダー右側 */
.hdr__tools { display: flex; align-items: center; gap: 6px; flex: none; }
.iconbtn {
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 1px solid transparent; border-radius: 9px; background: none;
  color: var(--ink-2); cursor: pointer; font-size: 17px;
}
.iconbtn:hover { background: var(--surface-2); color: var(--ink); }
.who {
  font-size: 12px; color: var(--ink-3); white-space: nowrap;
  max-width: 190px; overflow: hidden; text-overflow: ellipsis;
}

/* ---------- 汎用 ---------- */

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 18px; }
.main { flex: 1 0 auto; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink);
  border-radius: 9px; padding: 9px 17px; font: inherit; font-size: 14px;
  font-weight: 600; cursor: pointer; white-space: nowrap;
}
.btn:hover { filter: brightness(.94); text-decoration: none; color: var(--accent-ink); }
.btn--ghost { background: var(--surface); color: var(--ink); border-color: var(--rule-strong); }
.btn--ghost:hover { background: var(--surface-2); color: var(--ink); border-color: var(--rule-strong); }
.btn--sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn--lg { padding: 12px 24px; font-size: 15px; border-radius: 11px; }
[data-theme="dark"] .btn, [data-theme="dark"] .btn:hover { color: var(--accent-ink); }
[data-theme="dark"] .btn--ghost { color: var(--ink); }

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 600; padding: 2px 9px;
  border-radius: 99px; background: var(--surface-2); color: var(--ink-2);
  border: 1px solid var(--rule);
}
.pill--done { background: var(--good-soft); color: var(--good); border-color: transparent; }
.pill--accent { background: var(--accent-soft); color: var(--accent-deep); border-color: transparent; }
[data-theme="dark"] .pill--accent { color: var(--accent); }

.bar { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.bar__fill {
  height: 100%; border-radius: 99px; width: 0;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent));
  transition: width .45s cubic-bezier(.3, .8, .4, 1);
}
.bar__fill--done { background: var(--good); }

/* ---------- トップページ ---------- */

.hero {
  background:
    radial-gradient(1100px 340px at 12% -40%, var(--accent-soft), transparent 70%),
    var(--surface);
  border-bottom: 1px solid var(--rule);
}
.hero__in { max-width: 1160px; margin: 0 auto; padding: 52px 18px 44px; }
.hero__eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: .12em;
  color: var(--accent-deep); margin: 0 0 12px;
}
[data-theme="dark"] .hero__eyebrow { color: var(--accent); }
.hero__title {
  font-size: clamp(26px, 4vw, 40px); line-height: 1.35; font-weight: 800;
  margin: 0 0 16px; letter-spacing: -.01em;
}
.hero__lead { font-size: 15.5px; color: var(--ink-2); margin: 0 0 26px; max-width: 62ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.resume {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-lg); padding: 14px 18px; box-shadow: var(--shadow);
  margin: 0 0 28px;
}
.resume[hidden] { display: none; }
.resume__label { font-size: 11.5px; font-weight: 700; color: var(--ink-3); letter-spacing: .06em; }
.resume__title { font-size: 15px; font-weight: 700; }
.resume__meta { font-size: 12px; color: var(--ink-3); }

.sec { padding: 42px 0 20px; }
.sec__head { display: flex; align-items: baseline; gap: 12px; margin: 0 0 18px; }
.sec__title { font-size: 19px; font-weight: 800; margin: 0; }
.sec__note { font-size: 12.5px; color: var(--ink-3); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 12px; margin-bottom: 30px; }
.stat {
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius-lg); padding: 15px 17px;
}
.stat__k { font-size: 11.5px; color: var(--ink-3); font-weight: 600; }
.stat__v { font-size: 25px; font-weight: 800; line-height: 1.3; font-variant-numeric: tabular-nums; }
.stat__v small { font-size: 13px; font-weight: 600; color: var(--ink-3); margin-left: 2px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 16px; }
.card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
  padding: 20px 22px 18px; color: var(--ink);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.card:hover {
  text-decoration: none; color: var(--ink);
  transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--rule-strong);
}
.card__top { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.card__icon {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  background: var(--accent-soft); color: var(--accent-deep);
  display: grid; place-items: center; font-size: 19px;
}
[data-theme="dark"] .card__icon { color: var(--accent); }
.card__title { font-size: 16.5px; font-weight: 700; line-height: 1.4; margin: 0; }
.card__sub { font-size: 12px; color: var(--ink-3); margin: 1px 0 0; }
.card__desc { font-size: 13.5px; color: var(--ink-2); margin: 0 0 16px; flex: 1 0 auto; }
.card__desc p { margin: 0 0 8px; }
.card__desc p:last-child { margin: 0; }
.card__foot { display: flex; align-items: center; gap: 10px; }
.card__foot .bar { flex: 1; }
.card__pct { font-size: 12px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; }
.card__meta { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 14px; }

.chapline { font-size: 12.5px; color: var(--ink-3); margin: 0 0 14px; line-height: 1.7; }

/* ---------- レッスン画面のレイアウト ---------- */

.layout {
  max-width: 1440px; margin: 0 auto; padding: 20px 18px 48px;
  display: grid; grid-template-columns: var(--toc-w) minmax(0, 1fr); gap: 26px;
  align-items: start;
}

.toc {
  position: sticky; top: calc(var(--header-h) + 16px);
  max-height: calc(100vh - var(--header-h) - 34px);
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden;
}
.toc__head { padding: 14px 16px 12px; border-bottom: 1px solid var(--rule); }
.toc__course { font-size: 14px; font-weight: 700; line-height: 1.45; }
.toc__prog { display: flex; align-items: center; gap: 9px; margin-top: 10px; }
.toc__prog .bar { flex: 1; }
.toc__pct { font-size: 11.5px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.toc__back { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--ink-3); margin-bottom: 8px; }
.toc__list { overflow-y: auto; padding: 8px; flex: 1 1 auto; overscroll-behavior: contain; }
.toc__chapter {
  font-size: 10.5px; font-weight: 700; letter-spacing: .1em; color: var(--ink-3);
  padding: 14px 10px 6px;
}
.toc__chapter:first-child { padding-top: 6px; }
.toc__item {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 8px 10px; border-radius: var(--radius); color: var(--ink);
  font-size: 13.5px; line-height: 1.55;
}
.toc__item:hover { background: var(--surface-2); text-decoration: none; color: var(--ink); }
.toc__item.is-current { background: var(--accent-soft); color: var(--accent-deep); font-weight: 700; }
[data-theme="dark"] .toc__item.is-current { color: var(--accent); }
.toc__num {
  flex: none; width: 19px; height: 19px; margin-top: 2px; border-radius: 50%;
  display: grid; place-items: center; font-size: 10.5px; font-weight: 700;
  background: var(--surface-3); color: var(--ink-3); font-variant-numeric: tabular-nums;
}
.toc__item.is-current .toc__num { background: var(--accent); color: #fff; }
.toc__item.is-done .toc__num { background: var(--good); color: #fff; }
.toc__item.is-done .toc__num .icon { font-size: 12px; }
.toc__t { min-width: 0; flex: 1; }
.toc__min { font-size: 10.5px; color: var(--ink-3); font-weight: 500; }
.toc__foot {
  border-top: 1px solid var(--rule); padding: 9px 14px;
  font-size: 11px; color: var(--ink-3); display: flex; justify-content: space-between; gap: 8px;
}
.toc__foot button { background: none; border: 0; font: inherit; font-size: 11px; color: var(--ink-3); cursor: pointer; padding: 0; }
.toc__foot button:hover { color: var(--accent); text-decoration: underline; }

.toc-toggle { display: none; }

/* ---------- スライド ---------- */

.stage { min-width: 0; }

.lesson-head { margin-bottom: 16px; }
.lesson-head__crumb { font-size: 12px; color: var(--ink-3); margin-bottom: 5px; }
.lesson-head__title {
  font-size: clamp(21px, 2.6vw, 27px); font-weight: 800; margin: 0 0 9px; line-height: 1.4;
}
.lesson-head__meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.slidebar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: 7px 10px; margin-bottom: 14px;
}
.slidebar__count { font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; font-weight: 600; }
.slidebar__dots { display: flex; gap: 4px; flex-wrap: wrap; flex: 1 1 auto; }
.dot {
  width: 22px; height: 5px; border-radius: 99px; border: 0; padding: 0;
  background: var(--surface-3); cursor: pointer;
}
.dot:hover { background: var(--rule-strong); }
.dot.is-seen { background: color-mix(in srgb, var(--accent) 40%, var(--surface-3)); }
.dot.is-current { background: var(--accent); }
.seg { display: inline-flex; border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; }
.seg button {
  border: 0; background: var(--surface); color: var(--ink-2); font: inherit;
  font-size: 12px; font-weight: 600; padding: 4px 10px; cursor: pointer;
}
.seg button + button { border-left: 1px solid var(--rule); }
.seg button.is-on { background: var(--accent-soft); color: var(--accent-deep); }
[data-theme="dark"] .seg button.is-on { color: var(--accent); }

.deck { position: relative; }

.slide {
  background: var(--paper); border: 1px solid var(--rule);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
  padding: calc(34px * var(--scale)) clamp(20px, 4vw, 46px) calc(38px * var(--scale));
  font-size: calc(16px * var(--scale));
  scroll-margin-top: calc(var(--header-h) + 14px);
}
.deck--one .slide { display: none; }
.deck--one .slide.is-current { display: block; animation: fade .22s ease; }
.deck--all .slide { margin-bottom: 18px; }
.deck--all .slide__no { display: block; }
.slide__no {
  display: none; font-size: 11px; font-weight: 700; letter-spacing: .1em;
  color: var(--ink-3); margin-bottom: 10px;
}
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* スライド内の本文 */
.slide > :first-child { margin-top: 0; }
.slide > :last-child { margin-bottom: 0; }
.slide h1, .slide h2 {
  font-size: calc(23px * var(--scale)); font-weight: 800; line-height: 1.45;
  margin: 0 0 calc(18px * var(--scale)); padding-bottom: 12px;
  border-bottom: 2px solid var(--accent-soft); letter-spacing: -.005em;
}
[data-theme="dark"] .slide h1, [data-theme="dark"] .slide h2 { border-bottom-color: var(--rule); }
.slide h3 {
  font-size: calc(17px * var(--scale)); font-weight: 700;
  margin: calc(28px * var(--scale)) 0 calc(10px * var(--scale));
  display: flex; align-items: center; gap: 8px;
}
.slide h3::before {
  content: ""; width: 3px; height: 1em; border-radius: 2px;
  background: var(--accent); flex: none;
}
.slide h4 { font-size: calc(15px * var(--scale)); font-weight: 700; margin: calc(20px * var(--scale)) 0 6px; color: var(--ink-2); }
.slide p { margin: 0 0 calc(15px * var(--scale)); line-height: 1.95; max-width: var(--measure); }
.slide ul, .slide ol { margin: 0 0 calc(16px * var(--scale)); padding-left: 1.5em; max-width: var(--measure); }
.slide li { margin-bottom: 7px; line-height: 1.85; }
.slide li::marker { color: var(--accent); }
.slide strong { font-weight: 700; }
.slide em { font-style: normal; background: linear-gradient(transparent 62%, var(--accent-soft) 62%); font-weight: 600; }
[data-theme="dark"] .slide em { background: linear-gradient(transparent 62%, color-mix(in srgb, var(--accent) 30%, transparent) 62%); }
.slide hr { border: 0; border-top: 1px solid var(--rule); margin: calc(26px * var(--scale)) 0; }

.slide blockquote {
  margin: 0 0 calc(16px * var(--scale)); padding: 12px 18px;
  border-left: 3px solid var(--accent); background: var(--surface-2);
  border-radius: 0 var(--radius) var(--radius) 0; color: var(--ink-2);
  max-width: var(--measure);
}
.slide blockquote p:last-child { margin: 0; }

.slide :not(pre) > code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: .87em; background: var(--surface-2); border: 1px solid var(--rule);
  border-radius: 5px; padding: 1px 5px; color: var(--accent-deep);
}
[data-theme="dark"] .slide :not(pre) > code { color: var(--accent); }

.slide pre {
  position: relative; margin: 0 0 calc(18px * var(--scale));
  background: var(--code-bg); color: var(--code-ink);
  border-radius: var(--radius); padding: 16px 18px; overflow-x: auto;
}
.slide pre code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: calc(13.5px * var(--scale)); line-height: 1.85; white-space: pre;
  background: none; border: 0; padding: 0; color: inherit;
}
.copy {
  position: absolute; top: 8px; right: 8px;
  background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .18);
  color: #C4CEDA; border-radius: 6px; padding: 3px 10px;
  font: inherit; font-size: 11.5px; font-weight: 600; cursor: pointer;
  opacity: .5; transition: opacity .15s, background .15s;
}
.slide pre:hover .copy, .copy:focus-visible { opacity: 1; }
.copy:hover { background: rgba(255, 255, 255, .17); color: #fff; }
.copy.is-done { background: var(--good); border-color: var(--good); color: #fff; opacity: 1; }

/* 擬似ターミナル（本物のAIは呼ばない・決まったやり取りを再生する体験版） */
.pty {
  margin: 0 0 calc(18px * var(--scale));
  border-radius: var(--radius); overflow: hidden;
  background: var(--code-bg); border: 1px solid rgba(255,255,255,.08);
}
.pty__bar {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 14px; background: rgba(255,255,255,.05);
}
.pty__dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.22); flex: none; }
.pty__title {
  margin-left: 8px; font-size: 11px; font-weight: 600;
  color: rgba(255,255,255,.45); letter-spacing: .01em;
}
.pty__body {
  min-height: 64px; max-height: 340px; overflow-y: auto;
  padding: 14px 16px; font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: calc(13px * var(--scale)); line-height: 1.8; color: var(--code-ink);
}
.pty__line { white-space: pre-wrap; word-break: break-word; }
.pty__line--cmd { color: #fff; font-weight: 700; margin-top: 10px; }
.pty__line--cmd:first-child { margin-top: 0; }
.pty__line--resp { color: var(--code-ink); opacity: .88; }
.pty__btn {
  display: block; width: 100%; padding: 11px; border: none;
  border-top: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.04);
  color: var(--code-ink); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer;
  transition: background .15s;
}
.pty__btn:hover:not(:disabled) { background: rgba(255,255,255,.09); }
.pty__btn:disabled { opacity: .6; cursor: default; }

.slide table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  margin: 0 0 calc(18px * var(--scale)); font-size: calc(14px * var(--scale));
  border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden;
}
.slide th, .slide td {
  padding: 9px 13px; text-align: left; line-height: 1.65;
  border-bottom: 1px solid var(--rule); border-right: 1px solid var(--rule);
  vertical-align: top;
}
.slide th:last-child, .slide td:last-child { border-right: 0; }
.slide tbody tr:last-child td { border-bottom: 0; }
.slide thead th { background: var(--surface-2); font-weight: 700; font-size: calc(12.5px * var(--scale)); white-space: nowrap; }
.slide tbody tr:nth-child(even) { background: var(--surface-2); }
.table-scroll { overflow-x: auto; margin: 0 0 calc(18px * var(--scale)); }
.table-scroll table { margin: 0; min-width: 520px; }

/* スライド送り */
.deckbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 16px;
}
.deckbar[hidden] { display: none; }
.navbtn {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--surface); border: 1px solid var(--rule-strong);
  border-radius: 9px; padding: 9px 15px; font: inherit; font-size: 13.5px;
  font-weight: 600; color: var(--ink); cursor: pointer;
}
.navbtn:hover:not(:disabled) { background: var(--surface-2); text-decoration: none; color: var(--ink); }
.navbtn:disabled { opacity: .35; cursor: default; }
.navbtn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.navbtn--primary:hover:not(:disabled) { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; }
[data-theme="dark"] .navbtn--primary { color: #14100D; }
[data-theme="dark"] .navbtn--primary:hover:not(:disabled) { color: #14100D; }

/* ---------- タスク ---------- */

.tasks {
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
  padding: 20px 22px; margin-top: 22px;
}
.tasks__head { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.tasks__title { font-size: 15px; font-weight: 700; margin: 0; display: flex; align-items: center; gap: 8px; }
.tasks__title .icon { color: var(--ink-2); font-size: 17px; }
.tasks__count { font-size: 12px; color: var(--ink-3); margin-left: auto; font-variant-numeric: tabular-nums; }
.tasks__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.task { display: flex; align-items: flex-start; gap: 10px; padding: 9px 11px; border-radius: var(--radius); cursor: pointer; }
.task:hover { background: var(--surface-2); }
.task input { margin: 4px 0 0; width: 16px; height: 16px; accent-color: var(--accent); flex: none; cursor: pointer; }
.task span { font-size: 14px; line-height: 1.7; }
.task input:checked + span { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--rule-strong); }
.task__note {
  display: block; width: calc(100% - 48px); margin: 0 11px 8px 37px;
  padding: 7px 10px; font: inherit; font-size: 12.5px; line-height: 1.6; color: var(--ink-2);
  border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface-2);
  resize: none; overflow: hidden; min-height: 32px; box-sizing: border-box;
  transition: border-color .15s, background .15s;
}
.task__note:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.task__note::placeholder { color: var(--ink-3); }
@media (max-width: 560px) { .task__note { margin-left: 11px; } }

.audio {
  display: inline-flex; align-items: center; gap: 5px; flex: none;
  height: 30px; padding: 0 12px; border-radius: 999px; margin-left: auto;
  border: 1px solid var(--rule); background: var(--surface);
  font-size: 12px; font-weight: 700; color: var(--ink-2); cursor: pointer;
}
.audio:hover { background: var(--surface-2); }
.audio.is-playing { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.audio__ic { width: 14px; height: 14px; }

.donebar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  margin-top: 22px; padding: 16px 20px;
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.donebar__t { font-size: 14px; font-weight: 700; }
.donebar__s { font-size: 12.5px; color: var(--ink-3); }
.donebar.is-done { border-color: var(--good); background: var(--good-soft); }

.pager { display: flex; gap: 12px; margin-top: 20px; }
.pager a {
  flex: 1; display: flex; flex-direction: column; gap: 3px;
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-lg);
  padding: 13px 17px; color: var(--ink); min-width: 0;
}
.pager a:hover { text-decoration: none; border-color: var(--rule-strong); background: var(--surface-2); }
.pager__k { font-size: 11px; color: var(--ink-3); font-weight: 600; display: flex; align-items: center; gap: 4px; }
.pager__t { font-size: 14px; font-weight: 700; line-height: 1.5; }
.pager a.pager--next { text-align: right; }
.pager a.pager--next .pager__k { justify-content: flex-end; }

/* ---------- フッター ---------- */

.ftr { border-top: 1px solid var(--rule); background: var(--surface); margin-top: 40px; flex-shrink: 0; }
.ftr__in {
  max-width: 1160px; margin: 0 auto; padding: 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  font-size: 12px; color: var(--ink-3);
}
.ftr kbd {
  font-family: inherit; font-size: 10.5px; border: 1px solid var(--rule);
  border-bottom-width: 2px; border-radius: 5px; padding: 1px 5px;
  background: var(--surface-2); color: var(--ink-2);
}

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 14px);
  background: var(--ink); color: var(--ground); font-size: 13px; font-weight: 600;
  padding: 10px 18px; border-radius: 99px; box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 200;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

.empty { text-align: center; padding: 60px 20px; color: var(--ink-3); }

/* ---------- レスポンシブ ---------- */

@media (max-width: 1080px) {
  .layout { grid-template-columns: 1fr; gap: 0; }
  .toc-toggle {
    display: inline-flex; align-items: center; gap: 7px; margin-bottom: 14px;
    background: var(--surface); border: 1px solid var(--rule-strong); border-radius: 9px;
    padding: 8px 14px; font: inherit; font-size: 13.5px; font-weight: 600;
    color: var(--ink); cursor: pointer;
  }
  .toc {
    position: fixed; inset: 0 auto 0 0; z-index: 90; width: min(320px, 86vw);
    max-height: none; border-radius: 0; border-width: 0 1px 0 0;
    transform: translateX(-101%); transition: transform .22s ease; box-shadow: var(--shadow-lg);
  }
  .toc.is-open { transform: none; }
  .toc-scrim {
    position: fixed; inset: 0; background: rgba(10, 14, 20, .45); z-index: 89;
    opacity: 0; pointer-events: none; transition: opacity .22s;
  }
  .toc-scrim.is-on { opacity: 1; pointer-events: auto; }
}

@media (max-width: 720px) {
  .hdr__in { gap: 8px; padding: 0 12px; }
  .brand__name { display: none; }
  .search { flex: 1 1 auto; }
  .who { display: none; }
  .layout { padding: 14px 12px 40px; }
  .wrap, .hero__in { padding-left: 14px; padding-right: 14px; }
  .slide { padding: 24px 18px 28px; border-radius: var(--radius); }
  .cards { grid-template-columns: 1fr; }
  .pager { flex-direction: column; }
  .slidebar { padding: 7px 8px; }
  .slidebar__dots { order: 3; width: 100%; }
}

@media print {
  .hdr, .toc, .toc-toggle, .slidebar, .deckbar, .pager, .ftr, .copy, .toc-scrim { display: none !important; }
  body { background: #fff; }
  .layout { display: block; padding: 0; }
  .deck--one .slide { display: block !important; }
  .slide { break-inside: avoid; box-shadow: none; border-color: #ddd; margin-bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
