:root {
  color: #111;
  font-synthesis: none;
  text-rendering: optimizelegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  --pink: #ff2d58;
  --ink: #111;
  --muted: #606a73;
  --cyan-soft: #e7f9fb;
  background: #85868b;
  font-family: Arial, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* {
  box-sizing: border-box;
}
button {
  font: inherit;
}
body {
  background: #85868b;
  place-items: center;
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  padding: 24px;
  display: grid;
}
#root {
  place-items: center;
  width: 100%;
  display: grid;
}
.shell {
  width: min(100%, 560px);
}
.card {
  text-align: center;
  background: #fff;
  border-radius: 27px;
  padding: 46px 53px 50px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 18px 45px #00000012;
}
.welcome-icon,
.ready-icon {
  width: 82px;
  height: 82px;
  color: var(--pink);
  background: #ffe8ee;
  border-radius: 50%;
  place-items: center;
  margin: 0 auto 25px;
  font-size: 47px;
  font-weight: 400;
  line-height: 1;
  display: grid;
}
.eyebrow {
  color: #53606b;
  letter-spacing: 0.08em;
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 800;
}
h1 {
  color: var(--ink);
  letter-spacing: -0.025em;
  margin: 0;
  font-size: 29px;
  font-weight: 750;
  line-height: 1.2;
}
.intro {
  color: var(--muted);
  margin: 12px 0 23px;
  font-size: 17px;
  line-height: 1.5;
}
form {
  margin: 0;
}
.question {
  background: var(--cyan-soft);
  border: 0;
  border-radius: 14px;
  margin: 0;
  padding: 18px;
}
.question-title {
  color: var(--ink);
  margin: 0;
  padding: 0 4px 15px;
  font-size: 21px;
  font-weight: 750;
  line-height: 1.25;
}
.animal-grid {
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
  display: grid;
}
.animal-option {
  color: #3f4b55;
  cursor: pointer;
  background: #fff;
  border: 1.5px solid #0000;
  border-radius: 13px;
  align-content: center;
  place-items: center;
  gap: 6px;
  min-width: 0;
  height: 96px;
  padding: 9px 5px 8px;
  font-size: 12px;
  font-weight: 750;
  transition: border-color 0.16s, box-shadow 0.16s, transform 0.15s, background 0.16s;
  display: grid;
  position: relative;
  box-shadow: 0 2px 8px #19232b0d;
}
.animal-option:hover {
  border-color: #ffc0ce;
}
.animal-option:active {
  transform: scale(0.975);
}
.animal-option:focus-visible,
.actions button:focus-visible,
.preview-back:focus-visible {
  outline-offset: 2px;
  outline: 3px solid #8ce5e7;
}
.animal-option.is-selected {
  border-color: var(--pink);
  background: #fff8fa;
  box-shadow: 0 0 0 3px #ff2d5814;
}
.emoji {
  font-family: -apple-system, BlinkMacSystemFont, "Apple Color Emoji", "Segoe UI Emoji",
    "Noto Color Emoji", sans-serif;
  font-size: 38px;
  font-weight: 400;
  line-height: 1;
  display: block;
}
.choice-check {
  background: var(--pink);
  color: #fff;
  opacity: 0;
  border-radius: 50%;
  place-items: center;
  width: 19px;
  height: 19px;
  font-size: 12px;
  line-height: 1;
  transition: opacity 0.16s, transform 0.16s;
  display: grid;
  position: absolute;
  top: 6px;
  right: 6px;
  transform: scale(0.7);
}
.animal-option.is-selected .choice-check {
  opacity: 1;
  transform: scale(1);
}
.error {
  color: #c51e42;
  text-align: left;
  min-height: 18px;
  margin: 7px 0 0;
  font-size: 12px;
}
.actions {
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
  display: grid;
}
.actions button,
.preview-back {
  cursor: pointer;
  border: 0;
  border-radius: 13px;
  height: 56px;
  font-size: 16px;
  font-weight: 800;
  transition: transform 0.15s, background 0.15s;
}
.actions button:active,
.preview-back:active {
  transform: scale(0.985);
}
.submit {
  background: var(--pink);
  color: #fff;
  padding: 0 18px;
}
.submit:hover {
  background: #e9234a;
}
.clear {
  color: #596671;
  background: #f2f2f2;
  padding: 0 18px;
}
.clear:hover {
  background: #e8e8e8;
}
.note {
  color: #77818a;
  margin: 19px 0 0;
  font-size: 12px;
  line-height: 1.45;
}
.loading {
  z-index: 5;
  background: #85868b;
  justify-content: center;
  align-items: center;
  padding: 18px;
  display: flex;
  position: fixed;
  inset: 0;
}
.loading[hidden] {
  display: none;
}
.loading-card {
  text-align: center;
  background: #fff;
  border-radius: 24px;
  width: min(100%, 560px);
  min-height: 250px;
  padding: 46px 28px 38px;
  box-shadow: 0 24px 58px #0002;
}
.spinner {
  border: 4px solid #ffd4dd;
  border-top-color: var(--pink);
  border-left-color: var(--pink);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  margin: 0 auto 23px;
  animation: 0.8s linear infinite spin;
}
.ready-icon {
  width: 68px;
  height: 68px;
  margin-bottom: 21px;
  font-size: 38px;
}
.loading h2 {
  color: #101820;
  letter-spacing: -0.035em;
  margin: 0 0 10px;
  font-size: 27px;
  line-height: 1.2;
}
.loading p {
  color: #687582;
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
}
.preview-back {
  background: var(--pink);
  color: #fff;
  width: min(100%, 260px);
  height: 50px;
  margin-top: 24px;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (width <= 600px) {
  body {
    padding: 17px;
  }
  .card {
    border-radius: 22px;
    padding: 30px 23px 34px;
  }
  .welcome-icon {
    width: 72px;
    height: 72px;
    margin-bottom: 21px;
    font-size: 42px;
  }
  h1 {
    font-size: 26px;
  }
  .intro {
    margin-bottom: 20px;
    font-size: 15px;
  }
  .question {
    padding: 15px;
  }
  .question-title {
    padding-bottom: 13px;
    font-size: 20px;
  }
  .animal-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 9px;
  }
  .animal-option {
    grid-template-columns: auto auto;
    gap: 8px;
    height: 82px;
    font-size: 13px;
  }
  .emoji {
    font-size: 36px;
  }
  .actions {
    gap: 10px;
  }
  .actions button {
    height: 52px;
    font-size: 15px;
  }
  .loading-card {
    min-height: 225px;
    padding: 40px 21px;
  }
  .loading h2 {
    font-size: 24px;
  }
  .loading p {
    font-size: 14px;
  }
}
@media (width <= 359px) {
  body {
    padding: 12px;
  }
  .card {
    padding-inline: 18px;
  }
  .animal-option {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  :before,
  :after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
