main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 24px 80px;
}

/* Page header — matches hero-label + hero-title pattern */
.ql-page-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #d8dae0;
}

.ql-page-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent-blue);
  margin-bottom: 4px;
}

.ql-page-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #0d1117;
  line-height: 1.1;
  line-height: 1.2;
}

/* Status bar — horizontal strip card */
.ql-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 14px 20px;
  margin-bottom: 20px;
}

.ql-status-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.ql-round-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.ql-progress-track {
  width: 100%;
  max-width: 200px;
  height: 6px;
  background: var(--bar-bg);
  border-radius: 3px;
  overflow: hidden;
}

.ql-progress-fill {
  height: 100%;
  background: var(--accent-blue);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.ql-status-score {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  flex-shrink: 0;
  margin-left: 20px;
}

/* Journey — inline breadcrumb style */
.ql-journey {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 24px;
  font-size: 13px;
}

.ql-journey-step {
  padding: 3px 10px;
  border-radius: 4px;
  font-weight: 500;
  white-space: nowrap;
}

.ql-journey-step.correct {
  background: #dcfce7;
  color: #166534;
}

.ql-journey-step.wrong {
  background: #fef2f2;
  color: #991b1b;
}

.ql-journey-step.current {
  background: #dbeafe;
  color: #1e40af;
  font-weight: 600;
}

.ql-journey-step.future {
  background: #f3f4f6;
  color: #9ca3af;
}

.ql-journey-sep {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}

/* Question — left-aligned */
.ql-question {
  margin-bottom: 24px;
}

.ql-question-text {
  font-size: 20px;
  font-weight: 800;
  color: #0d1117;
  line-height: 1.3;
  letter-spacing: -0.3px;
}

/* Game answer rows — matches site game-row pattern */
.ql-game-answers {
  display: flex;
  flex-direction: column;
}

.ql-game-row {
  display: flex;
  align-items: center;
  padding: 14px 8px;
  gap: 14px;
  border-bottom: 1px solid #d8dae0;
  cursor: pointer;
  transition: background 0.12s;
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  font-family: inherit;
  text-align: left;
  width: 100%;
  color: inherit;
}

.ql-game-row:first-child {
  border-top: 1px solid #d8dae0;
}

.ql-game-row:hover {
  background: rgba(0, 0, 0, 0.06);
}

.ql-game-row:active {
  background: rgba(0, 0, 0, 0.09);
}

.ql-game-thumb {
  width: 48px;
  height: 64px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}

.ql-game-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ql-game-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
  min-width: 0;
}

/* Non-game pill answers */
.ql-pill-answers {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ql-pill-btn {
  padding: 10px 20px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.ql-pill-btn:hover {
  border-color: var(--accent-blue);
  background: #eff6ff;
  transform: translateY(-1px);
}

.ql-pill-btn:active {
  transform: translateY(0);
}

/* Results card */
.ql-results-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 40px;
  text-align: center;
}

.ql-score-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 12px;
}

.ql-score-circle.sc-green  { background: #3da66a; }
.ql-score-circle.sc-lime   { background: #7ab33e; }
.ql-score-circle.sc-amber  { background: #d4911e; }
.ql-score-circle.sc-orange { background: #d46a2a; }
.ql-score-circle.sc-red    { background: #c94444; }

.ql-results-heading {
  font-size: 24px;
  font-weight: 800;
  color: #0d1117;
  margin-bottom: 6px;
}

.ql-results-context {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.ql-flavor {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.ql-results-journey {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 24px;
  font-size: 13px;
}

.ql-comeback-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  background: var(--accent-blue);
  color: #fff;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s;
}

.ql-comeback-btn:hover {
  background: var(--accent-blue-dim);
}

/* Community stats section */
.ql-stats {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 28px 32px;
  margin-top: 20px;
}

.ql-stats-header {
  margin-bottom: 20px;
}

.ql-stats-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.ql-stats-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.ql-stat-card {
  background: #f6f8fa;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 18px 16px;
  text-align: center;
}

.ql-stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.ql-stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-top: 4px;
}

.ql-round-chart-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.ql-round-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ql-round-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ql-round-bar-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  width: 28px;
  text-align: right;
  flex-shrink: 0;
}

.ql-round-bar-track {
  flex: 1;
  height: 24px;
  background: #e8ebf0;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.ql-round-bar-fill {
  height: 100%;
  border-radius: 6px;
  min-width: 2px;
  transition: width 0.4s ease;
}

.ql-round-bar-fill.bar-green  { background: #3da66a; }
.ql-round-bar-fill.bar-yellow { background: #d4911e; }
.ql-round-bar-fill.bar-red    { background: #c94444; }

.ql-round-bar-pct {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  width: 36px;
  flex-shrink: 0;
  text-align: right;
}

.ql-round-bar-you {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.ql-chart-caption {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 10px;
}

/* No quiz state */
.ql-no-quiz {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-secondary);
}

.ql-no-quiz h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

/* Mobile */
@media (max-width: 768px) {
  .ql-progress-track { max-width: 140px; }
  .ql-results-card { padding: 28px 20px; }
  .ql-stats { padding: 20px; }
}

@media (max-width: 640px) {
  .ql-stats-cards { grid-template-columns: 1fr; }
  .ql-stats-title { font-size: 16px; }
  .ql-page-title { font-size: 24px; }
  .ql-status-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .ql-status-score { margin-left: 0; }
  .ql-question-text { font-size: 18px; }
}

@media (max-width: 480px) {
  main { padding: 16px 12px 48px; }
  .ql-score-circle {
    width: 64px;
    height: 64px;
    font-size: 22px;
  }
  .ql-results-card { padding: 20px 14px; }
  .ql-pill-btn {
    font-size: 14px;
    padding: 8px 16px;
  }
  .ql-game-row { padding: 10px 6px; gap: 10px; }
  .ql-game-title { font-size: 14px; }
}
