/* منصة مكتبة ورد 🌸 — Storybook Interactive Platform Stylesheet */
:root {
  --blush: #FCEAF1;
  --blush-deep: #F6D5E3;
  --cream: #FFFBF4;
  --parchment: #FFF6E4;
  --gold: #F4B942;
  --gold-deep: #C98A12;
  --teal: #145B59;
  --teal-light: #E2F3F2;
  --lavender: #145B59;
  --lavender-soft: #FCEAF1;
  --coral: #E86F51;
  --rose: #D94E78;
  --rose-soft: #FDE9F0;
  --ink: #2B1D12;
  --ink-muted: #665143;
  --surface: rgba(255, 253, 249, 0.94);
  --border: rgba(182, 134, 114, 0.22);
  --shadow-sm: 0 4px 14px rgba(102, 64, 48, 0.08);
  --shadow-md: 0 12px 30px rgba(102, 64, 48, 0.12);
  --shadow-lg: 0 20px 48px rgba(74, 43, 30, 0.18);
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-pill: 999px;
  --font-display: "Almarai", "Tajawal", system-ui, sans-serif;
  --font-body: "Tajawal", system-ui, -apple-system, sans-serif;
  --font-quran: "Amiri Quran", "Amiri", "Traditional Arabic", serif;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 10%, rgba(252, 234, 241, 0.95) 0%, transparent 45%),
    radial-gradient(circle at 88% 12%, rgba(255, 235, 186, 0.72) 0%, transparent 42%),
    radial-gradient(circle at 50% 95%, rgba(226, 243, 242, 0.65) 0%, transparent 48%),
    var(--cream);
  min-height: 100vh;
  overflow-x: clip;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

button, input, a {
  font-family: inherit;
}

button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 3px solid var(--lavender);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

