/* =====================================================
   Syntro Health — Mobile-First Responsive Upgrade Pack
   Standards: WCAG 2.1 AA/AAA Touch Targets (>= 48x48px)
   Safe-Area Insets & Thumb-Zone Ergonomics
   ===================================================== */

/* ── 1. Root & Safe-Area Variables ── */
:root {
  --mobile-bottom-nav-height: 64px;
  --mobile-header-height: 56px;
  --touch-target-min: 48px;
  --safe-area-top: env(safe-area-inset-top, 0px);
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
  --safe-area-left: env(safe-area-inset-left, 0px);
  --safe-area-right: env(safe-area-inset-right, 0px);
}

/* ── 2. Viewport & Body Adjustments (< 992px) ── */
@media (max-width: 991.98px) {
  body {
    padding-bottom: calc(var(--mobile-bottom-nav-height) + var(--safe-area-bottom) + 16px) !important;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
  }

  /* Prevent iOS Auto-Zoom on form inputs (minimum 16px) */
  input, select, textarea, .form-control, .form-select, .q-input {
    font-size: 16px !important;
  }
}

/* ── Desktop Hide Enforcement (>= 992px) ── */
@media (min-width: 992px) {
  .mobile-top-header,
  .mobile-bottom-bar,
  .mobile-bottom-nav,
  .sticky-action-tray {
    display: none !important;
  }
}

/* ── 3. Mobile Top Header ── */
@media (max-width: 991.98px) {
  .mobile-top-header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    height: var(--mobile-header-height);
    background: var(--bg-glass, rgba(9, 13, 20, 0.92));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
    z-index: 1020;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
}

.mobile-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text-primary, #f8fafc);
}

.mobile-brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: contain;
  margin-right: 8px;
}

.mobile-brand-title {
  font-family: var(--font-sans);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-primary, #f8fafc);
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

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

.mobile-icon-btn {
  min-width: var(--touch-target-min);
  min-height: var(--touch-target-min);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));
  background: var(--bg-surface, #0f172a);
  color: var(--text-secondary, #94a3b8);
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.mobile-icon-btn:hover, .mobile-icon-btn:active {
  background: var(--accent-tint, rgba(16, 185, 129, 0.15));
  color: var(--accent-solid, #10b981);
  border-color: var(--border-accent, rgba(16, 185, 129, 0.3));
}

/* ── 4. Fixed Bottom Navigation Bar ── */
@media (max-width: 991.98px) {
  .mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--mobile-bottom-nav-height) + var(--safe-area-bottom));
    padding-bottom: var(--safe-area-bottom);
    background: var(--bg-glass, rgba(9, 13, 20, 0.95));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 1030;
  }
}

.mobile-nav-link {
  flex: 1;
  min-width: var(--touch-target-min);
  min-height: var(--touch-target-min);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text-secondary, #94a3b8);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 4px 0;
  position: relative;
  transition: all 0.15s ease-in-out;
  border: none;
  background: transparent;
}

.mobile-nav-link i {
  font-size: 1.28rem;
  margin-bottom: 2px;
  transition: transform 0.2s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link:active,
.mobile-nav-link.active {
  color: var(--accent-solid, #10b981);
}

.mobile-nav-link.active i {
  transform: scale(1.15);
  color: var(--accent-solid, #10b981);
}

.mobile-nav-badge {
  position: absolute;
  top: 4px;
  right: calc(50% - 16px);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber-500);
  border: 2px solid var(--white);
}

.mobile-nav-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--green-600);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}

/* ── 5. Offcanvas Mobile Drawer ── */
.mobile-drawer {
  max-width: 320px;
  border-right: 1px solid var(--slate-200);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.1);
}

