/* ============================================================================
   GovExamPass กรมสรรพากร 2569 — Fiscal Emerald & Gold Study Suite Stylesheet (Light / Sepia / Dark)
   ============================================================================ */

:root {
  --rd-950: #06281E;
  --rd-900: #0A382B;
  --rd-800: #0F4C3A;
  --rd-700: #14634C;
  --rd-gold: #D4AF37;
  --rd-gold-soft: #FEF3C7;
  --bg-body: #E6F0EC;
  --bg-card: #FFFFFF;
  --bg-subtle: #EDF5F1;
  --text-main: #0F172A;
  --text-muted: #475569;
  --border-subtle: #B8D4C9;
  --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: #071310;
  --bg-card: #0D1F1A;
  --bg-subtle: #132B24;
  --text-main: #ECFDF5;
  --text-muted: #A7F3D0;
  --border-subtle: #1E4237;
}

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; }

.rd-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 (Single-Button Ecosystem Dropdown)
   ============================================================================ */
.portal-switcher-bar {
  position: relative;
  z-index: 45;
  background: #071913;
  border-bottom: 1px solid rgba(212, 175, 55, 0.3);
  color: #E2E8F0;
}

.portal-label {
  font-family: "Prompt", sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: #FCD34D;
  white-space: nowrap;
  flex-shrink: 0;
}

.portal-current-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #0F4C3A 0%, #083024 100%);
  border: 1px solid rgba(251, 191, 36, 0.55);
  font-family: "Prompt", sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  color: #FDE68A;
  white-space: nowrap;
}

.portal-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 9999px;
  background: #34D399;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.22);
  flex-shrink: 0;
}

.portal-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.45);
  color: #F8FAFC;
  font-family: "Prompt", sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.16s ease;
}

.portal-dropdown-btn:hover,
.portal-dropdown-btn[aria-expanded="true"] {
  background: rgba(15, 76, 58, 0.9);
  border-color: #FBBF24;
  color: #FEF3C7;
}

.portal-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9999px;
  background: #FBBF24;
  color: #06281E;
  font-family: "Prompt", sans-serif;
  font-size: 10.5px;
  font-weight: 800;
}

.portal-chevron {
  transition: transform 0.18s ease;
}

.portal-dropdown-btn[aria-expanded="true"] .portal-chevron {
  transform: rotate(180deg);
}

.portal-dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 340px;
  max-width: calc(100vw - 24px);
  padding: 12px;
  border-radius: 16px;
  background: #FFFFFF;
  border: 1.5px solid #B8D4C9;
  box-shadow: 0 22px 45px -12px rgba(6, 40, 30, 0.38);
  z-index: 65;
  color: #0F172A;
}

@media (max-width: 639px) {
  .portal-dropdown-menu {
    position: fixed;
    left: 12px;
    right: 12px;
    top: 44px;
    width: auto;
    max-width: none;
  }
}

.portal-menu-head {
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid #E2E8F0;
}

.portal-menu-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.portal-arena-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid #CBD5E1;
  background: #F8FAFC;
  text-decoration: none;
  color: inherit;
  transition: all 0.16s ease;
}

a.portal-arena-card:hover {
  background: #FFFFFF;
  border-color: #0F4C3A;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px -8px rgba(15, 23, 42, 0.25);
}

.portal-arena-card.is-current {
  background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
  border: 1.5px solid #0F4C3A;
}

.portal-arena-badge {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #FFFFFF;
}

.portal-arena-badge.is-rd {
  background: linear-gradient(135deg, #14634C 0%, #06281E 100%);
  border: 1px solid #D4AF37;
  color: #FDE68A;
}

.portal-arena-badge.is-coj {
  background: linear-gradient(135deg, #1E40AF 0%, #0F172A 100%);
  border: 1px solid rgba(251, 191, 36, 0.65);
  color: #FDE68A;
}

.portal-arena-badge.is-ago {
  background: linear-gradient(135deg, #9F1239 0%, #4C0519 100%);
  border: 1px solid rgba(251, 191, 36, 0.65);
  color: #FDE68A;
}

.portal-arena-title {
  display: block;
  font-family: "Prompt", sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  color: #0F172A;
  line-height: 1.25;
}

.portal-arena-sub {
  display: block;
  font-family: "Sarabun", sans-serif;
  font-size: 11px;
  font-weight: 400;
  color: #475569;
  line-height: 1.3;
  margin-top: 2px;
}

.portal-arena-tag.is-active {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 9999px;
  background: #0F4C3A;
  color: #FDE68A;
  font-family: "Prompt", sans-serif;
  font-size: 10px;
  font-weight: 700;
}

.portal-arena-ext {
  font-size: 13px;
  font-weight: 700;
  color: #475569;
  flex-shrink: 0;
}

body[data-theme="sepia"] .portal-dropdown-menu {
  background: #FBF7EC;
  border-color: #C7B28A;
  color: #2D241E;
}

body[data-theme="sepia"] .portal-arena-card {
  background: #F3EAD8;
  border-color: #D6C5A3;
}

body[data-theme="dark"] .portal-dropdown-menu {
  background: #0F172A;
  border-color: #334155;
  color: #F1F5F9;
}

body[data-theme="dark"] .portal-menu-head {
  border-bottom-color: #334155;
}

body[data-theme="dark"] .portal-menu-head .text-slate-900 {
  color: #F8FAFC;
}

body[data-theme="dark"] .portal-menu-head .text-slate-500 {
  color: #94A3B8;
}

body[data-theme="dark"] .portal-arena-card {
  background: #1E293B;
  border-color: #334155;
}

body[data-theme="dark"] .portal-arena-card.is-current {
  background: linear-gradient(135deg, #064E3B 0%, #052E23 100%);
  border-color: #34D399;
}

body[data-theme="dark"] .portal-arena-title {
  color: #F8FAFC;
}

body[data-theme="dark"] .portal-arena-sub,
body[data-theme="dark"] .portal-arena-ext {
  color: #CBD5E1;
}

/* ============================================================================
   STICKY HEADER + DESKTOP NAV + SETTINGS DROPDOWN
   ============================================================================ */
.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(6, 40, 30, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.25);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.18);
}

.nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "Prompt", sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 9px;
  color: #ECFDF5;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  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(212, 175, 55, 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%, #D4AF37 100%);
  color: #1E1B18;
  border: 1px solid #FDE68A;
  box-shadow: 0 2px 10px rgba(212, 175, 55, 0.35);
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.14s ease, filter 0.14s ease;
}

.header-vip-pill:hover {
  filter: brightness(1.05);
}

@media (max-width: 479px) {
  .header-vip-pill {
    font-size: 11px;
    padding: 5px 9px;
    gap: 4px;
  }
}

.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-wrap,
.updates-wrap {
  position: relative;
}

.header-updates-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 8px;
  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;
  transition: background 0.15s ease;
}

.header-updates-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.updates-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #10B981;
  box-shadow: 0 0 0 2px #06281E;
}

.updates-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(370px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  max-height: 74vh;
  max-height: 74dvh;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  white-space: normal;
  box-sizing: border-box;
  padding: 13px 14px;
  border-radius: 14px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  box-shadow: 0 18px 40px -12px rgba(15, 23, 42, 0.35);
  color: var(--text-main);
  z-index: 80;
}

.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: min(260px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 90px);
  max-height: calc(100dvh - 90px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  box-sizing: border-box;
  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: 80;
}

.updates-panel.hidden,
.settings-panel.hidden,
.settings-dropdown.hidden,
#rd-web-alert-banner.hidden,
.rd-changelog-strip.hidden {
  display: none !important;
}

.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: #0F4C3A;
  border-color: #0F4C3A;
  color: #FDE68A;
  font-weight: 700;
}

/* ============================================================================
   INNER SUB-PAGE POSITION BAR (LOCKED CONTEXT CARD + DRAWER)
   ============================================================================ */
.inner-pos-bar {
  position: sticky;
  top: 3.5rem;
  z-index: 30;
  background: var(--bg-body);
  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 #0F4C3A;
  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(15, 76, 58, 0.1);
  border: 1px solid rgba(15, 76, 58, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}

@media (max-width: 639px) {
  .inner-pos-bar > div {
    padding-top: 6px;
    padding-bottom: 6px;
  }
  .locked-pos-card {
    padding: 6px 10px;
    border-radius: 12px;
    gap: 8px;
  }
  .locked-pos-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
  }
}

.locked-pos-change-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 9999px;
  border: 1.5px solid rgba(15, 76, 58, 0.25);
  background: rgba(15, 76, 58, 0.08);
  color: #0F4C3A;
  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: #0F4C3A;
  border-color: #0F4C3A;
  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: #0F4C3A;
  border-color: #0F4C3A;
  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: #0F4C3A;
  border-color: #0F4C3A;
  color: #FEF3C7;
}

/* ============================================================================
   CARDS, HERO & COUNTDOWN
   ============================================================================ */
.saas-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  border-radius: 1rem;
  box-shadow: 0 6px 20px -8px rgba(6, 40, 30, 0.14);
}

.hero-card {
  background: radial-gradient(circle at top right, #14634C 0%, #083024 50%, #051914 100%);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 1.15rem;
  padding: 1rem;
  color: #FFFFFF;
  box-shadow: 0 16px 36px -16px rgba(6, 40, 30, 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: #D1FAE5;
  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(212, 175, 55, 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: #D1FAE5;
}

.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 9-POSITION SELECTOR (Fiscal Emerald & Gold Compact Grid)
   ============================================================================ */
.pos-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 7px;
  min-height: 46px;
  padding: 7px 9px;
  border-radius: 12px;
  border: 1.5px solid #CBD5E1;
  background: linear-gradient(180deg, #FFFFFF 0%, #F4F9F7 100%);
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  min-width: 0;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
  transition: all 0.16s ease;
}

body[data-theme="sepia"] .pos-card {
  background: linear-gradient(180deg, #FDFAF3 0%, #F5EBD6 100%);
  border-color: #D6C5A3;
  color: #2D241E;
}

body[data-theme="dark"] .pos-card {
  background: linear-gradient(180deg, #162235 0%, #0F172A 100%);
  border-color: #334155;
  color: #F1F5F9;
}

@media (min-width: 640px) {
  .pos-card {
    padding: 9px 11px;
    gap: 8px;
    min-height: 52px;
  }
}

.pos-card:hover {
  border-color: #14634C;
  transform: translateY(-1px);
}

.pos-card.active {
  background: linear-gradient(135deg, #0F4C3A 0%, #083024 100%);
  border-color: #FBBF24;
  color: #FFFFFF;
  box-shadow: 0 8px 20px -8px rgba(15, 76, 58, 0.65);
}

.pos-card-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(15, 76, 58, 0.09);
  color: #0F4C3A;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.16s ease;
}

@media (min-width: 640px) {
  .pos-card-icon {
    width: 28px;
    height: 28px;
  }
}

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: 400;
  color: #475569;
  opacity: 1;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-theme="sepia"] .pos-card-mob-meta {
  color: #5C4D3C;
}

body[data-theme="dark"] .pos-card-mob-meta {
  color: #94A3B8;
}

.pos-card.active .pos-card-mob-meta {
  color: #FDE68A !important;
  opacity: 0.96;
}

.pos-card-pc-meta {
  font-family: "Sarabun", sans-serif;
  font-size: 11px;
  font-weight: 400;
  color: #475569;
  opacity: 1;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-theme="dark"] .pos-card-pc-meta {
  color: #CBD5E1;
}

.pos-card.active .pos-card-pc-meta {
  color: #FDE68A !important;
  opacity: 0.95;
}

.pos-card-mob-chip {
  flex-shrink: 0;
  white-space: nowrap;
  font-family: "Prompt", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: #D1FAE5;
  border: 1px solid #6EE7B7;
  color: #0F4C3A;
}

.pos-card.active .pos-card-mob-chip {
  background: rgba(251, 191, 36, 0.22);
  border-color: rgba(251, 191, 36, 0.55);
  color: #FDE68A;
}

@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, #0B241D 0%, #06281E 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(6, 40, 30, 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: #FDE68A;
  }
  #active-pos-summary .pos-qual-details p,
  #active-pos-summary .pos-qual-details li {
    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, #34D399, #10B981);
  height: 100%;
}

.score-split-spec {
  background: linear-gradient(90deg, #D4AF37, #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, #14634C 0%, #D4AF37 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%, #ECFDF5 100%);
  color: #06281E;
  box-shadow: 0 8px 22px -14px rgba(15, 76, 58, 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(6, 40, 30, 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: #0F4C3A;
  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: #0F4C3A;
  color: #FFFFFF;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(15, 76, 58, 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, #0F4C3A 0%, #06281E 100%);
  border-bottom: 2px solid #34D399;
}

.subject-zone-head--spec {
  background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
  border-bottom: 2px solid #D4AF37;
}

.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: #D1FAE5;
  color: #14634C;
  border: 1px solid rgba(20, 99, 76, 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(13, 122, 91, 0.35);
  color: #6EE7B7;
  border-color: rgba(52, 211, 153, 0.45);
}

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: 600;
  font-size: 13px;
  line-height: 1.35;
  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: 400;
  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, #14634C, #34D399);
}

.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: #ECFDF5;
  color: #0F4C3A;
  border: 1px solid rgba(15, 76, 58, 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(15, 76, 58, 0.45);
  color: #A7F3D0;
  border-color: rgba(52, 211, 153, 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 #0F4C3A;
}

.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, #0F4C3A, #D4AF37);
}

.seq-law-select {
  width: 100%;
  padding: 9px 34px 9px 12px;
  border-radius: 12px;
  border: 1.5px solid var(--border-subtle);
  background-color: var(--bg-subtle);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 14px 14px;
  -webkit-appearance: none;
  appearance: none;
  text-overflow: ellipsis;
  color: var(--text-main);
  font-family: "Prompt", sans-serif;
  font-size: 13px;
  font-weight: 600;
}

.seq-action-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 6px;
  align-items: center;
}

@media (max-width: 639px) {
  .seq-action-row .seq-reset-label {
    display: none;
  }
  .seq-action-row .seq-btn-tools,
  .seq-action-row .seq-btn-continue,
  .seq-action-row .seq-btn-practice,
  .seq-action-row .seq-btn-reset {
    padding: 8px 8px;
    font-size: 11.5px;
  }
}

@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: #0F4C3A;
  border-color: #0F4C3A;
  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: #D4AF37;
  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 #D4AF37;
  background: linear-gradient(135deg, #FBBF24, #D4AF37);
  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(212, 175, 55, 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(15, 76, 58, 0.25);
  background: rgba(236, 253, 245, 0.85);
  color: #14634C;
  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: #D1FAE5;
}

body[data-theme="dark"] .seq-btn-reset {
  background: rgba(20, 99, 76, 0.24);
  border-color: rgba(52, 211, 153, 0.4);
  color: #6EE7B7;
}

.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: #0F4C3A;
  color: #0F4C3A;
}

.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: #D4AF37;
  border-color: #D4AF37;
  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: #0F4C3A;
  border-color: #0F4C3A;
  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: #0F4C3A;
  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: #14634C;
}

.doc-link-primary {
  background: rgba(15, 76, 58, 0.08);
  border-color: rgba(15, 76, 58, 0.25);
}

details[open] .docs-drawer-hint {
  color: #059669;
}

/* ============================================================================
   MOBILE BOTTOM NAVIGATION (< 768px) — Fiscal Emerald & 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(66px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: linear-gradient(180deg, #0A382B 0%, #051E17 100%);
  border-top: 2px solid rgba(212, 175, 55, 0.72);
  box-shadow: 0 -8px 26px rgba(6, 40, 30, 0.48);
}

@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: 3px;
  background: transparent;
  border: none;
  border-radius: 11px;
  margin: 5px 3px;
  padding: 4px 2px;
  color: #D1FAE5;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mbn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  line-height: 1;
}

.mbn-icon svg {
  width: 20px;
  height: 20px;
}

.mbn-label {
  font-family: "Prompt", sans-serif;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}

.mbn-tab.active {
  color: #FDE68A;
  background: rgba(212, 175, 55, 0.22);
}

.mbn-tab.active .mbn-label {
  font-weight: 700;
  color: #FDE68A;
}

.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: #14634C;
  --q-top-bar: #FBBF24;
  --q-stem-bg: rgba(248, 250, 252, 0.9);
  background: var(--bg-card);
  border: 1.5px 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: #14634C; --q-top-bar: #FBBF24; --q-stem-bg: rgba(236, 253, 245, 0.72); }
.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: 9px 11px;
  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, #0F4C3A 0%, #06281E 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: #D4AF37;
  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: #14634C;
  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: #0F4C3A !important;
  background: #ECFDF5 !important;
  color: #06281E !important;
  font-weight: 600;
}

.choice-selected .choice-letter-badge {
  background: #0F4C3A;
  border-color: #0F4C3A;
  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(20, 99, 76, 0.35) !important;
  color: #FDE68A !important;
  border-color: #34D399 !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: #0F4C3A;
  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: #0D7A5B;
  color: #0D7A5B;
}

body[data-theme="dark"] .q-report-btn:hover {
  border-color: #6EE7B7;
  color: #6EE7B7;
}

/* ============================================================================
   COLLAPSIBLE CHEAT SHEET ACCORDIONS + 15 DISTINCT COLOR THEMES + VIP LOCK
   ============================================================================ */
.cs-search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: none;
  background: rgba(148, 163, 184, 0.22);
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.cs-search-clear.hidden {
  display: none !important;
}

.cs-scope-btn {
  padding: 6px 12px;
  border-radius: 999px;
  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, #0F4C3A, #06281E);
  border-color: #0F4C3A;
  color: #FDE68A;
  box-shadow: 0 3px 10px rgba(15, 76, 58, 0.25);
}

.cs-scope-sub-btn {
  padding: 6px 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: 11.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.14s ease;
}

.cs-scope-sub-btn:hover {
  border-color: #14634C;
}

.cs-subject-pills {
  display: flex;
  flex-wrap: wrap;
  overflow-x: visible;
  align-items: center;
  gap: 5px;
  max-width: 100%;
}

@media (min-width: 640px) {
  .cs-subject-pills {
    gap: 6px;
  }
}

.cs-subj-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  max-width: 100%;
  padding: 5px 10px;
  border-radius: 9999px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  color: var(--text-main);
  font-family: "Prompt", sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.14s ease;
}

.cs-subj-pill:hover {
  border-color: #14634C;
  color: var(--text-main);
}

.cs-subj-pill.active {
  background: #0F172A;
  border-color: #0F172A;
  color: #FDE68A;
  font-weight: 700;
}

.cs-pill-vip-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 5px;
  border-radius: 999px;
  background: #D4AF37;
  color: #FFFFFF;
  font-family: "Prompt", sans-serif;
  font-size: 9.5px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.02em;
}