/* Soft ambient orbs */
.bg-decor {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(55px);
  opacity: 0.42;
}
.orb-1 { width: 320px; height: 320px; background: #F7B7CC; top: -90px; right: -80px; }
.orb-2 { width: 360px; height: 360px; background: #FFE09E; top: 38%; left: -120px; }
.orb-3 { width: 280px; height: 280px; background: #C8B8F8; bottom: -80px; right: 20%; }

/* Top Header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 251, 244, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(217, 78, 120, 0.14);
  box-shadow: 0 4px 18px rgba(96, 56, 42, 0.06);
}

.topbar-inner {
  max-width: 1380px;
  margin: 0 auto;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #FFF7E8 0%, #FCEAF1 100%);
  border: 2px solid rgba(244, 185, 66, 0.55);
  border-radius: var(--radius-pill);
  padding: 5px 16px 5px 10px;
  cursor: pointer;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
  text-align: right;
}
.brand-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }

.brand-emblem {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(217, 78, 120, 0.2);
}

.brand-copy { display: flex; flex-direction: column; line-height: 1.2; }
.brand-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: #8E2547;
}
.brand-sub {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--teal);
}

.child-cluster {
  display: flex;
  align-items: center;
  gap: 10px;
}

.child-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #FFFFFF;
  border: 2px solid rgba(232, 111, 146, 0.25);
  border-radius: var(--radius-pill);
  padding: 4px 14px 4px 6px;
  cursor: pointer;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease;
}
.child-pill:hover { transform: translateY(-1px); }

.avatar-sm {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
  background: var(--blush);
  flex-shrink: 0;
}

.child-meta { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.child-greet { font-size: 0.9rem; font-weight: 700; color: var(--ink); }
.child-badges-inline { display: flex; align-items: center; gap: 6px; margin-top: 2px; }

.lvl-chip, .star-chip {
  font-size: 0.74rem;
  font-weight: 800;
  padding: 1px 8px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
.lvl-chip { background: #FFF2CC; color: #8A5B00; border: 1px solid rgba(244, 185, 66, 0.65); }
.star-chip { background: #FCEAF1; color: #A0264F; border: 1px solid rgba(217, 78, 120, 0.3); }

.mom-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--teal) 0%, #1C7A77 100%);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-pill);
  padding: 10px 16px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(20, 91, 89, 0.22);
  white-space: nowrap;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.mom-btn:hover { transform: translateY(-1px); filter: brightness(1.06); }

/* Tablet Horizontal Nav (hidden on wide desktop & mobile) */
.tablet-nav {
  display: none;
  padding: 8px 16px 10px;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  border-top: 1px solid rgba(182, 134, 114, 0.14);
}
.tablet-nav::-webkit-scrollbar { display: none; }

/* Main 3-Column App Shell */
.app-shell {
  position: relative;
  z-index: 1;
  max-width: 1380px;
  margin: 0 auto;
  padding: 18px 18px 40px;
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr) 268px;
  gap: 18px;
  align-items: start;
}

/* Sidebar Nav (Right in RTL) */
.nav-sidebar {
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.nav-card {
  background: linear-gradient(180deg, rgba(255, 250, 252, 0.96) 0%, rgba(255, 253, 248, 0.94) 100%);
  border: 2px solid rgba(232, 111, 146, 0.2);
  border-radius: var(--radius-xl);
  padding: 10px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: none;
  background: transparent;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 700;
  padding: 11px 12px;
  border-radius: 15px;
  cursor: pointer;
  text-align: right;
  transition: background 0.16s ease, color 0.16s ease, transform 0.14s ease;
}
.nav-item .nav-ic {
  font-size: 1.2rem;
  width: 26px;
  text-align: center;
  flex-shrink: 0;
}
.nav-item:hover {
  background: var(--blush);
  transform: translateX(-2px);
}
.nav-item.is-active {
  background: linear-gradient(135deg, #E86F92 0%, #D94E78 100%);
  color: #FFFFFF;
  box-shadow: 0 6px 14px rgba(217, 78, 120, 0.28);
}

.mini-store-card {
  background: linear-gradient(135deg, #FFF7E2 0%, #FCEAF1 100%);
  border: 2px solid rgba(244, 185, 66, 0.4);
  border-radius: var(--radius-lg);
  padding: 14px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.mini-store-title { margin: 0 0 4px; font-weight: 800; font-size: 0.94rem; color: #7C2340; }
.mini-store-sub { margin: 0 0 10px; font-size: 0.8rem; color: var(--ink-muted); }

.btn-soft-link {
  display: inline-block;
  background: #FFFFFF;
  color: var(--teal);
  border: 1.5px solid rgba(20, 91, 89, 0.25);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
  transition: background 0.15s ease;
}
.btn-soft-link:hover { background: var(--teal-light); }

/* Journey Sidebar (Left in RTL — Slide 2 Parchment Card) */
.journey-sidebar {
  position: sticky;
  top: 84px;
}

.parchment-card {
  background: linear-gradient(180deg, #FFF9EC 0%, #FFF2D8 100%);
  border: 2.5px solid rgba(244, 185, 66, 0.55);
  border-radius: var(--radius-xl);
  padding: 16px 15px;
  box-shadow: var(--shadow-md);
}

.parchment-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
}
.parchment-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 800;
  color: #7A4B11;
}

.ring-wrap {
  position: relative;
  width: 132px;
  height: 132px;
  margin: 4px auto 12px;
}
.progress-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.ring-track {
  fill: none;
  stroke: rgba(182, 134, 114, 0.2);
  stroke-width: 12;
}
.ring-fill {
  fill: none;
  stroke-width: 12;
  stroke-linecap: round;
  stroke-dasharray: 351.86;
  stroke-dashoffset: 351.86;
  transition: stroke-dashoffset 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.ring-center strong {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--teal);
  line-height: 1.05;
}
.ring-center span {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-muted);
}

.goals-list {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.goal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(201, 138, 18, 0.22);
  border-radius: 12px;
  padding: 7px 10px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}
.goal-row:hover { background: #FFFFFF; }
.goal-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  flex-shrink: 0;
  border: 2px solid #D8B98A;
  color: transparent;
  background: #FFFDF8;
}
.goal-row.is-done .goal-check {
  background: #2E9B63;
  border-color: #2E9B63;
  color: #FFFFFF;
}
.goal-row.is-done .goal-label { color: var(--teal); }

.achievements-box {
  border-top: 1.5px dashed rgba(201, 138, 18, 0.35);
  padding-top: 12px;
}
.ach-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.ach-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: #7A4B11;
}
.ach-count {
  font-size: 0.78rem;
  font-weight: 800;
  background: #FFFFFF;
  color: #8A5B00;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(244, 185, 66, 0.55);
}

.badges-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}
.badge-coin {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid rgba(182, 134, 114, 0.3);
  background: rgba(255, 255, 255, 0.6);
  font-size: 1.2rem;
  filter: grayscale(1) opacity(0.45);
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
  padding: 0;
}
.badge-coin.is-unlocked {
  filter: none;
  background: linear-gradient(135deg, #FFF6CE 0%, #FFD670 100%);
  border-color: #E2A318;
  box-shadow: 0 4px 12px rgba(244, 185, 66, 0.45);
}
.badge-coin:hover { transform: scale(1.08); }

.chest-banner {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #145B59 0%, #0F4644 100%);
  color: #FFFFFF;
  border: none;
  border-radius: 16px;
  padding: 10px 12px;
  cursor: pointer;
  text-align: right;
  box-shadow: 0 8px 18px rgba(109, 76, 201, 0.28);
  transition: transform 0.16s ease;
}
.chest-banner:hover { transform: translateY(-2px); }
.chest-banner.is-ready {
  background: linear-gradient(135deg, #F4B942 0%, #E86F51 100%);
  box-shadow: 0 8px 20px rgba(232, 111, 81, 0.36);
}
.chest-icon { font-size: 1.6rem; flex-shrink: 0; }
.chest-copy { display: flex; flex-direction: column; line-height: 1.25; }
.chest-copy strong { font-size: 0.85rem; }
.chest-copy small { font-size: 0.73rem; opacity: 0.92; }

/* Main Stage */
.main-stage {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Home Hero Banner */
.hero-banner {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: linear-gradient(135deg, #FFF5F9 0%, #FFF8EA 55%, #E8F6F5 100%);
  border: 2px solid rgba(232, 111, 146, 0.24);
  box-shadow: var(--shadow-md);
  display: grid;
  grid-template-columns: 1.12fr 0.95fr;
  align-items: stretch;
}
.hero-copy {
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  background: #FFFFFF;
  color: #9A2B50;
  border: 1.5px solid rgba(217, 78, 120, 0.26);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  font-size: 0.8rem;
  font-weight: 800;
}
.hero-copy h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.2vw, 1.95rem);
  line-height: 1.25;
  color: #6E1F3A;
}
.hero-tagline {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--teal);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.hero-art {
  position: relative;
  min-height: 210px;
  overflow: hidden;
}
.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 28% center;
}

/* Buttons */
.btn-primary, .btn-teal, .btn-gold, .btn-outline, .btn-ghost, .btn-danger, .btn-danger-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: var(--radius-pill);
  font-weight: 800;
  font-size: 0.9rem;
  padding: 10px 18px;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: transform 0.14s ease, filter 0.14s ease, background 0.14s ease;
  min-height: 44px;
}
.btn-lg { padding: 12px 24px; font-size: 0.98rem; }
.btn-sm { padding: 7px 14px; font-size: 0.82rem; min-height: 36px; }

.btn-primary {
  background: linear-gradient(135deg, #EC6F95 0%, #D44773 100%);
  color: #FFFFFF;
  box-shadow: 0 8px 18px rgba(212, 71, 115, 0.28);
}
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.05); }

.btn-teal {
  background: linear-gradient(135deg, #166A68 0%, #0F4E4C 100%);
  color: #FFFFFF;
  box-shadow: 0 7px 16px rgba(20, 91, 89, 0.25);
}
.btn-teal:hover { transform: translateY(-1px); filter: brightness(1.07); }

.btn-gold {
  background: linear-gradient(135deg, #F7C24E 0%, #E39B1D 100%);
  color: #3A2200;
  box-shadow: 0 8px 18px rgba(227, 155, 29, 0.34);
}
.btn-gold:hover { transform: translateY(-1px); filter: brightness(1.04); }

.btn-outline {
  background: #FFFFFF;
  color: var(--teal);
  border: 2px solid rgba(20, 91, 89, 0.26);
}
.btn-outline:hover { background: var(--teal-light); }
.btn-outline[aria-pressed="true"] {
  background: var(--lavender-soft);
  color: #5332B8;
  border-color: var(--lavender);
}

.btn-ghost {
  background: rgba(102, 81, 67, 0.09);
  color: var(--ink);
}
.btn-ghost:hover { background: rgba(102, 81, 67, 0.16); }

.btn-danger-outline {
  background: #FFF5F5;
  color: #B42318;
  border: 1.5px solid rgba(180, 35, 24, 0.3);
}
.btn-danger {
  background: #C62828;
  color: #FFFFFF;
}

/* Section Headers */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.32rem;
  color: var(--ink);
}
.section-sub {
  margin: 2px 0 0;
  font-size: 0.88rem;
  color: var(--ink-muted);
}

/* Worlds Grid (Slide 2 & 4 Pastel Cards) */
.worlds-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.world-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 18px 14px 16px;
  border-radius: var(--radius-lg);
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  color: var(--ink);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.world-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.world-card.is-soon {
  opacity: 0.92;
  border-style: dashed;
  border-color: rgba(139, 108, 232, 0.35);
}

.world-count-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}
.world-count-badge.soon-tag {
  background: #EDE7F6;
  color: #5B35C2;
}

.world-icon-bubble {
  width: 62px;
  height: 62px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.86);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 6px 14px rgba(80, 50, 40, 0.08);
}

.world-pill-title {
  display: inline-block;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.world-desc {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-muted);
  line-height: 1.4;
}

/* Signature Bottom Featured Row (Slide 2: Quran Journey Banner + Weekly Challenges) */
.featured-bottom-row {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 14px;
}

.quran-featured-banner {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  padding: 18px 20px;
  background:
    linear-gradient(115deg, rgba(20, 91, 89, 0.92) 0%, rgba(28, 122, 114, 0.85) 55%, rgba(244, 185, 66, 0.82) 100%),
    url("assets/hero-ward.jpg") center/cover no-repeat;
  color: #FFFFFF;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}
.qf-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.qf-kicker {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-pill);
  padding: 3px 11px;
  font-size: 0.76rem;
  font-weight: 800;
  margin-bottom: 4px;
}
.qf-top h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.38rem;
  color: #FFFBF4;
}
.qf-top p {
  margin: 3px 0 0;
  font-size: 0.86rem;
  color: rgba(255, 251, 244, 0.92);
}

