/* 2026-10-05 場景 checkpoint-inbox：信箱事件單。沒有 JS：事件並列成卡片（自動分欄）。
   有 JS（.is-live）：左欄是信件列表按鈕、右欄是選中事件的事件單（同一個 ol 用 display: contents 重排，窄螢幕改成列表在上、事件單在下）。
   選中不只靠顏色：左側粗線＋底色＋粗體，另有 aria-current。 */
.page-blocks .ci { margin-top: clamp(2rem, 5vw, 3.5rem); color: var(--paper); }
.page-blocks .ci :is(.ci-btn, .ci-say)[hidden] { display: none; }
.page-blocks .ci-items { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: clamp(1rem, 2.4vw, 1.5rem); margin: 0; padding: 0; list-style: none; }
.page-blocks .ci-card { display: flex; flex-direction: column; gap: .875rem; height: 100%; padding: 0 0 clamp(1.25rem, 2.6vw, 1.75rem); border: 1px solid var(--on-dark-line); border-radius: var(--r-card); background: color-mix(in srgb, var(--paper) 4%, var(--deeper)); overflow: hidden; }
.page-blocks .ci-card > :not(.ci-top) { margin-inline: clamp(1.25rem, 2.6vw, 1.75rem); }
.page-blocks .ci-top { display: flex; align-items: center; gap: .5rem; padding: .75rem clamp(1.25rem, 2.6vw, 1.75rem); border-bottom: 1px solid var(--on-dark-line); color: var(--muted-on-dark); font-size: .875rem; }
.page-blocks .ci-dots { width: .5rem; height: .5rem; border-radius: 50%; background: var(--accent); box-shadow: 1rem 0 0 var(--on-dark-line), 2rem 0 0 var(--on-dark-line); margin-right: 2rem; }
.page-blocks .ci-n { margin-left: auto; color: var(--accent); font-family: "Inter Tight", var(--font-body); font-weight: 800; letter-spacing: .12em; }
.page-blocks .ci-h { margin: 0; color: var(--paper); font-size: clamp(1.25rem, 2vw, 1.5rem); font-weight: 800; line-height: 1.25; }
.page-blocks .ci-key { margin: 0; padding-left: 1rem; border-left: 3px solid var(--accent); color: var(--paper); font-size: clamp(1.25rem, 1.8vw, 1.5rem); font-weight: 800; line-height: 1.4; text-wrap: balance; }
.page-blocks .ci-body { margin: 0; color: var(--muted-on-dark); font-size: 1.125rem; line-height: 1.8; }
/* 信的路徑：信封起點＋節點串。處置點＝實心圓＋小標「處置」，沒走到的節點＝虛線；不只靠顏色。 */
.page-blocks .ci-route { display: flex; align-items: flex-start; gap: .875rem; }
.page-blocks .ci-env { position: relative; flex: none; width: 2.75rem; height: 1.875rem; margin-top: .125rem; border: 2px solid var(--accent); border-radius: .3rem; overflow: hidden; }
.page-blocks .ci-env i { position: absolute; left: 50%; top: -.8rem; width: 1.6rem; height: 1.6rem; translate: -50% 0; rotate: 45deg; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); }
.page-blocks .ci-path { display: flex; flex-wrap: wrap; flex: 1; gap: .75rem .25rem; margin: 0; padding: 0; list-style: none; }
.page-blocks .ci-node { position: relative; display: grid; justify-items: start; gap: .25rem; min-width: 5.5rem; max-width: 9.5rem; padding: 0 .75rem 0 0; color: var(--paper); font-size: .9375rem; font-weight: 700; line-height: 1.35; }
.page-blocks .ci-node::before { content: ""; position: absolute; left: 1.25rem; right: .25rem; top: .5rem; border-top: 2px solid var(--on-dark-line); }
.page-blocks .ci-node:last-child::before { display: none; }
.page-blocks .ci-dot { position: relative; z-index: 1; width: 1rem; height: 1rem; border: 2px solid var(--muted-on-dark); border-radius: 50%; background: var(--deeper); }
.page-blocks .ci-node.hit .ci-dot { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 .25rem color-mix(in srgb, var(--accent) 25%, transparent); }
.page-blocks .ci-node.hit .ci-nt { color: var(--accent); }
.page-blocks .ci-node.hit::before { border-top-color: var(--accent); }
.page-blocks .ci-node.after { color: var(--muted-on-dark); font-weight: 500; }
.page-blocks .ci-node.after .ci-dot { border-style: dashed; }
.page-blocks .ci-node.after::before, .page-blocks .ci-node.hit ~ .ci-node::before { border-top-style: dashed; }
.page-blocks .ci-node em { padding: .0625rem .5rem; border-radius: var(--r-pill); background: var(--accent); color: var(--accent-on); font-size: .8125rem; font-style: normal; font-weight: 800; }
.page-blocks .ci-ticks { display: flex; gap: .375rem; margin-top: auto; padding-top: 1rem; }
.page-blocks .ci-ticks i { width: 1.5rem; height: 3px; background: var(--on-dark-line); }
.page-blocks .ci-ticks i.cur { background: var(--accent); }
.page-blocks .ci-say { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
/* 有 JS：主從版面 */
.page-blocks .ci.is-live .ci-items { grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); grid-template-rows: repeat(6, auto); gap: 0 clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.page-blocks .ci.is-live .ci-item { display: contents; }
.page-blocks .ci.is-live .ci-btn { display: flex; grid-column: 1; align-items: baseline; gap: .875rem; width: 100%; min-height: 3.5rem; padding: .875rem 1rem; border: 0; border-bottom: 1px solid var(--on-dark-line); border-left: 3px solid transparent; background: none; color: var(--muted-on-dark); font: inherit; font-size: 1.0625rem; font-weight: 500; text-align: left; cursor: pointer; transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease); }
.page-blocks .ci.is-live .ci-btn b { color: var(--muted-on-dark); font-family: "Inter Tight", var(--font-body); font-size: .8125rem; letter-spacing: .12em; }
.page-blocks .ci.is-live .ci-btn:hover { color: var(--paper); }
.page-blocks .ci.is-live .ci-btn[aria-current="true"] { border-left-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--paper); font-weight: 800; }
.page-blocks .ci.is-live .ci-btn[aria-current="true"] b { color: var(--accent); }
.page-blocks .ci.is-live .ci-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.page-blocks .ci.is-live .ci-key { font-size: clamp(1.375rem, 2.4vw, 2rem); }
.page-blocks .ci.is-live .ci-card { grid-column: 2; grid-row: 1 / span 6; min-height: 100%; }
.page-blocks .ci.is-live .ci-item:not(.on) .ci-card { display: none; }
@media (prefers-reduced-motion: no-preference) { html:not([data-motion="off"]) .page-blocks .ci.is-live .ci-item.on .ci-card { animation: ci-in .35s var(--ease); } }
@keyframes ci-in { from { opacity: 0; translate: 0 .5rem; } to { opacity: 1; translate: 0 0; } }
@media (max-width: 47.99rem) {
  .page-blocks .ci.is-live .ci-items { grid-template-columns: minmax(0, 1fr); }
.page-blocks .ci.is-live .ci-card { grid-column: 1; grid-row: 7; margin-top: 1.25rem; }
}
/* 淺色段落 */
.page-blocks .pp-section:not(.pp-section--band, .pp-section--image) .ci { color: var(--ink); }
.page-blocks .pp-section:not(.pp-section--band, .pp-section--image) .ci-card { background: var(--paper); border-color: var(--line); }
.page-blocks .pp-section:not(.pp-section--band, .pp-section--image) :is(.ci-h, .ci-btn[aria-current="true"]) { color: var(--ink); }
.page-blocks .pp-section:not(.pp-section--band, .pp-section--image) :is(.ci-body, .ci-top, .ci-btn, .ci-btn b) { color: var(--muted); }
.page-blocks .pp-section:not(.pp-section--band, .pp-section--image) :is(.ci-n, .ci-btn[aria-current="true"] b, .ci-node.hit .ci-nt) { color: var(--accent-ink); }
@media (prefers-reduced-motion: reduce) { html .page-blocks .ci .ci-btn { transition: none; } }
html[data-motion="off"] .page-blocks .ci .ci-btn { transition: none; }

.page-blocks .pp-scene--checkpoint-inbox .pp-eyebrow { font-size: .8125rem; }
@media (max-width: 30rem) { .page-blocks .ci-route { flex-direction: column; } .page-blocks .ci-path { flex-direction: column; gap: .75rem; } .page-blocks .ci-node { grid-template-columns: auto 1fr; align-items: center; max-width: none; gap: .25rem .75rem; } .page-blocks .ci-node::before { display: none; } .page-blocks .ci-node em { grid-column: 2; justify-self: start; } }

/* 段落換行更平均，窄螢幕不留一兩個字的短尾行。 */
.page-blocks [data-scene] p { text-wrap: pretty; }

/* issue 371：泡泡放在第二列右側的空白處、圓圈靠近列首，不蓋住上一列的標題；列高固定，泡泡垂直置中。 */
.page-blocks .ci-btn .cfh-tip { left: auto; right: .5rem; bottom: auto; top: 50%; margin-top: -1.0625rem; }
.page-blocks .ci-btn .cfh-tip::after { display: none; }
.page-blocks .ci-btn .cfh-tap { left: 2rem; }
