html, body {
  margin: 0;
  overflow: hidden;
}

.stage {
  box-sizing: border-box;
  min-height: 100vh;
  display: grid;
  place-items: center;
  margin: 0;
  background: #17141a;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  padding: clamp(8px, 4vw, 24px);
}

.wc {
  position: relative;
  box-sizing: border-box;
  width: min(280px, 92vw);
  overflow: hidden;
  border-radius: 16px;
  color: #17141a;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
}

.wc * {
  box-sizing: border-box;
}

.wc__sky {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.wc__sky--a {
  background: linear-gradient(170deg, #bfe3ff 0%, #dcefff 46%, #ffe9b0 100%);
}

.wc__sky--b {
  background: linear-gradient(170deg, #93a7c8 0%, #b7c5de 60%, #cdd8ea 100%);
  opacity: 0;
}

.wc__body {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 12px 12px 8px;
}

.wc__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.wc__loc {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

.wc__label {
  margin: 0;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.3;
  color: rgba(23, 20, 26, 0.72);
}

.wc__now {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
}

.wc__temp {
  display: flex;
  align-items: flex-start;
  margin: 0;
  font-size: 44px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.wc__deg {
  font-size: 22px;
  font-weight: 700;
}

.wc__word {
  grid-column: 1/-1;
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}

.wc__art {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
}

.wc__glyph {
  grid-area: 1/1;
  display: grid;
  place-items: center;
  color: #2f6df6;
  transition: none;
}

.wc__glyph--sunny {
  color: #ba9f72;
}

.wc__glyph--rainy {
  opacity: 0;
}

.wc__glyph--snowy {
  opacity: 0;
  color: #4a89c9;
}

.wc.is-cloudy .wc__glyph--sunny,
.wc.is-rainy .wc__glyph--sunny,
.wc.is-snowy .wc__glyph--sunny {
  opacity: 0;
}

.wc.is-cloudy .wc__glyph--cloudy {
  opacity: 1;
}

.wc.is-rainy .wc__glyph--rainy {
  opacity: 1;
}

.wc.is-snowy .wc__glyph--snowy {
  opacity: 1;
}

.wc.is-cloudy .wc__sky--a,
.wc.is-rainy .wc__sky--a,
.wc.is-snowy .wc__sky--a {
  opacity: 0;
}

.wc.is-cloudy .wc__sky--b,
.wc.is-rainy .wc__sky--b,
.wc.is-snowy .wc__sky--b {
  opacity: 1;
}

@keyframes wc-pop {
  0% {
    transform: translateY(3px) scale(0.88);
  }
  55% {
    transform: translateY(-3px) scale(1.04);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}
.wc__art.is-pop {
  animation-name: wc-pop;
  animation-duration: 220ms;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: 1;
}

.wc__range {
  display: flex;
  gap: 12px;
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}

.wc__lo {
  color: rgba(23, 20, 26, 0.72);
}

.wc__swap {
  position: relative;
  display: inline-block;
}

.wc__alt {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.wc__conds {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.wc__c {
  padding: 4px 0;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.5);
  color: #17141a;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  cursor: pointer;
}
.wc__c:focus-visible {
  outline: 2px solid #2f6df6;
  outline-offset: 2px;
}
.wc__c.is-on {
  background: #17141a;
  color: #fff7e6;
}

@keyframes wc-a {
  0%, 44% {
    opacity: 1;
  }
  45%, 87% {
    opacity: 0;
  }
  88%, 100% {
    opacity: 1;
  }
}
@keyframes wc-b {
  0%, 44% {
    opacity: 0;
  }
  45%, 87% {
    opacity: 1;
  }
  88%, 100% {
    opacity: 0;
  }
}
@keyframes wc-va {
  0%, 44% {
    opacity: 1;
  }
  45%, 87% {
    opacity: 0;
  }
  88%, 100% {
    opacity: 1;
  }
}
@keyframes wc-vb {
  0%, 44% {
    opacity: 0;
  }
  45%, 87% {
    opacity: 1;
  }
  88%, 100% {
    opacity: 0;
  }
}
@keyframes wc-poploop {
  0%, 42% {
    transform: translateY(0) scale(1);
  }
  45% {
    transform: translateY(3px) scale(0.88);
  }
  58% {
    transform: translateY(-3px) scale(1.04);
  }
  70%, 85% {
    transform: translateY(0) scale(1);
  }
  88% {
    transform: translateY(3px) scale(0.88);
  }
  97%, 100% {
    transform: translateY(0) scale(1);
  }
}
@keyframes wc-press {
  0%, 41% {
    transform: scale(1);
  }
  45% {
    transform: scale(0.9);
  }
  57%, 100% {
    transform: scale(1);
  }
}
@keyframes wc-on-a {
  0%, 44% {
    background-color: #17141a;
    color: #fff7e6;
  }
  45%, 87% {
    background-color: rgba(255, 255, 255, 0.5);
    color: #17141a;
  }
  88%, 100% {
    background-color: #17141a;
    color: #fff7e6;
  }
}
@keyframes wc-on-b {
  0%, 44% {
    background-color: rgba(255, 255, 255, 0.5);
    color: #17141a;
  }
  45%, 87% {
    background-color: #17141a;
    color: #fff7e6;
  }
  88%, 100% {
    background-color: rgba(255, 255, 255, 0.5);
    color: #17141a;
  }
}
.wc.is-demo .wc__sky--a {
  animation-name: wc-a;
}
.wc.is-demo .wc__sky--b {
  animation-name: wc-b;
}
.wc.is-demo .wc__glyph--sunny {
  animation-name: wc-a;
}
.wc.is-demo .wc__glyph--rainy {
  animation-name: wc-b;
}
.wc.is-demo .wc__sky--a, .wc.is-demo .wc__sky--b,
.wc.is-demo .wc__glyph--sunny, .wc.is-demo .wc__glyph--rainy {
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}
.wc.is-demo .wc__swap .wc__v {
  animation-name: wc-va;
}
.wc.is-demo .wc__swap .wc__alt {
  animation-name: wc-vb;
}
.wc.is-demo .wc__swap .wc__v, .wc.is-demo .wc__swap .wc__alt {
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}
.wc.is-demo .wc__art {
  animation-name: wc-poploop;
  animation-duration: 2s;
  animation-timing-function: ease-out;
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}
.wc.is-demo .wc__c:nth-child(3) {
  animation-name: wc-press, wc-on-b;
}
.wc.is-demo .wc__c:nth-child(1) {
  animation-name: wc-on-a;
}
.wc.is-demo .wc__c:nth-child(1), .wc.is-demo .wc__c:nth-child(3) {
  animation-duration: 2s, 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1), steps(1, end);
  animation-iteration-count: infinite, infinite;
  animation-fill-mode: backwards, backwards;
}

@media (max-width: 340px) {
  .wc__body {
    padding: 8px 8px 4px;
  }
  .wc__temp {
    font-size: 36px;
  }
  .wc__art {
    width: 40px;
    height: 40px;
  }
  .wc__art svg {
    width: 32px;
    height: 32px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .wc.is-demo .wc__sky--a, .wc.is-demo .wc__sky--b,
  .wc.is-demo .wc__glyph, .wc.is-demo .wc__swap .wc__v, .wc.is-demo .wc__swap .wc__alt,
  .wc.is-demo .wc__art, .wc.is-demo .wc__c {
    animation: none !important;
    transform: none !important;
  }
  .wc.is-demo .wc__sky--a, .wc.is-demo .wc__glyph--sunny,
  .wc.is-demo .wc__swap .wc__v {
    opacity: 1 !important;
  }
  .wc.is-demo .wc__sky--b, .wc.is-demo .wc__glyph--rainy,
  .wc.is-demo .wc__swap .wc__alt {
    opacity: 0 !important;
  }
  .wc__art.is-pop {
    animation: none !important;
  }
}
