/* Global Responsive Mobile Reset & Overflow Containment */
html {
  overflow-x: hidden !important;
  max-width: 100vw !important;
  box-sizing: border-box;
}
body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
  width: 100% !important;
  position: relative;
  box-sizing: border-box;
}
*, *:before, *:after {
  box-sizing: border-box;
}
/* Trade Cost Pro Custom Styles — Professional Light Theme */

/* Custom scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(241, 245, 249, 0.8);
}

::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.6);
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.6);
}

/* Tabular numerals for currency alignment */
.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
/* Hide scrollbar for IE, Edge and Firefox */
.no-scrollbar {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

/* Category Pill Badges */
.cat-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.68rem;
  font-weight: 500;
  white-space: nowrap;
}

.cat-salary { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.cat-food { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.cat-upi { background: #eef2ff; color: #4338ca; border: 1px solid #c7d2fe; }
.cat-transfer { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.cat-shopping { background: #fdf2f8; color: #be185d; border: 1px solid #fbcfe8; }
.cat-utilities { background: #f0fdfa; color: #0f766e; border: 1px solid #99f6e4; }
.cat-atm { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.cat-other { background: #f8fafc; color: #475569; border: 1px solid #e2e8f0; }

/* Table Row Hover */
.txn-row:hover {
  background-color: #f8fafc !important;
}

/* Editable cell hover cue */
.editable-cell {
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.15s ease;
}

.editable-cell:hover {
  background: rgba(99, 102, 241, 0.08);
  outline: 1px dashed rgba(99, 102, 241, 0.5);
}

.editable-cell:focus {
  background: #ffffff;
  outline: 2px solid #6366f1;
  color: #0f172a;
}

/* Loading Pulse */
@keyframes shimmer {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

.loading-shimmer {
  animation: shimmer 1.5s infinite ease-in-out;
}

/* ============================================================
   Mobile App-Like Experience Styles (Fintech Native Look & Feel)
   ============================================================ */

/* Hide scrollbar for clean horizontal chip scroll */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* iOS Safe Area Padding */
.pb-safe {
  padding-bottom: calc(5rem + env(safe-area-inset-bottom, 16px));
}

/* Touch feedback */
.touch-active {
  transition: transform 0.1s ease, background-color 0.1s ease;
  -webkit-tap-highlight-color: transparent;
}
.touch-active:active {
  transform: scale(0.97);
}

/* Fintech Digital Wallet Card */
.fintech-card {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #0f172a 100%);
  position: relative;
  overflow: hidden;
}
.fintech-card::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 120%;
  height: 120%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.25) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}

/* Mobile Transaction Item Card */
.mobile-txn-card {
  transition: all 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.mobile-txn-card:active {
  background-color: #f1f5f9;
  transform: scale(0.985);
}

/* Mobile Bottom Sheet Drawer */
.drawer-backdrop {
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.drawer-sheet {
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

/* Bottom Nav Glass */
.mobile-bottom-nav {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

/* Animated stripes for background parser progress bar */
@keyframes progressStripes {
  from { background-position: 1rem 0; }
  to { background-position: 0 0; }
}

.animate-stripes {
  background-image: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.25) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.25) 50%,
    rgba(255, 255, 255, 0.25) 75%,
    transparent 75%,
    transparent
  );
  background-size: 1rem 1rem;
  animation: progressStripes 1s linear infinite;
}

/* ============================================================
   Parse Progress Modal — Cartoon Mascot & Animated Loader
   ============================================================ */

/* Modal entrance slide-up */
.parse-modal-card {
  animation: parseModalSlideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes parseModalSlideUp {
  from { opacity: 0; transform: translateY(40px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* --- Cartoon Document Mascot (SVG Character) --- */
.mascot-svg-animated {
  animation: mascotBounce 2.4s ease-in-out infinite;
  transform-origin: center bottom;
}
@keyframes mascotBounce {
  0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
  25% { transform: translateY(-7px) rotate(-3deg) scale(1.02); }
  50% { transform: translateY(-2px) rotate(0deg) scale(0.99); }
  75% { transform: translateY(-9px) rotate(3deg) scale(1.02); }
}

/* Eye Pupils Looking Around */
.mascot-pupil {
  animation: pupilExplore 3.2s ease-in-out infinite;
  transform-origin: center;
}
@keyframes pupilExplore {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(3px, -2px); }
  45% { transform: translate(-3px, 1px); }
  65% { transform: translate(2px, 3px); }
  85% { transform: translate(-2px, -2px); }
}

/* Happy Smiling Mouth Talking */
.mascot-happy-mouth {
  animation: mouthSmileTalk 2s ease-in-out infinite;
  transform-origin: center;
}
@keyframes mouthSmileTalk {
  0%, 100% { transform: scale(1); }
  35% { transform: scale(1.15, 1.3); }
  70% { transform: scale(0.9, 0.85); }
}

/* Waving Left Hand */
.mascot-hand-left {
  animation: handWave 1.8s ease-in-out infinite;
  transform-origin: 22px 62px;
}
@keyframes handWave {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-18deg); }
  75% { transform: rotate(14deg); }
}

/* Magnifying Glass Searching Motion */
.mascot-magnifier-arm {
  animation: magnifierSearch 2.6s ease-in-out infinite;
  transform-origin: 94px 62px;
}
@keyframes magnifierSearch {
  0%, 100% { transform: rotate(0deg) translate(0, 0); }
  30% { transform: rotate(-14deg) translate(-10px, -6px) scale(1.08); }
  60% { transform: rotate(10deg) translate(4px, 2px) scale(0.96); }
}

/* Cute Floating Coin */
.mascot-floating-coin {
  animation: coinBob 2s ease-in-out infinite;
  transform-origin: 20px 28px;
}
@keyframes coinBob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(15deg); }
}

/* SVG Line Shimmers */
.svg-line-shimmer {
  animation: svgLinePulse 1.8s ease-in-out infinite;
}
.svg-line-shimmer-delay-1 {
  animation: svgLinePulse 1.8s ease-in-out infinite 0.4s;
}
@keyframes svgLinePulse {
  0%, 100% { opacity: 0.4; fill: #E2E8F0; }
  50% { opacity: 1; fill: #818CF8; }
}

/* --- Floating Sparkle Particles --- */
.sparkle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  pointer-events: none;
}
.sparkle-1 { top: 15%; left: 10%; background: #818cf8; animation: sparkleFloat 3s ease-in-out infinite; }
.sparkle-2 { top: 25%; right: 12%; background: #a78bfa; animation: sparkleFloat 3.5s ease-in-out infinite 0.3s; width: 5px; height: 5px; }
.sparkle-3 { bottom: 30%; left: 8%; background: #c084fc; animation: sparkleFloat 4s ease-in-out infinite 0.6s; width: 4px; height: 4px; }
.sparkle-4 { bottom: 20%; right: 15%; background: #6366f1; animation: sparkleFloat 3.2s ease-in-out infinite 0.9s; width: 7px; height: 7px; }
.sparkle-5 { top: 40%; left: 20%; background: #f0abfc; animation: sparkleFloat 3.8s ease-in-out infinite 1.2s; width: 4px; height: 4px; }
.sparkle-6 { top: 60%; right: 20%; background: #93c5fd; animation: sparkleFloat 4.2s ease-in-out infinite 0.5s; width: 5px; height: 5px; }
.sparkle-7 { top: 10%; left: 50%; background: #fbbf24; animation: sparkleFloat 3.3s ease-in-out infinite 1.5s; width: 5px; height: 5px; }
.sparkle-8 { bottom: 10%; left: 40%; background: #34d399; animation: sparkleFloat 3.7s ease-in-out infinite 0.8s; width: 4px; height: 4px; }

@keyframes sparkleFloat {
  0%, 100% { opacity: 0; transform: translateY(0) scale(0.5); }
  20% { opacity: 0.8; transform: translateY(-12px) scale(1); }
  50% { opacity: 0.6; transform: translateY(-20px) scale(0.8); }
  80% { opacity: 0.3; transform: translateY(-30px) scale(0.6); }
}

/* --- Blob Background Animation --- */
@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(12px, -8px) scale(1.1); }
  66% { transform: translate(-8px, 12px) scale(0.95); }
}
.animate-blob { animation: blobFloat 7s ease-in-out infinite; }
.animation-delay-2s { animation-delay: 2s; }
.animation-delay-4s { animation-delay: 4s; }

/* --- Neon Glow Progress Bar --- */
.parse-progress-fill {
  background: linear-gradient(90deg, #6366f1, #8b5cf6, #a855f7, #6366f1);
  background-size: 300% 100%;
  animation: progressGradientMove 2s linear infinite;
  box-shadow:
    0 0 8px rgba(99, 102, 241, 0.4),
    0 0 16px rgba(139, 92, 246, 0.2),
    inset 0 1px 1px rgba(255, 255, 255, 0.3);
  z-index: 1;
}
@keyframes progressGradientMove {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

/* Progress bar moving shine */
.parse-progress-shine::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.35),
    transparent
  );
  animation: progressShine 1.8s ease-in-out infinite;
}
@keyframes progressShine {
  0% { left: -100%; }
  100% { left: 200%; }
}

/* --- Status Dot Pulse --- */
.parse-status-dot {
  animation: statusDotPulse 1.5s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.5);
}
@keyframes statusDotPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(99, 102, 241, 0); }
}

/* --- Fun Fact Carousel --- */
.parse-fun-fact {
  animation: funFactFadeIn 0.5s ease-out;
}
@keyframes funFactFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.parse-fun-emoji {
  animation: emojiWiggle 2s ease-in-out infinite;
  display: inline-block;
}
@keyframes emojiWiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-12deg) scale(1.1); }
  75% { transform: rotate(12deg) scale(1.1); }
}

/* --- Shield Icon Pulse --- */
.parse-shield-icon {
  animation: shieldPulse 3s ease-in-out infinite;
}
@keyframes shieldPulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}

/* Toast Notification overlay safety */
#toast, #copyToast {
  pointer-events: none;
}
#toast.show, #toast.opacity-100,
#copyToast.show, #copyToast.opacity-100 {
  pointer-events: auto;
}

/* Hide scrollbars for clean horizontal category carousels */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Zero-CLS Reserved Advertisement Containers */
.ad-container-reserved {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.2s ease;
}
.ad-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: #94a3b8;
  margin-bottom: 4px;
}

/* Editorial Table of Contents (TOC) */
.toc-sidebar {
  position: sticky;
  top: 5rem;
  max-height: calc(100vh - 6rem);
  overflow-y: auto;
}
.toc-link {
  display: block;
  font-size: 0.8125rem;
  color: #64748b;
  padding: 0.35rem 0.75rem;
  border-left: 2px solid transparent;
  transition: all 0.15s ease;
  line-height: 1.4;
}
.toc-link:hover {
  color: #4f46e5;
  border-left-color: #c7d2fe;
}
.toc-link.active {
  color: #4338ca;
  font-weight: 700;
  border-left-color: #4f46e5;
  background-color: rgba(99, 102, 241, 0.04);
  border-radius: 0 0.375rem 0.375rem 0;
}
.toc-h3 {
  padding-left: 1.5rem;
  font-size: 0.75rem;
}

/* Rich Editorial Content Body */
.editorial-body {
  color: #334155;
  font-size: 1.0625rem;
  line-height: 1.85;
}
.editorial-body h2 {
  font-size: 1.625rem;
  font-weight: 800;
  color: #0f172a;
  margin-top: 2.25rem;
  margin-bottom: 0.85rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
  scroll-margin-top: 5.5rem;
}
.editorial-body h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
  margin-top: 1.75rem;
  margin-bottom: 0.65rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
  scroll-margin-top: 5.5rem;
}
.editorial-body p {
  margin-bottom: 1.35rem;
}
.editorial-body ul, .editorial-body ol {
  margin-top: 0.75rem;
  margin-bottom: 1.35rem;
  padding-left: 1.5rem;
}
.editorial-body ul { list-style-type: disc; }
.editorial-body ol { list-style-type: decimal; }
.editorial-body li { margin-bottom: 0.5rem; }
.editorial-body blockquote {
  border-left: 4px solid #4f46e5;
  padding: 1rem 1.25rem;
  font-style: italic;
  color: #334155;
  margin: 1.75rem 0;
  background: #f8fafc;
  border-radius: 0 0.75rem 0.75rem 0;
}
.editorial-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.75rem 0;
  font-size: 0.875rem;
}
.editorial-body th, .editorial-body td {
  border: 1px solid #e2e8f0;
  padding: 0.75rem 1rem;
  text-align: left;
}
.editorial-body th {
  background-color: #f1f5f9;
  font-weight: 700;
  color: #0f172a;
}
.editorial-body tr:nth-child(even) {
  background-color: #f8fafc;
}

/* Zero-CLS Responsive Advertisement Slots */
.ad-slot-zero-cls {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  overflow: hidden;
  border-radius: 0.75rem;
}
.ad-slot-zero-cls iframe,
.ad-slot-zero-cls img,
.ad-slot-zero-cls video {
  max-width: 100% !important;
  height: auto !important;
}

/* Mobile Touch Target and Spacing Optimizations */
@media (max-width: 640px) {
  .touch-target-min {
    min-height: 42px;
    min-width: 42px;
  }
}

/* Modern Fintech Mobile Micro-animations */
@keyframes sheetSlideUp {
  from {
    transform: translateY(100%);
    opacity: 0.7;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

#mobileReportMenuModal > div {
  animation: sheetSlideUp 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.mobile-nav-btn, #mobileBottomNav button {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s ease, color 0.15s ease, background-color 0.15s ease;
}

.mobile-nav-btn:active, #mobileBottomNav button:active {
  transform: scale(0.92);
}

#mobileTxnSummaryCard {
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Mobile view overrides: strictly remove Jump to Section */
#sidebarNavCard {
  display: none !important;
}

