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

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

.dc {
  width: min(360px, 94vw);
  background: #fff7e6;
  color: #17141a;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
}

.dc__title {
  margin: 0 0 12px;
  text-align: center;
  font-weight: 800;
  font-size: 15px;
  line-height: 1.3;
  font-family: inherit;
}

.dc__cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.dc__cell {
  position: relative;
}

.dc__radio {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  opacity: 0;
}

.dc__label {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 12px 8px;
  border: 1.5px solid rgba(23, 20, 26, 0.18);
  border-radius: 16px;
  background: #ffffff;
  cursor: pointer;
  transform: scale(0.97);
  transition: transform 220ms cubic-bezier(0.2, 1.4, 0.4, 1);
}

.dc__ring {
  position: absolute;
  inset: 0;
  border: 2px solid #2f6df6;
  border-radius: 16px;
  background: rgba(47, 109, 246, 0.12);
  opacity: 0;
  pointer-events: none;
}

.dc__ic {
  position: relative;
  display: grid;
  place-items: center;
  color: rgba(23, 20, 26, 0.5);
}

.dc__name {
  position: relative;
  font-weight: 800;
  font-size: 12px;
  line-height: 1.3;
  text-align: center;
}

.dc__sub {
  position: relative;
  font-size: 10px;
  line-height: 1.3;
  color: rgba(23, 20, 26, 0.6);
  text-align: center;
}

.dc__arrow {
  position: relative;
  display: grid;
  place-items: center;
  color: #2f6df6;
  transform: translateX(0);
  transition: transform 220ms cubic-bezier(0.2, 1.4, 0.4, 1);
}

.dc__radio:checked + .dc__label {
  transform: scale(1.02);
}

.dc__radio:checked + .dc__label .dc__ring {
  opacity: 1;
}

.dc__radio:checked + .dc__label .dc__ic {
  color: #2f6df6;
}

.dc__radio:checked + .dc__label .dc__arrow {
  transform: translateX(4px);
}

.dc__radio:focus-visible + .dc__label {
  outline: 2px solid #2f6df6;
  outline-offset: 2px;
}

.dc__pv {
  display: grid;
  width: 100%;
  margin: 12px 0 0;
  padding: 8px 12px;
  border: 0;
  border-radius: 12px;
  background: #17141a;
  color: #fff7e6;
  font-weight: 700;
  font-size: 12px;
  line-height: 1.4;
  font-family: inherit;
  cursor: pointer;
}

.dc__pv-t {
  grid-area: 1/1;
  opacity: 0;
}

.dc__pv-t--a {
  opacity: 1;
}

.dc__pv.is-b .dc__pv-t--a {
  opacity: 0;
}

.dc__pv.is-b .dc__pv-t--b {
  opacity: 1;
}

.dc__pv.is-armed .dc__pv-t--a, .dc__pv.is-armed .dc__pv-t--b {
  opacity: 0;
}

.dc__pv.is-armed .dc__pv-t--go {
  opacity: 1;
}

.dc__pv:focus-visible {
  outline: 2px solid #2f6df6;
  outline-offset: 2px;
}

.dc__msg {
  display: grid;
  margin: 8px 0 0;
  min-height: 13px;
  text-align: center;
  font-size: 11px;
  line-height: 1.3;
  color: rgba(23, 20, 26, 0.6);
  font-family: inherit;
}

.dc__msg-t {
  grid-area: 1/1;
  opacity: 0;
}

.dc__msg-t--a {
  opacity: 1;
}

.dc__msg.is-b .dc__msg-t--a {
  opacity: 0;
}

.dc__msg.is-b .dc__msg-t--b {
  opacity: 1;
}

.is-demo .dc__cell:first-child .dc__ring {
  animation: dc-ring-a 2s steps(1, end) infinite;
}

@keyframes dc-ring-a {
  0%, 41% {
    opacity: 1;
  }
  42%, 83% {
    opacity: 0;
  }
  84%, 100% {
    opacity: 1;
  }
}
.is-demo .dc__cell:last-child .dc__ring {
  animation: dc-ring-b 2s steps(1, end) infinite;
}

@keyframes dc-ring-b {
  0%, 41% {
    opacity: 0;
  }
  42%, 83% {
    opacity: 1;
  }
  84%, 100% {
    opacity: 0;
  }
}
.is-demo .dc__cell:first-child .dc__label {
  animation: dc-card-a 2s cubic-bezier(0.2, 1.4, 0.4, 1) infinite;
}

