* {
  box-sizing: border-box;
  font-family: "sofia-pro-variable", sans-serif;
  font-variation-settings: "wght" 700, "slnt" 0;
  font-weight: 700;
}

body {
  background-color: #ee4273;
}

main {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.main-area {
  margin: 0 8vw 7vh 8vw;
  position: relative;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: stretch;
}
.main-area .main-area-bg {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 7px solid #fff;
  background-color: #fcc3cf;
  left: 0;
  top: 0;
}

.logo-container {
  width: 30%;
}
.logo-container svg {
  width: 100%;
  height: auto;
}

.intro-box {
  padding-right: 3.7vw;
  padding-bottom: 3.85vh;
  display: flex;
  flex-direction: Row;
  gap: 2vw;
  width: 100%;
  align-items: flex-start;
  justify-content: space-between;
}
.intro-box .title {
  width: 70%;
}
.intro-box h1 {
  margin: 0;
  text-align: center;
  padding: 0;
  font-size: 4.43vw;
  color: #fff;
  font-style: italic;
  font-weight: bold;
  line-height: 1.4;
}
.intro-box span {
  font-size: inherit;
  font-weight: inherit;
  font-style: inherit;
  color: #ee4273;
  background: #fff;
  padding: 0.25% 1.5% 0.25% 0.25%;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.play svg {
  width: 7vw;
  height: auto;
}

.listen-button-container {
  max-width: 29vw;
}

.listen-button {
  border: 5px solid #3e1f14;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 5;
  width: 100%;
}
.listen-button .listen-button-inner {
  aspect-ratio: 493/356;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
}
.listen-button .label {
  position: absolute;
  top: 0;
  font-weight: 700;
  left: 50%;
  font-size: 4vw;
  color: #fff;
  background-color: #fa829e;
  padding: 5px;
  border: 4px solid #3e1f14;
  text-align: center;
  width: 40%;
  margin: 0 auto 0 auto;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.listen-button .label .char {
  transform: translateY(-7%);
}

.tap-me {
  transition: 50ms linear transform;
  transform: translate(10px, -10px);
}
.tap-me:focus {
  transition: 50ms linear transform;
  transform: translate(0px, 0px);
}
.tap-me:hover {
  transform: translate(15px, -15px);
  transition: 50ms linear transform;
}
.tap-me:focus:hover {
  transition: 50ms linear transform;
  transform: translate(0px, 0px);
}

.answer-button-container {
  width: 100%;
  position: relative;
}
.answer-button-container .answer-button {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 4px solid #3e1f14;
  padding: 10px;
  display: flex;
  position: relative;
  font-size: 2.3vw;
  color: #f10047;
  z-index: 10;
}
.answer-button-container .answer-button-background {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  border: 4px solid #3e1f14;
  background: #fa829e;
  z-index: 1;
}
.answer-button-container .letter {
  font-weight: bold;
  color: #3e1f14;
  font-size: 5.2vw;
}

.between-text {
  font-size: 50px;
  font-size: 4vw;
  color: #3e1f14;
  line-height: 1;
  align-items: center;
  justify-content: center;
  display: flex;
}

.button-group.answers {
  display: flex;
  margin-top: auto;
  flex-direction: row;
  width: 100%;
  gap: 2vw;
  max-width: 44.5vw;
  margin-left: auto;
  padding: 0;
  transform: translate(1vw, 2vh);
}
.button-group.answers.inactive .answer-button-container,
.button-group.answers.inactive .between-text {
  pointer-events: none;
  opacity: 0;
  transition: 150ms linear opacity;
}

.button-group.sounds {
  display: flex;
  flex-direction: row;
  width: 100%;
  gap: 50px;
  padding: 50px;
  width: 100%;
  flex: 2;
  align-items: flex-start;
  justify-content: flex-end;
  margin-top: 3vh;
}

.listen-button-container {
  position: relative;
  width: 100%;
}
.listen-button-container .listen-button-background {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  border: 4px solid #3e1f14;
  background: #f10047;
  z-index: 1;
}

span.play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
}

span.ecg {
  width: 100%;
  position: absolute;
  left: 50%;
  opacity: 0.5;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
}
span.ecg svg {
  width: 100%;
  height: auto;
}

.character-container {
  position: absolute;
  bottom: -15vh;
  width: 34vw;
  left: -3vw;
  height: 100%;
  z-index: 20;
}
.character-container .character-container-inner {
  position: relative;
  flex: 1;
}
.character-container .character-container-inner svg {
  overflow: visible;
}

.top-row {
  display: flex;
  flex-direction: row;
  position: relative;
}

.base-char,
.char-default,
.char-correct,
.char-incorrect {
  pointer-events: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  height: auto;
  transition: 500ms 50ms linear opacity;
}
.base-char.active,
.char-default.active,
.char-correct.active,
.char-incorrect.active {
  opacity: 1;
  transition: 500ms 50ms linear opacity;
}

.base-char {
  opacity: 1;
}
.base-char svg {
  width: 100%;
  height: auto;
}

.text-box-outer {
  z-index: 15;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.text-box-outer .text-box-container {
  position: absolute;
  opacity: 0;
  bottom: 0;
  left: 0;
  transition-delay: 500ms;
  transition: 150ms linear opacity;
}
.text-box-outer .text-box-container.active {
  opacity: 1;
  transition-delay: 500ms;
  transition: 150ms linear opacity;
}
.text-box-outer .text-box-background {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  border: 4px solid #3e1f14;
  background: #fff;
  z-index: 15;
}
.text-box-outer .text-box-content {
  padding: 22px 40px 28px 40px;
  position: relative;
  color: #3e1f14;
  font-size: 1.85vw;
  z-index: 25;
}
.text-box-outer .text-box-content p {
  margin: 0;
  line-height: 1.3;
}
.text-box-outer .text-box-content b {
  color: #f10047;
  font-size: 2.35vw;
}
.text-box-outer .text-box-content b.correct-word {
  color: #009f8d;
}

@media only screen and (max-width: 1040px) and (max-height: 1368px) {
  .button-group.sounds {
    flex-direction: column;
    width: 100%;
    align-items: center;
    justify-content: center;
  }
  .button-group.sounds .listen-button-container {
    max-width: 50vw;
  }
  .character-container {
    align-items: flex-end;
    display: flex;
    bottom: 100px;
    left: -6vw;
    height: auto;
    width: 43vw;
  }
  .play svg {
    width: 15vw;
  }
  .listen-button .label {
    font-size: 5vw;
  }
  .button-group.answers {
    max-width: 60vw;
    z-index: 40;
  }
  .answer-button-container .answer-button {
    font-size: 3.5vw;
  }
  .answer-button-container .letter {
    font-size: 7vw;
  }
}
@media only screen and (max-width: 720px) and (max-height: 1000px) {
  .text-box-outer .text-box-container {
    bottom: 0.5vw;
    top: initial;
  }
  .text-box-outer .text-box-content {
    padding: 5vw 5vw;
    font-size: 4.5vw;
  }
  .text-box-outer .text-box-content b {
    font-size: 5vw;
  }
}
@media only screen and (max-width: 545px) and (max-height: 1000px) {
  .intro-box {
    padding-bottom: 1.5vh;
    gap: 1vw;
  }
  .intro-box h1 {
    font-size: 4.95vw;
  }
  .top-row {
    margin-bottom: 15vw;
  }
  .main-area {
    margin: 0 5vw 10vw 5vw;
  }
  .button-group.sounds {
    padding: 7vw 3vh;
  }
  .button-group.answers {
    max-width: 95vw;
  }
  .between-text {
    padding: 2vw;
    font-size: 6vw;
  }
  .button-group.sounds .listen-button-container {
    max-width: 65vw;
  }
}