:root {
  color-scheme: dark;
  --button-width: min(46vw, 430px);
  --button-radius: 8px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background-color: #b99f79;
  overflow: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  content: "";
  background-image: url("background-wide-text.png");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  pointer-events: none;
}

@media (max-aspect-ratio: 16 / 9) {
  body::before {
    background-size: contain;
  }
}

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  align-items: end;
  justify-items: center;
  padding: 24px;
}

.sound-button {
  position: relative;
  width: var(--button-width);
  aspect-ratio: 943 / 531;
  display: block;
  padding: 0;
  margin-bottom: clamp(12px, 3vh, 34px);
  border: 6px solid #f7ead1;
  border-radius: var(--button-radius);
  background: #111;
  box-shadow:
    0 10px 0 #8c5d23,
    0 26px 48px rgba(0, 0, 0, 0.58),
    inset 0 0 0 2px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  overflow: hidden;
  transform: translateY(0) scale(1);
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
}

.sound-button:hover {
  filter: saturate(1.14) contrast(1.06) brightness(1.04);
  transform: translateY(-3px) scale(1.015);
  box-shadow:
    0 13px 0 #8c5d23,
    0 34px 58px rgba(0, 0, 0, 0.62),
    inset 0 0 0 2px rgba(0, 0, 0, 0.28);
}

.sound-button:active,
.sound-button.is-playing {
  transform: translateY(7px) scale(0.985);
  box-shadow:
    0 3px 0 #8c5d23,
    0 14px 34px rgba(0, 0, 0, 0.55),
    inset 0 0 0 2px rgba(0, 0, 0, 0.28);
}

.sound-button:focus-visible {
  outline: 4px solid #fff;
  outline-offset: 8px;
}

.sound-button img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.sound-button::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.22), transparent 42%, rgba(0, 0, 0, 0.22));
  pointer-events: none;
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(58px, 11vw, 104px);
  aspect-ratio: 1;
  border: 4px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.58);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.48);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
}

.play-badge::before {
  position: absolute;
  left: 54%;
  top: 50%;
  content: "";
  border-left: clamp(20px, 4vw, 34px) solid #fff;
  border-top: clamp(13px, 2.6vw, 22px) solid transparent;
  border-bottom: clamp(13px, 2.6vw, 22px) solid transparent;
  transform: translate(-42%, -50%);
}

@media (max-width: 560px) {
  :root {
    --button-width: min(78vw, 380px);
  }

  .page {
    padding: 16px;
  }
}
