:root {
  --bg-deep: #0f0f12;
  --text: #ffffff;
  --c-green: #00ff9d;
  --c-blue: #00a8ff;
  --c-purple: #bd00ff;
  --c-gold: #ffd700;
  --glass: rgba(255, 255, 255, 0.05);
  --pntd-glass-border: rgba(255, 255, 255, 0.1);
  --card-radius: 12px;
  --ease-float: cubic-bezier(0.2, 0.8, 0.2, 1);
  
  --c-neon-pink: #ff007f;
  --c-neon-cyan: #00f0ff;
  --ease-snap: cubic-bezier(0.1, 1, 0.1, 1);
  --ease-erratic: cubic-bezier(0.25, 0.1, 0.25, 1.5);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-deep);
  background:
    radial-gradient(
      circle at 10% 20%,
      rgba(217, 4, 41, 0.05) 0%,
      transparent 40%
    ),
    radial-gradient(
      circle at 90% 80%,
      rgba(0, 217, 191, 0.05) 0%,
      transparent 40%
    ),
    radial-gradient(circle at 50% 50%, #100510 0%, #020202 100%);
  color: var(--text);
  font-family: var(--pntd-font);
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  overscroll-behavior-y: none;
}

.gallery-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 20px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(
    to bottom,
    rgba(15, 15, 18, 0.95) 0%,
    rgba(15, 15, 18, 0) 100%
  );
  pointer-events: none;
  transition: opacity 0.8s;
}

.header-left,
.header-right {
  pointer-events: auto;
  display: flex;
  gap: 15px;
  align-items: center;
}

.nav-btn {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--pntd-glass-border);
  backdrop-filter: blur(10px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  touch-action: auto;
  -webkit-tap-highlight-color: transparent;
  transition: 0.3s;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.resonance-pill {
  background: rgba(20, 20, 20, 0.6);
  border: 1px solid var(--pntd-glass-border);
  backdrop-filter: blur(10px);
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 1px;
  display: flex;
  gap: 12px;
  align-items: center;
  pointer-events: auto;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: 0.3s;
}

.score-bump {
  animation: flashGold 0.5s ease-out;
  border-color: var(--c-gold);
  color: #fff;
}

@keyframes flashGold {
  50% {
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
    transform: scale(1.05);
  }
}

.progress-text {
  font-family: monospace;
  font-size: 0.8rem;
  color: #888;
  display: flex;
  align-items: center;
  gap: 6px;
}

.progress-text i {
  font-size: 0.7rem;
  color: #555;
}

#gallery-stage {
  padding: 100px 20px 100px;
  max-width: 1600px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.chunk-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 60px 0 40px;
  opacity: 0;
  animation: fadeIn 1s forwards;
}

.chunk-divider--held {
  animation: none;
  opacity: 0;
  transform: scaleX(0.4);
  pointer-events: none;
}

.chunk-divider--reveal {
  animation: dividerBreak 0.7s cubic-bezier(0.2, 1.3, 0.4, 1) forwards;
}

@keyframes dividerBreak {
  0%   { opacity: 0; transform: scaleX(0.15); filter: brightness(3); }
  30%  { opacity: 1; transform: scaleX(1.08); filter: brightness(1.8) drop-shadow(0 0 12px var(--tier-color)); }
  55%  { transform: scaleX(0.97); filter: brightness(1.2); }
  75%  { transform: scaleX(1.02); }
  100% { opacity: 1; transform: scaleX(1); filter: brightness(1); }
}

.div-line {
  height: 1px;
  width: 120px;
  background: linear-gradient(90deg, transparent, currentColor, transparent);
  opacity: 0.6;
}

