:root {
  color: #3a2a22;
  background: #e7d3bc;
  font-family: Georgia, "Palatino Linotype", Palatino, serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at center, #f7f1e4 0%, #ead9c4 62%, #d9c2a8 100%);
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

main {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 32px 16px 56px;
}

.mascot {
  width: min(300px, 74vw);
  filter: drop-shadow(0 18px 18px rgba(90, 52, 28, 0.16));
}

.mascot svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.mascot.alert .eye-white { fill: #f6d0c8; }
.mascot.alert .iris { fill: #8d2e28; }
.mascot.alert .brow-calm,
.mascot.alert .smile { opacity: 0; }
.mascot.alert .brow-angry { opacity: 1; }
.mascot.alert .blush { fill: #db7a68; opacity: 0.52; }

form {
  width: min(584px, 92vw);
}

input {
  width: 100%;
  height: 48px;
  border: 1px solid transparent;
  border-radius: 24px;
  padding: 0 22px;
  background: #fffaf3;
  box-shadow: 0 1px 6px rgba(80, 50, 30, 0.18);
  color: #3a2a22;
  font: 16px/1.4 Georgia, "Palatino Linotype", Palatino, serif;
}

input::placeholder { color: #8d7264; }

input:focus {
  outline: none;
  box-shadow:
    0 1px 6px rgba(80, 50, 30, 0.18),
    0 0 0 2px #c47a4a;
}

#asked,
#answer {
  width: min(640px, 92vw);
  margin: 0;
  text-align: center;
  overflow-wrap: anywhere;
}

#asked {
  color: #6d5648;
  font-size: 1.05rem;
  line-height: 1.45;
}

#answer {
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  line-height: 1.45;
}

.hot {
  font-weight: 700;
  color: #3a2a22;
  animation: hotblink 0.5s steps(2, end) infinite;
}

#violation {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 24px;
  pointer-events: none;
  text-align: center;
  color: #c1121f;
  font-size: clamp(2rem, 6vw, 4.4rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.01em;
}

#violation:not(:empty) {
  opacity: 0.7;
  animation: alertblink 0.7s step-end infinite;
}

@keyframes hotblink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0.15; }
}

@keyframes alertblink {
  0%, 49% { opacity: 0.7; }
  50%, 100% { opacity: 0.12; }
}

@media (prefers-reduced-motion: reduce) {
  .hot,
  #violation:not(:empty) {
    animation: none;
    opacity: 1;
  }

  #violation:not(:empty) { opacity: 0.7; }
}
