.reader-body { min-height: 100vh; padding-bottom: 0; overflow-x: clip; background: var(--rose-soft); }
.reader-header { display: flex; min-height: 76px; align-items: center; justify-content: space-between; padding: 12px clamp(18px, 5vw, 70px); border-bottom: 1px solid var(--line); background: rgba(255,253,251,.92); }
.reader-back { color: var(--brown); font-size: 13px; font-weight: 700; text-decoration: none; }
.reader-main { width: min(1500px, calc(100% - 32px)); padding: 32px 0 50px; margin: 0 auto; }
.reader-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.reader-heading h1 { margin: 5px 0 0; font-family: var(--serif); font-size: clamp(36px, 6vw, 62px); font-weight: 600; line-height: 1; }
.reader-toolbar { position: sticky; z-index: 5; top: 10px; display: flex; max-width: 980px; min-height: 52px; align-items: center; justify-content: center; gap: 18px; padding: 10px 18px; margin: 0 auto 18px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,253,251,.94); box-shadow: 0 10px 30px rgba(90,66,56,.08); backdrop-filter: blur(14px); }
.reader-toolbar[hidden], .magazine-pages[hidden] { display: none; }
.reader-toolbar strong { font-size: 13px; }
.reader-toolbar span { color: var(--brown-muted); font-size: 12px; }
.reader-toolbar a { margin-left: auto; color: var(--brown); font-size: 12px; font-weight: 700; text-underline-offset: 3px; }
.magazine-pages { display: grid; max-width: 980px; gap: 22px; margin: 0 auto; }
.magazine-page { position: relative; display: grid; width: 100%; min-height: 300px; overflow: hidden; place-items: center; border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: 0 14px 42px rgba(90,66,56,.1); }
.magazine-page::before { position: absolute; inset: 0; display: grid; place-items: center; content: "Carregando página " attr(data-page-number) "…"; color: var(--brown-muted); font-size: 13px; }
.magazine-page.is-rendered::before { display: none; }
.magazine-page canvas { position: relative; z-index: 1; display: block; max-width: 100%; height: auto; }
.page-number { position: absolute; z-index: 2; right: 10px; bottom: 10px; padding: 5px 9px; border-radius: 999px; background: rgba(63,43,36,.82); color: white; font-size: 10px; }
.reader-loading, .reader-error { display: grid; min-height: 420px; place-items: center; border: 1px solid var(--line); border-radius: 22px; background: var(--white); color: var(--brown-muted); text-align: center; }
.reader-loading[hidden], .reader-error[hidden] { display: none; }
.reader-error h2 { margin-bottom: 5px; font-family: var(--serif); }
@media (max-width: 720px) {
  .reader-header .brand small { display: none; }
  .reader-main { width: min(100% - 16px, 1500px); padding-top: 22px; }
  .reader-heading { align-items: stretch; flex-direction: column; }
  .reader-heading .button { width: 100%; }
  .reader-toolbar { top: 6px; justify-content: space-between; gap: 8px; padding: 9px 13px; border-radius: 16px; }
  .reader-toolbar span { display: none; }
  .reader-toolbar a { margin-left: 0; }
  .magazine-pages { gap: 14px; }
  .magazine-page { min-height: 220px; border-radius: 12px; }
}
