/**
 * MyLawyers.in - Mobile Splash Screen
 * Exact visual match to modern neumorphic/glassmorphic reference design
 * 100% Mobile Responsive, WCAG Accessible, Native CSS Grid & Flexbox
 */

:root {
  /* Dark Upper Section Palette */
  --bg-dark-base: #1b1e36;
  --bg-dark-elevated: #24294d;
  --bg-dark-gradient: linear-gradient(165deg, #181b33 0%, #222748 60%, #2a2f58 100%);
  --dark-glass-surface: rgba(43, 49, 86, 0.45);
  --dark-glass-border: rgba(255, 255, 255, 0.12);
  --dark-glass-glow: rgba(99, 102, 241, 0.18);
  --dark-input-bg: rgba(22, 25, 46, 0.7);
  --dark-input-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.45), inset -2px -2px 5px rgba(255, 255, 255, 0.04);

  /* Light Bottom Section Palette */
  --bg-light-base: #e9effb;
  --bg-light-surface: #eff4fd;
  --bg-light-gradient: linear-gradient(180deg, #ecf2fc 0%, #e2eaf8 100%);
  --squircle-bg: #eef3fc;
  --squircle-shadow: 6px 6px 14px rgba(166, 180, 208, 0.55), -6px -6px 14px rgba(255, 255, 255, 0.95);
  --squircle-shadow-hover: 8px 8px 18px rgba(166, 180, 208, 0.7), -8px -8px 18px rgba(255, 255, 255, 1);
  --squircle-shadow-active: inset 3px 3px 7px rgba(166, 180, 208, 0.6), inset -3px -3px 7px rgba(255, 255, 255, 0.9);

  /* Accent Colors */
  --accent-blue: #3b82f6;
  --accent-cyan: #38bdf8;
  --accent-purple: #6366f1;
  --accent-gold: #f59e0b;
  --accent-green: #10b981;
  --accent-rose: #f43f5e;

  /* Typography */
  --font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --text-white: #ffffff;
  --text-dark-primary: #1e2538;
  --text-dark-secondary: #586582;
  --text-dark-muted: #8c9bb5;
  --text-light-secondary: #9aa8c7;
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

html, body {
  width: 100%;
  min-height: 100vh;
  font-family: var(--font-family);
  background: radial-gradient(circle at 10% 20%, #7ee8fa 0%, #80ffea 20%, #a0c4ff 50%, #c77dff 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--text-dark-primary);
  overflow-x: hidden;
  touch-action: manipulation;
}

/* Instantaneous Top Nano-Loader Bar (< 1ms feedback on tap) */
.top-nav-loader {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3.5px;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.18s cubic-bezier(0.1, 0.9, 0.2, 1), opacity 0.08s ease;
}
.top-nav-loader.loading {
  opacity: 1;
  transform: scaleX(0.88);
  background: linear-gradient(90deg, #38bdf8 0%, #3b82f6 50%, #60a5fa 100%);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.95), 0 0 4px #3b82f6;
}
.top-nav-loader.finishing {
  transform: scaleX(1);
  opacity: 1;
}

/* Accessibility Focus Visible */
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 3px;
}

/* App Viewport Container (Device Wrapper) */
.mobile-device-shell {
  width: 100%;
  max-width: 410px;
  min-height: 840px;
  height: 94vh;
  max-height: 900px;
  background: var(--bg-dark-base);
  border-radius: 46px;
  position: relative;
  overflow: hidden;
  box-shadow: 
    0 25px 60px -10px rgba(28, 41, 77, 0.45),
    0 15px 35px rgba(0, 0, 0, 0.3),
    0 0 0 12px #294068,
    0 0 0 14px rgba(255, 255, 255, 0.15);
  display: flex;
  flex-direction: column;
}

/* Responsive: Native full bleed on smartphones */
@media (max-width: 480px) {
  body {
    background: var(--bg-dark-base);
    padding: 0;
    align-items: stretch;
  }
  .mobile-device-shell {
    max-width: 100%;
    height: 100vh;
    min-height: 100vh;
    max-height: 100%;
    border-radius: 0;
    box-shadow: none;
  }
}

/* Screen Content Scrollable Container */
.screen-scroll-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  scrollbar-width: none;
}
.screen-scroll-container::-webkit-scrollbar {
  display: none;
}

/* ==========================================================================
   TOP DARK SECTION (HEADER, SEARCH, CAROUSEL)
   ========================================================================== */
.top-dark-section {
  background: var(--bg-dark-gradient);
  padding: 16px 18px 44px 18px;
  position: relative;
  z-index: 2;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Top App Bar */
.top-app-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  height: 44px;
  margin-bottom: 8px;
  flex-shrink: 0;
}

/* MyLawyers Official Logo */
.brand-logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  height: 100%;
  max-width: 140px;
  z-index: 2;
}

.brand-logo-img {
  width: auto;
  max-width: 165px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45));
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.brand-logo-link:hover .brand-logo-img {
  transform: scale(1.06);
}

