:root {
  --paper: #fffdf7;
  --ink: #070707;
  --muted: #5d5a52;
  --line: #111;
  --yellow: #ffd400;
  --yellow-dark: #e2a900;
  --red: #e2231a;
  --coral: #ff5a45;
  --shadow: 0 22px 0 #111, 0 38px 54px rgba(0, 0, 0, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at 50% 10%, #fff 0 0, transparent 340px),
    linear-gradient(180deg, #fffdf9 0%, #fff8e5 100%);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.page {
  position: relative;
  width: min(100%, 1320px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px 28px 42px;
  overflow: hidden;
}

.hero {
  position: relative;
  z-index: 1;
  text-align: center;
}

h1 {
  max-width: 980px;
  margin: 0 auto;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(4.6rem, 10vw, 9.6rem);
  line-height: 0.82;
  text-transform: uppercase;
  letter-spacing: 0;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.08);
}

h1 span {
  display: block;
  font-size: clamp(2.1rem, 4vw, 4.2rem);
  line-height: 0.95;
}

.intro {
  max-width: 680px;
  margin: 20px auto 24px;
  font-size: clamp(1.05rem, 2vw, 1.38rem);
  line-height: 1.25;
  font-weight: 800;
}

.intro strong {
  display: block;
  color: var(--red);
}

.sound-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  margin: 0 auto 12px;
  border: 3px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.12);
}

.sound-toggle[aria-pressed="true"] {
  color: var(--red);
  border-color: var(--red);
}

.sound-toggle svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: square;
  stroke-linejoin: miter;
  stroke-width: 2.6;
}

.awesome-form {
  display: grid;
  gap: 10px;
  max-width: 940px;
  margin: 0 auto;
}

.awesome-form label {
  justify-self: start;
  font-size: 0.82rem;
  font-weight: 950;
  text-transform: uppercase;
}

.awesome-form input {
  width: 100%;
  height: 48px;
  border: 3px solid var(--line);
  border-radius: 0;
  padding: 0 18px;
  background: #fff;
  font-size: 1rem;
  outline: none;
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.1);
}

.awesome-form input:focus {
  border-color: var(--red);
}

.awesomize {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  width: 100%;
  min-height: clamp(116px, 16vw, 168px);
  margin-top: 8px;
  border: 5px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), transparent 42%),
    linear-gradient(180deg, var(--yellow) 0%, #ffc400 100%);
  box-shadow: var(--shadow);
  text-transform: uppercase;
  transform: translateY(0);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.awesomize span {
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(4.2rem, 9vw, 8.6rem);
  line-height: 0.8;
  letter-spacing: 0;
  white-space: nowrap;
}

.awesomize svg,
.secondary svg {
  width: 42px;
  height: 42px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: square;
  stroke-linejoin: miter;
  stroke-width: 3;
  flex: 0 0 auto;
}

.awesomize:hover {
  filter: saturate(1.1);
  transform: translateY(-3px);
  box-shadow: 0 25px 0 #111, 0 44px 60px rgba(0, 0, 0, 0.2);
}

.awesomize:active {
  transform: translateY(16px);
  box-shadow: 0 6px 0 #111, 0 14px 24px rgba(0, 0, 0, 0.2);
}

.result-shell {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 42px auto 0;
}

.certificate {
  position: relative;
  display: grid;
  grid-template-columns: 190px 1fr 230px;
  align-items: center;
  gap: 28px;
  min-height: 210px;
  padding: 22px 28px;
  background:
    radial-gradient(circle at 15% 50%, transparent 0 52px, rgba(0, 0, 0, 0.045) 53px 54px, transparent 55px),
    repeating-linear-gradient(130deg, rgba(0, 0, 0, 0.035) 0 1px, transparent 1px 12px),
    #fffdf3;
  border: 4px double var(--line);
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.12);
}

.certificate::before,
.certificate::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

.stamp {
  display: grid;
  place-items: center;
  width: 154px;
  height: 154px;
  border: 8px solid var(--red);
  border-radius: 50%;
  color: var(--red);
  text-align: center;
  text-transform: uppercase;
  transform: rotate(-12deg);
}

