/* =========================================================
   O TOMO — cada avaliação é um livro
   Carrega depois de tokens.css, styles.css e gruta.css.

   Duas peças:
   1. A CAPA de couro — moldura com a imagem do jogo e o título
      logo abaixo (referência de livro infantil ilustrado), sobre
      couro com lombada e cantoneiras (referência de bíblia).
   2. O LIVRO aberto — o texto da review paginado em colunas CSS,
      virando página a página.

   Progressive enhancement: sem JS, a capa é uma capa e o texto
   aparece em fluxo linear normal. O JS promove para modo livro.
   ========================================================= */

.tomo {
  --capa-w: min(432px, 84vw);
  --lombada: 30px;
  --leaf-w: 320px;
  --leaf-gap: 72px;
  --leaf-h: 560px;
  --page: 0;
  --book-break: 900;
  --open-dur: 1.1s;
  --turn-dur: 0.52s;
  --riffle-dur: 0.82s;
  --riffle-step: 62ms;

  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter, 1rem);
}

/* Papel: as duas opções pedidas. Trocável em tempo de leitura. */
.tomo[data-paper="amarelada"] {
  --leaf-bg: var(--papel-amarelada);
  --leaf-edge: var(--papel-amarelada-borda);
  --leaf-ink: var(--papel-amarelada-tinta);
}

.tomo[data-paper="branca"] {
  --leaf-bg: var(--papel-branca);
  --leaf-edge: var(--papel-branca-borda);
  --leaf-ink: var(--papel-branca-tinta);
}

/* =========================================================
   1. A CAPA
   ========================================================= */

.tomo__stage {
  position: relative;
  display: grid;
  place-items: center;
  padding: 2.5rem 0 3rem;
  perspective: 2200px;
  perspective-origin: 65% 50%;
}

.tomo__cover {
  position: relative;
  display: block;
  width: var(--capa-w);
  height: auto;
  min-height: calc(var(--capa-w) * var(--capa-r, 1.42));
  padding: 0;
  border: 0;
  cursor: default;
  transform-style: preserve-3d;
  transform-origin: left center;
  transition: transform var(--open-dur, 0.9s) cubic-bezier(0.6, 0.02, 0.2, 1), box-shadow 0.5s var(--ease);
  border-radius: 3px 8px 8px 3px;
  background:
    /* brilho de cera vindo do alto-esquerda */
    radial-gradient(120% 90% at 22% 8%, rgba(255, 244, 214, 0.16), transparent 58%),
    /* escurecimento das bordas (couro curva) */
    linear-gradient(92deg, rgba(0, 0, 0, 0.42) 0 var(--lombada), rgba(0, 0, 0, 0.12) calc(var(--lombada) + 22px), transparent 38%, transparent 82%, rgba(0, 0, 0, 0.34) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.24), transparent 14%, transparent 84%, rgba(0, 0, 0, 0.3)),
    var(--couro-tex, var(--couro-2-tex));
  background-size: auto, auto, auto, 240px 240px;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.5),
    0 3px 0 rgba(0, 0, 0, 0.4),
    0 34px 70px rgba(0, 0, 0, 0.62);
}

.js .tomo__cover {
  cursor: pointer;
}

.js .tomo__cover[aria-disabled="true"] {
  cursor: default;
}

.js .tomo__cover:hover {
  transform: rotateY(-3deg) translateZ(6px);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.5),
    0 3px 0 rgba(0, 0, 0, 0.4),
    0 40px 84px rgba(0, 0, 0, 0.7);
}

.js .tomo__cover[aria-disabled="true"]:hover {
  transform: none;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.5),
    0 3px 0 rgba(0, 0, 0, 0.4),
    0 34px 70px rgba(0, 0, 0, 0.62);
}

.tomo__cover:focus-visible {
  outline: 2px solid var(--couro-gilt, var(--accent));
  outline-offset: 6px;
}

/* Lombada com nervos (as saliências costuradas da encadernação). */
.tomo__spine {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--lombada);
  border-radius: 3px 0 0 3px;
  background:
    repeating-linear-gradient(
      180deg,
      transparent 0 46px,
      rgba(0, 0, 0, 0.45) 46px 50px,
      rgba(255, 255, 255, 0.07) 50px 56px,
      transparent 56px 102px
    ),
    linear-gradient(90deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.1) 70%, rgba(0, 0, 0, 0.4));
  box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.5), inset 1px 0 0 rgba(255, 255, 255, 0.06);
}

