/* IQRO7 — shared UI stylesheet

  EDITING MAP
  Foundations: fonts, tokens, reset and shared controls.
  Shared navigation: .app-header, .profile-*, .session-* and header rhythm.
  Public pages: .login-page and .legal-page; homepage detail lives in home-landing.css.
  Learning: .dashboard-app, body.lesson-book, .worship-page and .curriculum-page.
  Tahsin: .tahsin-page and .dashboard-tahsin-link.
  Billing: .subscribe-page and .payment-page.
  Live/admin: .live-page, .notification-page, .teacher-audio-page and .ce-page.
  Update prompt: .iqro7-update.iqro7-update--multi.

  Keep component state and media-query rules beside their existing cascade context.
  Add changes to the matching component section instead of appending a global patch.
  Retained base rules are shared fallbacks, not unused code inferred from one screenshot.
  Arabic glyph, diacritic, font, bidi and text-spacing rules are protected.
  One runtime stylesheet; no new CSS imports or runtime dependency. */

/* =========================================================
   01. FONTS
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Manrope:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700;800&display=swap');

@font-face {
  font-family: "LPMQ IsepMisbah";
  src: url("fonts/LPMQ-IsepMisbah.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* =========================================================
   02. DESIGN TOKENS
   ========================================================= */

:root {
  --ui-page-background: radial-gradient(ellipse at 3% 0%, #e1e9ff 0, transparent 44%), linear-gradient(155deg, #eef2f8, #f5f6fc 65%, #eef4f8);
  --ui-shadow-raised: 0 12px 30px #23345a12, 0 2px 5px #23345a08;
  --ui-shadow: 0 3px 14px #23345a0a, 0 1px 2px #23345a08;
  --ui-danger-soft: #fff0f3;
  --ui-danger: #b42345;
  --ui-premium-text: #5b3b00;
  --ui-premium-bg: #fff1c2;
  --ui-success-soft: #e5f4eb;
  --ui-success: #216343;
  --ui-focus: #4338ca;
  --ui-control-border: #8190a6;
  --ui-border: #d0d9e8;
  --ui-canvas: #eef2f8;
  --ui-surface: #ffffff;
  --ui-faint: #627089;
  --ui-muted: #53617b;
  --ui-ink: #1c2942;
  --ui-primary-soft: #edf0ff;
  --ui-primary-hover: #3528a8;
  --ui-primary: #4338ca;
  --ui-brand: #1a237e;
  /* Teks */
  --ink: var(--ui-ink);
  --ink-soft: var(--ui-muted);
  --ink-faint: var(--ui-faint);
  /* Warna utama */
  --emerald-900: #0c4d42;
  --emerald-700: #146b5b;
  --emerald-500: #23a287;
  /* Aksen */
  --gold-500: #e8ad3d;
  --coral-500: #ef8c72;
  /* Permukaan */
  --ivory: #f7faf8;
  --surface: var(--ui-surface);
  --sage-100: #eaf6f1;
  --sage-200: #dcefe7;
  --mint-50: #f2fbf7;
  --mint-100: #e3f6ee;
  --peach-50: #fff7ee;
  --sky-50: #f1f8ff;
  --line: var(--ui-border);
  /* Radius */
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-pill: 999px;
  /* Elevation */
  --shadow-card: 0 12px 30px -24px rgba(12, 77, 66, 0.34);
  --shadow-button: 0 9px 20px -14px rgba(12, 77, 66, 0.45);
  /* Soft tint */
  --gold-soft: rgba(232, 173, 61, 0.14);
  --emerald-soft: rgba(35, 162, 135, 0.08);
  /* Gradient */
  --gradient-brand: linear-gradient(135deg, #0d5b4d 0%, #22a68a 72%, #54bea9 100%);
  --gradient-soft: linear-gradient(135deg, #eefaf5 0%, #fff7ea 100%);
  /* Font stack */
  --font-sans: 'Manrope', system-ui, -apple-system, Arial, sans-serif;
  --font-display: 'Fraunces', Georgia, serif;
  --font-arabic: 'LPMQ IsepMisbah', 'Amiri', serif;
  --font-content: 'Manrope', 'Fraunces', 'LPMQ IsepMisbah', 'Amiri', system-ui, -apple-system, Arial, sans-serif;
  /* Quiz theme */
  --quiz-700: #6553a6;
  --quiz-500: #806bc7;
  --quiz-100: #eeeafd;
  --quiz-50: #f8f6ff;
  --ui-header-gap: 14px;
}

/* =========================================================
   03. BASE / RESET
   ========================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--ui-page-background);
  color: var(--ink);
  font-family: var(--font-content);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* =========================================================
   GLOBAL MULTILINGUAL TEXT
   ---------------------------------------------------------
   Default IQRO7: Latin + Arabic may coexist in one string.
   Font fallback happens per glyph: Manrope for Latin,
   LPMQ IsepMisbah for Arabic glyphs.

   Direction should be supplied as dir="auto" by the shared
   renderer/markup for dynamic content. CSS then respects the
   browser's Unicode Bidirectional Algorithm.
   ========================================================= */

:where(
    p, li, dt, dd, blockquote,
    .content-text,
    .exercise-arabic,
    .exercise-arabic-text,
    .exercise-instruction,
    .exercise-explanation,
    .exercise-transliteration
) {
  font-family: var(--font-content);
}

:where(
    [dir="auto"],
    .content-text,
    .exercise-arabic,
    .exercise-arabic-text,
    .exercise-instruction,
    .exercise-explanation,
    .exercise-transliteration
) {
  unicode-bidi: plaintext;
}

[dir="auto"] {
  text-align: start;
}

/* Elemen dengan atribut [hidden] selalu disembunyikan,
   walau punya display flex/grid dari rule lain. */

[hidden] {
  display: none !important;
}

audio {
  width: 100%;
  margin-top: 22px;
  border-radius: var(--radius-pill);
}

/* =========================================================
   04. APP SHELL
   ========================================================= */

.app {
  position: relative;
  width: 100%;
  max-width: 440px;
  min-height: 100dvh;
  margin: 0 auto;
  background: #fbfdfc;
}

.home-app {
  overflow: hidden;
}

/* =========================================================
   05. BUTTONS (global)
   ========================================================= */

button {
  display: block;
  width: 100%;
  max-width: 350px;
  margin: 10px auto;
  padding: 16px;
  border: none;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

button:hover {
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

button:focus-visible,
.day-item:focus-visible {
  outline: 2px solid var(--emerald-500);
  outline-offset: 3px;
}

.teacher-button {
  background: var(--sage-100);
  color: var(--ink);
}

.teacher-button:hover {
  background: var(--sage-200);
}

.record-button {
  background: var(--gradient-brand);
  background-size: 160% 160%;
  color: var(--ui-surface);
  box-shadow: var(--shadow-button);
}

.record-button:hover {
  box-shadow: 0 16px 28px -14px rgba(11, 59, 51, 0.65);
}

.record-button:disabled {
  opacity: 0.45;
  box-shadow: none;
  cursor: not-allowed;
}

.retry-button {
  background: var(--surface);
  color: var(--emerald-700);
  border: 1.5px solid var(--emerald-700);
}

.retry-button:hover {
  background: var(--sage-100);
}

/* =========================================================
   06. TOP BAR (APP HEADER) + DROPDOWN
   ========================================================= */

.app-brand {
  display: flex;
  align-items: center;
}

.app-brand h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  color: var(--emerald-900);
}

#appName {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  white-space: nowrap;
}

.dashboard-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  margin-right: 12px;
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: background-color 0.2s ease,
        transform 0.2s ease;
}

.dashboard-link:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.dashboard-link:active {
  transform: scale(0.97);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.language-menu,
.profile-menu {
  position: relative;
}

/* Override style button global */

.header-icon-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: auto;
  max-width: none;
  min-width: 42px;
  height: 42px;
  min-height: 38px;
  margin: 0;
  padding: 7px 10px;
  background: var(--mint-100);
  color: var(--emerald-700);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: none;
  font-size: 10px;
  font-weight: 700;
}

.header-icon-button:hover {
  background: var(--sage-200);
  transform: none;
}

.profile-button {
  width: 42px;
  font-size: 18px;
}

.dropdown-arrow {
  font-size: 10px;
  color: var(--ink-faint);
}

.header-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 200;
  min-width: 190px;
  padding: 7px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.header-dropdown.hidden {
  display: none;
}

.header-dropdown button {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 11px 12px;
  background: transparent;
  color: var(--ink);
  border-radius: 10px;
  box-shadow: none;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
}

.header-dropdown button:hover {
  background: var(--sage-100);
  transform: none;
}

.profile-dropdown {
  min-width: 220px;
}

.profile-summary {
  margin-bottom: 5px;
  padding: 10px 12px 12px;
  border-bottom: 1px solid var(--line);
}

.profile-summary strong {
  display: block;
  font-size: 13px;
  color: var(--ink);
}

.profile-summary span {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  color: var(--ink-faint);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

#logoutButton {
  color: #a23b3b;
}

/* =========================================================
   07. SHARED PAGE HERO
   ========================================================= */

.header {
  position: relative;
  overflow: hidden;
  padding: 38px 24px 34px;
  text-align: center;
  background: var(--gradient-brand);
  background-size: 160% 160%;
  color: var(--ui-surface);
}

.header::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.14) 1.5px, transparent 1.5px);
  background-size: 22px 22px;
  opacity: 0.5;
  pointer-events: none;
}

.header h1 {
  position: relative;
  margin: 0;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.header p {
  position: relative;
  margin-top: 8px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.82);
}

/* Legacy public typography fallback; keep explicit Arabic font values. */

.home-final-mark {
  display: inline-block;
  margin-bottom: 7px;
  font-family: 'Amiri', serif;
  font-size: 31px;
  color: #f0d477;
}

/* =========================================================
   09. PUBLIC PAGE BASE & LOGIN
   ========================================================= */

.home {
  padding: 46px 26px 40px;
  text-align: center;
}

.home h2 {
  max-width: 620px;
  margin: 20px auto;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
}

.home p {
  max-width: 380px;
  margin: 0 auto 32px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-soft);
}

.home button {
  max-width: 350px;
}

.home-features {
  max-width: 380px;
  margin: 0 auto 36px;
  text-align: left;
}

.home-feature {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 11px 4px;
}

.home-feature strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

/* Login — compact public entry page, using the shared EdTech palette. */

body.login-page {
  --font-sans: Inter, system-ui, -apple-system, Arial, sans-serif;
  --font-content: var(--font-sans);
  margin: 0;
  min-height: 100dvh;
  display: grid;
  align-content: center;
  padding: 24px 16px;
  color: var(--ui-ink);
  font-family: var(--font-sans);
  background: var(--ui-page-background);
}

.login-page .login-shell {
  width: 100%;
  max-width: 440px;
  min-height: 0;
  margin: 0 auto;
  padding: 0;
  overflow: visible;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.login-page .login-topbar {
  min-height: 60px;
  margin: 0 0 12px;
  padding: 10px 14px;
  gap: 12px;
}

/* Login language control: borderless, with keyboard focus and open-state feedback. */

.login-page .login-topbar #languageMenuButton {
  border: 0;
  background: transparent;
}

.login-page .login-topbar #languageMenuButton:hover,
.login-page .login-topbar #languageMenuButton[aria-expanded="true"] {
  background: var(--ui-primary-soft);
}

.login-page .login-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ui-brand);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.035em;
  text-decoration: none;
}

.login-page .login-brand img {
  display: block;
  flex: none;
  object-fit: contain;
}

.login-page .login {
  margin: 0;
  padding: 24px;
  border: 1px solid var(--ui-border);
  border-radius: 22px;
  background: #fffffff5;
  box-shadow: var(--ui-shadow-raised);
  text-align: left;
}

.login-page .login-heading {
  margin: 0 0 20px;
  text-align: center;
}

.login-page .login-heading h1 {
  margin: 0;
  color: #273465;
  font-family: var(--font-sans);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -.025em;
}

.login-page .login-heading p {
  margin: 7px 0 0;
  color: var(--ui-muted);
  font-size: 14px;
  line-height: 1.55;
}

.login-page button:hover {
  transform: none;
  box-shadow: none;
}

.login-page .login-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: none;
  min-height: 44px;
  margin: 0;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 11px;
  font: 700 14px/1.45 var(--font-sans);
  box-shadow: none;
}

.login-page .login-google {
  border-color: #cfd7ed;
  background: var(--ui-surface);
  color: var(--ui-ink);
}

.login-page .login-google:not(:disabled):hover {
  border-color: #aeb9e2;
  background: #f3f5ff;
}

.login-page .login-google-icon {
  flex: none;
  width: 20px;
  height: 20px;
}

.login-page .login-primary {
  margin-top: 4px;
  background: var(--ui-primary);
  color: var(--ui-surface);
}

.login-page .login-primary:not(:disabled):hover {
  background: var(--ui-primary-hover);
}

.login-page button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.login-page button[aria-busy="true"] {
  cursor: progress;
}

.login-page .login-button[aria-busy="true"]::after {
  content: '';
  flex: none;
  width: 13px;
  height: 13px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: login-spin .8s linear infinite;
}

.login-page :is(button, input, select, a):focus-visible {
  outline: 3px solid var(--ui-focus);
  outline-offset: 3px;
}

.login-page .login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: none;
  margin: 16px 0;
  color: #64708a;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
}

.login-page .login-divider::before,
.login-page .login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e1e6f2;
}

.login-page .email-login {
  display: grid;
  gap: 8px;
  width: 100%;
  max-width: none;
  margin: 0;
  text-align: left;
}

.login-page .email-login label {
  margin: 0;
  color: #35435c;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.4;
}

.login-page .email-login input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--ui-control-border);
  border-radius: 11px;
  background: var(--ui-surface);
  color: var(--ui-ink);
  font: 500 16px/1.4 var(--font-sans);
}

.login-page .email-login input::placeholder {
  color: var(--ui-faint);
  opacity: 1;
}

.login-page .email-login input[aria-invalid="true"] {
  border-color: #b44343;
}

.login-page .email-login input:disabled {
  color: var(--ui-muted);
}

.login-page .login-field-hint {
  margin: 0;
  color: #64708a;
  font-size: 12.5px;
  line-height: 1.5;
}

.login-page #otpInstruction {
  margin: 0;
  color: var(--ui-muted);
  text-align: center;
  font-size: 14px;
  line-height: 1.55;
}

.login-page #otpEmail {
  display: block;
  color: #35435c;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.login-page #otpSpamHint {
  margin: 2px 0 8px;
  padding: 10px;
  border: 1px solid #e1e6f5;
  border-radius: 10px;
  background: #f4f6ff;
  color: var(--ui-muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.login-page #loginCode {
  text-align: center;
  font-size: 22px;
  letter-spacing: .28em;
  font-variant-numeric: tabular-nums;
}

.login-page .otp-actions {
  display: flex;
  gap: 8px;
  margin-top: 2px;
}

.login-page .otp-actions button {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  max-width: none;
  margin: 0;
  padding: 8px;
  border: 0;
  border-radius: 9px;
  background: var(--ui-primary-soft);
  color: #414aa9;
  font: 650 12.5px/1.4 var(--font-sans);
}

.login-page .otp-actions button:not(:disabled):hover {
  background: #e4e9ff;
}

.login-page .otp-actions button:disabled {
  background: #f4f5fa;
  color: #64708a;
}

.login-page .login-message {
  max-width: none;
  margin: 12px 0 0;
  padding: 10px;
  border: 1px solid #dce2f4;
  border-radius: 10px;
  background: #f4f6ff;
  color: #414b75;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.login-page .login-message:empty {
  display: none;
}

.login-page .login-message.error {
  border-color: #efcdcd;
  background: #fff2f1;
  color: #a43c3c;
}

@keyframes login-spin {

  to {
    transform: rotate(360deg);
  }

}

@media (min-width: 768px) {

  .login-page .login-shell {
    max-width: 680px;
  }

  .login-page .login-topbar {
    min-height: 64px;
    margin-bottom: 14px;
    padding: 12px 20px;
  }

  .login-page .login {
    padding: 32px 40px;
  }

  .login-page .login-heading {
    max-width: 560px;
    margin: 0 auto 24px;
  }

  .login-page .login-heading h1 {
    font-size: 30px;
  }

  .login-page .login-heading p {
    font-size: 15px;
  }

  .login-page .login-button {
    max-width: 560px;
    min-height: 46px;
    margin-left: auto;
    margin-right: auto;
    font-size: 15px;
  }

  .login-page .login-divider {
    max-width: 560px;
    margin: 18px auto;
  }

  .login-page .email-login {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
  }

  .login-page .email-login label {
    font-size: 14px;
  }

  .login-page .email-login input {
    min-height: 48px;
  }

  .login-page .login-field-hint {
    font-size: 13px;
  }

  .login-page .login-message {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
  }

}

@media (max-width: 380px) {

  body.login-page {
    padding: 16px 12px;
  }

  .login-page .login {
    padding: 22px 18px;
  }

  .login-page .login-topbar {
    padding: 10px 12px;
  }

  .login-page .login-heading h1 {
    font-size: 24px;
  }

}

@media (prefers-reduced-motion: reduce) {

  .login-page *,
  .login-page *::after {
    animation: none !important;
    transition: none !important;
  }

}

/* =========================================================
   10. DASHBOARD
   ========================================================= */

.dashboard {
  padding: 20px 16px 18px;
  text-align: center;
}

/* --- Continue card --- */

.continue-card {
  max-width: 390px;
  margin: 0 auto 16px;
  padding: 21px;
  text-align: left;
  background: radial-gradient(circle at 92% 12%, rgba(239, 140, 114, 0.14), transparent 30%),
        linear-gradient(135deg, #eaf9f3 0%, #fff8ed 100%);
  border: 1px solid rgba(20, 107, 91, 0.11);
  border-top: 0;
  border-radius: 20px;
  box-shadow: 0 14px 28px -24px rgba(12, 77, 66, 0.42);
}

.continue-card > p:first-child {
  margin: 0 0 5px;
  color: var(--emerald-700);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.continue-card h3 {
  margin: 0 0 3px;
  font-family: var(--font-display);
  font-size: 23px;
  color: var(--ink);
}

.continue-card #continueTopic {
  margin: 0 0 13px;
  color: var(--ink-soft);
  font-size: 15px;
}

.continue-card .record-button {
  min-height: 44px;
  margin: 0;
  padding: 11px 16px;
  border-radius: 13px;
  font-size: 13px;
}

/* --- Program & extra --- */

.program-section,
.extra-section {
  max-width: 390px;
  margin: 0 auto 18px;
  text-align: left;
}

.program-section h3,
.extra-section h3 {
  margin: 0 0 9px;
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--ink);
}

.day-list {
  display: grid;
  gap: 7px;
}

.day-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 10px 13px;
  background: var(--ui-surface);
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.day-item:nth-child(2n) {
  background: #fcfefc;
}

.day-item:hover {
  background: var(--mint-50);
  border-color: rgba(35, 162, 135, 0.35);
}

.day-item.active {
  color: var(--emerald-900);
  background: linear-gradient(90deg, #e3f7ef 0%, #f7fcfa 100%);
  border-color: rgba(35, 162, 135, 0.38);
  box-shadow: inset 2px 0 0 var(--emerald-500);
}

.day-item.locked {
  opacity: 0.72;
}

.day-badge {
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 700;
}

.day-badge.free {
  color: #0e715e;
  background: #dcf4ea;
}

.day-badge.premium {
  color: #856013;
  background: #fff3cf;
}

.extra-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.extra-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-height: 88px;
  margin: 0;
  padding: 13px 10px;
  background: linear-gradient(145deg, #f0faf6 0%, #fff7ed 100%);
  color: var(--ink);
  border: 1px solid rgba(20, 107, 91, 0.10);
  border-radius: 15px;
  box-shadow: none;
  font-size: 13px;
  font-weight: 700;
}

.extra-card:nth-child(2) {
  background: linear-gradient(145deg, #fff7ee 0%, #f2f9ff 100%);
}

.extra-card:hover {
  background: var(--sage-100);
}

.extra-icon {
  font-size: 24px;
}

/* --- Worship path --- */

.worship-section {
  max-width: 390px;
  margin: 0 auto 20px;
  text-align: left;
  scroll-margin-top: 18px;
}

.worship-section h3 {
  margin: 0 0 9px;
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--ink);
}

.worship-list {
  display: grid;
  gap: 10px;
}

.worship-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  width: 100%;
  max-width: none;
  min-height: 0;
  margin: 0;
  padding: 15px;
  background: var(--ui-surface);
  color: var(--ink);
  border: 1px solid rgba(20, 107, 91, 0.11);
  border-radius: 16px;
  box-shadow: 0 12px 28px -26px rgba(12, 77, 66, 0.48);
  text-align: start;
}

.worship-card:hover {
  background: var(--mint-50);
  border-color: rgba(35, 162, 135, 0.30);
  transform: translateY(-1px);
}

.worship-card.completed {
  background: linear-gradient(135deg, #f2fbf7 0%, #fffdf7 100%);
  border-color: rgba(35, 162, 135, 0.24);
}

.worship-card-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: var(--sage-100);
  border: 1px solid rgba(20, 107, 91, 0.10);
  border-radius: 13px;
  font-size: 20px;
}

.worship-card-body {
  display: block;
  min-width: 0;
}

.worship-card-body > strong {
  display: block;
  margin: 1px 0 4px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.worship-card-description {
  display: block;
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.55;
}

.worship-card-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  color: var(--emerald-700);
  font-size: 10.5px;
  font-weight: 800;
}

.worship-card-status {
  display: grid;
  place-items: center;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  background: var(--sage-100);
  border-radius: 50%;
  font-size: 13px;
}

.worship-card.completed .worship-card-status {
  background: #dcf4ea;
  color: #0e715e;
}

/* =========================================================
   11. BOTTOM NAVIGATION
   ========================================================= */

.bottom-nav {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 5px 8px 7px;
  background: rgba(255, 255, 255, 0.97);
  border-top: 1px solid var(--line);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 100%;
  margin: 0;
  padding: 6px 4px;
  background: transparent;
  color: var(--ink-faint);
  border: none;
  border-radius: 12px;
  box-shadow: none;
  font-size: 10px;
  font-weight: 600;
}

.bottom-nav-item:hover {
  background: var(--sage-100);
}

.bottom-nav-item.active {
  color: var(--emerald-700);
  background: var(--mint-50);
}

.bottom-nav-icon {
  font-size: 19px;
}

/* =========================================================
   12. PREMIUM MODAL & SUBSCRIPTION
   ========================================================= */

.premium-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(20, 36, 31, 0.55);
}

.premium-card {
  width: 100%;
  max-width: 360px;
  padding: 28px 22px;
  text-align: center;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.premium-icon {
  margin-bottom: 12px;
  font-size: 38px;
}

.premium-card h3 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--ink);
}

.premium-card p {
  margin: 0 0 22px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.6;
}

/* --- Subscription page --- */

.subscription-page {
  padding: 28px 20px 36px;
  text-align: center;
}

.subscription-label {
  margin: 0 0 10px;
  color: var(--emerald-700);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.subscription-page h2 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--ink);
}

.subscription-description {
  max-width: 340px;
  margin: 0 auto 26px;
  color: var(--ink-soft);
  line-height: 1.6;
}

.plan-list {
  display: grid;
  gap: 12px;
  margin-bottom: 22px;
}

.plan-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 0 auto;
  padding: 18px 20px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: none;
}

.plan-card:hover {
  background: var(--sage-100);
  border-color: var(--emerald-500);
}

.plan-card.selected {
  background: var(--sage-100);
  border-color: var(--emerald-500);
  box-shadow: 0 0 0 2px rgba(28, 138, 115, 0.12);
}

.plan-name {
  font-size: 15px;
  font-weight: 700;
}

.plan-price {
  font-size: 16px;
  font-weight: 800;
  color: var(--emerald-700);
}

.payment-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 22px 0;
}

.payment-method {
  width: 100%;
  margin: 0;
  padding: 16px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: none;
  font-weight: 700;
}

.payment-method.selected {
  background: var(--sage-100);
  border-color: var(--emerald-500);
}

/* =========================================================
   13. LESSON
   ========================================================= */

.lesson {
  position: relative;
  padding: 16px 14px 26px;
  background: radial-gradient(circle at 96% 1%, rgba(65, 190, 158, 0.11), transparent 22%),
        radial-gradient(circle at 2% 18%, rgba(232, 173, 61, 0.08), transparent 20%),
        #f9fcfa;
}

/* --- Heading --- */

.lesson-title {
  margin: 0;
  color: var(--emerald-700);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.065em;
  text-transform: uppercase;
}

.lesson-topic {
  max-width: 650px;
  margin: 4px 0 5px;
  font-family: var(--font-display);
  font-size: clamp(24px, 5.8vw, 34px);
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--emerald-900);
}

.lesson-progress {
  display: inline-flex;
  align-items: center;
  margin: 2px 0 26px;
  padding: 6px 10px;
  background: rgba(232, 245, 236, 0.9);
  color: var(--emerald-700);
  border: 1px solid rgba(28, 138, 115, 0.11);
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.025em;
}

.lesson .lesson-progress {
  display: flex;
  width: fit-content;
  margin: 7px auto 13px;
  padding: 5px 9px;
  background: #e8f7f0;
  font-size: 9.5px;
}

.lesson .day-description,
.lesson .lesson-description {
  max-width: 650px;
  margin: 3px auto 4px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.45;
}

/* --- Exercise list --- */

.lesson .exercise-list {
  display: grid;
  gap: 11px;
}

.lesson .exercise-card {
  position: relative;
  overflow: hidden;
  padding: 0 0 10px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(20, 107, 91, 0.10);
  border-radius: 18px;
  box-shadow: 0 12px 28px -25px rgba(12, 77, 66, 0.40);
}

/* Aksen tipis di atas kartu */

.lesson .exercise-card::before {
  content: "";
  display: block;
  height: 2px;
  background: linear-gradient(90deg, var(--emerald-500), #72cdb5 58%, #e8ad3d);
}

.lesson .exercise-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  padding: 7px 12px 6px;
  color: var(--ink-faint);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.lesson .exercise-status {
  display: grid;
  place-items: center;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  background: #e8f5ec;
  color: var(--emerald-700);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 900;
}

.lesson .exercise-status:empty {
  background: #f3f6f3;
  border: 1px solid rgba(17, 92, 78, 0.08);
}

/* --- Area bacaan Arab --- */

.lesson .exercise-arabic {
  position: relative;
  display: block;
  min-height: 92px;
  margin: 0 10px;
  padding: 13px 14px 20px;
  background: radial-gradient(circle at 50% 0%, rgba(255, 245, 211, 0.65), transparent 52%),
        linear-gradient(180deg, #fffefb, #f9fdfb);
  border: 1px solid rgba(201, 162, 39, 0.13);
  border-radius: 14px;
}

.lesson .exercise-arabic::before {
  content: "۞";
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(201, 162, 39, 0.35);
  font-family: var(--font-arabic);
  font-size: 12px;
}

.lesson .exercise-arabic-notes {
  display: block;
  width: 100%;
  text-align: start;
  font-family: var(--font-content);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.8;
  color: #536761;
}

.lesson .exercise-arabic-notes > div {
  display: block;
  width: 100%;
  white-space: pre-line;
}

.lesson .exercise-arabic-notes > div + div {
  margin-top: 2px;
}

.lesson .exercise-arabic-text {
  display: block;
  width: 100%;
  margin-top: 10px;
  direction: rtl;
  text-align: center;
  white-space: pre-line;
  font-family: var(--font-arabic);
  font-size: clamp(34px, 10vw, 40px);
  line-height: 1.9;
  color: #172a25;
}

/* Audio guru sekarang dipicu dengan klik pada teks Arab EX.
   Ikon speaker hanya penanda visual dan tidak menjadi tombol terpisah. */

.lesson .exercise-audio-target {
  cursor: pointer;
  outline: none;
  transition: color 0.18s ease,
        text-shadow 0.18s ease,
        opacity 0.18s ease;
}

.lesson .exercise-audio-target:hover,
.lesson .exercise-audio-target:focus-visible {
  color: var(--emerald-700);
  text-shadow: 0 0 12px rgba(35, 162, 135, 0.24);
}

.lesson .exercise-audio-target.is-audio-loading {
  cursor: wait;
  opacity: 0.62;
}

.lesson .exercise-audio-target.is-audio-playing {
  color: var(--emerald-700);
  text-shadow: 0 0 14px rgba(35, 162, 135, 0.30);
}

/* Kalau elemen ini eksplisit ditandai dir="ltr" di HTML (dipakai untuk
   teks penjelasan berbahasa Indonesia yang menyelipkan harakat Arab,
   bukan untuk ayat/teks Arab murni), hormati arah itu dan jangan
   paksa jadi RTL. Tanpa override ini, "direction: rtl" di atas menang
   atas atribut dir="ltr" HTML, bikin urutan teks Latin kereorder. */

.lesson .exercise-arabic-text[dir="ltr"] {
  direction: ltr;
  text-align: start;
  font-family: var(--font-content);
  font-size: 25px;
  line-height: 1.7;
  color: var(--ink);
}

/* --- Aksi latihan --- */

.lesson .exercise-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  padding: 10px 10px 0;
}

.lesson .exercise-actions:empty {
  display: none;
}

.lesson .exercise-actions:last-child {
  padding-bottom: 16px;
}

.lesson .exercise-actions button {
  width: 100%;
  max-width: none;
  min-height: 40px;
  margin: 0;
  padding: 9px 10px;
  border-radius: 12px;
  box-shadow: none;
  font-size: 10.5px;
  font-weight: 800;
}

.lesson .exercise-teacher-button {
  background: #e9f7f1;
  color: var(--emerald-700);
  border: 1px solid rgba(35, 162, 135, 0.17);
}

.lesson .exercise-teacher-button:hover {
  background: #e3f2e8;
  transform: translateY(-1px);
}

.lesson .exercise-record-button {
  background: linear-gradient(135deg, #0d5b4d, #23a287);
  color: var(--ui-surface);
  border: 1px solid transparent;
  box-shadow: 0 12px 22px -18px rgba(11, 59, 51, 0.75);
}

.lesson .exercise-record-button:hover {
  transform: translateY(-1px);
}

/* --- Hasil AI --- */

.lesson .exercise-result {
  min-height: 0;
  margin: 8px 10px 0;
  padding: 0;
  color: var(--emerald-900);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.55;
  text-align: center;
}

.lesson .exercise-result:not(:empty) {
  padding: 8px 10px;
  background: #f5faf6;
  border: 1px solid rgba(28, 138, 115, 0.10);
  border-radius: 10px;
}

/* --- Audio rekaman --- */

.lesson .exercise-recorded-audio {
  display: block;
  width: calc(100% - 20px);
  height: 34px;
  margin: 8px 10px 10px;
}

/* =========================================================
   IQRO7 — GROUPED EXERCISE CARDS
   ---------------------------------------------------------
   1 pedagogical card may contain multiple independently
   scorable exercises. Card = presentation unit,
   exercise-item = progress / audio / AI unit.
   ========================================================= */

/* Card-level heading / note */

.lesson .exercise-card-heading {
  width: 100%;
  min-width: 0;
  text-align: start;
  text-transform: none;
  letter-spacing: normal;
}

.lesson .exercise-card-title {
  color: var(--emerald-900);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.lesson .exercise-card-instruction {
  margin-top: 3px;
  color: var(--ink-soft);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}

.lesson .exercise-card-explanation {
  margin-top: 5px;
  color: var(--ink-faint);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.55;
}

.lesson .exercise-audio-hint {
  margin: -1px 12px 7px;
  color: var(--ink-faint);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  text-align: start;
}

/* Container child exercises.
   HTML already carries dir="rtl", therefore exercise #1
   starts visually from the right for Arabic learning flow. */

.lesson .exercise-items {
  display: flex;
  align-items: stretch;
  gap: 8px;
  width: 100%;
  padding: 2px 10px 4px;
}

/* Default / row layout:
   keep short contrast items visible together; wrap only when
   the card contains more items than the mobile width can hold. */

.lesson .exercise-items-row {
  flex-direction: row;
  flex-wrap: wrap;
}

/* Stack layout for phrases / long material. */

.lesson .exercise-items-stack {
  flex-direction: column;
  flex-wrap: nowrap;
}

/* One independently actionable exercise inside a card */

.lesson .exercise-item {
  position: relative;
  min-width: 0;
  flex: 1 1 104px;
  padding: 7px 6px 8px;
  background: rgba(249, 252, 250, 0.82);
  border: 1px solid rgba(20, 107, 91, 0.09);
  border-radius: 13px;
}

/* For row cards, prefer up to three compact items per line.
   Four or more naturally wrap while preserving RTL order. */

.lesson .exercise-items-row > .exercise-item {
  max-width: calc((100% - 16px) / 3);
}

/* Stack card uses full width. */

.lesson .exercise-items-stack > .exercise-item {
  flex-basis: auto;
  width: 100%;
  max-width: none;
}

/* Tiny per-exercise identity + completion state */

.lesson .exercise-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-height: 20px;
  margin-bottom: 2px;
}

.lesson .exercise-item-number {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: #f3f7f5;
  color: var(--ink-faint);
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 8.5px;
  font-weight: 800;
}

/* Existing status circle is too large for a 3-column row. */

.lesson .exercise-item .exercise-status {
  flex: 0 0 19px;
  width: 19px;
  height: 19px;
  font-size: 9px;
}

/* Exercise-specific instruction remains below card instruction */

.lesson .exercise-item-instruction {
  margin: 3px 1px 5px;
  color: var(--ink-soft);
  font-family: var(--font-sans);
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.4;
  text-align: start;
}

/* Compact Arabic panel inside grouped cards */

.lesson .exercise-item .exercise-arabic {
  min-height: 74px;
  margin: 0;
  padding: 9px 5px 12px;
  border-radius: 11px;
}

.lesson .exercise-item .exercise-arabic::before {
  top: 2px;
  font-size: 9px;
}

.lesson .exercise-item .exercise-arabic-notes {
  font-size: 10px;
  line-height: 1.45;
}

/* Short isolated letters / harakat need to remain large and clear */

.lesson .exercise-item .exercise-arabic-text {
  margin-top: 7px;
  font-size: clamp(31px, 8.8vw, 38px);
  line-height: 1.65;
  white-space: pre-line;
}

/* Note exercise can contain mixed Latin + Arabic */

.lesson .exercise-item .exercise-arabic-text[dir="ltr"] {
  font-size: 15px;
  line-height: 1.55;
}

/* Each child keeps its own controls.
   Stack buttons vertically so three exercises can remain
   side-by-side without tiny unreadable buttons. */

.lesson .exercise-item .exercise-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  padding: 7px 0 0;
}

.lesson .exercise-item .exercise-actions:empty {
  display: none;
}

.lesson .exercise-item .exercise-actions button {
  min-height: 34px;
  padding: 7px 5px;
  border-radius: 10px;
  font-size: 9px;
  line-height: 1.25;
}

/* Results / retry / recording belong to the child exercise,
   never to the whole card. */

.lesson .exercise-item .exercise-result {
  margin: 6px 0 0;
  font-size: 9.5px;
  line-height: 1.45;
}

.lesson .exercise-item .exercise-result:not(:empty) {
  padding: 6px;
}

.lesson .exercise-item .exercise-recorded-audio {
  width: 100%;
  height: 32px;
  margin: 7px 0 0;
}

/* Cards containing only one exercise should not look cramped. */

.lesson .exercise-items-row > .exercise-item:only-child {
  flex-basis: 100%;
  max-width: none;
}

/* Two-item contrast cards get a balanced 50/50 layout. */

.lesson .exercise-items-row > .exercise-item:first-child:nth-last-child(2),
.lesson .exercise-items-row > .exercise-item:first-child:nth-last-child(2) ~ .exercise-item {
  flex-basis: calc((100% - 8px) / 2);
  max-width: calc((100% - 8px) / 2);
}

/* Long Arabic content can explicitly use stack layout */

.lesson .exercise-card-layout-stack .exercise-item .exercise-arabic-text {
  font-size: clamp(30px, 8vw, 38px);
  line-height: 1.85;
}

/* Very narrow phones: preserve the pedagogical row for
   3 short items, but tighten spacing instead of stacking them. */

@media (max-width: 360px) {

  .lesson .exercise-items {
    gap: 5px;
    padding-left: 7px;
    padding-right: 7px;
  }

  .lesson .exercise-items-row > .exercise-item {
    flex-basis: calc((100% - 10px) / 3);
    max-width: calc((100% - 10px) / 3);
    padding-left: 4px;
    padding-right: 4px;
  }

  .lesson .exercise-item .exercise-arabic {
    padding-left: 3px;
    padding-right: 3px;
  }

  .lesson .exercise-item .exercise-arabic-text {
    font-size: 30px;
  }

  .lesson .exercise-item .exercise-actions button {
    padding-left: 3px;
    padding-right: 3px;
    font-size: 8px;
  }

}

/* --- Navigasi lesson --- */

.lesson-navigation {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.lesson-navigation button {
  width: 100%;
  max-width: none;
  min-height: 42px;
  margin: 0;
  padding: 9px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 800;
}

.lesson-navigation #prevLessonButton {
  background: var(--ui-surface);
  color: var(--emerald-700);
  border: 1px solid rgba(17, 92, 78, 0.14);
  box-shadow: 0 12px 24px -22px rgba(11, 59, 51, 0.55);
}

.lesson-navigation #nextLessonButton {
  background: linear-gradient(135deg, #0d5b4d, #23a287);
  color: var(--ui-surface);
  box-shadow: 0 14px 26px -20px rgba(11, 59, 51, 0.72);
}

.lesson-navigation #nextLessonButton:disabled {
  background: #e8ede9;
  color: #9ba6a0;
  border: 1px solid #dde4df;
  box-shadow: none;
  cursor: not-allowed;
}

