/* ═══════════════════════════════════════════
   QUANTA — Quiz Page Styles
   ═══════════════════════════════════════════ */

/* ── Layout ─────────────────────────────────────────────────────────────── */
body.quiz-page {
  margin-top: 0 !important;
  background: var(--q-warm-b);
  min-height: 100vh;
}

.quiz-main {
  max-width: 900px;
  margin: 0 auto;
  /* push content below fixed navbar (64px) + 24px body margin fix + breathing room */
  padding: 88px 16px 80px;
}

.quanta-reward-strip {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  flex-wrap:wrap;
  margin-bottom:12px;
  padding:10px 12px;
  background:#ffffff;
  border:1px solid rgba(20,27,79,.1);
  border-radius:12px;
  box-shadow:0 3px 14px rgba(20,27,79,.06);
  color:var(--q-muted);
  font-size:.78rem;
  font-weight:700;
}
.quanta-reward-strip strong {
  display:inline-flex;
  align-items:center;
  min-height:26px;
  padding:4px 9px;
  border-radius:999px;
  background:#eef1ff;
  color:var(--q-navy);
  font-size:.75rem;
}

/* ── Page Header ─────────────────────────────────────────────────────────── */
.quiz-page-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

/* Title — full width, centered */
.quiz-page-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--q-navy);
  margin: 0;
  text-align: center;
}

/* Second row — Back left, tabs right */
.quiz-page-subrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* Back button */
.quiz-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--q-muted);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--q-r-sm);
  border: 1.5px solid rgba(20,27,79,.12);
  background: var(--q-white);
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.quiz-back-btn:hover {
  background: #f1f5f9;
  color: var(--q-navy);
  border-color: rgba(20,27,79,.22);
}

/* ── Mode Tabs — right ───────────────────────────────────────────────────── */
.quiz-mode-tabs {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.qmt-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 16px;
  border-radius: var(--q-r-sm);
  border: 2px solid rgba(20,27,79,.12);
  font-family: var(--q-font);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--q-white);
  color: var(--q-muted);
  line-height: 1.2;
  text-decoration: none;
  transition: all 0.18s;
}
.qmt-tab--active {
  background: var(--q-navy);
  color: var(--q-white);
  border-color: var(--q-navy);
}
.qmt-tab--disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.qmt-soon {
  font-size: 0.68rem;
  background: var(--q-accent);
  color: #fff;
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 4px;
  vertical-align: middle;
}

/* ── Control Bar ─────────────────────────────────────────────────────────── */
.quiz-control-bar {
  background: var(--q-navy);
  border-radius: var(--q-r-lg);
  padding: 18px 22px;
  display: grid;
  /* selects take equal space, mode+actions auto */
  grid-template-columns: repeat(3, minmax(150px, 1fr)) auto auto;
  align-items: end;
  gap: 14px;
  box-shadow: var(--q-sh-md);
  margin-bottom: 20px;
}

/* When SST part group is visible, add a 4th column for selects */
.quiz-control-bar.has-part {
  grid-template-columns: repeat(4, minmax(140px, 1fr)) auto auto;
}

.qcb-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.qcb-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.qcb-select {
  background: rgba(255,255,255,0.08);
  border: 1.5px solid rgba(255,255,255,0.18);
  color: #fff;
  border-radius: 10px;
  padding: 10px 34px 10px 12px;
  font-family: var(--q-font);
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
  min-height: 48px;
  transition: border-color 0.15s, background 0.15s;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.6)' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.qcb-select:focus {
  outline: none;
  border-color: rgba(255,255,255,0.7);
  background-color: rgba(255,255,255,0.13);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.08);
}
.qcb-select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  color: rgba(255,255,255,0.58);
  background-color: rgba(255,255,255,0.05);
}
.qcb-select option {
  background: #1e2766;
  color: #fff;
  font-weight: 650;
}

/* Mode + rulebook group */
.qcb-group--mode {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  min-width: 110px;
}