/* Cabeceira: a fita colorida no topo da lombada. */
.tomo__spine::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 12px;
  background: repeating-linear-gradient(
    90deg,
    var(--couro-cabeceira, var(--accent-deep)) 0 3px,
    rgba(255, 255, 255, 0.5) 3px 6px
  );
  opacity: 0.55;
}

/* A prancha: tudo que é gravado na capa. */
.tomo__board {
  position: absolute;
  inset: 0 0 0 var(--lombada);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(1.1rem, 3.4vw, 1.9rem) clamp(1rem, 3vw, 1.6rem) clamp(1rem, 2.6vw, 1.4rem);
  gap: 0.85rem;
}

/* Filete duplo dourado, gravado a quente na borda. */
.tomo__gilt {
  position: absolute;
  inset: 12px 12px 12px 6px;
  pointer-events: none;
  border: 1px solid var(--couro-gilt, var(--accent));
  border-radius: 2px;
  opacity: 0.72;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.45),
    0 0 0 4px transparent,
    0 0 0 5px color-mix(in srgb, var(--couro-gilt, var(--accent)) 45%, transparent);
}

/* Cantoneiras de metal nos quatro cantos. */
.tomo__corner {
  position: absolute;
  width: clamp(22px, 6vw, 30px);
  height: clamp(22px, 6vw, 30px);
  color: var(--couro-gilt, var(--accent));
  opacity: 0.9;
  pointer-events: none;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.6));
}

.tomo__corner--tl { top: 7px; left: 1px; }
.tomo__corner--tr { top: 7px; right: 7px; transform: scaleX(-1); }
.tomo__corner--bl { bottom: 7px; left: 1px; transform: scaleY(-1); }
.tomo__corner--br { bottom: 7px; right: 7px; transform: scale(-1); }

/* --- A MOLDURA: onde entra a imagem do jogo --- */

.tomo__frame {
  position: relative;
  width: 100%;
  margin-top: 0.35rem;
  flex: 0 0 auto;
  align-self: stretch;
  aspect-ratio: var(--capa-janela, 3 / 4);
  overflow: hidden;
  border-radius: 2px;
  /* o "passe-partout": rebites de latão nos cantos + chapa escovada */
  background:
    radial-gradient(circle at 7px 7px, rgba(255, 248, 214, 0.85) 0 1.4px, rgba(0, 0, 0, 0.5) 1.8px 2.6px, transparent 3px),
    radial-gradient(circle at calc(100% - 7px) 7px, rgba(255, 248, 214, 0.85) 0 1.4px, rgba(0, 0, 0, 0.5) 1.8px 2.6px, transparent 3px),
    radial-gradient(circle at 7px calc(100% - 7px), rgba(255, 248, 214, 0.85) 0 1.4px, rgba(0, 0, 0, 0.5) 1.8px 2.6px, transparent 3px),
    radial-gradient(circle at calc(100% - 7px) calc(100% - 7px), rgba(255, 248, 214, 0.85) 0 1.4px, rgba(0, 0, 0, 0.5) 1.8px 2.6px, transparent 3px),
    linear-gradient(150deg, color-mix(in srgb, var(--couro-gilt, var(--accent)) 70%, #000) 0%, var(--couro-gilt, var(--accent)) 30%, color-mix(in srgb, var(--couro-gilt, var(--accent)) 45%, #000) 62%, var(--couro-gilt, var(--accent)) 100%);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -2px 3px rgba(0, 0, 0, 0.5),
    0 6px 16px rgba(0, 0, 0, 0.55);
}

/* Ornamento vetorial desenhado à mão, por cima do latão. */
.tomo__frame-art {
  position: absolute;
  inset: 2px;
  width: auto;
  height: auto;
  pointer-events: none;
  color: rgba(0, 0, 0, 0.55);
}

/* A estampa: a imagem do jogo, rebaixada dentro da moldura. */
.tomo__plate {
  position: absolute;
  inset: var(--capa-inset, 13px);
  width: auto;
  height: auto;
  max-width: none;
  object-fit: cover;
  object-position: var(--capa-focus, 50% 50%);
  border-radius: 1px;
  display: block;
  background: none;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.55);
}

.tomo__plate--contain {
  object-fit: contain;
  background: color-mix(in srgb, var(--ink) 90%, black);
}

/* Verniz sobre a estampa, para ela pertencer à capa. */
.tomo__frame::after {
  content: "";
  position: absolute;
  inset: var(--capa-inset, 13px);
  pointer-events: none;
  border-radius: 1px;
  background: linear-gradient(158deg, rgba(255, 246, 214, 0.2) 0 18%, transparent 42%);
  mix-blend-mode: soft-light;
}

/* --- TALHA: o tratamento tipográfico exclusivo da capa --- */

.talha {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  line-height: 1.06;
  text-align: center;
  text-wrap: balance;
  overflow-wrap: anywhere;
  hyphens: auto;
  /* folha de ouro repetida a cada linha, para a 3ª linha não cair no escuro */
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--couro-gilt, var(--accent)) 42%, white) 0%,
    var(--couro-gilt, var(--accent)) 46%,
    color-mix(in srgb, var(--couro-gilt, var(--accent)) 78%, white) 100%
  );
  background-size: 100% 1lh;
  background-repeat: repeat-y;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* o rebaixo: a letra foi prensada no couro antes de receber o ouro */
  -webkit-text-stroke: 0.55px rgba(0, 0, 0, 0.42);
  filter:
    drop-shadow(0 1px 0 rgba(0, 0, 0, 0.75))
    drop-shadow(0 -1px 0 rgba(255, 240, 190, 0.16))
    drop-shadow(0 6px 12px rgba(0, 0, 0, 0.45));
}

