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);
}

.lc {
  box-sizing: border-box;
  display: grid;
  width: min(240px, 92vw);
  overflow: hidden;
  border-radius: 16px;
  background: #fff7e6;
  color: #17141a;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
}

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

.lc__skywrap {
  position: relative;
  height: 64px;
}

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

.lc__band--morning {
  background: linear-gradient(180deg, #ffd9a3 0%, #ffe9c8 100%);
}

.lc__band--noon {
  background: linear-gradient(180deg, #bfe3ff 0%, #dff0ff 100%);
}

.lc__band--evening {
  background: linear-gradient(180deg, #ddc9b9 0%, #ffd9b8 100%);
}

.lc__band--night {
  background: linear-gradient(180deg, #3d4460 0%, #6c7794 100%);
}

.lc.is-morning .lc__band--morning {
  opacity: 1;
}

.lc.is-noon .lc__band--noon {
  opacity: 1;
}

.lc.is-evening .lc__band--evening {
  opacity: 1;
}

.lc.is-night .lc__band--night {
  opacity: 1;
}

.lc__orb {
  position: absolute;
  top: 8px;
  display: grid;
  place-items: center;
}

.lc__orb svg {
  display: block;
}

.lc__orb--sun {
  right: 12px;
  color: #ba9f72;
}

.lc__orb--sun svg {
  animation-name: lc-spin;
  animation-duration: 2s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

@keyframes lc-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
.lc__orb--moon {
  right: 12px;
  color: #f4f0e4;
  opacity: 0;
}

.lc__orb--moon svg {
  animation-name: lc-bob;
  animation-duration: 1s;
  animation-timing-function: ease-out;
  animation-iteration-count: infinite;
}

@keyframes lc-bob {
  0%, 100% {
    transform: translateY(-2px);
  }
  50% {
    transform: translateY(2px);
  }
}
.lc.is-night .lc__orb--sun {
  opacity: 0;
}

.lc.is-night .lc__orb--moon {
  opacity: 1;
}

.lc.is-evening .lc__orb--sun {
  opacity: 0;
}

.lc.is-evening .lc__orb--moon {
  opacity: 1;
}

.lc__body {
  display: grid;
  gap: 4px;
  padding: 8px 12px 12px;
}

.lc__clock {
  margin: 0;
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

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

.lc__hi {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

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

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

@keyframes lc-noon {
  0%, 33% {
    opacity: 1;
  }
  34%, 87% {
    opacity: 0;
  }
  88%, 100% {
    opacity: 1;
  }
}
@keyframes lc-evening {
  0%, 33% {
    opacity: 0;
  }
  34%, 66% {
    opacity: 1;
  }
  67%, 100% {
    opacity: 0;
  }
}
@keyframes lc-night {
  0%, 66% {
    opacity: 0;
  }
  67%, 87% {
    opacity: 1;
  }
  88%, 100% {
    opacity: 0;
  }
}
@keyframes lc-va {
  0%, 44% {
    opacity: 1;
  }
  45%, 87% {
    opacity: 0;
  }
  88%, 100% {
    opacity: 1;
  }
}
@keyframes lc-vb {
  0%, 44% {
    opacity: 0;
  }
  45%, 87% {
    opacity: 1;
  }
  88%, 100% {
    opacity: 0;
  }
}
@keyframes lc-suna {
  0%, 33% {
    opacity: 1;
  }
  34%, 100% {
    opacity: 0;
  }
}
@keyframes lc-moonb {
  0%, 33% {
    opacity: 0;
  }
  34%, 66% {
    opacity: 0;
  }
  67%, 87% {
    opacity: 1;
  }
  88%, 100% {
    opacity: 0;
  }
}
.lc.is-demo .lc__band--noon {
  animation-name: lc-noon;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}
.lc.is-demo .lc__band--evening {
  animation-name: lc-evening;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}
.lc.is-demo .lc__band--night {
  animation-name: lc-night;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}
.lc.is-demo .lc__band--morning {
  opacity: 0;
}
.lc.is-demo .lc__orb--sun {
  animation-name: lc-suna;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}
.lc.is-demo .lc__orb--moon {
  animation-name: lc-moonb;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}
.lc.is-demo .lc__swap .lc__v {
  animation-name: lc-va;
}
.lc.is-demo .lc__swap .lc__alt {
  animation-name: lc-vb;
}
.lc.is-demo .lc__swap .lc__v, .lc.is-demo .lc__swap .lc__alt {
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}

@media (max-width: 340px) {
  .lc__body {
    padding: 8px 8px 8px;
  }
  .lc__clock {
    font-size: 30px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .lc.is-demo .lc__band,
  .lc.is-demo .lc__orb,
  .lc.is-demo .lc__swap .lc__v,
  .lc.is-demo .lc__swap .lc__alt {
    animation: none !important;
  }
  .lc__orb--sun svg, .lc__orb--moon svg {
    animation: none !important;
    transform: none !important;
  }
  .lc.is-demo .lc__swap .lc__v {
    opacity: 1 !important;
  }
  .lc.is-demo .lc__swap .lc__alt {
    opacity: 0 !important;
  }
  .lc.is-demo:not(.is-evening):not(.is-night) .lc__orb--sun {
    opacity: 1 !important;
  }
  .lc.is-demo:not(.is-evening):not(.is-night) .lc__orb--moon {
    opacity: 0 !important;
  }
  .lc.is-demo.is-evening .lc__orb--sun,
  .lc.is-demo.is-night .lc__orb--sun {
    opacity: 0 !important;
  }
  .lc.is-demo.is-evening .lc__orb--moon,
  .lc.is-demo.is-night .lc__orb--moon {
    opacity: 1 !important;
  }
}
