:root {
  --gold: #e2ba62;
  --gold2: #f8dda0;
  --teal: #6ee2d3;
  --ink: #06111a;
  --line: rgba(255, 255, 255, .13);
  --white: #f8fbff;
  --muted: rgba(248, 251, 255, .68);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  width: 1080px;
  height: 1920px;
  overflow: hidden;
  background: #02070c;
  color: var(--white);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.stage {
  position: relative;
  width: 1080px;
  height: 1920px;
  overflow: hidden;
  background: #02070c;
}

#arena {
  position: absolute;
  inset: 0;
  width: 1080px;
  height: 1920px;
}

/* Metade esquerda do espaço superior: câmera do apresentador */
.camera-zone {
  position: absolute;
  top: 26px;
  left: 36px;
  width: 494px;
  height: 366px;
  pointer-events: none;
  transition: opacity .25s;
}
.camera-zone.hidden { opacity: 0; }
.camera-frame {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 34px;
  border: 1px solid rgba(248, 221, 160, .28);
  background: linear-gradient(180deg, rgba(7, 22, 32, .52), rgba(2, 9, 15, .28));
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .04), 0 22px 70px rgba(0, 0, 0, .34);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-align: center;
  padding: 24px;
  overflow: hidden;
}
.camera-frame::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 25px;
  border: 2px dashed rgba(248, 221, 160, .19);
}
.camera-crown {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 34px;
  color: var(--gold2);
  filter: drop-shadow(0 0 15px var(--gold));
}
.camera-badge {
  z-index: 1;
  padding: 8px 15px;
  border-radius: 999px;
  background: rgba(226, 186, 98, .17);
  color: var(--gold2);
  border: 1px solid rgba(226, 186, 98, .3);
  font-size: 14px;
  font-weight: 850;
  letter-spacing: .08em;
}
.camera-guide {
  z-index: 1;
  margin-top: 9px;
  max-width: 360px;
  font-size: 14px;
  color: rgba(248, 251, 255, .55);
}

/* Metade direita do espaço superior: informações retiradas da parte inferior */
.collective-panel {
  position: absolute;
  top: 26px;
  left: 550px;
  width: 494px;
  height: 366px;
  border-radius: 34px;
  border: 1px solid rgba(226, 186, 98, .31);
  background:
    radial-gradient(circle at 15% 0%, rgba(226, 186, 98, .18), transparent 42%),
    linear-gradient(180deg, rgba(4, 15, 24, .94), rgba(2, 9, 15, .9));
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .035), 0 22px 70px rgba(0, 0, 0, .4);
  padding: 20px;
  overflow: hidden;
}
.collective-panel::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 25px;
  border: 1px solid rgba(110, 226, 211, .1);
  pointer-events: none;
}
.collective-summary {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 132px;
  min-height: 116px;
  gap: 16px;
  align-items: center;
  padding: 4px 5px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .11);
}
.collective-force small {
  display: block;
  color: var(--gold2);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .16em;
}
.collective-force strong {
  display: block;
  margin-top: 5px;
  color: var(--teal);
  font-size: 51px;
  line-height: .98;
  letter-spacing: -.025em;
  text-shadow: 0 0 24px rgba(110, 226, 211, .22);
}
.collective-force span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .13em;
}
.player-count {
  min-height: 91px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 22px;
  border: 1px solid rgba(226, 186, 98, .23);
  background: rgba(226, 186, 98, .075);
}
.player-count b {
  display: block;
  color: var(--gold2);
  font-size: 42px;
  line-height: 1;
}
.player-count small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.25;
  letter-spacing: .1em;
}
.ranking-heading {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  height: 40px;
  color: var(--gold2);
  font-size: 13px;
  letter-spacing: .12em;
}
.ranking-heading span { font-size: 18px; }
.top-three {
  position: relative;
  z-index: 1;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
}
.top-three li {
  height: 54px;
  display: grid;
  grid-template-columns: 38px 42px 1fr auto;
  align-items: center;
  gap: 10px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .085);
  background: rgba(255, 255, 255, .04);
  padding: 6px 12px 6px 8px;
}
.top-three li:first-child {
  border-color: rgba(226, 186, 98, .38);
  background: linear-gradient(90deg, rgba(226, 186, 98, .13), rgba(255, 255, 255, .035));
}
.top-three .position {
  text-align: center;
  font-size: 21px;
}
.top-three .leader-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 2px solid rgba(248, 221, 160, .55);
  background: linear-gradient(135deg, #21465c, #0d202e);
  color: var(--gold2);
  font-size: 13px;
  font-weight: 950;
}
.top-three .leader-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.top-three .leader-name {
  min-width: 0;
}
.top-three .leader-name b {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 15px;
}
.top-three .leader-name small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}
.top-three .leader-score {
  color: var(--teal);
  font-size: 20px;
  font-weight: 950;
}
.top-three li.empty .leader-score { color: rgba(248, 251, 255, .35); }

.topbar {
  position: absolute;
  left: 36px;
  top: 410px;
  width: 1008px;
  height: 104px;
  border: 1px solid var(--line);
  background: rgba(3, 12, 20, .86);
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 24px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, .38);
  backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: 18px; }