.tomo__title {
  flex: 0 0 auto;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0 clamp(0.75rem, 4vw, 2rem);
  font-size: clamp(1.05rem, 3.2vw, 1.45rem);
  margin: 0.2rem 0 0;
}

/* Filete com losango, separando título e chancela. */
.tomo__rule {
  width: 62%;
  height: 9px;
  margin-top: 0;
  flex: 0 0 auto;
  color: var(--couro-gilt, var(--accent));
  opacity: 0.8;
  background:
    linear-gradient(90deg, currentColor 0 42%, transparent 42% 58%, currentColor 58% 100%) center / 100% 1px no-repeat,
    conic-gradient(from 45deg at 50% 50%, currentColor 0 25%, transparent 0) center / 9px 9px no-repeat;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.6));
}

.tomo__imprint {
  font-family: var(--font-display);
  font-size: var(--fs-0);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--couro-gilt, var(--accent));
  opacity: 0.72;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.7);
}

/* Selo de lacre com a nota, no canto inferior direito. */
.tomo__seal {
  position: absolute;
  right: clamp(8px, 2.4vw, 14px);
  bottom: clamp(22px, 5vw, 36px);
  width: clamp(44px, 11vw, 58px);
  height: clamp(44px, 11vw, 58px);
  display: grid;
  place-items: center;
  border-radius: 50% 48% 52% 50% / 50% 52% 48% 50%;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(0.82rem, 2.2vw, 1.02rem);
  color: var(--couro-lacre-ink, #2a0d10);
  background:
    radial-gradient(60% 60% at 34% 28%, rgba(255, 255, 255, 0.4), transparent 60%),
    radial-gradient(100% 100% at 50% 50%, var(--couro-lacre, #a8323c) 0%, color-mix(in srgb, var(--couro-lacre, #a8323c) 62%, black) 70%, color-mix(in srgb, var(--couro-lacre, #a8323c) 40%, black) 100%);
  box-shadow: inset 0 -3px 6px rgba(0, 0, 0, 0.5), 0 4px 10px rgba(0, 0, 0, 0.6);
  text-shadow: 0 1px 0 rgba(255, 200, 190, 0.35);
}

html:not(.js) .tomo__hint {
  display: none;
}

.tomo__hint {
  position: absolute;
  left: 50%;
  bottom: -2.1rem;
  transform: translateX(-50%);
  font-family: var(--font-ui);
  font-size: var(--fs-0);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
  transition: opacity var(--dur-1) var(--ease);
}

/* --- Folhagem: as folhas que esvoaçam ao abrir --- */

.tomo__riffle {
  position: absolute;
  inset: 0;
  display: none;
  pointer-events: none;
  perspective: 1600px;
}

.tomo__riffle i {
  position: absolute;
  top: 6%;
  left: calc(50% - var(--capa-w) / 2 + var(--lombada));
  width: calc(var(--capa-w) - var(--lombada) - 8px);
  height: 88%;
  background: linear-gradient(90deg, var(--leaf-edge) 0 2px, var(--leaf-bg) 2px 100%);
  border-radius: 1px 5px 5px 1px;
  transform-origin: left center;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
  opacity: 0;
}

.tomo.is-opening .tomo__riffle {
  display: block;
}

.tomo.is-opening .tomo__riffle i {
  animation: folhear var(--riffle-dur, 0.82s) cubic-bezier(0.5, 0, 0.3, 1) forwards;
  animation-delay: calc(var(--i) * var(--riffle-step, 62ms));
}

@keyframes folhear {
  0% { opacity: 0; transform: rotateY(0deg); }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { opacity: 0; transform: rotateY(-172deg); }
}

/* Abertura da capa. */
.tomo.is-opening .tomo__cover,
.tomo.is-open .tomo__cover {
  transform: rotateY(-168deg) translateZ(0);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.tomo.is-opening .tomo__hint,
.tomo.is-open .tomo__hint {
  opacity: 0;
}

/* =========================================================
   2. O LIVRO ABERTO
   ========================================================= */

.tomo__reader {
  position: relative;
}

/* --- fechado (sem JS ou modo rolagem): o texto ocupa a mesma largura da imagem --- */

.tomo:not(.is-open) .review-flow,
.tomo:not(.is-open) .verdict,
.tomo:not(.is-open) .ratings,
.tomo:not(.is-open) .pros-cons,
.tomo:not(.is-open) .tags-block,
.tomo:not(.is-open) .ficha-tecnica,
.tomo:not(.is-open) .requisitos {
  max-width: var(--measure, 68ch);
}

.tomo:not(.is-open) .dialogue {
  max-width: none;
  margin: 0 0 1.75rem;
  padding: 1.65rem 1.8rem 1.75rem;
}

.tomo:not(.is-open) .dialogue p {
  margin: 0 0 1.2rem;
  font-size: 1.08rem;
  line-height: 1.75;
}

.tomo:not(.is-open) .shot {
  max-width: none;
  margin: 0 0 1.75rem;
}

.tomo:not(.is-open) .shot img {
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  object-fit: contain;
  display: block;
}

.tomo:not(.is-open) .tomo__book-ui {
  display: none;
}

/* Modo rolagem esconde o livro, mas deixa o botão de voltar visível. */
.tomo[data-modo="rolagem"] .tomo__book-ui {
  display: grid;
}

.tomo[data-modo="rolagem"] .tomo__btn:not([data-tomo-scroll]),
.tomo[data-modo="rolagem"] .tomo__count {
  display: none;
}

/* --- aberto --- */

.tomo.is-open .tomo__stage,
.tomo.is-open .tomo__riffle {
  display: none;
}

.tomo__book-ui {
  display: grid;
  gap: 0.7rem;
  margin: 0 auto 1.2rem;
  max-width: 100%;
}

.tomo__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-ui);
}

.tomo__btn {
  font-family: var(--font-ui);
  font-size: var(--fs-0);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.5rem 0.9rem;
  border-radius: 2px;
  border: 1px solid var(--line-strong);
  background: color-mix(in srgb, var(--card) 85%, transparent);
  color: var(--ink);
  cursor: pointer;
  transition: border-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease), background var(--dur-1) var(--ease);
}

.tomo__btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent-deep);
  background: var(--accent-soft);
}