.cs-subj-pill.active .cs-pill-vip-tag {
  background: #FBBF24;
  color: #0F172A;
}

body[data-theme="dark"] .cs-subj-pill.active {
  background: #D4AF37;
  border-color: #D4AF37;
  color: #0F172A;
}

body[data-theme="dark"] .cs-subj-pill.active .cs-pill-vip-tag {
  background: #0F172A;
  color: #FDE68A;
}

@media (max-width: 419px) {
  .cs-scope-btn {
    padding: 5.5px 10px;
    font-size: 11.5px;
  }
  .cs-scope-sub-btn {
    padding: 5.5px 9px;
    font-size: 11px;
  }
  .cs-subj-pill {
    padding: 4.5px 9px;
    font-size: 11px;
  }
}

.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(15, 76, 58, 0.12), rgba(15, 76, 58, 0.03));
  color: #0F4C3A;
  border-left: 4px solid #0F4C3A;
}

.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(15, 76, 58, 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: #0F4C3A;
  --cs-grad-end: #06281E;
  --cs-th-bg: #ECFDF5;
  --cs-th-text: #0F4C3A;
  --cs-border-tint: rgba(15, 76, 58, 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: #0F4C3A; --cs-grad-end: #06281E; --cs-th-bg: #ECFDF5; --cs-th-text: #0F4C3A; --cs-border-tint: #34D399; }
.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: #0D7A5B; --cs-grad-end: #0F4C3A; --cs-th-bg: #D1FAE5; --cs-th-text: #14634C; --cs-border-tint: #10B981; }
.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: #0F4C3A;
  color: #0F4C3A;
}

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(15, 76, 58, 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, #D4AF37, #D97706);
  color: #FFFFFF;
}

.cs-vip-lock-pill.is-unlocked {
  background: #10B981;
  color: #FFFFFF;
}

.cs-table-lock-wrap {
  position: relative;
}

.is-cs-vip-locked .cs-table-lock-wrap {
  max-height: 280px;
  min-height: 180px;
  overflow: hidden;
  border-radius: 12px;
}

.cs-vip-blurred-row td {
  filter: blur(5px);
  user-select: none;
}

.cs-vip-hidden-row {
  display: none !important;
}

.cs-vip-lock-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  padding: 2.2rem 1rem 1.15rem;
  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%);
}

body[data-theme="sepia"] .cs-vip-lock-overlay {
  background: linear-gradient(to bottom, rgba(255, 253, 248, 0) 0%, rgba(255, 253, 248, 0.96) 44%, #FFFDF8 100%);
}

body[data-theme="dark"] .cs-vip-lock-overlay div {
  color: #FDE68A !important;
}

@media (max-width: 639px) {
  .cheatsheet-card table,
  .cheatsheet-card tbody {
    display: block;
    width: 100%;
  }
  .cheatsheet-card thead {
    display: none;
  }
  .cheatsheet-card tbody tr:not(.cs-vip-hidden-row) {
    display: block;
    border: 1px solid var(--border-subtle) !important;
    border-radius: 11px;
    padding: 10px 11px;
    margin-bottom: 8px;
    background: var(--bg-subtle);
  }
  .cheatsheet-card tbody tr:last-child {
    margin-bottom: 0;
  }
  .cheatsheet-card tbody td {
    display: block;
    width: 100%;
    border: none !important;
    padding: 0 !important;
    font-size: 12.5px;
    line-height: 1.55;
  }
  .cheatsheet-card tbody td:nth-child(1) {
    font-family: "Prompt", sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: var(--cs-th-text);
    padding-bottom: 5px !important;
    margin-bottom: 6px;
    border-bottom: 1px dashed var(--border-subtle) !important;
  }
  .cheatsheet-card tbody td:nth-child(2) {
    padding-bottom: 6px !important;
    color: var(--text-main);
  }
  .cheatsheet-card tbody td:not(:first-child) {
    padding-bottom: 5px !important;
    margin-bottom: 4px;
    color: var(--text-main);
  }
  .cheatsheet-card tbody td:last-child {
    padding-bottom: 0 !important;
    margin-bottom: 0;
  }
  .cheatsheet-card tbody td[data-label]:not(:first-child)::before {
    content: attr(data-label) " : ";
    font-family: "Prompt", sans-serif;
    font-weight: 700;
    color: var(--cs-th-text);
  }
  .cheatsheet-card tbody tr td:first-child:nth-last-child(n+3) ~ td:last-child {
    padding: 7px 9px !important;
    margin-top: 6px;
    border-radius: 8px;
    border-left: 3px solid #D97706 !important;
    background: rgba(245, 158, 11, 0.08);
  }
  body[data-theme="dark"] .cheatsheet-card tbody tr td:first-child:nth-last-child(n+3) ~ td:last-child {
    background: rgba(245, 158, 11, 0.14);
    border-left-color: #FBBF24 !important;
  }
  body[data-theme="sepia"] .cheatsheet-card tbody tr td:first-child:nth-last-child(n+3) ~ td:last-child {
    background: rgba(180, 83, 9, 0.09);
    border-left-color: #B45309 !important;
  }
  body[data-theme="dark"] .cheatsheet-card tbody td:nth-child(1),
  body[data-theme="dark"] .cheatsheet-card tbody td[data-label]:not(:first-child)::before {
    color: #FDE68A !important;
  }
}

/* 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, #0F4C3A, #06281E);
  border: 1.5px solid #0F4C3A;
  color: #FDE68A;
  box-shadow: 0 3px 8px rgba(15, 76, 58, 0.25);
}

.exam-step-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

/* ============================================================================
   FULL-BANK PRACTICE & TIMED MOCK EXAM ENGINE
   ============================================================================ */
.exam-setup-card {
  padding: 12px 13px;
  display: flex;
  flex-direction: column;
  gap: 8.5px;
}

@media (min-width: 640px) {
  .exam-setup-card {
    padding: 20px 22px;
    gap: 14px;
  }
}

.exam-resume-card.hidden {
  display: none !important;
}

.exam-resume-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 11px 12px;
  border-radius: 13px;
  border: 1.5px solid #D4AF37;
  background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
  color: #451A03;
}

@media (min-width: 640px) {
  .exam-resume-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 15px;
  }
}

.exam-resume-copy {
  min-width: 0;
  width: 100%;
  flex: 1 1 auto;
}

.exam-resume-title {
  font-family: "Prompt", sans-serif;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.35;
  color: #451A03;
}

.exam-resume-meta {
  font-size: 11.5px;
  color: #78350F;
  margin-top: 2px;
  line-height: 1.35;
}

.exam-resume-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .exam-resume-actions {
    display: flex;
    align-items: center;
    gap: 8px;
  }
}

.exam-resume-primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 36px;
  padding: 7px 12px;
  border-radius: 10px;
  border: none;
  background: #D4AF37;
  color: #0F172A;
  font-family: "Prompt", sans-serif;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(180, 83, 9, 0.22);
}

.exam-resume-primary-btn:hover {
  background: #FBBF24;
}

.exam-resume-secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 7px 11px;
  border-radius: 10px;
  border: 1px solid rgba(120, 53, 15, 0.25);
  background: #FFFFFF;
  color: #475569;
  font-family: "Prompt", sans-serif;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.exam-resume-secondary-btn:hover {
  background: #F8FAFC;
}

.exam-setup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--border-subtle);
}

.exam-setup-title {
  font-family: "Prompt", sans-serif;
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.25;
  margin: 0;
}

@media (min-width: 640px) {
  .exam-setup-title {
    font-size: 1.32rem;
  }
}

.exam-access-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 9999px;
  background: rgba(15, 76, 58, 0.08);
  border: 1px solid rgba(15, 76, 58, 0.22);
  color: #0F4C3A;
  font-family: "Prompt", sans-serif;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.exam-config-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

@media (min-width: 768px) {
  .exam-config-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 14px;
    align-items: start;
  }
}

.exam-field-label {
  display: block;
  font-family: "Prompt", sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
}

.exam-select {
  width: 100%;
  min-width: 0;
  padding: 9px 34px 9px 11px;
  border-radius: 11px;
  border: 1.5px solid var(--border-subtle);
  background-color: var(--bg-subtle);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 14px 14px;
  -webkit-appearance: none;
  appearance: none;
  text-overflow: ellipsis;
  color: var(--text-main);
  font-family: "Sarabun", sans-serif;
  font-size: 0.86rem;
  font-weight: 600;
}

.exam-select:focus {
  outline: none;
  border-color: #14634C;
}

.exam-scope-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 8px;
  font-size: 11.5px;
  color: var(--text-muted);
  padding-top: 2px;
}

.exam-scope-meta {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.exam-scope-meta strong {
  color: var(--text-main);
}

.exam-unlock-mini-btn {
  display: inline-flex;
  align-items: center;
  padding: 2.5px 8px;
  border-radius: 7px;
  border: none;
  background: #FBBF24;
  color: #0F172A;
  font-family: "Prompt", sans-serif;
  font-size: 10.5px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.exam-scope-links {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex-shrink: 0;
}

.exam-mini-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border-radius: 7px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  color: var(--text-main);
  font-family: "Prompt", sans-serif;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.exam-mini-link:hover {
  border-color: #14634C;
}

.exam-mode-seg {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 3px;
  border-radius: 11px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
}

.exam-mode-btn {
  padding: 8px 6px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: "Prompt", sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: all 0.15s ease;
}

.exam-mode-btn.active {
  background: #0F4C3A;
  color: #FDE68A;
  font-weight: 700;
  box-shadow: 0 2px 8px -2px rgba(15, 76, 58, 0.35);
}

.exam-size-seg {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.32fr);
  gap: 4px;
  padding: 3px;
  border-radius: 11px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
}

.exam-size-btn {
  padding: 6.5px 4px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: "Prompt", sans-serif;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: all 0.15s ease;
}

.exam-size-btn.active {
  background: #0F4C3A;
  color: #FDE68A;
  box-shadow: 0 2px 8px -2px rgba(15, 76, 58, 0.35);
}

.exam-tier-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-width: 0;
  padding: 12px 13px;
  border-radius: 13px;
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-subtle);
  color: var(--text-main);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.exam-tier-copy {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.exam-tier-title {
  font-family: "Prompt", sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.3;
}

.exam-tier-count {
  font-weight: 800;
}

.exam-tier-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
}

.exam-tier-card:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: #14634C;
  box-shadow: 0 10px 22px -14px rgba(15, 76, 58, 0.38);
}

.exam-tier-card:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.exam-tier-card--subject {
  background: linear-gradient(135deg, rgba(15, 76, 58, 0.06), rgba(248, 250, 252, 0.95));
  border-color: rgba(15, 76, 58, 0.28);
}

.exam-tier-card--subject .exam-tier-title {
  color: #06281E;
}

.exam-tier-card--all {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.14), rgba(254, 243, 199, 0.45));
  border-color: rgba(212, 175, 55, 0.65);
}

.exam-tier-card--all .exam-tier-title {
  color: #451A03;
}

.exam-tier-cta {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 9999px;
  font-family: "Prompt", sans-serif;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
}

.exam-tier-cta--crimson {
  background: #0F4C3A;
  color: #FEF3C7;
}

.exam-tier-cta--gold {
  background: #D4AF37;
  color: #0F172A;
}

.exam-targeted-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.exam-targeted-bar .exam-filter-chip {
  grid-column: span 2;
}

@media (min-width: 640px) {
  .exam-targeted-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 9px 11px;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-subtle);
  }
  .exam-targeted-bar .exam-filter-chip {
    grid-column: auto;
    margin-left: auto;
  }
}

.exam-target-btn,
.exam-filter-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 10px;
  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: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.14s ease;
}

@media (min-width: 640px) {
  .exam-target-btn,
  .exam-filter-chip {
    background: var(--bg-card);
    padding: 7px 12px;
    font-size: 12px;
  }
}

.exam-target-btn:hover:not(:disabled),
.exam-filter-chip:hover {
  border-color: #14634C;
}

.exam-target-btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.exam-filter-chip.active {
  background: #0F4C3A;
  border-color: #0F4C3A;
  color: #FDE68A;
}

.exam-advanced-details {
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 9px 12px;
  background: var(--bg-subtle);
}