.mobile-drawer-header {
  padding: 20px 16px;
  border-bottom: 1px solid var(--slate-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-drawer-close {
  min-width: var(--touch-target-min);
  min-height: var(--touch-target-min);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--slate-100);
  color: var(--slate-700);
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
}

.mobile-drawer-profile {
  padding: 16px;
  background: var(--green-50);
  border-radius: 12px;
  margin: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-drawer-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--green-600);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.mobile-drawer-nav {
  padding: 8px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-drawer-item {
  min-height: var(--touch-target-min);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  color: var(--slate-700);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.mobile-drawer-item i {
  font-size: 1.25rem;
  color: var(--slate-600);
  width: 24px;
  text-align: center;
}

.mobile-drawer-item:hover, .mobile-drawer-item:active {
  background: var(--green-50);
  color: var(--green-600);
}

.mobile-drawer-item:hover i, .mobile-drawer-item:active i {
  color: var(--green-600);
}

.mobile-drawer-divider {
  height: 1px;
  background: var(--slate-200);
  margin: 12px 16px;
}

/* ── 6. Mobile 7-Day Meal Plan Stack & Carousel ── */
@media (max-width: 767.98px) {
  .meal-day-tabs {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    margin-bottom: 16px;
    gap: 8px;
  }

  .meal-day-tabs::-webkit-scrollbar {
    display: none;
  }

  .meal-day-tabs .nav-item {
    scroll-snap-align: start;
    flex-shrink: 0;
  }

  .meal-day-tabs .nav-link {
    min-height: var(--touch-target-min);
    min-width: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 600;
  }

  .meal-card {
    margin-bottom: 16px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  }

  .meal-card-header {
    padding: 14px 16px;
  }

  .meal-card-body {
    padding: 16px;
  }

  .btn-swap-meal {
    width: 100%;
    min-height: var(--touch-target-min);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 12px;
  }

  .meal-macros {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 10px 0;
  }

  .macro-tag {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
  }
}

/* ── 7. Mobile Questionnaire Wizard (Sticky Step Bar & Touch Grids) ── */
.mobile-wizard-header {
  position: sticky;
  top: var(--mobile-header-height);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1010;
  padding: 10px 16px;
  border-bottom: 1px solid var(--slate-200);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.mobile-wizard-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.mobile-wizard-badge {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--green-700);
  background: var(--green-100);
  padding: 3px 10px;
  border-radius: 100px;
}

.mobile-wizard-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--slate-700);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60%;
}

.mobile-wizard-bar {
  height: 6px;
  background: var(--slate-100);
  border-radius: 100px;
  overflow: hidden;
}

.mobile-wizard-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green-500), var(--green-600));
  border-radius: 100px;
  transition: width 0.3s ease;
}