.tomo__btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.tomo__count {
  font-family: var(--font-ui);
  font-size: var(--fs-0);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  min-width: 9ch;
  text-align: center;
}

/* --- A mesa: o livro aberto sobre a pedra --- */

/* Fora do modo livro a mesa não existe: o conteúdo flui normalmente. */
.tomo__spread {
  position: relative;
}

.tomo:not(.is-open) .tomo__turn,
.tomo:not(.is-open) .tomo__foot {
  display: none;
}

.tomo.is-open .tomo__spread {
  overflow: clip;
  border-radius: 3px;
  padding: clamp(1.4rem, 3vw, 2.4rem) clamp(1.2rem, 3vw, 2.2rem);
  perspective: 2400px;
  background:
    /* sujeira e fibra do papel */
    var(--tex-papel),
    /* sombra do vinco central */
    linear-gradient(90deg, transparent 46%, rgba(90, 66, 30, 0.22) 50%, transparent 54%),
    /* escurecimento das bordas do papel */
    radial-gradient(120% 130% at 50% 50%, transparent 52%, rgba(120, 92, 46, 0.26) 100%),
    var(--leaf-bg);
  background-size: 200px 200px, auto, auto, auto;
  background-blend-mode: multiply, normal, normal, normal;
  box-shadow:
    inset 0 0 0 1px var(--leaf-edge),
    inset 0 0 60px rgba(120, 92, 46, 0.2),
    0 26px 60px rgba(0, 0, 0, 0.55);
  color: var(--leaf-ink);
}