.exam-advanced-summary {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.exam-advanced-summary::-webkit-details-marker {
  display: none;
}

.exam-advanced-title {
  font-family: "Prompt", sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
}

.exam-settings-pill {
  padding: 2px 8px;
  border-radius: 9999px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: "Prompt", sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.exam-history-more-btn {
  list-style: none;
  cursor: pointer;
  font-family: "Prompt", sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  padding: 2px 4px;
  user-select: none;
}

.exam-history-more-btn::-webkit-details-marker {
  display: none;
}

.exam-runner-head {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@media (min-width: 640px) {
  .exam-runner-head {
    padding: 12px 16px;
    gap: 10px;
  }
}

.exam-runner-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.exam-timer-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid #A7F3D0;
  background: #ECFDF5;
  color: #065F46;
  font-family: "Prompt", sans-serif;
  font-size: 11.5px;
  font-weight: 800;
  white-space: nowrap;
}

.exam-timer-pill.is-timed {
  background: #ECFDF5;
  border-color: #FECDD3;
  color: #0F4C3A;
}

.exam-timer-pill.is-urgent {
  background: #FEE2E2;
  border-color: #FCA5A5;
  color: #991B1B;
}

.exam-runner-actions-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 5px;
  width: 100%;
}

.exam-act-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 8px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  color: var(--text-main);
  font-family: "Prompt", sans-serif;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.exam-act-chip--flag.is-flagged {
  background: #FBBF24;
  border-color: #D4AF37;
  color: #0F172A;
}

.exam-act-chip--cancel {
  color: #0D7A5B;
}

.exam-act-finish {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 8px;
  border: none;
  background: #0F4C3A;
  color: #FEF3C7;
  font-family: "Prompt", sans-serif;
  font-size: 11.5px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.exam-runner-track {
  width: 100%;
  height: 5px;
  border-radius: 9999px;
  background: var(--bg-subtle);
  overflow: hidden;
}

.exam-setting-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

@media (min-width: 768px) {
  .exam-setting-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
}

.exam-setting-label {
  font-family: "Prompt", sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.exam-seg-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.exam-seg-btn {
  padding: 6px 11px;
  border-radius: 9px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-main);
  font-family: "Prompt", sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.14s ease;
}

.exam-seg-btn.active {
  background: #0F4C3A;
  border-color: #0F4C3A;
  color: #FEF3C7;
  font-weight: 700;
}

.exam-flow-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  box-shadow: 0 4px 12px -10px rgba(15, 23, 42, 0.25);
}

.exam-flow-bar .exam-seg-group {
  flex-wrap: nowrap;
  gap: 4px;
}

.exam-flow-bar .exam-seg-btn {
  padding: 5px 8px;
  font-size: 11px;
  white-space: nowrap;
}

.exam-autoadv-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 9999px;
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-subtle);
  color: var(--text-main);
  font-family: "Prompt", sans-serif;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}

.exam-autoadv-switch.is-on {
  border-color: rgba(5, 150, 105, 0.45);
  background: rgba(16, 185, 129, 0.12);
  color: #065F46;
}

body[data-theme="dark"] .exam-autoadv-switch.is-on {
  color: #6EE7B7;
  border-color: rgba(52, 211, 153, 0.45);
}

.exam-autoadv-switch.is-dimmed {
  opacity: 0.65;
}

.exam-autoadv-dot {
  width: 9px;
  height: 9px;
  border-radius: 9999px;
  background: #94A3B8;
  transition: background 0.15s ease;
}

.exam-autoadv-switch.is-on .exam-autoadv-dot {
  background: #10B981;
}

.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);
}

.is-blurred-pause {
  filter: blur(8px);
  pointer-events: none;
  user-select: none;
}

.exam-nav-grid-scroll {
  max-height: 184px;
  overflow-y: auto;
  padding-right: 2px;
}

@media (min-width: 1024px) {
  .exam-nav-grid-scroll {
    max-height: 290px;
  }
}

.exam-cell {
  padding: 6px 2px;
  border-radius: 8px;
  font-family: "Prompt", sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-subtle);
  color: var(--text-main);
  cursor: pointer;
  text-align: center;
  transition: all 0.12s ease;
}

.exam-cell.is-answered {
  background: #DCFCE7;
  border-color: #86EFAC;
  color: #166534;
}

.exam-cell.is-correct {
  background: #D1FAE5;
  border-color: #34D399;
  color: #065F46;
}

.exam-cell.is-wrong {
  background: #FEE2E2;
  border-color: #FCA5A5;
  color: #991B1B;
}

.exam-cell.is-flagged {
  background: #FEF3C7;
  border-color: #D4AF37;
  color: #92400E;
}

.exam-cell.is-current {
  background: #0F4C3A !important;
  border-color: #0F4C3A !important;
  color: #FDE68A !important;
  box-shadow: 0 2px 8px rgba(15, 76, 58, 0.35);
}

body[data-theme="dark"] .exam-cell.is-answered,
body[data-theme="dark"] .exam-cell.is-correct {
  background: rgba(16, 185, 129, 0.25);
  border-color: rgba(52, 211, 153, 0.5);
  color: #A7F3D0;
}

body[data-theme="dark"] .exam-cell.is-wrong {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(248, 113, 113, 0.5);
  color: #FECACA;
}

body[data-theme="dark"] .exam-cell.is-flagged {
  background: rgba(212, 175, 55, 0.28);
  border-color: rgba(251, 191, 36, 0.6);
  color: #FDE68A;
}

.exam-chunk-btn {
  padding: 4px 8px;
  border-radius: 7px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-family: "Prompt", sans-serif;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.exam-chunk-btn.active {
  background: #0F4C3A;
  border-color: #0F4C3A;
  color: #FEF3C7;
}

/* Scorecard Gauge & 3-Second Diagnostic */
.scorecard-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.scorecard-hero-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.scorecard-donut-wrap {
  position: relative;
  width: 92px;
  height: 92px;
  margin: 0;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .scorecard-hero-grid {
    grid-template-columns: 152px minmax(0, 1fr);
    gap: 24px;
  }
  .scorecard-hero-head {
    justify-content: center;
  }
  .scorecard-donut-wrap {
    width: 140px;
    height: 140px;
    margin: 0 auto;
  }
}

.scorecard-donut-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.scorecard-donut-bg {
  fill: none;
  stroke: var(--border-subtle);
  stroke-width: 3.4;
}

.scorecard-donut-fill {
  fill: none;
  stroke-width: 3.4;
  stroke-linecap: round;
}

.scorecard-donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.sw-3sec-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

@media (min-width: 768px) {
  .sw-3sec-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.sw-diag-card {
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  padding: 12px 14px;
  background: var(--bg-subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sw-diag-card.is-strength {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.08);
}

.sw-diag-card.is-moderate {
  border-color: rgba(212, 175, 55, 0.5);
  background: rgba(212, 175, 55, 0.09);
}

.sw-diag-card.is-weakness {
  border-color: rgba(15, 76, 58, 0.4);
  background: rgba(15, 76, 58, 0.07);
}

.exam-meter {
  width: 100%;
  height: 6px;
  border-radius: 9999px;
  background: rgba(148, 163, 184, 0.25);
  overflow: hidden;
}

.exam-meter-fill {
  height: 100%;
  border-radius: 9999px;
}

.exam-history-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
}

.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: #D4AF37;
  box-shadow: 0 12px 26px -12px rgba(212, 175, 55, 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(212, 175, 55, 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: rdMarqueeScroll 46s linear infinite;
}

.reviews-marquee-viewport:hover .reviews-marquee-track {
  animation-play-state: paused;
}

@keyframes rdMarqueeScroll {
  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(15, 76, 58, 0.45);
  border-color: rgba(251, 191, 36, 0.55);
}

/* ============================================================================
   DARK & SEPIA UTILITY CONTRAST OVERRIDES
   ============================================================================ */
body[data-theme="dark"] .exam-tier-card--subject {
  background: linear-gradient(135deg, rgba(15, 76, 58, 0.35), rgba(30, 41, 59, 0.9));
  border-color: rgba(251, 113, 133, 0.4);
}

body[data-theme="dark"] .exam-tier-card--subject .exam-tier-title {
  color: #FECDD3 !important;
}

body[data-theme="dark"] .exam-tier-card--all {
  background: linear-gradient(135deg, rgba(180, 83, 9, 0.32), rgba(30, 41, 59, 0.9));
  border-color: rgba(212, 175, 55, 0.55);
}

body[data-theme="dark"] .exam-tier-card--all .exam-tier-title {
  color: #FDE68A !important;
}

body[data-theme="sepia"] .exam-resume-card {
  background: linear-gradient(135deg, #FBF2DA 0%, #F7E5B7 100%);
  border-color: #D97706;
}

body[data-theme="dark"] .exam-resume-card {
  background: linear-gradient(135deg, rgba(120, 53, 15, 0.44) 0%, rgba(146, 64, 14, 0.34) 100%) !important;
  border-color: #D4AF37 !important;
}

body[data-theme="dark"] .exam-resume-title {
  color: #FDE68A !important;
}

body[data-theme="dark"] .exam-resume-meta {
  color: #FEF3C7 !important;
}

body[data-theme="dark"] .exam-resume-secondary-btn {
  background: #1E293B;
  border-color: #475569;
  color: #E2E8F0;
}

body[data-theme="dark"] .exam-access-pill {
  background: rgba(15, 76, 58, 0.35);
  border-color: rgba(251, 113, 133, 0.4);
  color: #FDE68A;
}

body[data-theme="dark"] .exam-timer-pill {
  background: rgba(6, 78, 59, 0.42);
  border-color: rgba(52, 211, 153, 0.45);
  color: #6EE7B7;
}

body[data-theme="dark"] .exam-timer-pill.is-timed,
body[data-theme="dark"] .exam-timer-pill.is-urgent {
  background: rgba(15, 76, 58, 0.45);
  border-color: rgba(251, 113, 133, 0.5);
  color: #FECDD3;
}

body[data-theme="dark"] .exam-act-chip--cancel {
  color: #6EE7B7;
}

body[data-theme="dark"] .exam-mode-seg,
body[data-theme="dark"] .exam-size-seg {
  background: #0F172A;
  border-color: #334155;
}

body[data-theme="dark"] .exam-mode-btn,
body[data-theme="dark"] .exam-size-btn {
  color: #CBD5E1;
}

body[data-theme="dark"] .exam-mode-btn.active,
body[data-theme="dark"] .exam-size-btn.active {
  background: #0F4C3A;
  color: #FDE68A;
}

body[data-theme="dark"] #exam-batch-progress-hint,
body[data-theme="dark"] #btn-reset-batch-cursor {
  color: #FDE68A !important;
}

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\/80,
body[data-theme="dark"] .bg-slate-50\/90,
body[data-theme="dark"] .bg-slate-100,
body[data-theme="dark"] .bg-white,
body[data-theme="dark"] .bg-white\/75,
body[data-theme="dark"] .bg-white\/80 {
  background-color: #1E293B !important;
  color: #F1F5F9 !important;
}

body[data-theme="dark"] .bg-slate-200 {
  background-color: #334155 !important;
  color: #F8FAFC !important;
}

body[data-theme="dark"] .solution-bottom-box .bg-amber-50,
body[data-theme="dark"] #exam-result-panel .bg-amber-50 {
  background-color: rgba(120, 53, 15, 0.34) !important;
  border-color: rgba(212, 175, 55, 0.45) !important;
  color: #FEF3C7 !important;
}

body[data-theme="dark"] .solution-bottom-box .bg-amber-50 strong,
body[data-theme="dark"] #exam-result-panel .bg-amber-50 strong {
  color: #FDE68A !important;
}

body[data-theme="dark"] #exam-result-panel .bg-rose-50 {
  background-color: rgba(20, 99, 76, 0.34) !important;
  border-color: rgba(251, 113, 133, 0.45) !important;
  color: #FECDD3 !important;
}

body[data-theme="dark"] #vip-consent-error {
  color: #6EE7B7 !important;
}

body[data-theme="dark"] .border-slate-200,
body[data-theme="dark"] .border-slate-200\/70,
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"] .exam-select,
body[data-theme="dark"] .seq-law-select,
body[data-theme="dark"] .seq-subtopic-select,
body[data-theme="dark"] .pg-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23CBD5E1' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !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-pass-modal > div,
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 #D4AF37;
  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 #D4AF37;
  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;
}

@media (max-width: 639px) {
  .store-pkg-card.is-pos-coming-soon {
    padding: 11px 13px;
    gap: 6px;
  }
  .store-pkg-card-head-soon {
    margin-bottom: 0;
  }
}

.vip-pkg-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.vip-pkg-open {
  grid-column: 1 / -1;
}

.vip-pkg-soon {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 3px;
  padding: 6px 7px;
  border-radius: 10px;
  border: 1px dashed #CBD5E1;
  background: var(--bg-subtle);
  text-align: left;
  min-width: 0;
}

.pos-soon-badge-xs {
  display: inline-flex;
  align-items: center;
  padding: 1px 5px;
  border-radius: 999px;
  font-family: "Prompt", sans-serif;
  font-size: 9.5px;
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
  color: #78350F;
  background: #FEF3C7;
  border: 1px solid #D4AF37;
}

body[data-theme="dark"] .vip-pkg-soon {
  background: rgba(30, 41, 59, 0.72);
  border-color: rgba(148, 163, 184, 0.35);
}

body[data-theme="dark"] .pos-soon-badge-xs {
  color: #FDE68A;
  background: rgba(120, 53, 15, 0.85);
  border-color: rgba(251, 191, 36, 0.65);
}

.review-stars {
  color: #D4AF37;
  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: #ECFDF5;
  border-color: #E11D48;
  box-shadow: 0 0 0 3px rgba(15, 76, 58, 0.14);
}

body[data-theme="dark"] .vip-consent-box {
  background: rgba(120, 53, 15, 0.28);
  border-color: rgba(212, 175, 55, 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(15, 76, 58, 0.35);
  border-color: #34D399;
}

.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: #0A382B;
  flex-shrink: 0;
  cursor: pointer;
}

.vip-policy-link {
  color: #14634C;
  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
   ============================================================================ */
.rd-qr-payment-layout {
  display: grid;
  grid-template-columns: minmax(220px, 256px) 1fr;
  gap: 1rem;
  align-items: stretch;
}

@media (max-width: 639px) {
  .rd-qr-payment-layout {
    grid-template-columns: 1fr;
  }
}

.rd-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);
}

.rd-qr-card-head {
  background: linear-gradient(135deg, #0B3B68 0%, #102A43 100%);
  color: #FFFFFF;
  padding: 0.65rem 0.85rem;
  text-align: center;
}

.rd-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;
}

.rd-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;
}

@media (max-width: 639px) {
  .rd-qr-card-body {
    padding: 0.7rem 0.85rem;
    gap: 0.4rem;
  }
  .rd-qr-icon-badge {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.65rem;
  }
}

.rd-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;
}

.rd-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;
}

.rd-qr-detail-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.rd-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;
}

@media (max-width: 639px) {
  .rd-qr-detail-panel {
    padding: 0.65rem 0.8rem;
  }
  .rd-qr-detail-list {
    gap: 0.3rem;
  }
  .rd-qr-detail-row {
    gap: 0.2rem 0.5rem;
    padding-bottom: 0.3rem;
    font-size: 0.74rem;
    line-height: 1.35;
  }
}

.rd-qr-detail-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.rd-qr-detail-label {
  color: #64748B;
  font-weight: 600;
  white-space: nowrap;
}

.rd-qr-detail-val {
  color: #0F172A;
  font-weight: 700;
  text-align: right;
  flex: 1 1 auto;
}

.stripe-pulse-dot {
  width: 0.6rem;
  min-width: 0.6rem;
  height: 0.6rem;
  min-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); }
}

.rd-qr-spinner {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  border: 3px solid #E2E8F0;
  border-top-color: #14634C;
  animation: rdQrSpin 0.8s linear infinite;
}

@keyframes rdQrSpin {
  to { transform: rotate(360deg); }
}

body[data-theme="dark"] #vip-customer-email-input,
body[data-theme="dark"] #vip-modal-recover-email,
body[data-theme="dark"] #vip-modal-recover-ref,
body[data-theme="dark"] #vip-pass-recover-email,
body[data-theme="dark"] #vip-pass-recover-ref {
  background-color: #1E293B !important;
  border-color: #475569 !important;
  color: #F8FAFC !important;
}

body[data-theme="dark"] #vip-modal-recovery-details summary,
body[data-theme="dark"] #vip-pass-recovery-details summary {
  color: #FCD34D !important;
}

/* Sepia & Dark Contrast Overrides for Checkout & Consent Modals */
body[data-theme="sepia"] .rd-qr-card-frame,
body[data-theme="sepia"] .rd-qr-detail-panel {
  background: #FFFDF8;
  border-color: #DECBB4;
}

body[data-theme="sepia"] .rd-qr-card-foot {
  background: #F5F0E6;
  border-top-color: #DECBB4;
}

body[data-theme="dark"] .rd-qr-card-frame,
body[data-theme="dark"] .rd-qr-detail-panel {
  background: #0F172A !important;
  border-color: #334155 !important;
}

body[data-theme="dark"] .rd-qr-card-foot {
  background: #1E293B !important;
  border-top-color: #334155 !important;
  color: #CBD5E1 !important;
}