.qcb-mode-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255,255,255,0.75);
  background: rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 5px 10px;
  text-align: center;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.qcb-rules-btn {
  background: rgba(255,255,255,0.1);
  border: 1.5px solid rgba(255,255,255,0.22);
  color: #fff;
  border-radius: 8px;
  padding: 8px 12px;
  font-family: var(--q-font);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
  text-align: center;
}
.qcb-rules-btn:hover {
  background: rgba(255,255,255,0.18);
}

/* Start / End group */
.qcb-group--actions {
  flex-direction: column;
  gap: 6px;
  min-width: 80px;
}

.qcb-btn {
  padding: 9px 20px;
  border-radius: 8px;
  border: none;
  font-family: var(--q-font);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
  width: 100%;
  text-align: center;
}
.qcb-btn--start {
  background: var(--q-accent);
  color: #fff;
}
.qcb-btn--start:hover:not(:disabled) {
  background: var(--q-accent2);
  transform: translateY(-1px);
}
.qcb-btn--start:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.qcb-btn--end {
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.85);
  border: 1.5px solid rgba(255,255,255,0.25);
}
.qcb-btn--end:hover {
  background: rgba(220,38,38,0.35);
  border-color: rgba(220,38,38,0.5);
  color: #fff;
}

/* ── Rules Drawer ────────────────────────────────────────────────────────── */
.quiz-rules-drawer {
  background: var(--q-white);
  border-radius: var(--q-r-md);
  box-shadow: var(--q-sh-md);
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s cubic-bezier(0.4,0,0.2,1), margin 0.3s;
  margin-bottom: 0;
}
.quiz-rules-drawer.open {
  max-height: 500px;
  margin-bottom: 18px;
}

.qrd-inner {
  padding: 18px 22px;
}
.qrd-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.qrd-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--q-navy);
}
.qrd-close {
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--q-muted);
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s;
}
.qrd-close:hover { background: #f1f5f9; }

.qrd-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.qrd-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--q-ink);
  line-height: 1.5;
}
.qrd-list li::before {
  content: '✦';
  color: var(--q-accent);
  font-size: 0.7rem;
  margin-top: 3px;
  flex-shrink: 0;
}

/* ── Quiz Arena ──────────────────────────────────────────────────────────── */
.quiz-arena {
  background: var(--q-white);
  border-radius: var(--q-r-lg);
  box-shadow: var(--q-sh-md);
  min-height: 320px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Idle */
.qa-idle {
  text-align: center;
  padding: 20px;
}
.qa-idle-icon {
  font-size: 3.5rem;
  margin-bottom: 14px;
}
.qa-idle-text {
  font-size: 1rem;
  color: var(--q-muted);
  max-width: 340px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Loading */
.qa-loading {
  text-align: center;
  color: var(--q-muted);
}
.qa-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(20,27,79,.12);
  border-top-color: var(--q-navy);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto 14px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Limit hit */
.qa-limit {
  text-align: center;
  padding: 20px;
}
.qa-limit-icon { font-size: 3rem; margin-bottom: 12px; }
.qa-limit-msg {
  font-size: 0.95rem;
  color: var(--q-muted);
  max-width: 380px;
  margin: 0 auto 20px;
  line-height: 1.6;
}

/* Progress */
.qa-progress-bar {
  width: 100%;
  height: 5px;
  background: #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
}
.qa-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--q-royal), var(--q-accent));
  border-radius: 10px;
  transition: width 0.4s ease;
  width: 0%;
}

.qa-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  width: 100%;
}
.qa-counter {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--q-muted);
}
.qa-timer {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--q-navy);
  font-variant-numeric: tabular-nums;
}

/* Question wrap */
.qa-question-wrap {
  width: 100%;
}

/* Card */
.qa-card {
  width: 100%;
}

.qa-question-text {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--q-ink);
  line-height: 1.65;
  margin-bottom: 16px;
}

.qa-question-img {
  width: 100%;
  max-width: 420px;
  border-radius: var(--q-r-sm);
  margin-bottom: 16px;
  display: block;
}

