/* ==========================================================
   NAVEGANDO NA HISTÓRIA — estilo do site 3D
   Céu ultramar, nuvens em retícula e papel de gravura.
========================================================== */

:root {
    color-scheme: light;

    --ceu: #1f5fe6;
    --ceu-alto: #0f3fbf;
    --ceu-baixo: #6d9cf0;
    --ceu-fundo: #0b2a86;
    --nuvem: #f7f9ff;
    --marfim: #f2ede2;
    --marfim-2: #e6dfcf;
    --papel: #fbf8f1;
    --tinta: #1b1a2e;
    --tinta-2: #55536a;
    --linha: rgba(27, 26, 46, 0.16);
    --ouro: #d9b25a;
    --ouro-claro: #ffe3a3;
    --vermelho: #b3262f;

    --fonte-titulo: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
    --fonte-script: "Pinyon Script", "Snell Roundhand", "Segoe Script", cursive;
    --fonte-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

    --margem: clamp(16px, 5vw, 72px);
    --topo-altura: 64px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: auto;
}

body {
    margin: 0;
    background: var(--ceu);
    color: var(--nuvem);
    font-family: var(--fonte-titulo);
    font-size: 17px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
}

button {
    font: inherit;
    color: inherit;
}

[hidden] {
    display: none !important;
}

:focus-visible {
    outline: 2px solid var(--ouro);
    outline-offset: 3px;
}

