/* Practice — hub landing + mixed drill (Learn/Catalog palette) */

body.page-practice {
  --pr-violet: #7c5cff;
  --pr-blue: #3b82f6;
  --pr-teal: #14b8a6;
  --pr-green: #22c55e;
  --pr-amber: #f59e0b;
  --pr-coral: #fb7185;

  padding-top: 56px;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(124, 92, 255, 0.12) 0%, transparent 45%),
    radial-gradient(ellipse at 100% 20%, rgba(59, 130, 246, 0.1) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 100%, rgba(20, 184, 166, 0.08) 0%, transparent 50%),
    #eef0f8;
}
[data-theme="dark"] body.page-practice {
  background:
    radial-gradient(ellipse at 0% 0%, rgba(124, 92, 255, 0.1) 0%, transparent 45%),
    #121218;
}

/* ── Hub layout ── */
.pr-page {
  padding: 1rem 0 2.5rem;
}
.pr-page .container {
  max-width: 1200px;
}

.pr-hub-layout {
  display: grid;
  grid-template-columns: 220px 1fr 200px;
  gap: 1rem;
  align-items: start;
}
@media (max-width: 991.98px) {
  .pr-hub-layout {
    grid-template-columns: 1fr;
  }
  .pr-hub-side { order: 3; }
  .pr-hub-main { order: 2; }
}

.pr-hub-hero-wrap {
  grid-column: 1 / -1;
  margin-bottom: 0.25rem;
}

.pr-hub-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.25rem;
  align-items: center;
  padding: 1.35rem 1.5rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(124, 92, 255, 0.15);
  box-shadow: 0 12px 40px rgba(124, 92, 255, 0.1);
  backdrop-filter: blur(8px);
}
[data-theme="dark"] .pr-hub-hero {
  background: rgba(30, 30, 38, 0.92);
  border-color: var(--border);
}
@media (max-width: 767.98px) {
  .pr-hub-hero {
    grid-template-columns: 1fr;
  }
  .pr-hub-hero-visual { display: none; }
}

