/* ============================================================
   manga.css — OtakuRun "Read mode" surfaces.
   The catalog home (manga-explore.php) reuses the anime catalog's
   .ex-* styles from style.css; this file styles the manga detail
   page (.ms-*) and the reader (.mr-*), plus a couple of read-mode
   accents. Palette matches OtakuRun: near-black + chakra orange.
   ============================================================ */

:root {
  --mr-orange: #c79bff;
  --mr-orange-grad: linear-gradient(135deg, #c79bff, #a855f7);
  --mr-ink: #000;
}

/* The MANGA badge in the read-mode hero picks up the orange accent. */
body.reader-mode .ex-hero-meta-quality {
  background: rgba(168,107,255, .16) !important;
  color: #d9bcff !important;
  border-color: rgba(168,107,255, .35) !important;
}

/* ============================================================
   SERIES DETAIL (manga-series.php)
   ============================================================ */
.ms { min-height: 100vh; padding-bottom: 80px; }

.ms-hero {
  position: relative;
  padding: 90px 24px 28px;
  overflow: hidden;
}
.ms-hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: blur(34px) saturate(1.25) brightness(.5);
  transform: scale(1.18);
  opacity: .55;
  z-index: 0;
}
.ms-hero-veil {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(6,6,18,.55) 0%, rgba(6,6,18,.82) 60%, var(--mr-ink) 100%);
}
.ms-back {
  position: relative; z-index: 3;
  display: inline-flex; align-items: center; gap: 4px;
  color: rgba(255,255,255,.85); text-decoration: none;
  font-size: .85rem; font-weight: 600;
  margin-bottom: 18px;
  transition: color .15s;
}
.ms-back:hover { color: #fff; }

.ms-hero-inner {
  position: relative; z-index: 2;
  display: flex; gap: 26px; align-items: flex-end;
  max-width: 1100px; margin: 0 auto;
}
.ms-cover {
  flex: 0 0 200px; width: 200px; aspect-ratio: 11/16;
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 18px 48px rgba(0,0,0,.6);
  background: #11111f;
}
.ms-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ms-cover-skel { width: 100%; height: 100%; background: linear-gradient(110deg,#15151f 30%,#22222e 50%,#15151f 70%); }

.ms-meta { flex: 1; min-width: 0; }
.ms-title {
  font-size: clamp(1.6rem, 4vw, 2.6rem); font-weight: 800;
  line-height: 1.1; margin: 0 0 4px; color: #fff;
  letter-spacing: -.02em;
}
.ms-alt { margin: 0 0 14px; color: rgba(255,255,255,.5); font-size: .9rem; }
.ms-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.ms-badge {
  font-size: .78rem; font-weight: 600;
  padding: 4px 10px; border-radius: 8px;
  background: rgba(255,255,255,.08); color: rgba(255,255,255,.85);
  border: 1px solid rgba(255,255,255,.08);
}
.ms-badge--score { background: rgba(168,107,255,.18); color: #d9bcff; border-color: rgba(168,107,255,.3); }
.ms-genres { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.ms-genre {
  font-size: .72rem; padding: 3px 9px; border-radius: 999px;
  background: rgba(255,255,255,.05); color: rgba(255,255,255,.6);
  border: 1px solid rgba(255,255,255,.07);
}
.ms-author { margin: 0 0 18px; color: rgba(255,255,255,.55); font-size: .85rem; }

.ms-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.ms-read-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 26px; border-radius: 12px;
  background: var(--mr-orange-grad); color: #fff;
  font-weight: 700; font-size: .95rem; text-decoration: none;
  box-shadow: 0 8px 22px rgba(168,107,255,.4);
  transition: transform .15s, box-shadow .15s;
}
.ms-read-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(168,107,255,.5); }
.ms-read-btn.is-disabled { opacity: .5; pointer-events: none; filter: grayscale(.6); }
.ms-save-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 12px 20px; border-radius: 12px;
  background: rgba(255,255,255,.08); color: #fff;
  border: 1px solid rgba(255,255,255,.14);
  font-weight: 600; font-size: .9rem; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.ms-save-btn:hover { background: rgba(255,255,255,.13); }
.ms-save-btn.is-on { background: rgba(168,107,255,.18); border-color: rgba(168,107,255,.5); color: #d9bcff; }
.ms-save-btn.is-on svg { fill: #c79bff; stroke: #c79bff; }

.ms-section { max-width: 1100px; margin: 0 auto; padding: 22px 24px 0; }
.ms-synopsis { color: rgba(255,255,255,.72); line-height: 1.65; font-size: .95rem; margin: 0; max-width: 820px; }
.ms-section-title { font-size: 1.2rem; font-weight: 700; color: #fff; margin: 0; }
.ms-ch-count { color: rgba(255,255,255,.4); font-weight: 500; font-size: .95rem; }

.ms-chapters-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.ms-sort {
  background: rgba(255,255,255,.07); color: rgba(255,255,255,.8);
  border: 1px solid rgba(255,255,255,.1); border-radius: 9px;
  padding: 7px 14px; font-size: .82rem; font-weight: 600; cursor: pointer;
  transition: background .15s;
}
.ms-sort:hover { background: rgba(255,255,255,.12); }

.ms-chapters { display: flex; flex-direction: column; gap: 8px; }
.ms-ch {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px; border-radius: 11px; text-decoration: none;
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.06);
  transition: background .14s, border-color .14s, transform .14s;
}
.ms-ch:hover { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.12); transform: translateX(2px); }
.ms-ch-num { font-weight: 700; color: #fff; font-size: .92rem; flex: 0 0 auto; min-width: 110px; }
.ms-ch-num small { display: block; font-size: .66rem; font-weight: 600; color: rgba(255,255,255,.4); }
.ms-ch-info { flex: 1; min-width: 0; color: rgba(255,255,255,.6); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.ms-ch-group { font-size: .68rem; padding: 2px 7px; border-radius: 6px; background: rgba(255,255,255,.06); color: rgba(255,255,255,.5); white-space: nowrap; }
.ms-ch-pages { color: rgba(255,255,255,.4); font-size: .78rem; flex: 0 0 auto; }
.ms-ch-arrow { color: rgba(255,255,255,.3); flex: 0 0 auto; }
.ms-ch.is-read { opacity: .55; }
.ms-ch.is-read .ms-ch-num { color: #d9bcff; }
.ms-ch.is-current { background: rgba(168,107,255,.12); border-color: rgba(168,107,255,.4); }

.ms-ch-skel { height: 49px; border-radius: 11px; background: linear-gradient(110deg,#11111b 30%,#1a1a26 50%,#11111b 70%); background-size: 200% 100%; animation: msShimmer 1.3s infinite; }
@keyframes msShimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

.ms-empty { padding: 40px 16px; text-align: center; color: rgba(255,255,255,.6); }
.ms-empty p { margin: 0 0 6px; }
.ms-empty-sub { font-size: .82rem; color: rgba(255,255,255,.4); }

@media (max-width: 640px) {
  .ms-hero { padding: 78px 16px 22px; }
  .ms-hero-inner { gap: 16px; }
  .ms-cover { flex-basis: 116px; width: 116px; }
  .ms-section { padding: 18px 16px 0; }
  .ms-ch-info { display: none; }
  .ms-ch-num { min-width: 0; flex: 1; }
}

/* ============================================================
   READER (manga-read.php)
   ============================================================ */
body.mr-body { background: #000; margin: 0; }

.mr-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: linear-gradient(180deg, rgba(6,6,14,.92), rgba(6,6,14,.7) 70%, transparent);
  backdrop-filter: blur(8px);
  transition: transform .3s cubic-bezier(.22,1,.36,1);
}
.mr-bar--hidden { transform: translateY(-110%); }
.mr-bar-btn {
  flex: 0 0 auto;
  width: 40px; height: 40px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.08); color: #fff;
  border: 1px solid rgba(255,255,255,.1); cursor: pointer;
  text-decoration: none; transition: background .15s;
}
.mr-bar-btn:hover { background: rgba(255,255,255,.16); }
.mr-bar-titles { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mr-bar-title { color: #fff; font-weight: 700; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mr-bar-sub { color: var(--mr-orange); font-size: .76rem; font-weight: 600; }

.mr-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; background: rgba(255,255,255,.06); }
.mr-progress-fill { height: 100%; width: 0; background: var(--mr-orange-grad); transition: width .12s linear; }

.mr-pages {
  max-width: 860px; margin: 0 auto; padding-top: 60px;
  display: flex; flex-direction: column; align-items: center;
}
/* min-height reserves space for unloaded lazy pages so a late decode
   adds height the reader hasn't reached yet, instead of reflowing under
   an in-progress auto-scroll. */
.mr-page { width: 100%; height: auto; display: block; background: #0a0a12; min-height: 45vh; }
.mr-pages.mr-fit-orig .mr-page { min-height: 0; }
.mr-pages.mr-fit-orig .mr-page { width: auto; max-width: 100%; }

.mr-loading, .mr-error {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; min-height: 60vh; color: rgba(255,255,255,.6);
}
.mr-spinner {
  width: 38px; height: 38px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.12); border-top-color: var(--mr-orange);
  animation: mrSpin .8s linear infinite;
}
@keyframes mrSpin { to { transform: rotate(360deg); } }
.mr-error p { margin: 0; }
.mr-retry {
  margin-top: 6px; padding: 9px 20px; border-radius: 10px;
  background: var(--mr-orange-grad); color: #fff; border: 0;
  font-weight: 700; cursor: pointer; text-decoration: none; display: inline-block;
}

.mr-endcap {
  width: 100%; padding: 30px 16px 50px; text-align: center;
  color: rgba(255,255,255,.45); font-size: .88rem; font-weight: 600;
}

.mr-foot {
  position: sticky; bottom: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 860px; margin: 0 auto;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(0deg, rgba(6,6,14,.95), rgba(6,6,14,.6) 70%, transparent);
  backdrop-filter: blur(8px);
}
.mr-foot-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; border-radius: 11px;
  background: rgba(255,255,255,.1); color: #fff;
  border: 1px solid rgba(255,255,255,.12);
  font-weight: 700; font-size: .85rem; cursor: pointer;
  transition: background .15s;
}
.mr-foot-btn:hover:not(:disabled) { background: var(--mr-orange-grad); border-color: transparent; }
.mr-foot-btn:disabled { opacity: .35; cursor: default; }
.mr-foot-label { color: rgba(255,255,255,.55); font-size: .82rem; font-weight: 600; }

/* chapter drawer */
.mr-drawer-scrim { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.6); opacity: 0; transition: opacity .25s; }
.mr-drawer-scrim.is-open { opacity: 1; }
.mr-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 71;
  width: min(360px, 86vw);
  background: #0c0c16; border-left: 1px solid rgba(255,255,255,.08);
  transform: translateX(100%); transition: transform .26s cubic-bezier(.22,1,.36,1);
  display: flex; flex-direction: column;
  box-shadow: -20px 0 60px rgba(0,0,0,.55);
}
.mr-drawer.is-open { transform: translateX(0); }
.mr-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 18px 12px; border-bottom: 1px solid rgba(255,255,255,.07); }
.mr-drawer-head h3 { margin: 0; color: #fff; font-size: 1.05rem; }
.mr-drawer-close { background: none; border: 0; color: rgba(255,255,255,.6); font-size: 1.8rem; line-height: 1; cursor: pointer; }
.mr-drawer-list { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 4px; }
.mr-drawer-item {
  text-align: left; background: none; border: 0; cursor: pointer;
  padding: 11px 14px; border-radius: 9px;
  color: rgba(255,255,255,.78); font-size: .88rem; font-weight: 600;
  transition: background .14s;
}
.mr-drawer-item span { color: rgba(255,255,255,.45); font-weight: 500; }
.mr-drawer-item:hover { background: rgba(255,255,255,.07); }
.mr-drawer-item.is-current { background: rgba(168,107,255,.16); color: #d9bcff; }

/* auto-scroll control — persistent, bottom-right, above the footer nav */
.mr-autoscroll {
  position: fixed; z-index: 45;
  right: 16px; bottom: calc(78px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 8px;
}
.mr-auto-btn {
  width: 52px; height: 52px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(16,16,26,.82); color: #fff;
  border: 1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
  cursor: pointer; transition: transform .15s, background .2s, box-shadow .2s;
}
.mr-auto-btn:hover { transform: translateY(-1px); }
.mr-auto-btn:active { transform: scale(.94); }
.mr-auto-btn.is-on {
  background: var(--mr-orange-grad);
  border-color: transparent;
  box-shadow: 0 8px 26px rgba(168,107,255,.5);
}
.mr-auto-ic { display: block; }

.mr-auto-speed {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 6px; border-radius: 999px;
  background: rgba(16,16,26,.82); border: 1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
  animation: mrAutoIn .2s ease;
}
@keyframes mrAutoIn { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: none; } }
.mr-auto-spd {
  width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.08); color: #fff;
  border: 0; font-size: 1.1rem; line-height: 1; cursor: pointer;
  transition: background .15s;
}
.mr-auto-spd:hover { background: rgba(255,255,255,.18); }
.mr-auto-rate {
  min-width: 64px; text-align: center;
  color: rgba(255,255,255,.85); font-size: .76rem; font-weight: 700;
  letter-spacing: .01em; user-select: none;
}

@media (max-width: 640px) {
  .mr-pages { padding-top: 58px; }
  .mr-bar-title { font-size: .85rem; }
  .mr-autoscroll { right: 12px; bottom: calc(74px + env(safe-area-inset-bottom)); }
  .mr-auto-btn { width: 48px; height: 48px; }
}

/* ============================================================
   COVER MARQUEE (read-page hero)
   A self-scrolling rail of nothing-but-the-cover cards at the
   normal card size. The track holds two identical copies of the
   set, so a steady translateX(0 → -50%) loops seamlessly. Hover
   (or a touch) pauses it; reduce-motion users get a static,
   manually-scrollable row.
   ============================================================ */
.mx-cover-marquee {
    position: relative;
    overflow: hidden;
    width: 100%;
    margin: 0 0 8px;
    padding-top: 74px;              /* clear the fixed OtakuRun top bar */
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 4%, #000 96%, transparent 100%);
            mask-image: linear-gradient(to right, transparent 0, #000 4%, #000 96%, transparent 100%);
}
.mx-cover-track {
    display: flex;
    gap: 16px;
    width: max-content;
    will-change: transform;
    animation: mx-marquee 60s linear infinite;
}
.mx-cover-marquee:hover .mx-cover-track,
.mx-cover-marquee:focus-within .mx-cover-track { animation-play-state: paused; }

@keyframes mx-marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* Cover-only card: the normal .ex-card-lg width, just the poster — no
   title/body, no hover lift (the rail is already moving). */
.mx-cover-card { flex-shrink: 0; }
.mx-cover-card .ex-card-lg-img { aspect-ratio: 2 / 3; }
.mx-cover-card:hover { transform: none; }
.mx-cover-card:hover .ex-card-lg-img img { transform: scale(1.04); }
.mx-cover-skel .ex-card-lg-img { position: relative; }

@media (max-width: 720px) {
    .mx-cover-marquee { padding-top: 64px; }
    .mx-cover-track   { gap: 12px; }
}

/* Respect reduced motion: stop the auto-scroll, let it be swiped. */
@media (prefers-reduced-motion: reduce) {
    .mx-cover-marquee {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .mx-cover-marquee::-webkit-scrollbar { display: none; }
    .mx-cover-track { animation: none; }
}

/* ============================================================
   MANGA + COMICS — WIDER centered column (2026-06-14; Ashim chose this
   over true edge-to-edge: full-bleed left empty space on the right when a
   row was short). The base caps the explore container at 1200px and the
   detail sections at 1100px; widen to a centered 1600/1500px column so the
   pages use much more of the screen but content stays balanced (margins on
   both sides, no empty right edge). Scoped to manga + comics so the anime
   explore (explore.php) is untouched; readers (.mr-*) are untouched. */
/* NOTE: the explore-container (.ex) width rule lives in style.css instead,
   because the ANIME explore (explore.php) doesn't load manga.css. The
   detail-page (.ms) widening below stays here (manga/comics only). */
body[data-ai-context="manga"] .ms-hero-inner,
body[data-ai-context="comics"] .ms-hero-inner,
body[data-ai-context="manga"] .ms-section,
body[data-ai-context="comics"] .ms-section {
    max-width: 1500px !important; margin-left: auto !important; margin-right: auto !important;
}

/* ============================================================
   "Watch" buttons — shown on a manga ONLY when its anime adaptation
   exists in OtakuRun (api/manga-stream.php?action=anime_match). Links
   to anime.php?slug=. 2026-06-14.
   ============================================================ */
/* Detail page: a secondary action next to "Start Reading". */
.ms-watch-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 12px;
  background: rgba(255,255,255,.10); color: #fff;
  font-weight: 700; font-size: .95rem; text-decoration: none;
  border: 1px solid rgba(255,255,255,.14);
  transition: background .15s, transform .15s;
}
.ms-watch-btn:hover { background: rgba(255,255,255,.18); transform: translateY(-1px); }
.ms-watch-btn svg { flex-shrink: 0; }

/* Card: a small pill on the cover's bottom-left. */
.ex-card-watch {
  position: absolute; left: 8px; bottom: 8px; z-index: 3;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: 999px; border: 0; cursor: pointer;
  background: rgba(8,8,12,.78); color: #fff;
  font: 700 .72rem/1 system-ui, sans-serif; letter-spacing: .01em;
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 12px rgba(0,0,0,.4);
  transition: background .15s, transform .15s;
}
.ex-card-watch:hover { background: var(--mr-orange-grad, #a86bff); transform: translateY(-1px); }
.ex-card-watch svg { width: 13px; height: 13px; flex-shrink: 0; }

/* ============================================================
   SINGLE-PAGE reader (body.mr-single) — 2026-06-14 (Ashim: "only one
   page on the actual book, no more scrolling"). One page fills the
   screen; flip with the foot ‹ › buttons, tap zones, or arrow keys.
   ============================================================ */
body.mr-single { overflow: hidden; height: 100vh; }
body.mr-single .mr-pages {
    position: fixed; inset: 0; max-width: none; margin: 0; padding: 0;
    display: flex; align-items: center; justify-content: center;
    background: #0a0a0e; min-height: 0;
}
body.mr-single .mr-page {
    width: auto; height: auto; max-width: 100vw; max-height: 100vh;
    object-fit: contain; min-height: 0; background: transparent;
}
/* "fit width" mode: page spans the width (may exceed the screen height,
   the only case a single page can be taller than the viewport). */
body.mr-single .mr-pages.mr-fit-orig { align-items: flex-start; overflow-y: auto; }
body.mr-single .mr-pages.mr-fit-orig .mr-page { max-width: 100vw; width: 100vw; max-height: none; }
body.mr-single .mr-foot {
    position: fixed; left: 50%; transform: translateX(-50%); bottom: 0;
    width: min(520px, 100%); z-index: 60;
}
body.mr-single .mr-foot-home {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; flex-shrink: 0; text-decoration: none;
}

/* ============================================================
   WIDER READER PAGES (laptop+)
   The single-page reader fits portrait pages to screen HEIGHT, so on a wide
   laptop a tall page only used ~40% of the width with big empty side
   margins. Bind the default ("fit to screen") page to a tunable width
   (--mr-page-w) so it uses much more of the screen; it scrolls vertically
   if a page ends up taller than the viewport (showPage() resets scrollTop
   per page, so each page still starts at the top). The mrFit toggle's
   "fit width" mode stays full-bleed 100vw. --mr-page-w is the single knob:
   bump it toward 100vw to go wider. Laptop+ only so phones keep fit-to-screen.
   ============================================================ */
@media (any-pointer: fine), (min-width: 700px) {
  /* SCALING-PROOF GATE (2026-06-14, round 2): the previous "min-width:1024px"
     gate treated a laptop as a phone whenever Windows display-scaling (150%)
     or browser zoom dropped the CSS viewport under 1024px — a 1366/1920 panel
     reports only ~900 CSS px, so the reader stayed on the narrow fit-to-screen
     layout (and incognito didn't change OS scaling, so it looked stale too).
     Now gates on (any-pointer:fine) = "device has a mouse/trackpad" (every
     laptop/desktop, immune to scaling+zoom) OR any window ≥700px. Phones in
     portrait (coarse pointer, <700px) keep fit-to-screen. */
  /* Force the reader page to a wide centered column on laptop — in BOTH
     fit modes (default "fit to screen" AND the "fit width" toggle), with
     !important, so a saved fit preference or any cascade/specificity quirk
     can't leave it narrow. Scrolls vertically when a page is taller than the
     viewport (showPage() resets scrollTop per page).
     ZOOM-PROOF GATE (2026-06-14): the old plain "min-width:1024px" was
     silently defeated by browser zoom — at 150% zoom a 1440px laptop reports
     a 960px CSS viewport, dropping under 1024, so the reader fell back to the
     narrow fit-to-screen layout and the 1250px change "never showed up". The
     OR-clause "(min-width:700px) and (pointer:fine)" keeps firing on any real
     laptop/desktop (mouse/trackpad = fine pointer) even when zoomed in, while
     phones (coarse pointer) still keep fit-to-screen below 1024px. */
  /* THE REAL FIX (2026-06-14): the container was a vertically-centering flex
     and the page had object-fit:contain, so a PORTRAIT page got shrunk to fit
     the screen HEIGHT — visible image only ~480px wide with dead space each
     side, no matter what width we set on the element. Make the container a
     plain scroll block and size the page by WIDTH (height follows, page
     scrolls vertically like a webtoon). No object-fit, no height cap. */
  body.mr-single .mr-pages,
  body.mr-single .mr-pages.mr-fit-orig {
      display: block !important;
      overflow-y: auto !important;
      text-align: center !important;
  }
  body.mr-single .mr-page,
  body.mr-single .mr-pages.mr-fit-orig .mr-page {
      display: block !important;
      width: 100% !important;
      max-width: 100% !important;
      height: auto !important;
      max-height: none !important;
      object-fit: unset !important;
      margin: 0 auto !important;
  }
}

/* ============================================================
   MANGA PAGES = 1250px CENTERED COLUMN (Ashim picked this in the sandbox)
   The catalog (.ex) and series detail (.ms-*) had been pushed to full-bleed
   in earlier rounds, which felt too wide. Pull them back to a 1250px
   centered column. !important + loaded after style.css so this beats the
   earlier "max-width:none !important" full-width rule. Scoped to manga
   (data-ai-context="manga") so the anime explore and Comics keep theirs.
   ============================================================ */
body[data-ai-context="manga"] .ex {
    max-width: 1250px !important;
    margin-left: auto !important; margin-right: auto !important;
}
body[data-ai-context="manga"] .ms-hero-inner,
body[data-ai-context="manga"] .ms-section {
    max-width: 1250px !important;
    margin-left: auto !important; margin-right: auto !important;
}
