.results-capy {
  position: absolute;
  right: clamp(16px, 4.4vw, 56px);
  bottom: clamp(70px, 16.4vh, 118px);
  width: clamp(120px, 16.7vw, 214px);
  z-index: 6;
  pointer-events: none;
}
.results-capy img {
  width: 100%;
  height: auto;
  display: block;
  transform: rotate(4deg);
  filter:
    drop-shadow(-3px 0 0 rgba(0, 229, 255, .4))
    drop-shadow(0 22px 30px rgba(0, 0, 0, .55));
}
.results-capy::before {
  content: '';
  position: absolute;
  left: 48%;
  bottom: 4%;
  width: 66%;
  height: 12%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, var(--aura), transparent 70%);
  filter: blur(6px);
  z-index: -1;
}
.results-actions {
  position: absolute;
  left: 50%;
  bottom: clamp(8px, 4.7vh, 34px);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.25vw, 16px);
  z-index: 7;
}
.btn-focal-plank {
  position: relative;
  width: clamp(180px, 19vw, 244px);
  aspect-ratio: 1024 / 215;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  filter: drop-shadow(0 0 22px rgba(0, 229, 255, .55)) drop-shadow(0 8px 16px rgba(0, 0, 0, .5));
  transition: transform var(--engine-dur) var(--engine-ease);
}
.btn-focal-plank:hover { transform: translateY(-2px); }
.btn-focal-plank:active { transform: translateY(0) scale(.99); }
.btn-focal-plank img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}
.btn-focal-plank .focal-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-left: 8%;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(15px, 1.5vw, 19px);
  color: var(--cream);
  text-shadow: 0 1px 0 rgba(5, 13, 31, .9), 0 0 16px rgba(0, 229, 255, .5);
  pointer-events: none;
}

.confetti {
  position: absolute;
  top: -16px;
  width: 9px;
  height: 14px;
  border-radius: 2px;
  opacity: .9;
  animation: confettiFall var(--cf-dur, 5.5s) linear var(--cf-delay, 0s) infinite;
}
.firework {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.firework::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff, var(--fw, var(--gem-gold)) 40%, transparent 72%);
  box-shadow: 0 0 18px var(--fw, var(--gem-gold));
  animation: fwCore 3.6s ease-out var(--fw-delay, 0s) infinite;
}
.firework::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 120px;
  height: 120px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, var(--fw, var(--gem-gold)) 0deg 2deg, transparent 2deg 18deg);
  -webkit-mask: radial-gradient(circle, #000 2%, rgba(0, 0, 0, .5) 30%, transparent 60%);
  mask: radial-gradient(circle, #000 2%, rgba(0, 0, 0, .5) 30%, transparent 60%);
  opacity: 0;
  animation: fwBurst 3.6s ease-out var(--fw-delay, 0s) infinite;
}
.coin-spin {
  position: absolute;
  width: clamp(20px, 2.3vw, 30px);
  animation: coinTumble var(--coin-dur, 2.4s) linear var(--coin-delay, 0s) infinite, coinFloat 6s ease-in-out var(--coin-delay, 0s) infinite;
}

@keyframes haloBreath { 0%, 100% { opacity: .7; transform: scale(.96); } 50% { opacity: 1; transform: scale(1.06); } }
@keyframes fwCore {
  0%, 62% { transform: scale(.4); opacity: .55; }
  70% { transform: scale(1.5); opacity: 1; }
  100% { transform: scale(.4); opacity: 0; }
}
@keyframes fwBurst {
  0%, 62% { opacity: 0; transform: translate(-50%, -50%) scale(.2); }
  72% { opacity: .9; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.4); }
}
@keyframes confettiFall {
  0% { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(110vh) rotate(540deg); }
}
@keyframes coinTumble { 0% { transform: rotateY(0deg); } 100% { transform: rotateY(360deg); } }
@keyframes coinFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }

@keyframes chestBreathe {
  0%, 100% { opacity: .85; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
}
@keyframes rayShift {
  0%, 100% { opacity: .7; transform: translateX(-50%) scaleX(1); }
  50% { opacity: 1; transform: translateX(-50%) scaleX(1.08); }
}

@media (max-width: 1020px), (orientation: landscape) and (max-height: 480px) {
  #screen-setup { padding: 0; }
  #screen-setup .panel { width: min(480px, 92vw); }
  .setup-captain { display: none; }
  .setup-row { padding: 0 12px; max-width: 100%; }
  #screen-settings { padding: 0; }
  #screen-settings .panel { width: min(480px, 92vw); }
  .knob-dial { display: none; }
}
@media (orientation: landscape) and (max-height: 480px) {
  .porthole-mini { width: clamp(48px, 7vw, 64px); }
  .hall-head { margin-bottom: 6px; }
  .trophy-medallion { width: 44px; }
  #screen-board { padding: 10px 14px 8px; }
}

@media (orientation: landscape) and (max-height: 480px) {
  .results-capy { display: none; }
  .crest-banner::before, .crest-banner::after { display: none; }
  .podium { bottom: 37vh; }
  .results-nameplate { bottom: 36vh; }
  #screen-results .res-stats { bottom: 14.5vh; }
  #res-saving { bottom: 11vh; }
  .results-actions { bottom: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .chest-aura, .chest-rays, .crown-gem, .medallion .engrave::after, .btn-gem, .parchment-note::after,
  .confetti, .firework::before, .firework::after, .coin-spin, .badge-gem, .badge-halo { animation: none !important; }
  .confetti { display: none; }
}