/* --- Premium modal di dalam lesson --- */

.lesson .premium-modal {
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(8, 35, 30, 0.56);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

.lesson .premium-card {
  max-width: 390px;
  padding: 30px 24px 24px;
  background: linear-gradient(180deg, #fffefb, #f8fcf8);
  border: 1px solid rgba(201, 162, 39, 0.20);
  border-radius: 25px;
  box-shadow: 0 28px 60px -25px rgba(0, 0, 0, 0.45);
}

.lesson .premium-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  background: #fff6d9;
  border-radius: 17px;
  font-size: 23px;
}

.lesson .premium-card h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--emerald-900);
}

.lesson .premium-card p {
  margin: 0 0 20px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.65;
}

/* --- Varian latihan tipe "catatan" --- */

.exercise-type-note .exercise-arabic-text {
  font-family: var(--font-content);
  font-size: 15px;
  font-weight: inherit;
  line-height: 1.7;
  text-align: start;
}

/* Elemen harakat/huruf Arab inline di tengah teks Latin.
   unicode-bidi: isolate wajib ada di sini — tanpa ini, tanda baca
   Latin yang nempel langsung setelah teks RTL (contoh: 'i'.) bisa
   ke-reorder atau hilang secara visual oleh Unicode Bidi Algorithm,
   walau datanya di DOM tetap utuh. */

.arabic-inline {
  font-family: var(--font-arabic);
  font-size: 1.25em;
  font-weight: normal;
  font-style: normal;
  /* Keep inline Arabic from enlarging the surrounding Latin line. */
  line-height: 1;
  letter-spacing: normal;
  unicode-bidi: isolate;
}

.exercise-type-note .arabic-inline {
  font-size: 1.7em;
}

/* =========================================================
   14. QUIZ
   ========================================================= */

.quiz-section {
  margin-top: 18px;
  padding: 14px 10px 12px;
  background: linear-gradient(
        180deg,
        #f8f6ff 0%,
        #fcfbff 100%
    );
  border: 1px solid rgba(101, 83, 166, 0.10);
  border-radius: 20px;
}

.quiz-section > h3 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--quiz-700);
}

.quiz-question-list {
  display: grid;
  gap: 10px;
}

.quiz-question-card {
  position: relative;
  overflow: hidden;
  margin: 0;
  padding: 13px;
  background: var(--ui-surface);
  border: 1px solid rgba(101, 83, 166, 0.14);
  border-radius: 16px;
  box-shadow: 0 10px 24px -24px rgba(71, 54, 130, 0.50);
}

.quiz-question-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
        90deg,
        #6553a6,
        #9a87dd
    );
}

.quiz-question-number {
  margin-bottom: 6px;
  color: var(--quiz-700);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.quiz-prompt {
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.quiz-arabic-text {
  margin: 2px 0 11px;
  text-align: center;
  font-family: var(--font-arabic);
  font-size: 38px;
  line-height: 1.45;
  color: #403565;
}

/* --- Pilihan ganda --- */

.quiz-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
}

.quiz-option {
  width: 100%;
  min-height: 45px;
  margin: 0;
  padding: 8px 10px;
  background: #fbfdfc;
  color: var(--ink);
  border: 1.5px solid #dce8e3;
  border-radius: 11px;
  box-shadow: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.quiz-option:hover {
  background: var(--mint-50);
  border-color: rgba(35, 162, 135, 0.44);
}

.quiz-option.selected {
  background: #e4f7ef;
  color: var(--emerald-900);
  border-color: var(--emerald-500);
  box-shadow: 0 0 0 2px rgba(35, 162, 135, 0.07);
  font-weight: 700;
  transform: none;
}

.quiz-option-arabic,
.quiz-arrange-option {
  font-family: var(--font-arabic);
  font-size: 29px;
  font-weight: normal;
  line-height: 1.45;
}

/* --- Susun kata (arrange) --- */

.quiz-arranged-answer {
  display: grid;
  grid-template-columns: max-content;
  justify-content: center;
  gap: 8px;
  min-height: 58px;
  margin-bottom: 14px;
  padding: 10px;
  background: #f8fcfa;
  border: 2px dashed #d1d5db;
  border-radius: 12px;
}

.quiz-arranged-item {
  width: 100%;
  min-width: 150px;
  max-width: 100%;
  margin: 0;
  padding: 8px 16px;
  background: #e4f7ef;
  color: var(--emerald-900);
  border: 1.5px solid var(--emerald-500);
  border-radius: 9px;
  box-shadow: none;
  font-family: var(--font-arabic);
  font-size: 28px;
  font-weight: normal;
  line-height: 1.35;
  text-align: center;
  cursor: pointer;
}

.quiz-arrange-option:disabled {
  font-family: var(--font-arabic);
  font-size: 26px;
  opacity: 0.28;
  cursor: default;
}

/* --- Menjodohkan (matching) --- */

.quiz-matching {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}

.quiz-matching-left,
.quiz-matching-right {
  display: grid;
  gap: 8px;
}

.quiz-match-option {
  width: 100%;
  max-width: none;
  min-height: 48px;
  margin: 0;
  padding: 9px 12px;
  background: #fbfdfc;
  color: var(--ink);
  border: 1.5px solid #dce8e3;
  border-radius: 11px;
  box-shadow: none;
  font-size: 14px;
  font-weight: 600;
}

.quiz-match-arabic {
  font-family: var(--font-arabic);
  font-size: 29px;
  font-weight: normal;
  line-height: 1.45;
}

.quiz-match-option:hover {
  background: #f1faf6;
  border-color: var(--emerald-500);
}

.quiz-match-option.selected {
  background: #e4f7ef;
  border-color: var(--emerald-500);
  box-shadow: 0 0 0 2px rgba(35, 162, 135, 0.07);
}

.quiz-match-option.matched {
  background: #e4f7ef;
  color: var(--emerald-900);
  border-color: var(--emerald-500);
  opacity: 0.65;
}

.quiz-match-option:disabled {
  cursor: default;
}

/* --- Voice --- */

.quiz-voice-actions {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.quiz-voice-record-button {
  width: 100%;
  max-width: 280px;
  min-height: 45px;
  margin: 0;
  padding: 10px 14px;
  background: linear-gradient(135deg, var(--emerald-900), var(--emerald-500));
  color: var(--ui-surface);
  border-radius: 12px;
  box-shadow: 0 12px 22px -18px rgba(11, 59, 51, 0.75);
  font-size: 12px;
  font-weight: 800;
}

.quiz-voice-record-button:hover {
  transform: translateY(-1px);
}

.quiz-voice-result {
  min-height: 0;
  margin-top: 9px;
  color: var(--emerald-900);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
}

.quiz-voice-result:not(:empty) {
  padding: 8px 10px;
  background: #f5faf6;
  border: 1px solid rgba(28, 138, 115, 0.12);
  border-radius: 10px;
}

/* --- Submit & hasil --- */

#submitQuizButton {
  min-height: 43px;
  margin: 10px auto 0;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 12px;
}

#submitQuizButton:disabled {
  background: #e5ece8;
  color: #99a59f;
  box-shadow: none;
  cursor: not-allowed;
}

.quiz-result {
  margin-top: 7px;
  color: var(--emerald-900);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

/* =========================================================
   15. SHARE ACHIEVEMENT (poster 1080x1350)
   ========================================================= */

.share-achievement-template {
  position: relative;
  overflow: hidden;
  width: 1080px;
  height: 1350px;
  padding: 110px 90px;
  background: #f4ead8;
  color: #222222;
  text-align: center;
}

#shareAchievementTemplate {
  display: none;
}

.share-achievement-background {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  width: 1080px;
  height: 1350px;
  object-fit: cover;
}

.share-achievement-brand {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 6px;
}

.share-achievement-check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 130px;
  height: 130px;
  margin: 150px auto 45px;
  border: 4px solid currentColor;
  border-radius: 50%;
  font-size: 64px;
}

.share-achievement-title {
  font-size: 72px;
  font-weight: 700;
}

.share-achievement-text {
  margin-top: 55px;
  font-size: 38px;
}

.share-achievement-program {
  margin-top: 100px;
  font-size: 36px;
  line-height: 1.5;
}

.share-achievement-footer {
  margin-top: 105px;
  font-size: 28px;
  font-weight: 600;
  opacity: 0.6;
}

/* Area dinamis di dalam panel kosong poster */

.share-achievement-dynamic {
  position: absolute;
  left: 220px;
  top: 575px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 640px;
  height: 260px;
  color: #174c3b;
  text-align: center;
}

.share-achievement-day {
  font-size: 92px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 3px;
}

.share-achievement-lesson {
  margin-top: 28px;
  font-size: 38px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 4px;
}

/* =========================================================
   16. MEDIA QUERIES
   ========================================================= */

/* ---------- Ponsel kecil (<= 380px) ---------- */

/* ---------- Ponsel (<= 480px) ---------- */

@media (max-width: 480px) {

  .quiz-matching {
    gap: 8px;
  }

  .quiz-match-option {
    min-height: 44px;
    padding: 8px;
    font-size: 13px;
  }

  .quiz-match-arabic {
    font-size: 27px;
  }

  .dashboard-link {
    padding: 8px;
    margin-right: 6px;
    font-size: 12px;
    gap: 4px;
  }

}

/* ---------- Tablet (>= 600px) ---------- */

@media (min-width: 600px) {

  .app {
    max-width: 680px;
    min-height: calc(100vh - 48px);
    margin: 24px auto;
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
  }

  .home,
  .login,
  .subscription-page {
    padding-left: 40px;
    padding-right: 40px;
  }

  /* Homepage marketing */

  /* Dashboard */

  .dashboard {
    padding-top: 24px;
    padding-bottom: 24px;
  }

  /* Lesson */

  .lesson {
    padding: 22px 28px 34px;
  }

  .lesson .exercise-list {
    gap: 13px;
  }

  .lesson .exercise-card {
    border-radius: 20px;
  }

  .lesson .exercise-arabic {
    min-height: 105px;
    margin: 0 12px;
    padding: 17px 20px 24px;
  }

  .lesson .exercise-actions {
    gap: 12px;
    padding: 11px 12px 0;
  }

}

/* ---------- Desktop (>= 900px) ---------- */

@media (min-width: 900px) {

  .app {
    max-width: 960px;
  }

  .home-app {
    max-width: 1120px;
  }

  .home,
  .login,
  .subscription-page {
    padding-left: 56px;
    padding-right: 56px;
  }

  .home > *,
  .login > *,
  .subscription-page > * {
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
  }

  .dashboard > *,
  .lesson > * {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
  }

  /* Homepage marketing */

  /* Lesson */

  .lesson {
    max-width: 760px;
    margin: 0 auto;
    padding: 26px 0 40px;
  }

  .lesson .exercise-list {
    gap: 14px;
  }

  .lesson .exercise-arabic {
    min-height: 110px;
    font-size: 40px;
  }

}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }

  button:hover,
  .lesson .exercise-teacher-button:hover,
  .lesson .exercise-record-button:hover,
  .quiz-voice-record-button:hover {
    transform: none;
  }

}

/* =========================================================
   WUDHU & SALAH — scoped modern guide pages
   ========================================================= */

body.worship-page {
  --worship-primary: var(--ui-primary);
  --worship-soft: var(--ui-primary-soft);
  --worship-line: var(--ui-border);
  color: var(--ui-ink);
  background: var(--ui-page-background);
  background-attachment: fixed;
}

body.worship-shalat {
  --worship-soft: #f2edff;
  --worship-line: #e3dcf5;
}

body.worship-page > .worship-app {
  width: min(1160px, 100%);
  max-width: 1160px;
  padding: 18px 24px 40px;
  background: transparent;
}

body.worship-page .wudhu-page {
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  padding: 12px 0 0;
  background: transparent;
  font-family: var(--font-content);
}

body.worship-page .wudhu-page > :is(.worship-intro, .worship-feedback, .exercise-list, .wudhu-completion) {
  width: 100%;
  max-width: none;
  margin-inline: 0;
}

body.worship-page .worship-intro {
  padding: 18px 20px;
  margin-bottom: 12px;
  border: 1px solid var(--ui-border);
  border-radius: 22px;
  background: linear-gradient(115deg, #ffffff, #f3f5ff);
  box-shadow: var(--ui-shadow);
  text-align: center;
}

body.worship-page .worship-intro .lesson-title {
  margin: 0;
  color: #273465;
  font-family: var(--font-content);
  font-size: clamp(24px, 4vw, 30px);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -.025em;
  text-transform: none;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

body.worship-page .worship-intro .lesson-description {
  max-width: 76ch;
  margin: 7px auto 0;
  color: #4f5d78;
  font-size: 14.5px;
  font-weight: 400;
  line-height: 1.55;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

body.worship-page .wudhu-progress-wrapper {
  width: min(620px, 100%);
  margin: 14px auto 0;
  text-align: start;
}

body.worship-page .wudhu-progress-info {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 16px;
  margin-bottom: 7px;
  color: #4c5878;
  font: 600 13px/1.5 var(--font-sans);
}

body.worship-page .wudhu-progress-info > :last-child {
  flex: none;
  font-weight: 800;
  color: var(--worship-primary);
}

body.worship-page .wudhu-progress-track {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e1e6f4;
}

body.worship-page .wudhu-progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--ui-primary);
  transition: width .25s ease;
}

body.worship-page .worship-feedback {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px 14px;
  border: 1px solid #dce2f2;
  border-radius: 12px;
  background: var(--ui-surface);
  color: #4f5d78;
}

body.worship-page .worship-feedback p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

body.worship-page .wudhu-page > .exercise-list {
  display: grid;
  gap: 12px;
}

body.worship-page .wudhu-section {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 1px solid var(--worship-line);
  border-radius: 18px;
  background: var(--ui-surface);
  box-shadow: var(--ui-shadow);
}

body.worship-page .wudhu-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 12px 16px;
  margin: 0;
  border-bottom: 1px solid var(--worship-line);
  border-radius: 18px 18px 0 0;
  background: var(--worship-soft);
}

body.worship-page .wudhu-section-number {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: var(--worship-primary);
  color: var(--ui-surface);
  font: 800 15px/1 var(--font-sans);
}

body.worship-page .wudhu-section-number.completed {
  border-color: #bbdfcc;
  background: var(--ui-success-soft);
  color: var(--ui-success);
}

body.worship-page .wudhu-section-title {
  margin: 0;
  min-width: 0;
  color: #2e3658;
  font-size: 18px;
  font-weight: 750;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

body.worship-page .wudhu-section-exercises {
  display: grid;
  min-width: 0;
  gap: 0;
}

body.worship-page .wudhu-exercise-card {
  width: 100%;
  min-width: 0;
  max-width: none;
  margin: 0;
  padding: 14px 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

body.worship-page .wudhu-exercise-card + .wudhu-exercise-card {
  border-top: 1px solid #e5e9f4;
}

body.worship-page .wudhu-exercise-card::before,
body.worship-page .wudhu-exercise-card .exercise-arabic::before {
  display: none;
}

body.worship-page .wudhu-exercise-card .exercise-arabic {
  display: block;
  width: 100%;
  min-height: 0;
  margin: 0 0 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #263454;
  font-family: var(--font-arabic);
  font-size: 32px;
  font-weight: 400;
  line-height: 1.9;
  direction: rtl;
  unicode-bidi: isolate;
  text-align: start;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  overflow: visible;
}

body.worship-page .wudhu-exercise-card .exercise-transliteration {
  margin: 0 0 10px;
  padding: 0;
  color: #4f5d78;
  font: 500 14px/1.65 var(--font-sans);
  direction: ltr;
  unicode-bidi: isolate;
  text-align: start;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

body.worship-page .wudhu-exercise-card .exercise-instruction {
  margin: 0 0 6px;
  padding: 0;
  color: #2e3b59;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.55;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

body.worship-page .wudhu-exercise-card .exercise-explanation {
  max-width: 85ch;
  margin: 0 0 10px;
  padding: 0;
  color: var(--ui-muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.65;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

body.worship-page :is(.wudhu-understand-button, .worship-completion-action, .worship-retry) {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  width: auto;
  max-width: 100%;
  min-height: 40px;
  margin: 4px 0 0;
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: var(--worship-primary);
  color: var(--ui-surface);
  font: 700 13px/1.4 var(--font-sans);
  box-shadow: none;
  cursor: pointer;
}

body.worship-page :is(.wudhu-understand-button, .worship-completion-action):hover:not(:disabled) {
  background: var(--ui-primary-hover);
  transform: none;
  box-shadow: none;
}

body.worship-page .wudhu-understand-button:disabled {
  opacity: .7;
  cursor: wait;
}

body.worship-page .wudhu-understand-button.completed {
  opacity: 1;
  border-color: #bbdfcc;
  background: var(--ui-success-soft);
  color: var(--ui-success);
  cursor: default;
}

body.worship-page .worship-retry {
  margin: 0;
  background: var(--ui-surface);
  border-color: #d9dfed;
  color: #373fa5;
}

body.worship-page .worship-retry:hover {
  background: #eef0ff;
  transform: none;
}

body.worship-page .worship-completion-action svg {
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
}

body.worship-page .worship-save-status {
  max-width: 75ch;
  margin: 8px 0 0;
  color: #9d3636;
  font-size: 13px;
  line-height: 1.5;
}

body.worship-page .wudhu-completion {
  margin-top: 12px;
  padding: 18px;
  border: 1px solid #cde4d7;
  border-radius: 18px;
  background: linear-gradient(120deg, #f1fbf5, var(--ui-surface));
  text-align: start;
}

body.worship-page .wudhu-completion h3 {
  margin: 0 0 6px;
  color: var(--ui-success);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.4;
}

body.worship-page .wudhu-completion p {
  margin: 0 0 10px;
  color: #4f5d78;
  font-size: 14px;
  line-height: 1.6;
}

body.worship-page :is(a, button):focus-visible {
  outline: 3px solid var(--ui-focus);
  outline-offset: 3px;
}

@media (max-width: 600px) {

  body.worship-page > .worship-app {
    padding: 10px 12px 24px;
  }

  body.worship-page .wudhu-page {
    padding-top: 8px;
  }

  body.worship-page .worship-intro {
    padding: 15px 13px;
    border-radius: 18px;
  }

  body.worship-page .wudhu-progress-info {
    font-size: 12px;
    gap: 8px;
  }

  body.worship-page .wudhu-section-header {
    padding: 10px 12px;
    gap: 9px;
  }

  body.worship-page .wudhu-section-number {
    flex-basis: 32px;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    font-size: 14px;
  }

  body.worship-page .wudhu-section-title {
    font-size: 17px;
  }

  body.worship-page .wudhu-exercise-card {
    padding: 12px;
  }

  body.worship-page .wudhu-exercise-card .exercise-arabic {
    font-size: 28px;
  }

}

@media (prefers-reduced-motion: reduce) {

  body.worship-page .wudhu-progress-bar {
    transition: none;
  }

}

/* =========================================================
   18. LESSON BOOK — scoped to body.lesson-book
   Canonical design; shared legacy page styles above remain intact.
   ========================================================= */

/* Modern reading surface. Every rule is restricted to this lesson's exercises. */

body.lesson-book #exerciseList:empty {
  display: none;
}

body.lesson-book #exerciseList .exercise-card {
  padding: 16px 12px 7px;
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body.lesson-book #exerciseList .exercise-card + .exercise-card {
  border-top: 1px solid #d6e9e5;
}

body.lesson-book #exerciseList .exercise-card::before,
body.lesson-book #exerciseList .exercise-arabic::before {
  display: none;
}

body.lesson-book #exerciseList .exercise-card-header {
  min-height: 0;
  margin: 0 0 8px;
  padding: 0 4px;
  color: var(--book-muted);
  text-transform: none;
  letter-spacing: normal;
}

body.lesson-book #exerciseList .exercise-card-instruction,
body.lesson-book #exerciseList .exercise-card-explanation {
  margin-top: 3px;
  color: var(--book-muted);
  font-size: 13px;
  line-height: 1.55;
  font-weight: 500;
}

body.lesson-book #exerciseList .exercise-audio-hint {
  width: fit-content;
  margin: 3px 4px 8px;
  padding: 5px 9px;
  color: #006b62;
  background: #ccf9ec;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

body.lesson-book #exerciseList .exercise-items {
  --exercise-row-gap: 12px;
  gap: var(--exercise-row-gap);
  padding: 0;
}

/* Each item follows its widest visible child, without equal-width columns
   or filling spare space. Whole exercises wrap in their existing RTL order;
   a reading wider than the container can still wrap safely. */

body.lesson-book #exerciseList .exercise-items-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
}

body.lesson-book #exerciseList .exercise-items > .exercise-item {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  min-width: 0;
  padding: 3px 5px 4px;
  background: transparent;
  border: 0;
  border-radius: 8px;
  box-shadow: none;
}

body.lesson-book #exerciseList .exercise-items-row > .exercise-item {
  flex: 0 1 max-content;
  width: max-content;
  min-width: 0;
  max-width: 100%;
}

body.lesson-book #exerciseList .exercise-items-row > .exercise-item .exercise-arabic-text[dir="rtl"] {
  width: max-content;
  max-width: 100%;
  margin-inline-start: 0;
  margin-inline-end: auto;
}

/* Helper prose participates in natural sizing like the other visible
   children. Long words still wrap when an item reaches the card width. */

body.lesson-book #exerciseList .exercise-items-row > .exercise-item .exercise-result,
body.lesson-book #exerciseList .exercise-items-row > .exercise-item .exercise-item-instruction,
body.lesson-book #exerciseList .exercise-items-row > .exercise-item .exercise-arabic-notes {
  overflow-wrap: anywhere;
}

body.lesson-book #exerciseList .exercise-item:focus-within,
body.lesson-book #exerciseList .exercise-item:has(.is-audio-playing),
body.lesson-book #exerciseList .exercise-item:has(.is-audio-loading) {
  background: #d5fbef;
  box-shadow: inset 0 -3px 0 #12ba94;
}

body.lesson-book #exerciseList .exercise-item:has([data-book-state="stop"]) {
  background: #fff0ed;
}

body.lesson-book #exerciseList .exercise-item-header {
  justify-content: flex-start;
  gap: 6px;
  min-height: 18px;
  margin: 0;
}

body.lesson-book #exerciseList .exercise-item-number {
  min-width: 16px;
  height: 18px;
  padding: 0;
  background: transparent;
  color: var(--book-muted);
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

body.lesson-book #exerciseList .exercise-item .exercise-status {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  background: #d2f8d8;
  color: #216830;
  font-size: 10px;
}

body.lesson-book #exerciseList .exercise-status:empty {
  visibility: hidden;
}

body.lesson-book #exerciseList .exercise-item-instruction,
body.lesson-book #exerciseList .exercise-arabic-notes {
  color: var(--book-muted);
  font-size: 11px;
  line-height: 1.55;
}

body.lesson-book #exerciseList .exercise-item .exercise-arabic {
  min-height: 0;
  margin: 0;
  padding: 0 0 10px;
  background: transparent;
  border: 0;
  border-radius: 0;
}

body.lesson-book #exerciseList .exercise-arabic-notes:not(:has(> *)) {
  display: none;
}

body.lesson-book #exerciseList .exercise-item .exercise-arabic-text {
  margin-top: 0;
  padding: 0 2px;
  font-size: clamp(32px, 8.8vw, 40px);
  line-height: 2.2;
  text-align: right;
  color: var(--book-ink);
  overflow-wrap: anywhere;
  border-radius: 5px;
}

/* Trim only the leading top space for plain Arabic readings.
   The renderer emits whitespace in empty notes; test child elements, not :empty.
   Retain the full line box and bottom padding for kasrah/descending glyphs.
   Notes and mixed-language explanations keep their normal spacing. */

body.lesson-book #exerciseList .exercise-arabic-notes:not(:has(> *)) + .exercise-arabic-text[dir="rtl"] {
  margin-top: -12px;
}

body.lesson-book #exerciseList .exercise-item .exercise-arabic-text[dir="ltr"] {
  direction: ltr;
  text-align: left;
  font-size: 15px;
  line-height: 1.7;
}

body.lesson-book #exerciseList .exercise-item .exercise-audio-target:hover,
body.lesson-book #exerciseList .exercise-item .exercise-audio-target:focus-visible,
body.lesson-book #exerciseList .exercise-item .is-audio-playing {
  color: #006a6b;
  text-shadow: none;
}

body.lesson-book #exerciseList .exercise-audio-target:focus-visible {
  outline: 2px solid var(--book-accent);
  outline-offset: 2px;
}

body.lesson-book #exerciseList .exercise-item .exercise-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: auto;
  padding: 2px 0 0;
  gap: 6px;
}

body.lesson-book #exerciseList .exercise-item .exercise-actions:empty {
  display: none;
}

body.lesson-book #exerciseList .exercise-item .exercise-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 1 auto;
  gap: 6px;
  direction: ltr;
  width: auto;
  max-width: 100%;
  min-width: 44px;
  min-height: 30px;
  margin: 0;
  padding: 4px 10px;
  border: 1px solid #007f78;
  border-radius: 999px;
  background: #007f78;
  color: var(--ui-surface);
  box-shadow: none;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  white-space: normal;
}

body.lesson-book #exerciseList .exercise-item .exercise-actions button:hover:not(:disabled) {
  background: #006c65;
  border-color: #006c65;
  transform: none;
}

body.lesson-book #exerciseList .exercise-item .exercise-actions button:focus-visible {
  outline: 2px solid var(--book-accent);
  outline-offset: 3px;
}

body.lesson-book #exerciseList .exercise-item .exercise-actions button:active:not(:disabled) {
  background: #005c56;
}

body.lesson-book #exerciseList .exercise-item .exercise-actions button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

body.lesson-book #exerciseList .exercise-item .exercise-actions [data-book-state="stop"] {
  background: #b7353d;
  border-color: #b7353d;
  color: var(--ui-surface);
}

body.lesson-book #exerciseList .exercise-item .exercise-actions [data-book-state="stop"]:hover:not(:disabled) {
  background: #962831;
  border-color: #962831;
}

body.lesson-book #exerciseList .book-control-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  pointer-events: none;
}

body.lesson-book #exerciseList .exercise-result:empty {
  margin: 0;
}

body.lesson-book #exerciseList .exercise-item .exercise-result:not(:empty) {
  margin-top: 8px;
  padding: 8px;
  background: #edfff7;
  border: 1px solid #cbdfe7;
  border-radius: 8px;
  color: #294c5a;
  font-size: 11px;
  text-align: start;
  overflow-wrap: anywhere;
}

body.lesson-book #exerciseList .exercise-recorded-audio {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

@media (max-width: 360px) {

  body.lesson-book #exerciseList .exercise-card {
    padding-inline: 6px;
  }

  body.lesson-book #exerciseList .exercise-items {
    --exercise-row-gap: 6px;
  }

  body.lesson-book #exerciseList .exercise-items > .exercise-item {
    padding-inline: 3px;
  }

  body.lesson-book #exerciseList .exercise-item .exercise-actions button {
    padding-inline: 8px;
    gap: 4px;
  }

}

@media (min-width: 600px) {

  body.lesson-book #exerciseList .exercise-card {
    padding: 5px 10px 5px;
  }

  body.lesson-book #exerciseList .exercise-items {
    --exercise-row-gap: 20px;
  }

  body.lesson-book #exerciseList .exercise-item .exercise-actions button {
    padding-inline: 12px;
    font-size: 11px;
  }

}

/* A vivid lesson banner supplies the color; the reading surface stays clear. */

body.lesson-book #lessonProgress::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -18px;
  top: -27px;
  width: 108px;
  height: 108px;
  border: 17px solid rgba(103, 255, 216, .22);
  border-radius: 50%;
  pointer-events: none;
}

body.lesson-book #exerciseList .exercise-card-title {
  color: #007b73;
  font-family: var(--font-sans);
  line-height: 1.5;
  font-weight: 800;
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
}

body.lesson-book #exerciseList .exercise-card-title::before {
  content: "";
  width: 6px;
  height: 13px;
  flex: 0 0 6px;
  border-radius: 3px;
  background: #13b999;
}

/* =========================================================
   19. OPTIONAL ARABIC TRACING — lesson only
   ========================================================= */

body.lesson-book #writingSection .writing-summary {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 14px 17px;
  border-inline-start: 5px solid #ffd46a;
  background: linear-gradient(110deg, #b94e27, #a74428);
  color: var(--ui-surface);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

body.lesson-book #writingSection .writing-summary::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -18px;
  top: -27px;
  width: 108px;
  height: 108px;
  border: 17px solid rgba(255, 218, 153, .20);
  border-radius: 50%;
  pointer-events: none;
}

body.lesson-book #writingSection .writing-summary::-webkit-details-marker {
  display: none;
}

body.lesson-book #writingSection .writing-heading,
body.lesson-book #writingSection .writing-summary-end {
  display: flex;
  align-items: center;
  gap: 8px;
}

body.lesson-book #writingSection .writing-heading {
  font-size: 14px;
  font-weight: 800;
}

body.lesson-book #writingSection .writing-symbol {
  width: 21px;
  height: 21px;
  flex-shrink: 0;
}

body.lesson-book #writingSection .writing-chevron {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

body.lesson-book #writingSection[open] .writing-chevron {
  transform: rotate(180deg);
}

body.lesson-book #writingSection .writing-optional {
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--ui-surface);
  color: #8c3b22;
  font-size: 10px;
  font-weight: 700;
}

body.lesson-book #writingSection .writing-body {
  padding: 12px 14px 14px;
}

body.lesson-book #writingSection .writing-instruction {
  margin: 0 0 12px;
  color: #405d58;
  font-size: 12px;
  line-height: 1.6;
}

body.lesson-book #writingSection .writing-example-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 640px;
  margin: 0 auto 7px;
  color: #49645d;
  font-size: 11px;
  font-weight: 600;
}

body.lesson-book #writingSection .writing-example-text {
  max-width: 65%;
  font-family: var(--font-arabic);
  font-size: 25px;
  line-height: 1.8;
  color: #153e35;
  overflow-wrap: anywhere;
}

body.lesson-book #writingSection .writing-board {
  position: relative;
  width: 100%;
  max-width: 640px;
  aspect-ratio: 5 / 3;
  margin: 0 auto;
  background: #fffef8;
  border: 1px solid #d8e5de;
  border-radius: 10px;
  overflow: hidden;
}

body.lesson-book #writingSection canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
}

body.lesson-book #writingSection #writingGuide {
  pointer-events: none;
}

body.lesson-book #writingSection #writingInk {
  touch-action: none;
  cursor: crosshair;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

body.lesson-book #writingSection .writing-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 640px;
  margin: 12px auto 0;
}

