/* ============================================================================
   GovExamPass อัยการ 2569 — Responsive Study Suite Stylesheet (Light / Sepia / Dark)
   ============================================================================ */

:root {
  --ago-950: #4C0519;
  --ago-900: #6B0F2B;
  --ago-800: #881337;
  --ago-700: #9F1239;
  --ago-gold: #F59E0B;
  --ago-gold-soft: #FEF3C7;
  --bg-body: #EDF2F7;
  --bg-card: #FFFFFF;
  --bg-subtle: #F1F5F9;
  --text-main: #0F172A;
  --text-muted: #475569;
  --border-subtle: #E2E8F0;
  --font-size-base: 16px;
}

body[data-theme="sepia"] {
  --bg-body: #F5F0E6;
  --bg-card: #FFFDF8;
  --bg-subtle: #EFE7D8;
  --text-main: #2D241E;
  --text-muted: #5C4E44;
  --border-subtle: #DECBB4;
}

body[data-theme="dark"] {
  --bg-body: #090D16;
  --bg-card: #111827;
  --bg-subtle: #1E293B;
  --text-main: #F1F5F9;
  --text-muted: #CBD5E1;
  --border-subtle: #334155;
}

body[data-font-scale="normal"] { --font-size-base: 16px; }
body[data-font-scale="large"]  { --font-size-base: 18px; }
body[data-font-scale="xlarge"] { --font-size-base: 20px; }

html,
body {
  margin: 0;
  padding: 0;
  overflow-x: clip;
  max-width: 100%;
  font-family: "Sarabun", system-ui, -apple-system, sans-serif;
  font-size: var(--font-size-base);
  background-color: var(--bg-body);
  color: var(--text-main);
  transition: background-color 0.2s ease, color 0.2s ease;
}

@media (max-width: 767px) {
  body {
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  }
}

.font-heading,
h1, h2, h3, h4 {
  font-family: "Prompt", "Sarabun", sans-serif;
}

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

.ago-ico {
  display: inline-block;
  vertical-align: -0.15em;
  flex-shrink: 0;
}

.pc-only-block,
.pc-only-flex,
.pc-only-inline,
.pc-only-inline-flex,
.pc-only-grid {
  display: none !important;
}

@media (min-width: 1024px) {
  .pc-only-block { display: block !important; }
  .pc-only-flex { display: flex !important; }
  .pc-only-inline { display: inline !important; }
  .pc-only-inline-flex { display: inline-flex !important; }
  .pc-only-grid { display: grid !important; }
}

details > summary.docs-summary-clean,
.pos-qual-details > summary {
  list-style: none;
}

details > summary.docs-summary-clean::-webkit-details-marker,
.pos-qual-details > summary::-webkit-details-marker {
  display: none;
}

details[open] > summary .docs-drawer-caret {
  transform: rotate(180deg);
}

/* ============================================================================
   TOP PORTAL SWITCHER (Clean 1-Line Portal Bar)
   ============================================================================ */
.portal-switcher-bar {
  background: #090D16;
  border-bottom: 1px solid rgba(245, 158, 11, 0.28);
  color: #E2E8F0;
}

.portal-label {
  font-family: "Prompt", sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: #FCD34D;
  white-space: nowrap;
  flex-shrink: 0;
}

.portal-links {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.portal-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-family: "Prompt", sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  text-decoration: none;
  transition: all 0.16s ease;
}

.portal-pill-inactive {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #CBD5E1;
}

.portal-pill-inactive:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
}

.portal-pill-active {
  background: linear-gradient(135deg, #881337 0%, #6B0F2B 100%);
  border: 1px solid rgba(251, 191, 36, 0.65);
  color: #FDE68A;
  box-shadow: 0 2px 8px rgba(136, 19, 55, 0.45);
}

.portal-arrow {
  font-size: 10px;
  opacity: 0.85;
}

@media (max-width: 420px) {
  .portal-label {
    font-size: 10px;
  }
  .portal-links {
    gap: 4px;
  }
  .portal-pill {
    padding: 4px 7px;
    font-size: 10.5px;
  }
}

/* ============================================================================
   STICKY HEADER + DESKTOP NAV + SETTINGS DROPDOWN
   ============================================================================ */
.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(76, 5, 25, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(245, 158, 11, 0.25);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.18);
}

.nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: "Prompt", sans-serif;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 9px;
  border-radius: 9px;
  color: #FBCFE8;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.16s ease;
}

@media (min-width: 1024px) {
  .nav-tab {
    font-size: 13px;
    padding: 6px 12px;
  }
}

@media (max-width: 1023px) {
  #vip-header-badge {
    display: none !important;
  }
}

.nav-tab:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.1);
}

.nav-tab.active {
  color: #0F172A;
  background: #FBBF24;
  border-color: #FDE68A;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}

.header-vip-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: "Prompt", sans-serif;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #FBBF24 0%, #F59E0B 100%);
  color: #1E1B18;
  border: 1px solid #FDE68A;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.35);
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.14s ease, filter 0.14s ease;
}

.header-vip-pill:hover {
  filter: brightness(1.05);
}

.header-vip-pill.is-vip-active {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  border-color: #6EE7B7;
  color: #FFFFFF;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.35);
}

.settings-pill-btn {
  font-family: "Prompt", sans-serif;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #F8FAFC;
  cursor: pointer;
  white-space: nowrap;
}

.settings-pill-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.settings-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 244px;
  padding: 14px;
  border-radius: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 18px 40px -12px rgba(15, 23, 42, 0.35);
  color: var(--text-main);
  z-index: 60;
}

.setting-chip {
  font-family: "Prompt", sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease;
}

.setting-chip.active {
  background: #881337;
  border-color: #881337;
  color: #FDE68A;
  font-weight: 700;
}

/* ============================================================================
   INNER SUB-PAGE POSITION BAR (LOCKED CONTEXT CARD + DRAWER)
   ============================================================================ */