@media (max-width: 767px) {
  #sidebarNavCard {
    display: none !important;
  }
}




/* ============================================================
   MOBILE RESPONSIVENESS & CHATBOT SEPARATION (320px - 768px)
   ============================================================ */

/* Chatbot Floating Mascot mobile positioning — sits strictly above bottom nav */
@media (max-width: 767px) {
  #chatbotMascotContainer {
    bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px)) !important;
    right: 0.85rem !important;
    z-index: 55 !important;
  }
  #chatbotMascot {
    width: 52px !important;
    height: 52px !important;
  }
  #chatbotSpeechBubble {
    max-width: min(180px, calc(100vw - 4.5rem)) !important;
    font-size: 11px !important;
    padding: 6px 10px !important;
    margin-bottom: 6px !important;
  }
  /* Bottom navigation bar: ensure it doesn't overlap page content */
  body {
    padding-bottom: calc(4.25rem + env(safe-area-inset-bottom, 0px)) !important;
  }
  /* Cookie banner positioning on mobile to sit above bottom nav */
  #cookieConsentBanner {
    bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* Hide mobile bottom nav smoothly when virtual keyboard is active */
.mobile-nav-keyboard-hide {
  transform: translateY(105%) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transition: transform 0.2s ease, opacity 0.2s ease !important;
}