body.lesson-book #writingSection .writing-toolbar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: auto;
  max-width: none;
  min-height: 36px;
  margin: 0;
  padding: 7px 11px;
  border: 1px solid #e5c3b4;
  border-radius: 9px;
  background: var(--ui-surface);
  color: #8c3b22;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  box-shadow: none;
}

body.lesson-book #writingSection .writing-toolbar button svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
}

body.lesson-book #writingSection .writing-toolbar button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

body.lesson-book #writingSection .writing-toolbar button:hover:not(:disabled) {
  background: #fff0e9;
  transform: none;
}

body.lesson-book #writingSection .writing-toolbar .writing-next {
  margin-left: auto;
  background: #a74428;
  border-color: #a74428;
  color: var(--ui-surface);
}

body.lesson-book #writingSection .writing-toolbar .writing-next:hover:not(:disabled) {
  background: #8e351d;
}

body.lesson-book #writingSection .writing-summary:focus-visible,
body.lesson-book #writingSection button:focus-visible {
  outline: 2px solid #a74428;
  outline-offset: -3px;
}

body.lesson-book #writingSection .writing-footnote,
body.lesson-book #writingSection .writing-notice {
  max-width: 640px;
  margin: 10px auto 0;
  color: #587065;
  font-size: 10px;
  line-height: 1.6;
}

body.lesson-book #writingSection .writing-notice {
  color: #79500c;
}

body.lesson-book #writingSection .writing-notice:empty {
  display: none;
}

@media (max-width: 360px) {

  body.lesson-book #writingSection .writing-body {
    padding-inline: 8px;
  }

  body.lesson-book #writingSection .writing-summary {
    padding-inline: 10px;
  }

  body.lesson-book #writingSection .writing-toolbar {
    gap: 5px;
  }

  body.lesson-book #writingSection .writing-toolbar button {
    padding-inline: 8px;
    font-size: 10px;
  }

}

/* Required quiz, folded into the same lesson flow as writing practice. */

body.lesson-book #quizSection .quiz-summary {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 3px 10px;
  min-height: 56px;
  padding: 12px 17px;
  border-inline-start: 5px solid #ffd46a;
  background: linear-gradient(110deg, #5840a3, #6845ae);
  color: var(--ui-surface);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

body.lesson-book #quizSection .quiz-summary::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -18px;
  top: -27px;
  width: 108px;
  height: 108px;
  border: 17px solid rgba(211, 189, 255, .22);
  border-radius: 50%;
  pointer-events: none;
}

body.lesson-book #quizSection .quiz-summary::-webkit-details-marker {
  display: none;
}

body.lesson-book #quizSection .quiz-heading {
  font-size: 14px;
  font-weight: 800;
}

body.lesson-book #quizSection .quiz-summary-end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

body.lesson-book #quizSection .quiz-summary-status {
  max-width: 100%;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--ui-surface);
  color: #503487;
  font-size: 11px;
  font-weight: 700;
  text-align: right;
}

body.lesson-book #quizSection .quiz-summary-hint {
  grid-column: 1 / -1;
  color: #f0e9ff;
  font-size: 11px;
}

body.lesson-book #quizSection .quiz-summary-hint:empty {
  display: none;
}

body.lesson-book #quizSection .quiz-chevron {
  flex: none;
  width: 18px;
  height: 18px;
}

body.lesson-book #quizSection[open] .quiz-chevron {
  transform: rotate(180deg);
}

body.lesson-book #quizSection .quiz-body {
  padding: 12px 14px 14px;
  border-top: 1px solid #e3dcfa;
}

body.lesson-book #quizSection :is(.quiz-summary, button):focus-visible {
  outline: 2px solid #4c3295;
  outline-offset: 2px;
}

body.lesson-book #quizSection :is(.quiz-option, .quiz-match-option, .quiz-arranged-item) {
  min-height: 40px;
  margin: 0;
  padding: 7px 11px;
  border: 1px solid #d1c8e5;
  border-radius: 9px;
  background: var(--ui-surface);
  box-shadow: none;
  color: #332750;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
  transition: background-color .15s ease, border-color .15s ease;
}

body.lesson-book #quizSection :is(.quiz-option, .quiz-match-option, .quiz-arranged-item):hover:not(:disabled) {
  background: #f5f0ff;
  border-color: #906fc6;
  transform: none;
}

body.lesson-book #quizSection :is(.quiz-option, .quiz-match-option).selected,
body.lesson-book #quizSection :is(.quiz-match-option.matched, .quiz-arranged-item) {
  background: #e9dfff;
  border-color: #6e4cae;
  color: #3e287b;
  box-shadow: none;
}

body.lesson-book #quizSection :is(.quiz-option-arabic, .quiz-arrange-option, .quiz-match-arabic, .quiz-arranged-item) {
  min-height: 48px;
  font-family: var(--font-arabic);
  font-size: 26px;
  font-weight: 400;
  line-height: 1.55;
}

body.lesson-book #quizSection :is(.quiz-voice-record-button, #submitQuizButton, #shareQuizButton, .quiz-retry-button) {
  display: block;
  width: auto;
  max-width: 100%;
  min-height: 38px;
  margin: 10px auto 0;
  padding: 8px 14px;
  border: 1px solid #6041a5;
  border-radius: 9px;
  background: #6041a5;
  box-shadow: none;
  color: var(--ui-surface);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  cursor: pointer;
  transform: none;
}

body.lesson-book #quizSection :is(.quiz-voice-record-button, #submitQuizButton):hover:not(:disabled) {
  background: #4e328d;
  transform: none;
}

body.lesson-book #quizSection :is(#shareQuizButton, .quiz-retry-button) {
  border-color: #b9a8dc;
  background: #f2ecff;
  color: #4e3487;
}

body.lesson-book #quizSection :is(#shareQuizButton, .quiz-retry-button):hover:not(:disabled) {
  background: #e9deff;
  transform: none;
}

body.lesson-book #quizSection button:disabled {
  opacity: .46;
  box-shadow: none;
  cursor: default;
  transform: none;
}

body.lesson-book #quizSection #submitQuizButton:disabled {
  border-color: #c8c5cf;
  background: #e5e4e9;
  color: #686573;
}

@media (max-width: 500px) {

  body.lesson-book #quizSection .quiz-summary {
    padding-inline: 12px;
  }

  body.lesson-book #quizSection .quiz-summary-status {
    font-size: 10px;
  }

  body.lesson-book #quizSection .quiz-body {
    padding-inline: 10px;
  }

}

/* Subscription — plan comparison and a clear checkout summary. */

body.subscribe-page {
  --font-sans: Inter, system-ui, -apple-system, Arial, sans-serif;
  --font-content: var(--font-sans);
  margin: 0;
  color: var(--ui-ink);
  font-family: var(--font-sans);
  background: var(--ui-page-background);
  background-attachment: fixed;
}

body.subscribe-page > .subscribe-shell {
  width: min(1160px, 100%);
  max-width: 1160px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 24px 40px;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}

body.subscribe-page .subscription-page {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 12px 0 0;
  background: transparent;
  text-align: left;
}

body.subscribe-page .subscribe-content {
  width: 100%;
  max-width: none;
  margin: 0;
}

body.subscribe-page .subscribe-intro {
  margin: 0 0 14px;
  padding: 16px 20px;
  border: 1px solid var(--ui-border);
  border-radius: 22px;
  background: linear-gradient(115deg, #ffffff, #f3f5ff);
  text-align: center;
  box-shadow: var(--ui-shadow);
}

body.subscribe-page .subscription-label {
  display: table;
  margin: 0 auto 7px;
  padding: 4px 9px;
  border: 1px solid #ffdf7e;
  border-radius: 8px;
  background: var(--ui-premium-bg);
  color: var(--ui-premium-text);
  font-size: 10px;
  font-weight: 750;
  line-height: 1.3;
  letter-spacing: .08em;
}

body.subscribe-page #subscriptionTitle {
  margin: 0;
  color: #273465;
  font: 800 clamp(24px, 4vw, 30px)/1.3 var(--font-sans);
  letter-spacing: -.025em;
}

body.subscribe-page .subscription-description {
  max-width: 72ch;
  margin: 7px auto 0;
  color: var(--ui-muted);
  font-size: 14px;
  line-height: 1.55;
}

body.subscribe-page .subscribe-layout {
  display: grid;
  gap: 14px;
  align-items: start;
}

body.subscribe-page .subscribe-plans-panel,
body.subscribe-page .checkout-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--ui-border);
  border-radius: 18px;
  background: var(--ui-surface);
  box-shadow: var(--ui-shadow);
}

body.subscribe-page .checkout-card {
  width: 100%;
  max-width: 520px;
  justify-self: center;
}

body.subscribe-page button:disabled {
  transform: none;
  box-shadow: none;
}

body.subscribe-page .subscribe-layout h2 {
  margin: 0 0 14px;
  color: #273465;
  font: 800 17px/1.4 var(--font-sans);
  letter-spacing: -.015em;
}

body.subscribe-page .subscribe-layout .subscribe-plan-heading {
  text-align: center;
  font-size: clamp(14px, 3.7vw, 17px);
}

body.subscribe-page .subscribe-plan-heading-line {
  display: block;
}

body.subscribe-page .subscribe-premium-badge {
  display: inline-block;
  padding: 3px 8px;
  border: 1px solid #ffdf7e;
  border-radius: 8px;
  background: var(--ui-premium-bg);
  color: var(--ui-premium-text);
  font-size: .8em;
  font-weight: 750;
  line-height: 1.3;
  vertical-align: .05em;
  letter-spacing: 0;
}

body.subscribe-page .subscribe-plan-description {
  display: block;
  margin-top: 5px;
  color: var(--ui-muted);
  font-size: clamp(12px, 3.5vw, 14px);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0;
}

body.subscribe-page .billing-country {
  display: grid;
  gap: 3px;
  margin: 0 0 14px;
  text-align: center;
}

body.subscribe-page .billing-country-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  color: #35435c;
  font: 600 13px/1.5 var(--font-sans);
}

body.subscribe-page .billing-country-label svg {
  width: 16px;
  height: 16px;
  flex: none;
  color: #5663a1;
}

body.subscribe-page .billing-country-help {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}

body.subscribe-page .billing-country-help summary {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  color: #536097;
  font: 500 12px/1.5 var(--font-sans);
  list-style: none;
  cursor: pointer;
}

body.subscribe-page .billing-country-help summary::-webkit-details-marker {
  display: none;
}

body.subscribe-page .billing-country-help summary svg {
  width: 13px;
  height: 13px;
}

body.subscribe-page .billing-country-help[open] summary svg {
  transform: rotate(180deg);
}

body.subscribe-page .billing-country-help summary:focus-visible {
  outline: 2px solid var(--ui-focus);
  outline-offset: 3px;
  border-radius: 4px;
}

body.subscribe-page .billing-country-help p {
  max-width: 42ch;
  margin: 4px auto;
  color: #64708a;
  font: 400 12px/1.55 var(--font-sans);
}

body.subscribe-page .billing-country-help a {
  font: 600 12px/1.5 var(--font-sans);
  color: #414aa9;
}

body.subscribe-page .plan-approx {
  grid-column: 2;
  grid-row: 2;
  color: #414d78;
  font: 600 12px/1.45 var(--font-sans);
  text-align: right;
}

body.subscribe-page .plan-approx:not([hidden]) ~ .plan-equivalent {
  grid-row: 3;
}

body.subscribe-page .currency-approx,
body.payment-page .currency-approx {
  margin: 3px 0 8px;
  color: #414d78;
  font: 600 13px/1.5 var(--font-sans);
  text-align: right;
}

body.subscribe-page .billing-currency-note,
body.payment-page .billing-currency-note {
  margin: 6px 0;
  color: var(--ui-muted);
  font: 400 12px/1.55 var(--font-sans);
}

body.subscribe-page .subscribe-currency-note {
  display: flex;
  align-items: start;
  gap: 7px;
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px solid #e8ebf4;
}

body.subscribe-page .subscribe-currency-note svg {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: #697798;
}

body.subscribe-page .subscribe-currency-note > div {
  flex: 1;
  min-width: 0;
}

body.subscribe-page .subscribe-currency-note .billing-currency-note {
  margin: 7px 0 0;
}

body.subscribe-page #subscribeCurrencyNote {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.6;
}

body.subscribe-page #subscribeFxNote {
  color: #64708a;
}

body.subscribe-page :is(#subscribeCurrencyNote, #subscribeFxNote),
body.payment-page :is(#paymentCurrencyNote, #paymentFxNote) {
  text-align: justify;
  text-align-last: start;
}

body.subscribe-page .billing-data-credits,
body.payment-page .billing-data-credits {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 14px;
  margin: 14px 0 0;
  font: 400 11px/1.5 var(--font-sans);
}

body.subscribe-page .billing-data-credits a,
body.payment-page .billing-data-credits a {
  color: #64708a;
  text-underline-offset: 2px;
}

body.payment-page .payment-country-summary {
  margin: 10px 0;
  color: var(--ui-muted);
  font-size: 13px;
  line-height: 1.5;
}

body.subscribe-page .plan-list {
  display: grid;
  gap: 9px;
  margin: 0;
}

body.subscribe-page .plan-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 10px;
  align-items: center;
  width: 100%;
  max-width: none;
  min-width: 0;
  min-height: 82px;
  margin: 0;
  padding: 13px 14px;
  border: 1px solid #d7deef;
  border-radius: 13px;
  background: #fafbff;
  color: var(--ui-ink);
  text-align: left;
  box-shadow: none;
  transform: none;
}

body.subscribe-page .plan-card:not(.selected):not(:disabled):hover {
  transform: none;
  border-color: #a5b0df;
  background: #f2f4ff;
}

body.subscribe-page .plan-card.selected {
  border-color: var(--ui-focus);
  background: var(--ui-primary-soft);
  box-shadow: 0 0 0 1px var(--ui-focus);
}

body.subscribe-page .plan-card:disabled {
  opacity: .6;
  cursor: wait;
}

body.subscribe-page .plan-title-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  grid-column: 1;
  grid-row: 1;
}

body.subscribe-page .plan-name {
  color: #35435c;
  font: 750 15px/1.35 var(--font-sans);
}

body.subscribe-page .plan-indicator {
  display: grid;
  place-items: center;
  flex: none;
  width: 19px;
  height: 19px;
  border: 1.5px solid var(--ui-control-border);
  border-radius: 50%;
  color: var(--ui-surface);
}

body.subscribe-page .plan-indicator svg {
  width: 13px;
  height: 13px;
  opacity: 0;
}

body.subscribe-page .selected .plan-indicator {
  border-color: var(--ui-primary);
  background: var(--ui-primary);
}

body.subscribe-page .selected .plan-indicator svg {
  opacity: 1;
}

body.subscribe-page .plan-price {
  grid-column: 2;
  grid-row: 1;
  color: #273465;
  font: 800 22px/1.25 var(--font-sans);
  letter-spacing: -.025em;
  white-space: nowrap;
}

body.subscribe-page .plan-equivalent {
  grid-column: 2;
  grid-row: 2;
  color: #64708a;
  font: 500 12px/1.5 var(--font-sans);
  text-align: right;
}

body.subscribe-page .plan-saving {
  grid-column: 1;
  grid-row: 2;
  justify-self: start;
  padding: 3px 7px;
  border-radius: 6px;
  background: #e4f4ef;
  color: #23654f;
  font: 700 11px/1.3 var(--font-sans);
}

body.subscribe-page .plan-list[aria-busy="true"] .plan-price {
  font-size: 13px;
  letter-spacing: 0;
}

body.subscribe-page .plan-load-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #dce2f4;
  border-radius: 10px;
  background: #f4f6ff;
  color: var(--ui-muted);
}

body.subscribe-page .plan-load-status p {
  flex: 1 1 160px;
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

body.subscribe-page .plan-load-status[data-state="error"] {
  border-color: #efcdcd;
  background: #fff2f1;
  color: #a43c3c;
}

body.subscribe-page .subscribe-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: none;
  width: auto;
  max-width: none;
  min-height: 40px;
  margin: 0;
  padding: 9px 12px;
  border: 1px solid #d4dcf1;
  border-radius: 10px;
  background: var(--ui-primary-soft);
  color: #414aa9;
  font: 700 13px/1.4 var(--font-sans);
  box-shadow: none;
}

body.subscribe-page .subscribe-secondary:not(:disabled):hover {
  transform: none;
  background: #e3e8ff;
}

body.subscribe-page .subscribe-secondary:disabled {
  opacity: .55;
  cursor: not-allowed;
}

body.subscribe-page .voucher-panel {
  margin: 14px 0 0;
  padding: 0;
  border: 1px solid var(--ui-border);
  border-radius: 12px;
  background: #f8f9ff;
}

body.subscribe-page .voucher-panel summary {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 11px 12px;
  color: #414aa9;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  list-style: none;
  cursor: pointer;
}

body.subscribe-page .voucher-panel summary::-webkit-details-marker {
  display: none;
}

body.subscribe-page .voucher-icon {
  flex: none;
  width: 18px;
  height: 18px;
}

body.subscribe-page #voucherToggle {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

body.subscribe-page .voucher-chevron {
  flex: none;
  width: 16px;
  height: 16px;
  transition: transform .15s ease;
}

body.subscribe-page .voucher-panel[open] .voucher-chevron {
  transform: rotate(180deg);
}

body.subscribe-page .voucher-body {
  margin: 0;
  padding: 0 12px 12px;
}

body.subscribe-page .voucher-body label {
  display: block;
  margin: 2px 0 7px;
  color: #35435c;
  font-size: 13px;
  font-weight: 650;
}

body.subscribe-page .voucher-input-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

body.subscribe-page .voucher-code-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}

body.subscribe-page .voucher-code-wrap input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 9px 40px 9px 11px;
  border: 1px solid #cfd7e9;
  border-radius: 10px;
  background: var(--ui-surface);
  color: var(--ui-ink);
  font: 500 16px/1.4 var(--font-sans);
}

body.subscribe-page .voucher-code-wrap input[aria-invalid="true"] {
  border-color: #b44343;
}

body.subscribe-page .voucher-clear {
  position: absolute;
  top: 50%;
  right: 4px;
  display: grid;
  place-items: center;
  width: 32px;
  min-height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #64708a;
  transform: translateY(-50%);
}

body.subscribe-page .voucher-clear:hover {
  background: var(--ui-primary-soft);
  transform: translateY(-50%);
}

body.subscribe-page .voucher-message {
  margin: 8px 0 0;
  color: var(--ui-muted);
  font-size: 12.5px;
  line-height: 1.5;
}

body.subscribe-page .voucher-message:empty {
  display: none;
}

body.subscribe-page .voucher-message[data-state="success"] {
  color: #23654f;
}

body.subscribe-page .voucher-message[data-state="error"] {
  color: #a43c3c;
}

body.subscribe-page .voucher-message[data-state="warning"] {
  color: #875823;
}

body.subscribe-page .subscribe-learning-note {
  margin: 12px 1px 0;
  color: #64708a;
  font-size: 12.5px;
  line-height: 1.5;
}

body.subscribe-page .subscribe-savings-note {
  margin: 9px 1px 0;
  color: #64708a;
  font-size: 12px;
  line-height: 1.5;
}

body.subscribe-page .checkout-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-top: 12px;
  color: #64708a;
  font-size: 13px;
  line-height: 1.5;
}

body.subscribe-page .checkout-summary-row strong {
  color: #35435c;
  font-size: 13px;
  font-weight: 650;
  text-align: right;
}

body.subscribe-page .checkout-discount strong {
  color: #23654f;
}

body.subscribe-page .checkout-total {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin: 16px 0 0;
  padding: 13px 12px;
  border: 1px solid #dce2f7;
  border-radius: 11px;
  background: var(--ui-primary-soft);
  color: #414b75;
  font-size: 13px;
  text-align: left;
}

body.subscribe-page .checkout-total strong {
  color: #273465;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.02em;
}

body.subscribe-page .checkout-hint {
  margin: 12px 0;
  color: #64708a;
  font-size: 12.5px;
  line-height: 1.5;
}

body.subscribe-page .checkout-hint[data-state="warning"] {
  color: #875823;
}

body.subscribe-page .checkout-hint:empty {
  display: none;
}

body.subscribe-page .checkout-hint:empty + .checkout-primary {
  margin-top: 12px;
}

body.subscribe-page .checkout-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: none;
  min-height: 44px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: var(--ui-primary);
  color: var(--ui-surface);
  font: 700 13px/1.45 var(--font-sans);
  box-shadow: none;
}

body.subscribe-page .checkout-primary:not(:disabled):hover {
  transform: none;
  background: var(--ui-primary-hover);
}

body.subscribe-page .checkout-primary:disabled {
  background: #e5e9f3;
  color: #71809b;
  cursor: not-allowed;
}

body.subscribe-page .checkout-payment-note {
  margin: 9px 0 0;
  color: #64708a;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

body.subscribe-page .subscribe-back-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: fit-content;
  min-height: 40px;
  margin: 7px auto 0;
  padding: 7px 9px;
  border-radius: 9px;
  color: #4b559b;
  font: 600 12.5px/1.4 var(--font-sans);
  text-decoration: none;
}

body.subscribe-page .subscribe-back-link:hover {
  background: var(--ui-primary-soft);
}

body.subscribe-page :is(button, input, a, summary):focus-visible {
  outline: 3px solid var(--ui-focus);
  outline-offset: 3px;
}

@media (min-width: 700px) {

  body.subscribe-page .plan-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.subscribe-page .plan-card {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto 1fr;
    gap: 8px;
    min-height: 160px;
    padding: 15px;
    align-items: start;
  }

  body.subscribe-page .plan-title-row {
    justify-content: space-between;
  }

  body.subscribe-page .plan-price {
    grid-column: 1;
    grid-row: 2;
    font-size: 24px;
  }

  body.subscribe-page .plan-approx {
    grid-column: 1;
    grid-row: 3;
    text-align: left;
  }

  body.subscribe-page .plan-equivalent {
    grid-column: 1;
    grid-row: 3;
    text-align: left;
  }

  body.subscribe-page .plan-saving {
    grid-column: 1;
    grid-row: 4;
    align-self: end;
  }

  body.subscribe-page .plan-approx:not([hidden]) ~ .plan-equivalent {
    grid-row: 4;
  }

  body.subscribe-page .plan-approx:not([hidden]) ~ .plan-saving {
    grid-row: 5;
  }

}

@media (min-width: 980px) {

  body.subscribe-page .subscribe-layout {
    grid-template-columns: minmax(0, 1fr) 360px;
  }

  body.subscribe-page .checkout-card {
    position: sticky;
    top: 12px;
  }

}

@media (max-width: 600px) {

  body.subscribe-page > .subscribe-shell {
    padding: 10px 12px 24px;
  }

  body.subscribe-page .subscribe-intro {
    padding: 14px 12px;
    border-radius: 18px;
  }

  body.subscribe-page .subscribe-plans-panel,
  body.subscribe-page .checkout-card {
    padding: 14px;
  }

  body.subscribe-page .subscribe-layout {
    gap: 12px;
  }

}

@media (max-width: 380px) {

  body.subscribe-page .plan-card {
    padding: 12px;
    gap: 5px 8px;
  }

  body.subscribe-page .plan-price {
    font-size: 20px;
  }

  body.subscribe-page .plan-equivalent {
    font-size: 11.5px;
  }

}

@media (prefers-reduced-motion: reduce) {

  body.subscribe-page .voucher-chevron {
    transition: none;
  }

}

/* Payment — order review and method selection in the shared EdTech theme. */

body.payment-page {
  --font-sans: Inter, system-ui, -apple-system, Arial, sans-serif;
  --font-content: var(--font-sans);
  color: var(--ui-ink);
  font-family: var(--font-sans);
  background: var(--ui-page-background);
}

body.payment-page > .payment-shell {
  width: min(1160px, 100%);
  max-width: 1160px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 18px 24px 36px;
  overflow: visible;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.payment-page .subscription-page {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 18px 0 0;
  background: transparent;
  text-align: left;
}

body.payment-page .subscribe-content {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
}

body.payment-page .payment-intro {
  margin: 0 0 18px;
  text-align: center;
}

body.payment-page .subscription-label {
  margin: 0 0 6px;
  color: #5864a0;
  font: 750 11px/1.4 var(--font-sans);
  letter-spacing: .09em;
}

body.payment-page #paymentTitle {
  margin: 0;
  color: #273465;
  font: 800 clamp(24px, 4vw, 30px)/1.3 var(--font-sans);
  letter-spacing: -.025em;
}

body.payment-page .subscription-description {
  max-width: 58ch;
  margin: 7px auto 0;
  color: var(--ui-muted);
  font: 400 14px/1.55 var(--font-sans);
}

body.payment-page .payment-layout {
  display: grid;
  gap: 14px;
  align-items: start;
}

body.payment-page .payment-panel {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--ui-border);
  border-radius: 18px;
  background: var(--ui-surface);
  box-shadow: var(--ui-shadow);
}

body.payment-page .payment-panel h2 {
  margin: 0;
  color: #273465;
  font: 750 17px/1.4 var(--font-sans);
  letter-spacing: -.015em;
}

body.payment-page .payment-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

body.payment-page .payment-premium-badge {
  display: inline-block;
  flex: none;
  padding: 4px 8px;
  border: 1px solid #ffdf7e;
  border-radius: 8px;
  background: var(--ui-premium-bg);
  color: var(--ui-premium-text);
  font: 750 11px/1.3 var(--font-sans);
}

body.payment-page .selected-plan-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 17px 0;
  padding: 13px;
  border: 1px solid #e1e6f6;
  border-radius: 12px;
  background: linear-gradient(120deg, #f2f5ff, #f8f4ff);
}

body.payment-page .payment-plan-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border: 1px solid #dce1f7;
  border-radius: 11px;
  background: #e8edff;
  color: #4b55b2;
}

body.payment-page .payment-plan-icon svg {
  width: 24px;
  height: 24px;
}

body.payment-page .payment-plan-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

body.payment-page .plan-name {
  color: #273465;
  font: 800 21px/1.3 var(--font-sans);
  letter-spacing: -.02em;
}

body.payment-page #paymentAccessDescription {
  color: var(--ui-muted);
  font: 400 12.5px/1.5 var(--font-sans);
}

body.payment-page .payment-breakdown {
  display: grid;
  gap: 12px;
  margin: 0;
}

body.payment-page .payment-detail-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, auto);
  align-items: baseline;
  gap: 12px;
  color: var(--ui-muted);
  font: 400 13px/1.5 var(--font-sans);
}

body.payment-page .payment-detail-row dt {
  min-width: 0;
}

body.payment-page .payment-detail-row dd {
  max-width: 25ch;
  margin: 0;
  color: #35435c;
  font: 650 13px/1.5 var(--font-sans);
  text-align: right;
  overflow-wrap: anywhere;
}

body.payment-page .payment-discount dd {
  color: #23654f;
}

body.payment-page .payment-voucher-code {
  display: table;
  max-width: 100%;
  margin-top: 3px;
  padding: 2px 6px;
  border-radius: 5px;
  background: #e4f4ef;
  color: #23654f;
  font: 650 11px/1.4 var(--font-sans);
  overflow-wrap: anywhere;
}

body.payment-page .checkout-total {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 12px;
  margin: 16px 0 0;
  padding: 13px 14px;
  border: 1px solid #dce2f7;
  border-radius: 12px;
  background: var(--ui-primary-soft);
  color: #414b75;
  font: 600 13px/1.5 var(--font-sans);
}

body.payment-page .checkout-total strong {
  color: #273465;
  font: 800 25px/1.25 var(--font-sans);
  letter-spacing: -.025em;
  white-space: nowrap;
}

body.payment-page .currency-approx {
  margin: 6px 1px 0;
  color: #414d78;
  font: 600 13px/1.5 var(--font-sans);
  text-align: right;
}

body.payment-page .payment-currency-note {
  display: flex;
  align-items: start;
  gap: 7px;
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px solid #e8ebf4;
}

body.payment-page .payment-currency-note svg {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: #697798;
}

body.payment-page #paymentCurrencyNote {
  margin: 0;
  color: var(--ui-muted);
  font: 400 12.5px/1.6 var(--font-sans);
}

body.payment-page .billing-currency-note {
  margin: 7px 0 0 23px;
  color: #64708a;
  font: 400 12px/1.55 var(--font-sans);
}

body.payment-page .payment-methods {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 9px;
  margin: 15px 0 0;
}

body.payment-page .payment-method {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  max-width: none;
  min-height: 74px;
  margin: 0;
  padding: 12px;
  border: 1px solid #d7deef;
  border-radius: 12px;
  background: #fafbff;
  color: #35435c;
  font-family: var(--font-sans);
  text-align: left;
  box-shadow: none;
  transform: none;
}

body.payment-page .payment-method:not(:disabled):hover {
  border-color: #a5b0df;
  background: #f2f4ff;
  transform: none;
}

body.payment-page .payment-method.selected {
  border-color: var(--ui-focus);
  background: var(--ui-primary-soft);
  box-shadow: 0 0 0 1px var(--ui-focus);
}

body.payment-page .payment-method-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border: 1px solid #e0e5f3;
  border-radius: 9px;
  background: var(--ui-surface);
  color: #5663a1;
}

body.payment-page .payment-method-icon svg {
  width: 23px;
  height: 23px;
}

body.payment-page .payment-method-copy {
  display: grid;
  flex: 1;
  gap: 4px;
  min-width: 0;
}

body.payment-page .payment-method-copy strong {
  color: #35435c;
  font: 700 14px/1.4 var(--font-sans);
}

body.payment-page .payment-method-copy > span {
  color: var(--ui-muted);
  font: 400 12px/1.45 var(--font-sans);
}

body.payment-page .payment-method-check {
  display: grid;
  place-items: center;
  flex: none;
  width: 19px;
  height: 19px;
  border: 1.5px solid var(--ui-control-border);
  border-radius: 50%;
  color: var(--ui-surface);
}

body.payment-page .payment-method-check svg {
  width: 14px;
  height: 14px;
  opacity: 0;
}

body.payment-page .selected .payment-method-check {
  border-color: var(--ui-primary);
  background: var(--ui-primary);
}

body.payment-page .selected .payment-method-check svg {
  opacity: 1;
}

body.payment-page .payment-method:disabled {
  opacity: .65;
  cursor: not-allowed;
}

body.payment-page .payment-hint {
  margin: 11px 0 0;
  color: var(--ui-muted);
  font: 400 12.5px/1.5 var(--font-sans);
}

body.payment-page .payment-hint:empty,
body.payment-page .payment-feedback:empty {
  display: none;
}

body.payment-page .payment-feedback {
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid #efcdcd;
  border-radius: 10px;
  background: #fff2f1;
  color: #a43c3c;
  font: 500 13px/1.55 var(--font-sans);
  overflow-wrap: anywhere;
}

body.payment-page .payment-feedback[data-state="warning"] {
  border-color: #f0dcac;
  background: #fff8e8;
  color: #80551f;
}

body.payment-page .payment-feedback[data-state="info"] {
  border-color: #dce2f4;
  background: #f1f4ff;
  color: #414d78;
}

body.payment-page .payment-actions {
  display: grid;
  gap: 6px;
  margin-top: 15px;
}

body.payment-page .payment-primary,
body.payment-page .payment-secondary,
body.payment-page .payment-back {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: none;
  min-height: 44px;
  margin: 0;
  padding: 10px 13px;
  border: 1px solid transparent;
  border-radius: 11px;
  font: 700 13px/1.45 var(--font-sans);
  text-align: center;
  box-shadow: none;
  transform: none;
}

body.payment-page .payment-primary {
  background: var(--ui-primary);
  color: var(--ui-surface);
}

body.payment-page .payment-primary:not(:disabled):hover {
  background: var(--ui-primary-hover);
  transform: none;
}

body.payment-page .payment-primary:disabled {
  background: #e5e9f3;
  color: #65738c;
  cursor: not-allowed;
}

body.payment-page .payment-secondary {
  width: fit-content;
  margin-top: 10px;
  border-color: #d4dcf1;
  background: var(--ui-primary-soft);
  color: #414aa9;
}

body.payment-page .payment-secondary:not(:disabled):hover {
  background: #e3e8ff;
  transform: none;
}

body.payment-page .payment-back {
  width: fit-content;
  justify-self: center;
  min-height: 40px;
  padding: 8px 10px;
  background: transparent;
  color: #4b559b;
  font-weight: 600;
}

body.payment-page .payment-back:not(:disabled):hover {
  background: var(--ui-primary-soft);
  transform: none;
}

body.payment-page .payment-back:disabled,
body.payment-page .payment-secondary:disabled {
  opacity: .6;
  cursor: not-allowed;
}

body.payment-page .payment-gateway-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 10px 0 0;
  color: #64708a;
  font: 400 12px/1.5 var(--font-sans);
  text-align: center;
}

body.payment-page .payment-gateway-note svg {
  flex: none;
}

body.payment-page :is(button, a):focus-visible {
  outline: 3px solid var(--ui-focus);
  outline-offset: 3px;
}

body.payment-page .payment-spinner {
  flex: none;
  animation: payment-ui-spin .85s linear infinite;
}

@keyframes payment-ui-spin {

  to {
    transform: rotate(360deg);
  }

}

@media (min-width: 800px) {

  body.payment-page .payment-layout {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  }

}

@media (max-width: 799px) {

  body.payment-page .subscribe-content {
    max-width: 600px;
  }

}

@media (max-width: 600px) {

  body.payment-page > .payment-shell {
    padding: 10px 12px 24px;
  }

  body.payment-page .subscription-page {
    padding-top: 15px;
  }

  body.payment-page .payment-intro {
    margin-bottom: 14px;
  }

  body.payment-page .payment-panel {
    padding: 16px;
    border-radius: 16px;
  }

  body.payment-page .payment-layout {
    gap: 12px;
  }

}

@media (max-width: 380px) {

  body.payment-page .payment-panel {
    padding: 13px;
  }

  body.payment-page .checkout-total {
    padding: 12px;
  }

  body.payment-page .checkout-total strong {
    font-size: 22px;
  }

  body.payment-page .payment-method {
    gap: 8px;
    padding: 10px;
  }

}

@media (prefers-reduced-motion: reduce) {

  body.payment-page .payment-spinner {
    animation: none;
  }

  body.payment-page button {
    transition: none;
  }

}

/* Shared header rhythm: one outer gap and one content gap on every page.
   Only shell edges change; content typography and Arabic renderers are untouched. */

