* { margin: 0; padding: 0; box-sizing: border-box; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
body {
  font-family: 'Poppins', sans-serif;
  background: #e8edf5;
  min-height: 100vh;
  padding: 20px 10px;
  color: #1a3a5c;
}
a { text-decoration: none; color: inherit; }
.phone {
  max-width: 360px;
  margin: 0 auto;
  background: #fff;
  border-radius: 28px;
  overflow-x: hidden;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.13);
  min-height: 88vh;
  height: 100vh;
  display: flex;
  flex-direction: column;
}
.top-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 10px; background: #fff;
  position: sticky;
  top: 0;
  z-index: 35;
  border-bottom: 1px solid #eef2f7;
}
.logo { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 15px; color: #1a3a5c; }
.logo-icon { font-size: 22px; }
.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.theme-toggle {
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}
.theme-toggle-track {
  display: block;
  width: 52px;
  height: 28px;
  border-radius: 999px;
  background: #c5cad3;
  position: relative;
  transition: background 0.22s ease;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
}
.theme-toggle-knob {
  position: absolute;
  left: 3px;
  top: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  transition: transform 0.22s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.theme-toggle-svg {
  display: block;
  flex-shrink: 0;
}
.theme-toggle-svg-moon {
  display: none;
}
html[data-theme="dark"] .theme-toggle-track {
  background: #3d4a5c;
}
html[data-theme="dark"] .theme-toggle-knob {
  transform: translateX(24px);
}
html[data-theme="dark"] .theme-toggle-svg-sun {
  display: none;
}
html[data-theme="dark"] .theme-toggle-svg-moon {
  display: block;
}
.hamburger { font-size: 20px; color: #333; background: transparent; border: 0; cursor: pointer; }
.nav-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  z-index: 60;
}
.nav-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: min(92%, 360px);
  height: 100%;
  min-height: 0;
  background: #ffffff;
  box-shadow: -8px 0 28px rgba(0, 0, 0, 0.16);
  transform: translateX(100%);
  transition: transform 0.26s ease;
  z-index: 70;
  display: flex;
  flex-direction: column;
}
.nav-drawer-header {
  flex-shrink: 0;
  padding: 16px 14px;
  border-bottom: 1px solid #edf0f7;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-drawer-title { font-size: 16px; font-weight: 700; color: #1a3a5c; }
.nav-close {
  border: 0;
  background: transparent;
  font-size: 20px;
  color: #334155;
  cursor: pointer;
}
.nav-drawer-links {
  display: flex;
  flex-direction: column;
  padding: 8px 0;
}
.nav-drawer-links a {
  padding: 14px 16px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 14px;
  font-weight: 500;
  color: #1e293b;
}
.nav-drawer-links a:hover {
  background: #f8fbff;
  color: #1a6fd4;
}
/* Guest menu: calmer list + clear account actions */
.nav-drawer-links--guest a:not(.nav-drawer-cta) {
  border-bottom: 0;
  margin: 0 10px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: #334155;
}
.nav-drawer-links--guest a:not(.nav-drawer-cta):hover {
  background: #f1f5f9;
  color: #1a6fd4;
}
.nav-drawer-links--guest .nav-drawer-cta {
  margin: 0 10px;
  border-radius: 12px;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  border-bottom: 0;
  letter-spacing: 0.02em;
}
.nav-drawer-links--guest .nav-drawer-cta--primary {
  margin-top: 14px;
  padding: 12px 16px;
  background: linear-gradient(90deg, #1a6fd4, #1e87f0);
  color: #fff;
}
.nav-drawer-links--guest .nav-drawer-cta--primary:hover {
  filter: brightness(1.05);
  color: #fff;
}
.nav-drawer-links--guest .nav-drawer-cta--secondary {
  padding: 11px 16px;
  background: #fff;
  color: #1a6fd4;
  border: 1.5px solid #bfdbfe;
}
.nav-drawer-links--guest .nav-drawer-cta--secondary:hover {
  background: #eff6ff;
  color: #1557b0;
}
/* Logged-in menu: two sections, scrollable list */
.nav-drawer-links--member {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 6px 0 18px;
}
.nav-drawer-links--member .nav-drawer-section {
  padding: 2px 0 8px;
}
.nav-drawer-links--member .nav-drawer-section + .nav-drawer-section {
  border-top: 1px solid #eef2f7;
  margin-top: 6px;
  padding-top: 14px;
}
.nav-drawer-links--member .nav-drawer-section__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
  padding: 6px 16px 8px;
  line-height: 1.2;
}
.nav-drawer-links--member .nav-drawer-section__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 10px;
}
.nav-drawer-links--member .nav-drawer-section__list a {
  border-bottom: 0;
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: #334155;
}
.nav-drawer-links--member .nav-drawer-section__list a:hover {
  background: #f1f5f9;
  color: #1a6fd4;
}
.nav-drawer-links--member .nav-drawer-link--admin {
  font-weight: 600;
  color: #0f766e;
}
.nav-drawer-links--member .nav-drawer-link--admin:hover {
  background: #ecfdf5;
  color: #0d9488;
}
.nav-drawer-links--member .nav-drawer-link--logout {
  margin-top: 8px;
  font-weight: 600;
  color: #b91c1c;
}
.nav-drawer-links--member .nav-drawer-link--logout:hover {
  background: #fef2f2;
  color: #991b1b;
}
.phone.nav-open .nav-overlay {
  opacity: 1;
  pointer-events: auto;
}
.phone.nav-open .nav-drawer {
  transform: translateX(0);
}
.screen-content { padding: 0 14px; }
.btn-primary, .btn {
  background: linear-gradient(90deg, #1a6fd4, #1e87f0);
  color: #fff; border: none; border-radius: 30px; padding: 12px 16px;
  font-size: 14px; font-weight: 600; cursor: pointer; display: inline-flex; justify-content: center; align-items: center;
}
.btn-full { width: 100%; }

/* Question post: title + bookmark on one row (bookmark right) */
.question-post-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px 12px;
  margin-bottom: 12px;
}
.question-post-title {
  font-size: 20px;
  line-height: 1.35;
  font-weight: 700;
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  color: #0f172a;
}
.bookmark-toggle-form {
  margin: 0;
  flex: 0 0 auto;
  align-self: flex-start;
}
.btn-bookmark {
  width: auto;
  max-width: 100%;
  padding: 4px 8px 4px 9px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  gap: 4px;
  background: #f8fafc;
  color: #1a6fd4;
  border: 1px solid #cfe4fc;
  box-shadow: none;
}
.btn-bookmark-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.5px;
}
.btn-bookmark-ico svg {
  display: block;
}
.btn-bookmark:hover {
  background: #eff6ff;
  border-color: #93c5fd;
}
.btn-bookmark.is-bookmarked {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}
.btn-bookmark.is-bookmarked:hover {
  background: #d1fae5;
  border-color: #6ee7b7;
}

