/* ═══ AceToon — reader (loads AFTER home.css) ═══
   Extraído del preview Nuevo_theme_acetoon/reader.html.
   "The projection room": el único sitio que rompe --bg para negro puro. */

body {
  background: #000;
  padding-bottom: 0;
}

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── reading progress, 2px ── */
.rprog {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 600;
  background: rgba(255, 255, 255, .08);
  pointer-events: none;
}

.rprog-fill {
  height: 100%;
  background: var(--green);
  transform-origin: 0 50%;
  transform: scaleX(0);
}

/* ── top bar (auto-hide) ── */
.rtop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  background: rgba(0, 0, 0, .88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  transition: transform .28s cubic-bezier(.4, 0, .2, 1);
}

.rtop.hide {
  transform: translateY(-100%);
}

.rbtn {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: none;
  border: none;
  color: var(--grey);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color .15s, background .15s;
}

.rbtn:hover,
.rbtn:focus-visible {
  color: var(--white);
  background: rgba(255, 255, 255, .08);
}

.rbtn.disabled {
  opacity: .3;
  pointer-events: none;
}

.rbtn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rtop-title {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rtop-title .chno {
  color: var(--green);
  font-weight: 800;
}

.rtop-title small {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: var(--grey);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── pages ── */
.pages {
  max-width: 800px;
  margin: 0 auto;
  padding-top: 56px;
}

.pages img {
  width: 100%;
  height: auto;
  background: var(--bg2);
}

/* Placeholder mientras el lazy-loader no ha puesto el src real: las páginas
   de manga no tienen alto conocido, así que reservamos proporción de página. */
.pages img:not([src]) {
  aspect-ratio: 2 / 3;
}

/* ── estado vacío (capítulo aún sin páginas) ── */
.rempty {
  max-width: 520px;
  margin: 0 auto;
  padding: 120px 18px 90px;
  text-align: center;
  color: var(--grey);
}

.rempty-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 26px;
  letter-spacing: 1.5px;
  color: var(--white);
  margin-bottom: 8px;
}

.rempty p {
  font-size: 12px;
  line-height: 1.7;
}

/* ── bottom controls (auto-hide) ── */
.rctl {
  position: fixed;
  bottom: 18px;
  left: 50%;
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px;
  background: rgba(0, 0, 0, .88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 16px;
  box-shadow: 0 10px 34px rgba(0, 0, 0, .7);
  transform: translateX(-50%);
  transition: transform .28s cubic-bezier(.4, 0, .2, 1), opacity .28s;
}

.rctl.hide {
  transform: translateX(-50%) translateY(120px);
  opacity: 0;
  pointer-events: none;
}

.rctl .rbtn {
  border-radius: 11px;
}

.rctl-ch {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 17px;
  letter-spacing: 1.5px;
  color: var(--white);
  border-left: 1px solid rgba(255, 255, 255, .1);
  border-right: 1px solid rgba(255, 255, 255, .1);
  margin: 0 2px;
  white-space: nowrap;
}

.rctl-ch span {
  color: var(--green);
  margin-right: 6px;
}

/* ── chapter drawer ── */
.drawer-veil {
  position: fixed;
  inset: 0;
  z-index: 700;
  background: rgba(0, 0, 0, .6);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}

.drawer-veil.open {
  opacity: 1;
  pointer-events: all;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 710;
  width: min(320px, 88vw);
  background: var(--bg2);
  border-left: 1px solid var(--border);
  transform: translateX(102%);
  transition: transform .32s cubic-bezier(.32, .72, 0, 1);
  display: flex;
  flex-direction: column;
}

.drawer.open {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 8px 14px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.drawer-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  letter-spacing: 1.5px;
}

.drawer-list {
  overflow-y: auto;
  flex: 1;
  padding: 8px;
  scrollbar-width: thin;
}

.dch {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 4px 10px;
  border-radius: 8px;
  transition: background .12s;
}

.dch:hover,
.dch:focus-visible {
  background: rgba(255, 255, 255, .06);
}

.dch-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 19px;
  color: var(--grey);
  min-width: 32px;
  text-align: center;
  flex-shrink: 0;
}

.dch-name {
  flex: 1;
  min-width: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--grey);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dch-read {
  width: 14px;
  height: 14px;
  stroke: var(--green);
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.dch.active {
  background: var(--green-lo);
  border: 1px solid var(--green-md);
}

.dch.active .dch-num,
.dch.active .dch-name {
  color: var(--green);
}

/* ── end of chapter ── */
.rend {
  max-width: 800px;
  margin: 0 auto;
  padding: 44px 18px 90px;
  text-align: center;
}

.rend-fin {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 4px;
  color: var(--grey);
  text-transform: uppercase;
}

.rend-line {
  width: 44px;
  height: 2px;
  background: var(--green);
  margin: 16px auto 26px;
}

/* SIGNATURE — the next number, projected on the black wall */
.rend-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 168px;
  line-height: .85;
  color: transparent;
  -webkit-text-stroke: 3px var(--green);
  user-select: none;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s cubic-bezier(.22, 1, .36, 1);
}

.rend-num.in {
  opacity: 1;
  transform: translateY(0);
}

.rend-up-next {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--green);
  text-transform: uppercase;
  margin: 10px 0 22px;
}