@keyframes dc-card-a {
  0%, 36% {
    transform: scale(1.02);
  }
  48%, 78% {
    transform: scale(0.97);
  }
  88%, 100% {
    transform: scale(1.02);
  }
}
.is-demo .dc__cell:last-child .dc__label {
  animation: dc-card-b 2s cubic-bezier(0.2, 1.4, 0.4, 1) infinite;
}

@keyframes dc-card-b {
  0%, 36% {
    transform: scale(0.97);
  }
  48%, 78% {
    transform: scale(1.02);
  }
  88%, 100% {
    transform: scale(0.97);
  }
}
.is-demo .dc__cell:first-child .dc__arrow {
  animation: dc-arrow-a 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

@keyframes dc-arrow-a {
  0%, 36% {
    transform: translateX(4px);
  }
  48%, 78% {
    transform: translateX(0);
  }
  88%, 100% {
    transform: translateX(4px);
  }
}
.is-demo .dc__cell:last-child .dc__arrow {
  animation: dc-arrow-b 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

@keyframes dc-arrow-b {
  0%, 36% {
    transform: translateX(0);
  }
  48%, 78% {
    transform: translateX(4px);
  }
  88%, 100% {
    transform: translateX(0);
  }
}
.is-demo .dc__pv-t--a {
  animation: dc-ring-a 2s steps(1, end) infinite;
}

.is-demo .dc__pv-t--b {
  animation: dc-ring-b 2s steps(1, end) infinite;
}

.is-demo .dc__msg-t--a {
  animation: dc-ring-a 2s steps(1, end) infinite;
}

.is-demo .dc__msg-t--b {
  animation: dc-ring-b 2s steps(1, end) infinite;
}

.is-demo .dc__pv {
  animation: dc-pv-pop 2s cubic-bezier(0.2, 1.4, 0.4, 1) infinite;
}

@keyframes dc-pv-pop {
  0%, 42%, 56%, 84%, 100% {
    transform: scale(1);
  }
  46% {
    transform: scale(1.04);
  }
  88% {
    transform: scale(1.04);
  }
}
@media (prefers-reduced-motion: reduce) {
  .dc__label, .dc__arrow, .dc__ring, .dc__pv, .dc__pv-t,
  .is-demo .dc__cell:first-child .dc__ring, .is-demo .dc__cell:last-child .dc__ring,
  .is-demo .dc__cell:first-child .dc__label, .is-demo .dc__cell:last-child .dc__label,
  .is-demo .dc__cell:first-child .dc__arrow, .is-demo .dc__cell:last-child .dc__arrow,
  .is-demo .dc__pv-t--a, .is-demo .dc__pv-t--b, .is-demo .dc__pv,
  .is-demo .dc__msg-t--a, .is-demo .dc__msg-t--b {
    animation: none !important;
    transition: none !important;
  }
  .is-demo .dc__cell:first-child .dc__ring, .is-demo .dc__pv-t--a, .is-demo .dc__msg-t--a {
    opacity: 1 !important;
  }
  .is-demo .dc__cell:last-child .dc__ring, .is-demo .dc__pv-t--b, .is-demo .dc__msg-t--b {
    opacity: 0 !important;
  }
  .is-demo .dc__cell:first-child .dc__label {
    transform: scale(1.02) !important;
  }
  .is-demo .dc__cell:last-child .dc__label {
    transform: scale(0.97) !important;
  }
}
@media (max-width: 340px), (max-height: 220px) {
  .dc {
    width: min(288px, 92vw);
    padding: 8px;
  }
  .dc__title {
    margin: 0 0 8px;
    font-size: 12px;
  }
  .dc__cards {
    gap: 8px;
  }
  .dc__label {
    gap: 0;
    padding: 8px 4px;
  }
  .dc__ic svg {
    width: 16px;
    height: 16px;
  }
  .dc__name {
    font-size: 10px;
  }
  .dc__sub {
    font-size: 9px;
  }
  .dc__arrow svg {
    width: 11px;
    height: 11px;
  }
  .dc__pv {
    margin: 8px 0 0;
    padding: 4px 8px;
    font-size: 10px;
  }
  .dc__msg {
    margin: 4px 0 0;
    min-height: 0;
    font-size: 9px;
  }
}
