/* ===== PRACTICE MCQ PAGE ===== */
#enp-practice-app {
  max-width: 780px; margin: 0 auto; padding: 1.5rem 1rem 4rem;
  font-family: 'Inter', sans-serif;
}

/* Screens */
.pmc-screen { display: none; }
.pmc-screen.active { display: block; }

/* ── Selector screen ── */
.pmc-hero {
  text-align: center; padding: 2rem 1rem 1.5rem;
}
.pmc-hero h1 {
  font-size: 1.8rem; font-weight: 800; color: #0a1a2f;
  letter-spacing: -0.03em; margin-bottom: 0.4rem;
}
.pmc-hero p { font-size: 0.95rem; color: #7a8aa0; }

.pmc-badges {
  display: flex; justify-content: center; gap: 0.6rem; flex-wrap: wrap; margin: 1rem 0 1.5rem;
}
.pmc-badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  background: #f0f5fe; color: #4a5a72; font-size: 0.75rem; font-weight: 700;
  padding: 0.35rem 0.85rem; border-radius: 20px; border: 1px solid transparent;
}
.pmc-badge-emerald { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.pmc-badge-sky     { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.pmc-badge-purple  { background: #f5f3ff; color: #6d28d9; border-color: #ddd6fe; }

.pmc-topic-card {
  position: relative;
  background: white; border: 1px solid #eef4fc; border-radius: 20px;
  padding: 1.6rem 1.5rem 1.5rem; margin-bottom: 1rem;
  box-shadow: 0 2px 14px rgba(10, 26, 47, 0.05);
}
.pmc-topic-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, #f59e0b, #7c3aed);
}
.pmc-topic-card label {
  display: block; font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: #7a8aa0; margin-bottom: 0.6rem;
}
/* Topic dropdown: a closed control, tap to open a styled panel, pick
   one, it closes -- same interaction as the original native <select>.
   GeneratePress (parent theme) ships a global button:focus/:hover
   background with higher specificity than a single-class base rule --
   every interactive state below re-asserts its own background
   explicitly so that default never shows through. */
.pmc-dropdown { position: relative; }
.pmc-dropdown-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 0.8rem 1rem;
  appearance: none; -webkit-appearance: none;
  border: 1px solid #d5dee9; border-radius: 12px;
  background: #f8faff; font-size: 0.95rem; font-weight: 500; color: #0a1a2f;
  cursor: pointer; transition: border-color 0.2s;
}
.pmc-dropdown-trigger:hover, .pmc-dropdown-trigger:focus { background: #f8faff; color: #0a1a2f; outline: none; }
.pmc-dropdown-trigger:focus-visible { outline: 2px solid var(--ink, #0a1a2f); outline-offset: 2px; }
.pmc-dropdown-trigger::after {
  content: ""; flex: 0 0 auto; width: 9px; height: 9px; margin-left: 10px;
  border-right: 2px solid #7a8aa0; border-bottom: 2px solid #7a8aa0;
  transform: rotate(45deg); transition: transform 0.2s;
}
.pmc-dropdown.open .pmc-dropdown-trigger { border-color: var(--ink, #0a1a2f); }
.pmc-dropdown.open .pmc-dropdown-trigger::after { transform: rotate(-135deg); margin-top: 4px; }

.pmc-dropdown-panel {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20;
  max-height: 260px; overflow-y: auto;
  background: #fff; border: 1px solid #d5dee9; border-radius: 12px;
  box-shadow: 0 8px 24px rgba(10,26,47,0.14);
  padding: 6px;
}
.pmc-dropdown-option {
  display: block; width: 100%; text-align: left;
  padding: 0.6rem 0.75rem;
  appearance: none; -webkit-appearance: none;
  border: none; border-radius: 8px;
  background: #fff; font-size: 0.9rem; font-weight: 500; color: #0a1a2f;
  cursor: pointer; transition: background 0.1s;
}
.pmc-dropdown-option:hover, .pmc-dropdown-option:focus {
  background: #f0f5fe; color: #0a1a2f; outline: none;
}
.pmc-dropdown-option:focus-visible { outline: 2px solid var(--ink, #0a1a2f); outline-offset: -2px; }
.pmc-dropdown-option[aria-selected="true"] {
  background: #eef4fc; color: var(--ink, #0a1a2f); font-weight: 700;
}

#pmc-load-btn {
  width: 100%; padding: 0.95rem; background: var(--amber, #f59e0b); color: var(--ink, #0a1a2f);
  border: none; border-radius: 999px; font-size: 1rem; font-weight: 800;
  cursor: pointer; transition: 0.2s; margin-top: 0.9rem;
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.28);
}
#pmc-load-btn:hover:not(:disabled) { filter: brightness(0.96); transform: translateY(-1px); }
#pmc-load-btn:disabled { background: #c5cdd9; color: #fff; cursor: not-allowed; box-shadow: none; }
@media (min-width: 481px) {
  #pmc-load-btn { width: auto; min-width: 220px; max-width: 280px; display: block; margin: 0.9rem auto 0; padding: 0.75rem 1.8rem; font-size: 0.92rem; }
}

/* ── Questions screen ── */
.pmc-qs-header {
  display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem;
  padding-bottom: 1rem; border-bottom: 1px solid #f0f4fc; flex-wrap: wrap;
}
.pmc-back-btn {
  background: none; border: 1px solid #d5dee9; border-radius: 20px;
  padding: 0.4rem 1rem; font-size: 0.82rem; cursor: pointer; color: #1f3349;
  white-space: nowrap;
}
.pmc-back-btn:hover { border-color: #0a1a2f; }
.pmc-qs-topic { font-weight: 700; color: #0a1a2f; font-size: 1rem; }
.pmc-qs-count { margin-left: auto; font-size: 0.8rem; color: #7a8aa0; }

.pmc-qs-toolbar {
  display: flex; justify-content: flex-end; width: 100%; margin-top: -0.6rem;
}
.pmc-lang-toggle {
  display: inline-flex; background: #f0f4fc; border-radius: 20px; padding: 3px;
}
.pmc-lang-btn {
  border: none; background: transparent; padding: 0.3rem 0.9rem; border-radius: 18px;
  font-size: 0.78rem; font-weight: 700; color: #7a8aa0; cursor: pointer; transition: 0.15s;
}
.pmc-lang-btn.active { background: #0a1a2f; color: #fff; }


/* Question cards */
.pmc-q-card {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, #fbfdff 0%, #ffffff 14%);
  border: 1.5px solid #e4ecf8; border-radius: 18px;
  padding: 1.1rem 1.1rem 1rem; margin-bottom: 0.8rem;
  box-shadow: 0 2px 10px rgba(10, 26, 47, 0.04);
  content-visibility: auto;
  contain-intrinsic-size: 260px;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.pmc-q-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, #f59e0b, #7c3aed);
}
.pmc-q-card:hover { box-shadow: 0 6px 20px rgba(10, 26, 47, 0.08); }
.pmc-q-card.pmc-correct { border-color: #16a34a; background: linear-gradient(180deg, #f3fdf6 0%, #ffffff 20%); }
.pmc-q-card.pmc-correct::before { background: #16a34a; }
.pmc-q-card.pmc-wrong   { border-color: #dc2626; background: linear-gradient(180deg, #fef5f5 0%, #ffffff 20%); }
.pmc-q-card.pmc-wrong::before   { background: #dc2626; }

.pmc-q-num {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.7rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.05em; color: #b45309; margin-bottom: 0.45rem;
  background: #fff7ea; padding: 0.25rem 0.7rem; border-radius: 20px;
}
.pmc-topic-chip {
  display: inline-block;
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.02em; color: #5b21b6;
  background: #f3e8ff; padding: 0.2rem 0.65rem; border-radius: 20px;
}
.pmc-q-text {
  font-size: 0.99rem; font-weight: 700; color: #0a1a2f;
  line-height: 1.5; margin-bottom: 0.75rem;
}

.pmc-options { display: grid; gap: 0.45rem; }
.pmc-opt {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.65rem 0.9rem;
  border: 1.5px solid #e4ecf8; border-radius: 12px; cursor: pointer;
  transition: 0.15s; font-size: 0.88rem; color: #1f3349; user-select: none;
  background: #fbfdff;
}
.pmc-opt:hover:not(.pmc-disabled) { border-color: #f59e0b; background: #fffaf0; transform: translateX(2px); }
.pmc-opt.pmc-opt-correct { border-color: #16a34a; background: #f0fdf4; color: #15803d; font-weight: 700; }
.pmc-opt.pmc-opt-wrong   { border-color: #dc2626; background: #fef2f2; color: #dc2626; font-weight: 700; }
.pmc-opt.pmc-disabled { cursor: not-allowed; opacity: 0.6; }
.pmc-opt.pmc-disabled:hover { transform: none; }
.pmc-opt-letter {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, #0a1a2f, #1f3349);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; color: #fff;
}
.pmc-opt.pmc-opt-correct .pmc-opt-letter { background: #16a34a; color: white; }
.pmc-opt.pmc-opt-wrong   .pmc-opt-letter { background: #dc2626; color: white; }

.pmc-explanation {
  display: none; margin-top: 0.6rem; padding: 0.75rem;
  background: #f8faff; border-radius: 10px;
  font-size: 0.82rem; color: #4a5a72; line-height: 1.6;
  border-left: 3px solid #7c3aed;
}
.pmc-explanation.visible { display: block; }

/* One row, always -- every button is an equal-width flex column (icon over
   a small label) instead of the old pill-with-word layout, so Share /
   Helpful / Not helpful / Report all fit on one line even on a narrow
   phone instead of wrapping across 2-3 lines. */
.pmc-share-row { display: none; margin-top: 0.5rem; flex-wrap: nowrap; align-items: stretch; gap: 0.35rem; }
.pmc-share-row.visible { display: flex; }
.pmc-fb-btn {
  flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.15rem;
  background: transparent; border: 1.5px solid #d5dee9; border-radius: 10px;
  padding: 0.4rem 0.2rem; cursor: pointer; transition: 0.15s; font-family: 'Inter', sans-serif;
}
.pmc-fb-btn:hover:not(:disabled) { border-color: #0a1a2f; background: #f5f8fd; }
.pmc-sb-icon { font-size: 1rem; line-height: 1; }
.pmc-sb-label {
  font-size: 0.6rem; font-weight: 600; color: #7a8aa0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}

.pmc-vote-btn:disabled { opacity: 0.5; cursor: default; }
.pmc-vote-btn.pmc-vote-sent { border-color: #16a34a; background: #f0fdf4; }

.pmc-report-toggle { border-color: #f3d9b1; }
.pmc-report-toggle .pmc-sb-label { color: #92610c; }
/* Matches .pmc-fb-btn:hover:not(:disabled)'s specificity (both classes, two
   pseudo-classes worth) so this amber hover actually wins instead of being
   silently overridden by the generic grey one despite coming later. */
.pmc-fb-btn.pmc-report-toggle:hover { border-color: #c2820a; background: #fdf6ec; }

.pmc-report-panel {
  margin-top: 0.6rem; padding: 0.9rem; background: #fdf9f2; border-radius: 12px;
  border: 1px solid #f3d9b1; display: flex; flex-direction: column; gap: 0.6rem;
}
.pmc-report-panel[hidden] { display: none; } /* author rules override the UA [hidden] default, so this must be explicit */
.pmc-report-category, .pmc-report-detail {
  width: 100%; border: 1.5px solid #d5dee9; border-radius: 10px;
  padding: 0.6rem 0.7rem; font-size: 16px; font-family: 'Inter', sans-serif;
  color: #1f3349; background: #fff;
}
.pmc-report-detail { resize: vertical; min-height: 60px; }
.pmc-report-submit {
  align-self: flex-start; background: #0a1a2f; color: #fff; border: none;
  border-radius: 10px; padding: 0.55rem 1.1rem; font-size: 0.82rem; font-weight: 700;
  cursor: pointer; transition: 0.15s;
}
.pmc-report-submit:hover:not(:disabled) { background: #1a2f4a; }
.pmc-report-submit:disabled { opacity: 0.6; cursor: default; }
.pmc-report-status { font-size: 0.8rem; color: #4a5a72; min-height: 1.2em; }

/* Submit / retry buttons */
#pmc-submit-btn {
  width: 100%; padding: 1rem; background: #0a1a2f; color: white;
  border: none; border-radius: 14px; font-size: 1rem; font-weight: 700;
  cursor: pointer; margin-top: 0.5rem; transition: 0.2s;
}
#pmc-submit-btn:hover { background: #1a2f4a; }

#pmc-retry-btn {
  width: 100%; padding: 0.9rem; background: transparent; color: #0a1a2f;
  border: 1.5px solid #0a1a2f; border-radius: 14px; font-size: 0.95rem;
  font-weight: 600; cursor: pointer; margin-top: 0.6rem; transition: 0.2s;
}
#pmc-retry-btn:hover { background: #f0f5fe; }

/* Pager (page-number navigation) */
.pmc-pager {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  margin: 0.5rem 0 1rem; flex-wrap: wrap;
}
.pmc-pager-nav {
  background: white; color: #0a1a2f; border: 1.5px solid #d5dee9;
  border-radius: 20px; padding: 0.5rem 1rem; font-size: 0.85rem; font-weight: 700;
  cursor: pointer; transition: 0.15s; white-space: nowrap;
}
.pmc-pager-nav:hover:not(:disabled) { border-color: #f59e0b; background: #fffaf0; }
.pmc-pager-nav:disabled { color: #c5cdd9; border-color: #eef4fc; cursor: not-allowed; }

.pmc-pager-nums { display: flex; align-items: center; gap: 0.3rem; flex-wrap: wrap; justify-content: center; }
.pmc-pager-num {
  min-width: 34px; height: 34px; padding: 0 0.4rem; background: white;
  border: 1.5px solid #eef4fc; border-radius: 10px; font-size: 0.85rem; font-weight: 700;
  color: #4a5a72; cursor: pointer; transition: 0.15s;
}
.pmc-pager-num:hover { border-color: #f59e0b; color: #0a1a2f; }
.pmc-pager-num.active { background: #0a1a2f; border-color: #0a1a2f; color: #fff; }
.pmc-pager-ellipsis {
  border: none; background: none; color: #c5cdd9; font-weight: 700; cursor: default;
  width: 20px;
}

@media (max-width: 480px) {
  .pmc-pager-nav { padding: 0.45rem 0.8rem; font-size: 0.78rem; }
  .pmc-pager-num { min-width: 30px; height: 30px; font-size: 0.78rem; }
}

/* Loading state */
.pmc-loading {
  text-align: center; padding: 3rem 1rem; color: #7a8aa0; font-size: 0.9rem;
}

/* Mobile tweaks */
@media (max-width: 480px) {
  .pmc-hero h1 { font-size: 1.4rem; }
  .pmc-q-card { padding: 1rem; }
  .pmc-q-text { font-size: 0.9rem; }
}

/* ===== Study/Exam mode toggle (selector screen) ===== */
.pmc-mode-toggle {
  display: flex; gap: 0.3rem; margin: 1rem 0 0; padding: 0.3rem;
  background: #fff; border: 1px solid #eef4fc; border-radius: 16px;
}
.pmc-mode-btn {
  flex: 1; padding: 0.7rem 0.5rem; border: none; border-radius: 12px;
  background: transparent; font-size: 0.85rem; font-weight: 700; color: #4a5a72;
  cursor: pointer; transition: 0.15s; font-family: 'Inter', sans-serif;
}
.pmc-mode-btn:hover:not(.active) { background: #f8faff; color: #0a1a2f; }
.pmc-mode-btn.active { background: #0a1a2f; color: #fff; box-shadow: 0 2px 8px rgba(10, 26, 47, 0.18); }

/* Fixed min-height avoids a layout jump when switching tabs changes the
   description's line count. */
.pmc-mode-notice {
  margin-top: 0.7rem; padding: 0.9rem 1rem; background: #f8faff;
  border: 1px solid #eef4fc; border-radius: 14px; min-height: 68px;
}
.pmc-mode-notice strong { display: block; font-size: 0.85rem; color: #0a1a2f; margin-bottom: 0.2rem; }
.pmc-mode-notice p { margin: 0; font-size: 0.8rem; color: #64748b; line-height: 1.5; }
.pmc-mode-notice.pmc-mode-notice-exam { background: #fffaf0; border-color: #fde6bd; }
.pmc-mode-notice.pmc-mode-notice-exam strong { color: #92400e; }

/* ===== Overall exam timer (qs-header) ===== */
.pmc-timer {
  display: none; align-items: center; gap: 0.3rem;
  background: #f0f5fe; color: #0a1a2f; font-size: 0.8rem; font-weight: 700;
  padding: 0.3rem 0.7rem; border-radius: 20px; white-space: nowrap;
}
.pmc-timer.pmc-timer-warn { background: #fef2f2; color: #dc2626; animation: pmc-timer-pulse 1s infinite; }
@keyframes pmc-timer-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

/* ===== Question palette (answered/unanswered/marked-for-review) ===== */
.pmc-palette {
  display: none; flex-wrap: wrap; gap: 0.4rem;
  padding: 0.8rem; margin-bottom: 1rem;
  background: #fbfdff; border: 1px solid #eef4fc; border-radius: 14px;
}
.pmc-palette-cell {
  width: 32px; height: 32px; border-radius: 8px;
  border: 1.5px solid #d5dee9; background: #fff; color: #4a5a72;
  font-size: 0.78rem; font-weight: 700; cursor: pointer; transition: 0.15s;
}
.pmc-palette-cell:hover { border-color: #f59e0b; }
.pmc-palette-cell.pmc-palette-correct { background: #16a34a; border-color: #16a34a; color: #fff; }
.pmc-palette-cell.pmc-palette-wrong { background: #dc2626; border-color: #dc2626; color: #fff; }
.pmc-palette-cell.pmc-palette-marked { box-shadow: 0 0 0 2px #7c3aed inset; }

/* ===== Mark-for-review button (question card header) ===== */
/* Topic chip now sits inline here instead of on its own row below (see
   .pmc-topic-chip) -- wrap allowed only as a fallback for a long topic
   name on a narrow phone, not the normal case. */
.pmc-q-num-row { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
.pmc-review-btn {
  flex-shrink: 0; margin-left: auto; background: transparent; border: 1.5px solid #e4ecf8; border-radius: 20px;
  width: 30px; height: 30px; font-size: 0.85rem; cursor: pointer; transition: 0.15s; opacity: 0.5;
}
.pmc-review-btn:hover { border-color: #7c3aed; opacity: 1; }
.pmc-review-btn.active { background: #f3f0ff; border-color: #7c3aed; opacity: 1; }

/* ===== Results screen (Exam Mode only) ===== */
.pmc-results-card {
  max-width: 420px; margin: 1.5rem auto 0; padding: 2rem 1.5rem; text-align: center;
  background: #fff; border: 1px solid #eef4fc; border-radius: 20px;
}
.pmc-result-icon { font-size: 3rem; margin-bottom: 0.4rem; }
.pmc-result-title { font-size: 1.2rem; font-weight: 800; color: #0a1a2f; margin: 0 0 1rem; }
.pmc-score-ring { font-weight: 800; color: #0a1a2f; }
.pmc-score-num { font-size: 2.6rem; }
.pmc-score-denom { font-size: 1.2rem; color: #7a8aa0; }
.pmc-score-pct { font-size: 1rem; font-weight: 700; color: #f59e0b; margin: 0.2rem 0 1rem; }
.pmc-stats-row { display: flex; justify-content: center; gap: 1.2rem; margin-bottom: 1.4rem; }
.pmc-stat { display: flex; flex-direction: column; align-items: center; }
.pmc-stat-num { font-size: 1.3rem; font-weight: 800; color: #0a1a2f; }
.pmc-stat-label { font-size: 0.72rem; color: #7a8aa0; }
.pmc-result-actions { display: flex; flex-direction: column; gap: 0.6rem; }
#pmc-results-retry-btn {
  width: 100%; padding: 1rem; background: #0a1a2f; color: white;
  border: none; border-radius: 14px; font-size: 1rem; font-weight: 700;
  cursor: pointer; transition: 0.2s; font-family: 'Inter', sans-serif;
}
#pmc-results-retry-btn:hover { background: #1a2f4a; }
#pmc-results-home-btn {
  width: 100%; padding: 0.9rem; background: transparent; color: #0a1a2f;
  border: 1.5px solid #0a1a2f; border-radius: 14px; font-size: 0.95rem;
  font-weight: 600; cursor: pointer; transition: 0.2s; font-family: 'Inter', sans-serif;
}
#pmc-results-home-btn:hover { background: #f0f5fe; }

@media (max-width: 480px) {
  .pmc-mode-btn { font-size: 0.78rem; padding: 0.6rem 0.4rem; }
  .pmc-palette-cell { width: 28px; height: 28px; font-size: 0.72rem; }
  .pmc-results-card { padding: 1.5rem 1rem; }
}


/* Mobile question-navigation drawer */
.pmc-drawer-trigger {
  display: none; align-items: center; justify-content: center; gap: 0.45rem;
  width: 100%; margin: 0 0 0.75rem; padding: 0.75rem 1rem;
  border: 1px solid #d5dee9; border-radius: 12px; background: #fff;
  color: #0a1a2f; font-size: 0.9rem; font-weight: 750; cursor: pointer;
}
.pmc-question-drawer[hidden] { display: none !important; }
.pmc-question-drawer { position: fixed; inset: 0; z-index: 99999; }
.pmc-drawer-backdrop {
  position: absolute; inset: 0; width: 100%; height: 100%; padding: 0;
  border: 0; border-radius: 0; background: rgba(10, 26, 47, 0.48);
}
.pmc-drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(88vw, 390px);
  display: flex; flex-direction: column; padding: 1rem;
  background: #fff; box-shadow: -12px 0 32px rgba(10, 26, 47, 0.18);
  transform: translateX(0); overflow: hidden;
}
.pmc-drawer-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.pmc-drawer-heading strong { display: block; color: #0a1a2f; font-size: 1.15rem; }
.pmc-drawer-summary { margin: 0.25rem 0 0; color: #64748b; font-size: 0.78rem; line-height: 1.5; }
.pmc-drawer-close {
  width: 36px; height: 36px; flex: 0 0 auto; border: 1px solid #d5dee9;
  border-radius: 50%; background: #fff; color: #0a1a2f; font-size: 1.4rem; line-height: 1; cursor: pointer;
}
.pmc-drawer-legend { display: flex; flex-wrap: wrap; gap: 0.65rem; padding: 1rem 0; color: #64748b; font-size: 0.68rem; }
.pmc-drawer-legend span { display: inline-flex; align-items: center; gap: 0.3rem; }
.pmc-drawer-legend i { display: inline-block; width: 9px; height: 9px; border: 1px solid #cbd5e1; border-radius: 3px; }
.pmc-legend-answered { background: #16a34a; border-color: #16a34a !important; }
.pmc-legend-review { box-shadow: inset 0 0 0 2px #7c3aed; }
.pmc-drawer-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-content: start; gap: 0.55rem; overflow-y: auto; padding: 0.15rem 0.1rem 1rem; overscroll-behavior: contain; flex: 1 1 auto; min-height: 0; }
.pmc-drawer-question {
  min-width: 0; aspect-ratio: 1; border: 1.5px solid #d5dee9; border-radius: 10px;
  background: #fff; color: #475569; font-size: 0.85rem; font-weight: 750; cursor: pointer;
}
.pmc-drawer-question.is-answered { border-color: #16a34a; background: #16a34a; color: #fff; }
.pmc-drawer-question.is-review { box-shadow: inset 0 0 0 2px #7c3aed; }
.pmc-drawer-question.is-current { outline: 2px solid #f59e0b; outline-offset: 2px; }
body.pmc-drawer-open { overflow: hidden; }
@media (max-width: 640px) {
  .pmc-drawer-trigger { display: flex; }
  #pmc-questions .pmc-palette { display: none !important; }
}
@media (min-width: 641px) {
  .pmc-question-drawer { display: none !important; }
}



/* Compact attempt header: preserve every control while returning vertical space
   to the question card on narrow Chrome/mobile viewports. */
.pmc-qs-header {
  display: block;
  margin: 0 0 0.65rem;
  padding: 0 0 0.6rem;
  border-bottom: 1px solid #f0f4fc;
}
.pmc-qs-nav-row,
.pmc-qs-meta-row,
.pmc-questions-bar,
.pmc-questions-actions {
  display: flex;
  align-items: center;
}
.pmc-qs-nav-row { justify-content: space-between; gap: 0.6rem; }
.pmc-qs-meta-row { gap: 0.5rem; margin-top: 0.45rem; }
.pmc-qs-topic { font-size: 1.08rem; line-height: 1.25; }
.pmc-qs-count { margin-left: auto; font-size: 0.75rem; white-space: nowrap; }
.pmc-qs-toolbar { width: auto; margin: 0; }
.pmc-questions-bar { justify-content: space-between; gap: 0.6rem; margin: 0.25rem 0 0.55rem; }
.pmc-questions-heading { margin: 0; color: #0a1a2f; font-size: 1rem; line-height: 1.3; font-weight: 800; }
.pmc-questions-actions { justify-content: flex-end; gap: 0.4rem; }
.pmc-restart-attempt-btn {
  flex: 0 0 auto; padding: 0.35rem 0.7rem; border: 1px solid #d5dee9;
  border-radius: 18px; background: #fff; color: #334155; font-size: 0.75rem;
  line-height: 1.2; font-weight: 700; cursor: pointer;
}
.pmc-restart-attempt-btn:hover { border-color: #0a1a2f; background: #f8fafc; }
.pmc-drawer-trigger {
  display: none; width: auto; margin: 0; padding: 0.35rem 0.65rem;
  border-radius: 18px; font-size: 0.75rem; line-height: 1.2;
}
@media (max-width: 640px) {
  #enp-practice-app { padding: 0.4rem 0 1rem; }
  .pmc-qs-header { margin-bottom: 0.5rem; padding-bottom: 0.5rem; }
  .pmc-back-btn { padding: 0.32rem 0.75rem; font-size: 0.76rem; }
  .pmc-lang-btn { padding: 0.28rem 0.7rem; font-size: 0.74rem; }
  .pmc-qs-meta-row { margin-top: 0.35rem; }
  .pmc-qs-topic { font-size: 1rem; }
  .pmc-questions-bar { margin: 0.15rem 0 0.45rem; }
  .pmc-drawer-trigger { display: inline-flex; }
}
