/* ── Layout ─────────────────────────────────────────────────────────────────── */
.qz-wrap { min-height: 100vh; display: flex; flex-direction: column; }

.qz-main {
  flex: 1;
  max-width: 860px;
  margin: 0 auto;
  width: 100%;
  padding: 28px 24px 80px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ── Empty ───────────────────────────────────────────────────────────────────── */
.qz-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.qz-empty a { color: var(--accent); }

/* ── Progress ────────────────────────────────────────────────────────────────── */
.qz-progress {
  display: flex;
  align-items: center;
  gap: 14px;
}
.qz-progress-dots {
  display: flex;
  gap: 8px;
  align-items: center;
}
.qz-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.25s, transform 0.25s;
}
.qz-dot.active {
  background: var(--accent);
  transform: scale(1.3);
}
.qz-dot.done {
  background: #7dd87d;
}
.qz-progress-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ── Question block ──────────────────────────────────────────────────────────── */
.qz-question-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.qz-step-tag {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.qz-question {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
  color: var(--text);
}
.qz-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
  max-width: 600px;
}

/* ── Grid ────────────────────────────────────────────────────────────────────── */
.qz-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* ── Card ────────────────────────────────────────────────────────────────────── */
.qz-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.qz-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.qz-card.qz-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 8px 24px rgba(0,0,0,0.3);
}

.qz-card-img-wrap {
  position: relative;
  line-height: 0;
  background: var(--surface2);
}
.qz-card-img-wrap img {
  width: 100%;
  display: block;
  object-fit: cover;
  aspect-ratio: 3/4;
}

/* Check badge */
.qz-check-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.2s, transform 0.2s;
}
.qz-card.qz-selected .qz-check-badge {
  opacity: 1;
  transform: scale(1);
}

/* Card info */
.qz-card-info {
  padding: 12px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.qz-card-label {
  font-size: 0.88rem;
  font-weight: 700;
}
.qz-card-sublabel {
  font-size: 0.68rem;
  color: var(--text-muted);
}
.qz-select-btn {
  margin-top: 8px;
  font-size: 0.72rem;
  padding: 6px 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  align-self: flex-start;
}
.qz-select-btn:hover {
  background: var(--border);
}
.qz-card.qz-selected .qz-select-btn {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Skeleton */
.qz-skeleton {
  width: 100%;
  aspect-ratio: 3/4;
  background: linear-gradient(90deg, var(--surface2) 25%, var(--surface) 50%, var(--surface2) 75%);
  background-size: 200% 100%;
  animation: qz-shimmer 1.4s infinite;
}
@keyframes qz-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.qz-spinner-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

/* ── Controls ────────────────────────────────────────────────────────────────── */
.qz-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.qz-select-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.qz-next-btn {
  margin-left: auto;
  padding: 12px 28px;
  font-size: 0.9rem;
}
.qz-next-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Result ──────────────────────────────────────────────────────────────────── */
.qz-result-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: rgba(125, 216, 125, 0.15);
  color: #7dd87d;
  border: 1px solid rgba(125, 216, 125, 0.3);
  border-radius: 99px;
  padding: 5px 14px;
  width: fit-content;
  margin-bottom: 12px;
}
.qz-result-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 0 6px;
  color: var(--text);
}
.qz-result-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0 0 28px;
}

/* Palette */
.qz-palette-section {
  margin-bottom: 28px;
}
.qz-palette-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.qz-palette {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
.qz-swatch {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.qz-swatch-color {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
}
.qz-swatch-name {
  font-size: 0.65rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}
.qz-swatch-lv {
  font-size: 0.6rem;
  color: var(--text-muted);
}

/* Actions */
.qz-result-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.qz-tryons-btn {
  padding: 12px 28px;
  font-size: 0.9rem;
}
.qz-restart-btn {
  padding: 12px 20px;
  font-size: 0.82rem;
}

/* ── Responsive ──────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .qz-main    { padding: 16px 12px 60px; }
  .qz-question { font-size: 1.05rem; }
  .qz-grid    { grid-template-columns: 1fr; gap: 12px; }
  .qz-card-img-wrap img { aspect-ratio: 4/3; }
  .qz-skeleton { aspect-ratio: 4/3; }
  .qz-palette { grid-template-columns: repeat(3, 1fr); }
  .qz-next-btn { margin-left: 0; width: 100%; }
}