.div-node {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  margin: 0 20px;
  box-shadow: 0 0 15px currentColor;
  transform: rotate(45deg);
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.masonry-row {
  display: flex;
  gap: 20px;
  width: 100%;
  align-items: flex-start;
}

.masonry-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

@media (max-width: 800px) {
  .masonry-row,
  .masonry-col {
    gap: 10px;
  }
}

.art-card {
  position: relative;
  border-radius: var(--card-radius);
  overflow: hidden;
  cursor: pointer;
  opacity: 0;
  transform: translateY(60px) scale(0.9);
  transition:
    transform 0.4s var(--ease-float),
    box-shadow 0.4s ease,
    border-color 0.4s ease;
  border: 1px solid rgba(255, 255, 255, 0.05);
  user-select: none;
  display: block;
  width: 100%;
  background: linear-gradient(110deg, #151515 8%, #222 18%, #151515 33%);
  background-size: 200% 100%;
}

.art-card.visible {
  animation: cardSlam 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.art-card.visible:not(.img-loaded) {
  animation:
    cardSlam 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards,
    cardShimmer 1.5s linear infinite;
}

@keyframes cardSlam {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes cardShimmer {
  to {
    background-position-x: -200%;
  }
}

.art-card:hover {
  transform: translateY(-6px) scale(1.01);
  z-index: 5;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.2);
}

.art-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: -150%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    115deg,
    transparent 40%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 60%
  );
  transform: skewX(-20deg);
  pointer-events: none;
  transition: 0.6s;
  z-index: 2;
}

.art-card:hover::after {
  left: 150%;
  transition: 0.8s;
}

.art-card img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.8s ease;
  opacity: 0;
  filter: brightness(0.9);
}

.art-card img.loaded {
  opacity: 1;
}

.art-card[data-border="green"] {
  border-bottom: 2px solid var(--c-green);
}

.art-card[data-border="blue"] {
  border-bottom: 2px solid var(--c-blue);
}

.art-card[data-border="purple"] {
  border-bottom: 2px solid var(--c-purple);
}

.art-card[data-border="gold"] {
  border: 1px solid var(--c-gold);
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.1);
}

.art-card.pearl::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  background: linear-gradient(
    135deg,
    rgba(255, 0, 128, 0.1),
    rgba(0, 255, 255, 0.1)
  );
  mix-blend-mode: overlay;
  opacity: 0.5;
}

/* visibility:hidden not display:none — preserves column layout while waiting for reveal */
.art-card:not(.visible):not(.gacha-reveal) {
  visibility: hidden;
  pointer-events: none;
}

.art-card.gacha-reveal {
  visibility: visible;
  animation: gachaStrike 0.65s cubic-bezier(0.2, 1.35, 0.4, 1) forwards;
  pointer-events: auto;
}

@keyframes gachaStrike {
  0% {
    opacity: 0;
    transform: translateY(32px) scale(0.84);
    filter: brightness(3) saturate(0);
    box-shadow: 0 0 0 0 var(--tier-color, transparent);
  }
  20% {
    opacity: 1;
    transform: translateY(-6px) scale(1.05);
    filter: brightness(2.2) saturate(1.8);
    box-shadow: 0 0 30px 5px var(--tier-color, transparent);
  }
  42% {
    transform: translateY(2px) scale(0.98);
    filter: brightness(1.15) saturate(1.2);
    box-shadow: 0 0 14px 1px var(--tier-color, transparent);
  }
  68% {
    transform: translateY(-1px) scale(1.005);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: brightness(1) saturate(1);
    box-shadow: 0 0 0 0 transparent;
  }
}

@keyframes gachaStrikeMobile {
  0%   { opacity: 0; transform: translateY(22px) scale(0.88); filter: brightness(2.5) saturate(0); box-shadow: 0 0 0 0 var(--tier-color, transparent); }
  22%  { opacity: 1; transform: translateY(-4px) scale(1.04); filter: brightness(1.8) saturate(1.5); box-shadow: 0 0 20px 4px var(--tier-color, transparent); }
  50%  { transform: translateY(1px) scale(0.99); filter: brightness(1.1); box-shadow: 0 0 8px 0px var(--tier-color, transparent); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: brightness(1) saturate(1); box-shadow: 0 0 0 0 transparent; }
}

@media (max-width: 768px) {
  .art-card.gacha-reveal {
    animation-name: gachaStrikeMobile;
    animation-duration: 0.5s;
    animation-timing-function: cubic-bezier(0.25, 1.2, 0.4, 1);
  }
}

.trigger-wrapper {
  position: relative;
  z-index: 10;
  padding: 80px 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
}