/* Options */
.qa-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.qa-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--q-r-sm);
  border: 2px solid #e2e8f0;
  background: #f8fafc;
  font-family: var(--q-font);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--q-ink);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  position: relative;
}
.qa-opt::before {
  content: attr(data-key);
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--q-muted);
  background: #e2e8f0;
  border-radius: 5px;
  padding: 2px 7px;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.qa-opt:hover:not(:disabled) {
  border-color: var(--q-royal);
  background: #f0f4ff;
  transform: translateX(2px);
}
.qa-opt:hover:not(:disabled)::before {
  background: var(--q-royal);
  color: #fff;
}
.qa-opt.selected {
  border-color: var(--q-royal);
  background: #eef1ff;
}
.qa-opt.selected::before {
  background: var(--q-royal);
  color: #fff;
}
.qa-opt.correct {
  border-color: #16a34a;
  background: #f0fdf4;
}
.qa-opt.correct::before {
  background: #16a34a;
  color: #fff;
}
.qa-opt.wrong {
  border-color: #dc2626;
  background: #fef2f2;
}
.qa-opt.wrong::before {
  background: #dc2626;
  color: #fff;
}
.qa-opt:disabled {
  cursor: not-allowed;
}

/* Feedback */
.qa-feedback {
  padding: 14px 16px;
  border-radius: var(--q-r-sm);
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.qa-feedback.correct-fb {
  background: #f0fdf4;
  border: 1.5px solid #bbf7d0;
}
.qa-feedback.wrong-fb {
  background: #fef2f2;
  border: 1.5px solid #fecaca;
}

.qa-feedback-badge {
  font-size: 0.9rem;
  font-weight: 700;
}
.qa-feedback.correct-fb .qa-feedback-badge { color: #16a34a; }
.qa-feedback.wrong-fb   .qa-feedback-badge { color: #dc2626; }

.qa-explanation {
  font-size: 0.85rem;
  color: var(--q-muted);
  line-height: 1.55;
  margin: 0;
}

/* Actions */
.qa-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.qa-submit-btn,
.qa-next-btn {
  padding: 10px 26px;
  border-radius: var(--q-r-sm);
  border: none;
  font-family: var(--q-font);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s;
}
.qa-submit-btn {
  background: var(--q-navy);
  color: #fff;
}
.qa-submit-btn:hover:not(:disabled) {
  background: var(--q-navy-l);
  transform: translateY(-1px);
}
.qa-submit-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.qa-next-btn {
  background: var(--q-royal);
  color: #fff;
}
.qa-next-btn:hover {
  background: #2a1fc7;
  transform: translateY(-1px);
}

/* Summary */
.qa-summary {
  text-align: center;
  padding: 20px;
  width: 100%;
}
.qa-summary-icon { font-size: 3.5rem; margin-bottom: 12px; }
.qa-summary-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--q-navy);
  margin-bottom: 18px;
}
.qa-summary-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.qa-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.qa-stat-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--q-navy);
}
.qa-stat-label {
  font-size: 0.78rem;
  color: var(--q-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.qa-stat-num.green { color: #16a34a; }
.qa-stat-num.red   { color: #dc2626; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 700px) {
  .quiz-main {
    padding: 76px 12px 90px;
  }

  /* Header: title upar, back+tabs neeche */
  .quiz-page-header {
    gap: 8px;
  }
  .quiz-page-title {
    font-size: 1rem;
    text-align: center;
  }
  .quiz-page-subrow {
    justify-content: space-between;
  }

  /* Control bar: stack into 2-col grid */
  .quiz-control-bar {
    grid-template-columns: 1fr 1fr;
    padding: 14px 14px;
    gap: 10px;
  }
  .quiz-control-bar.has-part {
    grid-template-columns: 1fr 1fr;
  }
  .qcb-group--mode {
    grid-column: 1 / 2;
  }
  .qcb-group--actions {
    grid-column: 2 / 3;
    flex-direction: row;
    gap: 8px;
    align-items: flex-end;
    justify-content: flex-end;
  }
  .qcb-btn {
    width: auto;
    flex: 1;
  }

  .quiz-arena {
    padding: 20px 14px;
  }
  .quiz-page-title {
    font-size: 0.95rem;
  }
  .qa-question-text {
    font-size: 0.95rem;
  }
}

/* ══════════════════════════════
   SCHEDULED TEST CARDS
══════════════════════════════ */
#testPanel {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.st-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.st-card {
  background: #fff;
  border: 1px solid rgba(20,27,79,.09);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: 0 2px 10px rgba(20,27,79,.06);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: box-shadow .18s ease, transform .18s ease;
}

.st-card:hover {
  box-shadow: 0 6px 20px rgba(20,27,79,.11);
  transform: translateY(-2px);
}

.st-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.st-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.st-card__body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.st-card__title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--q-navy);
  line-height: 1.3;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.st-card__title-hi {
  font-size: .78rem;
  color: var(--q-muted);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.st-card__meta {
  font-size: .72rem;
  color: var(--q-muted);
  margin: 0;
}

.st-card__time {
  font-size: .7rem;
  color: var(--q-soft);
  margin: 0;
}

.st-card__action {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: none;
  margin-top: 2px;
  position: relative;
}
.st-card__action::before {
  content: "";
  position: absolute;
  top: 0;
  left: 4px;
  right: 4px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(20,27,79,.12) 12%, rgba(20,27,79,.12) 88%, transparent);
  pointer-events: none;
}

.st-card__btn {
  font-size: .82rem;
  padding: 8px 18px;
  border-radius: 999px;
  text-decoration: none;
}

.st-card__btn--live {
  background: linear-gradient(105deg, #e45b7c, #c73d5f) !important;
  box-shadow: 0 4px 14px rgba(228,91,124,.3);
}

.st-card__btn--ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(53,40,217,.22);
  color: var(--q-royal);
  background: #fff;
  font-weight: 700;
}

.st-card__btn--ghost:hover {
  background: #eef1ff;
}

.st-card__submitted {
  font-size: .8rem;
  font-weight: 600;
  color: var(--q-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Single column on narrow screens */
@media (max-width: 600px) {
  .st-cards-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .st-card {
    padding: 14px 14px;
    border-radius: 14px;
  }

  .st-card__title { font-size: .9rem; }

  .st-card__btn {
    width: 100%;
    justify-content: center;
  }
}

/* ══ LIQUID GLASS — iOS glass pass ══ */
/* Overrides only — background/border/box-shadow/backdrop-filter/border-radius
   + shine pseudo-elements. No layout/spacing/typography changes.
   No colour-fill alpha is reduced anywhere below; branded/state colours keep
   their existing background declarations untouched — only chrome (border,
   shadow, blur, shine overlay) is layered on top of them. */

/* ── Neutral / white surfaces → real frosted glass ─────────────────────── */
.quanta-reward-strip {
  background: linear-gradient(135deg, rgba(255,255,255,.58) 0%, rgba(255,255,255,.3) 100%);
  border: var(--lg-light-border);
  border-radius: 16px;
  box-shadow: var(--lg-light-shadow);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  position: relative;
  overflow: hidden;
}
.quanta-reward-strip::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--lg-shine);
  opacity: .5;
  pointer-events: none;
}

.quiz-back-btn {
  background: rgba(255,255,255,.4);
  border: var(--lg-light-border);
  border-radius: 14px;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

.qmt-tab:not(.qmt-tab--active) {
  background: rgba(255,255,255,.38);
  border-radius: 14px;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

.quiz-rules-drawer {
  background: linear-gradient(135deg, rgba(255,255,255,.62) 0%, rgba(255,255,255,.36) 100%);
  border: var(--lg-light-border);
  border-radius: 20px;
  box-shadow: var(--lg-light-shadow);
  backdrop-filter: blur(28px) saturate(195%);
  -webkit-backdrop-filter: blur(28px) saturate(195%);
}

.quiz-arena {
  background: linear-gradient(135deg, rgba(255,255,255,.56) 0%, rgba(255,255,255,.3) 100%);
  border: var(--lg-light-border);
  border-radius: 28px;
  box-shadow: var(--lg-light-shadow);
  backdrop-filter: blur(28px) saturate(195%);
  -webkit-backdrop-filter: blur(28px) saturate(195%);
  position: relative;
  overflow: hidden;
}
.quiz-arena::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--lg-shine);
  opacity: .35;
  pointer-events: none;
}

/* Answer option — default/unselected state (neutral) */
.qa-opt {
  background: rgba(255,255,255,.55);
  border-radius: 14px;
  backdrop-filter: blur(18px) saturate(175%);
  -webkit-backdrop-filter: blur(18px) saturate(175%);
}
/* hover's light-blue tint (#f0f4ff) is a deliberate interaction cue —
   left untouched so it isn't diluted */

.qa-progress-bar {
  border-radius: 12px;
  backdrop-filter: var(--lg-blur-sm);
  -webkit-backdrop-filter: var(--lg-blur-sm);
}

.st-card {
  background: linear-gradient(135deg, rgba(255,255,255,.58) 0%, rgba(255,255,255,.32) 100%);
  border: var(--lg-light-border);
  border-radius: 20px;
  box-shadow: var(--lg-light-shadow);
  backdrop-filter: blur(28px) saturate(195%);
  -webkit-backdrop-filter: blur(28px) saturate(195%);
  position: relative;
  overflow: hidden;
}
.st-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--lg-shine);
  opacity: .3;
  pointer-events: none;
}

