/* 「画面で見る」のモーダル（chapter-modal.js） */
html.chm-open{overflow:hidden}
.chm{padding:0;border:0;background:transparent;color:var(--ink);width:min(1040px,calc(100vw - 32px));max-width:none;max-height:calc(100dvh - 32px);overflow:visible}
.chm::backdrop{background:rgba(14,24,40,.55);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}
.chm[open]{animation:chmIn .32s cubic-bezier(.2,.9,.3,1)}
.chm[open]::backdrop{animation:chmFade .3s ease}
@keyframes chmIn{from{opacity:0;transform:translateY(14px) scale(.98)}to{opacity:1;transform:none}}
@keyframes chmFade{from{opacity:0}to{opacity:1}}
.chm-card{background:var(--surface);border-radius:26px;box-shadow:0 30px 80px rgba(14,24,40,.35);overflow:auto;max-height:calc(100dvh - 32px);display:flex;flex-direction:column}
.chm-head{display:flex;align-items:center;gap:12px;padding:16px 16px 10px 20px;position:sticky;top:0;background:var(--surface);z-index:3}
.chm-k{flex:none;width:32px;height:32px;border-radius:10px;display:grid;place-items:center;background:var(--brand);color:#fff;font-weight:900}
.chm-head h3{flex:1;min-width:0;font-size:clamp(16px,2.2vw,20px);line-height:1.4}
.chm-x{flex:none;width:40px;height:40px;border-radius:50%;border:1px solid var(--line);background:var(--surface);color:var(--ink);display:grid;place-items:center;cursor:pointer}
.chm-x:hover{background:var(--bg2)}
.chm-body{padding:0 14px}
.chm-video{margin:0;box-shadow:none}
/* モーダルでは1つの章だけ：章の一覧・全体の進み具合・時間は出さない */
.chm-video .v-chapters,.chm-video .v-prog,.chm-video .v-time,.chm-video .v-sr{display:none}
.chm-video .v-ctrl{justify-content:flex-start}
.chm-foot{padding:12px 20px 18px;display:flex;flex-direction:column;gap:10px}
.chm-note{margin:0;font-size:12.5px;color:var(--ink3)}
.chm-acts{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.chm-all{font-size:14px;font-weight:700;color:var(--brand-ink)}
.chm-line{padding:10px 20px 10px 12px;font-size:15.5px;gap:8px}
.chm-line > svg{width:28px;height:28px}
@media (max-width:640px){
  .chm{width:calc(100vw - 16px);max-height:calc(100dvh - 16px)}
  .chm-card{border-radius:20px;max-height:calc(100dvh - 16px)}
  .chm-head{padding:12px 10px 8px 14px;gap:10px}
  .chm-k{width:28px;height:28px;font-size:14px}
  .chm-body{padding:0 8px}
  .chm-foot{padding:10px 14px 14px}
  .chm-acts{flex-direction:column-reverse;align-items:stretch}
  .chm-all{text-align:center}
  .chm-line{width:100%;justify-content:center}
}
@media (prefers-reduced-motion: reduce){.chm[open],.chm[open]::backdrop{animation:none}}
