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

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

.qm {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 8px;
  grid-auto-flow: row dense;
  column-gap: 8px;
  row-gap: 0;
  width: clamp(288px, 94vw, 420px);
  margin: 0;
}

.qm__card {
  display: grid;
  align-content: start;
  min-height: 0;
  gap: 4px;
  margin: 0;
  padding: 8px;
  border: 1px solid rgba(28, 27, 34, 0.1);
  border-radius: 16px;
  background: #fbf7ef;
  box-shadow: 0 1px 2px rgba(28, 27, 34, 0.06);
  transform: translateY(0) scale(1);
  transition: transform 300ms cubic-bezier(0.2, 1.4, 0.4, 1), box-shadow 300ms ease-out;
}

.qm__card--1 {
  grid-row: span 12;
}

.qm__card--2 {
  grid-row: span 14;
}

.qm__card--3 {
  grid-row: span 9;
}

.qm__card--4 {
  grid-row: span 12;
}

.qm__card--5 {
  grid-row: span 9;
}

.qm__mark {
  width: 12px;
  height: 12px;
  color: rgba(71, 144, 137, 0.72);
}

.qm__card--2 .qm__mark,
.qm__card--4 .qm__mark {
  color: rgba(164, 156, 206, 0.72);
}

.qm__q {
  margin: 0;
}

.qm__t {
  margin: 0;
  color: #1c1b22;
  font-weight: 600;
  font-size: clamp(11px, 2.6vw, 12.5px);
  line-height: 1.5;
}

.qm__by {
  color: #565062;
  font-weight: 500;
  font-size: 10.5px;
  line-height: 1.3;
}

.qm__card:hover,
.qm__card:focus-visible {
  transform: translateY(-6px) scale(1.04);
  box-shadow: 0 14px 24px rgba(28, 27, 34, 0.16);
}

.qm__card:focus-visible {
  outline: 2px solid #479089;
  outline-offset: 2px;
}

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

.qm.is-demo .qm__card--2 {
  animation-delay: -0.4s;
}

.qm.is-demo .qm__card--3 {
  animation-delay: -0.8s;
}

.qm.is-demo .qm__card--4 {
  animation-delay: -1.2s;
}

.qm.is-demo .qm__card--5 {
  animation-delay: -1.6s;
}

@keyframes qmStep {
  0% {
    transform: translateY(0) scale(1);
    box-shadow: 0 1px 2px rgba(28, 27, 34, 0.06);
  }
  4% {
    transform: translateY(-6px) scale(1.04);
    box-shadow: 0 14px 24px rgba(28, 27, 34, 0.16);
  }
  15% {
    transform: translateY(-6px) scale(1.04);
    box-shadow: 0 14px 24px rgba(28, 27, 34, 0.16);
  }
  19%, 100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 1px 2px rgba(28, 27, 34, 0.06);
  }
}
@keyframes qmStepSm {
  0% {
    transform: translateY(0) scale(1);
    box-shadow: 0 1px 2px rgba(28, 27, 34, 0.06);
  }
  4% {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 10px 16px rgba(28, 27, 34, 0.14);
  }
  15% {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 10px 16px rgba(28, 27, 34, 0.14);
  }
  19%, 100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 1px 2px rgba(28, 27, 34, 0.06);
  }
}
@media (max-width: 340px), (max-height: 220px) {
  .qm {
    column-gap: 4px;
    width: 100%;
  }
  .qm__card {
    gap: 4px;
    padding: 4px;
  }
  .qm__mark {
    display: none;
  }
  .qm.is-demo .qm__card {
    animation-name: qmStepSm;
  }
  .qm__card:hover,
  .qm__card:focus-visible {
    transform: translateY(-4px) scale(1.03);
  }
  .qm__card--1 {
    grid-row: span 8;
  }
  .qm__card--2 {
    grid-row: span 10;
  }
  .qm__card--3 {
    grid-row: span 6;
  }
  .qm__card--4 {
    grid-row: span 8;
  }
  .qm__card--5 {
    grid-row: span 6;
  }
  .qm__t {
    font-size: 10px;
    line-height: 1.45;
  }
  .qm__by {
    font-size: 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .qm__card {
    animation: none !important;
  }
}
