/* The page keeps its full reading width; the directory opens only on request. */
.scroll-container { width: 100%; }
.page { padding-bottom: calc(108px + env(safe-area-inset-bottom, 0px)); scrollbar-width: none; }
.page::-webkit-scrollbar { display: none; }
.navigation-dock { position: fixed; z-index: 60; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: flex; align-items: center; gap: 14px; width: calc(100% - 40px); max-width: 390px; min-height: 58px; padding: 0 18px; overflow: hidden; border: 1px solid rgba(207,168,92,.3); border-radius: 18px; background: rgba(22,21,17,.96); color: #eee3ca; box-shadow: 0 8px 32px rgba(0,0,0,.4); cursor: pointer; font-family: var(--font-body); text-align: left; }
.navigation-dock::after { content: ''; position: absolute; bottom: 0; left: 0; height: 2px; width: var(--page-progress, 9.09%); background: #cfa85c; transition: width .3s ease; }
.dock-count { white-space: nowrap; font-family: Georgia, serif; font-size: 17px; color: #d9b971; font-variant-numeric: tabular-nums; }
.dock-total { color: #8b8372; font-size: 11px; }
.dock-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; letter-spacing: 1px; }
.dock-action { display: flex; align-items: center; gap: 7px; padding-left: 14px; border-left: 1px solid #4a402c; color: #d6bb83; font-size: 12px; white-space: nowrap; }
.navigation-dock:focus-visible, .directory-close:focus-visible { outline: 2px solid #e4c17c; outline-offset: 4px; }
body:has(.modal-overlay.show) .navigation-dock { visibility: hidden; }
.page-directory { position: fixed; inset: auto 0 0; margin: 0 auto; width: min(100%, 520px); max-width: 520px; max-height: min(85dvh, 720px); padding: 28px 22px calc(24px + env(safe-area-inset-bottom, 0px)); border: 1px solid #4a3c25; border-bottom: 0; border-radius: 26px 26px 0 0; background: #14130f; color: #f0e5cb; box-shadow: 0 -12px 60px rgba(0,0,0,.45); overflow-y: auto; overscroll-behavior: contain; }
.page-directory::backdrop { background: rgba(0,0,0,.72); }
.directory-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 24px; }
.directory-eyebrow { font-family: Georgia, serif; font-size: 9px; letter-spacing: 3px; color: #ae905a; margin: 0 0 10px; }
.directory-heading h2 { font-size: 25px; font-weight: 500; letter-spacing: 3px; margin: 0; }
.directory-close { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #443a27; background: transparent; border-radius: 50%; color: #c8b895; font-size: 26px; cursor: pointer; }
.page-directory .nav-dots { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 9px; width: 100%; max-height: none; transform: none; padding: 0; border: 0; border-radius: 0; background: transparent; backdrop-filter: none; counter-reset: directory; overflow: visible; }
.page-directory .nav-dot { display: flex; align-items: center; justify-content: flex-start; gap: 10px; position: relative; min-height: 59px; width: auto; max-width: none; padding: 12px 10px; border: 1px solid #302b20; border-radius: 10px; text-align: left; color: #c6baa1; font-size: 12px; line-height: 1.5; letter-spacing: 0; text-shadow: none; overflow-wrap: anywhere; cursor: pointer; transition: background .15s, border-color .15s; }
.page-directory .nav-dot::before { counter-increment: directory; content: counter(directory, decimal-leading-zero); position: static; transform: none; flex: 0 0 20px; width: auto; height: auto; background: transparent; color: #847659; font-family: Georgia, serif; font-size: 11px; box-shadow: none; }
.page-directory .nav-dot.active { background: #2c2517; border-color: #9a7b42; color: #f1d49a; }
.page-directory .nav-dot.active::before { color: #ddb96e; }
.page-directory .nav-dot:hover { background: #282319; border-color: #8e7442; }
.directory-footnote { margin: 23px 0 0; color: #8c8069; font-size: 10px; letter-spacing: 2px; text-align: center; }
@media (min-width: 768px) {
  .navigation-dock { bottom: 26px; }
  .page-directory { inset: 0; margin: auto; height: fit-content; border-bottom: 1px solid #4a3c25; border-radius: 24px; padding: 30px; }
  .page-directory .nav-dot { font-size: 14px; min-height: 62px; padding: 14px; }
}
@media (prefers-reduced-motion: reduce) { .navigation-dock::after { transition: none; } }