@media screen {

  body > .app:has(> .app-header):not(.login-shell) {
    margin-block-start: 0;
    padding-block-start: var(--ui-header-gap);
  }

  body > .app > .app-header {
    margin-block-end: var(--ui-header-gap);
  }

  body > .app:has(> .app-header):not(.login-shell) > main {
    margin-block-start: 0;
    padding-block-start: 0;
  }

  body > .app:has(> .app-header):not(.login-shell) > main > :first-child {
    margin-block-start: 0;
  }

  body.payment-page .subscribe-content {
    display: flow-root;
  }

  body.login-page {
    align-content: start;
    padding-block-start: var(--ui-header-gap);
  }

  body.login-page > .login-shell {
    margin-block-start: 0;
    padding-block-start: 0;
  }

  body .landing-app {
    padding-block-start: var(--ui-header-gap);
  }

  body .landing-app > .landing-header {
    margin-block-start: 0;
    margin-block-end: var(--ui-header-gap);
    padding-block: 0;
  }

  body .landing-app > main > .landing-hero {
    padding-block-start: 0;
  }

  body.legal-page > .legal-shell {
    margin-block-start: var(--ui-header-gap);
  }

  body.legal-page .legal-header {
    margin-block-end: var(--ui-header-gap);
  }

  body.legal-page .legal-hero {
    margin-block-start: 0;
  }

}

/* =========================================================
   IQRO7 modern app header — shared by every page using app-header.js
   Dashboard theme below remains scoped to .dashboard-app.
   ========================================================= */

.app-header {
  position: relative;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  min-height: 70px;
  padding: 12px clamp(16px, 3vw, 30px);
  gap: 12px;
  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  border-radius: 16px;
  box-shadow: var(--ui-shadow);
  color: var(--ui-brand);
  font-family: Inter, system-ui, sans-serif;
}

.app-header .app-brand {
  min-width: 0;
  gap: 9px;
}

/* The shared IQRO7 brand is the Dashboard link. */

.app-header .app-brand-link {
  color: var(--ui-brand);
  text-decoration: none;
  border-radius: 8px;
}

.app-header .app-brand-link:focus-visible {
  outline: 3px solid var(--ui-focus);
  outline-offset: 5px;
}

.app-header .app-brand-mark {
  flex: 0 0 31px;
  width: 31px;
  height: 31px;
  border-radius: 8px;
  background: url('favicon.png') center/contain no-repeat;
}

.app-header #appName {
  position: static;
  transform: none;
  color: var(--ui-brand);
  font-family: Inter, system-ui, sans-serif;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.04em;
}

.app-header .header-actions {
  gap: 8px;
  min-width: 0;
}

.app-header .dashboard-link,
.app-header .header-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: auto;
  max-width: none;
  min-width: 39px;
  height: 39px;
  min-height: 39px;
  margin: 0;
  padding: 7px 10px;
  border: 1px solid #7b86a8;
  border-radius: 11px;
  background: var(--ui-surface);
  color: var(--ui-brand);
  box-shadow: none;
  font-family: Inter, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.app-header .dashboard-link:hover,
.app-header .header-icon-button:hover {
  background: #f1f3fc;
  transform: none;
}

.app-header .dashboard-link svg,
.app-header .profile-button svg {
  display: block;
  width: 19px;
  height: 19px;
}

.app-header .profile-button {
  width: 39px;
  padding: 8px;
}

.app-header .header-flag {
  display: block;
  flex: 0 0 20px;
  width: 20px;
  height: 14px;
  border: 1px solid #d1d7e8;
  border-radius: 2px;
  object-fit: cover;
}

.app-header .dropdown-arrow {
  width: 7px;
  height: 7px;
  margin: -3px 2px 0 0;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.app-header .header-icon-button[aria-expanded="true"] .dropdown-arrow {
  margin-top: 3px;
  transform: rotate(225deg);
}

.app-header .header-dropdown {
  min-width: 180px;
  padding: 5px;
  border: 1px solid #7b86a8;
  border-radius: 13px;
  background: var(--ui-surface);
  box-shadow: 0 16px 36px rgba(26,35,126,.15);
}

.app-header .header-dropdown.hidden {
  display: none;
}

.app-header .header-dropdown button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 9px 10px;
  border-radius: 9px;
  color: var(--ui-brand);
  font-family: Inter, system-ui, sans-serif;
  font-size: 12px;
  line-height: 1.3;
}

.app-header .header-dropdown button:hover,
.app-header .header-dropdown button[aria-checked="true"] {
  background: var(--ui-primary-soft);
}

.app-header .header-dropdown button[aria-checked="true"]::after {
  content: '✓';
  margin-left: auto;
}

.app-header #logoutButton {
  color: #9c3333;
}

.app-header :is(a,button):focus-visible {
  outline: 3px solid var(--ui-brand);
  outline-offset: 3px;
}

@media (max-width: 420px) {

  .app-header {
    min-height: 62px;
    padding: 10px 14px;
    gap: 7px;
  }

  .app-header #appName {
    font-size: 17px;
  }

  .app-header .app-brand-mark {
    flex-basis: 27px;
    width: 27px;
    height: 27px;
  }

  .app-header .dashboard-link {
    padding: 7px;
  }

  .app-header .dashboard-link span {
    display: none;
  }

  .app-header .header-actions {
    gap: 5px;
  }

}

/* Dashboard — compact EdTech layout, matching lesson and curriculum. */

body.dashboard-page {
  background: var(--ui-page-background);
  background-attachment: fixed;
}

.dashboard-app {
  --dashboard-indigo: var(--ui-primary);
  --dashboard-muted: var(--ui-muted);
  --dashboard-line: var(--ui-border);
  --dashboard-section-size: 18px;
  --dashboard-card-size: 16px;
  --dashboard-body-size: 13px;
  --dashboard-meta-size: 12px;
  --dashboard-control-size: 13px;
  width: min(1160px, 100%);
  max-width: 1160px;
  margin: 0 auto;
  padding: 10px 24px 0;
  background: transparent;
  color: var(--ui-ink);
  font-family: var(--font-sans, Inter, system-ui, sans-serif);
}

.dashboard-app :is(h1, h2, h3, p, span, strong, button, a) {
  font-family: inherit;
}

.dashboard-app .dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr);
  grid-template-areas: "learning support" "worship support";
  align-items: start;
  gap: 14px;
  width: 100%;
  margin: 0;
  padding: 14px 0 0;
  text-align: start;
}

.dashboard-app .dashboard > *,
.dashboard-app .dashboard-learning-column > *,
.dashboard-app .dashboard-support-column > * {
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
}

.dashboard-app .dashboard-learning-column {
  display: grid;
  grid-area: learning;
  min-width: 0;
  gap: 12px;
}

.dashboard-app .dashboard-support-column {
  display: grid;
  grid-area: support;
  min-width: 0;
  gap: 12px;
}

.dashboard-app .continue-card {
  min-height: 0;
  padding: 14px 16px;
  border: 1px solid #494398;
  border-radius: 20px;
  background: radial-gradient(ellipse at 100% 0, #818cf830, transparent 58%), linear-gradient(115deg, #252d7c, #4038a4);
  color: var(--ui-surface);
  box-shadow: var(--ui-shadow);
}

.dashboard-app .continue-card-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) fit-content(52%);
  align-items: start;
  gap: 10px 12px;
}

.dashboard-app .continue-card-copy {
  min-width: 0;
}

.dashboard-app .dashboard-access-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  max-width: 100%;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid #ffffff66;
  border-radius: 8px;
  background: #ffffff20;
  color: var(--ui-surface);
  text-align: center;
  font-size: 11.5px;
  font-weight: 750;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.dashboard-app .dashboard-access-badge[data-state="premium"] {
  border-color: #ffdf7e;
  background: var(--ui-premium-bg);
  color: var(--ui-premium-text);
}

.dashboard-app .continue-card #continueDay {
  margin: 0;
  color: var(--ui-surface);
  font-size: var(--dashboard-section-size);
  font-weight: 800;
  letter-spacing: -.025em;
  line-height: 1.4;
}

.dashboard-app .continue-card #continueTopic {
  margin: 3px 0 0;
  color: #f0efff;
  font-size: var(--dashboard-body-size);
  font-weight: 400;
  line-height: 1.5;
}

.dashboard-app .continue-card .record-button {
  grid-column: 1 / -1;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  max-width: 100%;
  min-height: 40px;
  margin: 0;
  padding: 9px 12px;
  border: 1px solid var(--ui-surface);
  border-radius: 11px;
  background: var(--ui-surface);
  color: #373fa5;
  box-shadow: none;
  font-size: var(--dashboard-control-size);
  font-weight: 750;
  line-height: 1.4;
}

.dashboard-app .continue-card .record-button svg {
  flex: none;
  width: 17px;
  height: 17px;
}

.dashboard-app .continue-card .record-button:hover:not(:disabled) {
  background: #f0f2ff;
  transform: none;
  box-shadow: none;
}

.dashboard-app .continue-card .record-button:disabled {
  opacity: .7;
  cursor: default;
  box-shadow: none;
}

.dashboard-app :is(.program-section, .worship-section) {
  padding: 16px;
  border: 1px solid var(--dashboard-line);
  border-radius: 18px;
  background: var(--ui-surface);
  box-shadow: var(--ui-shadow);
}

.dashboard-app .dashboard-learning-column > .program-section {
  padding: 13px 14px 14px;
}

.dashboard-app .dashboard > .worship-section {
  grid-area: worship;
}

.dashboard-app .dashboard > .worship-section .worship-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-app :is(.program-section, .worship-section) :is(h2, h3) {
  margin: 0 0 9px;
  color: #273465;
  font-size: var(--dashboard-section-size);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.4;
}

.dashboard-app .learning-access-summary {
  margin: 0 0 8px;
  color: var(--dashboard-muted);
  font-size: var(--dashboard-body-size);
  font-weight: 400;
  line-height: 1.55;
}

.dashboard-app .learning-access-summary:empty {
  display: none;
}

.dashboard-app .day-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.dashboard-app .day-item {
  --day-color: #354db5;
  --day-soft: #eef2ff;
  --day-corner-inset: 8px;
  --day-corner-size: 24px;
  --day-marker-size: 14px;
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  max-width: none;
  min-width: 0;
  min-height: 88px;
  margin: 0;
  padding: 32px 8px 10px;
  border: 1px solid var(--ui-border);
  border-radius: 14px;
  background: var(--ui-surface);
  color: #2e3b59;
  box-shadow: none;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.dashboard-app .day-item[data-day="2"] {
  --day-color: #6942ac;
  --day-soft: #f1ebff;
}

.dashboard-app .day-item[data-day="3"] {
  --day-color: #a13677;
  --day-soft: #fcecf5;
}

.dashboard-app .day-item[data-day="4"] {
  --day-color: #a64e19;
  --day-soft: #fff0e5;
}

.dashboard-app .day-item[data-day="5"] {
  --day-color: #826017;
  --day-soft: #fff5d9;
}

.dashboard-app .day-item[data-day="6"] {
  --day-color: #167363;
  --day-soft: #e1f8ef;
}

.dashboard-app .day-item[data-day="7"] {
  --day-color: #1b6686;
  --day-soft: #e5f6fc;
}

.dashboard-app .day-item:nth-child(2n) {
  background: var(--ui-surface);
}

.dashboard-app .day-item:hover {
  border-color: var(--day-color);
  background: var(--day-soft);
  transform: none;
}

.dashboard-app .day-item.active {
  border-color: var(--day-color);
  background: var(--day-soft);
  color: #273465;
  box-shadow: none;
}

.dashboard-app .day-item.locked {
  opacity: 1;
}

/* A square day accent shares the lock's horizontal centerline. */
.dashboard-app .day-indicator {
  position: absolute;
  top: calc(var(--day-corner-inset) + (var(--day-corner-size) - var(--day-marker-size)) / 2);
  left: calc(var(--day-corner-inset) + (var(--day-corner-size) - var(--day-marker-size)) / 2);
  width: var(--day-marker-size);
  height: var(--day-marker-size);
  border-radius: 2px;
  background: var(--day-color);
}

.dashboard-app .day-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-width: 0;
  gap: 3px;
}

.dashboard-app .day-title {
  font-size: var(--dashboard-card-size);
  font-weight: 800;
  line-height: 1.35;
  white-space: nowrap;
}

.dashboard-app .day-topic {
  max-width: 100%;
  color: var(--dashboard-muted);
  font-size: var(--dashboard-body-size);
  font-weight: 500;
  line-height: 1.5;
  overflow-wrap: break-word;
}

/* Preserve the full status for screen readers; a lock remains visible. */

.dashboard-app .day-item .day-badge:not(.day-badge-lock) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.dashboard-app .day-item .day-badge.day-badge-lock {
  position: absolute;
  top: var(--day-corner-inset);
  right: var(--day-corner-inset);
  width: var(--day-corner-size);
  height: var(--day-corner-size);
  margin: 0;
  padding: 0;
  border-radius: 7px;
  background: #f1f5f9;
  color: #475569;
}

.dashboard-app .day-item .day-badge.day-badge-lock svg {
  width: 15px;
  height: 15px;
}

.dashboard-app .day-row-chevron {
  display: none;
}

.dashboard-app .dashboard-support-column .dashboard-live-link {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--ui-border);
  border-radius: 16px;
  background: var(--ui-surface);
  color: var(--ui-ink);
  font-weight: 400;
  box-shadow: var(--ui-shadow);
}

.dashboard-app .dashboard-support-column .dashboard-live-link:hover {
  border-color: #aab6d7;
  box-shadow: var(--ui-shadow-raised);
}

.dashboard-app .dashboard-live-heading {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
  color: var(--ui-ink);
  font-size: var(--dashboard-section-size);
  font-weight: 800;
  line-height: 1.4;
}

.dashboard-app .dashboard-live-heading svg {
  width: 16px;
  height: 16px;
  flex: none;
}

.dashboard-app .dashboard-live-heading > #dashboardLiveTitle {
  flex: 1;
  min-width: 0;
}

.dashboard-app .dashboard-live-heading > .dashboard-live-symbol {
  width: 18px;
  height: 18px;
  color: var(--ui-primary);
}

.dashboard-app .dashboard-live-schedule {
  min-width: 0;
  overflow-wrap: anywhere;
}

.dashboard-app .dashboard-live-next-label {
  display: block;
  color: var(--ui-muted);
  font-size: var(--dashboard-body-size);
  line-height: 1.6;
}

.dashboard-app .dashboard-live-schedule:has(.dashboard-live-card:not([hidden])) > .dashboard-live-next-label:not([hidden]) {
  width: fit-content;
  margin-bottom: 8px;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--ui-success-soft);
  color: var(--ui-success);
  font-weight: 650;
}

.dashboard-app .dashboard-live-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}

.dashboard-app .dashboard-live-date {
  display: grid;
  gap: 2px;
  padding: 8px 4px;
  border-radius: 12px;
  background: #edf0ff;
  color: #4b5aa5;
  text-align: center;
  font-size: 10px;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}

.dashboard-app .dashboard-live-date b {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.1;
}

.dashboard-app .dashboard-live-copy {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.dashboard-app .dashboard-live-theme {
  justify-self: start;
  max-width: 100%;
  padding: 3px 7px;
  border-radius: 6px;
  background: #f0f2fc;
  color: #495792;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.4;
}

.dashboard-app .dashboard-live-copy > strong {
  color: var(--ui-ink);
  font-size: var(--dashboard-card-size);
  font-weight: 800;
  line-height: 1.45;
}

.dashboard-app .dashboard-live-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
  min-width: 0;
  color: var(--ui-muted);
  font-size: var(--dashboard-meta-size);
  line-height: 1.5;
}

.dashboard-app .dashboard-live-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.dashboard-app .dashboard-live-meta svg {
  width: 12px;
  height: 12px;
  flex: none;
}

.dashboard-app .dashboard-live-copy > p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--ui-muted);
  font-size: var(--dashboard-body-size);
  line-height: 1.6;
}

.dashboard-app .dashboard-live-footer {
  grid-column: 1 / -1;
  display: grid;
  gap: 3px;
  padding-top: 10px;
  border-top: 1px solid #e9edf5;
  color: var(--ui-muted);
  font-size: var(--dashboard-meta-size);
  line-height: 1.5;
}

.dashboard-app .dashboard-live-schedule [hidden] {
  display: none;
}

.dashboard-app .worship-list {
  display: grid;
  gap: 10px;
}

.dashboard-app .worship-card {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: start;
  gap: 11px;
  width: 100%;
  min-width: 0;
  max-width: none;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--ui-border);
  border-radius: 14px;
  background: var(--ui-surface);
  color: var(--ui-ink);
  text-align: start;
  box-shadow: none;
}

.dashboard-app .worship-card:hover {
  border-color: #b2bde3;
  background: #fafbff;
  transform: none;
}

.dashboard-app .worship-card.completed {
  border-color: #cde4d7;
  background: #f7fcf9;
}

.dashboard-app .worship-card-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid #dce3f6;
  border-radius: 12px;
  background: var(--ui-primary-soft);
  color: var(--ui-primary);
}

.dashboard-app #shalatProgramCard .worship-card-icon {
  border-color: #e5ddf6;
  background: #f2edff;
  color: #6942ac;
}

.dashboard-app .worship-card-icon svg {
  width: 22px;
  height: 22px;
}

.dashboard-app .worship-card-body {
  display: block;
  min-width: 0;
}

.dashboard-app .worship-card-body > strong {
  display: block;
  margin: 0 0 5px;
  color: #273465;
  font-size: var(--dashboard-card-size);
  font-weight: 800;
  line-height: 1.4;
}

.dashboard-app .worship-card-description {
  display: block;
  color: var(--dashboard-muted);
  font-size: var(--dashboard-body-size);
  font-weight: 400;
  line-height: 1.55;
}

.dashboard-app .worship-card-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 9px;
  color: #4b559b;
  font-size: var(--dashboard-meta-size);
  font-weight: 650;
  line-height: 1.45;
}

.dashboard-app .worship-card-status {
  display: grid;
  place-items: center;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: var(--ui-primary-soft);
  color: var(--ui-primary);
}

.dashboard-app .worship-card-status svg {
  display: block;
  width: 16px;
  height: 16px;
}

.dashboard-app .worship-card.completed .worship-card-status {
  background: var(--ui-success-soft);
  color: var(--ui-success);
}

.dashboard-app .worship-card-meter {
  appearance: none;
  display: block;
  width: 100%;
  height: 5px;
  margin-top: 7px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: #e5e9f5;
  color: #6a6cd0;
}

.dashboard-app .worship-card-meter::-webkit-progress-bar {
  border-radius: inherit;
  background: #e5e9f5;
}

.dashboard-app .worship-card-meter::-webkit-progress-value {
  border-radius: inherit;
  background: #6a6cd0;
}

.dashboard-app .worship-card-meter::-moz-progress-bar {
  border-radius: inherit;
  background: #6a6cd0;
}

.dashboard-app .worship-card.completed .worship-card-meter::-webkit-progress-value {
  background: #42a078;
}

.dashboard-app .worship-card.completed .worship-card-meter::-moz-progress-bar {
  background: #42a078;
}

.dashboard-app .bottom-nav {
  position: sticky;
  z-index: 10;
  bottom: calc(10px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  width: min(480px, 100%);
  margin: 14px auto calc(12px + env(safe-area-inset-bottom));
  padding: 5px;
  border: 1px solid #dbe1f2;
  border-radius: 16px;
  background: var(--ui-surface);
  box-shadow: 0 6px 24px #25345a12;
}

.dashboard-app .bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 100%;
  max-width: none;
  min-height: 48px;
  margin: 0;
  padding: 5px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #5e6983;
  font-size: var(--dashboard-meta-size);
  font-weight: 650;
  line-height: 1.4;
  box-shadow: none;
}

.dashboard-app .bottom-nav-item:hover {
  background: #f3f5fc;
  transform: none;
}

.dashboard-app .bottom-nav-item.active {
  background: var(--ui-primary-soft);
  color: var(--ui-primary);
}

.dashboard-app .bottom-nav-icon svg {
  display: block;
  width: 19px;
  height: 19px;
}

.dashboard-app :is(button, a):focus-visible {
  outline: 3px solid var(--ui-focus);
  outline-offset: 3px;
}

@media (max-width: 820px) {

  .dashboard-app .dashboard {
    grid-template-columns: 1fr;
    grid-template-areas: "learning" "support" "worship";
    gap: 12px;
  }

}

@media (max-width: 600px) {

  .dashboard-app {
    padding: 8px 12px 0;
  }

  .dashboard-app .dashboard {
    padding-top: 10px;
  }

  .dashboard-app .continue-card {
    padding: 14px;
    border-radius: 18px;
  }

  .dashboard-app .continue-card .record-button {
    justify-self: start;
  }

  .dashboard-app :is(.program-section, .worship-section) {
    padding: 13px;
  }

  .dashboard-app .dashboard-learning-column > .program-section {
    padding: 12px;
  }

  .dashboard-app .dashboard > .worship-section .worship-list {
    grid-template-columns: 1fr;
  }

  .dashboard-app .day-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .dashboard-app .day-item {
    padding: 32px 8px 10px;
    border-radius: 12px;
  }

  .dashboard-app .worship-card {
    padding: 12px;
  }

}

/* The current HTML groups resume + days; retain the earlier shell's column order. */

@media (min-width: 821px) {

  .dashboard-app .dashboard:has(> .continue-card) > .continue-card {
    grid-column: 1;
    grid-row: 1;
  }

  .dashboard-app .dashboard:has(> .continue-card) > .program-section {
    grid-column: 1;
    grid-row: 2;
  }

  .dashboard-app .dashboard:has(> .continue-card) > .worship-section {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

}

@media (prefers-reduced-motion: reduce) {

  .dashboard-app * {
    scroll-behavior: auto;
    transition-duration: .01ms;
  }

}

/* Shared profile menu: account, package and renewal link */

.app-header .profile-dropdown {
  box-sizing: border-box;
  width: min(288px, calc(100vw - 24px));
  min-width: 0;
  max-height: calc(100dvh - 96px);
  overflow-y: auto;
}

.app-header .profile-summary {
  border-bottom-color: var(--ui-border);
  margin-bottom: 0;
  padding: 10px 11px 12px;
}

.app-header .profile-summary strong {
  color: var(--ui-brand);
  font-family: Inter, system-ui, sans-serif;
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.app-header .profile-summary span {
  color: var(--ui-muted);
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.app-header .profile-package {
  display: grid;
  gap: 5px;
  padding: 12px 11px 11px;
}

.app-header .profile-package-label {
  color: var(--ui-muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
}

.app-header .profile-package-status {
  width: fit-content;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--ui-primary-soft);
  color: var(--ui-brand);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.app-header .profile-package-status[data-state="active"] {
  border: 1px solid #ffdf7e;
  background: var(--ui-premium-bg);
  color: var(--ui-premium-text);
}

.app-header .profile-package-status[data-state="expired"] {
  background: #fff0e5;
  color: #8a481c;
}

.app-header .profile-package-status[data-state="loading"],
.app-header .profile-package-status[data-state="unknown"] {
  background: #f0f2f6;
  color: var(--ui-muted);
}

.app-header .profile-package-date {
  color: var(--ui-muted);
  font-size: 12px;
  line-height: 1.5;
}

.app-header .profile-package-date[hidden] {
  display: none;
}

.app-header .profile-subscription-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  padding: 9px 11px;
  border-radius: 9px;
  background: var(--ui-primary-soft);
  color: var(--ui-brand);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
}

.app-header .profile-subscription-link:hover {
  background: #e0e6ff;
}

.app-header .profile-subscription-link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.app-header .profile-subscription-link:focus-visible,
.app-header .profile-dropdown button:focus-visible {
  outline: 2px solid var(--ui-brand);
  outline-offset: 2px;
}

.app-header .profile-menu-separator {
  margin: 7px 5px;
  border-top: 1px solid var(--ui-border);
}

/* Lesson review access: scoped to the lesson notice. */

.lesson-access-notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1rem;
  margin: .5rem 0;
  padding: .65rem .85rem;
  border: 1px solid #c7d2fe;
  border-radius: .65rem;
  background: #eef2ff;
  color: #312e81;
  font: inherit;
  font-size: .875rem;
}

.lesson-access-notice[hidden] {
  display: none;
}

.lesson-access-notice a {
  color: var(--ui-primary-hover);
  font-weight: 600;
  text-underline-offset: .2em;
}

.learning-sequence-dialog::backdrop {
  background: rgb(15 23 42 / .4);
}

.learning-sequence-dialog h3 {
  margin: 0 0 10px;
  color: var(--ui-brand);
  font-size: 1.1rem;
}

.learning-sequence-dialog p {
  font-size: .95rem;
  line-height: 1.55;
  margin: 0 0 16px;
}

.learning-sequence-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.learning-sequence-actions .record-button {
  width: auto;
  max-width: none;
  margin: 0;
  padding: 9px 14px;
  font: inherit;
  font-size: .9rem;
}

.learning-sequence-actions #sequenceCloseButton {
  color: #334155;
  background: #f1f5f9;
}

body.lesson-book #exerciseList .exercise-status.needs-practice {
  color: #92400e;
  background: #fef3c7;
}

.learning-sequence-dialog[open] {
  position: fixed;
  inset: 0;
  margin: auto;
  height: fit-content;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
}

/* Compact plan lock and a modern learning-sequence dialog. */

.dashboard-app .day-badge.day-badge-lock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 9px;
  color: #475569;
  background: #f1f5f9;
}

.dashboard-app .day-badge.day-badge-lock svg {
  display: block;
  width: 17px;
  height: 17px;
}

.learning-sequence-dialog {
  box-sizing: border-box;
  color: #1e293b;
  background: var(--ui-surface);
  font: inherit;
  width: min(440px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  box-shadow: 0 24px 72px rgb(15 23 42 / .2);
}

.learning-sequence-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  background: linear-gradient(120deg, #eef2ff, #f8fafc);
  border-bottom: 1px solid #e0e7ff;
}

.learning-sequence-heading h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 650;
}

.learning-sequence-dialog #sequenceDialogDescription {
  margin: 18px 20px;
  padding: 14px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: .92rem;
  line-height: 1.65;
}

.learning-sequence-dialog .learning-sequence-actions {
  padding: 0 20px 20px;
}

.learning-sequence-dialog #sequenceContinueButton {
  flex: 0 0 auto;
  background: var(--ui-primary-hover);
  color: var(--ui-surface);
  border: 1px solid var(--ui-primary-hover);
  border-radius: 10px;
  font-weight: 600;
  box-shadow: 0 3px 8px rgb(55 48 163 / .12);
}

.learning-sequence-dialog #sequenceContinueButton:hover {
  background: #312e81;
}

.learning-sequence-dialog #sequenceCloseButton {
  background: var(--ui-surface);
  color: #475569;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
}

.learning-sequence-dialog .record-button:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: 3px;
}

/* Isolate the native dialog from dashboard grid sizing. */

.dashboard-app #learningSequenceDialog {
  position: fixed;
  inset: 0;
  width: min(380px, calc(100vw - 32px));
  max-width: 380px;
  min-width: 0;
  height: fit-content;
  margin: auto;
}

#learningSequenceDialog .learning-sequence-heading {
  padding: 16px 18px;
}

#learningSequenceDialog #sequenceDialogDescription {
  margin: 16px 18px;
  padding: 12px;
}

#learningSequenceDialog .learning-sequence-actions {
  justify-content: flex-end;
  align-items: center;
  padding: 0 18px 18px;
}

#learningSequenceDialog .learning-sequence-actions .record-button {
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  max-width: none;
  padding: 9px 12px;
}

/* Lesson reading aid: scoped to lesson.html. */

body.lesson-book .lesson-latin-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 0 auto;
  color: var(--ui-surface);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

body.lesson-book .lesson-latin-toggle input {
  appearance: auto;
  width: 16px;
  height: 16px;
  min-width: 16px;
  margin: 0;
  padding: 0;
  accent-color: var(--ui-surface);
  cursor: pointer;
}

body.lesson-book .lesson-latin-toggle input:focus-visible {
  outline: 2px solid var(--ui-surface);
  outline-offset: 3px;
}

body.lesson-book #exerciseList .exercise-transliteration {
  display: block;
  position: static;
  width: auto;
  max-width: 100%;
  min-width: 0;
  height: auto;
  margin-top: 10px;
  padding: 0 2px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.65;
  direction: ltr;
  unicode-bidi: isolate;
  text-align: center;
  white-space: pre-line;
  overflow-wrap: anywhere;
  word-break: normal;
  color: var(--book-muted, #526079);
}

body.lesson-book #exerciseList .exercise-transliteration[hidden] {
  display: none;
}

/* Mixed Arabic in lesson exercise notes: preserve the shared renderer's
   Arabic runs, with readable glyphs and room for harakat on each line. */

body.lesson-book #exerciseList .exercise-item-instruction .arabic-inline,
body.lesson-book #exerciseList .exercise-arabic-notes .arabic-inline {
  font-family: var(--font-arabic);
  font-size: 1.75em;
  font-weight: 400;
  font-style: normal;
  line-height: 1.5;
  letter-spacing: normal;
  direction: rtl;
  unicode-bidi: isolate;
}

/* IQRO7 curriculum — readable cards on a soft app surface. */

body.curriculum-page {
  color: var(--ui-ink);
  background: var(--ui-page-background);
  background-attachment: fixed;
}

.curriculum-page .curriculum-app {
  width: min(1160px, 100%);
  max-width: 1160px;
  padding: 18px 24px 40px;
  background: transparent;
}

.curriculum-page .curriculum-main {
  font-family: var(--font-sans);
  min-width: 0;
}

.curriculum-page .curriculum-intro {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 18px 0 14px;
  padding: 24px;
  background: linear-gradient(115deg, #ffffff, #f3f5ff);
  border: 1px solid var(--ui-border);
  border-radius: 24px;
  box-shadow: var(--ui-shadow);
}

.curriculum-page .curriculum-intro-copy {
  flex: 1 1 340px;
  min-width: 0;
}

.curriculum-page .curriculum-kicker {
  margin: 0 0 6px;
  font: 800 11px/1.4 var(--font-sans);
  letter-spacing: .09em;
  text-transform: uppercase;
  color: #5a60b1;
}

.curriculum-page h1 {
  margin: 0;
  font: 800 clamp(25px, 4vw, 33px)/1.2 var(--font-sans);
  letter-spacing: -.035em;
  color: #242d6b;
  text-wrap: balance;
}

.curriculum-page .curriculum-subtitle {
  margin: 10px 0;
  max-width: 54ch;
  font: 400 15px/1.5 var(--font-sans);
  color: var(--ui-muted);
}

.curriculum-page .curriculum-totals {
  display: inline-block;
  margin: 0;
  padding: 5px 10px;
  border-radius: 8px;
  background: #e8ecfc;
  font-size: 13px;
  font-weight: 700;
  color: #464f93;
}

.curriculum-page .curriculum-progress-panel {
  flex: 0 1 260px;
  display: grid;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #485577;
}

.curriculum-page progress {
  appearance: auto;
  width: 100%;
  height: 9px;
  accent-color: #6269d8;
  border: 0;
}

.curriculum-page .curriculum-resume,
.curriculum-page .curriculum-close,
.curriculum-page .curriculum-retry {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: auto;
  max-width: none;
  min-height: 40px;
  margin: 0;
  padding: 9px 14px;
  border-radius: 11px;
  border: 1px solid transparent;
  font: 700 13px/1.4 var(--font-sans);
  text-decoration: none;
  cursor: pointer;
  box-shadow: none;
}

.curriculum-page .curriculum-resume {
  background: var(--ui-primary);
  color: var(--ui-surface);
  box-shadow: 0 5px 12px #444db91c;
}

.curriculum-page .curriculum-resume:hover {
  background: var(--ui-primary-hover);
}

.curriculum-page .curriculum-close,
.curriculum-page .curriculum-retry {
  background: var(--ui-surface);
  border-color: #d9dfed;
  color: #394361;
}

.curriculum-page .curriculum-status {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

.curriculum-page .curriculum-status:not(:empty) {
  margin: 12px 0;
}

.curriculum-page .curriculum-day-nav {
  position: sticky;
  top: 8px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  margin: 0 0 16px;
  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  border-radius: 15px;
  box-shadow: 0 5px 18px #303d6b10;
  backdrop-filter: blur(12px);
}

.curriculum-page .curriculum-day-link {
  padding: 8px 13px;
  border-radius: 10px;
  color: #4e5b79;
  background: #f0f3fc;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.curriculum-page .curriculum-day-link:hover {
  background: #e7eafd;
}

.curriculum-page .curriculum-day-link[aria-current] {
  background: var(--ui-primary);
  color: var(--ui-surface);
}

.curriculum-page .curriculum-days {
  display: grid;
  gap: 18px;
}

.curriculum-page .curriculum-day {
  --chapter: #354db5;
  --chapter-soft: #eaf0ff;
  background: #f4f6fb;
  border: 1px solid var(--ui-border);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--ui-shadow);
  scroll-margin-top: 110px;
}

.curriculum-page .curriculum-day[data-day="2"] {
  --chapter: #6942ac;
  --chapter-soft: #f1ebff;
}

.curriculum-page .curriculum-day[data-day="3"] {
  --chapter: #a13677;
  --chapter-soft: #fcecf5;
}

.curriculum-page .curriculum-day[data-day="4"] {
  --chapter: #a64e19;
  --chapter-soft: #fff0e5;
}

.curriculum-page .curriculum-day[data-day="5"] {
  --chapter: #826017;
  --chapter-soft: #fff5d9;
}

.curriculum-page .curriculum-day[data-day="6"] {
  --chapter: #167363;
  --chapter-soft: #e1f8ef;
}

.curriculum-page .curriculum-day[data-day="7"] {
  --chapter: #1b6686;
  --chapter-soft: #e5f6fc;
}

.curriculum-page .curriculum-day-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 18px 12px;
  background: var(--chapter-soft);
  border: 0;
}

.curriculum-page .curriculum-day-number {
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  height: 42px;
  border-radius: 14px;
  background: var(--chapter);
  color: var(--ui-surface);
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 4px 9px #35426714;
}

.curriculum-page .curriculum-day-copy {
  min-width: 0;
}