.pr-hub-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--pr-violet);
  margin-bottom: 0.45rem;
}
.pr-hub-title {
  font-size: clamp(1.65rem, 3.5vw, 2.35rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 0.55rem;
  color: #2e3856;
}
[data-theme="dark"] .pr-hub-title { color: var(--text); }
.pr-hub-lead {
  font-size: 0.98rem;
  color: #586380;
  max-width: 36rem;
  line-height: 1.55;
  margin: 0 0 1rem;
}

.pr-stat-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.pr-stat-tile {
  border-radius: 12px;
  padding: 0.55rem 0.85rem;
  text-align: center;
  min-width: 72px;
  border: 1px solid transparent;
}
.pr-stat-tile strong {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.1;
}
.pr-stat-tile span {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.9;
}
.pr-stat-tile--green { background: rgba(34, 197, 94, 0.15); border-color: rgba(34, 197, 94, 0.28); color: #16a34a; }
.pr-stat-tile--violet { background: rgba(124, 92, 255, 0.15); border-color: rgba(124, 92, 255, 0.28); color: #6d4aff; }
.pr-stat-tile--teal { background: rgba(20, 184, 166, 0.15); border-color: rgba(20, 184, 166, 0.28); color: #0d9488; }

.pr-feature-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.65rem;
}
.pr-feature-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}
.pr-feature-pill--green { background: rgba(34, 197, 94, 0.12); color: #16a34a; }
.pr-feature-pill--violet { background: rgba(124, 92, 255, 0.12); color: #6d4aff; }
.pr-feature-pill--amber { background: rgba(245, 158, 11, 0.12); color: #b45309; }

.pr-hub-hero-visual {
  position: relative;
  width: 220px;
  min-height: 160px;
}
.pr-demo-streak {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 0.78rem;
  font-weight: 800;
  color: #16a34a;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
}
.pr-demo-card {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  background: #fff;
  border: 1px solid rgba(124, 92, 255, 0.18);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  box-shadow: 0 8px 24px rgba(124, 92, 255, 0.12);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
[data-theme="dark"] .pr-demo-card {
  background: rgba(30, 30, 38, 0.95);
  border-color: var(--border);
}
.pr-demo-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pr-violet);
}
.pr-demo-q {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}
.pr-demo-opt {
  font-size: 0.75rem;
  font-weight: 600;
  color: #586380;
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
}
.pr-demo-opt--picked {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
}

.pr-hub-panel {
  border-radius: 16px;
  padding: 1rem 1.05rem;
  margin-bottom: 0.85rem;
  border: 1px solid transparent;
}
.pr-hub-panel-title {
  font-size: 0.88rem;
  font-weight: 800;
  margin: 0 0 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.pr-hub-panel-note {
  font-size: 0.8rem;
  line-height: 1.45;
  color: #586380;
  margin: 0 0 0.65rem;
}
.pr-hub-panel--violet {
  background: rgba(124, 92, 255, 0.08);
  border-color: rgba(124, 92, 255, 0.18);
}
.pr-hub-panel--violet .pr-hub-panel-title { color: #6d4aff; }
.pr-hub-panel--teal {
  background: rgba(20, 184, 166, 0.08);
  border-color: rgba(20, 184, 166, 0.18);
}
.pr-hub-panel--teal .pr-hub-panel-title { color: #0d9488; }
.pr-hub-panel--amber {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.2);
}
.pr-hub-panel--amber .pr-hub-panel-title { color: #d97706; }

.pr-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.pr-steps li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.8rem;
  line-height: 1.45;
  color: #586380;
}
.pr-step-num {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: rgba(124, 92, 255, 0.15);
  color: #6d4aff;
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pr-hub-action {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  margin-bottom: 0.45rem;
  transition: transform 0.15s ease;
}
.pr-hub-action:last-child { margin-bottom: 0; }
.pr-hub-action:hover { transform: translateY(-1px); text-decoration: none; }
.pr-hub-action--violet {
  background: rgba(124, 92, 255, 0.12);
  color: #6d4aff;
  border: 1px solid rgba(124, 92, 255, 0.22);
}
.pr-hub-action--blue {
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
  border: 1px solid rgba(59, 130, 246, 0.22);
}

.pr-hub-main-head {
  margin-bottom: 0.85rem;
}
.pr-hub-main-head h2 {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0 0 0.25rem;
  color: #2e3856;
}
[data-theme="dark"] .pr-hub-main-head h2 { color: var(--text); }
.pr-hub-main-head p {
  font-size: 0.85rem;
  color: #586380;
  margin: 0;
  line-height: 1.45;
}

.pr-diff-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}
@media (max-width: 767.98px) {
  .pr-diff-grid { grid-template-columns: 1fr; }
}

.pr-diff-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.1rem 1.15rem;
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(124, 92, 255, 0.12);
  box-shadow: 0 6px 20px rgba(124, 92, 255, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  position: relative;
  overflow: hidden;
}
.pr-diff-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--pr-from), var(--pr-to));
}
.pr-diff-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(124, 92, 255, 0.14);
  border-color: color-mix(in srgb, var(--pr-accent) 35%, transparent);
  text-decoration: none;
  color: inherit;
}
[data-theme="dark"] .pr-diff-card {
  background: rgba(30, 30, 38, 0.92);
  border-color: var(--border);
}
.pr-diff-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  background: linear-gradient(135deg, color-mix(in srgb, var(--pr-from) 35%, #fff), color-mix(in srgb, var(--pr-to) 25%, #fff));
  color: var(--pr-accent);
}
.pr-diff-card-title {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0.15rem 0 0;
  color: var(--text);
}
.pr-diff-card-desc {
  font-size: 0.82rem;
  color: #586380;
  line-height: 1.45;
  margin: 0;
  flex: 1;
}
.pr-diff-card-meta {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--pr-accent);
  margin: 0;
}
.pr-diff-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--pr-accent);
  margin-top: 0.35rem;
}

/* ── Drill layout (viewport-fit, no scroll to see answer) ── */
body.page-practice-drill.pr-session-active {
  height: 100dvh;
  overflow: hidden;
}
body.page-practice-drill.pr-session-done {
  height: auto;
  overflow: auto;
}
body.page-practice-drill.pr-session-active .pr-site-foot {
  display: none;
}

.page-practice-drill .pr-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0.5rem 0.75rem 0.65rem;
  height: calc(100dvh - 56px);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
body.page-practice-drill.pr-session-done .pr-wrap {
  height: auto;
  overflow: visible;
  padding: 1rem 1rem 2.5rem;
}

.page-practice-drill.pr-session-active .pr-bc {
  display: none;
}