.stamp span {
  max-width: 106px;
  font-size: 0.58rem;
  font-weight: 950;
  line-height: 1;
}

.stamp strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.34rem;
  line-height: 1;
}

.certificate-copy {
  text-align: center;
}

.tiny,
.title-line,
.reason,
.signature span,
.signature strong,
.mission span,
.world-counter span,
.world-counter p {
  margin: 0;
}

.tiny {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.92rem;
  font-style: italic;
}

h2 {
  margin: 0;
  overflow-wrap: anywhere;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.25rem, 5vw, 4.4rem);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0;
}

.score-line {
  margin: 8px 0 0;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(1.8rem, 4vw, 4rem);
  line-height: 1;
  text-transform: uppercase;
}

.score-line strong {
  color: var(--red);
}

.title-line {
  margin-top: 10px;
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 950;
  text-transform: uppercase;
}

.reason {
  margin-top: 10px;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  font-style: italic;
}

.signature {
  display: grid;
  align-content: end;
  gap: 6px;
  min-height: 132px;
  color: var(--red);
  text-align: center;
}

.signature span {
  color: var(--ink);
  font-family: "Brush Script MT", "Segoe Script", cursive;
  font-size: 2rem;
  line-height: 0.9;
  transform: rotate(-4deg);
}

.signature strong {
  font-size: 0.72rem;
  text-transform: uppercase;
}

.mission {
  display: grid;
  gap: 6px;
  margin: 20px 0;
  padding: 16px 18px;
  border-left: 8px solid var(--red);
  background: rgba(255, 255, 255, 0.72);
}

.mission span {
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.mission p {
  margin: 0;
  font-size: clamp(1.15rem, 2.4vw, 1.6rem);
  font-weight: 850;
}

.world-counter {
  display: grid;
  grid-template-columns: 1.25fr 0.85fr 1.35fr;
  align-items: center;
  gap: 14px;
  margin: -4px 0 22px;
  padding: 14px 16px;
  border: 3px solid var(--line);
  background: #fff;
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.1);
}

.world-counter div {
  display: grid;
  gap: 2px;
}

.world-counter strong {
  display: block;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(1.7rem, 3.4vw, 2.8rem);
  line-height: 0.95;
  letter-spacing: 0;
  text-transform: uppercase;
}

.world-counter span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.world-counter p {
  border-left: 4px solid var(--yellow);
  padding-left: 14px;
  font-size: clamp(1rem, 2vw, 1.22rem);
  font-weight: 900;
  line-height: 1.12;
}

.actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 66px;
  border: 3px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-weight: 950;
  text-transform: uppercase;
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.12);
}

.secondary:hover {
  transform: translateY(-2px);
}

.secondary:active {
  transform: translateY(2px);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.14);
}

.secondary.accent {
  border-color: var(--red);
  color: var(--red);
}

.secondary svg {
  width: 28px;
  height: 28px;
}

.feedback {
  min-height: 22px;
  margin: 14px 0 0;
  color: var(--red);
  font-size: 0.92rem;
  font-weight: 800;
  text-align: center;
}

.burst {
  position: absolute;
  top: 115px;
  width: 330px;
  height: 390px;
  opacity: 0.42;
  background:
    linear-gradient(75deg, transparent 50%, var(--yellow) 50% 51%, transparent 51%),
    linear-gradient(85deg, transparent 50%, var(--yellow) 50% 51%, transparent 51%),
    linear-gradient(95deg, transparent 50%, var(--yellow) 50% 51%, transparent 51%),
    linear-gradient(105deg, transparent 50%, var(--yellow) 50% 51%, transparent 51%);
  pointer-events: none;
}

.burst-left {
  left: -90px;
  transform: rotate(18deg);
}

.burst-right {
  right: -90px;
  transform: scaleX(-1) rotate(18deg);
}

.confetti-field,
.effect-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.confetti {
  position: absolute;
  top: -22px;
  width: 12px;
  height: 18px;
  background: var(--red);
  animation: fall var(--fall-time, 2800ms) ease-out forwards;
}