.curriculum-page .curriculum-day-heading h2 {
  margin: 0;
  font: 800 18px/1.35 var(--font-sans);
  color: #2e3658;
  overflow-wrap: anywhere;
}

.curriculum-page .curriculum-day-description {
  margin: 5px 0 4px;
  font: 400 14px/1.5 var(--font-sans);
  color: #4f5c76;
  white-space: pre-line;
}

.curriculum-page .curriculum-day-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--chapter);
}

.curriculum-page .curriculum-lesson-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0 14px 14px;
}

.curriculum-page .curriculum-lesson {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  min-width: 0;
  max-width: none;
  padding: 16px;
  margin: 0;
  border: 1px solid var(--ui-border);
  border-radius: 16px;
  background: var(--ui-surface);
  color: var(--ui-ink);
  font-family: var(--font-sans);
  text-align: left;
  text-decoration: none;
  box-shadow: var(--ui-shadow);
  cursor: pointer;
  overflow-wrap: anywhere;
  transition: border-color .15s, background .15s, box-shadow .15s;
  scroll-margin-top: 130px;
}

.curriculum-page .curriculum-lesson:hover {
  border-color: var(--chapter);
  background: var(--ui-surface);
  box-shadow: 0 5px 16px #35426716;
  transform: none;
}

.curriculum-page .curriculum-lesson-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.curriculum-page .curriculum-lesson-number {
  font-size: 12px;
  font-weight: 800;
  color: var(--chapter);
}

.curriculum-page .curriculum-card-icon {
  display: inline-flex;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  color: var(--chapter);
}

.curriculum-page .curriculum-card-icon svg {
  width: 100%;
  height: 100%;
}

.curriculum-page .curriculum-lesson-title {
  font: 700 17px/1.35 var(--font-sans);
  letter-spacing: -.015em;
}

.curriculum-page .curriculum-lesson-description {
  font: 400 14.5px/1.5 var(--font-sans);
  color: var(--ui-muted);
  white-space: pre-line;
}

.curriculum-page .curriculum-lesson-status {
  align-self: flex-start;
  max-width: 100%;
  margin-top: auto;
  padding: 4px 9px;
  border-radius: 7px;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 700;
  background: var(--chapter-soft);
  color: var(--chapter);
}

.curriculum-page .curriculum-lesson.is-locked .curriculum-lesson-status {
  background: #f0f2f7;
  color: #5f6b80;
}

.curriculum-page .curriculum-lesson.is-complete .curriculum-lesson-status {
  background: var(--ui-success-soft);
  color: var(--ui-success);
}

.curriculum-page .curriculum-lesson.is-selected {
  background: var(--ui-surface);
  box-shadow: inset 0 0 0 1px var(--chapter), var(--ui-shadow);
  border: 1px solid var(--chapter);
}

.curriculum-page .arabic-inline {
  font-family: var(--font-arabic);
  font-size: 1.28em;
  line-height: 1.25;
  direction: rtl;
  unicode-bidi: isolate;
}

.curriculum-page :is(a,button):focus-visible {
  outline: 3px solid var(--ui-focus);
  outline-offset: 3px;
}

.curriculum-page .curriculum-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(400px, calc(100vw - 32px));
  max-width: 400px;
  max-height: calc(100dvh - 48px);
  padding: 22px;
  border: 1px solid #e0e5ef;
  border-radius: 20px;
  color: var(--ui-ink);
  box-shadow: 0 20px 70px #15204333;
  font-family: var(--font-sans);
}

.curriculum-page .curriculum-dialog::backdrop {
  background: #18213d66;
  backdrop-filter: blur(3px);
}

.curriculum-page .curriculum-dialog h2 {
  margin: 0 0 10px;
  font: 800 19px/1.4 var(--font-sans);
}

.curriculum-page .curriculum-dialog p {
  margin: 0 0 18px;
  font: 400 14px/1.5 var(--font-sans);
  color: #59647b;
}

.curriculum-page .curriculum-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

@media (min-width: 1200px) {

  .curriculum-page .curriculum-lesson-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

}

@media (max-width: 600px) {

  .curriculum-page .curriculum-app {
    padding: 10px 12px 24px;
  }

  .curriculum-page .curriculum-intro {
    gap: 15px;
    padding: 18px;
    margin-top: 12px;
    border-radius: 20px;
  }

  .curriculum-page .curriculum-progress-panel {
    flex: 1 1 100%;
  }

  .curriculum-page .curriculum-day-nav {
    gap: 5px;
    padding: 7px;
  }

  .curriculum-page .curriculum-day-link {
    padding: 7px 10px;
  }

  .curriculum-page .curriculum-lesson-grid {
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 0 10px 10px;
  }

  .curriculum-page .curriculum-day-heading {
    padding: 15px 13px 12px;
    gap: 10px;
  }

}

@media (prefers-reduced-motion: reduce) {

  .curriculum-page .curriculum-lesson {
    transition: none;
  }

}

/* Lesson layout — match curriculum width without the legacy 760px inset. */

body.lesson-book {
  background: var(--ui-page-background);
  background-attachment: fixed;
}

body.lesson-book > .app {
  width: min(1160px, 100%);
  max-width: 1160px;
  padding: 18px 24px 40px;
  background: transparent;
}

body.lesson-book .lesson {
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  padding: 8px 0 0;
  background: transparent;
}

body.lesson-book .lesson > :is(.lesson-heading, #lessonProgress, #exerciseList, #writingSection, #quizSection, .lesson-navigation) {
  width: 100%;
  max-width: none;
}

/* Compact component spacing; text line heights stay readable. */

body.lesson-book .lesson-heading {
  display: grid;
  gap: 4px;
  min-width: 0;
  margin: 0 0 8px;
  padding: 14px 18px;
  border: 1px solid var(--ui-border);
  border-radius: 22px;
  background: linear-gradient(115deg, #ffffff, #f3f5ff);
  box-shadow: var(--ui-shadow);
  font-family: var(--font-sans);
  text-align: center;
}

body.lesson-book .lesson-heading .day-description {
  width: 100%;
  max-width: 80ch;
  margin: 0 auto 2px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  color: #5e6983;
  white-space: pre-line;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

body.lesson-book .lesson-heading-number {
  justify-self: center;
  max-width: 100%;
  margin: 0;
  padding: 4px 10px;
  border-radius: 8px;
  background: #e8eaff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  color: #424bac;
}

body.lesson-book .lesson-heading .lesson-title {
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(20px, 3.5vw, 25px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.025em;
  text-transform: none;
  color: #273465;
  white-space: pre-line;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

body.lesson-book .lesson-heading .lesson-description {
  display: block;
  width: 100%;
  max-width: 76ch;
  margin: 2px auto 0;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
  color: #4f5d78;
  text-align: center;
  white-space: pre-line;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

body.lesson-book .lesson-heading .arabic-inline {
  font-family: var(--font-arabic);
  font-size: 1.28em;
  font-weight: 400;
  line-height: 1.25;
  direction: rtl;
  unicode-bidi: isolate;
}

body.lesson-book #exerciseList {
  --book-ink: #172d35;
  --book-muted: #4e626d;
  --book-accent: #007f78;
  display: block;
  padding: 0;
  border: 1px solid #e1e6f4;
  border-radius: 18px;
  background: var(--ui-surface);
  box-shadow: 0 4px 18px #3d4a8008;
}

body.lesson-book #lessonProgress {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  display: flex;
  border: 0;
  border-inline-start: 5px solid #ffc344;
  border-radius: 12px;
  box-shadow: none;
  color: var(--ui-surface);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: normal;
  line-height: 1.5;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  min-height: 44px;
  margin: 8px 0 6px;
  padding: 10px 16px;
  background: linear-gradient(110deg, #4652bd, #5c61cb);
  border-inline-start-color: #b8bfff;
}

body.lesson-book #writingSection {
  padding: 0;
  background: var(--ui-surface);
  border: 1px solid #e3c8bc;
  border-radius: 12px;
  overflow: hidden;
  font-family: var(--font-sans);
  margin: 10px 0;
}

body.lesson-book #quizSection {
  padding: 0;
  overflow: hidden;
  border: 1px solid #cfc2e8;
  border-radius: 12px;
  background: var(--ui-surface);
  font-family: var(--font-sans);
  margin-top: 10px;
}

@media (max-width: 600px) {

  body.lesson-book > .app {
    padding: 10px 12px 24px;
  }

  body.lesson-book .lesson {
    padding-top: 6px;
  }

}

@media (max-width: 520px) {

  body.lesson-book .lesson-heading {
    padding: 12px;
    border-radius: 18px;
  }

  body.lesson-book #lessonProgress {
    padding-inline: 12px;
  }

}

/* Stable return to curriculum from either end of a lesson. */

body.lesson-book .lesson-contents-top {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  min-height: 36px;
  margin: 0 0 6px;
  padding: 6px 0;
  color: #373fa5;
  font: 700 12px/1.5 var(--font-sans);
  text-decoration: none;
}

body.lesson-book .lesson-contents-top:hover {
  text-decoration: underline;
}

body.lesson-book .lesson-contents-top svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
}

body.lesson-book .lesson-navigation {
  grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr);
  align-items: stretch;
  margin-top: 10px;
}

body.lesson-book .lesson-contents-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  min-height: 42px;
  margin: 0;
  padding: 10px;
  border: 1px solid #d9dfed;
  border-radius: 12px;
  background: var(--ui-surface);
  color: #373fa5;
  text-decoration: none;
}

body.lesson-book .lesson-contents-bottom:hover {
  background: #eef0ff;
  border-color: #a4addc;
}

body.lesson-book .lesson-contents-bottom svg {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}

body.lesson-book .lesson-contents-top:focus-visible,
body.lesson-book .lesson-contents-bottom:focus-visible {
  outline: 2px solid var(--ui-focus);
  outline-offset: 3px;
}

/* Shared session manager: compact, centered and independent of page layouts. */

.app-header .profile-dropdown .profile-sessions-button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 40px;
  margin: 6px 0 0;
  padding: 9px 11px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #414b75;
  font: 600 12px/1.45 var(--font-sans);
  text-align: left;
  box-shadow: none;
}

.app-header .profile-dropdown .profile-sessions-button:hover {
  background: var(--ui-primary-soft);
  transform: none;
}

.app-header .profile-sessions-button svg {
  flex: none;
  width: 19px;
  height: 19px;
}

dialog.session-dialog {
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  width: min(480px, calc(100vw - 28px));
  max-width: 480px;
  max-height: calc(100dvh - 40px);
  margin: auto;
  padding: 22px;
  overflow: auto;
  border: 1px solid var(--ui-border);
  border-radius: 20px;
  background: linear-gradient(145deg, var(--ui-surface), #f7f8ff);
  color: var(--ui-ink);
  font-family: var(--font-sans);
  text-align: left;
  box-shadow: 0 20px 80px #18213d33;
}

dialog.session-dialog::backdrop {
  background: #18213d66;
  backdrop-filter: blur(3px);
}

dialog.session-dialog h2 {
  margin: 0 0 8px;
  color: #273465;
  font: 800 20px/1.35 var(--font-sans);
  letter-spacing: -.02em;
}

dialog.session-dialog .session-description {
  margin: 0 0 16px;
  color: var(--ui-muted);
  font: 400 14px/1.6 var(--font-sans);
}

dialog.session-dialog .session-list {
  display: grid;
  gap: 9px;
}

dialog.session-dialog .session-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--ui-border);
  border-radius: 12px;
  background: var(--ui-surface);
}

dialog.session-dialog .session-info {
  display: grid;
  gap: 4px;
  min-width: 0;
}

dialog.session-dialog .session-info strong {
  color: #35435c;
  font: 700 13px/1.5 var(--font-sans);
  overflow-wrap: anywhere;
}

dialog.session-dialog .session-last-seen {
  color: #64708a;
  font: 400 11.5px/1.5 var(--font-sans);
}

dialog.session-dialog .session-current {
  justify-self: start;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--ui-primary-soft);
  color: #414aa9;
  font: 650 10.5px/1.5 var(--font-sans);
}

dialog.session-dialog .session-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: auto;
  max-width: 180px;
  min-height: 40px;
  margin: 0;
  padding: 8px 11px;
  border: 1px solid var(--ui-primary);
  border-radius: 10px;
  background: var(--ui-primary);
  color: var(--ui-surface);
  font: 650 12px/1.45 var(--font-sans);
  text-align: center;
  box-shadow: none;
}

dialog.session-dialog .session-button:hover {
  background: var(--ui-primary-hover);
  transform: none;
}

dialog.session-dialog .session-button-secondary {
  border-color: #d4dcf1;
  background: var(--ui-primary-soft);
  color: #414aa9;
}

dialog.session-dialog .session-button-secondary:hover {
  background: #e3e8ff;
}

dialog.session-dialog .session-button:disabled {
  opacity: .6;
  cursor: wait;
}

dialog.session-dialog .session-button:focus-visible {
  outline: 3px solid #8993e0;
  outline-offset: 3px;
}

dialog.session-dialog .session-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

dialog.session-dialog .session-error {
  margin: 12px 0 0;
  padding: 10px;
  border-radius: 9px;
  background: #fff0ee;
  color: #a43c3c;
  font: 500 12.5px/1.55 var(--font-sans);
}

@media (max-width: 420px) {

  dialog.session-dialog {
    padding: 18px;
  }

  dialog.session-dialog .session-item {
    flex-wrap: wrap;
    gap: 9px;
  }

  dialog.session-dialog .session-item .session-button {
    margin-left: auto;
    max-width: 100%;
  }

}

/* Lesson settings and saved student audio. Keep all selectors local to lesson.html. */

body.lesson-book #lessonSettings {
  width: 100%;
  max-width: none;
  margin: 6px 0 8px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #c9dceb;
  border-radius: 12px;
  background: var(--ui-surface);
  font-family: var(--font-sans);
}

body.lesson-book #lessonSettings .lesson-settings-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 46px;
  padding: 10px 16px;
  border-inline-start: 5px solid #a9dce9;
  background: linear-gradient(110deg, #176785, #2456a3);
  color: var(--ui-surface);
  font-size: 14px;
  font-weight: 800;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

body.lesson-book #lessonSettings .lesson-settings-summary::-webkit-details-marker {
  display: none;
}

body.lesson-book #lessonSettings .lesson-settings-heading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

body.lesson-book #lessonSettings .lesson-settings-heading svg {
  width: 20px;
  height: 20px;
  flex: none;
}

body.lesson-book #lessonSettings .lesson-settings-chevron {
  width: 18px;
  height: 18px;
  flex: none;
}

body.lesson-book #lessonSettings[open] .lesson-settings-chevron {
  transform: rotate(180deg);
}

body.lesson-book #lessonSettings .lesson-settings-summary:focus-visible {
  outline: 2px solid var(--ui-surface);
  outline-offset: -5px;
}

body.lesson-book #lessonSettings .lesson-settings-body {
  padding: 8px 14px 10px;
}

body.lesson-book #lessonSettings .lesson-settings-options {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 4px 22px;
}

body.lesson-book #lessonSettings .lesson-settings-option {
  display: inline-flex;
  flex: 0 1 auto;
  align-items: flex-start;
  gap: 9px;
  min-width: 0;
  min-height: 44px;
  max-width: 100%;
  margin: 0;
  padding: 10px 0;
  color: #263a59;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.55;
  white-space: normal;
  cursor: pointer;
}

body.lesson-book #lessonSettings .lesson-settings-option input {
  appearance: auto;
  flex: none;
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin: 1px 0 0;
  padding: 0;
  accent-color: #2456a3;
  cursor: pointer;
}

body.lesson-book #lessonSettings .lesson-settings-option small {
  display: block;
  max-width: 52ch;
  margin-top: 2px;
  color: #596c82;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.55;
}

body.lesson-book #lessonSettings :is(input, button):focus-visible {
  outline: 2px solid #2456a3;
  outline-offset: 3px;
}

body.lesson-book #lessonSettings .lesson-local-audio-status {
  margin: 6px 0 0;
  color: #52647d;
  font-size: 12px;
  line-height: 1.6;
}

body.lesson-book #lessonSettings .lesson-local-audio-status.is-error {
  color: #9e352d;
}

body.lesson-book #lessonSettings .lesson-local-audio-status:empty,
body.lesson-book #lessonSettings [hidden],
body.lesson-book #exerciseList .exercise-local-recording[hidden],
body.lesson-book #exerciseList .exercise-recorded-audio[hidden] {
  display: none;
}

body.lesson-book #exerciseList .exercise-local-recording {
  width: 150px;
  max-width: 100%;
  min-width: 0;
  margin: 7px 0 0;
  padding: 0;
  border: 1px solid #dbe5f3;
  border-radius: 10px;
  background: #f3f7ff;
  text-align: start;
  box-sizing: border-box;
}

body.lesson-book #exerciseList .exercise-local-recording .exercise-recording-download {
  display: inline-flex;
  flex: 0 0 20px;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #2456a3;
  text-decoration: none;
  box-shadow: none;
  box-sizing: border-box;
}

body.lesson-book #exerciseList .exercise-local-recording .exercise-recording-download:hover {
  background: #e1ebfa;
}

body.lesson-book #exerciseList .exercise-local-recording .exercise-recording-download:focus-visible {
  outline: 2px solid #2456a3;
  outline-offset: 1px;
}

body.lesson-book #exerciseList .exercise-local-recording .exercise-recorded-audio {
  display: none;
}

body.lesson-book #exerciseList .exercise-recording-controls {
  display: grid;
  grid-template-columns: 24px 30px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 4px;
  height: 30px;
  padding: 0 6px;
  box-sizing: border-box;
  direction: ltr;
}

body.lesson-book #exerciseList .exercise-recording-controls .exercise-recording-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  min-width: 24px;
  height: 28px;
  min-height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #203a63;
  box-shadow: none;
  transform: none;
  cursor: pointer;
}

body.lesson-book #exerciseList .exercise-recording-controls .exercise-recording-play:hover {
  background: #e1ebfa;
  transform: none;
}

body.lesson-book #exerciseList .exercise-recording-play .recording-play-icon {
  display: block;
}

body.lesson-book #exerciseList .exercise-recording-play .recording-pause-icon,
body.lesson-book #exerciseList .exercise-recording-play[data-playing="true"] .recording-play-icon {
  display: none;
}

body.lesson-book #exerciseList .exercise-recording-play[data-playing="true"] .recording-pause-icon {
  display: block;
}

body.lesson-book #exerciseList .exercise-recording-time {
  color: #203a63;
  font: 500 11px/1.3 var(--font-sans);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

body.lesson-book #exerciseList .exercise-recording-controls .exercise-recording-seek {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 24px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  box-sizing: border-box;
}

body.lesson-book #exerciseList .exercise-recording-seek::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(to right, #2456a3 var(--recording-progress, 0%), #cedbec var(--recording-progress, 0%));
}

body.lesson-book #exerciseList .exercise-recording-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  margin-top: -3.5px;
  border: 0;
  border-radius: 50%;
  background: #2456a3;
}

body.lesson-book #exerciseList .exercise-recording-seek::-moz-range-track {
  height: 3px;
  border: 0;
  border-radius: 3px;
  background: #cedbec;
}

body.lesson-book #exerciseList .exercise-recording-seek::-moz-range-progress {
  height: 3px;
  border-radius: 3px;
  background: #2456a3;
}

body.lesson-book #exerciseList .exercise-recording-seek::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 50%;
  background: #2456a3;
}

body.lesson-book #exerciseList .exercise-recording-controls :is(button, input):focus-visible {
  outline: 2px solid #2456a3;
  outline-offset: 1px;
}

body.lesson-book #exerciseList .exercise-recording-controls .exercise-recording-seek:disabled {
  opacity: .45;
  cursor: default;
}

@media (max-width: 520px) {

  body.lesson-book #lessonSettings .lesson-settings-summary {
    padding-inline: 11px;
  }

  body.lesson-book #lessonSettings .lesson-settings-body {
    padding-inline: 12px;
  }

  body.lesson-book #lessonSettings .lesson-settings-options {
    display: grid;
    gap: 0;
  }

}

/* Public legal documents; scoped to avoid changing lesson and app components. */

body.legal-page {
  --legal-ink: #202d57;
  --legal-muted: #5b6680;
  --legal-line: #dce2ef;
  --font-sans: Inter,Manrope,system-ui,-apple-system,Arial,sans-serif;
  margin: 0;
  padding: 0;
  color: var(--legal-ink);
  background: radial-gradient(ellipse at 4% 0%,#e1eaff 0,transparent 34%),radial-gradient(ellipse at 96% 9%,#eeebff 0,transparent 30%),#f7f9fd;
  font-family: var(--font-sans);
}

.legal-page .legal-shell {
  width: min(1140px,calc(100% - 40px));
  margin: 16px auto 0;
}

.legal-page :is(h1,h2,p,a,button,summary,span,time) {
  font-family: inherit;
}

.legal-page a {
  color: #3347a1;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.legal-page a:hover {
  color: var(--ui-brand);
}

.legal-page :is(a,button,summary):focus-visible {
  outline: 3px solid #455bc2;
  outline-offset: 4px;
}

.legal-page .legal-skip {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 100;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--ui-surface);
}

.legal-page .legal-skip:focus {
  top: 16px;
}

.legal-page .legal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  border: 1px solid var(--ui-surface);
  border-radius: 20px;
  background: #ffffffdc;
  box-shadow: 0 4px 22px #32458206;
}

.legal-page .legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ui-brand);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.04em;
  text-decoration: none;
}

.legal-page .legal-brand img {
  display: block;
  flex: none;
}

.legal-page .legal-header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.legal-page .legal-home-link {
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}

.legal-page .legal-login-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 11px;
  background: var(--ui-brand);
  color: var(--ui-surface);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}

.legal-page .legal-login-link:hover {
  background: #303d9e;
  color: var(--ui-surface);
}

html:not(.legal-enhanced) .legal-language-menu {
  display: none;
}

.legal-page .legal-language-menu {
  position: relative;
}

.legal-page .legal-language-menu summary {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid #d6ddef;
  border-radius: 11px;
  background: var(--ui-surface);
  font-size: 12px;
  font-weight: 650;
  list-style: none;
  cursor: pointer;
}

.legal-page .legal-language-menu summary::-webkit-details-marker {
  display: none;
}

.legal-page .legal-language-menu img {
  display: block;
  width: 20px;
  height: 14px;
  object-fit: cover;
  border-radius: 2px;
}

.legal-page .legal-language-options {
  position: absolute;
  z-index: 20;
  top: calc(100% + 7px);
  right: 0;
  width: 165px;
  padding: 5px;
  border: 1px solid #dce2ef;
  border-radius: 13px;
  background: var(--ui-surface);
  box-shadow: 0 14px 35px #1a237e14;
}

.legal-page .legal-language-options button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 38px;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ui-ink);
  box-shadow: none;
  font-size: 13px;
  text-align: left;
  transform: none;
}

.legal-page .legal-language-options button:hover,
.legal-page .legal-language-options button[aria-pressed="true"] {
  background: #eff3ff;
  transform: none;
}

.legal-page .legal-hero {
  position: relative;
  overflow: hidden;
  margin: 20px 0 22px;
  padding: 32px 36px;
  border: 1px solid #dce3f6;
  border-radius: 23px;
  background: linear-gradient(115deg,#edf3ff 0%,#f8f9ff 55%,#f1edff 100%);
}

.legal-page .legal-hero-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 16px;
  border: 1px solid #dce3fb;
  border-radius: 12px;
  background: #ffffffb8;
  color: #4355ad;
}

.legal-page .legal-hero-icon svg {
  width: 23px;
  height: 23px;
}

.legal-page .legal-eyebrow {
  margin: 0 0 6px;
  color: #5a6a94;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.legal-page .legal-hero h1 {
  margin: 0;
  color: var(--ui-brand);
  font-size: clamp(27px,3.5vw,40px);
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: -.035em;
}

.legal-page .legal-lead {
  max-width: 65ch;
  margin: 12px 0 0;
  color: #53617e;
  font-size: 15px;
  line-height: 1.65;
}

.legal-page .legal-date {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: 17px 0 0;
  color: #64728f;
  font-size: 12px;
}

.legal-page .legal-layout {
  display: grid;
  grid-template-columns: 240px minmax(0,1fr);
  align-items: start;
  gap: 24px;
}

.legal-page .legal-toc {
  position: sticky;
  top: 20px;
  padding: 17px;
  border: 1px solid var(--legal-line);
  border-radius: 16px;
  background: #ffffffc7;
}

.legal-page .legal-toc summary {
  color: #263759;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.legal-page .legal-toc nav {
  display: grid;
  gap: 2px;
  margin-top: 12px;
}

.legal-page .legal-toc nav a {
  padding: 7px 0;
  color: #5d6b86;
  font-size: 13px;
  line-height: 1.45;
  text-decoration: none;
}

.legal-page .legal-toc nav a:hover {
  color: #263da0;
}

.legal-page .legal-document {
  min-width: 0;
  padding: 26px 32px;
  border: 1px solid var(--legal-line);
  border-radius: 20px;
  background: var(--ui-surface);
}

.legal-page .legal-note {
  margin: 0 0 26px;
  padding: 13px 16px;
  border: 1px solid #dce6fa;
  border-radius: 12px;
  background: #f3f7ff;
}

.legal-page .legal-note p {
  margin: 0;
  color: #3e537b;
  font-size: 13px;
  line-height: 1.65;
}

.legal-page .legal-section {
  scroll-margin-top: 24px;
  margin: 0 0 27px;
}

.legal-page .legal-section h2,
.legal-page .legal-contact h2 {
  margin: 0 0 10px;
  color: #25365e;
  font-size: 17px;
  line-height: 1.4;
  font-weight: 750;
  letter-spacing: -.015em;
}

.legal-page .legal-section p,
.legal-page .legal-contact>p {
  margin: 0 0 11px;
  color: #536078;
  font-size: 15px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.legal-page .legal-section p:last-child {
  margin-bottom: 0;
}

.legal-page .legal-inline-link {
  display: inline-block;
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.6;
}

.legal-page .legal-contact {
  scroll-margin-top: 24px;
  padding: 20px;
  border: 1px solid #dce4f7;
  border-radius: 14px;
  background: #f6f8ff;
}

.legal-page .legal-contact .legal-contact-email {
  display: grid;
  gap: 5px;
  margin: 16px 0 0;
  font-size: 12px;
}

.legal-page .legal-contact-email a {
  font-size: 14px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.legal-page .legal-related {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 22px;
  color: #66738a;
  font-size: 13px;
}

.legal-page .legal-related a {
  font-weight: 650;
}

.legal-page .legal-draft-note {
  margin: 0 0 20px;
  padding: 12px 16px;
  border: 1px solid #e6d4a2;
  border-radius: 12px;
  background: #fff8e8;
  color: #72571b;
  font-size: 12px;
  line-height: 1.6;
}

.iqro-legal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
  max-width: 1140px;
  margin: 26px auto 0;
  padding: 20px 4px 24px;
  border-top: 1px solid #dce2ef;
  color: #6b758d;
  font: 500 12px/1.6 var(--font-sans);
}

.iqro-legal-footer>span {
  color: #46547a;
  font-weight: 750;
}

.iqro-legal-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.iqro-legal-footer nav a {
  color: #586889;
  font-family: inherit;
  text-decoration: none;
}

.iqro-legal-footer nav a:hover {
  color: var(--ui-brand);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.landing-app .iqro-legal-footer {
  width: calc(100% - 40px);
  margin-top: 30px;
}

.login-page .iqro-legal-footer {
  justify-content: center;
  gap: 8px 20px;
  margin-top: 18px;
  padding: 14px 4px 0;
}

.login-page .iqro-legal-footer>span {
  display: none;
}

@media (max-width:760px) {

  .legal-page .legal-shell {
    width: calc(100% - 28px);
    margin-top: 12px;
  }

  .legal-page .legal-header {
    padding: 10px 13px;
    border-radius: 16px;
  }

  .legal-page .legal-header-actions {
    gap: 10px;
  }

  .legal-page .legal-hero {
    margin: 16px 0;
    padding: 25px 23px;
    border-radius: 19px;
  }

  .legal-page .legal-hero-icon {
    margin-bottom: 12px;
  }

  .legal-page .legal-layout {
    grid-template-columns: minmax(0,1fr);
    gap: 14px;
  }

  .legal-page .legal-toc {
    position: static;
    padding: 14px 18px;
  }

  .legal-page .legal-toc nav {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 3px 16px;
  }

  .legal-page .legal-document {
    padding: 22px;
    border-radius: 18px;
  }

  .legal-page .legal-section h2 {
    font-size: 16px;
  }

}

@media (max-width:420px) {

  .legal-page .legal-header {
    gap: 10px;
    padding: 10px 12px;
  }

  .legal-page .legal-brand {
    gap: 7px;
    font-size: 18px;
  }

  .legal-page .legal-brand img {
    width: 26px;
    height: 26px;
  }

  .legal-page .legal-header-actions {
    gap: 8px;
  }

  .legal-page .legal-login-link {
    padding: 8px 10px;
    font-size: 12px;
  }

  .legal-page .legal-language-menu summary {
    gap: 5px;
    padding: 7px 8px;
  }

  .legal-page .legal-home-link {
    display: none;
  }

  .legal-page .legal-hero {
    padding: 23px 20px;
  }

  .legal-page .legal-lead {
    font-size: 14px;
  }

  .legal-page .legal-document {
    padding: 20px 18px;
  }

  .legal-page .legal-section p,
  .legal-page .legal-contact>p {
    font-size: 14px;
    line-height: 1.8;
  }

  .legal-page .legal-contact {
    padding: 16px;
  }

  .legal-page .legal-toc nav {
    grid-template-columns: minmax(0,1fr);
  }

}

@media print {

  body.legal-page {
    background: var(--ui-surface);
  }

  .legal-page .legal-shell {
    width: 100%;
    margin: 0;
  }

  .legal-page .legal-header,
  .legal-page .legal-toc,
  .legal-page .iqro-legal-footer,
  .legal-page .legal-skip {
    display: none;
  }

  .legal-page .legal-layout {
    display: block;
  }

  .legal-page .legal-hero {
    margin: 0 0 20px;
    padding: 0;
    border: 0;
    background: var(--ui-surface);
  }

  .legal-page .legal-hero-icon {
    display: none;
  }

  .legal-page .legal-document {
    padding: 0;
    border: 0;
  }

  .legal-page .legal-section h2 {
    break-after: avoid;
  }

  .legal-page a {
    color: inherit;
  }

}

/* Live classes — learner pages, ticket wallet and administrator controls. */

body.live-page {
  --live-primary: var(--ui-primary);
  --live-ink: var(--ui-ink);
  --live-muted: var(--ui-muted);
  --live-line: var(--ui-border);
  margin: 0;
  color: var(--live-ink);
  font-family: var(--font-sans);
  background: var(--ui-page-background);
  background-attachment: fixed;
}

.live-page .live-shell {
  width: min(1160px,100%);
  max-width: 1160px;
  margin: 0 auto;
  padding: 18px 24px 40px;
  background: transparent;
}

.live-page [hidden],
#profileLiveClassesLink[hidden] {
  display: none !important;
}

.live-page .live-icon {
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.live-page .live-main {
  display: grid;
  gap: 16px;
  min-width: 0;
  padding-top: 22px;
}

.live-main :is(h1,h2,h3,p) {
  margin: 0;
}

.live-main :is(h1,h2,h3) {
  font-family: inherit;
  color: var(--live-ink);
}

.live-main h1 {
  font-size: clamp(26px,3.5vw,33px);
  line-height: 1.22;
  letter-spacing: -.035em;
  font-weight: 800;
}

.live-main h2 {
  font-size: 16px;
  line-height: 1.4;
  font-weight: 750;
  letter-spacing: -.015em;
}

.live-main h3 {
  font-size: 16px;
  line-height: 1.45;
  font-weight: 750;
}

.live-main p {
  font-family: inherit;
  font-size: 14px;
  line-height: 1.6;
}

.live-page .live-muted {
  color: var(--live-muted);
  font-size: 12px;
  line-height: 1.55;
}

.live-page .live-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 2px 2px;
}

.live-page .live-intro-copy {
  display: grid;
  gap: 7px;
  max-width: 660px;
}

.live-main .live-eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #5863ac;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.45;
}

.live-eyebrow .live-icon {
  width: 15px;
  height: 15px;
  flex-basis: 15px;
}

.live-main .live-lead {
  color: #55627e;
  font-size: 14px;
  line-height: 1.55;
}

.live-page .live-button {
  appearance: none;
  display: inline-flex;
  flex: 0 1 auto;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: auto;
  max-width: 100%;
  min-width: 0;
  min-height: 38px;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid var(--live-primary);
  border-radius: 10px;
  color: var(--ui-surface);
  background: var(--live-primary);
  box-shadow: none;
  font: 700 12.5px/1.45 var(--font-sans);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transform: none;
  transition: background .15s,border-color .15s;
  font-size: 13px;
}

.live-page .live-button .live-icon {
  width: 16px;
  height: 16px;
  flex-basis: 16px;
}

.live-page .live-button:hover:not(:disabled) {
  border-color: var(--ui-primary-hover);
  background: var(--ui-primary-hover);
  color: var(--ui-surface);
  transform: none;
}

.live-page .live-secondary {
  background: var(--ui-surface);
  color: var(--ui-brand);
  border-color: var(--ui-control-border);
}

.live-page .live-secondary:hover:not(:disabled) {
  background: var(--ui-primary-soft);
  color: #35408b;
  border-color: #b6c1e5;
}

.live-page .live-danger {
  color: #aa3f50;
  border-color: #ebd4d9;
  background: var(--ui-surface);
}

.live-page .live-danger:hover:not(:disabled) {
  color: #923243;
  border-color: #ddb8c1;
  background: #fff2f3;
}

.live-page .live-button:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.live-page .live-refresh {
  flex-shrink: 0;
  background: #ffffffa6;
}

.live-page :is(button,a,input,textarea,select,summary):focus-visible {
  outline: 3px solid #7b89d5;
  outline-offset: 3px;
}

.live-page .live-workspace {
  display: grid;
  grid-template-columns: minmax(0,1fr) 282px;
  grid-template-areas: 'classes sidebar';
  align-items: start;
  gap: 18px;
}

.live-page .live-sidebar {
  grid-area: sidebar;
  display: grid;
  gap: 12px;
  min-width: 0;
  position: sticky;
  top: 90px;
}