.mini-stones {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.mini-stone {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  color: #FFFFFF;
  border-radius: var(--radius-pill);
  padding: 5px 11px;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
}
.mini-stone.is-mem {
  background: #F4B942;
  color: #3B2300;
  border-color: #FFF5D1;
}

.challenge-featured-card {
  background: linear-gradient(145deg, #FCEAF1 0%, #FCEAF1 100%);
  border: 2px solid rgba(139, 108, 232, 0.32);
  border-radius: var(--radius-xl);
  padding: 18px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}
.cf-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cf-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.18rem;
  color: #4D2DA8;
}
.cf-trophy { font-size: 1.7rem; }

.progress-bar-track {
  width: 100%;
  height: 11px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-pill);
  overflow: hidden;
  border: 1px solid rgba(139, 108, 232, 0.25);
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #145B59 0%, #E86F92 100%);
  border-radius: var(--radius-pill);
  transition: width 0.4s ease;
}

/* Quran Journey Map View */
.quran-map-hero {
  background: linear-gradient(135deg, #E2F3F2 0%, #FFF7E2 55%, #FCEAF1 100%);
  border: 2px solid rgba(20, 91, 89, 0.2);
  border-radius: var(--radius-xl);
  padding: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  box-shadow: var(--shadow-sm);
}
.quran-progress-pill {
  background: #FFFFFF;
  border: 2px solid var(--gold);
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  font-weight: 800;
  color: var(--teal);
  font-size: 0.92rem;
}

.stepping-map {
  position: relative;
  background: linear-gradient(180deg, #F0FAF4 0%, #FFFBF2 50%, #FEF0F5 100%);
  border: 2px solid rgba(20, 91, 89, 0.16);
  border-radius: var(--radius-xl);
  padding: 22px 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

.surah-stone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  background: #FFFFFF;
  border: 2.5px solid rgba(20, 91, 89, 0.18);
  border-radius: 22px;
  padding: 16px 12px 14px;
  cursor: pointer;
  color: var(--ink);
  box-shadow: 0 6px 16px rgba(20, 91, 89, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.surah-stone:hover {
  transform: translateY(-4px);
  border-color: var(--teal);
  box-shadow: var(--shadow-md);
}
.surah-stone.is-current {
  border-color: var(--rose);
  background: linear-gradient(180deg, #FFF9FB 0%, #FFFFFF 100%);
  box-shadow: 0 0 0 4px rgba(232, 111, 146, 0.18), var(--shadow-md);
}
.surah-stone.is-memorized {
  border-color: var(--gold);
  background: linear-gradient(180deg, #FFFBEF 0%, #FFF4D2 100%);
}

.stone-step-num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--teal-light);
  color: var(--teal);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.surah-stone.is-memorized .stone-step-num {
  background: var(--gold);
  color: #3A2200;
}
.surah-stone.is-current .stone-step-num {
  background: var(--rose);
  color: #FFFFFF;
}

.stone-name {
  font-family: var(--font-display);
  font-size: 1.06rem;
  font-weight: 800;
  color: var(--ink);
}
.stone-meta {
  font-size: 0.78rem;
  color: var(--ink-muted);
  font-weight: 700;
}
.stone-status {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  background: rgba(20, 91, 89, 0.08);
  color: var(--teal);
}
.surah-stone.is-memorized .stone-status {
  background: #2E9B63;
  color: #FFFFFF;
}

/* Letters Spotlight & 28-Letter Grid */
.letter-spotlight {
  background: linear-gradient(135deg, #FFF7E4 0%, #FCEAF1 100%);
  border: 2.5px solid rgba(244, 185, 66, 0.5);
  border-radius: var(--radius-xl);
  padding: 20px;
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  box-shadow: var(--shadow-md);
}
.letter-giant-box {
  aspect-ratio: 1;
  border-radius: 24px;
  background: #FFFFFF;
  border: 3px solid var(--rose);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}
.letter-giant-char {
  font-family: var(--font-display);
  font-size: 4.1rem;
  font-weight: 800;
  color: var(--rose);
  line-height: 1;
}
.letter-giant-name {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--teal);
  margin-top: 4px;
}

.harakat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.haraka-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #FFFFFF;
  border: 2px solid rgba(20, 91, 89, 0.22);
  border-radius: 14px;
  padding: 8px 14px;
  cursor: pointer;
  color: var(--ink);
  font-weight: 800;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}
.haraka-btn:hover { transform: translateY(-2px); border-color: var(--teal); background: var(--teal-light); }
.haraka-btn.is-playing {
  background: var(--teal);
  color: #FFFFFF;
  border-color: var(--teal);
}
.haraka-glyph { font-family: var(--font-display); font-size: 1.35rem; }

.letters-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}
.letter-tile {
  position: relative;
  background: #FFFFFF;
  border: 2px solid rgba(182, 134, 114, 0.22);
  border-radius: 16px;
  padding: 12px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.letter-tile:hover { transform: translateY(-3px); border-color: var(--rose); }
.letter-tile.is-selected {
  background: linear-gradient(135deg, #FCEAF1 0%, #FFF3D6 100%);
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(217, 78, 120, 0.2);
}
.letter-tile.is-practiced::after {
  content: "✓";
  position: absolute;
  top: 5px;
  left: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #2E9B63;
  color: #FFFFFF;
  font-size: 0.68rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.letter-tile-ch {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--teal);
}
.letter-tile-name { font-size: 0.72rem; font-weight: 700; color: var(--ink-muted); }

/* Cards Grids (Games, Stories, Printables, Adhkar) */
.cards-2col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.game-card, .story-card, .printable-card, .dhikr-card, .challenge-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.game-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.game-emoji {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
}
.game-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  margin-bottom: 3px;
}
.game-card h3, .story-card h3, .printable-card h3, .dhikr-card h3, .challenge-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.08rem;
  color: var(--ink);
}
.card-desc { margin: 0; font-size: 0.87rem; color: var(--ink-muted); }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }

/* Adhkar & Hadith Segmented Tabs */
.seg-tabs {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.85);
  border: 2px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 4px;
  gap: 4px;
  align-self: flex-start;
}
.seg-tab {
  border: none;
  background: transparent;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--ink-muted);
  cursor: pointer;
}
.seg-tab.is-active {
  background: var(--teal);
  color: #FFFFFF;
}

