.victory-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #090912f5;
  display: grid;
  place-items: center;
  overflow: hidden;
  animation: victory-fade .38s ease-out both;
  padding: 24px;
  isolation: isolate;
}
.victory-grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(#b99aff0b 1px, transparent 1px),
    linear-gradient(
      90deg,
      #b99aff0b 1px,
      transparent 1px),
    radial-gradient(
      ellipse at center,
      #553b7755,
      transparent 65%);
  background-size:
    48px 48px,
    48px 48px,
    100% 100%;
  mask-image:
    radial-gradient(
      ellipse at center,
      #000,
      transparent 85%);
}
.victory-content {
  text-align: center;
  width: min(100%, 760px);
}
.victory-content .eyebrow {
  color: #c9b2f9;
  font-size: 9px;
  letter-spacing: 2px;
}
.victory-kicker {
  color: #9485a8;
  font-size: 11px;
  letter-spacing: 3px;
  margin-top: 26px;
}
.bump-stage {
  height: 250px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px -20px;
  overflow: hidden;
}
.fist {
  width: clamp(160px, 32vw, 240px);
  flex-shrink: 0;
  z-index: 2;
  will-change: transform;
}
.fist svg {
  width: 100%;
  display: block;
  filter: drop-shadow(0 0 22px #b795ff33);
}
.fist-left {
  color: #a480e0;
  animation: fist-left 1.3s cubic-bezier(.22, .78, .2, 1) both;
}
.fist-right {
  color: #e39fbf;
  animation: fist-right 1.3s cubic-bezier(.22, .78, .2, 1) both;
}
.fist-right svg {
  transform: scaleX(-1);
}
.impact-ring {
  position: absolute;
  width: 95px;
  height: 95px;
  border: 3px solid #dfc3ff;
  border-radius: 50%;
  opacity: 0;
  box-shadow: 0 0 45px #b899ff77;
  animation: impact-ring .7s .64s ease-out both;
}
.impact-star {
  position: absolute;
  color: #fff2be;
  font-size: 115px;
  z-index: 3;
  opacity: 0;
  animation: impact-flash .55s .63s both;
  text-shadow: 0 0 35px #efb3fc;
}
.bump-trail {
  position: absolute;
  height: 2px;
  width: 40%;
  top: 50%;
  background:
    linear-gradient(
      90deg,
      transparent,
      #d7baff);
  opacity: 0;
  animation: trail .6s .18s both;
}
.bump-trail.left {
  left: 0;
}
.bump-trail.right {
  right: 0;
  transform: scaleX(-1);
}
.victory-content h2 {
  font-family: "Courier New", monospace;
  font-size: clamp(24px, 5vw, 44px);
  font-weight: 900;
  letter-spacing: 2px;
  color: #e6d5ff;
  text-shadow: 0 0 35px #b794f877;
  animation: victory-reveal .5s .85s both;
}
.victory-subtitle {
  font-size: 13px;
  color: #afa1bd;
  margin-top: 12px;
  animation: victory-reveal .5s 1s both;
}
.victory-badge {
  display: table;
  margin: 24px auto 30px;
  padding: 8px 14px;
  border: 1px solid #54837166;
  background: #20372d77;
  border-radius: 5px;
  font-size: 9px;
  letter-spacing: 1.8px;
  color: #9fe3bb;
  animation: victory-reveal .5s 1.1s both;
}
.victory-content > button {
  animation: victory-reveal .5s 1.25s both;
  font-size: 12px;
  padding: 13px 24px;
}
.public-card,
.claim-result {
  animation: victory-reveal .4s ease-out both;
}
.scan-another {
  display: inline-flex;
  gap: 8px;
  font-size: 12px;
  color: var(--purple);
  margin-bottom: 30px;
  text-decoration: none;
}
@keyframes victory-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes victory-reveal {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fist-left {
  0% {
    opacity: 0;
    transform: translateX(-100vw) rotate(-6deg);
  }
  15% {
    opacity: 1;
  }
  50% {
    transform: translateX(15px) rotate(0);
  }
  61% {
    transform: translateX(-14px) rotate(-3deg);
  }
  76% {
    transform: translateX(4px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes fist-right {
  0% {
    opacity: 0;
    transform: translateX(100vw) rotate(6deg);
  }
  15% {
    opacity: 1;
  }
  50% {
    transform: translateX(-15px) rotate(0);
  }
  61% {
    transform: translateX(14px) rotate(3deg);
  }
  76% {
    transform: translateX(-4px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes impact-ring {
  0% {
    opacity: 0;
    transform: scale(.2);
  }
  12% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: scale(3.7);
  }
}
@keyframes impact-flash {
  0% {
    opacity: 0;
    transform: scale(.2) rotate(-20deg);
  }
  20% {
    opacity: 1;
    transform: scale(1.3) rotate(0);
  }
  100% {
    opacity: 0;
    transform: scale(.8) rotate(20deg);
  }
}
@keyframes trail {
  0%, 100% {
    opacity: 0;
    transform: scaleX(.4);
  }
  60% {
    opacity: .8;
    transform: scaleX(1);
  }
}
.victory-overlay.leaving {
  animation: victory-exit .28s ease-in both;
  pointer-events: none;
}
@keyframes victory-exit {
  to {
    opacity: 0;
    transform: scale(1.025);
  }
}
.victory-overlay.reduced .fist,
.victory-overlay.reduced .victory-content > * {
  animation: none;
}
.victory-overlay.reduced .impact-star,
.victory-overlay.reduced .impact-ring,
.victory-overlay.reduced .bump-trail {
  display: none;
}
.sound-settings,
.scanner-setting {
  margin-top: 22px;
}
.sound-settings > p {
  margin-bottom: 22px;
}
.sound-settings label:has(input[type=checkbox]) {
  display: flex;
  align-items: center;
  gap: 9px;
}
.sound-settings input[type=checkbox] {
  width: 17px;
  height: 17px;
  display: inline;
  margin: 0;
  accent-color: var(--purple);
}
.field-help {
  font-size: 10px;
  color: var(--muted);
  margin-top: 7px;
}
.sound-settings output {
  float: right;
  color: var(--purple);
}
.sound-settings input[type=range] {
  padding: 0;
  border: 0;
  accent-color: var(--purple);
  box-shadow: none;
  margin-top: 14px;
}
.sound-presets {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 16px 18px;
  margin: 22px 0 8px;
}
.sound-presets legend {
  font-size: 11px;
  color: var(--muted);
}
.sound-presets label {
  margin-top: 11px;
}
.sound-upload {
  margin-top: 20px;
}
.sound-upload label {
  margin-top: 0;
}
.sound-upload small {
  font-size: 10px;
  color: var(--muted);
}
.custom-sound {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  gap: 10px;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.custom-sound button {
  padding: 3px 10px;
}
.sound-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.sound-actions button {
  font-size: 11px;
}
.scanner-setting a {
  margin-top: 8px;
}
[hidden] {
  display: none !important;
}
.scanner-page {
  min-height: 100dvh;
  max-width: 1000px;
  margin: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.scanner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.scanner-public {
  font-size: 8px;
  letter-spacing: 1.5px;
  color: #8f819f;
}
.scanner-intro {
  text-align: center;
  margin: 14px 0 2px;
}
.scanner-intro .eyebrow {
  font-size: 8px;
  margin-bottom: 9px;
}
.scanner-intro h1 {
  font-size: clamp(23px, 3.7vw, 35px);
}
.scanner-intro > p:last-child {
  font-size: 11px;
  color: var(--muted);
  margin-top: 10px;
}
.scan-viewport {
  flex: 1;
  min-height: 340px;
  height: 46dvh;
  max-height: 700px;
  border: 1px solid #4d3b63;
  border-radius: 20px;
  background:
    radial-gradient(
      ellipse at center,
      #372a4b44,
      #13131c 70%);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.scan-viewport::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(#a98dff08 1px, transparent 1px),
    linear-gradient(
      90deg,
      #a98dff08 1px,
      transparent 1px);
  background-size: 40px 40px;
  z-index: 0;
}
.scan-viewport video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  opacity: 0;
}
.scan-viewport.camera-active video {
  opacity: 1;
}
.scan-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse at center,
      transparent 25%,
      #090a1377);
  z-index: 1;
}
.scan-reticle {
  position: absolute;
  width: min(65%, 300px);
  aspect-ratio: 1;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  border: 1px solid #b59cfa22;
  border-radius: 18px;
}
.scan-reticle i {
  position: absolute;
  width: 33px;
  height: 33px;
  border-color: #c9a9ff;
  border-style: solid;
  filter: drop-shadow(0 0 8px #b795ff55);
}
.scan-reticle i:nth-child(1) {
  top: -1px;
  left: -1px;
  border-width: 3px 0 0 3px;
  border-radius: 16px 0 0;
}
.scan-reticle i:nth-child(2) {
  top: -1px;
  right: -1px;
  border-width: 3px 3px 0 0;
  border-radius: 0 16px 0 0;
}
.scan-reticle i:nth-child(3) {
  bottom: -1px;
  left: -1px;
  border-width: 0 0 3px 3px;
  border-radius: 0 0 0 16px;
}
.scan-reticle i:nth-child(4) {
  bottom: -1px;
  right: -1px;
  border-width: 0 3px 3px 0;
  border-radius: 0 0 16px;
}
.scan-line {
  height: 1px;
  background: #ceb6ff;
  box-shadow: 0 0 16px #b49bff;
  position: absolute;
  left: 10px;
  right: 10px;
  top: 10px;
  opacity: .5;
  animation: scan-line 3s ease-in-out infinite;
}
.scan-crosshair {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 28px;
  color: #c4aaff44;
}
.scanner-idle {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
  pointer-events: none;
}
.scanner-idle > span {
  font-size: 58px;
  color: #c6a5f0;
  margin-bottom: 10px;
}
.scanner-idle strong {
  font-size: 8px;
  letter-spacing: 2px;
  color: #bc9bdd;
}
.scanner-idle p {
  font-size: 10px;
  color: #8d7a9f;
  margin-top: 8px;
}
.camera-active .scanner-idle {
  display: none;
}
.scan-top-label {
  position: absolute;
  left: 20px;
  top: 17px;
  font-size: 8px;
  letter-spacing: 2px;
  color: #d3c4e6;
  z-index: 3;
  display: flex;
  gap: 8px;
  align-items: center;
}
.scan-bottom-label {
  position: absolute;
  bottom: 18px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 7px;
  letter-spacing: 2px;
  color: #9d86b7;
  z-index: 3;
}
.scanner-controls {
  text-align: center;
}
.scanner-controls > #scan-status {
  font-size: 11px;
  min-height: 35px;
  color: #a89ab8;
  max-width: 600px;
  margin: auto;
}
.scanner-controls > #scan-status.scan-error {
  color: #ecc3a0;
}
.camera-buttons {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 10px 0 16px;
}
.camera-buttons button {
  font-size: 12px;
}
.scanner-alternatives {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}
.scan-upload {
  margin: 0;
  font-size: 11px;
  background: #1c1b26;
  font-weight: 500;
  padding: 9px 14px;
}
.scan-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  padding: 0;
  border: 0;
}
.scan-upload:focus-within {
  outline: 2px solid var(--purple);
  outline-offset: 3px;
}
.scanner-note {
  font-size: 9px;
  color: #766b84;
  margin-top: 17px;
}
.scanner-controls form {
  max-width: 500px;
  margin: 15px auto;
  padding: 20px;
  background: #1b1925;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-align: left;
}
.scanner-controls form button {
  margin-top: 15px;
  width: 100%;
}
.scanner-controls form input {
  font-size: 12px;
}
@keyframes scan-line {
  0%, 100% {
    top: 10px;
    opacity: .2;
  }
  50% {
    top: calc(100% - 10px);
    opacity: .7;
  }
}
@media (max-width: 600px) {
  .scanner-page {
    padding: 18px 16px;
    gap: 14px;
  }
  .scanner-header .brand > span {
    font-size: 13px;
  }
  .scanner-public {
    font-size: 6px;
    letter-spacing: 1px;
  }
  .scanner-intro {
    margin-top: 9px;
  }
  .scanner-intro h1 {
    font-size: 24px;
  }
  .scanner-intro > p:last-child {
    font-size: 10px;
    max-width: 285px;
    margin: 8px auto 0;
  }
  .scan-viewport {
    height: 47dvh;
    min-height: 310px;
    border-radius: 16px;
  }
  .scan-reticle {
    width: 73%;
    max-width: 260px;
  }
  .scanner-controls > #scan-status {
    font-size: 10px;
    line-height: 1.6;
  }
  .scanner-alternatives {
    gap: 16px;
  }
  .scanner-alternatives .text-button {
    font-size: 10px;
  }
  .scan-upload {
    font-size: 10px;
    padding: 10px;
  }
  .bump-stage {
    height: 215px;
  }
  .victory-content .eyebrow {
    font-size: 7px;
    letter-spacing: 1px;
  }
  .victory-kicker {
    font-size: 9px;
  }
  .victory-badge {
    font-size: 8px;
    letter-spacing: 1px;
  }
  .victory-overlay {
    padding: 20px;
  }
  .sound-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .sound-actions .primary {
    grid-column: 1/-1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .victory-overlay *,
  .victory-overlay,
  .scan-line,
  .public-card,
  .claim-result {
    animation: none !important;
    transition: none !important;
  }
  .impact-star,
  .impact-ring,
  .bump-trail {
    display: none;
  }
}
