/* 記事を「その場で開く」窓（peek.js）。トップと記事ページの両方で読む */
.pk { position: fixed; inset: 0; z-index: 70; pointer-events: none; }
.pk-shade { position: absolute; inset: 0; background: rgba(20, 22, 44, .45); opacity: 0; transition: opacity .2s ease; }
.pk-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(720px, 92vw); background: #fbfbfe; box-shadow: -18px 0 50px rgba(20,22,44,.22); display: grid; grid-template-rows: auto minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); transform: translateX(104%); transition: transform .26s cubic-bezier(.2,.8,.2,1); }
.pk.on { pointer-events: auto; }
.pk.on .pk-shade { opacity: 1; }
.pk.on .pk-panel { transform: none; }
.pk-head { min-width: 0; display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 12px; background: #fff; border-bottom: 1px solid #e6e8f2; }
.pk-title { flex: 1; min-width: 0; margin: 0; font-family: "M PLUS 1p", "Hiragino Sans", "Yu Gothic", sans-serif; font-weight: 800; font-size: 15.5px; color: #1d2142; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-back, .pk-x { flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #eef3ff; color: #1d2142; font-size: 20px; cursor: pointer; display: grid; place-items: center; }
.pk-x { font-size: 24px; }
.pk-back:hover, .pk-x:hover, .pk-back:focus-visible, .pk-x:focus-visible { background: #1d2142; color: #fff; outline: none; }
.pk-open { flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border: 1px solid #c9cfe6; border-radius: 8px; font-size: 13px; font-weight: 700; color: #1a33c8; text-decoration: none; white-space: nowrap; }
.pk-open:hover { border-color: #1a33c8; }
.pk-frame { width: 100%; height: 100%; border: 0; background: #fbfbfe; }
html.pk-lock, html.pk-lock body { overflow: hidden; }
html.pk-lock .cw-launch { display: none !important; }
@media (max-width: 640px) {
  .pk-panel { top: auto; left: 0; width: 100%; height: 92vh; height: 92dvh; border-radius: 16px 16px 0 0; transform: translateY(104%); box-shadow: 0 -16px 40px rgba(20,22,44,.25); }
  .pk-head { border-radius: 16px 16px 0 0; }
  .pk-open { padding: 0 9px; }
}
@media (prefers-reduced-motion: reduce) { .pk-shade, .pk-panel { transition: none; } }

/* 窓の中で表示されたとき（?embed=1）：上のメニュー・パンくず・目次・フッター・窓口を隠す */
html.embed .top, html.embed .foot, html.embed .tocbar, html.embed .toc, html.embed .crumb, html.embed .cw-launch, html.embed .cw-panel, html.embed .skip, html.embed .fb { display: none !important; }
html.embed .alayout.has-toc { grid-template-columns: minmax(0, 1fr) !important; }
html.embed .ahead .in { padding-top: 18px; }
html.embed body { background: #fbfbfe; }
