:root {
  --bg: #f7fbff;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --green: #0f766e;
  --green-soft: #e8f8f4;
  --line: #dce7f3;
  --gold: #f6b91a;
  --danger: #b42318;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, rgba(37, 99, 235, 0.12), transparent 28rem),
    radial-gradient(circle at 85% 0%, rgba(15, 118, 110, 0.13), transparent 24rem),
    var(--bg);
}

button,
input,
textarea {
  font: inherit;
}

.page-shell {
  width: min(100%, 640px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px 18px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}

.review-panel {
  width: 100%;
  padding: 28px 20px 22px;
  border: 1px solid rgba(220, 231, 243, 0.95);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.brand-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--green-soft), #eff6ff);
  color: var(--gold);
  font-size: 28px;
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.12);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-align: center;
  text-transform: uppercase;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 9vw, 3.25rem);
  line-height: 1.04;
  letter-spacing: 0;
  text-align: center;
}

.lead {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 500;
  text-align: center;
}

.rating-block {
  margin-top: 28px;
  padding: 18px 10px;
  border-radius: 8px;
  background: #f8fbff;
  border: 1px solid var(--line);
}

.stars {
  display: grid;
  grid-template-columns: repeat(5, minmax(44px, 1fr));
  gap: 4px;
}

.star-button {
  min-height: 58px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #cbd5e1;
  cursor: pointer;
  font-size: clamp(2.15rem, 12vw, 3.35rem);
  line-height: 1;
  transform: translateY(0) scale(1);
  transition: color 180ms ease, transform 180ms ease, background-color 180ms ease;
}

.star-button.is-filled {
  color: var(--gold);
  text-shadow: 0 7px 20px rgba(246, 185, 26, 0.3);
}

.star-button:hover,
.star-button:focus-visible {
  background: #eef6ff;
  outline: none;
  transform: translateY(-2px) scale(1.04);
}

.rating-hint {
  min-height: 22px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.93rem;
  font-weight: 600;
  text-align: center;
}

.result-panel {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  animation: reveal 260ms ease both;
}

.result-panel h2 {
  margin: 0;
  font-size: 1.28rem;
  line-height: 1.22;
  letter-spacing: 0;
}

.result-panel p {
  margin: 10px 0 18px;
  color: var(--muted);
  line-height: 1.5;
}

.is-hidden {
  display: none;
}

.primary-button {
  width: 100%;
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  background: var(--blue);
  color: #ffffff;
  cursor: pointer;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.24);
  transition: transform 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.primary-button:hover,
.primary-button:focus-visible {
  background: var(--blue-dark);
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.3);
}

form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
}

label em {
  color: var(--muted);
  font-style: normal;
  font-weight: 500;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input {
  min-height: 48px;
  padding: 0 13px;
}

textarea {
  min-height: 122px;
  padding: 13px;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: rgba(37, 99, 235, 0.7);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.consent-row {
  grid-template-columns: 22px 1fr;
  align-items: start;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.35;
}

.consent-row input {
  width: 18px;
  min-height: 18px;
  margin-top: 1px;
  accent-color: var(--green);
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.form-message {
  min-height: 20px;
  margin: 0;
  color: var(--danger);
  font-size: 0.92rem;
  font-weight: 700;
}

.success-panel h2 {
  color: var(--green);
}

.google-access {
  padding: 0 4px;
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
  text-align: center;
}

.google-access a {
  color: var(--green);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.intro-animation {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  animation: introFade 3.8s ease forwards;
}

.intro-star {
  position: absolute;
  left: 50%;
  bottom: -12vh;
  font-size: clamp(2rem, 10vw, 4rem);
  filter: drop-shadow(0 14px 20px rgba(246, 185, 26, 0.34));
  transform: translateX(-50%);
  animation: starFly 2.25s cubic-bezier(0.2, 0.85, 0.22, 1) forwards;
}

.star-one {
  margin-left: -112px;
  animation-delay: 0.1s;
}

.star-two {
  margin-left: -56px;
  animation-delay: 0.22s;
}

.star-three {
  margin-left: 0;
  animation-delay: 0.34s;
}

.star-four {
  margin-left: 56px;
  animation-delay: 0.46s;
}

.star-five {
  margin-left: 112px;
  animation-delay: 0.58s;
}

.firework {
  position: absolute;
  left: 50%;
  top: 48%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  opacity: 0;
  background: var(--gold);
  box-shadow:
    0 -54px 0 #f6b91a,
    38px -38px 0 #22c55e,
    54px 0 0 #2563eb,
    38px 38px 0 #14b8a6,
    0 54px 0 #f97316,
    -38px 38px 0 #22c55e,
    -54px 0 0 #2563eb,
    -38px -38px 0 #f6b91a;
  transform: translate(-50%, -50%) scale(0.1);
  animation: burst 900ms ease-out forwards;
  animation-delay: 2.2s;
}

.firework-two {
  margin-left: -64px;
  margin-top: 24px;
  animation-delay: 2.38s;
  transform: translate(-50%, -50%) scale(0.08);
}

.firework-three {
  margin-left: 68px;
  margin-top: -22px;
  animation-delay: 2.54s;
  transform: translate(-50%, -50%) scale(0.08);
}

@keyframes starFly {
  0% {
    opacity: 0;
    transform: translate(-50%, 0) scale(0.68) rotate(-8deg);
  }
  20% {
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -56vh) scale(1.08) rotate(10deg);
  }
}

@keyframes burst {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.1);
  }
  25% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.2);
  }
}

@keyframes introFade {
  0%,
  82% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 720px) {
  .page-shell {
    padding: 42px 24px 28px;
  }

  .review-panel {
    padding: 36px 34px 30px;
  }
}

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