.st-card__btn--ghost {
  background: rgba(255,255,255,.4);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

/* ── Branded / coloured surfaces → glass laid OVER existing colour ───────
   (background intentionally NOT redeclared — original vivid fill stays) */

.quiz-control-bar {
  border-radius: 28px;
  border: var(--lg-dark-border);
  box-shadow: var(--q-sh-md), var(--lg-dark-shadow);
  backdrop-filter: var(--lg-blur);
  -webkit-backdrop-filter: var(--lg-blur);
  position: relative;
  overflow: hidden;
}
.quiz-control-bar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--lg-shine);
  opacity: .3;
  pointer-events: none;
}

.qcb-select {
  border-radius: 12px;
  border: 1.5px solid rgba(255,255,255,.32);
  backdrop-filter: var(--lg-blur-sm);
  -webkit-backdrop-filter: var(--lg-blur-sm);
}

.qcb-mode-badge {
  border: 1px solid rgba(255,255,255,.3);
  backdrop-filter: var(--lg-blur-sm);
  -webkit-backdrop-filter: var(--lg-blur-sm);
}

.qcb-rules-btn {
  border-radius: 12px;
  border: 1.5px solid rgba(255,255,255,.34);
  backdrop-filter: var(--lg-blur-sm);
  -webkit-backdrop-filter: var(--lg-blur-sm);
}