.brand-logo-link:active .brand-logo-img {
  transform: scale(0.96);
}

/* Top App Bar Actions Group */
.app-bar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 2;
}

/* App Bar Buttons / Hamburger Menu - Compact & Small */
.app-bar-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-white);
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s;
  padding: 0;
  flex-shrink: 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.22);
}

.app-bar-btn:hover {
  transform: scale(1.08);
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}

.app-bar-btn:active {
  transform: scale(0.95);
}

.app-bar-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* My Account Top Bar Button */
.my-account-bar-btn {
  text-decoration: none;
}

.my-account-bar-btn svg {
  width: 15px;
  height: 15px;
  display: block;
}

.my-account-bar-btn:hover svg {
  transform: scale(1.15);
}

.disclaimer-icon-btn svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}

.disclaimer-icon-btn:hover svg {
  transform: scale(1.1);
}

/* Scalloped Arch Profile Cutout */
.profile-notch-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-notch-arch {
  width: 66px;
  height: 38px;
  background: #1b1e36;
  border-radius: 0 0 22px 22px;
  position: absolute;
  top: -16px;
  box-shadow: 
    inset 0 4px 6px rgba(0, 0, 0, 0.4),
    0 6px 12px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.profile-avatar-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #282d4d;
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  cursor: pointer;
}
.profile-avatar-circle svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

/* Hamburger Menu Icon */
.menu-icon-btn svg {
  width: 14px;
  height: 14px;
}

/* Neumorphic Search Bar */
.search-bar-wrap {
  position: relative;
  margin-top: 10px;
  margin-bottom: 22px;
}

.search-input-field {
  width: 100%;
  height: 44px;
  background: var(--dark-input-bg);
  box-shadow: var(--dark-input-shadow);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 24px;
  padding: 0 46px 0 20px;
  font-family: var(--font-family);
  font-size: 0.9rem;
  color: #fff;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input-field::placeholder {
  color: #7b88a8;
  font-size: 0.88rem;
}

.search-input-field:focus {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: var(--dark-input-shadow), 0 0 12px rgba(99, 102, 241, 0.3);
}

.search-icon-btn {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #7b88a8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.search-icon-btn svg {
  width: 17px;
  height: 17px;
}

/* ==========================================================================
   WELCOME HERO BANNER (NO BOXES - PURE REFINED TYPOGRAPHY)
   ========================================================================== */
.welcome-hero-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(16px, 3.5vh, 28px) 16px clamp(18px, 4vh, 32px) 16px;
  margin: auto 0;
  position: relative;
  z-index: 2;
}