body[data-theme="dark"] .rd-qr-icon-badge {
  background: #1E293B !important;
  border-color: #475569 !important;
  color: #93C5FD !important;
}

body[data-theme="dark"] .rd-qr-detail-row {
  border-bottom-color: #334155 !important;
}

body[data-theme="dark"] .rd-qr-detail-label {
  color: #94A3B8 !important;
}

body[data-theme="dark"] .rd-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-receipt-card .bg-white\/80 {
  background-color: rgba(15, 23, 42, 0.72) !important;
  border-color: rgba(16, 185, 129, 0.42) !important;
  color: #ECFDF5 !important;
}

body[data-theme="dark"] #vip-receipt-card .bg-white\/80 code {
  color: #FDE68A !important;
}

body[data-theme="dark"] #vip-pkg-grid .vip-pkg-card:not(.is-pos-coming-soon) {
  background-color: #1E293B !important;
  border-color: #D4AF37 !important;
}

body[data-theme="dark"] #purchase-consent-modal .bg-slate-50 {
  background-color: #1E293B !important;
  border-color: #334155 !important;
  color: #E2E8F0 !important;
}

body[data-theme="dark"] #btn-stripe-checkout {
  background: linear-gradient(90deg, #0F4C3A 0%, #14634C 100%) !important;
  color: #FDE68A !important;
  border-color: rgba(251, 191, 36, 0.55) !important;
}

#btn-stripe-checkout[data-inapp-locked="1"] {
  background: #E2E8F0 !important;
  color: #475569 !important;
  border-color: #CBD5E1 !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
}

body[data-theme="dark"] #btn-stripe-checkout[data-inapp-locked="1"] {
  background: #1E293B !important;
  color: #94A3B8 !important;
  border-color: #475569 !important;
}

/* =========================================================
   IN-APP BROWSER ADVISORY BANNER & HARD-GUARD (FBAN / LINE)
   ========================================================= */
.inapp-advisory-bar {
  background: #FFFDF7;
  border-bottom: 1px solid #F3D59B;
  color: #451A03;
  box-shadow: 0 2px 6px rgba(15, 76, 58, 0.06);
  position: relative;
  z-index: 20;
}

.inapp-advisory-bar.hidden,
.inapp-btn-external.hidden,
.inapp-ios-hint.hidden,
.inapp-copy-feedback.hidden {
  display: none !important;
}

.inapp-advisory-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "msg close"
    "actions actions";
  align-items: start;
  gap: 6px 8px;
  padding: 7px 12px;
}

@media (min-width: 768px) {
  .inapp-advisory-inner {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas: "msg actions close";
    align-items: center;
    gap: 12px;
    padding: 8px 24px;
  }
}

.inapp-advisory-msg {
  grid-area: msg;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
  font-size: 11.5px;
  line-height: 1.4;
  color: #451A03;
}

.inapp-advisory-icon {
  flex-shrink: 0;
  color: #B45309;
  margin-top: 1px;
  display: inline-flex;
}

.inapp-advisory-text {
  min-width: 0;
  overflow-wrap: break-word;
}

.inapp-app-highlight {
  color: #0F4C3A;
  font-weight: 700;
}

.inapp-advisory-actions {
  grid-area: actions;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.inapp-btn-external {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 11px;
  border-radius: 8px;
  border: 1px solid #047857;
  background: #047857;
  color: #FFFFFF;
  font-family: "Prompt", "Sarabun", sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.12s ease;
}

.inapp-btn-external:hover {
  background: #065F46;
  transform: translateY(-1px);
}

.inapp-btn-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid #D97706;
  background: #FEF3C7;
  color: #78350F;
  font-family: "Prompt", "Sarabun", sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.12s ease;
}

.inapp-btn-copy:hover {
  background: #FDE68A;
}

#inapp-browser-banner .inapp-btn-external.hidden + .inapp-btn-copy {
  border-color: #0F4C3A;
  background: #0F4C3A;
  color: #FFFBEB;
}

#inapp-browser-banner .inapp-btn-external.hidden + .inapp-btn-copy:hover {
  background: #14634C;
}

.inapp-ios-hint {
  font-size: 11px;
  color: #78350F;
  line-height: 1.3;
}

.inapp-copy-feedback {
  font-size: 11px;
  font-weight: 700;
  color: #065F46;
  white-space: nowrap;
}

.inapp-close-btn {
  grid-area: close;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid rgba(180, 83, 9, 0.22);
  background: rgba(180, 83, 9, 0.08);
  color: #78350F;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}

.inapp-close-btn:hover {
  background: rgba(180, 83, 9, 0.16);
  color: #451A03;
}

body[data-theme="sepia"] .inapp-advisory-bar {
  background: #FBF3DF;
  border-bottom-color: #E2BE79;
}

body[data-theme="sepia"] #vip-inapp-warning,
body[data-theme="sepia"] #vip-pass-inapp-warning {
  background-color: #ECFDF5;
  border-color: #E11D48;
}

body[data-theme="dark"] .inapp-advisory-bar {
  background: linear-gradient(90deg, #09261E 0%, #071D17 100%) !important;
  border-bottom-color: rgba(251, 191, 36, 0.38) !important;
  color: #FEF3C7 !important;
}

body[data-theme="dark"] .inapp-advisory-msg {
  color: #FEF3C7 !important;
}

body[data-theme="dark"] .inapp-advisory-icon,
body[data-theme="dark"] .inapp-app-highlight {
  color: #FCD34D !important;
}

body[data-theme="dark"] .inapp-ios-hint {
  color: #FDE68A !important;
}

body[data-theme="dark"] .inapp-copy-feedback {
  color: #6EE7B7 !important;
}

body[data-theme="dark"] #inapp-browser-banner .inapp-btn-copy {
  background: rgba(251, 191, 36, 0.16) !important;
  border-color: rgba(251, 191, 36, 0.55) !important;
  color: #FDE68A !important;
}

body[data-theme="dark"] #inapp-browser-banner .inapp-btn-external.hidden + .inapp-btn-copy {
  background: #FBBF24 !important;
  border-color: #FBBF24 !important;
  color: #0F172A !important;
}

body[data-theme="dark"] .inapp-close-btn {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: #FDE68A !important;
}

body[data-theme="dark"] #vip-inapp-warning,
body[data-theme="dark"] #vip-inapp-warning *,
body[data-theme="dark"] #vip-pass-inapp-warning,
body[data-theme="dark"] #vip-pass-inapp-warning * {
  color: #D1FAE5 !important;
}

body[data-theme="dark"] #vip-inapp-warning,
body[data-theme="dark"] #vip-pass-inapp-warning {
  background-color: rgba(15, 76, 58, 0.45) !important;
  border-color: #34D399 !important;
}

body[data-theme="dark"] #btn-vip-inapp-copy-url,
body[data-theme="dark"] #btn-vip-pass-inapp-copy-url {
  background-color: #D4AF37 !important;
  color: #0F172A !important;
}

body[data-theme="dark"] #btn-inapp-open-external,
body[data-theme="dark"] #btn-vip-inapp-open-external,
body[data-theme="dark"] #btn-vip-pass-inapp-open-external {
  background-color: #059669 !important;
  color: #FFFFFF !important;
}

/* =========================================================
   TAB 2 SMART RESUME, SUB-TOPIC TOC, PIN & BACK-TO-TOP
   ========================================================= */
.seq-subtopic-row.hidden,
.seq-resume-bar.hidden {
  display: none !important;
}

.seq-subtopic-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.seq-subtopic-select {
  flex: 1 1 200px;
  min-width: 0;
  max-width: 100%;
  padding: 7px 34px 7px 10px;
  border-radius: 10px;
  border: 1.5px solid var(--border-subtle);
  background-color: var(--bg-card);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px 14px;
  -webkit-appearance: none;
  appearance: none;
  text-overflow: ellipsis;
  color: var(--text-main);
  font-family: "Prompt", "Sarabun", sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.seq-subtopic-select:focus {
  outline: none;
  border-color: #14634C;
}

body[data-theme="dark"] .seq-subtopic-select {
  background: #0F172A;
  color: #F8FAFC;
  border-color: #334155;
}

.seq-resume-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 10px 13px;
  border-radius: 13px;
  border: 1.5px solid #D4AF37;
  background: linear-gradient(90deg, #FFFBEB 0%, #FEF3C7 100%);
  color: #451A03;
  box-shadow: 0 4px 12px -6px rgba(180, 83, 9, 0.28);
}

.seq-resume-meta {
  min-width: 0;
  flex: 1 1 220px;
}

.seq-resume-title {
  font-family: "Prompt", sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.35;
}

.seq-resume-sub {
  font-size: 11.5px;
  opacity: 0.9;
  line-height: 1.35;
  margin-top: 2px;
}

.seq-resume-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.seq-resume-jump-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 9px;
  border: none;
  background: #0F4C3A;
  color: #FEF3C7;
  font-family: "Prompt", sans-serif;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.14s ease, background-color 0.15s ease;
}

.seq-resume-jump-btn:hover {
  background: #0A382B;
  transform: translateY(-1px);
}

.seq-resume-clear-btn {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 8px;
  border: 1px solid rgba(120, 53, 15, 0.3);
  background: rgba(255, 255, 255, 0.72);
  color: #78350F;
  font-family: "Prompt", sans-serif;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.seq-resume-clear-btn:hover {
  background: #FFFFFF;
}

body[data-theme="sepia"] .seq-resume-bar {
  background: linear-gradient(90deg, #FBF2DA 0%, #F7E5B7 100%);
  border-color: #D97706;
}

body[data-theme="dark"] .seq-resume-bar {
  background: linear-gradient(90deg, rgba(120, 53, 15, 0.42) 0%, rgba(146, 64, 14, 0.34) 100%) !important;
  border-color: #D4AF37 !important;
  color: #FDE68A !important;
}

body[data-theme="dark"] .seq-resume-jump-btn {
  background: #FBBF24;
  color: #0F172A;
}

body[data-theme="dark"] .seq-resume-jump-btn:hover {
  background: #D4AF37;
}

body[data-theme="dark"] .seq-resume-clear-btn {
  background: rgba(15, 23, 42, 0.65);
  border-color: rgba(251, 191, 36, 0.4);
  color: #FDE68A;
}

.q-pin-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-pin-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.q-pin-btn.is-pinned {
  background: #10B981;
  border-color: #059669;
  color: #052E16;
  font-weight: 800;
}

@keyframes qJumpPulse {
  0% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.72); }
  55% { box-shadow: 0 0 0 8px rgba(212, 175, 55, 0.18); }
  100% { box-shadow: 0 0 0 3px #D4AF37, 0 14px 28px -10px rgba(212, 175, 55, 0.42); }
}

.q-card-jump-highlight {
  border-color: #D4AF37 !important;
  box-shadow: 0 0 0 3px #D4AF37, 0 14px 28px -10px rgba(212, 175, 55, 0.42) !important;
  animation: qJumpPulse 0.9s ease-out 1;
}

.pg-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  max-width: 100%;
}

.pg-nav-btn {
  padding: 6px 10px;
  border-radius: 9px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-main);
  font-family: "Prompt", sans-serif;
  font-weight: 600;
  font-size: 11.5px;
  white-space: nowrap;
  cursor: pointer;
}

.pg-nav-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.pg-select {
  padding: 6px 28px 6px 8px;
  border-radius: 9px;
  border: 1.5px solid var(--border-subtle);
  background-color: var(--bg-card);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 12px 12px;
  -webkit-appearance: none;
  appearance: none;
  text-overflow: ellipsis;
  color: var(--text-main);
  font-family: "Prompt", sans-serif;
  font-weight: 700;
  font-size: 11.5px;
  max-width: 210px;
  cursor: pointer;
}

@media (max-width: 639px) {
  #pagination-top,
  #pagination-bottom {
    width: 100%;
  }
  .pg-bar {
    flex-wrap: nowrap;
    width: 100%;
    gap: 5px;
  }
  .pg-nav-btn {
    padding: 6px 9px;
    flex-shrink: 0;
  }
  .pg-select {
    flex: 1 1 0%;
    min-width: 0;
    max-width: none;
    padding: 6px 26px 6px 8px;
    background-position: right 7px center;
  }
  .pg-jump-wrap {
    flex-shrink: 0;
    gap: 4px;
  }
  .pg-jump-input {
    width: 54px;
    padding: 5px 4px;
  }
  .pg-jump-btn {
    padding: 6px 9px;
  }
}

.pg-jump-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pg-jump-input {
  width: 74px;
  padding: 5px 7px;
  border-radius: 9px;
  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;
  text-align: center;
}

.pg-jump-btn {
  padding: 5px 10px;
  border-radius: 9px;
  border: none;
  background: #0F4C3A;
  color: #FEF3C7;
  font-family: "Prompt", sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

body[data-theme="dark"] .pg-jump-btn {
  background: #D4AF37;
  color: #0F172A;
}

.back-to-top-btn {
  position: fixed;
  right: 14px;
  bottom: calc(78px + env(safe-area-inset-bottom, 0px));
  z-index: 44;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 13px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0F4C3A 0%, #06281E 100%);
  color: #FEF3C7;
  border: 1.5px solid rgba(251, 191, 36, 0.72);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.35);
  font-family: "Prompt", sans-serif;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.back-to-top-btn:hover {
  transform: translateY(-2px);
}

@media (min-width: 768px) {
  .back-to-top-btn {
    right: 22px;
    bottom: 24px;
    padding: 9px 15px;
  }
}

@media (max-width: 639px) {
  .back-to-top-btn {
    width: 38px;
    height: 38px;
    padding: 0;
    justify-content: center;
    right: 10px;
    bottom: calc(74px + env(safe-area-inset-bottom, 0px));
    opacity: 0.92;
  }
}

.back-to-top-btn.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px);
}

body[data-theme="dark"] .back-to-top-btn {
  background: linear-gradient(135deg, #D4AF37 0%, #D97706 100%);
  color: #0F172A;
  border-color: #FEF3C7;
}

/* =========================================================
   DEDICATED "ทำต่อที่ค้างไว้" BUTTONS (TAB 1 HOME & TAB 2 HUB)
   ========================================================= */
.home-continue-bar.hidden {
  display: none !important;
}

.home-continue-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1.5px solid #D4AF37;
  background: linear-gradient(90deg, #FFFBEB 0%, #FEF3C7 100%);
  color: #451A03;
  box-shadow: 0 6px 16px -10px rgba(180, 83, 9, 0.35);
}

.home-continue-meta {
  min-width: 0;
  flex: 1 1 220px;
}

.home-continue-title {
  font-family: "Prompt", sans-serif;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.35;
}

.home-continue-sub {
  font-size: 11.5px;
  opacity: 0.9;
  margin-top: 2px;
  line-height: 1.35;
}

.home-continue-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.home-continue-seq-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #059669, #047857);
  color: #FFFFFF;
  font-family: "Prompt", sans-serif;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 3px 10px -4px rgba(5, 150, 105, 0.55);
  transition: transform 0.14s ease, filter 0.14s ease;
}

.home-continue-seq-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.home-continue-exam-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border-radius: 10px;
  border: 1px solid rgba(15, 76, 58, 0.3);
  background: #0F4C3A;
  color: #FEF3C7;
  font-family: "Prompt", sans-serif;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.14s ease, background-color 0.14s ease;
}

.home-continue-exam-btn:hover {
  background: #0A382B;
  transform: translateY(-1px);
}

