

.reader-end-content { width: min(820px, calc(100vw - 180px)); margin: 24px auto 0; padding: 22px; border: 1px solid #dedede; border-radius: 10px; background: #fff; color: #333; }
.reader-end-navigation { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 24px; }
.reader-end-navigation > a, .reader-end-navigation > span { display: flex; min-height: 44px; align-items: center; justify-content: center; gap: 8px; padding: 8px; border: 1px solid #dedede; border-radius: 6px; color: inherit; text-decoration: none; font-size: 14px; }
.reader-end-navigation .primary { background: var(--theme-red, #ac001e); border-color: transparent; color: #fff; }
.reader-end-navigation > span { opacity: .45; }
.reader-comic-info-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.reader-comic-info-heading h2 { margin: 0; font-size: 20px; line-height: 1.5; }
.reader-comic-info-heading > span, .reader-current-chapter { color: #6b7280; font-size: 12px; }
.reader-current-chapter { margin: 10px 0 0; line-height: 1.8; }
.reader-comic-intro { margin: 14px 0; font-size: 14px; line-height: 1.9; overflow-wrap: anywhere; }
.reader-comic-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-top: 12px; font-size: 13px; }
.reader-comic-info-heading h2 a { color: inherit; text-decoration: none; }
.reader-comic-info-heading h2 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.reader-comic-info-heading h2 a:focus-visible { outline: 2px solid var(--theme-red); outline-offset: 3px; }
@media (min-width: 761px) {
  .reader-v2.dark .reader-end-content { background: #202020; border-color: #333; color: #d1d5db; }
  .reader-v2.dark .reader-end-navigation > a:not(.primary), .reader-v2.dark .reader-end-navigation > span { border-color: #444; }
  .reader-v2.dark .reader-comic-info-heading > span, .reader-v2.dark .reader-current-chapter { color: #9ca3af; }
}
@media (max-width: 760px) {
  .reader-end-content { width: calc(100% - 24px); margin: 20px auto 28px; padding: 16px; }
  .reader-comic-info-heading h2 { font-size: 17px; }
  .reader-end-navigation { gap: 8px; }
  .reader-end-navigation > a, .reader-end-navigation > span { font-size: 12px; }
}


.reader-bottom-recommendations { margin-top: 24px; padding-top: 22px; border-top: 1px solid #dedede; }
.reader-bottom-recommendations header { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.reader-bottom-recommendations h2 { margin: 0; font-size: 18px; line-height: 1.5; }
.reader-recommendation-genres, .reader-recommendation-summary { display: none; }
.reader-bottom-recommendations ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.reader-bottom-recommendations a { display: flex; gap: 12px; min-width: 0; height: 100%; padding: 10px; border: 1px solid #dedede; border-radius: 8px; color: inherit; text-decoration: none; }
.reader-bottom-recommendations img { display: block; flex: 0 0 60px; width: 60px; height: 80px; object-fit: cover; border-radius: 4px; }
.reader-bottom-recommendations a > div { min-width: 0; }
.reader-bottom-recommendations strong { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 14px; font-weight: 600; line-height: 1.6; }
.reader-bottom-recommendations small { display: block; margin-top: 8px; font-size: 12px; color: #777; }
.reader-bottom-recommendations a:hover, .reader-bottom-recommendations a:focus-visible { border-color: var(--theme-red); }
@media (min-width: 761px) {
  .reader-v2.dark .reader-bottom-recommendations, .reader-v2.dark .reader-bottom-recommendations a { border-color: #383838; }
  .reader-bottom-recommendations img { flex-basis: 72px; width: 72px; height: 96px; }
  .reader-recommendation-genres { display: inline; }
  .reader-recommendation-summary { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin: 8px 0 0; color: #6b7280; font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
  .reader-v2.dark .reader-bottom-recommendations small, .reader-v2.dark .reader-recommendation-summary { color: #9ca3af; }
}
@media (min-width: 761px) and (max-width: 1100px) {
  .reader-bottom-recommendations ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .reader-bottom-recommendations ul { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .reader-bottom-recommendations a { padding: 8px; gap: 8px; }
  .reader-bottom-recommendations img { flex-basis: 44px; width: 44px; height: 59px; }
  .reader-bottom-recommendations strong { font-size: 12px; }
  .reader-bottom-recommendations h2 { font-size: 16px; }
}

@media (max-width:760px){
  .reader-site-shell.mobile-reader-host{width:100%;min-width:0!important;padding-top:0!important;overflow-x:clip;background:#fff8f7}.reader-site-shell.mobile-reader-host>.df-topbar,.reader-site-shell.mobile-reader-host>.df-account-footer,.reader-site-shell.mobile-reader-host>.reader-v2{display:none!important}.reader-site-shell:has(.mobile-reader-design){padding-top:0!important;background:#fff8f7}.reader-site-shell:has(.mobile-reader-design)>.df-topbar,.reader-site-shell:has(.mobile-reader-design)>.df-account-footer,.reader-site-shell:has(.mobile-reader-design)>.reader-v2{display:none}.mobile-reader-design{display:block;width:100%;min-height:100dvh;overflow-x:clip;padding:64px 0 calc(76px + env(safe-area-inset-bottom));background:#fff8f7;color:#291716;font-family:"Hanken Grotesk","Microsoft YaHei",Arial,sans-serif}.mrd-progress{position:fixed;z-index:70;top:0;left:0;height:3px;background:#ac001e;transition:width .15s}.mrd-top{position:fixed;z-index:60;top:0;left:0;right:0;display:flex;height:64px;align-items:center;padding:0 12px;border-bottom:1px solid rgba(231,188,186,.3);background:rgba(255,248,247,.9);backdrop-filter:blur(16px);transition:transform .25s}.mrd-top>a,.mrd-top button{display:grid;width:44px;height:44px;flex:0 0 44px;place-items:center;border:0;border-radius:50%;background:transparent;color:#ac001e}.mrd-top>div{min-width:0;flex:1;padding:0 10px;text-align:center}.mrd-top h1,.mrd-top p{overflow:hidden;margin:0;white-space:nowrap;text-overflow:ellipsis}.mrd-top h1{color:#ac001e;font-size:18px;font-weight:800}.mrd-top p{margin-top:2px;color:#5d3f3d;font-size:11px}.mrd-canvas{min-height:calc(100dvh - 140px);cursor:pointer;touch-action:pan-y pinch-zoom}.mrd-pages{width:100%;background:#fff}.mrd-pages img{display:block;width:100%;max-width:100%;height:auto}.mrd-pages img:nth-child(n+4){content-visibility:auto;contain-intrinsic-size:auto 1200px}.mrd-end{padding:48px 16px;text-align:center}.mrd-end a{display:inline-flex;align-items:center;gap:7px;padding:12px 24px;border-radius:999px;background:#ac001e;color:#fff;text-decoration:none;font-size:13px;font-weight:700;box-shadow:0 8px 18px rgba(172,0,30,.2)}.mrd-end p{margin:14px 0 0;color:#5d3f3d;font-size:11px}.mrd-bottom{position:fixed;z-index:60;right:0;bottom:0;left:0;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));height:calc(76px + env(safe-area-inset-bottom));align-items:start;padding-bottom:env(safe-area-inset-bottom);background:rgba(255,248,247,.96);box-shadow:0 -4px 20px rgba(0,0,0,.04);backdrop-filter:blur(14px);transition:transform .25s}.mrd-bottom>*{display:grid;min-width:0;min-height:76px;align-content:center;justify-items:center;gap:3px;border:0;background:transparent;color:#5b5d74;text-decoration:none}.mrd-bottom span{font-size:22px}.mrd-bottom small{font-size:10px}.mrd-bottom .active{color:#ac001e}.mrd-bottom .disabled{opacity:.35}.filled{font-variation-settings:'FILL' 1}.ui-hidden .mrd-top{transform:translateY(-100%)}.ui-hidden .mrd-bottom{transform:translateY(100%)}.mrd-hidden-flip{position:fixed;z-index:62;left:50%;bottom:env(safe-area-inset-bottom);display:inline-grid;grid-template-columns:auto auto;min-width:96px;min-height:48px;align-items:center;justify-content:center;gap:4px;padding:0 12px;border:0;transform:translateX(-50%);background:transparent;color:#fff;text-shadow:0 1px 3px rgba(0,0,0,.9);touch-action:manipulation}.mrd-hidden-flip span{font-size:24px}.mrd-hidden-flip small{font-size:12px;font-weight:700}.mrd-catalog-mask{position:fixed;z-index:80;inset:0;background:rgba(41,23,22,.38)}.mrd-catalog{position:fixed;z-index:81;right:0;bottom:0;left:0;max-height:70dvh;overflow:auto;padding-bottom:env(safe-area-inset-bottom);border-radius:20px 20px 0 0;background:#fff8f7}.mrd-catalog header{position:sticky;top:0;display:flex;align-items:center;justify-content:space-between;padding:16px;background:#fff8f7}.mrd-catalog header button{display:grid;width:44px;height:44px;place-items:center;border:0;background:transparent;color:#ac001e}.mrd-catalog a{display:block;min-height:48px;padding:14px 20px;border-top:1px solid rgba(231,188,186,.35);color:#291716;text-decoration:none;font-size:13px}.mrd-catalog a.active{color:#ac001e;font-weight:700}
.mrd-catalog a{display:flex;align-items:center;justify-content:space-between;gap:12px}.mrd-catalog a>span:first-child{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.mrd-catalog a.app-tip{color:#7b3d47}.mrd-catalog-app-tip{flex:0 0 auto;color:#ac001e;font-size:17px!important}
.mrd-catalog-actions{display:flex;align-items:center;gap:2px}.mrd-catalog header .mrd-catalog-order{display:flex;width:auto;min-width:68px;padding:0 8px;align-items:center;justify-content:center;gap:2px}.mrd-catalog-order span{font-size:19px}.mrd-catalog-order small{font-size:11px;font-weight:700}
.mrd-latest-app-tip{position:fixed;z-index:59;top:70px;right:10px;left:10px;display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:8px;padding:9px 10px;border:1px solid #f0c9cf;border-radius:12px;background:rgba(255,255,255,.97);color:#291716;box-shadow:0 8px 24px rgba(87,31,43,.14);backdrop-filter:blur(12px)}.mrd-latest-app-tip>span{color:#ac001e;font-size:21px}.mrd-latest-app-tip div{display:grid;min-width:0;gap:1px}.mrd-latest-app-tip strong{font-size:11px}.mrd-latest-app-tip small{overflow:hidden;color:#765d61;font-size:9px;white-space:nowrap;text-overflow:ellipsis}.mrd-latest-app-tip a{padding:6px 9px;border-radius:999px;background:#ac001e;color:#fff;text-decoration:none;font-size:10px;font-weight:700;white-space:nowrap}.mrd-latest-app-tip button{display:grid;width:28px;height:28px;place-items:center;padding:0;border:0;border-radius:50%;background:#fff3f4;color:#765d61}.mrd-latest-app-tip button span{font-size:16px}
}
@media (min-width:761px){.mobile-reader-design{display:none}}

@media (max-width:760px){
  .reader-site-shell.mobile-reader-host>.reader-v2{display:block!important;min-height:100dvh;padding:0 0 calc(76px + env(safe-area-inset-bottom));background:#fff}
  .reader-site-shell.mobile-reader-host>.reader-v2>.reader-top-v2,
  .reader-site-shell.mobile-reader-host>.reader-v2>.reader-like-sidebar,
  .reader-site-shell.mobile-reader-host>.reader-v2>.reader-chapter-note,
  .reader-site-shell.mobile-reader-host>.reader-v2>.reader-latest-desktop-tip,
  .reader-site-shell.mobile-reader-host>.reader-v2>.reader-finish-panel,
  .reader-site-shell.mobile-reader-host>.reader-v2>.reader-catalog-mask,
  .reader-site-shell.mobile-reader-host>.reader-v2>.reader-catalog-panel,
  .reader-site-shell.mobile-reader-host>.reader-v2>.reader-float-tools,
  .reader-site-shell.mobile-reader-host>.reader-v2>.reader-bottom-v2{display:none!important}
  .mobile-reader-design{min-height:0;padding:0;background:transparent}
  .mrd-top strong,.mrd-top p{display:block;overflow:hidden;margin:0;white-space:nowrap;text-overflow:ellipsis}
  .mrd-top strong{color:#ac001e;font-size:18px;font-weight:800}
  .reader-site-shell.mobile-reader-host .reader-stage-v2{display:block;min-height:100dvh;padding-top:64px;background:#fff}
  .reader-site-shell.mobile-reader-host .reader-page-wrap{width:100%;min-height:100dvh;padding:0;background:#fff}
  .reader-site-shell.mobile-reader-host .reader-page-image{width:100%;max-width:100%;height:auto}
  .reader-site-shell.mobile-reader-host .reader-page-image:nth-child(n+4){content-visibility:auto;contain-intrinsic-size:auto 1200px}
}

.reader-site-shell {
  width: 100%;
  min-width: 0;
}

.reader-site-shell .reader-v2 {
  width: 100%;
  min-width: 0;
}

@media (min-width: 761px) {
  /* Scope the canvas to the reader so outside spacing cannot expose the site's white background. */
  html:has(.reader-site-shell .reader-v2.dark) { --theme-bg: #181818; }
  html:has(.reader-site-shell .reader-v2:not(.dark)) { --theme-bg: #f2f2f2; }
  .reader-site-shell .reader-v2 { display: flow-root; padding-bottom: 32px; }

  /* The desktop reader has its own themed navigation, not the site chrome. */
  .reader-site-shell.df-account-design-page {
    padding-top: 0;
  }

  .reader-site-shell > .df-topbar,
  .reader-site-shell > .df-account-footer {
    display: none;
  }

  .reader-site-shell .reader-top-v2 {
    top: 0;
  }

  .reader-site-shell .reader-page-wrap,
  .reader-site-shell .reader-chapter-note,
  .reader-site-shell .reader-finish-panel {
    width: min(820px, calc(100vw - 180px));
  }

  .reader-site-shell .reader-chapter-note {
    border: 0;
    border-left: 3px solid var(--theme-red);
    background: #202020;
  }

  .reader-site-shell .reader-finish-panel {
    border: 0;
  }

  /* Keep the tools in the existing canvas gutter, including narrow tablets. */
  .reader-site-shell .reader-float-tools {
    top: calc(50% + 28px);
    right: max(8px, calc((100% - 820px) / 2 - 84px));
    bottom: auto;
    left: auto;
    display: flex;
    flex-direction: column;
    width: 64px;
    max-height: calc(100dvh - 88px);
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scrollbar-width: thin;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 8px;
    background: rgba(24, 24, 24, .94);
    box-shadow: 0 12px 34px rgba(0, 0, 0, .38);
    backdrop-filter: blur(12px);
    transform: translateY(-50%);
  }

  .reader-site-shell .reader-float-tools a,
  .reader-site-shell .reader-float-tools button,
  .reader-site-shell .reader-float-tools > span {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    min-height: 54px;
    padding: 4px;
  }

  .reader-site-shell .reader-float-tools a:focus-visible,
  .reader-site-shell .reader-float-tools button:focus-visible {
    outline: 2px solid var(--theme-red);
    outline-offset: -3px;
    border-radius: 4px;
  }

  .reader-site-shell .reader-float-tools span span,
  .reader-site-shell .reader-float-tools a span,
  .reader-site-shell .reader-float-tools button span {
    font-size: 22px;
  }

  .reader-page-wrap .reader-page-image:nth-child(n+4) {
    content-visibility: auto;
    contain-intrinsic-size: auto 1200px;
  }
}

/* Image navigation uses the current chapter only; hidden images keep their original data. */
.reader-site-shell .reader-v2.reader-paged .reader-page-image:not(.is-current-page) { display: none; }
.reader-site-shell .reader-v2.reader-paged .reader-page-image.is-current-page { content-visibility: visible; contain-intrinsic-size: none; }
.reader-top-tools .reader-page-selector {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  min-width: 76px; min-height: 34px; padding: 3px 10px; border: 1px solid #bbb;
  border-radius: 999px; background: #fff; color: #444; font-size: 14px; cursor: pointer;
}
.reader-site-shell .reader-page-number { display: block; font: inherit; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.reader-site-shell .reader-page-chevron { display: block; flex: 0 0 12px; width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.reader-image-navigation { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 10px; color: #333; background: #f5f5f5; }
.reader-image-navigation button { flex: 1; min-width: 0; min-height: 44px; padding: 6px; border: 1px solid #bbb; border-radius: 6px; color: inherit; background: transparent; font-size: 13px; cursor: pointer; }
.reader-image-navigation .reader-image-page-selector { display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.reader-v2.dark .reader-image-navigation { color: #eee; background: #202020; }
.reader-v2.dark .reader-image-navigation button { border-color: #555; }
.reader-image-navigation button:disabled,
.reader-float-tools button:disabled,
.mrd-bottom button:disabled,
.mrd-hidden-flip:disabled { opacity: .4; cursor: default; }
.reader-page-selector:focus-visible,
.reader-image-navigation button:focus-visible,
.mrd-page-index:focus-visible { outline: 2px solid var(--theme-red); outline-offset: 2px; }

.reader-page-picker {
  --picker-bg: #fff; --picker-text: #29252a; --picker-muted: #746b72; --picker-border: #e6dfe3; --picker-soft: #faf6f8;
  box-sizing: border-box; width: min(480px, calc(100vw - 24px)); max-height: calc(100dvh - 32px);
  margin: auto; padding: 20px; overflow: auto; overscroll-behavior: contain; border: 1px solid var(--picker-border);
  border-radius: 16px; color: var(--picker-text); background: var(--picker-bg); box-shadow: 0 20px 70px rgba(0,0,0,.35);
}
.reader-page-picker:not([open]) { display: none; }
.reader-page-picker::backdrop { background: rgba(0,0,0,.58); }
.reader-picker-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.reader-picker-heading h2 { margin: 0 0 4px; font-size: 18px; color: inherit; }
.reader-picker-heading p { margin: 0; color: var(--picker-muted); font-size: 12px; }
.reader-page-picker button { cursor: pointer; font: inherit; }
.reader-page-picker .reader-picker-close { width: 36px; height: 36px; padding: 0; border: 0; border-radius: 8px; background: var(--picker-soft); color: inherit; font-size: 26px; line-height: 1; }
.reader-picker-modes { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin: 0 0 14px; padding: 0; border: 0; }
.reader-picker-modes label { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px; border: 1px solid var(--picker-border); border-radius: 8px; font-size: 14px; cursor: pointer; }
.reader-picker-modes label.selected { border-color: var(--theme-red); background: var(--picker-soft); color: var(--theme-red); }
.reader-picker-modes input { width: 16px; height: 16px; margin: 0; accent-color: var(--theme-red); }
.reader-picker-jump { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 13px; }
.reader-picker-jump input { width: 82px; min-width: 0; height: 38px; padding: 6px 8px; border: 1px solid var(--picker-border); border-radius: 6px; background: var(--picker-bg); color: inherit; font: inherit; }
.reader-picker-jump button { min-height: 38px; margin-left: auto; padding: 6px 16px; border: 1px solid var(--picker-border); border-radius: 6px; background: var(--picker-soft); color: inherit; }
.reader-picker-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 7px; max-height: min(42dvh,330px); overflow-y: auto; overscroll-behavior: contain; padding: 3px; }
.reader-picker-grid button { min-width: 0; min-height: 40px; padding: 5px; border: 1px solid var(--picker-border); border-radius: 6px; background: var(--picker-bg); color: inherit; font-size: 13px; }
.reader-picker-grid button[aria-current="page"] { border-color: var(--theme-red); background: var(--theme-red); color: #fff; }
.reader-page-picker footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.reader-page-picker footer small { color: var(--picker-muted); font-size: 11px; }
.reader-page-picker footer button { min-height: 40px; padding: 7px 16px; border: 0; border-radius: 7px; background: var(--theme-red); color: #fff; font-size: 13px; }
.reader-page-picker button:focus-visible,
.reader-page-picker input:focus-visible { outline: 2px solid var(--theme-red); outline-offset: 2px; }
@media (min-width: 761px) {
  .reader-page-picker.dark { --picker-bg: #242424; --picker-text: #eee; --picker-muted: #aaa; --picker-border: #484848; --picker-soft: #303030; }
}
@media (max-width: 760px) {
  .mrd-top .mrd-reader-meta { display: flex; align-items: center; justify-content: center; gap: 6px; overflow: visible; }
  .mrd-reader-meta > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mrd-top .mrd-page-index { display: inline-flex; align-items: center; justify-content: center; gap: 3px; flex: 0 0 auto; width: auto; height: 26px; min-height: 26px; padding: 0 7px; border: 1px solid #ead5db; border-radius: 20px; color: #ac001e; background: #fff; font-size: 11px; }
  .mrd-page-index span { font-size: 11px; }
  .reader-page-picker { padding: 16px; }
  .reader-picker-grid { grid-template-columns: repeat(6,minmax(0,1fr)); }
  .reader-picker-heading h2 { font-size: 17px; }
  .reader-image-navigation { color: #49383e; background: #fff8f7; }
  .reader-v2.dark .reader-image-navigation { color: #49383e; background: #fff8f7; }
}

[hidden]{display:none!important}.reader-page-picker:not([open]),.reader-catalog-dialog:not([open]){display:none}.reader-catalog-dialog{width:min(520px,calc(100vw - 24px));max-height:80dvh;padding:18px;border:1px solid #444;border-radius:12px;color:#ddd;background:#202020}.reader-catalog-dialog::backdrop{background:#0008}.reader-catalog-dialog header{display:flex;align-items:center;gap:12px;position:sticky;top:0;background:#202020}.reader-catalog-dialog h2{font-size:18px;margin-right:auto}.reader-catalog-dialog button{min-height:44px;padding:8px;color:inherit;background:transparent;border:1px solid #555;border-radius:6px}.reader-catalog-dialog nav{display:grid;gap:8px}.reader-catalog-dialog nav a{padding:14px;border-bottom:1px solid #444;font-size:14px}.reader-catalog-dialog [aria-current]{color:#ff315d}.reader-bottom-recommendations a>.desktop-cover{flex:0 0 72px;width:72px;height:96px}.reader-bottom-recommendations .desktop-cover img{width:100%;height:100%}.desktop-cover{display:block}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.hlgmh-reader{background:#181818}.hlgmh-reader:has(.reader-v2:not(.dark)){background:#f2f2f2}
@media(max-width:760px){.reader-bottom-recommendations a>.desktop-cover{flex-basis:44px;width:44px;height:59px}.mobile-reader-design{min-height:0}.reader-catalog-dialog{border-color:#e7bcba;background:#fff8f7;color:#291716}.reader-catalog-dialog header{background:#fff8f7}.reader-catalog-dialog nav a{border-color:#eee}.reader-catalog-dialog button{border-color:#e7bcba}}


/* Current original-reader responsive rules, including the original page-picker skin. */
.reader-site-shell {
  width: 100%;
  min-width: 0;
}

.reader-site-shell .reader-v2 {
  width: 100%;
  min-width: 0;
}

@media (min-width: 761px) {
  /* Scope the canvas to the reader so outside spacing cannot expose the site's white background. */
  html:has(.reader-site-shell .reader-v2.dark) { --theme-bg: #181818; }
  html:has(.reader-site-shell .reader-v2:not(.dark)) { --theme-bg: #f2f2f2; }
  .reader-site-shell .reader-v2 { display: flow-root; padding-bottom: 32px; }

  /* The desktop reader has its own themed navigation, not the site chrome. */
  .reader-site-shell.df-account-design-page {
    padding-top: 0;
  }

  .reader-site-shell > .df-topbar,
  .reader-site-shell > .df-account-footer {
    display: none;
  }

  .reader-site-shell .reader-top-v2 {
    top: 0;
  }

  .reader-site-shell .reader-page-wrap,
  .reader-site-shell .reader-chapter-note,
  .reader-site-shell .reader-finish-panel {
    width: min(820px, calc(100vw - 180px));
  }

  .reader-site-shell .reader-chapter-note {
    border: 0;
    border-left: 3px solid var(--theme-red);
    background: #202020;
  }

  .reader-site-shell .reader-finish-panel {
    border: 0;
  }

  /* Keep the tools in the existing canvas gutter, including narrow tablets. */
  .reader-site-shell .reader-float-tools {
    top: calc(50% + 28px);
    right: max(8px, calc((100% - 820px) / 2 - 84px));
    bottom: auto;
    left: auto;
    display: flex;
    flex-direction: column;
    width: 64px;
    max-height: calc(100dvh - 88px);
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scrollbar-width: thin;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 8px;
    background: rgba(24, 24, 24, .94);
    box-shadow: 0 12px 34px rgba(0, 0, 0, .38);
    backdrop-filter: blur(12px);
    transform: translateY(-50%);
  }

  .reader-site-shell .reader-float-tools a,
  .reader-site-shell .reader-float-tools button,
  .reader-site-shell .reader-float-tools > span {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    min-height: 54px;
    padding: 4px;
  }

  .reader-site-shell .reader-float-tools a:focus-visible,
  .reader-site-shell .reader-float-tools button:focus-visible {
    outline: 2px solid var(--theme-red);
    outline-offset: -3px;
    border-radius: 4px;
  }

  .reader-site-shell .reader-float-tools span span,
  .reader-site-shell .reader-float-tools a span,
  .reader-site-shell .reader-float-tools button span {
    font-size: 22px;
  }

  .reader-page-wrap .reader-page-image:nth-child(n+4) {
    content-visibility: auto;
    contain-intrinsic-size: auto 1200px;
  }
}

/* Image navigation uses the current chapter only; hidden images keep their original data. */
.reader-site-shell .reader-v2.reader-paged .reader-page-image:not(.is-current-page) { display: none; }
.reader-site-shell .reader-v2.reader-paged .reader-page-image.is-current-page { content-visibility: visible; contain-intrinsic-size: none; }
.reader-top-tools .reader-page-selector {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  min-width: 76px; min-height: 34px; padding: 3px 10px; border: 1px solid #bbb;
  border-radius: 999px; background: #fff; color: #444; font-size: 14px; cursor: pointer;
}
.reader-site-shell .reader-page-number { display: block; font: inherit; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.reader-site-shell .reader-page-chevron { display: block; flex: 0 0 12px; width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.reader-image-navigation { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 10px; color: #333; background: #f5f5f5; }
.reader-image-navigation button { flex: 1; min-width: 0; min-height: 44px; padding: 6px; border: 1px solid #bbb; border-radius: 6px; color: inherit; background: transparent; font-size: 13px; cursor: pointer; }
.reader-image-navigation .reader-image-page-selector { display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.reader-v2.dark .reader-image-navigation { color: #eee; background: #202020; }
.reader-v2.dark .reader-image-navigation button { border-color: #555; }
.reader-image-navigation button:disabled,
.reader-float-tools button:disabled,
.mrd-bottom button:disabled,
.mrd-hidden-flip:disabled { opacity: .4; cursor: default; }
.reader-page-selector:focus-visible,
.reader-image-navigation button:focus-visible,
.mrd-page-index:focus-visible { outline: 2px solid var(--theme-red); outline-offset: 2px; }

.reader-page-picker {
  --picker-bg: #fff; --picker-text: #29252a; --picker-muted: #746b72; --picker-border: #e6dfe3; --picker-soft: #faf6f8;
  box-sizing: border-box; width: min(480px, calc(100vw - 24px)); max-height: calc(100dvh - 32px);
  margin: auto; padding: 20px; overflow: auto; overscroll-behavior: contain; border: 1px solid var(--picker-border);
  border-radius: 16px; color: var(--picker-text); background: var(--picker-bg); box-shadow: 0 20px 70px rgba(0,0,0,.35);
}
.reader-page-picker:not([open]) { display: none; }
.reader-page-picker::backdrop { background: rgba(0,0,0,.58); }
.reader-picker-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.reader-picker-heading h2 { margin: 0 0 4px; font-size: 18px; color: inherit; }
.reader-picker-heading p { margin: 0; color: var(--picker-muted); font-size: 12px; }
.reader-page-picker button { cursor: pointer; font: inherit; }
.reader-page-picker .reader-picker-close { width: 36px; height: 36px; padding: 0; border: 0; border-radius: 8px; background: var(--picker-soft); color: inherit; font-size: 26px; line-height: 1; }
.reader-picker-modes { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin: 0 0 14px; padding: 0; border: 0; }
.reader-picker-modes label { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px; border: 1px solid var(--picker-border); border-radius: 8px; font-size: 14px; cursor: pointer; }
.reader-picker-modes label.selected { border-color: var(--theme-red); background: var(--picker-soft); color: var(--theme-red); }
.reader-picker-modes input { width: 16px; height: 16px; margin: 0; accent-color: var(--theme-red); }
.reader-picker-jump { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 13px; }
.reader-picker-jump input { width: 82px; min-width: 0; height: 38px; padding: 6px 8px; border: 1px solid var(--picker-border); border-radius: 6px; background: var(--picker-bg); color: inherit; font: inherit; }
.reader-picker-jump button { min-height: 38px; margin-left: auto; padding: 6px 16px; border: 1px solid var(--picker-border); border-radius: 6px; background: var(--picker-soft); color: inherit; }
.reader-picker-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 7px; max-height: min(42dvh,330px); overflow-y: auto; overscroll-behavior: contain; padding: 3px; }
.reader-picker-grid button { min-width: 0; min-height: 40px; padding: 5px; border: 1px solid var(--picker-border); border-radius: 6px; background: var(--picker-bg); color: inherit; font-size: 13px; }
.reader-picker-grid button[aria-current="page"] { border-color: var(--theme-red); background: var(--theme-red); color: #fff; }
.reader-page-picker footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.reader-page-picker footer small { color: var(--picker-muted); font-size: 11px; }
.reader-page-picker footer button { min-height: 40px; padding: 7px 16px; border: 0; border-radius: 7px; background: var(--theme-red); color: #fff; font-size: 13px; }
.reader-page-picker button:focus-visible,
.reader-page-picker input:focus-visible { outline: 2px solid var(--theme-red); outline-offset: 2px; }
@media (min-width: 761px) {
  .reader-page-picker.dark { --picker-bg: #242424; --picker-text: #eee; --picker-muted: #aaa; --picker-border: #484848; --picker-soft: #303030; }
}
@media (max-width: 760px) {
  .mrd-top .mrd-reader-meta { display: flex; align-items: center; justify-content: center; gap: 6px; overflow: visible; }
  .mrd-reader-meta > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mrd-top .mrd-page-index { display: inline-flex; align-items: center; justify-content: center; gap: 3px; flex: 0 0 auto; width: auto; height: 26px; min-height: 26px; padding: 0 7px; border: 1px solid #ead5db; border-radius: 20px; color: #ac001e; background: #fff; font-size: 11px; }
  .mrd-page-index span { font-size: 11px; }
  .reader-page-picker { padding: 16px; }
  .reader-picker-grid { grid-template-columns: repeat(6,minmax(0,1fr)); }
  .reader-picker-heading h2 { font-size: 17px; }
  .reader-image-navigation { color: #49383e; background: #fff8f7; }
  .reader-v2.dark .reader-image-navigation { color: #49383e; background: #fff8f7; }
}

/* Catalog geometry copied from the original deployed reader; dialog retains focus/Escape semantics. */
.reader-catalog-dialog {position:fixed;inset:50% 82px auto auto;margin:0;transform:translateY(-50%);width:390px;max-width:calc(100vw - 92px);height:min(835px,calc(100dvh - 92px));max-height:none;padding:0;border-radius:0;overflow:auto;}
.reader-catalog-dialog header {min-height:58px;padding:0 18px;border-bottom:1px solid #333;gap:12px;}
.reader-catalog-dialog h2 {font-size:22px;}
.reader-catalog-dialog nav {gap:0;}
.reader-catalog-dialog nav a {display:block;min-height:48px;padding:14px 20px;}
.reader-catalog-dialog nav a[aria-current] {font-weight:700;}
@media (max-width:760px) {
 .reader-catalog-dialog {inset:auto 0 0;margin:0;transform:none;width:100%;max-width:none;height:auto;max-height:70dvh;padding-bottom:env(safe-area-inset-bottom);border:0;border-radius:20px 20px 0 0;background:#fff8f7;color:#291716;}
 .reader-catalog-dialog header {min-height:76px;padding:16px;background:#fff8f7;border:0;}
 .reader-catalog-dialog h2 {font-size:16px;}
 .reader-catalog-dialog header>span {display:none;}
 .reader-catalog-dialog button {border:0;background:transparent;color:#ac001e;}
 .reader-catalog-dialog::backdrop {background:rgba(41,23,22,.38);}
 .reader-catalog-dialog nav a {border-top:1px solid rgba(231,188,186,.35);border-bottom:0;font-size:13px;}
 .reader-catalog-dialog nav a[aria-current] {color:#ac001e;}
}

@media(min-width:761px){.reader-catalog-dialog:not(.dark),.reader-catalog-dialog:not(.dark) header{background:#fff;color:#333}.reader-catalog-dialog:not(.dark){border-color:#dadada}.reader-catalog-dialog:not(.dark) header{border-bottom-color:#e5e5e5}}

.catalog-mobile-only{display:none}
.reader-catalog-dialog::backdrop{background:rgba(0,0,0,.38)}
.reader-catalog-dialog:not(.dark)::backdrop{background:rgba(0,0,0,.18)}
@media(max-width:760px){
 .catalog-mobile-only{display:inline-flex;align-items:center;justify-content:center}
 .catalog-desktop-only{display:none}
 .reader-catalog-dialog [data-catalog-order]{display:flex;gap:2px;min-width:68px;align-items:center;justify-content:center}
 .reader-catalog-dialog [data-catalog-order] .material-symbols-outlined{font-size:19px}
 .reader-catalog-dialog [data-catalog-order] small{font-size:11px;font-weight:700}
 .reader-catalog-dialog [data-close-catalog]{width:44px;height:44px;padding:0}
 .reader-catalog-dialog::backdrop,.reader-catalog-dialog:not(.dark)::backdrop{background:rgba(41,23,22,.38)}
}