/* Espessura do miolo: as folhas empilhadas nas laterais. */
.tomo.is-open .tomo__spread::before,
.tomo.is-open .tomo__spread::after {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  width: 9px;
  pointer-events: none;
  background: repeating-linear-gradient(90deg, var(--leaf-edge) 0 1px, var(--leaf-bg) 1px 3px);
  opacity: 0.85;
}

.tomo.is-open .tomo__spread::before { left: 0; border-radius: 3px 0 0 3px; box-shadow: -3px 0 8px rgba(0, 0, 0, 0.4); }
.tomo.is-open .tomo__spread::after { right: 0; border-radius: 0 3px 3px 0; box-shadow: 3px 0 8px rgba(0, 0, 0, 0.4); }

/* --- As folhas: paginação em colunas CSS --- */

.tomo.is-open .tomo__reader {
  height: var(--leaf-h);
  column-width: var(--leaf-w);
  column-gap: var(--leaf-gap);
  column-fill: auto;
  font-family: var(--font-body);
  font-size: 1.02rem;
  line-height: 1.62;
  color: var(--leaf-ink);
  text-align: justify;
  hyphens: auto;
  transform: translateX(calc(-1 * var(--page) * (var(--leaf-w) + var(--leaf-gap))));
  transition: transform var(--turn-dur, 0.52s) cubic-bezier(0.66, 0, 0.2, 1);
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .tomo.is-open .tomo__reader {
    transition: none;
  }
}

.tomo.is-open .reveal {
  opacity: 1;
  transform: none;
}

/* O índice vira a folha de rosto do tomo: sem card, página só dele. */
.tomo.is-open .review-toc {
  position: static;
  width: auto;
  max-width: none;
  max-height: none;
  overflow: visible;
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  break-after: column;
  color: var(--leaf-ink);
  text-align: center;
}

.tomo.is-open .review-toc__title {
  color: color-mix(in srgb, var(--leaf-ink) 70%, transparent);
  margin-bottom: 1.6em;
}

.tomo.is-open .review-toc ol {
  display: grid;
  gap: 0.9em;
  padding: 0;
  list-style: none;
  counter-reset: cap;
}

.tomo.is-open .review-toc li {
  counter-increment: cap;
}

.tomo.is-open .review-toc li::before {
  content: counter(cap, upper-roman) ". ";
  font-family: var(--font-display);
  color: color-mix(in srgb, var(--leaf-ink) 55%, transparent);
}

.tomo.is-open .review-toc a {
  font-family: var(--font-body);
  font-size: 1.02rem;
  font-style: italic;
  color: var(--leaf-ink);
}

/* Capitular também na abertura do tomo, não só nos capítulos. */
.tomo.is-open .review-flow > .dialogue:first-child > p:first-child::first-letter,
.tomo.is-open .review-topic-block > .dialogue:first-of-type > p:first-child::first-letter {
  float: left;
  font-family: var(--font-display);
  font-size: 3.1em;
  line-height: 0.82;
  padding: 0.06em 0.1em 0 0;
  color: color-mix(in srgb, var(--leaf-ink) 78%, var(--accent));
}

