/* A experiência do celular. Deitado (o jeito de jogar), a tela segue os jogos educativos de celular: uma moldura fixa
   em todas as telas. No alto, botões grossos (sair, o diário com o ano, os pontos, o som); à esquerda, o portal num
   anel dourado sobre a baía antiga; no vão, o Ybytu de pé, que muda de pose com o momento; à direita, o cartão do guia
   com a fita no alto, o balão apontando para ele e as escolhas em placas grandes. Em pé, a máquina pede para virar o
   celular (fim deste arquivo). */
:root { --sal: env(safe-area-inset-left, 0px); --sar: env(safe-area-inset-right, 0px); --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px); }
.cel-moldura, .g-cel-n, .g-cel-fecha, .cel-aviso, .cel-ybytu { display: none; }

@media (orientation: landscape) and (max-height: 520px) {
  #hud { --creme: #fff7e6; --creme-2: #f6e6c4; --tinta: #2a160c; --tinta-2: #6b4a2c; --borda: #5a3414; --borda-2: #3e220c; --ouro: #e3ad46; --ouro-2: #f6d27e;
    --laranja: #e8683a; --laranja-2: #c24d22; --mar: #2f7f86; --linha: rgba(90, 52, 20, .25); --sombra: 0 4px 0 var(--borda-2); }

  /* o fundo: a baía antiga, um pouco desfocada; o latão do painel sai de cena no celular */
  #tableWorld .plate, #tableWorld .plate-tela-e { opacity: 0 !important; }
  #tableWorld video.plate-vivo { display: none; }
  #tableVp { background: #20343a url("../assets/maq/espera.webp") center 40% / cover no-repeat; }
  #tableVp::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; -webkit-backdrop-filter: blur(3px) saturate(1.05); backdrop-filter: blur(3px) saturate(1.05);
    background: linear-gradient(180deg, rgba(20, 30, 34, .25), rgba(30, 18, 8, .45)); }
  #hud .g-mesa, #hud .cel-d { display: none; }
  /* o anel dourado do portal, desenhado por cima da borda da bola */
  #hud .cel-e { display: block; position: absolute; z-index: 0; pointer-events: none; left: calc(var(--bx) - var(--br)); top: calc(var(--by) - var(--br)); width: calc(var(--br) * 2); height: calc(var(--br) * 2);
    border-radius: 50%; box-shadow: 0 0 0 7px var(--ouro), 0 0 0 10px var(--borda), 0 7px 0 10px var(--borda-2), 0 18px 30px 8px rgba(0, 0, 0, .45), inset 0 0 0 3px rgba(255, 240, 200, .55);
    opacity: 0; transition: opacity .6s ease; }
  #game.is-on #hud .cel-e { opacity: 1; }

  /* o Ybytu de pé no vão, com um balanço leve, como quem conversa */
  #hud .cel-ybytu { display: block; position: absolute; z-index: 1; bottom: calc(max(0px, var(--sab)) - 6px); left: calc(var(--d-x) - var(--masc) * .92); height: min(64vh, 250px); width: auto;
    pointer-events: none; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .45)); transform-origin: 50% 100%; animation: celYbytu 3.2s ease-in-out infinite; }
  @keyframes celYbytu { 0%, 100% { transform: rotate(-1.2deg) translateY(0); } 50% { transform: rotate(1.2deg) translateY(-4px); } }
  #hud:has(.g-summary.on) .cel-ybytu { display: none; }

  /* ---------- a barra do alto: botões grossos com a sombra embaixo, como peças de brinquedo ---------- */
  #hud .g-top { left: auto; right: calc(100vw - var(--d-x) + 8px); top: 0; padding: max(8px, var(--sat)) 0 0; display: flex; justify-content: flex-end; align-items: center; gap: 8px; z-index: 3; }
  #hud .g-brand { gap: 6px; }
  #hud .g-brand .brand, #hud .g-life, #hud .g-track { display: none; }
  #hud .g-pts { height: 40px; padding: 0 12px 0 4px; gap: 6px; border: 2.5px solid var(--borda); border-radius: 999px; background: var(--creme); box-shadow: var(--sombra); }
  #hud .g-pts small { display: none; }
  #hud .g-pts .g-pts-n { font-size: 18px; }
  #hud .g-pts .g-pts-moeda { width: 30px; height: 30px; }
  #hud .g-tools { gap: 8px; }
  #hud .g-tools .icon-btn { width: 44px; height: 44px; border: 2.5px solid var(--borda); background: var(--creme); color: var(--borda); box-shadow: var(--sombra); -webkit-backdrop-filter: none; backdrop-filter: none; }
  #hud .g-tools .icon-btn .ico { width: 20px; height: 20px; }
  #hud .g-tools .icon-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--borda-2); }
  /* a saída é o botão de voltar, laranja, no canto de cima à esquerda */
  #hud .g-tools #btnExit { position: fixed; z-index: 6; left: max(8px, var(--sal)); top: max(8px, var(--sat)); background: var(--laranja); color: #fff7e6; }

  /* o diário fechado: uma pílula com o ano, o lugar e o caderninho com o número de anotações */
  #hud .g-stats { position: absolute; z-index: 5; left: calc(max(8px, var(--sal)) + 54px); top: max(8px, var(--sat)); right: auto; bottom: auto; width: auto; height: auto; max-width: max(110px, calc(var(--d-x) - 236px));
    display: flex; flex-direction: row; align-items: center; gap: 10px; padding: 4px 5px 4px 14px !important; overflow: visible;
    background: var(--creme); border: 2.5px solid var(--borda); border-radius: 16px; box-shadow: var(--sombra);
    -webkit-backdrop-filter: none; backdrop-filter: none; filter: none; transform: none !important; color: var(--tinta); cursor: pointer; zoom: 1; }
  #hud .g-stats:active:not(:has(.g-dest-lista:hover)) { translate: 0 2px; }
  #hud .g-stats > :not(.g-when, .g-cel-n, .g-dest, .g-cel-fecha) { display: none !important; }
  #hud .g-stats .g-dest { display: none; }
  #hud .g-stats .g-when { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; margin: 0; padding: 0; border: 0; min-width: 0; background: none; }
  #hud .g-stats .g-year { font-size: 19px; line-height: 1; color: var(--tinta); text-shadow: none; }
  #hud .g-stats .g-where { font-size: 12px; font-weight: 600; line-height: 1.2; color: var(--tinta-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  #hud .g-stats .g-era { display: none; }
  #hud .g-stats .g-cel-n { display: flex; align-items: center; gap: 5px; flex: none; height: 34px; padding: 0 10px 0 31px; border-radius: 11px;
    background: var(--mar) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff7e6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 4h11a3 3 0 0 1 3 3v13H8a3 3 0 0 1-3-3z'/%3E%3Cpath d='M5 17a3 3 0 0 1 3-3h11M9 8h6'/%3E%3C/svg%3E") 8px center / 18px no-repeat;
    color: #fff7e6; font-family: var(--f-caps); font-size: 15px; font-weight: 700; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .2); }
  #hud .g-stats .g-cel-n:empty { width: 34px; padding: 0; background-position: center; }
  #hud .g-stats.avisa { animation: celAvisa 1.1s ease 2; }
  @keyframes celAvisa { 40% { box-shadow: var(--sombra), 0 0 0 4px var(--ouro-2), 0 0 22px rgba(240, 200, 120, .9); } }
  #hud .g-stats:focus-visible { outline: 3px solid var(--ouro-2); outline-offset: 2px; }

  /* a gaveta aberta: o diário num cartão alto, com a fita do título e o X redondo */
  #hud.diario-on .g-stats { top: var(--e-y); left: var(--e-x); width: var(--e-w); max-width: none; height: var(--e-h); flex-direction: column; align-items: stretch; gap: 8px;
    padding: 16px 14px 10px !important; cursor: default; border-radius: 22px; border-width: 3px; box-shadow: 0 6px 0 var(--borda-2), 0 18px 40px rgba(0, 0, 0, .6); animation: celGaveta .3s cubic-bezier(.2, 1.2, .4, 1) both; }
  @keyframes celGaveta { from { opacity: 0; translate: -30px 0; } }
  #hud.diario-on .g-stats .g-cel-n { display: none; }
  #hud.diario-on .g-stats .g-when { padding-right: 50px; }
  #hud.diario-on .g-stats .g-year { font-size: 26px; }
  #hud.diario-on .g-stats .g-where { font-size: 14px; white-space: normal; }
  #hud.diario-on .g-stats .g-era { display: block; margin-top: 4px; font-size: 11px; }
  #hud.diario-on .g-stats .g-dest { display: flex; flex: 1 1 auto; min-height: 0; margin: 0; }
  #hud.diario-on .g-stats .g-dest-lista { overflow-y: auto; overscroll-behavior: contain; }
  #hud.diario-on .g-stats .g-dest-lista *, #hud.diario-on .g-stats .g-dest-lista *::before, #hud.diario-on .g-stats .g-dest-lista *::after { animation-duration: 0s !important; animation-delay: 0s !important; }
  #hud.diario-on .g-stats .g-cel-fecha { display: grid; place-items: center; position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; padding: 0; border: 2.5px solid var(--borda); border-radius: 50%;
    background: var(--laranja); color: #fff7e6; box-shadow: var(--sombra); cursor: pointer; }
  #hud.diario-on .g-stats .g-cel-fecha span { display: none; }
  #hud.diario-on .g-stats .g-cel-fecha::before, #hud.diario-on .g-stats .g-cel-fecha::after { content: ""; position: absolute; left: 50%; top: 50%; width: 18px; height: 3px; margin: -1.5px 0 0 -9px; border-radius: 2px; background: currentColor; rotate: 45deg; }
  #hud.diario-on .g-stats .g-cel-fecha::after { rotate: -45deg; }
  #hud.diario-on .g-stats .g-cel-fecha:focus-visible { outline: 3px solid var(--ouro-2); outline-offset: 2px; }

  /* o aviso da anotação nova, embaixo do diário */
  #hud .cel-aviso { display: flex; align-items: center; gap: 10px; position: absolute; z-index: 6; left: max(8px, var(--sal)); top: calc(max(8px, var(--sat)) + 58px); max-width: min(320px, calc(var(--cena-w) - 24px));
    padding: 7px 14px 8px 8px; border-radius: 16px; background: var(--creme); border: 2.5px solid var(--borda); color: var(--tinta); box-shadow: var(--sombra), 0 10px 22px rgba(0, 0, 0, .4);
    animation: celAviso .4s cubic-bezier(.2, 1.4, .4, 1) both; pointer-events: none; }
  #hud .cel-aviso::before { content: ""; flex: none; width: 32px; height: 32px; border-radius: 10px; background: var(--mar) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff7e6' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l2.6 5.4 5.9.8-4.3 4.1 1 5.9L12 16.4 6.8 19.2l1-5.9L3.5 9.2l5.9-.8z'/%3E%3C/svg%3E") center / 20px no-repeat; }
  #hud .cel-aviso small { display: block; font-family: var(--f-caps); font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--laranja-2); }
  #hud .cel-aviso b { display: block; font-family: var(--f-text); font-size: 16px; font-weight: 700; line-height: 1.2; }
  #hud .cel-aviso.sai { opacity: 0; translate: 0 -8px; transition: opacity .4s ease, translate .4s ease; }
  @keyframes celAviso { from { opacity: 0; translate: 0 -14px; scale: .9; } }

  /* ---------- o cartão do guia: tem a altura do que leva dentro e fica no meio da coluna. Papel creme de borda grossa,
     com acabamento de grafismo de inspiração indígena (triângulos, escadinhas, losangos e pontos, nas cores do urucum e
     do jenipapo, as mesmas da pintura do rosto do Ybytu): uma faixa de triângulos no alto, um canto desenhado em cada
     ponta de cima e uma costura tracejada por dentro da borda. Botão nunca fica em cima de grafismo: eles moram só na
     faixa do alto, acima do texto, e a costura passa longe das placas e do Avançar. A fita no alto diz quem fala, e a ponta do balão vira para o Ybytu ---------- */
  #hud .g-panel { left: var(--d-x); top: calc(var(--d-y) + 6px + (var(--d-h) - 6px) / 2); right: auto; bottom: auto; width: var(--d-w); height: auto; min-height: 150px; max-height: calc(var(--d-h) - 14px);
    transform: none; translate: 0 -50%; z-index: 2; display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; gap: 10px; padding: 28px 26px 18px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Cg transform='rotate(0 22 22)'%3E%3Cg fill='none' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.6'%3E%3Cpath d='M3 34V3h31' stroke='%232b1d16'/%3E%3Cpath d='M9 26V9h17' stroke='%23c4472b'/%3E%3Cpath d='M15 20v-5h5' stroke='%232b1d16'/%3E%3C/g%3E%3Cpath d='M26 11l4 4-4 4-4-4z M15 22l4 4-4 4-4-4z' fill='%23d99a3a'/%3E%3Ccircle cx='40' cy='3' r='2' fill='%23c4472b'/%3E%3Ccircle cx='3' cy='40' r='2' fill='%23c4472b'/%3E%3C/g%3E%3C/svg%3E") left 8px top 8px / 26px no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Cg transform='rotate(90 22 22)'%3E%3Cg fill='none' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.6'%3E%3Cpath d='M3 34V3h31' stroke='%232b1d16'/%3E%3Cpath d='M9 26V9h17' stroke='%23c4472b'/%3E%3Cpath d='M15 20v-5h5' stroke='%232b1d16'/%3E%3C/g%3E%3Cpath d='M26 11l4 4-4 4-4-4z M15 22l4 4-4 4-4-4z' fill='%23d99a3a'/%3E%3Ccircle cx='40' cy='3' r='2' fill='%23c4472b'/%3E%3Ccircle cx='3' cy='40' r='2' fill='%23c4472b'/%3E%3C/g%3E%3C/svg%3E") right 8px top 8px / 26px no-repeat,
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='9' viewBox='0 0 16 9'%3E%3Cpath d='M1 8l4-6 4 6z' fill='%23c4472b' fill-opacity='.75'/%3E%3Cpath d='M9 1h6l-3 5z' fill='%232b1d16' fill-opacity='.55'/%3E%3C/svg%3E") left 0 top 12px / 16px 9px repeat-x, radial-gradient(120% 90% at 50% 0%, #fffaf0, var(--creme) 55%, #f8ead0);
    border: 3px solid var(--borda); border-radius: 24px; outline: 2px dashed rgba(196, 71, 43, .5); outline-offset: -11px;
    box-shadow: inset 0 0 0 4px var(--creme-2), 0 6px 0 var(--borda-2), 0 16px 32px rgba(0, 0, 0, .45); }
  /* a fita com o nome de quem fala: urucum, com um zigue-zague claro embaixo */
  #hud .g-panel::before { content: "Ybytu · guia do tempo"; position: absolute; z-index: 3; top: -16px; left: 50%; translate: -50% 0; padding: 5px 20px 10px; white-space: nowrap;
    border: 2.5px solid var(--borda); border-radius: 12px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='6' viewBox='0 0 12 6'%3E%3Cpath d='M0 5l3-4 3 4 3-4 3 4' fill='none' stroke='%23fff3dc' stroke-width='1.4' stroke-linejoin='round'/%3E%3C/svg%3E") left 4px bottom 2px / 12px 6px repeat-x, linear-gradient(180deg, #d65c3c, #b8402a);
    color: #fff7e6; box-shadow: var(--sombra); text-shadow: 0 1px 0 rgba(60, 20, 10, .5);
    font-family: var(--f-caps); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
  /* a ponta do balão, do lado do Ybytu */
  #hud .g-panel::after { content: ""; position: absolute; z-index: 3; left: -15px; top: calc(50% - 22px); width: 22px; height: 22px; rotate: 45deg; background: var(--creme);
    border-left: 3px solid var(--borda); border-bottom: 3px solid var(--borda); border-radius: 0 0 0 5px; }
  #hud .g-panel > .g-bubble, #hud .g-panel > .g-bubble.glass { position: relative; inset: auto; width: 100%; max-width: none; height: auto; flex: 0 1 auto; min-height: 0;
    padding: 0 2px 52px; background: none; border: 0; box-shadow: none; filter: none; overflow: hidden; }
  #hud .g-panel:has(.choices, .g-next) > .g-bubble { padding-bottom: 0; overflow-y: auto; overscroll-behavior: contain; }
  #hud .g-panel > .g-bubble::before { display: none; }
  #hud .g-panel .g-say { font-weight: 600; line-height: 1.38; color: var(--tinta); text-wrap: pretty; }

  /* os botões grossos: o Avançar e o Começar em laranja, com a sombra embaixo e o aperto de verdade */
  #game #hud .g-panel .pbt { --bh: 44px; border: 2.5px solid var(--borda); border-image: none; border-radius: 999px; padding: 0 18px 2px; min-width: 0; height: var(--bh);
    background: linear-gradient(180deg, #f2834f, var(--laranja) 55%, #d85a2c); color: #fff7e6; text-shadow: 0 1px 0 rgba(90, 30, 10, .45); font-size: 13px; letter-spacing: .12em;
    filter: none; box-shadow: inset 0 2px 0 rgba(255, 220, 190, .55), var(--sombra); transition: transform .1s ease, box-shadow .1s ease; }
  #game #hud .g-panel .pbt::before, #game #hud .g-panel .pbt.pbt::before { content: none; animation: none; }
  #game #hud .g-panel .pbt:hover, #game #hud .g-panel .pbt:focus-visible { transform: none; filter: brightness(1.06); outline: none; }
  #game #hud .g-panel .pbt:active { transform: translateY(3px); box-shadow: inset 0 2px 0 rgba(255, 220, 190, .55), 0 1px 0 var(--borda-2); }
  #game #hud .g-panel .pbt:focus-visible { outline: 3px solid var(--ouro-2); outline-offset: 3px; }
  #hud .g-panel .g-avanca { position: absolute; right: 0; left: auto; top: auto; bottom: 2px; translate: none; animation: none; }
  #game #hud .g-panel .g-next { align-self: stretch; flex: none; width: 100%; --bh: 48px; font-size: 14px; animation: none; }

  /* as escolhas: placas brancas e grossas, uma por linha, com a seta numa bolinha à direita */
  #hud .g-panel .choices { grid-template-columns: 1fr; gap: 9px; width: 100%; padding-bottom: 4px; }
  #hud .g-panel .choice { min-height: 52px; padding: 8px 50px 9px 14px; border: 2.5px solid var(--borda); border-radius: 16px; border-image: none;
    background: #fff; box-shadow: var(--sombra); display: grid; align-content: center; justify-items: start; text-align: left; text-wrap: balance;
    font-family: var(--f-text); font-weight: 700; font-size: 17px; line-height: 1.15; color: var(--tinta); text-shadow: none; filter: none; transition: background .12s ease, transform .1s ease, box-shadow .1s ease; }
  #hud .g-panel .choice::before { content: none; }
  #hud .g-panel .choice::after { content: ""; position: absolute; right: 10px; top: 50%; width: 30px; height: 30px; margin-top: -15px; border-radius: 50%; transform: none; border: 0;
    background: var(--ouro) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233e220c' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E") center / 16px no-repeat;
    box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .18); }
  #hud .g-panel .choice:hover { background: #fff3d6; transform: none; filter: none; }
  #hud .g-panel .choice:focus-visible { outline: 3px solid var(--ouro-2); outline-offset: 2px; transform: none; filter: none; }
  #hud .g-panel .choice:active, #hud .g-panel .choice.picked { background: var(--ouro-2); transform: translateY(3px); box-shadow: 0 1px 0 var(--borda-2); filter: none; }
  #hud .g-panel .choice.gone { opacity: .35; filter: grayscale(.5); }
  #hud .g-panel .choice .hints { top: 6px; right: 46px; }
  /* o risco do dado: um selo verde-mar com o atributo e o número */
  #hud .g-panel .choice .choice-dado { margin-top: 5px; padding: 2px 10px 3px; border-radius: 99px; background: var(--mar); color: #fff7e6; font-family: var(--f-caps); font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-shadow: none; }

  /* ---------- as ações rápidas no cartão, no lugar da fala; o portal fica livre ---------- */
  #hud .g-panel:has(.qte) { justify-content: center; }
  #hud .g-panel:has(.qte) > .g-bubble { display: none; }
  #hud .g-panel .qte.glass { zoom: 1; width: 100%; max-width: none; margin: 0; padding: 6px 4px; gap: 10px; background: none; border: 0; box-shadow: none; filter: none; transform: none; }
  #hud .g-panel .qte.glass .qte-label { font-size: 14px; font-weight: 700; letter-spacing: .06em; line-height: 1.35; color: var(--tinta); text-wrap: balance; white-space: normal; }
  #hud .g-panel .qte.glass .qte-big { font-size: 30px; line-height: 1.05; color: var(--laranja-2); }
  #hud .g-panel .qte-acha .acha-lista { gap: 8px; flex-wrap: wrap; justify-content: center; }
  #hud .g-panel .qte-acha .acha-lista span { border: 2.5px solid var(--borda); border-radius: 14px; background: #fff; box-shadow: var(--sombra); }
  #hud .g-panel .qte-acha .acha-lista span.ok { background: var(--ouro-2); opacity: 1; }
  #hud .g-panel .qte-acha .acha-lista img { width: 46px; height: 46px; }
  #hud .g-panel .qte.glass:not(.qte-monta, .qte-seq, .qte-ouvido) { padding-inline: 6%; }
  #hud .g-panel .qte.qte-acha { position: static; inset: auto; transform: none; width: 100%; z-index: auto; }
  #hud .g-panel .qte.glass:is(.qte-monta, .qte-seq, .qte-ouvido) { height: 100%; padding: 10px 8px; justify-content: center; }
  /* a sequência termina acima das setas dos polegares */
  #hud:has(> .polegares) .g-panel { max-height: calc(var(--d-h) - 128px); top: calc(var(--d-y) + 8px + (var(--d-h) - 124px) / 2); }
  /* depois da escolha, a pergunta e as placas saem e a resposta do guia ganha o cartão inteiro */
  #hud .g-panel:has(.choice.picked) > :not(.g-bubble) { display: none; }
  /* o equilíbrio e as barras cabem na largura do cartão */
  #hud .g-panel .qte .eq-track, #hud .g-panel .qte .qte-track { width: min(300px, calc(var(--d-w) - 64px)); max-width: 100%; }
  #hud .g-panel .qte.glass:has(.eq-track) { padding-inline: 4%; }
  /* o quebra-cabeça da paisagem cabe no cartão, pela largura e pela altura */
  #hud .g-panel .qte-monta .monta { width: min(calc(var(--d-w) - 40px), calc((var(--d-h) - 160px) * 1.6)); }
  #hud .g-panel .qte-monta .monta-caixa { max-width: 100%; }
}