.orb-field {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(0, 240, 255, 0.04) 0%,
    rgba(255, 0, 127, 0.02) 50%,
    transparent 70%
  );
  animation: fieldBreathe 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes fieldBreathe {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.12); opacity: 1; }
}

.orb-particles {
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  pointer-events: none;
}

.orb-particle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  margin: -2px;
  border-radius: 50%;
}

.orb-particle:nth-child(1) {
  background: var(--c-neon-cyan);
  box-shadow: 0 0 6px var(--c-neon-cyan);
  animation: orbit1 5s linear infinite;
}
.orb-particle:nth-child(2) {
  background: var(--c-neon-pink);
  box-shadow: 0 0 6px var(--c-neon-pink);
  width: 3px; height: 3px; margin: -1.5px;
  animation: orbit2 7s linear infinite;
}
.orb-particle:nth-child(3) {
  background: #ffd700;
  box-shadow: 0 0 6px #ffd700;
  width: 3px; height: 3px; margin: -1.5px;
  animation: orbit3 9s linear infinite reverse;
}
.orb-particle:nth-child(4) {
  background: var(--c-neon-cyan);
  box-shadow: 0 0 4px var(--c-neon-cyan);
  width: 2px; height: 2px; margin: -1px;
  animation: orbit4 6s linear infinite;
}
.orb-particle:nth-child(5) {
  background: var(--c-neon-pink);
  box-shadow: 0 0 4px var(--c-neon-pink);
  width: 2px; height: 2px; margin: -1px;
  animation: orbit5 8s linear infinite reverse;
}

@keyframes orbit1 {
  from { transform: rotate(0deg) translateX(90px); }
  to   { transform: rotate(360deg) translateX(90px); }
}
@keyframes orbit2 {
  from { transform: rotate(72deg) translateX(75px); }
  to   { transform: rotate(432deg) translateX(75px); }
}
@keyframes orbit3 {
  from { transform: rotate(144deg) translateX(105px); }
  to   { transform: rotate(-216deg) translateX(105px); }
}
@keyframes orbit4 {
  from { transform: rotate(216deg) translateX(60px); }
  to   { transform: rotate(576deg) translateX(60px); }
}
@keyframes orbit5 {
  from { transform: rotate(288deg) translateX(80px); }
  to   { transform: rotate(-72deg) translateX(80px); }
}

.vandal-btn {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 35%, #1e1e28 0%, #0a0a10 70%);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.35s ease;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.06),
    0 0 30px rgba(0,0,0,0.8),
    inset 0 1px 0 rgba(255,255,255,0.08);
  z-index: 2;
}

.vandal-btn::before {
  content: '';
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 1.5px solid rgba(0, 240, 255, 0.25);
  animation: ringBreath1 3.5s ease-in-out infinite;
}

.vandal-btn::after {
  content: '';
  position: absolute;
  inset: -28px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 0, 127, 0.2);
  animation: ringSpin2 18s linear infinite reverse;
}

@keyframes ringBreath1 {
  0%, 100% {
    transform: scale(1);
    border-color: rgba(0, 240, 255, 0.2);
    box-shadow: 0 0 0 transparent;
  }
  50% {
    transform: scale(1.06);
    border-color: rgba(0, 240, 255, 0.5);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.15);
  }
}