.inner-pos-bar {
  position: sticky;
  top: 56px;
  z-index: 30;
  background: var(--bg-page);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.locked-pos-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  border-left: 4px solid #881337;
  background: var(--bg-card);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.locked-pos-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(136, 19, 55, 0.1);
  border: 1px solid rgba(136, 19, 55, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.locked-pos-change-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 9999px;
  border: 1.5px solid rgba(136, 19, 55, 0.25);
  background: rgba(136, 19, 55, 0.08);
  color: #881337;
  font-family: "Prompt", sans-serif;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.15s ease;
}

.locked-pos-change-btn:hover,
.locked-pos-change-btn[aria-expanded="true"] {
  background: #881337;
  border-color: #881337;
  color: #FDE68A;
}

.locked-pos-caret {
  display: inline-block;
  font-size: 11px;
  transition: transform 0.18s ease;
}

.locked-pos-change-btn[aria-expanded="true"] .locked-pos-caret {
  transform: rotate(180deg);
}

.pos-drawer-item {
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 11px;
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-main);
  font-family: "Prompt", sans-serif;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pos-drawer-item.active {
  background: #881337;
  border-color: #881337;
  color: #FEF3C7;
  font-weight: 700;
}

body[data-theme="dark"] .locked-pos-icon {
  background: rgba(251, 191, 36, 0.14);
  border-color: rgba(251, 191, 36, 0.28);
}

body[data-theme="dark"] .locked-pos-change-btn {
  background: rgba(251, 191, 36, 0.14);
  border-color: rgba(251, 191, 36, 0.35);
  color: #FDE68A;
}

.pos-chip-sm {
  font-family: "Prompt", sans-serif;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 9999px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  color: var(--text-main);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pos-chip-sm.active {
  background: #881337;
  border-color: #881337;
  color: #FEF3C7;
}

/* ============================================================================
   CARDS, HERO & COUNTDOWN
   ============================================================================ */
.saas-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
  box-shadow: 0 8px 24px -10px rgba(15, 23, 42, 0.08);
}

.hero-card {
  background: radial-gradient(circle at top right, #9F1239 0%, #580923 50%, #160A18 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 1.15rem;
  padding: 1rem;
  color: #FFFFFF;
  box-shadow: 0 16px 36px -16px rgba(76, 5, 25, 0.55);
}

@media (min-width: 640px) {
  .hero-card {
    padding: 1.25rem 1.5rem;
  }
}

.hero-stat-tile {
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0.7rem;
  padding: 0.42rem 0.5rem;
  backdrop-filter: blur(6px);
}

.hero-stat-num {
  font-family: "Prompt", sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.15;
}

@media (min-width: 640px) {
  .hero-stat-num {
    font-size: 1.08rem;
  }
}

.hero-stat-sub {
  font-size: 10px;
  color: #FDE7F3;
  opacity: 0.9;
  margin-top: 1px;
}

/* Slim Compact Countdown Strip */
.countdown-strip {
  background: rgba(15, 23, 42, 0.56);
  border: 1px solid rgba(251, 191, 36, 0.42);
  border-radius: 0.9rem;
  padding: 0.55rem 0.75rem;
  backdrop-filter: blur(8px);
}

.cd-inline-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-top: 6px;
}

.cd-pill {
  flex: 1;
  min-width: 0;
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 3px;
  padding: 5px 4px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.cd-pill--sec {
  border-color: rgba(251, 191, 36, 0.42);
  background: rgba(245, 158, 11, 0.14);
}

.cd-num {
  font-family: "Prompt", sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: #FFFFFF;
}

@media (min-width: 640px) {
  .cd-num {
    font-size: 1.15rem;
  }
}

.cd-lbl {
  font-size: 10px;
  font-weight: 600;
  color: #FDE7F3;
}

.cd-sep {
  font-family: "Prompt", sans-serif;
  font-weight: 800;
  font-size: 0.85rem;
  color: rgba(253, 230, 138, 0.65);
  flex-shrink: 0;
}

/* ============================================================================
   HOME 4-POSITION SELECTOR & DISTINCT 2-ZONE SUBJECT CARDS
   ============================================================================ */
.pos-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-subtle);
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  min-width: 0;
  transition: all 0.16s ease;
}

@media (min-width: 640px) {
  .pos-card {
    padding: 9px 11px;
  }
}

.pos-card:hover {
  border-color: #9F1239;
  transform: translateY(-1px);
}

.pos-card.active {
  background: linear-gradient(135deg, #881337 0%, #580923 100%);
  border-color: #FBBF24;
  color: #FFFFFF;
  box-shadow: 0 8px 20px -8px rgba(136, 19, 55, 0.65);
}

.pos-card-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(136, 19, 55, 0.09);
  color: #881337;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.16s ease;
}

body[data-theme="dark"] .pos-card-icon {
  background: rgba(251, 191, 36, 0.14);
  color: #FDE68A;
}

.pos-card.active .pos-card-icon {
  background: rgba(251, 191, 36, 0.2);
  color: #FDE68A;
}

.pos-card-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.pos-card-title {
  display: block;
  font-family: "Prompt", sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  min-width: 0;
}

.pos-card-mob-meta {
  display: block;
  font-family: "Sarabun", sans-serif;
  font-size: 10.5px;
  font-weight: 600;
  color: #FDE68A;
  opacity: 0.92;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pos-card-pc-meta {
  font-family: "Sarabun", sans-serif;
  font-size: 11px;
  font-weight: 600;
  opacity: 0.78;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 640px) {
  .pos-card-title {
    font-size: 13px;
  }
}

@media (min-width: 1024px) {
  .pos-card-mob-meta {
    display: none !important;
  }
}

@media (min-width: 1280px) {
  .pos-card-title {
    font-size: 12.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* Home 2-Column PC Workspace (<1024px vertical stack -> >=1024px 4:8 grid) */
.home-pc-workspace {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

@media (min-width: 1024px) {
  .home-pc-workspace {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
  }
  #home-pc-sidebar {
    grid-column: span 4 / span 4;
    position: sticky;
    top: 4.5rem;
  }
  #home-pc-main {
    grid-column: span 8 / span 8;
    min-width: 0;
  }
}

.pos-summary-banner {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 12px;
  color: var(--text-main);
}

@media (min-width: 1024px) {
  #active-pos-summary.pos-summary-banner {
    background: linear-gradient(160deg, #1E1324 0%, #4C0519 56%, #0F172A 100%);
    border: 1px solid rgba(251, 191, 36, 0.38);
    color: #F8FAFC;
    padding: 14px 15px;
    border-radius: 1rem;
    box-shadow: 0 16px 34px -16px rgba(76, 5, 25, 0.55);
  }
  #active-pos-summary .pos-meta-chip {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.16);
    color: #FDE68A;
  }
  #active-pos-summary .pos-qual-details summary {
    color: #FCD34D;
  }
  #active-pos-summary .pos-qual-details p {
    color: #E2E8F0 !important;
  }
}

.exec-kicker-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 9999px;
  background: rgba(251, 191, 36, 0.18);
  border: 1px solid rgba(251, 191, 36, 0.38);
  color: #FDE68A;
  font-family: "Prompt", sans-serif;
  font-size: 11px;
  font-weight: 700;
}

.exec-stat-box {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 11px;
  padding: 9px 10px;
}

.score-split-track {
  display: flex;
  height: 7px;
  width: 100%;
  border-radius: 9999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.15);
}

.score-split-core {
  background: linear-gradient(90deg, #FB7185, #F43F5E);
  height: 100%;
}

.score-split-spec {
  background: linear-gradient(90deg, #F59E0B, #FDE047);
  height: 100%;
}

.readiness-track {
  position: relative;
  height: 10px;
  border-radius: 9999px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  overflow: visible;
}

.readiness-fill {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, #9F1239 0%, #F59E0B 60%, #10B981 100%);
  transition: width 0.35s ease;
}

.readiness-pass-marker {
  position: absolute;
  left: 60%;
  top: -3px;
  bottom: -3px;
  width: 2px;
  background: #0F172A;
}

body[data-theme="dark"] .readiness-pass-marker {
  background: #FDE68A;
}

.readiness-kpi-tile {
  padding: 8px 6px;
  border-radius: 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  text-align: center;
}

.home-quote-card {
  border-radius: 1rem;
  border: 1px solid rgba(217, 119, 6, 0.32);
  background: linear-gradient(145deg, #FFFBEB 0%, #FFF1F2 100%);
  color: #4C0519;
  box-shadow: 0 8px 22px -14px rgba(136, 19, 55, 0.25);
}

body[data-theme="sepia"] .home-quote-card {
  background: linear-gradient(145deg, #FBF3E0 0%, #F6E9D8 100%);
}

body[data-theme="dark"] .home-quote-card {
  background: linear-gradient(145deg, rgba(120, 53, 15, 0.28) 0%, rgba(76, 5, 25, 0.42) 100%);
  border-color: rgba(251, 191, 36, 0.28);
  color: #FEF3C7;
}

.pos-summary-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.pos-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 9999px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  font-size: 11.5px;
  font-weight: 600;
}

.pos-qual-details summary {
  cursor: pointer;
  margin-top: 6px;
  font-family: "Prompt", sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  color: #881337;
  user-select: none;
}

body[data-theme="dark"] .pos-qual-details summary {
  color: #FBBF24;
}

.part-seg-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  padding: 4px;
  border-radius: 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  gap: 3px;
}

@media (min-width: 640px) {
  .part-seg-group {
    display: inline-flex;
  }
}

.part-seg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-family: "Prompt", sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  padding: 6px 9px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.part-seg-cnt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 6px;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.08);
  font-size: 10.5px;
  font-weight: 700;
}