.welcome-hero-title {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: clamp(1.45rem, 5.5vw, 1.85rem);
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.025em;
  margin: 0 0 8px 0;
  line-height: 1.25;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.welcome-hero-subtitle {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: clamp(0.85rem, 3.3vw, 0.98rem);
  font-weight: 500;
  color: #93c5fd;
  letter-spacing: 0.015em;
  margin: 0;
  line-height: 1.45;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}



/* ==========================================================================
   CAROUSEL SECTION (CARDS EXTENSIBLE & SWIPEABLE - 1 CARD ALIGNED)
   ========================================================================== */
.carousel-viewport-wrapper {
  position: relative;
  width: 100%;
  margin: auto 0;
  padding: 0;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 0 14px 0;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.carousel-track::-webkit-scrollbar {
  display: none;
}

/* Welcome Showcase Slide (Pure typography, no box around welcome message) */
.showcase-card.welcome-showcase-card {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  min-height: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 16px;
  cursor: default;
}

.showcase-card.welcome-showcase-card:hover {
  transform: none !important;
  box-shadow: none !important;
}



.card-welcome-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
}

.card-welcome-title {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: clamp(1.35rem, 5.2vw, 1.68rem);
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin: 0 0 6px 0;
  line-height: 1.25;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.card-welcome-subtitle {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: clamp(0.85rem, 3.3vw, 0.98rem);
  font-weight: 500;
  color: #93c5fd;
  letter-spacing: 0.01em;
  margin: 0;
  line-height: 1.4;
}

/* Individual Showcase Card: 1 Card Shown, Perfectly Aligned */
.showcase-card {
  flex: 0 0 100%;
  width: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: linear-gradient(135deg, rgba(63, 73, 122, 0.45) 0%, rgba(36, 42, 77, 0.5) 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 26px;
  padding: 22px 20px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 
    0 16px 32px -8px rgba(0, 0, 0, 0.45),
    inset 0 1px 1px rgba(255, 255, 255, 0.25);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: inherit;
  touch-action: pan-y manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.showcase-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.28);
}

.showcase-card:active,
.showcase-card.tap-active {
  transform: scale(0.97) !important;
  border-color: rgba(99, 102, 241, 0.8) !important;
  box-shadow: 0 0 24px rgba(99, 102, 241, 0.55) !important;
  transition: transform 0.04s ease, border-color 0.04s ease, box-shadow 0.04s ease !important;
}

/* Card Header with Icon & Meta - Fully Centered */
.card-top-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 18px;
  width: 100%;
}

/* Real-Time Analog Clock Widget (Minimalist Swiss Dial) */
.analog-clock-wrap {
  width: 90px;
  height: 90px;
  position: relative;
  flex-shrink: 0;
}

.analog-clock-face {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(45, 55, 95, 0.95) 0%, rgba(18, 23, 44, 0.98) 100%);
  border: 2px solid rgba(255, 255, 255, 0.25);
  box-shadow: 
    0 8px 20px rgba(0, 0, 0, 0.45),
    inset 0 2px 4px rgba(255, 255, 255, 0.2),
    inset 0 -2px 4px rgba(0, 0, 0, 0.5);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Clock Face Hour Marks (Minimalist Swiss Watch Dial) */
.clock-mark {
  position: absolute;
  width: 1.5px;
  height: 4.5px;
  background: rgba(255, 255, 255, 0.45);
  border-radius: 1px;
  top: 5px;
  left: calc(50% - 0.75px);
  transform-origin: 50% 40px;
}

.clock-mark.major {
  width: 2.5px;
  height: 7px;
  background: rgba(255, 255, 255, 0.9);
  left: calc(50% - 1.25px);
}

.clock-mark.mark-12 { transform: rotate(0deg); }
.clock-mark.mark-1  { transform: rotate(30deg); }
.clock-mark.mark-2  { transform: rotate(60deg); }
.clock-mark.mark-3  { transform: rotate(90deg); }
.clock-mark.mark-4  { transform: rotate(120deg); }
.clock-mark.mark-5  { transform: rotate(150deg); }
.clock-mark.mark-6  { transform: rotate(180deg); }
.clock-mark.mark-7  { transform: rotate(210deg); }
.clock-mark.mark-8  { transform: rotate(240deg); }
.clock-mark.mark-9  { transform: rotate(270deg); }
.clock-mark.mark-10 { transform: rotate(300deg); }
.clock-mark.mark-11 { transform: rotate(330deg); }

/* Proportional Clock Hands */
.clock-hand {
  position: absolute;
  bottom: 50%;
  left: 50%;
  transform-origin: 50% 100%;
  border-radius: 3px;
  will-change: transform;
}

.clock-hand.hour {
  width: 3.5px;
  height: 25px;
  margin-left: -1.75px;
  background: #ffffff;
  z-index: 2;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.clock-hand.minute {
  width: 2.2px;
  height: 34px;
  margin-left: -1.1px;
  background: #93c5fd;
  z-index: 3;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.clock-hand.second {
  width: 1.5px;
  height: 38px;
  margin-left: -0.75px;
  background: #f59e0b;
  z-index: 4;
}

.clock-pivot-cap {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f59e0b;
  border: 1.5px solid #ffffff;
  z-index: 5;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Card Metadata with Digital Clock, Location, App Version */
.clock-card-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 3px;
}

.clock-digital-time {
  font-family: var(--font-family);
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.3px;
  line-height: 1.2;
  text-align: center;
}

.clock-location-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #93c5fd;
  margin-top: 1px;
}

.clock-location-pill svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  fill: currentColor;
}

.clock-ip-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 0.73rem;
  font-weight: 600;
  color: #7dd3fc;
  font-family: var(--font-family);
  letter-spacing: 0.2px;
}

.clock-ip-pill svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  fill: currentColor;
}

.clock-ver-meta {
  font-size: 0.72rem;
  font-weight: 500;
  color: #8c9bb5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.clock-ver-meta .tz-tag {
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
  padding: 1px 7px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
}

.card-3d-graphic {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}
.card-3d-graphic svg {
  width: 36px;
  height: 36px;
}

.card-title-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.card-main-title {
  color: #ffffff;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.2;
  text-align: center;
}

.card-meta-subtitle {
  color: #92a0c2;
  font-size: 0.82rem;
  font-weight: 500;
  margin-top: 4px;
  text-align: center;
}