.logo {
  width: 78px;
  height: 78px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 35%, rgba(248,221,160,.28), rgba(110,226,211,.14) 55%, rgba(5,17,26,.86));
  border: 1px solid rgba(248,221,160,.28);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04), 0 12px 28px rgba(0,0,0,.34);
  overflow: hidden;
}
.logo img {
  width: 72px;
  height: 46px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(246,193,79,.35));
}
.brand p { margin: 0 0 5px; color: var(--gold2); font-size: 13px; letter-spacing: .22em; font-weight: 850; }
.brand h1 { margin: 0; font-size: 29px; line-height: 1; }
.brand span { display: block; margin-top: 7px; color: var(--muted); font-size: 15px; }
.status {
  min-width: 142px;
  height: 54px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .06);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 18px;
}
.status i { width: 12px; height: 12px; border-radius: 50%; background: #f3a943; box-shadow: 0 0 0 9px rgba(243, 169, 67, .13); }
.status.connected i { background: #49dd7c; box-shadow: 0 0 0 9px rgba(73, 221, 124, .13); }
.status.error i { background: #f26e78; }

.boss-card {
  position: absolute;
  left: 36px;
  top: 530px;
  width: 1008px;
  height: 118px;
  border-radius: 28px;
  border: 1px solid rgba(226, 186, 98, .28);
  background: linear-gradient(90deg, rgba(226, 186, 98, .16), rgba(3, 13, 22, .9), rgba(110, 226, 211, .1));
  display: grid;
  grid-template-columns: 76px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px 25px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, .34);
}
.boss-mark { font-size: 48px; color: var(--gold2); text-shadow: 0 0 20px rgba(226, 186, 98, .7); }
.boss-card small { display: block; color: var(--gold2); font-size: 14px; letter-spacing: .18em; font-weight: 850; }
.boss-card strong { display: block; margin-top: 3px; font-size: 34px; }
.boss-card span { display: block; margin-top: 3px; color: var(--muted); font-size: 16px; }
.boss-score { text-align: right; }
.boss-score b { display: block; font-size: 39px; color: var(--teal); line-height: 1; }
.boss-score small { margin-top: 7px; color: var(--muted); letter-spacing: .1em; }

.charge-feed {
  position: absolute;
  right: 43px;
  top: 670px;
  width: 265px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  pointer-events: none;
}
.charge-chip {
  border: 1px solid var(--line);
  background: rgba(3, 13, 22, .81);
  border-radius: 17px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 39px 1fr auto;
  gap: 9px;
  align-items: center;
  animation: chipIn .26s ease;
}
.charge-chip .avatar {
  width: 39px;
  height: 39px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #21465c, #0d202e);
  overflow: hidden;
  color: var(--gold2);
  font-weight: 900;
}
.charge-chip img { width: 100%; height: 100%; object-fit: cover; }
.charge-chip b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.charge-chip small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.charge-chip em { font-style: normal; font-size: 19px; font-weight: 950; color: var(--teal); }

.event-banner {
  position: absolute;
  left: 50%;
  top: 66%;
  transform: translate(-50%, -50%) scale(.8);
  min-width: 540px;
  max-width: 850px;
  opacity: 0;
  pointer-events: none;
  border: 1px solid rgba(226, 186, 98, .38);
  border-radius: 32px;
  background: radial-gradient(circle at top, rgba(226, 186, 98, .28), rgba(4, 14, 23, .96) 70%);
  box-shadow: 0 38px 110px rgba(0, 0, 0, .58);
  padding: 27px 38px;
  text-align: center;
  font-size: 27px;
  font-weight: 900;
}
.event-banner.show { animation: banner var(--banner-duration, 3.2s) ease forwards; }
.event-banner strong { display: block; font-size: 49px; color: var(--gold2); margin-top: 8px; }

@keyframes chipIn {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes banner {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.7); }
  12% { opacity: 1; transform: translate(-50%, -50%) scale(1.04); }
  22%, 75% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -55%) scale(1.03); }
}

/* Etapa 3 — Rede de Apoio Ativada */
.boss-card > div:nth-child(2) > small span {
  display: inline;
  color: var(--teal);
  font-size: inherit;
  letter-spacing: inherit;
}

.support-overlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}
.support-overlay.show {
  visibility: visible;
  animation: supportOverlayLife 4.3s ease both;
}
.support-darkening {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 49%, rgba(1, 10, 15, .28), rgba(0, 4, 9, .76));
}
.support-card {
  position: absolute;
  left: 50%;
  top: 51%;
  width: 800px;
  min-height: 550px;
  transform: translate(-50%, -50%) scale(.7);
  border-radius: 58px;
  border: 2px solid rgba(248, 221, 160, .7);
  background:
    radial-gradient(circle at 50% 24%, rgba(255, 224, 126, .24), transparent 34%),
    radial-gradient(circle at 50% 100%, rgba(74, 208, 159, .17), transparent 46%),
    linear-gradient(180deg, rgba(3, 18, 29, .96), rgba(1, 10, 17, .97));
  box-shadow:
    0 0 80px rgba(246, 193, 79, .38),
    0 45px 140px rgba(0, 0, 0, .75),
    inset 0 0 0 3px rgba(255, 255, 255, .035);
  text-align: center;
  padding: 54px 54px 48px;
  overflow: hidden;
}
.support-overlay.show .support-card {
  animation: supportCardLife 4.3s cubic-bezier(.2,.8,.2,1) both;
}
.support-card::before,
.support-card::after {
  content: "";
  position: absolute;
  width: 540px;
  height: 540px;
  border-radius: 50%;
  border: 1px solid rgba(246, 193, 79, .19);
}
.support-card::before { top: -360px; left: -170px; }
.support-card::after { right: -220px; bottom: -390px; border-color: rgba(98, 228, 173, .18); }
.support-symbol-wrap {
  position: relative;
  z-index: 1;
  width: 250px;
  height: 250px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
}
.support-symbol-wrap img {
  position: relative;
  z-index: 3;
  width: 225px;
  height: 225px;
  filter: drop-shadow(0 0 30px rgba(246, 193, 79, .75));
  animation: supportSymbolPulse 1.25s ease-in-out infinite;
}
.support-ring {
  position: absolute;
  inset: 17px;
  border-radius: 50%;
  border: 4px solid rgba(246, 193, 79, .52);
  box-shadow: 0 0 32px rgba(246, 193, 79, .38);
}
.support-ring.ring-a { animation: supportRing 1.4s ease-out infinite; }
.support-ring.ring-b {
  inset: -4px;
  border-color: rgba(98, 228, 173, .45);
  animation: supportRing 1.4s .5s ease-out infinite;
}
.support-card p {
  position: relative;
  z-index: 1;
  margin: 8px 0 10px;
  color: #f8dda0;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: .22em;
}
.support-card h2 {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #fff5c8;
  font-size: 52px;
  line-height: 1.06;
  letter-spacing: .025em;
  text-shadow: 0 0 28px rgba(246, 193, 79, .46);
}
.support-card strong {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 22px;
  color: #6ee2d3;
  font-size: 28px;
}
.support-card span {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 10px;
  color: rgba(248, 251, 255, .72);
  font-size: 18px;
}
.stage.support-flash::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 29;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(255, 244, 178, .4), rgba(98, 228, 173, .08) 42%, transparent 72%);
  animation: stageSupportFlash 1.2s ease-out both;
}

@keyframes supportOverlayLife {
  0% { opacity: 0; }
  8%, 72% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes supportCardLife {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.62); }
  12% { opacity: 1; transform: translate(-50%, -50%) scale(1.04); }
  20%, 74% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -54%) scale(1.06); }
}
@keyframes supportSymbolPulse {
  0%, 100% { transform: scale(.97) rotate(-1deg); }
  50% { transform: scale(1.05) rotate(1deg); }
}
@keyframes supportRing {
  0% { transform: scale(.76); opacity: .9; }
  100% { transform: scale(1.45); opacity: 0; }
}
@keyframes stageSupportFlash {
  0% { opacity: 0; }
  25% { opacity: 1; }
  100% { opacity: 0; }
}


/* Etapa 4 — Portal da Reconstrução */
.portal-overlay {
  position: absolute;
  inset: 0;
  z-index: 31;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}