.page-practice-drill.pr-session-active .pr-head {
  flex-shrink: 0;
  margin-bottom: 0.55rem;
  padding: 0.55rem 0.85rem 0.65rem;
  border-radius: 14px;
  position: relative;
  top: auto;
}
.page-practice-drill.pr-session-active .pr-head-compact-hide {
  display: none;
}
.page-practice-drill.pr-session-active .pr-head.is-compact,
.page-practice-drill.pr-session-active .pr-head {
  padding: 0.5rem 0.85rem 0.6rem;
}
.page-practice-drill.pr-session-active .pr-head-top {
  align-items: center;
}
.page-practice-drill.pr-session-active .pr-title {
  font-size: 0.98rem;
}
.page-practice-drill.pr-session-active .pr-levels {
  margin-top: 0.35rem;
}
.page-practice-drill.pr-session-active .pr-level {
  padding: 0.22rem 0.65rem;
  font-size: 0.74rem;
}
.page-practice-drill.pr-session-active .pr-progress-row {
  margin-top: 0.45rem;
  font-size: 0.76rem;
}

.pr-drill-shell {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.pr-bc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  font-size: 0.78rem;
  color: #586380;
  margin-bottom: 0.85rem;
}
.pr-bc a {
  color: var(--pr-violet);
  text-decoration: none;
  font-weight: 600;
}
.pr-bc a:hover { text-decoration: underline; }
.pr-bc span { margin: 0 0.15rem; }

.pr-head {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(124, 92, 255, 0.15);
  border-radius: 16px;
  padding: 0.85rem 1.1rem 1rem;
  margin-bottom: 1rem;
  position: sticky;
  top: 56px;
  z-index: 90;
  box-shadow: 0 8px 24px rgba(124, 92, 255, 0.08);
  backdrop-filter: blur(8px);
  transition: padding 0.22s ease, box-shadow 0.22s ease;
}
[data-theme="dark"] .pr-head {
  background: rgba(30, 30, 38, 0.92);
  border-color: var(--border);
}

.pr-head-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.pr-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pr-violet);
  margin-bottom: 0.15rem;
}
.pr-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.pr-streak {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 800;
  color: #16a34a;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  white-space: nowrap;
}
.pr-streak.is-zero { color: var(--muted); background: var(--bg); border-color: var(--border); }

.pr-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.65rem 0 0.75rem;
}
.pr-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #586380;
  background: rgba(124, 92, 255, 0.06);
  border: 1px solid rgba(124, 92, 255, 0.12);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
}

.pr-levels {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.pr-level {
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  transition: all 0.15s;
}
.pr-level--active-easy { background: #22c55e; color: #fff; border-color: #22c55e; }
.pr-level--active-medium { background: #f59e0b; color: #fff; border-color: #f59e0b; }
.pr-level--active-hard { background: #ef4444; color: #fff; border-color: #ef4444; }
.pr-level:not([class*="active"]) {
  background: var(--bg);
  color: var(--muted);
  border-color: var(--border);
}
.pr-level:not([class*="active"]):hover {
  border-color: var(--pr-violet);
  color: var(--text);
}

.pr-progress-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.65rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.pr-score-live {
  font-weight: 700;
  color: #22c55e;
}
.pr-progress-bar {
  height: 5px;
  border-radius: 3px;
  background: rgba(124, 92, 255, 0.12);
  margin-top: 0.35rem;
  overflow: hidden;
}
.pr-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--pr-green), var(--pr-violet));
  transition: width 0.35s ease;
}

@media (max-width: 991.98px) {
  body.page-practice-drill:not(.pr-session-active) .pr-head {
    margin: 0 -0.75rem 0.85rem;
    border-radius: 0 0 16px 16px;
  }
  .pr-head-compact-hide {
    overflow: hidden;
    transition: opacity 0.2s ease, max-height 0.24s ease, margin 0.24s ease;
    max-height: 120px;
  }
  .pr-head.is-compact {
    padding: 0.55rem 0.85rem 0.65rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  }
  .pr-head.is-compact .pr-head-compact-hide {
    opacity: 0;
    max-height: 0;
    margin: 0;
    pointer-events: none;
  }
  .pr-head.is-compact .pr-title {
    font-size: 1rem;
  }
}

.pr-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.pr-slide {
  display: none;
  height: 100%;
}
.pr-slide.is-active {
  display: flex;
  flex-direction: column;
  min-height: 0;
  animation: prFade 0.22s ease;
}
@keyframes prFade {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.pr-card {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(124, 92, 255, 0.12);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(124, 92, 255, 0.07);
  flex: 0 1 auto;
  align-self: stretch;
  max-height: 100%;
  justify-content: flex-start;
}
.pr-card.is-answered {
  flex: 1;
  min-height: 0;
}
[data-theme="dark"] .pr-card {
  background: rgba(30, 30, 38, 0.92);
  border-color: var(--border);
}

/* Instant feedback banner — first thing you see after answering */
.pr-feedback {
  display: none;
  flex-shrink: 0;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.9rem;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.35;
  border-bottom: 1px solid transparent;
}
.pr-feedback.is-visible {
  display: flex;
}
.pr-feedback.is-correct {
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.18), rgba(20, 184, 166, 0.12));
  color: #15803d;
  border-bottom-color: rgba(34, 197, 94, 0.25);
}
.pr-feedback.is-wrong {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.14), rgba(245, 158, 11, 0.1));
  color: #b91c1c;
  border-bottom-color: rgba(239, 68, 68, 0.22);
}
[data-theme="dark"] .pr-feedback.is-correct {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}
[data-theme="dark"] .pr-feedback.is-wrong {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
}
.pr-feedback i {
  font-size: 1.15rem;
  flex-shrink: 0;
}
.pr-feedback strong {
  font-weight: 800;
}