/* Progress Bar in Card */
.card-progress-bar-track {
  width: 100%;
  height: 5px;
  background: rgba(14, 18, 35, 0.65);
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 12px;
  position: relative;
}

.card-progress-bar-fill {
  height: 100%;
  width: 58%;
  background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 100%);
  border-radius: 9999px;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.8);
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-bottom-info {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.card-stat-label {
  font-size: 0.76rem;
  color: #8391b2;
  font-weight: 500;
  letter-spacing: 0.3px;
  text-align: center;
}

.card-stat-label b,
.card-stat-label strong {
  font-weight: 800;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  display: inline-block;
  vertical-align: baseline;
}

/* Peeking Placeholder Card for Future Additions */
.showcase-card.add-card-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px dashed rgba(255, 255, 255, 0.2);
  background: rgba(43, 49, 86, 0.25);
  text-align: center;
  gap: 12px;
}
.add-card-placeholder .add-plus-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.6rem;
}

/* Dots Indicator for Carousel */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 6px;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  transition: all 0.3s ease;
}
.carousel-dot.active {
  width: 18px;
  border-radius: 4px;
  background: var(--accent-blue);
}

/* ==========================================================================
   ORGANIC WAVE DIVIDER (Anchored to base of 65% dark section)
   ========================================================================== */
.organic-wave-divider {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  line-height: 0;
  z-index: 3;
  pointer-events: none;
  margin: 0;
}

.organic-wave-divider svg {
  display: block;
  width: 100%;
  height: 38px;
  filter: drop-shadow(0 -2px 5px rgba(0, 0, 0, 0.1));
}

.organic-wave-divider path {
  fill: var(--bg-light-base);
}

/* ==========================================================================
   BOTTOM LIGHT SECTION (MINIMUM HEIGHT, COMPACT ICONS FOR MOBILE)
   ========================================================================== */
.bottom-light-section {
  background: var(--bg-light-gradient);
  flex: 0 0 auto;
  height: auto;
  min-height: auto;
  padding: 6px clamp(8px, 2vw, 14px) 50px clamp(8px, 2vw, 14px);
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

/* 4-Column Neumorphic Features Grid - Compact on Mobile */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(5px, 1.4vw, 8px) clamp(3px, 1.1vw, 6px);
  margin-bottom: 2px;
  width: 100%;
}

/* Feature Squircle Button */
.feature-squircle-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  outline: none;
  width: 100%;
  max-width: 100%;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.feature-squircle-btn:hover {
  transform: translateY(-3px);
}
.feature-squircle-btn:active,
.feature-squircle-btn.tap-active {
  transform: scale(0.92) !important;
  transition: transform 0.04s ease !important;
}