.qcb-btn {
  border-radius: 14px;
}
.qcb-btn--start {
  border: 1px solid rgba(255,255,255,.55);
  box-shadow: 0 8px 22px rgba(228,91,124,.35), inset 0 1px 1px rgba(255,255,255,.6), inset 0 -10px 18px rgba(0,0,0,.08);
  position: relative;
  overflow: hidden;
}
.qcb-btn--start::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(255,255,255,.45) 0%, transparent 40%);
  pointer-events: none;
}
.qcb-btn--end {
  border: 1.5px solid rgba(255,255,255,.32);
  backdrop-filter: var(--lg-blur-sm);
  -webkit-backdrop-filter: var(--lg-blur-sm);
}

.qa-progress-fill {
  border-radius: 12px;
  box-shadow: inset 0 1px 1px rgba(255,255,255,.5), inset 0 -3px 6px rgba(0,0,0,.1);
}

/* Answer option states — selected / correct / wrong: glass touches only,
   pass/fail colours and contrast left fully intact */
.qa-opt.selected {
  border-radius: 14px;
  box-shadow: 0 6px 16px rgba(53,40,217,.16), inset 0 1px 1px rgba(255,255,255,.7);
  backdrop-filter: var(--lg-blur-sm);
  -webkit-backdrop-filter: var(--lg-blur-sm);
}
.qa-opt.correct {
  border-radius: 14px;
  box-shadow: 0 6px 16px rgba(22,163,74,.18), inset 0 1px 1px rgba(255,255,255,.75);
  backdrop-filter: var(--lg-blur-sm);
  -webkit-backdrop-filter: var(--lg-blur-sm);
}
.qa-opt.wrong {
  border-radius: 14px;
  box-shadow: 0 6px 16px rgba(220,38,38,.18), inset 0 1px 1px rgba(255,255,255,.75);
  backdrop-filter: var(--lg-blur-sm);
  -webkit-backdrop-filter: var(--lg-blur-sm);
}