.confetti:nth-child(3n) {
  background: var(--yellow);
}

.confetti:nth-child(4n) {
  background: var(--ink);
}

.confetti-fireworks {
  border-radius: 50%;
  width: 9px;
  height: 9px;
}

.confetti-spotlight {
  width: 7px;
  height: 28px;
}

.confetti-starfall {
  width: 16px;
  height: 16px;
  clip-path: polygon(50% 0, 61% 34%, 98% 35%, 68% 56%, 79% 91%, 50% 70%, 21% 91%, 32% 56%, 2% 35%, 39% 34%);
}

.firework-spark,
.spotlight-beam,
.awesome-star {
  position: absolute;
  display: block;
  pointer-events: none;
}

.firework-spark {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 16px rgba(255, 212, 0, 0.65);
  animation: firework 1100ms ease-out forwards;
}

.firework-spark:nth-child(3n) {
  background: var(--red);
  box-shadow: 0 0 16px rgba(226, 35, 26, 0.55);
}

.firework-spark:nth-child(4n) {
  background: #fff;
  border: 2px solid var(--ink);
}

.spotlight-beam {
  inset: -8% 19% auto;
  height: 72vh;
  background:
    radial-gradient(ellipse at center top, rgba(255, 212, 0, 0.52), transparent 66%),
    linear-gradient(90deg, transparent 0%, rgba(255, 212, 0, 0.22) 45%, rgba(255, 255, 255, 0.58) 50%, rgba(255, 212, 0, 0.22) 55%, transparent 100%);
  clip-path: polygon(42% 0, 58% 0, 100% 100%, 0 100%);
  mix-blend-mode: multiply;
  animation: spotlight 2600ms ease-out forwards;
}

.awesome-star {
  top: -30px;
  width: 24px;
  height: 24px;
  color: var(--yellow);
  filter: drop-shadow(0 2px 0 #111);
  animation: starfall 3200ms ease-out forwards;
}

.awesome-star::before {
  content: "*";
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 42px;
  font-weight: 900;
  line-height: 24px;
}

.page.awesome-flash::after {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 42%, rgba(255, 212, 0, 0.52), transparent 48%);
  pointer-events: none;
  animation: flash 520ms ease-out forwards;
}

@keyframes fall {
  to {
    transform: translate3d(var(--x-drift), 112vh, 0) rotate(var(--spin));
    opacity: 0;
  }
}

@keyframes firework {
  0% {
    transform: translate3d(0, 0, 0) scale(0.25);
    opacity: 0;
  }
  18% {
    opacity: 1;
  }
  100% {
    transform: translate3d(var(--spark-x), var(--spark-y), 0) scale(0.95);
    opacity: 0;
  }
}

@keyframes spotlight {
  0% {
    opacity: 0;
    transform: translateY(-22px) scaleX(0.45);
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(18px) scaleX(1.15);
  }
}

@keyframes starfall {
  0% {
    transform: translate3d(0, -40px, 0) rotate(0deg) scale(0.65);
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  100% {
    transform: translate3d(var(--star-drift), 112vh, 0) rotate(520deg) scale(1);
    opacity: 0;
  }
}

@keyframes flash {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@media (max-width: 860px) {
  .page {
    padding: 22px 16px 32px;
  }

  h1 {
    font-size: clamp(3.2rem, 16vw, 5.4rem);
  }

  h1 span {
    font-size: clamp(1.7rem, 8vw, 3rem);
  }

  .awesomize {
    min-height: 106px;
    border-width: 4px;
    border-radius: 14px;
    gap: 8px;
  }

  .awesomize span {
    font-size: clamp(2.7rem, 13vw, 4.4rem);
  }

  .awesomize svg {
    width: 28px;
    height: 28px;
  }

  .certificate {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 20px;
  }

  .stamp {
    justify-self: center;
    width: 128px;
    height: 128px;
  }

  .stamp strong {
    font-size: 1.06rem;
  }

  .score-line {
    font-size: clamp(1.55rem, 8vw, 2.2rem);
  }

  .world-counter {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .signature {
    min-height: auto;
  }

  .actions {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