/* ---------- as janelas, deitado ---------- */
@media (orientation: landscape) and (max-height: 520px) {
  /* a apresentação do Ybytu: o nome numa linha no alto, o papel inteiro embaixo, e o Ybytu à direita, de corpo inteiro */
  #modalRoot .modal.pul-cena { padding: calc(max(6px, var(--sat)) + 58px) 39vw max(8px, var(--sab)) max(14px, var(--sal)); place-items: stretch; }
  #modalRoot .pul-cena .pul-titulo { top: max(6px, var(--sat)); left: max(14px, var(--sal)); right: 39vw; gap: 0; }
  #modalRoot .pul-cena .pul-olho { font-size: 10px; letter-spacing: .2em; }
  #modalRoot .pul-cena .pul-nome { font-size: 30px; }
  #modalRoot .pul-cena .pul-sub { font-size: 13px; }
  #modalRoot .pul-cena .pul-ybytu.close { height: 100vh; right: -3vw; left: auto; opacity: 1; translate: none; }
  #modalRoot .pul-cena .modal-card { width: 100%; height: 100%; max-height: 100%; padding: 20px 46px 12px 50px; display: flex; flex-direction: column; }
  #modalRoot .pul-cena .modal-card .parch-scroll { flex: 1 1 auto; min-height: 0; max-height: none; display: flex; flex-direction: column; padding: 0 4px; overflow: hidden; }
  #modalRoot .pul-cena .pe-corpo { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: block; }
  #modalRoot .pul-cena .pe-corpo > p { font-size: 15px; line-height: 1.38; margin: 0 0 6px; padding-right: 26px; }
  #modalRoot .pul-cena .modal-actions { flex: none; margin-top: 6px; }
  #modalRoot .pul-cena .modal-actions .btn { min-height: 42px; }
  #modalRoot .pul-cena .modal-close { --t: 34px; }
}

