/* Leitura em slideshow (/capitulos/<id>/ver) — "ler visualmente" com as imagens principais. */
body.slideshow-page { height: 100svh; min-height: 0; overflow: hidden; background: #0a1a1a; }
/* O Chat agrupa o conteúdo em .public-guide-page depois do carregamento. Mantemos
   o mesmo quadro de viewport tanto antes quanto depois desse agrupamento. */
body.slideshow-page .public-guide-page {
  height: 100svh;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.slideshow-main { min-height: 0; padding: 12px max(24px, calc((100vw - 1180px) / 2)) 16px; display: grid; grid-template-columns: minmax(0, 62%) minmax(180px, 1fr); grid-template-rows: minmax(320px, 1fr) auto; gap: 12px; background: #0a1a1a; color: #ece8df; }
.slideshow-main .slideshow-nav { grid-column: 1 / -1; }
.slideshow-main .slideshow-stage { justify-self: center; width: min(100%, 760px); min-height: 320px; }

.slideshow-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.slideshow-heading-copy { min-width: 0; }
.slideshow-heading .eyebrow { margin: 0 0 8px; }
.slideshow-heading h1 { margin: 0; font: 600 clamp(28px, 3.2vw, 42px) "Playfair Display", serif; }
.slideshow-mode-actions { display: flex; align-items: center; gap: 10px; }
.slideshow-mode-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  background: transparent;
  color: #c7d1cf;
  font: 600 11px "Manrope", sans-serif;
  cursor: pointer;
}
.slideshow-mode-link:hover { border-color: var(--copper); color: var(--copper-light); }
.slideshow-mode-link svg { width: 14px; height: 14px; }
.slideshow-stage-actions { position: absolute; top: 16px; right: 60px; z-index: 3; display: flex; align-items: center; gap: 8px; }
.slideshow-stage-actions .slideshow-mode-link { padding: 9px 12px; background: rgba(8, 23, 22, .72); backdrop-filter: blur(10px); }

.slideshow-stage {
  position: relative;
  width: min(100%, 760px);
  max-width: 100%;
  height: auto;
  min-height: 320px;
  aspect-ratio: 3 / 2;
  align-self: center;
  justify-self: center;
  outline: none;
}
/* A tela ampla continua disponível sob demanda, mas não é mais o estado inicial:
   desse modo a arte preserva sua proporção e não domina a leitura ao abrir. */
.slideshow-stage.is-wide { width: 100%; height: 100%; aspect-ratio: auto; align-self: stretch; justify-self: stretch; }
.slideshow-layout-toggle { position: absolute; top: 16px; right: 16px; z-index: 3; width: 36px; height: 36px; padding: 0; justify-content: center; border-radius: 50%; background: rgba(8, 23, 22, .72); backdrop-filter: blur(10px); }
.slide-frame {
  position: relative;
  height: 100%;
  min-height: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #071414;
}
.slide-image { position: absolute; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.slideshow-stage:not(.is-wide) .slide-image { object-fit: contain; }
.slide-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(6, 16, 16, .92), rgba(6, 16, 16, .1) 55%),
    radial-gradient(circle at 85% 15%, rgba(43, 99, 94, .35), transparent 45%);
}
.slide-heading-overlay {
  position: absolute;
  top: 20px;
  left: 24px;
  z-index: 2;
  max-width: 58%;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .7);
}
.slide-heading-overlay .eyebrow { margin: 0 0 6px; color: var(--copper-light); font: 600 10px "Manrope", sans-serif; letter-spacing: .1em; text-transform: uppercase; }
.slide-heading-overlay h1 { margin: 0; color: #f4f1e9; font: 600 clamp(24px, 3vw, 38px) "Playfair Display", serif; }
.slide-progress-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  padding: 2px 7px;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 6px;
  background: rgba(6, 16, 16, .85);
  color: var(--copper-light);
  font: 700 10px "Manrope", sans-serif;
  letter-spacing: .02em;
  white-space: nowrap;
  pointer-events: none;
  transform: translate(-50%, -50%);
}
.slide-copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: clamp(24px, 4vw, 52px) clamp(32px, 6vw, 88px) 24px;
  max-width: none;
}
.slide-copy small {
  display: inline-block;
  margin-bottom: 12px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  color: var(--copper-light);
  font: 600 9px "Manrope", sans-serif;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.slide-copy blockquote { max-width: none; margin: 0; padding-left: 0; border-left: 0; color: #f4f1e9; text-align: center; text-wrap: balance; font: 400 italic clamp(15px, 1.7vw, 21px)/1.4 "Playfair Display", serif; }
.slide-summary { margin: 0; color: #b9c4c1; font-size: 13px; line-height: 1.6; }

.slide-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 46px;
  height: 46px;
  margin-top: -23px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 50%;
  background: rgba(10, 24, 24, .55);
  color: #ece8df;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.slide-arrow:hover { border-color: var(--copper); background: rgba(10, 24, 24, .8); }
.slide-arrow:disabled { opacity: .3; cursor: default; }
.slide-arrow.prev { left: 16px; }
.slide-arrow.next { right: 16px; }
.slide-arrow svg { width: 20px; height: 20px; }

.slide-thumbs {
  grid-column: 2;
  grid-row: 1;
  min-height: 0;
  box-sizing: border-box;
  padding: 0 0 0 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  align-content: start;
  align-items: start;
  gap: 8px;
  overflow-x: hidden;
  overflow-y: auto;
}
.slide-thumbs button { width: 100%; max-width: 100%; height: 54px; }
.slide-thumbs button {
  position: relative;
  flex: 0 0 auto;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  opacity: .55;
  transition: opacity .16s ease, border-color .16s ease;
}
.slide-thumbs button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slide-thumbs button:hover { opacity: .85; }
.slide-thumbs button.active { opacity: 1; border-color: var(--copper); }

.slideshow-nav.reading-nav { width: 100%; max-width: none; margin: 0; padding-top: 10px; border-top-color: rgba(255, 255, 255, .1); }
.slideshow-nav.reading-nav a { color: var(--copper-light); }
.slideshow-nav.reading-nav .reading-nav-index { color: #8ba09c; }

@media (max-width: 640px) {
  .slideshow-main { grid-template-columns: minmax(0, 1fr) 68px; grid-template-rows: minmax(240px, 1fr) auto; }
  .slideshow-main .slideshow-stage { min-height: 240px; }
  .slide-thumbs { padding-left: 4px; grid-template-columns: 1fr; gap: 8px; }
  .slide-thumbs button { width: 64px; height: 44px; }
  .slide-arrow { width: 38px; height: 38px; margin-top: -19px; }
}
