/* The shared chapter entry, reading controls and social footer. */
.footer-social { display: flex; flex-wrap: wrap; gap: .35rem 1.2rem; align-items: center; }
.footer-social a { color: var(--gold-bright, #f5d988); display: inline-flex; align-items: center; min-block-size: 44px; }
.footer-social a:focus-visible, .chapter-entry:focus-visible, .chapter-bookmark button:focus-visible { outline: 2px solid var(--gold-bright, #f5d988); outline-offset: 4px; }
.chapter-entry {
  display: grid; grid-template-columns: 3rem minmax(0, 1fr); align-items: center; gap: .85rem;
  border: 1px solid color-mix(in srgb, var(--gold, #ddb95f) 40%, transparent);
  background: #15120e; padding: .7rem .85rem; margin: .75rem 0 0;
  color: var(--paper, #e9e3d7); border-radius: .7rem;
}
.chapter-entry:hover { border-color: var(--gold-bright, #f5d988); }
.chapter-entry img { display: block; width: 3rem; height: 3rem; }
.chapter-entry small { color: var(--gold-bright, #f5d988); display: block; }
.chapter-entry strong { line-height: 1.35; display: block; margin-top: .15rem; }
#zeraphina { scroll-margin-top: 6rem; }
.chapter-bridge { width: min(67rem, calc(100% - 2.5rem)); margin: 2.25rem auto; padding: 1.3rem; border: 1px solid #665237; background: #17130f; border-radius: .65rem; }
.chapter-bridge p { margin: 0 0 .65rem; }
.chapter-bridge a, .chapter-bookmark a { color: var(--gold-bright, #f5d988); }
.chapter-bridge nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.chapter-bridge nav a { display: inline-flex; align-items: center; min-height: 44px; }
.chapter-legacy-reading { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .85rem; margin-block: .6rem; }
.chapter-legacy-reading a { min-height: 44px; display: inline-flex; align-items: center; color: var(--gold-bright, #f5d988); }
.chapter-legacy-reading .chapter-bookmark { margin-block: .25rem; }
.chapter-bookmark { margin-block: 1.1rem; }
.chapter-bookmark button {
  cursor: pointer; font: inherit; color: var(--gold-bright, #f5d988); padding: .55rem .85rem;
  min-height: 44px; background: #1b1712; border: 1px solid #816747; border-radius: .35rem;
}
.chapter-bookmark [data-bookmark-status] { margin-inline-start: .55rem; color: var(--paper, #e9e3d7); }
.chapter-bookmark [data-bookmark-status]:empty { display: none; }
@media (max-width: 40rem) {
  .chapter-bridge nav { display: grid; }
  .chapter-bookmark [data-bookmark-status] { display: block; margin: .42rem 0 0; }
}

/* Keep footer actions clear of the host badge and the site's fixed controls. */
body:has(iframe#nl-badge-frame) {
  --zk-dock-bottom: max(12px, env(safe-area-inset-bottom));
  --zk-radio-bottom: calc(var(--zk-dock-bottom) + 58px);
  --zk-open-radio-height: clamp(76px, calc(100dvh - var(--zk-radio-bottom) - 190px), 432px);
  --zk-footer-clearance: calc(76px + env(safe-area-inset-bottom));
  padding-block-end: var(--zk-footer-clearance);
}

body:has(iframe#nl-badge-frame):has(.zk-radio-launcher, .zk-radio-float) {
  --zk-footer-clearance: calc(var(--zk-radio-bottom) + 56px);
}

body:has(iframe#nl-badge-frame):has(.zk-radio-float-panel:not([hidden])) {
  --zk-footer-clearance: calc(var(--zk-radio-bottom) + var(--zk-open-radio-height) + 12px);
}

body:has(iframe#nl-badge-frame) .zk-radio-float .zk-radio-float-panel {
  max-height: var(--zk-open-radio-height);
}

body:has(iframe#nl-badge-frame) .footer-social a {
  scroll-margin-block-end: var(--zk-footer-clearance);
}

body:has(iframe#nl-badge-frame) .a11y-dock {
  right: auto;
  left: max(12px, env(safe-area-inset-left));
  align-items: flex-start;
}

@media (max-width: 390px) {
  body:has(iframe#nl-badge-frame) .a11y-toggle {
    display: grid;
    place-items: center;
    min-width: 44px;
    width: 44px;
    height: 44px;
    padding: 0;
    font-size: 0;
    border-radius: 50%;
  }
  body:has(iframe#nl-badge-frame) .a11y-toggle::before {
    content: "\2699" / "";
    font-size: 23px;
    line-height: 1;
  }
}
