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

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

.sc {
  box-sizing: border-box;
  width: clamp(268px, 88vw, 408px);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sc__head {
  margin: 0;
  color: #1b1a20;
  font-weight: 800;
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: 0.04em;
  font-family: inherit;
}

.sc__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.sc__tile {
  --brand: #c3869b;
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  min-height: 88px;
  padding: 16px;
  border-radius: 16px;
  background: #ffffff;
  color: #1b1a20;
  text-decoration: none;
  box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
  transform: translateY(0);
  transition: transform 220ms cubic-bezier(0.2, 1.4, 0.4, 1), box-shadow 220ms ease-out;
}

.sc__tile:nth-child(1) {
  --brand: #c3869b;
}

.sc__tile:nth-child(2) {
  --brand: #0f0f0f;
}

.sc__tile:nth-child(3) {
  --brand: #bd7a7a;
}

.sc__tile:nth-child(4) {
  --brand: #181717;
}

.sc__tile:hover,
.sc__tile:focus-visible {
  transform: translateY(-6px);
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
}

.sc__tile:hover .sc__ic,
.sc__tile:focus-visible .sc__ic {
  color: var(--brand);
}

.sc__tile:hover .sc__go,
.sc__tile:focus-visible .sc__go {
  transform: scale(1);
}

.sc__tile:focus-visible {
  outline: 3px solid #1b1a20;
  outline-offset: 2px;
}

.sc__ic {
  display: block;
  color: #575162;
  transition: color 220ms ease-out;
}

.sc__ic svg {
  display: block;
}

.sc__name {
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  font-family: inherit;
}

.sc__go {
  position: absolute;
  top: 8px;
  right: 8px;
  display: block;
  color: #479089;
  transform: scale(0);
  transform-origin: top right;
  transition: transform 220ms cubic-bezier(0.2, 1.4, 0.4, 1);
}

.sc__go svg {
  display: block;
}

.sc__note {
  margin: 0;
  color: #1b1a20;
  font-weight: 500;
  font-size: 12px;
  line-height: 1.3;
  font-family: inherit;
}

.is-demo .sc__tile {
  animation-name: tileLift;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 1.4, 0.4, 1);
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}

.is-demo .sc__tile .sc__ic {
  animation-name: tileIcon;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}

.is-demo .sc__tile .sc__go {
  animation-name: tileGo;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 1.4, 0.4, 1);
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}

.is-demo .sc__tile:nth-child(2),
.is-demo .sc__tile:nth-child(2) .sc__ic,
.is-demo .sc__tile:nth-child(2) .sc__go {
  animation-delay: -1.5s;
}

.is-demo .sc__tile:nth-child(3),
.is-demo .sc__tile:nth-child(3) .sc__ic,
.is-demo .sc__tile:nth-child(3) .sc__go {
  animation-delay: -1s;
}

.is-demo .sc__tile:nth-child(4),
.is-demo .sc__tile:nth-child(4) .sc__ic,
.is-demo .sc__tile:nth-child(4) .sc__go {
  animation-delay: -0.5s;
}

@keyframes tileLift {
  0% {
    transform: translateY(0);
    box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
  }
  5%, 16% {
    transform: translateY(-6px);
    box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  }
  25%, 100% {
    transform: translateY(0);
    box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
  }
}
@keyframes tileIcon {
  0%, 19.9% {
    color: var(--brand);
  }
  20%, 100% {
    color: #575162;
  }
}
@keyframes tileGo {
  0% {
    transform: scale(0);
  }
  5%, 16% {
    transform: scale(1);
  }
  25%, 100% {
    transform: scale(0);
  }
}
@media (max-width: 340px), (max-height: 220px) {
  .sc {
    width: 268px;
    gap: 4px;
  }
  .sc__head {
    font-size: 12px;
  }
  .sc__grid {
    gap: 8px;
  }
  .sc__tile {
    min-height: 56px;
    gap: 4px;
    padding: 8px;
  }
  .sc__ic svg {
    width: 20px;
    height: 20px;
  }
  .sc__name {
    font-size: 11px;
  }
  .sc__go {
    top: 4px;
    right: 4px;
  }
  .sc__go svg {
    width: 12px;
    height: 12px;
  }
  .sc__note {
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .is-demo .sc__tile,
  .is-demo .sc__tile .sc__ic,
  .is-demo .sc__tile .sc__go {
    animation: none !important;
  }
  .sc__tile, .sc__ic, .sc__go {
    transition: none !important;
  }
  .sc__tile:hover .sc__go,
  .sc__tile:focus-visible .sc__go {
    transform: scale(1);
  }
}