/* ---------- vire o celular ----------
   por cima de tudo, a baía antiga escurecida; o Ybytu aponta para um celular de latão que deita sozinho, e embaixo
   o pedido, o botão de tela cheia (ou a dica do iPhone) e a saída discreta para continuar em pé */
.vire { position: fixed; inset: 0; z-index: 2147483000; display: grid; place-items: center; padding: max(20px, var(--sat)) max(22px, var(--sar)) max(22px, var(--sab)) max(22px, var(--sal));
  background: #050b10 url("../assets/maq/espera.webp") center / cover no-repeat; color: #fff3d6; text-align: center; }
.vire[hidden] { display: none; }
.vire-veu { position: absolute; inset: 0; background: radial-gradient(120% 80% at 50% 35%, rgba(5, 11, 16, .45), rgba(5, 11, 16, .92) 75%); }
.vire-corpo { position: relative; display: grid; justify-items: center; gap: 14px; width: min(360px, 100%); }
.vire-cena { position: relative; width: 100%; height: clamp(170px, 34vh, 250px); }
.vire-ybytu { position: absolute; left: 4%; bottom: 0; height: 100%; width: auto; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .6)); }
.vire-cel { position: absolute; right: 8%; top: 22%; width: 62px; height: 112px; border-radius: 14px; border: 4px solid #d9a74a;
  background: linear-gradient(160deg, rgba(255, 243, 214, .18), rgba(255, 243, 214, .04)); box-shadow: 0 0 0 2px #5a3410, 0 0 22px rgba(240, 200, 120, .45), inset 0 0 12px rgba(240, 200, 120, .25);
  animation: vireGira 2.8s cubic-bezier(.6, 0, .3, 1) infinite; }
