/* Libro da sfogliare (StPageFlip) */
.book-zone { position: relative; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.book-stage { position: relative; width: 100%; display: flex; justify-content: center; }
/* in home, sul telefono: un tocco sul fumetto apre il lettore a schermo intero (lì il dito sfoglia senza far scorrere la pagina) */
.b-open { display: none; }
@media (hover: none), (max-width: 760px) {
  .b-open { display: flex; position: absolute; inset: 0; z-index: 5; align-items: flex-end; justify-content: center; padding-bottom: 18px; text-decoration: none; touch-action: pan-y; -webkit-tap-highlight-color: transparent; }
  .book-stage:has(.b-open) .cov .ct, .book-zone:has(.b-open) .b-hint { display: none; }
  .b-open span { background: rgba(0,0,0,.82); border: 1px solid var(--gold); color: var(--gold); font: 500 13px/1 var(--body); letter-spacing: .12em; padding: 12px 18px; border-radius: 2px; }
}
.book { margin: 0 auto; filter: drop-shadow(0 30px 50px rgba(0,0,0,.7)); }
/* verso manga: il libro è specchiato, il contenuto delle pagine no */
.book.rtl { transform: scaleX(-1); }
.book.rtl .page > * { transform: scaleX(-1); }
.book .page { background: #f3eee3; overflow: hidden; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.book .page img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; -webkit-user-drag: none; opacity: 0; transition: opacity .3s; background: #f3eee3; }
.book .page img.ok { opacity: 1; }
.book .page.hard { background: #0b0a08; }
.book .cov { position: relative; width: 100%; height: 100%; background: #070707; }
.book .cov img { opacity: 1; object-fit: cover; }
.book .cov .ct { position: absolute; inset: auto 0 0 0; padding: 24px 18px 22px; text-align: center; background: linear-gradient(transparent, rgba(0,0,0,.92) 45%); }
.book .cov .ct b { display: block; font: 400 clamp(26px, 6vw, 46px)/1 var(--display); letter-spacing: .2em; text-indent: .2em; color: var(--gold); }
.book .cov .ct span { display: block; font: 600 15px/1.4 var(--mincho); color: var(--paper); margin-top: 8px; }
.book .cov .ct i { display: block; font: 500 10px/1 var(--display); letter-spacing: .3em; color: var(--gold); margin-top: 10px; font-style: normal; }
.book .wipp { width: 100%; height: 100%; display: grid; place-items: center; align-content: center; gap: 8px; text-align: center; background: repeating-linear-gradient(135deg, #efe9dc 0 12px, #e9e2d3 12px 24px); color: #6b6455; }
.book .wipp .nn { font: 400 64px/1 var(--display); color: rgba(150,118,50,.55); }
.book .wipp .lb { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; }
.book .endp { width: 100%; height: 100%; display: grid; place-items: center; text-align: center; padding: 22px; background: #070707; color: var(--paper); }
.book .endp .fin { font: 600 26px/1.3 var(--mincho); color: var(--gold); }
.book .endp hr { width: 46px; height: 2px; border: 0; background: var(--red); margin: 18px auto; }
.book .endp p { color: var(--mute); font-size: 14px; }

.b-ctrl { display: flex; align-items: center; gap: 12px; width: min(520px, 100%); }
.b-nav { background: none; border: 1px solid var(--line); color: var(--gold); width: 44px; height: 38px; border-radius: 2px; font-size: 18px; cursor: pointer; flex: none; }
.b-nav:hover { border-color: var(--gold); }
.b-prog { flex: 1; height: 3px; background: rgba(201,162,74,.15); position: relative; direction: rtl; border-radius: 2px; }
.b-prog i { position: absolute; inset-block: 0; inset-inline-start: 0; width: 0; background: var(--gold); border-radius: 2px; transition: width .3s; }
.b-count { font: 500 13px/1 var(--display); letter-spacing: .08em; min-width: 76px; text-align: center; }
.b-hint { display: flex; align-items: center; gap: 10px; color: var(--mute); font-size: 13px; transition: opacity .4s; }
.b-hint.gone { opacity: 0; }
.b-hint .hand { display: inline-block; animation: swipe 1.8s ease-in-out infinite; color: var(--gold); font-size: 18px; }
@keyframes swipe { 0%, 100% { transform: translateX(-10px); opacity: .3; } 50% { transform: translateX(12px); opacity: 1; } }

/* Lettore a schermo intero */
html:has(body.reader) { height: 100%; overflow: hidden; }
body.reader { height: 100%; overflow: hidden; background: radial-gradient(ellipse at 50% 40%, #17140f, #000 70%); }
/* dentro il fumetto la pagina non scorre: il dito sfoglia e basta; si esce con la freccia o con "indietro" */
html:has(body.reader) { overscroll-behavior: none; }
body.reader { position: fixed; inset: 0; width: 100%; overscroll-behavior: none; touch-action: none; -webkit-user-select: none; user-select: none; }
body.reader .transcript { touch-action: pan-y; overscroll-behavior: contain; -webkit-user-select: text; user-select: text; }
body.reader .r-top { position: fixed; top: 0; inset-inline: 0; z-index: 40; height: 52px; display: flex; align-items: center; gap: 14px; padding: 0 14px; background: rgba(0,0,0,.8); border-bottom: 1px solid var(--line); }
.r-back { flex: none; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: #000; background: var(--gold); font: 600 13px/1 var(--body); letter-spacing: .06em; padding: 10px 12px; border-radius: 2px; }
.r-back span { font-size: 16px; }
.r-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.r-title b { color: var(--gold); font-weight: 600; margin-inline-end: 8px; letter-spacing: .1em; }
.r-banner { position: fixed; top: 52px; inset-inline: 0; z-index: 9; background: var(--red); color: #fff; font-size: 11px; letter-spacing: .1em; text-align: center; padding: 4px; }
body.reader .book-zone { position: fixed; inset: 64px 0 0 0; justify-content: center; padding: 0 8px calc(10px + env(safe-area-inset-bottom)); }

.book .guide { width: 100%; height: 100%; display: grid; place-items: center; align-content: center; gap: 14px; text-align: center; padding: 28px; background: #070707; color: var(--paper); }
.book .guide .arw { font: 400 64px/1 var(--display); color: var(--gold); animation: swipe 1.8s ease-in-out infinite; }
.book .guide b { font: 600 20px/1.4 var(--mincho); color: var(--gold); }
.book .guide span { color: var(--mute); font-size: 13px; max-width: 22em; }
.book .blankp { width: 100%; height: 100%; background: #f3eee3; }

/* Trascrizione del capitolo: sempre nel DOM (la leggono Google e le AI), visibile col pulsante "Testo" */
.tr-btn { position: fixed; top: 9px; right: 168px; z-index: 12; background: rgba(0,0,0,.6); border: 1px solid var(--line); color: var(--gold); font: 500 12px/1 var(--body); letter-spacing: .1em; padding: 9px 12px; cursor: pointer; border-radius: 2px; }
.transcript { position: fixed; inset: 0 0 0 auto; width: min(460px, 100%); z-index: 20; background: rgba(7,7,7,.97); border-left: 1px solid var(--line); transform: translateX(100%); transition: transform .3s; overflow-y: auto; }
.transcript.open { transform: none; }
.tr-in { padding: 26px 24px 60px; }
.tr-in h2 { font: 500 18px/1.2 var(--display); letter-spacing: .18em; text-transform: uppercase; color: var(--gold); margin: 0 0 6px; }
html[lang="ja"] .tr-in h2 { font-family: var(--mincho); }
.tr-note { color: var(--mute); font-size: 13px; margin: 0 0 18px; }
.tr-x { position: absolute; top: 14px; right: 14px; background: none; border: 1px solid var(--line); color: var(--gold); width: 34px; height: 34px; font-size: 20px; cursor: pointer; }
.tr-page { border-top: 1px solid var(--line); padding: 12px 0; }
.tr-page h3 { font: 500 11px/1 var(--display); letter-spacing: .22em; text-transform: uppercase; color: var(--mute); margin: 0 0 8px; }
.tr-page p { margin: 0 0 8px; font-size: 15px; line-height: 1.6; }
.tr-page p b { color: var(--gold); margin-inline-end: 8px; font-weight: 600; }
.tr-cap span { font-style: italic; color: #d9d1bf; }
.tr-sfx span { font: 700 13px var(--display); letter-spacing: .12em; color: var(--red); }
.tr-sign span { font: 500 13px var(--display); letter-spacing: .08em; color: var(--gold-hi); border: 1px solid var(--line); padding: 2px 6px; }
.tr-page ruby rt { font-size: 9px; color: var(--mute); }
@media (max-width: 640px) { .tr-btn { top: 92px; right: 12px; } }

/* Doppie pagine sul telefono: una schermata sola con l'immagine intera (le metà restano per il computer) */
.book .page.spread { background: #070707; }
.book .page.spread img { background: #070707; }
.book .sp-rot { position: absolute; left: 0; right: 0; bottom: 14%; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--gold); font-size: 13px; letter-spacing: .04em; text-align: center; pointer-events: none; animation: sp-rot 3s ease forwards; }
.book .sp-rot span { font-size: 30px; line-height: 1; animation: sp-spin 1.2s ease-in-out 2; }
@keyframes sp-rot { 0%, 75% { opacity: 1; } 100% { opacity: 0; } }
@keyframes sp-spin { 0% { transform: rotate(0); } 60%, 100% { transform: rotate(90deg); } }
.sp-zoom { position: fixed; inset: 0; z-index: 100; background: #000; overflow: auto; touch-action: pan-x pan-y pinch-zoom; overscroll-behavior: contain; }
.sp-zoom img { display: block; height: 100%; width: auto; max-width: none; }
@media (orientation: landscape) { .sp-zoom img { width: 100%; height: 100%; object-fit: contain; } }
.sp-x { position: fixed; top: calc(10px + env(safe-area-inset-top)); right: 10px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--gold); background: rgba(0,0,0,.7); color: var(--gold); font-size: 24px; line-height: 1; }

/* Fine capitolo: pulsante per il capitolo dopo */
.book .endp-go { display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; padding: 14px 20px; background: var(--gold); color: #000; text-decoration: none; font: 600 15px/1.2 var(--body); letter-spacing: .04em; border-radius: 2px; }
.book .endp small { display: block; margin-top: 10px; color: var(--paper); font: 600 14px/1.4 var(--mincho); }
.book .endp small.endp-tap { color: var(--mute); font: 400 12px/1.4 var(--body); }
.book .endp-more { display: flex; gap: 16px; justify-content: center; margin-top: 22px; flex-wrap: wrap; }
.book .endp-more a { color: var(--gold); font-size: 13px; text-decoration: none; border-bottom: 1px solid rgba(201,162,74,.4); padding-bottom: 2px; }
/* Menu dei capitoli nell'intestazione del lettore */
.r-chap { position: relative; overflow: visible; }
.r-chap summary { list-style: none; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-chap summary::-webkit-details-marker { display: none; }
.r-caret { color: var(--gold); margin-inline-start: 4px; }
.r-menu { position: absolute; top: calc(100% + 14px); inset-inline-start: 0; min-width: 240px; max-width: calc(100vw - 28px); background: #0b0a08; border: 1px solid var(--gold); display: flex; flex-direction: column; z-index: 20; }
.r-menu a { padding: 14px 16px; color: var(--paper); text-decoration: none; border-top: 1px solid var(--line); white-space: normal; }
.r-menu a:first-child { border-top: 0; }
.r-menu a[aria-current] { color: var(--gold); }
.r-menu a.r-all { color: var(--gold); font-size: 13px; }
