.cr-page[hidden] { display: none !important; }
.cr-selector-nav { width: 100%; min-width: 0; }
.cr-selector, .cr-page-nav button, .cr-toc button { appearance: none; font: inherit; cursor: pointer; box-shadow: none; }
.cr-selector { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 9px 12px; border: 0; border-radius: 10px; background: transparent; color: #493e38; text-align: left; line-height: 1.5; }
.cr-selector-count { color: #796b62; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cr-selector-title { min-width: 0; font-size: 14px; font-weight: 650; overflow-wrap: anywhere; }
.cr-selector-action { color: #8b493c; font-size: 13px; font-weight: 650; white-space: nowrap; text-decoration: underline; text-underline-offset: 4px; }
.cr-selector:hover, .cr-selector[aria-expanded=true] { background: #f3eae3; }
.cr-selector:active { background: #eaddd3; }
.cr-selector:focus-visible, .cr-page-nav button:focus-visible, .cr-toc button:focus-visible { outline: 2px solid #9b5745; outline-offset: 3px; }
.cr-status { position: absolute; width: 1px; height: 1px; margin: -1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }

.cr-page-nav { display: flex; flex-direction: column; align-items: center; gap: 14px; width: min(100%, 560px); margin: 52px auto 0; padding: 20px 16px max(20px, env(safe-area-inset-bottom, 0px)); box-sizing: border-box; text-align: center; }
.cr-next-block { width: 100%; }
.cr-page-nav .cr-next-label { margin: 0 0 9px; color: #806b5d; font-size: 13px; font-weight: 600; line-height: 1.5; }
.cr-page-nav .cr-next-title { margin: 0 auto 20px; color: #493e38; font-size: clamp(19px, 4.5vw, 24px); font-weight: 650; line-height: 1.55; word-break: keep-all; overflow-wrap: anywhere; }
.cr-page-nav .cr-next { min-height: 48px; min-width: 180px; max-width: 100%; padding: 12px 30px; border: 0; border-radius: 999px; background: #91523f; color: #fffaf7; font-size: 15px; font-weight: 650; line-height: 1.6; }
.cr-page-nav .cr-next:hover { background: #7e4434; }
.cr-page-nav .cr-next:active { background: #6f3a2e; }
.cr-page-nav .cr-previous { min-width: 92px; min-height: 44px; padding: 10px 18px; border: 0; border-radius: 8px; background: transparent; color: #746359; font-size: 14px; line-height: 1.7; text-decoration: underline; text-underline-offset: 4px; }
.cr-page-nav .cr-previous:hover { background: #f3eae3; }
.cr-page-nav .cr-previous:active { background: #eaddd3; }

.cr-toc { position: fixed; inset: var(--cr-list-top, 80px) 0 auto; width: min(calc(100% - 32px), 640px); max-width: calc(100% - 32px); max-height: var(--cr-list-height, calc(100dvh - 112px)); margin: 0 auto; padding: 0 18px 18px; border: 1px solid #e6d9ce; border-radius: 8px; background: #fffaf7; color: #493e38; box-sizing: border-box; overflow-y: auto; overscroll-behavior: contain; box-shadow: none; }
.cr-toc::backdrop { background: rgb(42 31 24 / 26%); }
.cr-toc-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; position: sticky; top: 0; z-index: 1; background: #fffaf7; padding: 12px 0 8px; }
.cr-toc-header h2 { margin: 0; font-size: 18px; line-height: 1.5; font-weight: 700; }
.cr-toc .cr-close { min-height: 44px; min-width: 56px; padding: 10px; border: 0; border-radius: 8px; background: transparent; color: #746359; font-size: 13px; }
.cr-toc-list { list-style: none; padding: 0; margin: 0; }
.cr-toc-list li { margin: 0; padding: 0; }
.cr-toc .cr-toc-choice { display: flex; align-items: baseline; gap: 14px; width: 100%; min-height: 48px; margin: 2px 0; padding: 12px 10px; border: 0; border-radius: 10px; background: transparent; color: #493e38; text-align: left; line-height: 1.6; word-break: keep-all; overflow-wrap: anywhere; }
.cr-toc-number { flex-shrink: 0; color: #89796f; font-size: 13px; font-variant-numeric: tabular-nums; }
.cr-toc-title { min-width: 0; font-size: 14px; }
.cr-toc .cr-toc-choice[aria-current=page] { color: #963f32; background: #f5e7de; font-weight: 700; }
.cr-toc button:hover { background: #f0e6df; }
.cr-toc button:active { background: #e9dcd3; }
@media (max-width: 380px) {
  .cr-selector { gap: 8px; padding-inline: 8px; }
  .cr-selector-count, .cr-selector-action { font-size: 13px; }
  .cr-selector-title { font-size: 13px; }
  .cr-toc { padding-inline: 12px; }
  .cr-page-nav { padding-inline: 8px; }
}
@media print {
  .cr-page, .cr-page[hidden] { display: block !important; }
  .cr-page + .cr-page { break-before: page; }
  .cr-selector-nav, .cr-page-nav, .cr-toc { display: none !important; }
}
