:root {
  --emerald-950: #022c17;
  --emerald-900: #054726;
  --emerald-800: #086636;
  --emerald-700: #0b8a42;
  --emerald-600: #10a34a;
  --emerald-500: #16c64f;
  --emerald-100: #dcfce7;
  --gold-500: #facc15;
  --gold-400: #fde047;
  --surface: #f4f7f5;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Plus Jakarta Sans', 'Segoe UI', Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  min-height: 100%;
  background: var(--surface);
  color: var(--ink);
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
button { border: none; outline: none; background: none; font-family: inherit; cursor: pointer; }

.app-shell {
  width: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--surface);
}

.main-column {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  flex: 1;
}

.desktop-sidebar, .desktop-topbar { display: none; }

.app-header {
  height: calc(56px + var(--safe-top));
  padding: var(--safe-top) 14px 0;
  background: #054726;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: 0 2px 10px rgba(2, 44, 23, 0.22);
}

.app-header.transparent { background: transparent; box-shadow: none; position: relative; }
.app-header-title { font-size: 17.5px; font-weight: 800; }

.icon-circle-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.screen-content {
  flex: 1;
  width: 100%;
  padding-bottom: calc(116px + var(--safe-bottom));
}

.hero-banner {
  background: linear-gradient(180deg, #03331b 0%, #0b7a3c 66%, #cbead8 100%);
  padding: calc(10px + var(--safe-top)) 16px 26px;
  color: #ffffff;
  text-align: center;
  border-bottom-left-radius: 30px;
  border-bottom-right-radius: 30px;
}

.brand-headline { font-size: 27px; font-weight: 900; line-height: 1.06; margin-top: 6px; }
.brand-subtitle { color: var(--gold-500); font-size: 12.5px; font-weight: 700; margin-top: 4px; }
.hero-action-bar { display: flex; align-items: flex-end; justify-content: space-between; margin-top: 18px; text-align: left; gap: 10px; }
.hero-tagline { font-size: 17px; font-weight: 800; line-height: 1.22; }

.play-pill-btn {
  background: linear-gradient(135deg, #16c64f, #077436);
  color: #ffffff;
  font-weight: 800;
  font-size: 14px;
  padding: 12px 20px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 20px rgba(2, 44, 23, 0.3);
}

.launcher-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; padding: 14px 14px 6px; }
.launcher-tile {
  background: #ffffff;
  border-radius: 20px;
  padding: 15px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  box-shadow: 0 4px 14px rgba(6, 78, 43, 0.06);
  border: 1px solid #e6eee9;
}
.launcher-icon { width: 46px; height: 46px; border-radius: 15px; display: flex; align-items: center; justify-content: center; font-size: 23px; }
.launcher-title { font-size: 11.5px; font-weight: 800; line-height: 1.22; color: #0f172a; }

.section-wrap { padding: 12px 14px 16px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.section-head h3 { font-size: 16px; font-weight: 800; }
.link-more { font-size: 12.5px; font-weight: 800; color: var(--emerald-700); }

.app-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 14px;
  box-shadow: 0 4px 14px rgba(6, 78, 43, 0.06);
  border: 1px solid #e6eee9;
  margin-bottom: 12px;
}

.segment-tabs { display: flex; background: #ffffff; border-bottom: 1px solid #e2e8f0; }
.segment-tab { flex: 1; text-align: center; padding: 13px 6px; font-size: 13px; font-weight: 800; color: #64748b; border-bottom: 3px solid transparent; }
.segment-tab.active { color: var(--emerald-700); border-bottom-color: var(--emerald-700); }

.primary-pill-btn {
  width: 100%;
  background: linear-gradient(135deg, #12b347, #066e32);
  color: #ffffff;
  font-weight: 800;
  font-size: 15.5px;
  padding: 14px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 18px rgba(11, 138, 66, 0.25);
}

/* ==========================================================================
   AUDIOBOOK EPISODE PLAYER & EPISODE LIST
   ========================================================================== */
.player-hero-card {
  background: linear-gradient(180deg, #03331b 0%, #0b8a42 100%);
  color: #ffffff;
  border-radius: 24px;
  padding: 22px 18px;
  text-align: center;
  box-shadow: 0 10px 26px rgba(3, 51, 27, 0.22);
  margin-bottom: 14px;
}

.book-selector-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 12px;
}

.book-chip {
  padding: 8px 14px;
  border-radius: 999px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  font-size: 12.5px;
  font-weight: 800;
  color: #334155;
  white-space: nowrap;
}

.book-chip.active {
  background: #054726;
  border-color: #054726;
  color: #fde047;
}

.progress-wrap {
  margin: 14px 0 6px;
}

.progress-slider {
  width: 100%;
  accent-color: #fde047;
  height: 6px;
  border-radius: 999px;
  cursor: pointer;
}

.time-row {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
}

.transport-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.ctrl-btn {
  height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-weight: 800;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.12s ease, background 0.15s ease;
}

.ctrl-btn:active {
  transform: scale(0.93);
}

.ctrl-play-main {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #facc15;
  color: #032b16;
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.ctrl-next-btn {
  background: #16c64f;
  color: #ffffff;
  padding: 0 18px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.up-next-banner {
  margin-top: 14px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 16px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  cursor: pointer;
}

.up-next-banner:hover {
  background: rgba(255, 255, 255, 0.2);
}

.episode-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.episode-row {
  background: #ffffff;
  border-radius: 18px;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1.5px solid #e2e8f0;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.04);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}

.episode-row:active {
  transform: scale(0.985);
}

.episode-row.playing {
  border-color: #16a34a;
  background: #f0fdf4;
}

.ep-badge {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: #e2e8f0;
  color: #0f172a;
  font-weight: 900;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.episode-row.playing .ep-badge {
  background: #16a34a;
  color: #ffffff;
}

.ep-play-pill {
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: #dcfce7;
  color: #15803d;
  white-space: nowrap;
}

.episode-row.playing .ep-play-pill {
  background: #16a34a;
  color: #ffffff;
}

/* ==========================================================================
   FIXED FLOATING WAVE FOOTER DOCK — VISIBLE ON ALL SCREENS
   ========================================================================== */
.floating-dock-wrapper {
  display: block;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  padding: 0 12px calc(12px + var(--safe-bottom));
  pointer-events: none;
}

.floating-dock-backdrop {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 140px;
  background: linear-gradient(180deg, rgba(244, 247, 245, 0) 0%, rgba(187, 247, 208, 0.42) 60%, rgba(134, 239, 172, 0.56) 100%);
  pointer-events: none;
  z-index: -1;
}

.floating-dock-bar {
  pointer-events: auto;
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  height: 70px;
  background: #ffffff;
  border-radius: 28px;
  display: grid;
  grid-template-columns: 1fr 1fr 80px 1fr 1fr;
  align-items: center;
  padding: 0 8px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16), 0 3px 10px rgba(22, 163, 74, 0.14);
  border: 1px solid rgba(226, 232, 240, 0.95);
}

.dock-item {
  position: relative;
  height: 58px;
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 800;
  color: #475569;
}

.dock-item svg {
  width: 23px;
  height: 23px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dock-item.active {
  background: #dcfce7;
  color: #15803d;
}

.dock-item.active svg {
  fill: #16a34a;
  stroke: #15803d;
}

.dock-item.active::after {
  content: '';
  position: absolute;
  bottom: 5px;
  width: 26px;
  height: 3.5px;
  border-radius: 999px;
  background: #16a34a;
}

.dock-center-slot { position: relative; display: flex; align-items: center; justify-content: center; height: 100%; }

.dock-center-fab {
  position: absolute;
  top: -24px;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #4ade80 0%, #16a34a 58%, #066e32 100%);
  border: 4px solid #ffffff;
  box-shadow: 0 10px 24px rgba(22, 163, 74, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.dock-center-fab svg { width: 31px; height: 31px; fill: #ffffff; }

/* Shared Helpers */
.form-group { margin-bottom: 13px; }
.form-group label { display: block; font-size: 12px; font-weight: 800; color: #334155; margin-bottom: 5px; }
.input-box { position: relative; }
.input-box input { width: 100%; height: 48px; border: 1.5px solid #cbd5e1; border-radius: 14px; padding: 0 44px 0 42px; font-size: 14.5px; background: #f8fafc; }
.input-prefix { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 16px; }
.input-suffix-btn { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 16px; padding: 4px; }
.telco-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.telco-chip { height: 44px; border-radius: 12px; border: 1.5px solid #e2e8f0; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 12px; cursor: pointer; }
.telco-chip.selected { border-color: #054726; box-shadow: 0 0 0 2px #16c64f; }
.telco-mtn { background: #facc15; color: #0f172a; }
.telco-airtel { background: #fff; color: #dc2626; }
.telco-glo { background: #16a34a; color: #fff; }
.telco-9mobile { background: #ecfdf5; color: #047857; }
.balance-card { background: linear-gradient(135deg, #16a34a, #057a37); border-radius: 20px; padding: 18px; color: #fff; display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.action-4grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.action-tile { background: #fff; border-radius: 14px; padding: 11px 4px; text-align: center; border: 1px solid #e2e8f0; }
.action-dot { width: 32px; height: 32px; border-radius: 50%; margin: 0 auto 5px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; }
.action-txt { font-size: 11px; font-weight: 800; }
.badge-pill { background: #16a34a; color: #fff; font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px; }
.user-avatar { width: 68px; height: 68px; border-radius: 50%; background: linear-gradient(135deg, #2563eb, #1d4ed8); color: #fff; font-weight: 900; font-size: 22px; display: flex; align-items: center; justify-content: center; border: 3px solid #16a34a; margin: 0 auto 10px; }
.switch-pill { width: 46px; height: 26px; border-radius: 999px; background: #16a34a; position: relative; display: inline-block; cursor: pointer; }
.switch-pill.off { background: #cbd5e1; }
.switch-pill::after { content: ''; width: 20px; height: 20px; border-radius: 50%; background: #fff; position: absolute; top: 3px; right: 3px; }
.switch-pill.off::after { right: 23px; }
.feedback-msg { margin-top: 10px; font-size: 13px; font-weight: 700; text-align: center; color: #0b8a42; min-height: 18px; }
.shop-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.books-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }

@media (min-width: 768px) {
  .hero-banner { padding: 20px 28px 34px; border-bottom-left-radius: 36px; border-bottom-right-radius: 36px; }
  .brand-headline { font-size: 34px; }
  .launcher-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 20px 24px 8px; }
  .section-wrap { padding: 16px 24px 24px; }
  .books-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .shop-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
}

@media (min-width: 1100px) {
  .app-shell { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
  .app-header { display: none; }
  .desktop-sidebar {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(180deg, #03331b 0%, #054726 100%);
    color: #ffffff;
    padding: 22px 16px;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 40;
  }
  .sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.12); margin-bottom: 14px; }
  .sidebar-brand-title { font-size: 16px; font-weight: 900; line-height: 1.15; }
  .sidebar-brand-sub { font-size: 11px; color: var(--gold-500); font-weight: 700; margin-top: 2px; }
  .sidebar-nav { display: flex; flex-direction: column; gap: 6px; }
  .sidebar-link { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 14px; font-size: 14px; font-weight: 700; color: rgba(255, 255, 255, 0.85); }
  .sidebar-link.active { background: #16a34a; color: #ffffff; }
  .desktop-topbar { display: flex; align-items: center; justify-content: space-between; height: 64px; background: #ffffff; border-bottom: 1px solid #e2e8f0; padding: 0 28px; position: sticky; top: 0; z-index: 30; }
  .desktop-page-title { font-size: 19px; font-weight: 900; color: #0f172a; }
  .floating-dock-wrapper { left: 264px; right: 0; }
  .floating-dock-backdrop { left: 264px; }
  .hero-banner { border-radius: 24px; margin: 20px 28px 8px; padding: 26px 32px; text-align: left; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
  .hero-banner .app-header.transparent { display: none; }
  .hero-action-bar { margin-top: 0; align-items: center; gap: 22px; }
  .launcher-grid { grid-template-columns: repeat(6, 1fr); gap: 14px; padding: 16px 28px 8px; }
  .section-wrap { padding: 16px 28px 32px; }
  .player-desktop-grid { display: grid; grid-template-columns: 380px 1fr; gap: 20px; align-items: start; }
}