.dhikr-arabic {
  background: #FFF9EC;
  border: 1.5px solid rgba(244, 185, 66, 0.45);
  border-radius: 14px;
  padding: 14px 16px;
  font-family: var(--font-quran);
  font-size: 1.32rem;
  line-height: 1.9;
  color: #26170A;
  text-align: center;
}
.source-chip {
  display: inline-block;
  align-self: flex-start;
  background: var(--teal-light);
  color: var(--teal);
  font-size: 0.76rem;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
}
.practice-tip {
  background: var(--blush);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 0.83rem;
  font-weight: 700;
  color: #7A2040;
}

/* Stories & Printables with Real Book Covers */
.book-card-top {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.book-cover {
  width: 84px;
  height: 112px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid rgba(244, 185, 66, 0.45);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
  background: var(--blush);
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(43, 29, 18, 0.56);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
}

.modal-card {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--cream);
  border: 2.5px solid rgba(244, 185, 66, 0.55);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-lg);
}
.modal-surah { max-width: 720px; }
.modal-mom { max-width: 620px; }

.modal-close {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: #FFFFFF;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
}
.modal-close:hover { background: var(--blush); }

.welcome-art {
  border-radius: 18px;
  overflow: hidden;
  max-height: 185px;
  margin-bottom: 14px;
}
.welcome-art img { width: 100%; height: 185px; object-fit: cover; }
.modal-lead { margin: 4px 0 14px; color: var(--ink-muted); font-size: 0.92rem; }

.profile-form { display: flex; flex-direction: column; gap: 10px; }
.field-label { font-size: 0.86rem; font-weight: 800; color: var(--ink); }
.text-input {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid rgba(20, 91, 89, 0.25);
  border-radius: 14px;
  font-size: 1rem;
  background: #FFFFFF;
  color: var(--ink);
}
.text-input:focus { border-color: var(--rose); outline: none; }

.avatar-picker {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.avatar-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 8px;
  background: #FFFFFF;
  border: 2px solid var(--border);
  border-radius: 16px;
  cursor: pointer;
  font-weight: 800;
  color: var(--ink);
}
.avatar-opt {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  transition: transform .15s ease, border-color .2s ease, box-shadow .2s ease;
}
.avatar-opt:active {
  transform: scale(.94);
}
@keyframes avatarPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.07); }
  100% { transform: scale(1); }
}
.avatar-opt img {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  object-fit: cover;
  pointer-events: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
}
.avatar-opt span {
  pointer-events: none;
}
.avatar-opt.is-selected {
  border-color: var(--rose);
  background: var(--blush);
  box-shadow: 0 0 0 3px rgba(217, 78, 120, 0.18);
  animation: avatarPop .3s ease;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

/* Surah Reader Modal */
.surah-modal-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  padding-left: 38px;
}
.surah-thumb {
  width: 64px;
  height: 82px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid var(--gold);
  flex-shrink: 0;
}
.surah-meta-pill {
  display: inline-block;
  background: var(--teal-light);
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
}
.surah-modal-head h2 {
  margin: 4px 0 2px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--teal);
}
.reciter-credit { margin: 0; font-size: 0.84rem; color: var(--ink-muted); font-weight: 600; }

.surah-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.audio-status {
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 12px;
}

.mushaf-sheet {
  background: #FFFDF7;
  border: 2px solid rgba(201, 138, 18, 0.45);
  border-radius: 20px;
  padding: 18px 16px;
  box-shadow: inset 0 0 0 4px rgba(244, 185, 66, 0.12);
}
.basmalah-banner {
  text-align: center;
  font-family: var(--font-quran);
  font-size: 1.6rem;
  color: var(--teal);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1.5px dashed rgba(201, 138, 18, 0.35);
}

.ayahs-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ayah-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #FFFFFF;
  border: 1.5px solid rgba(201, 138, 18, 0.24);
  border-radius: 16px;
  padding: 12px 16px;
  cursor: pointer;
  text-align: right;
  color: #1F140B;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.12s ease;
}
.ayah-row:hover { background: #FFF8E6; border-color: var(--gold); }
.ayah-row.is-playing {
  background: linear-gradient(135deg, #E2F3F2 0%, #FFF7DC 100%);
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(20, 91, 89, 0.16);
}
.ayah-text {
  font-family: var(--font-quran);
  font-size: 1.55rem;
  line-height: 2.05;
  flex: 1;
}
.ayah-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #FFF2CC;
  border: 1.5px solid var(--gold);
  color: #6B4500;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 800;
  flex-shrink: 0;
}

.surah-modal-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
}

/* Parent Corner Modal */
.mom-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; padding-left: 36px; }
.mom-icon {
  width: 48px; height: 48px; border-radius: 16px;
  background: var(--blush); display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
}
.mom-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.mom-stat {
  background: #FFFFFF;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 10px 8px;
  text-align: center;
}
.mom-stat strong { display: block; font-family: var(--font-display); font-size: 1.28rem; color: var(--teal); }
.mom-stat span { font-size: 0.74rem; color: var(--ink-muted); font-weight: 700; }

.inline-field-row { display: flex; align-items: flex-end; gap: 8px; }
.field-grow { flex: 1; }

