* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #14120f;
  color: #f3efe6;
}

body {
  position: fixed;
  inset: 0;
  width: 100%;
  min-height: 100vh;
  min-height: 100lvh;
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
}

.wash {
  position: fixed;
  z-index: 0;
  left: 0;
  right: 0;
  top: -80px;
  bottom: -120px;
  background: inherit;
}

main {
  position: fixed;
  z-index: 1;
  left: 0;
  right: 0;
  top: 0;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding:
    max(1.5rem, env(safe-area-inset-top))
    1.5rem
    max(1.5rem, env(safe-area-inset-bottom));
  text-align: center;
}

main[hidden] {
  display: none !important;
}

#bait-button {
  --seal: min(68vw, 42dvh, 16.25rem);
  position: relative;
  margin: 0;
  padding: 1.7rem 1.35rem;
  border: 0;
  background: transparent;
  color: #f3efe6;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

#bait-button:focus-visible {
  outline: none;
}

#bait-button:focus-visible .seal {
  outline: 2px solid #f3efe6;
  outline-offset: 12px;
}

.seal-bob {
  position: relative;
  display: block;
  animation: seal-float 5s ease-in-out infinite;
}

.seal-bob::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(226, 61, 50, 0.55);
  border-radius: 50%;
  pointer-events: none;
  animation: seal-ping 3.4s ease-out infinite;
}

.seal {
  position: relative;
  display: block;
  width: var(--seal);
  height: var(--seal);
  filter: drop-shadow(0 22px 18px rgba(0, 0, 0, 0.42));
  transition:
    transform 0.5s cubic-bezier(0.34, 1.45, 0.64, 1),
    filter 0.5s ease;
}

#bait-button:hover .seal,
#bait-button:focus-visible .seal {
  transform: translateY(-10px) scale(1.035);
  filter: drop-shadow(0 28px 22px rgba(0, 0, 0, 0.5));
}

#bait-button:active .seal {
  transform: translateY(8px) scale(0.94);
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.55));
  transition-duration: 0.08s;
  transition-timing-function: ease-out;
}

.seal-glow,
.seal-rim,
.seal-bead,
.seal-ticks,
.seal-face,
.seal-ember {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.seal-glow {
  z-index: 0;
  inset: -10%;
  background: radial-gradient(circle, rgba(226, 61, 50, 0.48), rgba(226, 61, 50, 0) 68%);
  animation: glow-breathe 3.1s ease-in-out infinite;
}

.seal-rim {
  z-index: 1;
  inset: 0;
  background: conic-gradient(
    from 20deg,
    #5c4522 0deg,
    #f0ddb4 48deg,
    #8a6840 100deg,
    #c9a56a 150deg,
    #3f3018 210deg,
    #f7edd2 265deg,
    #6d532c 320deg,
    #5c4522 360deg
  );
  box-shadow:
    inset 0 0 0 1px rgba(255, 244, 220, 0.35),
    inset 0 0 18px rgba(0, 0, 0, 0.35);
  animation: rim-turn 18s linear infinite;
}

.seal-bead {
  z-index: 2;
  inset: 2.2%;
  animation: rim-turn 7.5s linear infinite;
}

.seal-bead::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 0.62rem;
  height: 0.62rem;
  margin-left: -0.31rem;
  border-radius: 50%;
  background: #fff8ec;
  box-shadow:
    0 0 0 3px rgba(255, 214, 170, 0.28),
    0 0 16px 4px rgba(255, 150, 110, 0.85);
}

.seal-ticks {
  z-index: 2;
  inset: 0;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(255, 244, 220, 0.9) 0deg 1.15deg,
    transparent 1.15deg 15deg
  );
  -webkit-mask: radial-gradient(circle, transparent 76%, #000 78% 90%, transparent 93%);
  mask: radial-gradient(circle, transparent 76%, #000 78% 90%, transparent 93%);
  opacity: 0.72;
  animation: rim-turn 26s linear infinite reverse;
}

.seal-face {
  z-index: 3;
  inset: 13%;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 38%, #4a2c24 0%, #241812 42%, #120f0c 76%);
  box-shadow:
    inset 0 1px 0 rgba(255, 236, 214, 0.2),
    inset 0 -22px 30px rgba(0, 0, 0, 0.5),
    0 1px 0 rgba(255, 220, 170, 0.18);
  transition: box-shadow 0.2s ease;
}

#bait-button:active .seal-face {
  box-shadow:
    inset 0 14px 24px rgba(0, 0, 0, 0.62),
    inset 0 -6px 12px rgba(0, 0, 0, 0.35);
}

.seal-face::after {
  content: "";
  position: absolute;
  left: 16%;
  top: 9%;
  width: 48%;
  height: 26%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 248, 236, 0.2), transparent 70%);
  transform: rotate(-16deg);
}

.seal-ember {
  width: 58%;
  height: 58%;
  left: 21%;
  top: 21%;
  background: radial-gradient(circle, rgba(255, 120, 90, 0.55) 0%, rgba(180, 36, 28, 0.45) 42%, rgba(226, 61, 50, 0) 72%);
  filter: blur(2px);
  opacity: 0.9;
  animation: glow-breathe 2.4s ease-in-out infinite;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

#bait-button:hover .seal-ember,
#bait-button:focus-visible .seal-ember {
  transform: scale(1.12);
}

#bait-button:active .seal-ember {
  transform: scale(1.45);
  opacity: 1;
}

.seal-word {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  max-width: 78%;
  font: 500 clamp(2.15rem, 8vw, 2.7rem)/1 Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  letter-spacing: -0.04em;
  text-align: center;
  text-shadow: 0 10px 22px rgba(0, 0, 0, 0.55);
}

.seal-word span {
  display: block;
  padding-left: 0.18em;
  color: #f0c2b4;
  font-family: "Segoe UI", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1;
  text-shadow: none;
  text-transform: uppercase;
}

@keyframes seal-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes rim-turn {
  to {
    transform: rotate(360deg);
  }
}

@keyframes glow-breathe {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}

@keyframes seal-ping {
  0% {
    opacity: 0.5;
    transform: translate(-50%, -50%) scale(1.04);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.34);
  }
}

@media (prefers-reduced-motion: reduce) {
  .seal-bob,
  .seal-bob::after,
  .seal-glow,
  .seal-rim,
  .seal-bead,
  .seal-ticks,
  .seal-ember {
    animation: none;
  }
}

html.is-alarm,
html.is-alarm body,
html.is-alarm .wash {
  background: #ff2b22;
  color: #1a1a1a;
}

html.is-alarm.is-pale,
html.is-alarm.is-pale body,
html.is-alarm.is-pale .wash {
  background: #f4f0e8;
  color: #1a1a1a;
}

.sheet {
  width: min(22rem, 92vw);
  padding: 1.7rem 1.35rem 1.25rem;
  background: #161616;
  color: #f3efe6;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.28);
}

.sheet h1 {
  margin: 0 0 1.35rem;
  font-size: clamp(2.15rem, 8vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 0.96;
}

.secure {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.3rem;
  background: #f3efe6;
  color: #161616;
  font-family: "Segoe UI", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-decoration: none;
  text-transform: uppercase;
  touch-action: manipulation;
}

.secure:focus-visible {
  outline: 2px solid #f3efe6;
  outline-offset: 4px;
}

audio {
  display: none;
}

:fullscreen,
:-webkit-full-screen {
  width: 100%;
  height: 100%;
}
