* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 36px 22px;
  background: #fff;
  color: #2a4a6b;
  font-family: 'Indie Flower', 'Segoe Print', 'Bradley Hand', 'Comic Sans MS', cursive;
}

.app {
  width: 100%;
  max-width: 520px;
}

.app h1 {
  margin: 0 0 28px;
  font-size: 2.1rem;
  font-weight: 400;
  color: #4a90d9;
  letter-spacing: 0.02em;
}

.search {
  display: flex;
  gap: 16px;
  align-items: flex-end;
}

.search input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 1.25rem;
  padding: 8px 2px;
  color: inherit;
  text-align: center;
  background: transparent;
  border: 0;
  border-bottom: 2px solid #c9dff5;
  border-radius: 0;
  outline: 0;
}

.search input::placeholder {
  color: #9db9d6;
}

.search button {
  font: inherit;
  font-size: 1.1rem;
  padding: 8px 20px;
  color: #4a90d9;
  background: #fff;
  border: 1.5px solid #4a90d9;
  border-radius: 999px;
  cursor: pointer;
}

.message {
  margin: 28px 0 0;
  font-size: 1.3rem;
  color: #4a90d9;
}

.message:empty {
  display: none;
}

.result {
  display: grid;
  gap: 6px 24px;
  margin-top: 40px;
  grid-template-areas:
    "place"
    "temp"
    "visual"
    "details";
}

.result[hidden] {
  display: none;
}

.place { grid-area: place; }
.temp { grid-area: temp; }
.visual { grid-area: visual; }
.details { grid-area: details; }

.place h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 400;
}

.time {
  margin: 2px 0 0;
  font-size: 1rem;
  color: #7391b0;
}

.temp {
  margin: 4px 0 0;
  font-size: 6.5rem;
  line-height: 1.05;
  color: #4a90d9;
}

.visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 4px 0 12px;
}

.icon {
  display: block;
}

.desc {
  margin: 0;
  font-size: 1.3rem;
}

.details {
  display: flex;
  margin: 12px 0 0;
  padding: 16px 0 0;
  list-style: none;
  border-top: 1px solid #dce9f6;
}

.details li {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 0 10px;
  border-left: 1px solid #dce9f6;
  font-size: 0.95rem;
}

.details li:first-child {
  padding-left: 0;
  border-left: 0;
}

.details span {
  color: #7391b0;
}

.details b {
  font-weight: 400;
  font-size: 1.1rem;
}

@media (min-width: 700px) {
  body {
    padding: 56px 72px;
  }

  .app {
    max-width: 760px;
  }

  .app h1 {
    font-size: 2.6rem;
  }

  .result {
    grid-template-columns: 1.2fr 1fr;
    grid-template-areas:
      "place visual"
      "temp visual"
      "details details";
    align-items: start;
  }

  .visual {
    flex-direction: column;
    align-items: center;
    justify-self: center;
    margin: 0;
  }

  .temp {
    font-size: 9rem;
  }

  .details li {
    padding: 0 24px;
    font-size: 1.1rem;
  }

  .details b {
    font-size: 1.4rem;
  }
}
