/* ---------- a bola ---------- */
.orb { position: absolute; border-radius: 50%; overflow: hidden; perspective: 700px; background: #12051f; --orb-c: #c49bff; isolation: isolate; }
.orb-bg { position: absolute; inset: 0; background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--orb-c) 40%, #12051f), #0a0312 75%); }
.orb-3d { position: absolute; inset: -12%; transform-style: preserve-3d; }
.lay { position: absolute; inset: 0; transform-style: preserve-3d; }
.lay svg { width: 100%; height: 100%; display: block; }
.lay.back { transform: translateZ(-160px) scale(1.23); }
.lay.mid { transform: translateZ(-60px) scale(1.086); }
.lay.actor { transform: translateZ(10px); }
.lay.front { transform: translateZ(90px) scale(.87); }
.actor-float { position: absolute; left: 50%; bottom: 13%; width: 56%; height: 70%; transform: translateX(-50%); animation: float 5s ease-in-out infinite; }
.avatar { position: absolute; inset: 0; transition: opacity .4s, filter .4s; }
.avatar svg, .avatar img { width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; display: block; filter: drop-shadow(0 0 10px rgba(255, 220, 255, .35)); }
.avatar .eyes { transform-box: fill-box; transform-origin: center; animation: blink 4.6s infinite; }
.avatar.ghosty svg, .avatar.ghosty img { filter: grayscale(1) brightness(1.7) contrast(.8) drop-shadow(0 0 18px #fff) drop-shadow(0 0 40px #b9c8ff); opacity: .68; }
.avatar.ghosty { animation: ghostUp 6s ease-in-out infinite; }
.avatar.has-img img { position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--ah, 1) * 100%); width: 100%; transform-origin: 50% 100%; animation: breathe 4.2s ease-in-out infinite;
  filter: drop-shadow(0 0 2px rgba(255, 230, 255, .5)) drop-shadow(0 0 14px rgba(200, 140, 255, .35)) drop-shadow(0 14px 10px rgba(0, 0, 0, .45)); }
.avatar.grow img { animation: grow .9s cubic-bezier(.2, 1.3, .4, 1), breathe 4.2s ease-in-out .9s infinite; }
@keyframes breathe { 50% { transform: scale(1.012, 1.018); } }
@keyframes grow { from { transform: scale(.82) translateY(6%); opacity: 0; filter: blur(6px) brightness(2); } }
@keyframes ghostUp { 50% { transform: translateY(-14px); } }
.actor.empty .actor-float { display: none; }
.actor.hop .actor-float { animation: hop .6s cubic-bezier(.3, 1.6, .5, 1), float 5s ease-in-out .6s infinite; }
.prop { position: absolute; right: 12%; bottom: 16%; width: 22%; height: 22%; opacity: 0; transform: translateY(20px) scale(.6) rotate(-10deg); transition: all .6s cubic-bezier(.2, 1.4, .4, 1); }
.prop.on { opacity: 1; transform: none; animation: bob 3s ease-in-out .6s infinite; }
.prop svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 0 8px rgba(255, 220, 255, .5)); }
.orb-smoke, .orb-fumaca { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.orb-tint { position: absolute; inset: 0; background: var(--orb-c); mix-blend-mode: soft-light; pointer-events: none; }
.orb-vig { position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 50% 50%, transparent 52%, rgba(20, 4, 30, .5) 74%, rgba(8, 2, 14, .95) 100%); }
.orb-flash { position: absolute; inset: 0; opacity: 0; mix-blend-mode: screen; pointer-events: none; }
.orb-flash.go { animation: oflash 1.1s ease-out; }
.orb-gloss { mix-blend-mode: screen; opacity: .72; pointer-events: none; }
.orb-shade { pointer-events: none; opacity: .9; }
.spot.orb-spill, .spot.orb-under { mix-blend-mode: screen; }
.spot.cand, .spot.lampg, .spot.neong { mix-blend-mode: screen; }
.incense { pointer-events: none; }

.twinkle { animation: tw 3s ease-in-out infinite; }
.mobile { animation: swing 6s ease-in-out infinite; }
.spin-slow { animation: spin 60s linear infinite; }
.spin-rev { animation: spin 90s linear infinite reverse; }
.drift { animation: drift 30s linear infinite; }
.bulb { animation: bulb 1.6s steps(2) infinite; }
.road { animation: road 1.2s linear infinite; }
.waves { animation: waves 4s ease-in-out infinite alternate; }
.leaf { animation: leaf 6s linear infinite; }
.smoke circle { animation: puff 3s ease-out infinite; }
.winlight { animation: win 7s steps(1) infinite; }
.winlight.b { animation-delay: -3s; }
.flame { animation: flame .3s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: 50% 100%; }
.beat { animation: beat 1s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes float { 50% { transform: translateX(-50%) translateY(-8px); } }
@keyframes hop { 30% { transform: translateX(-50%) translateY(-28px) scale(1.04, .96); } 60% { transform: translateX(-50%) translateY(0) scale(.96, 1.04); } }
@keyframes bob { 50% { transform: translateY(-6px) rotate(3deg); } }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
@keyframes oflash { 0% { opacity: .7; } 100% { opacity: 0; } }
@keyframes tw { 50% { opacity: .2; } }
@keyframes swing { 50% { transform: rotate(6deg); } }
@keyframes drift { from { transform: translateX(-60px); } to { transform: translateX(60px); } }
@keyframes bulb { 50% { opacity: .25; } }
@keyframes road { to { transform: translateX(-80px); } }
@keyframes waves { to { transform: translateX(-30px); } }
@keyframes leaf { 0% { transform: translate(0, 0) rotate(0); opacity: 0; } 10% { opacity: 1; } 100% { transform: translate(var(--x), 230px) rotate(400deg); opacity: 0; } }
@keyframes puff { from { transform: translateY(0); opacity: .4; } to { transform: translateY(-30px); opacity: 0; } }
@keyframes win { 50% { fill: #2a1420; } }
@keyframes flame { to { transform: scaleY(1.2) scaleX(.85); } }
@keyframes beat { 15% { transform: scale(1.12); } 30% { transform: scale(1); } 45% { transform: scale(1.08); } }

/* ---------- moldura da cena ---------- */
.table-shade { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(90% 80% at 50% 45%, transparent 50%, rgba(6, 2, 10, .6) 100%), linear-gradient(0deg, rgba(6, 2, 10, .88) 0%, rgba(6, 2, 10, .5) 22%, transparent 42%); }
.hud { position: absolute; inset: 0; pointer-events: none; --ui: rgba(16, 7, 24, .78); }
.hud > * { pointer-events: auto; }
.glass { background: var(--ui); border: 1px solid var(--line); border-radius: 16px; backdrop-filter: blur(10px); box-shadow: 0 20px 50px rgba(0, 0, 0, .45); }

/* topo */
.g-top { position: absolute; top: 0; left: 0; right: 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: max(16px, env(safe-area-inset-top)) 22px 0; pointer-events: none; }
.g-top > * { pointer-events: auto; }
.g-brand { display: flex; align-items: baseline; gap: 12px; }
.g-life { font-family: var(--f-caps); font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--paper-dim); }
.g-track { display: flex; gap: 6px; list-style: none; margin: 0; padding: 8px 12px; }
.g-track { align-items: center; padding: 10px 18px; gap: 4px; }
.g-track ol { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.g-track li { display: flex; align-items: center; gap: 8px; font-family: var(--f-caps); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: rgba(243, 230, 208, .35); transition: color .4s; white-space: nowrap; }
.g-track li + li::before { content: ''; width: 18px; height: 1px; background: rgba(246, 213, 140, .25); }
.g-track li span { max-width: 0; overflow: hidden; transition: max-width .5s ease; }
.g-track li.on span { max-width: 160px; }
.g-track li i { width: 10px; height: 10px; border-radius: 50%; border: 1px solid rgba(246, 213, 140, .35); transition: all .4s; }
.g-track li.done { color: var(--paper-dim); }
.g-track li.done i { background: var(--gold); border-color: var(--gold); }
.g-track li.on { color: var(--gold-hi); }
.g-track li.on i { background: var(--pink); border-color: var(--pink); box-shadow: 0 0 12px var(--pink); transform: scale(1.3); }
.g-tools { display: flex; gap: 10px; justify-content: flex-end; }

/* painel de atributos */
.g-stats { position: absolute; left: 22px; top: 50%; transform: translateY(-50%); width: 236px; padding: 20px 18px; display: grid; gap: 16px; opacity: 0; transition: opacity .6s; }
.g-stats.on { opacity: 1; }
.g-who { display: grid; gap: 2px; }
.g-name { font-family: var(--f-caps); font-weight: 700; font-size: 20px; letter-spacing: .06em; color: var(--gold-hi); overflow-wrap: anywhere; }
.g-age { font-size: 19px; font-weight: 700; color: var(--gold-hi); }
.g-rotulo { font-family: var(--f-caps); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--paper-dim); }
.g-who.destaca .g-name { animation: nomeBrilha 1.1s ease-in-out 4; }
@keyframes nomeBrilha { 50% { filter: drop-shadow(0 0 10px rgba(246, 190, 90, .95)); scale: 1.05; } }
.g-candle { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: end; }
.candle { position: relative; width: 26px; height: 74px; margin-left: 4px; }
.candle .wax { position: absolute; bottom: 0; left: 0; right: 0; height: calc(var(--v, 1) * 62px + 4px); border-radius: 6px 6px 3px 3px;
  background: linear-gradient(90deg, #d9c8b0, #f6ecd9 40%, #c9b296); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .5); transition: height .9s cubic-bezier(.3, .8, .3, 1); }
.candle .wick { position: absolute; left: 50%; width: 2px; height: 6px; margin-left: -1px; background: #222; bottom: calc(var(--v, 1) * 62px + 4px); transition: bottom .9s cubic-bezier(.3, .8, .3, 1); }
.candle .flame { position: absolute; left: 50%; width: 12px; height: 20px; margin-left: -6px; bottom: calc(var(--v, 1) * 62px + 8px); border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: radial-gradient(circle at 50% 70%, #fff6d0, #ffb54a 50%, rgba(255, 90, 40, .2) 80%, transparent); filter: drop-shadow(0 0 8px #ffb54a);
  transform-origin: 50% 100%; animation: fl .18s ease-in-out infinite alternate; transition: bottom .9s cubic-bezier(.3, .8, .3, 1); }
.candle.low .flame { animation-duration: .09s; width: 8px; margin-left: -4px; height: 13px; }
.candle.out .flame { opacity: 0; }
@keyframes fl { to { transform: scaleY(1.12) scaleX(.9) rotate(2deg); } }
.stat { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; position: relative; }
.stat-l { font-family: var(--f-caps); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--paper); }
.stat-v { font-family: var(--f-caps); font-size: 13px; color: var(--paper-dim); font-variant-numeric: tabular-nums; }
.bar { grid-column: 1 / -1; height: 7px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.bar b { display: block; height: 100%; width: calc(var(--v, .5) * 100%); border-radius: 99px; background: var(--c); box-shadow: 0 0 10px var(--c); transition: width .9s cubic-bezier(.3, .8, .3, 1); }
.delta { position: absolute; right: -6px; top: -14px; font-family: var(--f-caps); font-weight: 700; font-size: 15px; pointer-events: none; animation: dUp 1.6s ease-out forwards; }
.delta.up { color: #9dffb0; } .delta.down { color: #ff8a9a; }
@keyframes dUp { from { opacity: 0; transform: translateY(8px); } 15% { opacity: 1; } to { opacity: 0; transform: translateY(-22px); } }
.luck { display: flex; align-items: center; gap: 8px; }
.luck .moons2 { display: flex; gap: 5px; }
.luck .m { width: 13px; height: 13px; border-radius: 50%; border: 1px solid rgba(246, 213, 140, .4); }
.luck .m.on { background: var(--gold-hi); box-shadow: 0 0 8px var(--gold-hi); border-color: var(--gold-hi); }
.luck .m.bad { background: #ff4a5a; border-color: #ff4a5a; box-shadow: 0 0 8px #ff4a5a; }
.amulet { display: block; padding: 0; border: 0; background: none; cursor: pointer; transition: filter .3s, transform .2s; }
.amulet img { display: block; width: 100%; }
.amulet:not(.on) { filter: grayscale(.85) brightness(.72); }
.amulet.gasto { filter: grayscale(1) brightness(.5); }
.amulet.on { animation: amuPulsa 2.8s ease-in-out infinite; }
.amulet.chama { animation: amuPulsa .9s ease-in-out infinite; }
.amulet:hover { transform: scale(1.1) rotate(-5deg); }
@keyframes amuPulsa { 0%, 100% { filter: drop-shadow(0 0 3px rgba(210, 170, 255, .55)); } 50% { filter: drop-shadow(0 0 11px rgba(214, 170, 255, 1)) brightness(1.15); } }

/* fala da vidente */
.g-bubble { position: absolute; max-width: 380px; padding: 18px 22px 16px; border-radius: 18px 18px 18px 4px; opacity: 0; transform: translateY(8px); transition: opacity .35s, transform .35s; }
.g-bubble.on { opacity: 1; transform: none; }
.g-bubble.from-right { border-radius: 18px 18px 4px 18px; }
.g-bubble::before { content: 'Madame Zaira'; display: block; font-family: var(--f-caps); font-size: 11px; letter-spacing: .26em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }
.g-say { font-size: 21px; line-height: 1.38; min-height: 1.4em; text-wrap: pretty; }
.g-say .cur { position: relative; }
.g-say .cur::after { content: ''; position: absolute; left: 2px; top: 0; bottom: 0; width: 2px; background: var(--gold-hi); animation: blinkc .8s steps(1) infinite; }
.g-say .resto { visibility: hidden; }
@keyframes blinkc { 50% { opacity: 0; } }

/* painel de escolhas */
.g-panel { position: absolute; left: 50%; bottom: calc(22px + var(--safe-b)); transform: translateX(-50%) scale(var(--esc, 1)); transform-origin: 50% 100%; width: min(1020px, calc(100vw - 32px)); display: grid; gap: 14px; justify-items: center; }
.g-q { font-size: 23px; line-height: 1.35; text-align: center; max-width: 46ch; text-shadow: 0 2px 12px rgba(0, 0, 0, .9); }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; width: 100%; }
/* escolhas: a pele do verso da carta (veludo e filete dourado) em nove fatias, para o canto nunca esticar */
.choice { position: relative; display: grid; align-items: center; min-height: 104px; padding: 0 8px; border: 28px solid transparent; border-image: url("../assets/tarot/verso-botao.webp") 104 fill / 28px stretch; background: none; text-align: left; text-wrap: balance; font-size: 19px; line-height: 1.25; color: var(--paper);
  filter: drop-shadow(0 12px 14px rgba(0, 0, 0, .5));
  opacity: 0; transform: translateY(26px) rotateX(40deg); transform-origin: 50% 100%; transition: transform .2s ease, filter .2s; }
.choice.in { animation: cardIn .55s cubic-bezier(.2, 1.2, .3, 1) forwards; animation-delay: var(--d, 0s); }
.choice:hover, .choice:focus-visible { transform: translateY(-4px); filter: drop-shadow(0 14px 16px rgba(0, 0, 0, .55)) drop-shadow(0 0 10px rgba(246, 213, 140, .5)); }
.choice:focus-visible { outline: none; }
.choice.in:hover, .choice.in:focus-visible { animation: none; opacity: 1; }
.choice:active { transform: translateY(1px) scale(.99); }
.choice .hints { position: absolute; top: 9px; right: 12px; display: flex; gap: 5px; opacity: .7; }
.choice .hints i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.choice.picked { z-index: 2; animation: none; opacity: 1; transform: translateY(-6px); filter: drop-shadow(0 0 16px rgba(255, 220, 140, .8)); }
.choice.gone { opacity: 0 !important; transform: translateY(20px) scale(.96) !important; transition: all .3s ease; pointer-events: none; }
@keyframes cardIn { to { opacity: 1; transform: none; } }
.g-next { min-width: 200px; }
.g-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* entrada de nome */
.field { display: grid; gap: 8px; width: min(440px, 100%); }
.field input { height: 56px; padding: 0 20px; border-radius: 14px; border: 1px solid rgba(246, 213, 140, .4); background: rgba(16, 7, 24, .85); color: var(--paper);
  font: 600 24px var(--f-text); text-align: center; outline: none; transition: border-color .2s, box-shadow .2s; }
.field input:focus { border-color: var(--gold-hi); box-shadow: 0 0 0 3px rgba(246, 213, 140, .18); }
.field input::placeholder { color: rgba(243, 230, 208, .35); font-style: italic; font-weight: 500; }
.field .err { min-height: 1.3em; font-size: 16px; color: #ff9aa8; text-align: center; }
.seg { display: inline-flex; padding: 5px; gap: 5px; border-radius: 999px; background: rgba(16, 7, 24, .85); border: 1px solid var(--line); }
.seg button { min-height: 44px; padding: 0 22px; border-radius: 999px; font-family: var(--f-caps); font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--paper-dim); transition: all .2s; }
.seg button[aria-pressed="true"] { background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: #1b0c05; }
.linkish { font-size: 17px; font-style: italic; color: var(--gold-hi); text-decoration: underline; text-underline-offset: 4px; min-height: 44px; }

/* cartas de tarô do início */
.tarot-row { display: flex; gap: 18px; justify-content: center; perspective: 900px; }
.tarot { width: 132px; height: 212px; position: relative; transform-style: preserve-3d; transition: transform .8s cubic-bezier(.3, 1.3, .4, 1); cursor: pointer; }
.tarot:hover { transform: translateY(-8px); }
.tarot.flip { transform: rotateY(180deg); }
.tarot .f, .tarot .b { position: absolute; inset: 0; border-radius: 12px; backface-visibility: hidden; display: grid; place-items: center; padding: 14px; text-align: center; border: 1px solid rgba(246, 213, 140, .6); }
.tarot .b { background: radial-gradient(circle, rgba(246, 213, 140, .25) 0 16%, transparent 17%), repeating-linear-gradient(45deg, rgba(246, 213, 140, .12) 0 2px, transparent 2px 10px), linear-gradient(160deg, #3b1450, #170823);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .6), inset 0 0 0 6px #170823, inset 0 0 0 7px rgba(246, 213, 140, .4); }
.tarot .f { transform: rotateY(180deg); background: linear-gradient(180deg, #f3e6d0, #d8c4a0); color: #2a1206; box-shadow: 0 14px 30px rgba(0, 0, 0, .6), inset 0 0 0 6px #f3e6d0, inset 0 0 0 7px #8a6a32; }
.tarot .f b { font-family: var(--f-caps); font-size: 15px; letter-spacing: .06em; }
.tarot .f span { font-size: 15px; line-height: 1.25; }
.tarot.dim { opacity: .35; transform: scale(.94); pointer-events: none; }

/* ações rápidas */
.qte { width: min(560px, 100%); display: grid; gap: 14px; justify-items: center; padding: 20px 22px; }
.qte-label { font-family: var(--f-caps); font-size: 14px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-hi); text-align: center; }
.qte-big { font-family: var(--f-caps); font-size: 44px; font-weight: 700; color: #fff; text-shadow: 0 0 20px var(--pink); min-height: 1.1em; }
.qte-track { position: relative; width: 100%; height: 22px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.qte-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, var(--violet), var(--pink)); box-shadow: 0 0 14px var(--pink); }
.qte-zone { position: absolute; top: 0; bottom: 0; background: rgba(246, 213, 140, .3); border: 2px solid var(--gold-hi); border-radius: 99px; }
.qte-mark { position: absolute; top: -4px; width: 14px; height: 30px; margin-left: -7px; border-radius: 7px; background: #fff; box-shadow: 0 0 14px #fff; }
.qte-time { width: 100%; height: 3px; background: rgba(255, 255, 255, .1); }
.qte-time b { display: block; height: 100%; background: var(--gold-hi); width: 100%; }
.qte-keys { display: flex; gap: 10px; }
.kbtn { width: 64px; height: 64px; border-radius: 14px; display: grid; place-items: center; font-size: 26px; color: var(--paper); border: 1px solid rgba(246, 213, 140, .4); background: rgba(43, 18, 60, .9); transition: transform .08s, background .1s; }
.kbtn.hit, .kbtn:active { transform: scale(.92); background: rgba(255, 63, 174, .4); }
.kbtn.wide { width: auto; padding: 0 30px; font-family: var(--f-caps); font-size: 15px; letter-spacing: .14em; }
.seqs { display: flex; gap: 10px; }
.seqs span { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 24px; border: 1px solid rgba(246, 213, 140, .3); color: var(--paper-dim); transition: all .15s; }
.seqs span.ok { background: rgba(157, 255, 176, .2); border-color: #9dffb0; color: #fff; }
.seqs span.cur { border-color: var(--gold-hi); color: #fff; box-shadow: 0 0 14px rgba(246, 213, 140, .5); }
.qte.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

/* diário */
.g-diary { position: absolute; right: 22px; top: 50%; transform: translateY(-50%); width: 250px; max-height: 52vh; padding: 18px; overflow: hidden; display: none; }
.g-diary h3 { font-family: var(--f-caps); font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
.g-diary ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.g-diary li { display: grid; grid-template-columns: 42px 1fr; gap: 8px; font-size: 16px; line-height: 1.3; color: var(--paper-dim); animation: rise .4s ease; }
.g-diary li b { font-family: var(--f-caps); font-size: 13px; color: var(--paper); }
.g-diary li.badge-li { color: var(--gold-hi); }
.g-diary .empty { font-size: 16px; }

/* cartão de fase */
.g-stagecard { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; pointer-events: none; opacity: 0; }
.g-stagecard.go { animation: stg 2.6s ease forwards; }
.g-stagecard .eyebrow { font-size: 14px; }
.g-stagecard h2 { font-family: var(--f-title); font-size: clamp(44px, 8vw, 92px); color: #fff; text-shadow: 0 0 30px var(--orb-c, #c49bff), 0 4px 0 rgba(0, 0, 0, .5); line-height: 1; text-align: center; padding: 0 16px; }
.g-stagecard p { font-family: var(--f-caps); font-size: 20px; letter-spacing: .2em; color: var(--paper); }
@keyframes stg { 0% { opacity: 0; transform: scale(1.08); filter: blur(10px); } 18%, 75% { opacity: 1; transform: none; filter: none; } 100% { opacity: 0; transform: scale(.97); filter: blur(6px); } }

/* marco desbloqueado */
.g-badges { position: absolute; top: 76px; left: 22px; display: grid; gap: 8px; justify-items: start; pointer-events: none; z-index: 2; }
@media (max-width: 900px) and (orientation: portrait) { .g-badges { left: 50%; transform: translateX(-50%); top: auto; bottom: 170px; justify-items: center; } }
.bpop { display: flex; align-items: center; gap: 14px; padding: 12px 22px 12px 12px; border-radius: 999px; background: rgba(20, 8, 30, .92); border: 1px solid var(--gold);
  box-shadow: 0 0 30px rgba(246, 213, 140, .35); animation: bpop 3.6s cubic-bezier(.2, 1.4, .3, 1) forwards; }
.bpop .seal { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #2a1206; background: radial-gradient(circle at 35% 30%, #fff3c4, var(--gold) 60%, #8a5a1a); box-shadow: 0 0 0 3px rgba(246, 213, 140, .3); }
.bpop .seal .bico { width: 24px; height: 24px; }
.bpop small { display: block; font-family: var(--f-caps); font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.bpop b { font-family: var(--f-caps); font-size: 17px; letter-spacing: .04em; color: #fff; }
@keyframes bpop { 0% { opacity: 0; transform: translateY(-20px) scale(.6); } 12% { opacity: 1; transform: none; } 82% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-10px); } }

/* resumo da vida */
.g-summary { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; padding: 80px 24px 24px; background: rgba(6, 2, 10, .55); backdrop-filter: blur(3px); overflow: auto; }
.g-summary.on { display: flex; animation: fadeIn .6s ease; }
.sum { width: min(980px, 100%); display: grid; grid-template-columns: 1.15fr 1fr; gap: 18px; }
.sum-card { padding: 30px 28px; border-radius: 18px; animation: rise .6s cubic-bezier(.2, .8, .2, 1) both; }
.sum-card:nth-child(2) { animation-delay: .15s; }
.sum-card .eyebrow { margin-bottom: 8px; display: block; }
.sum-card h2 { font-family: var(--f-title); font-size: clamp(30px, 4vw, 44px); color: var(--gold-hi); line-height: 1.05; margin-bottom: 6px; }
.sum-years { font-family: var(--f-caps); letter-spacing: .14em; color: var(--paper-dim); font-size: 14px; margin-bottom: 18px; }
.sum-dest { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--gold); color: var(--gold-hi); font-family: var(--f-caps); font-size: 14px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 14px; }
.sum-dest.new::after { content: 'Novo'; font-size: 10px; padding: 3px 8px; border-radius: 999px; background: var(--pink); color: #fff; }
.sum-epi { font-size: 24px; font-style: italic; line-height: 1.35; margin-bottom: 18px; }
.sum-cause { font-size: 18px; line-height: 1.45; color: var(--paper-dim); text-wrap: pretty; }
.sum-cause + .sum-cause { margin-top: 12px; }
.sum-licao { font-size: 21px; font-style: italic; color: var(--paper); }
.sum-cause b { display: block; font-family: var(--f-caps); font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); margin-bottom: 4px; font-weight: 700; }
.sum-badges { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 20px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px; background: rgba(246, 213, 140, .08); border: 1px solid var(--line); font-size: 15px; }
.chip .seal { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #fff3c4, var(--gold) 60%, #8a5a1a); color: #2a1206; }
.chip .seal .bico { width: 16px; height: 16px; }
.chip.new { border-color: var(--pink); }
.sum-score { display: flex; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.sum-score strong { font-family: var(--f-title); font-size: 48px; color: #fff; text-shadow: 0 0 24px var(--violet); }
.sum-score span { font-family: var(--f-caps); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--paper-dim); }
.sum-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 4px; }
.sum-note { font-size: 16px; color: var(--cyan); margin-bottom: 8px; }

/* mural de memórias */
.tabs { display: flex; gap: 6px; padding: 5px; border-radius: 999px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); margin: 6px 0 18px; width: max-content; max-width: 100%; }
.tabs button { min-height: 40px; padding: 0 18px; border-radius: 999px; font-family: var(--f-caps); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--paper-dim); }
.tabs button[aria-selected="true"] { background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: #1b0c05; }
.mural-stats { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 16px; color: var(--paper-dim); margin-bottom: 4px; }
.lives { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.polaroid { margin: 0; padding: 10px 10px 12px; border-radius: 6px; background: #efe4cf; color: #2a1206; box-shadow: 0 10px 24px rgba(0, 0, 0, .5); transform: rotate(var(--r, 0deg)); transition: transform .2s; }
.polaroid:hover { transform: rotate(0) translateY(-3px); }
.polaroid .ph { aspect-ratio: 1; border-radius: 3px; background: radial-gradient(circle at 50% 60%, #5a2a7a, #170823); overflow: hidden; display: grid; place-items: end center; }
.polaroid .ph canvas { width: 100%; height: 100%; display: block; }
.polaroid .ph svg, .polaroid .ph img { width: 80%; height: 92%; object-fit: contain; object-position: 50% 100%; }
.polaroid b { display: block; margin-top: 8px; font-family: var(--f-hand); font-size: 24px; line-height: 1; }
.polaroid span { display: block; font-size: 14px; line-height: 1.25; color: #5a3a2a; }
.collect { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.coll { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 14px 10px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); font-size: 15px; line-height: 1.25; }
.coll .seal { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #fff3c4, var(--gold) 60%, #8a5a1a); color: #2a1206; }
.coll .seal .bico { width: 24px; height: 24px; }
.coll.locked { opacity: .45; }
.coll.locked .seal { background: #2a1d33; color: #6a5a7a; }
.coll small { color: var(--paper-dim); font-size: 13px; }

/* responsivo */
@media (min-width: 1700px) { .g-diary { display: block; top: 44%; max-height: 30vh; } }
@media (max-width: 900px) and (orientation: portrait) {
  .g-top { grid-template-columns: 1fr auto; }
  .g-track { display: none; }
  .g-stats { left: 12px; right: 12px; top: 70px; transform: none; width: auto; padding: 10px 14px; grid-template-columns: auto 1fr 1fr 1fr; gap: 6px 12px; align-items: center; }
  .g-who { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0 10px; align-items: baseline; }
  .g-rotulo { flex-basis: 100%; font-size: 10px; }
  .g-name { font-size: 16px; } .g-age { font-size: 15px; }
  .g-candle { grid-template-columns: auto; gap: 0; } .g-candle .stat { display: none; }
  .candle { height: 44px; width: 18px; } .candle .wax { height: calc(var(--v, 1) * 34px + 4px); } .candle .wick { bottom: calc(var(--v, 1) * 34px + 4px); } .candle .flame { bottom: calc(var(--v, 1) * 34px + 8px); width: 9px; margin-left: -4.5px; height: 14px; }
  .stat-l { font-size: 10px; letter-spacing: .1em; } .stat-v { font-size: 11px; }
  .luck { display: none !important; }
  .amulet { position: absolute; right: 12px; top: 8px; width: 40px; }
  .g-panel > .g-bubble { position: relative; left: auto; top: auto; width: 100%; max-width: none; border-radius: 16px; padding: 12px 16px; }
  .g-say { font-size: 18px; }
  .g-q { font-size: 19px; }
  .choices { grid-template-columns: 1fr; gap: 8px; }
  .choice { min-height: 0; padding: 4px 6px; border-width: 20px; border-image-width: 20px; font-size: 17px; }
  .tarot { width: 96px; height: 156px; } .tarot .f span { font-size: 12px; } .tarot .f b { font-size: 12px; }
  .sum { grid-template-columns: 1fr; }
  .g-summary { padding-top: 70px; align-items: flex-start; }
}

/* teatro de papel dentro da bola */
.lay.dio { position: absolute; inset: 0; transform: translateZ(0); }
.lay.dio canvas { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; filter: saturate(1.06) contrast(1.04); }
.lay.dio ~ .orb-tint { display: none; }

/* ano e lugar da vida lida */
.g-when { display: grid; gap: 2px; margin-top: -8px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.g-year { font-family: var(--f-title); font-size: 26px; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; text-shadow: 0 0 16px var(--orb-c, #c49bff); }
.g-where { font-size: 15px; font-style: italic; color: var(--paper-dim); text-wrap: balance; }
@media (max-width: 900px) and (orientation: portrait) {
  .g-when { grid-column: 1 / -1; grid-auto-flow: column; justify-content: start; align-items: baseline; gap: 10px; margin: 0; padding: 0; border: 0; }
  .g-year { font-size: 18px; } .g-where { font-size: 13px; }
}

/* vídeo da Madame por cima da foto: a bola do vídeo fica 10 px acima da foto */
.plate.plate-video { top: 0; height: 1536px; opacity: 0; transition: opacity .8s ease; }
.plate.plate-video.on { opacity: 1; }
/* a Madame falando entra por cima da quieta numa fusão curta */
.plate.plate-video.v-falando { transition: opacity .16s linear; }
.plate.plate-video.v-falando.fala { opacity: 1; }

/* ---------- painel lateral: pergaminho (desktop) ----------
   O papel vem de tools/build_menu.py (recorte do "menu empty.jpg"). Rótulos,
   barras vazias, vela e selo já estão desenhados nele; aqui entra só o que
   muda: nome, idade, ano, lugar, números, tinta das barras, chama e sorte.
   Posições em % do papel, medidas no recorte. */
@media (min-width: 901px), (orientation: landscape) {
  .g-stats.parch { --pw: clamp(232px, min(19vw, calc((100vh - 150px) * .571)), 300px); width: var(--pw); aspect-ratio: 640 / 1121; padding: 0; display: block; gap: 0; container-type: inline-size;
    left: 18px; background: url("../assets/hud-pergaminho.webp") center / 100% 100% no-repeat; border: 0; border-radius: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none;
    filter: drop-shadow(0 18px 26px rgba(0, 0, 0, .55)) drop-shadow(0 0 1px rgba(0, 0, 0, .4)); transform-origin: 30% 0; }
  .g-stats.parch.on { animation: parchIn 1s cubic-bezier(.2, .9, .3, 1) both, parchFloat 7s ease-in-out 1s infinite; }
  @keyframes parchIn {
    from { opacity: 0; transform: translate(-30px, -50%) rotate(-5deg); clip-path: inset(0 0 100% 0); }
    60% { clip-path: inset(0 0 -12% 0); }
    to { opacity: 1; transform: translateY(-50%) rotate(0); clip-path: inset(0 0 -12% 0); }
  }
  @keyframes parchFloat { 0%, 100% { transform: translateY(-50%) rotate(0); } 50% { transform: translateY(calc(-50% - 3px)) rotate(.35deg); } }
  .g-stats.parch > * { position: absolute; margin: 0; }
  .g-stats.parch.on > :not(.g-sheen):not(.g-flame) { animation: inkIn .7s ease both; }
  .g-stats.parch.on > .g-when { animation-delay: .35s; }
  .g-stats.parch.on > .g-candle { animation-delay: .5s; }
  .g-stats.parch.on > .stat[data-k="alegria"] { animation-delay: .6s; }
  .g-stats.parch.on > .stat[data-k="fortuna"] { animation-delay: .7s; }
  .g-stats.parch.on > .stat[data-k="amor"] { animation-delay: .8s; }
  .g-stats.parch.on > .luck { animation-delay: .9s; }
  @keyframes inkIn { from { opacity: 0; filter: blur(3px); } to { opacity: 1; filter: none; } }

  /* nome, idade, ano e lugar */
  .parch .g-who { left: 9.4%; top: 5.2%; right: 34%; display: grid; gap: .6cqw; }
  .parch .g-name { font-family: var(--f-caps); font-weight: 700; font-size: clamp(6.5cqw, calc(74cqw / var(--nl, 7)), 11.5cqw); line-height: 1.05; letter-spacing: .02em; white-space: nowrap;
    background: linear-gradient(180deg, #c9953c, #8a5a1c 55%, #6a400f); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 1px 0 rgba(255, 240, 200, .5)); }
  .parch .g-name.ink { animation: nameInk 1.1s ease both; }
  @keyframes nameInk { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
  .parch .g-age { width: fit-content; padding: .3cqw 2.6cqw .5cqw; border-radius: 99px; font-family: var(--f-caps); font-size: 5.2cqw; font-weight: 700; font-style: normal; line-height: 1.2; color: #fff3d6; background: #7a2c14; }
  .parch .g-rotulo { font-size: 3.5cqw; letter-spacing: .1em; line-height: 1.2; color: #6e3f0c; white-space: nowrap; }
  .parch .g-when { left: 9.4%; right: 8%; top: 20.8%; display: grid; gap: 1cqw; margin: 0; padding: 0; border: 0; }
  .parch .g-year { font-family: "Cormorant Garamond", serif; font-weight: 700; font-size: 13cqw; line-height: .95; color: #24130b; text-shadow: none; font-variant-numeric: lining-nums tabular-nums; }
  .parch .g-where { font-size: 6.6cqw; font-style: italic; color: #3a2214; line-height: 1.15; text-wrap: balance; }

  /* vela: a chama desenhada ganha brilho, que fraqueja quando a vela baixa */
  .parch .g-candle { inset: 0; display: block; pointer-events: none; }
  .parch .g-candle .candle { display: none; }
  .parch .g-flame { left: 16.1%; top: 37.6%; width: 22%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none; mix-blend-mode: screen;
    background: radial-gradient(circle, rgba(255, 214, 120, .95) 0 8%, rgba(255, 170, 60, .45) 22%, rgba(255, 140, 40, 0) 62%);
    opacity: calc(.25 + var(--vela, 1) * .75); animation: flameGlow 1.6s ease-in-out infinite alternate; }
  @keyframes flameGlow { 0% { transform: translate(-50%, -50%) scale(.92); } 40% { transform: translate(-49%, -51%) scale(1.06); } 70% { transform: translate(-51%, -50%) scale(.97); } 100% { transform: translate(-50%, -52%) scale(1.1); } }

  /* números e tinta das barras */
  .parch .stat { display: block; left: 8.3%; right: 8.4%; top: var(--t); height: var(--h); pointer-events: auto; }
  .parch .stat[data-k="alegria"] { --t: 58.1%; --h: 6.7%; }
  .parch .stat[data-k="fortuna"] { --t: 68%; --h: 7.8%; }
  .parch .stat[data-k="amor"] { --t: 79.3%; --h: 7.6%; }
  .parch .g-candle .stat { position: absolute; left: 27.3%; right: 8.4%; top: 46.8%; height: 7.7%; }
  .parch .stat-l, .parch .luck > .stat-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .parch .stat-v { position: absolute; right: 0; top: 32%; transform: translateY(-50%); font-family: var(--f-caps); font-weight: 700; font-size: 7.4cqw; color: #2a160c; }
  .parch .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 24%; background: none; overflow: visible; border-radius: 99px; }
  .parch .bar b { position: absolute; left: 1.2%; top: 26%; bottom: 26%; width: calc(var(--v, .5) * 97.6%); height: auto; border-radius: 99px; top: 17%; bottom: 17%;
    background: linear-gradient(180deg, color-mix(in srgb, var(--c) 70%, #fff6dc), var(--c) 45%, color-mix(in srgb, var(--c) 70%, #3a2010));
    box-shadow: none; mix-blend-mode: multiply; opacity: .9;
    -webkit-mask: linear-gradient(90deg, #000 0 calc(100% - 6px), transparent); mask: linear-gradient(90deg, #000 0 calc(100% - 6px), transparent);
    transition: width 1.1s cubic-bezier(.3, .8, .3, 1); }
  .parch .stat::after { content: ""; position: absolute; left: 0; right: 0; bottom: -10%; height: 44%; border-radius: 99px; pointer-events: none; opacity: 0; }
  .parch .stat.hit-up::after { background: radial-gradient(closest-side, rgba(255, 220, 120, .7), transparent); animation: inkFlash 1s ease; }
  .parch .stat.hit-down::after { background: radial-gradient(closest-side, rgba(170, 30, 30, .45), transparent); animation: inkFlash 1s ease; }
  @keyframes inkFlash { 0% { opacity: 0; } 25% { opacity: 1; } 100% { opacity: 0; } }
  .parch .delta { right: 18%; top: 32%; transform: translateY(-50%); font-size: 7cqw; text-shadow: none; }
  .parch .delta.up { color: #2f6b2a; }
  .parch .delta.down { color: #9a1f1f; }

  /* sorte: as três moedas recortadas do "menu full" */
  .parch .luck { left: 30.2%; top: 94.1%; transform: translateY(-50%); display: block; }
  .parch .luck .moons2 { display: flex; gap: 1.4cqw; }
  .parch .luck .m { width: 7.2cqw; height: 7.2cqw; border: 0; border-radius: 50%; background: url("../assets/moeda-1.webp") center / cover no-repeat;
    opacity: .4; filter: grayscale(.55) brightness(1.12) contrast(.85); box-shadow: none; transition: opacity .6s, filter .6s, transform .6s cubic-bezier(.3, 1.6, .5, 1); }
  .parch .luck .m:nth-child(2) { background-image: url("../assets/moeda-2.webp"); }
  .parch .luck .m:nth-child(3) { background-image: url("../assets/moeda-3.webp"); }
  .parch .luck .m.on { opacity: 1; transform: scale(1.08) rotate(-8deg); filter: saturate(1.3) brightness(1.22) drop-shadow(0 0 3px rgba(255, 205, 100, .9)); }
  .parch .luck .m.bad { opacity: .95; filter: sepia(1) hue-rotate(-28deg) saturate(2.6) brightness(.62) drop-shadow(0 0 2px rgba(120, 10, 10, .6)); }

  /* amuleto: o medalhão fica sobre o selo desenhado no canto */
  .parch .amulet { left: 87%; top: 92.8%; width: 16%; transform: translate(-50%, -50%); pointer-events: auto; }
  .parch .amulet:hover { transform: translate(-50%, -50%) scale(1.1) rotate(-5deg); }

  /* um brilho dourado passa pelo papel de vez em quando */
  .parch .g-sheen { inset: 0; pointer-events: none; mix-blend-mode: soft-light;
    -webkit-mask: url("../assets/hud-pergaminho.webp") center / 100% 100% no-repeat; mask: url("../assets/hud-pergaminho.webp") center / 100% 100% no-repeat;
    background: linear-gradient(115deg, transparent 35%, rgba(255, 236, 170, .9) 48%, transparent 60%) no-repeat; background-size: 300% 100%; animation: sheen 9s ease-in-out 2s infinite; }
  @keyframes sheen { 0% { background-position: 120% 0; } 30%, 100% { background-position: -20% 0; } }
}
@media (prefers-reduced-motion: reduce) {
  .g-stats.parch.on, .parch .g-flame, .parch .g-sheen, .parch .amulet.on { animation: none; }
  .g-stats.parch.on { transform: translateY(-50%); }
}
@media (max-width: 900px) and (orientation: portrait) { .g-sheen, .g-flame { display: none; } }

/* ---------- fases da vida: faixa de pergaminho (desktop) ----------
   Só a fase atual aparece escrita; as outras são pontos de tinta e a atual
   ganha a moeda dourada do painel. Papel: tools/build_menu.py -> hud-faixa. */
@media (min-width: 901px), (orientation: landscape) {
  .g-track.glass { gap: 14px; padding: 0 30px; height: 44px; border: 0; border-radius: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none;
    background: url("../assets/hud-faixa.webp") center / 100% 100% no-repeat; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .5)); }
  .g-track ol { gap: 0; }
  .g-track-t { font-family: var(--f-caps); font-weight: 700; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; color: #7a4d14; }
  .g-track li { gap: 0; color: #3a2010; }
  .g-track li + li::before { width: 16px; height: 1.5px; margin: 0 5px; background: rgba(90, 58, 20, .4); }
  .g-track li i { width: 11px; height: 11px; border: 1.5px solid rgba(90, 58, 20, .55); background: transparent; box-shadow: none; transform: none; }
  .g-track li.done i { background: #5a3a1a; border-color: #5a3a1a; }
  .g-track li.on i { width: 22px; height: 22px; border: 0; background: url("../assets/moeda-2.webp") center / cover no-repeat;
    filter: saturate(1.3) brightness(1.22) drop-shadow(0 0 4px rgba(255, 200, 90, .9)); box-shadow: none; transform: rotate(-8deg); animation: coinIn .6s cubic-bezier(.3, 1.6, .5, 1); }
  @keyframes coinIn { from { transform: scale(.3) rotate(-120deg); opacity: 0; } }
  .g-track li span { font-family: var(--f-caps); font-weight: 700; font-size: 13px; letter-spacing: .14em; color: #3a2010; }
  .g-track li.on span { max-width: 170px; margin-left: 8px; }
  .g-track li.done, .g-track li.on { color: #3a2010; }
}

/* ---------- cartas de tarô: verso, escolha e virada ---------- */
.tarot-row { gap: 22px; perspective: 1100px; padding-top: 10px; }
.tarot { width: 128px; height: 219px; border: 0; padding: 0; background: none; animation: cardDeal .6s cubic-bezier(.2, .9, .3, 1.2) both; }
@keyframes cardDeal { from { opacity: 0; transform: translateY(40px) rotate(-6deg) scale(.9); } }
.tarot .f, .tarot .b { padding: 0; border: 0; border-radius: 9px; background-size: cover; background-position: center; box-shadow: 0 12px 26px rgba(0, 0, 0, .55), 0 2px 4px rgba(0, 0, 0, .4); }
.tarot .b { background-image: url("../assets/tarot/verso.webp"); }
.tarot .f { overflow: hidden; }
.tarot .f::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(115deg, transparent 35%, rgba(255, 240, 200, .65) 50%, transparent 65%) no-repeat; background-size: 300% 100%; background-position: 130% 0; mix-blend-mode: soft-light; }
.tarot:hover { transform: translateY(-10px) rotate(-1.5deg); }
.tarot:hover .b { box-shadow: 0 18px 30px rgba(0, 0, 0, .6), 0 0 22px rgba(246, 213, 140, .45); }
.tarot.pick { z-index: 5; animation: cardPick 1.15s cubic-bezier(.3, .8, .25, 1) forwards; }
.tarot.pick .f { box-shadow: 0 24px 50px rgba(0, 0, 0, .65), 0 0 40px rgba(255, 220, 140, .55); }
.tarot.pick .f::after { animation: cardSheen 1.2s ease .95s both; }
@keyframes cardPick {
  0% { transform: none; }
  35% { transform: translate(calc(var(--dx, 0px) * .6), calc(var(--dy, -26px) * .6 - 30px)) scale(1.18) rotateY(0deg) rotateZ(-3deg); }
  100% { transform: translate(var(--dx, 0px), var(--dy, -26px)) scale(1.32) rotateY(180deg) rotateZ(0deg); }
}
/* com a carta ao lado, o Seguir entra sem empurrar a fileira para cima */
@media (min-width: 901px), (orientation: landscape) { .g-next.over { position: absolute; left: 0; right: 0; bottom: 0; margin-inline: auto; width: fit-content; } }
@keyframes cardSheen { from { background-position: 130% 0; } to { background-position: -30% 0; } }
.tarot.dim { opacity: 0; transform: translateY(30px) scale(.9); transition: opacity .5s ease, transform .5s ease; pointer-events: none; }
@media (max-width: 900px) and (orientation: portrait) { .tarot { width: 92px; height: 158px; } .tarot-row { gap: 14px; } }
@media (prefers-reduced-motion: reduce) { .tarot, .tarot.pick { animation: none; } .tarot.pick { transform: translate(var(--dx, 0px), var(--dy, 0px)) rotateY(180deg); } }

/* carta invertida: a ilustração aparece de cabeça para baixo */
.tarot.rev .f { transform: rotateY(180deg) rotateZ(180deg); }
.tarot.rev.pick .f { box-shadow: 0 24px 50px rgba(0, 0, 0, .65), 0 0 40px rgba(255, 74, 106, .55); }

/* ---------- janelas em pergaminho (todas; o mural é a maior) ----------
   Papel e ornamentos vêm de tools/build_menu.py (mural-papel, orn-*). Os
   ornamentos são impressos no papel (multiply) e não esticam com a janela. */
.modal-card.parch { width: min(640px, 100%); max-height: none; padding: clamp(46px, 7vw, 64px) clamp(34px, 6vw, 58px) clamp(44px, 6vw, 58px); overflow: visible; border: 0; border-radius: 0;
  background: url("../assets/mural-papel.webp") center / 100% 100% no-repeat; box-shadow: none; filter: drop-shadow(0 26px 40px rgba(0, 0, 0, .6)); color: #2a160c;
  animation: parchIn2 .7s cubic-bezier(.2, .9, .3, 1) both; }
@keyframes parchIn2 { from { opacity: 0; transform: translateY(18px) rotate(-1deg) scale(.97); clip-path: inset(0 0 100% 0); } 60% { clip-path: inset(0 0 0 0); } }
.modal-card.parch .orn { position: absolute; z-index: 0; pointer-events: none; mix-blend-mode: multiply; background: center / contain no-repeat; }
.modal-card.parch .orn-canto { top: 3.6%; left: 3%; width: 15%; aspect-ratio: 240 / 230; background-image: url("../assets/orn-canto.svg"); }
.modal-card.parch .orn-canto-b { bottom: 3.6%; left: 3%; width: 15%; aspect-ratio: 240 / 230; background-image: url("../assets/orn-canto.svg"); transform: scaleY(-1); }
.modal-card.parch .orn-sol { top: 3.4%; right: 3.4%; width: 21%; aspect-ratio: 576 / 580; background-image: url("../assets/orn-sol.svg"); }
.modal-card.parch .orn-selo { bottom: 3.4%; right: 3.2%; width: 13%; aspect-ratio: 220 / 230; background-image: url("../assets/orn-selo.svg"); }
.parch .parch-scroll { position: relative; max-height: min(72vh, 640px); overflow: auto; padding: 4px 10px 8px; scrollbar-width: thin; scrollbar-color: rgba(90, 58, 20, .5) transparent; }
.modal.mural-parch .modal-card { width: min(920px, 100%); height: min(88vh, 820px); padding: 0; }
.mural-parch .parch-scroll { position: absolute; inset: 7% 7.5% 8% 7.5%; max-height: none; padding: 4px 10px 20px; }
/* o fechar fica com o centro na quina do papel (2,1% e 1,75% são a margem transparente da imagem) */
.modal-card.parch .modal-close { --t: 40px; z-index: 2; top: calc(2.1% - var(--t) / 2); right: calc(1.75% - var(--t) / 2); width: var(--t); height: var(--t); border: 1.5px solid #8a5a1c; background: #f3e6d0; box-shadow: 0 4px 12px rgba(0, 0, 0, .55); color: #3a2214; backdrop-filter: none; }
.modal-card.parch .modal-close:hover { color: #1a0c06; border-color: #5a3a14; background: #fff6e2; }
.modal-card.parch .modal-close .ico { background: currentColor; }
.modal-card.parch h2 { margin: 6px 0 2px; padding-right: 0; font-size: clamp(26px, 3.2vw, 34px); letter-spacing: .06em;
  background: linear-gradient(180deg, #c9953c, #8a5a1c 55%, #6a400f); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 1px 0 rgba(255, 240, 200, .5)); }
.modal-card.parch .orn-div { display: block; width: min(560px, 80%); aspect-ratio: 1200 / 90; margin: 4px 0 10px; mix-blend-mode: multiply; background: url("../assets/orn-divisor.svg") left center / contain no-repeat; }
.parch .mural-stats { color: #4a2c18; font-style: italic; font-size: 17px; }
.modal-card.parch .empty, .modal-card.parch p { color: #3a2214; }

/* abas escritas a tinta, a escolhida sublinhada a ouro */
.parch .tabs { background: none; border: 0; padding: 0; gap: 4px; margin: 12px 0 18px; }
.parch .tabs button { min-height: 38px; padding: 0 16px; border-radius: 0; background: none; color: #7a5a3a; font-size: 13px; position: relative; }
.parch .tabs button + button::before { content: "◆"; position: absolute; left: -6px; top: 50%; transform: translateY(-50%); font-size: 7px; color: rgba(138, 90, 28, .6); }
.parch .tabs button:hover { color: #3a2214; }
.parch .tabs button[aria-selected="true"] { background: none; color: #24130b; }
.parch .tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, #c9953c 20%, #e8c36a 50%, #c9953c 80%, transparent); }

/* destinos e marcos: moedas do painel; os que faltam ficam apagados */
.parch .collect { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 12px; }
.parch .coll { gap: 6px; padding: 14px 8px 12px; border-radius: 6px; border: 1px solid rgba(90, 58, 20, .22); background: rgba(255, 250, 235, .28); color: #2a160c; font-family: var(--f-caps); font-size: 12.5px; font-weight: 700; letter-spacing: .03em;
  box-shadow: inset 0 0 0 3px rgba(255, 250, 235, .25); transition: transform .25s ease, box-shadow .25s ease; }
.parch .coll:not(.locked):hover { transform: translateY(-2px); box-shadow: inset 0 0 0 3px rgba(255, 250, 235, .25), 0 6px 14px rgba(90, 50, 10, .2); }
.parch .coll small { font-family: var(--f-text); font-weight: 500; font-style: italic; font-size: 13px; letter-spacing: 0; color: #6a4a2a; }
.parch .coll .seal { width: 54px; height: 54px; color: #3a2010; background: url("../assets/moeda-2.webp") center / cover no-repeat; filter: saturate(1.3) brightness(1.18) drop-shadow(0 0 4px rgba(255, 200, 90, .6)); }
.parch .coll .seal .bico { width: 20px; height: 20px; stroke-width: 2.4; }
.parch .coll.locked { opacity: 1; color: rgba(90, 58, 20, .55); font-size: 15px; }
.parch .coll.locked .seal { background: url("../assets/moeda-1.webp") center / cover no-repeat; filter: grayscale(.7) brightness(1.15) contrast(.8); opacity: .35; color: transparent; }

/* o que é cada aba e a ficha do destino escolhido */
.parch .mural-expl { max-width: 62ch; margin-bottom: 10px; font-size: 18px; line-height: 1.35; color: #3a2214; }
.parch .coll[data-dest] { width: 100%; cursor: pointer; }
.parch .coll.locked[data-dest]:hover { box-shadow: inset 0 0 0 3px rgba(255, 250, 235, .25), 0 6px 14px rgba(90, 50, 10, .2); }
.parch .coll.sel { border-color: #8a5a1c; box-shadow: inset 0 0 0 2px #b8842f; background: rgba(255, 250, 235, .6); }
.parch .dest-ficha { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 14px; margin: 8px 0 12px; padding: 12px 16px; border: 1px solid #8a5a1c; border-radius: 6px; background: #f3e3c3; box-shadow: 0 6px 14px rgba(90, 50, 10, .25); }
.parch .dest-ficha[hidden] { display: none; }
.parch .dest-ficha .seal { flex: none; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; color: #3a2010; background: url("../assets/moeda-2.webp") center / cover no-repeat; }
.parch .dest-ficha.locked .seal { background-image: url("../assets/moeda-1.webp"); }
.parch .dest-ficha .seal .bico { width: 20px; height: 20px; }
.parch .dest-ficha b { display: block; font-family: var(--f-caps); font-size: 16px; letter-spacing: .04em; color: #24130b; }
.parch .dest-ficha p { margin: 2px 0; font-size: 18px; line-height: 1.3; color: #2e1a0e; }
.parch .dest-ficha small { font-style: italic; font-size: 14px; color: #6a4a2a; }

@media (max-width: 600px) { .parch .tabs button { padding: 0 9px; font-size: 12px; letter-spacing: .08em; } .parch .mural-expl { font-size: 17px; } .parch .dest-ficha { gap: 10px; padding: 10px 12px; } .parch .dest-ficha .seal { width: 44px; height: 44px; } }

/* vidas: as polaroides ficam sobre o papel */
.parch .lives { gap: 18px; }
.parch .polaroid { box-shadow: 0 8px 16px rgba(60, 30, 10, .35), 0 1px 2px rgba(60, 30, 10, .3); }
@media (max-width: 600px) {
  .modal-card.parch .orn-sol { width: 30%; } .modal-card.parch .modal-close { --t: 34px; }
  .mural-parch .parch-scroll { inset: 8% 6% 8% 6%; }
}

/* texto e botões a tinta sobre o papel */
.modal-card.parch p, .modal-card.parch ol, .modal-card.parch ul, .modal-card.parch li { color: #2e1a0e; }
.modal-card.parch ol li::marker { color: #8a5a1c; font-family: var(--f-caps); font-weight: 700; }
.modal-card.parch b, .modal-card.parch strong { color: #24130b; }
.modal-card.parch .btn-ghost { color: #3a2214; border-color: rgba(90, 58, 20, .45); background: rgba(255, 248, 230, .35); }
.modal-card.parch .btn-ghost:hover { color: #1a0c06; border-color: #8a5a1c; background: rgba(255, 248, 230, .6); }
.modal-card.parch .btn-primary { box-shadow: 0 0 0 1px rgba(106, 64, 15, .5) inset, 0 8px 18px rgba(90, 50, 10, .3); }
.modal-card.parch .modal-actions { margin-top: 22px; }

/* ---------- amuleto: a caixa e a volta no tempo ---------- */
.modal-card.parch .amu-grande { display: block; width: 150px; margin: 0 auto 10px; filter: grayscale(.85) brightness(.8) drop-shadow(0 8px 12px rgba(60, 30, 10, .4)); }
.modal-card.parch .amu-grande.on { filter: drop-shadow(0 8px 12px rgba(60, 30, 10, .4)); animation: amuPulsa 2.8s ease-in-out infinite; }
.tempo { position: absolute; inset: 0; z-index: 30; display: grid; place-content: center; justify-items: center; gap: 6px; opacity: 0; transition: opacity .35s;
  background: radial-gradient(circle at 50% 44%, rgba(84, 36, 140, .62), rgba(8, 3, 14, .95) 68%); }
.tempo.on { opacity: 1; }
.tempo.fim { opacity: 0; transition: opacity .6s; pointer-events: none; }
.tempo-disco { position: relative; width: min(48vmin, 340px); aspect-ratio: 1; display: grid; place-items: center; }
.tempo-disco img { position: relative; width: 74%; animation: tempoGira 2.4s cubic-bezier(.45, 0, .2, 1) both; filter: drop-shadow(0 0 26px rgba(196, 150, 255, .9)); }
.tempo-aro, .tempo-raios { position: absolute; inset: 0; border-radius: 50%; }
.tempo-aro { background: repeating-conic-gradient(rgba(246, 213, 140, .9) 0 1deg, transparent 1deg 6deg);
  -webkit-mask: radial-gradient(closest-side, transparent 91%, #000 92%); mask: radial-gradient(closest-side, transparent 91%, #000 92%); animation: tempoAro 1.1s linear infinite reverse; }
.tempo-raios { inset: -34%; background: repeating-conic-gradient(rgba(214, 170, 255, .2) 0 8deg, transparent 8deg 22deg);
  -webkit-mask: radial-gradient(closest-side, #000 30%, transparent 100%); mask: radial-gradient(closest-side, #000 30%, transparent 100%); animation: tempoAro 7s linear infinite reverse; }
.tempo b { position: relative; font-family: var(--f-title); font-size: clamp(44px, 8vw, 72px); line-height: 1.1; color: var(--gold-hi); text-shadow: 0 0 22px rgba(214, 170, 255, .8); font-variant-numeric: tabular-nums; }
.tempo small { position: relative; font-family: var(--f-caps); font-size: 14px; letter-spacing: .28em; text-transform: uppercase; color: var(--paper); }
@keyframes tempoGira { from { opacity: 0; transform: scale(.3) rotate(240deg); } 25% { opacity: 1; } to { opacity: 1; transform: scale(1) rotate(-1080deg); } }
@keyframes tempoAro { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .tempo-disco img, .tempo-aro, .tempo-raios, .amulet.on, .amulet.chama, .amu-grande.on { animation: none; } }

/* créditos em Sobre a casa */
.modal-card.parch .sobre-credito { margin-top: 14px; font-style: italic; }
.modal-card.parch .sobre-credito a { color: #6e3f0c; font-style: normal; font-weight: 600; text-underline-offset: 3px; }
.modal-card.parch .sobre-credito a:hover { color: #24130b; }


/* painel de volume */
.vol-painel { position: fixed; z-index: 60; display: grid; gap: 12px; width: min(330px, calc(100vw - 24px)); padding: 14px 16px; border-radius: 14px; }
.vol-linha { display: grid; grid-template-columns: auto minmax(0, 1fr) 46px; align-items: center; gap: 12px; }
.vol-liga { width: 42px; height: 42px; }
.vol-meio { display: grid; gap: 8px; min-width: 0; }
.vol-nome { font-family: var(--f-caps); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--paper); }
.vol-barra { --v: 100%; position: relative; height: 22px; display: flex; align-items: center; cursor: pointer; touch-action: none; border-radius: 6px; }
.vol-barra::before { content: ""; position: absolute; left: 0; right: 0; height: 5px; border-radius: 99px; background: rgba(255, 255, 255, .16); }
.vol-barra b { position: absolute; left: 0; width: var(--v); height: 5px; border-radius: 99px; background: linear-gradient(90deg, var(--gold), var(--gold-hi)); }
.vol-barra i { position: absolute; left: var(--v); width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: var(--gold-hi); border: 2px solid #5a3a14; box-shadow: 0 2px 6px rgba(0, 0, 0, .5); }
.vol-barra.off b, .vol-barra.off i { filter: grayscale(1) brightness(.7); }
.vol-barra:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }
.vol-num { font-family: var(--f-caps); font-size: 12px; text-align: right; color: var(--gold-hi); font-variant-numeric: tabular-nums; }

/* caixas de interação: o mesmo papel do menu lateral */
.qte.glass, .g-bubble.glass, .vol-painel.glass, .sum-card.glass { border: 0; border-radius: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; color: #2a160c;
  background: url("../assets/mural-papel.webp") center / 100% 100% no-repeat; filter: drop-shadow(0 16px 24px rgba(0, 0, 0, .6)); }
.g-bubble.glass, .g-bubble.glass.from-right { padding: 26px 34px 26px; border-radius: 0; }
.g-bubble::before { color: #7a4d14; }
.g-say { color: #2a160c; }
.g-say .cur::after { background: #6e3f0c; }
@media (max-width: 900px) and (orientation: portrait) { .g-panel > .g-bubble.glass { padding: 18px 24px; border-radius: 0; } }

.qte.glass { gap: 10px; padding: 30px 40px 28px; }
.qte-label { color: #6e3f0c; font-weight: 700; }
.qte-big { color: #24130b; text-shadow: none; font-size: 40px; }
.qte-track { height: 18px; background: rgba(90, 58, 20, .2); box-shadow: inset 0 1px 3px rgba(60, 30, 10, .45); }
.qte-fill { background: linear-gradient(90deg, #8a5a1c, #d9a74a); box-shadow: none; }
.qte-zone { background: rgba(106, 42, 138, .28); border-color: #5a2a7a; }
.qte-mark { top: -5px; height: 28px; background: #3a2214; box-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
.qte-time { height: 4px; border-radius: 99px; overflow: hidden; background: rgba(90, 58, 20, .2); }
.qte-time b { background: #8a5a1c; }

/* botões das ações rápidas: roxos para apertar, verdes para a sequência */
.kbtn { width: 76px; height: 76px; border: 0; border-radius: 0; font-size: 0; background: center / contain no-repeat; filter: drop-shadow(0 5px 6px rgba(50, 25, 5, .5)); transition: transform .08s, filter .1s; touch-action: manipulation; }
.kbtn[data-k="ArrowLeft"] { background-image: url("../assets/botoes/roxo-esq.webp"); }
.kbtn[data-k="ArrowRight"] { background-image: url("../assets/botoes/roxo-dir.webp"); }
.kbtn[data-k="ArrowUp"] { background-image: url("../assets/botoes/roxo-cima.webp"); }
.kbtn[data-k="ArrowDown"] { background-image: url("../assets/botoes/roxo-baixo.webp"); }
.kbtn.hit, .kbtn:active { transform: scale(.92); background-color: transparent; filter: brightness(1.3) drop-shadow(0 0 10px #f6d58c); }
.kbtn:focus-visible { outline: 2px solid #6e3f0c; outline-offset: 2px; border-radius: 16px; }
.kbtn.wide { width: 230px; height: 114px; padding: 0; font-size: 0; background-image: url("../assets/botoes/toque.webp"); }
.seqs { gap: 8px; }
.seqs span { width: 58px; height: 58px; border: 0; border-radius: 0; font-size: 0; background: center / contain no-repeat; opacity: .78; transition: transform .15s, opacity .15s, filter .15s; }
.seqs span[data-k="ArrowLeft"] { background-image: url("../assets/botoes/verde-esq.webp"); }
.seqs span[data-k="ArrowRight"] { background-image: url("../assets/botoes/verde-dir.webp"); }
.seqs span[data-k="ArrowUp"] { background-image: url("../assets/botoes/verde-cima.webp"); }
.seqs span[data-k="ArrowDown"] { background-image: url("../assets/botoes/verde-baixo.webp"); }
.seqs span.cur { opacity: 1; box-shadow: none; transform: scale(1.14); filter: brightness(1.2) drop-shadow(0 0 7px #f6d58c); }
.seqs span.ok { opacity: 1; background-color: transparent; filter: grayscale(.2) brightness(1.55) saturate(1.4); }
@media (max-width: 900px) and (orientation: portrait) {
  .qte.glass { padding: 22px 26px 20px; }
  .qte-big { font-size: 32px; }
  .kbtn { width: 62px; height: 62px; }
  .kbtn.wide { width: 200px; height: 99px; }
  .seqs span { width: 46px; height: 46px; }
}

.vol-painel.glass { padding: 24px 28px; }
.vol-nome { color: #3a2214; font-weight: 700; }
.vol-num { color: #6e3f0c; font-weight: 700; }
.vol-liga { color: #3a2214; border-color: rgba(90, 58, 20, .5); background: rgba(255, 248, 230, .4); backdrop-filter: none; }
.vol-liga:hover { color: #1a0c06; border-color: #8a5a1c; }
.vol-liga[aria-pressed="false"] { color: #8d7a60; }
.vol-liga .ico { background: currentColor; }
.vol-barra::before { background: rgba(90, 58, 20, .22); }
.vol-barra b { background: linear-gradient(90deg, #8a5a1c, #d9a74a); }
.vol-barra i { background: #f3e6d0; border-color: #6e3f0c; }
.vol-barra:focus-visible { outline-color: #6e3f0c; }

.sum-card.glass { padding: 44px 46px 40px; }
.sum-card .eyebrow { color: #7a4d14; }
.sum-card h2 { color: #6e3f0c; }
.sum-years { color: #5a4326; }
.sum-dest { border-color: #8a5a1c; color: #5a3410; }
.sum-epi { color: #24130b; }
.sum-cause { color: #3a2214; }
.sum-cause b { color: #7a4d14; }
.sum-licao { color: #24130b; }
.sum-score strong { color: #24130b; text-shadow: none; }
.sum-score span { color: #6e3f0c; }
.sum-note { color: #4f2a7a; }
.sum-card h3, .sum-card .mural-stats, .sum-card .empty { color: #5a3410; }
.sum-card .chip { color: #2a160c; background: rgba(255, 248, 230, .45); border-color: rgba(90, 58, 20, .5); }
.sum-card .chip.new { border-color: #a0347a; }

/* no celular o menu lateral vira faixa, no mesmo papel */
@media (max-width: 900px) and (orientation: portrait) {
  .g-stats.glass { border: 0; border-radius: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; padding-inline: 22px; padding-block: 16px; color: #2a160c;
    background: url("../assets/mural-papel.webp") center / 100% 100% no-repeat; filter: drop-shadow(0 10px 16px rgba(0, 0, 0, .55)); }
  .g-stats .g-name { color: #6e3f0c; }
  .g-stats .g-age, .g-stats .g-where { color: #3a2214; }
  .g-stats .g-year { color: #24130b; text-shadow: none; }
  .g-stats .stat-l { color: #3a2214; font-weight: 700; }
  .g-stats .stat-v { color: #2a160c; }
  .g-stats .bar { background: rgba(90, 58, 20, .22); }
}

/* ---------- ações rápidas: aro e vitória ---------- */
.qte-keys { margin-top: 4px; }
.qte.venceu { animation: qteVence .5s ease; }
.qte.perdeu { animation: shake .4s; }
@keyframes qteVence { 40% { transform: scale(1.04); filter: brightness(1.12) drop-shadow(0 0 22px #f6d58c); } }
.kbtn.wide { position: relative; }
.qte-aro { --z: 1.6; position: absolute; inset: -5px; border: 3px solid #d9a74a; border-radius: 26%/50%; transform: scale(var(--z)); pointer-events: none; box-shadow: 0 0 10px rgba(246, 213, 140, .8), inset 0 0 8px rgba(246, 213, 140, .5); }
.qte-aro.certo { border-color: #fff3c4; box-shadow: 0 0 22px #f6d58c, inset 0 0 12px #f6d58c; }

/* ---------- celular deitado: pergaminho à esquerda, bola no centro, Madame e escolhas à direita ---------- */
@media (orientation: landscape) and (max-height: 520px) {
  /* deitado, o celular usa a mesa do computador: o ajuste de bolso fica em css/celular.css */
  .choices { grid-template-columns: 1fr; gap: 3px; }
  .choice { min-height: 46px; padding: 0 4px; border-width: 13px; border-image-width: 13px; font-size: 15px; line-height: 1.12; }
  #game .g-next { align-self: center; min-width: 190px; min-height: 50px; padding: 0 22px 0 28px; font-size: 16px; }
  .g-next.over { position: static; }
  .tarot-row { gap: 10px; padding-top: 0; justify-content: center; }
  .tarot { width: 78px; height: 128px; }
  .g-stagecard h2 { font-size: 44px; } .g-stagecard p { font-size: 14px; }
  .g-badges { top: 50px; left: 50%; transform: translateX(-50%); justify-items: center; }

  /* na ação rápida a caixa sobe para o meio e os botões vão para os cantos */
  .g-panel:has(.qte) { left: 50%; right: auto; top: 46px; bottom: auto; transform: translateX(-50%); width: min(54vw, 440px); justify-content: flex-start; }
  .g-panel:has(.qte) .g-bubble { display: none; }
  .qte.glass { width: 100%; gap: 3px; padding: 16px 28px 14px; }
  .qte-label { font-size: 11px; letter-spacing: .1em; }
  .qte-big { font-size: 24px; min-height: 0; }
  .qte-track { height: 13px; }
  .qte-mark { top: -5px; height: 23px; }
  .seqs span { width: 44px; height: 44px; }
  .qte-keys.polegares { position: absolute; left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right)); bottom: max(10px, env(safe-area-inset-bottom)); z-index: 6; display: flex; justify-content: space-between; gap: 10px; margin: 0; pointer-events: none; }
  .qte-keys.polegares .kbtn { width: 94px; height: 94px; pointer-events: auto; animation: botaoSobe .28s cubic-bezier(.2, 1.3, .4, 1) both; }
  .qte-keys.polegares .kbtn.wide { width: 176px; height: 87px; }
  .qte-keys.polegares .kbtn.lado-d { margin-left: auto; }
  .qte-keys.polegares .kbtn:nth-child(3) { margin-left: auto; }
  @keyframes botaoSobe { from { opacity: 0; transform: translateY(30px) scale(.8); } }

  .sum { gap: 8px; }
  .g-summary { padding: 8px 12px; align-items: flex-start; }
  .sum-card.glass { padding: 26px 30px 22px; }
  .sum-card h2 { font-size: 24px; }
  .sum-epi { font-size: 18px; margin-bottom: 8px; }
  .sum-cause { font-size: 15px; } .sum-licao { font-size: 16px; }
  .sum-years { font-size: 11px; margin-bottom: 8px; }
  .sum-score strong { font-size: 32px; }
  .sum-actions .btn { min-height: 42px; padding: 0 16px; font-size: 12px; }

  .modal { padding: 6px; }
  .modal-card.parch { padding: 30px 40px 26px; }

  .vol-painel.glass { padding: 18px 24px; gap: 6px; }
  .gate-card { gap: 6px; zoom: .74; }
  .gate-sign { padding: 16px 30px 14px; width: min(430px, 100%); }
  .gs-eye { width: 58px; }
  .gate-tip { display: none; }
}

/* celular em pé: teclas maiores e longe da sequência, sorte na faixa, amuleto perto do polegar */
@media (max-width: 900px) and (orientation: portrait) {
  .seqs { margin-bottom: 14px; }
  .qte-keys { justify-content: center; gap: 8px; width: 100%; margin-top: 8px; }
  .kbtn { width: 70px; height: 70px; }
  .kbtn.wide { width: 230px; height: 114px; }

  .g-stats.glass { filter: none; }
  .g-stats.glass .luck { display: flex !important; position: absolute; right: 24px; top: 18px; gap: 7px; }
  .g-stats .luck .stat-l { font-size: 10px; letter-spacing: .1em; color: #3a2214; font-weight: 700; }
  .g-stats .luck .moons2 { gap: 3px; }
  .g-stats .luck .m { width: 22px; height: 22px; border: 0; background: url("../assets/moeda-1.webp") center / cover no-repeat; opacity: .35; filter: grayscale(.7); box-shadow: none; }
  .g-stats .luck .m:nth-child(2) { background-image: url("../assets/moeda-2.webp"); }
  .g-stats .luck .m:nth-child(3) { background-image: url("../assets/moeda-3.webp"); }
  .g-stats .luck .m.on { opacity: 1; filter: saturate(1.3) brightness(1.15); }
  .g-stats .luck .m.bad { opacity: .95; filter: sepia(1) hue-rotate(-28deg) saturate(2.6) brightness(.62); }

  .amulet { position: fixed; right: 12px; top: 44vh; width: 62px; z-index: 5; }
  .amulet.on { filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .7)) drop-shadow(0 0 8px rgba(246, 213, 140, .7)); }
}

/* a Madame ensina na hora: bilhete curto apontando para a peça */
.dica { position: absolute; z-index: 8; width: fit-content; max-width: min(270px, calc(100vw - 20px)); padding: 16px 20px; font-family: var(--f-text); font-size: 17px; line-height: 1.26; text-align: left; text-wrap: pretty; color: #2a160c; background: url("../assets/mural-papel.webp") center / 100% 100% no-repeat; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .6)); animation: dicaVem .4s cubic-bezier(.2, 1.3, .4, 1) both; pointer-events: auto; }
.dica::after { content: ""; position: absolute; width: 0; height: 0; border: 9px solid transparent; }
.dica.seta-e::after { left: -14px; top: 50%; margin-top: -9px; border-right-color: #e9cf9f; }
.dica.seta-c::after { top: -14px; left: 50%; margin-left: -9px; border-bottom-color: #e9cf9f; }
.dica.seta-b::after { bottom: -14px; left: 50%; margin-left: -9px; border-top-color: #e9cf9f; }
.dica span { display: block; text-wrap: balance; }
.dica .dica-ok { display: block; min-height: 40px; margin: 12px auto 2px; padding: 8px 20px; font-size: 13px; }
.dica-veu { position: absolute; inset: 0; z-index: 7; overflow: hidden; pointer-events: auto; transition: opacity .28s; }
.dica-veu i { position: absolute; border-radius: 14px; box-shadow: 0 0 0 200vmax rgba(8, 3, 14, .62); }
.dica-veu.sai { opacity: 0; }
.dica.sai { opacity: 0; transition: opacity .28s; }
@keyframes dicaVem { from { opacity: 0; transform: scale(.9) translateY(6px); } }
.dica-alvo { animation: dicaBrilha 1.5s ease-in-out infinite; }
@keyframes dicaBrilha { 50% { filter: brightness(1.2) drop-shadow(0 0 8px #f6d58c); } }

/* o amuleto chega: desce girando, os raios abrem e ele fica flutuando */
.amulet[hidden] { display: none; }
.amu-chega { position: relative; display: grid; place-items: center; width: 170px; aspect-ratio: 1; margin: -8px auto 4px; }
.amu-chega i { position: absolute; inset: -14%; border-radius: 50%; background: repeating-conic-gradient(rgba(217, 167, 74, .5) 0 7deg, transparent 7deg 26deg); -webkit-mask: radial-gradient(closest-side, #000 40%, transparent); mask: radial-gradient(closest-side, #000 40%, transparent); animation: amuRaios 14s linear infinite, amuAbre 1.2s ease both; }
.amu-chega img { position: relative; width: 74%; filter: drop-shadow(0 8px 12px rgba(60, 30, 10, .45)); animation: amuChega 1.3s cubic-bezier(.2, 1.15, .3, 1) both, amuFlutua 3.4s ease-in-out 1.3s infinite; }
@keyframes amuRaios { to { transform: rotate(360deg); } }
@keyframes amuAbre { from { opacity: 0; } }
@keyframes amuChega { from { opacity: 0; transform: translateY(-46px) scale(.4) rotate(-300deg); } }
@keyframes amuFlutua { 50% { transform: translateY(-7px) rotate(2deg); } }
.amu-voa { position: fixed; z-index: 70; pointer-events: none; animation: amuVoa .9s cubic-bezier(.5, 0, .2, 1) both; filter: drop-shadow(0 0 12px rgba(214, 170, 255, 1)); }
@keyframes amuVoa { from { transform: translate(var(--dx), var(--dy)) scale(2.6); opacity: .4; } }
@media (prefers-reduced-motion: reduce) { .dica, .dica-alvo, .amu-chega i, .amu-chega img { animation: none; } }
@media (orientation: landscape) and (max-height: 520px) { .dica { font-size: 15px; padding: 12px 16px; max-width: 220px; } .dica .dica-ok { margin-top: 8px; min-height: 36px; padding: 6px 16px; } .amu-chega { width: 110px; } }

/* ---------- abertura: teatro no céu da meia-noite ---------- */
#historia { --z: 1; --d: min(56vh, 42vw); position: fixed; inset: 0; z-index: 50; overflow: hidden; background: radial-gradient(70% 62% at 50% 42%, #2c1244 0%, #150828 46%, #070310 100%); transition: opacity .5s ease; }
#historia::before { content: ""; position: absolute; inset: 0; opacity: .5; background: radial-gradient(38% 30% at 22% 26%, rgba(53, 214, 255, .16), transparent), radial-gradient(34% 34% at 80% 72%, rgba(255, 63, 174, .17), transparent); animation: abNebula 18s ease-in-out infinite alternate; }
@keyframes abNebula { to { transform: scale(1.14) translate(2%, -1%); } }
#historia.fecha { opacity: 0; }
.ab-ceu, .ab-luzes { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.ab-luzes { z-index: 4; }
.ab-palco { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2vh; padding: 3vh 24px 5vh; }
.ab-orbe { --d: inherit; flex: none; transform: scale(var(--z)); transition: transform 3.4s cubic-bezier(.3, 0, .2, 1); animation: none; }
.ab-orbe .lo-ball { box-shadow: 0 0 70px rgba(166, 92, 255, .6), 0 18px 40px rgba(0, 0, 0, .6); }
.ab-orbe .lo-halo { animation: loHalo 4.4s ease-in-out infinite; }
.ab-fum { z-index: 1; }
.ab-orbe .lo-glass { z-index: 2; }
.ab-fala { position: relative; z-index: 2; min-height: 2.5em; max-width: min(760px, 92vw); margin: 0; font-family: var(--f-text); font-size: clamp(25px, 4.2vh, 40px); font-style: italic; line-height: 1.2; text-align: center; text-wrap: balance; color: var(--paper); text-shadow: 0 2px 14px rgba(0, 0, 0, .95); transition: opacity .34s; }
.ab-fala span { display: inline-block; animation: abPalavra .62s cubic-bezier(.2, .8, .3, 1) both; animation-delay: calc(var(--i) * 95ms); }
.ab-fala.sai { opacity: 0; }
@keyframes abPalavra { from { opacity: 0; transform: translateY(12px); filter: blur(5px); } }
/* cartas em profundidade: as de longe mais lentas e desfocadas */
.ab-carta { position: absolute; z-index: 1; width: clamp(64px, 11vh, 118px); aspect-ratio: 2 / 3.3; opacity: .92; perspective: 600px; animation: abCarta 13s ease-in-out infinite alternate; }
.ab-carta i { position: absolute; inset: 0; border-radius: 8px; background: center / cover no-repeat; box-shadow: 0 16px 28px rgba(0, 0, 0, .6), 0 0 18px rgba(246, 213, 140, .22); }
.ab-carta.a { left: 11%; top: 16%; --r: -16deg; }
.ab-carta.b { right: 12%; top: 11%; --r: 13deg; animation-duration: 16s; animation-delay: -4s; filter: blur(1.6px) brightness(.75); }
.ab-carta.c { left: 18%; bottom: 13%; --r: 10deg; animation-duration: 19s; animation-delay: -8s; filter: blur(2.4px) brightness(.6); scale: .78; }
.ab-carta.d { right: 8%; bottom: 17%; --r: -9deg; animation-duration: 11s; animation-delay: -2s; scale: 1.12; }
@keyframes abCarta { from { transform: perspective(700px) translateY(14px) rotate(var(--r)) rotateY(-24deg); } to { transform: perspective(700px) translateY(-22px) rotate(calc(var(--r) * -.4)) rotateY(26deg); } }
/* a cortina de teatro abre a cena */
.ab-cortina { position: absolute; top: -2%; bottom: -2%; z-index: 6; width: 52%; transition: transform 1.5s cubic-bezier(.65, 0, .25, 1); box-shadow: 0 0 60px rgba(0, 0, 0, .8);
  background: repeating-linear-gradient(90deg, #2a0a22 0 2.2%, #6a1636 4.4%, #8e2343 5.4%, #4a0f2c 7.6%, #2a0a22 9.2%), #3a0e2a; }
.ab-cortina.e { left: -1%; transform-origin: left; }
.ab-cortina.d { right: -1%; transform-origin: right; }
#historia.aberta .ab-cortina.e { transform: translateX(-88%) scaleX(.86); }
#historia.aberta .ab-cortina.d { transform: translateX(88%) scaleX(.86); }
.ab-clarao { position: absolute; inset: 0; z-index: 5; pointer-events: none; opacity: 0; background: radial-gradient(circle, #fff6dc 0%, #f6d58c 38%, rgba(217, 167, 74, 0) 78%); }
#historia.clarao .ab-clarao { animation: abClarao 2.2s ease-out both; }
@keyframes abClarao { 12% { opacity: 1; } 100% { opacity: 0; } }
.ab-pular { position: absolute; z-index: 7; top: max(14px, env(safe-area-inset-top)); right: max(16px, env(safe-area-inset-right)); padding: 10px 16px; border-radius: 99px; font-family: var(--f-caps); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--paper); background: rgba(10, 4, 18, .5); border: 1px solid rgba(246, 213, 140, .35); cursor: pointer; }
.ab-pular:hover, .ab-pular:focus-visible { color: var(--gold-hi); border-color: var(--gold-hi); }
@media (orientation: portrait) and (max-width: 900px) { #historia { --d: min(74vw, 40vh); } .ab-carta.a { left: 4%; top: 7%; } .ab-carta.b { right: 5%; top: 11%; } .ab-carta.c, .ab-carta.d { display: none; } }
@media (orientation: landscape) and (max-height: 520px) {
  #historia { --d: min(58vh, 38vw); }
  .ab-palco { flex-direction: row; gap: 5vw; padding: 2vh max(24px, env(safe-area-inset-right)) 2vh max(24px, env(safe-area-inset-left)); }
  .ab-fala { flex: 1; max-width: 42vw; min-height: 0; font-size: 21px; text-align: left; }
  .ab-carta { width: 58px; }
  .ab-carta.d { right: 3%; bottom: 8%; } .ab-carta.b { right: 20%; top: 5%; } .ab-carta.c { display: none; }
}
@media (prefers-reduced-motion: reduce) { .ab-carta, #historia::before, .ab-fala span { animation: none; } .ab-orbe, .ab-cortina { transition: none; } }

/* as fases da vida ficam no topo, ao lado do nome do jogo, e entram junto com o pergaminho */
@media (min-width: 901px) and (min-height: 521px), (orientation: landscape) and (min-height: 521px) {
  .g-top { grid-template-columns: auto auto 1fr; }
  .g-track.glass { justify-self: start; opacity: 0; transition: opacity .6s ease; }
  .g-track.glass.on { opacity: 1; }
  .g-tools { grid-column: 3; }
}

/* tela deitada de até 1366: a Madame fica junto do rosto, e escolhas e ações rápidas
   ficam no meio, na parte de baixo, como nas telas grandes, só que menores */
@media (orientation: landscape) and (max-width: 1366px) and (min-height: 521px) {
  .g-panel { gap: 8px; }
  .g-panel > .g-bubble { position: relative; left: auto; top: auto; width: 100%; max-width: none; }
  .g-panel > .g-bubble.glass, .g-panel > .g-bubble.glass.from-right { padding: 18px 26px; }
  .g-bubble::before { font-size: 10px; margin-bottom: 3px; }
  .g-say { font-size: clamp(16px, 2.6vh, 19px); line-height: 1.28; min-height: 0; }
  .g-q { font-size: 18px; }
  .choices { gap: 10px; }
  .choice { min-height: clamp(64px, 11vh, 92px); padding: 0 6px; border-width: 22px; border-image-width: 22px; font-size: 17px; line-height: 1.18; }
  .tarot-row { gap: 12px; padding-top: 0; justify-content: center; }
  .tarot { width: clamp(86px, 9vw, 112px); height: clamp(144px, 15vw, 188px); }
  .qte.glass { gap: 5px; padding: 24px 30px 20px; }
  .qte-label { font-size: 12px; letter-spacing: .1em; }
  .qte-big { font-size: 28px; min-height: 0; }
  .qte-track { height: 14px; }
  .qte-mark { top: -5px; height: 24px; }
  .qte-keys { justify-content: center; }
  .kbtn { width: 64px; height: 64px; }
  .kbtn.wide { width: 184px; height: 91px; }
  .seqs { gap: 6px; }
  .seqs span { width: 44px; height: 44px; }
}

/* resumo da vida: tudo cabe na tela, e as ações ficam no próprio papel, como na tela de fim de um jogo */
.g-summary { padding: 56px 24px 18px; align-items: center; background: rgba(6, 2, 10, .38); backdrop-filter: blur(6px); }
/* a Madame por inteiro: na chegada, e desfocada atrás do resumo */
/* o vidro é desenhado em .orb-vidro, por trás do bronze do vídeo */
.orb-gloss, .orb-shade { display: none; }
.orb-vidro { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.plano-largo { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; object-fit: cover; opacity: 0; pointer-events: none; transition: opacity .9s ease; background: #08030e; }
.plano-largo.on { opacity: 1; pointer-events: auto; }
.plano-largo.resumo { opacity: 1; filter: blur(7px) brightness(.6); transform: scale(1.04); }
.sum { grid-template-rows: minmax(0, 1fr); height: min(100%, 660px); }
.sum-card.glass { min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(90, 58, 20, .5) transparent; }
.sum-dir { display: flex; flex-direction: column; }
.sum-actions { margin-top: auto; padding-top: 10px; display: grid; gap: 10px; }
.sum-actions .btn-primary { width: 100%; }
.sum-ic { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sum-ic button { display: grid; justify-items: center; gap: 3px; padding: 9px 4px 7px; border: 1px solid rgba(90, 58, 20, .4); border-radius: 10px; background: rgba(255, 248, 230, .4); color: #3a2214; font-family: var(--f-caps); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; transition: transform .15s, background .15s, border-color .15s; }
.sum-ic button:hover, .sum-ic button:focus-visible { transform: translateY(-2px); background: rgba(255, 248, 230, .75); border-color: #8a5a1c; }
.sum-ic .ico { width: 22px; height: 22px; }
@media (max-width: 900px) and (orientation: portrait) { .sum { height: auto; } .g-summary { padding-top: 70px; align-items: flex-start; } .sum-card.glass { overflow: visible; } }
@media (orientation: landscape) and (max-height: 520px) { .g-summary { padding: 8px 12px; } .sum-actions .btn { min-height: 40px; } .sum-ic button { padding: 5px 2px 4px; font-size: 10px; } .sum-ic .ico { width: 18px; height: 18px; } .sum { height: 100%; } }

/* mural: a foto inteira cabe sem rolar */
.parch .lives { grid-template-columns: repeat(auto-fill, minmax(128px, 150px)); justify-content: start; padding: 4px 4px 14px; }
.parch .polaroid { padding: 7px 7px 9px; }
.parch .polaroid .ph { aspect-ratio: 5 / 4; }
.parch .polaroid b { margin-top: 5px; font-size: 20px; }
.parch .polaroid span { font-size: 13px; line-height: 1.15; }

/* assinatura em Sobre a casa */
.modal-card.parch .sobre-credito { display: flex; align-items: center; gap: 10px; }
.modal-card.parch .sobre-credito img { display: block; height: 34px; width: auto; }
/* a assinatura: o logo do estúdio, que abre a vinheta, um traço fino e o crédito de quem fez, tudo no centro */
.modal-card.parch .sobre-assina { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 18px; }
.modal-card.parch .sobre-assina .sobre-credito { display: grid; justify-items: start; gap: 6px; margin: 0; }
.sobre-traco { align-self: stretch; width: 1px; background: linear-gradient(transparent, rgba(110, 63, 12, .45) 20% 80%, transparent); }
.sobre-estudio { flex: none; padding: 0; border: 0; border-radius: 6px; background: none; cursor: pointer; transition: transform .18s, filter .18s; }
.sobre-estudio img { display: block; width: 56px; height: auto; }
.sobre-estudio:hover, .sobre-estudio:focus-visible { transform: translateY(-2px); filter: drop-shadow(0 3px 6px rgba(50, 25, 5, .25)); }
.vn-ver { position: fixed; inset: 0; z-index: 2100; display: grid; place-items: center; padding: 16px; outline: none; cursor: pointer; background: rgba(5, 3, 8, .92); animation: vnVer .3s ease-out both; transition: opacity .3s; }
.vn-ver.sai { opacity: 0; }
.vn-ver-filme { display: block; width: min(100%, calc((100dvh - 32px) * 16 / 9)); aspect-ratio: 16 / 9; border-radius: 12px; background: #000; box-shadow: 0 12px 40px rgba(0, 0, 0, .6); }
@keyframes vnVer { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .vn-ver { animation: none; } }

/* o diário das telas grandes, no mesmo papel */
.g-diary.glass { padding: 28px 30px; border: 0; border-radius: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; color: #2a160c; background: url("../assets/mural-papel.webp") center / 100% 100% no-repeat; filter: drop-shadow(0 12px 20px rgba(0, 0, 0, .55)); }
.g-diary.glass h3 { color: #7a4d14; }
.g-diary.glass li, .g-diary.glass li span, .g-diary.glass .empty { color: #3a2214; }
.g-diary.glass li b { color: #6e3f0c; }

/* as cartas ficam no meio, abaixo da bola, e diminuem com a altura da tela */
@media (min-width: 901px) and (min-height: 521px), (orientation: landscape) and (min-height: 521px) {
  .tarot { --th: clamp(132px, 27vh, 250px); height: var(--th); width: calc(var(--th) * .585); }
}
@media (orientation: landscape) and (max-height: 520px) {
  .g-panel:has(.tarot-row) { justify-content: flex-start; }
  .tarot-row { position: fixed; left: 50%; bottom: 6px; transform: translateX(-50%); z-index: 3; }
  .tarot { width: 72px; height: 118px; }
}

/* em telas baixas o balão fica mais compacto, para não encostar nas fases do topo */
@media (orientation: landscape) and (min-height: 521px) and (max-height: 680px) {
  .g-bubble.glass, .g-bubble.glass.from-right { padding: 15px 26px; }
  .g-say { font-size: 16px; line-height: 1.24; }
}

/* tela de celular bem baixa, como a do Safari deitado com as barras à mostra */
@media (orientation: landscape) and (max-height: 350px) { .gate-card { zoom: .62; } }

/* modal do amuleto: imagem e título seguem a altura da tela, para o botão nunca ficar cortado */
.amu-chega { width: clamp(84px, 17vh, 128px); margin: -10px auto 0; }
.modal-card.parch .amu-grande { width: clamp(84px, 17vh, 128px); }
.parch-scroll:has(.amu-chega) h2 { font-size: clamp(22px, 4vh, 30px); }
.parch-scroll:has(.amu-chega) .orn-div { margin: 2px 0 6px; }
.parch-scroll:has(.amu-chega) .modal-actions { margin-top: 12px; }

/* resumo da vida: tudo segue a altura da tela, e nada fica cortado */
@media (min-width: 901px) and (min-height: 521px), (orientation: landscape) and (min-height: 521px) {
  .g-summary { padding: clamp(10px, 5vh, 56px) 24px clamp(10px, 2vh, 18px); }
  .sum { width: min(1120px, 100%); height: auto; grid-template-rows: auto; }
  .sum-card.glass { overflow: hidden; }
  .sum-card.glass { padding: clamp(26px, 4.6vh, 44px) clamp(32px, 3.6vw, 48px); }
  .sum-card .eyebrow { margin-bottom: 4px; }
  .sum-card h2 { font-size: clamp(28px, 5vh, 44px); margin-bottom: 4px; }
  .sum-years { font-size: 13px; margin-bottom: 4px; }
  .sum-dest { margin: 6px 0 8px; padding: 5px 14px; font-size: 13px; }
  .sum-epi { font-size: clamp(19px, 3vh, 24px); line-height: 1.25; margin-bottom: clamp(6px, 1.4vh, 14px); }
  .sum-cause { font-size: clamp(15px, 2.3vh, 18px); line-height: 1.32; }
  .sum-cause + .sum-cause { margin-top: clamp(6px, 1.2vh, 12px); }
  .sum-licao { font-size: clamp(16px, 2.5vh, 20px); }
  .sum-score strong { font-size: clamp(34px, 6vh, 48px); }
  .sum-badges { gap: 6px; margin: 6px 0 10px; }
  .sum-badges .chip { gap: 6px; padding: 3px 11px 3px 3px; font-size: 14px; }
  .sum-badges .chip .seal { width: 22px; height: 22px; }
  .sum-badges .chip .seal .bico { width: 13px; height: 13px; }
  .sum-actions { padding-top: 8px; gap: 8px; justify-content: stretch; }
}
/* janela baixa: o botão principal e os três ícones dividem a mesma linha */
@media (orientation: landscape) and (min-height: 521px) and (max-height: 700px) {
  .sum-actions { grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; }
  .sum-actions .btn-primary { white-space: nowrap; padding-inline: 12px; font-size: 14px; letter-spacing: .1em; }
  .sum-ic { grid-template-columns: repeat(3, 58px); }
}
/* celular deitado: o resumo também mede o conteúdo, sem papel sobrando */
@media (orientation: landscape) and (max-height: 520px) {
  .sum { height: auto; grid-template-rows: auto; }
  .sum-card.glass { overflow: hidden; }
  .sum-actions { justify-content: stretch; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; gap: 6px; padding-top: 6px; }
  .sum-actions .btn-primary { min-height: 44px; white-space: nowrap; padding-inline: 8px; font-size: 12px; letter-spacing: .08em; }
  .sum-ic { grid-template-columns: repeat(3, 50px); gap: 4px; }
}
/* celular em pé: o texto rola e os botões ficam fixos embaixo, no alcance do polegar */
@media (max-width: 900px) and (orientation: portrait) {
  .sum > .sum-actions { position: sticky; bottom: calc(6px + var(--safe-b)); z-index: 2; margin: 0; padding: 18px 22px 16px; justify-content: stretch; background: url("../assets/mural-papel.webp") center / 100% 100% no-repeat; filter: drop-shadow(0 -6px 14px rgba(0, 0, 0, .5)); }
  .sum-badges { gap: 6px; }
  .sum-badges .chip { gap: 6px; padding: 3px 11px 3px 3px; font-size: 14px; }
  .sum-badges .chip .seal { width: 22px; height: 22px; }
  .sum-badges .chip .seal .bico { width: 13px; height: 13px; }
}

/* celular deitado: o amuleto vai para o lado do texto, para o botão caber sem rolar */
@media (orientation: landscape) and (max-height: 520px) {
  .parch-scroll:has(.amu-chega) { padding-top: 0; padding-bottom: 2px; }
  .amu-chega { float: left; width: 92px; margin: 0 18px 0 0; }
  .parch-scroll:has(.amu-chega) h2 { font-size: 21px; margin-top: 0; }
  .parch-scroll:has(.amu-chega) p { margin-block: 2px; font-size: 15px; line-height: 1.24; }
  .parch-scroll:has(.amu-chega) .modal-actions { clear: both; margin-top: 8px; }
}

/* faíscas mágicas dos menus */
.faisca { position: fixed; z-index: 90; pointer-events: none; filter: drop-shadow(0 0 3px currentColor) drop-shadow(0 0 8px rgba(255, 233, 170, .9)); }
.faisca::before { content: ''; position: absolute; inset: 0; background: currentColor; clip-path: polygon(50% 0, 58% 42%, 100% 50%, 58% 58%, 50% 100%, 42% 58%, 0 50%, 42% 42%); }

/* fora do celular as caixas de texto têm o tamanho do texto: as linhas se equilibram e a última nunca fica com uma palavra só */
@media (min-width: 901px) and (min-height: 521px), (orientation: landscape) and (min-height: 521px) {
  .g-say { text-wrap: balance; }
  .qte.glass { width: min(440px, 100%); }
  /* a ação da chama no círculo é a maior: fica à direita da tela, fora do caminho da bola */
  .g-panel:has(.qte-lado) { left: auto; right: clamp(40px, 5vw, 96px); bottom: clamp(48px, 9vh, 96px); transform: scale(var(--esc, 1)); transform-origin: 100% 100%; width: min(420px, 34vw); }
  .qte.glass.qte-lado { width: 100%; }
}

/* a oferta de leitura, no resumo */
.sum-sorte { grid-column: 1 / -1; display: grid; gap: 8px; padding: 10px 0 12px; border-top: 1px solid rgba(90, 58, 20, .3); border-bottom: 1px solid rgba(90, 58, 20, .3); }
.sum-sorte p { font-size: 17px; line-height: 1.28; font-style: italic; color: #24130b; text-wrap: pretty; }
.sum-sorte b { display: block; margin-bottom: 2px; font-family: var(--f-caps); font-style: normal; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: #7a4d14; }
.sum-sorte > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.sum-sorte .btn { min-height: 44px; padding-inline: 14px; white-space: nowrap; font-size: 13px; letter-spacing: .08em; }
.sum-sorte .btn-ghost { color: #3a2214; border-color: rgba(90, 58, 20, .45); background: rgba(255, 248, 230, .35); }
.sum-sorte .btn-ghost:hover { color: #1a0c06; border-color: #8a5a1c; background: rgba(255, 248, 230, .6); }

/* ---------- a leitura da sorte: cruz de cinco cartas ---------- */
.tg { --H: min(22.4vh, 24vw); --W: calc(var(--H) * .585); position: absolute; inset: 0; z-index: 20; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(320px, 1fr); gap: 24px; align-items: start; padding: 14px clamp(18px, 4vw, 56px) 14px; background: #08030e; opacity: 0; transition: opacity .45s ease; overflow: hidden; }
.tg-fundo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tg::before { content: ''; position: absolute; inset: 0; z-index: 1; background: radial-gradient(ellipse at 28% 50%, rgba(10, 4, 16, .42), rgba(6, 2, 10, .72)); }
.tg-cruz { z-index: 2; }
.tg.on { opacity: 1; }
.tg-cruz { position: relative; justify-self: center; display: grid; grid-template-columns: repeat(3, var(--W)); grid-template-rows: repeat(3, var(--H)); gap: 12px calc(var(--W) * .34); }
.tg-slot { position: relative; grid-column: 2; display: grid; place-items: center; padding: 6px; text-align: center; font-family: var(--f-caps); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; line-height: 1.15; color: rgba(243, 230, 208, .85); transition: filter .35s, opacity .35s; }
.tg-slot.s3 { grid-row: 1; } .tg-slot.s0, .tg-slot.s1 { grid-row: 2; } .tg-slot.s2 { grid-row: 3; } .tg-slot.s4 { grid-row: 2; grid-column: 3; }
.tg-slot.s1 .tgc { transform: rotate(90deg) scale(.86); }
.tg.foco .tg-slot.cheio:not(.aceso) { filter: brightness(.45) saturate(.6); }
.tgc { position: absolute; inset: 0; perspective: 900px; }
.tgc .in { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.3, .7, .3, 1); }
.tgc.vira .in { transform: rotateY(180deg); }
.tgc .b, .tgc .f { position: absolute; inset: 0; border-radius: 8px; backface-visibility: hidden; -webkit-backface-visibility: hidden; background: center / cover no-repeat; box-shadow: 0 8px 16px rgba(0, 0, 0, .6); }
.tgc .b { background-image: url("../assets/tarot/verso.webp"); }
.tgc .f { transform: rotateY(180deg); }
.tgc.inv .f { transform: rotateY(180deg) rotate(180deg); }
.tg-papel { position: relative; z-index: 3; align-self: start; margin-top: 2vh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 8px; max-height: calc(100vh - 36px); max-height: calc(100dvh - 28px); padding: clamp(26px, 5vh, 46px) clamp(30px, 3.4vw, 50px) clamp(24px, 4vh, 40px); color: #2a160c; background: url("../assets/mural-papel.webp") center / 100% 100% no-repeat; filter: drop-shadow(0 16px 24px rgba(0, 0, 0, .6)); }
.tg-ey { font-family: var(--f-caps); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: #7a4d14; }
.tg-cab h2 { margin: 2px 0 4px; font-family: var(--f-title); font-size: clamp(26px, 4.4vh, 38px); line-height: 1.08; color: #5a3410; text-wrap: balance; }
.tg-chaves { display: flex; flex-wrap: wrap; gap: 5px; }
.tg-chaves span { padding: 2px 10px; border: 1px solid rgba(90, 58, 20, .4); border-radius: 99px; font-size: 13px; color: #4a2c14; background: rgba(255, 248, 230, .4); }
.tg-texto { min-height: 0; overflow-y: auto; padding-right: 8px; scrollbar-width: thin; scrollbar-color: rgba(90, 58, 20, .5) transparent; cursor: pointer; }
.tg-fala { font-size: clamp(16px, 2.6vh, 19px); line-height: 1.32; color: #24130b; text-wrap: pretty; }
.tg-fala + .tg-fala { margin-top: 8px; }
.tg-fala b { display: block; margin-bottom: 1px; font-family: var(--f-caps); font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: #7a4d14; }
.tg-ops { display: grid; gap: 8px; }
.tg-ops:empty { display: none; }
.tg-ops.grade { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tg-ops.grade.tres { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tg-sai { position: absolute; z-index: 6; top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); }
@media (prefers-reduced-motion: reduce) { .tg, .tgc .in { transition: none; } }
/* celular deitado: a cruz à esquerda, o papel à direita, e o leque rola de lado com o dedo */
@media (orientation: landscape) and (max-height: 520px) {
  .tg { --H: calc((100vh - 28px) / 3.1); --H: calc((100dvh - 28px) / 3.1); grid-template-columns: auto minmax(0, 1fr); gap: 14px; padding: 8px max(10px, env(safe-area-inset-right)) 8px max(10px, env(safe-area-inset-left)); }
  .tg-cruz { gap: 4px calc(var(--W) * .2); }
  .tg-slot { font-size: 9px; padding: 2px; }
  .tg-papel { align-self: stretch; margin-top: 0; max-height: calc(100dvh - 16px); height: 100%; padding: 16px 24px 14px; gap: 4px; }
  .tg { align-items: center; }
  .sum-sorte { padding: 4px 0 6px; gap: 4px; }
  .sum-sorte p { font-size: 14px; }
  .sum-sorte .btn { font-size: 12px; min-height: 42px; }
  .sum-sorte ~ * { display: none; }
  .tg-cab h2 { font-size: 21px; margin: 0 0 2px; }
  .tg-ey { font-size: 10px; }
  .tg-chaves span { font-size: 11px; padding: 0 7px; }
  .tg-fala { font-size: 15px; line-height: 1.24; }
  .tg-fala + .tg-fala { margin-top: 4px; }
  .tg-sai { width: 36px; height: 36px; }
}
/* celular em pé: a cruz em cima, o papel embaixo */
@media (max-width: 900px) and (orientation: portrait) {
  .tg { --H: min(15.5vh, 26vw); grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 8px; align-items: stretch; padding: calc(10px + env(safe-area-inset-top)) 12px calc(10px + var(--safe-b)); }
  .tg-cruz { gap: 5px calc(var(--W) * .22); }
  .tg-slot { font-size: 9px; padding: 2px; }
  .tg-papel { align-self: stretch; margin-top: 0; max-height: none; min-height: 0; padding: 22px 26px 20px; }
  .tg-cab h2 { font-size: 24px; }
  .tg-fala { font-size: 16px; }
}

/* ---------- abertura em planos, como a de um game ---------- */
.ab-cena { position: absolute; inset: 0; z-index: 2; overflow: hidden; }
.ab-plano { position: absolute; left: 50%; top: 45%; width: auto; transform: translate(-50%, -50%); }
.ab-voa { position: absolute; left: 50%; top: 50%; height: 30vh; border-radius: 8px; transform: translate(-50%, -50%); box-shadow: 0 16px 28px rgba(0, 0, 0, .6), 0 0 22px rgba(246, 213, 140, .4); }
.ab-carta { opacity: 0; transition: opacity .8s; }
#historia.cartas .ab-carta { opacity: .92; }
#historia .ab-orbe { position: absolute; opacity: 0; animation: none; }
#historia.com-bola .ab-orbe { opacity: 1; }
#historia .ab-palco { display: grid; place-items: center; padding: 0; }
#historia .ab-fala { position: absolute; left: 50%; bottom: 7vh; z-index: 8; flex: none; width: min(860px, 90vw); max-width: none; min-height: 0; margin: 0; transform: translateX(-50%); text-align: center; font-size: clamp(22px, 4vh, 38px); text-shadow: 0 2px 4px #000, 0 0 22px #000, 0 0 44px rgba(0, 0, 0, .9); }
#historia.titulo .ab-orbe, #historia.titulo .ab-fala { opacity: 0; transition: opacity .3s; }
#historia .ab-fala { transition: opacity .7s ease; }
@media (orientation: landscape) and (max-height: 520px) {
  #historia .ab-fala { bottom: 6vh; font-size: 19px; width: 86vw; }
}
@media (prefers-reduced-motion: reduce) { #historia .ab-orbe { opacity: 1; } }

/* medalhas de destino */
.seal.medalha, .parch .coll .seal.medalha { background: none; filter: drop-shadow(0 3px 5px rgba(40, 20, 8, .45)); }
.seal.medalha img { display: block; width: 100%; height: 100%; }
.sum-dest img { flex: none; width: 34px; height: 34px; margin: -3px 0 -3px -8px; }
.parch .coll .seal.medalha { width: 72px; height: 72px; }
@media (max-width: 900px) and (orientation: portrait) { .ab-voa { height: 17vh; } }

.chip .seal.medalha, .bpop .seal.medalha { background: none; }
.parch .coll.locked .seal.medalha { filter: grayscale(1) brightness(.85) contrast(.75); opacity: .42; }
#game > .hud { z-index: 4; }

/* recomeçar do zero */
.mural-zera { display: flex; justify-content: center; margin: 22px 0 8px; }
.zera-caixa { display: grid; grid-template-columns: 124px minmax(0, 1fr); gap: 20px; align-items: center; }
.zera-caixa img { width: 100%; filter: drop-shadow(0 8px 10px rgba(60, 30, 10, .4)); }
.modal-card.parch .zera-fala { font-style: italic; color: #6e3f0c; }
.modal-card.parch .zera-resta { font-size: 16px; color: #5a4326; }
.modal-card.parch .btn.zera-sim { color: #7a1f1f; border-color: rgba(122, 31, 31, .5); }
.modal-card.parch .btn.zera-sim:hover, .modal-card.parch .btn.zera-sim:focus-visible { color: #fff4e6; background: #7a1f1f; border-color: #7a1f1f; }
@media (max-width: 560px) { .zera-caixa { grid-template-columns: 84px minmax(0, 1fr); gap: 14px; } }

/* abertura: o fundo muda de cor a cada corte, sempre atrás da figura */
.ab-tinta { position: absolute; inset: 0; opacity: .75; pointer-events: none; background-color: var(--tinta, #3b1a6e); transition: background-color .22s;
  -webkit-mask-image: radial-gradient(58% 66% at 50% 46%, #000 12%, transparent 74%); mask-image: radial-gradient(58% 66% at 50% 46%, #000 12%, transparent 74%); }
.ab-ano { position: absolute; left: 50%; top: 46%; font-family: var(--f-title); font-weight: 700; font-size: min(22vh, 24vw, 210px); line-height: 1; white-space: nowrap; color: var(--gold-hi); text-shadow: 0 0 18px rgba(255, 181, 74, .8), 0 3px 0 #5a3410; }
.ab-medalha { position: absolute; left: 50%; top: 45%; width: clamp(66px, min(19vh, 23vw), 170px); height: auto; animation: abMoeda 1.15s linear infinite; }
@keyframes abMoeda { from { rotate: y 0deg; } to { rotate: y 360deg; } }
.ab-alma { position: absolute; bottom: 0; width: auto; pointer-events: none; mix-blend-mode: screen; }

/* o título: o risco de luz, o neon e o ouro são camadas de cada letra */
.ab-titulo { position: absolute; left: 50%; top: 50%; z-index: 9; display: grid; justify-items: center; gap: 2.4vh; width: min(90vw, 1120px); margin: 0; transform: translate(-50%, -50%); font-weight: 400; pointer-events: none; }
/* o brilho em volta das letras custa caro: só entra quando elas param de se mexer */
.ab-titulo svg { width: 100%; height: auto; max-height: 60vh; overflow: visible; }
.ab-titulo.aceso svg { filter: drop-shadow(0 0 7px rgba(255, 196, 104, .9)) drop-shadow(0 0 26px rgba(166, 92, 255, .85)); }
.ab-tela { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; background: #06030c; }
.ab-foto { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; will-change: transform, opacity; }
.ab-negro { position: absolute; inset: 0; z-index: 4; opacity: 0; background: #06030c; pointer-events: none; }
.ab-objeto { position: absolute; left: 50%; top: 45%; height: 19vh; width: auto; pointer-events: none; will-change: transform, opacity; }
.ab-medalha.lenta { animation-duration: 7s; }
.ab-titulo text { font-family: var(--f-title); font-size: 120px; font-weight: 700; letter-spacing: .03em; }
.t-mede { opacity: 0; }
.ab-titulo .l { opacity: 0; transform-box: fill-box; transform-origin: center; stroke-dasharray: 2600; stroke-dashoffset: 2600; stroke-linecap: round; }
.t-halo { fill: none; stroke: #ffb54a; stroke-width: 6; opacity: .4; }
.t-tubo { fill: none; stroke: #fff6dc; stroke-width: 2.2; }
.t-ouro, .t-luz { opacity: 0; stroke: none; }
.ab-sub { display: flex; min-height: 1.3em; font-family: var(--f-caps); font-size: clamp(14px, 2.9vh, 26px); letter-spacing: .3em; text-transform: uppercase; white-space: nowrap; color: #fff4d6; text-shadow: 0 0 8px rgba(255, 196, 104, .9), 0 0 22px rgba(166, 92, 255, .8); }
.ab-sub span { animation: abLetra .5s cubic-bezier(.2, 1.2, .4, 1) both; animation-delay: calc(var(--i) * 28ms); }
@keyframes abLetra { from { opacity: 0; transform: translateY(14px) scale(1.5); } }
@media (max-width: 900px) and (orientation: portrait) { .ab-titulo { width: 86vw; } .ab-sub { letter-spacing: .2em; } }
@media (prefers-reduced-motion: reduce) { .ab-titulo .l { opacity: 1; stroke-dashoffset: 0; } .t-ouro { opacity: 1; } .ab-medalha { animation: none; } }

/* o aviso do padre cabe inteiro no celular deitado, com os botões à vista */
@media (orientation: landscape) and (max-height: 520px) {
  .zera-caixa { grid-template-columns: 84px minmax(0, 1fr); gap: 16px; }
  .zera-caixa img { max-height: 158px; object-fit: contain; }
  .zera-caixa h2 { font-size: 22px; margin: 0 0 2px; }
  .modal-card.parch .zera-caixa .orn-div { display: none; }
  .modal-card.parch .zera-caixa p { margin: 0 0 4px; font-size: 15px; line-height: 1.22; }
  .modal-card.parch .zera-caixa .zera-resta { font-size: 13px; }
}

/* a dificuldade na própria escolha */
.choice-dado { display: block; margin-top: 3px; font-family: var(--f-caps); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-hi); }

/* o dado: quadros do modelo 3D, sobre o papel */
.dado-box { --lado: 128px; width: min(380px, 100%); gap: 8px; padding: 20px 26px; color: #2a160c; background: url("../assets/mural-papel.webp") center / 100% 100% no-repeat; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .55)); }
.dado-box .qte-label { font-size: 18px; font-weight: 700; color: #6e3f0c; }
.dado-regra, .dado-sorte, .dado-fim { margin: 0; font-family: var(--f-text); text-align: center; text-wrap: balance; }
.dado-regra { font-size: 19px; line-height: 1.2; }
.dado-sorte { font-size: 15px; font-style: italic; color: #6e3f0c; }
.dado-fim { min-height: 48px; display: grid; place-items: center; font-family: var(--f-caps); font-size: 17px; font-weight: 700; }
.dado-fim.bom { color: #2f6b2f; }
.dado-fim.ruim { color: #7a1f1f; }
.dado-palco { position: relative; display: grid; place-items: center; width: calc(var(--lado) * 1.5); height: calc(var(--lado) * 1.2); padding: 0; border: 0; background: none; cursor: pointer; perspective: 620px; }
.dado-palco:focus-visible { outline: 2px solid #6e3f0c; outline-offset: 2px; border-radius: 12px; }
.dado-box.rolando .dado-palco { cursor: default; }
.dado-sombra { position: absolute; left: 50%; bottom: 6px; width: calc(var(--lado) * 1.2); height: 16px; border-radius: 50%; background: radial-gradient(closest-side, rgba(40, 20, 8, .55), transparent); transform: translateX(-50%); }
.dado-salto { display: block; width: var(--lado); height: var(--lado); }
.dado-quadro { display: block; width: 100%; height: 100%; background-repeat: no-repeat; background-size: 600% 400%; }
.dado-box:not(.rolando) .dado-salto { animation: dadoEspera 1.8s ease-in-out infinite alternate; }
@keyframes dadoEspera { from { transform: translateY(2px); } to { transform: translateY(-6px); } }
.dado-box .dado-joga { min-height: 48px; }
@media (orientation: landscape) and (max-height: 520px) {
  .dado-box { --lado: 76px; gap: 3px; padding: 12px 18px; }
  .dado-box .qte-label { font-size: 15px; }
  .dado-regra { font-size: 15px; }
  .dado-sorte { font-size: 13px; }
  .dado-fim { min-height: 40px; font-size: 14px; }
  .dado-box .dado-joga { min-height: 40px; padding: 6px 18px; }
}

/* a mesa do ocultista */
.modal.mem-modal .modal-card { width: min(900px, 100%); max-width: none; }
.mem-modal .modal-close { display: none; }
.mem { --carta: min(122px, calc((100dvh - 262px) * .375)); display: grid; grid-template-columns: 158px minmax(0, 1fr); gap: 22px; align-items: center; }
.mem-mestre { display: grid; justify-items: center; gap: 10px; }
.mem-mestre img { height: min(292px, 46dvh); width: auto; filter: drop-shadow(0 8px 10px rgba(60, 30, 10, .4)); }
.mem-mestre.mexe img { animation: memMexe .5s ease-in-out infinite alternate; }
@keyframes memMexe { from { transform: rotate(-2.5deg); } to { transform: rotate(2.5deg) translateY(-3px); } }
.modal-card.parch .mem-fala { min-height: 3.6em; margin: 0; font-family: var(--f-text); font-size: 17px; font-style: italic; line-height: 1.2; text-align: center; text-wrap: balance; color: #5a3410; }
.modal-card.parch .mem-titulo { margin: 0; font-family: var(--f-title); font-size: 26px; font-weight: 700; line-height: 1.1; color: #8a5a14; }
.mem-mesa { display: grid; gap: 10px; justify-items: center; min-width: 0; }
.mem-placar { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; font-family: var(--f-caps); font-size: 13px; letter-spacing: .06em; color: #4a2c10; }
.mem-placar span { display: inline-flex; align-items: center; gap: 8px; }
.mem-tent { display: inline-flex; gap: 4px; }
.mem-tent i { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid #8a5a14; }
.mem-tent i.on { background: #c98a2c; }
.mem-grade { display: grid; grid-template-columns: repeat(var(--col), var(--carta)); gap: 10px; justify-content: center; }
.mem-carta { aspect-ratio: 3 / 4; padding: 0; border: 0; background: none; cursor: pointer; perspective: 700px; }
.mem-carta:disabled { cursor: default; }
.mem-carta:focus-visible { outline: 2px solid #6e3f0c; outline-offset: 3px; border-radius: 8px; }
.mem-vira { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .38s cubic-bezier(.3, .9, .4, 1); }
.mem-carta.aberta .mem-vira { transform: rotateY(180deg); }
.mem-verso, .mem-frente { position: absolute; inset: 0; border-radius: 8px; overflow: hidden; backface-visibility: hidden; box-shadow: 0 5px 10px rgba(50, 26, 8, .4); }
/* as costas das cartas: o portal de latão da máquina (o mesmo emblema do jogo), sobre azul-noite com moldura de latão */
.mem-verso { background: url("../assets/favicon.svg") center / 62% no-repeat, radial-gradient(circle at 50% 45%, #1d4a56 0%, #12303a 45%, #0b1a22 100%);
  box-shadow: inset 0 0 0 3px #a8772e, inset 0 0 0 5px #f0cf86, inset 0 0 0 7px #5a3a10, inset 0 0 18px rgba(0, 0, 0, .6), 0 5px 10px rgba(50, 26, 8, .4); }
.mem-verso::after { content: ""; position: absolute; inset: 12px; border-radius: 4px; border: 1px dashed rgba(240, 207, 134, .35); pointer-events: none; }
.mem-carta:not(:disabled):hover .mem-verso { box-shadow: 0 0 0 2px var(--gold-hi), 0 8px 14px rgba(50, 26, 8, .5); }
.mem-frente { display: grid; place-items: center; padding: 8%; background: radial-gradient(circle at 50% 42%, #fff8e6, #e8d3a6); box-shadow: inset 0 0 0 2px rgba(138, 90, 20, .55), 0 5px 10px rgba(50, 26, 8, .4); transform: rotateY(180deg); }
.mem-frente img { width: 100%; height: 100%; object-fit: contain; }
.mem-carta.feita .mem-frente { box-shadow: inset 0 0 0 3px #d9a74a, 0 0 16px rgba(246, 190, 90, .85); }
.mem-fim { min-height: 48px; display: grid; place-items: center; }
.mem-fim button[hidden] { display: none; }
@media (orientation: landscape) and (max-height: 520px) {
  .mem { --carta: calc((100dvh - 226px) * .375); grid-template-columns: 100px minmax(0, 1fr); gap: 12px; }
  .mem-mestre img { height: 42dvh; }
  .modal-card.parch .mem-fala { min-height: 3.6em; font-size: 13px; }
  .modal-card.parch .mem-titulo { display: none; }
  .mem-mesa { gap: 5px; }
  .mem-grade { gap: 6px; }
  .mem-fim { min-height: 40px; }
  .mem-fim .btn { min-height: 38px; padding: 5px 16px; }
}
@media (max-width: 900px) and (orientation: portrait) {
  .mem { --carta: min(19vw, 12dvh); grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .mem-mestre { grid-template-columns: 72px minmax(0, 1fr); align-items: center; }
  .mem-mestre img { height: 128px; justify-self: center; }
  .modal-card.parch .mem-fala { font-size: 16px; text-align: left; }
  .modal-card.parch .mem-titulo { font-size: 22px; }
  .mem-grade { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) { .mem-mestre.mexe img { animation: none; } .mem-vira { transition: none; } }

/* ---------- a leitura como mesa de verdade: monte, leque e lugares acesos ---------- */
@property --gira { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes tgGira { to { --gira: 360deg; } }
@keyframes tgRespira { 50% { box-shadow: 0 0 26px color-mix(in srgb, var(--cor) 70%, transparent), inset 0 0 22px color-mix(in srgb, var(--cor) 40%, transparent); } }
@keyframes tgChama { 50% { transform: translateY(-5px) scale(1.03); filter: brightness(1.25) drop-shadow(0 0 16px var(--cor, #ffd36a)); } }
@keyframes tgOnda { from { opacity: .95; transform: scale(.7); } to { opacity: 0; transform: scale(1.9); } }
@keyframes tgDica { 50% { transform: translate(-50%, -3px); } }

.tg-slot { --cor: #ffd36a; isolation: isolate; border-radius: 10px; color: #fff4d6; background: radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--cor) 16%, rgba(12, 5, 22, .82)), rgba(8, 3, 14, .86)); box-shadow: 0 0 10px color-mix(in srgb, var(--cor) 28%, transparent), inset 0 0 12px color-mix(in srgb, var(--cor) 14%, transparent); text-shadow: 0 0 8px color-mix(in srgb, var(--cor) 80%, transparent); transition: box-shadow .3s, filter .3s; }
/* o aro de luz que dá a volta no lugar da carta */
.tg-slot::before, .tg-sexta::before { content: ''; position: absolute; inset: 0; z-index: -1; padding: 2px; border-radius: inherit; background: conic-gradient(from var(--gira), color-mix(in srgb, var(--cor) 25%, transparent), var(--cor) 18%, #fff6dc 24%, var(--cor) 30%, color-mix(in srgb, var(--cor) 25%, transparent) 60%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); animation: tgGira 5s linear infinite; }
.tg-slot::after { content: ''; position: absolute; inset: -6px; z-index: 3; border-radius: 14px; border: 3px solid var(--el, var(--cor)); box-shadow: 0 0 22px var(--el, var(--cor)), inset 0 0 22px var(--el, var(--cor)); opacity: 0; pointer-events: none; }
.tg-slot.proximo { animation: tgRespira 1.4s ease-in-out infinite; }
.tg-slot.proximo::before { animation-duration: 1.5s; }
.tg-slot.estoura::after { animation: tgOnda .7s ease-out both; }
/* a carta que cruza deita sobre a primeira */
.tg-slot.s1 { z-index: 2; background: none; box-shadow: none; color: transparent; text-shadow: none; pointer-events: none; }
.tg-slot.s1::before { opacity: 0; }
.tg-slot.s1.proximo { transform: rotate(90deg) scale(.86); background: radial-gradient(circle, color-mix(in srgb, var(--cor) 26%, rgba(12, 5, 22, .7)), rgba(8, 3, 14, .7)); color: #fff4d6; }
.tg-slot.s1.proximo::before { opacity: 1; }
.tg-slot.cheio { color: transparent; text-shadow: none; background: none; box-shadow: none; animation: none; }
.tg-slot.cheio:not(.s1) { pointer-events: auto; }
.tg-slot.cheio::before { --cor: var(--el); opacity: .85; }
.tgc { transition: transform .2s, filter .2s; }
.tg-slot.cheio:not(.s1):hover .tgc { transform: translateY(-5px) scale(1.04); filter: drop-shadow(0 0 14px var(--el)); }
.tg-slot.aceso .tgc { filter: drop-shadow(0 0 16px var(--el, #f6d58c)); }

/* o monte: um bloco de cartas de verdade, que chama quando é a vez dele */
.tg-monte { --cor: #ffd36a; position: relative; z-index: 3; grid-column: 1; grid-row: 2; width: var(--W); height: var(--H); padding: 0; border: 0; border-radius: 8px; opacity: 0; background: url("../assets/tarot/verso.webp") center / cover no-repeat; box-shadow: 1px 1px 0 #2a1740, 2px 2px 0 #c9a24a, 3px 3px 0 #2a1740, 4px 4px 0 #c9a24a, 5px 5px 0 #2a1740, 6px 6px 0 #c9a24a, 7px 7px 0 #2a1740, 10px 12px 18px rgba(0, 0, 0, .7); cursor: default; transition: opacity .45s, transform .45s; transform: translateY(14px) scale(.9); }
.tg-monte.vem { opacity: 1; transform: none; }
.tg-monte.cortado { opacity: .15; }
.tg-monte:focus-visible, .tg-sexta:focus-visible { outline: 2px solid #fff6dc; outline-offset: 5px; }
.tg-solta { position: absolute; inset: 0; border-radius: 8px; background: url("../assets/tarot/verso.webp") center / cover no-repeat; box-shadow: 0 6px 12px rgba(0, 0, 0, .6), 0 0 12px rgba(185, 139, 255, .6); }
.tg-monte.chama, .tg-sexta.chama { cursor: pointer; animation: tgChama 1.3s ease-in-out infinite; }

/* a sexta carta: o lugar só aparece quando é a hora dela */
.tg-sexta { --cor: #ffd36a; position: absolute; left: 0; top: 0; z-index: 3; width: var(--W); height: var(--H); padding: 0; border: 0; border-radius: 10px; background: radial-gradient(circle, rgba(255, 211, 106, .22), rgba(8, 3, 14, .86)); opacity: 0; pointer-events: none; cursor: default; transition: opacity .5s; }
.tg-sexta.on { opacity: 1; pointer-events: auto; }
.tg-sexta.cheia { background: none; animation: none; }
.tg-sexta.cheia::before { --cor: var(--el); }

/* os três montes do corte */
.tg-cortes { position: absolute; z-index: 5; left: 0; right: 0; bottom: 0; display: none; justify-content: center; gap: clamp(26px, 7vw, 90px); padding: 44px 16px 26px; background: linear-gradient(0deg, rgba(6, 2, 10, .94) 60%, rgba(6, 2, 10, 0)); }
.tg-cortes.on { display: flex; }
.tg-pilha { --cor: #b98bff; position: relative; width: calc(var(--H) * .62); height: calc(var(--H) * 1.02); padding: 0; border: 0; background: none; cursor: pointer; transition: transform .18s, filter .18s; }
.tg-pilha i { position: absolute; inset: 0; border-radius: 8px; background: url("../assets/tarot/verso.webp") center / cover no-repeat; box-shadow: 1px 1px 0 #2a1740, 2px 2px 0 #c9a24a, 3px 3px 0 #2a1740, 4px 4px 0 #c9a24a, 5px 5px 0 #2a1740, 0 0 16px color-mix(in srgb, var(--cor) 60%, transparent); animation: tgChama 1.8s ease-in-out infinite; --cor2: var(--cor); }
.tg-pilha:nth-child(2) i { animation-delay: .3s; } .tg-pilha:nth-child(3) i { animation-delay: .6s; }
.tg-pilha:hover, .tg-pilha:focus-visible { transform: translateY(-14px) rotate(-2deg); filter: brightness(1.2) drop-shadow(0 0 18px var(--cor)); outline: none; }
.tg-pilha:active { transform: translateY(-4px) scale(.97); }

/* o leque: as cartas giram em volta de um ponto bem abaixo da mesa */
.tg-leque { --ch: calc(var(--H) * .9); --cw: calc(var(--ch) * .585); --R: 240vw; position: absolute; z-index: 5; left: 0; right: 0; bottom: 0; height: calc(var(--ch) + 3.5vw + 40px); visibility: hidden; pointer-events: none; background: linear-gradient(0deg, rgba(6, 2, 10, .94) 45%, rgba(6, 2, 10, 0)); }
.tg-leque.on { visibility: visible; pointer-events: auto; }
.tg-v { position: absolute; left: 50%; bottom: 12px; width: var(--cw); height: var(--ch); margin-left: calc(var(--cw) / -2); padding: 0; border: 0; background: none; cursor: pointer; transform: rotate(var(--a)); transform-origin: 50% calc(100% + var(--R)); }
.tg-v span { display: block; width: 100%; height: 100%; border-radius: 7px; background: url("../assets/tarot/verso.webp") center / cover no-repeat; box-shadow: -3px 2px 8px rgba(0, 0, 0, .65), 0 0 0 1px rgba(201, 162, 74, .55); transition: transform .16s ease, filter .16s, box-shadow .16s; }
.tg-v:hover, .tg-v:focus-visible { z-index: 30; outline: none; }
.tg-v:hover span, .tg-v:focus-visible span { transform: translateY(-30px) scale(1.1); filter: brightness(1.25); box-shadow: 0 0 0 2px #fff6dc, 0 0 22px #b98bff, 0 0 44px #ff6fb5; }
.tg-v:active span { transform: translateY(-40px) scale(1.14); }

/* botões só para responder: placas encantadas, cada uma na sua cor */
.tg-op { --cor: #b98bff; position: relative; min-height: 50px; padding: 10px 16px; overflow: hidden; border: 2px solid #d9a74a; border-radius: 8px; color: #fff4d6; font-family: var(--f-caps); font-size: 13px; font-weight: 700; letter-spacing: .06em; line-height: 1.15; text-shadow: 0 1px 2px #000, 0 0 10px color-mix(in srgb, var(--cor) 70%, transparent); background: radial-gradient(120% 100% at 50% 0%, color-mix(in srgb, var(--cor) 50%, #1a0c2a), #1a0c2a 70%); box-shadow: inset 0 1px 0 rgba(255, 246, 220, .4), inset 0 -3px 0 rgba(0, 0, 0, .5), 0 3px 0 #6e4a14, 0 6px 10px rgba(40, 20, 8, .45); cursor: pointer; transition: transform .12s, box-shadow .15s, filter .15s; }
.tg-op span { position: relative; z-index: 1; }
.tg-op::before { content: ''; position: absolute; inset: -50% auto -50% -60%; width: 40%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent); transform: skewX(-20deg); transition: left .5s ease; }
.tg-op:hover, .tg-op:focus-visible { outline: none; transform: translateY(-2px); filter: brightness(1.18); box-shadow: inset 0 1px 0 rgba(255, 246, 220, .6), inset 0 -3px 0 rgba(0, 0, 0, .5), 0 5px 0 #6e4a14, 0 0 20px var(--cor), 0 0 42px color-mix(in srgb, var(--cor) 50%, transparent); }
.tg-op:hover::before, .tg-op:focus-visible::before { left: 130%; }
.tg-op:active { transform: translateY(2px); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .6), 0 1px 0 #6e4a14; }
.tg-ops.um .tg-op { --cor: #ffd36a; }

@media (orientation: landscape) and (max-height: 520px) {
  .tg-leque { --ch: 96px; height: 170px; }
  .tg-cortes { padding: 28px 12px 12px; }
  .tg-op { min-height: 42px; font-size: 12px; padding: 5px 9px; }
}
@media (max-width: 900px) and (orientation: portrait) {
  .tg-leque { --ch: 116px; height: 170px; }
  .tg-cortes { gap: 22px; padding: 30px 12px 22px; }
  .tg-pilha { width: 22vw; height: 37vw; }
}
@media (prefers-reduced-motion: reduce) { .tg-slot::before, .tg-sexta::before, .tg-slot.proximo, .tg-monte.chama, .tg-sexta.chama, .tg-pilha i, .tg-toque { animation: none; } }

/* a etiqueta que aponta o que tocar */
.tg-toque { position: absolute; z-index: 7; padding: 6px 12px; border: 1px solid #ffd36a; border-radius: 99px; font-family: var(--f-caps); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; color: #fff4d6; background: rgba(12, 5, 22, .92); box-shadow: 0 0 12px rgba(255, 211, 106, .7); transform: translate(-50%, -100%); pointer-events: none; animation: tgToque 1.3s ease-in-out infinite; }
@keyframes tgToque { 50% { transform: translate(-50%, calc(-100% - 4px)); } }
.tg-plano { position: relative; z-index: 2; display: contents; }

/* na tela grande, tudo deita sobre o tapete do vídeo */
.tg.em-mesa { display: block; padding: 0; --papel: clamp(330px, 25vw, 430px); }
.tg.em-mesa::before { background: radial-gradient(ellipse at 44% 54%, transparent 42%, rgba(6, 2, 10, .6)); }
.tg.em-mesa .tg-fundo { transform: translateX(-4vw) scale(1.1); }
.tg.em-mesa .tg-plano { position: absolute; left: 0; top: 0; display: block; width: 1200px; height: 1000px; transform-origin: 0 0; }
.tg.em-mesa .tg-cruz { --H: 286px; --W: 167px; position: absolute; left: 50%; top: 50%; gap: 28px 104px; transform: translate(-50%, -50%); }
.tg.em-mesa .tg-slot { font-size: 34px; line-height: 1.05; letter-spacing: .02em; border-radius: 16px; }
/* o nome da casa nunca passa da borda da carta: a letra segue a largura dela */
.tg-slot { container-type: inline-size; }
.tg-slot > span { max-width: 100%; font-size: min(1em, 14cqi); overflow-wrap: break-word; }
.tg.em-mesa .tgc .b, .tg.em-mesa .tgc .f { border-radius: 12px; box-shadow: 0 16px 22px rgba(0, 0, 0, .55); }
.tg.em-mesa .tg-monte { border-radius: 12px; box-shadow: 2px 3px 0 #2a1740, 4px 6px 0 #c9a24a, 6px 9px 0 #2a1740, 8px 12px 0 #c9a24a, 10px 15px 0 #2a1740, 12px 18px 0 #c9a24a, 14px 21px 0 #2a1740, 20px 34px 26px rgba(0, 0, 0, .6); }
.tg.em-mesa .tg-solta, .tg.em-mesa .tg-sexta { border-radius: 12px; }
.tg.em-mesa .tg-papel { position: absolute; top: 66px; right: 36px; z-index: 4; width: var(--papel); margin: 0; max-height: calc(100dvh - 84px); padding: 28px 30px 26px; }
.tg.em-mesa .tg-cab h2 { font-size: clamp(24px, 3.6vh, 32px); }
.tg.em-mesa .tg-fala { font-size: clamp(16px, 2.3vh, 18px); line-height: 1.26; }
.tg.em-mesa .tg-ops.grade { grid-template-columns: minmax(0, 1fr); }
.tg.em-mesa .tg-ops.grade.tres { grid-template-columns: minmax(0, 1fr); }
.tg.em-mesa .tg-leque, .tg.em-mesa .tg-cortes { background: linear-gradient(0deg, rgba(6, 2, 10, .72) 40%, rgba(6, 2, 10, 0)); }
.tg.em-mesa .tg-leque { --ch: min(34vh, 260px); --R: 240vw; height: calc(var(--ch) * .62 + 54px); }
.tg.em-mesa .tg-v { bottom: calc(var(--ch) * -.4); }
.tg.em-mesa .tg-v:hover span, .tg.em-mesa .tg-v:focus-visible span { transform: translateY(calc(var(--ch) * -.36)) scale(1.06); }
.tg.em-mesa .tg-v:active span { transform: translateY(calc(var(--ch) * -.4)) scale(1.08); }
.tg.em-mesa .tg-cortes { --H: min(22vh, 170px); padding: 30px 16px 18px; }
.tg-voa { position: absolute; z-index: 6; border-radius: 8px; background: url("../assets/tarot/verso.webp") center / cover no-repeat; box-shadow: 0 0 0 2px #fff6dc, 0 0 22px #b98bff, 0 18px 26px rgba(0, 0, 0, .6); pointer-events: none; transform-origin: 50% 50%; }
.tg-grande { display: none; }
.tg.em-mesa .tg-grande.on { position: absolute; left: 1.4vw; top: 50%; z-index: 4; display: block; width: min(15vw, 34vh); aspect-ratio: 700 / 1200; transform: translateY(-50%); filter: drop-shadow(0 0 16px var(--el)) drop-shadow(0 14px 22px rgba(0, 0, 0, .7)); }
.tg-grande img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.tg-grande img.inv { transform: rotate(180deg); }

/* a cortina de veludo: cada metade presa ao centro, para a emenda ficar sempre no meio da tela */
#historia .ab-cortina { top: 0; bottom: 0; width: 50.4%; background: #2a0a1c center / cover no-repeat; }
#historia .ab-cortina.e { left: 0; background-image: url("../assets/abertura-cortina-e.webp"); background-position: 100% 100%; }
#historia .ab-cortina.d { right: 0; background-image: url("../assets/abertura-cortina-d.webp"); background-position: 0 100%; }

/* o logo fica no alto, como na mesa */
.tg-logo { position: absolute; left: max(20px, env(safe-area-inset-left)); top: max(16px, env(safe-area-inset-top)); z-index: 6; pointer-events: none; }
/* a seta adianta a fala até a hora de agir */
.tg-seta { --cor: #ffd36a; justify-self: end; display: grid; place-items: center; width: 44px; height: 44px; padding: 10px; border: 2px solid #d9a74a; border-radius: 50%; color: #fff4d6; background: radial-gradient(circle at 50% 30%, #4a2190, #1a0c2a 72%); box-shadow: inset 0 1px 0 rgba(255, 246, 220, .4), 0 3px 0 #6e4a14, 0 0 12px rgba(185, 139, 255, .6); cursor: pointer; transition: transform .12s, filter .15s; animation: tgSeta 1.3s ease-in-out infinite; }
.tg-seta[hidden] { display: none; }
.tg-seta svg { width: 100%; height: 100%; }
.tg-seta:hover, .tg-seta:focus-visible { filter: brightness(1.25); outline: none; transform: translateX(2px); }
.tg-seta:active { transform: translateY(2px); }
@keyframes tgSeta { 50% { box-shadow: inset 0 1px 0 rgba(255, 246, 220, .4), 0 3px 0 #6e4a14, 0 0 22px rgba(255, 211, 106, .9); } }
@media (orientation: landscape) and (max-height: 520px) { .tg-logo { display: none; } .tg-seta { width: 36px; height: 36px; padding: 8px; } }
@media (max-width: 900px) and (orientation: portrait) { .tg-logo { font-size: 15px; top: max(12px, env(safe-area-inset-top)); left: 12px; } }
@media (prefers-reduced-motion: reduce) { .tg-seta { animation: none; } }

/* compartilhar é o botão que traz gente nova: ele chama mais que os outros */
.ico-partilha { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='18' cy='5' r='3'/%3E%3Ccircle cx='6' cy='12' r='3'/%3E%3Ccircle cx='18' cy='19' r='3'/%3E%3Cpath d='M8.6 13.5l6.8 4M15.4 6.5l-6.8 4'/%3E%3C/svg%3E"); }
.sum-ic { grid-template-columns: minmax(0, 1fr) minmax(0, 1.9fr) minmax(0, 1fr); }
.sum-ic button.sum-partilha { position: relative; overflow: hidden; color: #fff4d6; border: 2px solid #d9a74a; background: radial-gradient(120% 120% at 50% 0%, #6a35c8, #1a0c2a 72%); box-shadow: inset 0 1px 0 rgba(255, 246, 220, .4), 0 0 14px rgba(185, 139, 255, .65); text-shadow: 0 1px 2px #000; animation: sumChama 2s ease-in-out infinite; }
.sum-ic button.sum-partilha::before { content: ''; position: absolute; inset: -50% auto -50% -60%; width: 40%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .5), transparent); transform: skewX(-20deg); animation: sumBrilho 3.2s ease-in-out infinite; }
.sum-ic button.sum-partilha:hover, .sum-ic button.sum-partilha:focus-visible { background: radial-gradient(120% 120% at 50% 0%, #8a55e8, #2a1450 72%); border-color: #ffd36a; }
@keyframes sumChama { 50% { box-shadow: inset 0 1px 0 rgba(255, 246, 220, .4), 0 0 24px rgba(255, 111, 181, .85); } }
@keyframes sumBrilho { 60%, 100% { left: 130%; } }
.partilha-ops { display: grid; gap: 10px; margin-top: 8px; }
.partilha-ops .btn { display: flex; align-items: center; justify-content: center; text-decoration: none; }

/* ---------- o convite: o resultado de outra pessoa, como cena de jogo ---------- */
.cv { position: fixed; inset: 0; z-index: 60; overflow: hidden; color: #fff4d6; background: #08030e; transition: opacity .6s; }
.cv.sai { opacity: 0; pointer-events: none; }
.cv-fundo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cv-veu { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 45%, rgba(20, 8, 36, .62), rgba(6, 2, 10, .93)); }
.cv-ceu { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.cv-clarao { position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: 0; background: radial-gradient(circle at 34% 46%, #fff6dc, rgba(246, 213, 140, .5) 30%, transparent 62%); }
.cv.carimbo .cv-clarao { animation: cvClarao .7s ease-out; }
@keyframes cvClarao { 12% { opacity: .9; } 100% { opacity: 0; } }
.cv-cortina { position: absolute; top: 0; bottom: 0; z-index: 5; width: 50.4%; background: #2a0a1c center / cover no-repeat; transition: transform 1.3s cubic-bezier(.65, 0, .25, 1); box-shadow: 0 0 60px rgba(0, 0, 0, .8); }
.cv-cortina.e { left: 0; background-image: url("../assets/abertura-cortina-e.webp"); background-position: 100% 100%; }
.cv-cortina.d { right: 0; background-image: url("../assets/abertura-cortina-d.webp"); background-position: 0 100%; }
.cv.abre .cv-cortina.e { transform: translateX(-104%); }
.cv.abre .cv-cortina.d { transform: translateX(104%); }

.cv-palco { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); grid-template-rows: minmax(0, 1fr) auto; gap: 8px clamp(20px, 4vw, 56px); align-items: center; width: min(1180px, 100%); height: 100%; margin: 0 auto; padding: clamp(18px, 4vh, 44px) clamp(18px, 4vw, 48px) clamp(16px, 3vh, 30px); }
.cv-bola { --d: min(44vh, 34vw); position: relative; justify-self: center; width: var(--d); height: calc(var(--d) * 1.2); opacity: 0; transform: scale(.3); }
.cv.bola .cv-bola { opacity: 1; transform: none; transition: opacity .3s, transform .7s cubic-bezier(.2, 1.3, .35, 1); }
.cv-vidro { position: absolute; left: 0; top: 0; width: var(--d); height: var(--d); overflow: hidden; border-radius: 50%; background: radial-gradient(circle at 50% 42%, #7a3fd0, #2a1058 58%, #10061f); box-shadow: 0 0 70px rgba(166, 92, 255, .75), inset 0 0 40px rgba(8, 2, 20, .8); }
.cv-vidro::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(60% 34% at 34% 16%, rgba(255, 255, 255, .42), transparent 70%), radial-gradient(70% 40% at 60% 96%, rgba(255, 186, 110, .3), transparent 70%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); }
.cv-pose { position: absolute; left: 50%; bottom: 7%; height: 78%; width: auto; max-width: 84%; object-fit: contain; transform: translateX(-50%); animation: cvFlutua 4s ease-in-out infinite alternate; }
@keyframes cvFlutua { to { transform: translateX(-50%) translateY(-3%) scale(1.03); } }
.cv-base { position: absolute; left: 50%; top: calc(var(--d) * .86); width: 62%; transform: translateX(-50%); }
.cv-medalha { position: absolute; right: -6%; top: 2%; z-index: 2; width: 36%; opacity: 0; filter: drop-shadow(0 0 16px rgba(255, 211, 106, .9)) drop-shadow(0 8px 12px rgba(0, 0, 0, .6)); }
.cv.carimbo .cv-medalha { animation: cvCarimbo .6s cubic-bezier(.3, 1.4, .4, 1) both; }
@keyframes cvCarimbo { from { opacity: 0; transform: scale(4) rotate(-40deg); } 60% { opacity: 1; transform: scale(.88) rotate(6deg); } to { opacity: 1; transform: none; } }
.cv.carimbo .cv-bola { animation: cvBate .36s ease-out; }
@keyframes cvBate { 30% { transform: translateY(6px) scale(.98); } }

.cv-info { display: grid; gap: clamp(5px, 1.2vh, 11px); min-width: 0; align-content: center; }
.cv-ey { margin: 0; font-family: var(--f-caps); font-size: clamp(11px, 1.8vh, 14px); letter-spacing: .2em; text-transform: uppercase; color: #ffd36a; opacity: 0; transition: opacity .5s; }
.cv.bola .cv-ey { opacity: 1; }
.cv-nome { margin: 0; font-family: var(--f-title); font-size: clamp(38px, 9vh, 82px); font-weight: 700; line-height: 1; color: #f6d58c; text-shadow: 0 0 10px rgba(255, 196, 104, .85), 0 0 34px rgba(166, 92, 255, .9), 0 2px 0 #5a3410; }
.cv-nome span { display: inline-block; opacity: 0; }
.cv.nome .cv-nome span { animation: cvLetra .46s cubic-bezier(.2, 1.4, .4, 1) both; animation-delay: calc(var(--i) * 60ms); }
@keyframes cvLetra { from { opacity: 0; transform: translateY(26px) scale(1.7) rotate(8deg); filter: blur(5px); } to { opacity: 1; transform: none; filter: none; } }
.cv-dados { margin: 0; font-family: var(--f-text); font-size: clamp(15px, 2.5vh, 20px); color: #f3e6ff; opacity: 0; transition: opacity .4s .1s; }
.cv.nome .cv-dados { opacity: 1; }
.cv-destino { display: inline-grid; justify-self: start; gap: 1px; margin: 4px 0 0; padding: 7px 18px 8px; border: 2px solid #d9a74a; border-radius: 10px; background: radial-gradient(120% 120% at 50% 0%, #5a2aa8, #1a0c2a 74%); box-shadow: 0 0 22px rgba(185, 139, 255, .6); opacity: 0; transform: translateX(-30px); }
.cv-destino span { font-family: var(--f-caps); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: #ffd36a; }
.cv-destino b { font-family: var(--f-title); font-size: clamp(20px, 4vh, 32px); line-height: 1.08; color: #fff4d6; }
.cv.carimbo .cv-destino { opacity: 1; transform: none; transition: opacity .35s .2s, transform .5s .2s cubic-bezier(.2, 1.3, .4, 1); }
.cv-epi { margin: 2px 0 0; font-family: var(--f-text); font-size: clamp(17px, 2.9vh, 23px); font-style: italic; line-height: 1.2; color: #ffe9c4; opacity: 0; transform: translateY(12px); }
.cv-morte { margin: 0; font-family: var(--f-text); font-size: clamp(14px, 2.2vh, 17px); line-height: 1.26; color: #e9dcf4; opacity: 0; transform: translateY(12px); }
.cv-morte b { display: block; font-family: var(--f-caps); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: #ffd36a; }
.cv.texto .cv-epi, .cv.texto .cv-morte { opacity: 1; transform: none; transition: opacity .5s, transform .5s; }
.cv.texto .cv-morte { transition-delay: .25s; }
.cv-marcos { display: flex; flex-wrap: wrap; gap: 6px; min-height: 0; }
.cv-marcos img { width: clamp(30px, 6vh, 46px); height: auto; opacity: 0; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .6)); }
.cv.marcos .cv-marcos img { animation: cvMarco .42s cubic-bezier(.2, 1.5, .4, 1) both; animation-delay: calc(var(--i) * 110ms); }
@keyframes cvMarco { from { opacity: 0; transform: scale(2.2) rotate(-30deg); } to { opacity: 1; transform: none; } }

.cv-cta { grid-column: 1 / -1; display: grid; justify-items: center; gap: 6px; padding-top: 4px; text-align: center; opacity: 0; transform: translateY(26px); pointer-events: none; }
.cv.cta .cv-cta { opacity: 1; transform: none; pointer-events: auto; transition: opacity .45s, transform .55s cubic-bezier(.2, 1.3, .4, 1); }
.cv-pergunta { margin: 0; font-family: var(--f-title); font-size: clamp(19px, 3.6vh, 30px); font-weight: 700; line-height: 1.1; text-wrap: balance; color: #fff4d6; text-shadow: 0 0 16px rgba(166, 92, 255, .9), 0 2px 4px #000; }
.cv-botao { min-height: 58px; padding: 0 36px; font-size: clamp(14px, 2.3vh, 17px); animation: cvPulsa 1.5s ease-in-out infinite; }
@keyframes cvPulsa { 50% { transform: scale(1.04); box-shadow: 0 0 34px rgba(255, 211, 106, .95); } }
.cv-sub { margin: 0; font-family: var(--f-text); font-size: clamp(13px, 2vh, 16px); color: #e9dcf4; text-shadow: 0 1px 3px #000; }

@media (max-width: 900px) and (orientation: portrait) {
  .cv-palco { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; gap: 6px; padding: calc(14px + env(safe-area-inset-top)) 18px calc(14px + env(safe-area-inset-bottom)); }
  .cv-bola { --d: min(50vw, 25vh); }
  .cv-info { justify-items: center; text-align: center; align-content: start; }
  .cv-destino { justify-self: center; }
  .cv-marcos { justify-content: center; }
  .cv-nome { font-size: clamp(34px, 11vw, 56px); }
}
@media (orientation: landscape) and (max-height: 520px) {
  .cv-palco { grid-template-rows: minmax(0, 1fr) auto; gap: 2px 16px; padding: 8px max(14px, env(safe-area-inset-right)) 6px max(14px, env(safe-area-inset-left)); }
  .cv-bola { --d: 46vh; }
  .cv-nome { font-size: 30px; }
  .cv-morte, .cv-sub { display: none; }
  .cv-epi { font-size: 14px; }
  .cv-destino { padding: 3px 12px 4px; }
  .cv-destino b { font-size: 18px; }
  .cv-cta { grid-template-columns: auto auto; gap: 14px; align-items: center; }
  .cv-pergunta { font-size: 16px; }
  .cv-botao { min-height: 44px; padding: 0 20px; }
}
@media (prefers-reduced-motion: reduce) { .cv-pose, .cv-botao, .sum-ic button.sum-partilha, .sum-ic button.sum-partilha::before { animation: none; } }

/* a entrada fica no centro exato: a sobra é igual em cima e embaixo, mesmo em tela baixa */
#gate .gate-card { position: absolute; left: 50%; top: 50%; width: min(640px, calc(100vw - 48px)); translate: -50% -50%; }
.cv-botao { letter-spacing: .08em; }
@media (max-width: 900px) and (orientation: portrait) { .cv-botao { width: 100%; padding: 0 12px; letter-spacing: .04em; } }

/* o dado grande, na área vazia à direita da bola, no computador */
@media (min-width: 901px) and (min-height: 521px) {
  .g-panel:has(.dado-box) { right: clamp(20px, 2.4vw, 60px); width: min(430px, 29vw); bottom: 50%; translate: 0 50%; }
  .g-panel:has(.dado-box) .g-bubble { visibility: hidden; }
  .dado-box.qte-lado { --lado: clamp(170px, 28vh, 250px); width: 100%; gap: 12px; padding: 30px 34px; }
  .dado-box.qte-lado .qte-label { font-size: 26px; }
  .dado-box.qte-lado .dado-regra { font-size: 23px; }
  .dado-box.qte-lado .dado-sorte { font-size: 17px; }
  .dado-box.qte-lado .dado-fim { font-size: 21px; min-height: 58px; }
  .dado-box.qte-lado .dado-joga { min-height: 58px; font-size: 16px; }
}

/* ---------- botões do jogo: placas com relevo, da mesma família em todas as telas ----------
   A entrada fica de fora: lá os botões são neon, como o letreiro. */
#game .btn, #modalRoot .btn, .cv .btn { position: relative; overflow: hidden; border-radius: 9px; font-family: var(--f-caps); font-weight: 700; letter-spacing: .1em; text-decoration: none; transition: transform .12s, box-shadow .15s, filter .15s; }
#game .btn::before, #modalRoot .btn::before, .cv .btn::before, #game .sum-ic button::before { content: ''; position: absolute; inset: -50% auto -50% -60%; width: 40%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent); transform: skewX(-20deg); transition: left .5s ease; pointer-events: none; }
#game .btn:hover::before, #modalRoot .btn:hover::before, .cv .btn:hover::before, #game .btn:focus-visible::before, #modalRoot .btn:focus-visible::before, #game .sum-ic button:hover::before { left: 130%; }
/* metal dourado: a ação principal */
#game .btn-primary, #modalRoot .btn-primary, .cv .btn-primary { color: #2a1404; border: 2px solid #6e4a14; background: linear-gradient(180deg, #ffeeb4 0%, #f4c863 40%, #cf9130 64%, #a86f20 100%); text-shadow: 0 1px 0 rgba(255, 240, 200, .6); box-shadow: inset 0 2px 0 rgba(255, 250, 225, .8), inset 0 -3px 0 rgba(110, 66, 14, .55), 0 4px 0 #5a3a10, 0 7px 12px rgba(30, 14, 4, .45); }
#game .btn-primary:hover, #game .btn-primary:focus-visible, #modalRoot .btn-primary:hover, #modalRoot .btn-primary:focus-visible, .cv .btn-primary:hover { outline: none; filter: brightness(1.08); transform: translateY(-2px); box-shadow: inset 0 2px 0 rgba(255, 250, 225, .9), inset 0 -3px 0 rgba(110, 66, 14, .55), 0 6px 0 #5a3a10, 0 0 22px rgba(255, 211, 106, .85), 0 0 44px rgba(255, 111, 181, .35); }
#game .btn-primary:active, #modalRoot .btn-primary:active, .cv .btn-primary:active { transform: translateY(3px); box-shadow: inset 0 2px 5px rgba(90, 50, 10, .6), 0 1px 0 #5a3a10; }
/* o Seguir da mesa: a placa dourada grande, no meio, que chega subindo, respira e deixa o brilho passar sozinho */
#game .g-next { justify-self: center; align-self: center; margin-inline: auto; min-width: 250px; min-height: 58px; padding: 0 30px 0 38px; font-size: 18px; letter-spacing: .16em; animation: gNextEntra .55s cubic-bezier(.2, 1.4, .4, 1) both, gNextRespira 2.6s ease-in-out .8s infinite; }
#game .g-next::before { animation: gNextBrilho 3.4s ease-in-out 1.2s infinite; }
#game .g-next::after { content: ''; flex: none; width: .5em; height: .5em; margin-left: .2em; border-right: 3px solid currentColor; border-bottom: 3px solid currentColor; rotate: -45deg; animation: gNextSeta 1.3s ease-in-out infinite; }
@keyframes gNextEntra { from { opacity: 0; transform: translateY(18px) scale(.86); filter: brightness(1.6); } }
@keyframes gNextRespira { 0%, 100% { box-shadow: inset 0 2px 0 rgba(255, 250, 225, .8), inset 0 -3px 0 rgba(110, 66, 14, .55), 0 4px 0 #5a3a10, 0 0 0 rgba(255, 211, 106, 0); } 50% { box-shadow: inset 0 2px 0 rgba(255, 250, 225, .8), inset 0 -3px 0 rgba(110, 66, 14, .55), 0 4px 0 #5a3a10, 0 0 22px rgba(255, 211, 106, .65); } }
@keyframes gNextBrilho { 0%, 55% { left: -60%; } 85%, 100% { left: 130%; } }
@keyframes gNextSeta { 0%, 100% { translate: 0 0; } 50% { translate: 5px 0; } }
@media (prefers-reduced-motion: reduce) { #game .g-next, #game .g-next::before, #game .g-next::after { animation: none; } }
/* placa roxa: as outras opções */
#game .btn-ghost, #modalRoot .btn-ghost, #game .sum-ic button { --cor: #b98bff; position: relative; overflow: hidden; color: #fff4d6; border: 2px solid #d9a74a; border-radius: 9px; text-shadow: 0 1px 2px #000, 0 0 10px color-mix(in srgb, var(--cor) 70%, transparent); background: radial-gradient(120% 110% at 50% 0%, color-mix(in srgb, var(--cor) 46%, #1a0c2a), #1a0c2a 72%); box-shadow: inset 0 1px 0 rgba(255, 246, 220, .4), inset 0 -3px 0 rgba(0, 0, 0, .5), 0 4px 0 #6e4a14, 0 7px 12px rgba(30, 14, 4, .4); transition: transform .12s, box-shadow .15s, filter .15s; }
#game .btn-ghost:hover, #game .btn-ghost:focus-visible, #modalRoot .btn-ghost:hover, #modalRoot .btn-ghost:focus-visible, #game .sum-ic button:hover, #game .sum-ic button:focus-visible { outline: none; color: #fff; background: radial-gradient(120% 110% at 50% 0%, color-mix(in srgb, var(--cor) 62%, #1a0c2a), #1a0c2a 76%); border-color: #ffd36a; filter: brightness(1.12); transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255, 246, 220, .6), inset 0 -3px 0 rgba(0, 0, 0, .5), 0 6px 0 #6e4a14, 0 0 20px var(--cor); }
#game .btn-ghost:active, #modalRoot .btn-ghost:active, #game .sum-ic button:active { transform: translateY(3px); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .6), 0 1px 0 #6e4a14; }
#modalRoot .btn.zera-sim { --cor: #e0484a; }
/* as três placas do resumo */
#game .sum-actions { gap: 12px; }
#game .sum-ic { grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr) minmax(0, 1fr); gap: 10px; }
#game .sum-ic button { min-height: 60px; padding: 8px 6px 9px; font-weight: 700; font-size: 11px; letter-spacing: .06em; }
#game .sum-ic button .ico { width: 22px; height: 22px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .7)); }
#game .sum-ic button.sum-partilha { --cor: #ff6fb5; animation: sumChama 2s ease-in-out infinite; }
#game .sum-ic button.sum-partilha::before { transition: none; animation: sumBrilho 3.2s ease-in-out infinite; }
@keyframes sumChama { 50% { box-shadow: inset 0 1px 0 rgba(255, 246, 220, .4), inset 0 -3px 0 rgba(0, 0, 0, .5), 0 4px 0 #6e4a14, 0 0 22px rgba(255, 111, 181, .9); } }
#game .sum-actions .btn-primary { min-height: 56px; padding-inline: 12px; white-space: nowrap; font-size: 15px; }
#game .sum-sorte .btn { min-height: 46px; padding-inline: 14px; white-space: nowrap; font-size: 13px; letter-spacing: .06em; }
/* janela baixa: principal e placas dividem a linha, e o Mural e a Rua ficam só com o ícone */
@media (orientation: landscape) and (max-height: 700px) {
  #game .sum-actions { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 10px; }
  #game .sum-actions > .sum-sorte { grid-column: 1 / -1; }
  #game .sum-actions .btn-primary { min-height: 50px; font-size: 13px; letter-spacing: .06em; }
  #game .sum-ic { grid-template-columns: 46px minmax(0, 1fr) 46px; gap: 7px; }
  #game .sum-ic button { min-height: 50px; padding: 5px 3px 6px; font-size: 10px; letter-spacing: .03em; }
  #game .sum-ic button:not(.sum-partilha) span:not(.ico) { display: none; }
  #game .sum-ic button:not(.sum-partilha) { align-content: center; }
}
@media (max-width: 900px) and (orientation: portrait) {
  #game .sum-sorte > div { grid-template-columns: minmax(0, 1fr); }
  #game .sum-ic button { font-size: 10px; letter-spacing: .03em; }
}
@media (prefers-reduced-motion: reduce) { #game .sum-ic button.sum-partilha, #game .sum-ic button.sum-partilha::before { animation: none; } }

/* ano e cidade dividem a linha; a época vem embaixo, inteira */
.g-era { font-size: 15px; font-style: italic; color: var(--paper-dim); white-space: nowrap; }
.g-stats .g-era { color: #3a2214; }
.g-where { white-space: nowrap; }
.parch .g-when { grid-template-columns: auto minmax(0, 1fr); align-items: baseline; column-gap: 3cqw; }
.parch .g-era { grid-column: 1 / -1; font-size: 6.6cqw; font-weight: 600; line-height: 1.1; color: #3a2214; }
.parch .g-where { font-size: 7cqw; line-height: 1.1; font-weight: 600; }
@media (max-width: 900px) and (orientation: portrait) {
  .parch .g-when, .g-when { grid-template-columns: none; grid-auto-flow: column; justify-content: start; align-items: baseline; gap: 8px; }
  .g-era { grid-column: auto; font-size: 13px; }
  .parch .g-era, .parch .g-where { grid-column: auto; font-size: 13px; }
}

/* o treino do dado: a mesma caixa de jogo, dentro do papel */
.treino-modal .modal-close { display: none; }
.treino { display: grid; gap: 8px; justify-items: center; text-align: center; }
.treino p { margin: 0; text-wrap: pretty; }
.modal-card.parch .treino-chama { font-family: var(--f-caps); font-size: 15px; font-weight: 700; color: #6e3f0c; text-wrap: balance; }
.treino-mesa { width: 100%; }
.treino .dado-box.qte-lado { --lado: clamp(96px, 17dvh, 140px); width: 100%; gap: 6px; padding: 0; background: none; filter: none; }
.treino .dado-box .qte-label { font-size: 20px; }
.treino .dado-box .dado-regra { font-size: 18px; }
.treino .dado-box .dado-fim { min-height: 34px; font-size: 18px; }
.treino .dado-box .dado-joga, .treino-ok { min-height: 50px; }
.treino-ok { min-width: 200px; }
@media (orientation: landscape) and (max-height: 520px) {
  .treino { gap: 3px; }
  .modal-card.parch .treino p { font-size: 14px; line-height: 1.18; }
  .modal-card.parch .treino-chama { font-size: 12px; }
  .treino .dado-box.qte-lado { --lado: 54px; }
  .treino .dado-box .qte-label, .treino .dado-box .dado-regra { display: none; }
  .treino .dado-box .dado-joga, .treino-ok { min-height: 40px; }
}
/* no treino a regra já foi explicada no texto */
.treino .dado-box .dado-regra { display: none; }
.treino .dado-box.qte-lado { --lado: clamp(84px, 15dvh, 130px); }
.modal.treino-modal .orn-div { margin: 2px 0 6px; }
@media (max-width: 900px) and (orientation: portrait) { .treino .dado-box.qte-lado { --lado: 88px; } .modal-card.parch .treino p { font-size: 16px; line-height: 1.2; } }

/* o botão de voltar da mesa do ocultista: a linha dele já fica reservada, com folga para a sombra */
.mem-fim { min-height: 62px; padding-bottom: 6px; align-items: start; }
@media (min-width: 901px) and (min-height: 521px) { .mem { --carta: min(118px, calc((100dvh - 344px) * .375)); } }

/* o protesto do padre */
.modal-card.parch .zera-grito { margin: 0; font-family: var(--f-title); font-size: clamp(30px, 5.4vh, 46px); font-weight: 700; line-height: 1.05; text-wrap: balance; color: #7a1f1f; text-shadow: 0 2px 0 rgba(255, 240, 200, .7); animation: zeraGrito .42s cubic-bezier(.2, 1.5, .4, 1) both; }
.zera-caixa.grita img { animation: zeraTreme .34s ease-in-out 3; }
@keyframes zeraGrito { from { opacity: 0; transform: scale(2.2) rotate(-6deg); } }
@keyframes zeraTreme { 25% { transform: rotate(-3deg) translateY(-3px); } 75% { transform: rotate(3deg) translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .modal-card.parch .zera-grito, .zera-caixa.grita img { animation: none; } }
@media (orientation: landscape) and (max-height: 520px) { .treino-modal .orn-div { display: none; } .treino-modal h2 { font-size: 20px; margin: 0; } .treino .dado-box.qte-lado { --lado: 46px; } }

/* o Pulcinella conversa direto com quem joga */
.pul-fala { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center; }
.pul-fala img { height: 200px; width: auto; transform-origin: 50% 100%; animation: pulBalanca 1.5s ease-in-out infinite; }
.pul-fala h2 { padding-right: 0; }
.pul-fala p { text-wrap: pretty; }
@keyframes pulBalanca { 0%, 100% { rotate: -3deg; translate: 0 0; } 50% { rotate: 3deg; translate: 0 -7px; } }
.sum-falta { display: flex; align-items: center; gap: 12px; }
.sum-falta img { flex: none; height: 56px; width: auto; }
@media (max-width: 560px) { .pul-fala { grid-template-columns: 1fr; gap: 10px; justify-items: center; text-align: center; } .pul-fala img { height: 100px; } .modal-card:has(.pul-fala) .parch-scroll { max-height: calc(100dvh - 150px); } }
@media (prefers-reduced-motion: reduce) { .pul-fala img { animation: none; } }

/* a primeira cena do Pulcinella: ele fica no teatrinho, atrás do pergaminho, e ri quando a pessoa entende */
.modal.pul-cena { place-items: center end; padding: 3vh 6vw; overflow: hidden; background: #06030c; backdrop-filter: none; }
.pul-video { position: absolute; top: 0; left: -38%; width: 150%; height: 100%; object-fit: cover; transition: filter .4s; }
.pul-cena .modal-card { width: min(560px, 54vw); padding: clamp(34px, 5vw, 50px) clamp(30px, 4.6vw, 48px); transition: translate .55s cubic-bezier(.5, 0, .8, .4), opacity .4s; }
.pul-cena .modal-card p { font-size: 18px; line-height: 1.42; margin-bottom: 10px; color: #2a160c; }
.pw { display: inline-block; animation: pulPalavra .5s cubic-bezier(.2, .9, .3, 1.2) both; animation-delay: calc(var(--i) * 50ms); }
.pw-forte { color: #8f2c12; font-family: var(--f-caps); font-size: 1.28em; letter-spacing: .02em; text-shadow: 0 0 12px rgba(246, 190, 90, .85); }
@keyframes pulPalavra { from { opacity: 0; transform: translateY(12px) rotate(-3deg) scale(.9); } to { opacity: 1; transform: none; } }
.pul-cena .modal-actions { opacity: 0; translate: 0 12px; pointer-events: none; transition: opacity .4s, translate .4s; }
.pul-cena.pronta .modal-actions { opacity: 1; translate: 0 0; pointer-events: auto; }
.pul-rindo { position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; gap: 10px; opacity: 0; pointer-events: none; transition: opacity .25s; }
.pul-rindo img { height: min(64vh, 70vw); width: auto; transform-origin: 50% 100%; }
.pul-rindo b { font-family: var(--f-title); font-size: clamp(30px, 6vh, 56px); color: var(--gold-hi); text-shadow: 0 2px 6px #000, 0 0 24px rgba(255, 181, 74, .8); }
.pul-cena.ri .modal-card { translate: 0 120vh; opacity: 0; }
.pul-cena.ri .pul-video { filter: brightness(.45) blur(3px); }
.pul-cena.ri .pul-rindo { opacity: 1; }
.pul-cena.ri .pul-rindo img { animation: pulRi .26s ease-in-out infinite alternate; }
@keyframes pulRi { from { rotate: -5deg; translate: 0 0; scale: 1 .97; } to { rotate: 5deg; translate: 0 -16px; scale: 1 1.03; } }
@media (orientation: portrait) and (max-width: 900px) {
  .modal.pul-cena { place-items: end center; padding: 12px; }
  .pul-video { left: 0; width: 100%; height: 46%; }
  .pul-cena .modal-card { width: 100%; padding: 30px 26px 26px; }
  .pul-cena .modal-card p { font-size: 16px; line-height: 1.34; margin-bottom: 7px; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .modal.pul-cena { padding: 8px 4vw; }
  .pul-cena .modal-card { width: 62vw; padding: 20px 30px; }
  .pul-cena .modal-card h2 { font-size: 18px; margin-bottom: 4px; }
  .pul-cena .modal-card .orn-div { display: none; }
  .pul-cena .modal-card p { font-size: 14px; line-height: 1.26; margin-bottom: 4px; }
  .pul-cena .modal-actions { margin-top: 6px; }
  .pul-video { left: -54%; }
}
@media (prefers-reduced-motion: reduce) { .pw, .pul-cena.ri .pul-rindo img { animation: none; } }

/* o comando sempre parece uma tecla, e o Entendi fica no meio da caixa */
kbd.tecla { display: inline-block; padding: 1px 10px 3px; margin: 0 2px; border-radius: 7px; font-family: var(--f-caps); font-size: .94em; font-weight: 700; letter-spacing: .03em; line-height: 1.35; color: #fff3d6; background: #3a2214; box-shadow: 0 3px 0 #1c0f08, 0 0 0 1px rgba(246, 213, 140, .35); }
.modal-card:has(.pul-fala) .modal-actions, .pul-cena .modal-actions { justify-content: center; }
.pul-fala h2 { font-size: clamp(22px, 3.2vw, 30px); padding-right: 56px; }
/* as falas do Pulcinella são longas: o papel se abre para os lados, para o texto e o botão caberem sem rolar */
.modal-card:has(.pul-fala) { width: min(780px, 100%); }
.din-demo { display: grid; gap: 12px; justify-items: center; width: min(360px, 100%); margin: 8px auto 0; }
.din-demo .qte-track { width: 100%; }
.din-tecla { padding: 5px 20px 7px; font-size: 18px; }
.din-par { display: flex; gap: 14px; }
.din-t .qte-zone { left: 60%; width: 18%; }
.din-t .qte-mark { animation: dinMarca 2.6s ease-in-out infinite; }
.din-aperta { animation: dinAperta 2.6s linear infinite; }
.din-enche { animation: dinEnche 2.6s steps(12) infinite; }
.din-bate { animation: dinBate .24s ease-in-out infinite alternate; }
.din-a, .din-b { animation: dinLado .52s steps(1) infinite; }
.din-b { animation-delay: .26s; }
.din-seq span { animation: dinSeq 2.8s ease-in-out infinite; animation-delay: calc(var(--i) * .55s); }
.din-tres { display: flex; justify-content: center; gap: 12px; }
.din-tres span { display: grid; place-items: center; width: 58px; height: 76px; border-radius: 8px; font-family: var(--f-caps); font-size: 28px; color: var(--gold-hi); background: #3a2214; box-shadow: 0 3px 0 #1c0f08; animation: dinEscolhe 3s ease-in-out infinite; animation-delay: calc(var(--i) * 1s); }
.din-quatro span { animation-duration: 4s; }
@keyframes dinMarca { 0%, 100% { left: 0; } 50% { left: 100%; } }
@keyframes dinAperta { 0%, 26%, 40%, 100% { transform: none; filter: none; } 33% { transform: scale(.9); filter: brightness(1.35); } }
@keyframes dinEnche { from { width: 0; } to { width: 100%; } }
@keyframes dinBate { from { transform: none; } to { transform: scale(.91); filter: brightness(1.2); } }
@keyframes dinLado { 0% { transform: scale(.88); filter: brightness(1.35); } 50% { transform: none; filter: none; } }
@keyframes dinSeq { 0%, 26%, 100% { transform: none; opacity: .62; filter: none; } 10% { transform: scale(1.18); opacity: 1; filter: brightness(1.25) drop-shadow(0 0 7px #f6d58c); } }
@keyframes dinEscolhe { 0%, 24%, 100% { transform: none; box-shadow: 0 3px 0 #1c0f08; } 10% { transform: translateY(-7px); box-shadow: 0 0 16px #f6d58c; } }
.g-stagecard .eyebrow, .g-stagecard p { text-align: center; padding: 0 18px; text-wrap: balance; }
@media (orientation: portrait) and (max-width: 900px) {
  .g-stats .g-rotulo { font-size: 10px; letter-spacing: .08em; color: #6e3f0c; }
  .g-stats .g-name { font-size: 21px; }
  .g-stats .g-age { padding: 1px 10px 2px; border-radius: 99px; font-family: var(--f-caps); font-size: 13px; font-weight: 700; font-style: normal; color: #fff3d6; background: #7a2c14; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .modal-card:has(.pul-fala) { width: min(640px, 76vw); padding: 18px 34px; }
  .pul-fala { gap: 14px; } .pul-fala img { height: 96px; } .pul-fala h2 { font-size: 18px; margin-bottom: 4px; } .pul-fala .orn-div { display: none; } .pul-fala p { font-size: 14px; line-height: 1.26; margin-bottom: 2px; }
  .din-demo { margin-top: 4px; gap: 6px; } .din-demo .seqs span { width: 40px; height: 40px; } .din-tres span { width: 40px; height: 48px; font-size: 20px; }
  .modal-card:has(.pul-fala) .modal-actions { margin-top: 6px; }
}
@media (prefers-reduced-motion: reduce) { .din-demo * { animation: none; } }


#historia .ab-fala { color: #ffd84d; }

/* o caminho até a luz, no fim de tudo */
.fonte-cena { position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #120620; z-index: 900; opacity: 1; transition: opacity 1s ease; }
.fonte-cena.sai { opacity: 0; }

/* as quatro ações novas */
.eq { height: 92px; display: grid; place-items: center; }
.eq-obj { max-height: 86px; max-width: 120px; transform-origin: 50% 100%; filter: drop-shadow(0 4px 4px rgba(50, 25, 5, .5)); }
.eq-track { width: min(300px, 70vw); }
.eq-track .qte-zone { left: 30%; width: 40%; }
.acha-camada { position: fixed; z-index: 60; border-radius: 50%; overflow: hidden; touch-action: manipulation; cursor: crosshair; }
.acha-item { position: absolute; padding: 0; border: 0; transform: translate(-50%, -50%); background: center / contain no-repeat; opacity: .82; filter: brightness(.82) saturate(.8); cursor: pointer; transition: transform .25s, opacity .25s; }
.acha-item.achou { opacity: 0; transform: translate(-50%, -70%) scale(1.5); pointer-events: none; }
.acha-lista { display: flex; gap: 12px; justify-content: center; }
.acha-lista span { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 10px; background: rgba(90, 58, 20, .16); }
.acha-lista img { max-width: 52px; max-height: 52px; }
.acha-lista span.ok { background: rgba(106, 42, 138, .28); opacity: .55; }
.monta { display: grid; gap: 3px; width: min(340px, 74vw); touch-action: manipulation; }
.monta button { min-height: 72px; padding: 0; border: 2px solid rgba(58, 34, 20, .5); background-repeat: no-repeat; cursor: pointer; }
.monta button.sel { border-color: #5a2a7a; box-shadow: 0 0 0 2px #5a2a7a; }
.ouve { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; width: min(340px, 74vw); }
/* deitado, a caixa de achar sai de cima da bola e as outras cabem na altura da tela */
@media (orientation: landscape) and (max-height: 520px) {
  .qte.qte-acha { position: fixed; right: 8px; top: 50%; transform: translateY(-50%); width: 210px; padding: 16px 14px; gap: 6px; z-index: 61; }
  .qte-acha .qte-big { display: none; }
  .qte-acha .qte-label { font-size: 11px; }
  .qte-acha .acha-lista span { width: 48px; height: 48px; }
  .qte-acha .acha-lista img { max-width: 40px; max-height: 40px; }
  .monta { width: 44vh; } .monta button { min-height: 50px; }
  .qte-monta .qte-big, .qte-equilibra .qte-big { font-size: 22px; }
  .eq { height: 56px; } .eq-obj { max-height: 52px; }
}
.ouve button { aspect-ratio: 1; min-height: 62px; padding: 0; border: 2px solid #6e3f0c; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #f2d694, #a4701f); cursor: pointer; }
.ouve button:nth-child(2) { background: radial-gradient(circle at 40% 35%, #d9b6ea, #5a2a7a); }
.ouve button:nth-child(3) { background: radial-gradient(circle at 40% 35%, #e9b49a, #8a3a1c); }
.ouve button:nth-child(4) { background: radial-gradient(circle at 40% 35%, #a9d4d0, #2f6a6a); }
.ouve button:disabled { opacity: .6; cursor: default; }
.ouve button.on { filter: brightness(1.6); transform: scale(1.08); opacity: 1; }
.din-eq .qte-zone { left: 30%; width: 40%; }
.din-eq .qte-mark { animation: din-eq 1.6s ease-in-out infinite alternate; }
@keyframes din-eq { from { left: 34%; } to { left: 66%; } }

/* a conversa do Pulcinella em três partes */
.pul-cena .modal-card { overflow: visible; }
.pe-corpo { min-height: 330px; max-height: calc(94vh - 170px); overflow: hidden auto; }
.pul-cena .pe-corpo, .modal-card .pul-cena .pe-corpo { min-height: 0; }
.pe-corpo.voando { overflow: visible; }
.pe-pontos { display: flex; justify-content: center; gap: 0; margin: 2px 0; }
.pe-pontos button { padding: 9px 7px; border: 0; background: none; cursor: pointer; }
.pe-pontos button:disabled { cursor: default; opacity: .6; }
.pe-pontos button:not(:disabled):hover i { background: #8f2c12; }
.pe-pontos i { display: block; }
.pe-pontos i { width: 9px; height: 9px; border-radius: 50%; background: rgba(90, 58, 20, .28); transition: background .3s; }
.pe-pontos button.on i { background: #8f2c12; }
.pe-vidas { display: grid; grid-template-columns: repeat(11, 1fr); gap: 6px; margin: 14px 0 4px; }
.pe-vidas span { aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; font-family: var(--f-caps); font-size: 18px; color: #6a4a2a; background: rgba(90, 58, 20, .16); box-shadow: inset 0 0 0 2px rgba(90, 58, 20, .3); animation: peMoeda .5s cubic-bezier(.2, 1.4, .4, 1) both; animation-delay: calc(900ms + var(--i) * 60ms); }
.pe-vidas img { width: 100%; height: 100%; object-fit: contain; }
@keyframes peMoeda { from { opacity: 0; transform: scale(.2) rotateY(90deg); } }
.pe-mural { margin-top: 10px; padding: 12px 14px; display: grid; gap: 8px; border-radius: 6px; background: rgba(255, 250, 235, .38); box-shadow: inset 0 0 0 1px rgba(90, 58, 20, .3); animation: peSobe .5s .5s ease-out both; }
@keyframes peSobe { from { opacity: 0; transform: translateY(16px); } }
.pe-titulo { font-family: var(--f-title); font-size: 19px; color: #6e3f0c; text-align: center; }
.pe-abas { display: flex; justify-content: center; gap: 6px; }
.pe-abas button { padding: 6px 12px; border: 0; background: none; cursor: pointer; border-radius: 99px; font-family: var(--f-caps); font-size: 13px; letter-spacing: .06em; color: #6a4a2a; transition: background .3s, color .3s; }
.pe-abas button.on { background: #5a2a7a; color: #fff3d6; }
.pe-revendo .pw, .pe-revendo .pe-vidas span, .pe-revendo .pe-mural { animation: none; }
.pul-cena .modal-actions { display: flex; justify-content: center; gap: 10px; }
.pul-cena .modal-actions [hidden] { display: none; }
.pe-folha { display: none; min-height: 118px; align-items: center; justify-content: center; gap: 12px; }
.pe-folha.on { display: flex; animation: peSobe .35s ease-out both; }
.pe-folha img { width: 66px; height: 66px; object-fit: contain; }
.pe-folha figure { margin: 0; padding: 7px 7px 5px; background: #fffaf0; rotate: -2deg; box-shadow: 0 3px 8px rgba(50, 25, 5, .35); text-align: center; }
.pe-folha figure img { height: 82px; }
.pe-folha figcaption { font-size: 13px; color: #3a2214; }
.pe-folha em { font-size: 15px; color: #6a4a2a; }
.pul-cena .pe-legenda { margin: 0; text-align: center; font-size: 16px; font-style: italic; }
.pe-meta { margin-top: 18px; display: grid; gap: 12px; justify-items: center; }
.pe-conta { font-family: var(--f-caps); font-size: 24px; color: #6e3f0c; }
.pe-presente { width: 92px; height: 92px; display: grid; place-items: center; border-radius: 12px; font-family: var(--f-title); font-size: 50px; color: #fff3d6; background: linear-gradient(135deg, #5a2a7a, #2a1450); box-shadow: 0 6px 14px rgba(50, 25, 5, .4); opacity: .35; transition: opacity .5s, transform .5s; }
.pe-presente.on { opacity: 1; animation: pePulsa 1.4s ease-in-out infinite alternate; }
@keyframes pePulsa { to { transform: scale(1.08) rotate(2deg); box-shadow: 0 0 26px rgba(246, 190, 90, .9); } }
@media (max-width: 760px), (orientation: portrait) { .pe-corpo { min-height: 300px; } .pul-cena .pe-corpo { min-height: 0; } .pe-vidas { gap: 4px; } .pe-vidas span { font-size: 12px; } }
@media (orientation: landscape) and (max-height: 520px) { .pe-corpo { min-height: 0; } .pe-vidas { grid-template-columns: repeat(11, 1fr); gap: 3px; margin-top: 4px; } .pe-vidas span { font-size: 10px; } .pe-mural { padding: 4px 8px; gap: 2px; margin-top: 2px; } .pe-titulo { display: none; } .pe-folha { min-height: 56px; } .pe-folha img { width: 44px; height: 44px; } .pe-folha figure img { height: 44px; } .pe-meta { grid-template-columns: 1fr auto; margin-top: 4px; gap: 4px 12px; } .pe-presente { width: 46px; height: 46px; font-size: 24px; grid-row: 1 / 3; grid-column: 2; } .pe-conta { font-size: 15px; } }
/* a cabeça do Pulcinella invade pela direita, rindo */
.pul-toasty { position: fixed; right: 0; bottom: 16vh; z-index: 70; width: min(38vh, 58vw, 280px); pointer-events: none; transform-origin: 70% 100%; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .55)); animation: toasty 2.4s linear both; }
.pul-toasty img { display: block; width: 100%; }
/* medidas de tools/build_pul_corpo.py: o corpo sai de trás do queixo e a cintura some na borda */
.pul-toasty .pul-corpo { position: absolute; z-index: -1; left: -25.4%; top: 79.8%; width: 155.8%; max-width: none; }
.pul-toasty { isolation: isolate; }
@keyframes toasty { 0% { transform: translateX(120%) rotate(-24deg); } 8% { transform: translateX(24%) rotate(-24deg); animation-timing-function: ease-in-out; } 12%, 28%, 44%, 60%, 76% { transform: translateX(27%) rotate(-27deg); } 20%, 36%, 52%, 68%, 84% { transform: translateX(22%) rotate(-21deg); } 92% { transform: translateX(24%) rotate(-24deg); animation-timing-function: ease-in; } 100% { transform: translateX(125%) rotate(-24deg); } }
@media (prefers-reduced-motion: reduce) { .pul-toasty { animation: none; transform: translateX(24%) rotate(-24deg); } }
/* o clarão em que a alma some vira a bola de cristal */
.ab-clarao { position: absolute; inset: -40%; z-index: 7; background: #faf7eb; pointer-events: none; }

/* o que se ganha voa até o pergaminho, com cara de ponto de jogo */
.ponto { position: fixed; z-index: 66; display: grid; justify-items: center; gap: 0; pointer-events: none; white-space: nowrap; }
.ponto b { font-family: var(--f-title); font-size: clamp(34px, 6vh, 54px); line-height: 1; color: #ffe08a; -webkit-text-stroke: 2px #5a2a0a; paint-order: stroke fill; text-shadow: 0 3px 0 #5a2a0a, 0 0 22px rgba(255, 200, 90, .9); }
.ponto small { padding: 1px 9px 2px; border-radius: 99px; background: #5a2a7a; color: #fff3d6; font-family: var(--f-caps); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.ponto.perda b { color: #ff9a8a; -webkit-text-stroke-color: #5a0f0f; text-shadow: 0 3px 0 #5a0f0f, 0 0 18px rgba(255, 70, 60, .7); }
.ponto.perda small { background: #7a1f1a; }
.stat.ganhou { animation: statGanha .55s cubic-bezier(.2, 1.5, .4, 1); }
.stat.perdeu { animation: statPerde .45s ease; }
.stat.ganhou .stat-v { color: #2f6b2a; } .stat.perdeu .stat-v { color: #9a1f1f; }
@keyframes statGanha { 35% { transform: scale(1.1); filter: brightness(1.2); } }
@keyframes statPerde { 25%, 75% { transform: translateX(-4px); } 50% { transform: translateX(4px); } }
/* o placar do dado */
.dado-palco { position: relative; }
.dado-placar { position: absolute; left: 50%; top: 46%; z-index: 3; font-family: var(--f-title); font-size: 54px; line-height: 1; color: #fff3c4; -webkit-text-stroke: 1.5px #7a4a10; paint-order: stroke fill; text-shadow: 0 0 10px rgba(255, 220, 120, .95), 0 0 28px rgba(255, 190, 80, .8); pointer-events: none; animation: dadoPlacar 1.5s cubic-bezier(.3, .7, .3, 1) both; }
.dado-placar.ruim { color: #ffd9d2; -webkit-text-stroke-color: #6a1a1a; text-shadow: 0 0 10px rgba(200, 140, 255, .9), 0 0 26px rgba(150, 90, 220, .7); }
/* o número sai do dado como um feitiço, sobe, brilha e se desfaz no ar; fica só o dado com a face que caiu */
@keyframes dadoPlacar {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.2); filter: blur(6px); }
  18% { opacity: 1; transform: translate(-50%, -125%) scale(1.18); filter: blur(0); }
  30% { transform: translate(-50%, -135%) scale(1); }
  68% { opacity: 1; transform: translate(-50%, -150%) scale(1); filter: blur(0); }
  100% { opacity: 0; transform: translate(-50%, -205%) scale(1.6); filter: blur(10px); }
}
@media (prefers-reduced-motion: reduce) { .dado-placar { animation: none; opacity: 0; } }
.dado-onda { position: absolute; left: 50%; top: 46%; width: 60px; height: 60px; border-radius: 50%; border: 4px solid #ffe08a; pointer-events: none; animation: dadoOnda .8s ease-out both; }
@keyframes dadoOnda { from { opacity: .9; transform: translate(-50%, -50%) scale(.4); } to { opacity: 0; transform: translate(-50%, -50%) scale(4.2); } }
.dado-fim.bom { animation: dadoFim .5s cubic-bezier(.2, 1.5, .4, 1) .15s both; }
@keyframes dadoFim { from { opacity: 0; transform: translateY(8px) scale(.9); } }

/* a causa da morte fica escrita no papel */
.morte-placa { width: min(620px, 100%); padding: 26px 40px 28px; text-align: center; color: #24130b; background: url("../assets/mural-papel.webp") center / 100% 100% no-repeat; filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .55)); animation: peSobe .5s ease-out both; }
.morte-placa small { display: block; margin-bottom: 4px; font-family: var(--f-caps); font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #8f2c12; }
.morte-placa p { margin: 0; font-size: clamp(17px, 2.5vh, 21px); line-height: 1.3; text-wrap: pretty; }
/* a causa vem primeiro, mais forte, para ninguém ficar sem saber do que morreu */
.morte-placa .morte-causa { display: block; margin-bottom: 6px; font-weight: 700; color: #5a1a0a; text-wrap: balance; }
.morte-placa .morte-causa:empty { display: none; }

/* o cronômetro da vida, antes dos anos */
.g-idade { display: flex; align-items: center; gap: .4em; }
/* a dica do mouse, no papel do jogo */
.tt { position: fixed; left: 0; top: 0; z-index: 3000; max-width: 260px; padding: 9px 16px 10px; color: #24130b; font-family: var(--f-text); font-size: 15px; line-height: 1.25; text-align: center; background: url("../assets/mural-papel.webp") center / 100% 100% no-repeat; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .55)); opacity: 0; pointer-events: none; transition: opacity .16s; }
.tt.on { opacity: 1; }

/* o aviso de ficção, discreto onde a tela é de passagem */
.gate-ficcao { max-width: 46ch; margin: 6px auto 0; font-size: 12px; line-height: 1.3; color: rgba(245, 232, 205, .72); text-shadow: 0 1px 4px #000; text-wrap: balance; }
.cv-ficcao { max-width: 46ch; margin-top: 8px; font-size: 12px; line-height: 1.3; color: rgba(245, 232, 205, .7); text-wrap: balance; }
.modal-card.parch .sobre-ficcao { margin-top: 14px; padding-top: 10px; border-top: 1px solid rgba(90, 58, 20, .25); font-size: 14px; line-height: 1.35; color: #5a3a1c; text-wrap: pretty; }
.sobre-recado { justify-content: flex-start; }
/* a carta para a casa */
.contato .ct-corpo { min-height: 310px; }
.contato .modal-actions { display: flex; justify-content: center; gap: 10px; }
.contato .modal-actions [hidden] { display: none; }
.ct-campo { display: grid; gap: 6px; margin-top: 14px; animation: peSobe .45s .35s ease-out both; }
.ct-campo span { font-family: var(--f-caps); font-size: 13px; letter-spacing: .08em; color: #6e3f0c; }
.ct-campo input, .ct-campo textarea { width: 100%; padding: 10px 12px; border: 0; border-bottom: 2px solid #8a5a1c; border-radius: 6px 6px 0 0; background: rgba(255, 250, 235, .55); color: #24130b; font: 400 18px/1.4 var(--f-text); resize: none; outline: none; transition: background .25s, border-color .25s, box-shadow .25s; }
.ct-campo input:focus, .ct-campo textarea:focus { background: rgba(255, 250, 235, .9); border-color: #5a2a7a; box-shadow: 0 8px 14px -12px #5a2a7a; }
.ct-conta { display: block; margin-top: 4px; text-align: right; font-size: 13px; color: #6a4a2a; }
.ct-erro { min-height: 1.3em; margin: 6px 0 0; font-size: 15px; color: #8f2c12; font-style: italic; }
.ct-treme { animation: shake .4s; }
.ct-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 14px; }
.ct-chip { padding: 11px 16px; border: 2px solid #8a5a1c; border-radius: 99px; background: rgba(255, 250, 235, .5); color: #3a2214; font-family: var(--f-caps); font-size: 14px; cursor: pointer; animation: peMoeda .45s cubic-bezier(.2, 1.4, .4, 1) both; animation-delay: calc(400ms + var(--i) * 80ms); transition: transform .18s, background .2s, color .2s; }
.ct-chip:hover { transform: translateY(-2px); }
.ct-chip.sel { background: #5a2a7a; border-color: #5a2a7a; color: #fff3d6; }
.ct-carta { display: grid; gap: 6px; margin-top: 12px; padding: 16px 18px; background: #fffaf0; color: #2a160c; rotate: -1.2deg; box-shadow: 0 6px 16px rgba(50, 25, 5, .35); transform-origin: 50% 100%; animation: peSobe .5s .3s ease-out both; transition: transform .5s cubic-bezier(.6, 0, .9, .4), opacity .5s; }
.ct-carta b { font-family: var(--f-title); font-size: 18px; color: #6e3f0c; }
.ct-carta em { font-size: 14px; color: #6a4a2a; }
.ct-carta p { margin: 0; max-height: 132px; overflow: auto; font-size: 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.ct-carta span { justify-self: end; font-family: var(--f-hand); font-size: 20px; }
.ct-carta.dobra { transform: scale(.4, .08); opacity: 0; }
.ct-envelope { display: block; width: 190px; margin: 26px auto 0; animation: peMoeda .4s cubic-bezier(.2, 1.4, .4, 1) both; }
.ct-envelope.selado { animation: ctSela .5s ease-out both; }
.ct-envelope.voa { animation: ctVoa .76s cubic-bezier(.5, 0, .9, .5) both; }
@keyframes ctSela { 40% { transform: scale(1.18) rotate(-3deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes ctVoa { to { transform: translate(46vw, -70vh) rotate(24deg) scale(.4); opacity: 0; } }
.ct-link { display: block; margin-top: 12px; text-align: center; color: #5a2a7a; font-weight: 600; text-underline-offset: 3px; }
@media (orientation: landscape) and (max-height: 520px) { .contato .ct-corpo { min-height: 0; } .ct-campo { margin-top: 4px; gap: 2px; } .ct-campo input, .ct-campo textarea { font-size: 16px; padding: 6px 8px; } .ct-campo textarea { height: 76px; } .ct-chips { margin-top: 4px; gap: 5px; } .ct-chip { padding: 6px 12px; font-size: 12px; } .ct-carta { padding: 8px 12px; margin-top: 4px; gap: 2px; } .ct-carta p { max-height: 50px; font-size: 14px; } .ct-envelope { width: 110px; margin-top: 6px; } .gate-ficcao { font-size: 11px; margin-top: 2px; } }
@media (max-width: 760px) { .ct-campo input, .ct-campo textarea { font-size: 16px; } }
/* a vinheta do estúdio */
.vinheta { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; background: #050308; cursor: pointer; transition: opacity .34s; }
.vinheta.sai { opacity: 0; }
.vn-filme { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
@media (orientation: portrait) { .vn-filme { height: auto; max-height: 100%; margin: auto; aspect-ratio: 3 / 4; -webkit-mask-image: linear-gradient(transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(transparent, #000 7%, #000 93%, transparent); } }

/* os vídeos da bola: tocam fora da vista, e o canvas copia cada quadro */
.clipe-oculto { position: fixed; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* o tarô aberto pelo menu da rua */
.tg-avulsa { position: fixed; inset: 0; z-index: 30; }

/* o balanço do Pulcinella depois da morte */
.pb { display: grid; gap: 12px; margin-top: 12px; }
.pb-destino { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-radius: 12px; background: rgba(90, 58, 20, .1); }
.pb-destino img { flex: none; width: 70px; height: 70px; object-fit: contain; animation: pbMoeda .9s cubic-bezier(.2, 1.4, .4, 1) both; }
.pb-destino b { font-family: var(--f-caps); font-size: 18px; line-height: 1.2; color: #4a2a10; text-wrap: balance; }
.pb-destino em { flex: none; margin-left: auto; padding: 4px 12px; border-radius: 99px; background: #5a2a7a; color: #fff3d6; font-style: normal; font-family: var(--f-caps); font-size: 12px; letter-spacing: .08em; animation: pbMoeda .5s .6s cubic-bezier(.2, 1.4, .4, 1) both; }
.pb-destino.novo img { filter: drop-shadow(0 0 10px rgba(255, 211, 106, .9)); }
.pb-marcos { display: flex; flex-wrap: wrap; gap: 6px 8px; justify-content: center; }
.pb-marco { display: grid; justify-items: center; gap: 3px; width: 76px; text-align: center; animation: pbMoeda .5s cubic-bezier(.2, 1.4, .4, 1) both; animation-delay: calc(350ms + var(--i) * 90ms); }
.pb-marco img { width: 46px; height: 46px; object-fit: contain; }
.pb-marco small { font-size: 12px; line-height: 1.15; color: #5a3a1c; text-wrap: balance; }
.pb-marco.novo img { filter: drop-shadow(0 0 7px rgba(255, 211, 106, .95)); }
.pb-falta { display: grid; gap: 7px; }
.pb-linha { display: grid; grid-template-columns: 76px 1fr auto; gap: 10px; align-items: center; font-family: var(--f-caps); font-size: 13px; color: #4a2a10; }
.pb-barra { height: 9px; border-radius: 99px; background: rgba(90, 58, 20, .18); overflow: hidden; }
.pb-barra i { display: block; width: calc(var(--p) * 100%); height: 100%; border-radius: inherit; background: linear-gradient(90deg, #b98bff, #ffd36a); transform-origin: left; animation: pbEnche 1s .5s ease-out both; }
@keyframes pbMoeda { from { opacity: 0; transform: scale(.4) rotate(-12deg); } }
@keyframes pbEnche { from { transform: scaleX(0); } }
@media (orientation: landscape) and (max-height: 520px) { .pb { gap: 6px; margin-top: 6px; } .pb-destino { padding: 6px 10px; } .pb-destino img { width: 46px; height: 46px; } .pb-marco { width: 62px; } .pb-marco img { width: 32px; height: 32px; } .pb-marco small { font-size: 10px; } .pb-linha { font-size: 11px; } }
@media (prefers-reduced-motion: reduce) { .pb-destino img, .pb-destino em, .pb-marco, .pb-barra i { animation: none; } }

/* a Roda da Fortuna: só a metade de cima aparece, com o ponteiro no topo e o botão no eixo */
.modal.rl-modal .modal-card { width: min(640px, 100%); max-width: none; max-height: calc(100dvh - 40px); }
.rl-modal .modal-close, .modal-card.parch .rl > .orn-div { display: none; }
.rl-modal .parch .parch-scroll { max-height: calc(100dvh - 170px); }
.rl { display: grid; justify-items: center; gap: 10px; text-align: center; }
.rl h2 { margin: 0; padding: 0 28px; font-size: clamp(20px, 6.2vw, 26px); text-wrap: balance; }
.rl-fala { max-width: 34ch; margin: 0; font-size: 18px; line-height: 1.3; text-wrap: balance; min-height: 2.6em; }
/* a roda encolhe para caber com o título, a fala e o resultado sem rolar o cartão */
.rl-palco { --d: min(560px, calc(100vw - 84px), calc((100dvh - 430px) * 1.5)); position: relative; width: var(--d); height: calc(var(--d) * .66); }
.rl-janela { position: absolute; inset: 0 0 calc(var(--d) * .08); overflow: hidden; border-radius: calc(var(--d) * .5) calc(var(--d) * .5) 14px 14px; }
.rl-janela::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--d) * .05); background: linear-gradient(180deg, #f6d58c, #a9701f 60%, #5a3410); box-shadow: 0 -2px 6px rgba(20, 8, 2, .3); }
.rl-roda { position: absolute; left: 0; top: calc(var(--d) * .06); width: var(--d); height: var(--d); }
.rl-disco { display: block; width: 100%; height: 100%; }
.rl-casa { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: calc(var(--d) * .1); height: calc(var(--d) * .1); margin: calc(var(--d) * -.05); transform: rotate(var(--a)) translateY(calc(var(--d) * -.3365)) rotate(calc(var(--a) * -1)); }
.rl-casa img { max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .5)); }
.rl-ponteiro { position: absolute; left: 50%; top: calc(var(--d) * -.035); z-index: 2; height: calc(var(--d) * .17); translate: -50% 0; transform-origin: 50% 18%; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .5)); }
.rl-girar { position: absolute; left: 50%; top: calc(var(--d) * .56); z-index: 3; width: calc(var(--d) * .2); aspect-ratio: 1; padding: 0; border: 0; border-radius: 50%; background: none; translate: -50% -50%; cursor: pointer; filter: drop-shadow(0 2px 3px rgba(40, 20, 5, .26)); transition: scale .18s, filter .18s; }
.rl-girar img { display: block; width: 100%; height: 100%; }
.rl-girar span { position: absolute; left: 0; right: 0; bottom: 21%; font-family: var(--f-caps); font-weight: 700; font-size: max(12px, calc(var(--d) * .028)); letter-spacing: .12em; text-transform: uppercase; color: #fff3d6; text-shadow: 0 1px 3px #000, 0 0 8px rgba(185, 139, 255, .9); }
.rl-girar:hover:not(:disabled), .rl-girar:focus-visible { scale: 1.06; filter: drop-shadow(0 2px 3px rgba(40, 20, 5, .26)) drop-shadow(0 0 10px rgba(255, 211, 106, .7)); }
.rl-girar:disabled { cursor: default; }
.rl-girar:disabled span { opacity: 0; }
.rl-sorte { display: grid; grid-template-columns: auto auto; align-items: center; justify-items: start; gap: 4px 14px; animation: pbMoeda .55s cubic-bezier(.2, 1.4, .4, 1) both; }
.rl-sorte[hidden] { display: none; }
.rl-sorte img { grid-row: span 2; width: 76px; height: 76px; object-fit: contain; filter: drop-shadow(0 0 12px rgba(255, 211, 106, .7)); }
.rl-sorte b { font-family: var(--f-caps); font-size: 26px; letter-spacing: .1em; text-transform: uppercase; color: #5a2a7a; }
@media (max-width: 480px) {
  .modal.rl-modal { padding: 12px; }
  .rl-modal .modal-card { padding: 26px 18px 22px; }
  .rl-fala { font-size: 16px; }
}
/* tela deitada e baixa (celular deitado, notebook com a barra do navegador): a roda à esquerda,
   a fala e o resultado à direita, tudo sem rolar e sem a roda encolher */
@media (orientation: landscape) and (max-height: 760px) {
  .modal.rl-modal { padding: 10px; }
  .modal.rl-modal .modal-card { width: min(900px, 100%); max-height: calc(100dvh - 20px); padding: 22px 30px; }
  .rl { grid-template-columns: auto minmax(0, 1fr); align-content: center; gap: 10px 24px; text-align: left; justify-items: start; }
  .rl > * { grid-column: 2; }
  .rl > .rl-palco { --d: min(500px, calc((100dvh - 70px) * 1.5), 52vw); grid-column: 1; grid-row: 1 / span 4; align-self: center; }
  /* o sol e o selo ficam menores aqui, e a coluna do texto reserva o lugar deles: letra nunca passa por cima do enfeite */
  .rl-modal .modal-card { container-type: inline-size; }
  .rl-modal .modal-card.parch .orn-sol { width: 12%; }
  .rl-modal .modal-card.parch .orn-selo { width: 9%; }
  .rl > :not(.rl-palco) { box-sizing: border-box; max-width: 100%; padding-right: max(0px, calc(16cqw - 30px)); }
  .rl h2 { padding-left: 0; }
  .rl-fala { min-height: 0; }
  .rl-modal .parch .parch-scroll { max-height: calc(100dvh - 64px); }
}
@media (orientation: landscape) and (max-height: 520px) {
  .modal.rl-modal .modal-card { width: min(820px, 100%); padding: 18px 26px; }
  .rl { gap: 8px 22px; }
  .rl > .rl-palco { --d: min(420px, calc((100dvh - 64px) * 1.5), 52vw); }
  .rl h2 { font-size: 22px; }
  .rl-fala { font-size: 15px; }
  .rl-modal .parch .parch-scroll { max-height: calc(100dvh - 50px); }
  .rl-sorte { column-gap: 12px; }
  .rl-sorte img { width: 56px; height: 56px; }
  .rl-sorte b { font-size: 20px; }
}
@media (orientation: landscape) and (max-height: 400px) {
  .rl { gap: 6px 20px; } .rl h2 { font-size: 19px; } .rl-fala { font-size: 13.5px; line-height: 1.25; }
  .rl-sorte img { width: 44px; height: 44px; } .rl-sorte b { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) { .rl-sorte { animation: none; } .rl-girar { transition: none; } }

/* o retrato de família: a moldura dourada com a foto em sépia e as pessoas na mesa, para arrastar ou tocar */
.modal.rt-modal .modal-card { width: min(720px, 100%); max-width: none; max-height: calc(100dvh - 40px); }
.rt-modal .modal-close, .modal-card.parch .rt > .orn-div { display: none; }
.rt-modal .parch .parch-scroll { max-height: calc(100dvh - 150px); }
.rt { display: grid; justify-items: center; gap: 10px; text-align: center; }
.rt h2 { margin: 0; padding: 0 28px; font-size: clamp(20px, 6vw, 26px); text-wrap: balance; }
.rt-fala { max-width: 40ch; margin: 0; font-size: 17px; line-height: 1.3; text-wrap: balance; min-height: 2.6em; }
.rt-moldura { position: relative; width: min(440px, 78vw, calc((100dvh - 430px) * 1.45)); aspect-ratio: 1.45; padding: 14px; border-radius: 6px; background: linear-gradient(135deg, #f6d58c, #a9701f 40%, #f1c870 60%, #6a400f); box-shadow: inset 0 0 0 2px #5a3410, 0 8px 18px rgba(50, 25, 5, .35); transition: box-shadow .2s, transform .2s; }
.rt-moldura.alvo { transform: scale(1.02); box-shadow: inset 0 0 0 2px #5a3410, 0 0 0 4px rgba(255, 211, 106, .7), 0 10px 22px rgba(50, 25, 5, .4); }
.rt-foto { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 3px; background: radial-gradient(ellipse at 50% 35%, #e8d8b8, #b89a6a 70%, #7a5a34); box-shadow: inset 0 0 22px rgba(60, 35, 10, .6); }
.rt-foto::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 16%; background: linear-gradient(transparent, rgba(80, 50, 20, .35)); }
.rt-centro, .rt-pessoa { position: absolute; bottom: 4%; height: 92%; translate: -50% 0; filter: sepia(.15) drop-shadow(0 3px 4px rgba(40, 20, 5, .4)); }
.rt-centro { left: 50%; z-index: 2; }
.rt-pessoa { left: var(--x); height: calc(var(--h) * 92%); transition: left .35s ease; animation: rtEntra .45s cubic-bezier(.2, 1.4, .4, 1) both; }
.rt-pessoa.vira { scale: -1 1; }
@keyframes rtEntra { from { opacity: 0; transform: translateY(14%) scale(.7); } }
.rt-moldura.revela .rt-foto > img { filter: sepia(.85) contrast(1.05) brightness(.96) drop-shadow(0 3px 4px rgba(40, 20, 5, .4)); transition: filter 1.2s ease; }
.rt-moldura.revela .rt-foto { background: radial-gradient(ellipse at 50% 35%, #e9d6b0, #a8885a 70%, #6a4a24); }
.rt-flash { position: absolute; inset: -20px; z-index: 5; border-radius: 8px; background: #fff; pointer-events: none; animation: rtFlash 1.1s ease-out both; }
@keyframes rtFlash { 0% { opacity: 0; } 8% { opacity: 1; } 100% { opacity: 0; } }
.rt-como { margin: 0; font-size: 15px; font-style: italic; color: #6a4a2a; }
.rt-como[hidden] { display: none; }
.rt-mesa { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.rt-mesa[hidden] { display: none; }
.rt-ficha { width: 72px; height: 88px; padding: 4px; border: 2px solid #b98a3a; border-radius: 10px; background: rgba(255, 248, 230, .7); box-shadow: 0 3px 8px rgba(60, 30, 5, .25); cursor: grab; touch-action: none; transition: transform .15s, opacity .25s, filter .25s; }
.rt-ficha img { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.rt-ficha:hover:not(:disabled), .rt-ficha:focus-visible { transform: translateY(-3px); outline: none; box-shadow: 0 6px 12px rgba(60, 30, 5, .3), 0 0 0 3px rgba(255, 211, 106, .6); }
.rt-ficha.saiu { opacity: .25; }
.rt-ficha.dentro { opacity: 0; pointer-events: none; transform: scale(.6); }
.rt-ficha.fora { opacity: .45; filter: grayscale(1); cursor: default; }
.rt-voa { position: fixed; z-index: 3000; width: 72px; height: 88px; padding: 4px; border: 2px solid #f1c870; border-radius: 10px; background: rgba(255, 248, 230, .85); translate: -50% -60%; rotate: -4deg; pointer-events: none; box-shadow: 0 12px 24px rgba(40, 20, 5, .4); }
.rt-voa img { width: 100%; height: 100%; object-fit: contain; }
.rt-fim { display: grid; justify-items: center; }
.rt-fim[hidden] { display: none; }
@media (orientation: landscape) and (max-height: 520px) {
  .rt { grid-template-columns: auto minmax(0, 1fr); column-gap: 20px; text-align: left; justify-items: start; align-content: center; }
  .rt > * { grid-column: 2; }
  .rt > .rt-moldura { grid-column: 1; grid-row: 1 / span 5; width: min(340px, calc((100dvh - 96px) * 1.45), 46vw); }
  .rt-como { display: none; }
  .rt-modal .modal-card { container-type: inline-size; }
  .rt-modal .modal-card.parch .orn-sol { width: 12%; }
  .rt-modal .modal-card.parch .orn-selo { width: 9%; }
  .rt > :not(.rt-moldura) { box-sizing: border-box; max-width: 100%; padding-right: max(0px, calc(16cqw - 30px)); }
  .rt h2 { font-size: 20px; }
  .rt-fala { font-size: 14px; min-height: 0; }
  .rt-ficha { width: 48px; height: 58px; border-radius: 8px; }
  .rt-mesa { justify-content: flex-start; gap: 6px; }
  .rt-modal .parch .parch-scroll { max-height: calc(100dvh - 50px); }
}
@media (prefers-reduced-motion: reduce) { .rt-pessoa, .rt-flash { animation: none; } }

/* a balança das decisões: poste de bronze, braço que inclina e dois pratos com as saídas da decisão */
.modal.bz-modal .modal-card { width: min(720px, 100%); max-width: none; max-height: calc(100dvh - 40px); }
.bz-modal .modal-close, .modal-card.parch .bz > .orn-div { display: none; }
.bz-modal .parch .parch-scroll { max-height: calc(100dvh - 150px); }
.bz { display: grid; justify-items: center; gap: 10px; text-align: center; }
.bz h2 { margin: 0; padding: 0 28px; font-size: clamp(20px, 6vw, 26px); text-wrap: balance; }
.bz-fala { max-width: 42ch; margin: 0; font-size: 17px; line-height: 1.3; text-wrap: balance; min-height: 2.6em; }
.bz-palco { --w: min(540px, calc(100vw - 84px), calc((100dvh - 380px) * 2.1)); position: relative; width: var(--w); height: calc(var(--w) * .46); }
.bz-poste { position: absolute; left: 50%; bottom: 0; width: 14px; height: 78%; translate: -50% 0; border-radius: 6px 6px 0 0; background: linear-gradient(90deg, #6a400f, #f1c870 45%, #a9701f 70%, #5a3410); box-shadow: 0 4px 8px rgba(40, 20, 5, .4); }
.bz-poste::before { content: ""; position: absolute; left: 50%; bottom: -6px; width: 120px; height: 16px; translate: -50% 0; border-radius: 50% 50% 6px 6px; background: linear-gradient(180deg, #e8b45a, #6a400f); }
.bz-poste::after { content: ""; position: absolute; left: 50%; top: -14px; width: 26px; height: 26px; translate: -50% 0; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff1c0, #c9902f 60%, #6a400f); box-shadow: 0 2px 4px rgba(40, 20, 5, .4); }
.bz-braco { --incl: 0deg; position: absolute; left: 14%; right: 14%; top: 18%; height: 10px; border-radius: 6px; background: linear-gradient(180deg, #f6d58c, #a9701f 60%, #5a3410); box-shadow: 0 3px 6px rgba(40, 20, 5, .35); transform: rotate(var(--incl)); transition: transform .6s cubic-bezier(.3, 1.5, .5, 1); }
.bz-braco.bate { transition-duration: .9s; }
.bz-prato { position: absolute; top: 4px; width: 46%; translate: -50% 0; transform: rotate(calc(var(--incl) * -1)); transform-origin: 50% 0; transition: transform .6s cubic-bezier(.3, 1.5, .5, 1); }
.bz-prato[data-p="0"] { left: 0; }
.bz-prato[data-p="1"] { left: 100%; }
.bz-cordas { height: 34px; margin: 0 22%; border-left: 2px solid #8a5a1a; border-right: 2px solid #8a5a1a; }
.bz-cuia { display: grid; gap: 6px; justify-items: center; padding: 10px 10px 12px; border-radius: 6px 6px 40% 40%; background: linear-gradient(180deg, #f6d58c, #c9902f 70%, #8a5a1a); box-shadow: inset 0 2px 0 rgba(255, 250, 225, .7), 0 6px 12px rgba(40, 20, 5, .35); transition: box-shadow .3s; }
.bz-op { font-size: 15px; line-height: 1.2; color: #2a1404; font-weight: 600; text-wrap: balance; }
.bz-cabe { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; min-height: 40px; }
.bz-prato.alvo .bz-cuia { box-shadow: inset 0 2px 0 rgba(255, 250, 225, .7), 0 0 0 3px rgba(255, 211, 106, .8), 0 6px 12px rgba(40, 20, 5, .35); }
.bz-prato.ganha .bz-cuia { box-shadow: inset 0 2px 0 rgba(255, 250, 225, .7), 0 0 18px rgba(255, 211, 106, .9), 0 6px 12px rgba(40, 20, 5, .35); }
.bz-como { margin: 0; font-size: 15px; font-style: italic; color: #6a4a2a; }
.bz-como[hidden], .bz-mesa[hidden], .bz-perde[hidden] { display: none; }
.bz-mesa { display: flex; justify-content: center; gap: 12px; min-height: 48px; }
.bz-mesa:empty { display: none; }
.bz-peso { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 6px; border: 2px solid color-mix(in srgb, var(--cor) 60%, #5a3410); border-radius: 99px; background: linear-gradient(180deg, #fff6dc, #f1dcae); color: #2a1404; font-family: var(--f-caps); font-weight: 700; font-size: 13px; letter-spacing: .06em; cursor: grab; touch-action: none; box-shadow: 0 3px 6px rgba(60, 30, 5, .25); transition: transform .15s, opacity .2s; }
.bz-peso i { width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, var(--cor) 55%, color-mix(in srgb, var(--cor) 50%, #2a1404)); box-shadow: inset 0 -2px 3px rgba(0, 0, 0, .25); }
.bz-peso:hover:not(:disabled), .bz-peso:focus-visible { outline: none; transform: translateY(-2px); box-shadow: 0 6px 10px rgba(60, 30, 5, .3), 0 0 0 3px color-mix(in srgb, var(--cor) 50%, transparent); }
.bz-cabe .bz-peso { padding: 4px 9px 4px 4px; font-size: 11px; }
.bz-cabe .bz-peso i { width: 20px; height: 20px; }
.bz-peso.saiu { opacity: .3; }
.bz-peso:disabled { cursor: default; }
.bz-voa { position: fixed; z-index: 3000; translate: -50% -50%; rotate: -5deg; pointer-events: none; box-shadow: 0 10px 20px rgba(40, 20, 5, .4); }
.bz-perde { display: grid; gap: 4px; justify-items: center; }
.bz-perde p { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin: 0; font-size: 15px; }
.bz-perde span { font-style: italic; color: #6a4a2a; }
.bz-perde b { padding: 2px 10px; border-radius: 99px; font-family: var(--f-caps); font-size: 13px; letter-spacing: .06em; color: #2a1404; background: color-mix(in srgb, var(--cor) 45%, #fff6dc); }
.bz-decide:disabled { filter: grayscale(.6) brightness(.9); cursor: default; }
@media (orientation: landscape) and (max-height: 520px) {
  /* deitado: a fala em cima, a balança no meio, e os pesos com o botão numa linha só embaixo */
  .bz { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "fala fala" "palco palco" "mesa botao"; gap: 6px 16px; align-items: center; }
  .bz h2, .bz-como { display: none; }
  .bz-fala { grid-area: fala; max-width: none; font-size: 14px; min-height: 0; padding: 0 64px; }
  .bz-palco { grid-area: palco; --w: min(460px, 64vw, calc((100dvh - 210px) * 2.4)); height: calc(var(--w) * .44); }
  .bz-mesa, .bz-perde { grid-area: mesa; justify-self: end; }
  .bz-decide { grid-area: botao; justify-self: start; }
  .bz-op { font-size: 12px; }
  .bz-cordas { height: 22px; }
  .bz-modal .parch .parch-scroll { max-height: calc(100dvh - 50px); }
  .modal.bz-modal { padding: 10px; }
  .modal.bz-modal .modal-card { max-height: calc(100dvh - 20px); padding: 16px 24px; }
}
@media (max-width: 480px) { .bz-palco { height: calc(var(--w) * .7); } .bz-op { font-size: 13px; } .modal.bz-modal { padding: 12px; } .bz-modal .modal-card { padding: 26px 16px 22px; } }
@media (prefers-reduced-motion: reduce) { .bz-braco, .bz-prato { transition: none; } }

/* o marco conquistado vira como carta: medalha na frente, a vida em que aconteceu no verso */
.coll-vira, .parch .coll.coll-vira { position: relative; display: grid; padding: 0; border: 0; background: none; box-shadow: none; color: inherit; font: inherit; cursor: pointer; perspective: 600px; }
.parch .coll.coll-vira:hover { transform: none; box-shadow: none; }
.coll-vira > span { grid-area: 1 / 1; display: grid; justify-items: center; align-content: center; gap: 8px; padding: 14px 10px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); backface-visibility: hidden; transition: transform .5s cubic-bezier(.3, 1.3, .5, 1); }
.parch .coll-vira > span { border-radius: 6px; border: 1px solid rgba(90, 58, 20, .22); background: rgba(255, 250, 235, .28); padding: 14px 8px 12px; gap: 6px; }
.parch .coll-vira .coll-face { color: #2a160c; font-family: var(--f-caps); font-size: 12.5px; font-weight: 700; letter-spacing: .06em; line-height: 1.25; text-transform: uppercase; }
.coll-verso { transform: rotateY(180deg); font-family: var(--f-text); font-size: 13px; line-height: 1.3; text-wrap: balance; }
.parch .coll-verso { background: rgba(255, 250, 235, .7); color: #2a160c; }
.coll-verso b { font-family: var(--f-caps); letter-spacing: .06em; }
.coll-vira.virado .coll-face { transform: rotateY(-180deg); }
.coll-vira.virado .coll-verso { transform: rotateY(0); }
.coll-vira:hover .coll-face, .coll-vira:focus-visible .coll-face { outline: none; box-shadow: 0 0 0 2px rgba(255, 211, 106, .5); }
@media (prefers-reduced-motion: reduce) { .coll-vira > span { transition: none; } }

/* quanto apostar: um trilho de bronze com três marcas e um pino que se arrasta; em "tudo" o trilho esquenta */
.da { --v: .5; position: relative; width: min(240px, 100%); margin: 4px auto 0; padding: 6px 4px 0; cursor: pointer; touch-action: none; outline: none; }
.da-trilho { position: relative; display: block; height: 10px; border-radius: 99px; background: linear-gradient(180deg, #3a2410, #6a4a24); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .5); }
.da-cheio { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--v) * 100%); border-radius: inherit; background: linear-gradient(90deg, #f6d58c, #e8a23a); transition: width .2s, background .3s; }
.da.tudo .da-cheio { background: linear-gradient(90deg, #f6d58c, #ff7a3a); box-shadow: 0 0 10px rgba(255, 122, 58, .6); }
.da-pino { position: absolute; top: 50%; left: calc(var(--v) * 100%); width: 24px; height: 24px; translate: -50% -50%; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff6d8, #e9b44a 55%, #7a4a12); box-shadow: 0 2px 5px rgba(0, 0, 0, .45); transition: left .2s cubic-bezier(.3, 1.4, .5, 1), scale .15s; }
.da:focus-visible .da-pino, .da:active .da-pino { scale: 1.15; box-shadow: 0 2px 5px rgba(0, 0, 0, .45), 0 0 0 4px rgba(255, 211, 106, .5); }
.da-marcas { display: flex; justify-content: space-between; margin-top: 8px; font-family: var(--f-caps); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #6e4a1a; }
.da-diz { margin: 2px 0 0; font-size: 13px; line-height: 1.25; text-align: center; color: #4a2c10; text-wrap: balance; }
.da.travado { opacity: .6; cursor: default; }
@media (prefers-reduced-motion: reduce) { .da-cheio, .da-pino { transition: none; } }

/* a linha da vida: uma fita numerada em cima e as cartas dos momentos embaixo */
.modal.lt-modal .modal-card { width: min(720px, 100%); max-width: none; max-height: calc(100dvh - 40px); }
.lt-modal .modal-close, .modal-card.parch .lt > .orn-div { display: none; }
.lt-modal .parch .parch-scroll { max-height: calc(100dvh - 150px); }
.lt { display: grid; justify-items: center; gap: 12px; text-align: center; }
.lt h2 { margin: 0; padding: 0 28px; font-size: clamp(20px, 6vw, 26px); text-wrap: balance; }
.lt-fala { max-width: 42ch; margin: 0; font-size: 17px; line-height: 1.3; text-wrap: balance; min-height: 2.6em; }
.lt-linha { position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; width: 100%; margin: 0; padding: 0; list-style: none; }
.lt-linha::before { content: ""; position: absolute; left: 4%; right: 4%; top: 15px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, #c9902f, #f6d58c, #c9902f); }
.lt-vaga { position: relative; display: grid; justify-items: center; gap: 6px; }
.lt-vaga > b { position: relative; z-index: 1; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; font-family: var(--f-caps); color: #6e4a1a; background: #f7ead0; border: 2px solid #c9902f; transition: background .3s, color .3s; }
.lt-vaga > span { display: grid; gap: 2px; min-height: 52px; padding: 6px 8px; border-radius: 8px; border: 1px dashed rgba(110, 63, 12, .35); font-size: 13px; line-height: 1.25; color: #2a160c; text-wrap: balance; width: 100%; box-sizing: border-box; }
.lt-vaga small { font-family: var(--f-caps); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #8f2c12; }
.lt-vaga.cheia > b { color: #fff3d6; background: linear-gradient(180deg, #e8b45a, #8a5a1a); }
.lt-vaga.cheia > span { border-style: solid; background: rgba(255, 250, 235, .6); animation: ltEntra .4s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes ltEntra { from { opacity: 0; transform: translateY(14px) scale(.9); } }
.lt-mesa { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.lt-mesa[hidden], .lt-segue[hidden] { display: none; }
.lt-carta { max-width: 220px; padding: 10px 14px; border: 2px solid #b98a3a; border-radius: 10px; background: linear-gradient(180deg, #fff8e6, #f1dcae); color: #2a1404; font: inherit; font-size: 15px; line-height: 1.25; text-wrap: balance; cursor: pointer; box-shadow: 0 3px 8px rgba(60, 30, 5, .2); transition: transform .15s, opacity .25s; }
.lt-carta:hover:not(:disabled), .lt-carta:focus-visible { outline: none; transform: translateY(-3px) rotate(-1deg); box-shadow: 0 6px 12px rgba(60, 30, 5, .25), 0 0 0 3px rgba(255, 211, 106, .55); }
.lt-carta.foi { opacity: 0; pointer-events: none; transform: scale(.8); }
@media (max-width: 480px) { .lt-linha { grid-template-columns: 1fr 1fr; } .lt-linha::before { display: none; } .lt-fala { font-size: 16px; } }
@media (orientation: landscape) and (max-height: 520px) { .lt h2 { font-size: 20px; } .lt-fala { font-size: 14px; min-height: 0; } .lt-vaga > span { min-height: 40px; } .lt-carta { padding: 6px 10px; font-size: 13px; } .lt-modal .parch .parch-scroll { max-height: calc(100dvh - 50px); } .modal.lt-modal .modal-card { max-height: calc(100dvh - 20px); padding: 16px 24px; } }

/* a lápide com a palavra faltando */
.ep-vazio { display: inline; padding: 0 4px; border: 0; border-bottom: 2px dashed currentColor; background: none; color: inherit; font: inherit; letter-spacing: .08em; cursor: pointer; }
.ep-vazio.certa { border-bottom: 0; letter-spacing: normal; color: #b8842f; font-weight: 700; text-shadow: 0 0 10px rgba(255, 211, 106, .6); cursor: default; }
.ep-ops { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin: 2px 0 6px; font-size: 13px; }
.ep-ops[hidden] { display: none; }
.ep-ops > span { font-style: italic; opacity: .8; }
.ep-op { padding: 4px 12px; border: 1px solid #b98a3a; border-radius: 99px; background: rgba(255, 248, 230, .85); color: #2a1404; font: inherit; font-size: 13px; cursor: pointer; transition: transform .15s; }
.ep-op:hover:not(:disabled), .ep-op:focus-visible { outline: none; transform: translateY(-2px); box-shadow: 0 0 0 2px rgba(255, 211, 106, .6); }
.ep-op:disabled { opacity: .4; text-decoration: line-through; cursor: default; }

/* ligar pares: pessoas à esquerda, objetos à direita e o fio dourado entre eles */
.modal.lp-modal .modal-card { width: min(620px, 100%); max-width: none; max-height: calc(100dvh - 40px); }
.lp-modal .modal-close, .modal-card.parch .lp > .orn-div { display: none; }
.lp-modal .parch .parch-scroll { max-height: calc(100dvh - 110px); }
.modal.lp-modal { padding-block: 10px; }
.modal.lp-modal .modal-card { max-height: calc(100dvh - 20px); }
.lp { display: grid; justify-items: center; gap: 12px; text-align: center; }
.lp h2 { margin: 0; padding: 0 28px; font-size: clamp(20px, 6vw, 26px); text-wrap: balance; }
.lp-fala { max-width: 42ch; margin: 0; font-size: 17px; line-height: 1.3; text-wrap: balance; min-height: 2.6em; }
.lp-mesa { position: relative; display: grid; grid-template-columns: auto minmax(60px, 1fr) auto; width: min(460px, 100%); }
.lp-col { display: grid; gap: 10px; align-content: center; }
.lp-fios { grid-column: 2; grid-row: 1; width: 100%; height: 100%; }
.lp-fios { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.lp-fios path { fill: none; stroke-width: 4; stroke-linecap: round; }
.lp-fios .certo { stroke: #c9902f; filter: drop-shadow(0 0 4px rgba(255, 211, 106, .8)); stroke-dasharray: 600; animation: lpFio .5s ease-out both; }
.lp-fios .errado { stroke: #b8343a; stroke-dasharray: 8 6; opacity: .8; }
@keyframes lpFio { from { stroke-dashoffset: 600; } }
.lp-mesa > .lp-col:last-child { grid-column: 3; }
.lp-item { width: clamp(50px, calc((100dvh - 410px) / 4.4), 76px); height: clamp(50px, calc((100dvh - 410px) / 4.4), 76px); padding: 6px; border: 2px solid #b98a3a; border-radius: 12px; background: rgba(255, 248, 230, .75); cursor: pointer; box-shadow: 0 3px 8px rgba(60, 30, 5, .22); transition: transform .15s, box-shadow .2s, opacity .3s; }
.lp-item img { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.lp-item:hover:not(:disabled), .lp-item:focus-visible { outline: none; transform: translateY(-2px); box-shadow: 0 6px 12px rgba(60, 30, 5, .28), 0 0 0 3px rgba(255, 211, 106, .55); }
.lp-item.sel { transform: scale(1.06); box-shadow: 0 0 0 4px #e8b45a, 0 0 18px rgba(255, 211, 106, .8); }
.lp-item.ligado { border-color: #c9902f; background: rgba(255, 236, 190, .9); cursor: default; }
.lp-segue[hidden] { display: none; }
@media (orientation: landscape) and (max-height: 520px) { .lp h2 { display: none; } .lp-fala { font-size: 14px; min-height: 0; padding: 0 60px; } .lp-item { width: calc((100dvh - 190px) / 4.4); height: calc((100dvh - 190px) / 4.4); padding: 3px; } .lp-col { gap: 5px; } .lp { gap: 6px; } .lp-modal .parch .parch-scroll { max-height: calc(100dvh - 50px); } .modal.lp-modal .modal-card { max-height: calc(100dvh - 20px); padding: 16px 24px; } }
@media (prefers-reduced-motion: reduce) { .lp-fios .certo { animation: none; } }

/* o que mudou: dois quadros da mesma cena lado a lado (empilhados no celular em pé) */
.modal.om-modal .modal-card { width: min(820px, 100%); max-width: none; max-height: calc(100dvh - 40px); }
.om-modal .modal-close, .modal-card.parch .om > .orn-div { display: none; }
.om-modal .parch .parch-scroll { max-height: calc(100dvh - 110px); }
.modal.om-modal { padding-block: 10px; }
.modal.om-modal .modal-card { max-height: calc(100dvh - 20px); }
.om { display: grid; justify-items: center; gap: 10px; text-align: center; }
.om h2 { margin: 0; padding: 0 28px; font-size: clamp(20px, 6vw, 26px); text-wrap: balance; }
.om-fala { max-width: 46ch; margin: 0; font-size: 16px; line-height: 1.3; text-wrap: balance; min-height: 2.6em; }
.om-par { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: min(700px, 100%, calc((100dvh - 390px) * 2 + 12px)); }
.om-quadro { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 6px; border: 6px solid #c9902f; box-shadow: inset 0 0 0 2px #5a3410, 0 6px 14px rgba(40, 20, 5, .35); }
.om-quadro[data-l="1"] { cursor: crosshair; }
.om-fundo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.om-quadro[data-l="0"] .om-fundo { filter: sepia(.55) brightness(.95); }
.om-rotulo { position: absolute; left: 8px; top: 8px; z-index: 3; padding: 2px 10px; border-radius: 99px; font-family: var(--f-caps); font-size: 11px; letter-spacing: .08em; color: #fff3d6; background: rgba(42, 20, 8, .75); }
.om-coisa { position: absolute; left: var(--x); top: var(--y); z-index: 1; width: 17%; translate: -50% -100%; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .45)); pointer-events: none; }
.om-quadro[data-l="0"] .om-coisa { filter: sepia(.5) drop-shadow(0 3px 3px rgba(0, 0, 0, .45)); }
.om-roda { position: absolute; left: var(--x); top: var(--y); z-index: 2; width: 24%; aspect-ratio: 1; translate: -50% -50%; border: 3px solid #ffd36a; border-radius: 50%; box-shadow: 0 0 12px rgba(255, 211, 106, .9), inset 0 0 10px rgba(255, 211, 106, .5); pointer-events: none; animation: omRoda .45s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes omRoda { from { scale: 1.8; opacity: 0; } }
.om-erro { position: absolute; left: var(--x); top: var(--y); z-index: 2; width: 22px; height: 22px; translate: -50% -50%; pointer-events: none; animation: omErro .7s ease-out both; }
.om-erro::before, .om-erro::after { content: ""; position: absolute; left: 50%; top: 0; width: 3px; height: 100%; translate: -50% 0; border-radius: 2px; background: #b8343a; rotate: 45deg; }
.om-erro::after { rotate: -45deg; }
@keyframes omErro { from { scale: .4; } 30% { scale: 1.1; } to { opacity: 0; } }
.om-conta { margin: 0; font-family: var(--f-caps); font-size: 13px; letter-spacing: .08em; color: #6e3f0c; }
.om-botoes { display: flex; gap: 10px; justify-content: center; }
.om-botoes [hidden] { display: none; }
@media (max-width: 560px) { .om-par { grid-template-columns: 1fr; gap: 8px; width: min(300px, 100%, calc((100dvh - 440px) / 2)); } .om-fala { font-size: 15px; } }
@media (orientation: landscape) and (max-height: 520px) { .om h2 { display: none; } .om-fala { font-size: 14px; min-height: 0; padding: 0 60px; } .om-par { width: min(560px, calc((100dvh - 175px) * 2 + 12px)); } .om { gap: 6px; } .om-modal .parch .parch-scroll { max-height: calc(100dvh - 50px); } .modal.om-modal .modal-card { max-height: calc(100dvh - 20px); padding: 16px 24px; } }
@media (prefers-reduced-motion: reduce) { .om-roda, .om-erro { animation: none; } }


/* Sobre a máquina, de cima para baixo e tudo alinhado à esquerda com o texto: o vídeo de apresentação (uma
   miniatura em moldura de latão, com o play, que sobe no hover e afunda no clique, e o título ao lado), um traço fino
   e o crédito na mesma linha do logo */
.modal-card.parch .sobre-video { display: flex; align-items: center; gap: 16px; width: 100%; margin: 20px 0 0; padding: 0; border: 0; background: none;
  cursor: pointer; text-align: left; color: #2a1608; font: inherit; }
.sobre-video .sv-tela { position: relative; flex: none; display: block; width: 132px; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: #140b1f;
  box-shadow: 0 0 0 2px #6a4818, 0 0 0 4px #e0b46a, 0 0 0 5px #6a4818, 0 5px 0 1px #6a4818, 0 9px 14px rgba(40, 20, 6, .35);
  transition: transform .14s ease, box-shadow .14s ease; }
.sobre-video .sv-tela img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(.9) brightness(.85); transition: filter .2s ease; }
.sobre-video:hover .sv-tela, .sobre-video:focus-visible .sv-tela { transform: translateY(-2px); box-shadow: 0 0 0 2px #6a4818, 0 0 0 4px #f0cf86, 0 0 0 5px #6a4818, 0 7px 0 1px #6a4818, 0 13px 18px rgba(40, 20, 6, .4); }
.sobre-video:hover .sv-tela img { filter: none; }
.sobre-video:active .sv-tela { transform: translateY(4px); box-shadow: 0 0 0 2px #6a4818, 0 0 0 4px #e0b46a, 0 0 0 5px #6a4818, 0 1px 0 1px #6a4818, 0 3px 6px rgba(40, 20, 6, .3); }
.modal-card.parch .sobre-video:focus-visible { outline: none; }
.sobre-video:focus-visible .sv-txt b { text-decoration: underline; text-underline-offset: 4px; }
.sobre-video .sv-play { position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; translate: -50% -50%; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff1c2, #e0b46a 55%, #8a5a1c); box-shadow: 0 0 0 1.5px #5a3a10, 0 3px 8px rgba(0, 0, 0, .55); animation: svPulso 2.4s ease-in-out infinite; }
.sobre-video .sv-play::after { content: ''; position: absolute; left: 55%; top: 50%; width: 11px; height: 13px; translate: -50% -50%; background: #3a2214; clip-path: polygon(0 0, 100% 50%, 0 100%); }
@keyframes svPulso { 0%, 100% { box-shadow: 0 0 0 1.5px #5a3a10, 0 3px 8px rgba(0, 0, 0, .55), 0 0 0 0 rgba(255, 220, 150, .7); } 60% { box-shadow: 0 0 0 1.5px #5a3a10, 0 3px 8px rgba(0, 0, 0, .55), 0 0 0 10px rgba(255, 220, 150, 0); } }
.sobre-video .sv-txt { display: grid; gap: 3px; }
.sobre-video .sv-txt b { font-family: var(--f-caps); font-size: 15px; letter-spacing: .06em; line-height: 1.25; color: #3a2214; }
.sobre-video .sv-txt small { font-family: var(--f-text); font-style: italic; font-size: 16px; line-height: 1.3; color: rgba(58, 34, 20, .75); text-wrap: balance; }
@media (prefers-reduced-motion: reduce) { .sobre-video .sv-play { animation: none; } }
/* o crédito: um traço fino em cima, e a frase e o logo lado a lado */
.modal-card.parch .sobre-assina { justify-content: flex-start; margin-top: 22px; padding-top: 16px; border-top: 1px solid rgba(110, 63, 12, .28); }
.modal-card.parch .sobre-assina .sobre-credito { display: flex; align-items: center; gap: 12px; margin: 0; }
.modal-card.parch .sobre-assina .sobre-credito img { height: 30px; }
@media (max-width: 420px) { .sobre-video .sv-tela { width: 104px; } .modal-card.parch .sobre-assina .sobre-credito { flex-wrap: wrap; gap: 8px; } }

/* o quadro do vídeo de apresentação, por cima de tudo */
.apres { position: fixed; inset: 0; z-index: 45; display: grid; place-items: center; padding: max(28px, 4vh) max(16px, 3vw);
  background: rgba(6, 3, 12, .88); backdrop-filter: blur(6px); opacity: 0; transition: opacity .3s ease; }
.apres.on { opacity: 1; }
.apres-quadro { position: relative; width: min(100%, calc((100vh - 8vh - 56px) * 16 / 9)); aspect-ratio: 16 / 9; border-radius: 12px; background: #000;
  box-shadow: 0 0 0 4px #5a3a10, 0 0 0 9px #e0b46a, 0 0 0 11px #6a4818, 0 24px 60px rgba(0, 0, 0, .7); }
.apres-quadro video { width: 100%; height: 100%; display: block; border-radius: 12px; background: #000; }
.apres .apres-x { --t: 42px; position: absolute; top: calc(var(--t) / -2 - 6px); right: calc(var(--t) / -2 - 6px); width: var(--t); height: var(--t); z-index: 2;
  border: 1.5px solid #8a5a1c; background: #f3e6d0; color: #3a2214; box-shadow: 0 4px 12px rgba(0, 0, 0, .55); }
.apres .apres-x:hover { background: #fff6e2; color: #1a0c06; }
.apres .apres-x .ico { background: currentColor; }
@media (max-width: 600px) { .apres .apres-x { --t: 36px; top: -48px; right: 0; } }
.modal-card.parch:has(.sobre-video) p.empty { text-wrap: balance; }

/* as plaquinhas das interações no tamanho de jogo: a plaquinha inteira cresce na proporção (a instrução, os objetos,
   o botão, a barra), e cresce mais nas telas mais altas; no celular fica como está */
@media (min-width: 760px) {
  .g-panel .qte.glass { zoom: 1.32; }
  .g-panel .qte.glass .qte-label { font-size: 15px; letter-spacing: .08em; line-height: 1.5; text-wrap: balance; }
}
@media (min-width: 760px) and (min-height: 820px) { .g-panel .qte.glass { zoom: 1.5; } }
/* as de tabuleiro crescem mais: as peças, os objetos e as setas precisam ser vistos e tocados com folga */
@media (min-width: 760px) { .g-panel .qte.glass:is(.qte-monta, .qte-seq, .qte-ouvido) { zoom: 1.85; } }
@media (min-width: 760px) and (min-height: 820px) { .g-panel .qte.glass:is(.qte-monta, .qte-seq, .qte-ouvido) { zoom: 2.1; } }
}

/* o achar, ao lado da bola, com os objetos grandes */
@media (min-width: 760px) { .g-panel .qte.glass.qte-acha.qte-lado { zoom: 1.25; } }

/* as peças das interações em 3D (assets/pecas, tools/build_pecas.py, prompt da seção 41): o trilho de madeira e latão,
   a cápsula violeta da zona certa, o ponteiro de latão, o tubo de vidro que enche de âmbar e as teclas de latão.
   A caixa de cada barra é o miolo da peça (o sulco, o vidro); a imagem inteira sai para fora dela pelas medidas da peça */
:is(.qte, .din-demo) .qte-track { position: relative; isolation: isolate; overflow: visible; border-radius: 0; background: none; box-shadow: none; height: 22px; }
:is(.qte, .din-demo) .qte-track::before { content: ""; position: absolute; z-index: -1; left: -12.04%; right: -7.56%; top: -47.8%; bottom: -47.8%;
  background: url("../assets/pecas/trilho.webp") center / 100% 100% no-repeat; pointer-events: none; }
:is(.qte, .din-demo) .qte-zone { border: 0; border-radius: 0; background: none; z-index: 1; }
:is(.qte, .din-demo) .qte-zone::before { content: ""; position: absolute; left: -22%; right: -22%; top: -30%; bottom: -30%;
  background: url("../assets/pecas/zona.webp") center / 100% 100% no-repeat; filter: drop-shadow(0 0 6px rgba(166, 92, 255, .55)); }
:is(.qte, .din-demo) .qte-mark { z-index: 2; width: 18px; height: 54px; top: -16px; margin-left: -9px; border-radius: 0; box-shadow: none;
  background: url("../assets/pecas/ponteiro.webp") center / contain no-repeat; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .5)); }
/* a barra de força: o tubo vazio por trás e o tubo cheio revelado da esquerda para a direita conforme enche */
:is(.qte, .din-demo) .qte-track:has(.qte-fill) { container-type: inline-size; height: 26px; margin: 6px 0 14px; }
:is(.qte, .din-demo) .qte-track:has(.qte-fill)::before { left: -22.7%; right: -19.4%; top: -32.3%; bottom: -60.2%; background-image: url("../assets/pecas/tubo-vazio.webp"); }
:is(.qte, .din-demo) .qte-fill { overflow: hidden; background: none; box-shadow: none; }
:is(.qte, .din-demo) .qte-fill::before { content: ""; position: absolute; left: calc(-100cqw * 131 / 577); width: calc(100cqw * 820 / 577); top: -32.3%; height: calc(100% * 256 / 133);
  background: url("../assets/pecas/tubo-cheio.webp") center / 100% 100% no-repeat; }
:is(.qte, .din-demo) .qte-fill { overflow: visible; clip-path: inset(-40% 0 -80% 0); }
/* as teclas: a larga para o ESPAÇO, a quadrada para as setas; a palavra fica no esmalte creme do alto da tecla */
kbd.tecla.din-tecla { padding: 8px 40px 26px; border-radius: 0; box-shadow: none; color: #3a2214; text-shadow: 0 1px 0 rgba(255, 250, 235, .7); font-size: 17px; letter-spacing: .08em;
  background: url("../assets/pecas/tecla-larga.webp") center / 100% 100% no-repeat; filter: drop-shadow(0 4px 4px rgba(40, 20, 6, .35)); }
.din-par kbd.tecla.din-tecla { padding: 8px 20px 24px; min-width: 64px; background-image: url("../assets/pecas/tecla.webp"); }
/* a tecla dentro da instrução (APERTE ESPAÇO, ← E →) é a mesma tecla de latão, em miniatura */
.qte-label kbd.tecla, .din-txt kbd.tecla, .pul-fala p kbd.tecla, .yb-chama p kbd.tecla { padding: 1px 12px 7px; margin: 0 4px; border-radius: 0; box-shadow: none; color: #3a2214; text-shadow: 0 1px 0 rgba(255, 250, 235, .7);
  background: url("../assets/pecas/tecla-larga.webp") center / 100% 100% no-repeat; filter: drop-shadow(0 2px 2px rgba(40, 20, 6, .3)); vertical-align: 1px; }

/* ---------- os pontos e o Livro dos Viajantes (js/game/placar.js, js/livro.js) ---------- */
.ico-livro { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5.5A2.5 2.5 0 0 1 6.5 3H20v15H6.5A2.5 2.5 0 0 0 4 20.5z'/%3E%3Cpath d='M4 20.5A2.5 2.5 0 0 0 6.5 23H20v-5'/%3E%3Cpath d='M12 7l1.2 2.4 2.6.4-1.900 1.800.5 2.600-2.400-1.300-2.400 1.300.5-2.600-1.900-1.800 2.600-.4z'/%3E%3C/svg%3E"); }
/* o ponto que sai da bola quando a ação dá certo */
.pts-pop { position: fixed; z-index: 66; display: grid; justify-items: center; pointer-events: none; transform: translate(-50%, -50%); animation: ptsPop 1.8s cubic-bezier(.2, .8, .3, 1) both; }
.pts-pop b { font-family: var(--f-title); font-size: clamp(30px, 5vh, 46px); line-height: 1; color: #ffe08a; -webkit-text-stroke: 2px #5a2a0a; paint-order: stroke fill; text-shadow: 0 3px 0 #5a2a0a, 0 0 20px rgba(255, 200, 90, .85); }
.pts-pop small { margin-top: 2px; padding: 1px 10px 2px; border-radius: 99px; background: #7a4a12; color: #fff3d6; font-family: var(--f-caps); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
@keyframes ptsPop { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.4); } 14% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); } 26% { transform: translate(-50%, -50%) scale(1); } 75% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -160%) scale(.9); } }
/* o placar do resumo */
.sum-placar { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 16px; margin: 10px 0 12px; padding: 12px 16px; border-radius: 10px; border: 1px solid rgba(138, 90, 28, .45); background: linear-gradient(180deg, rgba(255, 246, 222, .62), rgba(240, 220, 180, .42)); }
.sp-num { display: grid; justify-items: start; line-height: 1; }
.sp-num b { font-family: var(--f-title); font-size: clamp(34px, 4.6vh, 46px); color: #6a3c0c; font-variant-numeric: tabular-nums; }
.sp-num small { margin-top: 3px; font-family: var(--f-caps); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #6a4a2a; }
.sp-rec { margin-top: 5px; padding: 2px 9px 3px; border-radius: 99px; background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: #2a1406; font-style: normal; font-family: var(--f-caps); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.sp-conta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0; font-size: 15px; line-height: 1.25; color: #4a2c18; }
.sp-conta span { white-space: nowrap; }
.sp-conta b { font-weight: 700; color: #2a160c; }
.sp-livro { grid-column: 1 / -1; justify-self: start; padding: 4px 0; border: 0; background: none; color: #6a3c0c; font-family: var(--f-caps); font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; text-decoration: underline; text-decoration-color: rgba(138, 90, 28, .5); text-underline-offset: 4px; }
.sp-livro::after { content: " ›"; }
.sp-livro:hover, .sp-livro:focus-visible { color: #2a1406; text-decoration-color: currentColor; }
@media (orientation: landscape) and (max-height: 520px) { .sum-placar { margin: 4px 0 6px; padding: 6px 10px; } .sp-num b { font-size: 28px; } .sp-conta { font-size: 13px; } }

/* a medalha de quem viaja: um disco de latão com o símbolo gravado */
.lv-med { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; color: #4a2a0c;
  background: radial-gradient(circle at 34% 30%, #fff1c2 0, #e9c473 26%, #c18a34 62%, #8a5a1c 100%); box-shadow: inset 0 0 0 2px rgba(90, 50, 10, .55), inset 0 -3px 5px rgba(60, 30, 5, .35), 0 2px 3px rgba(40, 20, 6, .3); }
.lv-med svg { width: 58%; height: 58%; }
.lv-med.grande { width: 64px; height: 64px; }
.lv-link { padding: 4px 0; border: 0; background: none; color: #6a3c0c; font-family: var(--f-text); font-size: 17px; font-style: italic; cursor: pointer; text-decoration: underline; text-decoration-color: rgba(138, 90, 28, .45); text-underline-offset: 3px; }
.lv-link:hover, .lv-link:focus-visible { color: #2a1406; text-decoration-color: currentColor; }
.lv-chip { min-height: 36px; padding: 0 14px; border-radius: 99px; border: 1px solid rgba(138, 90, 28, .5); background: rgba(255, 250, 235, .45); color: #3a2214; font-family: var(--f-text); font-size: 16px; font-weight: 600; cursor: pointer; transition: background .15s, transform .15s; }
.lv-chip:hover { transform: translateY(-1px); background: rgba(255, 250, 235, .8); }
.lv-chip[aria-pressed="true"] { border-color: #8a5a1c; background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: #24130b; }
.parch .lv-sub { max-width: 60ch; margin: 0 0 14px; font-size: 18px; line-height: 1.35; text-wrap: pretty; }
.lv-convite, .lv-cartao { display: flex; align-items: center; gap: 16px; padding: 14px 18px; border-radius: 10px; border: 1px solid rgba(138, 90, 28, .5); background: linear-gradient(180deg, rgba(255, 246, 222, .7), rgba(240, 220, 180, .45)); }
.lv-convite { justify-content: space-between; flex-wrap: wrap; }
.lv-convite b { font-family: var(--f-caps); font-size: 16px; letter-spacing: .04em; color: #2a160c; }
.parch .lv-convite p { margin: 2px 0 0; font-size: 16px; }
.lv-cartao-txt { display: grid; gap: 1px; min-width: 0; flex: 1; }
.lv-cartao-txt small { font-family: var(--f-caps); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #8a5a1c; }
.lv-cartao-txt b { font-family: var(--f-caps); font-size: 19px; color: #2a160c; }
.lv-cartao-txt span { font-size: 16px; color: #4a2c18; }
.lv-dica { font-style: italic; }
.lv-cartao-pts { display: grid; justify-items: end; line-height: 1; }
.lv-cartao-pts b { font-family: var(--f-title); font-size: 34px; color: #6a3c0c; font-variant-numeric: tabular-nums; }
.lv-cartao-pts small { font-family: var(--f-caps); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #6a4a2a; }
.lv-regioes[hidden], .lv-regras[hidden] { display: none; }
.lv-regioes { display: flex; flex-wrap: wrap; gap: 6px; margin: -6px 0 12px; }
.lv-lista { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.lv-li { display: grid; grid-template-columns: 34px 40px 1fr auto; align-items: center; gap: 12px; padding: 6px 12px; border-radius: 8px; border: 1px solid transparent; }
.lv-li:nth-child(odd) { background: rgba(255, 250, 235, .32); }
.lv-pos { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-family: var(--f-caps); font-size: 14px; font-weight: 700; color: #6a4a2a; font-variant-numeric: tabular-nums; }
.lv-li.p1 .lv-pos { background: radial-gradient(circle at 35% 30%, #fff4c4, #e8b93a 55%, #9a6a10); color: #3a2206; box-shadow: 0 1px 2px rgba(40, 20, 6, .35); }
.lv-li.p2 .lv-pos { background: radial-gradient(circle at 35% 30%, #ffffff, #c9c9c4 55%, #7a7a74); color: #2a2a26; box-shadow: 0 1px 2px rgba(40, 20, 6, .35); }
.lv-li.p3 .lv-pos { background: radial-gradient(circle at 35% 30%, #ffe0c0, #c98a52 55%, #7a4a1c); color: #2a1406; box-shadow: 0 1px 2px rgba(40, 20, 6, .35); }
.lv-nome { display: grid; min-width: 0; line-height: 1.15; }
.lv-nome b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--f-caps); font-size: 15px; letter-spacing: .02em; color: #2a160c; }
.lv-nome small { font-size: 14px; font-style: italic; color: #6a4a2a; }
.lv-pts { display: flex; align-items: baseline; gap: 4px; font-size: 13px; color: #6a4a2a; }
.lv-pts b { font-family: var(--f-caps); font-size: 18px; color: #3a2214; font-variant-numeric: tabular-nums; }
.lv-li.eu { border-color: #8a5a1c; background: linear-gradient(90deg, rgba(246, 213, 140, .7), rgba(246, 213, 140, .25)); }
.lv-gap { padding: 2px 0; text-align: center; letter-spacing: .4em; color: #8a5a1c; }
.lv-vazio { padding: 18px 12px; font-size: 17px; font-style: italic; color: #4a2c18; text-align: center; }
.lv-pe { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; margin-top: 16px; padding-top: 10px; border-top: 1px solid rgba(90, 58, 20, .25); }
.lv-pe-eu { display: contents; }
.lv-regras { margin-top: 12px; padding: 12px 16px; border-radius: 10px; background: rgba(255, 250, 235, .45); border: 1px dashed rgba(138, 90, 28, .5); }
.lv-regras ul { display: grid; gap: 4px; margin: 0 0 8px; padding: 0; list-style: none; }
.lv-regras li { display: flex; justify-content: space-between; gap: 12px; font-size: 16px; color: #3a2214; border-bottom: 1px dotted rgba(138, 90, 28, .35); padding-bottom: 3px; }
.lv-regras li b { font-family: var(--f-caps); color: #6a3c0c; }
.lv-regras li b::before { content: "+"; }
.parch .lv-regras p { margin: 0; font-size: 15px; line-height: 1.35; font-style: italic; text-wrap: pretty; }
.parch .lv-demo { margin: 10px 0 0; font-size: 14px; font-style: italic; color: #7a5a3a; }
/* os termos */
.lv-termos h3 { margin: 16px 0 4px; font-family: var(--f-caps); font-size: 15px; letter-spacing: .06em; color: #4a2a0c; }
.parch .lv-termos p { margin: 0; font-size: 17px; line-height: 1.4; text-wrap: pretty; }
.parch .lv-termos .lv-versao { margin-top: 16px; font-size: 14px; font-style: italic; color: #7a5a3a; }
/* a entrada no Livro */
.parch .en-pergunta { font-size: 20px; }
.en-ops { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.parch .en-texto, .parch .en-expl { margin: 4px 0 10px; font-size: 17px; line-height: 1.35; text-wrap: pretty; }
.parch .en-expl { font-size: 15px; font-style: italic; color: #5a3a1c; }
.parch p.en-rotulo { margin: 14px 0 6px; font-family: var(--f-caps); font-size: 13px; font-weight: 700; letter-spacing: .08em; color: #4a2a0c; }
.en-cartao { display: flex; align-items: center; gap: 16px; padding: 14px 18px; border-radius: 10px; border: 1px solid rgba(138, 90, 28, .5); background: linear-gradient(180deg, rgba(255, 246, 222, .75), rgba(240, 220, 180, .45)); }
.en-cartao > div { display: grid; justify-items: start; gap: 2px; }
.en-apelido { font-family: var(--f-caps); font-size: clamp(20px, 2.6vw, 26px); color: #2a160c; }
.en-medalhas { display: flex; flex-wrap: wrap; gap: 8px; }
.en-med { padding: 3px; border-radius: 50%; border: 2px solid transparent; background: none; cursor: pointer; transition: transform .15s; }
.en-med:hover { transform: translateY(-2px); }
.en-med[aria-pressed="true"] { border-color: #8a5a1c; box-shadow: 0 0 0 3px rgba(246, 213, 140, .8); }
.en-regioes { display: flex; flex-wrap: wrap; gap: 6px; }
.en-acoes { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.en-acoes .pbt[disabled] { opacity: .45; filter: grayscale(.5); cursor: not-allowed; transform: none; }
.en-combinado { display: grid; gap: 8px; margin: 4px 0 10px; padding: 0; list-style: none; }
.en-combinado li { position: relative; padding-left: 24px; font-size: 17px; line-height: 1.35; color: #3a2214; text-wrap: pretty; }
.en-combinado li::before { content: ""; position: absolute; left: 4px; top: .5em; width: 9px; height: 9px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff1c2, #c18a34); box-shadow: 0 0 0 1.5px #8a5a1c; }
/* a caixinha do concordo, desenhada no jogo */
.lv-marca { display: flex; align-items: flex-start; gap: 12px; margin-top: 12px; padding: 10px 12px; border-radius: 8px; border: 1px solid rgba(138, 90, 28, .4); background: rgba(255, 250, 235, .45); color: #2a160c; font-family: var(--f-text); font-size: 16.5px; line-height: 1.35; text-align: left; cursor: pointer; }
.lv-marca span { text-wrap: balance; }
.lv-marca:hover { background: rgba(255, 250, 235, .75); }
.lv-caixa { position: relative; flex: none; width: 24px; height: 24px; margin-top: 1px; border-radius: 5px; border: 2px solid #8a5a1c; background: #fff8e8; box-shadow: inset 0 2px 3px rgba(90, 50, 10, .25); }
.lv-marca[aria-checked="true"] .lv-caixa { background: linear-gradient(180deg, var(--gold-hi), var(--gold)); }
.lv-marca[aria-checked="true"] .lv-caixa::after { content: ""; position: absolute; left: 6px; top: 1px; width: 7px; height: 13px; border: solid #3a2206; border-width: 0 3px 3px 0; transform: rotate(42deg); }
.modal-card.parch .sobre-termos { margin-top: 4px; font-size: 15px; }
#street .gate-termos { margin: 4px auto 0; padding: 4px 8px; border: 0; background: none; color: rgba(255, 250, 240, .86); font-family: var(--f-text); font-size: 14px; font-style: italic; text-decoration: underline; text-underline-offset: 3px; text-shadow: 0 1px 2px rgba(10, 22, 32, .9); cursor: pointer; }
#street .gate-termos:hover, #street .gate-termos:focus-visible { color: #fff; }
@media (max-width: 560px) { .lv-li { grid-template-columns: 28px 34px 1fr auto; gap: 8px; padding: 6px 8px; } .lv-li .lv-med { width: 34px; height: 34px; } .lv-cartao { flex-wrap: wrap; } }

/* ---------- o Livro com cara de jogo: pódio de latão, troféus, números dourados que contam e brilham ---------- */
/* o número de ouro: letra de título do jogo, preenchida de latão polido, com contorno escuro e brilho */
.lv-ouro { font-family: var(--f-title); font-weight: 700; font-variant-numeric: tabular-nums; color: transparent;
  background: linear-gradient(180deg, #fff8d2 0%, #ffd25a 38%, #e09a1c 62%, #a8620c 100%); -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(0 1.5px 0 #4a2206) drop-shadow(0 -1px 0 #4a2206) drop-shadow(1px 0 0 #4a2206) drop-shadow(-1px 0 0 #4a2206) drop-shadow(0 0 10px rgba(255, 196, 70, .55)); }
.lv-cartao-pts b.lv-ouro { font-size: 40px; }
.lv-pts b { font-family: var(--f-title); color: transparent; background: linear-gradient(180deg, #e8a92a, #8a4e0c); -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 1px 0 rgba(255, 240, 200, .8)); }
/* o pódio */
.lv-podio { position: relative; display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 10px; margin: 6px 0 14px; padding: 18px 8px 0; isolation: isolate; }
.lv-podio[hidden] { display: none; }
.lv-podio::before { content: ""; position: absolute; inset: 0 6% 0; z-index: -1; border-radius: 50% 50% 0 0 / 40% 40% 0 0; background: radial-gradient(ellipse at 50% 70%, rgba(255, 214, 120, .55), rgba(255, 214, 120, 0) 70%); }
.lv-degrau { display: grid; justify-items: center; min-width: 0; }
.lv-degrau.vazio { visibility: hidden; }
.lv-quem { display: grid; justify-items: center; gap: 0; min-width: 0; max-width: 100%; margin-bottom: 4px; text-align: center; }
.lv-quem b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--f-caps); font-size: 14px; color: #2a160c; }
.lv-quem .lv-ouro { font-size: 26px; line-height: 1.1; }
.d1 .lv-quem .lv-ouro { font-size: 32px; }
.lv-trofeu { position: relative; width: 92px; aspect-ratio: 1; margin-bottom: -6px; z-index: 1; }
.d1 .lv-trofeu { width: 116px; }
.lv-trofeu-svg { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 4px 4px rgba(40, 20, 6, .4)); }
.lv-trofeu .lv-med { position: absolute; left: 50%; top: 17%; width: 38%; height: 38%; translate: -50% 0; box-shadow: inset 0 0 0 2px rgba(90, 50, 10, .6), 0 0 0 2px rgba(255, 250, 230, .8); }
.lv-raios { position: absolute; inset: -38%; z-index: -1; border-radius: 50%; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgba(255, 220, 120, .55) 0 10deg, rgba(255, 220, 120, 0) 10deg 24deg);
  -webkit-mask: radial-gradient(closest-side, #000 30%, transparent 100%); mask: radial-gradient(closest-side, #000 30%, transparent 100%); animation: lvGira 14s linear infinite; }
@keyframes lvGira { to { rotate: 360deg; } }
.lv-bloco { position: relative; display: grid; place-items: center; width: 100%; border-radius: 6px 6px 0 0; overflow: hidden;
  background: linear-gradient(90deg, #8a5a1c 0%, #e9c473 22%, #f6dc8e 40%, #c18a34 70%, #7a4a14 100%);
  box-shadow: inset 0 3px 0 rgba(255, 246, 210, .9), inset 0 -10px 16px rgba(60, 30, 5, .35), 0 6px 10px rgba(40, 20, 6, .25); }
.lv-bloco::before { content: ""; position: absolute; inset: 8px 10px auto; height: 6px; border-radius: 3px; background: radial-gradient(circle, #5a3412 2px, transparent 2.6px) 0 50% / 18px 6px repeat-x; opacity: .7; }
.lv-bloco span { font-family: var(--f-title); font-size: 46px; line-height: 1; color: #6a3c0c; text-shadow: 0 1px 0 rgba(255, 246, 210, .85), 0 -1px 0 rgba(60, 30, 5, .45); }
.d1 .lv-bloco { height: 108px; } .d1 .lv-bloco span { font-size: 60px; }
.d2 .lv-bloco { height: 78px; background: linear-gradient(90deg, #6e7276 0%, #d6d9db 24%, #ffffff 42%, #b8bcbf 70%, #63676b 100%); } .d2 .lv-bloco span { color: #44484c; }
.d3 .lv-bloco { height: 58px; background: linear-gradient(90deg, #6a3a14 0%, #d08a4e 24%, #f0b884 42%, #b06a30 70%, #5e3010 100%); } .d3 .lv-bloco span { color: #4a2408; }
.lv-degrau.eu .lv-quem b { color: #8a3c00; }
.lv-degrau.eu .lv-bloco { outline: 3px solid #ffd25a; outline-offset: -3px; }
/* a entrada: os degraus sobem do chão, os troféus caem neles, e quem está lá em cima aparece */
.lv-podio.entra .lv-bloco { animation: lvSobe .55s cubic-bezier(.2, .9, .3, 1.15) both; animation-delay: calc(var(--i) * .16s); transform-origin: 50% 100%; }
.lv-podio.entra .lv-trofeu { animation: lvCai .6s cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: calc(.32s + var(--i) * .16s); }
.lv-podio.entra .lv-quem { animation: lvAparece .4s ease-out both; animation-delay: calc(.5s + var(--i) * .16s); }
@keyframes lvSobe { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes lvCai { 0% { opacity: 0; transform: translateY(-46px) scale(.6) rotate(-8deg); } 100% { opacity: 1; transform: none; } }
@keyframes lvAparece { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
/* a lista entra linha por linha, e a sua linha tem um brilho que passa */
.lv-lista .lv-li { animation: lvLinha .42s cubic-bezier(.2, .9, .3, 1.1) both; animation-delay: calc(.6s + var(--i) * .05s); }
@keyframes lvLinha { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
.lv-li.eu { position: relative; overflow: hidden; box-shadow: 0 0 0 2px rgba(255, 210, 90, .6), 0 4px 14px rgba(200, 140, 30, .35); }
.lv-li.eu::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 240, .75) 50%, transparent 70%); translate: -120% 0; animation: lvBrilho 3.2s ease-in-out 1.2s infinite; pointer-events: none; }
@keyframes lvBrilho { 0% { translate: -120% 0; } 45%, 100% { translate: 120% 0; } }
.lv-cartao { position: relative; overflow: hidden; }
.lv-cartao::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 35%, rgba(255, 255, 240, .6) 50%, transparent 65%); translate: -120% 0; animation: lvBrilho 4s ease-in-out .9s infinite; pointer-events: none; }
@media (max-width: 560px) { .lv-trofeu { width: 70px; } .d1 .lv-trofeu { width: 88px; } .lv-quem .lv-ouro { font-size: 20px; } .d1 .lv-quem .lv-ouro { font-size: 24px; } .lv-bloco span { font-size: 34px; } .d1 .lv-bloco span { font-size: 44px; } .d1 .lv-bloco { height: 84px; } .d2 .lv-bloco { height: 62px; } .d3 .lv-bloco { height: 46px; } }
@media (prefers-reduced-motion: reduce) { .lv-podio.entra *, .lv-lista .lv-li, .lv-raios, .lv-li.eu::after, .lv-cartao::after { animation: none !important; } }

/* os pontos que voam da bola, com mais festa, e o placar do resumo, que conta e brilha */
.pts-pop b { color: transparent; -webkit-text-stroke: 0; background: linear-gradient(180deg, #fff8d2 0%, #ffd25a 40%, #e09a1c 65%, #a8620c 100%); -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(0 2px 0 #4a2206) drop-shadow(0 -2px 0 #4a2206) drop-shadow(2px 0 0 #4a2206) drop-shadow(-2px 0 0 #4a2206) drop-shadow(0 0 16px rgba(255, 200, 80, .9)); text-shadow: none; font-size: clamp(36px, 6vh, 56px); }
.pts-pop::before { content: ""; position: absolute; left: 50%; top: 40%; width: 150px; height: 150px; translate: -50% -50%; z-index: -1; border-radius: 50%;
  background: repeating-conic-gradient(rgba(255, 220, 120, .7) 0 8deg, transparent 8deg 22deg); -webkit-mask: radial-gradient(closest-side, #000 25%, transparent); mask: radial-gradient(closest-side, #000 25%, transparent); animation: lvGira 3s linear infinite; }
.pts-pop.grande b { font-size: clamp(44px, 7.5vh, 70px); }
.sp-num b { color: transparent; background: linear-gradient(180deg, #ffe58a 0%, #e8a92a 45%, #9a560c 100%); -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(0 1.5px 0 #3a1c06) drop-shadow(0 -1px 0 #3a1c06) drop-shadow(1px 0 0 #3a1c06) drop-shadow(-1px 0 0 #3a1c06) drop-shadow(0 0 10px rgba(255, 190, 60, .5)); }
.sp-conta span { animation: lvChip .38s cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: calc(var(--i, 0) * 90ms); }
.sp-conta span b { color: #8a4a0c; }
.sp-conta span.ja { animation: none; }
@keyframes lvChip { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
.sp-rec:not([hidden]) { animation: lvCai .6s cubic-bezier(.3, 1.6, .5, 1) both, lvPulsa 1.6s ease-in-out .6s infinite; }
@keyframes lvPulsa { 50% { box-shadow: 0 0 0 4px rgba(255, 210, 90, .35), 0 0 16px rgba(255, 200, 80, .7); } }
.sum-placar { position: relative; overflow: hidden; }
.sum-placar::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 35%, rgba(255, 255, 240, .55) 50%, transparent 65%); translate: -120% 0; animation: lvBrilho 4.5s ease-in-out 1.5s infinite; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .pts-pop::before, .sp-conta span, .sp-rec, .sum-placar::after { animation: none !important; } }

/* os números do placar: serifa grossa de cartaz antigo, legível e com cara de jogo (o Cinzel faz o 1 virar I) */
:root { --f-num: 'Alfa Slab One', 'Cinzel', serif; }
.lv-ouro, .lv-pts b, .pts-pop b, .sp-num b, .lv-bloco span { font-family: var(--f-num); font-weight: 400; letter-spacing: .01em; }
.lv-trofeu { width: 112px; } .d1 .lv-trofeu { width: 146px; }
.lv-quem .lv-ouro { font-size: 28px; } .d1 .lv-quem .lv-ouro { font-size: 36px; }
.lv-pts b { font-size: 20px; }
@media (max-width: 560px) { .lv-trofeu { width: 78px; } .d1 .lv-trofeu { width: 100px; } }

/* o achar mostra onde se procura: um anel dourado pulsando em volta do visor e a plaquinha "Procure aqui dentro" */
.acha-alvo { position: fixed; z-index: 61; pointer-events: none; border-radius: 50%; }
.acha-anel { position: absolute; inset: -10px; border-radius: 50%; border: 4px solid #ffd25a;
  box-shadow: 0 0 0 3px rgba(90, 40, 6, .55), 0 0 26px 6px rgba(255, 200, 80, .75), inset 0 0 26px 4px rgba(255, 200, 80, .5); animation: achaPulsa 1.1s ease-in-out infinite; }
.acha-anel::after { content: ""; position: absolute; inset: -14px; border-radius: 50%; border: 3px dashed rgba(255, 226, 140, .85); animation: lvGira 9s linear infinite; }
@keyframes achaPulsa { 0%, 100% { scale: 1; opacity: 1; } 50% { scale: 1.035; opacity: .75; } }
.acha-placa { position: absolute; left: 50%; top: -12px; translate: -50% -100%; padding: 8px 18px 9px; border-radius: 999px; white-space: nowrap;
  background: linear-gradient(180deg, #fff1c2, #e9c473 45%, #b07a24); color: #2a1406; font-family: var(--f-caps); font-size: clamp(14px, 1.5vw, 19px); font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 240, .9), 0 0 0 2px #6a3c0c, 0 6px 14px rgba(0, 0, 0, .5); animation: achaPlaca 3.8s ease-out both; }
.acha-placa::after { content: ""; position: absolute; left: 50%; bottom: -13px; translate: -50% 0; border: 8px solid transparent; border-top: 9px solid #6a3c0c; }
@keyframes achaPlaca { 0% { opacity: 0; translate: -50% -60%; } 10% { opacity: 1; translate: -50% -100%; } 20%, 32%, 44% { translate: -50% -112%; } 26%, 38%, 50% { translate: -50% -100%; } 85% { opacity: 1; } 100% { opacity: 0; } }
/* depois do começo, o anel fica aceso de leve, sem a plaquinha */
.acha-alvo.calmo .acha-anel { animation: none; opacity: .55; box-shadow: 0 0 0 2px rgba(90, 40, 6, .4), 0 0 16px 3px rgba(255, 200, 80, .45); }
.acha-alvo.calmo .acha-anel::after { opacity: .5; }
@media (prefers-reduced-motion: reduce) { .acha-anel, .acha-anel::after, .acha-placa { animation: none; } }

/* ---------- as peças em 3D do Livro (assets/livro, tools/build_livro.py): a placa, o pódio e a moeda ---------- */
/* a placa do título: o nome vai escrito na faixa creme do meio */
.modal-card.parch h2.lv-placa { position: relative; width: min(560px, 92%); aspect-ratio: 1308 / 478; margin: 0 auto 4px; padding: 0;
  background: url("../assets/livro/placa.webp") center / contain no-repeat; filter: drop-shadow(0 6px 8px rgba(40, 20, 6, .35)); animation: lvCai .7s cubic-bezier(.3, 1.5, .5, 1) both; }
.lv-placa span { position: absolute; left: 21%; right: 21%; top: 46%; height: 28%; display: grid; place-items: center; white-space: nowrap;
  font-family: var(--f-caps); font-weight: 700; font-size: clamp(16px, 2.4vw, 28px); letter-spacing: .06em; color: #3a1c06; text-shadow: 0 1px 0 rgba(255, 250, 230, .9); }
.lv-modal h2.lv-placa + .orn-div { display: none; }
.parch .lv-sub { margin-inline: auto; text-align: center; }
/* a moeda que gira ao lado dos pontos */
.lv-moeda { display: inline-block; width: 1.05em; height: auto; vertical-align: -.16em; margin-right: .22em; filter: drop-shadow(0 1px 1px rgba(40, 20, 6, .45)); animation: lvMoeda 3.2s ease-in-out infinite; }
@keyframes lvMoeda { 0%, 70%, 100% { transform: rotateY(0); } 82% { transform: rotateY(180deg); } 94% { transform: rotateY(360deg); } }
.lv-pts .lv-moeda { width: 20px; align-self: center; animation-delay: calc(var(--i, 0) * .25s); }
.lv-cartao-num { display: inline-flex; align-items: center; }
.lv-cartao-num .lv-moeda { width: 34px; }
.sp-linha { display: inline-flex; align-items: center; }
.sp-linha .lv-moeda { width: clamp(30px, 4vh, 40px); }
.pts-linha { display: inline-flex; align-items: center; gap: 4px; }
.pts-linha .lv-moeda { width: clamp(38px, 6vh, 56px); animation: lvMoedaVoa .9s ease-out both; }
@keyframes lvMoedaVoa { 0% { transform: rotateY(0) scale(.4); } 60% { transform: rotateY(540deg) scale(1.15); } 100% { transform: rotateY(720deg) scale(1); } }
/* o pódio de madeira e latão: a imagem é a base, e cada degrau põe o troféu no tampo da sua caixa e o número na frente */
.lv-podio { display: block; padding: clamp(170px, 24vw, 210px) 4px 0; margin: 4px 0 16px; }
.lv-podio-base { position: relative; width: 100%; aspect-ratio: 1163 / 488; }
.lv-podio-img { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 10px 12px rgba(40, 20, 6, .35)); }
.lv-podio .lv-degrau { position: absolute; top: 0; bottom: 0; display: block; }
.lv-podio .d2 { left: 0; width: 32%; } .lv-podio .d1 { left: 32%; width: 34%; } .lv-podio .d3 { left: 66%; width: 34%; }
.lv-cima { position: absolute; left: 0; right: 0; bottom: calc((1 - var(--topo) - .045) * 100%); display: grid; justify-items: center; }
.lv-podio .lv-trofeu { margin-bottom: 0; }
.lv-num { position: absolute; left: 50%; top: calc((var(--topo) + (.965 - var(--topo)) * .55) * 100%); translate: -50% -50%;
  font-family: var(--f-num); font-size: clamp(34px, 6vw, 64px); line-height: 1; color: transparent;
  background: linear-gradient(180deg, #fff1b8 0%, #e9b640 45%, #9a5a0c 100%); -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(0 2px 0 #2a1204) drop-shadow(0 -1px 0 #2a1204) drop-shadow(1px 0 0 #2a1204) drop-shadow(-1px 0 0 #2a1204) drop-shadow(0 0 10px rgba(255, 200, 80, .5)); }
.lv-podio .d1 .lv-num { font-size: clamp(44px, 8vw, 84px); }
.lv-podio .lv-degrau.eu .lv-num { filter: drop-shadow(0 2px 0 #2a1204) drop-shadow(0 -1px 0 #2a1204) drop-shadow(1px 0 0 #2a1204) drop-shadow(-1px 0 0 #2a1204) drop-shadow(0 0 16px rgba(255, 220, 120, .95)); }
.lv-podio.entra .lv-podio-img { animation: lvAparece .5s ease-out both; }
.lv-podio.entra .lv-num { animation: lvChip .45s cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: calc(.2s + var(--i) * .16s); }
.lv-podio.entra .lv-trofeu { animation: lvCai .6s cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: calc(.32s + var(--i) * .16s); }
.lv-podio.entra .lv-quem { animation: lvAparece .4s ease-out both; animation-delay: calc(.5s + var(--i) * .16s); }
@media (max-width: 560px) { .lv-podio { padding-top: 150px; } }
@media (prefers-reduced-motion: reduce) { .lv-moeda, .lv-placa, .lv-podio.entra .lv-podio-img, .lv-podio.entra .lv-num { animation: none !important; } }

/* os troféus em 3D (assets/livro/trofeu-N.webp): a medalha entra no disco liso do bojo */
.lv-podio .lv-trofeu { aspect-ratio: 639 / 601; }
.lv-trofeu-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 5px 5px rgba(40, 20, 6, .45)); }
.lv-trofeu .lv-med { top: 33.5%; width: 27%; height: auto; aspect-ratio: 1; translate: -50% -50%; box-shadow: inset 0 0 0 2px rgba(90, 50, 10, .6), 0 1px 3px rgba(40, 20, 6, .5); }
/* as linhas do 4º em diante: a faixa de latão com o soquete da medalha; o miolo se repete, para os rebites não esticarem */
.lv-lista .lv-li { --fx: 56px; position: relative; height: var(--fx); grid-template-columns: 30px 1fr auto; gap: 10px; padding: 0 6px 0 4px; border-radius: 0; background: none;
  border-style: solid; border-width: 0 calc(var(--fx) * .48) 0 calc(var(--fx) * 1.07); border-image: url("../assets/livro/faixa.webp") 0 9% 0 20% fill / 0 calc(var(--fx) * .48) 0 calc(var(--fx) * 1.07) round stretch; }
.lv-lista .lv-li:nth-child(odd) { background: none; }
.lv-lista .lv-li .lv-med { position: absolute; left: calc(var(--fx) * -1.07 + var(--fx) * .53); top: 50%; translate: -50% -50%; width: calc(var(--fx) * .6); height: calc(var(--fx) * .6); }
.lv-lista .lv-li.eu { border-color: transparent; background: none; box-shadow: none; filter: drop-shadow(0 0 6px rgba(255, 200, 80, .85)); }
.lv-lista .lv-li.eu::after { left: 0; right: 0; }
.lv-lista .lv-pos { width: auto; height: auto; font-family: var(--f-num); font-weight: 400; font-size: 18px; color: #8a5a1c; }
@media (max-width: 560px) { .lv-lista .lv-li { --fx: 48px; grid-template-columns: 24px 1fr auto; gap: 6px; } }

/* os troféus em 3D merecem tamanho de prêmio */
.lv-podio { padding-top: clamp(230px, 30vw, 280px); }
.lv-podio .lv-trofeu { width: clamp(110px, 17vw, 165px); }
.lv-podio .d1 .lv-trofeu { width: clamp(140px, 22vw, 210px); }
@media (max-width: 560px) { .lv-podio { padding-top: 190px; } }

/* ---------- o Livro na horizontal: pódio grande à esquerda, sempre à vista; seu lugar, abas e lista à direita ---------- */
/* o pódio é medido pela largura dele mesmo (cqw): troféus, nomes, pontos e números crescem juntos */
.lv-podio { container-type: inline-size; padding: 0; margin: 0 auto; }
.lv-podio .lv-podio-base { margin-top: 52cqw; }
.lv-podio .lv-trofeu { width: 24cqw; }
.lv-podio .d1 .lv-trofeu { width: 30cqw; }
.lv-podio .lv-quem b { font-size: clamp(11px, 2.5cqw, 17px); }
.lv-podio .lv-quem .lv-ouro { font-size: 4.6cqw; }
.lv-podio .d1 .lv-quem .lv-ouro { font-size: 5.8cqw; }
.lv-podio .lv-num { font-size: 8.5cqw; }
.lv-podio .d1 .lv-num { font-size: 11cqw; }
/* o troféu assenta perto da borda da frente do tampo da caixa, não no fundo dela */
.lv-cima { bottom: calc((1 - var(--topo) - .1) * 100%); }
.lv-podio .d1 .lv-cima { bottom: calc((1 - var(--topo) - .115) * 100%); }

@media (min-width: 700px) and (orientation: landscape) {
  .modal.lv-livro .modal-card { width: min(1280px, 96vw); height: min(90vh, 860px); }
  .lv-livro .parch-scroll { display: flex; flex-direction: column; overflow: hidden; inset: 6% 5.5% 7% 5.5%; }
  .modal-card.parch .lv-livro h2.lv-placa, .lv-livro .modal-card.parch h2.lv-placa { flex: none; width: auto; height: clamp(84px, 15vh, 150px); margin: 0 auto 6px; }
  .lv-corpo { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(18px, 3vw, 44px); }
  .lv-esq { display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 0; }
  /* a altura que sobra embaixo da placa decide a largura do pódio (o pódio inteiro tem 94% da própria largura de altura) */
  .lv-esq .lv-podio { width: min(100%, calc((min(90vh, 860px) * .87 - clamp(84px, 15vh, 150px) - 90px) / .94)); }
  .parch .lv-esq .lv-sub { margin: 14px auto 0; max-width: 46ch; font-size: clamp(14px, 1.15vw, 17px); }
  .lv-dir { display: flex; flex-direction: column; min-height: 0; }
  .lv-dir .tabs { flex: none; margin: 12px 0 10px; }
  .lv-dir .lv-regioes { flex: none; margin: 0 0 10px; }
  .lv-rola { flex: 1; min-height: 0; overflow-y: auto; padding: 2px 6px 6px 2px; scrollbar-width: thin; scrollbar-color: rgba(90, 58, 20, .5) transparent; }
}

/* o título acompanha o tamanho da placa: sempre dentro da faixa creme */
.modal-card.parch h2.lv-placa { container-type: inline-size; }
.lv-placa span { font-size: 4.8cqw; letter-spacing: .04em; }

/* no pódio o nome quebra em duas linhas em vez de virar reticências; no celular o seu cartão não se parte */
.lv-podio .lv-quem b { white-space: normal; overflow: visible; line-height: 1.1; text-wrap: balance; }
@media (max-width: 560px) {
  .lv-cartao { flex-wrap: nowrap; gap: 12px; padding: 12px; }
  .lv-cartao .lv-med.grande { width: 46px; height: 46px; }
  .lv-cartao-txt b { font-size: 16px; }
  .lv-cartao-txt span { font-size: 14px; }
  .lv-cartao-num .lv-moeda { width: 24px; }
  .lv-cartao-pts b.lv-ouro { font-size: 28px; }
}

.lv-dica, .lv-cartao-txt span { text-wrap: pretty; }
@media (max-width: 560px) {
  .lv-cartao { flex-wrap: wrap; }
  .lv-cartao-txt { flex: 1 1 calc(100% - 60px); }
  .lv-cartao-pts { flex: 1 0 100%; display: flex; align-items: baseline; justify-content: flex-start; gap: 6px; padding-left: 58px; }
}

@media (max-width: 560px) {
  .lv-lista .lv-li { --fx: 44px; grid-template-columns: 18px 1fr auto; gap: 4px; padding: 0 2px; }
  .lv-lista .lv-pts .lv-moeda { display: none; }
  .lv-lista .lv-pts { font-size: 0; }
  .lv-lista .lv-pts b { font-size: 15px; }
  .lv-lista .lv-pos { font-size: 14px; }
  .lv-lista .lv-nome b { font-size: 13px; }
  .lv-lista .lv-nome small { font-size: 12px; }
}

/* celular deitado: pouca altura, então a placa encolhe e o texto de baixo do pódio sai */
@media (orientation: landscape) and (max-height: 520px) and (min-width: 700px) {
  .lv-livro .parch-scroll { inset: 7% 5% 7% 5%; }
  .lv-livro .modal-card.parch h2.lv-placa { height: 50px; margin-bottom: 2px; }
  .parch .lv-esq .lv-sub { display: none; }
  .lv-esq .lv-podio { width: min(100%, calc((min(90vh, 860px) * .86 - 50px - 16px) / .94)); }
  .lv-dir .tabs { margin: 6px 0 4px; }
  .lv-dir .tabs button { min-height: 30px; font-size: 11px; }
  .lv-cartao { padding: 6px 10px; gap: 10px; }
  .lv-cartao .lv-med.grande { width: 38px; height: 38px; }
  .lv-cartao-txt b { font-size: 14px; } .lv-cartao-txt span { font-size: 12px; } .lv-cartao-txt .lv-dica { display: none; }
  .lv-cartao-pts b.lv-ouro { font-size: 24px; } .lv-cartao-num .lv-moeda { width: 20px; }
  .lv-lista .lv-li { --fx: 40px; }
  .lv-lista .lv-nome b { font-size: 12px; } .lv-lista .lv-nome small { display: none; }
  .lv-lista .lv-pts b { font-size: 14px; }
}

@media (orientation: landscape) and (max-height: 520px) and (min-width: 700px) {
  .lv-lista .lv-pts .lv-moeda { display: none; }
  .lv-lista .lv-pts { font-size: 0; }
  .lv-lista .lv-li { grid-template-columns: 18px 1fr auto; gap: 4px; padding: 0 2px; }
  .lv-lista .lv-pos { font-size: 13px; }
}

/* entre as duas setas, o "e" fica minúsculo e pequeno */
.qte-label .qte-e { text-transform: none; letter-spacing: 0; margin: 0 2px; }

/* a placa no alto da coluna do pódio */
@media (min-width: 700px) and (orientation: landscape) {
  .lv-esq { justify-content: space-between; }
  .lv-livro .modal-card.parch .lv-esq h2.lv-placa { height: clamp(80px, 14vh, 140px); margin: 0 auto 4px; }
  .lv-esq .lv-podio { width: min(100%, calc((min(90vh, 860px) * .87 - clamp(80px, 14vh, 140px) - 150px) / .94)); }
}
@media (orientation: landscape) and (max-height: 520px) and (min-width: 700px) {
  .lv-livro .modal-card.parch .lv-esq h2.lv-placa { height: 46px; }
  .lv-esq .lv-podio { width: min(100%, calc((min(90vh, 860px) * .86 - 46px - 16px) / .94)); }
}

/* ---------- o que espera o jogador chama a atenção (js/game/chama.js) ---------- */
/* o Seguir pula de leve e brilha; o Começar a viagem pula mais e tem um halo dourado pulsando */
#game .g-next.pbt { position: relative; isolation: isolate; animation: gNextEntra .55s cubic-bezier(.2, 1.4, .4, 1) both, gNextPula 2.4s cubic-bezier(.3, 1.6, .5, 1) 1s infinite; }
#game .g-next.pbt.pbt::before { content: ""; position: absolute; inset: -10px -14px; z-index: -1; border-radius: 999px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 214, 110, .7), rgba(255, 214, 110, 0)); animation: gNextHalo 2.4s ease-in-out 1s infinite; }
@keyframes gNextPula { 0%, 62%, 100% { transform: translateY(0) scale(1); } 70% { transform: translateY(-7px) scale(1.05); } 78% { transform: translateY(0) scale(.98, 1.02); } 86% { transform: translateY(-3px) scale(1.02); } }
@keyframes gNextHalo { 0%, 55%, 100% { opacity: .15; scale: .9; } 72% { opacity: 1; scale: 1.08; } }
#game .g-next.g-start.pbt { --bh: clamp(56px, 7.6vh, 70px); animation: gNextEntra .6s cubic-bezier(.2, 1.4, .4, 1) both, gStartPula 1.6s cubic-bezier(.3, 1.6, .5, 1) .7s infinite; }
#game .g-next.g-start.pbt.pbt::before { inset: -18px -24px; background: radial-gradient(closest-side, rgba(255, 220, 120, .95), rgba(255, 190, 70, .35) 60%, rgba(255, 190, 70, 0)); animation: gNextHalo 1.6s ease-in-out .7s infinite; }
@keyframes gStartPula { 0%, 45%, 100% { transform: translateY(0) scale(1); filter: var(--sombra-bt) brightness(1); } 58% { transform: translateY(-12px) scale(1.09); filter: var(--sombra-bt-sobe) brightness(1.18); } 70% { transform: translateY(0) scale(1.03, .96); } 80% { transform: translateY(-4px) scale(1.03); } 90% { transform: translateY(0) scale(1); } }
#game .g-next.pbt:hover { animation-play-state: paused; }
/* as escolhas: depois de alguns segundos, uma de cada vez acende, como quem diz "escolha" */
/* a animação de chamar toma o lugar da de entrada: a escolha fica no estado final dela, à vista */
.choices.chama .choice:not(.gone) { opacity: 1; transform: none; animation: choiceChama 2.8s ease-in-out infinite; animation-delay: calc(var(--d, 0s) * 6); }
@keyframes choiceChama { 0%, 70%, 100% { filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .45)); translate: 0 0; } 80% { filter: drop-shadow(0 12px 14px rgba(0, 0, 0, .5)) drop-shadow(0 0 16px rgba(255, 214, 110, .9)); translate: 0 -5px; } }
.choices.chama .choice:hover, .choices.chama .choice:focus-visible { animation: none; }
@media (prefers-reduced-motion: reduce) { #game .g-next.pbt, #game .g-next.pbt.pbt::before, .choices.chama .choice { animation: none; } }

/* o Ybytu que aparece no canto quando a pessoa fica parada */
.yb-chama { position: fixed; left: clamp(8px, 2vw, 28px); bottom: 0; z-index: 90; display: flex; align-items: flex-end; gap: 0; pointer-events: none; animation: ybChamaEntra .7s cubic-bezier(.2, 1.4, .4, 1) both; }
.yb-chama.sai { animation: ybChamaSai .4s ease-in both; }
.yb-chama-img { width: clamp(130px, 21vh, 230px); height: auto; margin-bottom: -2vh; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .6)); transform-origin: 50% 100%; animation: ybChamaBalanca 2.2s ease-in-out .7s infinite; }
.yb-chama-balao { position: relative; pointer-events: auto; margin: 0 0 clamp(70px, 11vh, 120px) -6px; max-width: min(340px, 70vw); padding: 14px 18px 16px; border-radius: 16px;
  background: linear-gradient(180deg, #fff6e0, #f0dcb0); border: 2px solid #8a5a1c; box-shadow: 0 10px 24px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .8); color: #2a160c; }
.yb-chama-balao::before { content: ""; position: absolute; left: -12px; bottom: 22px; border: 10px solid transparent; border-right: 13px solid #8a5a1c; border-left: 0; }
.yb-chama-balao::after { content: ""; position: absolute; left: -8px; bottom: 24px; border: 8px solid transparent; border-right: 10px solid #f6e8c8; border-left: 0; }
.yb-chama-balao p { margin: 0 0 12px; font-family: var(--f-text); font-size: 19px; font-weight: 600; line-height: 1.3; text-wrap: balance; }
.yb-chama-bts { display: flex; flex-wrap: wrap; gap: 8px; }
.yb-chama-bts .pbt { --bh: 42px; min-width: 0; padding: 0 14px 2px; font-size: 13px; letter-spacing: .08em; }
@keyframes ybChamaEntra { from { opacity: 0; transform: translateX(-60%) translateY(20%); } to { opacity: 1; transform: none; } }
@keyframes ybChamaSai { to { opacity: 0; transform: translateX(-40%) translateY(10%); } }
@keyframes ybChamaBalanca { 0%, 100% { rotate: -3deg; } 50% { rotate: 3deg; translate: 0 -5px; } }
@media (max-height: 520px) { .yb-chama-img { width: 96px; } .yb-chama-balao { margin-bottom: 50px; padding: 10px 14px 12px; } .yb-chama-balao p { font-size: 15px; margin-bottom: 8px; } .yb-chama-bts .pbt { --bh: 34px; font-size: 11px; } }
@media (prefers-reduced-motion: reduce) { .yb-chama, .yb-chama-img { animation: none; } }

/* ---------- o contador de pontos de memórias, no cabeçalho ao lado do título ---------- */
.g-pts { position: relative; display: inline-flex; align-items: center; gap: 8px; margin-left: 6px; padding: 4px 16px 4px 6px; border-radius: 999px; cursor: pointer; align-self: center;
  border: 2px solid #8a5a1c; background: linear-gradient(180deg, rgba(60, 32, 10, .88), rgba(30, 14, 4, .9)); box-shadow: inset 0 1px 0 rgba(255, 226, 150, .45), 0 0 0 1px rgba(0, 0, 0, .5), 0 4px 10px rgba(0, 0, 0, .5);
  transition: transform .15s, box-shadow .2s; }
.g-pts:hover, .g-pts:focus-visible { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255, 226, 150, .55), 0 0 0 1px rgba(0, 0, 0, .5), 0 0 16px rgba(255, 200, 80, .6); outline: none; }
.g-pts-moeda { display: grid; place-items: center; width: clamp(30px, 3.2vh, 40px); }
.g-pts-moeda .lv-moeda { width: 100%; margin: 0; vertical-align: 0; }
.g-pts-txt { display: grid; justify-items: start; line-height: 1; }
.g-pts-n { font-size: clamp(20px, 2.6vh, 28px); }
.g-pts-txt small { margin-top: 2px; font-family: var(--f-caps); font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #f0c878; white-space: nowrap; }
/* quando os pontos chegam: o contador incha, acende e a moeda gira */
.g-pts.ganhou { animation: gPtsGanha .9s cubic-bezier(.3, 1.6, .5, 1); }
.g-pts.ganhou .g-pts-moeda .lv-moeda { animation: lvMoedaVoa .9s ease-out; }
.g-pts::after { content: ""; position: absolute; inset: -6px; border-radius: inherit; pointer-events: none; opacity: 0; box-shadow: 0 0 22px 6px rgba(255, 210, 90, .85); }
.g-pts.ganhou::after { animation: gPtsHalo .9s ease-out; }
@keyframes gPtsGanha { 0% { transform: scale(1); } 30% { transform: scale(1.18) rotate(-2deg); } 60% { transform: scale(.97); } 100% { transform: scale(1); } }
@keyframes gPtsHalo { 0% { opacity: 0; } 25% { opacity: 1; } 100% { opacity: 0; } }
/* a moeda que voa da bola até ele */
.pts-voa { position: fixed; z-index: 67; width: clamp(34px, 4.4vh, 48px); pointer-events: none; filter: drop-shadow(0 0 10px rgba(255, 210, 90, .9)); }
.pts-voa .lv-moeda { width: 100%; margin: 0; animation: none; }
@media (max-width: 900px) and (orientation: portrait), (orientation: landscape) and (max-height: 520px) { .g-pts-txt small { display: none; } .g-pts { padding: 3px 10px 3px 4px; } }
@media (prefers-reduced-motion: reduce) { .g-pts.ganhou, .g-pts.ganhou::after, .g-pts.ganhou .g-pts-moeda .lv-moeda { animation: none; } }

/* ---------- o quebra-cabeça da paisagem: prévia, miniatura do objetivo, pedaço escolhido aceso e o certo preso ---------- */
.monta-caixa { position: relative; display: grid; justify-items: center; gap: 8px; }
.monta-aviso { margin: 0; font-family: var(--f-caps); font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #6e3f0c; }
.monta-aviso.vai { animation: lvChip .45s cubic-bezier(.3, 1.6, .5, 1); }
.monta { width: min(420px, 78vw); gap: 4px; padding: 4px; border-radius: 6px; background: #3a2214; box-shadow: inset 0 2px 6px rgba(0, 0, 0, .6); }
.monta button { position: relative; min-height: 0; aspect-ratio: auto; border: 0; border-radius: 3px; background-repeat: no-repeat; transition: transform .2s cubic-bezier(.3, 1.5, .5, 1), filter .2s, box-shadow .2s; }
.monta.mistura button { animation: montaGira .45s cubic-bezier(.3, 1.4, .5, 1) both; }
@keyframes montaGira { from { transform: rotateY(90deg) scale(.8); } to { transform: none; } }
.monta button:not(.certo):hover { transform: translateY(-2px); filter: brightness(1.1); }
/* o escolhido levanta, acende e pulsa: falta tocar no outro */
.monta button.sel { z-index: 2; transform: translateY(-4px) scale(1.06); box-shadow: 0 0 0 3px #ffd25a, 0 0 18px 4px rgba(255, 200, 80, .85); animation: montaSel 1s ease-in-out infinite; }
@keyframes montaSel { 50% { box-shadow: 0 0 0 3px #fff1b8, 0 0 26px 8px rgba(255, 210, 90, 1); } }
/* o certo fica preso: moldura dourada e um selo de visto */
.monta.mistura button.certo { cursor: default; box-shadow: inset 0 0 0 3px #ffd25a, 0 0 10px rgba(255, 200, 80, .6); animation: none; }
.monta button.certo::after { content: ""; position: absolute; right: 5px; top: 5px; width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff1c2, #e0a83a 60%, #8a5a1c);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.monta button.certo::before { content: ""; position: absolute; right: 11px; top: 8px; z-index: 1; width: 5px; height: 9px; border: solid #3a2206; border-width: 0 2.5px 2.5px 0; rotate: 42deg; }
.monta button.acabou { animation: montaAcabou .6s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes montaAcabou { 0% { transform: scale(1); } 40% { transform: scale(1.12); filter: brightness(1.35); } 100% { transform: none; } }
/* a miniatura do objetivo, no canto */
.monta-mini { position: absolute; right: -6px; bottom: -6px; z-index: 3; margin: 0; padding: 4px 4px 2px; border-radius: 6px; background: #f3e6d0; border: 2px solid #8a5a1c; box-shadow: 0 4px 10px rgba(0, 0, 0, .45);
  display: grid; justify-items: center; gap: 1px; animation: lvChip .45s cubic-bezier(.3, 1.6, .5, 1); }
.monta-mini[hidden] { display: none; }
.monta-mini span { display: block; width: 92px; background-repeat: no-repeat; border-radius: 3px; }
.monta-mini figcaption { font-family: var(--f-caps); font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #6e3f0c; }
@media (orientation: landscape) and (max-height: 520px) { .monta { width: 52vh; } .monta-mini span { width: 64px; } }
@media (prefers-reduced-motion: reduce) { .monta.mistura button, .monta button.sel, .monta button.acabou, .monta-aviso.vai, .monta-mini { animation: none; } }

.monta { width: min(330px, 68vw); }
.monta-caixa { padding-top: 4px; }
.monta-mini { right: auto; left: calc(100% + 8px); bottom: auto; top: 22px; }
.monta-mini span { width: 78px; }
@media (max-width: 900px), (orientation: landscape) and (max-height: 520px) { .monta-mini { left: auto; right: -4px; top: -6px; } .monta-mini span { width: 56px; } }

/* ---------- a data importante: grande sobre o portal, depois voa até o ano do diário ---------- */
.data-grande { position: fixed; z-index: 66; display: grid; justify-items: center; gap: 2px; pointer-events: none; transform: translate(-50%, -50%); animation: dataEntra .7s cubic-bezier(.2, 1.5, .4, 1) both; }
.data-grande b { font-family: var(--f-num); font-weight: 400; font-size: clamp(70px, 14vh, 150px); line-height: .9; color: transparent; letter-spacing: .02em;
  background: linear-gradient(180deg, #fff8d2 0%, #ffd25a 40%, #e09a1c 65%, #a8620c 100%); -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(0 3px 0 #3a1806) drop-shadow(0 -2px 0 #3a1806) drop-shadow(3px 0 0 #3a1806) drop-shadow(-3px 0 0 #3a1806) drop-shadow(0 0 30px rgba(255, 200, 80, .9)); }
.data-grande small { padding: 3px 14px 4px; border-radius: 99px; background: rgba(30, 14, 4, .85); border: 1.5px solid #8a5a1c; color: #ffe8b0; font-family: var(--f-caps); font-size: clamp(13px, 1.9vh, 18px); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.data-grande::before { content: ""; position: absolute; left: 50%; top: 42%; width: 150%; aspect-ratio: 1; translate: -50% -50%; z-index: -1; border-radius: 50%;
  background: repeating-conic-gradient(rgba(255, 220, 120, .45) 0 8deg, transparent 8deg 22deg); -webkit-mask: radial-gradient(closest-side, #000 25%, transparent); mask: radial-gradient(closest-side, #000 25%, transparent); animation: lvGira 6s linear infinite; }
@keyframes dataEntra { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.3) rotate(-12deg); } 60% { opacity: 1; transform: translate(-50%, -50%) scale(1.12) rotate(2deg); } 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
.g-year.chegou { animation: anoChega .7s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes anoChega { 0% { transform: scale(1); } 35% { transform: scale(1.35); color: #c46a10; text-shadow: 0 0 14px rgba(255, 200, 80, .9); } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) { .data-grande, .data-grande::before, .g-year.chegou { animation: none; } }

/* ---------- ouça e repita: as notas 3D da abertura (assets/botoes/canto-*), acesas quando soam ou são tocadas ---------- */
.ouve-fase { margin: 0 0 2px; font-family: var(--f-caps); font-size: 14px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #6e3f0c; text-align: center; }
.ouve-fase.vez { color: #2a6a1c; animation: lvChip .5s cubic-bezier(.3, 1.6, .5, 1); }
.ouve-conta { min-height: 1.2em; margin: 4px 0 0; font-size: 15px; font-style: italic; color: #4a2c18; text-align: center; }
.ouve { gap: 14px; width: min(380px, 80vw); }
.ouve button { position: relative; aspect-ratio: 1; min-height: 0; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; transition: transform .15s cubic-bezier(.3, 1.6, .5, 1); }
.ouve button:nth-child(n) { background: none; }
.ouve button img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 4px 4px rgba(40, 20, 6, .45)); }
.ouve button .ouve-on { opacity: 0; transition: opacity .12s; filter: drop-shadow(0 0 14px rgba(255, 230, 150, .95)) drop-shadow(0 4px 4px rgba(40, 20, 6, .4)); }
.ouve button.on { transform: scale(1.12); filter: none; }
.ouve button.on .ouve-on { opacity: 1; }
.ouve button:disabled { opacity: 1; cursor: default; }
.qte.ouvindo .ouve button:not(.on) { filter: saturate(.7) brightness(.9); }
.ouve button:not(:disabled):hover { transform: translateY(-3px) scale(1.04); }
.ouve button kbd { position: absolute; right: -2px; bottom: -2px; z-index: 1; min-width: 22px; padding: 1px 6px 2px; border-radius: 6px; background: #f3e6d0; border: 1.5px solid #8a5a1c; color: #3a2214; font-family: var(--f-caps); font-size: 12px; font-weight: 700; box-shadow: 0 2px 3px rgba(0, 0, 0, .35); }
@media (orientation: landscape) and (max-height: 520px) { .ouve { width: 48vh; gap: 8px; } }
@media (prefers-reduced-motion: reduce) { .ouve-fase.vez { animation: none; } }

/* a data que o guia diz: aparece sobre o portal na hora da palavra e voa para o diário */
.data-fala { position: fixed; z-index: 65; pointer-events: none; transform: translate(-50%, -50%); animation: dataEntra .6s cubic-bezier(.2, 1.5, .4, 1) both; }
.data-fala b { display: block; padding: 6px 18px 8px; border-radius: 14px; white-space: nowrap; background: rgba(30, 14, 4, .82); border: 2px solid #c18a34;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, .4), 0 0 24px rgba(255, 200, 80, .55); font-family: var(--f-num); font-weight: 400; font-size: clamp(26px, 4.6vh, 46px); line-height: 1; color: #ffe08a; text-shadow: 0 2px 0 #3a1806, 0 0 14px rgba(255, 200, 80, .8); }
.g-dest-tit.chegou, .g-stats.chegou { animation: anoChega .7s cubic-bezier(.3, 1.6, .5, 1); }
@media (prefers-reduced-motion: reduce) { .data-fala { animation: none; } }

/* a pergunta (da prova ou de qualquer escolha) nunca fica direto sobre o túnel: vai numa placa de papel, com texto escuro */
#hud .g-q { position: relative; justify-self: center; margin: 0 auto 10px; max-width: min(58ch, 92vw); padding: 14px 26px 16px; border-radius: 10px; color: #2a160c; text-shadow: none;
  font-family: var(--f-text); font-weight: 700; font-size: clamp(18px, 2.3vh, 23px); line-height: 1.3; text-wrap: balance;
  background: linear-gradient(180deg, #fbf1dc, #ecd8ae); border: 2px solid #8a5a1c; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), inset 0 0 0 4px rgba(255, 246, 222, .5), 0 8px 20px rgba(0, 0, 0, .55);
  animation: lvChip .45s cubic-bezier(.3, 1.5, .5, 1); }
#hud .g-q::before, #hud .g-q::after { content: ""; position: absolute; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff1c2, #c18a34 60%, #6a3c0c); }
#hud .g-q::before { left: 9px; } #hud .g-q::after { right: 9px; }
@media (orientation: landscape) and (max-height: 520px) { #hud .g-q { font-size: 15px; padding: 8px 18px 10px; } }
@media (prefers-reduced-motion: reduce) { #hud .g-q { animation: none; } }

/* o Ybytu comemorando um acerto, no canto de baixo à direita */
.yb-viva { position: fixed; right: clamp(8px, 2vw, 30px); bottom: 0; z-index: 95; display: flex; align-items: flex-end; flex-direction: row-reverse; pointer-events: none; animation: ybVivaEntra .55s cubic-bezier(.2, 1.5, .4, 1) both; }
.yb-viva.sai { animation: ybVivaSai .45s ease-in both; }
.yb-viva img { width: clamp(130px, 22vh, 240px); margin-bottom: -2vh; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .6)); transform-origin: 50% 100%; animation: ybVivaPula .5s ease-in-out .5s 3; }
.yb-viva p { margin: 0 -10px clamp(90px, 15vh, 160px) 0; padding: 10px 18px 12px; border-radius: 16px; background: linear-gradient(180deg, #fff6e0, #f0dcb0); border: 2px solid #8a5a1c;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .5); font-family: var(--f-caps); font-size: clamp(15px, 2vh, 20px); font-weight: 700; color: #2a6a1c; white-space: nowrap; }
@keyframes ybVivaEntra { from { opacity: 0; transform: translateX(50%) translateY(30%) rotate(10deg); } to { opacity: 1; transform: none; } }
@keyframes ybVivaSai { to { opacity: 0; transform: translateX(40%) translateY(20%); } }
@keyframes ybVivaPula { 50% { transform: translateY(-14px) rotate(-3deg); } }
@media (prefers-reduced-motion: reduce) { .yb-viva, .yb-viva img { animation: none; } }

/* ---------- o contador de pontos de memórias: embaixo do título, alinhado à esquerda, sem tag ----------
   só a moeda animada, o número e "pontos de memórias"; a tag de latão aparece só na hora em que os pontos chegam */
.g-top .g-brand { flex-wrap: wrap; row-gap: 2px; align-self: start; }
.g-top .g-pts { flex: 0 0 100%; justify-content: flex-start; width: max-content; max-width: max-content; margin: 0; padding: 2px 12px 2px 0;
  border-color: transparent; background: none; box-shadow: none; transition: transform .15s, background-color .3s; }
.g-top .g-pts:hover, .g-top .g-pts:focus-visible { box-shadow: none; transform: translateY(-1px); }
.g-top .g-pts:hover .g-pts-txt small, .g-top .g-pts:focus-visible .g-pts-txt small { color: #fff3d6; }
.g-top .g-pts-moeda { width: clamp(28px, 3vh, 36px); }
.g-top .g-pts-moeda .lv-moeda { animation: lvMoeda 3.2s ease-in-out infinite; }
.g-top .g-pts-txt { display: flex; align-items: baseline; gap: 8px; }
.g-top .g-pts-n { font-size: clamp(20px, 2.5vh, 27px); }
.g-top .g-pts-txt small { margin: 0; font-size: 11px; color: #f0c878; text-shadow: 0 1px 2px #000, 0 0 10px rgba(0, 0, 0, .9); }
.g-top .g-pts::after { inset: -4px -8px -4px -6px; }
/* a conquista: a tag de latão acende por um instante, junto com o halo, e volta a sumir */
.g-top .g-pts.ganhou { animation: gPtsGanha .9s cubic-bezier(.3, 1.6, .5, 1), gPtsTag 1.6s ease-out; }
@keyframes gPtsTag {
  0% { background: none; border-color: transparent; box-shadow: none; }
  15%, 65% { background: linear-gradient(180deg, rgba(60, 32, 10, .9), rgba(30, 14, 4, .92)); border-color: #8a5a1c; box-shadow: inset 0 1px 0 rgba(255, 226, 150, .45), 0 4px 10px rgba(0, 0, 0, .5); padding-left: 6px; }
  100% { background: none; border-color: transparent; box-shadow: none; } }
@media (prefers-reduced-motion: reduce) { .g-top .g-pts.ganhou, .g-top .g-pts-moeda .lv-moeda { animation: none; } }

.g-top .g-brand { display: grid; grid-template-columns: auto auto; justify-content: start; align-items: baseline; column-gap: 12px; row-gap: 0; }
.g-top .g-pts { grid-column: 1 / -1; justify-self: start; flex: none; }

/* arrastar os pedaços: o fantasma segue o ponteiro, o lugar de onde ele saiu fica vazio, e o alvo acende */
.monta { touch-action: none; user-select: none; }
.monta button { cursor: grab; }
.monta button.certo { cursor: default; }
.monta button.saiu { opacity: .25; filter: grayscale(.6); }
.monta button.sobre { z-index: 2; transform: scale(1.06); box-shadow: 0 0 0 3px #ffd25a, 0 0 18px 4px rgba(255, 200, 80, .8); }
.monta-fantasma { position: fixed; z-index: 120; padding: 0; border: 0; border-radius: 4px; pointer-events: none; cursor: grabbing; background-repeat: no-repeat;
  transform: rotate(-3deg) scale(1.08); box-shadow: 0 0 0 3px #ffd25a, 0 14px 26px rgba(0, 0, 0, .55); }

/* ---------- as demonstrações das dinâmicas com as peças 3D do jogo (nada de caixinha chapada) ---------- */
/* memória e palpite: as cartas de verdade, uma por vez vira e mostra o objeto */
.din-cartas { display: flex; justify-content: center; gap: 10px; perspective: 600px; }
.din-carta { position: relative; width: 58px; height: 76px; transform-style: preserve-3d; animation: dinVira 4s ease-in-out infinite; animation-delay: calc(var(--i) * 1s); }
.din-carta .mem-verso, .din-carta .din-face { position: absolute; inset: 0; border-radius: 8px; backface-visibility: hidden; box-shadow: 0 5px 10px rgba(50, 26, 8, .4); }
.din-carta .mem-verso::after { inset: 6px; }
.din-carta .din-face { display: grid; place-items: center; transform: rotateY(180deg); background: linear-gradient(180deg, #fbf1dc, #ecd8ae); border: 2px solid #8a5a1c; }
.din-carta .din-face img { width: 80%; height: 80%; object-fit: contain; }
@keyframes dinVira { 0%, 8%, 42%, 100% { transform: none; } 16%, 34% { transform: rotateY(180deg) translateY(-4px); } }
/* achar: o visor da máquina com a paisagem, e os objetos escondidos acendendo um a um */
.din-acha2 { position: relative; width: 150px; aspect-ratio: 1; }
.din-visor { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; box-shadow: inset 0 0 0 5px #c18a34, inset 0 0 0 8px #6a3c0c, 0 6px 12px rgba(40, 20, 6, .45); }
.din-visor img { width: 100%; height: 100%; object-fit: cover; filter: sepia(.25) saturate(.9); }
.din-acha2 .din-obj { position: absolute; width: 30%; filter: brightness(.8) drop-shadow(0 2px 2px rgba(0, 0, 0, .5)); opacity: .75; animation: dinAcha 3.6s ease-in-out infinite; animation-delay: calc(var(--i) * 1.2s); }
.din-acha2 .din-obj:nth-of-type(1) { left: 14%; top: 20%; } .din-acha2 .din-obj:nth-of-type(2) { left: 56%; top: 28%; } .din-acha2 .din-obj:nth-of-type(3) { left: 34%; top: 56%; }
.din-visor::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 0 5px #c18a34, inset 0 0 0 8px #6a3c0c, inset 0 0 18px rgba(0, 0, 0, .45); pointer-events: none; }
.din-acha2 .din-obj { z-index: 1; }
@keyframes dinAcha { 0%, 18%, 100% { transform: none; opacity: .75; filter: brightness(.8); } 8% { transform: scale(1.35) translateY(-6px); opacity: 1; filter: brightness(1.2) drop-shadow(0 0 10px #ffd25a); } }
/* montar: três pedaços de verdade da paisagem; o do meio e o da ponta trocam de lugar */
.din-monta2 { display: grid; grid-template-columns: repeat(3, 64px); gap: 4px; padding: 4px; border-radius: 6px; background: #3a2214; box-shadow: inset 0 2px 6px rgba(0, 0, 0, .6); }
.din-monta2 span { height: 48px; border-radius: 3px; background: url("../assets/cenas/bandadalem.webp") 0 0 / 300% 230% no-repeat; }
.din-monta2 span:nth-child(2) { animation: dinTrocaA 3.2s ease-in-out infinite; z-index: 1; }
.din-monta2 span:nth-child(3) { animation: dinTrocaB 3.2s ease-in-out infinite; }
@keyframes dinTrocaA { 0%, 25% { transform: none; box-shadow: none; } 35% { transform: translateY(-10px) scale(1.06); box-shadow: 0 0 0 3px #ffd25a; } 55%, 70% { transform: translateX(68px); box-shadow: 0 0 0 3px #ffd25a; } 85%, 100% { transform: none; box-shadow: none; } }
@keyframes dinTrocaB { 0%, 40% { transform: none; } 55%, 70% { transform: translateX(-68px); } 85%, 100% { transform: none; } }
/* ouvido: as notas 3D, acendendo uma por vez */
.din-ouve2 { display: flex; justify-content: center; gap: 10px; }
.din-ouve2 span { position: relative; width: 54px; aspect-ratio: 1; animation: dinNota 2.6s ease-in-out infinite; animation-delay: calc(var(--i) * .55s); }
.din-ouve2 img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 3px 3px rgba(40, 20, 6, .4)); }
.din-ouve2 img.on { opacity: 0; animation: dinNotaOn 2.6s ease-in-out infinite; animation-delay: inherit; }
@keyframes dinNota { 0%, 22%, 100% { transform: none; } 9% { transform: scale(1.14); } }
@keyframes dinNotaOn { 0%, 22%, 100% { opacity: 0; } 6%, 14% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .din-carta, .din-acha2 .din-obj, .din-monta2 span, .din-ouve2 span, .din-ouve2 img.on { animation: none; } }

/* o "O que você faz?" embaixo do quadro do meio: numa plaquinha escura com letra clara, para ler sobre o latão */
#hud .g-mesa-slots .choice-meio span { padding: 3px 12px 4px; border-radius: 99px; background: rgba(30, 14, 4, .88); border: 1.5px solid #c18a34; color: #fff1c8;
  font-size: clamp(11px, .9vw, 15px); letter-spacing: .1em; text-shadow: none; box-shadow: 0 2px 6px rgba(0, 0, 0, .45); }

/* o destaque de uma frase na explicação do Ybytu: grifo dourado, não tecla */
.pul-fala p .pul-destaque { font-weight: 700; color: #3a1c06; background: linear-gradient(transparent 58%, rgba(246, 200, 90, .55) 58%); padding: 0 2px; }

/* o verso 3D das cartas (assets/pecas/carta-verso.webp, prompt da seção 44). Enquanto a imagem não existir, fica o verso desenhado */
.mem-verso.mem-verso { background: url("../assets/pecas/carta-verso.webp") center / 100% 100% no-repeat, url("../assets/favicon.svg") center / 62% no-repeat, radial-gradient(circle at 50% 45%, #1d4a56 0%, #12303a 45%, #0b1a22 100%); }
.tem-verso3d .mem-verso { box-shadow: 0 5px 10px rgba(50, 26, 8, .4); }
.tem-verso3d .mem-verso::after { content: none; }

/* com o verso 3D carregado, só ele aparece (sem o emblema e o azul desenhados por baixo) */
.tem-verso3d .mem-verso.mem-verso { background: url("../assets/pecas/carta-verso.webp") center / 100% 100% no-repeat; border-radius: 6px; }
.tem-verso3d .mem-carta:not(:disabled):hover .mem-verso { box-shadow: 0 0 0 2px var(--gold-hi), 0 8px 14px rgba(50, 26, 8, .5); }

/* o pódio ocupa a coluna da esquerda inteira: a explicação foi para a direita, e o espaço acima das caixas encolheu */
@media (min-width: 700px) and (orientation: landscape) {
  .lv-esq { justify-content: flex-start; gap: 6px; }
  .lv-esq .lv-podio { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; width: 100%; max-width: calc((min(90vh, 860px) * .87 - clamp(80px, 14vh, 140px) - 40px) / .88); }
  .lv-esq .lv-podio .lv-podio-base { margin-top: 46cqw; }
  .parch .lv-dir .lv-sub { margin: 8px 0 0; max-width: none; text-align: left; font-size: clamp(13px, 1.05vw, 15px); line-height: 1.3; font-style: italic; color: #5a3a1c; }
}
@media (orientation: landscape) and (max-height: 520px) and (min-width: 700px) {
  .lv-esq .lv-podio { max-width: calc((min(90vh, 860px) * .86 - 46px - 16px) / .88); }
  .parch .lv-dir .lv-sub { display: none; }
}
/* em pé, a explicação fica embaixo do pódio, como antes */
@media not ((min-width: 700px) and (orientation: landscape)) { .parch .lv-dir .lv-sub { margin: 10px auto 0; text-align: center; } }

/* em telas mais estreitas as duas colunas dividem meio a meio, para os nomes da lista não serem cortados */
@media (min-width: 700px) and (max-width: 1250px) and (orientation: landscape) { .lv-corpo { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(14px, 2vw, 28px); } }

@media (min-width: 700px) and (max-width: 1250px) and (orientation: landscape) { .lv-lista .lv-pts .lv-moeda { display: none; } .lv-lista .lv-pts { font-size: 0; } .lv-lista .lv-pts b { font-size: 17px; } .lv-lista .lv-li { grid-template-columns: 22px 1fr auto; gap: 6px; } }

/* a placa do Livro dos Viajantes bem maior, no alto da coluna do pódio; o pódio desconta a altura dela (--placa) */
.lv-livro { --placa: clamp(130px, 22vh, 230px); }
@media (min-width: 700px) and (orientation: landscape) {
  .lv-livro .modal-card.parch .lv-esq h2.lv-placa { height: var(--placa); margin: 0 auto 6px; }
  .lv-esq .lv-podio { max-width: calc((min(90vh, 860px) * .87 - var(--placa) - 40px) / .88); }
}
@media (orientation: landscape) and (max-height: 520px) {
  .lv-livro { --placa: clamp(64px, 19vh, 84px); }
  .lv-livro .modal-card.parch .lv-esq h2.lv-placa, .lv-livro .modal-card.parch h2.lv-placa { height: var(--placa); }
  .lv-esq .lv-podio { max-width: calc((min(90vh, 860px) * .86 - var(--placa) - 16px) / .88); }
}
@media (orientation: portrait) {
  .lv-livro .modal-card.parch h2.lv-placa { width: min(92%, 440px); height: auto; }
}
/* o troféu um pouco mais para trás no tampo da caixa (entre a borda da frente e o fundo) */
.lv-cima { bottom: calc((1 - var(--topo) - .065) * 100%); }
.lv-podio .d1 .lv-cima { bottom: calc((1 - var(--topo) - .08) * 100%); }
/* a placa do Livro desce um pouco, com mais folga do alto do papel */
@media (min-width: 700px) and (orientation: landscape) {
  .lv-livro .modal-card.parch .lv-esq h2.lv-placa { margin: clamp(14px, 3vh, 30px) auto 6px; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .lv-livro .modal-card.parch .lv-esq h2.lv-placa { margin: 8px auto 4px; }
}

/* o volume: o trilho é um sulco gravado no papel, o nível é latão polido, e o botão é o mesmo botão de latão do
   cronovisor (assets/maq/knob.webp), com sombra; cresce no toque e gira um pouco ao arrastar */
.vol-painel .vol-barra { height: 30px; }
.vol-painel .vol-barra::before { height: 8px; background: linear-gradient(180deg, rgba(60, 36, 14, .45), rgba(90, 58, 20, .18)); box-shadow: inset 0 1px 2px rgba(40, 20, 6, .55), 0 1px 0 rgba(255, 248, 230, .6); }
.vol-painel .vol-barra b { height: 8px; background: linear-gradient(180deg, #fbe7a8 0%, #d9a74a 45%, #a06a1c 100%); box-shadow: inset 0 1px 0 rgba(255, 250, 230, .7), 0 0 6px rgba(240, 190, 90, .35); }
.vol-painel .vol-barra i { width: 28px; height: 28px; margin-left: -14px; border: 0; border-radius: 50%; background: url("../assets/maq/knob.webp") center / contain no-repeat;
  box-shadow: none; filter: drop-shadow(0 3px 3px rgba(40, 20, 6, .55)) drop-shadow(0 0 1px rgba(40, 20, 6, .6));
  rotate: calc((var(--v-n, 1) - .5) * 160deg); transition: scale .15s ease, filter .15s ease; }
.vol-painel .vol-barra:hover i, .vol-painel .vol-barra:focus-visible i { scale: 1.12; filter: drop-shadow(0 4px 4px rgba(40, 20, 6, .55)) drop-shadow(0 0 6px rgba(255, 210, 120, .7)); }
.vol-painel .vol-barra:active i { scale: 1.06; }
.vol-painel .vol-barra.off i { filter: grayscale(1) brightness(.75) drop-shadow(0 3px 3px rgba(40, 20, 6, .5)); }
@media (prefers-reduced-motion: reduce) { .vol-painel .vol-barra i { rotate: none; transition: none; } }
/* achar: o visor fica mais claro durante a busca, e os objetos, um pouco mais visíveis, sem perder o jeito de escondidos */
.orb { transition: filter .6s ease; }
.orb.claro { filter: brightness(1.28) saturate(1.08) contrast(1.04); }
.acha-item { opacity: .9; filter: brightness(.95) saturate(.9) drop-shadow(0 3px 2px rgba(40, 20, 6, .45)); }
/* o balão do Ybytu tem o tamanho do que está nele: os dois botões lado a lado e o texto na largura deles */
.yb-chama-balao { width: fit-content; max-width: min(380px, 72vw); }
.yb-chama-balao p { text-wrap: pretty; max-width: 30ch; }
.yb-chama-bts { flex-wrap: nowrap; }
@media (max-width: 420px) { .yb-chama-bts { flex-wrap: wrap; } }
/* o dado da máquina: uma face inteira por imagem (assets/dado/face-N.webp) */
.dado-quadro { background-size: contain; background-position: center; filter: drop-shadow(0 6px 6px rgba(40, 20, 6, .45)); }

/* ---------- os avatares do Livro (bustos da aldeia) no lugar das medalhas ---------- */
.lv-med.lv-av { position: relative; overflow: hidden; color: inherit;
  background: radial-gradient(circle at 50% 38%, #fbe7bd 0, #eac98a 55%, #c99a52 100%); }
.lv-med.lv-av img { position: absolute; left: -14%; top: -4%; width: 128%; height: 128%; object-fit: contain; object-position: 50% 100%; pointer-events: none; }
.lv-sig { font-family: var(--f-text); font-size: .72em; font-weight: 500; font-style: italic; letter-spacing: 0; text-transform: none; color: #6a4420; white-space: nowrap; }
.lv-quem .lv-sig { display: block; font-size: 12px; }
/* o passo do avatar e do nome */
.en-cartao { flex-wrap: wrap; }
.en-retrato .lv-med.grande { width: 88px; height: 88px; }
.en-quem { display: grid; justify-items: start; gap: 2px; flex: 1 1 160px; min-width: 0; }
.en-quem small { font-family: var(--f-caps); font-size: 12px; letter-spacing: .06em; color: #6a4420; }
.en-sig { font-style: italic; font-size: 16px; color: #5a3a1c; }
.en-sorteia { display: inline-flex; align-items: center; gap: 8px; }
.en-sorteia i { font-style: normal; font-size: 1.25em; line-height: 1; }
.en-avatares { display: grid; grid-auto-flow: column; grid-template-rows: repeat(2, 72px); grid-auto-columns: 72px; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain;
  padding: 4px 4px 10px; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: #b07a34 transparent; }
.en-av { position: relative; padding: 0; overflow: hidden; border-radius: 50%; border: 2px solid rgba(138, 90, 28, .35); cursor: pointer; scroll-snap-align: start;
  background: radial-gradient(circle at 50% 38%, #fbe7bd 0, #eac98a 55%, #c99a52 100%); transition: transform .15s, box-shadow .15s; }
.en-av img { position: absolute; left: -14%; top: -4%; width: 128%; height: 128%; object-fit: contain; object-position: 50% 100%; }
.en-av:hover { transform: translateY(-2px); }
.en-av[aria-pressed="true"] { border-color: #e8683a; box-shadow: 0 0 0 3px rgba(232, 104, 58, .45); }
.en-av:focus-visible { outline: 3px solid #e8683a; outline-offset: 2px; }
.en-nomes { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.en-nome[aria-pressed="true"] { border-color: #b8461f; background: linear-gradient(180deg, #f39a6c, #e8683a); color: #fffaf0; }
.en-nome[aria-pressed="true"] .lv-sig { color: #fff1dc; }
.en-outros { margin-left: 4px; font-size: 15px; }
@media (max-width: 560px), (orientation: landscape) and (max-height: 520px) {
  .en-avatares { grid-template-rows: repeat(2, 58px); grid-auto-columns: 58px; }
  .en-retrato .lv-med.grande { width: 64px; height: 64px; }
  .en-sorteia { flex: 1 0 100%; justify-content: center; }
}

/* o dado é um cubo de verdade: a caixa inclinada mostra a face da frente, a de cima e uma do lado */
.dado-quadro { display: grid; place-items: center; background: none !important; transform-style: preserve-3d; transform: rotateX(-40deg) rotateY(-30deg); }
.dado-cubo { --c: calc(var(--lado) * .6); position: relative; display: block; width: var(--c); height: var(--c); transform-style: preserve-3d; }
.dado-f { position: absolute; inset: 0; border-radius: 10%; background: #6b3a1c center / cover no-repeat; backface-visibility: hidden;
  box-shadow: inset 0 0 0 1.5px rgba(70, 36, 12, .55), inset 0 0 calc(var(--c) * .12) rgba(40, 18, 6, .35); }
.dado-f.f1 { transform: translateZ(calc(var(--c) / 2)); }
.dado-f.f6 { transform: rotateY(180deg) translateZ(calc(var(--c) / 2)); }
.dado-f.f3 { transform: rotateY(90deg) translateZ(calc(var(--c) / 2)); filter: brightness(.82); }
.dado-f.f4 { transform: rotateY(-90deg) translateZ(calc(var(--c) / 2)); filter: brightness(.82); }
.dado-f.f2 { transform: rotateX(90deg) translateZ(calc(var(--c) / 2)); filter: brightness(1.08); }
.dado-f.f5 { transform: rotateX(-90deg) translateZ(calc(var(--c) / 2)); filter: brightness(.9); }
/* a sombra vai no salto: filtro no próprio quadro achata o cubo e esconde as faces de cima e do lado */
.dado-box .dado-quadro { filter: none; }
.dado-box .dado-salto { filter: drop-shadow(0 6px 6px rgba(40, 20, 6, .45)); }
/* a ponta do balão do Ybytu parado: um triângulo que vai da borda do balão até a boca dele (js/game/chama.js) */
.yb-chama-balao::before, .yb-chama-balao::after { content: none; }
.yb-chama-balao { z-index: 1; }
.yb-chama-bico { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; z-index: 0; }
.yb-chama-bico polygon { fill: #f2e0b8; stroke: #8a5a1c; stroke-width: 2; stroke-linejoin: round; }
/* a galeria de avatares em grade: todos à vista, em mais linhas, sem rolagem de lado */
.en-avatares { grid-auto-flow: row; grid-template-rows: none; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); grid-auto-columns: auto;
  overflow: visible; scroll-snap-type: none; padding: 4px 2px 6px; }
.en-av { aspect-ratio: 1; width: 100%; }
@media (max-width: 560px), (orientation: landscape) and (max-height: 520px) {
  .en-avatares { grid-template-rows: none; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 6px; }
}

/* ---------- o cartão de viajante: à esquerda ele se monta, à direita ficam as escolhas ---------- */
.modal.en-largo .modal-card.parch { width: min(1240px, 95vw); }
.en-ficha { display: grid; grid-template-columns: minmax(240px, 290px) 1fr; gap: clamp(22px, 3vw, 40px); align-items: start; }
.en-cv { position: sticky; top: 0; display: grid; justify-items: center; gap: 6px; padding: 22px 20px 20px; text-align: center; border-radius: 14px;
  background: linear-gradient(180deg, #fff7e4, #f1dcb2); border: 3px solid #b3412a; box-shadow: inset 0 0 0 5px #fff7e4, inset 0 0 0 6.5px rgba(42, 28, 21, .55), 0 10px 22px rgba(60, 30, 8, .22); }
.en-cv::before { content: ""; position: absolute; inset: 9px 9px auto; height: 12px; pointer-events: none;
  background: linear-gradient(135deg, transparent 50%, #b3412a 50%) 0 0 / 14px 12px repeat-x, linear-gradient(225deg, transparent 50%, #b3412a 50%) 7px 0 / 14px 12px repeat-x; opacity: .75; }
.en-cv-rot { margin: 10px 0 4px !important; font-family: var(--f-caps); font-size: 13px !important; font-weight: 700; letter-spacing: .1em; color: #6a4420; }
.en-cv-retrato .lv-med.grande { width: 168px; height: 168px; box-shadow: inset 0 0 0 3px rgba(90, 50, 10, .5), 0 0 0 4px #fff7e4, 0 0 0 6px #e8683a; }
.en-cv-vazio { display: grid; place-items: center; width: 168px; height: 168px; border-radius: 50%; border: 3px dashed rgba(138, 90, 28, .55);
  font-family: var(--f-caps); font-size: 72px; color: rgba(138, 90, 28, .45); background: rgba(255, 250, 235, .5); }
.en-cv-nome { margin-top: 8px; font-family: var(--f-caps); font-size: clamp(22px, 2vw, 28px); line-height: 1.15; color: #2a160c; text-wrap: balance; }
.en-cv:not(.tem-nome) .en-cv-nome { font-size: 18px; color: rgba(106, 68, 32, .6); font-style: italic; font-family: var(--f-text); }
.en-cv-sig { font-family: var(--f-text); font-style: italic; font-size: 17px; color: #6a4420; min-height: 1.2em; }
.en-cv-dados { display: grid; gap: 4px; width: 100%; margin: 10px 0 2px; padding: 10px 0 0; border-top: 1.5px dashed rgba(42, 28, 21, .3); }
.en-cv-dados div { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; }
.en-cv-dados dt { font-family: var(--f-caps); font-size: 12px; letter-spacing: .08em; color: #6a4420; align-self: center; }
.en-cv-dados dd { margin: 0; font-family: var(--f-text); font-weight: 600; color: #2a160c; text-align: right; }
.en-cv:not(.tem-regiao) .en-cv-regiao { font-weight: 400; font-style: italic; color: rgba(106, 68, 32, .6); }
.parch .en-cv-nota { margin: 6px 0 8px; font-size: 14px; font-style: italic; line-height: 1.3; color: #5a3a1c; text-wrap: balance; }
.en-cv .en-sorteia { width: 100%; justify-content: center; }
.en-escolhas { min-width: 0; }
.en-escolhas > .en-expl:first-child { margin-top: 0; }
.parch .en-escolhas p.en-rotulo { display: flex; align-items: center; gap: 10px; margin-top: 18px; }
.en-num { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #e8683a; color: #fffaf0; font-family: var(--f-caps); font-size: 14px; font-style: normal; flex: none; }
.en-escolhas .en-avatares { grid-template-columns: repeat(auto-fill, minmax(66px, 1fr)); gap: 8px; }
.parch .en-expl.en-expl-reg { margin-top: 6px; }
@media (max-width: 760px) {
  .en-ficha { grid-template-columns: 1fr; gap: 14px; }
  .en-cv { position: relative; grid-template-columns: 92px 1fr; grid-template-areas: "rot rot" "ret nome" "ret sig" "dados dados" "nota nota" "bt bt"; justify-items: start; text-align: left; column-gap: 14px; padding: 18px 16px 16px; }
  .en-cv-rot { grid-area: rot; } .en-cv-retrato { grid-area: ret; } .en-cv-nome { grid-area: nome; align-self: end; margin: 0; } .en-cv-sig { grid-area: sig; }
  .en-cv-dados { grid-area: dados; } .en-cv-nota { grid-area: nota; } .en-cv .en-sorteia { grid-area: bt; }
  .en-cv-retrato .lv-med.grande, .en-cv-vazio { width: 88px; height: 88px; font-size: 40px; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .en-ficha { grid-template-columns: 200px 1fr; gap: 16px; }
  .en-cv { padding: 14px 12px 12px; gap: 3px; }
  .en-cv-retrato .lv-med.grande, .en-cv-vazio { width: 96px; height: 96px; font-size: 44px; }
  .en-cv-nome { font-size: 19px; } .en-cv-sig { font-size: 14px; } .parch .en-cv-nota { display: none; }
  .en-escolhas .en-avatares { grid-template-columns: repeat(auto-fill, minmax(50px, 1fr)); gap: 6px; }
}
/* na janela larga, os ornamentos do papel ficam do tamanho de sempre e o conteúdo se afasta deles */
.modal.en-largo .modal-card.parch .orn-canto, .modal.en-largo .modal-card.parch .orn-canto-b { width: min(15%, 104px); }
.modal.en-largo .modal-card.parch .orn-sol { width: min(13%, 96px); }
.modal.en-largo .modal-card.parch .orn-selo { width: min(8%, 56px); }
.modal.en-largo .modal-card.parch { padding-left: clamp(46px, 6vw, 84px); padding-right: clamp(46px, 6vw, 84px); }
@media (max-width: 760px) {
  .en-escolhas .en-avatares { grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: 6px; }
  .en-cv { position: sticky; top: 0; z-index: 2; }
  .parch .en-cv-nota, .en-cv-dados div:last-child { display: none; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .en-cv-rot { font-size: 11px !important; margin: 6px 0 2px !important; }
  .en-cv-retrato .lv-med.grande, .en-cv-vazio { width: 80px; height: 80px; font-size: 38px; }
  .en-cv-dados { margin-top: 4px; padding-top: 6px; } .en-cv-dados div:last-child { display: none; }
  .en-cv .en-sorteia { --bh: 36px; font-size: 11px; }
}
.en-cv .en-sorteia { min-width: 0; padding-left: 12px; padding-right: 12px; white-space: nowrap; }
@media (max-width: 760px) { .en-cv .en-sorteia { --bh: 40px; font-size: 12px; letter-spacing: .05em; } }
@media (orientation: landscape) and (max-height: 520px) { .en-cv .en-sorteia { font-size: 10px; letter-spacing: .04em; } .en-cv-rot { margin-top: 14px !important; } }
.en-cv .en-sorteia { font-size: 13px; letter-spacing: .06em; gap: 6px; }

/* ---------- o pódio com os bustos: cada um de pé sobre o degrau, grande, e o troféu pequeno na frente ---------- */
.lv-podio .lv-trofeu { width: 31cqw; aspect-ratio: 1; }
.lv-podio .d1 .lv-trofeu { width: 37cqw; }
.lv-busto { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%;
  filter: drop-shadow(0 6px 6px rgba(40, 20, 6, .45)); }
.lv-podio .lv-trofeu .lv-trofeu-img { inset: auto -10% -4% auto; width: 40%; height: auto; aspect-ratio: 639 / 601; z-index: 2; filter: drop-shadow(0 3px 4px rgba(40, 20, 6, .55)); }
.lv-podio .d1 .lv-trofeu .lv-trofeu-img { width: 42%; }
.lv-podio .lv-raios { inset: -22% -22% 10%; }
.lv-podio .lv-podio-base { margin-top: 58cqw; }
.lv-podio .lv-cima { bottom: calc((1 - var(--topo) - .02) * 100%); }
.lv-podio .d1 .lv-cima { bottom: calc((1 - var(--topo) - .025) * 100%); }
.lv-podio .lv-degrau.eu .lv-busto { filter: drop-shadow(0 0 10px rgba(255, 210, 90, .9)) drop-shadow(0 6px 6px rgba(40, 20, 6, .45)); }
.lv-podio .lv-trofeu { width: 28cqw; } .lv-podio .d1 .lv-trofeu { width: 32cqw; }
.lv-podio .lv-podio-base { margin-top: 50cqw; }
@media (orientation: landscape) and (max-height: 520px) {
  .lv-esq .lv-podio .lv-podio-base { margin-top: 43cqw; }
  .lv-podio .lv-trofeu { width: 24cqw; } .lv-podio .d1 .lv-trofeu { width: 28cqw; }
  .lv-podio .lv-quem .lv-sig { display: none; }
}

/* ---------- o medalhão do pódio, estilo avatar de jogo: aro de metal, fundo na cor do metal, e o busto cortado pelo
   círculo embaixo e saindo do aro por cima ---------- */
.lv-podio .lv-trofeu { --m1: #fff3c4; --m2: #e3b23c; --m3: #8f5f12; --fundo: #f7d77e; }
.lv-podio .d2 .lv-trofeu { --m1: #ffffff; --m2: #c4cad3; --m3: #6f7682; --fundo: #dfe5ec; }
.lv-podio .d3 .lv-trofeu { --m1: #ffe2c2; --m2: #c47c3e; --m3: #6e3712; --fundo: #e9b98a; }
.lv-medalhao { position: absolute; left: 6%; right: 6%; bottom: 4%; aspect-ratio: 1; }
.lv-medalhao::before { content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 210deg, var(--m1), var(--m2) 18%, var(--m3) 34%, var(--m2) 50%, var(--m1) 62%, var(--m2) 78%, var(--m3) 90%, var(--m1));
  box-shadow: 0 6px 10px rgba(40, 20, 6, .45), inset 0 0 0 2px rgba(255, 255, 255, .45), inset 0 0 0 4px rgba(40, 20, 6, .25); }
.lv-medalhao::after { content: ""; position: absolute; inset: 8.5%; border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #fffaf0 0, var(--fundo) 55%, var(--m2) 100%); box-shadow: inset 0 3px 8px rgba(40, 20, 6, .35); }
/* o recorte: embaixo é o círculo de dentro do aro; em cima ele sobe e deixa a cabeça sair */
.lv-recorte { position: absolute; z-index: 1; left: 8.5%; right: 8.5%; bottom: 8.5%; top: -34%; overflow: hidden; border-radius: 0 0 50% 50% / 0 0 33.3% 33.3%; }
.lv-podio .lv-recorte .lv-busto { position: absolute; inset: auto; left: -10%; bottom: -2%; width: 120%; height: auto; aspect-ratio: 1; object-fit: contain; object-position: 50% 100%;
  filter: drop-shadow(0 4px 4px rgba(40, 20, 6, .35)); }
.lv-podio .lv-trofeu .lv-trofeu-img { z-index: 2; inset: auto -12% -6% auto; width: 38%; }
.lv-podio .lv-degrau.eu .lv-medalhao::before { box-shadow: 0 0 0 4px #ffd25a, 0 0 18px rgba(255, 210, 90, .9), 0 6px 10px rgba(40, 20, 6, .45); }
.lv-podio .lv-degrau.eu .lv-recorte .lv-busto { filter: drop-shadow(0 4px 4px rgba(40, 20, 6, .35)); }
.lv-podio .lv-recorte .lv-busto { left: -26%; width: 152%; bottom: -20%; }
/* sem troféu no pódio: o medalhão desce até a frente da caixa, no meio dela */
.lv-podio .lv-trofeu .lv-trofeu-img { display: none; }
.lv-medalhao { left: 3%; right: 3%; bottom: 0; }
.lv-podio .lv-cima { z-index: 3; bottom: calc((1 - var(--topo) - .1) * 100%); }
.lv-podio .d1 .lv-cima { bottom: calc((1 - var(--topo) - .1) * 100%); }
/* cada degrau centrado na frente da sua caixa, medida na imagem do pódio (assets/livro/podio.webp, 1163x488): os centros
   das frentes ficam em 18,5%, 50,3% e 81,5% da largura; os números no meio da madeira de cada frente */
.lv-podio .lv-degrau.d2 { left: 3%; width: 31%; --ny: .66; }
.lv-podio .lv-degrau.d1 { left: 33.3%; width: 34%; --ny: .553; }
.lv-podio .lv-degrau.d3 { left: 64.5%; width: 34%; --ny: .742; }
.lv-podio .lv-num { top: calc(var(--ny) * 100%); }

/* ---------- QA de 08/11: computador ---------- */
/* os ornamentos dos cantos do papel ficam menores e o conteúdo se afasta deles: título nenhum encosta num canto */
.modal-card.parch .orn-canto, .modal-card.parch .orn-canto-b { width: min(10%, 76px); }
.modal-card.parch .orn-sol { width: min(10%, 76px); }
.modal-card.parch .orn-selo { width: min(6%, 44px); }
@media (min-width: 761px) and (min-height: 521px) {
  .modal:not(.pul-cena) > .modal-card.parch { padding-left: clamp(60px, 7.5vw, 92px); padding-right: clamp(60px, 7.5vw, 92px); padding-top: clamp(62px, 8vw, 84px); }
}
/* o Livro: a coluna da direita para antes da rosa dos ventos e da pena */
@media (min-width: 761px) and (min-height: 521px) {
  .lv-livro .parch-scroll { right: 8.5%; }
  .modal.lv-livro .modal-card.parch .orn-sol { display: none; }
  .modal.lv-livro .modal-card.parch .orn-selo { bottom: 2.4%; right: 1.6%; width: min(4%, 40px); }
}
/* os botões das janelas ficam no meio, longe dos cantos */
.modal-card.parch .modal-actions, .en-ops, .en-acoes { justify-content: center; }
/* o cartão de viajante cabe na altura de telas mais baixas */
@media (max-height: 860px) and (min-height: 521px) and (min-width: 761px) {
  .en-cv { padding: 16px 16px 14px; gap: 4px; }
  .en-cv-retrato .lv-med.grande, .en-cv-vazio { width: 124px; height: 124px; font-size: 56px; }
  .parch .en-cv-nota { display: none; }
  .en-cv-dados { margin-top: 6px; }
}
/* a bancada das escolhas: o lampião e os objetos sobem um pouco e não tocam o texto da placa */
#hud .g-mesa-slots .choice .choice-obj { bottom: 80%; }
#hud .g-mesa-slots .choice { padding-top: .55em; }
/* o diário: a data das anotações quebra em vez de cortar, e a última linha não some atrás do contador */
#hud .caderno .dest-txt small, .dest-txt small { white-space: normal; overflow: visible; text-overflow: clip; }
#hud .caderno .cad-conta { position: relative; z-index: 1; background: inherit; }
/* sem viúvas: títulos e legendas curtas se equilibram nas linhas */
.modal-card.parch h2, .polaroid b, .mural-stats, .yb-chama-balao p, .qte-label, .monta-mini figcaption, .g-era, .en-cv-nome { text-wrap: balance; }
/* a tecla dentro do rótulo das ações rápidas fica na linha do texto */
kbd.tecla { vertical-align: -.22em; }
/* os números do mural são de tabela: o zero não parece a letra o */
.mural-stats, .mural-parch b, .lv-ouro { font-variant-numeric: lining-nums tabular-nums; }
/* o nome da fase da vida entra menor no portal */
.g-stagecard h2 { font-size: clamp(30px, 4.6vw, 58px); }
@media (max-width: 900px), (max-height: 520px) { .g-stagecard h2 { font-size: 32px; } }
/* o treino do dado na horizontal: a explicação à esquerda e o dado com o botão à direita, sem rolagem */
.treino-txt, .treino-lado { display: grid; gap: 10px; justify-items: center; }
.treino-txt.feito { opacity: .55; }
@media (min-width: 761px) and (min-height: 521px) {
  .modal.treino-modal > .modal-card.parch { width: min(1080px, 94vw); }
  .treino { grid-template-columns: 1.2fr 1fr; align-items: center; column-gap: clamp(28px, 4vw, 56px); }
  .treino-txt { justify-items: start; text-align: left; }
  .modal-card.parch .treino-txt p { font-size: 19px; line-height: 1.45; }
  .treino .dado-box.qte-lado { --lado: clamp(110px, 18dvh, 150px); }
}