@keyframes ringSpin2 {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.vandal-btn .orb-ring3 {
  position: absolute;
  inset: -44px;
  border-radius: 50%;
  border: 1.5px solid transparent;
  border-top-color: rgba(255, 215, 0, 0.35);
  border-right-color: rgba(255, 215, 0, 0.1);
  animation: ringOrbit3 8s linear infinite;
  pointer-events: none;
}

@keyframes ringOrbit3 {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.orb-icon {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  pointer-events: none;
}

.orb-chevrons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.orb-chevrons span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  clip-path: polygon(0 0, 50% 100%, 100% 0);
  animation: chevronCascade 2.4s ease-in-out infinite;
}

.orb-chevrons span:nth-child(1) { opacity: 0.35; animation-delay: 0s; }
.orb-chevrons span:nth-child(2) { opacity: 0.65; animation-delay: 0.18s; }
.orb-chevrons span:nth-child(3) { opacity: 1;    animation-delay: 0.36s; }

@keyframes chevronCascade {
  0%, 100% { transform: translateY(0); opacity: inherit; }
  50% { transform: translateY(5px); filter: drop-shadow(0 0 4px var(--c-neon-cyan)); }
}

.vandal-btn:hover {
  transform: scale(1.08);
  box-shadow:
    0 0 0 1px rgba(0, 240, 255, 0.3),
    0 0 50px rgba(0, 240, 255, 0.12),
    0 20px 60px rgba(0, 0, 0, 0.8),
    inset 0 1px 0 rgba(255,255,255,0.12);
}

.vandal-btn:hover::before {
  animation: ringPulseHover 0.8s ease-in-out infinite;
  border-color: rgba(0, 240, 255, 0.7);
}

@keyframes ringPulseHover {
  0%, 100% { transform: scale(1); box-shadow: 0 0 15px rgba(0, 240, 255, 0.2); }
  50%       { transform: scale(1.08); box-shadow: 0 0 30px rgba(0, 240, 255, 0.4); }
}

.vandal-btn:hover .orb-chevrons span {
  animation-duration: 1.2s;
}

.vandal-btn:hover .orb-chevrons span:nth-child(1) { opacity: 0.5; }
.vandal-btn:hover .orb-chevrons span:nth-child(2) { opacity: 0.8; }
.vandal-btn:hover .orb-chevrons span:nth-child(3) { opacity: 1; filter: drop-shadow(0 0 6px var(--c-neon-cyan)); }

.vandal-btn:active,
.vandal-btn.is-imploding {
  transform: scale(0.88);
  box-shadow:
    0 0 0 1px rgba(255, 0, 127, 0.5),
    0 0 60px rgba(255, 0, 127, 0.3),
    inset 0 0 20px rgba(255, 0, 127, 0.15);
  transition: transform 0.15s cubic-bezier(0.6, 0, 0.4, 1), box-shadow 0.15s ease;
}

.vandal-btn.is-fired {
  animation: orbImplode 0.45s cubic-bezier(0.6, 0, 0.4, 1.4) forwards;
}

@keyframes orbImplode {
  0%   { transform: scale(1); opacity: 1; filter: brightness(1); }
  40%  { transform: scale(1.15); opacity: 1; filter: brightness(2) drop-shadow(0 0 20px var(--c-neon-pink)); }
  100% { transform: scale(0); opacity: 0; filter: brightness(3); }
}

#chaos-layer {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  display: none;
}

#chaos-layer.is-active { display: block; }

.c-shockwave {
  position: absolute;
  top: var(--sw-origin-y, 50%);
  left: var(--sw-origin-x, 50%);
  width: 0; height: 0;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
}

.is-active .c-shockwave {
  animation: shockwaveExpand 0.6s cubic-bezier(0.1, 0.6, 0.3, 1) forwards;
}

@keyframes shockwaveExpand {
  0%   { width: 0; height: 0; opacity: 1;
         box-shadow: 0 0 0 0 var(--tier-color), 0 0 0 4px rgba(255,255,255,0.6); }
  50%  { opacity: 0.8;
         box-shadow: 0 0 0 40vw rgba(0,0,0,0), 0 0 0 6px var(--tier-color); }
  100% { width: 250vw; height: 250vw; opacity: 0;
         box-shadow: 0 0 80px 10px var(--tier-color), 0 0 0 0 transparent; }
}

.c-scan {
  position: absolute;
  left: 0; right: 0;
  height: 3px;
  top: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--tier-color) 20%,
    rgba(255,255,255,0.9) 50%,
    var(--tier-color) 80%,
    transparent 100%
  );
  box-shadow: 0 0 20px 4px var(--tier-color), 0 0 60px 8px rgba(255,255,255,0.2);
  opacity: 0;
}