.sub-preview-box {
  margin-top: 16px;
  background: linear-gradient(135deg, #FCEAF1 0%, #FCEAF1 100%);
  border: 2px solid rgba(139, 108, 232, 0.35);
  border-radius: 18px;
  padding: 15px;
}
.sub-preview-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; }
.sub-badge {
  background: #0F4644;
  color: #FFFFFF;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}
.sub-desc { margin: 0 0 10px; font-size: 0.85rem; color: var(--ink-muted); }
.sub-mock-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sub-plan-chip {
  background: #FFFFFF;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(139, 108, 232, 0.3);
}
.sub-status-chip {
  background: #E8F5E9;
  color: #1E7E45;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
}

.pwa-tip-box {
  margin-top: 12px;
  background: #E2F3F2;
  border-radius: 14px;
  padding: 11px 14px;
  font-size: 0.82rem;
  color: var(--teal);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.reset-zone {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.reset-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 0.85rem; font-weight: 700; }

/* Coming Soon Modal */
.modal-soon { text-align: center; max-width: 440px; }
.soon-emoji { font-size: 3.2rem; margin-bottom: 6px; }
.soon-pill {
  display: inline-block;
  background: var(--lavender-soft);
  color: #5B35C2;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 8px;
}
.modal-soon .modal-actions { justify-content: center; }

/* Trust Footer */
.trust-footer {
  position: relative;
  z-index: 1;
  background: rgba(255, 251, 244, 0.9);
  border-top: 1.5px solid rgba(232, 111, 146, 0.16);
  padding: 16px 18px 26px;
  text-align: center;
}
.trust-inner {
  max-width: 1120px;
  margin: 0 auto 8px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 22px;
}
.trust-item {
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--teal);
}
.footer-note {
  margin: 0;
  font-size: 0.78rem;
  color: var(--ink-muted);
}
.footer-note a { color: var(--rose); font-weight: 700; text-decoration: none; }

/* Mobile Bottom Tab Bar */
.mobile-tabbar {
  display: none;
  position: fixed;
  bottom: 0;
  inset-inline: 0;
  z-index: 60;
  background: rgba(255, 251, 244, 0.96);
  backdrop-filter: blur(12px);
  border-top: 1.5px solid rgba(217, 78, 120, 0.2);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  justify-content: space-around;
  box-shadow: 0 -4px 18px rgba(80, 48, 36, 0.08);
}
.mob-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  border: none;
  background: transparent;
  color: var(--ink-muted);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 5px 8px;
  border-radius: 12px;
  cursor: pointer;
  min-width: 58px;
}
.mob-tab span:first-child { font-size: 1.25rem; line-height: 1; }
.mob-tab.is-active {
  color: var(--rose);
  background: var(--blush);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 120;
  background: #2B1D12;
  color: #FFFBF4;
  padding: 11px 20px;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  max-width: 92vw;
  text-align: center;
}

/* Silent Visual Sparkles */
.sparkle-burst {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 130;
  overflow: hidden;
}
.sparkle-star {
  position: absolute;
  font-size: 1.5rem;
  animation: floatUpSparkle 1.3s ease-out forwards;
}
@keyframes floatUpSparkle {
  0% { opacity: 0; transform: translateY(15px) scale(0.5) rotate(0deg); }
  25% { opacity: 1; transform: translateY(-20px) scale(1.15) rotate(20deg); }
  100% { opacity: 0; transform: translateY(-130px) scale(0.8) rotate(80deg); }
}

/* ================= RESPONSIVE BREAKPOINTS ================= */

/* iPad Landscape (1024px) — compact 3-column dashboard */
@media (max-width: 1160px) {
  .app-shell {
    grid-template-columns: 178px minmax(0, 1fr) 238px;
    gap: 14px;
    padding: 14px 14px 32px;
  }
  .worlds-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
  .world-card { padding: 14px 10px; }
  .world-icon-bubble { width: 52px; height: 52px; font-size: 1.65rem; }
  .hero-copy { padding: 16px 18px; }
  .featured-bottom-row { grid-template-columns: 1.35fr 1fr; }
}