.vire-cel i { position: absolute; left: 50%; bottom: 7px; width: 16px; height: 4px; margin-left: -8px; border-radius: 4px; background: #d9a74a; }
@keyframes vireGira { 0%, 18% { transform: rotate(0); } 52%, 80% { transform: rotate(-90deg); } 100% { transform: rotate(0); } }
.vire h2 { margin: 0; font-family: var(--f-caps); font-weight: 700; font-size: clamp(28px, 8vw, 36px); line-height: 1.05; letter-spacing: .04em; text-transform: uppercase; color: #fff3d6;
  text-shadow: 0 3px 0 rgba(60, 30, 10, .9), 0 0 24px rgba(240, 190, 110, .4); text-wrap: balance; }
.vire-txt { margin: 0; max-width: 30ch; font-family: var(--f-text); font-size: 18px; line-height: 1.38; color: #f3e6d0; text-shadow: 0 1px 3px #000; text-wrap: balance; }
.vire-cheia { --bh: 54px; min-width: 240px; gap: 10px; }
.vire-cheia .ico { width: 18px; height: 18px; background: currentColor; }
.vire-ios { margin: 0; max-width: 32ch; padding: 10px 16px; border: 1px solid rgba(240, 200, 120, .45); border-radius: 12px; background: rgba(20, 12, 6, .55);
  font-family: var(--f-text); font-size: 15px; line-height: 1.35; color: #f0c878; text-wrap: balance; }
.vire-fica { margin-top: 2px; padding: 10px 14px; border: 0; background: none; font-family: var(--f-text); font-size: 15px; color: rgba(243, 230, 208, .78); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.vire-fica:focus-visible, .vire-cheia:focus-visible { outline: 2px solid #f0c878; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .vire-cel { animation: none; transform: rotate(-90deg); } }

/* ---------- em pé (para quem preferir) ----------
   o portal enche a tela; no alto, a faixa do diário no mesmo papel do guia, com o ano, o lugar e a última anotação */
@media (max-width: 900px) and (orientation: portrait) {
  #hud .g-stats { background: url("../assets/mural-papel.webp") center / 100% 100% no-repeat; border: 0; border-radius: 0; box-shadow: none;
    -webkit-backdrop-filter: none; backdrop-filter: none; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .55)); color: #2a160c; padding: 10px 16px; }
  #hud .g-stats .g-year { color: #24130b; text-shadow: none; }
  #hud .g-stats .g-where, #hud .g-stats .g-era { color: #3a2214; }
  #hud .g-stats.tela .dest { color: #3a2414; background: rgba(255, 250, 235, .55); border-color: rgba(122, 58, 20, .28); }
  #hud .g-stats.tela .dest-txt small { color: rgba(58, 36, 20, .62); }
}

/* ---------- o cais, deitado: o letreiro e as cinco placas cabem inteiros até na tela mais baixa ---------- */
@media (orientation: landscape) and (max-height: 520px) {
  #street .home-col { gap: 4px; padding-left: max(14px, var(--sal)); }
  #street .placa { width: min(82%, 46vh); }
  #street .street-menu { gap: 4px; }
  #street .menu-item, #street .home-portao .pbt { --bh: clamp(31px, 9.6vh, 38px); }
  #street .menu-item.is-main { --bh: clamp(36px, 11vh, 44px); }
}

/* ---------- o Livro dos Viajantes, deitado: as abas numa linha e mais nomes à vista ---------- */
@media (orientation: landscape) and (max-height: 520px) {
  #modalRoot .lv-dir .tabs button { white-space: nowrap; font-size: 10px; letter-spacing: .06em; padding-inline: 4px; }
  #modalRoot .lv-cartao { padding: 8px 12px; gap: 4px; }
  #modalRoot .lv-cartao-txt b { font-size: 14px; }
  #modalRoot .lv-cartao-txt span { font-size: 12.5px; line-height: 1.25; }
  #modalRoot .lv-cartao .btn { min-height: 36px; font-size: 11px; }
}

/* ---------- a balança, o resumo e a sequência, deitado ---------- */
@media (orientation: landscape) and (max-height: 520px) {
  /* a balança: a fala sobe e encurta, e o Decidir fica sempre à vista */
  #modalRoot .modal.bz-modal { padding: 6px max(8px, var(--sar)) 6px max(8px, var(--sal)); }
  #modalRoot .modal.bz-modal .modal-card { max-height: calc(100dvh - 12px); padding: 12px 26px 10px; }
  #modalRoot .bz { row-gap: 6px; }
  #modalRoot .bz-fala { margin-top: 26px; font-size: 14px; line-height: 1.3; max-width: 32ch; }
  #modalRoot .bz-mesa { gap: 6px; }
  #modalRoot .bz-mesa .bz-peso { padding: 3px 9px 3px 3px; font-size: 12px; }
  #modalRoot .bz-mesa .bz-peso i { width: 24px; height: 24px; }
  #modalRoot .bz-decide.pbt { --bh: 40px; min-width: 160px; font-size: 13px; }
  #modalRoot .bz-palco { --w: min(380px, 44vw, calc((100dvh - 96px) / .9)); }

  /* o resumo da viagem é a tela inteira: o painel de bolso sai de baixo dele */
  #hud:has(.g-summary.on) > :not(.g-summary) { visibility: hidden !important; opacity: 0 !important; pointer-events: none !important; }
  #game .g-summary .sum-actions .btn-primary { min-width: 0; padding-inline: 10px; font-size: 11.5px; letter-spacing: .04em; white-space: nowrap; }
  #game .g-summary .sum-ic { grid-template-columns: repeat(3, 42px); gap: 6px; }
  #game .g-summary .sum-ic button { min-height: 44px; }

  /* a sequência: o tabuleiro termina acima das setas dos polegares */
  #hud:has(> .polegares) .g-panel:has(.qte-seq) { bottom: calc(max(6px, var(--sab)) + 104px); }
}
@media (max-width: 900px) and (orientation: portrait) {
  /* a apresentação do Ybytu em pé: o nome, o papel e os rostos sem encostar uns nos outros */
  #modalRoot .modal.pul-cena { padding: calc(15vh + 34px) 12px 216px; }
}

/* ---------- a apresentação do Ybytu em qualquer tela de computador ----------
   o papel nunca desce até os rostos: ele cabe no espaço entre o nome e a vitrine, e o texto rola por dentro se
   precisar; os rostos diminuem nas telas baixas; o título da vitrine ganha sombra para ler sobre a baía; sem o X
   (a janela fecha pelo botão dela) */
#modalRoot .pul-cena .modal-close { display: none; }
#modalRoot .modal.pul-cena { align-items: stretch; }
#modalRoot .pul-cena .modal-card { max-height: 100%; display: flex; flex-direction: column; align-self: center; }
#modalRoot .pul-cena .modal-card .parch-scroll { flex: 1 1 auto; min-height: 0; max-height: none; display: flex; flex-direction: column; }
#modalRoot .pul-cena .pe-corpo { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
#modalRoot .pul-cena .pe-vitrine-tit { text-shadow: 0 2px 3px #000, 0 0 12px rgba(0, 0, 0, .9), 0 0 24px rgba(0, 0, 0, .7); }
#modalRoot .pul-cena .pe-vitrine .pe-vidas button { --m: min(clamp(48px, calc((100vw - var(--col-e) - var(--col-d) - 9 * clamp(6px, 1vw, 16px)) / 10), 96px), 9.5vh); }
#modalRoot .pul-cena .pe-vitrine .pe-vidas button em { text-shadow: 0 1px 2px #000, 0 0 8px rgba(0, 0, 0, .8); }
@media (orientation: landscape) and (min-height: 521px) {
  #modalRoot .pul-cena .modal-card { max-height: calc(100vh - var(--topo) - var(--vit) - 8px); }
}
@media (orientation: landscape) and (min-height: 521px) {
  /* a faixa reservada embaixo é a altura de verdade da vitrine: título, rostos e nomes */
  #modalRoot .modal.pul-cena { --vit: calc(min(96px, 9.5vh) * 1.16 + 124px); }
}

/* o Ybytu que entra rindo pelo canto: sempre do tamanho certo e dentro da tela (uma regra antiga dava altura 100% à
   imagem, e ela aparecia no tamanho original) */
.pul-toasty { --tw: min(46vh, 30vw, 380px); width: var(--tw); height: auto; bottom: calc(var(--tw) * -.06); }
/* a imagem termina no short: a base fica sempre abaixo da borda da tela, e nunca se vê onde o recorte acaba */
@media (max-width: 900px) and (orientation: portrait) { .pul-toasty { --tw: min(36vh, 52vw); } }
.pul-toasty img { width: 100%; height: auto; }
@media (orientation: landscape) and (max-height: 520px) { .pul-toasty { --tw: min(40vh, 19vw, 160px); } }

/* a balança em telas de computador baixas: a balança diminui um pouco e o Decidir fica sempre à vista */
@media (orientation: landscape) and (min-height: 521px) and (max-height: 820px) {
  #modalRoot .bz-palco { --w: min(460px, 44vw, calc((100dvh - 300px) / .86)); }
  #modalRoot .bz-fala { margin-top: 30px; }
  #modalRoot .bz { row-gap: 8px; }
  #modalRoot .bz-decide.pbt { --bh: 48px; }
}

/* o fim da viagem: o Viajar de novo cabe inteiro, e cada botão ao lado diz o que é (Mural, Livro, Sair) embaixo do ícone */
@media (orientation: landscape) and (max-height: 700px) {
  #game .g-summary .sum-actions { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
  #game .g-summary .sum-actions .btn-primary { min-width: 0; padding-inline: 12px; font-size: 12px; letter-spacing: .05em; white-space: nowrap; }
  #game .g-summary .sum-ic { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  #game .g-summary .sum-ic button { min-height: 50px; padding: 4px 2px 5px; display: grid; justify-items: center; align-content: center; gap: 3px; }
  #game .g-summary .sum-ic button:not(.sum-partilha) span:not(.ico) { display: block; font-size: 10px; letter-spacing: .04em; line-height: 1; white-space: nowrap; }
}

/* o resumo bem dividido: à esquerda, a história e, no pé do papel, os pontos da viagem; à direita, a linha do tempo,
   as fontes e os botões, com espaço para cada um dizer o que é */
@media not ((orientation: portrait) and (max-width: 900px)) {
  #game .g-summary .sum-card:not(.sum-dir) { display: flex; flex-direction: column; }
  #game .g-summary .sum-card:not(.sum-dir) .sum-placar { margin-top: auto; }
  #game .g-summary .sum-dir { display: flex; flex-direction: column; }
  #game .g-summary .sum-dir .sum-actions { margin-top: auto; }
}

/* o dado no computador: a caixa fica à direita, centrada na altura da tela, sem sair pela borda de baixo */
@media (min-width: 901px) and (min-height: 521px) {
  #hud .g-panel:has(.dado-box) { top: 50%; bottom: auto; translate: 0 -50%; transform: none; }
  #hud .g-panel .dado-box.qte-lado { --lado: clamp(120px, 21vh, 200px); padding: 22px 28px; gap: 8px; }
  #hud .g-panel .dado-box.qte-lado .qte-label { font-size: 22px; }
  #hud .g-panel .dado-box.qte-lado .dado-regra { font-size: 19px; }
}
/* deitado no celular, o dado fica no papel da direita, como as outras ações */
@media (orientation: landscape) and (max-height: 520px) {
  #hud .g-panel .dado-box.qte-lado { --lado: min(30vh, 120px); width: 100%; padding: 6px 4px; gap: 4px; background: none; filter: none; box-shadow: none; }
  #hud .g-panel .dado-box .qte-label { font-size: 16px; } #hud .g-panel .dado-box .dado-regra { font-size: 13px; }
  #hud .g-panel .dado-box .dado-joga, #hud .g-panel .dado-box .dado-fim { min-height: 38px; font-size: 12px; }
}

/* ---------- em pé, a mesma língua limpa do deitado ----------
   o papel rasgado sai: o diário no alto, a fala e as ações embaixo viram cartões de papel liso, e as escolhas são
   placas claras, uma por linha, com a seta à direita */
@media (max-width: 900px) and (orientation: portrait) {
  #hud { --papel: #f6ecd8; --papel-2: #ecdcbc; --tinta: #2a160c; --linha: rgba(122, 74, 30, .3); --marca: #c8642e; }
  #hud .g-stats, #hud .g-panel > .g-bubble.glass, #hud .g-panel .qte.glass, #hud .g-panel .qte.dado-box { background: linear-gradient(180deg, var(--papel), var(--papel-2)); border: 1px solid var(--linha); border-radius: 16px;
    box-shadow: 0 10px 26px rgba(0, 0, 0, .55); filter: none; }
  #hud .g-panel > .g-bubble::before { color: var(--marca); }
  #hud .g-panel .g-say { color: var(--tinta); line-height: 1.4; }
  #hud .g-panel .choices { grid-template-columns: 1fr; gap: 8px; }
  #hud .g-panel .choice { min-height: 54px; padding: 8px 40px 8px 14px; border: 1.5px solid rgba(122, 74, 30, .45); border-radius: 12px; border-image: none;
    background: #fffaf0; box-shadow: 0 2px 0 rgba(122, 74, 30, .28), 0 8px 18px rgba(0, 0, 0, .35); display: grid; align-content: center; justify-items: start; text-align: left;
    font-family: var(--f-text); font-weight: 600; font-size: 16px; line-height: 1.2; color: var(--tinta); text-shadow: none; filter: none; }
  #hud .g-panel .choice::before { content: none; }
  #hud .g-panel .choice::after { content: ""; position: absolute; inset: 50% 16px auto auto; width: 9px; height: 9px; margin-top: -5px; border: solid var(--marca); border-width: 2px 2px 0 0; transform: rotate(45deg); background: none; }
  #hud .g-panel .choice:hover, #hud .g-panel .choice:focus-visible { background: #fbe9c2; border-color: var(--marca); outline: none; transform: none; filter: none; }
  #hud .g-panel .choice:active, #hud .g-panel .choice.picked { background: #f0c878; border-color: var(--marca); transform: translateY(1px); filter: none; }
  #hud .g-panel .choice .choice-dado { margin-top: 5px; padding: 2px 9px; border-radius: 99px; background: #3a2210; color: #f0c878; font-family: var(--f-caps); font-size: 10.5px; letter-spacing: .1em; text-shadow: none; }
}

/* o fim da viagem deitado: o Viajar de novo numa linha inteira e, embaixo, os três atalhos dividindo a largura, cada
   um com o nome inteiro */
@media (orientation: landscape) and (max-height: 520px) {
  #game .g-summary .sum-dir .sum-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; width: 100%; }
  #game .g-summary .sum-actions .btn-primary { width: 100%; min-width: 0; min-height: 44px; padding-inline: 12px; font-size: 13px; letter-spacing: .08em; white-space: nowrap; }
  #game .g-summary .sum-ic { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; width: 100%; }
  #game .g-summary .sum-ic button { width: 100%; min-width: 0; min-height: 46px; padding: 4px 2px; display: grid; justify-items: center; align-content: center; gap: 3px; }
  #game .g-summary .sum-ic button span:not(.ico) { display: block; font-size: 10px; letter-spacing: .04em; line-height: 1; white-space: nowrap; }
}

/* os ícones das anotações de escolha têm sempre o tamanho da letra (em pé, sem esta regra, saíam gigantes) */
#hud .nota-marca, #hud .nota-fx svg { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
#hud .nota-fx { display: inline-flex; align-items: center; gap: .15em; }

/* em pé, as janelas simples (como a de sair) cabem na largura: os botões quebram a linha em vez de empurrar o papel */
@media (max-width: 900px) and (orientation: portrait) {
  #modalRoot .modal:not(.pul-cena) { padding-inline: 12px; }
  #modalRoot .modal:not(.pul-cena) .modal-card { max-width: calc(100vw - 24px); box-sizing: border-box; }
  #modalRoot .modal:not(.pul-cena) .modal-actions .btn { white-space: normal; min-width: 0; max-width: 100%; letter-spacing: .06em; line-height: 1.15; }
}
/* no toque, a escolha com o foco que o jogo põe não parece já escolhida: só o contorno marca o foco */
@media (pointer: coarse) {
  #hud .g-panel .choice:focus-visible:not(:hover) { background: #fffaf0; border-color: rgba(122, 74, 30, .45); outline: 2px solid rgba(200, 100, 46, .55); outline-offset: 2px; }
}
@media (orientation: landscape) and (max-height: 520px) {
  #hud .g-tools .icon-btn { width: 44px; height: 44px; }
}

/* no computador, o balão do Ybytu parado sobe acima da bancada: ele não cobre as placas das escolhas */
@media (min-width: 901px) and (min-height: 521px) {
  .yb-chama-balao { margin-bottom: max(120px, 36vh); }
}

/* ---------- as janelas, deitado, na mesma moldura do jogo: cartão creme de borda grossa, o título numa fita laranja
   presa no alto e o X redondo no canto (o papel rasgado e os ornamentos ficam para o computador) ---------- */
@media (orientation: landscape) and (max-height: 520px) {
  :root { --j-creme: #fff7e6; --j-creme-2: #f6e6c4; --j-borda: #5a3414; --j-borda-2: #3e220c; --j-laranja: #e8683a; --j-ouro-2: #f6d27e; }
  #modalRoot .modal:not(.pul-cena, .bz-modal, .lt-modal, .lp-modal, .om-modal) { padding: 22px max(14px, var(--sar)) 10px max(14px, var(--sal)); }
  #modalRoot .modal:not(.pul-cena) .modal-card.parch { background: var(--j-creme); border: 3px solid var(--j-borda); border-radius: 24px; filter: none; animation: celJanela .35s cubic-bezier(.2, 1.3, .4, 1) both;
    box-shadow: inset 0 0 0 4px var(--j-creme-2), 0 6px 0 var(--j-borda-2), 0 20px 44px rgba(0, 0, 0, .55); }
  #modalRoot .modal:not(.pul-cena, .bz-modal, .lt-modal, .lp-modal, .om-modal) .modal-card.parch { padding: 30px 24px 16px; max-height: calc(100dvh - 34px); overflow: visible; }
  @keyframes celJanela { from { opacity: 0; scale: .92; } }
  #modalRoot .modal:not(.pul-cena) .modal-card.parch .orn, #modalRoot .modal:not(.pul-cena) .modal-card.parch .orn-div { display: none; }
  #modalRoot .modal:not(.pul-cena, .bz-modal, .lt-modal, .lp-modal, .om-modal) .modal-card.parch .parch-scroll { max-height: calc(100dvh - 84px); overflow-y: auto; overscroll-behavior: contain; }
  #modalRoot .modal:not(.pul-cena, .bz-modal, .lt-modal, .lp-modal, .om-modal) .modal-card.parch h2 { position: relative; z-index: 3; display: block; width: fit-content; max-width: calc(100% - 60px); margin: -8px auto 12px; padding: 5px 20px 6px;
    background: var(--j-laranja); -webkit-background-clip: border-box; background-clip: border-box; color: #fff7e6; filter: none; border: 2.5px solid var(--j-borda); border-radius: 12px;
    box-shadow: 0 4px 0 var(--j-borda-2); font-size: 14px; line-height: 1.15; letter-spacing: .1em; text-align: center; text-wrap: balance; white-space: normal; }
  #modalRoot .modal:not(.pul-cena) .modal-card.parch .modal-close { --t: 42px; top: -16px; right: -14px; border: 2.5px solid var(--j-borda); background: var(--j-laranja); color: #fff7e6; box-shadow: 0 4px 0 var(--j-borda-2); }
  #modalRoot .modal:not(.pul-cena) .modal-card.parch p { font-weight: 600; font-size: max(15px, 1em); line-height: 1.35; }
  /* os botões das janelas: os mesmos botões grossos do cartão */
  #modalRoot .modal:not(.pul-cena) .pbt { --bh: 44px; border: 2.5px solid var(--j-borda); border-image: none; border-radius: 999px; padding: 0 20px 2px; min-width: 0; height: var(--bh);
    background: linear-gradient(180deg, #f2834f, var(--j-laranja) 55%, #d85a2c); color: #fff7e6; text-shadow: 0 1px 0 rgba(90, 30, 10, .45); font-size: 13px; filter: none;
    box-shadow: inset 0 2px 0 rgba(255, 220, 190, .55), 0 4px 0 var(--j-borda-2); }
  #modalRoot .modal:not(.pul-cena) .pbt::before { content: none; animation: none; }
  /* os botões de texto (btn) seguem a mesma regra: o principal laranja, o outro branco */
  #game #hud .g-panel .btn-primary, #modalRoot .modal:not(.pul-cena) .btn-primary { min-height: 44px; padding: 0 20px 2px; border: 2.5px solid var(--j-borda); border-radius: 999px;
    background: linear-gradient(180deg, #f2834f, var(--j-laranja) 55%, #d85a2c); color: #fff7e6; text-shadow: 0 1px 0 rgba(90, 30, 10, .45); font-family: var(--f-caps); font-weight: 700; letter-spacing: .1em;
    box-shadow: inset 0 2px 0 rgba(255, 220, 190, .55), 0 4px 0 var(--j-borda-2); filter: none; }
  #modalRoot .modal:not(.pul-cena) .btn-ghost { min-height: 44px; padding: 0 20px 2px; border: 2.5px solid var(--j-borda); border-radius: 999px; background: #fff; color: #2a160c; text-shadow: none;
    box-shadow: 0 4px 0 var(--j-borda-2); filter: none; }
  #game #hud .g-panel .btn-primary:active, #modalRoot .modal:not(.pul-cena) .btn-primary:active, #modalRoot .modal:not(.pul-cena) .btn-ghost:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--j-borda-2); }
  #modalRoot .modal:not(.pul-cena) .pbt:active { transform: translateY(3px); box-shadow: inset 0 2px 0 rgba(255, 220, 190, .55), 0 1px 0 var(--j-borda-2); }
  /* a dica que aponta para uma parte da tela */
  .dica { background: var(--j-creme); border: 3px solid var(--j-borda); border-radius: 18px; box-shadow: 0 5px 0 var(--j-borda-2), 0 16px 30px rgba(0, 0, 0, .5); filter: none; color: #2a160c; font-weight: 600; }
}