/* Accessible touch targets & overflow containment */
@media (max-width: 640px) {
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }
  .touch-target-44 {
    min-height: 44px;
    min-width: 44px;
  }
  /* Dropzone disclaimer text wrap */
  #supportedBanksText {
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
  }
  /* Table containers scroll hint */
  .table-responsive-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
}

/* Collapsible accordion transition */
.collapsible-content {
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
}
.collapsible-collapsed {
  max-height: 0 !important;
  opacity: 0 !important;
  overflow: hidden !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}



/* ============================================================
   PREMIUM FINTECH MOBILE APP SHELL & AI ASSISTANT DRAWER
   ============================================================ */

#mobileBottomNav {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease !important;
}
.mobile-nav-hidden {
  transform: translateY(120%) !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Chatbot Floating Action Trigger Button */
#chatbotTriggerBtn {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
#chatbotTriggerBtn:active {
  transform: scale(0.92);
}

/* Chatbot Panel as High-End Mobile Bottom Sheet */
@media (max-width: 767px) {
  #chatbotPanel {
    position: fixed !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 72dvh !important;
    max-height: 85dvh !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    margin: 0 !important;
    border-radius: 1.75rem 1.75rem 0 0 !important;
    box-shadow: 0 -16px 48px rgba(17, 24, 39, 0.25) !important;
    border: none !important;
    border-top: 1px solid rgba(226, 232, 240, 0.9) !important;
    z-index: 120 !important;
    background: #ffffff !important;
    display: flex !important;
    flex-direction: column !important;
    transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.2s ease !important;
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
  }
  #chatbotPanel.chatbot-panel-hidden {
    transform: translateY(105%) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
  #chatbotPanel.chatbot-panel-visible {
    transform: translateY(0) !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }
  #chatbotPanel.chatbot-expanded {
    height: 94dvh !important;
    max-height: 96dvh !important;
  }
  #chatbotMascotContainer {
    bottom: calc(5.2rem + env(safe-area-inset-bottom, 0px)) !important;
    right: 1rem !important;
    z-index: 85 !important;
  }
  #chatbotTriggerBtn {
    width: 48px !important;
    height: 48px !important;
    box-shadow: 0 4px 16px rgba(55, 48, 163, 0.35) !important;
    background: #3730A3 !important;
    border: 2px solid #ffffff !important;
  }
  body {
    padding-bottom: calc(5.2rem + env(safe-area-inset-bottom, 0px)) !important;
  }
}