.live-page .live-class-column {
  grid-area: classes;
  display: grid;
  gap: 16px;
  min-width: 0;
}

.live-page .live-wallet {
  padding: 18px;
  border: 1px solid #dce2f4;
  border-radius: 18px;
  background: linear-gradient(145deg,var(--ui-surface) 45%,#f0f3ff);
  box-shadow: 0 4px 15px #36447806;
  display: grid;
  gap: 11px;
  min-width: 0;
}

.live-page .live-wallet-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.live-page .live-wallet-heading h2 {
  font-size: 13px;
  color: #59647e;
  font-weight: 650;
}

.live-page .live-wallet-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #ecefff;
  color: #4b58b3;
}

.live-page .live-wallet-icon .live-icon {
  width: 19px;
  height: 19px;
}

.live-page .live-balance {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: #63708b;
  font-size: 13px;
}

.live-page .live-balance strong {
  color: #283574;
  font-size: 38px;
  line-height: 1.1;
  letter-spacing: -.04em;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.live-main .live-wallet-hint {
  color: #596681;
  font-size: 12px;
  line-height: 1.55;
}

.live-page .live-wallet-actions {
  display: grid;
  gap: 8px;
  padding-top: 2px;
}

.live-page .live-wallet-actions .live-button {
  width: 100%;
}

.live-page .live-section {
  display: grid;
  gap: 13px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--live-line);
  border-radius: 18px;
  background: #fffffff2;
  box-shadow: 0 3px 12px #37437703;
}

.live-page .live-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.live-page .live-section-heading h2 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-page .live-section-heading h2 .live-icon {
  color: #636db3;
  width: 17px;
  height: 17px;
  flex-basis: 17px;
}

.live-page .live-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #61708c;
  font-size: 11px;
  font-weight: 550;
}

.live-page .live-filter select {
  width: 145px;
  min-height: 35px;
  padding: 7px 29px 7px 10px;
  font-size: 12px;
}

.live-main .live-schedule-hint {
  margin-top: -4px;
  font-size: 12px;
  line-height: 1.55;
}

.live-page .live-grid {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.live-page .live-card {
  --live-accent: #5366b8;
  --live-tint: var(--ui-primary-soft);
  display: grid;
  grid-template-columns: 52px minmax(0,1fr);
  align-items: start;
  gap: 13px;
  padding: 15px;
  border: 1px solid #e2e7f3;
  border-radius: 14px;
  background: var(--ui-surface);
  min-width: 0;
  box-shadow: var(--ui-shadow);
}

.live-page .live-card[data-theme=day3_4] {
  --live-accent: #207c7b;
  --live-tint: #eaf6f3;
}

.live-page .live-card[data-theme=day5_7] {
  --live-accent: #8e6529;
  --live-tint: #fbf4e8;
}

.live-page .live-card[data-theme=free] {
  --live-accent: #7b53a6;
  --live-tint: #f3edf9;
}

.live-page .live-date {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 9px 4px;
  border-radius: 11px;
  background: var(--live-tint);
  color: var(--live-accent);
  font-size: 10px;
  line-height: 1.35;
  font-weight: 700;
}

.live-page .live-date strong {
  font-size: 24px;
  line-height: 1.05;
  letter-spacing: -.03em;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.live-page .live-card-content {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.live-page .live-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

.live-page .live-tag,
.live-page .live-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--live-tint,var(--ui-primary-soft));
  color: var(--live-accent,#5366b8);
  font: 700 10px/1.45 var(--font-sans);
}

.live-page .live-status[data-status=open],
.live-page .live-status[data-status=registered] {
  background: #eaf6f0;
  color: #297252;
}

.live-page .live-status[data-status=draft],
.live-page .live-status[data-status=completed] {
  background: #eef1f6;
  color: #5c687e;
}

.live-page .live-status[data-status=closed],
.live-page .live-status[data-status=full] {
  background: #fbf2e1;
  color: #87602a;
}

.live-page .live-status[data-status=cancelled] {
  background: #fceef0;
  color: #9e4558;
}

.live-page .live-card h3 {
  overflow-wrap: anywhere;
}

.live-page .live-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 14px;
  color: #5d6984;
  font-size: 12px;
  line-height: 1.5;
}

.live-page .live-meta>span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.live-page .live-meta .live-icon {
  width: 13px;
  height: 13px;
  flex-basis: 13px;
  color: #7a84a0;
}

.live-main .live-description {
  font-family: var(--font-content);
  color: #58647c;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.live-page .live-card-footer {
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 11px;
  border-top: 1px solid #edf0f7;
}

.live-page .live-card-terms {
  display: grid;
  gap: 3px;
  color: #63708a;
  font-size: 11.5px;
  line-height: 1.5;
  min-width: 0;
}

.live-page .live-card-terms>span {
  overflow-wrap: anywhere;
}

.live-page .live-card .live-actions {
  margin-left: auto;
}

.live-main .live-join-note {
  font-size: 11.5px;
  line-height: 1.55;
  color: #59668a;
  padding: 7px 9px;
  border-radius: 7px;
  background: #f3f5fd;
  overflow-wrap: anywhere;
}

.live-main .live-timezone {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  color: #63708a;
  font-size: 10.5px;
  line-height: 1.5;
}

.live-timezone .live-icon {
  width: 13px;
  height: 13px;
  flex-basis: 13px;
}

.live-page .live-empty {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
  min-height: 150px;
  padding: 25px 18px;
  border: 1px dashed #dce2f1;
  border-radius: 12px;
  background: #fbfcff;
  color: #65718a;
  text-align: center;
}

.live-page .live-empty>.live-icon {
  width: 28px;
  height: 28px;
  color: #8692bd;
  margin-bottom: 3px;
}

.live-page .live-empty strong {
  color: #475675;
  font-size: 13px;
  font-weight: 700;
}

.live-page .live-empty p {
  max-width: 340px;
  color: #66738a;
  font-size: 12px;
  line-height: 1.55;
}

.live-page .live-details {
  min-width: 0;
  border: 1px solid var(--live-line);
  border-radius: 15px;
  background: var(--ui-surface);
}

.live-page .live-details>summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 15px;
  border-radius: 15px;
  list-style: none;
  font-size: 12px;
  line-height: 1.5;
  font-weight: 700;
  cursor: pointer;
}

.live-page .live-details>summary::-webkit-details-marker {
  display: none;
}

.live-page .live-summary-label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.live-page .live-summary-label>.live-icon {
  width: 16px;
  height: 16px;
  flex-basis: 16px;
  color: #6c78aa;
}

.live-page .live-chevron {
  width: 15px;
  height: 15px;
  flex-basis: 15px;
  color: #6d79a5;
  transition: transform .15s;
}

.live-page .live-details[open]>summary {
  border-radius: 15px 15px 0 0;
}

.live-page .live-details[open]>summary>.live-chevron {
  transform: rotate(180deg);
}

.live-page .live-details-body {
  display: grid;
  gap: 12px;
  padding: 0 15px 15px;
  min-width: 0;
}

.live-page .live-rules .live-details-body p {
  font-size: 12px;
  line-height: 1.65;
  color: #5c6981;
}

.live-page .live-rules .live-details-body p+p {
  padding-top: 11px;
  border-top: 1px solid #edf0f7;
}

.live-page .live-history {
  margin: 0;
  padding: 0;
  list-style: none;
}

.live-page .live-history li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 10px 0;
  border-bottom: 1px solid #edf0f7;
  font: 500 11.5px/1.5 var(--font-sans);
}

.live-page .live-history li:last-child {
  border: 0;
}

.live-page .live-history small {
  display: block;
  margin-top: 3px;
  color: #6d7891;
  font-size: 10.5px;
}

.live-page .live-history strong {
  min-width: 27px;
  padding: 3px 5px;
  border-radius: 6px;
  background: #f0f2fa;
  color: #4a588b;
  font-size: 12px;
  text-align: center;
  white-space: nowrap;
}

.live-page .live-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}

.live-page .live-feedback,
.live-page .live-notice {
  padding: 12px 15px;
  border: 1px solid #d8e0f7;
  border-radius: 12px;
  background: var(--ui-primary-soft);
  color: #445782;
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.live-page .live-feedback:empty {
  display: none;
}

.live-page .live-feedback[data-error=true] {
  background: #fff1f2;
  border-color: #efd5db;
  color: #9d4053;
}

.live-page #liveOff {
  background: #fff9ec;
  border-color: #ede0bd;
  color: #7b653b;
}

.live-page .live-payment-notice {
  display: grid;
  gap: 10px;
}

.live-page .live-payment-message {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.live-page .live-payment-message h3 {
  margin: 0 0 3px;
  color: inherit;
  font-size: 14px;
  line-height: 1.4;
}

.live-page .live-payment-message p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
}

.live-page .live-payment-icon {
  display: inline-flex;
  flex: 0 0 auto;
  margin-top: 2px;
}

.live-page .live-payment-notice[data-state="failed"] {
  border-color: #efcdd3;
  background: #fff4f5;
  color: #86354a;
}

.live-page .live-payment-notice[data-state="unknown"] {
  border-color: #ead9b4;
  background: #fff9ed;
  color: #755920;
}

.live-page .live-payment-notice[data-state="paid"] {
  border-color: #c2dfd8;
  background: #eef9f5;
  color: #245e4f;
}

.live-page .live-admin {
  border-color: #d7def0;
  background: var(--ui-surface);
}

.live-page .live-admin>summary {
  padding: 14px 17px;
  font-size: 12px;
}

.live-page .live-admin[open]>summary {
  border-bottom: 1px solid #e4e8f4;
}

.live-page .live-admin-content {
  padding: 17px;
}

.live-main .live-admin-guide {
  color: #65718b;
  font-size: 12px;
  line-height: 1.6;
  margin-bottom: 17px;
}

.live-page .live-admin-layout {
  display: grid;
  grid-template-columns: minmax(0,1.6fr) minmax(255px,1fr);
  align-items: start;
  gap: 20px;
}

.live-page .live-editor {
  min-width: 0;
}

.live-page .live-editor-heading {
  display: grid;
  gap: 4px;
  margin-bottom: 15px;
}

.live-page .live-editor-heading h2,
.live-page .live-admin-schedules>h2 {
  font-size: 14px;
}

.live-page .live-editor-heading p {
  font-size: 10.5px;
}

.live-page .live-admin-form {
  display: grid;
  gap: 17px;
}

.live-page .live-form-group {
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid #e2e7f2;
  border-radius: 12px;
}

.live-page .live-form-group>legend {
  padding: 0 5px;
  color: #566389;
  font: 700 11.5px/1.5 var(--font-sans);
}

.live-page .live-admin-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  align-items: end;
  gap: 12px;
  min-width: 0;
}

.live-page .live-admin-grid>label,
.live-page .live-field {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #526079;
  font: 650 11.5px/1.5 var(--font-sans);
}

.live-page .live-admin-grid>label>span {
  min-height: 17px;
}

.live-page .live-full {
  grid-column: 1/-1;
}

.live-page input:not([type=radio]),
.live-page select,
.live-page textarea {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 39px;
  margin: 0;
  padding: 9px 10px;
  border: 1px solid #cfd7e8;
  border-radius: 9px;
  background-color: var(--ui-surface);
  color: #2e3b57;
  font: 500 12px/1.5 var(--font-sans);
  box-shadow: none;
}

.live-page textarea {
  resize: vertical;
  min-height: 80px;
  font-family: var(--font-content);
}

.live-page input::placeholder {
  color: #828ca3;
  opacity: 1;
}

.live-page select {
  appearance: none;
  padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23626f91' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
}

.live-page input::-webkit-calendar-picker-indicator {
  opacity: .65;
  cursor: pointer;
}

.live-page .live-editor-actions {
  padding-top: 1px;
  justify-content: flex-start;
}

.live-page .live-admin-schedules {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.live-page .live-admin-list {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.live-page .live-admin-row {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 13px;
  border: 1px solid #e0e6f1;
  border-radius: 12px;
  background: #f9faff;
}

.live-page .live-admin-row-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 9px;
}

.live-page .live-admin-row-header strong {
  font-size: 12.5px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.live-page .live-admin-row-header .live-status {
  flex-shrink: 0;
  max-width: 50%;
}

.live-page .live-admin-row .live-meta {
  font-size: 11px;
}

.live-page .live-admin-row .live-actions {
  padding-top: 3px;
}

.live-page .live-admin-row .live-button {
  min-height: 33px;
  padding: 6px 8px;
  font-size: 10.5px;
  gap: 5px;
}

.live-page .live-admin-row .live-button .live-icon {
  width: 13px;
  height: 13px;
  flex-basis: 13px;
}

.live-page .live-dialog {
  position: fixed;
  inset: 0;
  width: min(430px,calc(100vw - 28px));
  max-width: calc(100vw - 28px);
  max-height: calc(100dvh - 36px);
  margin: auto;
  padding: 22px;
  border: 1px solid #d9e0ef;
  border-radius: 20px;
  color: var(--live-ink);
  background: var(--ui-surface);
  box-shadow: 0 24px 70px #17224e33;
}

.live-page .live-dialog::backdrop {
  background: #1b26596b;
  backdrop-filter: blur(3px);
}

.live-page .live-dialog form {
  display: grid;
  gap: 15px;
}

.live-page .live-dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.live-page .live-dialog-heading h2 {
  flex: 1;
  min-width: 0;
  margin: 0;
  font: 800 18px/1.35 var(--font-sans);
  letter-spacing: -.02em;
}

.live-page .live-close {
  display: grid;
  flex: 0 0 32px;
  place-items: center;
  width: 32px;
  max-width: none;
  height: 32px;
  min-height: 32px;
  padding: 0;
  margin: 0;
  border: 1px solid #e6e9f2;
  border-radius: 9px;
  color: #667294;
  background: #f7f8fc;
  cursor: pointer;
}

.live-page .live-close:hover {
  transform: none;
  background: #eef1fb;
}

.live-page .live-close .live-icon {
  width: 16px;
  height: 16px;
}

.live-page #liveDialogDescription {
  margin: 0;
  font: 400 13px/1.65 var(--font-sans);
  color: #5b6780;
}

.live-page .live-dialog .live-field {
  font-size: 12px;
}

.live-page .live-dialog input:not([type=radio]) {
  font-size: 14px;
}

.live-page .live-methods {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.live-page .live-methods>legend {
  margin-bottom: 8px;
  padding: 0;
  color: #526079;
  font: 650 12px/1.5 var(--font-sans);
}

.live-page .live-method-options {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 8px;
}

.live-page .live-method-options>label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 46px;
  padding: 10px 7px;
  border: 1px solid #dae1ef;
  border-radius: 10px;
  color: #5b6680;
  font: 650 12px/1.4 var(--font-sans);
  cursor: pointer;
}

.live-page .live-method-options>label:has(:checked) {
  color: #3f4b9a;
  border-color: #929fdb;
  background: #f1f3ff;
}

.live-page .live-method-options>label:has(:disabled) {
  opacity: .45;
  cursor: not-allowed;
}

.live-page input[type=radio] {
  width: 13px;
  height: 13px;
  margin: 0;
  accent-color: var(--live-primary);
}

.live-page .live-method-options .live-icon {
  width: 16px;
  height: 16px;
  flex-basis: 16px;
}

.live-page #liveCardUnavailable {
  margin-top: 8px;
}

.live-page .live-quote {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 14px;
  border: 1px solid #e3e8f5;
  border-radius: 12px;
  background: #f7f8fd;
  font: 500 12px/1.5 var(--font-sans);
}

.live-page .live-quote>div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.live-page .live-quote>div:last-child {
  padding-top: 10px;
  border-top: 1px solid #dde4f4;
  font-size: 14px;
  font-weight: 800;
  color: #303d74;
}

.live-page .live-quote :is(dt,dd) {
  font-family: inherit;
}

.live-page .live-quote dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.live-page .live-terms {
  margin: 0;
  font: 600 11px/1.5 var(--font-sans);
}

.live-page .live-terms a {
  color: #4a5aa5;
  text-underline-offset: 3px;
}

.live-page #liveChargeNote {
  margin: 0;
  font: 400 11px/1.6 var(--font-sans);
}

.live-page .live-dialog-actions {
  justify-content: flex-end;
  padding-top: 3px;
}

.live-page .live-error {
  margin: 0;
  color: #a43f51;
  font: 500 12px/1.6 var(--font-sans);
}

.live-page .live-error:empty {
  display: none;
}

.live-page .live-participants {
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: 45dvh;
  overflow: auto;
}

.live-page .live-participants li {
  padding: 11px 0;
  border-bottom: 1px solid #e5eaf4;
  overflow-wrap: anywhere;
  font: 650 13px/1.5 var(--font-sans);
}

.live-page .live-participants small {
  display: block;
  color: #64718a;
  margin-top: 4px;
  font-weight: 400;
}

/* Existing purchase notice and dashboard entry retain their original appearance. */

.live-bonus-offer {
  padding: 10px 13px;
  border: 1px solid #cfdaf5;
  border-radius: 11px;
  background: var(--ui-primary-soft);
  color: #334c95;
  font-size: .86rem;
  line-height: 1.55;
}

.live-bonus-offer[hidden] {
  display: none !important;
}

.dashboard-live-link {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #d9e1f8;
  border-radius: 13px;
  padding: 12px 15px;
  background: #f0f3ff;
  color: #344b98;
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
}

.dashboard-live-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.dashboard-live-link svg:last-child {
  margin-left: auto;
  width: 16px;
  height: 16px;
}

.dashboard-live-link[hidden] {
  display: none !important;
}

@media (max-width:1039px) {

  .live-page .live-admin-layout {
    grid-template-columns: minmax(0,1fr);
  }

}

@media (max-width:900px) {

  .live-page .live-workspace {
    grid-template-columns: minmax(0,1fr);
    grid-template-areas: 'wallet' 'classes' 'history' 'rules';
    gap: 14px;
  }

  .live-page .live-sidebar {
    display: contents;
  }

  .live-page .live-wallet {
    grid-area: wallet;
    grid-template-columns: minmax(0,1fr) auto;
    align-items: center;
    gap: 10px 16px;
    padding: 16px 18px;
  }

  .live-page .live-wallet-heading {
    justify-content: flex-start;
    gap: 8px;
  }

  .live-page .live-wallet-heading h2 {
    order: 2;
  }

  .live-page .live-wallet-icon {
    width: 30px;
    height: 30px;
    border-radius: 9px;
  }

  .live-page .live-balance {
    grid-column: 2;
    grid-row: 1;
  }

  .live-page .live-balance strong {
    font-size: 30px;
  }

  .live-page .live-wallet-hint {
    grid-column: 1/-1;
  }

  .live-page .live-wallet-actions {
    grid-column: 1/-1;
    display: flex;
    flex-wrap: wrap;
    padding: 0;
  }

  .live-page .live-wallet-actions .live-button {
    flex: 1;
    width: auto;
  }

  .live-page #liveHistoryPanel {
    grid-area: history;
  }

  .live-page .live-rules {
    grid-area: rules;
  }

  .live-page .live-card {
    grid-template-columns: 52px minmax(0,1fr);
  }

}

@media (max-width:600px) {

  .live-page .live-shell {
    padding: 10px 12px 28px;
  }

  .live-page .live-main {
    padding-top: 18px;
    gap: 14px;
  }

  .live-page .live-intro {
    align-items: flex-start;
    gap: 12px;
  }

  .live-main .live-lead {
    font-size: 13px;
  }

  .live-page .live-refresh {
    min-height: 35px;
    padding: 8px;
  }

  .live-page .live-refresh>span {
    display: none;
  }

  .live-page .live-intro-copy {
    gap: 6px;
  }

  .live-page .live-section {
    padding: 14px;
    gap: 12px;
    border-radius: 15px;
  }

  .live-page .live-section-heading {
    gap: 10px;
  }

  .live-page .live-section-heading h2 {
    font-size: 15px;
  }

  .live-page .live-filter {
    width: 100%;
    justify-content: space-between;
  }

  .live-page .live-filter select {
    width: 160px;
    font-size: 12px;
  }

  .live-page .live-button {
    min-height: 40px;
    font-size: 12px;
  }

  .live-page .live-card {
    padding: 12px;
    gap: 10px;
    grid-template-columns: 43px minmax(0,1fr);
  }

  .live-page .live-date {
    padding: 8px 3px;
    font-size: 9px;
    border-radius: 9px;
  }

  .live-page .live-date strong {
    font-size: 22px;
  }

  .live-page .live-card h3 {
    font-size: 14px;
  }

  .live-page .live-card-heading {
    gap: 5px;
  }

  .live-page .live-meta {
    font-size: 11px;
    gap: 5px 10px;
  }

  .live-page .live-card-footer {
    gap: 10px;
  }

  .live-page .live-card-terms {
    font-size: 10.5px;
  }

  .live-page .live-card .live-actions {
    margin-left: 0;
    width: 100%;
    justify-content: flex-end;
  }

  .live-page .live-card .live-actions .live-button {
    min-height: 38px;
  }

  .live-page .live-admin-content {
    padding: 13px;
  }

  .live-page .live-admin-grid {
    grid-template-columns: minmax(0,1fr);
    gap: 11px;
  }

  .live-page .live-form-group {
    padding: 11px;
  }

  .live-page .live-admin-grid>label {
    font-size: 12px;
  }

  .live-page input:not([type=radio]),
  .live-page select,
  .live-page textarea {
    min-height: 41px;
    font-size: 16px;
  }

  .live-page .live-admin-row .live-button {
    min-height: 38px;
    font-size: 11px;
  }

  .live-page .live-dialog {
    padding: 18px;
    border-radius: 17px;
  }

  .live-page .live-close {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .live-page .live-close .live-icon {
    width: 17px;
    height: 17px;
  }

  .live-page .live-dialog-actions .live-button {
    font-size: 12px;
  }

}

@media (prefers-reduced-motion:reduce) {

  .live-page :is(button,a,.live-chevron) {
    transition: none;
  }

}

.live-page .live-quote>div:last-child dt {
  font-size: 12px;
}

@media (max-width:380px) {

  .live-page .live-method-options>label {
    flex-wrap: nowrap;
  }

  .live-page .live-method-options .live-icon {
    display: none;
  }

}

/* Shared notification/admin UI. All selectors scoped; Arabic lesson rendering unchanged. */

.header-notification-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.header-notification-link svg {
  width: 21px;
  height: 21px;
}

.notification-count {
  position: absolute;
  top: -3px;
  right: -5px;
  border: 2px solid white;
  background: #e24d64;
  color: white;
  min-width: 18px;
  height: 18px;
  padding: 0 3px;
  border-radius: 20px;
  font-size: 10px;
  line-height: 14px;
  font-weight: 750;
  text-align: center;
}

.header-notification-link[hidden],
#profileAdministrationLink[hidden],
.notification-page [hidden],
.notification-banners [hidden] {
  display: none !important;
}

.notification-banners {
  display: grid;
  gap: 6px;
  margin: 0 0 12px;
}

.notification-banners:empty {
  display: none;
}

.notification-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid #cdd8f8;
  border-radius: 12px;
  background: #edf3ff;
  color: #253c72;
  font-size: 13px;
  line-height: 1.45;
  min-width: 0;
  flex-direction: row;
  justify-content: flex-start;
}

.notification-banner[data-category=promo] {
  background: #f8f1ff;
  border-color: #e8d8fb;
  color: #623596;
}

.notification-banner strong {
  font-weight: 700;
}

.notification-banner-preview {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
}

.notification-page {
  --notify-primary: var(--ui-primary);
  --notify-ink: var(--ui-ink);
  --notify-muted: var(--ui-muted);
  --notify-line: var(--ui-border);
  --notify-surface: var(--ui-surface);
  background: var(--ui-page-background);
  color: var(--notify-ink);
}

.notification-page .live-shell {
  max-width: 1160px;
}

.notify-main {
  padding: 0 0 24px;
}

.notify-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 12px 0 8px;
}

.notify-heading h1 {
  font-size: clamp(24px,3vw,30px);
  line-height: 1.2;
  margin: 0 0 6px;
  letter-spacing: -.6px;
}

.notify-heading p {
  font-size: 14px;
  color: var(--notify-muted);
  margin: 0;
  line-height: 1.6;
  font-family: var(--font-sans);
}

.notify-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: auto;
  min-height: 36px;
  padding: 8px 13px;
  border: 1px solid var(--notify-primary);
  border-radius: 10px;
  background: var(--notify-primary);
  color: var(--ui-surface);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  box-shadow: none;
  transition: background .15s,box-shadow .15s;
}

.notify-button:hover {
  background: var(--ui-primary-hover);
  color: var(--ui-surface);
}

.notify-secondary {
  background: var(--ui-surface);
  color: var(--ui-brand);
  border-color: var(--ui-control-border);
}

.notify-secondary:hover {
  background: #eef0ff;
  color: var(--ui-primary-hover);
}

.notify-button:disabled {
  opacity: .55;
  cursor: default;
}

.notify-button:focus-visible,
.notify-text-button:focus-visible,
.notify-tab:focus-visible {
  outline: 3px solid #a5b4fc;
  outline-offset: 3px;
}

.notify-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.notify-feedback {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.6;
  color: #3f4783;
}

.notify-feedback:empty {
  display: none;
}

.notify-feedback[data-error=true],
#adminReviewError,
#adminClassError {
  color: #b73653;
}

.notify-muted {
  color: var(--notify-muted);
  font-size: 12px;
  line-height: 1.6;
  font-family: var(--font-sans);
}

.notify-panel,
.notify-feed {
  min-width: 0;
  background: var(--ui-surface);
  border: 1px solid var(--notify-line);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--ui-shadow);
}

.notify-inbox-layout {
  display: grid;
  grid-template-columns: minmax(0,1fr) 300px;
  gap: 16px;
  align-items: start;
}

.notify-section-heading,
.notify-form-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.notify-section-heading h2,
.notify-panel h2,
.notify-form-heading h2 {
  font-size: 16px;
  line-height: 1.4;
  margin: 0;
}

.notify-panel-heading {
  margin-bottom: 8px;
}

.notify-list {
  display: grid;
  gap: 10px;
}

.notify-row,
.notify-campaign-row {
  position: relative;
  min-width: 0;
  border: 1px solid var(--notify-line);
  border-radius: 13px;
  padding: 13px 14px;
  background: var(--ui-surface);
  border-color: var(--ui-border);
}

.notify-row[data-read=false] {
  border-color: #b6bfe4;
  background: #f2f4ff;
}

.notify-row[data-read=false]:before {
  content: "";
  position: absolute;
  top: 19px;
  left: 0;
  width: 4px;
  height: 20px;
  border-radius: 0 4px 4px 0;
  background: #6366f1;
}

.notify-row h2,
.notify-campaign-row h3 {
  font-size: 15px;
  margin: 8px 0 5px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.notify-row p,
.notify-message-body {
  font-size: 14px;
  line-height: 1.7;
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: var(--font-sans);
}

.notify-row-top {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.notify-row-top time {
  font-size: 11px;
  color: var(--notify-muted);
}

.notify-tag {
  font-size: 10px;
  padding: 4px 7px;
  line-height: 1.3;
  background: #eef0fc;
  color: #4f4c9a;
  border-radius: 7px;
  font-weight: 650;
}

.notify-text-button {
  font: inherit;
  font-size: 12px;
  background: none;
  border: 0;
  padding: 5px 0;
  color: #5248b3;
  cursor: pointer;
}

.notify-highlight {
  outline: 2px solid #8b83e8;
  outline-offset: 2px;
}

.notify-empty {
  font-size: 14px;
  line-height: 1.7;
  color: var(--notify-muted);
  padding: 18px;
  background: #f8f9fd;
  border: 1px dashed #dce0f0;
  border-radius: 12px;
}

.notify-empty:empty {
  display: none;
}

.notify-check input[type=checkbox] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  margin: 2px 0 0;
  accent-color: #4f46c9;
}

.notify-panel>p {
  margin: 8px 0 12px;
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.6;
}

.notify-tabs {
  display: flex;
  gap: 6px;
  margin: 14px 0 16px;
  padding: 5px;
  background: #e9ecf8;
  border-radius: 12px;
  width: fit-content;
  max-width: 100%;
}

.notify-tab {
  width: auto;
  margin: 0;
  padding: 9px 18px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ui-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

.notify-tab[aria-pressed=true] {
  background: var(--ui-primary);
  color: var(--ui-surface);
  box-shadow: none;
}

.notify-admin-layout {
  display: grid;
  grid-template-columns: minmax(0,1.15fr) minmax(0,.85fr);
  gap: 16px;
  align-items: start;
}

.notify-form-group {
  padding: 0;
  margin: 18px 0;
  border: 0;
  border-top: 1px solid #eceefa;
  min-width: 0;
}

.notify-form-group>legend {
  padding: 0 9px 0 0;
  font-size: 12px;
  font-weight: 750;
  color: #585490;
  margin-bottom: 10px;
}

.notify-copy {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.notify-copy legend {
  font-size: 11px;
  font-weight: 650;
  color: #8b8fa8;
  margin: 6px 0;
}

.notification-page .notify-form-group label,
.notify-language label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #4a5273;
  margin-bottom: 11px;
}

.notification-page .notify-form-group .notify-check {
  display: flex;
}

.notification-page .notify-form-group input:not([type=checkbox]),
.notification-page .notify-form-group textarea,
.notification-page .notify-form-group select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  border: 1px solid #d9deee;
  border-radius: 9px;
  padding: 10px 11px;
  background: var(--ui-surface);
  color: #293154;
  font: inherit;
  font-size: 13px;
  line-height: 1.4;
  box-shadow: none;
  border-color: var(--ui-control-border);
}

.notify-form-group input:focus,
.notify-form-group textarea:focus,
.notify-form-group select:focus {
  outline: 2px solid #b2b6f4;
  outline-offset: 1px;
}

.notify-form-group input:disabled,
.notify-form-group select:disabled {
  opacity: .55;
}

.notify-form-group textarea {
  resize: vertical;
}

.notify-language {
  margin: 10px 0;
}

.notify-language summary {
  font-size: 12px;
  cursor: pointer;
  color: #5d6088;
  line-height: 1.6;
}

.notify-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 12px;
}

.notify-fields label {
  align-content: start;
}

.notify-campaigns .notify-section-heading {
  flex-wrap: wrap;
}

.notify-campaign-row>p {
  margin: 5px 0;
}

.notify-campaign-row .notify-button {
  font-size: 11px;
  min-height: 30px;
  padding: 7px 9px;
}

.notify-campaign-row .notify-actions {
  gap: 6px;
}

.notify-dialog {
  box-sizing: border-box;
  width: min(480px,calc(100% - 28px));
  max-height: calc(100dvh - 36px);
  overflow: auto;
  padding: 21px;
  border: 1px solid #e1e4f3;
  border-radius: 18px;
  box-shadow: 0 24px 80px #141b4938;
  color: #262d50;
  background: var(--ui-surface);
  font: inherit;
}

.notify-dialog::backdrop {
  background: #161e4859;
  backdrop-filter: blur(3px);
}

.notify-dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.notify-dialog-heading h2 {
  font-size: 18px;
  line-height: 1.4;
  margin: 0;
}

.notify-close {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #f2f4fb;
  color: #5f668b;
  font: inherit;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.notify-dialog>.notify-actions {
  justify-content: flex-end;
  margin-top: 18px;
}

.notify-dialog p {
  font-size: 13px;
  line-height: 1.65;
}

.notify-preview-count {
  padding: 10px 12px;
  border-radius: 10px;
  background: #f1f3ff;
  color: #454198;
  font-weight: 700;
}

.notify-dialog h3 {
  font-size: 16px;
  margin: 12px 0 6px;
}

.administration-page .live-admin {
  border: 0;
  background: transparent;
}

.administration-page .live-admin-content {
  padding: 0;
}

.administration-page .live-admin-layout {
  gap: 16px;
}

@media (max-width:960px) {

  .notify-admin-layout {
    grid-template-columns: 1fr;
  }

  .notify-inbox-layout {
    grid-template-columns: minmax(0,1fr) 260px;
  }

  .notification-page .live-admin-layout {
    grid-template-columns: 1fr;
  }

}

@media (max-width:680px) {

  .notify-inbox-layout {
    display: flex;
    flex-direction: column;
  }

  .notify-inbox-layout>section,
  .notify-inbox-layout>aside {
    width: 100%;
    box-sizing: border-box;
  }

  .notify-panel,
  .notify-feed {
    padding: 14px;
    border-radius: 15px;
  }

  .notify-heading {
    align-items: flex-start;
  }

  .notify-heading p {
    font-size: 13px;
  }

  .notify-heading>.notify-button {
    flex-shrink: 0;
  }

  .notify-section-heading {
    flex-wrap: wrap;
  }

  .notify-fields {
    grid-template-columns: 1fr;
  }

  .notification-page .notify-form-group input:not([type=checkbox]),
  .notification-page .notify-form-group textarea,
  .notification-page .notify-form-group select {
    font-size: 16px;
  }

  .notify-tabs {
    width: 100%;
    box-sizing: border-box;
  }

  .notify-tab {
    flex: 1;
    padding: 10px;
  }

  .notify-button {
    min-height: 38px;
  }

  .notification-banner {
    padding: 8px 10px;
    gap: 7px;
  }

  .notification-banner-preview {
    display: none;
  }

  .notification-banner strong {
    font-size: 12px;
  }

  .notify-dialog {
    padding: 17px;
  }

  .notify-row {
    padding: 12px;
  }

  .notify-row-top {
    gap: 5px;
  }

}

@media (max-width:420px) {

  .app-header.has-notifications .app-brand-mark {
    display: none;
  }

}

@media (max-width:360px) {

  .app-header.has-notifications #currentLanguageLabel {
    display: none;
  }

  .app-header.has-notifications {
    padding-left: 10px;
    padding-right: 10px;
  }

}

/* Reset legacy flex/button rules only for the new notification components. */

.notification-banner>div {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
  width: auto;
}

.notification-banner>a {
  font-weight: 700;
  color: inherit;
  text-decoration: underline;
  flex-shrink: 0;
  display: inline-flex;
  flex: 0 0 auto;
  width: auto;
  margin: 0;
  padding: 0;
}

.notification-banner-close {
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;
  width: 28px;
  max-width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  margin: 0;
  padding: 0;
  box-shadow: none;
  border-radius: 7px;
}