/* Touch Selection Card Grids */
@media (max-width: 767.98px) {
  .goal-card, .work-card, .stress-card, .diet-card, .nfpe-card {
    min-height: 52px;
    padding: 14px 16px !important;
    display: flex;
    align-items: center;
    border-radius: 12px;
    cursor: pointer;
    touch-action: manipulation;
  }

  .q-btn-prev, .q-btn-next, .q-btn-submit {
    min-height: var(--touch-target-min);
    font-size: 1rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .q-nav-buttons {
    display: flex;
    gap: 12px;
    margin-top: 24px;
  }

  .q-nav-buttons .btn {
    flex: 1;
  }
}

/* ── 8. Draggable Mobile Bottom Sheet Modal ── */
@media (max-width: 767.98px) {
  .modal.fade .modal-dialog.modal-bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0;
    max-width: 100%;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  }

  .modal.show .modal-dialog.modal-bottom-sheet {
    transform: translateY(0);
  }

  .modal-dialog.modal-bottom-sheet.is-dragging {
    transition: none !important;
    will-change: transform;
  }

  .modal-dialog.modal-bottom-sheet.is-dragging * {
    user-select: none !important;
    -webkit-user-select: none !important;
  }

  .modal-dialog.modal-bottom-sheet .modal-content {
    border-radius: 28px 28px 0 0;
    border: none;
    max-height: calc(100dvh - 2rem);
    display: flex;
    flex-direction: column;
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.22);
    background-clip: padding-box;
  }

  .bottom-sheet-drag-handle {
    width: 38px;
    height: 5px;
    background: var(--slate-300, #cbd5e1);
    border-radius: 9999px;
    margin: 10px auto 6px auto;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    cursor: grab;
    flex-shrink: 0;
    transition: background 0.15s ease, transform 0.15s ease;
  }

  [data-theme="dark"] .bottom-sheet-drag-handle,
  .dark-theme .bottom-sheet-drag-handle {
    background: rgba(255, 255, 255, 0.28);
  }

  .bottom-sheet-drag-handle:active {
    cursor: grabbing;
    background: var(--slate-400, #94a3b8);
    transform: scaleX(1.08);
  }

  [data-theme="dark"] .bottom-sheet-drag-handle:active,
  .dark-theme .bottom-sheet-drag-handle:active {
    background: rgba(255, 255, 255, 0.45);
  }

  .modal-dialog.modal-bottom-sheet .modal-header {
    border-bottom: 1px solid var(--slate-100, #f1f5f9);
    padding: 12px 20px;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    flex-shrink: 0;
  }

  [data-theme="dark"] .modal-dialog.modal-bottom-sheet .modal-header,
  .dark-theme .modal-dialog.modal-bottom-sheet .modal-header {
    border-bottom-color: rgba(255, 255, 255, 0.08);
  }

  .modal-dialog.modal-bottom-sheet .modal-body {
    padding: 20px;
    flex: 1 1 auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .modal-dialog.modal-bottom-sheet .modal-footer {
    border-top: 1px solid var(--slate-100, #f1f5f9);
    padding: 14px 20px;
    display: flex;
    gap: 10px;
    flex-shrink: 0;
  }

  [data-theme="dark"] .modal-dialog.modal-bottom-sheet .modal-footer,
  .dark-theme .modal-dialog.modal-bottom-sheet .modal-footer {
    border-top-color: rgba(255, 255, 255, 0.08);
  }

  .modal-dialog.modal-bottom-sheet .modal-footer .btn {
    flex: 1;
    min-height: var(--touch-target-min);
    font-size: 1rem;
    font-weight: 600;
  }
}

/* ── 9. General Accessibility & Tap Polish ── */
button, input[type="button"], input[type="submit"], a.btn {
  touch-action: manipulation;
}

.touch-target-48 {
  min-width: 48px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-close.touch-target-48 {
  width: 48px;
  height: 48px;
  padding: 16px;
  background-size: 16px;
}

/* ── 10. Mobile CTA & Action Stacking ── */
@media (max-width: 767.98px) {
  .results-cta-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }

  .results-cta-row .btn {
    width: 100%;
    margin-left: 0 !important;
    min-height: var(--touch-target-min);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
  }

  /* Table overflow protection */
  .table-responsive {
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
  }
}

/* ==========================================================================
   NutriAI / Syntro Health High-Efficiency Mobile Design System
   WCAG 2.1 AA/AAA Compliant • Thumb-Zone Ergonomics • Fluid Snap Navigation
   ========================================================================== */

/* ── Fixed Bottom Navigation Bar & Floating Thumb Zone ── */
@media (max-width: 991.98px) {
  .mobile-bottom-bar,
  .mobile-bottom-nav {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
    background: rgba(15, 23, 42, 0.96) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    z-index: 1050 !important;
    display: block !important;
  }
}

.bottom-bar-inner {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: 100%;
  align-items: center;
  max-width: 600px;
  margin: 0 auto;
}

.bar-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: var(--touch-target-min, 48px);
  min-width: var(--touch-target-min, 48px);
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 500;
  transition: all 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  border: none;
  background: transparent;
  padding: 4px 0;
}

.bar-tab:active {
  transform: scale(0.92);
}

.bar-tab.active {
  color: #4ade80 !important;
  font-weight: 700;
}

.tab-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 24px;
}

.tab-icon-wrap i {
  font-size: 1.25rem;
  line-height: 1;
}

.tab-label {
  margin-top: 2px;
  line-height: 1.2;
}

.tab-avatar-wrap {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #16a34a;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
}

/* Central Prominent CTA: Analyze */
.bar-tab.central-cta {
  position: relative;
  top: -12px;
}

.cta-bubble {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #22c55e, #15803d);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(34, 197, 94, 0.4);
  font-size: 1.35rem;
  border: 3px solid #0f172a;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.bar-tab.central-cta:active .cta-bubble {
  transform: scale(0.92);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

/* ── Offcanvas Bottom Sheet (Account Drawer) ── */
.mobile-sheet-drawer {
  border-top-left-radius: 24px !important;
  border-top-right-radius: 24px !important;
  background: #0f172a !important;
  color: #f8fafc !important;
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  max-height: 80vh !important;
}

.drag-handle-pill {
  width: 44px;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.25);
}

.drawer-user-badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #16a34a, #0d9488);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.btn-drawer-item {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn-drawer-item:hover, .btn-drawer-item:active {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

/* ── Swipeable Day Pill Carousel ── */
.mobile-day-strip {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 1020;
  margin: -16px -16px 20px -16px;
}

.day-pills-carousel {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  padding-bottom: 2px;
}

.day-pills-carousel::-webkit-scrollbar {
  display: none;
}

.day-pill-btn {
  flex: 0 0 54px;
  height: 64px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  scroll-snap-align: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.day-pill-btn .day-initial {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.day-pill-btn .day-num {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.1;
  margin-top: 2px;
}

.day-pill-btn .active-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: transparent;
  margin-top: 3px;
}

.day-pill-btn.active {
  background: linear-gradient(135deg, #16a34a, #15803d);
  border-color: #4ade80;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(22, 163, 74, 0.35);
}

.day-pill-btn.active .active-dot {
  background: #ffffff;
}

/* ── Mobile Meal Tile & Macro Badges ── */
.mobile-meal-tile {
  background: #ffffff;
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  border: 1px solid #f1f5f9;
  margin-bottom: 16px;
}

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

.tile-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.tile-label {
  font-weight: 700;
  font-size: 0.95rem;
  color: #0f172a;
}

.tile-time {
  font-size: 0.78rem;
  color: #64748b;
  margin-left: 4px;
}

.dish-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 4px;
}

.dish-desc {
  font-size: 0.82rem;
  color: #64748b;
  margin-bottom: 12px;
  line-height: 1.45;
}

.btn-quick-swap {
  min-height: 40px;
  padding: 6px 14px;
  border-radius: 20px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #16a34a;
  font-size: 0.82rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-quick-swap:active {
  background: #dcfce7;
  transform: scale(0.96);
}

.tile-macro-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.macro-badge {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 8px;
  font-weight: 500;
}

.macro-cal { background: #f8fafc; color: #334155; font-weight: 700; border: 1px solid #e2e8f0; }
.macro-p   { background: #eff6ff; color: #1d4ed8; border: 1px solid #dbeafe; }
.macro-c   { background: #fffbeb; color: #b45309; border: 1px solid #fef3c7; }
.macro-f   { background: #faf5ff; color: #7e22ce; border: 1px solid #f3e8ff; }

/* ── 1-Tap Touch Assessment Cards ── */
.goal-touch-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

@media (min-width: 576px) {
  .goal-touch-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.touch-card-option {
  cursor: pointer;
  display: block;
  margin: 0;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

.touch-card-content {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 76px;
}

.touch-card-content:active {
  transform: scale(0.98);
}

.card-icon-bubble {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.card-text-group {
  flex: 1;
}

.card-heading {
  font-size: 0.98rem;
  font-weight: 700;
  color: #ffffff;
  display: block;
}

.card-caption {
  font-size: 0.78rem;
  color: #94a3b8;
  display: block;
  margin-top: 3px;
  line-height: 1.35;
}

.check-indicator {
  margin-left: auto;
  font-size: 1.35rem;
  color: transparent;
  transition: color 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
}

.touch-card-option input:checked + .touch-card-content,
.touch-card-option.selected .touch-card-content {
  background: rgba(34, 197, 94, 0.14) !important;
  border-color: #22c55e !important;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25) !important;
}

.touch-card-option input:checked + .touch-card-content .check-indicator,
.touch-card-option.selected .touch-card-content .check-indicator {
  color: #22c55e !important;
  transform: scale(1.1);
}

/* ── Sticky Bottom Action Tray ── */
.sticky-action-tray {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 12px));
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 1040;
}

.btn-continue-action {
  width: 100%;
  min-height: 52px;
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: #ffffff;
  border: none;
  border-radius: 100px;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(22, 163, 74, 0.4);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-continue-action:active {
  transform: scale(0.98);
}

.btn-continue-action:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