.is-active .c-scan {
  animation: scanSweep 0.55s 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes scanSweep {
  0%   { top: 100%; opacity: 1; }
  100% { top: -3px;  opacity: 0.6; }
}

.c-fracture {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
}

.is-active .c-fracture {
  animation: fractureReveal 0.5s 0.95s ease-out forwards;
}

@keyframes fractureReveal {
  0%   { opacity: 0; }
  15%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { opacity: 0; }
}

.c-fracture-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.c-crack {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  vector-effect: non-scaling-stroke;
}

.c-crack-1 { stroke: var(--tier-color); stroke-width: 2; filter: drop-shadow(0 0 6px var(--tier-color)); }
.c-crack-2 { stroke: rgba(255,255,255,0.7); stroke-width: 1.5; filter: drop-shadow(0 0 4px var(--tier-color)); }
.c-crack-3 { stroke: var(--tier-color); stroke-width: 2; filter: drop-shadow(0 0 8px var(--tier-color)); }
.c-crack-4 { stroke: rgba(255,255,255,0.5); stroke-width: 1; }
.c-crack-5 { stroke: var(--tier-color); stroke-width: 1.5; filter: drop-shadow(0 0 4px var(--tier-color)); }
.c-crack-6 { stroke: rgba(255,255,255,0.4); stroke-width: 1; }

.is-active .c-crack-1 { animation: crackDraw 0.3s 1.0s ease-out forwards; }
.is-active .c-crack-2 { animation: crackDraw 0.25s 1.05s ease-out forwards; }
.is-active .c-crack-3 { animation: crackDraw 0.35s 1.02s ease-out forwards; }
.is-active .c-crack-4 { animation: crackDraw 0.2s 1.08s ease-out forwards; }
.is-active .c-crack-5 { animation: crackDraw 0.28s 1.04s ease-out forwards; }
.is-active .c-crack-6 { animation: crackDraw 0.22s 1.06s ease-out forwards; }

@keyframes crackDraw {
  to { stroke-dashoffset: 0; }
}

.c-fracture::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at 50% 50%,
    var(--tier-color) 0%,
    transparent 60%
  );
  opacity: 0;
  mix-blend-mode: screen;
  animation: none;
}

.is-active .c-fracture::after {
  animation: bleedGlow 0.5s 1.0s ease-out forwards;
}

@keyframes bleedGlow {
  0%   { opacity: 0; }
  40%  { opacity: 0.35; }
  100% { opacity: 0; }
}