@media (min-width: 768px) {
  #chatbotPanel {
    width: 360px !important;
    height: 480px !important;
    max-height: calc(100vh - 110px) !important;
    border-radius: 1rem !important;
    bottom: 5.5rem !important;
    right: 1.5rem !important;
  }
}

/* Mobile Drawer Styling */
#mobileAppDrawerModal > div {
  transform: translateY(0);
}

/* Clean, Restrained Fintech Elevation */
.fintech-card-subtle {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* ============================================================
   PREMIUM FINTECH BANKING APP DESIGN SYSTEM (#3730A3 / #F7F8FC)
   ============================================================ */

/* Mobile App Page Background */
@media (max-width: 767px) {
  body {
    background-color: #F7F8FC !important;
    color: #111827 !important;
  }
}

/* Crisp Clean Header */
.glass-header {
  background: rgba(255, 255, 255, 0.94) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid #E5E7EB !important;
}

.glass-dock {
  background: rgba(255, 255, 255, 0.94) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  border-top: 1px solid #E5E7EB !important;
  box-shadow: 0 -4px 20px rgba(17, 24, 39, 0.05) !important;
}

/* Crisp 16-20px Card Radii & Subtle Neutral Shadows */
.glass-card {
  background: #FFFFFF !important;
  border: 1px solid #E5E7EB !important;
  border-radius: 1.25rem !important;
  box-shadow: 0 1px 3px rgba(17, 24, 39, 0.05), 0 1px 2px rgba(17, 24, 39, 0.03) !important;
}

.glass-card-interactive {
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.15s ease, border-color 0.15s ease !important;
}
.glass-card-interactive:active {
  transform: scale(0.98) !important;
  background-color: #F9FAFB !important;
}

.glass-pill {
  background: #F3F4F6 !important;
  border: 1px solid #E5E7EB !important;
  color: #374151 !important;
  box-shadow: none !important;
}

/* Deep Indigo #3730A3 Primary Button */
.glass-button-primary {
  background: #3730A3 !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 2px 8px rgba(55, 48, 163, 0.28) !important;
  border-radius: 1rem !important;
}
.glass-button-primary:hover {
  background: #312E81 !important;
}
.glass-button-primary:active {
  transform: scale(0.98) !important;
  box-shadow: 0 1px 4px rgba(55, 48, 163, 0.2) !important;
}

/* Touch ergonomic targets & tactile feedback */
.touch-target {
  min-height: 44px !important;
  min-width: 44px !important;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.touch-target-compact {
  min-height: 38px !important;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.touch-press {
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.15s ease, background-color 0.15s ease !important;
}
.touch-press:active {
  transform: scale(0.96) !important;
}

/* Tab Active Glass Highlight */
.bottom-nav-tab-active {
  color: #4f46e5 !important;
  background: rgba(79, 70, 229, 0.09) !important;
  border-radius: 0.875rem !important;
}


/* ============================================================
   PHASE 1: PREMIUM MOBILE APP SHELL POLISH
   ============================================================ */

/* Skeleton Loading Animation */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton-pulse {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 37%, #f1f5f9 63%) !important;
  background-size: 200% 100% !important;
  animation: shimmer 1.5s ease-in-out infinite;
  color: transparent !important;
  border-color: transparent !important;
  pointer-events: none;
  user-select: none;
}
.skeleton-block {
  display: block;
  border-radius: 0.375rem;
}

/* Card Entrance Stagger Animations */
@keyframes cardSlideUp {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (max-width: 767px) {
  .m-card-anim {
    animation: cardSlideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) backwards;
  }
  .m-card-anim:nth-child(1) { animation-delay: 0.04s; }
  .m-card-anim:nth-child(2) { animation-delay: 0.08s; }
  .m-card-anim:nth-child(3) { animation-delay: 0.12s; }
  .m-card-anim:nth-child(4) { animation-delay: 0.16s; }
  .m-card-anim:nth-child(5) { animation-delay: 0.20s; }
  .m-card-anim:nth-child(6) { animation-delay: 0.24s; }
  .m-card-anim:nth-child(7) { animation-delay: 0.28s; }
  .m-card-anim:nth-child(8) { animation-delay: 0.32s; }
}

/* Page Content Entrance */
@keyframes pageEntrance {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 767px) {
  .m-page-enter { animation: pageEntrance 0.35s ease-out; }
}

/* Compact Top Bar on Mobile */
@media (max-width: 767px) {
  header.glass-header {
    height: 52px !important;
    min-height: 52px !important;
    backdrop-filter: saturate(180%) blur(20px) !important;
    -webkit-backdrop-filter: saturate(180%) blur(20px) !important;
    background: rgba(255, 255, 255, 0.85) !important;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
  }
  header.glass-header > div {
    height: 52px !important;
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }
}

/* Enhanced Bottom Nav — iOS-grade glass */
@media (max-width: 767px) {
  #mobileBottomNav {
    backdrop-filter: saturate(200%) blur(24px) !important;
    -webkit-backdrop-filter: saturate(200%) blur(24px) !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border-top: 0.5px solid rgba(200, 208, 220, 0.5) !important;
    box-shadow: 0 -1px 0 rgba(0,0,0,0.03), 0 -8px 32px rgba(15, 23, 42, 0.05) !important;
    padding-bottom: max(0.5rem, env(safe-area-inset-bottom)) !important;
    height: auto !important;
  }
  .bottom-nav-tab-active {
    background: rgba(79, 70, 229, 0.1) !important;
    color: #4f46e5 !important;
    border-radius: 0.75rem !important;
  }
  .bottom-nav-tab-active i,
  .bottom-nav-tab-active svg {
    color: #4f46e5 !important;
    stroke: #4f46e5 !important;
  }
  .bottom-nav-tab-active span {
    color: #4f46e5 !important;
    font-weight: 700 !important;
  }
}

/* PWA Standalone Safe Area */
@media (max-width: 767px) {
  @supports (padding-top: env(safe-area-inset-top)) {
    body.pwa-standalone {
      padding-top: env(safe-area-inset-top);
    }
    body.pwa-standalone header.glass-header {
      padding-top: env(safe-area-inset-top) !important;
      height: calc(52px + env(safe-area-inset-top)) !important;
    }
  }
}

/* ============================================================
   PHASE 2: MICRO-INTERACTIONS & ANIMATION POLISH
   ============================================================ */

/* Tap Ripple — subtle radial press effect */
.tap-ripple {
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
.tap-ripple::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--ripple-x, 50%) var(--ripple-y, 50%), rgba(99, 102, 241, 0.12) 0%, transparent 65%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
  border-radius: inherit;
}
.tap-ripple:active::after {
  opacity: 1;
}

/* Bottom Sheet Slide-Up (improved spring) */
@keyframes sheetSpringUp {
  0% { transform: translateY(100%); opacity: 0; }
  60% { transform: translateY(-2%); opacity: 1; }
  100% { transform: translateY(0); opacity: 1; }
}
@media (max-width: 767px) {
  .m-sheet-animate {
    animation: sheetSpringUp 0.38s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }
}

/* Toast — improved entrance */
@keyframes toastSlideDown {
  0% { opacity: 0; transform: translate(-50%, -12px); }
  100% { opacity: 1; transform: translate(-50%, 0); }
}
@media (max-width: 767px) {
  #mobileAppToast {
    animation: toastSlideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }
}

/* Section Fade on Scroll (IntersectionObserver hook) */
@media (max-width: 767px) {
  .m-observe-fade {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .m-observe-fade.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Pull-to-refresh spinner */
@keyframes refreshSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.pull-refresh-spinner {
  width: 28px;
  height: 28px;
  border: 2.5px solid #e2e8f0;
  border-top-color: #4f46e5;
  border-radius: 50%;
  animation: refreshSpin 0.7s linear infinite;
}

/* Modal backdrop — improved blur */
@media (max-width: 767px) {
  .m-modal-backdrop {
    background: rgba(15, 23, 42, 0.45) !important;
    backdrop-filter: blur(6px) !important;
    -webkit-backdrop-filter: blur(6px) !important;
  }
}

/* ============================================================
   PHASE 3: AI CHAT — PREMIUM MOBILE RESTYLE
   ============================================================ */

/* Breathing Pulse on Chat FAB */
@keyframes fabBreathing {
  0%, 100% {
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.25), 0 0 0 0 rgba(99, 102, 241, 0.35);
  }
  50% {
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.25), 0 0 0 12px rgba(99, 102, 241, 0);
  }
}
@media (max-width: 767px) {
  #chatbotMascotContainer .chat-fab-pulse {
    animation: fabBreathing 3s ease-in-out infinite;
  }
}