body[data-theme="sepia"] .home-continue-bar {
  background: linear-gradient(90deg, #FBF2DA 0%, #F7E5B7 100%);
  border-color: #D97706;
}

body[data-theme="dark"] .home-continue-bar {
  background: linear-gradient(90deg, rgba(120, 53, 15, 0.44) 0%, rgba(146, 64, 14, 0.34) 100%) !important;
  border-color: #D4AF37 !important;
  color: #FDE68A !important;
}

body[data-theme="dark"] .home-continue-exam-btn {
  background: #FBBF24;
  color: #0F172A;
  border-color: #D4AF37;
}

.subject-continue-pill {
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 9999px;
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid rgba(5, 150, 105, 0.35);
  font-family: "Prompt", sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.subject-continue-pill:hover {
  transform: translateY(-1px);
  filter: brightness(0.97);
}

body[data-theme="dark"] .subject-continue-pill {
  background: rgba(5, 150, 105, 0.32);
  color: #A7F3D0;
  border-color: rgba(52, 211, 153, 0.45);
}

.seq-btn-continue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 9px 11px;
  border-radius: 11px;
  border: 1.5px solid #059669;
  background: linear-gradient(135deg, #10B981, #059669);
  color: #FFFFFF;
  font-family: "Prompt", sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  cursor: pointer;
  box-shadow: 0 3px 10px -4px rgba(5, 150, 105, 0.5);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.seq-btn-continue:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.seq-btn-continue.has-progress {
  box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.65), 0 4px 12px -4px rgba(5, 150, 105, 0.55);
}

body[data-theme="dark"] .seq-btn-continue {
  background: linear-gradient(135deg, #059669, #047857);
  border-color: #34D399;
  color: #ECFDF5;
}

/* =========================================================
   MOBILE TYPOGRAPHY & CONCISE LINE-WRAPPING POLISH (v21)
   ========================================================= */
@media (max-width: 639px) {
  .pos-card-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .subject-zone-head {
    gap: 3px;
    padding: 8px 11px;
  }
  .subject-clean-row {
    padding: 8px 10px;
    gap: 6px;
  }
  .subject-clean-main {
    gap: 8px;
  }
  .subject-code-pill {
    min-width: 30px;
    height: 22px;
    padding: 0 5px;
    font-size: 11px;
  }
  .subject-clean-title {
    font-size: 12.5px;
    line-height: 1.32;
  }
  .subject-quiz-pill {
    padding: 4px 9px;
    font-size: 11px;
  }
  .subject-chevron-btn {
    display: none;
  }
  .home-continue-title,
  .seq-resume-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .hero-stat-num,
  .hero-stat-sub {
    white-space: nowrap;
  }
  #locked-pos-drawer .pos-drawer-item.is-pos-coming-soon {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 3px;
    padding: 7px 9px;
  }
  #locked-pos-drawer .pos-drawer-item.is-pos-coming-soon .pos-soon-badge-sm {
    font-size: 9.5px;
    padding: 1px 6px;
  }
  .exam-setup-head {
    padding-bottom: 4px;
  }
  .exam-setup-card {
    padding: 10px 11px !important;
    gap: 5px !important;
  }
  .exam-config-grid {
    gap: 6px !important;
  }
  .exam-select {
    padding: 7px 34px 7px 10px;
  }
  .exam-mode-btn {
    padding: 5px 5px;
    font-size: 11.5px;
  }
  .exam-size-btn {
    padding: 4.5px 4px;
    font-size: 11.5px;
  }
  .exam-tier-card {
    padding: 7.5px 10px;
  }
  .exam-target-btn,
  .exam-filter-chip {
    padding: 4.5px 8px;
    font-size: 11.5px;
  }
  .exam-advanced-details {
    padding: 6px 10px;
  }
  .brand-mark svg {
    width: 26px;
    height: 26px;
  }
  .header-brand-title {
    font-size: 11.5px !important;
  }
  .header-actions-wrap {
    gap: 4px !important;
  }
  .header-vip-pill {
    padding: 4.5px 9px;
    font-size: 11px;
  }
  .header-updates-btn {
    padding: 5px 6.5px;
  }
  .settings-pill-btn {
    padding: 5px 7.5px;
    font-size: 11px;
  }
}

@media (max-width: 389px) {
  .brand-mark svg {
    width: 24px;
    height: 24px;
  }
  .header-brand-title {
    font-size: 10.6px !important;
  }
  .header-vip-pill {
    padding: 4.5px 8px;
    font-size: 11px;
    gap: 3px;
  }
  .header-updates-btn {
    padding: 4.5px 6px;
  }
  .settings-pill-btn {
    padding: 4.5px 7px;
    font-size: 11px;
  }
  #home-hero-title {
    font-size: 1.03rem !important;
  }
  .hero-stat-tile {
    padding: 0.38rem 0.35rem;
  }
  .hero-stat-num {
    font-size: 0.86rem;
  }
}

@media (max-width: 359px) {
  .app-header > div {
    padding-left: 8px !important;
    padding-right: 8px !important;
    gap: 4px !important;
  }
  .app-header > div > button {
    gap: 5px !important;
  }
  .brand-mark svg {
    width: 21px;
    height: 21px;
  }
  .header-brand-title {
    font-size: 9.8px !important;
    letter-spacing: -0.02em;
  }
  .header-actions-wrap {
    gap: 3px !important;
  }
  .header-vip-pill {
    padding: 3.5px 5.5px;
    font-size: 9.8px;
    gap: 2.5px;
  }
  .header-vip-pill svg {
    width: 10.5px;
    height: 10.5px;
  }
  .header-updates-btn {
    padding: 3.5px 4.5px;
  }
  .settings-pill-btn {
    padding: 3.5px 5px;
    font-size: 10px;
  }
  #home-hero-title {
    font-size: 0.94rem !important;
  }
}

/* ============================================================================
   ROUND 61 + V49 RESPONSIVE DROPDOWNS, WEB ALERT BANNER & CHANGELOG STRIP
   ============================================================================ */
.updates-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.updates-panel-head > div {
  min-width: 0;
  flex: 1 1 auto;
}

.updates-panel-title {
  font-family: "Prompt", sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
  white-space: normal;
  overflow-wrap: break-word;
}

.updates-panel-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.updates-panel-item {
  padding: 9px 11px;
  border-radius: 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  box-sizing: border-box;
}

.updates-panel-item-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 11px;
  min-width: 0;
}

.updates-panel-item-title {
  font-family: "Prompt", sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--text-main);
  min-width: 0;
}

.updates-panel-item-detail {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
  min-width: 0;
}

.updates-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: "Prompt", sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  background: #D1FAE5;
  color: #0F4C3A;
}

.updates-badge.is-emerald {
  background: #D1FAE5;
  color: #065F46;
}

.updates-badge.is-amber {
  background: #FEF3C7;
  color: #92400E;
}

.updates-panel-jump {
  align-self: flex-start;
  margin-top: 2px;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  font-family: "Prompt", sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  max-width: 100%;
  white-space: normal;
  text-align: left;
  line-height: 1.4;
}

/* Web Alert Banner (Below Sticky Header) */
.rd-web-alert-inner {
  max-width: 1280px;
  margin: 8px auto 0;
  padding: 0 12px;
  box-sizing: border-box;
}

.rd-web-alert-box {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1.5px solid #93C5FD;
  background: #EFF6FF;
  color: #1E3A8A;
  font-size: 12.5px;
  line-height: 1.48;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.rd-web-alert-box.is-success {
  border-color: #6EE7B7;
  background: #ECFDF5;
  color: #065F46;
}

.rd-web-alert-box.is-warning {
  border-color: #FCD34D;
  background: #FFFBEB;
  color: #92400E;
}

.rd-web-alert-box.is-error {
  border-color: #6EE7B7;
  background: #ECFDF5;
  color: #0F4C3A;
}

.rd-web-alert-close {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid currentColor;
  opacity: 0.7;
  background: transparent;
  color: inherit;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
}

/* Home Collapsible Changelog Strip */
.rd-changelog-strip {
  background: var(--bg-card);
  border: 1.5px solid #FDE68A;
  border-radius: 14px;
  padding: 8px 12px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.rd-changelog-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.rd-changelog-summary-btn {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  padding: 2px 0;
  text-align: left;
  cursor: pointer;
  color: var(--text-main);
}

.rd-changelog-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: "Prompt", sans-serif;
  font-size: 11px;
  font-weight: 700;
  background: #FEF3C7;
  color: #92400E;
}

.rd-changelog-pill.is-emerald {
  background: #D1FAE5;
  color: #065F46;
}

.rd-changelog-headline {
  font-family: "Prompt", sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rd-changelog-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.rd-changelog-toggle {
  border: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  color: var(--text-main);
  border-radius: 8px;
  padding: 4px 9px;
  font-family: "Prompt", sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.rd-changelog-dismiss {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.rd-changelog-drawer {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rd-changelog-entry {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
}

.rd-changelog-entry-title {
  font-family: "Prompt", sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
}

.rd-changelog-entry-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.rd-changelog-action {
  padding: 5px 10px;
  border-radius: 8px;
  background: #0F4C3A;
  color: #FDE68A;
  font-family: "Prompt", sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  white-space: normal;
  text-align: center;
  line-height: 1.35;
}

/* Mobile <= 767px: Viewport-Safe Dropdowns Avoiding #mobile-bottom-nav */
@media (max-width: 767px) {
  .updates-wrap,
  .app-header .settings-wrap {
    position: static !important;
  }
  .settings-panel,
  .settings-dropdown,
  .updates-panel {
    position: absolute !important;
    top: calc(100% + 6px) !important;
    left: 10px !important;
    right: 10px !important;
    width: auto !important;
    max-width: calc(100vw - 20px) !important;
    max-height: calc(100vh - 156px);
    max-height: calc(100dvh - 156px);
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    white-space: normal !important;
    box-sizing: border-box !important;
  }
  .rd-changelog-strip {
    padding: 7px 10px;
  }
  .rd-changelog-bar {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 4px 8px;
  }
  .rd-changelog-summary-btn {
    width: 100%;
    flex-wrap: wrap;
    gap: 4px 6px;
    padding: 1px 0;
  }
  .rd-changelog-headline {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.38;
  }
  .rd-changelog-controls {
    width: 100%;
    justify-content: flex-end;
    gap: 4px;
  }
  .rd-changelog-toggle {
    padding: 3px 8px;
    font-size: 11px;
  }
  .rd-changelog-dismiss {
    width: 24px;
    height: 24px;
  }
  .rd-changelog-entry {
    flex-direction: column;
    align-items: stretch;
  }
  .rd-changelog-action {
    width: 100%;
  }
}

/* Tablet 768px-1023px */
@media (min-width: 768px) and (max-width: 1023px) {
  .app-header > div {
    padding-left: 12px !important;
    padding-right: 12px !important;
    gap: 6px !important;
  }
  .brand-mark svg {
    width: 28px;
    height: 28px;
  }
  .header-brand-title {
    font-size: 12px !important;
  }
  #desktop-nav-tabs {
    gap: 2px !important;
  }
  .nav-tab {
    font-size: 11px !important;
    padding: 4.5px 6px !important;
    gap: 3px !important;
  }
  .nav-tab svg {
    width: 12px !important;
    height: 12px !important;
  }
  .header-vip-pill {
    padding: 5px 8px;
    font-size: 11px;
  }
  .header-updates-btn {
    padding: 5px 7px;
  }
  .settings-pill-btn {
    padding: 5px 8px;
    font-size: 11px;
  }
  .updates-panel {
    right: 0;
    width: min(350px, calc(100vw - 32px));
    max-height: min(72dvh, 520px);
  }
  .settings-panel,
  .settings-dropdown {
    right: 0;
    width: min(260px, calc(100vw - 32px)) !important;
  }
}

/* Desktop 1024px+ */
@media (min-width: 1024px) {
  .updates-panel {
    right: 0;
    width: min(390px, calc(100vw - 32px));
    max-height: min(74dvh, 620px);
  }
}

/* ============================================================================
   V50 VIP PASS MODAL + MOBILE VIEWPORT POLISH (<= 639px & <= 374px)
   ============================================================================ */
.vip-pass-dialog {
  background: #FFFFFF;
  color: #0F172A;
}

body[data-theme="sepia"] .vip-pass-dialog {
  background: #FBF6EC !important;
  border-color: #DFD1B4 !important;
  color: #2D241E !important;
}

body[data-theme="sepia"] .vip-pass-dialog .bg-amber-50,
body[data-theme="sepia"] .vip-pass-dialog .bg-amber-50\/90 {
  background-color: #F7ECD3 !important;
  border-color: #D9B77A !important;
}

body[data-theme="sepia"] .vip-pass-dialog .bg-indigo-50\/50 {
  background-color: #F3EAD6 !important;
  border-color: #C9B48B !important;
}

body[data-theme="dark"] #vip-pass-modal .vip-pass-dialog {
  background: #0F1E33 !important;
  border-color: #2C415E !important;
  color: #F8FAFC !important;
}

body[data-theme="dark"] #vip-pass-modal .bg-amber-50,
body[data-theme="dark"] #vip-pass-modal .bg-amber-50\/90 {
  background-color: rgba(120, 53, 15, 0.34) !important;
  border-color: rgba(212, 175, 55, 0.45) !important;
  color: #FEF3C7 !important;
}

body[data-theme="dark"] #vip-pass-modal .bg-amber-50 *,
body[data-theme="dark"] #vip-pass-modal .bg-amber-50\/90 * {
  color: #FEF3C7 !important;
}

body[data-theme="dark"] #vip-pass-modal .bg-indigo-50\/50 {
  background-color: #16263E !important;
  border-color: rgba(129, 140, 248, 0.45) !important;
  color: #F8FAFC !important;
}

body[data-theme="dark"] #vip-pass-modal .bg-rose-50 {
  background-color: rgba(20, 99, 76, 0.34) !important;
  border-color: rgba(251, 113, 133, 0.45) !important;
  color: #FECDD3 !important;
}

body[data-theme="dark"] #vip-pass-modal .bg-emerald-50 {
  background-color: rgba(6, 95, 70, 0.38) !important;
  border-color: rgba(52, 211, 153, 0.45) !important;
  color: #D1FAE5 !important;
}

body[data-theme="dark"] #vip-pass-modal .bg-blue-50 {
  background-color: rgba(30, 58, 138, 0.4) !important;
  border-color: rgba(96, 165, 250, 0.45) !important;
  color: #DBEAFE !important;
}

body[data-theme="dark"] #vip-pass-modal #btn-vip-pass-open-checkout,
body[data-theme="dark"] #vip-pass-modal #btn-vip-pass-login,
body[data-theme="dark"] #vip-pass-modal #btn-vip-pass-buy-more {
  color: #0F172A !important;
}

@media (max-width: 639px) {
  .q-card-banner {
    padding: 8px 10px;
  }
  .q-num-pill {
    padding: 2.5px 8px;
    font-size: 11px;
  }
  .q-tag-pill {
    padding: 2px 7px;
    font-size: 10.5px;
  }
  .q-pin-btn,
  .q-bm-btn {
    padding: 3px 7px;
    font-size: 10.5px;
  }
  .q-ref-pill {
    margin-top: 5px;
    padding: 4px 8px;
    font-size: 11px;
  }
  .exam-scope-links {
    margin-left: 0;
  }
}

@media (max-width: 374px) {
  .pos-card-title {
    font-size: 11px;
  }
  .pos-card-mob-meta {
    font-size: 10px;
  }
  .exam-act-chip {
    padding: 4.5px 5.5px;
    font-size: 10.5px;
  }
  .exam-act-finish {
    padding: 5px 8px;
    font-size: 10.5px;
  }
  .exam-flow-bar {
    padding: 6px 8px;
    gap: 5px;
  }
  .exam-flow-bar .exam-seg-btn {
    padding: 4.5px 6.5px;
    font-size: 10.5px;
  }
  .exam-autoadv-switch {
    padding: 4.5px 7.5px;
    font-size: 10.5px;
    gap: 4px;
  }
}

/* ============================================================================
   RD v1: CRO Inline QR Checkout, Header Unlock CTA & Mobile Polish
   ============================================================================ */
.app-header #header-unlock-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: "Prompt", sans-serif;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 11px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #FBBF24 0%, #D4AF37 100%);
  color: #0F172A;
  border: 1px solid #FDE68A;
  box-shadow: 0 2px 10px rgba(212, 175, 55, 0.35);
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.14s ease, filter 0.14s ease;
}

.app-header #header-unlock-btn:hover {
  filter: brightness(1.06);
}

.app-header #header-unlock-btn.hidden {
  display: none !important;
}

.app-header #header-vip-btn:not(.is-vip-active) {
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.32) !important;
  color: #F8FAFC !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}

.app-header #header-vip-btn:not(.is-vip-active):hover {
  background: rgba(255, 255, 255, 0.18) !important;
  color: #FFFFFF !important;
}