.part-seg-btn.active {
  background: #881337;
  color: #FFFFFF;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(136, 19, 55, 0.25);
}

.part-seg-btn.active .part-seg-cnt {
  background: rgba(251, 191, 36, 0.24);
  color: #FDE68A;
}

body[data-theme="dark"] .part-seg-cnt {
  background: rgba(255, 255, 255, 0.12);
}

/* Distinct 2-Zone Subject Cards — Clean Compact Divided Rows */
.subject-zone-card {
  border-radius: 1rem;
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-card);
  overflow: hidden;
  box-shadow: 0 10px 26px -12px rgba(15, 23, 42, 0.15);
}

.subject-zone-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 13px;
  color: #FFFFFF;
}

.subject-zone-head--core {
  background: linear-gradient(135deg, #881337 0%, #4C0519 100%);
  border-bottom: 2px solid #FB7185;
}

.subject-zone-head--spec {
  background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
  border-bottom: 2px solid #F59E0B;
}

.subject-zone-body--core,
.subject-zone-body--spec {
  background: var(--bg-card);
  padding: 0;
  display: block;
}

.subject-clean-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8.5px 12px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-card);
  transition: background-color 0.14s ease;
}

.subject-clean-row:last-child {
  border-bottom: none;
}

.subject-clean-row:hover {
  background: var(--bg-subtle);
}

.subject-clean-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: transparent;
  border: none;
  padding: 0;
  text-align: left;
  color: inherit;
  cursor: pointer;
}

.subject-code-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 24px;
  padding: 0 7px;
  border-radius: 7px;
  font-family: "Prompt", sans-serif;
  font-size: 11.5px;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 1px;
}

.subject-code-pill--core {
  background: #FFE4E6;
  color: #9F1239;
  border: 1px solid rgba(159, 18, 57, 0.22);
}

.subject-code-pill--spec {
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid rgba(180, 83, 9, 0.28);
}

body[data-theme="dark"] .subject-code-pill--core {
  background: rgba(190, 18, 60, 0.35);
  color: #FDA4AF;
  border-color: rgba(251, 113, 133, 0.4);
}

body[data-theme="dark"] .subject-code-pill--spec {
  background: rgba(217, 119, 6, 0.32);
  color: #FDE68A;
  border-color: rgba(251, 191, 36, 0.4);
}

.subject-clean-info {
  flex: 1 1 auto;
  min-width: 0;
}

.subject-clean-title {
  font-family: "Prompt", sans-serif;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.3;
  color: var(--text-main);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (min-width: 640px) {
  .subject-clean-title {
    -webkit-line-clamp: 1;
    font-size: 13.5px;
  }
}

.subject-inline-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 2px;
  min-width: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.subject-inline-range {
  flex: 1 1 0%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 500;
  opacity: 0.78;
}

.subject-inline-bar {
  width: 68px;
  height: 5px;
  border-radius: 9999px;
  background: var(--border-subtle);
  overflow: hidden;
  flex-shrink: 0;
}

.subject-inline-bar > span {
  display: block;
  height: 100%;
  border-radius: 9999px;
}

.subject-inline-fill--core {
  background: linear-gradient(90deg, #9F1239, #FB7185);
}

.subject-inline-fill--spec {
  background: linear-gradient(90deg, #D97706, #FBBF24);
}

.subject-clean-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.subject-quiz-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 9999px;
  font-family: "Prompt", sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.subject-quiz-pill:hover {
  transform: translateY(-1px);
  filter: brightness(0.97);
}

.subject-quiz-pill--core {
  background: #FFF1F2;
  color: #881337;
  border: 1px solid rgba(136, 19, 55, 0.25);
}

.subject-quiz-pill--spec {
  background: #FFFBEB;
  color: #92400E;
  border: 1px solid rgba(217, 119, 6, 0.35);
}

body[data-theme="dark"] .subject-quiz-pill--core {
  background: rgba(136, 19, 55, 0.45);
  color: #FECDD3;
  border-color: rgba(251, 113, 133, 0.45);
}

body[data-theme="dark"] .subject-quiz-pill--spec {
  background: rgba(180, 83, 9, 0.4);
  color: #FDE68A;
  border-color: rgba(251, 191, 36, 0.45);
}

.subject-chevron-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 28px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

/* Sequential Reader Control Hub & Collapsible Tools Drawer */
.seq-control-hub {
  border-left: 4px solid #881337;
}

.seq-subject-banner {
  border-radius: 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  padding: 8px 10px;
}

.seq-banner-bar {
  height: 5px;
  width: 100%;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.1);
  overflow: hidden;
}

body[data-theme="dark"] .seq-banner-bar {
  background: rgba(255, 255, 255, 0.14);
}

.seq-banner-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #881337, #F59E0B);
}

.seq-law-select {
  width: 100%;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-subtle);
  color: var(--text-main);
  font-family: "Prompt", sans-serif;
  font-size: 13px;
  font-weight: 600;
}

.seq-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

@media (min-width: 1024px) {
  .seq-action-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
  }
}

.seq-btn-tools {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 10px;
  border-radius: 11px;
  border: 1.5px solid #1E293B;
  background: #1E293B;
  color: #FFFFFF;
  font-family: "Prompt", sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}

.seq-btn-tools[aria-expanded="true"] {
  background: #881337;
  border-color: #881337;
  color: #FDE68A;
}

.seq-tools-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #F59E0B;
  color: #0F172A;
  font-size: 11px;
  font-weight: 800;
}

.seq-btn-practice {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 9px 12px;
  border-radius: 11px;
  border: 1.5px solid #F59E0B;
  background: linear-gradient(135deg, #FBBF24, #F59E0B);
  color: #111827;
  font-family: "Prompt", sans-serif;
  font-size: 12.5px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 3px 10px -4px rgba(245, 158, 11, 0.55);
  transition: transform 0.15s ease;
}

.seq-btn-practice:hover {
  transform: translateY(-1px);
}

.seq-btn-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 9px 11px;
  border-radius: 11px;
  border: 1.5px solid rgba(225, 29, 72, 0.25);
  background: rgba(255, 241, 242, 0.85);
  color: #9F1239;
  font-family: "Prompt", sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}

.seq-btn-reset:hover {
  background: #FFE4E6;
}

body[data-theme="dark"] .seq-btn-reset {
  background: rgba(159, 18, 57, 0.24);
  border-color: rgba(251, 113, 133, 0.35);
  color: #FDA4AF;
}

.seq-btn-official,
.seq-btn-focus {
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 9px 11px;
  border-radius: 11px;
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-subtle);
  color: var(--text-main);
  font-family: "Prompt", sans-serif;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.seq-btn-official:hover,
.seq-btn-focus:hover {
  border-color: #881337;
  color: #881337;
}

.seq-btn-focus[aria-pressed="true"] {
  background: #0F172A;
  border-color: #0F172A;
  color: #FDE68A;
}