/* celular estreito deitado: a pílula do diário fica só com o ano e o número, para caber ao lado dos pontos */
@media (orientation: landscape) and (max-height: 520px) and (max-width: 720px) {
  #hud:not(.diario-on) .g-stats .g-where { display: none; }
  #hud:not(.diario-on) .g-stats { max-width: none; }
  #hud:not(.diario-on) .g-stats .g-when { flex: none; }
}

/* a linha do tempo deitada: o cartão cabe na altura da tela e o título vira a fita do alto */
@media (orientation: landscape) and (max-height: 520px) {
  #modalRoot .modal.lt-modal { padding: 22px max(10px, var(--sar)) 8px max(10px, var(--sal)); }
  #modalRoot .lt-modal .modal-card.parch { max-height: calc(100dvh - 30px); overflow: visible; padding: 22px 18px 10px; }
  #modalRoot .lt-modal .modal-card.parch .parch-scroll { max-height: calc(100dvh - 62px); overflow-y: auto; overscroll-behavior: contain; }
  #modalRoot .lt-modal .lt h2 { display: block; position: absolute; z-index: 3; top: -17px; left: 50%; translate: -50% 0; margin: 0; padding: 5px 20px 6px; white-space: nowrap;
    background: var(--j-laranja); -webkit-background-clip: border-box; background-clip: border-box; color: #fff7e6; filter: none; border: 2.5px solid var(--j-borda); border-radius: 12px;
    box-shadow: 0 4px 0 var(--j-borda-2); font-size: 14px; letter-spacing: .1em; }
  #modalRoot .lt-modal .lt { gap: 4px; zoom: .82; }
  #modalRoot .lt-modal .modal-card.parch .parch-scroll { position: static; }
  #modalRoot .lt-modal .lt h2 { zoom: calc(1 / .82); }
}

/* o Seguir escondido enquanto o guia escreve (game.js): o lugar dele fica guardado, para nada pular */
#game .g-next.esconde { visibility: hidden; opacity: 0; pointer-events: none; }

/* no computador, a fala do guia continua no papel da tela de latão; só ganha um canto de grafismo de inspiração
   indígena em cada ponta do papel (o mesmo desenho do celular, nas cores do urucum e do jenipapo). O Avançar fica
   fora do papel, então nenhum botão encosta nos cantos */
@media not (((orientation: portrait) and (max-width: 900px)) or ((orientation: landscape) and (max-height: 520px))) {
  #game #hud .g-bubble::after { inset: 0 calc(-1 * var(--mg, 0px)); border-radius: 6px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Cg transform='rotate(0 22 22)'%3E%3Cg fill='none' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.6'%3E%3Cpath d='M3 34V3h31' stroke='%232b1d16'/%3E%3Cpath d='M9 26V9h17' stroke='%23c4472b'/%3E%3Cpath d='M15 20v-5h5' stroke='%232b1d16'/%3E%3C/g%3E%3Cpath d='M26 11l4 4-4 4-4-4z M15 22l4 4-4 4-4-4z' fill='%23d99a3a'/%3E%3Ccircle cx='40' cy='3' r='2' fill='%23c4472b'/%3E%3Ccircle cx='3' cy='40' r='2' fill='%23c4472b'/%3E%3C/g%3E%3C/svg%3E") left 10px top 10px / clamp(20px, 1.9vw, 30px) no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Cg transform='rotate(90 22 22)'%3E%3Cg fill='none' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.6'%3E%3Cpath d='M3 34V3h31' stroke='%232b1d16'/%3E%3Cpath d='M9 26V9h17' stroke='%23c4472b'/%3E%3Cpath d='M15 20v-5h5' stroke='%232b1d16'/%3E%3C/g%3E%3Cpath d='M26 11l4 4-4 4-4-4z M15 22l4 4-4 4-4-4z' fill='%23d99a3a'/%3E%3Ccircle cx='40' cy='3' r='2' fill='%23c4472b'/%3E%3Ccircle cx='3' cy='40' r='2' fill='%23c4472b'/%3E%3C/g%3E%3C/svg%3E") right 10px top 10px / clamp(20px, 1.9vw, 30px) no-repeat,
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Cg transform='rotate(180 22 22)'%3E%3Cg fill='none' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.6'%3E%3Cpath d='M3 34V3h31' stroke='%232b1d16'/%3E%3Cpath d='M9 26V9h17' stroke='%23c4472b'/%3E%3Cpath d='M15 20v-5h5' stroke='%232b1d16'/%3E%3C/g%3E%3Cpath d='M26 11l4 4-4 4-4-4z M15 22l4 4-4 4-4-4z' fill='%23d99a3a'/%3E%3Ccircle cx='40' cy='3' r='2' fill='%23c4472b'/%3E%3Ccircle cx='3' cy='40' r='2' fill='%23c4472b'/%3E%3C/g%3E%3C/svg%3E") right 10px bottom 10px / clamp(20px, 1.9vw, 30px) no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Cg transform='rotate(270 22 22)'%3E%3Cg fill='none' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.6'%3E%3Cpath d='M3 34V3h31' stroke='%232b1d16'/%3E%3Cpath d='M9 26V9h17' stroke='%23c4472b'/%3E%3Cpath d='M15 20v-5h5' stroke='%232b1d16'/%3E%3C/g%3E%3Cpath d='M26 11l4 4-4 4-4-4z M15 22l4 4-4 4-4-4z' fill='%23d99a3a'/%3E%3Ccircle cx='40' cy='3' r='2' fill='%23c4472b'/%3E%3Ccircle cx='3' cy='40' r='2' fill='%23c4472b'/%3E%3C/g%3E%3C/svg%3E") left 10px bottom 10px / clamp(20px, 1.9vw, 30px) no-repeat,
      radial-gradient(120% 90% at 50% 50%, transparent 60%, rgba(95, 240, 255, .14)); }
}

/* o treino do dado no computador de tela baixa: a janela cabe inteira, sem rolagem, com o Jogar o dado à vista */
@media (min-height: 521px) and (max-height: 820px) {
  .treino .dado-box.qte-lado { --lado: clamp(76px, 12dvh, 110px); }
  .modal-card.parch .treino p { line-height: 1.3; }
  .treino { gap: 4px; }
  .treino-modal .modal-card.parch .orn-div { margin: 0 0 4px; }
}