.app-header #header-vip-btn.is-vip-active {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%) !important;
  border-color: #6EE7B7 !important;
  color: #FFFFFF !important;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.35) !important;
}

@media (min-width: 768px) and (max-width: 1279px) {
  .app-header > div {
    padding-left: 10px !important;
    padding-right: 10px !important;
    gap: 5px !important;
  }
  .app-header .header-brand-title {
    font-size: 12.5px !important;
  }
  .app-header #desktop-nav-tabs {
    gap: 2px !important;
    flex-shrink: 1 !important;
    min-width: 0 !important;
  }
  .app-header #desktop-nav-tabs .nav-tab {
    font-size: 11px !important;
    padding: 5px 7px !important;
    gap: 3px !important;
  }
  .app-header #desktop-nav-tabs .nav-tab svg {
    width: 12px !important;
    height: 12px !important;
  }
  .app-header #header-unlock-btn,
  .app-header #header-vip-btn {
    padding: 4.5px 8px !important;
    font-size: 11px !important;
    gap: 3px !important;
  }
  .app-header #header-updates-btn {
    padding: 5px 6px !important;
  }
  .app-header #settings-toggle {
    padding: 5px 7px !important;
    font-size: 11px !important;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .app-header .header-brand-title {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    line-height: 1.12 !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }
  .app-header .brand-main-word {
    display: block !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
  }
  .app-header .brand-sub-word {
    display: block !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
  }
  .app-header #desktop-nav-tabs .nav-tab {
    padding: 4.5px 6px !important;
  }
}

@media (max-width: 639px) {
  .app-header > div {
    padding-left: 10px !important;
    padding-right: 10px !important;
    gap: 6px !important;
  }
  .app-header .header-brand-title {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    line-height: 1.12 !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }
  .app-header .brand-main-word {
    display: block !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
  }
  .app-header .brand-sub-word {
    display: block !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
  }
  .app-header #header-unlock-btn,
  .app-header #header-vip-btn {
    padding: 5px 8px !important;
    font-size: 11px !important;
    min-height: 32px !important;
    height: 32px !important;
    gap: 3px !important;
  }
  .app-header #header-unlock-btn svg,
  .app-header #header-vip-btn svg {
    width: 12px !important;
    height: 12px !important;
  }
  .app-header #header-updates-btn,
  .app-header #settings-toggle {
    min-height: 32px !important;
    height: 32px !important;
  }
}

@media (max-width: 399px) {
  .app-header > div {
    padding-left: 8px !important;
    padding-right: 8px !important;
    gap: 4px !important;
  }
  .app-header .brand-mark svg {
    width: 26px !important;
    height: 26px !important;
  }
  .app-header .header-actions-wrap {
    gap: 3px !important;
  }
  .app-header #header-unlock-btn,
  .app-header #header-vip-btn {
    padding: 4px 6.5px !important;
    font-size: 10.5px !important;
    min-height: 30px !important;
    height: 30px !important;
  }
  .app-header #header-unlock-btn svg,
  .app-header #header-vip-btn svg {
    display: none !important;
  }
  .app-header #header-updates-btn,
  .app-header #settings-toggle {
    padding: 4px 6px !important;
    min-height: 30px !important;
    height: 30px !important;
    font-size: 10.5px !important;
  }
}

@media (max-width: 359px) {
  .app-header .brand-main-word {
    font-size: 10.5px !important;
  }
  .app-header .brand-sub-word {
    font-size: 9px !important;
  }
  .app-header .brand-mark svg {
    width: 24px !important;
    height: 24px !important;
  }
  .app-header #header-unlock-btn,
  .app-header #header-vip-btn {
    padding: 3.5px 5.5px !important;
    font-size: 10px !important;
  }
}

@media (max-width: 767px) {
  .portal-switcher-bar .portal-pill {
    min-height: 35px !important;
    padding: 5px 10px !important;
    font-size: 11px !important;
  }
}

@media (max-width: 639px) {
  #section-seqsheet #question-list-container {
    padding-bottom: 84px;
  }
  #section-seqsheet .solution-bottom-box .sol-ref-badge {
    display: none !important;
  }
}

/* Non-Blocking In-App Browser Tip & Inline QR Form */
.inapp-modal-warning.is-nonblocking-tip {
  border-color: #6366F1 !important;
  background: linear-gradient(180deg, #EEF2FF 0%, #FFFBEB 100%) !important;
  color: #1E1B4B !important;
}

.inapp-modal-warning.is-nonblocking-tip strong {
  color: #1E1B4B !important;
}

body[data-theme="sepia"] .inapp-modal-warning.is-nonblocking-tip {
  background: linear-gradient(180deg, #F5ECD8 0%, #FFFBEB 100%) !important;
  border-color: #818CF8 !important;
  color: #2D241E !important;
}

body[data-theme="dark"] .inapp-modal-warning.is-nonblocking-tip {
  background: rgba(49, 46, 129, 0.38) !important;
  border-color: #818CF8 !important;
  color: #E0E7FF !important;
}

body[data-theme="dark"] .inapp-modal-warning.is-nonblocking-tip strong {
  color: #FDE68A !important;
}

.checkout-email-qr-box {
  padding: 11px 13px;
  border-radius: 12px;
  border: 2px solid #D97706;
  background: linear-gradient(180deg, #FFFBEB 0%, #FEF3C7 100%);
  box-shadow: 0 4px 12px rgba(180, 83, 9, 0.1);
}

#checkout-customer-email-input,
#vip-code-input {
  background: #FFFFFF !important;
  border: 2px solid #475569 !important;
  border-radius: 10px !important;
  color: #0F172A !important;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#checkout-customer-email-input::placeholder,
#vip-code-input::placeholder {
  color: #64748B;
  opacity: 1;
}

#checkout-customer-email-input:focus,
#vip-code-input:focus {
  border-color: #14634C !important;
  box-shadow: 0 0 0 3px rgba(20, 99, 76, 0.18) !important;
  outline: none !important;
}

.checkout-inline-terms {
  font-size: 11px;
  line-height: 1.48;
  color: #475569;
  text-align: center;
}

body[data-theme="sepia"] .checkout-email-qr-box {
  background: #F5E6C8;
  border-color: #B45309;
}

body[data-theme="sepia"] #checkout-customer-email-input,
body[data-theme="sepia"] #vip-code-input {
  background: #FFFDF8 !important;
  border-color: #9A7B4F !important;
  color: #2D241E !important;
}

body[data-theme="dark"] .checkout-email-qr-box,
body[data-theme="dark"] #vip-hosted-checkout-box {
  background: #0F172A;
  border: 2px solid #D97706;
}

body[data-theme="dark"] .checkout-email-qr-box label {
  color: #F8FAFC;
}

body[data-theme="dark"] #checkout-customer-email-input,
body[data-theme="dark"] #vip-code-input {
  background: #1E293B !important;
  border-color: #64748B !important;
  color: #F8FAFC !important;
}

body[data-theme="dark"] #checkout-customer-email-input::placeholder,
body[data-theme="dark"] #vip-code-input::placeholder {
  color: #94A3B8;
}

body[data-theme="dark"] .checkout-inline-terms {
  color: #CBD5E1;
}

#vip-qr-payment-layout:not(.has-live-qr):not(.is-loading-qr) {
  grid-template-columns: 1fr !important;
}

#vip-qr-payment-layout:not(.has-live-qr):not(.is-loading-qr) .rd-qr-card-frame {
  display: none !important;
}

.checkout-main-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1.35;
  white-space: nowrap;
}

@media (max-width: 374px) {
  .checkout-main-cta {
    white-space: normal;
  }
}

@media (max-width: 639px) {
  #vip-qr-payment-layout.has-live-qr .rd-qr-card-frame,
  #vip-qr-payment-layout.is-loading-qr .rd-qr-card-frame {
    order: -1;
  }
  #vip-modal > div > div:last-child {
    padding: 10px !important;
  }
  #vip-checkout-flow-wrap > * + * {
    margin-top: 8px !important;
  }
  #vip-modal .checkout-promo-deadline-strip {
    padding: 4px 8px !important;
    font-size: 11px !important;
  }
  #vip-pkg-grid .vip-pkg-card {
    padding: 6px 9px !important;
  }
  #vip-modal-recovery-details {
    padding-top: 4px !important;
  }
  #vip-modal .rd-qr-detail-panel {
    padding: 8px 10px !important;
  }
  #vip-modal .rd-qr-detail-panel > * + * {
    margin-top: 7px !important;
  }
  #vip-hosted-checkout-box,
  #vip-inline-email-form {
    padding: 8px 10px !important;
  }
  #vip-hosted-checkout-box > * + *,
  #vip-inline-email-form > * + * {
    margin-top: 6px !important;
  }
  #checkout-customer-email-input {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
  }
}

/* Store Free vs VIP Comparison & Duration Clarity */
.store-free-vs-vip-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 639px) {
  .store-free-vs-vip-strip {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

.store-cmp-col {
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.store-cmp-col.is-free {
  border-color: #CBD5E1;
  background: #F8FAFC;
}

.store-cmp-col.is-vip {
  border-color: #D4AF37;
  background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
}

.store-cmp-title {
  font-family: "Prompt", sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  color: #0F172A;
}

.store-cmp-items {
  font-size: 0.76rem;
  line-height: 1.5;
  color: #334155;
}

.store-pkg-duration {
  font-size: 0.72rem;
  font-weight: 600;
  color: #047857;
  line-height: 1.45;
  padding-top: 2px;
}

body[data-theme="sepia"] .store-cmp-col.is-free {
  background: #F5EBD6;
  border-color: #D6C5A3;
}

body[data-theme="sepia"] .store-cmp-col.is-vip {
  background: #F7E8C3;
  border-color: #D97706;
}

body[data-theme="dark"] .store-cmp-col.is-free {
  background: #0F172A;
  border-color: #334155;
}

body[data-theme="dark"] .store-cmp-col.is-vip {
  background: rgba(120, 53, 15, 0.35);
  border-color: #D4AF37;
}

body[data-theme="dark"] .store-cmp-title {
  color: #F8FAFC;
}

body[data-theme="dark"] .store-cmp-items {
  color: #CBD5E1;
}

body[data-theme="dark"] .store-pkg-duration {
  color: #6EE7B7;
}

/* Post-10-Question Score Summary & Lead Support Paywall */
.seq-trial-paywall-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  padding: 20px 16px;
  background: radial-gradient(120% 120% at 90% 10%, rgba(212, 175, 55, 0.16) 0%, transparent 60%),
    linear-gradient(145deg, #06281E 0%, #0F4C3A 52%, #0F172A 100%);
  border: 1.5px solid rgba(251, 191, 36, 0.45);
  color: #FFFFFF;
  text-align: center;
  box-shadow: 0 14px 30px -14px rgba(6, 40, 30, 0.55);
}

@media (min-width: 640px) {
  .seq-trial-paywall-card {
    padding: 24px 22px;
  }
}

.seq-trial-paywall-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-bottom: 10px;
}

.seq-trial-paywall-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: #FDE68A;
  font-family: "Prompt", sans-serif;
  font-size: 11px;
  font-weight: 700;
}

.seq-trial-score-summary {
  margin: 10px auto 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(251, 191, 36, 0.48);
  max-width: 36rem;
  text-align: center;
}

.seq-trial-score-head {
  font-family: "Prompt", sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: #FEF3C7;
  line-height: 1.45;
}

.seq-trial-score-coach {
  margin: 4px 0 0;
  font-size: 0.76rem;
  line-height: 1.5;
  color: #E2E8F0;
}

.seq-paywall-title {
  font-family: "Prompt", sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.4;
  margin: 0 0 6px;
}

@media (min-width: 640px) {
  .seq-paywall-title {
    font-size: 1.15rem;
  }
}

.seq-paywall-sub {
  font-size: 0.78rem;
  color: rgba(254, 226, 226, 0.9);
  line-height: 1.55;
  max-width: 38rem;
  margin: 0 auto 14px;
}

.seq-paywall-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 12px;
  background: linear-gradient(135deg, #FBBF24 0%, #D4AF37 100%);
  color: #0F172A;
  font-family: "Prompt", sans-serif;
  font-size: 0.84rem;
  font-weight: 800;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.35);
}

.seq-paywall-cta-btn:hover {
  filter: brightness(1.06);
}

.seq-paywall-help-strip {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255, 255, 255, 0.24);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 10px;
  font-size: 0.76rem;
  color: #E2E8F0;
}

.seq-paywall-help-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #FDE68A !important;
  font-family: "Prompt", sans-serif;
  font-weight: 700;
  font-size: 0.74rem;
  text-decoration: none;
  transition: background 0.15s ease;
}

.seq-paywall-help-link:hover {
  background: rgba(255, 255, 255, 0.24);
}

/* Credibility Cleanup, Hero Trust Pill & Store Chat CTA Parity (v55) */
.rd-hero-trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-family: "Prompt", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(52, 211, 153, 0.5);
  color: #D1FAE5;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-hero-chat-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  border: 1.5px solid rgba(255, 255, 255, 0.36);
  color: #FFFFFF !important;
  font-family: "Prompt", sans-serif;
  font-weight: 700;
  font-size: 0.84rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.store-hero-chat-btn:hover {
  background: rgba(255, 255, 255, 0.24);
}

#bottom-user-reviews-bar .review-pill-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  padding: 13px 15px;
}

#bottom-user-reviews-bar .review-pill-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

#bottom-user-reviews-bar .review-pill-verified {
  color: #059669;
  font-size: 0.75rem;
  font-weight: 800;
  white-space: nowrap;
}

body[data-theme="dark"] #bottom-user-reviews-bar .review-pill-verified {
  color: #34D399;
}

body[data-theme="sepia"] #bottom-user-reviews-bar .review-pill-verified {
  color: #047857;
}

#bottom-user-reviews-bar .review-pill-tag {
  font-size: 0.68rem;
  font-weight: 700;
  color: #0F4C3A;
  background: #ECFDF5;
  border: 1px solid #6EE7B7;
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
}

body[data-theme="dark"] #bottom-user-reviews-bar .review-pill-tag {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(52, 211, 153, 0.45);
  color: #A7F3D0;
}

body[data-theme="sepia"] #bottom-user-reviews-bar .review-pill-tag {
  background: #F6E6D4;
  border-color: #D8B4A0;
  color: #0D4434;
}

#bottom-user-reviews-bar .review-pill-quote {
  margin: 0;
  font-size: 0.81rem;
  line-height: 1.5;
  color: var(--text-main);
  font-weight: 600;
  white-space: normal;
}

#bottom-user-reviews-bar .review-pill-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 8px;
  padding-top: 7px;
  border-top: 1px dashed var(--border-subtle);
  font-size: 0.72rem;
}

#bottom-user-reviews-bar .review-pill-name {
  color: #0F4C3A;
  font-weight: 800;
}

body[data-theme="dark"] #bottom-user-reviews-bar .review-pill-name {
  color: #FBBF24;
}

body[data-theme="sepia"] #bottom-user-reviews-bar .review-pill-name {
  color: #113D31;
}

#bottom-user-reviews-bar .review-pill-role {
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}



/* ============================================================================
   RD 2569 EXTENSIONS: 9-Position Grid, 17 Cheat Sheet Themes, Markdown & Tiers
   ============================================================================ */
.choice-btn.choice-wrong {
  background: #FEF2F2 !important;
  border-color: #EF4444 !important;
  color: #991B1B !important;
}
body[data-theme="dark"] .choice-btn.choice-wrong {
  background: rgba(127, 29, 29, 0.35) !important;
  border-color: #F87171 !important;
  color: #FECACA !important;
}
.sw-diag-card.is-weakness {
  background: rgba(254, 242, 242, 0.9);
  border-color: #FECACA;
}
body[data-theme="dark"] .sw-diag-card.is-weakness {
  background: rgba(127, 29, 29, 0.25);
  border-color: rgba(248, 113, 113, 0.4);
}
.updates-dot {
  background: #EF4444;
  box-shadow: 0 0 0 2px #06281E;
}