body[data-theme="dark"] .seq-btn-official:hover,
body[data-theme="dark"] .seq-btn-focus:hover {
  border-color: #FBBF24;
  color: #FDE68A;
}

body[data-theme="dark"] .seq-btn-focus[aria-pressed="true"] {
  background: #F59E0B;
  border-color: #F59E0B;
  color: #0F172A;
}

@media (min-width: 1024px) {
  #seq-workspace-row.is-focus-mode #seq-sidebar {
    display: none !important;
  }
  #seq-workspace-row.is-focus-mode #seq-main-col {
    max-width: 58rem;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
  }
}

.seq-tools-drawer {
  display: none;
  padding-top: 10px;
  border-top: 1px dashed var(--border-subtle);
}

.seq-tools-drawer.is-open {
  display: block;
}

@media (min-width: 1024px) {
  .seq-tools-drawer {
    display: block !important;
  }
}

.seq-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  border-radius: 12px;
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-subtle);
  padding: 2px 8px;
}

.seq-search-ico {
  font-size: 13px;
  margin-right: 6px;
  flex-shrink: 0;
}

.seq-search-input {
  width: 100%;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  padding: 7px 4px;
  font-size: 13.5px;
  color: var(--text-main);
}

.seq-search-clear {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: none;
  background: rgba(100, 116, 139, 0.16);
  color: var(--text-main);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.seq-chip-row,
.seq-sol-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.seq-drawer-label {
  font-family: "Prompt", sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 34px;
}

.seq-chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-main);
  font-family: "Prompt", sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}

.seq-chip-btn.active {
  background: #881337;
  border-color: #881337;
  color: #FEF3C7;
  font-weight: 700;
}

.seq-chip-cnt {
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  font-size: 10.5px;
  font-weight: 800;
}

.seq-chip-btn.active .seq-chip-cnt {
  background: rgba(251, 191, 36, 0.25);
  color: #FEF3C7;
}

.seq-sol-seg-group {
  display: inline-flex;
  flex-wrap: wrap;
  padding: 3px;
  border-radius: 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  gap: 3px;
}

.seq-sol-seg {
  padding: 5px 10px;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: "Prompt", sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}