.notification-page .notify-check>span {
  min-width: 0;
  line-height: 1.55;
}

.notification-page .notify-button {
  flex: 0 0 auto;
  margin: 0;
}

.notification-page .notify-actions {
  justify-content: flex-start;
}

.notification-page .notify-text-button {
  flex: none;
  width: auto;
  min-height: 0;
  max-width: none;
  margin: 0;
  line-height: 1.5;
}

.notification-page .notify-dialog>.notify-actions {
  justify-content: flex-end;
}

.notification-page .notify-form-group select {
  appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23646c91' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.notification-page .notify-language>summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.notification-page .notify-language>summary::-webkit-details-marker {
  display: none;
}

.notification-page .notify-language>summary::before {
  content: '';
  width: 6px;
  height: 6px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: rotate(-45deg);
  transition: transform .15s;
}

.notification-page .notify-language[open]>summary::before {
  transform: rotate(45deg);
}

.administration-page .live-editor,
.administration-page .live-admin-schedules {
  padding: 18px;
  background: var(--ui-surface);
  border: 1px solid #e3e6f2;
  border-radius: 18px;
  min-width: 0;
}

.administration-page .live-admin-guide {
  margin-top: 0;
  font-size: 13px;
  line-height: 1.7;
  color: #656d8e;
}

@media (max-width:680px) {

  .administration-page .live-editor,
  .administration-page .live-admin-schedules {
    padding: 14px;
    border-radius: 15px;
  }

}

/* Notification management and contextual push reminders · 2026-10-29 */

.notification-page .notify-delete {
  color: #b4233e;
  border-color: #edd5dc;
  background: transparent;
}

.notification-page .notify-delete:hover {
  background: #fff1f3;
  border-color: #d895a4;
}

.notification-page .notify-danger {
  background: #b4233e;
  color: var(--ui-surface);
  border-color: #b4233e;
}

.notification-page .notify-danger:hover {
  background: #971d34;
}

.notify-confirm {
  margin: auto;
  width: min(440px,calc(100% - 28px));
}

.notify-confirm h2 {
  font-size: 19px;
  line-height: 1.4;
  margin: 0 0 10px;
}

.notify-confirm>p {
  margin: 0;
  color: var(--ui-muted);
  overflow-wrap: anywhere;
  font-family: var(--font-sans);
}

.notification-page .notify-editor-hint,
.notification-page .notify-replacement-notice {
  margin: 10px 0;
  padding: 10px 12px;
  border: 1px solid #d9defb;
  border-radius: 10px;
  background: #f2f4ff;
  color: #434397;
  font-size: 13px;
  line-height: 1.65;
}

.notification-page .notify-actions .notify-delete {
  margin-left: auto;
}

.push-prompt {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 34px minmax(0,1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid #bcc6e8;
  border-radius: 15px;
  background: var(--ui-primary-soft);
  color: #30375b;
  font: inherit;
  min-width: 0;
}

.push-prompt[hidden] {
  display: none;
}

.dashboard-learning-column>.push-prompt {
  margin: 10px 0;
}

.dashboard-app .dashboard-support-column > .push-prompt {
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: start;
  gap: 8px 10px;
  margin: 0;
  padding: 12px;
  border-radius: 14px;
  border-color: var(--ui-border);
  background: var(--ui-surface);
  color: var(--ui-ink);
}

.dashboard-app .dashboard-support-column .push-prompt-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #ede5dc;
  color: #76513f;
}

.dashboard-app .dashboard-support-column .push-prompt-copy > strong {
  font-size: var(--dashboard-section-size);
  color: var(--ui-ink);
  font-weight: 800;
  line-height: 1.4;
}

.dashboard-app .dashboard-support-column .push-prompt-copy > p {
  color: var(--ui-muted);
  font-size: var(--dashboard-body-size);
}

.dashboard-app .dashboard-support-column .push-prompt-actions {
  grid-column: 2;
  gap: 5px;
}

.dashboard-app .dashboard-support-column .push-prompt-button {
  border-color: #72513f;
  background: #72513f;
  color: #fff;
  font-size: var(--dashboard-control-size);
}

.dashboard-app .dashboard-support-column .push-prompt-button:hover {
  background: #5b3e2f;
}

.dashboard-app .dashboard-support-column .push-prompt-later {
  color: #67544a;
  font-size: var(--dashboard-control-size);
}

.dashboard-app .dashboard-support-column .push-prompt-later:hover {
  background: #eee8e0;
}

.push-prompt-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #e4e9ff;
  color: #4f46b5;
}

.push-prompt-icon::before {
  content: '';
  width: 20px;
  height: 20px;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8a6 6 0 0 0-12 0c0 7-3 7-3 9h18c0-2-3-2-3-9M10 21h4'/%3E%3C/svg%3E") center/contain no-repeat;
}

.push-prompt-copy {
  min-width: 0;
}

.push-prompt-copy>strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.push-prompt .push-prompt-copy>p {
  font-size: 12px;
  line-height: 1.65;
  margin: 4px 0 0;
  color: #626c8a;
  overflow-wrap: anywhere;
}

.push-prompt .push-prompt-copy>.push-prompt-feedback:empty {
  display: none;
}

.push-prompt .push-prompt-copy>.push-prompt-feedback {
  color: #b4233e;
}

.push-prompt-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  min-width: 0;
}

.push-prompt .push-prompt-button,
.push-prompt .push-prompt-later {
  box-sizing: border-box;
  flex: 0 1 auto;
  width: auto;
  min-width: 0;
  max-width: 100%;
  min-height: 36px;
  height: auto;
  margin: 0;
  border-radius: 9px;
  padding: 8px 11px;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
  white-space: normal;
  cursor: pointer;
  box-shadow: none;
}

.push-prompt .push-prompt-button {
  background: var(--ui-primary);
  color: var(--ui-surface);
  border: 1px solid var(--ui-primary);
}

.push-prompt .push-prompt-button:hover {
  background: var(--ui-primary-hover);
}

.push-prompt .push-prompt-button:disabled {
  opacity: .6;
  cursor: wait;
}

.push-prompt .push-prompt-later {
  border: 1px solid transparent;
  background: transparent;
  color: #5a6285;
}

.push-prompt .push-prompt-later:hover {
  background: #e7ebfb;
}

.push-prompt button:focus-visible {
  outline: 3px solid #a5b4fc;
  outline-offset: 2px;
}

.push-prompt[data-status=active] {
  grid-template-columns: 34px minmax(0,1fr);
  background: #f0faf7;
  border-color: #d5eae2;
}

.push-prompt[data-status=active] .push-prompt-icon {
  background: #dcf1e8;
  color: #267459;
}

.push-prompt[data-status=active] .push-prompt-actions:has(button:not([hidden])) {
  grid-column: 2;
}

.push-prompt-actions:has(button):not(:has(button:not([hidden]))) {
  display: none;
}

@media (max-width:760px) {

  .push-prompt {
    grid-template-columns: 32px minmax(0,1fr);
    align-items: start;
    padding: 12px;
    gap: 9px;
  }

  .push-prompt-actions {
    grid-column: 2;
  }

  .push-prompt .push-prompt-button,
  .push-prompt .push-prompt-later {
    min-height: 38px;
  }

  .notification-page .notify-actions .notify-delete {
    margin-left: 0;
  }

}

.push-prompt [hidden] {
  display: none !important;
}

.notification-page .notify-check {
  display: flex;
  gap: 9px;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 500;
  color: #434b70;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  height: auto;
  padding: 0;
  min-height: 32px;
  margin: 6px 0;
}

.notification-page .notify-check input[type=checkbox] {
  flex: 0 0 16px;
  min-height: 16px;
  height: 16px;
  max-height: 16px;
  padding: 0;
}

.notification-page .notify-text-button.notify-delete {
  min-height: 34px;
  padding: 5px 8px;
  border: 1px solid #edd5dc;
  border-radius: 8px;
}

/* Compact shared header and account navigation · 2026-10-30.
   Opted in by app-header.js on content pages; homepage/login keep their header. */

.app-header--compact .header-actions {
  gap: 2px;
}

.app-header--compact .header-actions > .header-icon-button,
.app-header--compact .profile-button,
.app-header--compact .dashboard-link {
  box-sizing: border-box;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #303d79;
  box-shadow: none;
  transition: background-color .15s, color .15s;
}

.app-header--compact .profile-button {
  width: 44px;
}

.app-header--compact .dashboard-link {
  gap: 7px;
}

.app-header--compact .header-actions > .header-icon-button:hover,
.app-header--compact .profile-button:hover,
.app-header--compact .profile-button[aria-expanded="true"],
.app-header--compact .dashboard-link:hover {
  background: #e9edf9;
  color: var(--ui-brand);
  transform: none;
}

.app-header--compact .header-actions > .header-icon-button svg,
.app-header--compact .profile-button svg,
.app-header--compact .dashboard-link svg {
  display: block;
  width: 21px;
  height: 21px;
  flex: none;
}

.app-header--compact .notification-count {
  top: 3px;
  right: 2px;
  pointer-events: none;
}

.app-header--compact .profile-dropdown {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: min(304px, calc(100vw - 24px));
  min-width: 0;
  padding: 8px;
  border: 1px solid #e0e5f0;
  border-radius: 18px;
  background: var(--ui-surface);
  box-shadow: var(--ui-shadow-raised);
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.app-header--compact .profile-dropdown.hidden {
  display: none;
}

.app-header--compact .profile-summary {
  padding: 9px 12px 12px;
  border-bottom-color: #edf0f7;
}

.app-header--compact .profile-package {
  padding: 5px 12px 8px;
}

.app-header--compact .profile-dropdown > .profile-subscription-link,
.app-header--compact .profile-dropdown > .profile-sessions-button,
.app-header--compact .profile-language-button,
.app-header--compact .profile-dropdown > #logoutButton {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 9px;
  flex: none;
  width: 100%;
  max-width: none;
  min-height: 44px;
  height: auto;
  margin: 0;
  padding: 10px 12px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #303d79;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
  text-decoration: none;
  white-space: normal;
  box-shadow: none;
  cursor: pointer;
}

.app-header--compact .profile-dropdown > .profile-subscription-link {
  justify-content: space-between;
}

.app-header--compact .profile-dropdown > .profile-subscription-link:hover,
.app-header--compact .profile-dropdown > .profile-sessions-button:hover,
.app-header--compact .profile-language-button:hover,
.app-header--compact .profile-language-button[aria-expanded="true"] {
  background: var(--ui-primary-soft);
  transform: none;
  color: var(--ui-brand);
}

.app-header--compact .profile-dropdown > #logoutButton {
  color: #aa3449;
}

.app-header--compact .profile-dropdown > #logoutButton:hover {
  background: #fff1f3;
  transform: none;
}

.app-header--compact .profile-menu-separator {
  flex: none;
  margin: 2px 10px;
  border-top-color: #edf0f7;
}

.app-header--compact .profile-language-menu {
  flex: none;
  width: 100%;
  min-width: 0;
}

.app-header--compact .profile-item-icon {
  flex: none;
  width: 19px;
  height: 19px;
}

.app-header--compact .profile-language-title {
  flex: 1;
  min-width: 0;
}

.app-header--compact .profile-language-current {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #66708d;
  font-size: 12px;
  font-weight: 500;
}

.app-header--compact .profile-language-current #currentLanguageLabel {
  display: inline;
}

.app-header--compact .profile-language-current .header-flag {
  width: 18px;
  height: 13px;
  flex-basis: 18px;
  border: 0;
}

.app-header--compact .profile-language-button .dropdown-arrow {
  flex: none;
  width: 6px;
  height: 6px;
  margin: -3px 1px 0 2px;
  border-width: 1.5px;
  color: #78829b;
}

.app-header--compact .profile-language-button[aria-expanded="true"] .dropdown-arrow {
  margin-top: 3px;
  transform: rotate(225deg);
}

.app-header--compact .profile-language-menu .header-dropdown {
  box-sizing: border-box;
  position: static;
  display: grid;
  gap: 2px;
  width: 100%;
  min-width: 0;
  margin: 4px 0 0;
  padding: 4px;
  border: 0;
  border-radius: 12px;
  background: #f6f7fc;
  box-shadow: none;
}

.app-header--compact .profile-language-menu .header-dropdown.hidden {
  display: none;
}

.app-header--compact .profile-language-menu .header-dropdown button {
  min-height: 44px;
  font-size: 13px;
}

.app-header--compact .profile-dropdown [hidden] {
  display: none !important;
}

@media (max-width: 420px) {

  .app-header--compact.has-notifications .app-brand-mark {
    display: block;
  }

  .app-header--compact .header-actions {
    gap: 1px;
  }

}

.notify-panel>p a {
  color: var(--ui-primary);
  text-underline-offset: 3px;
}

.header-notification-link .notification-count {
  background: var(--ui-danger);
}

.live-page .live-editor input,
.live-page .live-editor textarea,
.live-page .live-editor select {
  border-color: var(--ui-control-border);
  background: var(--ui-surface);
}

:where(button,a,input,select,textarea,summary):focus-visible {
  outline: 3px solid var(--ui-focus);
  outline-offset: 3px;
}

/* =========================================================
   TEACHER RECORDING STUDIO — scoped to its own page
   ========================================================= */

body.teacher-audio-page {
  margin: 0;
  background: var(--ui-page-background);
  color: var(--ui-ink);
  font-family: var(--font-sans);
}

.teacher-audio-page .ta-shell {
  width: min(1320px, calc(100% - 24px));
  max-width: 1320px;
  margin: 12px auto 28px;
  padding: 0;
  background: transparent;
}

.teacher-audio-page .ta-main {
  margin-top: 12px;
}

.teacher-audio-page .ta-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: linear-gradient(120deg, #eef0ff, #f1f8ff);
  border: 1px solid #cbd5ec;
  border-radius: 20px;
}

.teacher-audio-page .ta-heading h1 {
  margin: 3px 0 5px;
  color: var(--ui-brand);
  font-size: clamp(1.4rem, 2.2vw, 1.8rem);
  letter-spacing: -.035em;
}

.teacher-audio-page .ta-heading p {
  margin: 0;
  max-width: 740px;
  color: var(--ui-muted);
  font-size: .9rem;
  line-height: 1.55;
}

.teacher-audio-page .ta-eyebrow {
  color: var(--ui-primary);
  font-size: .73rem;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.teacher-audio-page .ta-feedback {
  min-height: 0;
  margin: 8px 2px;
  font-size: .91rem;
  line-height: 1.6;
  color: var(--ui-success);
}

.teacher-audio-page .ta-feedback:empty {
  margin: 8px 0;
}

.teacher-audio-page .ta-feedback[data-error="true"] {
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--ui-danger);
  background: var(--ui-danger-soft);
}

.teacher-audio-page .ta-toolbar {
  display: flex;
  align-items: end;
  gap: 10px;
  padding: 11px 12px;
  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  border-radius: 16px;
}

.teacher-audio-page .ta-toolbar label {
  display: grid;
  gap: 5px;
  min-width: 100px;
  margin: 0;
  font-size: .8rem;
  font-weight: 700;
}

.teacher-audio-page .ta-toolbar .ta-lesson-select {
  flex: 1;
  min-width: 0;
}

.teacher-audio-page select {
  min-height: 38px;
  width: 100%;
  min-width: 0;
  padding: 7px 32px 7px 10px;
  border: 1px solid var(--ui-control-border);
  border-radius: 10px;
  font: inherit;
  font-weight: 550;
  color: var(--ui-ink);
  background-color: #fff;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2353617b' stroke-width='2' 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;
}

.teacher-audio-page .ta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  width: auto;
  max-width: 100%;
  margin: 0;
  padding: 7px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--ui-primary);
  color: #fff;
  font-family: var(--font-sans);
  font-size: .83rem;
  font-weight: 650;
  line-height: 1.35;
  text-decoration: none;
  cursor: pointer;
  box-shadow: none;
  transform: none;
  transition: background-color .15s ease, border-color .15s ease;
}

.teacher-audio-page .ta-button:hover:not(:disabled) {
  background: var(--ui-primary-hover);
}

.teacher-audio-page .ta-secondary {
  background: #fff;
  border-color: var(--ui-control-border);
  color: var(--ui-brand);
}

.teacher-audio-page .ta-secondary:hover:not(:disabled) {
  background: var(--ui-primary-soft);
}

.teacher-audio-page .ta-button:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.teacher-audio-page .ta-icon {
  display: inline-flex;
  align-items: center;
  flex: 0 0 17px;
  width: 17px;
  height: 19px;
}

.teacher-audio-page .ta-icon svg {
  width: 100%;
  height: 100%;
}

.teacher-audio-page .ta-lesson-nav {
  display: flex;
  gap: 7px;
  flex: 0 0 auto;
}

.teacher-audio-page .ta-lesson-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin: 14px 2px 8px;
}

.teacher-audio-page .ta-lesson-heading h2 {
  margin: 0 0 5px;
  font-size: 1.1rem;
  line-height: 1.5;
}

.teacher-audio-page .ta-lesson-heading p {
  margin: 0;
  color: var(--ui-muted);
  line-height: 1.65;
  font-size: .9rem;
}

.teacher-audio-page .ta-count {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 8px;
  background: #e8edfb;
  color: var(--ui-brand);
  font-size: .75rem;
  font-weight: 650;
}

.teacher-audio-page .ta-options {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 14px;
  margin: 8px 2px 4px;
}

.teacher-audio-page .ta-options > label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  margin: 0;
  font-size: .83rem;
  color: var(--ui-muted);
}

.teacher-audio-page .ta-options input[type="checkbox"] {
  accent-color: var(--ui-primary);
  width: 17px;
  height: 17px;
}

.teacher-audio-page .ta-search {
  justify-content: end;
}

.teacher-audio-page .ta-search > span {
  white-space: nowrap;
}

.teacher-audio-page .ta-search input {
  width: min(240px, 100%);
  min-width: 0;
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--ui-control-border);
  border-radius: 9px;
  background: #fff;
  font-family: var(--font-sans);
  font-size: .83rem;
  color: var(--ui-ink);
}

.teacher-audio-page .ta-listen-hint {
  margin: 6px 2px 9px;
  color: var(--ui-muted);
  font-size: .8rem;
  line-height: 1.6;
}

.teacher-audio-page .ta-exercises {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 10px;
}

.teacher-audio-page .ta-exercise {
  min-width: 0;
  padding: 11px 13px 9px;
  border: 1px solid var(--ui-border);
  border-radius: 16px;
  background: var(--ui-surface);
  box-shadow: var(--ui-shadow);
}

.teacher-audio-page .ta-exercise.ta-wide {
  grid-column: 1 / -1;
}

.teacher-audio-page .ta-exercise-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 10px;
}

.teacher-audio-page .ta-exercise-heading > div {
  min-width: 0;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 5px 9px;
}

.teacher-audio-page .ta-exercise-heading strong {
  font-size: .8rem;
  letter-spacing: .025em;
  color: var(--ui-brand);
}

.teacher-audio-page .ta-file-name {
  font-size: .71rem;
  color: var(--ui-faint);
  overflow-wrap: anywhere;
}

.teacher-audio-page .ta-status {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 4px 7px;
  border-radius: 6px;
  background: #eef1f6;
  color: var(--ui-muted);
  font-size: .68rem;
  font-weight: 650;
  line-height: 1.4;
}

.teacher-audio-page .ta-status[data-state="active"] {
  background: var(--ui-success-soft);
  color: var(--ui-success);
}

.teacher-audio-page .ta-status[data-state="missing"] {
  background: #fff1d6;
  color: #744500;
}

.teacher-audio-page .ta-instruction {
  margin: 7px 0 2px;
  color: var(--ui-muted);
  font-size: .84rem;
  line-height: 1.65;
}

.teacher-audio-page .ta-main-arabic {
  display: block;
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  padding: 3px 12px 12px;
  margin: 5px 0 0;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--ui-ink);
  font-family: var(--font-arabic);
  font-size: clamp(2.5rem, 4.3vw, 3.25rem);
  font-weight: 400;
  line-height: 2.15;
  text-align: center;
  white-space: pre-wrap;
  word-break: normal;
  overflow-wrap: break-word;
  cursor: default;
}

.teacher-audio-page button.ta-main-arabic {
  cursor: pointer;
  transform: none;
  transition: background-color .15s ease, border-color .15s ease;
}

.teacher-audio-page button.ta-main-arabic:hover:not(:disabled) {
  background: #f3f5ff;
  border-color: #d9dff5;
}

.teacher-audio-page .ta-main-arabic > .ta-icon {
  position: absolute;
  left: 3px;
  bottom: 8px;
  color: var(--ui-muted);
}

.teacher-audio-page .ta-transliteration {
  font-family: var(--font-sans);
  text-align: center;
  color: var(--ui-muted);
  font-size: .9rem;
  line-height: 1.7;
  margin: 3px 0 9px;
  overflow-wrap: anywhere;
}

.teacher-audio-page .arabic-inline {
  font-family: var(--font-arabic);
  font-size: 1.55em;
  font-weight: 400;
  line-height: 1.8;
  unicode-bidi: isolate;
}

.teacher-audio-page .ta-shared-count {
  margin: 3px 0 6px;
  color: var(--ui-primary);
  font-size: .74rem;
}

.teacher-audio-page .ta-exercise-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: 3px;
  margin-top: 4px;
}

.teacher-audio-page .ta-record-button {
  width: 160px;
  max-width: 100%;
  height: 40px;
  min-height: 40px;
  white-space: nowrap;
  justify-self: center;
}

.teacher-audio-page .ta-recording-status {
  width: 100%;
  min-height: 20px;
  margin: 0;
  color: var(--ui-muted);
  font-size: .75rem;
  line-height: 20px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.teacher-audio-page .ta-recording-status[data-state="recording"] {
  color: var(--ui-danger);
}

.teacher-audio-page .ta-recording-status:empty {
  visibility: hidden;
}

.teacher-audio-page .ta-candidate {
  display: grid;
  gap: 7px;
  margin-top: 7px;
  padding: 9px 10px;
  background: #f1f4ff;
  border: 1px solid #cbd6f4;
  border-radius: 12px;
}

.teacher-audio-page .ta-candidate > strong {
  font-size: .78rem;
  color: var(--ui-brand);
}

.teacher-audio-page .ta-candidate > .ta-button {
  justify-self: start;
}

.teacher-audio-page .ta-player {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 2px 0;
}

.teacher-audio-page .ta-player-toggle {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 5px 8px;
  font-size: .76rem;
}

.teacher-audio-page .ta-player-time {
  flex: 0 0 auto;
  font-family: var(--font-sans);
  font-size: .7rem;
  color: var(--ui-muted);
  font-variant-numeric: tabular-nums;
}

.teacher-audio-page .ta-player input {
  min-width: 30px;
  width: 100%;
  flex: 1 1 0;
  accent-color: var(--ui-primary);
}

.teacher-audio-page .ta-history {
  margin-top: 7px;
  border-top: 1px solid #e2e7f0;
}

.teacher-audio-page .ta-history > summary {
  padding: 8px 0 1px;
  cursor: pointer;
  color: var(--ui-muted);
  font-size: .77rem;
  font-weight: 650;
}

.teacher-audio-page .ta-history-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.teacher-audio-page .ta-version {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  padding: 8px 0;
  border-top: 1px solid #e7ebf2;
}

.teacher-audio-page .ta-version > div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.teacher-audio-page .ta-version strong {
  font-size: .8rem;
}

.teacher-audio-page .ta-version small {
  color: var(--ui-faint);
  font-size: .71rem;
  line-height: 1.5;
}

.teacher-audio-page .ta-version > .ta-status {
  align-self: start;
}

.teacher-audio-page .ta-version-actions {
  display: flex;
  gap: 6px;
  grid-column: 1 / -1;
}

.teacher-audio-page .ta-history-player {
  grid-column: 1 / -1;
  min-width: 0;
}

.teacher-audio-page .ta-muted {
  color: var(--ui-muted);
  font-size: .77rem;
  line-height: 1.65;
}

.teacher-audio-page .ta-empty {
  grid-column: 1 / -1;
  padding: 24px;
  border: 1px dashed var(--ui-control-border);
  border-radius: 14px;
  text-align: center;
  color: var(--ui-muted);
  background: #ffffffa8;
}

.teacher-audio-page .ta-dialog {
  box-sizing: border-box;
  width: min(540px, calc(100vw - 32px));
  max-height: min(80vh, 720px);
  padding: 20px;
  border: 1px solid var(--ui-border);
  border-radius: 20px;
  background: #fff;
  color: var(--ui-ink);
  font-family: var(--font-sans);
  box-shadow: 0 24px 80px #18244830;
}

.teacher-audio-page .ta-dialog::backdrop {
  background: #17233f77;
  backdrop-filter: blur(3px);
}

.teacher-audio-page .ta-dialog h2 {
  margin: 0 0 10px;
  color: var(--ui-brand);
  font-size: 1.2rem;
}

.teacher-audio-page .ta-dialog > p {
  font-size: .9rem;
  line-height: 1.7;
  color: var(--ui-muted);
}

.teacher-audio-page .ta-dialog ul {
  max-height: 35vh;
  overflow-y: auto;
  padding-left: 20px;
  font-size: .8rem;
}

.teacher-audio-page .ta-dialog li {
  padding: 7px 0;
}

.teacher-audio-page .ta-use-arabic {
  padding: 5px 2px;
  font-family: var(--font-arabic);
  font-size: 1.8rem;
  line-height: 1.9;
}

.teacher-audio-page .ta-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 8px;
  margin-top: 14px;
}

.teacher-audio-page :is(button,a,select,input,summary):focus-visible {
  outline: 3px solid #8e9ded;
  outline-offset: 3px;
}

.administration-page .ta-admin-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  white-space: nowrap;
}

@media (max-width: 760px) {

  .teacher-audio-page .ta-shell {
    width: calc(100% - 20px);
    margin-top: 10px;
  }

  .teacher-audio-page .ta-heading {
    align-items: start;
    padding: 12px 14px;
    border-radius: 16px;
  }

  .teacher-audio-page .ta-heading > a {
    display: none;
  }

  .teacher-audio-page .ta-toolbar {
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr);
    gap: 9px;
    padding: 10px;
  }

  .teacher-audio-page .ta-toolbar label {
    min-width: 0;
  }

  .teacher-audio-page .ta-toolbar .ta-lesson-select {
    min-width: 0;
  }

  .teacher-audio-page .ta-lesson-nav {
    grid-column: 1 / -1;
    justify-self: end;
  }

  .teacher-audio-page .ta-lesson-heading {
    flex-direction: column;
    gap: 6px;
    margin-top: 12px;
  }

  .teacher-audio-page .ta-options {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .teacher-audio-page .ta-options > label:first-child {
    grid-column: 1 / -1;
  }

  .teacher-audio-page .ta-search {
    justify-content: end;
  }

  .teacher-audio-page .ta-search > span {
    display: none;
  }

  .teacher-audio-page .ta-search input {
    width: 100%;
  }

  .teacher-audio-page .ta-exercises {
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
  }

  .teacher-audio-page .ta-exercise {
    padding: 10px 11px 8px;
    border-radius: 14px;
  }

  .teacher-audio-page .ta-player {
    gap: 6px;
  }

  .teacher-audio-page .ta-dialog {
    padding: 17px;
  }

}

/* Multi-tab update banner — isolated from page layouts. */

