:root {
  --strong-cyan: hsl(172, 67%, 45%);
  --very-dark-cyan: hsl(183, 100%, 15%);
  --darker-grayish-cyan: hsl(186, 14%, 43%);
  --dark-grayish-cyan: hsl(184, 14%, 56%);
  --light-grayish-cyan: hsl(172, 67%, 86%);
  --lighter-grayish-cyan: hsl(189, 41%, 97%);
  --white: hsl(0, 0%, 100%);
}
* {
  box-sizing: border-box;
  margin: 0;
  font-family: "Space Mono", sans-serif;
}
body {
  background-color: hsl(190, 67%, 86%);
  display: flex;
  flex-direction: column;
  padding-top: 5rem;
  min-height: 100vh;
}
.logo {
  margin: 30px auto;
  width: fit-content;
}
.container {
  margin: 0 auto;
  background-color: #fff;
  padding: 1.3rem;
  display: flex;
  width: fit-content;
  max-width: 90%;
  border-radius: 19px;
  gap: 40px;
}
.input,
#custom,
input {
  background-color: var(--lighter-grayish-cyan);
  border-radius: 5px;
}
input {
  border: none;
  padding: 10px;
  text-align: right;
  width: 100%;
  color: var(--very-dark-cyan);
  font-weight: bold;
  font-size: 14px;
  height: 34px;
  cursor: pointer;
}
input:focus {
  outline: none;
}
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.area ::placeholder {
  color: hsl(185, 41%, 39%);
}
.btns ::placeholder {
  color: var(--darker-grayish-cyan);
}

.input {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0 10px;
}
.btns {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-top: 15px;
}
.btns > button {
  color: var(--white);
  padding: 6px 20px;
  background-color: var(--very-dark-cyan);
  border: none;
  border-radius: 5px;
  font-size: 15px;
  font-weight: 700;
  width: 100%;
  cursor: pointer;
}
button:focus{
  outline: none;
}
.btns > button:hover {
  background-color: var(--light-grayish-cyan);
  color: var(--very-dark-cyan);
}
#focus {
  background-color: var(--strong-cyan);
  color: var(--very-dark-cyan);
}
#custom {
  width: 67.55px;
  max-width: 35vw;
}

h4 {
  color: var(--darker-grayish-cyan);
  letter-spacing: 1px;
  font-size: 10px;
  margin: 5px 0;
}
.left h4 {
  display: flex;
  justify-content: space-between;
  padding: 0 10px 0 0;
}
.area:first-child {
  margin: 5px 0 25px;
}
.area:last-child {
  margin: 25px 0 5px;
}
.input,
#custom {
  border: 1px solid var(--white);
}
.input:hover,
#custom:hover {
  border: 1px solid var(--strong-cyan);
}
.right {
  background-color: var(--very-dark-cyan);
  width: 100%;
  max-width: 300px;
  min-height: 300px;
  padding: 30px 35px;
  border-radius: 13px;
  position: relative;
  overflow: hidden;
}
.amount {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}
.amount h4 {
  color: var(--white);
  margin: 0;
}
.amount .person {
  color: var(--dark-grayish-cyan);
  font-size: 10px;
}
.tip,
.total {
  font-size: 32px;
  font-weight: bold;
  color: var(--strong-cyan);
}
.total-area {
  margin-top: 20px;
}
.reset {
  position: absolute;
  bottom: 20px;
  left: 5%;
  width: 90%;
  border: none;
  border-radius: 4px;
  padding: 7px;
  text-transform: uppercase;
  font-weight: 700;
  background-color: hsl(183, 100%, 22%);
  color: hsl(183, 100%, 19%);
}
#reset {
  background-color: hsl(172, 67%, 42%);
  color: var(--very-dark-cyan);
  cursor: pointer;
}
#reset:hover {
  background-color: hsl(172, 67%, 76%);
}
.msg {
  color: hsl(0, 100%, 75%);
}
@media screen and (max-width: 690px) {
  .container {
    flex-direction: column;
    width: 450px;
  }
  #custom {
    width: 129.47px; /*Here*/
  }
  .right {
    min-height: 240px;
    width: 100%;
    max-width: 100%;
  }
}

@media screen and (max-width: 475px) {
  .container {
    width: 90%; /*Here*/
  }
  .btns {
    grid-template-columns: 1fr 1fr;
    gap: 10%;
  }
  .btns > button {
    padding: 5px 20px;
    font-size: 12px;
  }
  #custom {
    width: 153.41px; /*Here*/
    text-align: center;
    height: 27px;
  }
  .tip,
  .total {
    font-size: 25px;
    font-weight: bold;
    color: var(--strong-cyan);
  }
  .logo {
    margin: 20px auto;
  }
  .logo > img {
    width: 70px;
  }
}
@media screen and (max-width: 300px) {
  .right {
    min-height: 300px;
  }
}
