.result-card {
  flex: 0 1 auto;
  min-height: 0;
  max-height: calc(100dvh - 300px);
  width: min(78%, 330px, 35dvh);
  border: 0;
  background: transparent;
  overflow: visible;
}

.result-photo-wrap {
  flex: 1 1 auto;
  min-height: 0;
  aspect-ratio: var(--photo-aspect, 4 / 5);
}

.result-photo-wrap img {
  object-fit: contain;
}

.result-caption {
  display: none;
}

.home-lightning {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
}

.home-lightning__bolt {
  position: absolute;
  left: 50%;
  width: 150%;
  max-width: none;
  height: auto;
  opacity: .28;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, .85)) drop-shadow(0 0 13px rgba(68, 190, 255, .62));
  will-change: transform, opacity;
}

.home-lightning__bolt--top {
  top: -5%;
  transform: translateX(-50%) scale(.98) rotate(-1deg);
  animation: home-lightning-top 6.2s ease-in-out infinite;
}

.home-lightning__bolt--bottom {
  bottom: -3%;
  transform: translateX(-50%) scale(.98) rotate(1deg);
  animation: home-lightning-bottom 7.1s ease-in-out -2.6s infinite;
}

@keyframes home-lightning-top {
  0%, 100% { opacity: .2; transform: translateX(-50%) translate(-5px, -2px) scale(.97) rotate(-1.2deg); }
  38% { opacity: .34; transform: translateX(-50%) translate(5px, 3px) scale(1.01) rotate(.4deg); }
  44% { opacity: .5; }
  49% { opacity: .25; }
  72% { opacity: .4; transform: translateX(-50%) translate(-2px, 5px) scale(.99) rotate(-.3deg); }
}

@keyframes home-lightning-bottom {
  0%, 100% { opacity: .18; transform: translateX(-50%) translate(4px, 4px) scale(.98) rotate(1deg); }
  31% { opacity: .38; transform: translateX(-50%) translate(-5px, -3px) scale(1.015) rotate(-.5deg); }
  37% { opacity: .48; }
  42% { opacity: .22; }
  76% { opacity: .36; transform: translateX(-50%) translate(3px, -5px) scale(.99) rotate(.3deg); }
}

@media (prefers-reduced-motion: reduce) {
  .home-lightning__bolt--top { animation-duration: 16s; }
  .home-lightning__bolt--bottom { animation-duration: 18s; }
}

.home-art .home-hero--ironman {
  left: 50%;
  right: auto;
  bottom: -8%;
  width: 78%;
  height: 100%;
  transform: translateX(-50%);
}

.camera-stage {
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.camera-corner {
  display: none;
}

.play-page {
  position: relative;
}

.play-page .page-header,
.play-heading,
.play-controls {
  position: relative;
  z-index: 3;
}

.play-page .page-header {
  background: linear-gradient(180deg, rgba(8, 17, 47, .72), rgba(8, 17, 47, 0));
}

.play-page .page-header img {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.result-page .page-header img {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.play-heading {
  padding: 22px 14px 0;
}

.play-heading .section-kicker,
.play-heading h2,
.camera-label {
  display: none;
}

.play-heading p {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 11px 25px;
  border: 1px solid #7fc8ff;
  border-radius: 0;
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 10px 100%, 0 50%);
  background: linear-gradient(135deg, rgba(8, 22, 62, .94), rgba(35, 73, 150, .94) 50%, rgba(10, 25, 67, .94));
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .1);
  filter: drop-shadow(0 5px 8px rgba(4, 10, 33, .45));
  color: #fff;
  font-family: Impact, 'Arial Narrow', Arial, sans-serif;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 1.4px;
  text-shadow: 0 2px 0 #101d4d;
}

.play-heading p::before {
  content: '';
  width: 8px;
  height: 8px;
  flex: none;
  transform: rotate(45deg);
  background: #ffd84a;
  box-shadow: 0 0 8px #45cfff;
}

.camera-stage {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.camera-scrim {
  background: linear-gradient(180deg, rgba(5, 13, 39, .22), transparent 22%, transparent 64%, rgba(5, 13, 39, .42));
}

.suit-preview {
  position: absolute;
  z-index: 1;
  max-width: none;
  pointer-events: none;
  opacity: .14;
  filter: saturate(1.15) drop-shadow(0 0 8px rgba(99, 205, 255, .45));
}

.pose-guide {
  z-index: 2;
}

@media (prefers-reduced-motion: no-preference) {
  .suit-preview {
    animation: suit-preview-pulse 3.4s ease-in-out infinite;
  }

  @keyframes suit-preview-pulse {
    0%, 100% { opacity: .07; }
    50% { opacity: .24; }
  }
}

.play-controls {
  margin-top: auto;
  padding: 22px 13px calc(24px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent, rgba(7, 15, 42, .19) 28%, rgba(7, 15, 42, .62));
}

.play-status {
  color: white;
  text-shadow: 0 2px 5px rgba(2, 8, 29, .8);
}

.capture-row {
  margin-top: 0;
}

#capture-button {
  grid-column: 2;
}

#flip-camera {
  grid-column: 3;
}

.secondary-action {
  color: white;
  text-shadow: 0 2px 5px rgba(2, 8, 29, .8);
}

