/* 성격 유형 테스트(퀴즈) 공통: 표지 카드 · 문항 · 결과 페이지 · 유형 목록 */
.qz {
  margin-top: 22px;
}
.qz-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* 표지 */
.qz-cover {
  position: relative;
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 34px 16px 22px;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.26) 0 16%, transparent 17%),
    radial-gradient(circle at 90% 85%, rgba(255, 255, 255, 0.16) 0 22%, transparent 23%),
    linear-gradient(150deg, var(--c1), var(--c2));
}
.qz-cover-main {
  font-size: clamp(4rem, 18vw, 5.6rem);
  line-height: 1;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.22));
}
.qz-cover-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
}
.qz-cover-row span {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  font-size: 1.1rem;
  line-height: 1;
}
.qz-start-body {
  padding: 22px 20px 24px;
  text-align: center;
}
.qz-start-title {
  font-size: clamp(1.25rem, 5vw, 1.5rem);
  font-weight: 800;
}
.qz-meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 14px 0 18px;
}
.qz-meta li {
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.9rem;
}
.qz-meta b {
  color: var(--ink);
  margin: 0 1px;
}
.qz-go {
  width: min(100%, 320px);
  font-size: 1.05rem;
  min-height: 54px;
}
.qz-last {
  margin: 14px 0 0;
  font-size: 0.92rem;
  color: var(--muted);
}
.qz-last a {
  font-weight: 700;
}

/* 문항 */
.qz-play {
  padding: 18px 18px 20px;
}
.qz-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.qz-back {
  appearance: none;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--muted);
  padding: 8px 6px;
  margin-left: -6px;
  border-radius: 10px;
  cursor: pointer;
  min-height: 40px;
}
.qz-back:hover:not(:disabled) {
  color: var(--ink);
  background: var(--surface-2);
}
.qz-back:disabled {
  opacity: 0.35;
  cursor: default;
}
.qz-count {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.qz-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
  margin-top: 6px;
}
.qz-bar span {
  display: block;
  height: 100%;
  width: var(--p, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), color-mix(in srgb, var(--brand) 60%, #ff7ab6));
  transition: width 0.3s ease;
}
.qz-qno {
  margin: 22px 0 4px;
  font-weight: 800;
  color: var(--brand);
  font-size: 0.95rem;
}
.qz-q {
  font-size: clamp(1.2rem, 4.8vw, 1.45rem);
  font-weight: 800;
  line-height: 1.45;
  min-height: 2.9em;
  outline: none;
}
.qz-opts {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.qz-opt {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  padding: 12px 16px;
  border-radius: 16px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.45;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
  transition: border-color 0.12s ease, background 0.12s ease, transform 0.08s ease;
}
.qz-opt:hover {
  border-color: var(--brand);
}
.qz-opt:active {
  transform: scale(0.99);
}
.qz-opt[aria-pressed='true'] {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.qz-opt-key {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
}
.qz-opt[aria-pressed='true'] .qz-opt-key {
  background: var(--brand);
  color: var(--brand-ink);
}
.qz-keys {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  text-align: center;
}
@media (hover: none) {
  .qz-keys {
    display: none;
  }
}
.qz-in .qz-q,
.qz-in .qz-opts {
  animation: qz-in 0.22s ease-out;
}
@keyframes qz-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

/* 계산 중 */
.qz-wait {
  padding: 48px 20px;
  text-align: center;
  color: var(--muted);
  font-weight: 700;
}
.qz-spin {
  display: inline-block;
  font-size: 3.4rem;
  line-height: 1;
  margin-bottom: 12px;
  animation: qz-bob 0.6s ease-in-out infinite alternate;
}
@keyframes qz-bob {
  to {
    transform: translateY(-8px) rotate(-6deg);
  }
}

/* 유형 목록 */
.qz-types {
  list-style: none;
  padding: 0 !important;
  margin: 14px 0 18px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.qz-types li {
  margin: 0 !important;
}
.qz-type {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.12s ease, transform 0.12s ease;
}
.qz-type:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
}
.qz-type.is-cur {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.qz-type-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.35;
}
.qz-type-body strong {
  font-size: 0.98rem;
}
.qz-type-body small {
  color: var(--muted);
  font-size: 0.82rem;
}
.qz-thumb {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  font-size: 1.6rem;
  line-height: 1;
  background: linear-gradient(150deg, var(--c1), var(--c2));
}
@media (max-width: 460px) {
  .qz-types {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .qz-type {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* 결과 페이지 */
.qz-res {
  margin-top: 18px;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}
.qz-res-hero {
  padding: 30px 18px 26px;
  color: #fff;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.24) 0 15%, transparent 16%),
    radial-gradient(circle at 92% 88%, rgba(255, 255, 255, 0.15) 0 24%, transparent 25%),
    linear-gradient(155deg, var(--c1), var(--c2));
}
.qz-res-label {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  opacity: 0.92;
}
.qz-res-emoji {
  display: block;
  font-size: clamp(4.6rem, 22vw, 6.4rem);
  line-height: 1.15;
  margin: 8px 0 4px;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.25));
}
.qz-res-name {
  font-size: clamp(2rem, 9vw, 2.7rem);
  font-weight: 800;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}
.qz-res-nick {
  display: inline-block;
  margin: 10px 0 0;
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #1d2230;
  font-weight: 800;
  font-size: 0.95rem;
}
.qz-res-foot {
  padding: 20px 18px 16px;
}
.qz-res-sum {
  margin: 0 auto;
  max-width: 30em;
  font-size: 1.04rem;
  font-weight: 600;
}
.qz-mine {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}
.qz-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}
.qz-actions {
  max-width: 440px;
  margin-inline: auto;
}
.qz-actions .btn {
  flex: 1 1 140px;
  white-space: nowrap;
}
.qz-actions .btn:first-child {
  flex-basis: 100%;
}
.qz-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 640px) {
  .qz-two {
    grid-template-columns: 1fr;
  }
}
.qz-list h2 {
  font-size: 1.12rem;
  margin-bottom: 10px;
}
.qz-list ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.qz-list li {
  display: flex;
  flex-direction: column;
  padding-left: 30px;
  position: relative;
  line-height: 1.55;
}
.qz-list li::before {
  position: absolute;
  left: 0;
  top: 1px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 800;
  color: #fff;
}
.qz-good li::before {
  content: '✓';
  background: var(--go);
}
.qz-watch li::before {
  content: '!';
  background: var(--early);
}
.qz-list li span {
  color: var(--muted);
  font-size: 0.94rem;
}
.qz-rels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 640px) {
  .qz-rels {
    grid-template-columns: 1fr;
  }
}
.qz-rel {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow);
}
.qz-rel:hover {
  border-color: var(--brand);
}
.qz-rel .qz-thumb {
  width: 54px;
  height: 54px;
  font-size: 1.9rem;
}
.qz-rel-body {
  display: flex;
  flex-direction: column;
  line-height: 1.45;
}
.qz-rel-body small {
  color: var(--brand);
  font-weight: 800;
  font-size: 0.8rem;
}
.qz-rel-body strong {
  font-size: 1.05rem;
  margin-bottom: 2px;
}
.qz-rel-body span {
  color: var(--muted);
  font-size: 0.92rem;
}
.qz-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.qz-cta p {
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  .qz-in .qz-q,
  .qz-in .qz-opts,
  .qz-spin {
    animation: none;
  }
}