/* 9-Position Grouped Grid */
.pos-group-block {
  space-y: 6px;
}
.pos-group-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 6px;
}
.pos-group-label {
  font-family: "Prompt", sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  color: #0F4C3A;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
body[data-theme="dark"] .pos-group-label {
  color: #6EE7B7;
}
.pos-group-quota-pill {
  font-family: "Prompt", sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
}
body[data-theme="dark"] .pos-group-quota-pill {
  background: rgba(16, 185, 129, 0.18);
  color: #A7F3D0;
  border-color: rgba(52, 211, 153, 0.35);
}
.no-eng-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 9999px;
  font-family: "Prompt", sans-serif;
  font-size: 11px;
  font-weight: 700;
  background: #FEF3C7;
  color: #78350F;
  border: 1px solid #FDE68A;
}
body[data-theme="dark"] .no-eng-badge {
  background: rgba(212, 175, 55, 0.2);
  color: #FDE68A;
  border-color: rgba(212, 175, 55, 0.45);
}

/* Inner Position Select & Drawer for 9 Positions */
.inner-pos-select {
  padding: 5px 10px;
  border-radius: 10px;
  border: 1.5px solid #A7F3D0;
  background: var(--bg-card);
  color: var(--text-main);
  font-family: "Prompt", sans-serif;
  font-size: 12px;
  font-weight: 700;
  max-width: 100%;
  cursor: pointer;
}
.inner-pos-drawer-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 6px;
}
@media (min-width: 480px) {
  .inner-pos-drawer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 768px) {
  .inner-pos-drawer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Question Difficulty / Tier / Calc Badges */
.q-diff-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 9999px;
  font-family: "Prompt", sans-serif;
  font-size: 10.5px;
  font-weight: 700;
}
.q-diff-pill.is-easy { background: #DCFCE7; color: #166534; }
.q-diff-pill.is-medium { background: #FEF3C7; color: #92400E; }
.q-diff-pill.is-hard { background: #FEE2E2; color: #991B1B; }
body[data-theme="dark"] .q-diff-pill.is-easy { background: rgba(22, 101, 52, 0.45); color: #86EFAC; }
body[data-theme="dark"] .q-diff-pill.is-medium { background: rgba(146, 64, 14, 0.45); color: #FDE68A; }
body[data-theme="dark"] .q-diff-pill.is-hard { background: rgba(153, 27, 27, 0.45); color: #FCA5A5; }

.q-tier-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 9999px;
  font-family: "Prompt", sans-serif;
  font-size: 10px;
  font-weight: 700;
  background: rgba(15, 76, 58, 0.1);
  color: #0F4C3A;
  border: 1px solid rgba(15, 76, 58, 0.25);
}
body[data-theme="dark"] .q-tier-pill {
  background: rgba(52, 211, 153, 0.16);
  color: #6EE7B7;
  border-color: rgba(52, 211, 153, 0.35);
}

/* Cheat Sheets #rd-cs-1 .. #rd-cs-17 Themes & Markdown Formatting */
.cs-theme-16 { --cs-accent: #0F766E; --cs-soft: #CCFBF1; }
.cs-theme-17 { --cs-accent: #1D4ED8; --cs-soft: #DBEAFE; }
.cs-theme-16 .cs-accordion-head { border-left: 5px solid #0F766E; }
.cs-theme-17 .cs-accordion-head { border-left: 5px solid #1D4ED8; }
.cs-theme-16 .cs-thead-row th { background: #115E59; color: #FFFFFF; }
.cs-theme-17 .cs-thead-row th { background: #1E3A8A; color: #FFFFFF; }

.cs-md-content {
  padding: 14px 16px;
  font-size: 0.94em;
  line-height: 1.65;
  color: var(--text-main);
}
@media (max-width: 639px) {
  .cs-md-content { padding: 10px 12px; }
}
.cs-md-content .cs-callout {
  padding: 10px 14px;
  border-radius: 12px;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  border-left: 4px solid #0F4C3A;
  color: #064E3B;
  font-size: 0.9em;
  margin-bottom: 12px;
}
body[data-theme="dark"] .cs-md-content .cs-callout {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(52, 211, 153, 0.35);
  color: #D1FAE5;
}
body[data-theme="sepia"] .cs-md-content .cs-callout {
  background: #F5EBD6;
  border-color: #D6C5A3;
  color: #2D241E;
}
.cs-md-content .cs-subhead {
  font-family: "Prompt", sans-serif;
  font-size: 1.05em;
  font-weight: 800;
  color: #0F4C3A;
  margin: 14px 0 8px;
  padding-bottom: 4px;
  border-bottom: 2px solid #D1FAE5;
}
body[data-theme="dark"] .cs-md-content .cs-subhead {
  color: #FDE68A;
  border-bottom-color: #1E4237;
}
.cs-md-content .cs-subhead-sm {
  font-family: "Prompt", sans-serif;
  font-size: 0.96em;
  font-weight: 700;
  color: #0A382B;
  margin: 10px 0 6px;
}
body[data-theme="dark"] .cs-md-content .cs-subhead-sm {
  color: #6EE7B7;
}
.cs-md-content .cs-divider {
  border: 0;
  border-top: 1px dashed var(--border-subtle);
  margin: 12px 0;
}
.cs-md-content .cs-ul-list,
.cs-md-content .cs-ol-list {
  margin: 6px 0 12px 20px;
  padding: 0;
}
.cs-md-content .cs-ul-list { list-style: disc; }
.cs-md-content .cs-ol-list { list-style: decimal; }
.cs-md-content .cs-ul-list li,
.cs-md-content .cs-ol-list li {
  margin-bottom: 5px;
}
.cs-md-content .cs-para {
  margin: 6px 0 10px;
}
.cs-md-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.88em;
  font-weight: 600;
  padding: 1.5px 6px;
  border-radius: 6px;
  background: rgba(15, 76, 58, 0.1);
  border: 1px solid rgba(15, 76, 58, 0.16);
  color: #0B3B2D;
}
body[data-theme="dark"] .cs-md-content code {
  background: rgba(212, 175, 55, 0.18);
  border-color: rgba(251, 191, 36, 0.3);
  color: #FDE68A;
}
.cs-md-content .overflow-x-auto {
  margin: 8px 0 12px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
}
.cs-md-content table {
  font-size: 0.9em;
  line-height: 1.62;
}
.cs-md-content tbody tr:nth-child(even) {
  background: rgba(15, 76, 58, 0.025);
}
body[data-theme="dark"] .cs-md-content tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.03);
}
.cs-md-content table tbody tr td:first-child:nth-last-child(n+3) ~ td:last-child {
  background: rgba(245, 158, 11, 0.045);
}
body[data-theme="sepia"] .cs-md-content table tbody tr td:first-child:nth-last-child(n+3) ~ td:last-child {
  background: rgba(180, 83, 9, 0.055);
}
body[data-theme="dark"] .cs-md-content table tbody tr td:first-child:nth-last-child(n+3) ~ td:last-child {
  background: rgba(245, 158, 11, 0.075);
}
.cs-md-content td,
.cs-md-content th {
  padding: 9px 11px;
}

/* Position Scope Bar inside each Cheat Sheet Card */
.cs-pos-scope-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 16px 4px;
  padding: 8px 11px;
  border-radius: 10px;
  background: rgba(15, 76, 58, 0.05);
  border: 1px solid rgba(15, 76, 58, 0.14);
}
@media (max-width: 639px) {
  .cs-pos-scope-bar { margin: 0 12px 4px; padding: 7px 9px; }
}
.cs-pos-scope-lbl {
  font-family: "Prompt", sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  color: #0F4C3A;
}
.cs-pos-scope-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.cs-pos-scope-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 9999px;
  font-family: "Prompt", sans-serif;
  font-size: 10.5px;
  font-weight: 600;
  background: #FFFFFF;
  color: #334155;
  border: 1px solid #CBD5E1;
}
.cs-pos-scope-chip.is-active-pos {
  background: #0F4C3A;
  color: #FDE68A;
  border-color: #0F4C3A;
  font-weight: 700;
}
body[data-theme="dark"] .cs-pos-scope-bar {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(52, 211, 153, 0.25);
}
body[data-theme="dark"] .cs-pos-scope-lbl {
  color: #6EE7B7;
}
body[data-theme="dark"] .cs-pos-scope-chip {
  background: #1E293B;
  color: #CBD5E1;
  border-color: #334155;
}
body[data-theme="dark"] .cs-pos-scope-chip.is-active-pos {
  background: #14634C;
  color: #FEF3C7;
  border-color: #F5D77F;
}
body[data-theme="sepia"] .cs-pos-scope-bar {
  background: #EFE7D8;
  border-color: #D6C5A3;
}
body[data-theme="sepia"] .cs-pos-scope-chip {
  background: #FBF7EC;
  border-color: #D6C5A3;
  color: #2D241E;
}
body[data-theme="sepia"] .cs-pos-scope-chip.is-active-pos {
  background: #0F4C3A;
  border-color: #0F4C3A;
  color: #FDE68A;
}

/* Quick 1-Minute Summary Box */
.cs-quick-box {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ECFDF5 0%, #FEFCE8 100%);
  border: 1.5px solid #6EE7B7;
  border-left: 5px solid #0F4C3A;
}
.cs-quick-title {
  font-family: "Prompt", sans-serif;
  font-size: 0.96em;
  font-weight: 800;
  color: #064E3B;
  margin-bottom: 6px;
}
.cs-quick-body .cs-callout-list,
.cs-trap-body .cs-callout-list {
  margin: 4px 0 0 18px;
  padding: 0;
  list-style: disc;
}
.cs-quick-body li,
.cs-trap-body li {
  margin-bottom: 4px;
}
body[data-theme="dark"] .cs-quick-box {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.14) 0%, rgba(212, 175, 55, 0.08) 100%);
  border-color: rgba(52, 211, 153, 0.4);
  color: #ECFDF5;
}
body[data-theme="dark"] .cs-quick-title {
  color: #FDE68A;
}
body[data-theme="sepia"] .cs-quick-box {
  background: linear-gradient(135deg, #F5EBD6 0%, #FAF3E0 100%);
  border-color: #C7B28A;
  border-left-color: #0F4C3A;
  color: #2D241E;
}

/* Exam Trap Alert Box */
.cs-trap-box {
  margin: 10px 0 14px;
  padding: 11px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, #FFFBEB 0%, #FFF1F2 100%);
  border: 1.5px solid #FCD34D;
  border-left: 5px solid #D97706;
  color: #78350F;
}
.cs-trap-title {
  font-family: "Prompt", sans-serif;
  font-size: 0.94em;
  font-weight: 800;
  color: #9A3412;
  margin-bottom: 5px;
}
body[data-theme="dark"] .cs-trap-box {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.16) 0%, rgba(225, 29, 72, 0.1) 100%);
  border-color: rgba(251, 191, 36, 0.4);
  color: #FEF3C7;
}
body[data-theme="dark"] .cs-trap-title {
  color: #FDE68A;
}
body[data-theme="sepia"] .cs-trap-box {
  background: #F6E6D2;
  border-color: #D4A373;
  border-left-color: #B45309;
  color: #431407;
}

/* Collapsible Legal Reference Accordion */
.cs-ref-box {
  margin: 14px 0 4px;
  border-radius: 11px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  overflow: hidden;
}
.cs-ref-box summary {
  cursor: pointer;
  padding: 9px 13px;
  font-family: "Prompt", sans-serif;
  font-size: 0.86em;
  font-weight: 700;
  color: #475569;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.cs-ref-box summary::-webkit-details-marker {
  display: none;
}
.cs-ref-box summary::before {
  content: "📚 ";
}
.cs-ref-box summary::after {
  content: "กดดูที่มา ▾";
  font-size: 11px;
  font-weight: 600;
  color: #0F4C3A;
  margin-left: auto;
  white-space: nowrap;
}
.cs-ref-box[open] summary::after {
  content: "ซ่อน ▴";
}
.cs-ref-body {
  padding: 10px 14px 12px;
  border-top: 1px dashed var(--border-subtle);
  font-size: 0.84em;
  line-height: 1.58;
  color: var(--text-muted);
}
body[data-theme="dark"] .cs-ref-box summary {
  color: #CBD5E1;
}
body[data-theme="dark"] .cs-ref-box summary::after {
  color: #6EE7B7;
}

/* =========================================================
 * CHEAT SHEET READABILITY LAYER (Reading Mode, Tier Hint, Glossary, Mini TOC)
 * ========================================================= */
.cs-reading-mode-bar {
  padding-top: 2px;
}
.cs-view-mode-group {
  background: var(--bg-subtle);
  border-color: var(--border-subtle);
  max-width: 100%;
}
.cs-view-mode-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 5px 11px;
  border-radius: 9px;
  font-family: "Prompt", sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
@media (max-width: 639px) {
  .cs-view-mode-btn {
    padding: 6px 8px;
    font-size: 11.5px;
  }
}
.cs-view-mode-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.65);
}
.cs-view-mode-btn.active {
  background: #0F4C3A;
  color: #FFFFFF;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(15, 76, 58, 0.24);
}
body[data-theme="dark"] .cs-view-mode-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
}
body[data-theme="dark"] .cs-view-mode-btn.active {
  background: #14634C;
  color: #FDE68A;
}
body[data-theme="dark"] .cs-reading-tip {
  color: #94A3B8 !important;
}

/* Focus Mode: Hide dense tables & ref accordions, show Quick Summary + Glossary + Traps */
#cs-accordion-list.is-cs-focus-mode .cs-md-content .overflow-x-auto,
#cs-accordion-list.is-cs-focus-mode .cs-md-content .cs-ref-box,
#cs-accordion-list.is-cs-focus-mode .cs-md-content .cs-subhead-sm,
#cs-accordion-list.is-cs-focus-mode .cs-md-content .cs-para,
#cs-accordion-list.is-cs-focus-mode .cs-md-content .cs-ul-list,
#cs-accordion-list.is-cs-focus-mode .cs-md-content .cs-ol-list,
#cs-accordion-list.is-cs-focus-mode .cs-md-content .cs-divider,
#cs-accordion-list.is-cs-focus-mode .cs-md-content .cs-mini-toc {
  display: none !important;
}

/* Dynamic Tier Depth Hint Row inside Scope Bar */
.cs-tier-hint-row {
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  padding-top: 6px;
  margin-top: 2px;
  border-top: 1px dashed rgba(15, 76, 58, 0.18);
  font-size: 11.5px;
}
body[data-theme="dark"] .cs-tier-hint-row {
  border-top-color: rgba(52, 211, 153, 0.24);
}
body[data-theme="sepia"] .cs-tier-hint-row {
  border-top-color: #D6C5A3;
}
.cs-tier-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 9999px;
  font-family: "Prompt", sans-serif;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.cs-tier-badge.is-core {
  background: #D1FAE5;
  color: #064E3B;
  border: 1px solid #6EE7B7;
}
.cs-tier-badge.is-deep {
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid #FCD34D;
}
.cs-tier-badge.is-proc {
  background: #E0E7FF;
  color: #1E3A8A;
  border: 1px solid #A5B4FC;
}
.cs-tier-badge.is-std {
  background: #E2E8F0;
  color: #1E293B;
  border: 1px solid #CBD5E1;
}
body[data-theme="dark"] .cs-tier-badge.is-core {
  background: rgba(16, 185, 129, 0.22);
  color: #6EE7B7;
  border-color: rgba(52, 211, 153, 0.45);
}
body[data-theme="dark"] .cs-tier-badge.is-deep {
  background: rgba(217, 119, 6, 0.26);
  color: #FDE68A;
  border-color: rgba(251, 191, 36, 0.45);
}
body[data-theme="dark"] .cs-tier-badge.is-proc {
  background: rgba(99, 102, 241, 0.24);
  color: #C7D2FE;
  border-color: rgba(165, 180, 252, 0.45);
}
body[data-theme="dark"] .cs-tier-badge.is-std {
  background: #1E293B;
  color: #E2E8F0;
  border-color: #475569;
}
.cs-tier-desc {
  color: var(--text-muted);
  font-size: 11.5px;
  line-height: 1.45;
}