.iqro7-update.iqro7-update--multi {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 12px;
  position: fixed;
  top: auto;
  z-index: 10000;
  right: 14px;
  bottom: 14px;
  left: auto;
  width: min(460px, calc(100vw - 28px));
  max-width: none;
  margin: 0;
  padding: 13px 14px;
  border: 1px solid var(--ui-control-border, #8190a6);
  border-radius: 14px;
  background: #fff;
  color: var(--ui-ink, #1c2942);
  box-shadow: 0 8px 32px #18244826;
  font-family: var(--font-sans, sans-serif);
}

.iqro7-update.iqro7-update--multi > span {
  min-width: 0;
  font-size: .86rem;
  font-weight: 650;
  line-height: 1.5;
}

.iqro7-update.iqro7-update--multi .pwa-update-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: auto;
  max-width: 100%;
  min-height: 36px;
  margin: 0;
  padding: 7px 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: var(--ui-primary, #4338ca);
  color: #fff;
  font: 650 .8rem/1.4 var(--font-sans, sans-serif);
  box-shadow: none;
  transform: none;
}

.iqro7-update.iqro7-update--multi .pwa-update-action:disabled {
  opacity: .55;
  cursor: wait;
}

.iqro7-update.iqro7-update--multi small {
  grid-column: 1 / -1;
  font-size: .76rem;
  line-height: 1.6;
  color: var(--ui-muted, #53617b);
}

.iqro7-update.iqro7-update--multi small:empty {
  display: none;
}

.iqro7-update.iqro7-update--multi .pwa-update-blocked {
  grid-column: 1 / -1;
  max-height: 180px;
  overflow-y: auto;
  margin: 0;
  padding: 0 0 0 18px;
  font-size: .76rem;
  line-height: 1.65;
  color: var(--ui-ink, #1c2942);
}

.iqro7-update.iqro7-update--multi .pwa-update-blocked li {
  margin: 3px 0;
  overflow-wrap: anywhere;
}

.iqro7-update.iqro7-update--multi .pwa-update-force {
  grid-column: 1 / -1;
  justify-self: end;
  color: var(--ui-danger, #b42345);
  background: #fff;
  border-color: var(--ui-border, #d0d9e8);
}

.iqro7-update.iqro7-update--multi .pwa-update-action:focus-visible {
  outline: 3px solid #8e9ded;
  outline-offset: 2px;
}

/* Curriculum editor — page-scoped workspace. */

.ce-page {
  color: var(--ui-ink, #23314d);
  background: radial-gradient(ellipse at 0 0, #e5e8ff 0, transparent 48%), #f2f5fa;
  font-family: var(--font-sans, sans-serif);
}

.ce-page .ce-shell {
  width: min(1460px, calc(100% - 40px));
  max-width: 1460px;
  margin: 18px auto;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.ce-page .ce-main {
  padding: 20px 0 36px;
}

.ce-page .ce-page-heading {
  margin-bottom: 18px;
}

.ce-page .ce-back {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #53617b;
  text-decoration: none;
  font-size: .8rem;
  line-height: 1.5;
}

.ce-page .ce-back svg {
  width: 15px;
  height: 15px;
}

.ce-page .ce-main h1 {
  margin: 6px 0;
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
  line-height: 1.25;
  letter-spacing: -.035em;
}

.ce-page .ce-page-heading p {
  margin: 0;
  color: #586780;
  font-size: .88rem;
  line-height: 1.6;
}

.ce-page .ce-main h2,
.ce-page .ce-dialog h2 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.45;
  letter-spacing: -.02em;
}

.ce-page .ce-main h3 {
  margin: 0 0 12px;
  font-size: .93rem;
  line-height: 1.5;
}

.ce-page .ce-status {
  margin: 0 0 12px;
  padding: 9px 12px;
  border: 1px solid #d9e2ee;
  border-radius: 9px;
  background: #fff;
  color: #3c5273;
  font-size: .82rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.ce-page .ce-status:empty {
  display: none;
}

.ce-page .ce-status[data-error=true] {
  border-color: #edbfcb;
  background: #fff5f7;
  color: #a02244;
}

.ce-page .ce-workspace {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.ce-page [hidden] {
  display: none !important;
}

.ce-page .ce-sidebar,
.ce-page .ce-editor {
  min-width: 0;
  border: 1px solid #d9e0ec;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 3px 12px #23345a06;
}

.ce-page .ce-sidebar {
  position: sticky;
  top: 14px;
}

.ce-page .ce-catalog-body {
  padding: 16px 12px 12px;
}

.ce-page .ce-catalog > summary {
  display: none;
}

.ce-page .ce-catalog-selectors {
  padding: 0 3px 12px;
  border-bottom: 1px solid #e8ecf3;
}

.ce-page .ce-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 12px 3px 9px;
}

.ce-page .ce-list-heading h2 {
  font-size: .84rem;
  font-weight: 700;
}

.ce-page .ce-lesson-list {
  display: grid;
  gap: 4px;
  max-height: calc(100dvh - 300px);
  overflow-y: auto;
  scrollbar-width: thin;
}

.ce-page .ce-lesson {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 11px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #2e3c57;
  text-align: start;
  font: inherit;
  box-shadow: none;
  white-space: normal;
  cursor: pointer;
}

.ce-page .ce-lesson:hover {
  background: #f5f6fb;
}

.ce-page .ce-lesson.ce-selected {
  border-color: #c6c4f4;
  background: #f0efff;
  color: #312783;
}

.ce-page .ce-lesson-number {
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  min-height: 28px;
  border-radius: 7px;
  background: #eef1f6;
  color: #53617b;
  font-size: .76rem;
  font-weight: 750;
}

.ce-page .ce-selected .ce-lesson-number {
  color: #4338ca;
  background: #e2dfff;
}

.ce-page .ce-lesson-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.ce-page .ce-lesson-copy strong {
  display: block;
  font-size: .83rem;
  font-weight: 650;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.ce-page .ce-lesson-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  color: #60708a;
  font-size: .71rem;
  font-weight: 500;
  line-height: 1.4;
}

.ce-page .ce-lesson-state {
  padding: 2px 5px;
  border-radius: 4px;
  color: #58657a;
  background: #edf0f5;
}

.ce-page .ce-lesson-state[data-active=true] {
  color: #246346;
  background: #e6f3eb;
}

.ce-page .ce-editor {
  padding: 0;
}

.ce-page .ce-editor-heading {
  position: sticky;
  top: 12px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e9f1;
  border-radius: 15px 15px 0 0;
  background: #fff;
}

.ce-page .ce-editor-identity {
  min-width: 0;
  flex: 1 1 180px;
}

.ce-page .ce-eyebrow {
  display: block;
  margin-bottom: 3px;
  font-size: .72rem;
  font-weight: 650;
  color: #617089;
}

.ce-page #ceLessonName {
  overflow-wrap: anywhere;
}

.ce-page .ce-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 5px;
  padding: 0;
  font-size: .73rem;
  font-weight: 550;
  line-height: 1.5;
  color: #60708a;
}

.ce-page #ceDirty::before {
  content: '✓';
  font-weight: 750;
  color: #267348;
}

.ce-page .ce-state[data-state=dirty] {
  color: #8a5a0f;
}

.ce-page .ce-state[data-state=dirty]::before {
  content: '•';
  color: #ac721a;
}

.ce-page .ce-state[data-state=saving]::before {
  content: '…';
  color: #4338ca;
}

.ce-page .ce-actions,
.ce-page .ce-order-buttons {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.ce-page .ce-save-actions {
  flex: 0 0 auto;
}

.ce-page .ce-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.ce-page :is(.ce-symbol, .ce-button, .ce-icon-button) svg {
  display: block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.ce-page .ce-button,
.ce-page .ce-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: auto;
  max-width: 100%;
  min-height: 36px;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #4338ca;
  color: #fff;
  box-shadow: none;
  transform: none;
  font: 650 .8rem/1.4 var(--font-sans, sans-serif);
  text-decoration: none;
  cursor: pointer;
}

.ce-page .ce-button:hover {
  background: #382eb5;
}

.ce-page .ce-button.ce-secondary {
  background: #f4f5fb;
  border-color: #d5ddeb;
  color: #35456b;
}

.ce-page .ce-button.ce-secondary:hover {
  background: #ebedf8;
}

.ce-page .ce-button.ce-quiet {
  background: transparent;
  color: #53617b;
}

.ce-page .ce-button.ce-quiet:hover {
  background: #f0f2f8;
}

.ce-page .ce-icon-button {
  flex: 0 0 34px;
  width: 34px;
  min-height: 34px;
  padding: 7px;
  border-color: #dae1ed;
  background: #fff;
  color: #53617b;
}

.ce-page .ce-icon-button:hover {
  background: #f1f3fa;
  color: #4338ca;
}

.ce-page button:disabled,
.ce-page [aria-disabled=true] {
  background: #eef1f6;
  border-color: #e2e6ef;
  color: #69758a;
  opacity: 1;
  cursor: default;
}

.ce-page :is(button, a, input, textarea, select, summary):focus-visible {
  outline: 3px solid #a5a5fc;
  outline-offset: 2px;
}

.ce-page .ce-editor-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid #e6eaf2;
  background: #fcfcff;
}

.ce-page .ce-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.ce-page .ce-tabs button {
  width: auto;
  min-height: 36px;
  margin: 0;
  padding: 8px 11px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #5b6881;
  box-shadow: none;
  font: 650 .81rem/1.4 var(--font-sans,sans-serif);
  white-space: nowrap;
  cursor: pointer;
}

.ce-page .ce-tabs button:hover {
  background: #f0f1fa;
}

.ce-page .ce-tabs [aria-pressed=true] {
  background: #eceafd;
  color: #3c31b3;
  border-color: #dedbf8;
}

.ce-page .ce-language {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  font-size: .73rem;
  color: #5d6b83;
}

.ce-page .ce-language label {
  white-space: nowrap;
}

.ce-page .ce-field :where(input:not([type=checkbox]):not([type=radio]), textarea),
.ce-page select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 9px 11px;
  border: 1px solid #9ca9bf;
  border-radius: 8px;
  color: #25324b;
  background-color: #fff;
  font: 400 .92rem/1.55 var(--font-sans,sans-serif);
}

.ce-page select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%235c6b85' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-size: 16px;
  background-position: right 10px center;
  background-repeat: no-repeat;
  padding-right: 33px;
  text-overflow: ellipsis;
}

.ce-page .ce-language select {
  flex: 0 0 172px;
  width: 172px;
  max-width: 172px;
  padding-left: 32px;
  background-image: var(--ce-language-flag),url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%235c6b85' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-size: 16px 12px,16px;
  background-position: 10px center,right 10px center;
}

.ce-page #cePanel {
  min-height: 240px;
  padding: 18px 20px 22px;
}

.ce-page .ce-field {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  margin: 0 0 14px;
  color: #40506c;
  font-size: .79rem;
  font-weight: 650;
  line-height: 1.45;
}

.ce-page .ce-field > span {
  display: block;
}

.ce-page .ce-field small {
  font-size: .74rem;
  line-height: 1.6;
  font-weight: 400;
  color: #64728b;
}

.ce-page .ce-field textarea {
  resize: vertical;
  min-height: 72px;
}

.ce-page .ce-field input:disabled,
.ce-page .ce-field select:disabled {
  background-color: #f3f5f9;
  color: #65738b;
  border-color: #d5ddea;
}

.ce-page .ce-field textarea.ce-arabic-input {
  font-family: var(--font-arabic,'LPMQ IsepMisbah',serif);
  font-size: 2rem;
  line-height: 2;
  min-height: 112px;
  padding: 10px 14px;
  text-align: center;
}

.ce-page .ce-script-grid {
  display: grid;
  grid-template-columns: minmax(0,1.5fr) minmax(0,1fr);
  gap: 16px;
}

.ce-page .ce-script-grid .ce-field textarea {
  min-height: 112px;
}

.ce-page .ce-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 16px;
}

.ce-page .ce-form-section {
  margin: 4px 0 18px;
  padding: 0;
}

.ce-page .ce-form-section + .ce-form-section {
  border-top: 1px solid #e8ecf3;
  padding-top: 18px;
}

.ce-page .ce-section-heading {
  color: #344362;
}

.ce-page .ce-form-section[data-section=ce_visibility] {
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  align-items: start;
  gap: 5px 22px;
  padding: 13px 14px;
  border: 1px solid #e0e5ef;
  border-radius: 10px;
  background: #f7f9fc;
}

.ce-page .ce-form-section[data-section=ce_visibility] h3 {
  grid-column: 1/-1;
  margin-bottom: 5px;
  font-size: .83rem;
}

.ce-page .ce-form-section[data-section=ce_visibility] .ce-toggle {
  margin: 0;
}

.ce-page .ce-form-section[data-section=ce_visibility] .ce-note {
  margin: 0;
}

.ce-page .ce-note {
  margin: 0 0 12px;
  color: #617089;
  font-size: .79rem;
  line-height: 1.65;
}

.ce-page .ce-toggle input[type=checkbox] {
  position: relative;
  appearance: none;
  width: 30px;
  height: 18px;
  flex: 0 0 30px;
  margin: 0;
  padding: 0;
  border: 1px solid #9ba8bd;
  border-radius: 10px;
  background: #e2e7ef;
  cursor: pointer;
}

.ce-page .ce-toggle input[type=checkbox]::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px #27365630;
}

.ce-page .ce-toggle input[type=checkbox]:checked {
  background: #5144cf;
  border-color: #5144cf;
}

.ce-page .ce-toggle input[type=checkbox]:checked::after {
  transform: translateX(12px);
}

.ce-page .ce-toggle input[type=radio] {
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  accent-color: #4338ca;
}

.ce-page .ce-subtoolbar {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin: 0 0 18px;
  padding: 0 0 16px;
  border-bottom: 1px solid #e7ebf2;
}

.ce-page .ce-subtoolbar .ce-selector {
  flex: 1 1 0;
  margin: 0;
}

.ce-page .ce-subtoolbar > .ce-button {
  min-height: 40px;
  flex: 0 0 auto;
}

.ce-page .ce-item-heading {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin: 0 0 14px;
}

.ce-page .ce-item-heading h3 {
  margin: 0;
  padding: 4px 7px;
  border-radius: 6px;
  background: #eceafd;
  color: #4c3eb0;
  font-size: .81rem;
  letter-spacing: .02em;
}

.ce-page .ce-item-heading > .ce-toggle {
  margin: 0;
}

.ce-page .ce-order-buttons {
  margin-left: auto;
  gap: 4px;
}

.ce-page .ce-order-buttons .ce-icon-button {
  width: 30px;
  min-height: 30px;
  flex-basis: 30px;
}

.ce-page .ce-details {
  margin: 12px 0;
  padding: 11px 13px;
  border: 1px solid #dce3ef;
  border-radius: 10px;
  background: #fff;
}

.ce-page .ce-details > summary,
.ce-page .ce-catalog > summary {
  list-style: none;
  cursor: pointer;
  font-size: .8rem;
  font-weight: 650;
  color: #4a5975;
  line-height: 1.6;
}

.ce-page summary::-webkit-details-marker {
  display: none;
}

.ce-page .ce-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ce-page .ce-details > summary::after,
.ce-page .ce-catalog > summary::after {
  content: '';
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  border-right: 1.7px solid #697995;
  border-bottom: 1.7px solid #697995;
  transform: rotate(-45deg);
  margin-right: 3px;
}

.ce-page .ce-details[open] > summary::after,
.ce-page .ce-catalog[open] > summary::after {
  transform: rotate(45deg);
}

.ce-page .ce-details[open] > summary {
  margin-bottom: 14px;
}

.ce-page .ce-details > .ce-group:last-child {
  margin-bottom: 0;
}

.ce-page .ce-group {
  margin: 14px 0;
  padding: 13px 14px;
  border: 1px solid #e3e8f1;
  border-radius: 10px;
  background: #f8fafd;
}

.ce-page .ce-group .ce-actions > .ce-field {
  flex: 1 1 auto;
  margin: 0;
}

.ce-page .ce-translation {
  min-width: 0;
}

.ce-page .ce-translation-tools {
  display: inline-block;
  margin: -5px 0 8px;
  padding: 0;
  border: 0;
  background: transparent;
}

.ce-page .ce-translation-tools > summary {
  gap: 8px;
  color: #67758c;
  font-size: .72rem;
  font-weight: 500;
}

.ce-page .ce-translation-tools[open] > summary {
  margin-bottom: 5px;
}

.ce-page .ce-button.ce-text-action {
  min-height: 28px;
  padding: 3px 0;
  border: 0;
  background: transparent;
  color: #9b344b;
  font-size: .74rem;
}

.ce-page .ce-audio {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 10px 14px;
  margin: 16px 0;
  padding: 13px 14px;
  border: 1px solid #ccd9ed;
  border-radius: 11px;
  background: #f3f7fe;
}

.ce-page .ce-audio-title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 5px;
  color: #354972;
  font-size: .82rem;
}

.ce-page .ce-audio-title svg {
  width: 15px;
  height: 15px;
}

.ce-page code {
  font-size: .73rem;
  color: #596a84;
  overflow-wrap: anywhere;
  white-space: normal;
}

.ce-page .ce-audio .ce-details {
  grid-column: 1/-1;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.ce-page .ce-audio .ce-details > summary {
  font-size: .73rem;
  font-weight: 550;
  color: #64768f;
}

.ce-page .ce-audio .ce-details .ce-field {
  margin: 0;
}

.ce-page .ce-audio audio {
  grid-column: 1/-1;
  width: 100%;
  max-width: 100%;
  height: 36px;
  margin: 0;
}

.ce-page .ce-quiz-config {
  padding: 13px 14px 11px;
  margin-bottom: 18px;
  border: 1px solid #d9d4ef;
  border-radius: 11px;
  background: #f7f5ff;
}

.ce-page .ce-quiz-settings {
  grid-template-columns: minmax(0,1fr) minmax(140px,200px);
  align-items: center;
}

.ce-page .ce-quiz-settings .ce-toggle {
  margin: 0;
}

.ce-page .ce-quiz-settings .ce-field {
  margin-bottom: 9px;
}

.ce-page .ce-quiz-config .ce-note {
  margin: 0;
}

.ce-page .ce-quiz-toolbar .ce-selector:nth-child(2) {
  flex: 0 1 180px;
}

.ce-page .ce-question-heading {
  display: flex;
  align-items: center;
  gap: 18px;
}

.ce-page .ce-question-heading > .ce-field {
  flex: 0 1 240px;
}

.ce-page .ce-question-heading > .ce-toggle {
  margin: 10px 0 0;
}

.ce-page .ce-question-content {
  grid-template-columns: repeat(2,minmax(0,1fr));
}

.ce-page .ce-options-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 12px;
  margin: 10px 0 14px;
}

.ce-page .ce-option {
  min-width: 0;
  padding: 12px 13px;
  border: 1px solid #d9e0ec;
  border-radius: 11px;
  background: #fcfdff;
}

.ce-page .ce-option[data-correct=true] {
  border-color: #a3c7b2;
  background: #f4faf6;
}

.ce-page .ce-option .ce-item-heading {
  gap: 4px;
  margin-bottom: 12px;
}

.ce-page .ce-option .ce-item-heading > strong {
  margin-right: auto;
  font-size: .74rem;
  color: #5d6c86;
}

.ce-page .ce-option .ce-icon-button {
  width: 28px;
  min-height: 28px;
  flex-basis: 28px;
  padding: 5px;
  border-color: transparent;
  background: transparent;
}

.ce-page .ce-option .ce-item-heading > button:last-child:hover {
  color: #a02244;
  background: #fff0f3;
}

.ce-page .ce-option .ce-toggle {
  margin-bottom: 0;
}

.ce-page .ce-option .ce-details {
  margin-bottom: 0;
  padding: 8px 0 0;
  border: 0;
  border-top: 1px solid #e2e7ef;
  border-radius: 0;
  background: transparent;
}

.ce-page .ce-option .ce-details > summary {
  font-size: .74rem;
  font-weight: 500;
}

.ce-page .ce-preview-note {
  font-size: .9rem;
  line-height: 1.7;
}

.ce-page .ce-preview-group {
  border: 1px solid #d9e1ef;
  border-radius: 12px;
  padding: 14px;
  margin: 14px 0;
  background: #f7f9fe;
}

.ce-page .ce-preview-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ce-page .ce-preview-exercise {
  min-width: 110px;
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid #dde4f0;
  border-radius: 9px;
  background: #fff;
}

.ce-page .ce-preview-exercise small {
  font-size: .72rem;
  color: #64738b;
}

.ce-page .ce-preview-arabic {
  font-family: var(--font-arabic,'LPMQ IsepMisbah',serif);
  font-size: 2.5rem;
  line-height: 2.2;
  overflow-wrap: anywhere;
}

.ce-page .ce-preview-latin {
  margin: 4px 0;
  font-size: .86rem;
  overflow-wrap: anywhere;
}

.ce-page .ce-preview-question {
  padding: 14px;
  border: 1px solid #ddd6f0;
  border-radius: 10px;
  margin: 12px 0;
  background: #f9f7ff;
}

.ce-page .ce-preview-question p {
  margin: 6px 0;
  line-height: 1.7;
}

.ce-page .arabic-inline {
  font-family: var(--font-arabic,'LPMQ IsepMisbah',serif);
  font-size: 1.4em;
  line-height: 1.8;
  unicode-bidi: isolate;
}

.ce-page .ce-dialog {
  box-sizing: border-box;
  width: min(820px,calc(100% - 28px));
  max-width: 820px;
  max-height: 85dvh;
  padding: 20px;
  border: 1px solid #cbd5e5;
  border-radius: 15px;
  background: #fff;
  color: #293750;
  box-shadow: 0 20px 65px #14274a30;
  overflow: auto;
}

.ce-page .ce-dialog::backdrop {
  background: #19244060;
}

.ce-page .ce-dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.ce-page .ce-dialog p {
  font-size: .85rem;
  line-height: 1.7;
}

.ce-page #ceDialogActions {
  justify-content: flex-end;
  margin-top: 18px;
}

.ce-page .ce-history-preview {
  width: 100%;
  margin-top: 16px;
}

@media (max-width: 1250px) {

  .ce-page .ce-editor-controls {
    flex-wrap: wrap;
  }

  .ce-page .ce-language {
    margin-left: auto;
  }

  .ce-page #ceHistory > span {
    display: none;
  }

  .ce-page #ceHistory {
    width: 34px;
    min-height: 34px;
    padding: 7px;
  }

}

@media (max-width: 1000px) {

  .ce-page .ce-workspace {
    grid-template-columns: 230px minmax(0,1fr);
    gap: 12px;
  }

  .ce-page .ce-editor-heading {
    gap: 10px;
    padding: 14px 16px;
  }

  .ce-page .ce-editor-controls {
    padding: 10px 16px;
  }

  .ce-page #cePanel {
    padding: 16px;
  }

  .ce-page .ce-audio {
    grid-template-columns: minmax(0,1fr);
  }

  .ce-page .ce-audio > .ce-actions {
    justify-self: start;
  }

  .ce-page .ce-script-grid,
  .ce-page .ce-options-grid {
    grid-template-columns: minmax(0,1fr);
  }

}

@media (max-width: 800px) {

  .ce-page .ce-shell {
    width: calc(100% - 24px);
    margin: 12px auto;
  }

  .ce-page .ce-page-heading {
    margin-bottom: 14px;
  }

  .ce-page .ce-workspace {
    grid-template-columns: minmax(0,1fr);
    gap: 12px;
  }

  .ce-page .ce-sidebar {
    position: static;
  }

  .ce-page .ce-catalog > summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
  }

  .ce-page .ce-catalog > summary > span {
    display: grid;
    gap: 3px;
    min-width: 0;
  }

  .ce-page .ce-catalog > summary strong {
    font-size: .8rem;
    color: #465574;
  }

  .ce-page .ce-catalog > summary small {
    display: block;
    font-weight: 400;
    color: #64738c;
    font-size: .74rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .ce-page .ce-catalog[open] > summary {
    border-bottom: 1px solid #e4e9f2;
  }

  .ce-page .ce-catalog-body {
    padding-top: 12px;
  }

  .ce-page .ce-catalog-selectors {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 12px;
    padding-bottom: 3px;
  }

  .ce-page .ce-lesson-list {
    max-height: 250px;
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  .ce-page .ce-editor-identity {
    flex-basis: 180px;
  }

  .ce-page .ce-tabs {
    width: 100%;
  }

  .ce-page .ce-tabs button {
    flex: 1 1 0;
    padding: 8px 6px;
    font-size: .78rem;
  }

  .ce-page .ce-language {
    width: 100%;
    justify-content: space-between;
    margin: 0;
  }

  .ce-page .ce-script-grid {
    grid-template-columns: minmax(0,1fr);
    gap: 0;
  }

  .ce-page .ce-script-grid .ce-field textarea:not(.ce-arabic-input) {
    min-height: 72px;
  }

  .ce-page .ce-grid {
    gap: 12px;
  }

  .ce-page .ce-subtoolbar {
    gap: 8px;
  }

  .ce-page .ce-subtoolbar > .ce-button {
    padding: 9px 10px;
  }

  .ce-page .ce-quiz-toolbar {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    align-items: end;
  }

  .ce-page .ce-quiz-toolbar > .ce-selector:first-child {
    grid-column: 1/-1;
  }

  .ce-page .ce-quiz-toolbar > .ce-selector:nth-child(2) {
    min-width: 0;
  }

  .ce-page .ce-form-section[data-section=ce_visibility] {
    grid-template-columns: minmax(0,1fr);
    gap: 10px;
  }

  .ce-page .ce-editor-identity h2 {
    font-size: 1.02rem;
  }

  .ce-page .ce-question-content .ce-translation {
    margin-bottom: 0;
  }

  .ce-page .ce-field :where(input:not([type=checkbox]):not([type=radio]), textarea),
  .ce-page select {
    font-size: 16px;
  }

  .ce-page .ce-field textarea.ce-arabic-input {
    font-size: 2rem;
  }

  .ce-page .ce-language select {
    font-size: .83rem;
  }

}

@media (max-width: 440px) {

  .ce-page .ce-shell {
    width: calc(100% - 20px);
    margin: 10px auto;
  }

  .ce-page .ce-lesson-list {
    grid-template-columns: minmax(0,1fr);
  }

  .ce-page .ce-editor-heading {
    padding: 13px;
  }

  .ce-page .ce-editor-controls {
    padding: 10px 13px;
  }

  .ce-page #cePanel {
    padding: 15px 13px;
  }

  .ce-page .ce-editor-identity {
    flex-basis: 100%;
  }

  .ce-page .ce-save-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .ce-page .ce-save-actions #ceSave {
    flex: 1 1 auto;
  }

  .ce-page .ce-grid {
    grid-template-columns: minmax(0,1fr);
    gap: 0;
  }

  .ce-page .ce-quiz-settings {
    grid-template-columns: minmax(0,1fr);
    gap: 12px;
  }

  .ce-page .ce-quiz-settings .ce-field {
    max-width: 100%;
  }

  .ce-page .ce-dialog {
    padding: 16px;
  }

  .ce-page .ce-preview-arabic {
    font-size: 2.2rem;
  }

}

/* Curriculum editor: unobtrusive save feedback and compact responsive actions. */

.ce-page .ce-status[data-success=true] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 800px) {

  .ce-page .ce-main {
    padding: 16px 0 30px;
    padding-bottom: 110px;
  }

  .ce-page .ce-editor-heading {
    top: 0;
    position: static;
  }

  .ce-page .ce-save-actions {
    position: fixed;
    z-index: 20;
    left: 12px;
    right: 12px;
    bottom: max(10px, env(safe-area-inset-bottom));
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    width: auto;
    padding: 10px;
    border: 1px solid #ccd5e5;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 5px 28px #1c315426;
  }

  .ce-page .ce-save-actions #ceSave {
    flex: 1 1 auto;
    min-height: 40px;
  }

  .ce-page .ce-save-actions #ceHistory,
  .ce-page .ce-save-actions #ceReload {
    flex: 0 0 36px;
    min-height: 36px;
  }

}

.ce-page .ce-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: #3b4c68;
  font-size: .79rem;
  font-weight: 550;
  line-height: 1.5;
  min-height: 30px;
}

/* =========================================================
   TAHSIN — curriculum-backed reader; all rules stay scoped.
   ========================================================= */

.tahsin-page {
  background: var(--ui-page-background);
  color: var(--ui-ink);
  font-family: var(--font-sans);
}

.tahsin-page .tahsin-app {
  width: min(1160px, 100%);
  max-width: 1160px;
  min-height: 100dvh;
  margin: var(--ui-header-gap, 14px) auto 0;
  padding: 0 24px 28px;
  background: transparent;
}

.tahsin-page .tahsin-main {
  padding-top: var(--ui-header-gap, 14px);
}

.tahsin-page :is(button, a, input, h1, h2, h3) {
  font-family: var(--font-sans);
}

.tahsin-page button {
  margin: 0;
  width: auto;
  max-width: 100%;
  min-height: 42px;
  box-shadow: none;
  transform: none;
  letter-spacing: normal;
  text-transform: none;
}

.tahsin-page :is(button, a, summary):focus-visible {
  outline: 3px solid var(--ui-focus);
  outline-offset: 3px;
}

.tahsin-page .tahsin-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding: 20px 22px;
  border: 1px solid var(--ui-border);
  border-radius: 20px;
  background: linear-gradient(120deg, #ffffff 30%, #f4f2ff 100%);
  box-shadow: var(--ui-shadow);
}

.tahsin-page .tahsin-intro-copy {
  min-width: 0;
}

.tahsin-page .tahsin-eyebrow {
  display: block;
  color: var(--ui-primary);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.5;
}

.tahsin-page h1 {
  margin: 4px 0 8px;
  font-size: clamp(25px, 3vw, 32px);
  line-height: 1.25;
  letter-spacing: -.035em;
}

.tahsin-page .tahsin-intro p {
  max-width: 580px;
  margin: 0;
  color: var(--ui-muted);
  font-size: 14px;
  line-height: 1.65;
}

.tahsin-page .tahsin-progress-box {
  display: grid;
  flex: 0 0 180px;
  gap: 9px;
  color: var(--ui-muted);
  font-size: 12px;
  font-weight: 650;
}

.tahsin-page #tahsinProgress {
  appearance: none;
  width: 100%;
  height: 6px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: #e7e9f3;
  color: var(--ui-primary);
}

.tahsin-page #tahsinProgress::-webkit-progress-bar {
  background: #e7e9f3;
}

.tahsin-page #tahsinProgress::-webkit-progress-value {
  border-radius: 999px;
  background: var(--ui-primary);
}

.tahsin-page #tahsinProgress::-moz-progress-bar {
  border-radius: 999px;
  background: var(--ui-primary);
}

.tahsin-page .tahsin-workspace {
  display: grid;
  grid-template-columns: minmax(230px, 285px) minmax(0, 1fr);
  align-items: start;
  gap: 14px;
}

.tahsin-page :is(.tahsin-sidebar, .tahsin-reader) {
  min-width: 0;
  border: 1px solid var(--ui-border);
  border-radius: 18px;
  background: var(--ui-surface);
  box-shadow: var(--ui-shadow);
}

.tahsin-page .tahsin-sidebar {
  position: sticky;
  top: 14px;
  overflow: hidden;
}

.tahsin-page summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 12px 14px;
  list-style: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.tahsin-page summary::-webkit-details-marker {
  display: none;
}

.tahsin-page .tahsin-chevron {
  display: block;
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg);
}

.tahsin-page details[open] > summary .tahsin-chevron {
  transform: rotate(225deg);
}

.tahsin-page #tahsinSelectedLabel {
  display: block;
  margin-top: 3px;
  color: var(--ui-muted);
  font-size: 11px;
  font-weight: 500;
}

.tahsin-page #tahsinSessionList {
  max-height: min(690px, calc(100dvh - 150px));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 8px 8px;
  scrollbar-width: thin;
}

.tahsin-page .tahsin-list-group {
  margin: 6px 7px 10px;
  color: var(--ui-muted);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.6;
}

.tahsin-page .tahsin-session-item {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 16px;
  align-items: start;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 10px 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--ui-ink);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.65;
  text-align: start;
}

.tahsin-page .tahsin-session-item:hover {
  background: #f5f6fa;
}

.tahsin-page .tahsin-session-item[aria-current] {
  border-color: #d8d4f9;
  background: #f1effe;
  color: #352d8c;
}

.tahsin-page .tahsin-session-number {
  color: var(--ui-muted);
  font-size: 11px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.tahsin-page .tahsin-session-state {
  color: var(--ui-success);
}

.tahsin-page .tahsin-session-state svg {
  width: 14px;
  height: 14px;
  color: var(--ui-muted);
}

.tahsin-page .tahsin-reader {
  padding: 22px;
  scroll-margin-top: 14px;
}

.tahsin-page .tahsin-session-heading {
  margin-bottom: 14px;
  padding-bottom: 15px;
  border-bottom: 1px solid #edf0f5;
}

.tahsin-page h2 {
  margin: 6px 0 10px;
  color: var(--ui-ink);
  font-size: 23px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: -.025em;
}

.tahsin-page #tahsinSessionGoal {
  margin: 0;
  color: var(--ui-muted);
  font-size: 14px;
  line-height: 1.75;
}

.tahsin-page .tahsin-content-section {
  margin: 18px 0;
}

.tahsin-page h3 {
  margin: 0 0 9px;
  color: var(--ui-ink);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.5;
}

.tahsin-page :is(.tahsin-prose, .tahsin-practice-list) {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.85;
  overflow-wrap: break-word;
}

.tahsin-page .tahsin-prose + .tahsin-prose {
  margin-top: 8px;
}

.tahsin-page .tahsin-practice-list {
  padding-left: 20px;
}

.tahsin-page .tahsin-practice-list li + li {
  margin-top: 7px;
}

.tahsin-page .tahsin-arabic {
  margin: 0;
  padding: 10px 4px;
  color: #252563;
  font-family: 'LPMQ IsepMisbah', serif;
  font-size: 36px;
  font-weight: 400;
  line-height: 2.05;
  text-align: center;
  text-shadow: 0 0 .70px currentColor;
  overflow-wrap: anywhere;
  unicode-bidi: isolate;
}

.tahsin-page .tahsin-inline-arabic {
  font-family: 'LPMQ IsepMisbah', serif;
  font-size: 1.45em;
  font-weight: 400;
  line-height: 1.8;
  text-shadow: 0 0 .70px currentColor;
  unicode-bidi: isolate;
}

.tahsin-page .tahsin-targets {
  border-radius: 14px;
  background: #f5f4fd;
}

.tahsin-page .tahsin-alphabet-panel {
  margin: 16px 0;
  border: 1px solid #e4e2f2;
  border-radius: 13px;
}

.tahsin-page .tahsin-alphabet {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 7px;
  padding: 0 12px 12px;
}

.tahsin-page .tahsin-letter {
  min-width: 0;
  padding: 5px 4px 8px;
  border-radius: 10px;
  background: #f6f7fb;
  text-align: center;
}

.tahsin-page .tahsin-bare-letter {
  padding: 0 0 8px;
  font-size: 36px;
  line-height: 1.8;
}

.tahsin-page .tahsin-letter-name {
  display: block;
  direction: ltr;
  unicode-bidi: isolate;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.7;
}

.tahsin-page .tahsin-drills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 14px;
}

.tahsin-page .tahsin-drill {
  flex: 0 1 auto;
  min-width: 68px;
  max-width: 100%;
  padding: 0 10px;
  border: 1px solid #e3e0f4;
  border-radius: 12px;
  background: #faf9ff;
}

.tahsin-page .tahsin-small {
  margin: 0;
  color: var(--ui-muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.7;
}

.tahsin-page .tahsin-drill-instruction {
  max-width: 150px;
  margin: 0 auto 9px;
  color: var(--ui-muted);
  font-size: 11px;
  line-height: 1.65;
  text-align: center;
}

.tahsin-page .tahsin-example {
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid #dfe5ef;
  border-radius: 13px;
  background: #fdfefe;
}

.tahsin-page .tahsin-example-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 5px 12px;
  padding: 10px 14px 0;
}

.tahsin-page .tahsin-reference {
  color: var(--ui-primary);
  font-size: 11px;
  font-weight: 750;
}

.tahsin-page .tahsin-excerpt {
  padding: 10px 14px 15px;
}

.tahsin-page .tahsin-ayah-context {
  border-top: 1px solid #edf0f5;
  color: var(--ui-muted);
}

.tahsin-page .tahsin-ayah-context summary {
  min-height: 40px;
  font-size: 11px;
  font-weight: 600;
}

.tahsin-page .tahsin-full-ayah {
  padding: 8px 14px 18px;
  font-size: 30px;
}

.tahsin-page .tahsin-self-check {
  padding: 14px 16px;
  border-radius: 13px;
  background: #f1f7f4;
}

.tahsin-page .tahsin-media-note {
  margin: 16px 0 0;
  color: var(--ui-muted);
  font-size: 11px;
  line-height: 1.8;
}

.tahsin-page .tahsin-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #edf0f5;
}

.tahsin-page .tahsin-pagination {
  display: flex;
  gap: 7px;
}

.tahsin-page :is(.tahsin-primary, .tahsin-secondary, #tahsinRetry) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  margin: 0;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.5;
  text-decoration: none;
}

.tahsin-page :is(.tahsin-primary, #tahsinRetry) {
  background: var(--ui-primary);
  color: #fff;
}

.tahsin-page .tahsin-secondary {
  border-color: var(--ui-border);
  background: #fff;
  color: var(--ui-primary);
}

.tahsin-page button:disabled {
  opacity: .5;
  cursor: default;
}

.tahsin-page .tahsin-primary.is-completed {
  opacity: 1;
  background: #e8f3ec;
  color: var(--ui-success);
}

.tahsin-page .tahsin-status {
  margin: 0 0 14px;
  padding: 14px 16px;
  border: 1px solid var(--ui-border);
  border-radius: 14px;
  background: #fff;
  color: var(--ui-muted);
}

.tahsin-page .tahsin-status p {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.7;
}

.tahsin-page .tahsin-save-status {
  margin-top: 16px;
  color: var(--ui-muted);
  font-size: 12px;
  line-height: 1.7;
}

.tahsin-page .tahsin-access {
  padding: 18px 0;
}

.tahsin-page .tahsin-access p {
  margin: 8px 0 16px;
  color: var(--ui-muted);
  font-size: 14px;
  line-height: 1.8;
}

.tahsin-page .tahsin-premium-badge {
  display: inline-block;
  margin-bottom: 12px;
  padding: 4px 8px;
  border-radius: 7px;
  background: var(--ui-premium-bg);
  color: var(--ui-premium-text);
  font-size: 11px;
  font-weight: 750;
}

.dashboard-app .dashboard-tahsin-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--ui-border);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--ui-shadow);
  color: var(--ui-ink);
  text-decoration: none;
}

.dashboard-app .dashboard-tahsin-link:hover {
  border-color: #bab4e8;
  box-shadow: var(--ui-shadow-raised);
}

.dashboard-app .dashboard-tahsin-icon {
  display: grid;
  flex: 0 0 40px;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid #f1dfcb;
  border-radius: 12px;
  background: #fff5e8;
  color: #9a5c18;
}

.dashboard-app .dashboard-tahsin-icon svg {
  width: 22px;
  height: 22px;
}

.dashboard-app .dashboard-tahsin-copy {
  min-width: 0;
  flex: 1;
}

.dashboard-app .dashboard-tahsin-copy strong {
  display: block;
  font-size: var(--dashboard-section-size);
  font-weight: 800;
  line-height: 1.4;
}

.dashboard-app .dashboard-tahsin-copy small {
  display: block;
  margin-top: 3px;
  color: var(--ui-muted);
  font-size: var(--dashboard-body-size);
  line-height: 1.6;
}

.dashboard-app .dashboard-tahsin-arrow {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  color: var(--ui-primary);
}

.landing-feature-card--tajweed .landing-feature-link {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  color: var(--ui-primary);
  font-size: 12px;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 800px) {
  .tahsin-page .tahsin-workspace {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .tahsin-page .tahsin-sidebar {
    position: static;
  }

  .tahsin-page #tahsinSessionList {
    max-height: 330px;
  }

  .tahsin-page .tahsin-reader {
    padding: 18px;
  }

  .tahsin-page .tahsin-progress-box {
    flex-basis: 140px;
  }
}

@media (max-width: 520px) {
  .tahsin-page .tahsin-app {
    padding: 0 12px 22px;
  }

  .tahsin-page .tahsin-intro {
    display: grid;
    gap: 13px;
    padding: 18px;
  }

  .tahsin-page .tahsin-progress-box {
    max-width: 250px;
  }

  .tahsin-page .tahsin-reader {
    padding: 16px;
  }

  .tahsin-page h2 {
    font-size: 21px;
  }

  .tahsin-page .tahsin-arabic {
    font-size: 34px;
  }

  .tahsin-page .tahsin-full-ayah {
    font-size: 28px;
  }

  .tahsin-page .tahsin-alphabet {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 0 8px 8px;
  }

  .tahsin-page .tahsin-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .tahsin-page .tahsin-pagination {
    justify-content: space-between;
  }
}
