/* CHL:PUBLISHING Round 3 (T9) — the three Sequential Art Designs.
 *
 * SEPARATION LAW: everything here is presentation. No rule in this file can
 * change which pages exist, their order, their alt text or the reading
 * direction — those are content, decided server-side and rendered identically
 * under all three Designs. What a Design changes is the furniture: how much of
 * it there is, how big the controls are, and how much context stays on screen.
 *
 * All three are scoped under .seqd so nothing can leak into another format's
 * reader, and all three are mobile-first.
 */

.seqd { --seqd-gap: 14px; }

/* Shared: the stage never lets a page overflow the viewport on a phone. */
.seqd .pubfmt-seq-stage { padding: 10px; }
.seqd .pubfmt-seq-stage img { max-height: 78vh; width: auto; max-width: 100%; }
.seqd .pubfmt-seq-bar { gap: var(--seqd-gap); flex-wrap: wrap; }

/* ── 1. CLEAN READER ──────────────────────────────────────────────────────
   Distraction-free. The page is the interface: chrome is dimmed until the
   reader goes looking for it. */
.seqd-clean { background: #0c0a09; }
.seqd-clean .pubfmt-title,
.seqd-clean .pubfmt-eyebrow,
.seqd-clean .pubfmt-eyebrow a { color: #a8a29e; }
.seqd-clean .pubfmt-title { font-size: 16px !important; font-weight: 500; }
.seqd-clean .pubfmt-seq-stage { background: #0c0a09; padding: 4px; }
.seqd-clean .pubfmt-seq-stage img { max-height: 88vh; }
.seqd-clean .pubfmt-seq-btn {
    background: transparent; border-color: #292524; color: #a8a29e;
    opacity: .55; transition: opacity .15s ease;
}
.seqd-clean .pubfmt-seq-btn:hover,
.seqd-clean .pubfmt-seq-btn:focus-visible { opacity: 1; color: #fafaf9; }
.seqd-clean .pubfmt-seq-count { color: #78716c; }
.seqd-clean .pubfmt-seq-caption { color: #78716c; }

/* ── 2. MANGA READER ──────────────────────────────────────────────────────
   Right-to-left aware, with controls big enough for thumbs and a jump strip.
   ⛔ The mirroring below is VISUAL ONLY: the links are emitted in story order
      and `flex-direction: row-reverse` flips where they sit, so page 1 is
      where a right-to-left reader's eye starts. The sequence is untouched. */
.seqd-manga { background: #111827; }
.seqd-manga .pubfmt-title,
.seqd-manga .pubfmt-eyebrow a { color: #e5e7eb; }
.seqd-manga .pubfmt-seq-stage { background: #111827; }
.seqd-manga .pubfmt-seq-btn {
    background: #1f2937; border-color: #374151; color: #f9fafb;
    min-height: 52px; min-width: 112px; font-size: 16px;
    display: inline-flex; align-items: center; justify-content: center;
}
.seqd-manga .pubfmt-seq-btn[rel="next"] { background: #7c3aed; border-color: #7c3aed; }
.seqd-manga .pubfmt-seq-count { color: #9ca3af; font-size: 15px; }

.seqd-manga .seqd-jump {
    display: flex; flex-wrap: wrap; gap: 6px; justify-content: center;
    max-width: 1100px; margin: 14px auto 0;
}
[dir="rtl"] .seqd-manga .seqd-jump,
.seqd-manga[dir="rtl"] .seqd-jump { flex-direction: row-reverse; }
.seqd-manga .seqd-jump-pip {
    min-width: 34px; min-height: 34px; display: inline-flex;
    align-items: center; justify-content: center;
    border-radius: 6px; background: #1f2937; color: #9ca3af;
    text-decoration: none; font-size: 13px; font-variant-numeric: tabular-nums;
}
.seqd-manga .seqd-jump-pip:hover { background: #374151; color: #f9fafb; }
.seqd-manga .seqd-jump-pip.is-current { background: #7c3aed; color: #fff; font-weight: 700; }

/* ── 3. GRAPHIC EDITION ───────────────────────────────────────────────────
   Editorial framing: the cover, the series and the issue stay with you. */
.seqd-edition { background: #faf9f8; }
.seqd-edition .pubfmt-seq-stage {
    background: #ffffff; border: 1px solid #e7e5e4; border-radius: 12px;
}
.seqd-edition .pubfmt-seq-stage img { max-height: 72vh; }
.seqd-edition .pubfmt-seq-btn { background: #fff; border-color: #d6d3d1; }

.seqd-edition-rail {
    display: flex; gap: 16px; align-items: center;
    max-width: 1100px; margin: 0 auto 18px;
    padding: 14px; border: 1px solid #e7e5e4; border-radius: 12px; background: #fff;
}
.seqd-edition-cover {
    width: 68px; height: 96px; object-fit: cover; border-radius: 6px; flex: 0 0 68px;
}
.seqd-edition-series { margin: 0; font-weight: 700; font-size: 16px; color: #1c1917; }
.seqd-edition-issue { margin: 2px 0 0; font-size: 13px; color: #6d28d9; font-weight: 600; }
.seqd-edition-progress {
    margin: 6px 0 0; font-size: 12px; color: #78716c; font-variant-numeric: tabular-nums;
}

/* ── mobile ───────────────────────────────────────────────────────────────
   Phones are where comics are read. Controls stay reachable and nothing
   overflows horizontally at 360px. */
@media (max-width: 640px) {
    .seqd .pubfmt-seq-stage img { max-height: 68vh; }
    .seqd .pubfmt-seq-bar { gap: 8px; }
    .seqd .pubfmt-seq-count { order: 3; width: 100%; text-align: center; }

    .seqd-manga .pubfmt-seq-btn { flex: 1 1 42%; min-width: 0; min-height: 56px; }
    .seqd-manga .seqd-jump-pip { min-width: 40px; min-height: 40px; }

    .seqd-edition-rail { flex-wrap: wrap; gap: 12px; padding: 12px; }
    .seqd-edition-cover { width: 54px; height: 76px; flex: 0 0 54px; }

    .seqd-clean .pubfmt-seq-btn { opacity: 1; }   /* no hover on a phone */
}