.seq-sol-seg.active {
  background: var(--bg-card);
  color: #881337;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

body[data-theme="dark"] .seq-sol-seg.active {
  color: #FDE68A;
}

.doc-link-card {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.doc-link-card:hover {
  border-color: #9F1239;
}

.doc-link-primary {
  background: rgba(136, 19, 55, 0.08);
  border-color: rgba(136, 19, 55, 0.25);
}

details[open] .docs-drawer-hint {
  color: #059669;
}

/* ============================================================================
   MOBILE BOTTOM NAVIGATION (< 768px) — Crimson & Gold Theme Matched
   ============================================================================ */
.mobile-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  height: calc(64px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: linear-gradient(180deg, #580923 0%, #350313 100%);
  border-top: 1.5px solid rgba(251, 191, 36, 0.55);
  box-shadow: 0 -8px 26px rgba(15, 23, 42, 0.42);
}

@media (min-width: 768px) {
  .mobile-bottom-nav {
    display: none !important;
  }
}

.mbn-tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: transparent;
  border: none;
  border-radius: 11px;
  margin: 5px 3px;
  padding: 4px 2px;
  color: rgba(255, 241, 242, 0.78);
  cursor: pointer;
  transition: all 0.15s ease;
}

.mbn-icon {
  font-size: 1.12rem;
  line-height: 1.1;
}

.mbn-label {
  font-family: "Prompt", sans-serif;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.mbn-tab.active {
  color: #FDE68A;
  background: rgba(251, 191, 36, 0.16);
}

.mbn-tab.active .mbn-label {
  font-weight: 700;
}

.mbn-tab.active::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 22%;
  right: 22%;
  height: 3px;
  border-radius: 0 0 999px 999px;
  background: #FBBF24;
  box-shadow: 0 1px 8px rgba(251, 191, 36, 0.75);
}

/* ============================================================================
   QUESTION CARDS (6 JEWEL-TONED HEADER THEMES) & RESPONSIVE CHOICE GRID
   ============================================================================ */
.question-card-frame {
  --q-accent: #9F1239;
  --q-top-bar: #FBBF24;
  --q-stem-bg: rgba(248, 250, 252, 0.9);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 8px 20px -14px rgba(15, 23, 42, 0.22);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.q-theme-1 { --q-accent: #9F1239; --q-top-bar: #FBBF24; --q-stem-bg: rgba(255, 241, 242, 0.55); }
.q-theme-2 { --q-accent: #1D4ED8; --q-top-bar: #38BDF8; --q-stem-bg: rgba(239, 246, 255, 0.65); }
.q-theme-3 { --q-accent: #059669; --q-top-bar: #34D399; --q-stem-bg: rgba(236, 253, 245, 0.6); }
.q-theme-4 { --q-accent: #7C3AED; --q-top-bar: #C084FC; --q-stem-bg: rgba(245, 243, 255, 0.65); }
.q-theme-5 { --q-accent: #0D9488; --q-top-bar: #22D3EE; --q-stem-bg: rgba(240, 253, 250, 0.65); }
.q-theme-6 { --q-accent: #C2410C; --q-top-bar: #FDE047; --q-stem-bg: rgba(255, 247, 237, 0.68); }

.q-card-banner {
  position: relative;
  z-index: 1;
  padding: 11px 14px;
  border-top: 3.5px solid var(--q-top-bar);
  color: #FFFFFF;
}

@media (min-width: 768px) {
  .q-card-banner {
    padding: 13px 18px;
  }
}

.q-theme-1 .q-card-banner { background: linear-gradient(135deg, #881337 0%, #4C0519 100%); }
.q-theme-2 .q-card-banner { background: linear-gradient(135deg, #1E3A8A 0%, #172554 100%); }
.q-theme-3 .q-card-banner { background: linear-gradient(135deg, #065F46 0%, #022C22 100%); }
.q-theme-4 .q-card-banner { background: linear-gradient(135deg, #5B21B6 0%, #2E1065 100%); }
.q-theme-5 .q-card-banner { background: linear-gradient(135deg, #0F766E 0%, #0F172A 100%); }
.q-theme-6 .q-card-banner { background: linear-gradient(135deg, #9A3412 0%, #431407 100%); }

.q-num-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: #FBBF24;
  color: #111827;
  font-family: "Prompt", sans-serif;
  font-size: 11.5px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.q-tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #FEF3C7;
  font-family: "Prompt", sans-serif;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.q-bm-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(15, 23, 42, 0.28);
  color: #F8FAFC;
  font-family: "Prompt", sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}

.q-bm-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.q-bm-btn.is-bm {
  background: #FBBF24;
  border-color: #F59E0B;
  color: #111827;
  font-weight: 800;
}

.q-ref-pill {
  margin-top: 7px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.96);
  font-size: 11.5px;
  line-height: 1.35;
}

.q-body {
  position: relative;
  z-index: 1;
  padding: 13px 14px 15px;
}

@media (min-width: 768px) {
  .q-body {
    padding: 16px 18px 18px;
  }
}

.q-stem-box {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  border-left: 3.5px solid var(--q-accent);
  background: var(--q-stem-bg);
  color: var(--text-main);
  font-weight: 600;
  line-height: 1.62;
}

.q-choices-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  padding-top: 2px;
}

@media (min-width: 1024px) {
  .q-choices-grid.q-choices-2col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

body[data-theme="sepia"] .q-stem-box {
  background: #FBF6EA;
}

body[data-theme="dark"] .q-stem-box {
  background: rgba(15, 23, 42, 0.65);
  color: #F8FAFC;
}

body[data-theme="dark"] .q-card-banner {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.choice-btn {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 11px 13px;
  border-radius: 12px;
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 0.94em;
  line-height: 1.5;
  cursor: pointer;
  transition: all 0.15s ease;
}

.choice-btn:hover:not(:disabled) {
  border-color: #9F1239;
  background: var(--bg-subtle);
}

.choice-letter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  font-family: "Prompt", sans-serif;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
  margin-top: 1px;
}

.choice-selected {
  border-color: #881337 !important;
  background: #FFF1F2 !important;
  color: #4C0519 !important;
  font-weight: 600;
}

.choice-selected .choice-letter-badge {
  background: #881337;
  border-color: #881337;
  color: #FFFFFF;
}

.choice-correct {
  border-color: #059669 !important;
  background: #ECFDF5 !important;
  color: #064E3B !important;
  font-weight: 600;
}

.choice-correct .choice-letter-badge {
  background: #059669;
  border-color: #059669;
  color: #FFFFFF;
}

.choice-wrong {
  border-color: #DC2626 !important;
  background: #FEF2F2 !important;
  color: #7F1D1D !important;
}

.choice-wrong .choice-letter-badge {
  background: #DC2626;
  border-color: #DC2626;
  color: #FFFFFF;
}

body[data-theme="dark"] .choice-selected {
  background: rgba(159, 18, 57, 0.35) !important;
  color: #FDE68A !important;
  border-color: #FB7185 !important;
}

body[data-theme="dark"] .choice-correct {
  background: rgba(5, 150, 105, 0.28) !important;
  color: #A7F3D0 !important;
  border-color: #34D399 !important;
}

body[data-theme="dark"] .choice-wrong {
  background: rgba(220, 38, 38, 0.25) !important;
  color: #FECACA !important;
  border-color: #F87171 !important;
}

.solution-bottom-box {
  border-radius: 12px;
  padding: 14px;
  background: #F8FAFC;
  border: 1px solid #CBD5E1;
}

body[data-theme="sepia"] .solution-bottom-box {
  background: #F8F2E4;
  border-color: #DECBB4;
}

body[data-theme="dark"] .solution-bottom-box {
  background: #0F172A;
  border-color: #334155;
}

.q-card-foot-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  margin-top: 4px;
  border-top: 1px dashed var(--border-subtle);
  font-size: 11.5px;
}

.q-law-ext-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
  font-family: "Prompt", sans-serif;
  font-weight: 600;
  text-decoration: none;
}

.q-law-ext-link:hover {
  color: #881337;
  text-decoration: underline;
}

body[data-theme="dark"] .q-law-ext-link:hover {
  color: #FDE68A;
}

.q-report-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-family: "Prompt", sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.14s ease;
}

.q-report-btn:hover {
  border-color: #BE123C;
  color: #BE123C;
}

body[data-theme="dark"] .q-report-btn:hover {
  border-color: #FDA4AF;
  color: #FDA4AF;
}

/* ============================================================================
   COLLAPSIBLE CHEAT SHEET ACCORDIONS + 15 DISTINCT COLOR THEMES + VIP LOCK
   ============================================================================ */
.cs-scope-btn {
  padding: 7px 12px;
  border-radius: 10px;
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-subtle);
  color: var(--text-main);
  font-family: "Prompt", sans-serif;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.cs-scope-btn.active {
  background: linear-gradient(135deg, #881337, #4C0519);
  border-color: #881337;
  color: #FDE68A;
  box-shadow: 0 3px 10px rgba(136, 19, 55, 0.25);
}

.cs-subject-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 4px;
}

.cs-subj-pill {
  padding: 5px 11px;
  border-radius: 9999px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-family: "Prompt", sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.14s ease;
}

.cs-subj-pill:hover {
  border-color: #9F1239;
  color: var(--text-main);
}

.cs-subj-pill.active {
  background: #0F172A;
  border-color: #0F172A;
  color: #FDE68A;
  font-weight: 700;
}

body[data-theme="dark"] .cs-subj-pill.active {
  background: #F59E0B;
  border-color: #F59E0B;
  color: #0F172A;
}

.cs-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  border-radius: 12px;
  font-family: "Prompt", sans-serif;
  font-size: 13px;
  font-weight: 800;
}

.cs-section-heading--part1 {
  background: linear-gradient(90deg, rgba(136, 19, 55, 0.12), rgba(136, 19, 55, 0.03));
  color: #881337;
  border-left: 4px solid #881337;
}

.cs-section-heading--part2 {
  background: linear-gradient(90deg, rgba(180, 83, 9, 0.14), rgba(15, 23, 42, 0.04));
  color: #92400E;
  border-left: 4px solid #D97706;
}

body[data-theme="dark"] .cs-section-heading--part1 {
  background: rgba(136, 19, 55, 0.28);
  color: #FECDD3;
}

body[data-theme="dark"] .cs-section-heading--part2 {
  background: rgba(217, 119, 6, 0.22);
  color: #FDE68A;
}

.cheatsheet-card {
  --cs-grad-start: #881337;
  --cs-grad-end: #4C0519;
  --cs-th-bg: #FFF1F2;
  --cs-th-text: #881337;
  --cs-border-tint: rgba(136, 19, 55, 0.28);
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  border: 1.5px solid var(--cs-border-tint);
  background: var(--bg-card);
  box-shadow: 0 8px 22px -12px rgba(15, 23, 42, 0.16);
}

/* 15 Distinct Harmonious Subject Themes */
.cs-theme-1  { --cs-grad-start: #881337; --cs-grad-end: #4C0519; --cs-th-bg: #FFF1F2; --cs-th-text: #881337; --cs-border-tint: #FB7185; }
.cs-theme-2  { --cs-grad-start: #3730A3; --cs-grad-end: #1E1B4B; --cs-th-bg: #EEF2FF; --cs-th-text: #312E81; --cs-border-tint: #818CF8; }
.cs-theme-3  { --cs-grad-start: #0369A1; --cs-grad-end: #0C4A6E; --cs-th-bg: #E0F2FE; --cs-th-text: #075985; --cs-border-tint: #38BDF8; }
.cs-theme-4  { --cs-grad-start: #B45309; --cs-grad-end: #78350F; --cs-th-bg: #FEF3C7; --cs-th-text: #92400E; --cs-border-tint: #FBBF24; }
.cs-theme-5  { --cs-grad-start: #BE123C; --cs-grad-end: #881337; --cs-th-bg: #FFE4E6; --cs-th-text: #9F1239; --cs-border-tint: #F43F5E; }
.cs-theme-6  { --cs-grad-start: #1D4ED8; --cs-grad-end: #1E3A8A; --cs-th-bg: #DBEAFE; --cs-th-text: #1E40AF; --cs-border-tint: #60A5FA; }
.cs-theme-7  { --cs-grad-start: #047857; --cs-grad-end: #064E3B; --cs-th-bg: #D1FAE5; --cs-th-text: #065F46; --cs-border-tint: #34D399; }
.cs-theme-8  { --cs-grad-start: #0F766E; --cs-grad-end: #134E4A; --cs-th-bg: #CCFBF1; --cs-th-text: #115E59; --cs-border-tint: #2DD4BF; }
.cs-theme-9  { --cs-grad-start: #6D28D9; --cs-grad-end: #4C1D95; --cs-th-bg: #EDE9FE; --cs-th-text: #5B21B6; --cs-border-tint: #A78BFA; }
.cs-theme-10 { --cs-grad-start: #0E7490; --cs-grad-end: #164E63; --cs-th-bg: #CFFAFE; --cs-th-text: #155E75; --cs-border-tint: #22D3EE; }
.cs-theme-11 { --cs-grad-start: #A21CAF; --cs-grad-end: #701A75; --cs-th-bg: #FAE8FF; --cs-th-text: #86198F; --cs-border-tint: #E879F9; }
.cs-theme-12 { --cs-grad-start: #15803D; --cs-grad-end: #14532D; --cs-th-bg: #DCFCE7; --cs-th-text: #166534; --cs-border-tint: #4ADE80; }
.cs-theme-13 { --cs-grad-start: #334155; --cs-grad-end: #0F172A; --cs-th-bg: #E2E8F0; --cs-th-text: #1E293B; --cs-border-tint: #64748B; }
.cs-theme-14 { --cs-grad-start: #C2410C; --cs-grad-end: #7C2D12; --cs-th-bg: #FFEDD5; --cs-th-text: #9A3412; --cs-border-tint: #FB923C; }
.cs-theme-15 { --cs-grad-start: #7E22CE; --cs-grad-end: #3B0764; --cs-th-bg: #F3E8FF; --cs-th-text: #6B21A8; --cs-border-tint: #C084FC; }

.cs-accordion-head {
  position: relative;
  z-index: 3;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 15px;
  background: linear-gradient(135deg, var(--cs-grad-start), var(--cs-grad-end));
  border: none;
  text-align: left;
  cursor: pointer;
  color: #FFFFFF;
  transition: filter 0.15s ease;
}

.cs-accordion-head:hover {
  filter: brightness(1.06);
}

.cs-head-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1 1 auto;
}

.cs-kicker-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 2px 8px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #FDE68A;
  font-family: "Prompt", sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.3;
}

.cs-accordion-title {
  font-family: "Prompt", sans-serif;
  font-weight: 700;
  font-size: 0.94rem;
  color: #FFFFFF;
  line-height: 1.35;
}

.cs-accordion-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.cs-free-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 9999px;
  background: #10B981;
  color: #FFFFFF;
  font-family: "Prompt", sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
}

.cs-chevron {
  font-size: 0.95rem;
  color: #FDE68A;
  transition: transform 0.2s ease;
}

.cheatsheet-card.is-open .cs-chevron {
  transform: rotate(180deg);
}

.cs-accordion-body {
  display: none;
  position: relative;
  padding: 14px 15px;
  font-size: 0.88em;
}

.cheatsheet-card.is-open .cs-accordion-body {
  display: block;
}

.cheatsheet-card th {
  font-family: "Prompt", sans-serif;
  font-size: 0.85em;
}

.cs-thead-row th {
  background: var(--cs-th-bg);
  color: var(--cs-th-text);
  border-color: var(--border-subtle);
  font-weight: 800;
}

body[data-theme="dark"] .cs-thead-row th {
  background: #1E293B;
  color: #FDE68A;
  border-color: #334155;
}

.cs-card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 12px;
  margin-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

.cs-act-btn {
  padding: 6px 12px;
  border-radius: 9px;
  font-family: "Prompt", sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.12s ease;
}

.cs-act-btn:hover {
  transform: translateY(-1px);
}

.cs-act-read {
  background: var(--cs-grad-start);
  color: #FFFFFF;
}

.cs-act-quiz {
  background: var(--bg-subtle);
  border-color: var(--border-subtle);
  color: var(--text-main);
}

.cs-act-official {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border-color: var(--border-subtle);
  color: var(--text-muted);
  text-decoration: none;
}

.cs-act-official:hover {
  border-color: #881337;
  color: #881337;
}

body[data-theme="dark"] .cs-act-official:hover {
  border-color: #FDE68A;
  color: #FDE68A;
}

.watermark-card {
  position: relative;
}

.watermark-stamp {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Prompt", sans-serif;
  font-weight: 800;
  font-size: clamp(1.1rem, 2.8vw, 2rem);
  color: rgba(136, 19, 55, 0.05);
  transform: rotate(-16deg);
  user-select: none;
}

.cs-vip-lock-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 9999px;
  font-family: "Prompt", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #FFFFFF;
}

.is-cs-vip-locked .cs-accordion-body {
  min-height: 150px;
}

.cs-vip-blurred-row td {
  filter: blur(5px);
  user-select: none;
}

.cs-vip-hidden-row {
  display: none;
}

.cs-vip-lock-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  padding: 2.2rem 1rem 1.2rem;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.96) 44%, #FFFFFF 100%);
  text-align: center;
}

body[data-theme="dark"] .cs-vip-lock-overlay {
  background: linear-gradient(to bottom, rgba(17, 24, 39, 0) 0%, rgba(17, 24, 39, 0.96) 44%, #111827 100%);
}

/* Mock Exam Prev/Next Stepper Buttons */
.exam-step-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 10px;
  font-family: "Prompt", sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.14s ease;
}

.exam-step-btn--prev {
  background: var(--bg-subtle);
  border: 1.5px solid var(--border-subtle);
  color: var(--text-main);
}

.exam-step-btn--next {
  background: linear-gradient(135deg, #881337, #4C0519);
  border: 1.5px solid #881337;
  color: #FDE68A;
  box-shadow: 0 3px 8px rgba(136, 19, 55, 0.25);
}

.exam-step-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

/* ============================================================================
   TIMED MOCK EXAM & STORE PACKAGES
   ============================================================================ */
.exam-mode-btn {
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  color: var(--text-main);
  font-family: "Prompt", sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.exam-mode-btn.active {
  background: #881337;
  border-color: #881337;
  color: #FDE68A;
  font-weight: 700;
}

.exam-start-card {
  padding: 15px 16px;
  border-radius: 14px;
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-subtle);
  cursor: pointer;
  transition: all 0.16s ease;
}

.exam-start-card:hover {
  border-color: #9F1239;
  transform: translateY(-1px);
}

.exam-start-featured {
  background: rgba(245, 158, 11, 0.13);
  border-color: rgba(245, 158, 11, 0.6);
}

.exam-pause-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
}

body[data-theme="dark"] .exam-pause-overlay {
  background: rgba(15, 23, 42, 0.92);
}

.store-pkg-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border-radius: 1rem;
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-card);
  box-shadow: 0 8px 22px -12px rgba(15, 23, 42, 0.12);
}

.store-pkg-featured {
  border-color: #F59E0B;
  box-shadow: 0 12px 26px -12px rgba(245, 158, 11, 0.35);
}

.store-trust-card {
  border-radius: 1rem;
  border: 1.5px solid rgba(16, 185, 129, 0.35);
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.9) 0%, rgba(255, 251, 235, 0.88) 100%);
  padding: 18px;
}

body[data-theme="dark"] .store-trust-card {
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.32) 0%, rgba(15, 23, 42, 0.9) 100%);
  border-color: rgba(52, 211, 153, 0.35);
}

/* ============================================================================
   ROLLING USER REVIEWS MARQUEE BAR & FOOTER
   ============================================================================ */
.bottom-reviews-outer {
  margin-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid rgba(245, 158, 11, 0.22);
  background: var(--bg-card);
  padding: 10px 0 12px;
  overflow: hidden;
}

.reviews-marquee-viewport {
  overflow: hidden;
  width: 100%;
  margin-top: 8px;
}

.reviews-marquee-track {
  display: flex;
  gap: 12px;
  width: max-content;
  animation: agoMarqueeScroll 46s linear infinite;
}

.reviews-marquee-viewport:hover .reviews-marquee-track {
  animation-play-state: paused;
}

@keyframes agoMarqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .reviews-marquee-track {
    animation: none;
    flex-wrap: wrap;
    width: auto;
    padding: 0 16px;
  }
}

.review-pill-card {
  width: 295px;
  flex-shrink: 0;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  padding: 11px 13px;
}

.footer-pos-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #F8FAFC;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}

.footer-pos-btn:hover {
  background: rgba(136, 19, 55, 0.45);
  border-color: rgba(251, 191, 36, 0.55);
}

/* ============================================================================
   DARK & SEPIA UTILITY CONTRAST OVERRIDES
   ============================================================================ */
body[data-theme="dark"] .saas-card {
  background: var(--bg-card);
  border-color: var(--border-subtle);
}

body[data-theme="dark"] .text-slate-900,
body[data-theme="dark"] .text-slate-800 {
  color: #F1F5F9 !important;
}

body[data-theme="dark"] .text-slate-700,
body[data-theme="dark"] .text-slate-600,
body[data-theme="dark"] .text-slate-500 {
  color: #CBD5E1 !important;
}

body[data-theme="dark"] .bg-slate-50,
body[data-theme="dark"] .bg-slate-50\/90,
body[data-theme="dark"] .bg-slate-100,
body[data-theme="dark"] .bg-white {
  background-color: #1E293B !important;
  color: #F1F5F9 !important;
}

body[data-theme="dark"] .border-slate-200,
body[data-theme="dark"] .border-slate-300,
body[data-theme="dark"] .border-slate-100 {
  border-color: #334155 !important;
}

body[data-theme="dark"] input,
body[data-theme="dark"] select,
body[data-theme="dark"] textarea {
  background-color: #0F172A !important;
  color: #F8FAFC !important;
  border-color: #334155 !important;
}

body[data-theme="dark"] .seq-search-wrap input.seq-search-input {
  background-color: transparent !important;
  border-color: transparent !important;
}

body[data-theme="dark"] #vip-modal > div,
body[data-theme="dark"] #purchase-consent-modal > div,
body[data-theme="dark"] #policy-modal > div,
body[data-theme="dark"] #question-report-modal > div {
  background-color: #111827 !important;
  color: #F1F5F9 !important;
}

/* ============================================================================
   SILENT DRM PROTECTION + PRINT BLOCKING
   ============================================================================ */
body[data-drm-shield="on"] #question-list-container,
body[data-drm-shield="on"] #exam-active-card,
body[data-drm-shield="on"] #section-cheatsheet {
  -webkit-user-select: none;
  user-select: none;
}

body.drm-snap-guard main {
  filter: blur(18px);
}

@media print {
  body * {
    display: none !important;
  }
  body::after {
    content: "เนื้อหานี้สงวนสิทธิ์เฉพาะการอ่านออนไลน์บน GovExamPass สำนักงานอัยการสูงสุด 2569 เท่านั้น";
    display: block;
    padding: 2rem;
    font-family: "Prompt", sans-serif;
    font-size: 1.25rem;
    text-align: center;
  }
}


/* ============================================================================
   Unfinished Positions Blur/Dim State, Sharp Status Badge, Reviews & Consent
   ============================================================================ */

.pos-card.is-pos-coming-soon,
.pos-chip-sm.is-pos-coming-soon,
.pos-drawer-item.is-pos-coming-soon,
.footer-pos-btn.is-pos-coming-soon,
.store-pkg-card.is-pos-coming-soon,
.vip-pkg-card.is-pos-coming-soon,
.cs-scope-btn.is-pos-coming-soon {
  position: relative;
  cursor: not-allowed !important;
  opacity: 1 !important;
}

.pos-card.is-pos-coming-soon {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  padding: 8px 10px;
  border-style: dashed;
  border-color: rgba(148, 163, 184, 0.55);
  background: var(--bg-subtle);
}

.pos-card.is-pos-coming-soon .pos-soon-dim,
.pos-drawer-item.is-pos-coming-soon .pos-soon-dim {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  width: 100%;
  flex: 0 1 auto;
}

.pos-card.is-pos-coming-soon .pos-card-icon {
  width: 24px;
  height: 24px;
  border-radius: 7px;
}

@media (min-width: 1280px) {
  .pos-card.is-pos-coming-soon {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 9px 11px;
  }
  .pos-card.is-pos-coming-soon .pos-soon-dim {
    flex: 1 1 auto;
    width: auto;
    gap: 8px;
  }
  .pos-card.is-pos-coming-soon .pos-card-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
  }
}

.pos-soon-dim {
  filter: blur(0.85px);
  opacity: 0.44;
  pointer-events: none;
  user-select: none;
  transition: none !important;
}

.store-pkg-card.is-pos-coming-soon .pos-soon-dim {
  filter: blur(0.95px);
  opacity: 0.45;
}

.footer-pos-btn.is-pos-coming-soon {
  display: flex !important;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  padding: 8px 10px;
  border-style: dashed !important;
  border-color: rgba(148, 163, 184, 0.28) !important;
  background: rgba(15, 23, 42, 0.42) !important;
}

.footer-pos-btn.is-pos-coming-soon:hover {
  transform: none !important;
  border-color: rgba(148, 163, 184, 0.28) !important;
  background: rgba(15, 23, 42, 0.42) !important;
}

.footer-pos-btn.is-pos-coming-soon .pos-soon-dim {
  display: block;
  min-width: 0;
  width: 100%;
  flex: 0 1 auto;
  filter: blur(0.85px);
  opacity: 0.46;
}

.pos-soon-badge {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1.5px 7px;
  border-radius: 999px;
  font-size: 0.63rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.01em;
  white-space: nowrap;
  color: #78350F;
  background: #FEF3C7;
  border: 1px solid #F59E0B;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  filter: none !important;
  opacity: 1 !important;
}

@media (min-width: 1280px) {
  .pos-soon-badge {
    padding: 2px 7px;
    font-size: 0.66rem;
  }
}

.pos-soon-badge-sm {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  color: #78350F;
  background: #FEF3C7;
  border: 1px solid #F59E0B;
  filter: none !important;
  opacity: 1 !important;
}

.pos-soon-badge-footer {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 1.5px 7px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  color: #FDE68A;
  background: rgba(120, 53, 15, 0.78);
  border: 1px solid rgba(251, 191, 36, 0.65);
  filter: none !important;
  opacity: 1 !important;
}

body[data-theme="dark"] .pos-card.is-pos-coming-soon {
  background: rgba(30, 41, 59, 0.68);
  border-color: rgba(148, 163, 184, 0.35);
}

body[data-theme="dark"] .pos-soon-badge,
body[data-theme="dark"] .pos-soon-badge-sm {
  color: #FDE68A;
  background: rgba(120, 53, 15, 0.85);
  border-color: rgba(251, 191, 36, 0.65);
}

.store-pkg-card.is-pos-coming-soon {
  background: var(--bg-subtle);
  border-style: dashed;
  border-color: rgba(148, 163, 184, 0.55);
}

body[data-theme="dark"] .store-pkg-card.is-pos-coming-soon {
  background: rgba(30, 41, 59, 0.65);
}

.store-pkg-card-head-soon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.review-stars {
  color: #F59E0B;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  line-height: 1;
}

.vip-consent-box {
  margin-top: 0.75rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0.85rem;
  background: #FFFBEB;
  border: 1.5px solid #FCD34D;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.vip-consent-box.is-checked {
  background: #ECFDF5;
  border-color: #10B981;
}

.vip-consent-box.is-error {
  background: #FFF1F2;
  border-color: #E11D48;
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.14);
}

body[data-theme="dark"] .vip-consent-box {
  background: rgba(120, 53, 15, 0.28);
  border-color: rgba(245, 158, 11, 0.55);
}

body[data-theme="dark"] .vip-consent-box.is-checked {
  background: rgba(6, 78, 59, 0.32);
  border-color: rgba(16, 185, 129, 0.6);
}

body[data-theme="dark"] .vip-consent-box.is-error {
  background: rgba(136, 19, 55, 0.35);
  border-color: #FB7185;
}

.vip-consent-label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  cursor: pointer;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-main);
}

.vip-consent-checkbox {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.15rem;
  accent-color: #6B0F2B;
  flex-shrink: 0;
  cursor: pointer;
}

.vip-policy-link {
  color: #9F1239;
  font-weight: 800;
  text-decoration: underline;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
}

body[data-theme="dark"] .vip-policy-link {
  color: #FCD34D;
}

/* ============================================================================
   COURT-PARITY CHECKOUT MODAL & CONSENT MODAL STYLES
   ============================================================================ */
.ago-qr-payment-layout {
  display: grid;
  grid-template-columns: minmax(220px, 256px) 1fr;
  gap: 1rem;
  align-items: stretch;
}

@media (max-width: 639px) {
  .ago-qr-payment-layout {
    grid-template-columns: 1fr;
  }
}

.ago-qr-card-frame {
  display: flex;
  flex-direction: column;
  border-radius: 1rem;
  border: 1px solid #CBD5E1;
  background: #FFFFFF;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.ago-qr-card-head {
  background: linear-gradient(135deg, #0B3B68 0%, #102A43 100%);
  color: #FFFFFF;
  padding: 0.65rem 0.85rem;
  text-align: center;
}

.ago-qr-card-body {
  flex: 1 1 auto;
  padding: 1rem 0.9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  text-align: center;
}

.ago-qr-icon-badge {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.9rem;
  background: #F1F5F9;
  border: 1px dashed #94A3B8;
  color: #0B3B68;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ago-qr-card-foot {
  background: #F8FAFC;
  border-top: 1px solid #E2E8F0;
  padding: 0.5rem 0.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  color: #475569;
}

.ago-qr-detail-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 1rem;
  border: 1px solid #E2E8F0;
  background: #FFFFFF;
  padding: 0.95rem 1rem;
}

.ago-qr-detail-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.ago-qr-detail-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed #E2E8F0;
  font-size: 0.78rem;
  line-height: 1.45;
}

.ago-qr-detail-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.ago-qr-detail-label {
  color: #64748B;
  font-weight: 600;
  white-space: nowrap;
}

.ago-qr-detail-val {
  color: #0F172A;
  font-weight: 700;
  text-align: right;
  flex: 1 1 auto;
}

.stripe-pulse-dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 9999px;
  background-color: #10B981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.65);
  flex-shrink: 0;
  animation: stripePulseGlow 1.8s infinite;
}

@keyframes stripePulseGlow {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.65); }
  70% { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Sepia & Dark Contrast Overrides for Checkout & Consent Modals */
body[data-theme="sepia"] .ago-qr-card-frame,
body[data-theme="sepia"] .ago-qr-detail-panel {
  background: #FFFDF8;
  border-color: #DECBB4;
}

body[data-theme="sepia"] .ago-qr-card-foot {
  background: #F5F0E6;
  border-top-color: #DECBB4;
}

body[data-theme="dark"] .ago-qr-card-frame,
body[data-theme="dark"] .ago-qr-detail-panel {
  background: #0F172A !important;
  border-color: #334155 !important;
}

body[data-theme="dark"] .ago-qr-card-foot {
  background: #1E293B !important;
  border-top-color: #334155 !important;
  color: #CBD5E1 !important;
}

body[data-theme="dark"] .ago-qr-icon-badge {
  background: #1E293B !important;
  border-color: #475569 !important;
  color: #93C5FD !important;
}

body[data-theme="dark"] .ago-qr-detail-row {
  border-bottom-color: #334155 !important;
}

body[data-theme="dark"] .ago-qr-detail-label {
  color: #94A3B8 !important;
}

body[data-theme="dark"] .ago-qr-detail-val {
  color: #F8FAFC !important;
}

body[data-theme="dark"] #vip-detail-net-price,
body[data-theme="dark"] #vip-qr-amount-text {
  color: #FCD34D !important;
}

body[data-theme="dark"] #vip-detail-ref-code {
  background: #1E293B !important;
  border-color: #475569 !important;
  color: #FCD34D !important;
}

body[data-theme="dark"] #vip-modal .bg-emerald-50,
body[data-theme="dark"] #vip-modal .bg-emerald-50\/70,
body[data-theme="dark"] #vip-receipt-card {
  background-color: rgba(6, 78, 59, 0.36) !important;
  border-color: rgba(16, 185, 129, 0.5) !important;
}

body[data-theme="dark"] #vip-receipt-card *,
body[data-theme="dark"] #vip-qr-status,
body[data-theme="dark"] #vip-price-summary {
  color: #D1FAE5 !important;
}

body[data-theme="dark"] #vip-receipt-code {
  background-color: #0F172A !important;
  color: #6EE7B7 !important;
  border-color: rgba(16, 185, 129, 0.55) !important;
}

body[data-theme="dark"] #vip-pkg-grid .vip-pkg-card:not(.is-pos-coming-soon) {
  background-color: #1E293B !important;
  border-color: #F59E0B !important;
}

body[data-theme="dark"] #purchase-consent-modal .bg-slate-50 {
  background-color: #1E293B !important;
  border-color: #334155 !important;
  color: #E2E8F0 !important;
}

/* =========================================================
   IN-APP BROWSER ADVISORY BANNER (FBAN / FBAV / LINE)
   ========================================================= */
.inapp-advisory-bar {
  background: linear-gradient(90deg, #FEF3C7 0%, #FDE68A 100%);
  border-bottom: 1.5px solid #F59E0B;
  box-shadow: 0 2px 8px rgba(180, 83, 9, 0.1);
}

body[data-theme="sepia"] .inapp-advisory-bar {
  background: linear-gradient(90deg, #FBE9B8 0%, #F7DA8C 100%);
  border-bottom-color: #D97706;
}

body[data-theme="dark"] .inapp-advisory-bar {
  background: linear-gradient(90deg, #451A03 0%, #78350F 100%) !important;
  border-bottom-color: #D97706 !important;
}

body[data-theme="dark"] .inapp-advisory-bar .text-amber-950,
body[data-theme="dark"] #vip-inapp-warning,
body[data-theme="dark"] #vip-inapp-warning * {
  color: #FEF3C7 !important;
}

body[data-theme="dark"] #vip-inapp-warning {
  background-color: rgba(120, 53, 15, 0.45) !important;
  border-color: #F59E0B !important;
}

body[data-theme="dark"] #btn-inapp-copy-url,
body[data-theme="dark"] #btn-vip-inapp-copy-url {
  background-color: #F59E0B !important;
  color: #0F172A !important;
}