/* The tactile 3D Neumorphic Tile (Compact for Mobile) */
.squircle-tile {
  width: clamp(44px, 11.5vw, 50px);
  height: clamp(44px, 11.5vw, 50px);
  background: var(--squircle-bg);
  border-radius: clamp(12px, 3.2vw, 15px);
  border: 1.5px solid transparent;
  box-shadow: var(--squircle-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 2px;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.15s ease, background 0.15s ease;
  touch-action: manipulation;
}

/* Highlight Tile on Hover */
.feature-squircle-btn:hover .squircle-tile {
  background: linear-gradient(135deg, #ffffff 0%, #e0edff 100%);
  border-color: rgba(59, 130, 246, 0.55);
  box-shadow: 
    0 0 16px rgba(59, 130, 246, 0.4),
    6px 6px 16px rgba(166, 180, 208, 0.7),
    -6px -6px 16px rgba(255, 255, 255, 1);
  transform: scale(1.05);
}

.feature-squircle-btn:active .squircle-tile,
.feature-squircle-btn.tap-active .squircle-tile {
  background: linear-gradient(135deg, #ffffff 0%, #e0edff 100%) !important;
  border-color: rgba(59, 130, 246, 0.7) !important;
  box-shadow: var(--squircle-shadow-active), 0 0 14px rgba(59, 130, 246, 0.5) !important;
  transform: scale(0.93) !important;
  transition: all 0.04s ease !important;
}

/* 3D Graphic Inside Tile - Highlight with Glow & Scale on Hover */
.feature-icon-svg {
  width: clamp(22px, 5.8vw, 26px);
  height: clamp(22px, 5.8vw, 26px);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.15s ease;
}

.feature-squircle-btn:hover .feature-icon-svg {
  transform: scale(1.18);
  filter: 
    drop-shadow(0 0 10px rgba(59, 130, 246, 0.85)) 
    drop-shadow(0 3px 6px rgba(30, 58, 138, 0.4)) 
    brightness(1.15);
}

.feature-squircle-btn:active .feature-icon-svg,
.feature-squircle-btn.tap-active .feature-icon-svg {
  transform: scale(1.18) !important;
  filter: drop-shadow(0 0 12px rgba(59, 130, 246, 0.95)) !important;
  transition: transform 0.04s ease !important;
}

/* Feature Labels (Compact on Mobile & Highlighted on Hover) */
.feature-name {
  font-size: clamp(0.58rem, 1.6vw, 0.66rem);
  font-weight: 700;
  color: var(--text-dark-primary);
  text-align: center;
  line-height: 1.12;
  margin-bottom: 1px;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.feature-squircle-btn:hover .feature-name {
  color: #1d4ed8;
  text-shadow: 0 0 8px rgba(59, 130, 246, 0.3);
}

.feature-subtitle {
  font-size: clamp(0.50rem, 1.3vw, 0.56rem);
  font-weight: 500;
  color: var(--text-dark-muted);
  text-align: center;
  line-height: 1.08;
  transition: color 0.2s ease;
}

.feature-squircle-btn:hover .feature-subtitle {
  color: #3b82f6;
}

/* Empty Placeholder Squircles (as in screenshot) */
.squircle-tile.placeholder-slot {
  background: rgba(228, 235, 247, 0.5);
  box-shadow: inset 2px 2px 5px rgba(166, 180, 208, 0.4), inset -2px -2px 5px rgba(255, 255, 255, 0.8);
  border: 1px dashed rgba(166, 180, 208, 0.5);
}

/* Real-Time Context Status Bar (Compact Below Grid) */
.app-status-bar {
  text-align: center;
  padding: 1px 8px 1px 8px;
  font-size: 0.64rem;
  color: var(--text-dark-muted);
  line-height: 1.2;
  margin-top: 0;
}

.status-copyright {
  font-weight: 500;
  margin-bottom: 2px;
  color: var(--text-dark-secondary);
}

.status-copyright strong {
  color: var(--text-dark-primary);
  font-weight: 700;
}

.status-meta {
  font-size: 0.69rem;
  color: var(--text-dark-muted);
  letter-spacing: 0.2px;
}

/* ==========================================================================
   BOTTOM FOOTER (COPYRIGHT & APP VERSION)
   ========================================================================== */
.splash-bottom-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 44px;
  background: linear-gradient(180deg, rgba(244, 248, 255, 0.88) 0%, rgba(228, 237, 251, 0.96) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  z-index: 10;
  box-shadow: 0 -3px 12px rgba(180, 194, 220, 0.2);
}

.footer-meta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 480px;
}

.footer-left-meta {
  display: flex;
  align-items: center;
  gap: 7px;
}

.footer-brand-name {
  font-family: var(--font-family);
  font-size: clamp(0.7rem, 2.5vw, 0.78rem);
  font-weight: 700;
  color: #1e3a8a;
  letter-spacing: 0.01em;
}

.footer-version-tag {
  font-family: var(--font-family);
  font-size: clamp(0.6rem, 2.1vw, 0.68rem);
  font-weight: 600;
  color: #2563eb;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 6px;
  padding: 1px 6px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}

.footer-copyright-text {
  font-family: var(--font-family);
  font-size: clamp(0.68rem, 2.4vw, 0.75rem);
  font-weight: 500;
  color: #475569;
  margin: 0;
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-align: right;
}

/* ==========================================================================
   DRAWER / BCI DISCLAIMER MODAL
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(14, 18, 35, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-sheet {
  width: 100%;
  max-width: 480px;
  max-height: 82vh;
  background: #ffffff;
  border-radius: 32px 32px 0 0;
  padding: 24px 24px 34px 24px;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 -15px 40px rgba(0, 0, 0, 0.35);
}

.modal-overlay.active .modal-sheet {
  transform: translateY(0);
}

.sheet-handle {
  width: 42px;
  height: 5px;
  background: #ccd5e5;
  border-radius: 9999px;
  margin: 0 auto 18px auto;
}

.sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.sheet-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1a1e36;
}

.sheet-close-btn {
  background: #eef2fa;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.1rem;
  color: #657494;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sheet-body {
  overflow-y: auto;
  font-size: 0.88rem;
  line-height: 1.6;
  color: #4a5572;
}

.sheet-body p {
  margin-bottom: 12px;
}

.sheet-agree-btn {
  margin-top: 18px;
  background: #2563eb;
  color: #ffffff;
  border: none;
  padding: 13px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background 0.2s;
}
.sheet-agree-btn:hover {
  background: #1d4ed8;
}