/* o "ache no visor" com cenário próprio: a imagem enche o visor redondo, e cada alvo certo acende ao ser achado */
.acha-camada.acha-cenario { border-radius: 50%; overflow: hidden; background: center / cover no-repeat; box-shadow: inset 0 0 40px rgba(20, 8, 2, .45); }
.acha-alvo-cena { position: absolute; translate: -50% -50%; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.acha-alvo-cena.achou { box-shadow: 0 0 0 3px #ffd36a, 0 0 22px 4px rgba(255, 211, 106, .85); animation: achaAcende .5s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes achaAcende { from { scale: .6; opacity: 0; } }

/* o diário: ao passar o mouse, o nome continua legível. A marca-texto fica mais clara, e o "Ler" vai para a linha de
   baixo (a do tipo e do ano), sem nunca cobrir o fim do nome */
#hud .caderno .dest-txt b span { background-image: linear-gradient(transparent 58%, rgba(255, 214, 96, .42) 58% 90%, transparent 90%); }
#hud .caderno .dest-txt b { color: #24140a; }
#hud .caderno .dest-ler { top: auto; bottom: calc((var(--linha) - 1.1em) / 2); background: linear-gradient(90deg, transparent, #f3e6c8 .8em); }

/* o mural: a polaroide de uma viagem feita é um botão que abre o resumo rápido dela */
.polaroid.pol-viva { cursor: pointer; transition: transform .2s ease, box-shadow .2s ease; }
.polaroid.pol-viva:hover, .polaroid.pol-viva:focus-visible { transform: rotate(0deg) translateY(-4px) scale(1.03); box-shadow: 0 10px 24px rgba(40, 20, 6, .35); outline: none; }
.polaroid.pol-viva:focus-visible { outline: 3px solid #c8642e; outline-offset: 3px; }
.mural-conquistas { margin-top: -4px; font-weight: 700; color: #7a3a14; }
/* o resumo rápido da viagem */
.rv { display: grid; gap: 6px; text-align: left; }
.rv-topo { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; margin-bottom: 4px; }
.rv-foto { display: block; width: 110px; padding: 6px 6px 18px; background: #fffaf0; box-shadow: 0 4px 12px rgba(40, 20, 6, .35); rotate: -3deg; }
.rv-foto canvas { display: block; width: 100%; aspect-ratio: 1; }
.modal-card.parch .rv h2 { margin: 0; font-size: clamp(22px, 2.6vw, 30px); text-align: left; }
.rv-onde { margin: 2px 0 6px; font-style: italic; color: #5a3a22; }
.rv-legado { display: inline-grid; gap: 0; margin: 0; padding: 6px 14px; border: 1.5px solid rgba(122, 74, 30, .45); border-radius: 12px; background: rgba(255, 250, 235, .7); }
.rv-legado small { font-family: var(--f-caps); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: #c8642e; }
.rv-legado b { font-family: var(--f-caps); font-size: 15px; color: #3a2210; }
.rv h3 { margin: 10px 0 0; font-family: var(--f-caps); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: #8a4a1c; }
.rv p { margin: 0; font-size: 17px; line-height: 1.4; }
.rv-linha { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 4px; }
.rv-linha li { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 8px; align-items: baseline; font-size: 16px; }
.rv-linha b { font-family: var(--f-caps); color: #7a3a14; }
.rv-pontos { margin-top: 10px !important; font-family: var(--f-caps); font-weight: 700; color: #7a3a14; text-align: right; }

/* os grafismos das janelas de papel (tools/build_ornamentos.py): discretos, como pintura no papel, e a cuia menor,
   longe do título */
.modal-card.parch .orn { opacity: .72; }
.modal-card.parch .orn-sol { width: 13%; top: 4.2%; right: 4.2%; opacity: .55; }
.modal-card.parch .orn-selo { width: 8.5%; opacity: .7; }
.modal-card.parch .orn-div { opacity: .8; }

/* ---------- os destaques como trilha de tabuleiro ----------
   um caminho de terra serpenteia de uma parada a outra (cada trecho faz uma curva do lado da pedra); em cada parada,
   uma pedra redonda com o ano e as fichas das descobertas, levemente tortas, como cartas largadas no chão */
.ldv-trilha { position: relative; max-width: 780px; margin: 6px auto 0; padding: 4px 0 40px; }
.ldv-trilha .ldv-momento.ldv-parada { position: relative; display: block; padding: 0 0 26px; grid-template-columns: none; animation: none; }
.ldv-trilha .ldv-parada::before { content: ""; position: absolute; z-index: 0; top: 30px; bottom: -30px; left: 34px; right: 34px; pointer-events: none;
  border: 10px solid rgba(176, 122, 58, .28); border-left-color: transparent; border-radius: 0 70px 70px 0; }
.ldv-trilha .ldv-parada.lado-d::before { border-left-color: rgba(176, 122, 58, .28); border-right-color: transparent; border-radius: 70px 0 0 70px; }
.ldv-trilha .ldv-parada:last-of-type::before { border-bottom-color: transparent; border-right-color: transparent; border-left-color: transparent; }
.ldv-pedra { position: relative; z-index: 1; display: grid; place-items: center; width: 68px; height: 68px; border-radius: 46% 54% 50% 50% / 52% 48% 52% 48%;
  background: radial-gradient(circle at 35% 30%, #a77446, #6e4524 70%); border: 3px solid #3e220c; box-shadow: 0 5px 0 #3e220c, 0 10px 18px rgba(40, 20, 6, .35); }
.ldv-pedra b { font-family: var(--f-caps); font-size: 17px; font-weight: 700; color: #fff3d6; text-shadow: 0 1px 0 rgba(0, 0, 0, .5); }
.ldv-parada.lado-e .ldv-pedra { margin-left: 0; }
.ldv-parada.lado-d .ldv-pedra { margin-left: auto; }
.ldv-trilha .ldv-cartoes { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 12px; margin-top: -40px; padding: 0 84px; }
.ldv-parada.lado-e .ldv-cartoes { justify-content: flex-start; }
.ldv-parada.lado-d .ldv-cartoes { justify-content: flex-end; }
.ldv-trilha .dest-cartao { width: min(210px, 100%); rotate: var(--tw, -1.5deg); transition: rotate .2s ease, transform .2s ease; }
.ldv-trilha .dest-cartao:nth-child(2n) { --tw: 1.8deg; }
.ldv-trilha .dest-cartao:nth-child(3n) { --tw: -.6deg; }
.ldv-trilha .dest-cartao:hover, .ldv-trilha .dest-cartao:focus-visible { rotate: 0deg; transform: translateY(-4px); }
.ldv-trilha .dest-cartao .dest-resumo { display: none; }
.ldv-chegada { display: block; width: 26px; height: 26px; margin: -14px auto 0; rotate: 45deg; background: #c8642e; border: 3px solid #3e220c; }
.ldv-momento.vazio .ldv-pedra { opacity: .4; }
@media (max-width: 700px) {
  .ldv-trilha .ldv-parada::before, .ldv-trilha .ldv-parada.lado-d::before { left: 30px; right: auto; width: 0; border: 0; border-left: 8px solid rgba(176, 122, 58, .28); border-radius: 0; }
  .ldv-parada.lado-d .ldv-pedra { margin-left: 0; }
  .ldv-trilha .ldv-cartoes, .ldv-parada.lado-d .ldv-cartoes { margin-top: 10px; padding: 0 0 0 76px; justify-content: flex-start; }
  .ldv-trilha .dest-cartao { width: 100%; }
}

/* a trilha em pintura indígena: o caminho é um traço de urucum pontilhado com uma linha fina de jenipapo por dentro,
   e o ano fica num losango pintado (borda de urucum, contorno tracejado de jenipapo), leve como grafismo no papel */
.ldv-trilha .ldv-parada::before { border: 5px dotted rgba(179, 65, 42, .55); border-left-color: transparent; }
.ldv-trilha .ldv-parada.lado-d::before { border-left-color: rgba(179, 65, 42, .55); border-right-color: transparent; }
.ldv-trilha .ldv-parada::after { content: ""; position: absolute; z-index: 0; top: 39px; bottom: -21px; left: 43px; right: 43px; pointer-events: none;
  border: 1.5px dashed rgba(42, 28, 21, .45); border-left-color: transparent; border-radius: 0 61px 61px 0; }
.ldv-trilha .ldv-parada.lado-d::after { border-left-color: rgba(42, 28, 21, .45); border-right-color: transparent; border-radius: 61px 0 0 61px; }
.ldv-trilha .ldv-parada:last-of-type::before, .ldv-trilha .ldv-parada:last-of-type::after { border-bottom-color: transparent; border-right-color: transparent; border-left-color: transparent; }
.ldv-pedra { width: 76px; height: 76px; border: 0; border-radius: 0; background: none; box-shadow: none; }
.ldv-pedra::before, .ldv-pedra::after { content: ""; position: absolute; inset: 50% auto auto 50%; translate: -50% -50%; rotate: 45deg; pointer-events: none; }
.ldv-pedra::before { width: 52px; height: 52px; background: #fbefd7; border: 3px solid #b3412a; border-radius: 4px; box-shadow: 0 2px 0 rgba(179, 65, 42, .25); }
.ldv-pedra::after { width: 40px; height: 40px; border: 1.5px dashed #2a1c15; border-radius: 2px;
  background: radial-gradient(circle, #c8902e 0 2px, transparent 2.5px) 0 0 / 50% 50%; opacity: .9; }
.ldv-pedra b { position: relative; z-index: 1; font-size: 15px; color: #2a1c15; text-shadow: 0 0 3px #fbefd7, 0 0 6px #fbefd7; }
.ldv-chegada { width: 20px; height: 20px; background: #fbefd7; border: 3px solid #b3412a; box-shadow: inset 0 0 0 3px #fbefd7, inset 0 0 0 6px #2a1c15; }
@media (max-width: 700px) {
  .ldv-trilha .ldv-parada::before, .ldv-trilha .ldv-parada.lado-d::before { left: 36px; border: 0; border-left: 5px dotted rgba(179, 65, 42, .55); }
  .ldv-trilha .ldv-parada::after, .ldv-trilha .ldv-parada.lado-d::after { left: 44px; right: auto; width: 0; border: 0; border-left: 1.5px dashed rgba(42, 28, 21, .45); border-radius: 0; }
}

/* ---------- QA de 08/11: o celular em pé ---------- */
@media (max-width: 900px) and (orientation: portrait) {
  /* o Avançar nunca cobre a fala: a caixa reserva a faixa de baixo para ele quando ele está à vista */
  #hud .g-panel .g-bubble:has(.g-avanca:not(.some)) { padding-bottom: 54px; }
  /* o Ybytu parado fica acima da faixa dos botões de baixo, menor, e o balão cabe na largura da tela */
  .yb-chama { left: 6px; right: 6px; bottom: 112px; }
  .yb-chama-img { width: 92px; margin-bottom: 0; }
  .yb-chama-balao { flex: 1 1 auto; max-width: calc(100vw - 110px); margin: 0 0 40px -4px; padding: 10px 12px 12px; }
  .yb-chama-balao p { font-size: 15px; margin-bottom: 8px; }
  .yb-chama-bts { flex-wrap: wrap; }
  .yb-chama-bts .pbt { --bh: 36px; font-size: 11px; padding: 0 10px 2px; }
  /* os rostos das viagens em duas fileiras, cada nome na largura do seu rosto */
  #modalRoot .pul-cena .pe-vitrine .pe-vidas { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; gap: 4px; padding: 0 12px 6px; scroll-snap-type: x proximity; scrollbar-width: none; }
  #modalRoot .pul-cena .pe-vitrine .pe-vidas button { --m: 46px; width: 68px; flex: none; scroll-snap-align: start; }
  #modalRoot .pul-cena .pe-vitrine .pe-vidas button em { font-size: 9px; letter-spacing: .02em; width: 68px; overflow-wrap: anywhere; }
}

/* ---------- QA de 08/11: o celular deitado ---------- */
@media (orientation: landscape) and (max-height: 520px) {
  /* o quebra-cabeça usa a proporção da imagem de verdade (a carta é em pé), e a miniatura fica fora do texto */
  #hud .g-panel .qte-monta .monta { width: min(calc(var(--d-w) - 40px), calc((var(--d-h) - 170px) * var(--ar, 1.6))); }
  #hud .g-panel .qte-monta .monta-mini { display: none; }
  #hud .g-panel .qte.qte-monta { padding-top: 22px; }
  /* a fita do título fica inteira dentro do papel, sem a borda de cima cortada */
  #modalRoot .modal:not(.pul-cena, .bz-modal, .lt-modal, .lp-modal, .om-modal) .modal-card.parch h2 { margin-top: 2px; }
  /* a placa do Livro vira a mesma fita das outras janelas, com o nome no tamanho de título */
  #modalRoot .modal.lv-livro .modal-card.parch h2.lv-placa { aspect-ratio: auto; height: auto; width: fit-content; padding: 5px 20px 6px; margin: 2px auto 8px; container-type: normal; }
  #modalRoot .modal.lv-livro .modal-card.parch h2.lv-placa span { position: static; height: auto; font-size: 14px; letter-spacing: .1em; color: #fff7e6; }
  /* a plaquinha do "ache" aponta de baixo, longe do cartão do ano */
  .acha-placa { top: auto; bottom: 14px; translate: -50% 0; animation-name: achaPlacaBaixo; }
  .acha-placa::after { bottom: auto; top: -13px; border-top: 0; border-bottom: 9px solid #6a3c0c; }
  @keyframes achaPlacaBaixo { 0% { opacity: 0; translate: -50% 40%; } 10% { opacity: 1; translate: -50% 0; } 20%, 32%, 44% { translate: -50% 12%; } 26%, 38%, 50% { translate: -50% 0; } 85% { opacity: 1; } 100% { opacity: 0; } }
  /* no fim da aba de regiões, os links do rodapé ficam abaixo dos chips */
  .lv-pe { position: relative; z-index: 1; margin-top: 10px; }
  /* 15: os chips das regiões menores, para não empurrar os links por baixo deles */
  .lv-dir .lv-regioes { gap: 4px; }
  .lv-dir .lv-regioes .lv-chip { min-height: 28px; padding: 0 10px; font-size: 13px; }
  /* 6: a explicação do "ache" cabe na altura: a imagem do visor fica menor */
  #modalRoot .modal .din-acha2 { width: min(150px, 24vh); margin-inline: auto; }
}

/* ---------- QA de 08/11, terceira volta: regras que precisam vir depois do home.css ---------- */
/* a placa da escolha: o texto desce e fica longe da base do lampião da bancada */
#game #hud .g-mesa-slots .choice { padding-top: .7em; }
/* o diário: a data das anotações quebra em vez de cortar com reticências */
#game #hud .caderno .dest-txt small { white-space: normal; overflow: visible; text-overflow: clip; }
/* a tecla no rótulo das ações rápidas: o fundo dela tem mais sobra embaixo, então ela desce até a linha do texto */
#hud .qte-label kbd.tecla, .qte-label kbd.tecla, .din-txt kbd.tecla { vertical-align: -.25em; }
/* o cartão de viajante cabe no celular deitado mais baixo, com o Sortear à vista */
@media (orientation: landscape) and (max-height: 400px) {
  .en-cv-retrato .lv-med.grande, .en-cv-vazio { width: 64px; height: 64px; font-size: 30px; }
  .en-cv-dados { margin-top: 2px; padding-top: 4px; }
}
/* o quebra-cabeça deitado: o rótulo começa abaixo da fita do guia */
@media (orientation: landscape) and (max-height: 520px) { #game #hud .g-panel .qte.qte-monta { padding-top: 40px; } }
/* no computador, o cartão de viajante não encosta no ornamento de baixo */
@media (min-width: 761px) and (min-height: 521px) { .modal.en-largo > .modal-card.parch { padding-bottom: clamp(64px, 7vw, 86px); } }
/* o treino do dado cabe sem rolar no celular deitado mais baixo */
@media (orientation: landscape) and (max-height: 400px) { .treino .dado-box.qte-lado { --lado: clamp(60px, 9dvh, 84px); } }

/* ---------- o cartão de viajante, mais compacto, e o retrato vazio com grafismo indígena em movimento ---------- */
.en-cv { padding: 16px 16px 14px; gap: 3px; }
.en-cv-rot { margin: 8px 0 2px !important; }
.en-cv-retrato .lv-med.grande, .en-cv-vazio { width: 136px; height: 136px; }
.en-cv-nome { margin-top: 4px; font-size: clamp(20px, 1.7vw, 24px); }
.en-cv:not(.tem-nome) .en-cv-nome { font-size: 16px; }
.en-cv-sig { font-size: 15px; }
.en-cv-dados { margin: 6px 0 2px; padding-top: 7px; }
.en-cv-dados div { font-size: 14px; }
.parch .en-cv-nota { margin: 4px 0 6px; font-size: 13px; }
.en-cv .en-sorteia { --bh: 40px; }
@media (max-height: 860px) and (min-height: 521px) and (min-width: 761px) {
  .en-cv { padding: 12px 14px 12px; }
  .en-cv-retrato .lv-med.grande, .en-cv-vazio { width: 116px; height: 116px; }
  .en-cv .en-sorteia { --bh: 36px; font-size: 12px; }
}
@media (max-height: 720px) and (min-height: 521px) and (min-width: 761px) {
  .en-cv-retrato .lv-med.grande, .en-cv-vazio { width: 84px; height: 84px; }
  .en-cv-rot { margin-top: 6px !important; }
}
@media (max-width: 760px) { .en-cv-retrato .lv-med.grande, .en-cv-vazio { width: 84px; height: 84px; } }
@media (orientation: landscape) and (max-height: 520px) { .en-cv-retrato .lv-med.grande, .en-cv-vazio { width: 76px; height: 76px; } }
@media (orientation: landscape) and (max-height: 400px) { .en-cv-retrato .lv-med.grande, .en-cv-vazio { width: 60px; height: 60px; } }
.en-cv-vazio { position: relative; display: block; border: 0; border-radius: 50%; background: none; font-size: 0; filter: drop-shadow(0 5px 9px rgba(90, 50, 10, .22)); }
.en-cv-vazio .cvz-aro { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.en-cv-vazio .cvz-janela { position: absolute; left: 25.9%; top: 26.1%; width: 50.6%; height: 50.6%; border-radius: 50%; overflow: hidden; }
.en-cv-vazio .cvz-busto { position: absolute; left: 50%; bottom: -9%; width: 74%; transform: translateX(-50%); transform-origin: 50% 100%; }
.en-cv-vazio .cvz-luz { position: absolute; inset: 4%; border-radius: 50%; pointer-events: none; mix-blend-mode: soft-light;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 252, 235, .9) 50%, transparent 62%) 160% 0 / 300% 100% no-repeat; }
@media (prefers-reduced-motion: no-preference) {
  .en-cv-vazio .cvz-aro { animation: cvz-gira 70s linear infinite; }
  .en-cv-vazio .cvz-busto { animation: cvz-respira 3.6s ease-in-out infinite; }
  .en-cv-vazio .cvz-luz { animation: cvz-luz 4.5s ease-in-out infinite; }
}
@keyframes cvz-gira { to { transform: rotate(360deg); } }
@keyframes cvz-respira { 0%, 100% { transform: translateX(-50%); } 50% { transform: translateX(-50%) translateY(-3%) scale(1.025); } }
@keyframes cvz-luz { 0%, 55% { background-position: 160% 0; } 100% { background-position: -60% 0; } }
/* no celular deitado, o Sortear por mim cabe inteiro no botão do cartão */
@media (orientation: landscape) and (max-height: 520px) { .en-cv .en-sorteia { font-size: 10.5px; letter-spacing: .03em; gap: 4px; padding-left: 8px; padding-right: 8px; } }

/* ---------- QA do celular, 09/11 ---------- */
@media (orientation: landscape) and (max-height: 520px) {
  /* o treino do dado lado a lado, como no computador: o texto à esquerda, o dado e o botão à direita, tudo na altura da tela */
  .modal.treino-modal > .modal-card.parch { width: min(760px, 94vw); }
  .treino { grid-template-columns: 1.25fr 1fr; align-items: center; column-gap: 18px; }
  .treino-txt { justify-items: start; text-align: left; gap: 6px; }
  .modal-card.parch .treino-txt p { font-size: 13.5px; line-height: 1.3; }
  .treino-lado { gap: 6px; }
  .treino .dado-box.qte-lado { --lado: clamp(46px, 14dvh, 60px); }
  .treino .dado-box .dado-joga, .treino-ok { min-height: 44px; min-width: 0; }
  /* a fala que continua embaixo: a borda de baixo esmaece, e quem joga sabe que dá para rolar */
  #hud .g-panel > .g-bubble.rola-mais { -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 30px), transparent); mask-image: linear-gradient(180deg, #000 calc(100% - 30px), transparent); }
  /* a plaquinha do "ache" aparece dentro do visor, longe do aro */
  .acha-placa { bottom: 20%; }
}
@media (orientation: landscape) and (max-height: 520px) {
  /* o aviso de selo e de marco novo fica sobre o visor, à esquerda, e não cobre a caixa do guia */
  .g-badges { top: calc(max(8px, var(--sat, 0px)) + 60px); left: max(10px, var(--sal, 0px)); right: auto; transform: none; justify-items: start; z-index: 7; }
}
@media (orientation: landscape) and (max-height: 520px) and (min-width: 721px) {
  /* o lugar ao lado do ano não é mais cortado com reticências: quebra em até duas linhas, menor */
  #hud:not(.diario-on) .g-stats .g-where { white-space: normal; text-overflow: clip; font-size: 11px; line-height: 1.1; max-width: 13ch; text-wrap: balance;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
}

/* as janelas no celular deitado ganham os grafismos da caixa do guia: um canto desenhado em cada ponta, a faixa de
   triângulos no alto e embaixo e a costura tracejada por dentro da borda (urucum e jenipapo) */
@media (orientation: landscape) and (max-height: 520px) {
  #modalRoot .modal:not(.pul-cena) .modal-card.parch {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Cg transform='rotate(0 22 22)'%3E%3Cg fill='none' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.6'%3E%3Cpath d='M3 34V3h31' stroke='%232b1d16'/%3E%3Cpath d='M9 26V9h17' stroke='%23c4472b'/%3E%3Cpath d='M15 20v-5h5' stroke='%232b1d16'/%3E%3C/g%3E%3Cpath d='M26 11l4 4-4 4-4-4z M15 22l4 4-4 4-4-4z' fill='%23d99a3a'/%3E%3Ccircle cx='40' cy='3' r='2' fill='%23c4472b'/%3E%3Ccircle cx='3' cy='40' r='2' fill='%23c4472b'/%3E%3C/g%3E%3C/svg%3E") left 9px top 9px / 26px no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Cg transform='rotate(90 22 22)'%3E%3Cg fill='none' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.6'%3E%3Cpath d='M3 34V3h31' stroke='%232b1d16'/%3E%3Cpath d='M9 26V9h17' stroke='%23c4472b'/%3E%3Cpath d='M15 20v-5h5' stroke='%232b1d16'/%3E%3C/g%3E%3Cpath d='M26 11l4 4-4 4-4-4z M15 22l4 4-4 4-4-4z' fill='%23d99a3a'/%3E%3Ccircle cx='40' cy='3' r='2' fill='%23c4472b'/%3E%3Ccircle cx='3' cy='40' r='2' fill='%23c4472b'/%3E%3C/g%3E%3C/svg%3E") right 9px top 9px / 26px no-repeat,
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Cg transform='rotate(180 22 22)'%3E%3Cg fill='none' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.6'%3E%3Cpath d='M3 34V3h31' stroke='%232b1d16'/%3E%3Cpath d='M9 26V9h17' stroke='%23c4472b'/%3E%3Cpath d='M15 20v-5h5' stroke='%232b1d16'/%3E%3C/g%3E%3Cpath d='M26 11l4 4-4 4-4-4z M15 22l4 4-4 4-4-4z' fill='%23d99a3a'/%3E%3Ccircle cx='40' cy='3' r='2' fill='%23c4472b'/%3E%3Ccircle cx='3' cy='40' r='2' fill='%23c4472b'/%3E%3C/g%3E%3C/svg%3E") right 9px bottom 9px / 26px no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Cg transform='rotate(270 22 22)'%3E%3Cg fill='none' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.6'%3E%3Cpath d='M3 34V3h31' stroke='%232b1d16'/%3E%3Cpath d='M9 26V9h17' stroke='%23c4472b'/%3E%3Cpath d='M15 20v-5h5' stroke='%232b1d16'/%3E%3C/g%3E%3Cpath d='M26 11l4 4-4 4-4-4z M15 22l4 4-4 4-4-4z' fill='%23d99a3a'/%3E%3Ccircle cx='40' cy='3' r='2' fill='%23c4472b'/%3E%3Ccircle cx='3' cy='40' r='2' fill='%23c4472b'/%3E%3C/g%3E%3C/svg%3E") left 9px bottom 9px / 26px no-repeat,
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='9' viewBox='0 0 16 9'%3E%3Cpath d='M1 8l4-6 4 6z' fill='%23c4472b' fill-opacity='.75'/%3E%3Cpath d='M9 1h6l-3 5z' fill='%232b1d16' fill-opacity='.55'/%3E%3C/svg%3E") left 0 top 13px / 16px 9px repeat-x, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='9' viewBox='0 0 16 9'%3E%3Cpath d='M1 1l4 6 4-6z' fill='%23c4472b' fill-opacity='.75'/%3E%3Cpath d='M9 8h6l-3-5z' fill='%232b1d16' fill-opacity='.55'/%3E%3C/svg%3E") left 0 bottom 13px / 16px 9px repeat-x,
      radial-gradient(120% 90% at 50% 0%, #fffaf0, var(--j-creme) 55%, #f8ead0);
    outline: 2px dashed rgba(196, 71, 43, .45); outline-offset: -12px; }
}
@media (orientation: landscape) and (max-height: 520px) {
  /* a faixa de baixo fica livre: os botões terminam antes dela */
  #modalRoot .modal:not(.pul-cena, .bz-modal, .lt-modal, .lp-modal, .om-modal) .modal-card.parch { padding-bottom: 28px; }
}

/* ---------- o retorno de cada toque (js/sente.js) ---------- */
@keyframes aperta { 0% { scale: 1; } 30% { scale: .93; } 68% { scale: 1.04; } 100% { scale: 1; } }
.aperta { animation: aperta .26s cubic-bezier(.34, 1.56, .64, 1); }
.faiscas { position: fixed; z-index: 100000; width: 0; height: 0; pointer-events: none; }
.faiscas i { position: absolute; left: -5px; top: -5px; width: 10px; height: 10px; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  filter: drop-shadow(0 0 3px rgba(255, 210, 110, .9)); animation: faisca var(--t) cubic-bezier(.2, .8, .3, 1) forwards; }
@keyframes faisca { from { translate: 0 0; scale: var(--s); opacity: 1; } 70% { opacity: 1; } to { translate: var(--dx) var(--dy); scale: 0; opacity: 0; } }
@keyframes tranco { 0%, 100% { translate: 0 0; } 20% { translate: -4px 0; } 40% { translate: 4px 0; } 60% { translate: -3px 0; } 80% { translate: 2px 0; } }
.tranco { animation: tranco .18s linear; }

/* o modo calmo no painel de som: uma chave própria, laranja quando ligada */
.vol-calmo { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; margin-top: 4px; padding: 10px 2px 2px; border: 0; border-top: 1.5px dashed rgba(90, 52, 20, .3);
  background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.vol-calmo b { display: block; font-family: var(--f-caps); font-size: 13px; letter-spacing: .08em; }
.vol-calmo small { display: block; margin-top: 2px; font-size: 13px; line-height: 1.25; font-style: italic; opacity: .8; }
.vol-chave { position: relative; width: 46px; height: 26px; border-radius: 99px; background: #d8c4a0; border: 2px solid #5a3414; transition: background .2s; }
.vol-chave::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff7e6; box-shadow: 0 2px 0 #3e220c; transition: translate .22s cubic-bezier(.34, 1.56, .64, 1); }
.vol-calmo[aria-checked="true"] .vol-chave { background: #e8683a; }
.vol-calmo[aria-checked="true"] .vol-chave::after { translate: 20px 0; }
.vol-calmo:focus-visible { outline: 3px solid #f6d27e; outline-offset: 3px; border-radius: 8px; }

/* ---------- as três sementes de urucum no fim da viagem ---------- */
.sum-sementes { display: flex; justify-content: center; gap: clamp(10px, 2vw, 22px); margin: 8px 0 4px; padding: 0; list-style: none; }
.semente { display: grid; justify-items: center; gap: 2px; width: 92px; text-align: center; }
.sm-bola { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fff7e6, #f1d9ab);
  border: 2.5px solid #5a3414; box-shadow: 0 3px 0 #3e220c, inset 0 0 0 3px #f6e6c4; }
.sm-bola svg { width: 30px; height: 30px; }
.semente b { font-family: var(--f-caps); font-size: 11px; letter-spacing: .08em; color: #5a3414; line-height: 1.15; }
.semente small { font-size: 11px; line-height: 1.15; font-style: italic; color: #7a5a3a; text-wrap: balance; }
.semente:not(.ganhou) .sm-bola { filter: grayscale(1); opacity: .45; box-shadow: none; border-style: dashed; }
.semente:not(.ganhou) b { opacity: .55; }
@media (prefers-reduced-motion: no-preference) {
  .semente.ganhou .sm-bola { animation: carimbo .5s cubic-bezier(.34, 1.56, .64, 1) both; animation-delay: calc(.65s + var(--i) * .38s); }
}
@keyframes carimbo { 0% { scale: 2.2; opacity: 0; rotate: -18deg; } 60% { scale: .9; opacity: 1; rotate: 4deg; } 100% { scale: 1; rotate: 0deg; } }
@media (orientation: landscape) and (max-height: 520px) { .sum-sementes { margin: 4px 0 2px; gap: 8px; } .semente { width: 78px; } .sm-bola { width: 38px; height: 38px; } .sm-bola svg { width: 22px; height: 22px; } .semente small { display: none; } }

/* o mural no celular deitado, como os menus dos jogos de narrativa: o título, os pontos e as abas numa coluna à
   esquerda; a viagem, os legados, os destaques e os selos ocupam a altura inteira à direita e rolam sozinhos */
@media (orientation: landscape) and (max-height: 520px) {
  #modalRoot .modal.mural-parch:not(.lv-livro) .modal-card.parch { width: min(900px, 96vw); }
  #modalRoot .modal.mural-parch:not(.lv-livro) .parch-scroll { display: grid; grid-template-columns: 196px minmax(0, 1fr); grid-template-rows: auto auto 1fr; column-gap: 16px;
    max-height: calc(100dvh - 70px); overflow: hidden; }
  #modalRoot .modal.mural-parch:not(.lv-livro) .parch-scroll > h2 { grid-column: 1; grid-row: 1; margin: 2px auto 6px !important; max-width: 100%; padding: 5px 12px 6px !important; font-size: 11.5px !important; letter-spacing: .08em !important; white-space: nowrap; }
  #modalRoot .modal.mural-parch:not(.lv-livro) .parch-scroll > .mural-stats { grid-column: 1; grid-row: 2; margin: 0 0 6px; font-size: 14px; text-align: center; }
  #modalRoot .modal.mural-parch:not(.lv-livro) .parch-scroll > .tabs { grid-column: 1; grid-row: 3; align-self: start; display: grid; gap: 5px; width: 100%; margin: 2px 0 0; }
  #modalRoot .modal.mural-parch:not(.lv-livro) .parch .tabs button, #modalRoot .modal.mural-parch:not(.lv-livro) .tabs button { min-height: 36px; padding: 0 12px; border: 2px solid rgba(90, 52, 20, .35); border-radius: 12px;
    background: rgba(255, 250, 235, .6); text-align: left; font-size: 12px; letter-spacing: .1em; }
  #modalRoot .modal.mural-parch:not(.lv-livro) .tabs button + button::before { content: none; }
  #modalRoot .modal.mural-parch:not(.lv-livro) .tabs button[aria-selected="true"] { background: #e8683a; border-color: #5a3414; color: #fff7e6; box-shadow: 0 3px 0 #3e220c; }
  #modalRoot .modal.mural-parch:not(.lv-livro) .parch-scroll > [data-p] { grid-column: 2; grid-row: 1 / span 3; min-height: 0; max-height: calc(100dvh - 76px); overflow-y: auto; overscroll-behavior: contain; padding: 2px 6px 8px 2px; }
  #modalRoot .modal.mural-parch:not(.lv-livro) .parch-scroll > [data-p] > .mural-expl { margin-top: 0; text-align: left; }
  #modalRoot .modal.mural-parch:not(.lv-livro) .parch-scroll > [data-p] > .mural-stats { text-align: left; }
}

/* ---------- as ações dentro do visor (js/game/visor.js): fogo, pintura, céu e rota ---------- */
.mini-visor { position: fixed; z-index: 60; border-radius: 50%; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; cursor: crosshair;
  box-shadow: inset 0 0 40px rgba(20, 8, 2, .55); animation: mvAbre .45s cubic-bezier(.2, 1.2, .4, 1) both; }
.mini-visor canvas { display: block; width: 100%; height: 100%; }
@keyframes mvAbre { from { opacity: 0; scale: .9; } }
.mv-dica { position: absolute; left: 50%; bottom: 9%; translate: -50% 0; max-width: 78%; padding: 6px 14px 7px; border-radius: 999px; background: rgba(30, 16, 6, .72); color: #fff3d6;
  font-family: var(--f-caps); font-size: clamp(11px, 1.2vw, 14px); font-weight: 700; letter-spacing: .06em; text-align: center; text-wrap: balance; pointer-events: none; }
.mv-dica:empty { display: none; }
.mv-passos { display: flex; justify-content: center; gap: 8px; margin: 2px 0 8px; padding: 0; list-style: none; counter-reset: mvp; }
.mv-passos li { counter-increment: mvp; display: flex; align-items: center; gap: 6px; padding: 4px 10px 5px 5px; border-radius: 999px; border: 2px solid rgba(90, 52, 20, .3); color: #7a5a3a;
  font-family: var(--f-caps); font-size: 12px; font-weight: 700; letter-spacing: .06em; }
.mv-passos li::before { content: counter(mvp); display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #d8c4a0; color: #fff7e6; font-size: 11px; }
.mv-passos li.agora { border-color: #5a3414; color: #2a160c; background: #fff3d6; }
.mv-passos li.agora::before { background: #e8683a; }
.mv-passos li.feito::before { content: "✓"; background: #2f7a5a; }
.mv-passos li.feito { opacity: .7; }
@media (orientation: landscape) and (max-height: 520px) {
  #hud .g-panel .qte.qte-visor { gap: 6px; }
  #hud .g-panel .qte.qte-visor .qte-big { display: none; }
  #hud .g-panel .qte.qte-visor .mv-passos { flex-wrap: wrap; gap: 4px; margin: 0 0 4px; }
  #hud .g-panel .qte.qte-visor .mv-passos li { padding: 3px 8px 3px 3px; font-size: 10.5px; gap: 4px; }
  #hud .g-panel .qte.qte-visor .mv-passos li::before { width: 16px; height: 16px; font-size: 10px; }
  .mv-dica { font-size: 11px; padding: 4px 10px 5px; }
}
/* os exemplos do tutorial das ações no visor */
.din-svg { display: block; width: min(220px, 60vw); height: auto; margin: 0 auto; }
@media (prefers-reduced-motion: no-preference) {
  .din-svg .din-traco { stroke-dasharray: 220; stroke-dashoffset: 220; animation: dinTraco 2.4s ease-in-out infinite; }
  .din-fogo .din-vareta { transform-box: fill-box; transform-origin: center; animation: dinGira .3s linear infinite alternate; }
  .din-fogo .din-chama { transform-box: fill-box; transform-origin: 50% 100%; animation: dinChama 2.4s ease-in-out infinite; }
}
@keyframes dinTraco { 0% { stroke-dashoffset: 220; } 70%, 100% { stroke-dashoffset: 0; } }
@keyframes dinGira { from { scale: .7 1; } to { scale: 1.2 1; } }
@keyframes dinChama { 0%, 40% { scale: 0; } 70% { scale: 1.1; } 100% { scale: 1; } }
.mv-dica.some { animation: mvDica 4.2s ease forwards; }
@keyframes mvDica { 0% { opacity: 0; translate: -50% 8px; } 8%, 75% { opacity: 1; translate: -50% 0; } 100% { opacity: 0; } }

/* a barra de latão das ações: o tubo passa 12,04% para a esquerda e 7,56% para a direita da trilha (game.css,
   .qte-track::before). A trilha fica com 83,6% da caixa e anda 2,24% para a direita: o tubo inteiro cabe e fica no meio */
.qte.qte-visor .mv-barra { width: 83.6%; margin-left: auto; margin-right: auto; translate: 2.24% 0; }
@media (orientation: landscape) and (max-height: 520px) {
  #hud .g-panel .qte .qte-track, #hud .g-panel .qte .eq-track { width: calc(min(300px, var(--d-w) - 64px) * .836); max-width: none; margin-left: auto; margin-right: auto; translate: 2.24% 0; }
}
@media (orientation: landscape) and (max-height: 520px) {
  /* os botões dos polegares bem nos cantos e um pouco menores: ficam fora do aro do visor em qualquer celular deitado */
  .qte-keys.polegares { left: max(6px, env(safe-area-inset-left)); right: max(6px, env(safe-area-inset-right)); bottom: max(6px, env(safe-area-inset-bottom)); }
  .qte-keys.polegares .kbtn { width: 64px; height: 64px; }
  .qte-keys.polegares .kbtn.wide { width: 86px; height: 54px; padding: 0 6px; font-size: 12px; line-height: 1.05; }
}

/* a apresentação do Ybytu sem rolagem (js/game/game.js, cenaPulcinella): quando o texto não cabe, o papel aperta as
   margens de cima e de baixo, o botão encosta no texto e a letra desce até caber (--pf, medido no jogo) */
#modalRoot .modal.pul-cena.aperta .modal-card { padding-top: clamp(16px, 3.4vh, 30px); padding-bottom: clamp(12px, 2.6vh, 24px); }
#modalRoot .modal.pul-cena .modal-card .parch-scroll .pe-corpo { overflow: hidden; }
#modalRoot .modal.pul-cena.rola .modal-card .parch-scroll .pe-corpo { overflow-y: auto; }
#modalRoot .modal.pul-cena.aperta .modal-card .parch-scroll .pe-corpo > p { font-size: var(--pf); line-height: 1.3; margin-block: 0 .35em; }
#modalRoot .modal.pul-cena.aperta .modal-actions { margin-top: 4px; }
