:root {
  color-scheme: dark;
  background: #000;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-width: 960px;
  min-height: 100%;
  background: #000 url('./fundo-sala.jpg') center / cover fixed no-repeat;
}

main {
  width: 100%;
  height: 100vh;
  min-height: 540px;
  padding: 0;
}

.art-modal {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
}

.art-modal[open] {
  display: grid;
  place-items: center;
}

.art-modal::backdrop {
  background: transparent;
}

html:has(.art-modal[open]) {
  overflow: hidden;
}

.modal-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  position: absolute;
  top: 22px;
  right: 24px;
  margin: 0;
  z-index: 1;
}

.fullscreen-toggle {
  height: 44px;
  padding: 0 18px;
  border: 1px solid #503035;
  border-radius: 22px;
  background: #100b0d;
  color: #f4e9ea;
  font: 14px Arial, sans-serif;
  cursor: pointer;
}

.fullscreen-toggle:hover {
  background: #351016;
}

.shortcut-button {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid #ffd34e;
  border-radius: 22px;
  background: #171014e8;
  color: #ffe45c;
  font: 700 13px Arial, sans-serif;
  cursor: pointer;
}
.art-modal.is-playing .shortcut-button { display: none; }
.site-footer { display: none; }
.shortcut-button:hover { background: #351016; }
.shortcut-button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.fullscreen-toggle[aria-pressed="false"] {
  height: 90px !important;
  padding: 0 50px !important;
  border: 3px solid #ffd34e;
  border-radius: 14px;
  outline: 1px solid #8c3f0b;
  outline-offset: 3px;
  background: linear-gradient(#f32b38, #d41128 50%, #9c071b);
  color: #ffe45c;
  font-size: 34px !important;
  font-weight: 900;
  letter-spacing: .08em;
  text-shadow: 0 2px 1px #650b0b;
  animation: fullscreen-pulse 2s ease-in-out infinite;
}

.fullscreen-toggle[aria-pressed="false"]:hover {
  background: linear-gradient(#ff4650, #ec1832 50%, #b50922);
}

@keyframes fullscreen-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: inset 0 2px 0 #fff6, inset 0 -3px 0 #690719, 0 4px 0 #570715, 0 0 0 0 rgb(255 185 50 / 30%);
  }
  50% {
    transform: scale(1.035);
    box-shadow: inset 0 2px 0 #fff6, inset 0 -3px 0 #690719, 0 4px 0 #570715, 0 0 0 10px rgb(255 185 50 / 0%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .fullscreen-toggle[aria-pressed="false"] {
    animation: none;
  }
}

.fullscreen-toggle:focus-visible {
  outline: 2px solid #f2707f;
  outline-offset: 4px;
}

.fullscreen-status {
  position: absolute;
  bottom: 12px;
  left: 0;
  width: 100%;
  margin: 0;
  text-align: center;
  color: #f4e9ea;
  font: 14px Arial, sans-serif;
}

.pause-overlay {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-content: center;
  gap: 10px;
  background: #050307b8;
  color: #ffe45c;
  text-align: center;
  text-shadow: 0 2px 0 #500b18;
  pointer-events: none;
}
.pause-overlay[hidden] { display: none; }
.pause-overlay strong { font: 900 clamp(28px, 6cqw, 72px)/1 Arial, sans-serif; letter-spacing: .12em; }
.pause-overlay span { color: #fff4d0; font: 700 clamp(12px, 2cqw, 20px)/1.2 Arial, sans-serif; }

.art-card {
  position: relative;
  display: grid;
  place-items: center;
  width: min(80vw, calc((80vh - 18px) * var(--art-width, 1672) / var(--art-height, 941) + 18px));
  height: auto;
  margin: 0;
  padding: 8px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 28px;
  background:
    linear-gradient(#080607, #080607) padding-box,
    linear-gradient(135deg, #9b3338, #342426 42%, #24191b 65%, #6c292e) border-box;
  box-shadow:
    0 30px 90px #000,
    0 0 55px rgb(191 17 34 / 10%),
    inset 0 0 30px rgb(255 255 255 / 2%);
}

.art-card > img {
  display: block;
  width: 100%;
  height: auto;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  border-radius: 20px;
  user-select: none;
}

.fight-hud {
  position: absolute;
  top: 5%;
  left: 4%;
  right: 4%;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  user-select: none;
}

.fight-hud[hidden] {
  display: none;
}

.fighter-health {
  width: 43%;
  min-width: 0;
}

.fighter-heading {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: clamp(3px, .5cqw, 8px);
}
.fighter-health-right .fighter-heading {
  flex-direction: row-reverse;
}
.health-points {
  color: #fff5d3;
  font: 700 clamp(9px, 1.15cqw, 15px)/1 Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-shadow: 0 1px 3px #000, 0 1px 5px #000;
}

.fighter-name {
  display: block;
  color: #fff;
  font: italic 900 clamp(13px, 2.3cqw, 34px)/1 Arial, sans-serif;
  letter-spacing: .055em;
  text-shadow: 2px 2px 0 #111, 0 2px 8px #000;
}

.fighter-health-right {
  text-align: right;
}

.health-bar {
  height: clamp(12px, 1.7cqw, 26px);
  padding: 3px;
  overflow: hidden;
  border: 1px solid #f5dc8b;
  border-radius: 4px;
  background: #17191b;
  box-shadow: 0 2px 0 #000, 0 3px 10px #0009;
}

.health-fill {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 1px;
  background: linear-gradient(#c7fc83, #76df36 48%, #42a81d 52%, #66ca26);
  box-shadow: inset 0 1px 0 #eaffca;
}

/* Palco horizontal também em celulares e dentro do salão Arcade. */
html,body{min-width:0;min-height:100%}
main{min-height:0;height:100dvh}
.art-modal{height:100dvh}
.art-modal[open]{display:block}
.street-stage{position:absolute;inset:0;width:100%;height:100%;display:grid;place-items:center;container-type:size}
.art-card{width:min(80cqw,calc((80cqh - 18px) * var(--art-width,1672) / var(--art-height,941) + 18px))}
html[data-phone="true"] .modal-actions{top:10px;right:12px}
html[data-phone="true"] .fullscreen-toggle{height:34px;padding:0 14px;font-size:12px}
html[data-phone="true"] .fullscreen-status{font-size:10px;bottom:5px}
@media(orientation:portrait){html[data-phone="true"] .art-modal.is-playing .street-stage{inset:auto;top:50%;left:50%;width:100dvh;height:100vw;transform:translate(-50%,-50%) rotate(90deg)}}

html[data-phone="true"] .fullscreen-toggle[aria-pressed="false"]{height:66px !important;padding:0 34px !important;font-size:25px !important}
html[data-phone="true"] .art-card .modal-actions{top:20px;right:22px}

.art-modal.is-playing .street-stage {
  background: #000 url('./f222.webp') center / cover no-repeat;
}

.player-arena { position: absolute; inset: 9px; pointer-events: none; }
.player-arena[hidden], .walk-frame[hidden], .movement-controls[hidden], .player-defense-frame[hidden] { display: none; }
.cesinha-player { position: absolute; left: 60px; bottom: 60px; height: min(58%, calc(100% - 120px)); aspect-ratio: .42; }
.walk-frame { position: absolute; max-width: none; width: auto; height: 100.7874%; bottom: -.0656%; left: -32.496%; user-select: none; pointer-events: none; }
.walk-frame:nth-child(2) { height: 101.6545%; bottom: -.728%; left: -32.776%; }
.player-defense-frame { display: none; position: absolute; max-width: none; width: auto; height: 101%; bottom: -.2%; left: -63%; user-select: none; pointer-events: none; }
.is-defending > .walk-frame, .is-defending > .attack-frame { display: none; }
.is-defending > .player-defense-frame { display: block; }
.movement-controls { display: none; position: absolute; left: 25px; bottom: 20px; flex-direction: column; align-items: center; gap: 8px; z-index: 3; }
.movement-row { display: flex; gap: 12px; }
.movement-controls button { width: 48px; height: 42px; border: 2px solid #ffd34e; border-radius: 12px; background: #180e10e8; color: #ffe45c; font: 900 28px/1 Arial,sans-serif; touch-action: none; user-select: none; cursor: pointer; }
.movement-controls .defense-button { width: auto; min-width: 104px; height: 36px; font-size: 13px; letter-spacing: .06em; }
.movement-controls .defense-button.is-active { background: linear-gradient(#5b43e8, #30209d); box-shadow: 0 0 14px #8275ff; }
.movement-controls button.is-held, .movement-controls button:active { background: #c5142c; }
.movement-controls button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
html[data-phone="true"] .movement-controls { display: flex; }
@media(pointer:coarse) { .movement-controls { display:flex; } }

.attack-frame { position: absolute; max-width: none; width: auto; height: 70.3886%; bottom: -.0555%; left: -38.0952%; user-select: none; pointer-events: none; }
.attack-elbow { height: 70.7194%; bottom: -.2213%; left: -40.4762%; }
.attack-frame[hidden], .attack-controls[hidden] { display: none; }
.attack-controls { display: none; position: absolute; bottom: 20px; right: 25px; z-index: 3; }
.attack-button { min-width: 96px; height: 42px; padding: 0 15px; border: 2px solid #ffd34e; border-radius: 12px; background: linear-gradient(#e62c39, #a40920); color: #ffe45c; font: 900 14px Arial,sans-serif; letter-spacing: .04em; touch-action: manipulation; user-select: none; cursor: pointer; }
.attack-button.is-held, .attack-button:active { background: #f54831; box-shadow: 0 0 12px #ffd34e80; }
.attack-button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
html[data-phone="true"] .attack-controls { display: block; }
@media(pointer:coarse) { .attack-controls { display:block; } }

.tocred-player { position: absolute; right: 60px; bottom: 60px; height: min(58%, calc(100% - 120px)); aspect-ratio: .7442; }
.tocred-frame { position: absolute; max-width: none; width: auto; height: 103.0251%; bottom: -1.2100%; right: -36.1201%; user-select: none; pointer-events: none; }
.tocred-walk-two { height: 107.0018%; bottom: -5.4758%; right: -37.3928%; }
.tocred-attack { height: 100.2292%; bottom: -.1528%; right: -.3080%; }
.tocred-frame[hidden] { display: none; }
.green-toc-frame { position: absolute; max-width: none; width: auto; height: 103.0251%; bottom: -1.2100%; right: -36.1201%; user-select: none; pointer-events: none; }
.green-toc-walk-two { height: 107.0018%; bottom: -5.4758%; right: -37.3928%; }
.green-toc-attack { height: 100.2292%; bottom: -.1528%; right: -.3080%; }
.green-toc-frame[hidden] { display: none; }

.health-fill { transition: width 140ms ease; }
.health-bar.is-low .health-fill { background: linear-gradient(#ffb55e, #ec4b2b 48%, #b91921 52%, #ed5937); }
.fight-result { position: absolute; top: 42%; left: 8%; right: 8%; z-index: 4; padding: 18px 12px; border: 2px solid #ffd34e; border-radius: 14px; background: #12090de8; color: #ffe45c; text-align: center; font: italic 900 clamp(18px, 3cqw, 42px)/1.2 Arial,sans-serif; text-shadow: 0 2px 0 #650b0b; }
.fight-result[hidden] { display: none; }
.attack-button:disabled, .movement-controls button:disabled { opacity: .5; cursor: default; }
@media(prefers-reduced-motion: reduce) { .health-fill { transition: none; } }

.replay-button { margin-top: 12px; padding: 10px 16px; border: 2px solid #ffd34e; border-radius: 12px; background: #b50922; color: #ffe45c; font: 900 14px Arial, sans-serif; cursor: pointer; }
.replay-button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.victory-frame { display: none; }
.is-victorious > .walk-frame, .is-victorious > .tocred-frame, .is-victorious > .green-toc-frame { display: none; }
.is-victorious > .victory-frame { display: block; }
.victory-frame {
  position: absolute;
  width: auto;
  max-width: none;
  height: 101.3092%;
  bottom: -.7553%;
  left: 38%;
  transform: translateX(-49.8082%);
  pointer-events: none;
  user-select: none;
}
.tocred-player > .victory-frame {
  height: 108.8542%;
  bottom: -7.1181%;
  left: 50%;
  transform: translateX(-49.7209%);
}


.punch-burst {
  position: absolute;
  z-index: 2;
  width: clamp(20px, 3.3cqw, 38px);
  aspect-ratio: 1;
  opacity: 0;
  background: radial-gradient(circle, #fff8c7 0 20%, #ffcb39 42%, #ff791a 67%, #d92b18 100%);
  clip-path: polygon(50% 0, 60% 28%, 83% 11%, 77% 39%, 100% 45%, 78% 58%, 94% 81%, 66% 76%, 56% 100%, 44% 76%, 18% 91%, 24% 65%, 0 52%, 25% 43%, 13% 15%, 39% 29%);
  pointer-events: none;
}

.defense-frame {
  display: none;
  position: absolute;
  width: auto;
  max-width: none;
  height: 109.0435%;
  bottom: -7.3913%;
  right: -23.0187%;
  pointer-events: none;
  user-select: none;
}
.is-defending > .tocred-frame, .is-defending > .green-toc-frame { display: none; }
.is-defending > .defense-frame { display: block; }

.power-button {
  display: none;
  position: absolute;
  z-index: 3;
  right: 25px;
  bottom: 72px;
  min-width: 96px;
  height: 42px;
  padding: 0 12px;
  border: 2px solid #ffd34e;
  border-radius: 12px;
  background: #720c18;
  color: #ffe45c;
  font: 900 14px Arial, sans-serif;
  cursor: pointer;
  touch-action: manipulation;
}
html[data-phone="true"] .power-button:not([hidden]) { display: block; }
@media (pointer: coarse) {
  .power-button:not([hidden]) { display: block; }
}
.power-button:disabled { opacity: .5; cursor: default; }
.power-button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.power-sequence { display: none; position: absolute; inset: 0; pointer-events: none; }
.is-transforming > .power-sequence { display: block; }
.is-transforming > .walk-frame, .is-transforming > .attack-frame { display: none; }
.power-sequence img { position: absolute; left: 50%; width: auto; max-width: none; transform: translateX(-50%); }

.red-fireball {
  position: absolute;
  z-index: 1;
  aspect-ratio: 1;
  transform: translate(-50%, -50%) rotate(var(--fireball-angle, 0rad));
  border-radius: 50%;
  background: radial-gradient(circle at 43% 46%, #fffbea 0 18%, #ffe46c 33%, #ff781f 63%, #ed2612 83%, #a8180b);
  box-shadow: 0 0 8px #ff7a18, 0 0 15px #f62b19;
  pointer-events: none;
}
.red-fireball::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 22%;
  width: 160%;
  height: 56%;
  border-radius: 55% 12% 12% 55%;
  background: linear-gradient(90deg, #ffb139db, #f9311820 85%, transparent);
}
.art-modal[data-stage="2"] .red-fireball,
.red-fireball.is-spit {
  border: 1px solid #d9f49a;
  border-radius: 67% 33% 58% 42% / 48% 62% 38% 52%;
  background:
    radial-gradient(circle at 74% 28%, #f4ffc4 0 9%, transparent 10%),
    radial-gradient(circle at 28% 72%, #b3d86b 0 7%, transparent 8%),
    radial-gradient(ellipse at 38% 42%, #f1ffbd 0 13%, #b5d96b 30%, #6e9d3c 65%, #314d24 100%);
  box-shadow: 0 0 4px #eaffac, 0 0 10px #a6d85c, 0 0 18px #496e2d;
  filter: saturate(.8);
}
.art-modal[data-stage="2"] .red-fireball::before,
.red-fireball.is-spit::before {
  content: "";
  position: absolute;
  left: -48%;
  top: 28%;
  width: 58%;
  height: 42%;
  border-radius: 70% 30% 62% 38%;
  background: radial-gradient(ellipse at 75% 50%, #bedc78dd 0 26%, #668d3a99 55%, transparent 76%);
  transform: rotate(-10deg);
}
.art-modal[data-stage="2"] .red-fireball::after,
.red-fireball.is-spit::after {
  left: 22%;
  top: 68%;
  width: 120%;
  height: 22%;
  border-radius: 50%;
  background: radial-gradient(ellipse at 20% 50%, #cce58a99 0 14%, #718f4d55 40%, transparent 72%);
  transform: rotate(12deg);
}

.phase-transition {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  background: rgb(0 0 0 / 94%);
  pointer-events: auto;
}
.phase-transition[hidden], .phase-title[hidden] { display: none; }
.phase-title {
  padding: 24px;
  color: #a4ff62;
  text-align: center;
  font: italic 900 clamp(20px, 4cqw, 56px)/1.2 Arial, sans-serif;
  text-shadow: 0 0 20px #3ba51f80;
}
.story-ending {
  position: absolute;
  inset: 0;
  z-index: 11;
  display: grid;
  place-items: center;
  background: #000;
  color: #fff;
  text-align: center;
  pointer-events: auto;
}
.story-ending[hidden] { display: none; }
.story-ending span {
  padding: 24px;
  font: 900 clamp(22px, 5cqw, 72px)/1.15 Arial, sans-serif;
  letter-spacing: .08em;
}
.game-intro {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-content: center;
  gap: 14px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 42%, #182b6440, transparent 34%),
    radial-gradient(circle at 18% 76%, #7c1d9c22, transparent 28%),
    #000;
  color: #fff;
  text-align: center;
  pointer-events: auto;
}
.game-intro::before,
.game-intro::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.game-intro::before {
  background: repeating-linear-gradient(0deg, transparent 0 7px, #6aa8ff0b 8px 9px);
  mix-blend-mode: screen;
  animation: intro-scan 1.4s linear infinite;
}
.game-intro::after {
  inset: 20%;
  border: 1px solid #61d8ff33;
  border-radius: 50%;
  box-shadow: 0 0 50px #396eff33, inset 0 0 50px #b21dff1c;
  animation: intro-pulse 2.2s ease-in-out infinite;
}
.game-intro[hidden] { display: none; }
.game-intro strong {
  position: relative;
  z-index: 1;
  font: 900 clamp(34px, 8cqw, 108px)/1 Arial, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: linear-gradient(90deg, #fff 0%, #5cf2ff 22%, #9c6bff 47%, #ff4e9d 70%, #fff 100%);
  background-size: 240% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 24px #4b8dff99, 0 0 48px #c52dff66;
  animation: intro-title 2.4s linear infinite, intro-jolt 3.2s ease-in-out infinite;
}
.game-intro span {
  position: relative;
  z-index: 1;
  color: #d7d7d7;
  font: 500 clamp(15px, 2.5cqw, 30px)/1.2 Arial, sans-serif;
  letter-spacing: .04em;
}
.game-intro-fun { color: #fff36b !important; font-weight: 900 !important; letter-spacing: .12em !important; text-shadow: 0 0 16px #ff4f3d, 0 0 32px #ffbd3d; }
.game-intro-fun b { display: inline-block; margin-left: .2em; color: #fff; font-size: 1.2em; animation: skull-float 1s ease-in-out infinite alternate; }
.game-intro.is-fun strong { animation-duration: 1.3s, 1.4s; }
@keyframes intro-title { to { background-position: 240% center; } }
@keyframes intro-jolt { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.025); } }
@keyframes intro-scan { to { background-position: 0 18px; } }
@keyframes intro-pulse { 0%, 100% { transform: scale(.85); opacity: .35; } 50% { transform: scale(1.15); opacity: .85; } }
@keyframes skull-float { from { transform: translateY(2px) rotate(-5deg); } to { transform: translateY(-4px) rotate(5deg); } }
@media (prefers-reduced-motion: reduce) {
  .game-intro::before, .game-intro::after, .game-intro strong, .game-intro-fun b { animation: none; }
}
.art-modal[data-stage="2"] .tocred-player {
  right: 34px;
  bottom: 36px;
  height: min(74%, calc(100% - 72px));
  aspect-ratio: .58;
  isolation: isolate;
  filter: none;
  animation: green-toc-wobble 1.65s steps(2, end) infinite;
}
.art-modal[data-stage="2"] .green-toc-frame {
  filter: none !important;
}
.art-modal[data-stage="2"] .tocred-attack,
.art-modal[data-stage="2"] .green-toc-attack,
.art-modal[data-stage="2"] .death-frame,
.art-modal[data-stage="2"] .defense-frame,
.art-modal[data-stage="2"] .tocred-player > .victory-frame { filter: hue-rotate(95deg); }
.art-modal[data-stage="2"] .green-toc-attack { filter: none !important; }
.art-modal[data-stage="2"] .tocred-walk-one,
.art-modal[data-stage="2"] .tocred-walk-two,
.art-modal[data-stage="2"] .tocred-attack { display: none; }
.art-modal[data-stage="2"] .tocred-player.green-toc-vanished { visibility: hidden; }
.art-modal[data-stage="2"] .defense-frame { display: none !important; }
@keyframes green-toc-wobble {
  0%, 100% { transform: rotate(-1deg) scale(1); }
  24% { transform: rotate(2deg) scale(1.02, .98); }
  51% { transform: rotate(-3deg) scale(.98, 1.03); }
  76% { transform: rotate(1deg) scale(1.03, .97); }
}
@media (prefers-reduced-motion: reduce) {
  .art-modal[data-stage="2"] .tocred-player { animation: none; }
}
.fight-result {
  top: auto;
  bottom: 20px;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  padding: 0;
  border: 0;
  background: transparent;
}
.fight-result .replay-button { margin-top: 0; white-space: nowrap; }

.is-celebrating {
  isolation: isolate;
}
.is-celebrating > .victory-frame {
  z-index: 1;
  animation: winner-energy 1.6s ease-in-out infinite;
}
.is-celebrating::before,
.is-celebrating::after {
  content: "";
  position: absolute;
  pointer-events: none;
}
.is-celebrating::before {
  z-index: 0;
  left: 50%;
  top: 48%;
  width: 260%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent, #ffcc3ccc, #fc2a7466, transparent, #45e4ffcc, transparent, #ffd45ecc, transparent);
  mask-image: radial-gradient(ellipse, transparent 22%, #000 43%, transparent 68%);
  animation: winner-vortex 3s linear infinite;
}
.is-celebrating::after {
  z-index: 2;
  left: -70%;
  top: -10%;
  width: 240%;
  height: 115%;
  background:
    radial-gradient(circle at 16% 28%, #fff6b2 0 2px, transparent 4px),
    radial-gradient(circle at 82% 18%, #61efff 0 3px, transparent 5px),
    radial-gradient(circle at 34% 68%, #ffb731 0 2px, transparent 5px),
    radial-gradient(circle at 89% 77%, #ff64a3 0 2px, transparent 4px),
    radial-gradient(circle at 10% 88%, #a5fff3 0 2px, transparent 4px),
    radial-gradient(circle at 67% 44%, #fff4bb 0 2px, transparent 4px);
  animation: winner-sparks 1.8s ease-in-out infinite alternate;
}
@keyframes winner-energy {
  0%, 100% { filter: brightness(1.05) drop-shadow(0 0 6px #ffd04c) drop-shadow(0 0 12px #ff417c80); }
  50% { filter: brightness(1.22) drop-shadow(0 0 12px #6af5ff) drop-shadow(0 0 22px #8761ff90); }
}
@keyframes winner-vortex {
  from { transform: translate(-50%, -50%) rotate(0deg) scale(.94); }
  to { transform: translate(-50%, -50%) rotate(360deg) scale(1.05); }
}
@keyframes winner-sparks {
  from { opacity: .45; transform: translateY(8px) scale(.94); }
  to { opacity: 1; transform: translateY(-14px) scale(1.08); }
}
@media (prefers-reduced-motion: reduce) {
  .is-celebrating > .victory-frame,
  .is-celebrating::before,
  .is-celebrating::after { animation: none; }
  .is-celebrating > .victory-frame { filter: drop-shadow(0 0 10px #ffd04c); }
  .is-celebrating::before { transform: translate(-50%, -50%); opacity: .6; }
}

.keyboard-help {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 20px;
  width: max-content;
  max-width: calc(100% - 40px);
  padding: 10px 16px;
  border: 1px solid #6a493b;
  border-radius: 12px;
  background: #100b0de8;
  color: #fff2db;
  font: 12px/1.5 Arial, sans-serif;
}
.keyboard-help span { white-space: nowrap; }
.keyboard-help kbd {
  display: inline-block;
  min-width: 22px;
  margin-right: 3px;
  padding: 1px 6px;
  border: 1px solid #9e8040;
  border-bottom-width: 2px;
  border-radius: 4px;
  color: #ffe45c;
  font: 700 12px Arial, sans-serif;
  text-align: center;
}
html[data-phone="true"] .keyboard-help { display: none; }
@media (pointer: coarse) { .keyboard-help { display: none; } }

.power-unleashed .street-stage::before,
.power-unleashed .street-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}
.power-unleashed .street-stage::before {
  background:
    radial-gradient(ellipse at 30% 60%, transparent 12%, #17051d80 55%, #000e 100%),
    linear-gradient(110deg, #4f07341a, #180a453d, #39051938);
  box-shadow: inset 0 0 90px 20px #07000ad9;
  animation: power-dread 2.4s ease-in-out infinite alternate;
}
.power-unleashed .street-stage::after {
  background: repeating-linear-gradient(0deg, transparent 0 7px, #b844c90a 8px 9px);
  opacity: .35;
  animation: power-haze 2s linear infinite;
}
.power-unleashed .art-card {
  animation: power-tremor 1.8s ease-in-out infinite;
}
.art-modal.power-unleashed .tocred-player {
  filter: hue-rotate(270deg) saturate(1.8) drop-shadow(0 0 14px #c04cff);
  animation: enemy-cursed 1.4s ease-in-out infinite;
}
@keyframes power-dread {
  from { opacity: .65; }
  to { opacity: 1; }
}
@keyframes power-haze {
  from { background-position: 0 0; }
  to { background-position: 0 18px; }
}
@keyframes power-tremor {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-2px, 1px); }
  50% { transform: translate(1px, -1px); }
  75% { transform: translate(2px, 1px); }
}
@keyframes enemy-cursed {
  0%, 100% { opacity: 1; }
  50% { opacity: .55; }
}
@media (prefers-reduced-motion: reduce) {
  .power-unleashed .street-stage::before,
  .power-unleashed .street-stage::after,
  .power-unleashed .art-card,
  .art-modal.power-unleashed .tocred-player { animation: none; }
}

.art-modal.power-unleashed .tocred-player {
  animation: monster-power-color .2s linear infinite, monster-power-shake .14s steps(2, end) infinite;
}
@keyframes monster-power-color {
  0% { filter: hue-rotate(0deg) saturate(2.2) drop-shadow(0 0 14px #c04cff); }
  25% { filter: hue-rotate(90deg) saturate(2.2) drop-shadow(0 0 14px #4cfff0); }
  50% { filter: hue-rotate(180deg) saturate(2.2) drop-shadow(0 0 14px #fff04c); }
  75% { filter: hue-rotate(270deg) saturate(2.2) drop-shadow(0 0 14px #ff4c9d); }
  100% { filter: hue-rotate(360deg) saturate(2.2) drop-shadow(0 0 14px #c04cff); }
}
@keyframes monster-power-shake {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(-3px, 1px) rotate(-1deg); }
  50% { transform: translate(3px, -1px) rotate(1deg); }
  75% { transform: translate(-2px, -1px) rotate(.5deg); }
}

.power-burst {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: radial-gradient(circle, #fff 0 3%, #ffe777 9%, #ff6a2d 23%, #d51d45 43%, transparent 72%), #fff;
  opacity: 0;
  pointer-events: none;
}
.power-burst[hidden] { display: none; }
.power-burst::before,
.power-burst::after {
  content: "";
  position: absolute;
  width: 18vmax;
  height: 18vmax;
  border: clamp(8px, 2cqw, 24px) solid #fff8bd;
  border-radius: 50%;
  box-shadow: 0 0 28px #ff9d35, 0 0 60px #ff304f;
  transform: scale(.08);
}
.power-burst::after { width: 42vmax; height: 42vmax; border-color: #ff502b; }
.power-burst.is-active { animation: power-explosion .8s ease-out both; }
.power-burst.is-active::before { animation: power-explosion-ring .8s ease-out both; }
.power-burst.is-active::after { animation: power-explosion-ring .8s .06s ease-out both; }
@keyframes power-explosion {
  0% { opacity: 0; background-size: 20% 20%; }
  14% { opacity: 1; background-size: 100% 100%; }
  100% { opacity: 0; background-size: 180% 180%; }
}
@keyframes power-explosion-ring {
  0% { opacity: 1; transform: scale(.08); }
  100% { opacity: 0; transform: scale(2.2); }
}
@media (prefers-reduced-motion: reduce) {
  .art-modal.power-unleashed .tocred-player { animation: none; }
  .power-burst.is-active { animation-duration: .45s; }
  .power-burst.is-active::before,
  .power-burst.is-active::after { animation-duration: .45s; }
}

.death-frame {
  display: none;
  position: absolute;
  height: auto;
  max-width: none;
  left: 50%;
  transform: translateX(-48.3073%);
  pointer-events: none;
  user-select: none;
}
.is-dying > .tocred-frame, .is-dying > .green-toc-frame {
  transform-origin: center bottom;
  animation: opponent-defeat 2s ease-out both;
}
.is-defeated > .tocred-frame,
.is-defeated > .green-toc-frame,
.is-defeated > .defense-frame,
.is-defeated > .victory-frame { display: none; }
.is-defeated > .death-frame { display: block; }
@keyframes opponent-defeat {
  0% { filter: brightness(1) drop-shadow(0 0 2px #ff7517); transform: translateY(0) scale(1); }
  25% { filter: brightness(1.35) saturate(1.7) drop-shadow(0 0 14px #ff3c13); transform: translateY(2px) scale(.98); }
  55% { filter: brightness(.8) sepia(.3) drop-shadow(0 0 8px #ef472a); transform: translateY(5px) scale(.96); }
  100% { filter: brightness(.4) saturate(.5); transform: translateY(10px) scale(.92); }
}
@media (prefers-reduced-motion: reduce) {
  .is-dying > .tocred-frame { animation: none; filter: brightness(.7) drop-shadow(0 0 8px #ff5427); }
}

.art-modal [hidden] { display: none !important; }
.art-modal:not(.is-playing) .art-card {
  display: grid;
  width: min(92cqw, 600px, calc((80cqh - 126px) * 1672 / 941 + 18px));
  padding: 8px;
}
.art-modal:not(.is-playing) .art-card > img { order: 0; }
.art-modal:not(.is-playing) .modal-actions {
  position: static;
  order: 1;
  justify-content: center;
  margin: 0;
}

.art-modal:not(.is-playing) .street-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 28px 16px 42px;
  background: #000 url('./fundo-sala.jpg') center / cover no-repeat;
}
.art-modal:not(.is-playing) .art-card {
  flex: none;
  order: 0;
  width: min(88cqw, 760px, calc((100cqh - 154px) * 1672 / 941 + 18px));
}
.art-modal:not(.is-playing) .shortcut-button {
  display: block;
  order: 2;
  flex: none;
  position: relative;
  top: 22px;
  transform: none;
}
.art-modal:not(.is-playing) .site-footer {
  display: block;
  order: 3;
  position: relative;
  top: 22px;
  max-width: min(92cqw, 620px);
  margin-top: 4px;
  padding: 0 12px;
  color: #d4d8e2;
  font: 500 clamp(11px, 1.5cqw, 15px)/1.3 Arial, sans-serif;
  letter-spacing: .025em;
  text-align: center;
}
.site-footer a {
  color: #b8cfff;
  text-decoration: underline;
  text-decoration-color: #7d96d7;
  text-underline-offset: 3px;
}
.site-footer a:hover { color: #fff; }
.art-modal:not(.is-playing) .modal-actions { order: 1; }

@media (max-width: 600px) {
  .art-modal:not(.is-playing) .street-stage {
    gap: 14px;
    padding: 20px 12px 48px;
  }
  .art-modal:not(.is-playing) .art-card {
    width: min(92cqw, 760px, calc((100cqh - 210px) * 1672 / 941 + 18px));
  }
  .art-modal:not(.is-playing) .modal-actions { margin-top: 12px; }
  .art-modal:not(.is-playing) .site-footer {
    top: 72px;
    max-width: 94cqw;
    font-size: 11px;
  }
}

.art-modal.is-playing .modal-actions { display: none; }

.art-modal:not(.is-playing) .modal-actions { margin-top: 24px; }

/* Cada cinco golpes recebidos, todos os sprites do monstro mudam de matiz. */
.tocred-player.monster-color-shifted > img {
  filter: hue-rotate(var(--monster-hue)) !important;
}

.fire-splash {
  position: absolute;
  z-index: 3;
  pointer-events: none;
}
.fire-splash > span {
  position: absolute;
  width: clamp(7px, 1.1cqw, 13px);
  aspect-ratio: 1;
  border-radius: 50%;
  opacity: 0;
  background: radial-gradient(circle, #fff8ba 0 20%, #ffd12c 40%, #ff6a19 70%, #e32610);
  box-shadow: 0 0 7px #ff7a1a;
}
.green-attack-burst {
  position: absolute;
  z-index: 3;
  width: clamp(16px, 3cqw, 32px);
  aspect-ratio: 1;
  border-radius: 47% 53% 38% 62%;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(circle at 38% 35%, #f7ffd8 0 12%, #d9ed7c 25%, #8aa64b 58%, transparent 72%);
  box-shadow: 0 0 4px #efffb0, 0 0 10px #89a957;
}
.green-attack-burst::before,
.green-attack-burst::after {
  content: "";
  position: absolute;
  width: 34%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #cfe687;
  box-shadow: 0 0 5px #a8c66a;
}
.green-attack-burst::before { left: -22%; top: 35%; }
.green-attack-burst::after { right: -18%; top: 8%; width: 24%; }
