/* versao mobile — b1.book.umbii.boo */

/* todas as fotos com cantos arredondados (celular e computador) */
.mgR1mlp-t > span:nth-child(2) { border-radius: 17px !important; }
/* foto de dentro com um pouco mais de arredondamento */
.mgR1mlp-root > div:first-of-type > div:last-child > div:first-child { border-radius: 24px !important; }

/* miniaturas todas do mesmo tamanho, quadradas como a numero 11 */
.mgR1mlp-t { width: auto !important; }
.mgR1mlp-t > span:nth-child(2) { width: auto !important; aspect-ratio: 1 / 1; }

/* espaco para o acento (Ê) nao ser cortado no titulo */
.mgR1mlp-root [aria-live="polite"] > div > span { padding-top: .3em !important; margin-top: -.3em !important; }

/* titulo da primeira foto tem acento: um pouco mais de espaco entre as linhas */
html.primeira .mgR1mlp-root [aria-live="polite"] { line-height: 1.6 !important; }

/* capa: so a capa na tela; tocar nela abre o livro na pagina 01 */
html:not(.livro-aberto) { overflow: hidden; }
html.livro-aberto #capa { display: none; }
#capa {
  position: fixed; inset: 0; z-index: 100; box-sizing: border-box; background: #fff;
  padding: 14px; cursor: pointer;
}
#capa .capa-foto { position: relative; width: 100%; height: 100%; margin: 0; border-radius: 24px; overflow: hidden; background: rgb(236, 236, 236); }
#capa .capa-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* camada escura por cima da foto para o titulo aparecer */
#capa .capa-foto::after { content: ""; position: absolute; inset: 0; background: rgba(81, 35, 19, .72); pointer-events: none; } /* #512313 */
/* titulo rodado: le de baixo para cima, centralizado na altura */
#capa h1 {
  position: absolute; z-index: 1; top: 0; right: 0; bottom: 0; margin: 0;
  padding: 22px .4em 22px 0;
  writing-mode: vertical-rl; transform: rotate(180deg);
  white-space: nowrap; text-align: center;
  font-family: "Boldonse", "Boldonse Placeholder", sans-serif; font-weight: 400;
  text-transform: uppercase; letter-spacing: 0.03em; line-height: 1;
  color: #fff;
  font-size: clamp(36px, calc((100svh - 72px) / 11.5), 110px);
}
@media (max-width: 809px) {
  #capa { padding: calc(18px + env(safe-area-inset-top)) 18px calc(18px + env(safe-area-inset-bottom)); }
  #capa h1 { padding: 18px .4em 18px 0; font-size: clamp(34px, calc((100svh - 84px) / 11.5), 64px); }
}

@media (max-width: 1199px) {
  .framer-55jpK.framer-72rtr7 { width: 100% !important; }
}
@media (max-width: 809px) {
  html, body { overflow-x: hidden; -webkit-text-size-adjust: 100%; }
  .framer-1icep38-container { height: auto !important; min-height: 100svh; }
  .mgR1mlp-root {
    height: auto !important; min-height: 100svh;
    padding: calc(28px + env(safe-area-inset-top)) 18px calc(28px + env(safe-area-inset-bottom)) !important;
    gap: 36px !important;
  }
  /* linha principal vira coluna: titulo em cima, foto embaixo */
  .mgR1mlp-root > div:first-of-type {
    flex-direction: column !important; flex: none !important;
    gap: 28px !important; min-height: 0 !important;
  }
  .mgR1mlp-root > div:first-of-type > div:first-child { flex: none !important; }
  .mgR1mlp-root [aria-live="polite"] { font-size: clamp(40px, 13.5vw, 72px) !important; }
  /* foto */
  .mgR1mlp-root > div:first-of-type > div:last-child { width: 100% !important; flex: none !important; height: auto !important; min-height: 0 !important; }
  .mgR1mlp-root > div:first-of-type > div:last-child > div:first-child {
    flex: none !important; aspect-ratio: 4 / 5; max-height: 68svh; width: 100%;
    touch-action: pan-y;
  }
  .mgR1mlp-root > div:first-of-type > div:last-child > div:last-child { margin-top: 12px !important; }
  /* miniaturas: escondidas; aparecem ao tocar na foto, somem ao rolar */
  .mgR1mlp-root > div[role="group"] {
    position: fixed !important; left: 0; right: 0; bottom: 0; z-index: 50;
    width: 100% !important; box-sizing: border-box;
    padding: 16px 18px calc(16px + env(safe-area-inset-bottom)) !important;
    background: #fff; box-shadow: 0 -10px 30px rgba(0,0,0,.08);
    transform: translateY(110%); visibility: hidden;
    transition: transform .45s cubic-bezier(.65,.05,.36,1), visibility 0s linear .45s;
  }
  html.faixa-on .mgR1mlp-root > div[role="group"] {
    transform: none; visibility: visible;
    transition: transform .45s cubic-bezier(.65,.05,.36,1), visibility 0s;
  }
  .mgR1mlp-t:hover img { transform: none; }
}
@media (max-width: 809px) and (orientation: landscape) {
  .mgR1mlp-root > div:first-of-type > div:last-child > div:first-child { aspect-ratio: 16 / 9; max-height: none; }
  .mgR1mlp-root [aria-live="polite"] { font-size: clamp(40px, 9vw, 72px) !important; }
}

/* transicao da capa para dentro do livro (so no B1) */
:root { --suave: cubic-bezier(.77, 0, .18, 1); --assenta: cubic-bezier(.16, 1, .3, 1); }
#capa { will-change: transform; }
html.abrindo #capa { transform: translateX(-100%); transition: transform .85s var(--suave); pointer-events: none; }
html.abrindo #main { animation: entra-pagina .85s var(--suave) both; }
@keyframes entra-pagina { from { transform: translateX(100%); } to { transform: translateX(0); } }
/* foto de dentro se revela da direita para a esquerda */
html.abrindo .mgR1mlp-root > div:first-of-type > div:last-child > div:first-child { animation: revela-foto 1s .2s var(--assenta) both; }
html.abrindo .mgR1mlp-root > div:first-of-type > div:last-child > div:first-child img { animation: assenta-foto 1.2s .2s var(--assenta) both; }
@keyframes revela-foto { from { clip-path: inset(0 0 0 100% round 24px); } to { clip-path: inset(0 0 0 0 round 24px); } }
@keyframes assenta-foto { from { transform: scale(1.12); } to { transform: scale(1); } }
/* palavras do titulo entram uma a uma pela direita */
html.abrindo [aria-live="polite"] > div > span > span { animation: entra-palavra .8s var(--assenta) both; }
html.abrindo [aria-live="polite"] > div > span:nth-child(1) > span { animation-delay: .35s; }
html.abrindo [aria-live="polite"] > div > span:nth-child(2) > span { animation-delay: .43s; }
html.abrindo [aria-live="polite"] > div > span:nth-child(3) > span { animation-delay: .51s; }
html.abrindo [aria-live="polite"] > div > span:nth-child(4) > span { animation-delay: .59s; }
html.abrindo [aria-live="polite"] > div > span:nth-child(n+5) > span { animation-delay: .67s; }
@keyframes entra-palavra { from { transform: translateX(108%); } to { transform: translateX(0); } }
/* numero da pagina e legenda aparecem no fim */
html.abrindo .mgR1mlp-root div:has(+ [aria-live="polite"]),
html.abrindo .mgR1mlp-root > div:first-of-type > div:last-child > div:last-child { animation: aparece .6s .7s ease both; }
@keyframes aparece { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