/* Chat Message Animations — mobile enhanced */
@keyframes msgBubbleIn {
  from { opacity: 0; transform: translateY(10px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes msgBotSlideIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}
@media (max-width: 767px) {
  #chatbotPanel .chatbot-msg-user {
    animation: msgBubbleIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }
  #chatbotPanel .chatbot-msg-bot {
    animation: msgBotSlideIn 0.32s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }
}

/* Suggested Prompt Chip Cascade */
@keyframes chipCascade {
  from { opacity: 0; transform: translateY(6px) scale(0.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (max-width: 767px) {
  #chatbotQuickActions button,
  .chatbot-prompt-chip {
    animation: chipCascade 0.3s cubic-bezier(0.16, 1, 0.3, 1) backwards;
  }
  #chatbotQuickActions button:nth-child(1) { animation-delay: 0.05s; }
  #chatbotQuickActions button:nth-child(2) { animation-delay: 0.1s; }
  #chatbotQuickActions button:nth-child(3) { animation-delay: 0.15s; }
  #chatbotQuickActions button:nth-child(4) { animation-delay: 0.2s; }
}

/* Chat Panel — enhanced mobile bottom sheet */
@media (max-width: 767px) {
  #chatbotPanel {
    border-radius: 1.25rem 1.25rem 0 0 !important;
    box-shadow: 0 -8px 40px rgba(15, 23, 42, 0.18), 0 -1px 0 rgba(255,255,255,0.5) inset !important;
  }
  #chatbotPanel .chatbot-header-gradient {
    border-radius: 1.25rem 1.25rem 0 0;
  }
  /* Input area safe spacing */
  #chatbotForm {
    padding-bottom: max(0.5rem, env(safe-area-inset-bottom)) !important;
  }
}