.action-icon {
  width: 42px;
  height: 42px;
  font-size: 27px;
  background: rgba(22, 34, 77, .78);
  border: 1.5px solid rgba(255, 255, 255, .78);
}

.shutter {
  border-color: white;
  box-shadow: 0 0 0 5px rgba(22, 34, 77, .76), 0 4px 16px rgba(2, 8, 29, .5);
}

.capture-effect {
  position: absolute;
  inset: 0;
  z-index: 5;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
}

.play-page.is-capturing .capture-effect {
  opacity: 1;
}

.capture-effect::before,
.capture-effect::after,
.capture-effect__glow,
.capture-effect__art {
  position: absolute;
  pointer-events: none;
}

.capture-effect::before {
  content: '';
  inset: 0;
  background: #051a40;
  opacity: 0;
}

.capture-effect::after {
  content: '';
  inset: 0;
  background: #eaffff;
  opacity: 0;
}

.capture-effect__glow {
  inset: 0;
  background: radial-gradient(ellipse 155px 260px at var(--capture-x) var(--capture-y), rgba(187, 246, 255, .78), rgba(30, 134, 255, .33) 52%, transparent 85%);
  opacity: 0;
}

.capture-effect__art {
  left: 50%;
  width: min(145vw, 640px);
  max-width: none;
  height: auto;
  opacity: 0;
  filter: brightness(1.35) drop-shadow(0 0 5px #fff) drop-shadow(0 0 15px #36c8ff) drop-shadow(0 0 24px #165eff);
  will-change: transform, opacity;
}

.capture-effect__art--top {
  top: -3%;
  transform: translateX(-50%) translateY(-18px) scale(.84) rotate(-3deg);
  transform-origin: 52% 62%;
}

.capture-effect__art--bottom {
  bottom: 12%;
  transform: translateX(-50%) translateY(18px) scale(.84) rotate(2deg);
  transform-origin: 49% 28%;
}

  .play-page.is-capturing .capture-effect::before { animation: lightning-dim 1.55s ease-out both; }
  .play-page.is-capturing .capture-effect::after { animation: lightning-flash 1.55s ease-out both; }
  .play-page.is-capturing .capture-effect__glow { animation: lightning-glow 1.55s ease-in-out both; }
  .play-page.is-capturing .capture-effect__art--top { animation: lightning-art-top 1.42s ease-out both; }
  .play-page.is-capturing .capture-effect__art--bottom { animation: lightning-art-bottom 1.42s ease-out both; }
  .play-page.is-capturing .suit-preview { animation: lightning-suit 1.5s ease-in-out both; }
  .play-page.is-capturing .pose-guide { animation: lightning-guide 1.5s ease-in-out both; }
  .result-page:not([hidden]) .result-card { animation: result-reveal .65s cubic-bezier(.18, .9, .25, 1.2) both; }

  @keyframes lightning-dim { 0% { opacity: 0; } 15%, 75% { opacity: .3; } 100% { opacity: 0; } }
  @keyframes lightning-flash { 0% { opacity: .32; } 13% { opacity: 0; } 40% { opacity: .2; } 46%, 71% { opacity: 0; } 77% { opacity: .2; } 84%, 94% { opacity: 0; } 100% { opacity: .68; } }
  @keyframes lightning-glow { 0% { opacity: .1; } 25% { opacity: .72; } 50% { opacity: .36; } 77% { opacity: .9; } 100% { opacity: .2; } }
  @keyframes lightning-art-top { 0% { opacity: 0; transform: translateX(-50%) translateY(-34px) scale(.78) rotate(-6deg); } 8% { opacity: 1; } 18% { opacity: .4; } 29% { opacity: 1; transform: translateX(-50%) translateY(0) scale(.98) rotate(-1deg); } 42%, 58% { opacity: 0; } 68% { opacity: 1; } 80%, 100% { opacity: 0; transform: translateX(-50%) translateY(10px) scale(1.06) rotate(1deg); } }
  @keyframes lightning-art-bottom { 0% { opacity: 0; transform: translateX(-50%) translateY(36px) scale(.78) rotate(5deg); } 10% { opacity: 1; } 21% { opacity: .4; } 34% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1) rotate(0); } 48%, 62% { opacity: 0; } 72% { opacity: 1; } 84%, 100% { opacity: 0; transform: translateX(-50%) translateY(-10px) scale(1.08) rotate(-2deg); } }
  @keyframes lightning-suit { 0% { opacity: .18; filter: brightness(1); } 25% { opacity: .55; filter: brightness(1.5) drop-shadow(0 0 7px #62d5ff); } 52% { opacity: .95; filter: brightness(2.2) drop-shadow(0 0 19px #a7edff); } 75% { opacity: .5; } 100% { opacity: .95; filter: brightness(2.5) drop-shadow(0 0 25px #b4f5ff); } }
  @keyframes lightning-guide { 0% { filter: drop-shadow(0 0 4px #fff); } 27%, 75% { filter: drop-shadow(0 0 13px #8fe5ff) drop-shadow(0 0 17px #ffe37a); } 100% { filter: drop-shadow(0 0 6px #fff); } }
  @keyframes result-reveal { from { opacity: 0; transform: translateY(32px) scale(.78) rotate(-7deg); } to { opacity: 1; transform: translateY(0) scale(1) rotate(-1deg); } }

@media (max-height: 730px) {
  .play-controls {
    padding-top: 20px;
  }
}
