.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.nav-search { display: inline-flex; align-items: center; border: 0; background: none; color: inherit; padding: 8px 0; }
.nav-search:hover { color: var(--accent); }
.modal-open { overflow: hidden; }
.afterlight-dialog { color: var(--ink); background: var(--paper); border: 1px solid var(--rule); padding: 28px; max-height: calc(100dvh - 48px); width: min(640px, calc(100% - 40px)); overflow: auto; box-shadow: 0 15px 70px #0003; }
.afterlight-dialog::backdrop { background: #15211ed0; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.dialog-heading h2 { font: 400 25px/1.5 var(--serif); margin: 0; }
.dialog-heading button { border: 0; background: none; color: var(--muted); font-size: 28px; width: 40px; height: 40px; }
.afterlight-dialog input { width: 100%; padding: 12px 14px; background: var(--surface); border: 1px solid var(--rule); color: var(--ink); border-radius: 0; }
.afterlight-dialog input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[data-search-status], [data-gallery-status] { color: var(--muted); font-size: 12px; }
.search-results { list-style: none; padding: 0; margin: 15px 0 0; }
.search-results a { display: block; border-top: 1px solid var(--rule); padding: 16px 3px; }
.search-results strong { font: 400 19px/1.6 var(--serif); overflow-wrap: anywhere; }
.search-results p { color: var(--muted); font-size: 12px; margin: 6px 0 0; overflow-wrap: anywhere; }
[data-search-retry], .comments-section button { background: transparent; border: 1px solid var(--rule); color: var(--ink); padding: 9px 15px; }
.reading-tools { position: fixed; z-index: 30; width: 44px; height: 44px; }
.reading-launcher { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--rule); background: var(--surface); color: var(--ink); border-radius: 50%; box-shadow: 0 2px 12px #0001; touch-action: none; user-select: none; cursor: grab; }
.reading-launcher:active { cursor: grabbing; }
.reading-actions { position: absolute; padding: 7px; background: var(--surface); border: 1px solid var(--rule); box-shadow: 0 5px 25px #0002; overflow: auto; }
[data-direction="up"] .reading-actions { bottom: 52px; }
[data-direction="down"] .reading-actions { top: 52px; }
.reading-actions button { width: 100%; text-align: left; border: 0; padding: 11px 13px; color: var(--ink); background: transparent; font-size: 13px; }
.reading-actions button:hover { background: var(--soft); color: var(--accent); }
.directory-dialog { overflow: hidden; }
.directory-dialog nav { overflow: auto; max-height: calc(100dvh - 180px); overscroll-behavior: contain; }
.directory-dialog ol { list-style: none; padding: 0; margin: 0; }
.directory-dialog ol ol { padding-left: 17px; }
.directory-dialog a { display: block; padding: 8px 3px; font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; }
.directory-dialog [aria-current] { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.afterlight .ai-disclosure { display: grid; gap: 7px; padding: 15px 18px; margin: 20px 0 0; border-left: 2px solid var(--sage); background: var(--soft); color: var(--muted); font: 12px/1.9 var(--sans); }
.ai-disclosure strong { color: var(--sage); font-weight: 500; }
.ai-disclosure a { text-decoration: underline; text-underline-offset: 3px; }
.gallery-trigger { cursor: zoom-in; }
.gallery-trigger:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.gallery-dialog { width: min(1100px, calc(100% - 32px)); }
.gallery-stage { display: grid; place-items: center; min-height: 120px; }
.gallery-stage img { display: block; max-width: 100%; max-height: calc(100dvh - 260px); object-fit: contain; }
[data-gallery-caption] { text-align: center; font: 13px/1.8 var(--serif); margin: 15px 0; }
.gallery-controls { display: flex; align-items: center; justify-content: space-between; gap: 20px; font-size: 12px; }
.gallery-controls button { min-width: 44px; min-height: 44px; border: 1px solid var(--rule); background: transparent; color: var(--ink); }
.gallery-controls button:disabled { opacity: .35; cursor: default; }
.comments-section { max-width: 720px; margin: 50px auto 0; padding-top: 25px; border-top: 1px solid var(--rule); }
.comments-section h2 { font: 400 24px/1.5 var(--serif); margin: 0 0 20px; }
.comments-section p { color: var(--muted); font-size: 12px; }
.comments-section iframe { width: 100%; }
.focus-reading .post-meta [data-focus] { position: static; box-shadow: none; }
.focus-reading .comments-section, .focus-reading .post-navigation { display: none; }
@media (max-width: 650px) {
  .site-header { gap: 12px; }
  .brand { width: 112px; }
  .site-nav { gap: 14px; }
  .afterlight-dialog { padding: 20px; max-height: calc(100dvh - 24px); }
  .dialog-heading { margin-bottom: 15px; }
}
@media (max-width: 360px) {
  .site-header { gap: 8px; }
  .brand { width: 92px; }
  .site-nav { gap: 10px; }
}
@media print { .reading-tools, .afterlight-dialog, .comments-section, .nav-search { display: none !important; } }