.portal-overlay.show {
  visibility: visible;
  animation: portalOverlayLife 8s ease both;
}
.portal-darkening {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 52%, rgba(255,241,168,.18), rgba(1,7,12,.86) 58%, rgba(0,2,6,.95));
}
.portal-card {
  position: absolute;
  left: 50%;
  top: 52%;
  width: 860px;
  min-height: 720px;
  transform: translate(-50%, -50%) scale(.7);
  border-radius: 64px;
  border: 2px solid rgba(248, 221, 160, .75);
  background:
    radial-gradient(circle at 50% 25%, rgba(255, 224, 126, .26), transparent 33%),
    radial-gradient(circle at 50% 78%, rgba(98, 228, 173, .2), transparent 42%),
    linear-gradient(180deg, rgba(3, 18, 29, .95), rgba(1, 9, 16, .985));
  box-shadow:
    0 0 95px rgba(246, 193, 79, .34),
    0 55px 140px rgba(0, 0, 0, .78),
    inset 0 0 0 3px rgba(255,255,255,.04);
  text-align: center;
  padding: 58px 54px 52px;
  overflow: hidden;
}
.portal-overlay.show .portal-card {
  animation: portalCardLife 8s cubic-bezier(.2,.8,.2,1) both;
}
.portal-card::before, .portal-card::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(246,193,79,.18);
}
.portal-card::before { width: 620px; height: 620px; top: -405px; left: -120px; }
.portal-card::after { width: 560px; height: 560px; right: -160px; bottom: -340px; border-color: rgba(98,228,173,.18); }
.portal-symbol-wrap {
  position: relative;
  z-index: 1;
  width: 420px;
  height: 420px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
}
.portal-symbol-wrap img {
  position: relative;
  z-index: 3;
  width: 360px;
  height: 225px;
  object-fit: contain;
  filter: drop-shadow(0 0 40px rgba(246,193,79,.76));
  animation: portalSymbolPulse 2s ease-in-out infinite;
}
.portal-ring {
  position: absolute;
  border-radius: 50%;
  border: 5px solid rgba(246,193,79,.45);
  box-shadow: 0 0 36px rgba(246,193,79,.26);
}
.portal-ring.ring-a { inset: 24px; animation: portalRingA 4.5s linear infinite; }
.portal-ring.ring-b { inset: -16px; border-color: rgba(98,228,173,.45); animation: portalRingB 5.8s linear infinite; }
.portal-card p {
  position: relative;
  z-index: 1;
  margin: 10px 0 10px;
  color: #f8dda0;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: .22em;
}
.portal-card h2 {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #fff7d0;
  font-size: 62px;
  line-height: 1.02;
  letter-spacing: .02em;
  text-shadow: 0 0 28px rgba(246,193,79,.46);
}
.portal-card strong {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 22px;
  color: #6ee2d3;
  font-size: 32px;
}
.portal-card span {
  position: relative;
  z-index: 1;
  display: block;
  max-width: 680px;
  margin: 14px auto 0;
  color: rgba(248,251,255,.78);
  font-size: 24px;
  line-height: 1.45;
}
.stage.portal-flash::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  background: radial-gradient(circle at 50% 52%, rgba(255,245,190,.52), rgba(246,193,79,.14) 26%, rgba(98,228,173,.12) 44%, transparent 70%);
  animation: stagePortalFlash 2.4s ease-out both;
}
@keyframes portalOverlayLife {
  0% { opacity: 0; }
  8%, 92% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes portalCardLife {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.54); }
  12% { opacity: 1; transform: translate(-50%, -50%) scale(1.02); }
  20%, 88% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -54%) scale(1.05); }
}
@keyframes portalSymbolPulse {
  0%, 100% { transform: scale(.96); }
  50% { transform: scale(1.04); }
}
@keyframes portalRingA {
  from { transform: rotate(0deg) scale(.92); }
  to { transform: rotate(360deg) scale(1.03); }
}
@keyframes portalRingB {
  from { transform: rotate(360deg) scale(1.05); }
  to { transform: rotate(0deg) scale(.95); }
}
@keyframes stagePortalFlash {
  0% { opacity: 0; }
  16% { opacity: 1; }
  100% { opacity: 0; }
}