.visualmente-oculto {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.pular {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 50;
    padding: 10px 14px;
    background: var(--marfim);
    color: var(--tinta);
    font-family: var(--fonte-mono);
    font-size: 12px;
    transform: translateY(-160%);
}

.pular:focus {
    transform: none;
}

/* ---------- tipografia comum ---------- */

.rotulo {
    margin: 0;
    font-family: var(--fonte-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

h1,
h2,
h3 {
    margin: 0;
    font-family: var(--fonte-titulo);
    font-weight: 300;
    text-wrap: balance;
}

h1 em,
h2 em {
    font-family: var(--fonte-script);
    font-style: normal;
    font-weight: 400;
    font-size: 1.12em;
    line-height: 0.8;
    letter-spacing: 0;
    color: var(--ouro-claro);
    padding-right: 0.06em;
}

/* ---------- topo ---------- */

.topo {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 8;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: var(--topo-altura);
    padding: env(safe-area-inset-top, 0px) var(--margem) 0;
    color: var(--nuvem);
    background: linear-gradient(to bottom, rgba(8, 30, 110, 0.32), rgba(8, 30, 110, 0));
    transition: background 0.3s ease, color 0.3s ease;
}

.topo .marca,
.topo-nav {
    text-shadow: 0 1px 12px rgba(6, 24, 88, 0.55);
}

.no-papel .topo .marca,
.no-papel .topo-nav {
    text-shadow: none;
}

.no-papel .topo {
    color: var(--tinta);
    background: rgba(242, 237, 226, 0.94);
    box-shadow: 0 1px 0 var(--linha);
}

.marca {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-family: var(--fonte-mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.marca-simbolo {
    width: 26px;
    height: 26px;
    flex: none;
}

.topo-nav {
    display: flex;
    align-items: center;
    gap: clamp(12px, 2.5vw, 28px);
    font-family: var(--fonte-mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.topo-nav a {
    text-decoration: none;
    padding: 6px 0;
    border-bottom: 1px solid transparent;
}

.topo-nav a:hover {
    border-bottom-color: currentColor;
}

.topo-acervo {
    padding: 8px 16px !important;
    border: 1px solid currentColor !important;
    border-radius: 999px;
}

.progresso {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.75);
    transform: scaleX(0);
    transform-origin: left center;
}

.no-papel .progresso {
    opacity: 0;
}

/* ---------- mundo 3D ---------- */

.mundo {
    position: fixed;
    inset: 0;
    z-index: 0;
    display: block;
    width: 100%;
    height: 100%;
}

html:not(.js) .mundo,
.sem-3d .mundo {
    display: none;
}

.veu {
    display: none;
}

.js .veu {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: grid;
    place-content: center;
    gap: 10px;
    text-align: center;
    background: linear-gradient(180deg, var(--ceu-alto), var(--ceu) 60%, var(--ceu-baixo));
    color: var(--nuvem);
    transition: opacity 0.9s ease, visibility 0.9s;
}

.mundo-pronto .veu,
.sem-3d .veu {
    opacity: 0;
    visibility: hidden;
}

.veu-marca {
    margin: 0;
    font-family: var(--fonte-titulo);
    font-size: clamp(30px, 5vw, 54px);
    font-weight: 300;
}

.veu-texto {
    margin: 0;
    font-family: var(--fonte-mono);
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    opacity: 0.8;
}

/* ---------- viagem ---------- */

.viagem {
    position: relative;
    z-index: 1;
}

.js .viagem {
    height: calc((var(--paradas, 7.12) * var(--altura-parada, 1.2) + 1) * 100vh);
    pointer-events: none;
}

.js .trilho,
.js .ver-era {
    pointer-events: auto;
}

.js .legendas {
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.js .legendas::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 58%;
    background: linear-gradient(90deg, rgba(6, 24, 88, 0.34), rgba(6, 24, 88, 0.12) 55%, rgba(6, 24, 88, 0));
    opacity: var(--vinheta, 0);
    transition: opacity 0.4s ease;
}

.js .legendas::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 46%;
    background: linear-gradient(to top, rgba(6, 24, 88, 0.55), rgba(6, 24, 88, 0));
    opacity: 0;
}

.js .parada {
    position: absolute;
    top: 50%;
    left: var(--margem);
    width: min(35rem, 41vw);
    translate: 0 -46%;
    opacity: 0;
    will-change: opacity, transform;
    text-shadow: 0 1px 24px rgba(6, 24, 88, 0.35);
}

.js .parada-abertura {
    opacity: 1;
    width: min(40rem, 46vw);
}

.parada .rotulo {
    opacity: 0.88;
}

.parada h1 {
    margin: 18px 0 20px;
    font-size: clamp(44px, 6.3vw, 96px);
    line-height: 1;
    letter-spacing: -0.025em;
}

.parada h2 {
    margin: 14px 0 16px;
    font-size: clamp(38px, 4.9vw, 74px);
    line-height: 1.02;
    letter-spacing: -0.02em;
}

.parada .texto {
    max-width: 30em;
    margin: 0 0 22px;
    font-size: clamp(17px, 1.35vw, 20px);
    line-height: 1.5;
    opacity: 0.95;
}

.ver-era {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 999px;
    background: rgba(8, 30, 110, 0.18);
    cursor: pointer;
    font-family: var(--fonte-mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: background 0.2s ease, color 0.2s ease;
}

.ver-era::after {
    content: "↓";
}

.ver-era:hover {
    background: var(--nuvem);
    color: var(--ceu-alto);
    text-shadow: none;
}

.parada:not(.ativa) .ver-era {
    pointer-events: none;
}

.deixa {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 30px 0 0;
    font-family: var(--fonte-mono);
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    opacity: 0.85;
}

.deixa span {
    position: relative;
    width: 44px;
    height: 1px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.35);
}

.deixa span::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--nuvem);
    animation: deixa 2.4s ease-in-out infinite;
}

@keyframes deixa {
    0% { transform: translateX(-100%); }
    60%,
    100% { transform: translateX(100%); }
}

/* trilho das eras */
.trilho {
    display: none;
}

.js .trilho {
    position: fixed;
    top: 50%;
    right: var(--margem);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    translate: 0 -50%;
}

.trilho button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
    border: 0;
    background: none;
    color: rgba(247, 249, 255, 0.62);
    cursor: pointer;
    font-family: var(--fonte-mono);
    font-size: 10.5px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-shadow: 0 1px 12px rgba(6, 24, 88, 0.5);
}

.trilho button::after {
    content: "";
    width: 14px;
    height: 1px;
    background: currentColor;
    transition: width 0.3s ease;
}

.trilho button[aria-current="true"] {
    color: var(--nuvem);
}

.trilho-nome {
    opacity: 0;
    transform: translateX(6px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.trilho:hover .trilho-nome,
.trilho button:focus-visible .trilho-nome,
.trilho button[aria-current="true"] .trilho-nome {
    opacity: 1;
    transform: none;
}

.js:not(.viajando) .trilho {
    opacity: 0;
    pointer-events: none;
}

.trilho {
    transition: opacity 0.4s ease;
}

.trilho button[aria-current="true"]::after {
    width: 36px;
}

.no-papel .trilho,
.painel-aberto .trilho {
    opacity: 0;
    pointer-events: none;
}

/* dica sobre os livros 3D */
.dica {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 6;
    max-width: 250px;
    padding: 7px 11px;
    border-radius: 4px;
    background: rgba(9, 22, 74, 0.88);
    color: var(--nuvem);
    font-family: var(--fonte-mono);
    font-size: 11.5px;
    line-height: 1.4;
    pointer-events: none;
}

.dica::after {
    content: " · ver";
    opacity: 0.6;
}

/* ---------- modo sem 3D ---------- */

.sem-3d .viagem {
    height: auto;
}

.sem-3d .legendas {
    position: static;
    padding-top: var(--topo-altura);
    background: linear-gradient(180deg, var(--ceu-alto), var(--ceu));
}

html.sem-3d .parada {
    position: relative;
    inset: auto;
    width: auto;
    max-width: 60rem;
    margin: 0 auto;
    padding: 40px var(--margem) 56px;
    translate: none;
    opacity: 1 !important;
    transform: none !important;
}

.parada-arte {
    display: block;
    width: 100%;
    height: auto;
    margin-bottom: 28px;
    border-radius: 6px;
}

.sem-3d .deixa {
    display: none;
}

/* ---------- acervo ---------- */

.acervo {
    position: relative;
    z-index: 4;
    padding-block: clamp(72px, 10vw, 140px);
    padding-inline: var(--margem);
    background: var(--marfim);
    color: var(--tinta);
}

.acervo::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -72px;
    height: 72px;
    background-image: radial-gradient(circle, var(--marfim) 44%, transparent 47%);
    background-size: 7px 7px;
    -webkit-mask-image: linear-gradient(to top, #000 10%, transparent);
    mask-image: linear-gradient(to top, #000 10%, transparent);
    pointer-events: none;
}

.acervo-cabeca {
    max-width: 46rem;
}

.acervo-cabeca .rotulo {
    color: var(--tinta-2);
}

.acervo h2 {
    margin: 16px 0 18px;
    font-size: clamp(40px, 5.4vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.02em;
}

.acervo h2 em {
    color: var(--ceu);
}

.acervo-intro {
    max-width: 36em;
    margin: 0;
    color: var(--tinta-2);
    font-size: 19px;
}

.acervo-ferramentas {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 22px 32px;
    margin: 48px 0 20px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--linha);
}

.busca {
    flex: 1 1 280px;
    max-width: 420px;
}

.busca input {
    width: 100%;
    padding: 10px 0;
    border: 0;
    border-bottom: 1px solid var(--tinta);
    border-radius: 0;
    background: transparent;
    color: var(--tinta);
    font-family: var(--fonte-titulo);
    font-size: 21px;
    font-weight: 300;
}

.busca input::placeholder {
    color: #8a879a;
}

.busca input:focus {
    outline: none;
    border-bottom-color: var(--ceu);
}

.filtros {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filtro {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid rgba(27, 26, 46, 0.28);
    border-radius: 999px;
    background: transparent;
    cursor: pointer;
    font-family: var(--fonte-mono);
    font-size: 12px;
    letter-spacing: 0.04em;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.filtro span {
    opacity: 0.55;
    font-variant-numeric: tabular-nums;
}

.filtro:hover {
    border-color: var(--tinta);
}

.filtro[aria-pressed="true"] {
    border-color: var(--tinta);
    background: var(--tinta);
    color: var(--marfim);
}

.acervo-resumo,
.acervo-carregando,
.acervo-vazio {
    margin: 0 0 28px;
    color: var(--tinta-2);
    font-family: var(--fonte-mono);
    font-size: 12px;
    letter-spacing: 0.06em;
}

.grade {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(200px, 42vw), 1fr));
    gap: 44px clamp(16px, 2.4vw, 32px);
    margin: 0;
    padding: 0;
    list-style: none;
}

.obra {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.obra-capa {
    display: grid;
    place-items: center;
    width: 100%;
    aspect-ratio: 4 / 5;
    padding: 18px;
    border: 1px solid var(--linha);
    background: var(--papel);
    cursor: pointer;
    perspective: 700px;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.obra-capa img {
    max-height: 100%;
    width: auto;
    object-fit: contain;
    box-shadow: 0 10px 22px rgba(27, 26, 46, 0.18);
    transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
    transform-origin: left center;
}

.obra-capa:hover {
    box-shadow: 0 18px 40px rgba(27, 26, 46, 0.14);
}

.obra-capa:hover img {
    transform: rotateY(-16deg) translateX(6px);
}

.obra-texto {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.obra-era {
    margin: 0;
    color: var(--tinta-2);
    font-family: var(--fonte-mono);
    font-size: 10.5px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.obra-titulo {
    font-size: 19px;
    font-weight: 400;
    line-height: 1.25;
}

.obra-titulo a {
    text-decoration: none;
}

.obra-titulo a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.obra-comprar {
    align-self: flex-start;
    margin-top: 2px;
    padding-bottom: 2px;
    border-bottom: 1px solid currentColor;
    color: var(--ceu-alto);
    font-family: var(--fonte-mono);
    font-size: 11.5px;
    letter-spacing: 0.04em;
    text-decoration: none;
}

.obra-comprar::after {
    content: " →";
}

.obra-comprar:hover {
    color: var(--ceu);
}

/* ---------- rodapé ---------- */

.rodape {
    position: relative;
    z-index: 4;
    display: grid;
    gap: 18px;
    padding-block: 56px 64px;
    padding-inline: var(--margem);
    background: var(--tinta);
    color: var(--marfim);
}

.rodape-marca {
    margin: 0;
    font-size: 28px;
    font-weight: 300;
}

.rodape-links {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    font-family: var(--fonte-mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.rodape-aviso {
    max-width: 52em;
    margin: 0;
    color: rgba(242, 237, 226, 0.66);
    font-size: 14px;
}

/* ---------- painel do produto ---------- */

.painel {
    position: fixed;
    inset: 0;
    z-index: 40;
}

.painel-fundo {
    position: absolute;
    inset: 0;
    background: rgba(6, 18, 64, 0.5);
    opacity: 0;
    transition: opacity 0.28s ease;
}

.painel-caixa {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    width: min(480px, 100%);
    overflow-y: auto;
    background: var(--marfim);
    color: var(--tinta);
    transform: translateX(104%);
    transition: transform 0.32s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.painel.aberto .painel-fundo {
    opacity: 1;
}

.painel.aberto .painel-caixa {
    transform: none;
}

.painel-fechar {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--linha);
    border-radius: 50%;
    background: var(--marfim);
    cursor: pointer;
}

.painel-fechar svg {
    width: 20px;
    height: 20px;
}

.painel-capa {
    display: grid;
    place-items: center;
    padding: 56px 32px 32px;
    background: var(--papel);
    border-bottom: 1px solid var(--linha);
}

.painel-capa img {
    max-height: 40vh;
    width: auto;
    object-fit: contain;
    box-shadow: 0 16px 34px rgba(27, 26, 46, 0.22);
}

.painel-info {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 28px 32px 40px;
}

.painel-info .rotulo {
    color: var(--tinta-2);
}

.painel-info h2 {
    font-size: 32px;
    line-height: 1.1;
}

.painel-descricao {
    margin: 0;
    color: var(--tinta-2);
    font-size: 17px;
}

.botao-comprar {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    margin-top: 8px;
    padding: 14px 22px;
    border-radius: 999px;
    background: var(--ceu);
    color: #fff;
    font-family: var(--fonte-mono);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    transition: background 0.2s ease;
}

.botao-comprar::after {
    content: " →";
    margin-left: 6px;
}

.botao-comprar:hover {
    background: var(--ceu-alto);
}

.painel-detalhes {
    align-self: center;
    font-family: var(--fonte-mono);
    font-size: 12px;
    letter-spacing: 0.04em;
}

.painel-nota {
    margin: 6px 0 0;
    color: var(--tinta-2);
    font-size: 13px;
    line-height: 1.5;
}

.painel-aberto {
    overflow: hidden;
}

/* ---------- livro em 3D (CSS) ---------- */

.livro3d {
    --proporcao: 0.68;
    --espessura: 26px;
    --lombada: #3b2a1e;
    position: relative;
    width: var(--largura-livro, min(280px, 58vw));
    aspect-ratio: var(--proporcao);
    transform-style: preserve-3d;
    transform: rotateY(26deg) rotateX(4deg);
    transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
    animation: livro-flutua 6s ease-in-out infinite;
}

.livro3d:hover {
    transform: rotateY(6deg) rotateX(2deg);
}

@keyframes livro-flutua {
    0%,
    100% { translate: 0 0; }
    50% { translate: 0 -8px; }
}

.livro3d-capa {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #fff;
    transform: translateZ(calc(var(--espessura) / 2));
    box-shadow: inset 4px 0 8px rgba(0, 0, 0, 0.18);
}

.livro3d-verso {
    position: absolute;
    inset: 0;
    background: var(--lombada);
    transform: rotateY(180deg) translateZ(calc(var(--espessura) / 2));
}

.livro3d-lombada {
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(var(--espessura) / -2);
    width: var(--espessura);
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.35), rgba(255, 255, 255, 0.1) 45%, rgba(0, 0, 0, 0.3)),
        var(--lombada);
    transform: rotateY(-90deg);
}

.livro3d-paginas {
    position: absolute;
    top: 3px;
    bottom: 3px;
    right: calc(var(--espessura) / -2);
    width: var(--espessura);
    background: repeating-linear-gradient(90deg, #f6efdd 0 2px, #e2d5b9 2px 3px);
    transform: rotateY(90deg);
}

.livro3d.objeto {
    --espessura: 10px;
    --lombada: #e6dfcf !important;
}

.livro3d.objeto .livro3d-capa {
    object-fit: contain;
    padding: 6%;
}

.livro3d.objeto .livro3d-paginas {
    background: #ece5d6;
}

/* ---------- página do produto ---------- */

.pagina-papel {
    background: var(--marfim);
    color: var(--tinta);
}

.produto {
    max-width: 1280px;
    margin: 0 auto;
    padding-block: calc(var(--topo-altura) + 28px) clamp(72px, 10vw, 120px);
    padding-inline: var(--margem);
}

.voltar {
    display: inline-block;
    margin-bottom: 26px;
    font-family: var(--fonte-mono);
    font-size: 12px;
    letter-spacing: 0.06em;
    text-decoration: none;
}

.voltar:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.produto-carregando {
    padding: 80px 0;
    color: var(--tinta-2);
    font-family: var(--fonte-mono);
    font-size: 12px;
    letter-spacing: 0.08em;
}

.produto-detalhe {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: clamp(32px, 6vw, 88px);
    align-items: center;
}

.vitrine {
    position: relative;
    display: grid;
    place-items: center;
    min-height: clamp(420px, 62vh, 640px);
    padding: 56px 24px 84px;
    overflow: hidden;
    border-radius: 6px;
    background: var(--ceu);
    perspective: 1100px;
    isolation: isolate;
}

.vitrine::after {
    content: "";
    position: absolute;
    left: 28%;
    right: 28%;
    bottom: 12%;
    height: 26px;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(6, 20, 70, 0.45), rgba(6, 20, 70, 0));
    z-index: -1;
}

.vitrine-ceu {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
}

.miniaturas {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 16px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.miniatura {
    width: 46px;
    height: 58px;
    padding: 3px;
    border: 1px solid transparent;
    border-radius: 3px;
    background: #fff;
    cursor: pointer;
    opacity: 0.72;
}

.miniatura img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.miniatura[aria-pressed="true"] {
    border-color: var(--ouro);
    opacity: 1;
}

.produto-texto h1 {
    margin: 14px 0 18px;
    font-size: clamp(36px, 4.4vw, 62px);
    line-height: 1.04;
    letter-spacing: -0.02em;
}

.produto-texto .rotulo {
    color: var(--tinta-2);
}

.produto-descricao {
    max-width: 36em;
    margin: 0;
    color: var(--tinta-2);
    font-size: 19px;
}

.produto-texto .botao-comprar {
    max-width: 400px;
    margin-top: 28px;
}

.produto-nota {
    max-width: 36em;
    margin: 14px 0 0;
    color: var(--tinta-2);
    font-size: 13px;
}

.produto-erro {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 60px 0;
}

.produto-erro h1 {
    font-size: clamp(36px, 5vw, 60px);
}

.produto-erro p {
    max-width: 34em;
    margin: 0;
    color: var(--tinta-2);
}

.relacionados {
    margin-top: clamp(72px, 10vw, 120px);
    padding-top: 40px;
    border-top: 1px solid var(--linha);
}

.relacionados .rotulo {
    color: var(--tinta-2);
}

.relacionados h2 {
    margin: 12px 0 36px;
    font-size: clamp(34px, 4vw, 56px);
}

.relacionados h2 em {
    color: var(--ceu);
}

/* ---------- link da bio ---------- */

.pagina-links {
    min-height: 100vh;
    background: var(--ceu);
    color: var(--nuvem);
}

.links-ceu {
    position: fixed;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
}

.links {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 34px;
    width: min(520px, 100%);
    margin: 0 auto;
    padding: calc(env(safe-area-inset-top, 0px) + 28px) 20px calc(env(safe-area-inset-bottom, 0px) + 48px);
}

.links-topo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
    text-shadow: 0 1px 14px rgba(6, 24, 88, 0.5);
}

.links-lema {
    margin: 0;
    font-size: 30px;
    font-weight: 300;
    line-height: 1.15;
}

.links-lema em {
    font-family: var(--fonte-script);
    font-style: normal;
    font-size: 1.15em;
    color: var(--ouro-claro);
}

.links-carregando {
    margin: 0;
    font-family: var(--fonte-mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-align: center;
}

.links-hoje {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 26px 22px 26px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 18px;
    background: rgba(8, 30, 110, 0.38);
    text-align: center;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.links-hoje-livro {
    padding: 22px 0 28px;
    perspective: 900px;
}

.links-hoje .livro3d {
    --largura-livro: min(170px, 44vw);
}

.links-hoje h1 {
    font-size: 30px;
    line-height: 1.12;
}

.links-descricao {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
    opacity: 0.92;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.links-hoje .botao-comprar {
    align-self: stretch;
}

.botao-claro {
    background: var(--nuvem);
    color: var(--ceu-alto);
}

.botao-claro:hover {
    background: #ffffff;
}

.links-nota {
    margin: 0;
    font-size: 12.5px;
    opacity: 0.78;
}

.links-secao {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.links-secao > .rotulo {
    text-align: center;
    text-shadow: 0 1px 12px rgba(6, 24, 88, 0.5);
}

.links-lista {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.links-item {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 10px;
    border-radius: 12px;
    background: rgba(247, 249, 255, 0.95);
    color: var(--tinta);
}

.links-item-capa img {
    width: 56px;
    height: 72px;
    object-fit: contain;
    background: #fff;
}

.links-item-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.links-item-titulo {
    font-size: 17px;
    line-height: 1.25;
    text-decoration: none;
}

.links-item-comprar {
    align-self: flex-start;
    border-bottom: 1px solid currentColor;
    color: var(--ceu-alto);
    font-family: var(--fonte-mono);
    font-size: 11.5px;
    text-decoration: none;
}

.links-item-comprar::after {
    content: " →";
}

.links-canal {
    align-items: center;
    padding: 24px 20px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 18px;
    background: rgba(8, 30, 110, 0.32);
    text-align: center;
}

.links-canal p:not(.rotulo) {
    margin: 0;
}

.links-canal .botao-comprar {
    align-self: stretch;
}

.links-redes {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.links-redes a {
    padding: 9px 16px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 999px;
    font-family: var(--fonte-mono);
    font-size: 12px;
    letter-spacing: 0.06em;
    text-decoration: none;
}

.links-viagem {
    font-family: var(--fonte-mono);
    font-size: 12px;
    letter-spacing: 0.1em;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    text-shadow: 0 1px 12px rgba(6, 24, 88, 0.5);
}

.links-aviso {
    margin: 0;
    font-size: 12px;
    line-height: 1.6;
    opacity: 0.75;
    text-align: center;
}

/* ---------- celular ---------- */

@media (max-width: 760px) {
    :root {
        --topo-altura: 56px;
    }

    .marca {
        font-size: 11px;
        letter-spacing: 0.1em;
        white-space: nowrap;
    }

    .topo-nav a:not(.topo-acervo) {
        display: none;
    }

    .js .legendas::after {
        opacity: 1;
    }

    .js .parada,
    .js .parada-abertura {
        top: auto;
        right: 20px;
        bottom: calc(env(safe-area-inset-bottom, 0px) + 30px);
        left: 20px;
        z-index: 1;
        width: auto;
        translate: none;
    }

    .parada h1 {
        margin: 12px 0 14px;
        font-size: clamp(38px, 11vw, 54px);
    }

    .parada h2 {
        margin: 10px 0 12px;
        font-size: clamp(34px, 9.6vw, 46px);
    }

    .parada .texto {
        margin-bottom: 18px;
        font-size: 16.5px;
    }

    .deixa {
        margin-top: 18px;
    }

    .js .trilho {
        display: none;
    }

    .grade {
        gap: 32px 16px;
    }

    .obra-capa {
        padding: 12px;
    }

    .obra-titulo {
        font-size: 17px;
    }

    .painel-caixa {
        top: auto;
        left: 0;
        width: 100%;
        max-height: 90vh;
        border-radius: 18px 18px 0 0;
        transform: translateY(104%);
    }

    .painel-capa {
        padding: 44px 24px 22px;
    }

    .painel-capa img {
        max-height: 30vh;
    }

    .painel-info {
        padding: 22px 22px calc(env(safe-area-inset-bottom, 0px) + 30px);
    }

    .painel-info h2 {
        font-size: 27px;
    }
}

@media (max-width: 860px) {
    .produto-detalhe {
        grid-template-columns: 1fr;
    }

    .vitrine {
        min-height: 380px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .deixa span::after,
    .livro3d {
        animation: none;
    }

    .painel-caixa,
    .painel-fundo,
    .obra-capa img {
        transition: none;
    }
}