/* Typing indicator — smoother dots */
@media (max-width: 767px) {
  .chatbot-typing-dot {
    width: 7px !important;
    height: 7px !important;
    background: #818cf8 !important;
  }
}

/* ============================================================
   PHASE 4: PWA & ACCESSIBILITY
   ============================================================ */

/* Prefers reduced motion — respect user preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .chat-fab-pulse,
  .skeleton-pulse {
    animation: none !important;
  }
}

/* Focus-visible ring for keyboard users */
@media (max-width: 767px) {
  #mobileBottomNav button:focus-visible,
  #mobileBottomNav a:focus-visible {
    outline: 2px solid #4f46e5;
    outline-offset: 2px;
    border-radius: 0.75rem;
  }
}

/* High contrast mode support */
@media (forced-colors: active) {
  .glass-header,
  .glass-dock,
  .glass-card {
    border: 1px solid CanvasText !important;
    background: Canvas !important;
  }
}

/* ============================================================
   MOBILE APP DESIGN SYSTEM v2 — Shared across all pages
   (hostinger_index.php, blog.php, documentation.php, tools hub)
   ALL rules scoped to <= 767px. Desktop (>= 768px) untouched.
   ============================================================ */

@media (max-width: 767px) {

  /* ---------- Mobile Animation Library ---------- */
  @keyframes pageFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  @keyframes mPageFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  @keyframes staggerFadeUp {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
  }
  @keyframes mStaggerFadeUp {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
  }

  @keyframes navIconPop {
    0%   { transform: scale(1); }
    45%  { transform: scale(1.28) translateY(-2px); }
    100% { transform: scale(1); }
  }
  @keyframes mNavIconPop {
    0%   { transform: scale(1); }
    45%  { transform: scale(1.28) translateY(-2px); }
    100% { transform: scale(1); }
  }

  @keyframes activeTabGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.45); }
    50%      { box-shadow: 0 0 0 6px rgba(79, 70, 229, 0); }
  }
  @keyframes mActiveDotGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.45); }
    50%      { box-shadow: 0 0 0 6px rgba(79, 70, 229, 0); }
  }

  @keyframes shimmerSkeleton {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
  }

  @keyframes cardPressLift {
    0%   { transform: scale(1); }
    50%  { transform: scale(0.975) translateY(1px); }
    100% { transform: scale(1); }
  }

  @keyframes mSheetSpringIn {
    from { transform: translateY(100%); opacity: 0.3; }
    70%  { transform: translateY(-1%); opacity: 1; }
    to   { transform: translateY(0); opacity: 1; }
  }

  @keyframes mBackdropFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
  }

  @keyframes mDragHandleGlint {
    0%, 100% { opacity: 0.85; }
    50%      { opacity: 0.45; }
  }

  /* Page content entrance */
  main, .m-page-fade {
    animation: pageFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  /* Scroll-reveal targets (activated by IntersectionObserver via .m-reveal) */
  .m-reveal {
    opacity: 0;
    transform: translateY(16px) scale(0.99);
    transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
  }
  .m-reveal.m-reveal-in {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  /* Staggered card entrance: blog cards, tool cards, grid children */
  .m-stagger > * {
    animation: staggerFadeUp 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: calc(var(--m-stagger-i, 0) * 50ms);
  }

  /* Touch press feedback for cards */
  .m-card-press, .cardPressLift {
    transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.15s ease;
    -webkit-tap-highlight-color: transparent;
  }
  .m-card-press:active, .cardPressLift:active {
    transform: scale(0.98) translateY(1px);
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08) !important;
  }

  /* Shimmer skeleton */
  .m-skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmerSkeleton 1.6s infinite;
    border-radius: 0.5rem;
  }

  /* ---------- .m-app-header: Compact app-style header ---------- */
  .m-app-header {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(20px) saturate(190%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(190%) !important;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8) !important;
    transition: box-shadow 0.25s ease, background 0.25s ease;
  }
  .m-app-header.m-scrolled {
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08) !important;
    background: rgba(255, 255, 255, 0.96) !important;
  }

  /* Compact pill buttons in mobile header */
  .m-header-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    border-radius: 0.75rem;
    font-size: 11px;
    font-weight: 700;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.12s ease, box-shadow 0.15s ease;
  }
  .m-header-pill:active {
    transform: scale(0.94);
  }
  .m-header-pill.m-pill-primary {
    background: #eef2ff;
    border: 1px solid rgba(199, 210, 254, 0.8);
    color: #4338ca;
  }
  .m-header-pill.m-pill-secondary {
    background: rgba(248, 250, 252, 0.9);
    border: 1px solid rgba(226, 232, 240, 0.9);
    color: #334155;
  }

  /* ---------- .m-bottom-nav: Figma-Grade Floating Bottom Dock ---------- */
  .m-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 90;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(28px) saturate(210%);
    -webkit-backdrop-filter: blur(28px) saturate(210%);
    border-top: 1px solid rgba(226, 232, 240, 0.75);
    box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.08), 0 -1px 0 rgba(255, 255, 255, 0.8) inset;
    padding-bottom: max(0.65rem, env(safe-area-inset-bottom, 0px));
    padding-top: 0.45rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-around;
  }
  .m-bottom-nav .m-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex: 1;
    min-height: 50px;
    color: #64748b;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: -0.01em;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: none;
    border-radius: 1rem;
    padding: 4px 2px;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.18s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.18s ease;
    position: relative;
  }
  .m-bottom-nav .m-tab svg,
  .m-bottom-nav .m-tab i {
    width: 21px;
    height: 21px;
    stroke-width: 2.1;
    transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.18s ease;
  }
  .m-bottom-nav .m-tab:active {
    transform: scale(0.92);
  }
  .m-bottom-nav .m-tab:active svg,
  .m-bottom-nav .m-tab:active i {
    animation: navIconPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  }
  .m-bottom-nav .m-tab.m-tab-active {
    color: #3730A3 !important;
  }
  .m-bottom-nav .m-tab.m-tab-active svg,
  .m-bottom-nav .m-tab.m-tab-active i {
    color: #3730A3 !important;
    transform: translateY(-2px);
    filter: drop-shadow(0 2px 6px rgba(55, 48, 163, 0.3));
  }
  .m-bottom-nav .m-tab .m-tab-dot {
    width: 14px;
    height: 3.5px;
    border-radius: 9999px;
    background: transparent;
    margin-top: 1px;
    transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  }
  .m-bottom-nav .m-tab.m-tab-active .m-tab-dot {
    background: #3730A3;
    box-shadow: 0 1px 4px rgba(55, 48, 163, 0.5);
  }

  /* Page body clearance for the shared dock */
  body.has-m-bottom-nav {
    padding-bottom: calc(5.2rem + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* ---------- .m-sheet-drawer: Figma-grade Native Bottom Sheet ---------- */
  .m-sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 110;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .m-sheet-backdrop.m-open {
    opacity: 1;
    pointer-events: auto;
  }
  .m-sheet, .m-sheet-drawer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 120;
    background: #ffffff;
    border-radius: 2rem 2rem 0 0;
    box-shadow: 0 -16px 48px rgba(15, 23, 42, 0.28), 0 -1px 0 rgba(255, 255, 255, 0.8) inset;
    transform: translateY(105%);
    transition: transform 0.34s cubic-bezier(0.32, 0.72, 0, 1);
    padding-bottom: max(1.5rem, env(safe-area-inset-bottom, 0px));
    max-height: 86dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .m-sheet.m-open, .m-sheet-drawer.m-open {
    transform: translateY(0);
    animation: mSheetSpringIn 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  }
  .m-sheet-handle {
    width: 48px;
    height: 4.5px;
    border-radius: 9999px;
    background: #cbd5e1;
    margin: 0.75rem auto 0.6rem;
    animation: mDragHandleGlint 2.4s ease-in-out infinite;
  }

  /* Staggered drawer menu items */
  .m-sheet .m-sheet-item, .m-sheet-drawer .m-sheet-item {
    animation: staggerFadeUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: calc(var(--m-stagger-i, 0) * 35ms);
  }

  /* Figma UI Kit Micro-Components for Mobile */
  .m-segment-bar {
    display: flex;
    background: #f1f5f9;
    border-radius: 1rem;
    padding: 3px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    position: relative;
  }
  .m-segment-pill {
    flex: 1;
    text-align: center;
    padding: 7px 10px;
    border-radius: 0.85rem;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }
  .m-segment-pill.active {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
  }

  /* Native App Widget Card */
  .m-app-widget {
    background: #ffffff;
    border-radius: 1.5rem;
    border: 1px solid rgba(226, 232, 240, 0.85);
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
    transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s ease;
  }
  .m-app-widget:active {
    transform: scale(0.985);
  }

  /* Animated hero gradient band */
  @keyframes mHeroGradientShift {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
  }
  .m-hero-gradient {
    background: linear-gradient(120deg, #1e1b4b, #312e81, #4f46e5, #312e81, #1e1b4b);
    background-size: 300% 300%;
    animation: mHeroGradientShift 8s ease-in-out infinite;
  }

  /* Floating decorative orbs */
  @keyframes mOrbDrift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(10px, -12px) scale(1.08); }
    66%      { transform: translate(-8px, 8px) scale(0.95); }
  }
  .m-orb {
    position: absolute;
    border-radius: 9999px;
    pointer-events: none;
    animation: mOrbDrift 7s ease-in-out infinite;
  }

  /* ============================================================
     MY SAVED STATEMENTS LIBRARY: MOBILE BOTTOM-SHEET & RESPONSIVENESS
     ============================================================ */
  #myStatementsModal {
    padding: 0 !important;
    align-items: flex-end !important;
    z-index: 100 !important;
  }

  #myStatementsModal > div {
    max-width: 100% !important;
    width: 100% !important;
    max-height: 90dvh !important;
    height: 88dvh !important;
    border-radius: 1.5rem 1.5rem 0 0 !important;
    border-bottom: none !important;
    border-left: none !important;
    border-right: none !important;
    margin: 0 !important;
    animation: mSheetSpringIn 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
  }

  #myStatementsModal .m-sheet-handle {
    display: block !important;
  }

  /* Responsive card cards in saved statements on mobile */
  .m-statement-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 0.875rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    transition: all 0.2s ease;
  }
  .m-statement-card:active {
    transform: scale(0.99);
    background: #f8fafc;
  }
}

/* Desktop safety net: never leak mobile-only pieces to >= 768px */
@media (min-width: 768px) {
  .m-bottom-nav,
  .m-sheet,
  .m-sheet-backdrop {
    display: none !important;
  }
  body.has-m-bottom-nav {
    padding-bottom: 0 !important;
  }
}

/* Reduced motion: calm everything down */
@media (prefers-reduced-motion: reduce) {
  .m-reveal,
  .m-stagger > *,
  .m-sheet .m-sheet-item,
  main {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .m-hero-gradient,
  .m-orb,
  .m-sheet-handle {
    animation: none !important;
  }
}