/* Etapa 6 — liberação de áudio */
.audio-unlock {
  position: absolute;
  z-index: 40;
  left: 50%;
  top: 67%;
  transform: translate(-50%, -50%);
  width: 600px;
  min-height: 150px;
  border-radius: 34px;
  border: 2px solid rgba(248,221,160,.65);
  background:
    radial-gradient(circle at 50% 0%, rgba(226,186,98,.24), transparent 42%),
    linear-gradient(180deg, rgba(5,21,32,.97), rgba(2,10,17,.98));
  box-shadow: 0 35px 110px rgba(0,0,0,.72), 0 0 45px rgba(110,226,211,.18);
  color: #fff;
  display: grid;
  grid-template-columns: 76px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  text-align: left;
  padding: 26px 32px;
  cursor: pointer;
}
.audio-unlock span { grid-row: 1 / 3; font-size: 52px; filter: drop-shadow(0 0 14px rgba(248,221,160,.45)); }
.audio-unlock b { font-size: 27px; color: #fff1a8; letter-spacing: .04em; }
.audio-unlock small { font-size: 17px; color: rgba(248,251,255,.7); margin-top: 7px; }
.audio-unlock.hidden { display: none; }


.scene-intro-overlay, .scene-portal-overlay {
  position: absolute; inset: 0; z-index: 35; opacity: 0; visibility: hidden; pointer-events: none;
}
.scene-intro-overlay.show, .scene-portal-overlay.show { opacity: 1; visibility: visible; }
.scene-intro-backdrop, .scene-portal-darkening { position: absolute; inset: 0; background: radial-gradient(circle at 50% 42%, rgba(248,221,160,.12), rgba(3,10,16,.84) 45%, rgba(1,3,7,.96)); }
.scene-intro-card {
  position: absolute; left: 50%; top: 54%; transform: translate(-50%, -50%); width: 960px; box-sizing: border-box; padding: 46px 42px 48px;
  border-radius: 38px; border: 1px solid rgba(248,221,160,.46); text-align: center;
  background: linear-gradient(180deg, rgba(6,18,28,.94), rgba(4,11,19,.98));
  box-shadow: 0 25px 90px rgba(0,0,0,.55), 0 0 55px rgba(248,221,160,.15);
}
.scene-intro-card span { display:block; color:#f8dda0; font-size:27px; letter-spacing:.17em; font-weight:900; margin-bottom:13px; }
.scene-intro-card h2 { margin:0; color:#fff7da; font-size:58px; line-height:1.08; letter-spacing:.01em; white-space:nowrap; text-shadow:0 0 25px rgba(246,193,79,.28); }
.scene-intro-card strong { display:block; margin-top:18px; color:#6ee2d3; font-size:44px; line-height:1.1; white-space:nowrap; }
.scene-intro-card p { margin:20px auto 0; max-width:880px; color:rgba(248,251,255,.94); font-size:36px; line-height:1.38; text-wrap:balance; }
.scene-portal-card {
  position:absolute; left:50%; top:52%; width:720px; transform:translate(-50%,-50%); text-align:center; padding:46px 40px;
  border-radius:42px; border:1px solid rgba(248,221,160,.42); background:linear-gradient(180deg, rgba(4,16,25,.94), rgba(2,8,15,.98));
  box-shadow:0 25px 90px rgba(0,0,0,.6), 0 0 75px rgba(98,228,173,.18);
}
.scene-portal-card small { color:#f8dda0; font-size:28px; font-weight:900; letter-spacing:.18em; }
.scene-portal-card h2 { margin:18px 0 12px; color:#fff7d0; font-size:82px; line-height:1.04; }
.scene-portal-card p { margin:0 auto; max-width:760px; color:rgba(248,251,255,.92); font-size:38px; line-height:1.34; }
.scene-portal-rings { position:relative; width:290px; height:290px; margin:0 auto 20px; display:grid; place-items:center; }
.scene-portal-rings img { width:240px; height:150px; object-fit:contain; filter:drop-shadow(0 0 34px rgba(246,193,79,.72)); z-index:2; }
.portal-orbit { position:absolute; border-radius:50%; border:4px solid rgba(246,193,79,.48); box-shadow:0 0 30px rgba(246,193,79,.18); }
.portal-orbit.orbit-a { inset:14px; animation: spinPortalA 4.8s linear infinite; }
.portal-orbit.orbit-b { inset:-16px; border-color:rgba(98,228,173,.42); animation: spinPortalB 5.6s linear infinite; }
.stage.boss-impact::after, .stage.scene-flash::after { content:""; position:absolute; inset:0; z-index:34; pointer-events:none; }
.stage.boss-impact::after { background:radial-gradient(circle at 50% 62%, rgba(255,245,210,.32), rgba(246,193,79,.12) 28%, transparent 58%); animation: bossImpactFlash .62s ease-out both; }
.stage.scene-flash::after { background:rgba(255,255,255,.72); animation: sceneFlash .48s ease-out both; }
@keyframes spinPortalA { from { transform:rotate(0deg) scale(.96); } to { transform:rotate(360deg) scale(1.04); } }
@keyframes spinPortalB { from { transform:rotate(360deg) scale(1.03); } to { transform:rotate(0deg) scale(.95); } }
@keyframes bossImpactFlash { from { opacity:0; } 25% { opacity:1; } to { opacity:0; } }
@keyframes sceneFlash { from { opacity:0; } 35% { opacity:1; } to { opacity:0; } }

/* Etapa 12 — Intro cinematográfica no consultório */
.consultation-intro {
  position: absolute;
  inset: 0;
  z-index: 60;
  overflow: hidden;
  background: #02060a;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .36s ease, visibility .36s ease;
}
.consultation-intro.show {
  opacity: 1;
  visibility: visible;
}
.consultation-intro.leaving { opacity: 0; }
.consultation-office-scene,
.patient-close-scene,
.cosmic-canvas {
  position: absolute;
  inset: 0;
  width: 1080px;
  height: 1920px;
}
.consultation-office-scene {
  overflow: hidden;
  opacity: 1;
  transform: scale(1);
  transition: opacity .65s ease, transform 1.1s ease;
}
.consultation-background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.94) contrast(1.03);
  transform: scale(1.015);
}
.consultation-light {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 31%, rgba(255,225,168,.16), transparent 29%),
    linear-gradient(180deg, rgba(2,10,16,.08), rgba(1,7,12,.03) 43%, rgba(1,7,12,.32));
}
.consultation-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 48%, transparent 34%, rgba(0,4,8,.22) 68%, rgba(0,3,7,.72) 110%);
  transition: background .45s ease;
}
.intro-character {
  position: absolute;
  bottom: 58px;
  width: 625px;
  height: 1210px;
  object-fit: contain;
  object-position: center bottom;
  opacity: 0;
  filter: drop-shadow(0 30px 34px rgba(0,0,0,.5));
  transition:
    transform 1.05s cubic-bezier(.18,.78,.22,1),
    opacity .65s ease,
    filter .48s ease;
  will-change: transform, opacity, filter;
}
.intro-character.therapist {
  right: -42px;
  transform: translateX(720px) scale(.96);
  z-index: 3;
}
.intro-character.patient {
  left: -38px;
  transform: translateX(-720px) scale(.96);
  z-index: 2;
}
.consultation-office-scene.therapist-in .intro-character.therapist {
  opacity: 1;
  transform: translateX(0) scale(1);
}
.consultation-office-scene.patient-in .intro-character.patient {
  opacity: 1;
  transform: translateX(0) scale(1);
}
.consultation-office-scene.settled .intro-character {
  animation: introBreathing 4.2s ease-in-out infinite;
}
.consultation-office-scene.focus-therapist .intro-character.therapist {
  opacity: 1;
  transform: translateX(-42px) scale(1.13);
  filter: drop-shadow(0 34px 42px rgba(0,0,0,.58)) brightness(1.06);
  z-index: 5;
  animation: none;
}
.consultation-office-scene.focus-therapist .intro-character.patient {
  opacity: .27;
  transform: translateX(-42px) scale(.93);
  filter: blur(2px) brightness(.55) saturate(.65);
  animation: none;
}
.consultation-office-scene.focus-patient .intro-character.patient {
  opacity: 1;
  transform: translateX(42px) scale(1.13);
  filter: drop-shadow(0 34px 42px rgba(0,0,0,.58)) brightness(1.05);
  z-index: 5;
  animation: none;
}
.consultation-office-scene.focus-patient .intro-character.therapist {
  opacity: .27;
  transform: translateX(42px) scale(.93);
  filter: blur(2px) brightness(.55) saturate(.65);
  animation: none;
}
.consultation-office-scene.focus-therapist .consultation-vignette,
.consultation-office-scene.focus-patient .consultation-vignette {
  background: radial-gradient(ellipse at 50% 46%, transparent 23%, rgba(0,3,7,.34) 62%, rgba(0,2,6,.82) 105%);
}
.intro-dialogue {
  position: absolute;
  z-index: 8;
  top: 360px;
  width: 790px;
  min-height: 205px;
  padding: 34px 40px 32px;
  border-radius: 34px;
  border: 2px solid rgba(248,221,160,.64);
  background:
    radial-gradient(circle at 15% 0%, rgba(226,186,98,.18), transparent 38%),
    linear-gradient(180deg, rgba(5,20,31,.97), rgba(2,10,17,.985));
  box-shadow: 0 34px 100px rgba(0,0,0,.72), 0 0 42px rgba(110,226,211,.12), inset 0 0 0 2px rgba(255,255,255,.035);
  opacity: 0;
  transform: translateY(36px) scale(.94);
  transition: opacity .26s ease, transform .32s cubic-bezier(.2,.8,.2,1);
}
.intro-dialogue.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.intro-dialogue.speaker-therapist { left: 76px; }
.intro-dialogue.speaker-patient { right: 76px; }
.intro-dialogue::after {
  content: "";
  position: absolute;
  bottom: -29px;
  width: 56px;
  height: 56px;
  background: #03101a;
  border-right: 2px solid rgba(248,221,160,.64);
  border-bottom: 2px solid rgba(248,221,160,.64);
  transform: rotate(45deg);
}
.intro-dialogue.speaker-therapist::after { right: 92px; }
.intro-dialogue.speaker-patient::after { left: 92px; }
.intro-dialogue span {
  display: block;
  margin-bottom: 14px;
  color: #f8dda0;
  font-size: 18px;
  font-weight: 950;
  letter-spacing: .22em;
}
.intro-dialogue p {
  margin: 0;
  color: #f8fbff;
  font-size: 33px;
  line-height: 1.35;
  font-weight: 760;
  text-shadow: 0 2px 9px rgba(0,0,0,.55);
}
.patient-close-scene {
  --eye-x: 60.2%;
  --eye-y: 37%;
  --eye-dx: -162px;
  --eye-dy: 246px;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  background: #050b12;
  transition: opacity .7s ease, visibility .7s ease;
}
.patient-close-scene.visible {
  opacity: 1;
  visibility: visible;
}
.patient-close-background {
  position: absolute;
  inset: -60px;
  background:
    radial-gradient(circle at 50% 34%, rgba(45,85,104,.46), transparent 38%),
    linear-gradient(180deg, rgba(3,13,20,.7), rgba(1,5,10,.98)),
    url('assets/intro/consultorio.webp?v=1.11.7') center/cover no-repeat;
  filter: blur(16px) brightness(.48) saturate(.72);
  transform: scale(1.08);
}
.patient-close-zoom-layer {
  position: absolute;
  inset: 0;
  width: 1080px;
  height: 1920px;
  transform-origin: var(--eye-x) var(--eye-y);
  transform: scale(.98);
  transition: transform 2.55s cubic-bezier(.3,.02,.12,1);
  will-change: transform;
}
.patient-close-image {
  position: absolute;
  inset: 0;
  width: 1080px;
  height: 1920px;
  object-fit: contain;
  filter: drop-shadow(0 36px 58px rgba(0,0,0,.62));
  transition: filter 2.1s ease;
}
.patient-eye-glow {
  position: absolute;
  left: var(--eye-x);
  top: var(--eye-y);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(.3);
  opacity: 0;
  background: radial-gradient(circle, rgba(255,255,255,1) 0 14%, rgba(248,221,160,.94) 30%, rgba(110,226,211,.52) 58%, transparent 78%);
  box-shadow: 0 0 5px rgba(248,221,160,.82), 0 0 13px rgba(110,226,211,.58), 0 0 24px rgba(166,136,255,.28);
  mix-blend-mode: screen;
  transition: opacity .85s ease .35s, transform 2.15s ease;
  z-index: 4;
}
.patient-close-scene.zoom-eye .patient-close-zoom-layer {
  transform: translate(var(--eye-dx), var(--eye-dy)) scale(11.6);
}
.patient-close-scene.zoom-eye .patient-close-image {
  filter: brightness(.72) contrast(1.15) saturate(1.22);
}
.patient-close-scene.zoom-eye .patient-eye-glow {
  opacity: .82;
  transform: translate(-50%, -50%) scale(1.15);
}
.patient-close-caption {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 120px;
  width: 900px;
  margin: 0;
  transform: translateX(-50%);
  padding: 24px 34px;
  border-radius: 24px;
  border: 1px solid rgba(248,221,160,.36);
  background: rgba(2,9,15,.78);
  color: rgba(248,251,255,.88);
  text-align: center;
  font-size: 38px;
  line-height: 1.4;
  box-shadow: 0 18px 60px rgba(0,0,0,.55);
  transition: opacity .45s ease;
}
.patient-close-scene.zoom-eye .patient-close-caption { opacity: 0; }
.cosmic-canvas {
  z-index: 12;
  opacity: 0;
  visibility: hidden;
  transition: opacity .55s ease, visibility .55s ease;
}
.cosmic-interface {
  position: absolute;
  z-index: 14;
  left: 50%;
  top: 78%;
  width: 860px;
  transform: translate(-50%, -50%) scale(.92);
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .55s ease, transform .8s ease, visibility .55s ease;
}
.cosmic-interface span {
  display: block;
  color: #f8dda0;
  font-size: 28px;
  font-weight: 950;
  letter-spacing: .24em;
}
.cosmic-interface strong {
  display: block;
  margin-top: 16px;
  color: #fff;
  font-size: 64px;
  line-height: 1.08;
  text-shadow: 0 0 28px rgba(110,226,211,.65), 0 0 56px rgba(166,136,255,.38);
}
.cosmic-interface i {
  display: block;
  width: 310px;
  height: 5px;
  margin: 24px auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #f8dda0, #6ee2d3, transparent);
  box-shadow: 0 0 25px rgba(110,226,211,.52);
  animation: cosmicInterfacePulse 1.1s ease-in-out infinite;
}
.consultation-intro[data-phase="close"] .consultation-office-scene,
.consultation-intro[data-phase="cosmic"] .consultation-office-scene {
  opacity: 0;
  transform: scale(1.08);
}
.consultation-intro[data-phase="cosmic"] .patient-close-scene { opacity: 0; }
.consultation-intro[data-phase="cosmic"] .cosmic-canvas,
.consultation-intro[data-phase="cosmic"] .cosmic-interface {
  opacity: 1;
  visibility: visible;
}
.consultation-intro[data-phase="cosmic"] .cosmic-interface {
  transform: translate(-50%, -50%) scale(1);
}
.intro-skip {
  position: absolute;
  z-index: 20;
  right: 34px;
  bottom: 34px;
  min-width: 174px;
  height: 56px;
  border-radius: 999px;
  border: 1px solid rgba(248,221,160,.48);
  background: rgba(2,10,17,.78);
  color: #f8dda0;
  font: 900 16px/1 Inter, "Segoe UI", Arial, sans-serif;
  letter-spacing: .11em;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 12px 38px rgba(0,0,0,.48);
}
.intro-skip:hover { background: rgba(226,186,98,.18); }
.cinematic-advance {
  position:absolute;
  z-index:221;
  left:34px;
  bottom:34px;
  min-width:190px;
  height:56px;
  padding:0 24px;
  border-radius:999px;
  border:1px solid rgba(110,226,211,.58);
  background:rgba(2,10,17,.82);
  color:#9af3e6;
  font:900 16px/1 Inter,"Segoe UI",Arial,sans-serif;
  letter-spacing:.09em;
  cursor:pointer;
  pointer-events:auto;
  box-shadow:0 12px 38px rgba(0,0,0,.48);
}
.cinematic-advance:hover { background:rgba(110,226,211,.16); }
.cinematic-tap-hint {
  position:absolute;
  z-index:219;
  left:50%;
  bottom:105px;
  transform:translateX(-50%);
  width:max-content;
  max-width:72%;
  padding:11px 20px;
  border-radius:999px;
  background:rgba(1,7,12,.58);
  color:rgba(255,255,255,.78);
  font:800 14px/1.2 Inter,"Segoe UI",Arial,sans-serif;
  letter-spacing:.08em;
  text-align:center;
  pointer-events:none;
  animation:cinematicHintPulse 1.8s ease-in-out infinite;
}
@keyframes cinematicHintPulse { 0%,100%{opacity:.48} 50%{opacity:1} }

@keyframes introBreathing {
  0%, 100% { margin-bottom: 0; }
  50% { margin-bottom: 7px; }
}
@keyframes cosmicInterfacePulse {
  0%, 100% { opacity: .42; transform: scaleX(.75); }
  50% { opacity: 1; transform: scaleX(1); }
}

/* =========================================================
   ETAPA 13 — ENCERRAMENTO CINEMATOGRÁFICO
   ========================================================= */
.campaign-ending {
  position: absolute;
  inset: 0;
  z-index: 180;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  overflow: hidden;
  background: transparent;
  transition: opacity .45s ease, visibility .45s ease;
}
.campaign-ending.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.stage.ending-mode .camera-zone,
.stage.ending-mode .collective-panel,
.stage.ending-mode .topbar,
.stage.ending-mode .boss-card,
.stage.ending-mode .charge-feed,
.stage.ending-mode .event-banner,
.stage.ending-mode .audio-unlock {
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity .6s ease;
}
.ending-scene {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .6s ease, visibility .6s ease;
}
.ending-scene.visible { opacity: 1; visibility: visible; }
.ending-darkening {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 55%, rgba(45,24,82,.18), rgba(1,4,9,.82) 48%, rgba(0,1,4,.98));
  backdrop-filter: blur(2px);
}
.ending-center-message {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 52%;
  width: 900px;
  transform: translate(-50%, -50%);
  text-align: center;
}
.ending-center-message span,
.ending-portal-copy span,
.ending-thanks-copy span,
.ending-top3-content > span,
.ending-final-scene > span {
  display: block;
  color: #f8dda0;
  font-size: 27px;
  font-weight: 950;
  letter-spacing: .23em;
}
.ending-center-message h2 {
  margin: 24px 0 0;
  color: #fff;
  font-size: 68px;
  line-height: 1.16;
  text-shadow: 0 0 36px rgba(166,136,255,.45);
}
.ending-portal-scene {
  background: radial-gradient(circle at 50% 42%, #244c58 0%, #10283c 24%, #07111e 54%, #010307 100%);
}
.ending-portal-wrap {
  position: absolute;
  left: 50%;
  top: 44%;
  width: 590px;
  height: 590px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
}
.ending-portal-wrap img {
  width: 440px;
  height: 275px;
  object-fit: contain;
  z-index: 4;
  filter: drop-shadow(0 0 38px rgba(248,221,160,.88)) drop-shadow(0 0 78px rgba(110,226,211,.5));
  animation: endingLogoPulse 2.2s ease-in-out infinite;
}
.ending-portal-ring {
  position: absolute;
  border-radius: 50%;
  border: 6px solid rgba(248,221,160,.55);
  box-shadow: 0 0 48px rgba(248,221,160,.28), inset 0 0 40px rgba(110,226,211,.18);
}
.ending-portal-ring.ring-one { inset: 34px; animation: endingRingRight 6s linear infinite; }
.ending-portal-ring.ring-two { inset: -10px; border-color: rgba(110,226,211,.55); animation: endingRingLeft 7.5s linear infinite; }
.ending-portal-ring.ring-three { inset: 92px; border-style: dashed; animation: endingRingRight 4.6s linear infinite; }
.ending-portal-copy {
  position: absolute;
  left: 50%;
  top: 76%;
  width: 940px;
  transform: translate(-50%, -50%);
  text-align: center;
}
.ending-portal-copy h2 {
  margin: 18px 0 0;
  color: #fff7da;
  font-size: 76px;
  line-height: 1.03;
  text-shadow: 0 0 42px rgba(248,221,160,.38);
}
.ending-portal-copy p {
  margin: 24px auto 0;
  color: rgba(248,251,255,.94);
  font-size: 39px;
  line-height: 1.35;
}
.ending-cosmic-canvas {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 1080px;
  height: 1920px;
  opacity: 0;
  visibility: hidden;
}
.campaign-ending[data-phase="cosmic"] .ending-cosmic-canvas,
.campaign-ending[data-phase="cosmic"] .ending-cosmic-interface {
  opacity: 1;
  visibility: visible;
}
.ending-cosmic-interface {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 78%;
  width: 900px;
  transform: translate(-50%, -50%);
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .5s ease;
}
.ending-cosmic-interface span { color:#f8dda0; font-size:28px; font-weight:950; letter-spacing:.24em; }
.ending-cosmic-interface strong { display:block; margin-top:18px; color:#fff; font-size:66px; line-height:1.06; text-shadow:0 0 32px rgba(110,226,211,.68); }
.ending-cosmic-interface i { display:block; width:390px; height:6px; margin:28px auto 0; border-radius:999px; background:linear-gradient(90deg,transparent,#f8dda0,#6ee2d3,transparent); box-shadow:0 0 28px rgba(110,226,211,.55); animation: cosmicInterfacePulse 1.1s ease-in-out infinite; }
.ending-close-scene { background: radial-gradient(circle at 50% 38%, #283b48, #0c151e 48%, #020508 100%); }
.ending-close-background { position:absolute; inset:0; background:radial-gradient(circle at 50% 35%, rgba(248,221,160,.16), transparent 34%), linear-gradient(180deg,rgba(10,25,37,.18),rgba(0,2,5,.72)); }
.ending-close-layer {
  --ending-eye-x: 50%;
  --ending-eye-y: 32%;
  --ending-eye-dx: 0px;
  --ending-eye-dy: 410px;
  position: absolute;
  inset: 0;
  transform-origin: var(--ending-eye-x) var(--ending-eye-y);
  transform: translate(var(--ending-eye-dx), var(--ending-eye-dy)) scale(11.4);
  transition: transform 3.6s cubic-bezier(.16,.72,.18,1), filter 2.8s ease;
  filter: brightness(.72) saturate(.86);
}
.ending-close-scene.reveal .ending-close-layer { transform: translate(0,0) scale(1); filter:brightness(1.05) saturate(1.05); }
.ending-close-layer img { width:100%; height:100%; object-fit:contain; object-position:center center; filter:drop-shadow(0 28px 55px rgba(0,0,0,.55)); }
.ending-eye-light { position:absolute; left:var(--ending-eye-x); top:var(--ending-eye-y); width:210px; height:210px; border-radius:50%; transform:translate(-50%,-50%); background:radial-gradient(circle,rgba(255,255,255,.95),rgba(248,221,160,.45) 18%,rgba(110,226,211,.18) 42%,transparent 72%); opacity:.9; transition:opacity 2s ease, transform 3s ease; mix-blend-mode:screen; }
.ending-close-scene.reveal .ending-eye-light { opacity:.08; transform:translate(-50%,-50%) scale(1.5); }
.ending-close-caption { position:absolute; z-index:4; left:50%; bottom:118px; width:900px; transform:translateX(-50%); margin:0; padding:25px 34px; border-radius:28px; border:2px solid rgba(248,221,160,.38); background:rgba(2,9,15,.82); color:#f8fbff; text-align:center; font-size:40px; line-height:1.34; box-shadow:0 24px 70px rgba(0,0,0,.58); }
.ending-office-scene { overflow:hidden; background:#071019; }
.ending-office-background { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.ending-office-light { position:absolute; inset:0; background:radial-gradient(circle at 50% 44%,rgba(248,221,160,.15),transparent 42%),linear-gradient(180deg,rgba(4,20,30,.05),rgba(1,5,10,.38)); }
.ending-office-vignette { position:absolute; inset:0; background:radial-gradient(ellipse at 50% 48%,transparent 36%,rgba(0,3,7,.28) 68%,rgba(0,2,5,.76)); }
.ending-office-character { position:absolute; bottom:54px; height:1210px; width:625px; object-fit:contain; object-position:center bottom; filter:drop-shadow(0 30px 36px rgba(0,0,0,.55)); transition:transform .55s ease,opacity .55s ease,filter .55s ease; }
.ending-office-character.patient { left:-45px; z-index:3; }
.ending-office-character.patient.patient-male { transform:scaleX(-1); }
.ending-office-character.therapist { right:-42px; z-index:3; }
.ending-office-scene.focus-patient .ending-office-character.patient { transform:translateX(42px) scale(1.12); z-index:5; filter:drop-shadow(0 34px 44px rgba(0,0,0,.58)) brightness(1.07); }
.ending-office-scene.focus-patient .ending-office-character.patient.patient-male { transform:translateX(42px) scale(-1.12,1.12); }
.ending-office-scene.focus-patient .ending-office-character.therapist { opacity:.3; transform:translateX(42px) scale(.94); filter:blur(2px) brightness(.6); }
.ending-office-scene.focus-therapist .ending-office-character.therapist { transform:translateX(-42px) scale(1.12); z-index:5; filter:drop-shadow(0 34px 44px rgba(0,0,0,.58)) brightness(1.07); }
.ending-office-scene.focus-therapist .ending-office-character.patient { opacity:.3; transform:translateX(-42px) scale(.94); filter:blur(2px) brightness(.6); }
.ending-office-scene.focus-therapist .ending-office-character.patient.patient-male { transform:translateX(-42px) scale(-.94,.94); }
.ending-dialogue { position:absolute; z-index:8; top:360px; width:790px; min-height:205px; padding:34px 40px 32px; border-radius:34px; border:2px solid rgba(248,221,160,.64); background:radial-gradient(circle at 15% 0%,rgba(226,186,98,.18),transparent 38%),linear-gradient(180deg,rgba(5,20,31,.97),rgba(2,10,17,.985)); box-shadow:0 34px 100px rgba(0,0,0,.72),0 0 42px rgba(110,226,211,.12); opacity:0; transform:translateY(30px) scale(.95); transition:opacity .26s ease,transform .32s ease; }
.ending-dialogue.visible { opacity:1; transform:translateY(0) scale(1); }
.ending-dialogue.speaker-patient { left:76px; }
.ending-dialogue.speaker-therapist { right:76px; }
.ending-dialogue::after { content:""; position:absolute; bottom:-29px; width:56px; height:56px; background:#03101a; border-right:2px solid rgba(248,221,160,.64); border-bottom:2px solid rgba(248,221,160,.64); transform:rotate(45deg); }
.ending-dialogue.speaker-patient::after { left:92px; }
.ending-dialogue.speaker-therapist::after { right:92px; }
.ending-dialogue span { display:block; margin-bottom:14px; color:#f8dda0; font-size:20px; font-weight:950; letter-spacing:.22em; }
.ending-dialogue p { margin:0; color:#f8fbff; font-size:34px; line-height:1.34; font-weight:760; }
.ending-thanks-scene { background:radial-gradient(circle at 50% 37%,#344e56,#12202c 48%,#020609 100%); }
.ending-thanks-glow { position:absolute; inset:0; background:radial-gradient(circle at 50% 32%,rgba(248,221,160,.23),transparent 34%); }
.ending-thanks-scene img { position:absolute; left:50%; top:42%; width:820px; height:1230px; transform:translate(-50%,-50%); object-fit:contain; filter:drop-shadow(0 28px 54px rgba(0,0,0,.55)); }
.ending-thanks-copy { position:absolute; z-index:3; left:50%; bottom:105px; width:930px; transform:translateX(-50%); padding:28px 38px; border-radius:32px; border:2px solid rgba(248,221,160,.42); background:rgba(2,10,17,.84); text-align:center; box-shadow:0 28px 80px rgba(0,0,0,.62); }
.ending-thanks-copy h2 { margin:16px 0 0; color:#fff; font-size:54px; line-height:1.16; }
.ending-top3-scene { background:#03080d; }
.ending-top3-backdrop { position:absolute; inset:0; background:radial-gradient(circle at 50% 40%,rgba(226,186,98,.22),transparent 36%),radial-gradient(circle at 50% 75%,rgba(110,226,211,.12),transparent 42%),linear-gradient(180deg,#071521,#02070c); }
.ending-top3-content { position:absolute; inset:0; z-index:2; padding:180px 55px 120px; text-align:center; }
.ending-top3-content h2 { margin:18px 0 70px; color:#fff7da; font-size:74px; line-height:1.03; text-shadow:0 0 35px rgba(248,221,160,.35); }
.ending-top3-cards { display:flex; align-items:flex-end; justify-content:center; gap:22px; min-height:1180px; }
.ending-rank-card { position:relative; width:300px; min-height:690px; padding:62px 22px 34px; border-radius:38px; border:3px solid rgba(248,221,160,.35); background:linear-gradient(180deg,rgba(13,31,43,.96),rgba(3,10,17,.98)); box-shadow:0 35px 90px rgba(0,0,0,.62); display:flex; flex-direction:column; align-items:center; justify-content:flex-start; }
.ending-rank-card.rank-1 { width:340px; min-height:820px; order:2; border-color:rgba(248,221,160,.82); box-shadow:0 0 48px rgba(248,221,160,.28),0 40px 100px rgba(0,0,0,.68); transform:translateY(-70px); }
.ending-rank-card.rank-2 { order:1; border-color:rgba(221,232,243,.55); }
.ending-rank-card.rank-3 { order:3; border-color:rgba(209,139,79,.62); }
.ending-rank-medal { position:absolute; top:-44px; left:50%; transform:translateX(-50%); font-size:78px; filter:drop-shadow(0 8px 15px rgba(0,0,0,.45)); }
.ending-rank-avatar { width:210px; height:210px; border-radius:50%; border:6px solid rgba(248,221,160,.7); display:grid; place-items:center; overflow:hidden; background:linear-gradient(135deg,#15394a,#0b1d29); color:#fff; font-size:62px; font-weight:950; box-shadow:0 0 32px rgba(110,226,211,.22); }
.rank-1 .ending-rank-avatar { width:245px; height:245px; }
.ending-rank-avatar img { width:100%; height:100%; object-fit:cover; }
.ending-rank-card strong { margin-top:34px; color:#fff; font-size:37px; line-height:1.12; word-break:break-word; }
.ending-rank-card span { margin-top:20px; color:#6ee2d3; font-size:30px; font-weight:900; }
.ending-rank-card.empty { opacity:.58; }
.ending-final-scene { background:radial-gradient(circle at 50% 38%,#315257,#122735 35%,#07111b 62%,#010307 100%); text-align:center; padding-top:210px; }
.ending-final-glow { position:absolute; inset:0; background:radial-gradient(circle at 50% 30%,rgba(248,221,160,.2),transparent 36%),radial-gradient(circle at 50% 62%,rgba(110,226,211,.1),transparent 44%); }
.ending-final-logo-wrap { position:relative; width:570px; height:570px; margin:0 auto 70px; display:grid; place-items:center; }
.ending-final-logo-wrap img { width:455px; height:285px; object-fit:contain; z-index:3; filter:drop-shadow(0 0 42px rgba(248,221,160,.75)); }
.ending-final-ring { position:absolute; border-radius:50%; border:5px solid rgba(248,221,160,.55); }
.ending-final-ring.ring-a { inset:30px; animation:endingRingRight 7s linear infinite; }
.ending-final-ring.ring-b { inset:-12px; border-color:rgba(110,226,211,.5); animation:endingRingLeft 8.5s linear infinite; }
.ending-final-scene h2 { position:relative; z-index:2; width:900px; margin:22px auto 0; color:#fff; font-size:58px; line-height:1.18; }
.ending-final-scene p { position:relative; z-index:2; margin:32px 0 0; color:#6ee2d3; font-size:25px; font-weight:900; letter-spacing:.19em; }
.ending-skip { position:absolute; z-index:220; right:38px; bottom:38px; padding:17px 24px; border-radius:999px; border:1px solid rgba(248,221,160,.5); background:rgba(2,10,17,.86); color:#f8dda0; font-size:19px; font-weight:900; letter-spacing:.08em; cursor:pointer; }
.campaign-ending.final-hold .ending-skip { display:none; }
.campaign-ending.final-hold .ending-advance,
.campaign-ending.final-hold .ending-tap-hint { display:none; }
.ending-restart {
  position:relative;
  z-index:6;
  display:none;
  margin:58px auto 0;
  min-width:520px;
  min-height:78px;
  padding:19px 42px;
  border-radius:999px;
  border:2px solid rgba(248,221,160,.78);
  background:linear-gradient(135deg,rgba(226,186,98,.95),rgba(110,226,211,.9));
  color:#06131d;
  font:950 22px/1.15 Inter,"Segoe UI",Arial,sans-serif;
  letter-spacing:.08em;
  cursor:pointer;
  box-shadow:0 20px 60px rgba(0,0,0,.48),0 0 38px rgba(248,221,160,.2);
}
.campaign-ending.final-hold .ending-restart { display:block; }
.ending-restart:hover { transform:translateY(-2px); filter:brightness(1.06); }

@keyframes endingRingRight { from{transform:rotate(0deg) scale(.98)} to{transform:rotate(360deg) scale(1.02)} }
@keyframes endingRingLeft { from{transform:rotate(360deg) scale(1.02)} to{transform:rotate(0deg) scale(.98)} }
@keyframes endingLogoPulse { 0%,100%{transform:scale(.98)} 50%{transform:scale(1.035)} }


/* ETAPA 10.1 — modo de desempenho móvel */
@media (max-width: 820px), (pointer: coarse) {
  .stage,
  .web-welcome-card,
  .web-hud,
  .web-control-panel,
  .audio-unlock,
  .scene-intro-card,
  .ending-top3-card {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .stage img,
  .web-welcome-card img,
  .consultation-intro img,
  .campaign-ending img,
  .scene-portal-rings img,
  .ending-final-logo-wrap img {
    filter: none !important;
  }

  .consultation-background,
  .ending-office-background {
    filter: brightness(.55) saturate(.75) !important;
  }

  .scene-portal-rings,
  .portal-ring,
  .ending-portal-rings {
    box-shadow: none !important;
  }

  .stage *,
  .consultation-intro *,
  .campaign-ending * {
    text-shadow: none;
  }
}


/* ETAPA 11.7 — avanço manual de cenas e nova jornada */
@media (max-width: 820px), (pointer: coarse) {
  .cinematic-advance,
  .intro-skip,
  .ending-skip {
    bottom:26px;
    min-width:0;
    height:52px;
    padding:0 18px;
    font-size:14px;
  }
  .cinematic-advance { left:24px; }
  .intro-skip, .ending-skip { right:24px; }
  .cinematic-tap-hint { bottom:92px; max-width:82%; font-size:12px; }
  .ending-restart { min-width:0; width:82%; min-height:70px; font-size:19px; }
}


/* ETAPA 11.7 — apresentação legível das fases */
@media (max-width: 820px), (pointer: coarse) {
  .scene-intro-card { width: 960px; padding: 44px 40px 46px; }
  .scene-intro-card h2 { font-size: 58px; }
  .scene-intro-card strong { font-size: 44px; }
  .scene-intro-card p { font-size: 36px; line-height: 1.4; }
}