.qa-feedback {
  border-radius: 16px;
  backdrop-filter: var(--lg-blur-sm);
  -webkit-backdrop-filter: var(--lg-blur-sm);
}
.qa-feedback.correct-fb {
  box-shadow: inset 0 1px 1px rgba(255,255,255,.8);
}
.qa-feedback.wrong-fb {
  box-shadow: inset 0 1px 1px rgba(255,255,255,.8);
}

.qa-submit-btn,
.qa-next-btn {
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.32);
  box-shadow: 0 8px 20px rgba(20,27,79,.22), inset 0 1px 1px rgba(255,255,255,.35);
  position: relative;
  overflow: hidden;
}
.qa-submit-btn::before,
.qa-next-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(255,255,255,.32) 0%, transparent 40%);
  pointer-events: none;
}

.st-card__badge {
  border: 1px solid rgba(255,255,255,.55);
  backdrop-filter: var(--lg-blur-sm);
  -webkit-backdrop-filter: var(--lg-blur-sm);
}

.st-card__btn--live {
  border: 1px solid rgba(255,255,255,.5);
  box-shadow: 0 8px 22px rgba(228,91,124,.35), inset 0 1px 1px rgba(255,255,255,.55);
  backdrop-filter: var(--lg-blur-sm);
  -webkit-backdrop-filter: var(--lg-blur-sm);
  position: relative;
  overflow: hidden;
}
.st-card__btn--live::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(255,255,255,.4) 0%, transparent 40%);
  pointer-events: none;
}

.qmt-tab--active {
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.3);
  box-shadow: 0 6px 16px rgba(20,27,79,.28), inset 0 1px 1px rgba(255,255,255,.3);
  position: relative;
  overflow: hidden;
}
.qmt-tab--active::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(255,255,255,.3) 0%, transparent 40%);
  pointer-events: none;
}

/* Reconcile squircle radii with the file's own mobile breakpoints so the
   glass pass doesn't out-cascade the existing compact mobile radii */
@media (max-width: 700px) {
  .quiz-control-bar,
  .quiz-arena {
    border-radius: 20px;
  }
}
@media (max-width: 600px) {
  .st-card {
    border-radius: 16px;
  }
}

/* ══ LIQUID GLASS — students page gap-fill ══ */
/* students.php also loads quiz.css but defines its own rules in a page-level
   <style> block placed after this stylesheet in the document, so equal-
   specificity declarations here would normally lose the cascade tie-break.
   Every selector below is scoped under .students-page to raise specificity
   just enough to win, without touching HTML/layout/typography/spacing.
   No colour-fill alpha is reduced — branded/state backgrounds (tab active
   pill, tier/rule chips, avatar fallback, "you" rank card, my-rank panel)
   keep their existing background declarations untouched; only chrome
   (border, shadow, blur, shine overlay, radius) is layered on top. */

/* ── Neutral / white surfaces → real frosted glass ─────────────────────── */
.students-page .students-hero {
  background: linear-gradient(135deg, rgba(255,255,255,.56) 0%, rgba(255,255,255,.3) 100%);
  border: var(--lg-light-border);
  border-radius: 24px;
  box-shadow: var(--lg-light-shadow);
  backdrop-filter: blur(28px) saturate(195%);
  -webkit-backdrop-filter: blur(28px) saturate(195%);
  position: relative;
  overflow: hidden;
}
.students-page .students-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--lg-shine);
  opacity: .35;
  pointer-events: none;
}