/* Dentro do livro a prosa é prosa: nada de caixa de diálogo. */
.tomo.is-open .dialogue {
  max-width: none;
  margin: 0 0 0.9em;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.tomo.is-open .dialogue::before {
  display: none;
}

.tomo.is-open .dialogue p {
  margin: 0 0 0.75em;
  text-indent: 1.4em;
}

.tomo.is-open .dialogue p:first-child {
  text-indent: 0;
}

/* Subtítulo = novo capítulo = nova página, com ornamento e capitular. */
.tomo.is-open .review-topic-block {
  break-before: column;
}

.tomo.is-open .review-topic {
  font-family: var(--font-display);
  font-size: var(--fs-4);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  text-wrap: balance;
  color: var(--leaf-ink);
  max-width: none;
  margin: 0 0 1.2em;
  padding: 0 0 0.7em;
  border-bottom: 1px solid color-mix(in srgb, var(--leaf-ink) 28%, transparent);
}

.tomo.is-open .review-topic::before {
  content: "❦";
  display: block;
  width: auto;
  height: auto;
  background: none;
  border-radius: 0;
  font-size: 1.1rem;
  opacity: 0.6;
  margin: 0 0 0.35em;
}

/* Imagem do meio da review = prancha: uma folha, mesmo vão em toda review. */
.tomo.is-open .shot {
  break-before: column;
  break-after: column;
  break-inside: avoid;
  box-sizing: border-box;
  height: var(--leaf-h);
  max-height: var(--leaf-h);
  max-width: none;
  margin: 0;
  padding: 1.35rem 1.15rem 1.1rem;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 0.7rem;
}

.tomo.is-open .shot img {
  flex: 1 1 auto;
  width: 100%;
  height: 0;
  min-height: 0;
  max-height: none;
  object-fit: contain;
  object-position: center;
  border: 1px solid color-mix(in srgb, var(--leaf-ink) 35%, transparent);
  padding: 0;
  background: color-mix(in srgb, var(--leaf-ink) 6%, transparent);
}

.tomo.is-open .shot__caption {
  font-family: var(--font-ui);
  font-size: var(--fs-0);
  font-style: italic;
  text-align: center;
  color: color-mix(in srgb, var(--leaf-ink) 72%, transparent);
  background: none;
  padding: 0.7rem 0 0;
}

/* Blocos de fecho: cada um começa em página nova. */
.tomo.is-open .verdict,
.tomo.is-open .ratings,
.tomo.is-open .pros-cons,
.tomo.is-open .tags-block,
.tomo.is-open .ficha-tecnica,
.tomo.is-open .requisitos,
.tomo.is-open .spoiler {
  break-before: column;
  break-inside: avoid;
  max-width: none;
  margin: 0;
  background: none;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
  color: var(--leaf-ink);
}

.tomo.is-open .verdict {
  display: block;
  text-align: center;
  padding-top: 12%;
}

.tomo.is-open .verdict__score {
  font-size: var(--fs-score);
  color: color-mix(in srgb, var(--leaf-ink) 60%, var(--accent));
  margin-bottom: 0.2em;
}

.tomo.is-open .verdict__label,
.tomo.is-open .ratings__title,
.tomo.is-open .tags-block__title,
.tomo.is-open .ficha-tecnica__title,
.tomo.is-open .requisitos__title,
.tomo.is-open .pros-cons h2 {
  color: color-mix(in srgb, var(--leaf-ink) 70%, transparent);
}

.tomo.is-open .verdict__summary {
  font-style: italic;
  text-align: center;
  max-width: 30ch;
  margin: 0 auto;
}

.tomo.is-open .pros-cons {
  display: block;
}

.tomo.is-open .pros-cons > div {
  background: none;
  border: 0;
  padding: 0;
  margin-bottom: 1.4em;
  box-shadow: none;
}

.tomo.is-open .tags li,
.tomo.is-open .tags a {
  background: none;
  border: 1px solid color-mix(in srgb, var(--leaf-ink) 34%, transparent);
  color: color-mix(in srgb, var(--leaf-ink) 88%, transparent);
}

.tomo.is-open .ficha-tecnica__grid dd,
.tomo.is-open .requisitos__col dd,
.tomo.is-open .ratings__axis,
.tomo.is-open .ratings__num {
  color: var(--leaf-ink);
}

.tomo.is-open .ratings__bar {
  background: color-mix(in srgb, var(--leaf-ink) 16%, transparent);
}

.tomo.is-open .store-links a {
  background: none;
  border: 1px solid color-mix(in srgb, var(--leaf-ink) 34%, transparent);
  color: var(--leaf-ink);
}

/* --- A página que vira --- */

.tomo__turn {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 50%;
  pointer-events: none;
  transform-origin: left center;
  transform: rotateY(0deg);
  opacity: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.16) 0 3%, transparent 22%),
    var(--leaf-bg);
  box-shadow: 0 0 26px rgba(0, 0, 0, 0.35);
  backface-visibility: hidden;
}

.tomo.is-turning-next .tomo__turn {
  opacity: 1;
  animation: virarAdiante 0.52s cubic-bezier(0.66, 0, 0.2, 1) forwards;
}