.c-bg { position: absolute; inset: 0; background: #000; opacity: 0; }
.is-active .c-bg { animation: voidFlash 3.0s 1.3s forwards; }

@keyframes voidFlash {
  0%   { opacity: 0; }
  4%   { opacity: 0.9; }
  35%  { opacity: 0.95; background: #000; }
  36%  { opacity: 1; background: var(--tier-color); }
  40%  { opacity: 1; background: #000; }
  88%  { opacity: 1; }
  100% { opacity: 0; }
}

.c-scratch {
  position: absolute;
  top: 50%; left: 50%;
  width: 150vw; height: 150vh;
  transform: translate(-50%, -50%);
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 8px,
    rgba(255, 255, 255, 0.8) 8px,
    rgba(255, 255, 255, 0.8) 12px
  );
  mix-blend-mode: overlay;
  opacity: 0;
  clip-path: circle(0% at 50% 50%);
}
.is-active .c-scratch { animation: scratchWindup 1.0s 1.35s ease-in forwards; }

@keyframes scratchWindup {
  0%   { opacity: 0; clip-path: polygon(50% 50%, 50% 50%, 50% 50%, 50% 50%); }
  20%  { opacity: 1; clip-path: polygon(10% 20%, 90% 10%, 80% 90%, 20% 80%); transform: translate(-50%, -50%) rotate(15deg); }
  40%  { background: var(--c-neon-pink); transform: translate(-50%, -50%) rotate(-35deg) scale(1.2); }
  70%  { background: var(--c-neon-cyan); transform: translate(-50%, -50%) rotate(70deg) scale(1.5); }
  90%  { opacity: 1; }
  100% { opacity: 0; }
}

.c-strike-container { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.c-slash {
  position: absolute; background: var(--tier-color);
  box-shadow: 0 0 60px var(--tier-color);
  border-radius: 50%; opacity: 0; mix-blend-mode: screen;
}
.is-active .c-slash-1 { width: 180vw; height: 15vh; transform: rotate(18deg) scaleY(0); animation: slashPop 0.4s 1.75s var(--ease-snap) forwards; }
.is-active .c-slash-2 { width: 160vw; height: 8vh; transform: rotate(-32deg) scaleY(0); animation: slashPop 0.5s 1.80s var(--ease-snap) forwards; }
.is-active .c-slash-3 { width: 30vw; height: 140vh; transform: rotate(55deg) scaleX(0); animation: slashPop 0.6s 1.85s var(--ease-snap) forwards; }

@keyframes slashPop {
  0%   { opacity: 1; transform: rotate(var(--rot)) scaleY(0) scaleX(1); filter: brightness(2); }
  30%  { opacity: 1; transform: rotate(var(--rot)) scaleY(1) scaleX(1.1); filter: brightness(1); }
  100% { opacity: 0; transform: rotate(var(--rot)) scaleY(0) scaleX(1.3); }
}

.c-splatter {
  position: absolute; width: var(--size); height: var(--size);
  background: var(--tier-color); border-radius: 50%;
  top: 50%; left: 50%; opacity: 0; box-shadow: 0 0 20px var(--tier-color);
}
.is-active .c-splat-1 { --size: 40px; animation: splatFly 0.6s 1.75s cubic-bezier(0.1, 1, 0.3, 1) forwards; --tx: -40vw; --ty: -30vh; }
.is-active .c-splat-2 { --size: 25px; animation: splatFly 0.5s 1.78s cubic-bezier(0.1, 1, 0.3, 1) forwards; --tx: 30vw; --ty: -40vh; }
.is-active .c-splat-3 { --size: 60px; animation: splatFly 0.7s 1.80s cubic-bezier(0.1, 1, 0.3, 1) forwards; --tx: 45vw; --ty: 20vh; }
.is-active .c-splat-4 { --size: 30px; animation: splatFly 0.55s 1.77s cubic-bezier(0.1, 1, 0.3, 1) forwards; --tx: -35vw; --ty: 35vh; }

@keyframes splatFly {
  0%   { opacity: 1; transform: translate(0, 0) scale(0); }
  100% { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(1.5); }
}

.c-text-container { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.c-title { font-size: 10vw; font-weight: 900; text-transform: uppercase; font-style: italic; color: #fff; position: relative; opacity: 0; transform: scale(2) skewX(-15deg); line-height: 0.9; }

.c-title::before, .c-title::after { content: attr(data-text); position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0.8; pointer-events: none; }
.c-title::before { color: var(--c-neon-cyan); z-index: -1; transform: translate(-15px, 8px); mix-blend-mode: screen; }
.c-title::after  { color: var(--c-neon-pink); z-index: -2; transform: translate(15px, -8px); mix-blend-mode: screen; }

.c-rank { font-family: monospace; font-size: 2vw; letter-spacing: 0.8em; color: var(--tier-color); margin-top: 10px; opacity: 0; transform: translateY(20px); text-shadow: 0 0 20px var(--tier-color); z-index: 5; }

.is-active .c-title { animation: textSlam 1.8s 1.75s var(--ease-erratic) forwards; }
.is-active .c-rank  { animation: rankFade 1.5s 1.95s var(--ease-snap) forwards; }

@keyframes textSlam {
  0%   { opacity: 0; transform: scale(2) skewX(-30deg) translateY(-50px); filter: blur(20px); }
  15%  { opacity: 1; transform: scale(0.9) skewX(5deg) translateY(10px); filter: blur(0px); }
  30%  { opacity: 1; transform: scale(1) skewX(-15deg) translateY(0); }
  80%  { opacity: 1; transform: scale(1.05) skewX(-15deg); filter: blur(0px); }
  100% { opacity: 0; transform: scale(1.2) skewX(-30deg); filter: blur(10px); }
}

@keyframes rankFade {
  0%   { opacity: 0; transform: translateY(20px); }
  20%  { opacity: 1; transform: translateY(0); }
  80%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(-20px); }
}

body.is-shaking { animation: brutalShake 0.4s cubic-bezier(.36,.07,.19,.97) both; }
@keyframes brutalShake {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  10% { transform: translate(-20px, 20px) rotate(-3deg); }
  20% { transform: translate(20px, -20px) rotate(3deg); }
  30% { transform: translate(-25px, -15px) rotate(-2deg); }
  40% { transform: translate(25px, 15px) rotate(2deg); }
  50% { transform: translate(-15px, 25px) rotate(-4deg); }
  60% { transform: translate(15px, -25px) rotate(4deg); }
  70% { transform: translate(-10px, 10px) rotate(-1deg); }
}

.theater {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #050505;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  display: none;
  overflow: hidden;
}

.t-palette-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.tpb-blob {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  mix-blend-mode: screen;
  transition: opacity 0.7s ease;
  will-change: opacity;
}

.tpb-0 {
  width: 80vw;
  height: 80vw;
  max-width: 900px;
  max-height: 900px;
  top: -30%;
  right: -20%;
  filter: blur(130px);
}

.tpb-1 {
  width: 65vw;
  height: 65vw;
  max-width: 750px;
  max-height: 750px;
  bottom: -25%;
  left: -15%;
  filter: blur(110px);
}

.tpb-2 {
  width: 55vw;
  height: 55vw;
  max-width: 600px;
  max-height: 600px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  filter: blur(150px);
}

@media (max-width: 900px) {
  .tpb-0 { width: 100vw; height: 100vw; filter: blur(90px); }
  .tpb-1 { width: 85vw;  height: 85vw;  filter: blur(75px);  }
  .tpb-2 { width: 70vw;  height: 70vw;  filter: blur(100px); }
}

@media (max-width: 480px) {
  .tpb-0 { filter: blur(70px); }
  .tpb-1 { filter: blur(60px); }
  .tpb-2 { filter: blur(80px); }
}

.theater.visible {
  display: flex;
}

.theater.active {
  opacity: 1;
  pointer-events: auto;
}

.t-stage {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 1;
}

.theater.active .t-stage {
  touch-action: none;
}

.pntd-lb-img {
  box-shadow: 0 0 100px rgba(0, 0, 0, 0.8);
}

.t-controls {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 20;
  touch-action: auto;
  background: rgba(30, 30, 30, 0.6);
  backdrop-filter: blur(25px);
  padding: 8px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  transition:
    opacity 0.3s,
    bottom 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.tc-btn {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  touch-action: auto;
  -webkit-tap-highlight-color: transparent;
  transition: 0.2s;
}

.tc-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-3px);
}

#btn-whatsapp:hover {
  background: rgba(37, 211, 102, 0.2);
  color: #25d366;
}

.tc-sep {
  width: 1px;
  height: 25px;
  background: rgba(255, 255, 255, 0.1);
  align-self: center;
  margin: 0 5px;
}

.t-close {
  position: absolute;
  top: 25px;
  right: 25px;
  z-index: 50;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: auto;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s, transform 0.2s, border-color 0.2s;
  backdrop-filter: blur(10px);
}

.t-close:hover {
  background: #d90429;
  border-color: transparent;
  transform: rotate(90deg) scale(1.1);
}

@media (max-width: 900px) {
  .t-controls {
    bottom: 15px;
    transform: translateX(-50%) scale(0.88);
    z-index: 50;
    transition: opacity 0.3s;
  }
}

.end-card {
  width: 100%;
  max-width: 500px;
  margin: 100px auto;
  padding: 60px 40px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(
    180deg,
    rgba(20, 20, 25, 0.9),
    rgba(5, 5, 5, 0.95)
  );
  border-radius: 4px;
  text-align: center;
  backdrop-filter: blur(20px);
  animation: softFloat 1s ease;
}

@keyframes softFloat {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.end-score {
  font-size: 3.5rem;
  font-weight: 800;
  color: #fff;
}

.end-rank {
  font-size: 1.2rem;
  color: #ffd700;
  letter-spacing: 2px;
  margin-top: 10px;
}

.btn-share-score {
  margin: 30px auto 0;
  font-family: monospace;
  letter-spacing: 1px;
  width: 100%;
  max-width: 300px;
}

.spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  margin: -15px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s infinite linear;
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}