.next-card {
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
  background: var(--green);
  color: #000;
  border-radius: 14px;
  padding: 14px;
  max-width: 520px;
  margin: 0 auto;
  box-shadow: 0 12px 40px var(--green-md);
  transition: transform .18s, box-shadow .18s;
}

.next-card:hover,
.next-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 52px var(--green-md);
}

.next-card img {
  width: 64px;
  height: 88px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(0, 0, 0, .2);
}

.next-card-info {
  flex: 1;
  min-width: 0;
}

.next-card-lbl {
  display: block;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: .65;
  margin-bottom: 4px;
}

.next-card-title {
  display: block;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 26px;
  line-height: .95;
  letter-spacing: 1px;
}

.next-card-meta {
  display: block;
  font-size: 10px;
  font-weight: 700;
  opacity: .7;
  margin-top: 5px;
}

.next-card>svg {
  width: 22px;
  height: 22px;
  stroke: #000;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* serie terminada: no hay siguiente capítulo */
.rend-last {
  max-width: 520px;
  margin: 0 auto;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  font-size: 12px;
  color: var(--grey);
  line-height: 1.7;
}

.rend-last .btn-outline {
  display: inline-flex;
  margin-top: 12px;
  min-height: 44px;
}

/* end-of-chapter comments */
.rend-cmts {
  max-width: 520px;
  margin: 44px auto 0;
  text-align: left;
}

.rend-cmts-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 14px;
}

.rend-cmts-title span {
  color: var(--green);
}

.rcmt {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.rcmt-ava {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
}

.ava-a {
  background: var(--green-lo);
  color: var(--green);
  border: 1px solid var(--green-md);
}

.ava-b {
  background: rgba(255, 255, 255, .1);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, .16);
}

.ava-c {
  background: var(--bg4);
  color: var(--grey);
  border: 1px solid var(--border);
}

.rcmt-body {
  flex: 1;
  min-width: 0;
}

.rcmt-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 3px;
}

.rcmt-name {
  font-size: 12px;
  font-weight: 800;
  color: var(--white);
}

.rcmt-time {
  font-size: 10px;
  color: var(--grey);
}

.rcmt-text {
  font-size: 12px;
  line-height: 1.7;
  color: var(--grey);
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.rcmt-empty {
  font-size: 12px;
  color: var(--muted);
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.rend-all {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 44px;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--green);
  letter-spacing: .5px;
}

.rend-all:hover {
  opacity: .8;
}

.rend-all svg {
  width: 13px;
  height: 13px;
  stroke: var(--green);
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rend-top {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 40px;
  min-height: 46px;
  padding: 0 20px;
  background: none;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 10px;
  color: var(--grey);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: border-color .15s, color .15s;
}

.rend-top:hover,
.rend-top:focus-visible {
  border-color: var(--green);
  color: var(--white);
}

.rend-top svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (min-width:640px) {
  .rend-num {
    font-size: 230px;
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .rend-num {
    opacity: 1;
    transform: none;
  }
}