.tomo.is-turning-prev .tomo__turn {
  opacity: 1;
  right: auto;
  left: 0;
  transform-origin: right center;
  animation: virarAtras 0.52s cubic-bezier(0.66, 0, 0.2, 1) forwards;
}

@keyframes virarAdiante {
  from { transform: rotateY(0deg); }
  to { transform: rotateY(-176deg); }
}

@keyframes virarAtras {
  from { transform: rotateY(0deg); }
  to { transform: rotateY(176deg); }
}

@media (prefers-reduced-motion: reduce) {
  .tomo.is-turning-next .tomo__turn,
  .tomo.is-turning-prev .tomo__turn {
    animation: none;
    opacity: 0;
  }
  .tomo.is-opening .tomo__cover,
  .tomo.is-open .tomo__cover,
  .tomo.is-opening .tomo__riffle i {
    transition: none;
    animation: none;
  }
}

/* --- Nota de rodapé da mesa --- */

.tomo__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-ui);
  font-size: var(--fs-0);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-top: 0.6rem;
}

/* =========================================================
   2b. Provador de couros (/couros.html)
   ========================================================= */

.couros-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.4rem;
  margin-top: 1.6rem;
}

.couro-amostra {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.couro-amostra__capa {
  --lombada: 30px;
  position: relative;
  aspect-ratio: 1 / var(--capa-r, 1.42);
  border-radius: 3px 7px 7px 3px;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 22% 8%, rgba(255, 244, 214, 0.16), transparent 58%),
    linear-gradient(92deg, rgba(0, 0, 0, 0.42) 0 var(--lombada), rgba(0, 0, 0, 0.12) calc(var(--lombada) + 22px), transparent 38%, transparent 82%, rgba(0, 0, 0, 0.34) 100%),
    var(--couro-tex);
  background-size: auto, auto, 240px 240px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5), 0 18px 40px rgba(0, 0, 0, 0.55);
}

.couro-amostra__capa::before {
  content: "";
  position: absolute;
  inset: 12px 12px 12px calc(var(--lombada) + 6px);
  border: 1px solid var(--couro-gilt);
  border-radius: 2px;
  opacity: 0.72;
  box-shadow: 0 0 0 4px transparent, 0 0 0 5px color-mix(in srgb, var(--couro-gilt) 45%, transparent);
}

.couro-amostra__capa::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--lombada);
  background:
    repeating-linear-gradient(
      180deg,
      transparent 0 46px,
      rgba(0, 0, 0, 0.45) 46px 50px,
      rgba(255, 255, 255, 0.07) 50px 56px,
      transparent 56px 102px
    ),
    linear-gradient(90deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.1) 70%, rgba(0, 0, 0, 0.4));
}

.couro-amostra__num {
  position: absolute;
  inset: auto 0 34% var(--lombada);
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.4rem;
  color: var(--couro-gilt);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.7);
}

.couro-amostra__nome {
  font-family: var(--font-display);
  font-size: 1.06rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0;
}

.couro-amostra__desc {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin: 0;
}

.couro-amostra code {
  display: block;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: var(--fs-0);
  padding: 0.5rem 0.65rem;
  border: 1px dashed var(--line-strong);
  border-radius: 2px;
  color: var(--accent-deep);
  background: color-mix(in srgb, var(--paper-deep) 70%, transparent);
  overflow-x: auto;
}

/* =========================================================
   3. Telas estreitas: uma folha por vez
   ========================================================= */

@media (max-width: 900px) {
  .tomo {
    padding: 0 0.8rem;
  }
  .tomo.is-open .tomo__spread::before,
  .tomo.is-open .tomo__spread::after {
    display: none;
  }
  .tomo.is-open .tomo__spread {
    background-image: var(--tex-papel), radial-gradient(120% 130% at 50% 50%, transparent 52%, rgba(120, 92, 46, 0.26) 100%);
    background-size: 200px 200px, auto;
  }
  .tomo__turn {
    width: 100%;
  }
  .tomo.is-open .tomo__reader {
    text-align: left;
  }
}

/* =========================================================
   4. Impressão: sempre linear, nunca paginado por nós
   ========================================================= */

@media print {
  .tomo__stage,
  .tomo__book-ui,
  .tomo__turn {
    display: none !important;
  }
  .tomo.is-open .tomo__reader {
    height: auto !important;
    column-width: auto !important;
    columns: auto !important;
    transform: none !important;
  }
  .tomo__spread {
    background: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }
}