/* Beginner Glossary Drawer */
.cs-glossary-box {
  margin: 0 0 12px;
  border-radius: 12px;
  border: 1px solid #99F6E4;
  background: linear-gradient(135deg, #F0FDFA 0%, #F8FAFC 100%);
  overflow: hidden;
}
.cs-glossary-box summary {
  cursor: pointer;
  padding: 9px 13px;
  font-family: "Prompt", sans-serif;
  font-size: 0.9em;
  font-weight: 700;
  color: #0F4C3A;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.cs-glossary-box summary::-webkit-details-marker {
  display: none;
}
.cs-glossary-box summary::after {
  content: "เปิดดูคำแปล ▾";
  font-size: 11px;
  font-weight: 700;
  color: #0F766E;
  white-space: nowrap;
  flex-shrink: 0;
}
.cs-glossary-box[open] summary::after {
  content: "ซ่อน ▴";
}
.cs-glossary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  padding: 10px 13px 13px;
  margin: 0;
  border-top: 1px dashed rgba(15, 118, 110, 0.25);
}
@media (min-width: 640px) {
  .cs-glossary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.cs-glossary-item {
  padding: 8px 10px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(15, 76, 58, 0.14);
}
.cs-glossary-item dt {
  font-family: "Prompt", sans-serif;
  font-size: 0.88em;
  font-weight: 700;
  color: #0F4C3A;
  margin-bottom: 3px;
}
.cs-glossary-item dd {
  margin: 0;
  font-size: 0.85em;
  line-height: 1.55;
  color: #334155;
}
body[data-theme="dark"] .cs-glossary-box {
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.18) 0%, rgba(15, 23, 42, 0.72) 100%);
  border-color: rgba(45, 212, 191, 0.35);
}
body[data-theme="dark"] .cs-glossary-box summary {
  color: #99F6E4;
}
body[data-theme="dark"] .cs-glossary-box summary::after {
  color: #FDE68A;
}
body[data-theme="dark"] .cs-glossary-item {
  background: rgba(15, 23, 42, 0.72);
  border-color: #334155;
}
body[data-theme="dark"] .cs-glossary-item dt {
  color: #FDE68A;
}
body[data-theme="dark"] .cs-glossary-item dd {
  color: #CBD5E1;
}
body[data-theme="sepia"] .cs-glossary-box {
  background: #EFE7D6;
  border-color: #C7B28A;
}
body[data-theme="sepia"] .cs-glossary-box summary {
  color: #0F4C3A;
}
body[data-theme="sepia"] .cs-glossary-item {
  background: #FAF5E8;
  border-color: #D6C5A3;
}
body[data-theme="sepia"] .cs-glossary-item dd {
  color: #2D241E;
}

/* Mini Section Jump TOC */
.cs-mini-toc {
  margin: 0 0 14px;
  padding: 9px 11px;
  border-radius: 11px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
}
.cs-mini-toc-label {
  font-family: "Prompt", sans-serif;
  font-size: 0.8em;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.cs-mini-toc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.cs-toc-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  text-align: left;
  padding: 4px 10px;
  border-radius: 9999px;
  border: 1px solid rgba(15, 76, 58, 0.24);
  background: var(--bg-card);
  color: #0F4C3A;
  font-family: "Prompt", sans-serif;
  font-size: 0.78em;
  font-weight: 600;
  line-height: 1.35;
  cursor: pointer;
  transition: all 0.14s ease;
}
.cs-toc-chip:hover {
  background: #0F4C3A;
  border-color: #0F4C3A;
  color: #FFFFFF;
}
body[data-theme="dark"] .cs-toc-chip {
  background: #1E293B;
  border-color: rgba(52, 211, 153, 0.35);
  color: #A7F3D0;
}
body[data-theme="dark"] .cs-toc-chip:hover {
  background: #14634C;
  border-color: #F5D77F;
  color: #FEF3C7;
}
body[data-theme="sepia"] .cs-toc-chip {
  background: #FFFDF8;
  border-color: #C7B28A;
  color: #0F4C3A;
}
body[data-theme="sepia"] .cs-toc-chip:hover {
  background: #0F4C3A;
  color: #FFFFFF;
}

.cs-md-content .cs-subhead {
  scroll-margin-top: 132px;
  border-radius: 6px;
  transition: background-color 0.3s ease;
}
.cs-md-content .cs-subhead.is-toc-target-flash {
  background: rgba(251, 191, 36, 0.24);
  padding-left: 6px;
  padding-right: 6px;
}

/* Desktop Table Column Scannability Polish */
@media (min-width: 640px) {
  .cs-md-content table td:first-child {
    min-width: 145px;
    max-width: 245px;
  }
  .cs-md-content td,
  .cs-md-content th {
    padding: 10px 12px;
  }
  .cs-md-content tbody tr:hover {
    background: rgba(15, 76, 58, 0.045);
  }
  body[data-theme="dark"] .cs-md-content tbody tr:hover {
    background: rgba(52, 211, 153, 0.06);
  }
}

/* =========================================================
 * HERO EMERALD BANNER & FILTER CHIP BUTTONS (FISCAL EMERALD)
 * ========================================================= */
.hero-card-emerald {
  background: linear-gradient(135deg, #06281E 0%, #0F4C3A 55%, #14634C 100%);
  color: #FFFFFF;
}

.filter-chip-btn {
  background-color: #FFFFFF;
  border-color: #CBD5E1;
  color: #1E293B;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.filter-chip-btn:hover {
  background-color: #ECFDF5;
  border-color: #0F4C3A;
  color: #06281E;
}

.filter-chip-btn.active {
  background-color: #0F4C3A;
  border-color: #0F4C3A;
  color: #FFFFFF;
}

body[data-theme="sepia"] .filter-chip-btn {
  background-color: #FBF7EC;
  border-color: #D6C7A9;
  color: #2D2618;
}

body[data-theme="sepia"] .filter-chip-btn.active {
  background-color: #0F4C3A;
  border-color: #0F4C3A;
  color: #FFFFFF;
}

body[data-theme="dark"] .filter-chip-btn {
  background-color: #1E293B;
  border-color: #334155;
  color: #E2E8F0;
}

body[data-theme="dark"] .filter-chip-btn:hover {
  background-color: #064E3B;
  border-color: #34D399;
}

body[data-theme="dark"] .filter-chip-btn.active {
  background-color: #14634C;
  border-color: #F5D77F;
  color: #FEF3C7;
}

/* Active toggle states for Exam setup/runner & Settings buttons */
[data-exam-mode].active,
[data-exam-size].active,
[data-exam-timer].active,
[data-runner-mode].active,
[data-theme-btn].active,
[data-font-btn].active,
[data-exam-shuffle].is-on,
[data-exam-autoadv].is-on,
#btn-toggle-exam-case-only.active,
#btn-toggle-exam-calc-only.active,
#btn-runner-autoadv.is-on,
#btn-flag-exam.is-flagged {
  background-color: #0F4C3A !important;
  border-color: #0F4C3A !important;
  color: #FFFFFF !important;
}

body[data-theme="dark"] [data-exam-mode].active,
body[data-theme="dark"] [data-exam-size].active,
body[data-theme="dark"] [data-exam-timer].active,
body[data-theme="dark"] [data-runner-mode].active,
body[data-theme="dark"] [data-theme-btn].active,
body[data-theme="dark"] [data-font-btn].active,
body[data-theme="dark"] [data-exam-shuffle].is-on,
body[data-theme="dark"] [data-exam-autoadv].is-on,
body[data-theme="dark"] #btn-toggle-exam-case-only.active,
body[data-theme="dark"] #btn-toggle-exam-calc-only.active,
body[data-theme="dark"] #btn-runner-autoadv.is-on,
body[data-theme="dark"] #btn-flag-exam.is-flagged {
  background-color: #14634C !important;
  border-color: #F5D77F !important;
  color: #FEF3C7 !important;
}

/* =========================================================
 * POSITION GROUP CONTAINER BOXES & CONTRAST SEPARATORS
 * ========================================================= */
.pos-group-box {
  border-radius: 1rem;
  padding: 13px;
  border: 1.5px solid #B8D4C9;
  background: #EDF5F1;
}

.pos-group-box--general {
  background: linear-gradient(180deg, #F0F7F4 0%, #E5F1EC 100%);
  border-color: #9CC7B7;
}

.pos-group-box--academic {
  background: linear-gradient(180deg, #FFFDF5 0%, #F7F1E1 100%);
  border-color: #DFC78B;
}

.pos-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(15, 76, 58, 0.14);
}

.pos-group-box--academic .pos-group-header {
  border-bottom-color: rgba(180, 125, 17, 0.24);
}

body[data-theme="sepia"] .pos-group-box--general {
  background: #EFE7D8;
  border-color: #D6C5A3;
}

body[data-theme="sepia"] .pos-group-box--academic {
  background: #F4EAD3;
  border-color: #CEB382;
}

body[data-theme="dark"] .pos-group-box--general {
  background: #0F251F;
  border-color: #235344;
}

body[data-theme="dark"] .pos-group-box--academic {
  background: #1C1E15;
  border-color: #6B5720;
}

body[data-theme="dark"] .pos-group-header {
  border-bottom-color: rgba(255, 255, 255, 0.14);
}

body[data-theme="dark"] .pos-group-box--general .pos-group-header span:first-child {
  color: #ECFDF5 !important;
}

body[data-theme="dark"] .pos-group-box--general .pos-group-header span:last-child {
  color: #A7F3D0 !important;
}

body[data-theme="dark"] .pos-group-box--academic .pos-group-header span:first-child {
  color: #FEF3C7 !important;
}

body[data-theme="dark"] .pos-group-box--academic .pos-group-header span:last-child {
  color: #FDE68A !important;
}

body[data-theme="dark"] .pos-summary-banner strong,
body[data-theme="dark"] #active-pos-summary strong {
  color: #FFFFFF !important;
}

body[data-theme="dark"] .pos-summary-banner .pos-qual-details summary {
  color: #FDE68A;
}

body[data-theme="dark"] .pos-summary-banner .pos-qual-details p,
body[data-theme="dark"] .pos-summary-banner .pos-qual-details li {
  color: #E2E8F0 !important;
}

body[data-theme="dark"] #home-subjects-pos-title {
  color: #FDE68A !important;
}

body[data-theme="dark"] #exam-result-panel .text-slate-900,
body[data-theme="dark"] .saas-card h2,
body[data-theme="dark"] .saas-card h3 {
  color: var(--text-main);
}

body[data-theme="dark"] .saas-card p.text-slate-600 {
  color: #CBD5E1;
}

/* =========================================================
 * FORMATTED ANSWER EXPLANATION DISPLAY (.rd-exp-*)
 * ========================================================= */
.rd-exp-body {
  color: #1E293B;
  line-height: 1.72;
}

.rd-exp-p {
  margin: 0 0 0.5rem;
}

.rd-exp-p:last-child {
  margin-bottom: 0;
}

.rd-exp-enum {
  display: inline-block;
  font-family: "Prompt", "Sarabun", sans-serif;
  font-weight: 700;
  color: #0F4C3A;
  background: #D1FAE5;
  border: 1px solid rgba(15, 76, 58, 0.22);
  border-radius: 6px;
  padding: 0 6px;
  margin-right: 4px;
  font-size: 0.9em;
  line-height: 1.45;
}

.rd-exp-num {
  display: inline;
  font-weight: 700;
  color: #78350F;
  background: #FEF3C7;
  border-bottom: 1.5px solid #D97706;
  border-radius: 4px;
  padding: 0 4px;
}

.rd-exp-cite {
  display: inline;
  font-weight: 600;
  color: #475569;
  background: rgba(148, 163, 184, 0.16);
  border-radius: 4px;
  padding: 0 4px;
  font-size: 0.95em;
}

body[data-theme="sepia"] .rd-exp-body {
  color: #2D241E;
}

body[data-theme="sepia"] .rd-exp-enum {
  color: #064E3B;
  background: #E2EFE8;
  border-color: rgba(15, 76, 58, 0.25);
}

body[data-theme="sepia"] .rd-exp-num {
  color: #6C2E09;
  background: #F7E1B5;
  border-bottom-color: #B45309;
}

body[data-theme="sepia"] .rd-exp-cite {
  color: #5C4E44;
  background: rgba(140, 114, 84, 0.15);
}

body[data-theme="dark"] .rd-exp-body {
  color: #E2E8F0;
}

body[data-theme="dark"] .rd-exp-enum {
  color: #6EE7B7;
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(52, 211, 153, 0.4);
}

body[data-theme="dark"] .rd-exp-num {
  color: #FDE68A;
  background: rgba(217, 119, 6, 0.28);
  border-bottom-color: #F59E0B;
}

body[data-theme="dark"] .rd-exp-cite {
  color: #CBD5E1;
  background: rgba(148, 163, 184, 0.18);
}

/* =========================================================
 * MOBILE COLLAPSIBLE ACTIVE POSITION BAR & GROUP TABS
 * ========================================================= */
.mobile-active-pos-bar {
  background: linear-gradient(135deg, #06281E 0%, #0F4C3A 100%);
  border: 1.5px solid rgba(251, 191, 36, 0.58);
  border-radius: 14px;
  padding: 12px 13px;
  color: #FFFFFF;
  box-shadow: 0 10px 24px -12px rgba(6, 40, 30, 0.65);
}

.mobile-active-pos-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: rgba(251, 191, 36, 0.18);
  border: 1px solid rgba(251, 191, 36, 0.48);
  color: #FDE68A;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mobile-pos-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 11px;
  min-height: 36px;
  border-radius: 11px;
  background: #FBBF24;
  color: #06281E;
  font-family: "Prompt", sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.mobile-pos-toggle-btn:hover {
  background: #FCD34D;
}

.mobile-pos-toggle-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9999px;
  background: #06281E;
  color: #FDE68A;
  font-size: 10.5px;
  font-weight: 800;
}

.mobile-pos-toggle-chevron {
  transition: transform 0.18s ease;
}

.mobile-pos-toggle-btn[aria-expanded="true"] .mobile-pos-toggle-chevron {
  transform: rotate(180deg);
}

@media (max-width: 1023px) {
  .home-pos-picker-body.is-mobile-collapsed {
    display: none;
  }
  .home-pos-picker-body:not(.is-mobile-collapsed) {
    display: block;
    padding-top: 4px;
    animation: rdFadeSlideDown 0.18s ease-out;
  }
}

@keyframes rdFadeSlideDown {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pos-group-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  padding: 4px;
  border-radius: 12px;
  background: #E2EFEA;
  border: 1px solid #B8D4C9;
}

.pos-group-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 9px;
  font-family: "Prompt", sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #1E293B;
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.pos-group-tab:hover {
  background: rgba(255, 255, 255, 0.7);
  color: #06281E;
}

.pos-group-tab.active {
  background: #0F4C3A;
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(15, 76, 58, 0.25);
}

.pos-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 17px;
  padding: 0 5px;
  border-radius: 9999px;
  font-size: 10.5px;
  font-weight: 700;
  background: rgba(15, 76, 58, 0.12);
  color: #0F4C3A;
}

.pos-group-tab.active .pos-tab-count {
  background: rgba(251, 191, 36, 0.22);
  color: #FDE68A;
}

body[data-theme="sepia"] .pos-group-tabs {
  background: #ECE2CE;
  border-color: #C7B28A;
}

body[data-theme="sepia"] .pos-group-tab {
  color: #3F3326;
}

body[data-theme="sepia"] .pos-group-tab.active {
  background: #0F4C3A;
  color: #FFFFFF;
}

body[data-theme="dark"] .pos-group-tabs {
  background: #0F172A;
  border-color: #334155;
}

body[data-theme="dark"] .pos-group-tab {
  color: #CBD5E1;
}

body[data-theme="dark"] .pos-group-tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
}

body[data-theme="dark"] .pos-group-tab.active {
  background: #14634C;
  color: #FEF3C7;
}

body[data-theme="dark"] .pos-tab-count {
  background: rgba(255, 255, 255, 0.12);
  color: #CBD5E1;
}

body[data-theme="dark"] .pos-group-tab.active .pos-tab-count {
  background: rgba(251, 191, 36, 0.24);
  color: #FDE68A;
}