.btn-white {
  background: #fff; color: #1a6fd4; border: none; border-radius: 30px; padding: 8px 16px;
  font-size: 12px; font-weight: 600; cursor: pointer;
}
.ad-slot {
  border: 0;
  background: transparent;
  border-radius: 0;
  text-align: center;
  padding: 8px 0;
  margin: 8px 14px;
  font-size: 11px;
  font-weight: 400;
  color: #64748b;
  line-height: 1.4;
}
.ad-slot.bottom { margin: 0; border-radius: 0; border-left: none; border-right: none; border-bottom: none; padding: 9px; }
.ad-label { color: #64748b; font-weight: 600; margin-bottom: 2px; }
.ad-body img { max-width: 100%; border-radius: 8px; }
.welcome-hero {
  background: linear-gradient(180deg, #d6eaff 0%, #eaf4ff 60%, #fff 100%);
  padding: 20px 20px 10px;
  text-align: center;
  min-height: 180px;
}
.welcome-hero .quran { font-size: 68px; }
.welcome-text { padding: 0 20px 10px; text-align: center; }
.welcome-text .welcome-salam {
  font-size: 15px;
  font-weight: 600;
  color: #1a3a5c;
  margin: 0 0 6px;
  letter-spacing: 0.02em;
}
.welcome-text p { font-size: 14px; color: #555; margin-bottom: 4px; }
.welcome-text p:not(.welcome-salam) { margin-top: 0; }
.welcome-text h2 { font-size: 32px; font-weight: 800; color: #1a6fd4; margin-bottom: 4px; }
.tagline { font-size: 12px; color: #888; margin-bottom: 14px; }
.or-text, .signin-link { text-align: center; font-size: 12px; color: #888; margin-top: 8px; }
.signin-link a { color: #1a6fd4; font-weight: 600; }
.page-welcome .welcome-signin {
  font-size: 13px;
  color: #64748b;
  margin-top: 10px;
  line-height: 1.5;
}
.page-welcome .welcome-signin a {
  display: inline-block;
  margin-left: 4px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #1a6fd4;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid #bfdbfe;
  background: #fff;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.page-welcome .welcome-signin a:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1557b0;
}
.welcome-legal {
  padding: 8px 16px 18px;
  margin-top: 4px;
}
.welcome-legal-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px 0;
}
.welcome-legal-list li {
  display: inline-flex;
  align-items: center;
}
.welcome-legal-list li:not(:last-child)::after {
  content: "";
  display: block;
  width: 4px;
  height: 4px;
  margin: 0 14px;
  border-radius: 50%;
  background: #cbd5e1;
  flex-shrink: 0;
}
.welcome-legal-list a {
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
  text-decoration: none;
  padding: 8px 6px;
  border-radius: 8px;
  letter-spacing: 0.02em;
  transition: color 0.15s ease, background 0.15s ease;
}
.welcome-legal-list a:hover {
  color: #1a6fd4;
  background: rgba(26, 111, 212, 0.08);
}
.features-row { display: flex; justify-content: space-around; padding: 14px 16px 10px; }
.feature-item { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; max-width: 80px; }
.feature-item .icon { font-size: 22px; }
.feature-item .label { font-size: 10px; font-weight: 600; color: #1a3a5c; }
.feature-item .desc { font-size: 9px; color: #888; line-height: 1.3; }
.home-header { padding: 10px 16px 12px; display: flex; align-items: flex-start; justify-content: space-between; }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: #e0e7ff; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.user-info { display: flex; align-items: center; gap: 10px; }
.greeting h3 { font-size: 15px; font-weight: 700; color: #1a3a5c; }
.greeting p { font-size: 11px; color: #888; }
.stats-row { display: flex; gap: 24px; padding: 0 16px 14px; }
.stat-box { display: flex; align-items: center; gap: 6px; }
.stat-box .lbl { font-size: 10px; color: #888; }
.stat-box .val { font-size: 18px; font-weight: 700; }
.daily-challenge {
  background: linear-gradient(90deg, #1a6fd4, #2196f3); border-radius: 14px; margin: 0 14px 14px; padding: 14px 16px;
  display: flex; justify-content: space-between; color: #fff;
}
.daily-challenge h4 { font-size: 14px; font-weight: 700; }
.daily-challenge p { font-size: 11px; opacity: 0.9; margin-bottom: 8px; }
.trophy { font-size: 40px; }
.category-header { display: flex; align-items: center; justify-content: space-between; padding: 0 16px 10px; }
.category-header h4 { font-size: 14px; font-weight: 700; }
.category-header a { font-size: 12px; color: #1a6fd4; }
.category-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 0 14px; }
.cat-item { text-align: center; }
.cat-icon { font-size: 26px; margin-bottom: 2px; }
.cat-name { font-size: 11px; font-weight: 600; line-height: 1.2; }
.cat-count { font-size: 9px; color: #888; }

.home-v2 .home-header { padding-top: 8px; padding-bottom: 10px; }
.home-v2 .avatar {
  width: 52px;
  height: 52px;
  font-size: 16px;
  font-weight: 800;
  color: #1a3a5c;
  background: #e8f1ff;
}
.home-v2 .greeting h3 { font-size: 24px; font-weight: 700; }
.home-v2 .greeting p { font-size: 14px; color: #7b8799; }
.home-v2 .home-bell {
  font-size: 22px;
  color: #4b5563;
  margin-top: 8px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  border-radius: 10px;
  -webkit-tap-highlight-color: transparent;
}
.home-v2 .home-bell:hover {
  background: rgba(26, 111, 212, 0.08);
  color: #1a6fd4;
}
.home-v2 .home-bell:focus-visible {
  outline: 2px solid #1a6fd4;
  outline-offset: 2px;
}

.home-stats-card {
  margin: 0 14px 14px;
  border: 1px solid #edf1fa;
  border-radius: 14px;
  background: #fff;
  padding: 12px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(2, 6, 23, 0.04);
}
.home-stat-item {
  display: flex;
  align-items: center;
  gap: 10px;
}
.home-stat-icon { font-size: 24px; }
.home-stat-sep { width: 1px; height: 36px; background: #edf1fa; }

.home-v2 .daily-challenge {
  margin: 0 14px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, #1266d9 0%, #1e8bf2 100%);
  box-shadow: 0 8px 20px rgba(33, 105, 207, 0.28);
}
.home-v2 .daily-challenge h4 { font-size: 15px; }
.home-v2 .daily-challenge p { font-size: 12px; line-height: 1.35; }
.home-v2 .btn-white {
  border-radius: 20px;
  padding: 8px 16px;
  font-weight: 700;
}
.home-v2 .trophy { font-size: 54px; }

.home-v2 .category-header { padding-bottom: 8px; }
.home-v2 .category-header h4 { font-size: 18px; }
.home-v2 .category-grid { gap: 10px; }
.home-v2 .cat-item {
  border: 1px solid #eef2fb;
  border-radius: 14px;
  background: #fff;
  padding: 10px 8px;
  box-shadow: 0 4px 12px rgba(2, 6, 23, 0.10);
  display: block;
}
.home-v2 .cat-icon { font-size: 28px; }
.home-v2 .cat-name { font-size: 12px; margin-top: 2px; }
.home-v2 .cat-count { font-size: 10px; margin-top: 2px; }
.quiz-header { padding: 12px 16px; display: flex; align-items: center; gap: 12px; }
.back-btn { font-size: 20px; }
.progress-bar-wrap { flex: 1; height: 8px; background: #e0e7f0; border-radius: 10px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, #1a6fd4, #2196f3); }
.progress-count { font-size: 13px; font-weight: 600; min-width: 36px; text-align: right; }
.timer-circle {
  width: 70px; height: 70px; border-radius: 50%; border: 4px solid #e0e7f0; display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700; margin: 8px auto 14px;
}
.timer-circle.is-paused {
  opacity: 0.45;
  font-size: 18px;
}
.question-box {
  background: #f5f8ff; border-radius: 14px; margin: 0 14px 14px; padding: 18px 16px; font-size: 15px; font-weight: 600; text-align: center;
}
.quiz-feedback {
  margin: 0 14px 12px;
  padding: 10px 12px;
  border: 1px solid #dbe7ff;
  background: #f8fbff;
  font-size: 17px;
  line-height: 1.45;
  color: #1e3a8a;
}
.quiz-feedback.ok {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}
.quiz-feedback.bad {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}
.quiz-feedback-desc {
  margin-top: 6px;
  font-size: 15px;
  line-height: 1.45;
}

/* Single answer summary on question permalink (no duplicate card + feedback) */
.question-post-result {
  margin-bottom: 10px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  text-align: left;
}
.question-post-result--ok {
  border-color: #86efac;
  background: #fff;
  box-shadow: inset 0 3px 0 0 #22c55e;
}
.question-post-result--bad {
  border-color: #fecaca;
  background: #fff;
  box-shadow: inset 0 3px 0 0 #ef4444;
}
.question-post-result__head {
  padding: 12px 14px 10px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.question-post-result--ok .question-post-result__head {
  background: #f0fdf4;
  border-bottom-color: #dcfce7;
}
.question-post-result--bad .question-post-result__head {
  background: #fef2f2;
  border-bottom-color: #fee2e2;
}
.question-post-result__status {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.question-post-result--ok .question-post-result__status {
  color: #166534;
}
.question-post-result--bad .question-post-result__status {
  color: #991b1b;
}
.question-post-result__sub {
  font-size: 13px;
  color: #64748b;
  line-height: 1.4;
}
.question-post-result__body {
  padding: 14px 16px 16px;
}
.question-post-result__answer-block {
  margin: 0 0 12px;
}
.question-post-result__k {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 4px;
  line-height: 1.3;
}
.question-post-result__v {
  display: block;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  color: #0f172a;
}
.question-post-result--ok .question-post-result__v {
  color: #14532d;
}
.question-post-result--bad .question-post-result__v {
  color: #7f1d1d;
}
.question-post-result__explain {
  font-size: 17px;
  line-height: 1.5;
  color: #334155;
}

.question-post-related {
  padding: 14px 16px 16px;
  text-align: left;
}
.question-post-related__title {
  font-size: 14px;
  font-weight: 700;
  color: #334155;
  margin: 0 0 10px;
}
.question-post-related__list {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 15px;
  line-height: 1.65;
  color: #334155;
}
.question-post-related__list a {
  color: #1a6fd4;
  text-decoration: none;
}
.question-post-related__list a:hover {
  text-decoration: underline;
}

.question-post-nav-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 12px;
}
.question-post-nav-btn {
  flex: 1 1 calc(50% - 5px);
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 12px;
  line-height: 1.25;
  text-align: center;
}
.question-post-nav-btn .question-post-nav-ico {
  flex-shrink: 0;
}
.question-post-nav-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Question post: “Back to All Questions” — transparent, 1px blue border, black text */
.question-post-nav-btn--back.btn-outline-secondary {
  background: transparent !important;
  color: #000;
  border: 1px solid #1a6fd4;
}
.question-post-nav-btn--back.btn-outline-secondary:hover {
  background: rgba(26, 111, 212, 0.1) !important;
  color: #000;
  border: 1px solid #1a6fd4;
}
.question-post-nav-btn--back.btn-outline-secondary:focus-visible {
  border: 1px solid #1a6fd4;
  box-shadow: 0 0 0 0.2rem rgba(26, 111, 212, 0.28);
}

.options-list { padding: 0 14px; display: flex; flex-direction: column; gap: 10px; }
.option-item { border: 2px solid #e0e7f0; border-radius: 12px; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; font-size: 13px; cursor: pointer; user-select: none; }
.options-list .option-item:last-child { margin-bottom: 20px; }
.option-item.is-selected-readonly {
  border-color: #93c5fd;
  background: #f0f9ff;
}
.option-text { flex: 1; padding-right: 10px; }
.option-radio {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #1a6fd4;
  flex-shrink: 0;
}
.result-body { background: #f8f9ff; flex: 1; display: flex; flex-direction: column; align-items: center; padding: 14px 20px 10px; text-align: center; }
.trophy-big { font-size: 72px; margin-bottom: 6px; }
.result-title { font-size: 20px; font-weight: 800; }
.result-subtitle { font-size: 13px; color: #888; margin-bottom: 16px; }
.result-stats { display: flex; gap: 20px; justify-content: center; margin-bottom: 16px; }
.result-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.result-stat .rs-val { font-size: 18px; font-weight: 700; }
.result-stat .rs-lbl { font-size: 10px; color: #888; }
.leaderboard-title { text-align: center; font-size: 17px; font-weight: 700; color: #1a3a5c; padding: 4px 0 10px; }
.lb-podium {
  background: linear-gradient(180deg, #1a6fd4 0%, #2196f3 100%);
  border-radius: 18px; margin: 0 14px 12px; padding: 16px 12px 20px; display: flex; justify-content: center; gap: 10px;
}
.podium-person { display: flex; flex-direction: column; align-items: center; color: #fff; gap: 4px; }
.p-avatar { width: 46px; height: 46px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; }
.lb-list { padding: 0 14px; }
.lb-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f0f0f0; }
.lb-rank { font-size: 13px; font-weight: 700; color: #888; min-width: 16px; }
.lb-avatar { width: 32px; height: 32px; border-radius: 50%; background: #e0e7ff; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.lb-name { flex: 1; font-size: 13px; font-weight: 600; }
.lb-score { font-size: 13px; font-weight: 700; color: #1a6fd4; }
.leaderboard-v2 {
  padding-top: 8px;
  padding-bottom: 8px;
}
.leaderboard-v2 .leaderboard-title {
  padding: 2px 0 10px;
  font-size: 31px;
}
.lb-filter-tabs {
  margin: 0 4px 10px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid #e9edf5;
  background: #fff;
  overflow: hidden;
}
.lb-tab {
  border: 0;
  background: #fff;
  color: #475569;
  padding: 8px 6px;
  font-size: 12px;
  font-weight: 600;
  border-right: 1px solid #eef2f7;
  text-decoration: none;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}
a.lb-tab { color: #475569; }
.lb-tab:last-child { border-right: 0; }
.lb-tab.is-active {
  background: linear-gradient(90deg, #1b72da, #2c92f6);
  color: #fff;
}
.lb-top-card {
  margin: 0 0 10px;
  background: linear-gradient(180deg, #2f95f5 0%, #167be3 100%);
  padding: 16px 10px 14px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
  gap: 10px;
}
.lb-top-person {
  position: relative;
  text-align: center;
  color: #fff;
  padding-top: 6px;
}
.lb-top-person.is-first { order: 2; }
.lb-top-person.is-second { order: 1; }
.lb-top-person.is-third { order: 3; }
.lb-crown {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 18px;
}
.lb-top-avatar {
  width: 58px;
  height: 58px;
  margin: 0 auto 6px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.9);
  background: #e2ebf7;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
}
.lb-top-person.is-first .lb-top-avatar {
  width: 72px;
  height: 72px;
  border-color: #ffd36f;
  font-size: 28px;
}
.lb-top-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 2px;
}
.lb-top-score {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
}
.lb-top-rank {
  width: 20px;
  height: 20px;
  margin: 6px auto 0;
  border-radius: 50%;
  background: #f59e0b;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}
.lb-list-card {
  background: #fff;
  border: 1px solid #ecf0f6;
}
.lb-v2-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 10px;
  border-bottom: 1px solid #eef2f7;
}
.lb-v2-row:last-child { border-bottom: 0; }
.lb-v2-rank {
  min-width: 18px;
  font-size: 13px;
  font-weight: 700;
  color: #7b8799;
}
.lb-v2-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #e8eef8;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}
.lb-v2-name {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
}
.lb-v2-score {
  font-size: 14px;
  font-weight: 700;
  color: #1b72da;
}
.lb-ad-wrap {
  padding: 6px 12px 0;
}
.lb-ad-wrap .ad-slot {
  margin: 0;
  border: 2px dashed #fecaca;
  background: #fff5f5;
  padding: 10px 8px;
}
.history-v2 {
  padding-top: 8px;
  padding-bottom: 12px;
}
.history-v2 .leaderboard-title {
  padding: 2px 0 6px;
}
.history-subtitle {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 10px;
}
.history-list-card {
  border: 1px solid #e9eef7;
  background: #fff;
}
.history-row {
  padding: 11px 10px;
  border-bottom: 1px solid #eef2f7;
}
.history-row:last-child { border-bottom: 0; }
.history-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.history-id {
  font-size: 11px;
  font-weight: 700;
  color: #3b82f6;
}
.history-date {
  font-size: 11px;
  color: #64748b;
}
.history-category {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 6px;
}
.history-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.history-correct {
  font-size: 12px;
  color: #475569;
}
.history-accuracy {
  min-width: 48px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border: 1px solid transparent;
}
.history-accuracy.good {
  color: #166534;
  background: #f0fdf4;
  border-color: #86efac;
}
.history-accuracy.avg {
  color: #92400e;
  background: #fffbeb;
  border-color: #fcd34d;
}
.history-accuracy.low {
  color: #991b1b;
  background: #fef2f2;
  border-color: #fecaca;
}
.history-empty {
  padding: 16px 12px;
  font-size: 13px;
  color: #64748b;
}
.question-post-link {
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  color: #1a6fd4;
  border: 1px solid #dbe7ff;
  background: #f8fbff;
  padding: 10px 12px;
}
.question-post-link:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
}
.questions-v2 {
  padding-bottom: 10px;
}
.questions-v2-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}
.questions-v2-title {
  font-size: 19px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 3px;
}
.questions-v2-subtitle {
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
}
.questions-v2-counter {
  min-width: 46px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #1a6fd4;
  border: 1px solid #dbe7ff;
  background: #f8fbff;
  padding: 5px 8px;
}
.questions-v2-progress {
  height: 6px;
  border: 1px solid #e5edf8;
  background: #f8fbff;
  margin-bottom: 12px;
  overflow: hidden;
}
.questions-v2-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #1b72da, #2c92f6);
}
.questions-v2-card {
  border: 1px solid #e9eef7;
  padding: 12px;
  background: #fff;
}
.questions-v2-category {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  padding: 4px 8px;
  margin-bottom: 8px;
}
.questions-v2-question {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  color: #0f172a;
  margin-bottom: 10px;
}
.questions-v2-form .option-item {
  border-color: #dbe4f0;
  background: #fff;
}
.questions-v2-form .option-item:hover {
  border-color: #bcd0ec;
  background: #f8fbff;
}

/* Browse all questions (questions.php) */
.questions-browse {
  padding-bottom: 16px;
}
.questions-browse-main {
  padding-top: 12px;
}
.questions-browse-intro {
  background: linear-gradient(135deg, #eef6ff 0%, #f8fafc 48%, #f0fdf9 100%);
  border: 1px solid #dce7f5;
  border-radius: 18px;
  padding: 16px 14px 18px;
  margin-bottom: 16px;
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.07);
}
.questions-browse-bc {
  font-size: 11px;
  color: #475569;
  margin-bottom: 12px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 12px;
}
.questions-browse-bc ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 0;
  margin: 0;
}
.questions-browse-bc li {
  display: inline;
}
.questions-browse-bc li:not([aria-current])::after {
  content: "›";
  margin-left: 6px;
  color: #94a3b8;
  font-weight: 600;
}
.questions-browse-bc a {
  color: #1a6fd4;
  font-weight: 600;
}
.questions-browse-bc a:hover {
  text-decoration: underline;
}
.questions-browse-bc [aria-current="page"] {
  color: #0f172a;
  font-weight: 700;
}
.questions-browse-head {
  margin-bottom: 0;
  opacity: 0;
  animation: qb-topfade 0.52s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.questions-browse-page-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #1d4ed8;
  margin: 0 0 10px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #bfdbfe;
  border-radius: 999px;
}
.questions-browse-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
  margin: 0 0 8px;
  line-height: 1.25;
}
.questions-browse-lead {
  font-size: 13px;
  color: #475569;
  line-height: 1.55;
  margin: 0;
}
.questions-browse-lead a {
  color: #1a6fd4;
  font-weight: 600;
}
.questions-browse-lead a:hover {
  text-decoration: underline;
}
/* Stacked cards — clean list, no heavy outer box */
.questions-browse-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.questions-browse-item {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  animation: qb-topfade 0.48s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: min(0.95s, calc(0.06s + (var(--qb-stagger, 1) - 1) * 0.055s));
}
.questions-browse-link {
  display: grid;
  grid-template-columns: 2.5rem 1fr auto;
  grid-template-rows: auto auto;
  gap: 5px 12px;
  padding: 14px 14px 14px 12px;
  align-items: start;
  background: #fff;
  border: 1px solid #e8eef7;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}
.questions-browse-link:hover {
  transform: translateY(-2px);
  border-color: #c7d2fe;
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.12);
  background: linear-gradient(180deg, #fff 0%, #fafdff 100%);
}
.questions-browse-num {
  grid-column: 1;
  grid-row: 1 / -1;
  align-self: center;
  justify-self: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: #1d4ed8;
  background: linear-gradient(165deg, #fff, #eff6ff);
  border: 2px solid #93c5fd;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
}
.questions-browse-cat {
  grid-column: 2;
  grid-row: 1;
  justify-self: start;
  display: inline-block;
  max-width: 100%;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.35px;
  line-height: 1.25;
  color: #fff;
  background: #2563eb;
  border: 1px solid #1d4ed8;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}
.questions-browse-q {
  grid-column: 2;
  grid-row: 2;
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.4;
}
.questions-browse-arrow {
  grid-column: 3;
  grid-row: 1 / -1;
  align-self: center;
  font-size: 18px;
  color: #1a6fd4;
  line-height: 1.2;
  opacity: 0.75;
  transition: transform 0.18s ease, opacity 0.18s ease;
}
.questions-browse-link:hover .questions-browse-arrow {
  transform: translateX(4px);
  opacity: 1;
}
@keyframes qb-topfade {
  from {
    opacity: 0;
    transform: translate3d(0, -16px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .questions-browse-link,
  .questions-browse-link:hover,
  .questions-browse-arrow,
  .questions-browse-link:hover .questions-browse-arrow {
    transition: none;
    transform: none;
  }
  .questions-browse-head,
  .questions-browse-item,
  .questions-browse-pager {
    animation: none !important;
    opacity: 1;
    transform: none;
  }
}
.questions-browse-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
  padding: 12px 14px;
  background: linear-gradient(180deg, #f8fafc, #f1f5f9);
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  opacity: 0;
  animation: qb-topfade 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.38s forwards;
}
.questions-browse-page-meta {
  font-size: 12px;
  color: #475569;
  font-weight: 700;
  padding: 4px 10px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.profile-header { display: flex; flex-direction: column; align-items: center; padding: 12px 16px 14px; }
.profile-avatar { width: 64px; height: 64px; border-radius: 50%; background: #e0e7ff; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; color: #1a3a5c; margin-bottom: 8px; }
.profile-name { font-size: 17px; font-weight: 700; }
.profile-email { font-size: 12px; color: #888; margin-bottom: 10px; }
.profile-stats { display: flex; gap: 30px; justify-content: center; margin-bottom: 10px; }
.menu-list { padding: 0 14px; }
.menu-item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid #f0f0f0; }
.m-label { flex: 1; font-size: 13px; font-weight: 500; }
.logout .m-label { color: #e53935; }
.bottom-nav { display: flex; border-top: 1px solid #eee; background: #fff; padding: 8px 0 10px; margin-top: auto; }
.bottom-nav .nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10px; color: #999; }
.bottom-nav .nav-item.active { color: #1a6fd4; font-weight: 600; }
.nav-ico { font-size: 18px; line-height: 1; }
.auth-wrap {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 18px 14px 20px;
}
.auth-title {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 4px;
}
.auth-subtitle {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 14px;
}
.auth-form {
  display: flex;
  flex-direction: column;
}
.auth-form label {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}
.auth-footnote {
  margin-top: 10px;
  font-size: 12px;
  color: #64748b;
}
.auth-footnote a {
  color: #1a6fd4;
  font-weight: 600;
}
.auth-footnote--centered {
  text-align: center;
  margin-top: 16px;
  padding-top: 4px;
}
.auth-footnote--centered a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #1a6fd4;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid #bfdbfe;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.auth-footnote--centered a:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1557b0;
  box-shadow: 0 2px 6px rgba(26, 111, 212, 0.12);
}
.success-wrap {
  text-align: center;
  padding-top: 28px;
}
.success-circle {
  width: 86px;
  height: 86px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  background: linear-gradient(180deg, #e8fff2, #d2f8e4);
  border: 1px solid #a8e5c4;
  animation: popIn 450ms ease-out;
}
.success-burst {
  display: flex;
  justify-content: center;
  gap: 10px;
  font-size: 22px;
  margin-bottom: 8px;
}
.success-burst span {
  display: inline-block;
  animation: floatConfetti 1.2s ease-in-out infinite;
}
.success-burst span:nth-child(2) { animation-delay: .15s; }
.success-burst span:nth-child(3) { animation-delay: .30s; }

@keyframes popIn {
  0% { transform: scale(0.65); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes floatConfetti {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
.input, select, textarea { width: 100%; padding: 10px; border-radius: 8px; border: 1px solid #cad7f5; margin: 6px 0 12px; font-family: inherit; }
.alert { padding: 10px; border-radius: 8px; margin-bottom: 10px; font-size: 12px; }
.alert-danger { background: #ffe6e6; color: #b42318; }
.alert-success { background: #e8f7ed; color: #067647; }

/* Flat mobile app mode: remove rounded-card system */
body {
  background: #ffffff;
  padding: 0;
}

.phone {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  height: 100vh;
  margin: 0 auto;
  border-radius: 0;
  box-shadow: none;
  position: relative;
}

.top-bar,
.welcome-hero,
.daily-challenge,
.question-box,
.ad-slot,
.btn,
.btn-primary,
.btn-white,
.input,
select,
textarea,
.option-item,
.timer-circle,
.profile-avatar,
.avatar,
.lb-podium,
.p-avatar,
.lb-avatar,
.alert {
  border-radius: 0;
}

.phone .btn.btn-bookmark {
  border-radius: 6px;
}

.ad-slot {
  margin: 10px 0;
  border-left: none;
  border-right: none;
}

.screen-content,
.auth-wrap {
  padding-left: 12px;
  padding-right: 12px;
}

@media (max-width: 420px) {
  .auth-wrap {
    padding-top: 14px;
    padding-bottom: 16px;
  }
  .auth-title {
    font-size: 20px;
  }
}

.bottom-nav {
  position: sticky;
  bottom: 0;
  z-index: 30;
  border-top: 1px solid #eef2f7;
}

/* Keep avatars circular even in flat mode */
.profile-avatar,
.avatar,
.lb-avatar,
.p-avatar {
  border-radius: 50% !important;
}

/* ----- Global skeleton + perceived performance (CWV-friendly) ----- */
.phone {
  contain: layout style;
}

.app-skeleton-layer {
  position: absolute;
  left: 0;
  right: 0;
  top: 57px;
  bottom: 0;
  z-index: 40;
  background: #fff;
  overflow: hidden;
  pointer-events: none;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.22s ease, visibility 0s linear 0s;
}

html.app-ready .app-skeleton-layer {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0s linear 0.22s;
}

.app-skeleton-inner {
  padding: 12px 12px 20px;
  max-width: 100%;
}

.sk-mb { margin-bottom: 14px; }
.sk-mb-sm { margin-bottom: 8px; }

.sk-line,
.sk-card,
.sk-circle {
  position: relative;
  overflow: hidden;
  background: #e8eef5;
}

.sk-line::after,
.sk-card::after,
.sk-circle::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.55),
    transparent
  );
  animation: sk-shimmer 1.35s ease-in-out infinite;
}

.sk-line {
  height: 12px;
  border-radius: 2px;
}

.sk-line--lg { width: 55%; height: 16px; }
.sk-line--md { width: 40%; }
.sk-line--sm { width: 28%; height: 10px; }
.sk-line--full { width: 100%; }
.sk-line--90 { width: 90%; }
.sk-line--70 { width: 70%; }

.sk-card {
  min-height: 120px;
  padding: 12px;
  border: 1px solid #eef2f7;
}

.sk-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sk-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sk-col {
  flex: 1;
  min-width: 0;
}

@keyframes sk-shimmer {
  100% {
    transform: translateX(100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sk-line::after,
  .sk-card::after,
  .sk-circle::after {
    animation: none;
  }
  .app-skeleton-layer {
    transition: none;
  }
  html.app-ready .app-skeleton-layer {
    transition: none;
  }
}

/* Reusable skeleton utilities (lists, cards, async blocks) */
.skeleton,
.sk-block {
  position: relative;
  overflow: hidden;
  background: #e8eef5;
  border-radius: 2px;
}

.skeleton::after,
.sk-block::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.5),
    transparent
  );
  animation: sk-shimmer 1.35s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .skeleton::after,
  .sk-block::after {
    animation: none;
  }
}

.skeleton--text { height: 12px; margin-bottom: 8px; }
.skeleton--title { height: 18px; width: 70%; margin-bottom: 10px; }
.skeleton--btn { height: 44px; width: 100%; margin-top: 8px; }
.skeleton--avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

/* Long lists: defer off-screen paint (helps scroll performance) */
.lb-list-card,
.history-list-card {
  content-visibility: auto;
  contain-intrinsic-size: auto 400px;
}

/* ========== Dark theme (toggle: header, before hamburger) ========== */
html[data-theme="dark"] {
  color-scheme: dark;
}
html[data-theme="dark"] body {
  background: #0b1120 !important;
  color: #e2e8f0;
}
html[data-theme="dark"] .phone {
  background: #111827;
  color: #e2e8f0;
}
html[data-theme="dark"] .top-bar {
  background: #1e293b;
  border-bottom-color: #334155;
}
html[data-theme="dark"] .logo {
  color: #f1f5f9;
}
html[data-theme="dark"] .hamburger {
  color: #e2e8f0;
}
html[data-theme="dark"] .nav-drawer {
  background: #1e293b;
  box-shadow: -8px 0 28px rgba(0, 0, 0, 0.45);
}
html[data-theme="dark"] .nav-drawer-header {
  border-bottom-color: #334155;
}
html[data-theme="dark"] .nav-drawer-title {
  color: #f1f5f9;
}
html[data-theme="dark"] .nav-close {
  color: #cbd5e1;
}
html[data-theme="dark"] .nav-drawer-links a {
  color: #e2e8f0;
  border-bottom-color: #334155;
}
html[data-theme="dark"] .nav-drawer-links a:hover {
  background: #334155;
  color: #93c5fd;
}
html[data-theme="dark"] .nav-drawer-links--member .nav-drawer-section + .nav-drawer-section {
  border-top-color: #334155;
}
html[data-theme="dark"] .nav-drawer-links--member .nav-drawer-section__label {
  color: #64748b;
}
html[data-theme="dark"] .nav-drawer-links--member .nav-drawer-section__list a {
  color: #e2e8f0;
  border-bottom: 0;
}
html[data-theme="dark"] .nav-drawer-links--member .nav-drawer-section__list a:hover {
  background: #334155;
  color: #93c5fd;
}
html[data-theme="dark"] .nav-drawer-links--member .nav-drawer-link--admin {
  color: #5eead4;
}
html[data-theme="dark"] .nav-drawer-links--member .nav-drawer-link--admin:hover {
  background: rgba(20, 184, 166, 0.12);
  color: #99f6e4;
}
html[data-theme="dark"] .nav-drawer-links--member .nav-drawer-link--logout {
  color: #fca5a5;
}
html[data-theme="dark"] .nav-drawer-links--member .nav-drawer-link--logout:hover {
  background: rgba(127, 29, 29, 0.35);
  color: #fecaca;
}
html[data-theme="dark"] .bottom-nav {
  background: #1e293b;
  border-top-color: #334155;
}
html[data-theme="dark"] .bottom-nav .nav-item {
  color: #94a3b8;
}
html[data-theme="dark"] .bottom-nav .nav-item.active {
  color: #60a5fa;
}
html[data-theme="dark"] .app-skeleton-layer {
  background: #111827;
}
html[data-theme="dark"] .sk-line,
html[data-theme="dark"] .sk-card,
html[data-theme="dark"] .sk-circle,
html[data-theme="dark"] .skeleton,
html[data-theme="dark"] .sk-block {
  background: #1e293b;
}
html[data-theme="dark"] .sk-card {
  border-color: #334155;
}
html[data-theme="dark"] .home-v2 .greeting h3 {
  color: #f1f5f9;
}
html[data-theme="dark"] .home-v2 .greeting p {
  color: #94a3b8;
}
html[data-theme="dark"] .home-v2 .home-bell {
  color: #cbd5e1;
}
html[data-theme="dark"] .home-stats-card {
  background: #1e293b;
  border-color: #334155;
  box-shadow: none;
}
html[data-theme="dark"] .home-stat-sep {
  background: #334155;
}
html[data-theme="dark"] .home-v2 .lbl {
  color: #94a3b8;
}
html[data-theme="dark"] .home-v2 .val {
  color: #f1f5f9;
}
html[data-theme="dark"] .home-v2 .avatar {
  background: #334155;
  color: #f1f5f9;
}
html[data-theme="dark"] .daily-challenge {
  background: linear-gradient(135deg, #1e3a5f 0%, #1e40af 100%);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}
html[data-theme="dark"] .home-v2 .category-header h4 {
  color: #f1f5f9;
}
html[data-theme="dark"] .home-v2 .category-header a {
  color: #93c5fd;
}
html[data-theme="dark"] .home-v2 .cat-item {
  background: #1e293b;
  border-color: #334155;
  box-shadow: none;
}
html[data-theme="dark"] .home-v2 .cat-name {
  color: #e2e8f0;
}
html[data-theme="dark"] .home-v2 .cat-count {
  color: #94a3b8;
}
html[data-theme="dark"] .category-header {
  color: #e2e8f0;
}
html[data-theme="dark"] .category-header a {
  color: #93c5fd;
}
html[data-theme="dark"] .question-box {
  background: #1e293b;
  color: #f1f5f9;
  border: 1px solid #334155;
}
html[data-theme="dark"] .option-item {
  background: #1e293b;
  border-color: #475569;
  color: #e2e8f0;
}
html[data-theme="dark"] .option-item.is-selected-readonly {
  border-color: #3b82f6;
  background: #172554;
}
html[data-theme="dark"] .progress-bar-wrap {
  background: #334155;
}
html[data-theme="dark"] .timer-circle {
  border-color: #475569;
  color: #f1f5f9;
}
html[data-theme="dark"] .quiz-feedback {
  background: #1e293b;
  border-color: #475569;
  color: #cbd5e1;
}
html[data-theme="dark"] .quiz-feedback.ok {
  background: #14532d;
  border-color: #166534;
  color: #bbf7d0;
}
html[data-theme="dark"] .quiz-feedback.bad {
  background: #450a0a;
  border-color: #991b1b;
  color: #fecaca;
}
html[data-theme="dark"] .question-post-result {
  border-color: #475569;
  background: #1e293b;
  box-shadow: inset 0 3px 0 0 #64748b;
}
html[data-theme="dark"] .question-post-result--ok {
  border-color: #166534;
  box-shadow: inset 0 3px 0 0 #22c55e;
}
html[data-theme="dark"] .question-post-result--bad {
  border-color: #991b1b;
  box-shadow: inset 0 3px 0 0 #ef4444;
}
html[data-theme="dark"] .question-post-result__head {
  border-bottom-color: #334155;
}
html[data-theme="dark"] .question-post-result--ok .question-post-result__head {
  background: #14532d;
  border-bottom-color: #166534;
}
html[data-theme="dark"] .question-post-result--bad .question-post-result__head {
  background: #450a0a;
  border-bottom-color: #7f1d1d;
}
html[data-theme="dark"] .question-post-result__status {
  color: #f1f5f9;
}
html[data-theme="dark"] .question-post-result--ok .question-post-result__status {
  color: #bbf7d0;
}
html[data-theme="dark"] .question-post-result--bad .question-post-result__status {
  color: #fecaca;
}
html[data-theme="dark"] .question-post-result__sub {
  color: #94a3b8;
}
html[data-theme="dark"] .question-post-result__k {
  color: #94a3b8;
}
html[data-theme="dark"] .question-post-result__v {
  color: #f1f5f9;
}
html[data-theme="dark"] .question-post-result--ok .question-post-result__v {
  color: #bbf7d0;
}
html[data-theme="dark"] .question-post-result--bad .question-post-result__v {
  color: #fecaca;
}
html[data-theme="dark"] .question-post-result__explain {
  color: #cbd5e1;
}
html[data-theme="dark"] .question-post-related__title {
  color: #e2e8f0;
}
html[data-theme="dark"] .question-post-related__list {
  color: #cbd5e1;
}
html[data-theme="dark"] .question-post-related__list a {
  color: #93c5fd;
}
html[data-theme="dark"] .question-post-nav-btn--back.btn-outline-secondary {
  background: transparent !important;
  color: #f1f5f9;
  border: 1px solid #1a6fd4;
}
html[data-theme="dark"] .question-post-nav-btn--back.btn-outline-secondary:hover {
  background: rgba(26, 111, 212, 0.18) !important;
  color: #fff;
  border: 1px solid #1a6fd4;
}
html[data-theme="dark"] .quiz-speed-hint {
  color: #94a3b8 !important;
}
html[data-theme="dark"] .result-body {
  background: #111827;
  color: #e2e8f0;
}
html[data-theme="dark"] .result-title {
  color: #f1f5f9;
}
html[data-theme="dark"] .result-subtitle {
  color: #94a3b8;
}
html[data-theme="dark"] .leaderboard-title {
  color: #f1f5f9;
}
html[data-theme="dark"] .lb-filter-tabs {
  border-color: #334155;
  background: #1e293b;
}
html[data-theme="dark"] .lb-tab {
  background: #1e293b;
  color: #cbd5e1;
  border-right-color: #334155;
}
html[data-theme="dark"] a.lb-tab {
  color: #cbd5e1;
}
html[data-theme="dark"] .lb-tab.is-active {
  color: #fff;
}
html[data-theme="dark"] .lb-list-card {
  background: #1e293b;
  border-color: #334155;
}
html[data-theme="dark"] .lb-v2-row {
  border-bottom-color: #334155;
}
html[data-theme="dark"] .lb-v2-name {
  color: #e2e8f0;
}
html[data-theme="dark"] .lb-v2-score {
  color: #93c5fd;
}
html[data-theme="dark"] .lb-v2-rank {
  color: #94a3b8;
}
html[data-theme="dark"] .profile-header {
  background: #1e293b;
  border-bottom-color: #334155;
}
html[data-theme="dark"] .profile-name {
  color: #f1f5f9;
}
html[data-theme="dark"] .profile-email {
  color: #94a3b8;
}
html[data-theme="dark"] .profile-avatar {
  background: #334155;
  color: #f1f5f9;
}
html[data-theme="dark"] .menu-item {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}
html[data-theme="dark"] .auth-title {
  color: #f1f5f9;
}
html[data-theme="dark"] .auth-subtitle,
html[data-theme="dark"] .auth-footnote {
  color: #94a3b8;
}
html[data-theme="dark"] .auth-footnote--centered a {
  color: #93c5fd;
  background: #1e293b;
  border-color: #334155;
  box-shadow: none;
}
html[data-theme="dark"] .auth-footnote--centered a:hover {
  background: #334155;
  border-color: #475569;
  color: #e2e8f0;
}
html[data-theme="dark"] .auth-footnote a {
  color: #93c5fd;
}
html[data-theme="dark"] .input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background: #1e293b;
  border-color: #475569;
  color: #f1f5f9;
}
html[data-theme="dark"] .auth-form label {
  color: #cbd5e1;
}
html[data-theme="dark"] .alert-danger {
  background: #450a0a;
  color: #fecaca;
}
html[data-theme="dark"] .alert-success {
  background: #14532d;
  color: #bbf7d0;
}
html[data-theme="dark"] .question-post-title {
  color: #f1f5f9;
}
html[data-theme="dark"] .btn-bookmark {
  background: #1e293b;
  color: #93c5fd;
  border-color: #475569;
}
html[data-theme="dark"] .btn-bookmark:hover {
  background: #334155;
  border-color: #64748b;
}
html[data-theme="dark"] .btn-bookmark.is-bookmarked {
  background: #14532d;
  color: #86efac;
  border-color: #166534;
}
html[data-theme="dark"] .questions-browse-intro {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  border-color: #334155;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}
html[data-theme="dark"] .questions-browse-bc {
  background: rgba(30, 41, 59, 0.85);
  border-color: #475569;
  color: #cbd5e1;
}
html[data-theme="dark"] .questions-browse-bc [aria-current="page"] {
  color: #f1f5f9;
}
html[data-theme="dark"] .questions-browse-bc a {
  color: #93c5fd;
}
html[data-theme="dark"] .questions-browse-title {
  color: #f1f5f9;
}
html[data-theme="dark"] .questions-browse-page-hint {
  color: #bfdbfe;
  background: rgba(15, 23, 42, 0.6);
  border-color: #3b82f6;
}
html[data-theme="dark"] .questions-browse-lead {
  color: #94a3b8;
}
html[data-theme="dark"] .questions-browse-lead a {
  color: #93c5fd;
}
html[data-theme="dark"] .questions-browse-list {
  background: transparent;
}
html[data-theme="dark"] .questions-browse-link {
  background: #111827;
  border-color: #334155;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}
html[data-theme="dark"] .questions-browse-link:hover {
  border-color: #3b82f6;
  box-shadow: 0 12px 28px rgba(59, 130, 246, 0.18);
  background: linear-gradient(180deg, #111827 0%, #172554 100%);
}
html[data-theme="dark"] .questions-browse-q {
  color: #e2e8f0;
}
html[data-theme="dark"] .questions-browse-num {
  color: #93c5fd;
  background: linear-gradient(165deg, #1e293b, #172554);
  border-color: #3b82f6;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}
html[data-theme="dark"] .questions-browse-cat {
  color: #fff;
  background: #2563eb;
  border-color: #3b82f6;
}
html[data-theme="dark"] .questions-browse-arrow {
  color: #93c5fd;
}
html[data-theme="dark"] .questions-browse-pager {
  background: linear-gradient(180deg, #1e293b, #0f172a);
  border-color: #334155;
}
html[data-theme="dark"] .questions-browse-page-meta {
  color: #e2e8f0;
  background: #111827;
  border-color: #334155;
}
html[data-theme="dark"] .card {
  background: #1e293b;
  border: 1px solid #334155;
  color: #e2e8f0;
}
html[data-theme="dark"] .welcome-hero {
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 55%, #111827 100%);
}
html[data-theme="dark"] .welcome-text h2 {
  color: #93c5fd;
}
html[data-theme="dark"] .welcome-text .welcome-salam {
  color: #e2e8f0;
}
html[data-theme="dark"] .welcome-text p,
html[data-theme="dark"] .tagline {
  color: #94a3b8;
}
html[data-theme="dark"] .feature-item .label {
  color: #e2e8f0;
}
html[data-theme="dark"] .feature-item .desc {
  color: #94a3b8;
}
html[data-theme="dark"] .btn-white {
  background: #334155;
  color: #e2e8f0;
}
html[data-theme="dark"] .or-text,
html[data-theme="dark"] .signin-link {
  color: #94a3b8;
}
html[data-theme="dark"] .page-welcome .welcome-signin {
  color: #94a3b8;
}
html[data-theme="dark"] .page-welcome .welcome-signin a {
  color: #93c5fd;
  background: #1e293b;
  border-color: #334155;
}
html[data-theme="dark"] .page-welcome .welcome-signin a:hover {
  background: #334155;
  border-color: #475569;
  color: #e2e8f0;
}
html[data-theme="dark"] .welcome-legal-list a {
  color: #94a3b8;
}
html[data-theme="dark"] .welcome-legal-list a:hover {
  color: #93c5fd;
  background: rgba(147, 197, 253, 0.1);
}
html[data-theme="dark"] .welcome-legal-list li:not(:last-child)::after {
  background: #475569;
}
html[data-theme="dark"] .nav-drawer-links--guest a:not(.nav-drawer-cta) {
  color: #e2e8f0;
}
html[data-theme="dark"] .nav-drawer-links--guest a:not(.nav-drawer-cta):hover {
  background: #334155;
  color: #93c5fd;
}
html[data-theme="dark"] .nav-drawer-links--guest .nav-drawer-cta--secondary {
  background: #1e293b;
  border-color: #475569;
  color: #93c5fd;
}
html[data-theme="dark"] .nav-drawer-links--guest .nav-drawer-cta--secondary:hover {
  background: #334155;
  color: #e2e8f0;
}
html[data-theme="dark"] .screen-content h1,
html[data-theme="dark"] .screen-content h2 {
  color: #f1f5f9;
}
html[data-theme="dark"] .history-subtitle {
  color: #94a3b8;
}
html[data-theme="dark"] .history-list-card {
  background: #1e293b;
  border-color: #334155;
}
html[data-theme="dark"] .history-row {
  border-bottom-color: #334155;
}
html[data-theme="dark"] .history-id {
  color: #93c5fd;
}
html[data-theme="dark"] .history-category {
  color: #e2e8f0;
}
html[data-theme="dark"] .history-date {
  color: #94a3b8;
}
html[data-theme="dark"] .history-correct {
  color: #cbd5e1;
}
html[data-theme="dark"] .history-accuracy.good {
  color: #bbf7d0;
  background: #14532d;
  border-color: #166534;
}
html[data-theme="dark"] .history-accuracy.avg {
  color: #fde68a;
  background: #422006;
  border-color: #b45309;
}
html[data-theme="dark"] .history-accuracy.low {
  color: #fecaca;
  background: #450a0a;
  border-color: #991b1b;
}
html[data-theme="dark"] .history-empty {
  color: #94a3b8;
}
html[data-theme="dark"] .ad-slot {
  color: #94a3b8;
}