.students-page .students-board {
  background: linear-gradient(135deg, rgba(255,255,255,.6) 0%, rgba(255,255,255,.34) 100%);
  border: var(--lg-light-border);
  border-radius: 24px;
  box-shadow: var(--lg-light-shadow);
  backdrop-filter: blur(28px) saturate(195%);
  -webkit-backdrop-filter: blur(28px) saturate(195%);
}

.students-page .students-rules {
  background: linear-gradient(135deg, rgba(255,255,255,.6) 0%, rgba(255,255,255,.34) 100%);
  border: var(--lg-light-border);
  border-radius: 24px;
  box-shadow: var(--lg-light-shadow);
  backdrop-filter: blur(28px) saturate(195%);
  -webkit-backdrop-filter: blur(28px) saturate(195%);
}

.students-page .rules-panel {
  background: rgba(255,255,255,.5);
  border: var(--lg-light-border);
  border-radius: 18px;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

.students-page .students-tabs a {
  background: rgba(255,255,255,.38);
  border: var(--lg-light-border);
  border-radius: 14px;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

.students-page .student-rank-card {
  background: rgba(255,255,255,.46);
  border: var(--lg-light-border);
  border-radius: 18px;
  box-shadow: 0 6px 16px rgba(20,27,79,.08);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

.students-page .student-empty-card {
  background: rgba(255,255,255,.38);
  border-radius: 18px;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

/* ── Branded / coloured surfaces → glass laid OVER existing colour ───────
   (background intentionally NOT redeclared — original vivid fill stays) */

.students-page .students-tabs a.active {
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.3);
  box-shadow: 0 6px 16px rgba(20,27,79,.28), inset 0 1px 1px rgba(255,255,255,.3);
  backdrop-filter: var(--lg-blur-sm);
  -webkit-backdrop-filter: var(--lg-blur-sm);
  position: relative;
  overflow: hidden;
}
.students-page .students-tabs a.active::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(255,255,255,.3) 0%, transparent 40%);
  pointer-events: none;
}

.students-page .my-student-rank {
  border-radius: 20px;
  border: var(--lg-dark-border);
  box-shadow: 0 10px 28px rgba(20,27,79,.3), inset 0 1px 1px rgba(255,255,255,.3), inset 0 -14px 26px rgba(0,0,0,.2);
  backdrop-filter: var(--lg-blur);
  -webkit-backdrop-filter: var(--lg-blur);
  position: relative;
  overflow: hidden;
}
.students-page .my-student-rank::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--lg-shine);
  opacity: .3;
  pointer-events: none;
}

.students-page .student-rank-card.is-me {
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(53,40,217,.18), inset 0 1px 1px rgba(255,255,255,.5);
  backdrop-filter: var(--lg-blur-sm);
  -webkit-backdrop-filter: var(--lg-blur-sm);
  position: relative;
  overflow: hidden;
}
.students-page .student-rank-card.is-me::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(255,255,255,.4) 0%, transparent 40%);
  pointer-events: none;
}

.students-page .student-avatar-fallback {
  border: 1px solid rgba(255,255,255,.4);
  box-shadow: 0 4px 10px rgba(53,40,217,.3), inset 0 1px 1px rgba(255,255,255,.4);
  backdrop-filter: var(--lg-blur-sm);
  -webkit-backdrop-filter: var(--lg-blur-sm);
}

.students-page .rule-chip {
  border: 1px solid rgba(255,255,255,.5);
  box-shadow: 0 3px 8px rgba(20,27,79,.18), inset 0 1px 1px rgba(255,255,255,.5);
  backdrop-filter: var(--lg-blur-sm);
  -webkit-backdrop-filter: var(--lg-blur-sm);
}

.students-page .tier-badge {
  border: 1px solid rgba(255,255,255,.5);
  box-shadow: 0 3px 8px rgba(20,27,79,.18), inset 0 1px 1px rgba(255,255,255,.5);
  backdrop-filter: var(--lg-blur-sm);
  -webkit-backdrop-filter: var(--lg-blur-sm);
}