/* iPad Portrait (<= 960px) */
@media (max-width: 960px) {
  .tablet-nav { display: flex; }
  .tablet-nav .nav-item {
    width: auto;
    white-space: nowrap;
    padding: 8px 13px;
    background: #FFFFFF;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
  }
  .tablet-nav .nav-item.is-active {
    background: linear-gradient(135deg, #E86F92 0%, #D94E78 100%);
    border-color: transparent;
  }
  .nav-sidebar { display: none; }
  .app-shell {
    grid-template-columns: minmax(0, 1fr) 248px;
    padding: 14px 14px 36px;
  }
  .worlds-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .featured-bottom-row { grid-template-columns: 1fr; }
  .letters-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .stepping-map { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Mobile (<= 700px) */
@media (max-width: 700px) {
  .topbar-inner { padding: 8px 12px; gap: 8px; }
  .brand-sub { display: none; }
  .brand-title { font-size: 1.02rem; }
  .brand-btn { padding: 4px 11px 4px 6px; gap: 7px; }
  .brand-emblem { width: 34px; height: 34px; }
  .child-pill { padding: 3px 10px 3px 4px; gap: 6px; }
  .avatar-sm { width: 32px; height: 32px; }
  .child-greet { font-size: 0.78rem; }
  .lvl-chip { display: none; }
  .mom-btn { padding: 8px 11px; font-size: 0.78rem; }

  .tablet-nav { display: none; }
  .mobile-tabbar { display: flex; }

  .app-shell {
    grid-template-columns: 1fr;
    padding: 12px 12px 92px;
    gap: 14px;
  }
  .journey-sidebar { position: static; }
  .hero-banner { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-height: 175px; min-height: 160px; }
  .hero-copy { padding: 16px; }
  .worlds-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cards-2col { grid-template-columns: 1fr; }
  .stepping-map { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 14px 10px; }
  .letter-spotlight { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .letter-giant-box { width: 120px; }
  .harakat-row { justify-content: center; }
  .letters-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .mom-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .ayah-text { font-size: 1.32rem; }
  .toast { bottom: 78px; }
  .trust-footer { padding-bottom: 84px; }
}


/* Editorial Polish: crisp Arabic letter badge & non-wrapping header */
.brand-title, .child-greet { white-space: nowrap; }
.ar-ab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #145B59 0%, #1F8480 100%);
  color: #FFFBF4;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.78em;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 8px;
  letter-spacing: 0;
  box-shadow: 0 2px 6px rgba(20, 91, 89, 0.2);
}
.world-icon-bubble .ar-ab-badge {
  font-size: 1.25rem;
  padding: 8px 11px;
  border-radius: 13px;
}
.badge-coin .ar-ab-badge {
  font-size: 0.75rem;
  padding: 4px 5px;
  border-radius: 7px;
}
@media (max-width: 700px) {
  .hero-art img { object-position: 35% top; }
}


/* ==================== QURAN MEMORIZATION STUDIO ==================== */
.surah-head-info { flex: 1; min-width: 0; }
.reciter-switch {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px;
}
.reciter-pill {
  border: 1.5px solid #e7d9cd; background: #fffbf4; color: #5b4332;
  border-radius: 999px; padding: 6px 13px; font-family: inherit; font-size: 0.84rem;
  font-weight: 700; cursor: pointer; transition: all .18s ease;
}
.reciter-pill.is-active {
  background: #145b59; color: #fff; border-color: #145b59;
  box-shadow: 0 4px 12px rgba(20,91,89,.22);
}
.qstudio-tabs {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin: 14px 0 12px; background: #f8efe6; padding: 6px; border-radius: 18px;
}
.qtab {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  border: none; background: transparent; color: #5b4332; border-radius: 13px;
  padding: 10px 8px; font-family: inherit; font-size: 0.9rem; font-weight: 800;
  cursor: pointer; transition: all .18s ease;
}
.qtab.is-active {
  background: #fff; color: #d64e83; box-shadow: 0 4px 12px rgba(43,29,18,.08);
}
.qstudio-body { display: flex; flex-direction: column; gap: 12px; }
.q-stepper-wrap {
  background: #fff; border: 1.5px solid #f0e3d6; border-radius: 16px; padding: 10px 14px;
}
.q-stepper-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px; font-size: 0.85rem; color: #6c5340; font-weight: 700; margin-bottom: 8px;
}
.q-target-switch { display: flex; align-items: center; gap: 6px; }
.q-mini-pill {
  border: 1px solid #e4d4c5; background: #fffbf4; color: #5b4332;
  border-radius: 999px; padding: 3px 10px; font-family: inherit; font-size: 0.8rem;
  font-weight: 700; cursor: pointer;
}
.q-mini-pill.is-on { background: #f4b942; color: #2b1d12; border-color: #e2a225; }
.q-dots-row { display: flex; flex-wrap: wrap; gap: 6px; }
.q-ayah-dot {
  width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid #e5d5c6;
  background: #fffbf4; color: #5b4332; font-family: inherit; font-weight: 800;
  font-size: 0.85rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.q-ayah-dot.is-current { border-color: #d64e83; background: #fceaf1; color: #b73569; transform: scale(1.08); }
.q-ayah-dot.is-done { background: #1c8b6d; border-color: #1c8b6d; color: #fff; }
.q-turn-banner {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border-radius: 18px; background: linear-gradient(135deg, #fff5e6, #fceaf1);
  border: 1.5px solid #f5d3c1; transition: all .22s ease;
}
.q-turn-banner.is-turn {
  background: linear-gradient(135deg, #fff3c4, #ffe3ee);
  border-color: #f4b942; box-shadow: 0 6px 20px rgba(244,185,66,.26);
}
.q-turn-banner.is-done {
  background: linear-gradient(135deg, #e5f8f0, #fff8dc); border-color: #36b385;
}
.q-turn-avatar {
  width: 52px; height: 52px; border-radius: 50%; object-fit: cover;
  border: 2.5px solid #fff; box-shadow: 0 3px 10px rgba(43,29,18,.12); flex-shrink: 0;
}
.q-turn-copy { flex: 1; min-width: 0; }
.q-turn-copy strong { display: block; font-size: 0.95rem; color: #2b1d12; margin-bottom: 4px; }
.q-rep-stars { display: flex; align-items: center; gap: 4px; font-size: 1.15rem; }
.q-rep-count { font-size: 0.82rem; font-weight: 800; color: #6c5340; margin-right: 6px; }
.q-focus-card {
  background: #fffdf8; border: 2px solid #ecd9b9; border-radius: 22px;
  padding: 20px 16px; text-align: center;
  box-shadow: inset 0 0 0 4px #fff8ec, 0 8px 24px rgba(43,29,18,.06);
}
.q-focus-basmalah {
  font-family: 'Amiri Quran', 'Amiri', serif; font-size: 1.25rem; color: #145b59;
  margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px dashed #e6d5be;
}
.q-focus-ayah {
  font-family: 'Amiri Quran', 'Amiri', serif; font-size: clamp(1.55rem, 4.2vw, 2.25rem);
  line-height: 2.15; color: #1f140d; padding: 10px 6px 14px;
}
.q-inline-num { display: inline-flex; vertical-align: middle; margin-right: 6px; }
.q-focus-actions {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 6px;
}
.q-big-btn { padding: 10px 16px; font-size: 0.92rem; border-radius: 14px; font-weight: 800; }
.btn-rec-live {
  background: #dc3545; color: #fff; border: none; cursor: pointer; font-family: inherit;
  animation: pulseRec 1.1s infinite;
}
@keyframes pulseRec {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220,53,69,.45); }
  50% { box-shadow: 0 0 0 10px rgba(220,53,69,0); }
}
.q-status-line {
  margin-top: 10px; font-size: 0.85rem; color: #6c5340; font-weight: 600;
}
.q-nav-arrows {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
}
.btn-sm { padding: 7px 12px; font-size: 0.83rem; }
.q-full-mushaf { margin-top: 4px; }
.q-full-bar { display: flex; gap: 8px; margin-bottom: 10px; }

/* Stage 2: Order Puzzle */
.q-game-intro {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
  background: #f5f0ff; border: 1.5px solid #dfd3ff; border-radius: 16px; padding: 12px 14px;
}
.q-game-intro strong { display: block; color: #4e3199; font-size: 0.96rem; margin-bottom: 2px; }
.q-game-intro p { margin: 0; font-size: 0.84rem; color: #5b4a7a; }
.q-round-pill {
  background: #145B59; color: #fff; border-radius: 999px; padding: 4px 12px;
  font-size: 0.8rem; font-weight: 800;
}
.q-placed-box {
  background: #fffdf8; border: 1.5px dashed #d8c29e; border-radius: 18px;
  padding: 12px; display: flex; flex-direction: column; gap: 8px;
}
.q-box-label { font-size: 0.84rem; font-weight: 800; color: #7a5c3e; }
.q-placed-empty { text-align: center; padding: 14px; color: #9c8269; font-size: 0.9rem; }
.q-placed-item {
  display: flex; align-items: center; gap: 10px; background: #ebfaf3;
  border: 1.5px solid #a7e4c8; border-radius: 14px; padding: 8px 12px;
}
.q-placed-text {
  flex: 1; font-family: 'Amiri Quran', 'Amiri', serif; font-size: 1.25rem; line-height: 1.8; color: #16473a;
}
.q-placed-ok { color: #16805e; font-weight: 900; }
.q-feedback-pill {
  text-align: center; background: #fff6d9; border: 1px solid #f4cc66; color: #704e05;
  border-radius: 12px; padding: 8px 12px; font-size: 0.88rem; font-weight: 700;
}
.q-tiles-grid { display: flex; flex-direction: column; gap: 8px; }
.q-order-tile {
  display: flex; align-items: stretch; gap: 8px;
}
.q-tile-listen {
  width: 48px; flex-shrink: 0; border-radius: 14px; border: 1.5px solid #cbe4e2;
  background: #eaf7f6; font-size: 1.15rem; cursor: pointer;
}
.q-tile-listen:hover { background: #d4f0ee; }
.q-tile-pick {
  flex: 1; text-align: right; border-radius: 14px; border: 1.5px solid #eed8e3;
  background: #fff; padding: 10px 14px; font-family: 'Amiri Quran', 'Amiri', serif;
  font-size: 1.28rem; line-height: 1.85; color: #2b1d12; cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.q-tile-pick:hover { border-color: #d64e83; background: #fff6fa; transform: translateY(-1px); }

/* Stage 3: Quiz */
.q-quiz-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.88rem; font-weight: 800; color: #6c5340;
}
.q-qdots { display: flex; gap: 6px; }
.q-qdot { width: 10px; height: 10px; border-radius: 50%; background: #e6d7c8; }
.q-qdot.is-cur { background: #d64e83; transform: scale(1.2); }
.q-qdot.is-done { background: #1c8b6d; }
.q-quiz-card {
  background: #fffdf8; border: 2px solid #ecd9b9; border-radius: 22px;
  padding: 18px 16px; text-align: center;
}
.q-quiz-prompt { margin: 0 0 10px; font-size: 0.92rem; font-weight: 700; color: #6c5340; }
.q-quiz-ayah {
  font-family: 'Amiri Quran', 'Amiri', serif; font-size: clamp(1.45rem, 4vw, 2.05rem);
  line-height: 2.1; color: #1f140d; margin-bottom: 12px;
}
.q-blank {
  display: inline-block; min-width: 90px; padding: 0 10px; margin-right: 4px;
  border-bottom: 3px dashed #e29f24; color: #b57707; border-radius: 8px; background: #fff6dc;
}
.q-blank.is-solved {
  border-bottom-color: #1c8b6d; color: #12694f; background: #e4f8f0;
}
.q-quiz-opts {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px;
}
.q-quiz-opt {
  border: 2px solid #ebd9e4; background: #fff; border-radius: 16px; padding: 12px 8px;
  font-family: 'Amiri Quran', 'Amiri', serif; font-size: 1.4rem; color: #2b1d12;
  cursor: pointer; transition: all .16s ease;
}
.q-quiz-opt:hover:not(:disabled) { border-color: #145B59; background: #f6f2ff; transform: translateY(-2px); }
.q-quiz-opt.is-right { border-color: #1c8b6d; background: #e4f8f0; color: #0f5f47; }
.q-quiz-opt.is-wrong { border-color: #e06b6b; background: #ffeded; color: #9c2b2b; }
.q-quiz-next-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed #ead8c5;
}
.q-quiz-result { font-weight: 800; color: #145b59; font-size: 0.94rem; }
.q-win-box {
  text-align: center; background: linear-gradient(135deg, #fff8e2, #fceef5);
  border: 2px solid #f4c65b; border-radius: 20px; padding: 20px 16px;
}
.q-win-trophy { font-size: 2.5rem; margin-bottom: 6px; }
.q-win-box h3 { margin: 0 0 6px; color: #2b1d12; }
.q-win-box p { margin: 4px 0; color: #5b4332; font-size: 0.92rem; }
.q-win-tip { font-weight: 700; color: #145b59 !important; }
.q-win-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 14px; }

@media (max-width: 560px) {
  .qstudio-tabs { gap: 4px; padding: 4px; }
  .qtab { font-size: 0.8rem; padding: 8px 4px; flex-direction: column; gap: 2px; }
  .q-quiz-opts { grid-template-columns: 1fr; }
}


/* ==================== STAGE 2: MEANINGS TREASURE GAME ==================== */
.m-top-banner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px; padding: 11px 14px; border-radius: 18px;
  background: linear-gradient(135deg, #fff4d6, #fceaf3);
  border: 1.5px solid #f4d28b;
}
.m-top-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.m-top-title strong { font-size: 1rem; color: #52340b; }
.m-source-badge {
  background: #fff; color: #145b59; border: 1px solid #cce6e4;
  border-radius: 999px; padding: 3px 10px; font-size: 0.78rem; font-weight: 800;
}
.m-gems-row { display: flex; align-items: center; gap: 4px; font-size: 1.05rem; }
.m-step-num { font-size: 0.82rem; font-weight: 800; color: #6c5340; margin-right: 4px; }
.m-scroll-card {
  background: linear-gradient(180deg, #fffdf8, #fff6e5);
  border: 2.5px solid #efd29c; border-radius: 24px; padding: 18px 16px;
  text-align: center; box-shadow: 0 8px 22px rgba(212,155,45,.12);
}
.m-ask-pill {
  display: inline-block; background: #145b59; color: #fff;
  border-radius: 999px; padding: 4px 14px; font-size: 0.82rem; font-weight: 800;
  margin-bottom: 10px;
}
.m-big-word {
  font-family: 'Amiri Quran', 'Amiri', serif; font-size: clamp(1.9rem, 5.5vw, 2.7rem);
  line-height: 1.75; color: #9c3060; font-weight: 700; margin: 4px 0 12px;
}
.m-ayah-chip {
  display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 8px; background: #fff; border: 1.5px solid #ece0d0; border-radius: 16px;
  padding: 8px 12px; max-width: 100%;
}
.m-listen-btn {
  border: none; background: #145b59; color: #fff; border-radius: 999px;
  padding: 5px 12px; font-family: inherit; font-size: 0.82rem; font-weight: 800;
  cursor: pointer; flex-shrink: 0;
}
.m-ayah-preview {
  font-family: 'Amiri Quran', 'Amiri', serif; font-size: 1.15rem; color: #473426; line-height: 1.7;
}
.m-feedback {
  text-align: center; border-radius: 14px; padding: 10px 14px;
  font-size: 0.92rem; font-weight: 800;
}
.m-feedback.is-ok { background: #e5f8f0; border: 1.5px solid #63cba0; color: #0e5c44; }
.m-feedback.is-try { background: #fff5dc; border: 1.5px solid #f4c663; color: #754e06; }
.m-choices-grid {
  display: grid; grid-template-columns: 1fr; gap: 10px;
}
.m-choice-card {
  display: flex; align-items: center; gap: 12px; text-align: right;
  border-radius: 18px; padding: 14px 16px; border: 2px solid transparent;
  font-family: inherit; font-size: 0.98rem; font-weight: 800; color: #2b1d12;
  cursor: pointer; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
  box-shadow: 0 4px 12px rgba(43,29,18,.05);
}
.m-card-mint { background: linear-gradient(135deg, #ebf9f3, #f6fdf9); border-color: #bcebd7; }
.m-card-sky { background: linear-gradient(135deg, #edf5ff, #f7fbff); border-color: #c2dcff; }
.m-card-peach { background: linear-gradient(135deg, #fff0f5, #fff8f2); border-color: #f6cce0; }
.m-choice-card:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(43,29,18,.1); }
.m-choice-card.is-correct {
  background: linear-gradient(135deg, #d7f7e8, #e9fcf3) !important;
  border-color: #1c8b6d !important; color: #0b4f3a; transform: scale(1.01);
}
.m-choice-card.is-tried-wrong { opacity: 0.52; background: #f7f3ef !important; border-color: #e2d8ce !important; }
.m-choice-card.is-faded { opacity: 0.55; }
.m-choice-ico {
  width: 36px; height: 36px; border-radius: 12px; background: rgba(255,255,255,.85);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0; box-shadow: 0 2px 6px rgba(0,0,0,.05);
}
.m-choice-txt { flex: 1; line-height: 1.5; }
.m-next-bar { display: flex; justify-content: center; margin-top: 4px; }
.m-review-card {
  text-align: right; background: #fff; border: 1.5px solid #edd9be;
  border-radius: 16px; padding: 12px 14px; margin: 12px 0;
  display: flex; flex-direction: column; gap: 8px;
}
.m-review-title { font-size: 0.86rem; font-weight: 800; color: #145b59; margin-bottom: 2px; }
.m-review-row {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px;
  font-size: 0.9rem; border-bottom: 1px dashed #f1e4d6; padding-bottom: 6px;
}
.m-review-row:last-child { border-bottom: none; padding-bottom: 0; }
.m-review-word { font-family: 'Amiri Quran', 'Amiri', serif; font-size: 1.2rem; font-weight: 700; color: #9c3060; }
.m-review-sep { color: #b79c84; }
.m-review-def { color: #3d2c1e; font-weight: 600; }


/* ==================== MEADOW LETTER TRACING STUDIO ==================== */
.lt-section { margin: 14px 0 18px; }
.lt-meadow {
  border-radius: 26px;
  padding: 16px;
  background: radial-gradient(circle at 50% 35%, #b8f04f 0%, #86d635 60%, #68bc25 100%);
  border: 3px solid #fff;
  box-shadow: 0 12px 30px rgba(72, 145, 25, 0.22), inset 0 0 0 3px rgba(255,255,255,0.38);
  position: relative;
  overflow: hidden;
}
.lt-meadow-top {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 10px;
}
.lt-head-copy { text-align: center; flex: 1; }
.lt-head-copy h3 {
  margin: 0; font-family: var(--font-display, 'Almarai', sans-serif);
  font-size: 1.35rem; color: #194d1a;
  text-shadow: 0 1px 0 rgba(255,255,255,0.65);
}
.lt-name-tag { font-size: 1rem; opacity: 0.85; }
.lt-head-copy p {
  margin: 2px 0 0; font-size: 0.88rem; font-weight: 800; color: #21571e;
}
.lt-round-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 3px solid #fff;
  background: linear-gradient(180deg, #ff9d3b, #e86b24);
  color: #fff; font-size: 1.2rem; cursor: pointer; flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.16);
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .15s ease;
}
.lt-round-btn:hover { transform: scale(1.08); }
.lt-stage-wrap {
  position: relative;
  background: radial-gradient(circle at center, rgba(255,255,255,0.22), rgba(255,255,255,0.04));
  border-radius: 20px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.lt-svg {
  display: block;
  width: 100%;
  max-width: 520px;
  height: auto;
  margin: 0 auto;
  touch-action: none;
  cursor: crosshair;
}
.lt-pulse-ring {
  animation: ltPulse 1.2s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}
@keyframes ltPulse {
  0%, 100% { transform: scale(0.92); opacity: 0.7; }
  50% { transform: scale(1.22); opacity: 0.25; }
}
.lt-win-overlay {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  background: rgba(255, 253, 245, 0.94); border: 2.5px solid #f4b942;
  border-radius: 20px; padding: 12px 16px; margin-top: 8px;
  box-shadow: 0 8px 22px rgba(43,29,18,0.14);
}
.lt-win-pill { font-size: 1.05rem; font-weight: 800; color: #145b59; }
.lt-win-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }

/* mother corner details */
.mom-details { margin: 14px 0; padding: 12px; background: #fff7fa; border-radius: 16px; border: 1px solid #f3d3df; }
.mom-details h3 { margin: 0 0 8px; font-size: 1rem; }
.mom-row { margin-bottom: 10px; }
.mom-row-head { display: flex; justify-content: space-between; font-size: 0.85rem; }
.mom-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.mom-chip { background: #fff; border: 1px solid #f0c4d4; border-radius: 999px; padding: 3px 10px; font-size: 0.78rem; }
.mom-empty, .mom-note { margin: 4px 0 0; font-size: 0.76rem; color: var(--ink-muted); }

/* Surah modal: back bar stays visible while scrolling */
.surah-backbar { position: sticky; top: 0; z-index: 8; margin: -24px -24px 12px; padding: 10px 16px; background: var(--cream, #FFF8EE); border-bottom: 1px solid rgba(244,185,66,.35); border-radius: 18px 18px 0 0; }
.surah-back-btn { font-family: inherit; font-weight: 800; font-size: 1rem; color: #fff; background: #1d5b57; border: 0; border-radius: 999px; padding: 10px 18px; min-height: 44px; cursor: pointer; box-shadow: 0 3px 0 rgba(0,0,0,.15); }
.modal-surah > .modal-close { display: none; }

.store-strip { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:14px 0; padding:12px 16px; text-decoration:none; background:linear-gradient(135deg,#FFF7E2 0%,#FCEAF1 100%); border:2px solid rgba(244,185,66,.45); border-radius:var(--radius-lg); box-shadow:var(--shadow-sm); color:#7C2340; }
.store-strip-text { display:flex; flex-direction:column; gap:2px; text-align:start; }
.store-strip-text b { font-size:1rem; font-weight:800; }
.store-strip-text small { font-size:.78rem; color:var(--ink-muted); }
.store-strip-go { flex:none; background:#fff; color:var(--teal); border:1.5px solid rgba(20,91,89,.25); border-radius:999px; padding:8px 14px; font-weight:800; font-size:.85rem; }