.pr-card-question {
  flex: 0 0 auto;
  min-height: 0;
}
.pr-card:not(.is-answered) .pr-card-question {
  max-height: 42vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.pr-q-top {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.1rem 0.75rem;
  border-bottom: 1px solid rgba(124, 92, 255, 0.1);
}
.pr-q-num {
  min-width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--pr-violet), var(--pr-blue));
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pr-q-text {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  margin: 0.55rem 0 0;
  color: var(--text);
}
.pr-card.is-answered .pr-q-top {
  padding: 0.55rem 0.85rem 0.45rem;
  border-bottom: none;
}
.pr-card.is-answered .pr-q-num {
  min-width: 28px;
  height: 28px;
  font-size: 0.78rem;
  border-radius: 8px;
}
.pr-card.is-answered .pr-q-meta {
  display: none;
}
.pr-card.is-answered .pr-q-text {
  font-size: 0.82rem;
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pr-opts {
  padding: 0.85rem 1.1rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 0 0 auto;
}
.pr-card.is-answered .pr-opts {
  padding: 0.35rem 0.85rem 0.45rem;
  gap: 0.35rem;
}
.pr-card.is-answered .pr-opt:not(.is-correct):not(.is-wrong) {
  display: none;
}
.pr-card.is-answered .pr-opt {
  padding: 0.45rem 0.65rem;
}
.pr-card.is-answered .pr-opt-letter {
  width: 26px;
  height: 26px;
  font-size: 0.74rem;
}
.pr-card.is-answered .pr-opt-text {
  font-size: 0.84rem;
}
.pr-q-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.pr-cat-tag,
.pr-subcat-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  line-height: 1.2;
}
.pr-cat-tag {
  color: #2563eb;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
}
.pr-subcat-tag {
  color: #6d4aff;
  background: rgba(124, 92, 255, 0.1);
  border: 1px solid rgba(124, 92, 255, 0.2);
}
.pr-q-meta .pr-diff {
  margin-left: 0.1rem;
}
.pr-diff {
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.pr-diff-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.diff-easy { color: #16a34a; }
.diff-easy .pr-diff-dot { background: #22c55e; }
.diff-medium { color: #b45309; }
.diff-medium .pr-diff-dot { background: #f59e0b; }
.diff-hard { color: #dc2626; }
.diff-hard .pr-diff-dot { background: #ef4444; }

.pr-opt {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  text-align: left;
  padding: 0.6rem 0.8rem;
  border: 1.5px solid rgba(124, 92, 255, 0.14);
  border-radius: 10px;
  background: var(--bg);
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}
.pr-opt:hover:not(.is-locked) {
  border-color: var(--pr-violet);
  background: rgba(124, 92, 255, 0.06);
}
.pr-opt.is-locked { cursor: default; }
.pr-opt.is-correct {
  border-color: #22c55e !important;
  background: #f0fdf4 !important;
}
.pr-opt.is-wrong {
  border-color: #ef4444 !important;
  background: #fef2f2 !important;
}
[data-theme="dark"] .pr-opt.is-correct { background: rgba(34, 197, 94, 0.12) !important; }
[data-theme="dark"] .pr-opt.is-wrong { background: rgba(239, 68, 68, 0.1) !important; }

.pr-opt-letter {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  background: rgba(124, 92, 255, 0.1);
  color: var(--text);
}
.pr-opt.is-correct .pr-opt-letter { background: #22c55e; color: #fff; }
.pr-opt.is-wrong .pr-opt-letter { background: #ef4444; color: #fff; }
.pr-opt-text {
  flex: 1;
  font-size: 0.92rem;
  line-height: 1.4;
  color: var(--text);
}
.pr-opt-icon {
  width: 18px;
  flex-shrink: 0;
  text-align: center;
}

.pr-explain {
  display: none;
  flex: 1;
  min-height: 0;
  margin: 0;
  border-radius: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-top: 1px solid rgba(124, 92, 255, 0.1);
}
.pr-card.is-answered .pr-explain.is-visible {
  display: block;
}
.pr-explain-main {
  padding: 0.75rem 0.9rem;
  background: #f0fdf4;
  border-left: 3px solid #22c55e;
}
[data-theme="dark"] .pr-explain-main { background: rgba(34, 197, 94, 0.08); }
.pr-explain-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #16a34a;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.3rem;
}
.pr-explain-main p {
  font-size: 0.86rem;
  margin: 0;
  line-height: 1.5;
  color: var(--text);
}
.pr-funfact {
  padding: 0.75rem 0.9rem;
  background: linear-gradient(135deg, #fef9c3, #fef3c7);
  border-left: 3px solid #f59e0b;
  border-top: 1px solid #fde68a;
}
[data-theme="dark"] .pr-funfact { background: rgba(245, 158, 11, 0.12); }
.pr-funfact-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #b45309;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}
.pr-funfact p {
  font-size: 0.86rem;
  margin: 0;
  font-style: italic;
  line-height: 1.5;
}
.pr-ref {
  padding: 0.6rem 0.9rem;
  background: rgba(59, 130, 246, 0.06);
  border-left: 3px solid var(--pr-blue);
  font-size: 0.8rem;
  word-break: break-all;
}
.pr-ref a { color: #2563eb; }

.pr-foot {
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.35rem 0 0;
  margin-top: 0;
  background: transparent;
}
.pr-foot.is-waiting-answer .pr-nav-btn--waiting {
  opacity: 0.7;
}
.pr-nav-btn { min-width: 110px; }
.pr-nav-btn--ready {
  box-shadow: 0 4px 14px rgba(124, 92, 255, 0.35);
  animation: prNextPulse 1.6s ease-in-out infinite;
}
@keyframes prNextPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}
.pr-nav-btn--waiting {
  opacity: 0.85;
}

.pr-btn-primary {
  background: linear-gradient(135deg, var(--pr-violet), var(--pr-blue)) !important;
  border: none !important;
}
.pr-btn-primary:hover {
  filter: brightness(1.05);
}

.pr-summary {
  display: none;
  text-align: center;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(124, 92, 255, 0.15);
  border-radius: 18px;
  padding: 1.75rem 1.25rem;
  margin-top: 1rem;
  box-shadow: 0 10px 32px rgba(124, 92, 255, 0.1);
}
[data-theme="dark"] .pr-summary {
  background: rgba(30, 30, 38, 0.92);
  border-color: var(--border);
}
.pr-summary.is-visible { display: block; }
.pr-summary-badge {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin: 0 auto 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff;
  background: linear-gradient(135deg, var(--pr-violet), var(--pr-teal));
}
.pr-summary-title { font-size: 1.25rem; font-weight: 800; margin-bottom: 0.25rem; }
.pr-summary-sub { color: var(--muted); font-size: 0.9rem; margin-bottom: 1rem; }
.pr-summary-stats {
  display: flex;
  justify-content: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.pr-sum-box {
  min-width: 88px;
  padding: 0.75rem;
  border-radius: 12px;
  text-align: center;
}
.pr-sum-box--green { background: rgba(34, 197, 94, 0.12); }
.pr-sum-box--green .pr-sum-num { color: #16a34a; }
.pr-sum-box--red { background: rgba(239, 68, 68, 0.1); }
.pr-sum-box--red .pr-sum-num { color: #dc2626; }
.pr-sum-box--violet { background: rgba(124, 92, 255, 0.12); }
.pr-sum-box--violet .pr-sum-num { color: #6d4aff; }
.pr-sum-box--amber { background: rgba(245, 158, 11, 0.12); }
.pr-sum-box--amber .pr-sum-num { color: #b45309; }
.pr-sum-num {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1;
}
.pr-sum-lbl {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.2rem;
}
.pr-summary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.pr-modal-dialog { max-width: 420px; }
.pr-modal-content { border-radius: 20px; background: var(--card-bg, #fff); }
.pr-modal-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pr-green), var(--pr-violet));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

/* ── Mobile: Practice hub + drill ── */
@media (max-width: 991.98px) {
  .pr-page {
    padding: 0.65rem 0 1.75rem;
  }
  .pr-page .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  .pr-hub-hero {
    padding: 1rem 1.05rem;
    border-radius: 16px;
  }
  .pr-hub-title {
    font-size: clamp(1.35rem, 6vw, 1.75rem);
  }
  .pr-hub-lead {
    font-size: 0.88rem;
  }
  .pr-hub-side {
    display: none;
  }
  .pr-diff-grid {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }
}

@media (max-width: 767.98px) {
  body.page-practice-drill.pr-session-active {
    height: auto;
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .page-practice-drill.pr-session-active .pr-wrap {
    height: auto;
    min-height: calc(100dvh - 56px);
    overflow: visible;
    padding: 0.35rem 0.5rem 0;
  }

  .page-practice-drill.pr-session-active .pr-head {
    margin: 0 0 0.45rem;
    border-radius: 12px;
    padding: 0.45rem 0.65rem 0.5rem;
  }

  .page-practice-drill.pr-session-active .pr-head-top {
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.4rem;
  }

  .page-practice-drill.pr-session-active .pr-title {
    font-size: 0.86rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1;
  }

  .page-practice-drill.pr-session-active .pr-title .bi {
    display: none;
  }

  .page-practice-drill.pr-session-active .pr-streak {
    font-size: 0.68rem;
    padding: 0.18rem 0.5rem;
    flex-shrink: 0;
  }

  .page-practice-drill.pr-session-active .pr-levels {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.3rem;
    width: 100%;
    margin-top: 0.35rem;
  }

  .page-practice-drill.pr-session-active .pr-level {
    text-align: center;
    padding: 0.32rem 0.2rem;
    font-size: 0.7rem;
  }

  .page-practice-drill.pr-session-active .pr-progress-row {
    margin-top: 0.35rem;
    font-size: 0.72rem;
  }

  .page-practice-drill.pr-session-active .pr-progress-bar {
    height: 4px;
    margin-top: 0.25rem;
  }

  .pr-drill-shell {
    flex: none;
    min-height: 0;
    gap: 0.4rem;
  }

  .page-practice-drill.pr-session-active .pr-stage {
    overflow: visible;
    flex: none;
  }

  .page-practice-drill.pr-session-active .pr-slide.is-active {
    height: auto;
  }

  .page-practice-drill.pr-session-active .pr-card:not(.is-answered) {
    max-height: none;
  }

  .pr-q-top {
    padding: 0.75rem 0.85rem 0.6rem;
  }

  .pr-q-text {
    font-size: 0.95rem;
    line-height: 1.45;
  }

  .pr-opts {
    padding: 0.65rem 0.85rem 0.45rem;
    gap: 0.4rem;
  }

  .pr-opt {
    min-height: 48px;
    padding: 0.65rem 0.75rem;
  }

  .pr-opt-letter {
    width: 32px;
    height: 32px;
  }

  .pr-opt-text {
    font-size: 0.88rem;
  }

  .pr-feedback {
    padding: 0.55rem 0.75rem;
    font-size: 0.85rem;
  }

  .pr-foot {
    position: sticky;
    bottom: 0;
    z-index: 25;
    margin: 0 -0.5rem;
    padding: 0.45rem 0.5rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(to top, rgba(238, 240, 248, 0.98) 70%, transparent);
  }

  [data-theme="dark"] .pr-foot {
    background: linear-gradient(to top, rgba(18, 18, 24, 0.98) 70%, transparent);
  }

  .pr-nav-btn {
    min-height: 48px;
    flex: 1;
    font-size: 0.88rem;
  }

  .pr-summary {
    margin-top: 0.65rem;
    padding: 1.25rem 1rem;
  }
}
